1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17\usemodule[presentwindows]
18
19\startmodule[presentgrow]
20
21
22
23
24\definecolor[LineColor][r=.40,g=.40,b=1.00]
25
26
27
28
29\setupframedtexts
30 [SampleText]
31 [width=fit,height=fit,
32 background={background,nextpage}]
33
34
35
36
37
38\setuplayer
39 [topic]
40 [y=0pt,x=\makeupwidth,
41 location=lb,
42 state=repeat,
43 hoffset=\FrameSkip,
44 voffset=\FrameSkip]
45
46
47
48\setupbackgrounds
49 [page]
50 [background={previouspage,color,topic}]
51
52
53
54
55\setupbackgrounds
56 [text]
57 [background={common,sample,text}]
58
59
60
61\defineoverlay [samepage] [\overlaybutton{nextpage}]
62
63
64
65
66\startsetups [always]
67 \setupwhitespace[big]
68 \setupblank[big]
69\stopsetups
70
71
72
73\unexpanded\def\Topic#1
74 {\resetlayer[topic]
75 \setlayer[topic]{\bfb\setstrut\color[TextColor]{#1}}}
76
77
78
79\unexpanded\def\NoTopic
80 {\resetlayer[topic]}
81
82
83
84
85\newcounter\TextN
86
87\unexpanded\def\StartSample
88 {\doglobal\newcounter\TextN
89 \dostartbuffer[sample][StartSample][StopSample]}
90
91\unexpanded\def\StartText
92 {\doglobal\newcounter\TextN
93 \dostartbuffer[text][StartText][StopText]}
94
95\unexpanded\def\StartSubText
96 {\doglobal\increment\TextN
97 \dostartbuffer[text\TextN][StartSubText][StopSubText]}
98
99\unexpanded\def\StopText
100 {\startstandardmakeup
101 \DoSampleText{text}{common}{nextpage}
102 \stopstandardmakeup}
103
104\unexpanded\def\StopSubText
105 {\startstandardmakeup
106 \DoSampleText{text}{common}{nextpage}
107 \stopstandardmakeup}
108
109
110
111
112\unexpanded\def\DoSampleText#1#2#3
113 {\setupframedtexts[SampleText][background={background,#3}]
114 \bgroup
115 \setups[#1]
116 \setups[always]
117 \setbox\nextbox=\hbox
118 {\startSampleText[none]
119 \getbuffer[#1]\par
120 \doif{#1}{text}
121 {\dorecurse{\TextN}{\getbuffer[text\recurselevel]\par}}
122 \stopSampleText}
123 \xdef\SampleTextWidth{\the\wd\nextbox}
124 \setlayer[#2]{\box\nextbox}
125 \egroup}
126
127
128
129
130\unexpanded\def\StartIdea
131 {\bgroup
132 \let\StopSample \relax
133 \let\StopText \relax
134 \let\StopSubText\relax
135 \def\StartSample{\dostartbuffer[sample][StartSample][StopSample]}}
136
137\unexpanded\def\StopIdea
138 {\startstandardmakeup
139 \DoSampleText{sample}{sample}{nextpage}
140 \SetTextWidth
141 \DoSampleText{text} {text} {nextpage}
142 \stopstandardmakeup
143 \egroup}
144
145
146
147
148\unexpanded\def\SetTextWidth
149 {\ifnum\TextN<1
150 \scratchdimen=\makeupwidth
151 \advance\scratchdimen by \SampleTextWidth
152 \advance\scratchdimen by \FrameSkip
153 \xdef\SampleWidth{\the\scratchdimen}
154 \fi
155 \setupframedtexts
156 [SampleText]
157 [width=\SampleWidth]}
158
159
160
161
162\defineoverlay[joke] [\useMPgraphic{joke}{n=1}]
163
164\stopmodule
165
166\continueifinputfile{spresentgrow.mkiv}
167
168\usemodule[presentcommon]
169
170\inputpresentationfile{examplespresentgrow001.tex}
171
172 |