s-faq-01.tex /size: 4404 b    last modification: 2020-07-01 14:35
1
%D \module
2
%D [ file=s-faq-01,
3
%D version=1997.21.08,
4
%D title=\CONTEXT\ Style File,
5
%D subtitle=FAQ Interactive Version,
6
%D author=Hans Hagen,
7
%D date=\currentdate,
8
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9
%C
10
%C This module is part of the \CONTEXT\ macro||package and is
11
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12
%C details.
13 14
\usemodule
[
faq
-
0
0
]
15 16
\setuppapersize
17
[
S
6
][
S
6
]
18 19
\setuplayout
20
[
topspace
=
.
5
cm
,
21
backspace
=
.
5
cm
,
22
margin
=
0
pt
,
23
height
=
fit
,
24
header
=
0
pt
,
25
width
=
fit
,
26
footer
=
0
pt
,
27
bottomdistance
=
1
2
pt
,
28
bottom
=
1
8
pt
]
29 30
\setupinteractionscreen
31
[
width
=
fit
,
32
height
=
fit
,
33
option
=
max
]
34 35
\setupinteraction
36
[
state
=
start
,
37
page
=
yes
,
38
color
=
darkred
,
39
contrastcolor
=
black
,
40
menu
=
on
]
41 42
\setupcolors
43
[
state
=
start
]
44 45
\setupbackgrounds
46
[
state
=
repeat
]
47 48
\setupbackgrounds
49
[
page
]
50
[
offset
=
3
pt
]
51 52
\setupbackgrounds
53
[
text
]
54
[
text
]
55
[
background
=
{
screen
,
go
-
on
}
]
56 57
\setupbackgrounds
58
[
bottom
]
59
[
text
]
60
[
background
=
screen
]
61 62
\setupframedtexts
63
[
background
=
MyFrame
,
64
backgroundcolor
=
white
,
65
framecolor
=
darkred
,
66
frame
=
overlay
]
67 68
\defineoverlay
[
go
-
on
][
\overlaybutton
{
forward
}
]
69 70
\useexternaldocument
71
[
paperfaq
]
72
[
\PaperFAQ
]
73
[]
74 75
\setupregister
76
[
index
]
77
[
coupling
=
yes
,
78
unknownreference
=
none
,
79
interaction
=
text
]
80 81
\coupleregister
82
[
index
]
83 84
\defineinteractionmenu
[
bottom
1
]
[
bottom
]
[
state
=
stop
]
85
\defineinteractionmenu
[
bottom
2
]
[
bottom
]
[
state
=
stop
]
86 87
\setupinteractionmenu
88
[
bottom
,
bottom
1
,
bottom
2
]
89
[
background
=
MyFrame
,
90
backgroundcolor
=
white
,
91
color
=
black
,
92
contrastcolor
=
black
,
93
frame
=
overlay
,
94
framecolor
=
darkred
,
95
dummy
=
yes
,
96
middle
=
\hskip
1
em
,
97
height
=
\bottomheight
,
98
distance
=
overlay
]
99 100
\setupinteractionmenu
101
[
bottom
1
]
102
[
{
\hfill
}
,
103
{
\labeltext
{
paper
}
[
paperfaq
:
:
]
}
,
104
{
\labeltext
{
goback
}
[
PreviousJump
]
}
,
105
{
\labeltext
{
faqs
}
[
faqs
]
}
,
106
{
\labeltext
{
index
}
[
index
]
}
,
107
{
\gobackwardcharacter
[
previouspage
]
}
,
108
{
\goforwardcharacter
[
nextpage
]
}
]
109 110
\setupinteractionmenu
111
[
bottom
2
]
112
[
{
\CurrentIndexOfFAQ
}
,
113
{
\hfill
}
,
114
{
\labeltext
{
paper
}
[
paperfaq
:
:
faq
:
\CurrentNOfFAQ
]
}
,
115
{
\labeltext
{
goback
}
[
PreviousJump
]
}
,
116
{
\labeltext
{
faqs
}
[
faqs
]
}
,
117
{
\labeltext
{
index
}
[
index
]
}
,
118
{
\gobackwardcharacter
[
previouspage
]
}
,
119
{
\goforwardcharacter
[
nextpage
]
}
]
120 121
\def
\CurrentIndexOfFAQ
%
122
{
\bgroup
123
\setupinteraction
[
color
=]
%
124
\menubox
[
bottom
]
%
125
{
\hskip
-
.
5
em
\def
\index
{
\hskip
.
5
em
\coupledindex
}
\IndexOfFAQ
}
%
126
\egroup
}
127 128
\setupinteractionmenu
129
[
bottom
1
]
130
[
state
=
start
]
131 132
\def
\EndAnswer
133
{
\vfill
134
\bgroup
135
\tfx
\setstrut
136
\framed
137
[
frame
=
overlay
,
138
framecolor
=
darkred
,
139
background
=
MyFrame
,
140
backgroundcolor
=
white
]
141
{
\AuthorOfFAQ
}
142
\egroup
}
143 144
\def
\TitlePage
145
{
\startstandardmakeup
146
\blank
[
3
*
big
]
147
\midaligned
{
\bfd
\labeltext
{
FAQ
}}
148
\blank
[
3
*
big
]
149
\midaligned
{
\bfd
\labeltext
{
about
}
\NameOfFAQ
}
150
\blank
[
3
*
big
]
151
\midaligned
{
\bfb
\labeltext
{
version
}
:
\currentdate
}
152
\blank
[
3
*
big
]
153
\midaligned
{
\tta
\ListOfFAQ
}
154
\vfill
155
\midaligned
{
\tta
pragma
@
xs
4
all
.
nl
}
156
\blank
[
3
*
big
]
157
\stopstandardmakeup
}
158 159
\def
\StartReadingFAQ
160
{
\setupinteractionmenu
[
bottom
1
][
state
=
stop
]
161
\setupinteractionmenu
[
bottom
2
][
state
=
start
]
162
\page
}
163 164
\def
\StopReadingFAQ
165
{
\page
166
\setupinteractionmenu
[
bottom
2
][
state
=
stop
]
167
\setupinteractionmenu
[
bottom
1
][
state
=
start
]
}
168 169
\def
\FileWithFAQs
170
{
\StartReadingFAQ
171
\input
\FileNameOfFAQ
\relax
172
\StopReadingFAQ
}
173 174
\def
\IndexPage
175
{
\page
176
\def
\CurrentIndexOfFAQ
{}
177
\def
\NameOfFAQ
{}
178
\pagereference
[
index
]
179
\placeregister
[
index
]
180
\page
}
181 182
\def
\BeginFAQ
183
{
\doglobal
\increment
\CurrentNOfFAQ
184
\setbox
0
=
\vbox
\bgroup
185
\setupframedtexts
[
before
=
,
after
=
,
linecorrection
=
off
]
186
\startframedtext
}
187 188
\def
\EndFAQ
189
{
\stopframedtext
190
\egroup
191
\button
192
[
color
=
,
contrastcolor
=
,
frame
=
overlay
,
offset
=
overlay
]
193
{
\copy
0
}
194
[
faq
:
\CurrentNOfFAQ
]
195
\vskip
6
pt
}
196 197
\def
\AllFAQs
198
{
\page
199
\def
\CurrentIndexOfFAQ
{}
200
\def
\NameOfFAQ
{}
201
\newcounter
\CurrentNOfFAQ
202
\setupblock
[
question
][
before
=
\BeginFAQ
,
after
=
\EndFAQ
]
203
\pagereference
[
faqs
]
204
\useblocks
[
question
]
}
205 206
\startuniqueMPgraphic
{
Frame
}
207
path
p
;
p
:
=
unitsquare
xscaled
\overlaywidth
yscaled
\overlayheight
;
208
pickup
pencircle
scaled
2
pt
;
209
fill
p
withcolor
\MPcolor
{
\overlaycolor
}
;
210
draw
p
withcolor
\MPcolor
{
\overlaylinecolor
}
;
211
\stopuniqueMPgraphic
212 213
\defineoverlay
[
MyFrame
][
\uniqueMPgraphic
{
Frame
}
]
214 215
\endinput
216