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