1
2
3
4
5
6
7
8
9
10
11
12
13
14\startmodule[presentballs]
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36\setuppapersize
37 [S6][S6]
38
39\setuplayout
40 [backspace=25pt,
41 topspace=25pt,
42 width=middle,
43 height=middle,
44 header=0pt,
45 footer=0pt]
46
47\setupinteraction
48 [state=start,
49 display=new,
50 color=LineColor,
51 contrastcolor=LineColor,
52 click=no]
53
54\setupinteractionscreen
55 [option=max]
56
57\startmode[asintended,atpragma] \setupbodyfont[lucidaot] \stopmode
58
59\setupbodyfont[14.4pt]
60
61
62
63
64\definecolor[TextColor][s=.8]
65\definecolor[PageColor][s=.6]
66\definecolor[LineColor][s=.4]
67
68\definecolor[red] [r=.4] \definecolor[cyan] [g=.4,b=.4]
69\definecolor[green][g=.4] \definecolor[magenta][r=.4,b=.4]
70\definecolor[blue] [b=.4] \definecolor[yellow] [r=.4,g=.4]
71
72\definecolor[linecolor 1][red] \definecolor[linecolor 5][cyan]
73\definecolor[linecolor 2][green] \definecolor[linecolor 6][magenta]
74\definecolor[linecolor 3][blue] \definecolor[linecolor 4][yellow]
75
76
77
78\setupMPvariables[pageframe][pagecolor=PageColor,linecolor=LineColor]
79\setupMPvariables[textframe][textcolor=TextColor,linecolor=LineColor]
80
81\setupbackgrounds
82 [page]
83 [background={pageframe,nextpage}]
84
85\defineoverlay [pageframe] [\uniqueMPgraphic{pageframe}]
86\defineoverlay [textframe] [\uniqueMPgraphic{textframe}]
87\defineoverlay [nextpage] [\overlaybutton{forward}]
88
89\startuniqueMPgraphic{pageframe}{pagecolor,linecolor}
90 path p ; p := fullsquare xyscaled (OverlayWidth,OverlayHeight) ;
91 pickup pencircle scaled 10pt ;
92 fill p withcolor \MPvar{pagecolor} ;
93 draw p withcolor \MPvar{linecolor} ;
94\stopuniqueMPgraphic
95
96\startuniqueMPgraphic{textframe}{textcolor,linecolor}
97 path p ; p := fullcircle xyscaled (OverlayWidth,OverlayHeight) ;
98 pickup pencircle scaled 10pt ;
99 fill p withcolor \MPvar{textcolor} ;
100 draw p withcolor \MPvar{linecolor} ;
101\stopuniqueMPgraphic
102
103
104
105
106\newbox \CollectedIdeas
107\newcount\CurrentTopic
108
109\unexpanded\def\StartItem
110 {\setbox\CollectedIdeas=\hbox\bgroup
111 \ifdim\wd\CollectedIdeas>\zeropoint
112 \unhbox\CollectedIdeas
113 \hskip25pt
114 \fi
115 \setbox\scratchbox=\hbox\bgroup
116 \framed
117 [width=160pt,
118 height=160pt,
119 align=middle,
120 frame=off,
121 background=textframe,
122 offset=15pt,
123 top=\vfill,
124 bottom=\vfill]
125 \bgroup}
126
127\unexpanded\def\StopItem
128 {\egroup
129 \egroup
130 \setbox\scratchbox=\hbox{\lower.5\ht\scratchbox\box\scratchbox}
131 \ht\scratchbox=.5\ht\scratchbox
132 \dp\scratchbox= \ht\scratchbox
133 \box\scratchbox
134 \egroup
135 \startstandardmakeup
136 \dontcomplain
137 \leftskip 0pt plus 50pt
138 \rightskip 0pt plus 50pt
139 \parfillskip 0pt
140 \baselineskip 100pt
141 \unhcopy\CollectedIdeas
142 \stopstandardmakeup}
143
144\unexpanded\def\StartIdea
145 {\ifnum\CurrentTopic=6
146 \global\CurrentTopic\plusone
147 \else
148 \global\advance\CurrentTopic\plusone
149 \fi
150 \definecolor[LineColor][linecolor \number\CurrentTopic]
151 \setbox\CollectedIdeas\null}
152
153\unexpanded\def\StopIdea
154 {}
155
156\unexpanded\def\StartTitlePage
157 {\startstandardmakeup
158 \setupalign[middle]
159 \enforced\protected\def\\{\vfil\bfb\setupinterlinespace}
160 \bfd\setupinterlinespace
161 \vfil}
162
163\unexpanded\def\StopTitlePage
164 {\vfil\vfil
165 \stopstandardmakeup}
166
167\unexpanded\def\TitlePage#1
168 {\StartTitlePage#1\StopTitlePage}
169
170\startsetups document:start
171 \StartTitlePage
172 \documentvariable{title}
173 \doifsomething {\documentvariable{subtitle}} {
174 \\
175 \documentvariable{subtitle}
176 }
177 \doifsomething {\documentvariable{location}} {
178 \\
179 \documentvariable{location}
180 }
181 \StopTitlePage
182\stopsetups
183
184\startsetups document:stop
185
186\stopsetups
187
188\stopmodule
189
190\continueifinputfile{spresentballs.mkiv}
191
192\usemodule[presentcommon]
193
194\inputpresentationfile{examplespresentballs001.tex}
195 |