s-article-titletop.mkiv /size: 2042 b    last modification: 2020-07-01 14:35
1%D \module
2%D   [      file=s-article-titletop,
3%D        version=2018.05.20,
4%D          title=\CONTEXT\ Style File,
5%D       subtitle=Article Top Title,
6%D         author=Hans Hagen,
7%D           date=\currentdate,
8%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9%C
10%C This module is part of the \CONTEXT\ macro||package and is
11%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12%C details.
13
14\startmodule[article-titletop]
15
16\unprotect
17
18\defineframed
19  [titlepageframed]
20  [\c!frame=\v!off,
21   \c!align=\v!middle]
22
23\startsetups document:titlepage
24    \setupheader[\c!state=\v!high]
25    \start
26        \forgetall
27        \startalignment[\v!middle]
28            \doifdocumentvariable {title} {
29                \dontleavehmode \titlepageframed
30                    [\c!foregroundstyle=\bfd\setupinterlinespace]
31                    {\documentvariable {title}}
32                \par
33            }
34            \doifdocumentvariable {subject} {
35                \dontleavehmode \titlepageframed
36                    [\c!foregroundstyle=\bfb\setupinterlinespace]
37                    {\documentvariable {subject}}
38                \par
39            }
40            \doifdocumentvariable {author} {
41                \dontleavehmode \titlepageframed
42                    [\c!foregroundstyle=\bfa\setupinterlinespace]
43                    {\documentvariable {author}}
44            \par
45            }
46            \doifdocumentvariable {affiliation} {
47                \dontleavehmode \titlepageframed
48                    [\c!foregroundstyle=\bfa\setupinterlinespace]
49                    {\documentvariable {affiliation}}
50            \par
51            }
52            \doifdocumentvariable {date} {
53                \dontleavehmode \titlepageframed
54                    [\c!foregroundstyle=\bfa\setupinterlinespace]
55                    {\documentvariable {date}}
56            \par
57            }
58            \blank[3*\v!big]
59        \stopalignment
60    \stop
61\stopsetups
62
63\setupdocument
64  [\c!before=\directsetup{document:titlepage}]
65
66\protect
67
68\stopmodule
69