Debian Codegraph @

texmf-dist/doc/otherformats/lollipop/manual/mandefs.tex

raw
1 % mandefs.tex style definition for the Lollipop manual
2 % copyright 1992/3 Victor Eijkhout
3 % copyright 2014--2016 Vafa Khalighi
4 %
5 %
6 % This program is free software: you can redistribute it and/or modify
7 % it under the terms of the GNU General Public License as published by
8 % the Free Software Foundation, either version 3 of the License, or
9 % (at your option) any later version.
10 %
11 % This program is distributed in the hope that it will be useful,
12 % but WITHOUT ANY WARRANTY; without even the implied warranty of
13 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 % GNU General Public License for more details.
15 %
16 % You should have received a copy of the GNU General Public License
17 % along with this program. If not, see <http://www.gnu.org/licenses/>.
18 %
19 %
20 \def\con#1{{\tt#1}}
21 \def\n#1{{\tt#1}}
22 \def\file#1{{\tt#1}}
23
24 \def\Lollipop{Lollipop}
25
26 \Distance:rightmarginstretch={0cm plus 2.54cm}
27 \Distance:whitebefore={6pt plus 3pt minus 2pt}
28 \Distance:whiteafter=whitebefore
29 \FlushRight:no
30
31 \DefineExternalFile:contents=toc
32
33 \DefineHeading:Chapter
34 breakbefore:yes whiteafter:20pt
35 line:start PointSize:14 Style:bold literal:Chapter
36 Spaces:1 ChapterCounter line:stop
37 vwhite:15pt
38 line:start PointSize:16 Style:bold title line:stop
39 external:contents title external:stop
40 Stop
41
42 \AdaptiveDistance:WidestLabel=15pt
43 \def\MeasureLabel{\ifdim\BlockWidth>\WidestLabel
44 \global\WidestLabel\BlockWidth\fi}
45 \StartCommand{\Distance:parindent=WidestLabel }
46 \DefineHeading:Section
47 whitebefore:{20pt plus 2pt} whiteafter:14pt
48 line:start PointSize:14 Style:italic
49 block:start block:start ChapterCounter . SectionCounter
50 Spaces:1 block:stop MeasureLabel
51 fillupto:WidestLabel
52 title line:stop
53 external:contents title external:stop
54 label:start ChapterCounter . SectionCounter label:stop
55 Stop
56 \GoverningCounter:Section=Chapter
57
58 \DefineHeading:SubSection
59 whitebefore:{14pt plus 2pt} whiteafter:8pt
60 line:start PointSize:10 Style:italic
61 ChapterCounter . SectionCounter . SubSectionCounter
62 Spaces:1 title line:stop
63 label:start ChapterCounter . Spaces:.2 SectionCounter
64 . Spaces:.2 SubSectionCounter label:stop
65 Stop
66 \GoverningCounter:SubSection=Section
67
68 \DefineExternalFile:impnotes=imp
69 \DefineHeading:iSection
70 whitebefore:{10pt plus 1pt} whiteafter:8pt
71 line:start PointSize:12 Style:bold I -
72 Style:italic iSectionCounter
73 Spaces:1 title line:stop
74 label:start I - iSectionCounter label:stop
75 external:impnotes title external:stop
76 Stop
77 %\GoverningCounter:iSection=Chapter
78 \DefineExternalItem:iSection file:impnotes PushIndentLevel
79 item:left I - Style:italic iSectionLabel item:stop
80 title begingroup Spaces:2 Style:italic Page endgroup
81 Stop
82
83 \DefineExternalItem:Chapter file:contents
84 item:left ChapterLabel item:stop
85 title begingroup Spaces:2 Style:italic Page endgroup
86 Stop
87 \DefineExternalItem:Section file:contents PushIndentLevel
88 item:left ChapterLabel . SectionLabel item:stop
89 title begingroup Spaces:2 Style:italic Page endgroup
90 Stop
91
92 \def\impnotetxt{Implementor's Note}
93 \DefineTextBlock:ImpNote PushIndentLevel
94 whitebefore:12pt whiteafter:11pt
95 line:start PointSize:12 Style:italic impnotetxt line:stop
96 SansFace PointSize:9 SetFont text
97 Stop
98 \excludecomment{ImpNote}
99
100 \DefineTextBlock:WizNote
101 PushIndentLevel PointSize:9 SetFont text
102 Stop
103
104 \DefineList:Description
105 item:left description Spaces:2 item:stop whitebetween:6pt
106 Stop
107
108 \DefineList:cDescription
109 item:left tt char busje description Spaces:2 item:stop
110 whitebetween:6pt
111 Stop
112
113 \DefineList:Enumerate
114 item:left itemCounter item:stop
115 Stop
116
117 \DefineList:Itemize
118 item:left itemsign item:stop
119 Stop
120
121 \DefineBBL
122 item:left [ - itemCounter - ] item:stop
123 Stop
124
125 \SerifFace \SetFont
126
127 \newwrite\exfile
128 \def\HereAndOut#1{\immediate\write\exfile{#1}}
129 \specialcomment{Example}
130 {\EExample
131 \immediate\openout\exfile=example.tex\relax
132 \let\ThisComment\HereAndOut}
133 {\immediate\closeout\exfile
134 \begingroup \tt \SetFont
135 \verbatimfile{example.tex}\endgroup
136 \SaveAlloc \input example.tex\relax \RestoreAlloc
137 \EExampleStop}
138 \DefineTextBlock:EExample whiteafter:{6pt plus 5pt}
139 noimplicitclose rule:h vwhite:3pt
140 line:start literal:Example Spaces:1.5
141 ChapterCounter . EExampleCounter
142 line:stop
143 vwhite:3pt rule:h vwhite:3pt text vwhite:3pt rule:h
144 Stop
145 \GoverningCounter:EExample=Chapter
146
147 \specialcomment{OutExample}
148 {\EExample
149 \immediate\openout\exfile=example.tex\relax
150 \let\ThisComment\HereAndOut}
151 {\immediate\closeout\exfile
152 \begingroup \tt \SetFont
153 \verbatimfile{example.tex}\endgroup
154 \par\penalty0\relax
155 \SaveAlloc \SuspendOutput \begingroup \CountSheetsno
156 \global\setbox\PageRow\hbox{}%
157 \let\CurrentShipout\ToPageRow
158 \xInputFile:example
159 \endgroup
160 \ResumeOutput \RestoreAlloc
161 \noindent\unhbox\PageRow\hbox{}\par
162 \EExampleStop}
163 \newbox\PageRow\newbox\RowPage
164 \def\ToPageRow{\setbox\RowPage\box\WholePage \xToPageRow}
165 \def\xToPageRow{\global\setbox\PageRow
166 \hbox{\unhbox\PageRow\box\RowPage\hfill}}
167
168 \def\opt#1{{\tt#1}}
169 \DefineExternalFile:optindex=oix
170 \def\refopt#1{\OptToIdx #1\par}
171 \DefineHeading:OptToIdx embedded:yes
172 block:start tt title block:stop
173 external:optindex title external:stop
174 nomarks Stop
175 \DefineExternalItem:OptToIdx file:optindex
176 embedded:yes
177 begingroup tt title endgroup
178 nobreak Spaces:1.5 Page Spaces:2.5 Stop
179
180 \DefineExternalFile:csindex=cix
181 \def\refcs#1{\CsToIdx #1\par}
182 \DefineHeading:CsToIdx embedded:yes
183 block:start tt char busje title block:stop
184 external:csindex title external:stop
185 nomarks Stop
186 \DefineExternalItem:CsToIdx file:csindex
187 embedded:yes
188 begingroup tt char busje title endgroup
189 nobreak Spaces:1.5 Page Spaces:2.5 Stop
190
191 \topskip20pt
192 \OptionsMacro:PageDims=width:page=15cm height:page=23cm Stop
193 \DefinePageGrid:LeftPage macro:PageDims
194 band:start block:start PointSize:9 Style:italic
195 FirstPlaced:ChapterCounter Spaces:2 stickout:left
196 FirstPlaced:ChapterTitle band:stop
197 textband:start text textband:stop
198 band:invisible block:start PointSize:9 Style:bold
199 PageCounter Spaces:2 stickout:left band:stop
200 NextPageGrid:RightPage Stop
201 \DefinePageGrid:RightPage macro:PageDims
202 band:start fillup PointSize:9 Style:italic
203 LastPlaced:SectionTitle
204 block:start Spaces:2 LastPlaced:ChapterCounter .
205 LastPlaced:SectionCounter stickout:right
206 band:stop
207 textband:start text textband:stop
208 band:invisible fillup
209 block:start PointSize:9 Style:bold Spaces:2
210 PageCounter stickout:right band:stop
211 NextPageGrid:LeftPage Stop
212 \DefinePageGrid:EmptyPage macro:PageDims
213 textband:start text textband:stop
214 NextPageGrid:LeftPage Stop
215
216 \AdaptiveCounter:LastInPage \CounterRepresentation:LastInPage=i
217 \AdaptiveCounter:LastRegPage \CounterRepresentation:LastRegPage=1
218 %\SetCounter:LastInPage=PageValue -- at the end of prelim.tex
219 %\SetCounter:LastRegPage=PageValue -- at the end of manual.tex
220
221 \endinput
222
223 % 92/11/05 stretch added
224 % 92/11/18 adaptive label width
225 % 92/11/19 adaptive last page