1
2
3
4
5
6
7
8\startenvironment lowlevelstyle
9
10\usemodule[abbreviationslogos]
11\usemodule[scite]
12
13\setvariables
14 [document]
15 [title=No Title,
16 author=No Author,
17 coauthor=,
18 color=NoColor]
19
20\setupbodyfont
21 [dejavu,11pt]
22
23\setuplayout
24 [width=middle,
25 height=middle,
26 backspace=2cm,
27 topspace=15mm]
28
29\setupwhitespace
30 [big]
31
32\setuphead
33 [chapter]
34 [style=\bfc,
35 color=darkgray]
36
37\setuphead
38 [section]
39 [style=\bfb,
40
41 color=darkgray]
42
43\setuphead
44 [subsection]
45 [style=\bfa,
46 color=darkgray]
47
48\setuplist
49 [chapter]
50 [style=bold]
51
52\setupfootertexts
53 [section]
54
55\setupfooter
56 [style=bold,
57 color=darkgray]
58
59\startuseMPgraphic{titlepage}
60 fill Page
61 withcolor "\documentvariable{color}" ;
62
63 numeric d ; d := 2mm ;
64
65 picture p ; p := textext.llft("\tex{}")
66 xysized (.1PaperWidth-2d,.1PaperHeight-2d)
67 shifted (.1PaperWidth d,.1PaperHeight d)
68 ;
69
70 draw image (
71 for i = 0 step .1 PaperWidth until PaperWidth :
72 for j = 0 step .1 PaperHeight until PaperHeight :
73 draw p shifted (i,j) ;
74 endfor ;
75 endfor ;
76 ) withcolor .5resolvedcolor("middlegray") ;
77
78 draw textext.d("\strut low level")
79 xsized (.8PaperWidth)
80 shifted center topboundary Page
81 shifted (0,.2PaperHeight)
82 withcolor "white" ;
83 draw textext.d("\strut \TeX")
84 xsized (.4PaperWidth)
85 shifted center topboundary Page
86 shifted (0,.4PaperHeight)
87 withcolor "white" ;
88 draw textext.d("\strut\documentvariable{title}")
89 ysized 3cm
90 shifted center bottomboundary Page
91 shifted (0,.1PaperHeight)
92 withcolor "white" ;
93\stopuseMPgraphic
94
95\definesectionlevels
96 [default]
97 [
98 {section,subject},
99 {subsection,subsubject},
100 {subsubsection,subsubsubject},
101 {subsubsubsection,subsubsubject},
102 {subsubsubsubsection,subsubsubject}]
103
104\startsetups document:start
105
106 \startMPpage
107 StartPage;
108 \includeMPgraphic{titlepage} ;
109 StopPage;
110 \stopMPpage
111
112 \page
113
114 \startsubjectlevel[title=Contents]
115 \placelist[chapter,section] [criterium=previous]
116 \stopsubjectlevel
117
118\stopsetups
119
120\startsetups document:stop
121
122\testpage[6]
123
124
125\startsectionlevel[title=Colofon,number=no,saveinlist=no]
126
127 \starttabulate
128 \NC Author \NC Hans Hagen
129 \doifdocumentvariable{coauthor}{ \documentvariable{coauthor}}
130 \NC \NR
131 \NC \CONTEXT \NC \contextversion \NC \NR
132 \NC \LUAMETATEX \NC \texengineversion \NC \NR
133 \NC Support \NC www.pragmaade.com \NC \NR
134 \NC \NC contextgarden.net \NC \NR
135 \stoptabulate
136
137\stopsectionlevel
138
139
140\stopsetups
141
142\stopenvironment
143 |