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