1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
|
%D \module
%D [ file=s-pre-11,
%D version=1999.08.20,
%D title=\CONTEXT\ Style File,
%D subtitle=Presentation Environment 11,
%D author=Hans Hagen,
%D date=\currentdate,
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\setuppapersize
[S6][S6]
\setuplayout
[topspace=0cm,
backspace=0cm,
header=0pt,
footer=0pt,
width=middle,
height=middle]
\setupbodyfont
[14.4pt,lbr]
\setupcolors
[state=start]
\setupinteraction
[click=no,
display=new,
state=start]
\setupinteractionscreen
[option=max]
\def\SomeShape%
{\resetMPdrawing
\startMPdrawing
path p[], q[] ; pair a, b ;
StartPage ;
\stopMPdrawing
\dorecurse{\CurrentTopic}
{\startMPdrawing
initialize_box(\MPpos{topic-\realfolio-\recurselevel}) ;
p[\recurselevel] := tensecircle (wxy,hxy,.25cm) shifted cxy ;
fill p[\recurselevel] withcolor .9white ;
pickup pencircle scaled .25cm ;
\ifnum\recurselevel=\CurrentTopic\space
draw p[\recurselevel] withcolor \MPcolor{ShowColor} ;
\else
draw p[\recurselevel] withcolor \MPcolor{DoneColor} ;
\fi
\stopMPdrawing}%
\dorecurse{\CurrentMaxItem}
{\startMPdrawing
initialize_box(\MPpos{item-\realfolio-\recurselevel}) ;
linewidth := .25cm ;
q[\recurselevel] := tensecircle (wxy,hxy,linewidth) shifted cxy ;
fill q[\recurselevel] withcolor .9white ;
pickup pencircle scaled linewidth ;
\ifnum\recurselevel=\CurrentMaxItem\space
draw q[\recurselevel] withcolor \MPcolor{ShowColor} ;
\else
draw q[\recurselevel] withcolor \MPcolor{DoneColor} ;
\fi
\stopMPdrawing}%
\dostepwiserecurse{2}{\CurrentTopic}{1}
{\startMPdrawing
draw
rt point 3 of p[\recurselevel-1] --
lft point 7 of p[\recurselevel]
withcolor \MPcolor{ArrowColor} ;
\stopMPdrawing}%
\dostepwiserecurse{2}{\CurrentMaxItem}{1}
{\startMPdrawing
draw
bot point 9 of q[\recurselevel-1] --
top point 5 of q[\recurselevel]
withcolor \MPcolor{ArrowColor} ;
\stopMPdrawing}%
\startMPdrawing
draw Page
withpen pencircle scaled .5cm
withcolor \MPcolor{EdgeColor} ;
StopPage ;
\stopMPdrawing
\MPdrawingdonetrue
\getMPdrawing}
\def\TitlePage#1%
{\startstandardmakeup
\setupalign[middle]
\def\\{\vfil\bfb\setupinterlinespace}
\bfd\setupinterlinespace
\vfil#1\vfil\vfil
\stopstandardmakeup}
\definecolor[PageColor][r=.5,g=.4,b=.3]
\definecolor[LineColor][r=.7,g=.6,b=.5]
\definecolor[PageColor] [s=.60]
\definecolor[ShowColor] [r=.40]
\definecolor[EdgeColor] [g=.40]
\definecolor[DoneColor] [r=.40,g=.40]
\definecolor[ArrowColor] [b=.40]
\definecolor[LineColor] [r=.60,g=.60]
\definecolor[GotoColor] [ArrowColor]
\setupinteraction[color=GotoColor,contrastcolor=GotoColor]
\defineoverlay [shape] [\SomeShape]
\defineoverlay [next] [\overlaybutton{forward}] % [{nextpage}]
\setupbackgrounds
[page]
[background={color,next,shape},
backgroundcolor=PageColor]
\doglobal\newcounter\CurrentMaxItem
\doglobal\newcounter\CurrentItem
\doglobal\newcounter\CurrentTopic
\def\StartIdea%
{\doglobal\newcounter\CurrentItem}
\def\StartTopic%
{\doglobal\increment\CurrentTopic
\dostartbuffer[topic-\CurrentTopic][StartTopic][StopTopic]}
\def\StopIdea%
{\dorecurse{\CurrentItem}
{\let\CurrentMaxItem\recurselevel
\doStopIdea}}
\def\doStopIdea%
{\startstandardmakeup
\dontcomplain
\vskip.875cm
\hbox to \makeupwidth
{\hfill
\dorecurse{\CurrentTopic}
{\edef\Topic{topic-\realfolio-\recurselevel}%
\hpos
{\Topic}
{\framed
[frame=off,align=middle,offset=.25cm]
{\getbuffer[topic-\recurselevel]}}%
\ifnum\recurselevel<\CurrentTopic
\hskip.875cm
\fi}%
\hfill}
\vskip.875cm
\vfilll
\dorecurse{\CurrentMaxItem}
{\edef\Item{item-\realfolio-\recurselevel}
\hbox to \makeupwidth
{\hfill
\hpos
{\Item}
{\framed
[width=.75\makeupwidth,
frame=off,
align=middle,offset=.125cm]
{\getbuffer[item-\recurselevel]}}%
\hfill}
\vskip.875cm}
\vfilll
\stopstandardmakeup}
\def\StartItem%
{\doglobal\increment\CurrentItem
\dostartbuffer[item-\CurrentItem][StartItem][StopItem]}
\lefthyphenmin =\maxdimen
\righthyphenmin=\maxdimen
\doifnotmode{demo}{\endinput}
\starttext
\StartIdea
\StartTopic
A Nice Idea
\StopTopic
\StartItem
\input reich \relax
\StopItem
\StartItem
\input reich \relax
\StopItem
\StartItem
\input reich \relax
\StopItem
\StopIdea
\StartIdea
\StartTopic
One More Nice Idea
\StopTopic
\StartItem
\input reich \relax
\StopItem
\StartItem
\input reich \relax
\StopItem
\StopIdea
\StartIdea
\StartTopic
The Last Idea
\StopTopic
\StartItem
\input tufte \relax
\StopItem
\StopIdea
\stoptext
|