1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17\startmodule[presentbanner]
18
19\definecolor[maincolor] [b=.65]
20\definecolor[othercolor][s=.35]
21
22\startluacode
23 function mp.Banner(s,mode)
24
25 local r = tex.count.realpageno - 1
26 local n = #s
27 local i = mode and 1 or 0
28 local t = string.gsub(s,".",function(s)
29 if s == " " or i > n then
30 return s
31 elseif i == r then
32 i = i + 1
33 if mode then
34 return "\\color[othercolor]{" .. s .. "}"
35 else
36 return "\\maincolor " .. s
37 end
38 else
39 i = i + 1
40 return s
41 end
42 end)
43 mp.quoted(t)
44 end
45\stopluacode
46
47\startuseMPgraphic{page}
48 StartPage ;
49 fill Page withcolor \MPcolor{maincolor} ;
50 draw anchored(image (
51
52 draw textext.top (lua.mp.Banner("\documentvariable{title}",false))
53 xsized (.9PaperWidth)
54 withcolor white;
55 ), center bottomboundary Page);
56
57 fill Field[Text][Text] enlarged 10pt withcolor .1white ;
58 StopPage ;
59\stopuseMPgraphic
60
61\setupbackgrounds
62 [page]
63 [background=page]
64
65\defineoverlay
66 [page]
67 [\useMPgraphic{page}]
68
69\setupbodyfont
70 [lucidaot,10pt]
71
72\setuppapersize
73 [S6]
74
75\setuplayout
76 [backspace=30pt,
77 width=middle,
78 height=middle,
79 topspace=30pt,
80 bottomspace=100pt,
81 header=0pt,
82 footer=0pt,
83 margin=0pt]
84
85\setupcolors
86 [textcolor=white]
87
88\setupwhitespace
89 [big]
90
91\setuphead
92 [chapter]
93 [style=\bfd,
94 after={\blank[big]}]
95
96\setuphead
97 [section]
98 [style=\bfa,
99 before=\blank,
100 after={\blank[medium]}]
101
102\definehighlight[nb][style=bold]
103
104\setupitemgroup[itemize][before=,after=]
105\setupitemgroup[itemize][packed]
106
107\setupdocument
108 [title=Title,
109 subtitle=Subtitle,
110 location=\currentdate]
111
112\startsetups document:start
113
114 \startstandardmakeup
115
116 \raggedcenter
117
118 \dontleavehmode\scale[width=1.00\textwidth]{\documentvariable{title}} \vfil
119 \dontleavehmode\scale[width=0.75\textwidth]{\documentvariable{subtitle}} \vfil
120 \dontleavehmode\scale[width=0.45\textwidth]{\documentvariable{location}} \vfil
121
122 \stopstandardmakeup
123
124\stopsetups
125
126\stopmodule
127
128\continueifinputfile{spresentbanner.mkiv}
129
130\usemodule[presentcommon]
131
132\inputpresentationfile{bachotex2016bachotex2016opentype.tex}
133 |