1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17\startmodule [ present banner ]
18
19\definecolor [ maincolor ] [ b = . 6 5 ]
20\definecolor [ othercolor ][ s = . 3 5 ]
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 ( .9 PaperWidth )
54 withcolor white ;
55 ) , center bottomboundary Page ) ;
56
57 fill Field [ Text ] [ Text ] enlarged 10 pt withcolor .1 white ;
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 , 1 0 pt ]
71
72\setuppapersize
73 [ S 6 ]
74
75\setuplayout
76 [ backspace = 3 0 pt ,
77 width = middle ,
78 height = middle ,
79 topspace = 3 0 pt ,
80 bottomspace = 1 0 0 pt ,
81 header = 0 pt ,
82 footer = 0 pt ,
83 margin = 0 pt ]
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 . 0 0 \textwidth ] { \documentvariable { title }} \vfil
119 \dontleavehmode \scale [ width = 0 . 7 5 \textwidth ] { \documentvariable { subtitle }} \vfil
120 \dontleavehmode \scale [ width = 0 . 4 5 \textwidth ] { \documentvariable { location }} \vfil
121
122 \stopstandardmakeup
123
124\stopsetups
125
126\stopmodule
127
128\continueifinputfile { s present banner . mkiv }
129
130\usemodule [ present common ]
131
132\inputpresentationfile { bachotex 2 0 1 6 bachotex 2 0 1 6 opentype . tex }
133 |