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\startmode[asintended] \setupbodyfont[lbr] \stopmode
33
34\setupbodyfont[14.4pt]
35
36\usemodule
37 [abr02]
38
39\setuppapersize
40 [S6][S6]
41
42\setuplayout
43 [topspace=0cm,
44 backspace=0cm,
45 header=0pt,
46 footer=0pt,
47 width=middle,
48 height=middle]
49
50\setupinteractionscreen
51 [option=max]
52
53
54
55
56\setupsystem
57 [random=big]
58
59\setupcolors
60 [state=start]
61
62\definecolor[gray] [s=.4]
63\definecolor[lightgray][s=.9]
64
65\definecolor[red] [r=.4] \definecolor[cyan] [g=.4,b=.4]
66\definecolor[green][g=.4] \definecolor[magenta][r=.4,b=.4]
67\definecolor[blue] [b=.4] \definecolor[yellow] [r=.4,g=.4]
68
69\definecolor[PageColor][gray]
70\definecolor[TextColor][lightgray]
71\definecolor[LineColor][yellow]
72
73\definecolor[linecolor 1][red] \definecolor[linecolor 5][cyan]
74\definecolor[linecolor 2][green] \definecolor[linecolor 6][magenta]
75\definecolor[linecolor 3][blue] \definecolor[linecolor 4][yellow]
76
77\setupinteraction
78 [state=start,
79 display=new,
80 color=LineColor,
81 contrastcolor=LineColor]
82
83\startuseMPgraphic{shape}
84 path p ; color c, w ; numeric width, height ;
85 c := \MPcolor{LineColor} ; w := \MPcolor{TextColor} ;
86 width := \overlaywidth ; height := \overlayheight ;
87 pickup pencircle scaled .5cm ;
88 p := unitcircle
89 xscaled \MPw{\Idea} yscaled \MPh{\Idea}
90 shifted \MPxy{\Idea} ;
91 for z = (0,.5height), (width,.5height), (.5width,0), (.5width,height),
92 (0,0), (width,height), (0,height), (width,0) :
93 draw center p -- z withcolor c ;
94 endfor ;
95 fill p withcolor w ;
96 draw p withcolor c ;
97 p := unitcircle
98 xscaled \MPw{\Page} yscaled \MPh{\Page}
99 shifted \MPxy{\Page} ;
100 pickup pencircle scaled .25cm ;
101 fill p withcolor w ;
102 draw p withcolor c ;
103 draw unitsquare xscaled width yscaled height withcolor c ;
104\stopuseMPgraphic
105
106\defineoverlay [shape] [\useMPgraphic{shape}]
107\defineoverlay [nextpage] [\overlaybutton{nextpage}]
108\defineoverlay [previouspage] [\overlaybutton{previouspage}]
109\defineoverlay [content] [\overlaybutton{content}]
110\defineoverlay [forward] [\overlaybutton{forward}]
111
112\setupbackgrounds
113 [page]
114 [background={color,previouspage,shape},
115 backgroundcolor=PageColor]
116
117\def\StartIdea
118 {\xdef\Idea{idea:\realfolio}
119 \xdef\Page{page:\realfolio}
120 \startstandardmakeup
121 \dontcomplain
122 \vbox to \makeupheight \bgroup
123 \getrandomdimen\scratchdimen{75pt}{600pt}\vskip 0pt plus \scratchdimen
124 \hbox to \makeupwidth \bgroup
125 \getrandomdimen\scratchdimen{75pt}{600pt}\hskip 0pt plus \scratchdimen
126 \hpos{idea:\realfolio} \bgroup
127 \framed
128 [width=.6\hsize,height=fit,offset=2cm,align=middle,
129 frame=off,strut=no,background=forward]
130 \bgroup
131 \setupwhitespace[big]}
132
133\def\StopIdea
134 {\egroup
135 \egroup
136 \getrandomdimen\scratchdimen{75pt}{600pt}\hskip 0pt plus \scratchdimen
137 \egroup
138 \getrandomdimen\scratchdimen{75pt}{600pt}\vskip 0pt plus \scratchdimen
139 \egroup
140 \ifx\CurrentTopic\empty \else
141 \vskip\makeupheight
142 \vbox to \makeupheight
143 {\vfill
144 \ifx\CurrentListTopic\empty\else
145 \writetolist[Topic]{}{\CurrentListTopic}
146 \fi
147 \hbox to \makeupwidth
148 {\hfill
149 \hpos{page:\realfolio}
150 {\framed
151 [offset=.5cm,frame=off,background=content]
152 {\bf\ignorespaces\CurrentTopic\unskip}}
153 \hskip.5cm}
154 \vskip.5cm}
155 \fi
156 \stopstandardmakeup
157 \let\CurrentListTopic\empty}
158
159\definelist
160 [Topic]
161
162\setuplist
163 [Topic]
164 [alternative=f,
165 expansion=command]
166
167\let\CurrentTopic\empty
168\let\CurrentListTopic\empty
169
170\long\def\StartTopic#1\StopTopic
171 {\long\def\CurrentTopic{#1}
172 \let\CurrentListTopic\CurrentTopic}
173
174\def\Topic#1
175 {\StartTopic#1\StopTopic}
176
177\def\Topics#1
178 {\StartIdeas
179 \def\CurrentTopic{#1}
180 \StartIdea
181 \pagereference[content]
182 \placelist[Topic][criterium=all]
183 \StopIdea
184 \StopIdeas}
185
186\newcounter\CurrentIdeas
187
188\def\StartIdeas
189 {\ifnum\CurrentIdeas=6 \doglobal\newcounter\CurrentIdeas \fi
190 \doglobal\increment\CurrentIdeas
191 \definecolor[LineColor][linecolor \CurrentIdeas]}
192
193\def\StopIdeas
194 {}
195
196\doifnotmode{demo}{\endinput}
197
198
199
200\starttext
201
202\Topics{This is about \unknown}
203
204\StartIdeas
205 \Topic{Some topic}
206 \StartIdea An idea \unknown \StopIdea
207 \StartIdea \unknown\ and another \StopIdea
208\StopIdeas
209
210\stoptext
211
212
213 |