1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18\startmodule[presentshaded]
19
20\setuppapersize[S6]
21
22\setuplayout
23 [cutspace=120pt,
24 rightmargin=100pt,
25 margindistance=10pt,
26 rightmargin=0pt,
27 margindistance=0pt,
28 rightedge=100pt,
29 edgedistance=12.5pt,
30 backspace=10pt,
31 topspace=10pt,
32 bottomspace=10pt,
33 header=0pt,
34 footer=0pt,
35 width=middle,
36 height=middle]
37
38\setupbodyfont
39 [dejavu]
40
41\setuplist
42 [chapter]
43 [before=,
44 after=,
45 inbetween=\vskip5pt,
46 inbetween=\vfill,
47 alternative=e,
48 width=\hsize,
49 height=\measure{menuitemheight},
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=5pt,
69 bottomoffset=5pt]
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{presentshaded}{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=5pt,
96 backgroundcolor=verydark]
97
98\setupbackgrounds
99 [text]
100 [background={invoke,color},
101 backgroundoffset=5pt,
102 backgroundcolor=\namedstructureuservariable{chapter}{color}]
103
104\definemeasure
105 [menuitemheight]
106 [(\textheight\numexpr\moduleparameter{presentshaded}{n}1\relax\dimexpr5pt\relax)\moduleparameter{presentshaded}{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{spresentshaded.mkiv}
158
159\usemodule[presentcommon]
160
161\inputpresentationfile{examplespresentshaded001.tex}
162 |