1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18\startmodule [ present shaded ]
19
20\setuppapersize [ S 6 ]
21
22\setuplayout
23 [ cutspace = 1 2 0 pt ,
24 rightmargin = 1 0 0 pt ,
25 margindistance = 1 0 pt ,
26 rightmargin = 0 pt ,
27 margindistance = 0 pt ,
28 rightedge = 1 0 0 pt ,
29 edgedistance = 1 2 . 5 pt ,
30 backspace = 1 0 pt ,
31 topspace = 1 0 pt ,
32 bottomspace = 1 0 pt ,
33 header = 0 pt ,
34 footer = 0 pt ,
35 width = middle ,
36 height = middle ]
37
38\setupbodyfont
39 [ dejavu ]
40
41\setuplist
42 [ chapter ]
43 [ before = ,
44 after = ,
45 inbetween = \vskip 5 pt ,
46 inbetween = \vfill ,
47 alternative = e ,
48 width = \hsize ,
49 height = \measure { menu item height } ,
50 style = bold ,
51 frame = off ,
52 background = color ,
53 backgroundcolor = \structurelistuservariable { color } ,
54 criterium = text ]
55
56\setupcolors
57 [ textcolor = white ]
58
59\setupinteraction
60 [ state = start ,
61 menu = on ,
62 color = white ,
63 click = off ,
64 contrastcolor = white ]
65
66\setupinteractionmenu
67 [ right ]
68 [ topoffset = 5 pt ,
69 bottomoffset = 5 pt ]
70
71\startinteractionmenu [ right ]
72 \placelist [ chapter ]
73\stopinteractionmenu
74
75\definecolor [ maincolor ] [ b = . 4 ]
76\definecolor [ othercolor ] [ s = . 4 ]
77
78\definecolor [ verydark ] [ s = . 2 ]
79\definecolor [ lessdark ] [ 1 . 5 ( verydark ) ]
80
81
82
83\setupmodule
84 [ n = \the \numexpr \lastpage \plusone \relax ]
85
86\appendtoks
87 \dorecurse { \moduleparameter { present shaded } { n } } {
88 \definecolor [ shade : # 1 ] [ \luaexpr{ . 8 * # 1 / \moduleparameter { present - shaded } { n } } ( maincolor , othercolor ) ]
89 }
90\to \everystarttext
91
92\setupbackgrounds
93 [ page ]
94 [ background = color ,
95 backgroundoffset = 5 pt ,
96 backgroundcolor = verydark ]
97
98\setupbackgrounds
99 [ text ]
100 [ background = { invoke , color } ,
101 backgroundoffset = 5 pt ,
102 backgroundcolor = \namedstructureuservariable { chapter } { color } ]
103
104\definemeasure
105 [ menu item height ]
106 [ ( \textheight \numexpr \moduleparameter { present shaded } { n } 1 \relax \dimexpr 5 pt \relax ) \moduleparameter { present shaded } { n } ]
107
108\setupitemgroup
109 [ itemize ]
110 [ packed ]
111
112\setuphead
113 [ chapter ]
114 [ number = no ,
115 style = \bfc ]
116
117\setuphead
118 [ section ]
119 [ number = no ,
120 style = \bf ,
121 before = \blank ,
122 after = \blank ]
123
124\setupdocument
125 [ title = Title ,
126 subtitle = Subtitle ,
127 location = \currentdate ]
128
129\startsetups document : start
130
131 \setupbackgrounds
132 [ text ]
133 [ backgroundcolor = lessdark ]
134
135 \startstandardmakeup
136
137 \setupalign [ middle ]
138
139 \vfil
140 \dontleavehmode \scale [ width = . 8 \textwidth ] { \documentvariable { title } }
141 \vfil
142 \dontleavehmode \scale [ width = . 6 \textwidth ] { \documentvariable { subtitle } }
143 \vfil \vfil \vfil
144 \dontleavehmode \scale [ width = . 4 \textwidth ] { \documentvariable { location } }
145 \vfil
146
147 \stopstandardmakeup
148
149 \setupbackgrounds
150 [ text ]
151 [ backgroundcolor = \namedstructureuservariable { chapter } { color } ]
152
153\stopsetups
154
155\stopmodule
156
157\continueifinputfile { s present shaded . mkiv }
158
159\usemodule [ present common ]
160
161\inputpresentationfile { examples present shaded 0 0 1 . tex }
162 |