ma-cb-screen.tex /size: 4662 b    last modification: 2020-07-01 14:35
1\startenvironment ma-cb-screen
2
3% This setups adds some functionality as well as redefines
4% some of the previously defined layout.
5
6\unprotect
7
8\definepapersize
9  [LocalPaperFormat]
10  [\c!width=28cm,
11   \c!height=21cm]
12
13\setuppapersize
14  [LocalPaperFormat]
15  [LocalPaperFormat]
16
17\setuplayout
18  [\c!location=\v!middle,
19   \c!topspace=.5cm,
20   \c!header=1.5cm,
21   \c!height=20cm,
22   \c!rightedge=5cm,
23   \c!rightedgedistance=1cm]
24
25\setupinteractionscreen
26  [\c!width=28cm,
27   \c!height=21cm,
28   \c!option=\v!max]
29
30% We place the pagenumber (not that useful in an interactive
31% document) somewhere else and the chapter number in the
32% footer.
33
34\setuppagenumbering
35  [\c!alternative=\v!singlesided,
36   \c!location=,
37   \c!command=\NummerCommando]
38
39\unexpanded\def\NummerCommando#1% uitlijnen op onderkant voet
40  {\hbox to \rightedgewidth
41     {\scratchcounter=\lastpage
42      \advance\scratchcounter by -\realpageno
43      \hskip0pt plus \realpageno cm
44      \framed
45        [\c!background=NummerAchtergrond,
46         \c!frame=\v!off,
47         \c!offset=4pt]%
48        {\lower.5\dp\strutbox\hbox spread 60pt{\hss\tx#1\hss}}% {\hss#1\hss}}%
49      \hskip0pt plus \scratchcounter cm}}
50
51\setupfootertexts
52  [\v!edge]
53  [][\v!pagenumber]
54
55\unexpanded\def\PlaatsHoofdstukStatus
56  {\determineheadnumber[\v!chapter]%
57   \ifnum\currentheadnumber>0
58     \hbox to \hsize
59       {\hss
60        \framed
61          [\c!background=NummerAchtergrond,
62           \c!frame=\v!off,
63           \c!offset=6pt]
64          {\lower.5\dp\strutbox\hbox spread 60pt
65             {\hss\getmarking[\v!chapter\v!number]\hss}}%
66        \hss}
67   \fi}
68
69\setupfootertexts
70  [\v!margin]
71  [][]
72
73\setupfootertexts
74  [\v!text]
75  [][\PlaatsHoofdstukStatus]
76
77\setupinteraction
78  [\c!state=\v!start,
79   \c!color=,
80   \c!menu=\v!on]
81
82% We let users click on the whole table of contents line and
83% provide some menus.
84
85\setuplist
86  [\v!chapter]
87  [\c!interaction=\v!all]
88
89\setupinteractionmenu
90  [\v!right]
91  [\c!state=\v!start,
92   \c!color=,
93   \c!offset=4pt,
94   \c!background=MenuAchtergrond,
95   \c!frame=\v!off]
96
97\startmode[**nl]
98
99  \setupinteractionmenu
100    [\v!right]
101    [    {inhoud[contents]},
102          {index[subind]},
103     {commando's[comind]},
104     {definities[comdefs]},
105        {colofon[colofon]},
106            {\vfill},
107        {stoppen[\v!CloseDocument]},
108     {\ZoekEnZoek{zoeken}},
109          {terug[\v!PreviousJump]},
110        {\HeenEnWeer}]
111
112\stopmode
113
114\startmode[**en,**uk]
115
116  \setupinteractionmenu
117    [\v!right]
118    [  {contents[contents]},
119          {index[subind]},
120       {commands[comind]},
121    {definitions[comdefs]},
122        {colofon[colofon]},
123            {\vfill},
124           {exit[\v!CloseDocument]},
125     {\ZoekEnZoek{search}},
126        {go back[\v!PreviousJump]},
127        {\HeenEnWeer}]
128
129\stopmode
130
131\startmode[**cz]
132
133  \setupinteractionmenu
134    [\v!right]
135    [                             {obsah[contents]},
136                  {rejst\rcaron\iacute k[subind]},
137       {seznam p\rcaron\iacute kaz\uring[comind]},
138     {definice p\rcaron\iacute kaz\uring[comdefs]},
139                      {tir\aacute\zcaron[colofon]},
140                                    {\vfill},
141                                  {konec[\v!CloseDocument]},
142                            {\ZoekEnZoek{vyhledej}},
143                       {krok zp\ecaron t[\v!PreviousJump]},
144                                  {\HeenEnWeer}]
145
146\stopmode
147
148\startmode[**fr]
149
150  \setupinteractionmenu
151    [\v!right]
152    [  {table des mati\egrave res[contents]},
153          {index[subind]},
154       {commandes[comind]},
155    {d\eacute finitions[comdefs]},
156        {colophon[colofon]},
157            {\vfill},
158           {quitter[\v!CloseDocument]},
159     {\ZoekEnZoek{recherche}},
160        {retour[\v!PreviousJump]},
161        {\HeenEnWeer}]
162
163\stopmode
164
165\startmode[**vn]
166
167  \setupinteractionmenu
168    [\v!right]
169    [  {mục lục[contents]},
170      {bảng tra[subind]},
171          {lệnh[comind]},
172    {định nghĩa[comdefs]},
173    {trang cuối[colofon]},
174            {\vfill},
175         {thoát[\v!CloseDocument]},
176     {\ZoekEnZoek{tìm kiếm}},
177      {quay lại[\v!PreviousJump]},
178        {\HeenEnWeer}]
179
180\stopmode
181
182% This not that \TEX nical definition deals with the two sets
183% of buttons. Someday I'll make a general macro for this.
184
185\def\TwoMenuButtons#1[#2]#3[#4]%
186  {\hbox to \hsize
187     {\dimen0=\hsize
188      \advance\hsize by -12pt
189      \menubutton[\v!right][\c!width=.5\hsize]{#1}[#2]%
190      \hss
191      \menubutton[\v!right][\c!width=.5\hsize]{#3}[#4]}}
192
193\def\HeenEnWeer
194  {\TwoMenuButtons{--}[\v!previouspage]{+}[\v!nextpage]}
195
196\def\ZoekEnZoek#1%
197  {\TwoMenuButtons{#1}[\v!SearchDocument]{+}[\v!SearchAgain]}
198
199\protect
200
201\stopenvironment
202