Internal-fn: Only allow modes describe types for internal fn[PR115961]
[official-gcc.git] / gcc / doc / include / texinfo.tex
blob0f57611a5e42822092b32ee4ec149bdd8d9fa9c6
1 % texinfo.tex -- TeX macros to handle Texinfo files.
2 %
3 % Load plain if necessary, i.e., if running under initex.
4 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
6 \def\texinfoversion{2023-01-17.19}
8 % Copyright 1985, 1986, 1988, 1990-2023 Free Software Foundation, Inc.
10 % This texinfo.tex file is free software: you can redistribute it and/or
11 % modify it under the terms of the GNU General Public License as
12 % published by the Free Software Foundation, either version 3 of the
13 % License, or (at your option) any later version.
15 % This texinfo.tex file is distributed in the hope that it will be
16 % useful, but WITHOUT ANY WARRANTY; without even the implied warranty
17 % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 % General Public License for more details.
20 % You should have received a copy of the GNU General Public License
21 % along with this program. If not, see <https://www.gnu.org/licenses/>.
23 % As a special exception, when this file is read by TeX when processing
24 % a Texinfo source document, you may use the result without
25 % restriction. This Exception is an additional permission under section 7
26 % of the GNU General Public License, version 3 ("GPLv3").
28 % Please try the latest version of texinfo.tex before submitting bug
29 % reports; you can get the latest version from:
30 % https://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or
31 % https://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or
32 % https://www.gnu.org/software/texinfo/ (the Texinfo home page)
33 % The texinfo.tex in any given distribution could well be out
34 % of date, so if that's what you're using, please check.
36 % Send bug reports to bug-texinfo@gnu.org. Please include a
37 % complete document in each bug report with which we can reproduce the
38 % problem. Patches are, of course, greatly appreciated.
40 % To process a Texinfo manual with TeX, it's most reliable to use the
41 % texi2dvi shell script that comes with the distribution. For a simple
42 % manual foo.texi, however, you can get away with this:
43 % tex foo.texi
44 % texindex foo.??
45 % tex foo.texi
46 % tex foo.texi
47 % dvips foo.dvi -o # or whatever; this makes foo.ps.
48 % The extra TeX runs get the cross-reference information correct.
49 % Sometimes one run after texindex suffices, and sometimes you need more
50 % than two; texi2dvi does it as many times as necessary.
52 % It is possible to adapt texinfo.tex for other languages, to some
53 % extent. You can get the existing language-specific files from the
54 % full Texinfo distribution.
56 % The GNU Texinfo home page is https://www.gnu.org/software/texinfo.
59 \message{Loading texinfo [version \texinfoversion]:}
61 % LaTeX's \typeout. This ensures that the messages it is used for
62 % are identical in format to the corresponding ones from latex/pdflatex.
63 \def\typeout{\immediate\write17}%
65 \chardef\other=12
67 % We never want plain's \outer definition of \+ in Texinfo.
68 % For @tex, we can use \tabalign.
69 \let\+ = \relax
71 % Save some plain tex macros whose names we will redefine.
72 \let\ptexb=\b
73 \let\ptexbullet=\bullet
74 \let\ptexc=\c
75 \let\ptexcomma=\,
76 \let\ptexdot=\.
77 \let\ptexdots=\dots
78 \let\ptexend=\end
79 \let\ptexequiv=\equiv
80 \let\ptexexclam=\!
81 \let\ptexfootnote=\footnote
82 \let\ptexgtr=>
83 \let\ptexhat=^
84 \let\ptexi=\i
85 \let\ptexindent=\indent
86 \let\ptexinsert=\insert
87 \let\ptexlbrace=\{
88 \let\ptexless=<
89 \let\ptexnewwrite\newwrite
90 \let\ptexnoindent=\noindent
91 \let\ptexplus=+
92 \let\ptexraggedright=\raggedright
93 \let\ptexrbrace=\}
94 \let\ptexslash=\/
95 \let\ptexsp=\sp
96 \let\ptexstar=\*
97 \let\ptexsup=\sup
98 \let\ptext=\t
99 \let\ptextop=\top
100 {\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode
102 % If this character appears in an error message or help string, it
103 % starts a new line in the output.
104 \newlinechar = `^^J
106 % Use TeX 3.0's \inputlineno to get the line number, for better error
107 % messages, but if we're using an old version of TeX, don't do anything.
109 \ifx\inputlineno\thisisundefined
110 \let\linenumber = \empty % Pre-3.0.
111 \else
112 \def\linenumber{l.\the\inputlineno:\space}
115 % Set up fixed words for English if not already set.
116 \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi
117 \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi
118 \ifx\putworderror\undefined \gdef\putworderror{error}\fi
119 \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi
120 \ifx\putwordin\undefined \gdef\putwordin{in}\fi
121 \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
122 \ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
123 \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi
124 \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi
125 \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi
126 \ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi
127 \ifx\putwordof\undefined \gdef\putwordof{of}\fi
128 \ifx\putwordon\undefined \gdef\putwordon{on}\fi
129 \ifx\putwordpage\undefined \gdef\putwordpage{page}\fi
130 \ifx\putwordsection\undefined \gdef\putwordsection{section}\fi
131 \ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi
132 \ifx\putwordsee\undefined \gdef\putwordsee{see}\fi
133 \ifx\putwordSee\undefined \gdef\putwordSee{See}\fi
134 \ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi
135 \ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi
137 \ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi
138 \ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi
139 \ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi
140 \ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi
141 \ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi
142 \ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi
143 \ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi
144 \ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi
145 \ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi
146 \ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi
147 \ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi
148 \ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi
150 \ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi
151 \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi
152 \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi
153 \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi
154 \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi
156 % Give the space character the catcode for a space.
157 \def\spaceisspace{\catcode`\ =10\relax}
159 % Likewise for ^^M, the end of line character.
160 \def\endlineisspace{\catcode13=10\relax}
162 \chardef\dashChar = `\-
163 \chardef\slashChar = `\/
164 \chardef\underChar = `\_
166 % Ignore a token.
168 \def\gobble#1{}
170 % The following is used inside several \edef's.
171 \def\makecsname#1{\expandafter\noexpand\csname#1\endcsname}
173 % Hyphenation fixes.
174 \hyphenation{
175 Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script
176 ap-pen-dix bit-map bit-maps
177 data-base data-bases eshell fall-ing half-way long-est man-u-script
178 man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm
179 par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces
180 spell-ing spell-ings
181 stand-alone strong-est time-stamp time-stamps which-ever white-space
182 wide-spread wrap-around
185 % Sometimes it is convenient to have everything in the transcript file
186 % and nothing on the terminal. We don't just call \tracingall here,
187 % since that produces some useless output on the terminal. We also make
188 % some effort to order the tracing commands to reduce output in the log
189 % file; cf. trace.sty in LaTeX.
191 \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
192 \def\loggingall{%
193 \tracingstats2
194 \tracingpages1
195 \tracinglostchars2 % 2 gives us more in etex
196 \tracingparagraphs1
197 \tracingoutput1
198 \tracingmacros2
199 \tracingrestores1
200 \showboxbreadth\maxdimen \showboxdepth\maxdimen
201 \ifx\eTeXversion\thisisundefined\else % etex gives us more logging
202 \tracingscantokens1
203 \tracingifs1
204 \tracinggroups1
205 \tracingnesting2
206 \tracingassigns1
208 \tracingcommands3 % 3 gives us more in etex
209 \errorcontextlines16
212 % @errormsg{MSG}. Do the index-like expansions on MSG, but if things
213 % aren't perfect, it's not the end of the world, being an error message,
214 % after all.
216 \def\errormsg{\begingroup \indexnofonts \doerrormsg}
217 \def\doerrormsg#1{\errmessage{#1}}
219 % add check for \lastpenalty to plain's definitions. If the last thing
220 % we did was a \nobreak, we don't want to insert more space.
222 \def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount
223 \removelastskip\penalty-50\smallskip\fi\fi}
224 \def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount
225 \removelastskip\penalty-100\medskip\fi\fi}
226 \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
227 \removelastskip\penalty-200\bigskip\fi\fi}
229 %\f Output routine
232 % For a final copy, take out the rectangles
233 % that mark overfull boxes (in case you have decided
234 % that the text looks ok even though it passes the margin).
236 \def\finalout{\overfullrule=0pt }
238 % Output a mark which sets \thischapter, \thissection and \thiscolor.
239 % We dump everything together because we only have one kind of mark.
240 % This works because we only use \botmark / \topmark, not \firstmark.
242 % A mark contains a subexpression of the \ifcase ... \fi construct.
243 % \get*marks macros below extract the needed part using \ifcase.
245 % Another complication is to let the user choose whether \thischapter
246 % (\thissection) refers to the chapter (section) in effect at the top
247 % of a page, or that at the bottom of a page.
249 % \domark is called twice inside \chapmacro, to add one
250 % mark before the section break, and one after.
251 % In the second call \prevchapterdefs is the same as \currentchapterdefs,
252 % and \prevsectiondefs is the same as \currentsectiondefs.
253 % Then if the page is not broken at the mark, some of the previous
254 % section appears on the page, and we can get the name of this section
255 % from \firstmark for @everyheadingmarks top.
256 % @everyheadingmarks bottom uses \botmark.
258 % See page 260 of The TeXbook.
259 \def\domark{%
260 \toks0=\expandafter{\currentchapterdefs}%
261 \toks2=\expandafter{\currentsectiondefs}%
262 \toks4=\expandafter{\prevchapterdefs}%
263 \toks6=\expandafter{\prevsectiondefs}%
264 \toks8=\expandafter{\currentcolordefs}%
265 \mark{%
266 \the\toks0 \the\toks2 % 0: marks for @everyheadingmarks top
267 \noexpand\or \the\toks4 \the\toks6 % 1: for @everyheadingmarks bottom
268 \noexpand\else \the\toks8 % 2: color marks
272 % \gettopheadingmarks, \getbottomheadingmarks,
273 % \getcolormarks - extract needed part of mark.
275 % \topmark doesn't work for the very first chapter (after the title
276 % page or the contents), so we use \firstmark there -- this gets us
277 % the mark with the chapter defs, unless the user sneaks in, e.g.,
278 % @setcolor (or @url, or @link, etc.) between @contents and the very
279 % first @chapter.
280 \def\gettopheadingmarks{%
281 \ifcase0\the\savedtopmark\fi
282 \ifx\thischapter\empty \ifcase0\firstmark\fi \fi
284 \def\getbottomheadingmarks{\ifcase1\botmark\fi}
285 \def\getcolormarks{\ifcase2\the\savedtopmark\fi}
287 % Avoid "undefined control sequence" errors.
288 \def\currentchapterdefs{}
289 \def\currentsectiondefs{}
290 \def\currentsection{}
291 \def\prevchapterdefs{}
292 \def\prevsectiondefs{}
293 \def\currentcolordefs{}
295 % Margin to add to right of even pages, to left of odd pages.
296 \newdimen\bindingoffset
297 \newdimen\normaloffset
298 \newdimen\txipagewidth \newdimen\txipageheight
300 % Main output routine.
302 \chardef\PAGE = 255
303 \newtoks\defaultoutput
304 \defaultoutput = {\savetopmark\onepageout{\pagecontents\PAGE}}
305 \output=\expandafter{\the\defaultoutput}
307 \newbox\headlinebox
308 \newbox\footlinebox
310 % When outputting the double column layout for indices, an output routine
311 % is run several times, hiding the original value of \topmark. Hence, save
312 % \topmark at the beginning.
314 \newtoks\savedtopmark
315 \newif\iftopmarksaved
316 \topmarksavedtrue
317 \def\savetopmark{%
318 \iftopmarksaved\else
319 \global\savedtopmark=\expandafter{\topmark}%
320 \global\topmarksavedtrue
324 % \onepageout takes a vbox as an argument.
325 % \shipout a vbox for a single page, adding an optional header, footer
326 % and footnote. This also causes index entries for this page to be written
327 % to the auxiliary files.
329 \def\onepageout#1{%
330 \hoffset=\normaloffset
332 \ifodd\pageno \advance\hoffset by \bindingoffset
333 \else \advance\hoffset by -\bindingoffset\fi
335 \checkchapterpage
337 % Make the heading and footing. \makeheadline and \makefootline
338 % use the contents of \headline and \footline.
339 \def\commonheadfootline{\let\hsize=\txipagewidth \texinfochars}
340 \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
341 \global\setbox\headlinebox = \vbox{\commonheadfootline \makeheadline}%
342 \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
343 \global\setbox\footlinebox = \vbox{\commonheadfootline \makefootline}%
346 % Set context for writing to auxiliary files like index files.
347 % Have to do this stuff outside the \shipout because we want it to
348 % take effect in \write's, yet the group defined by the \vbox ends
349 % before the \shipout runs.
351 \atdummies % don't expand commands in the output.
352 \turnoffactive
353 \shipout\vbox{%
354 % Do this early so pdf references go to the beginning of the page.
355 \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
357 \unvbox\headlinebox
358 \pagebody{#1}%
359 \ifdim\ht\footlinebox > 0pt
360 % Only leave this space if the footline is nonempty.
361 % (We lessened \vsize for it in \oddfootingyyy.)
362 % The \baselineskip=24pt in plain's \makefootline has no effect.
363 \vskip 24pt
364 \unvbox\footlinebox
369 \global\topmarksavedfalse
370 \advancepageno
371 \ifnum\outputpenalty>-20000 \else\dosupereject\fi
374 \newinsert\margin \dimen\margin=\maxdimen
376 % Main part of page, including any footnotes
377 \def\pagebody#1{\vbox to\txipageheight{\boxmaxdepth=\maxdepth #1}}
378 {\catcode`\@ =11
379 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
380 % marginal hacks, juha@viisa.uucp (Juha Takala)
381 \ifvoid\margin\else % marginal info is present
382 \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi
383 \dimen@=\dp#1\relax \unvbox#1\relax
384 \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
385 \ifr@ggedbottom \kern-\dimen@ \vfil \fi}
388 % Check if we are on the first page of a chapter. Used for printing headings.
389 \newif\ifchapterpage
390 \def\checkchapterpage{%
391 % Get the chapter that was current at the end of the last page
392 \ifcase1\the\savedtopmark\fi
393 \let\prevchaptername\thischaptername
395 \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
396 \let\curchaptername\thischaptername
398 \ifx\curchaptername\prevchaptername
399 \chapterpagefalse
400 \else
401 \chapterpagetrue
405 % Argument parsing
407 % Parse an argument, then pass it to #1. The argument is the rest of
408 % the input line (except we remove a trailing comment). #1 should be a
409 % macro which expects an ordinary undelimited TeX argument.
410 % For example, \def\foo{\parsearg\fooxxx}.
412 \def\parsearg{\parseargusing{}}
413 \def\parseargusing#1#2{%
414 \def\argtorun{#2}%
415 \begingroup
416 \obeylines
417 \spaceisspace
419 \parseargline\empty% Insert the \empty token, see \finishparsearg below.
422 {\obeylines %
423 \gdef\parseargline#1^^M{%
424 \endgroup % End of the group started in \parsearg.
425 \argremovecomment #1\comment\ArgTerm%
429 % First remove any @comment, then any @c comment. Pass the result on to
430 % \argcheckspaces.
431 \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
432 \def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
434 % Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space.
436 % \argremovec might leave us with trailing space, e.g.,
437 % @end itemize @c foo
438 % This space token undergoes the same procedure and is eventually removed
439 % by \finishparsearg.
441 \def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M}
442 \def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M}
443 \def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{%
444 \def\temp{#3}%
445 \ifx\temp\empty
446 % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp:
447 \let\temp\finishparsearg
448 \else
449 \let\temp\argcheckspaces
451 % Put the space token in:
452 \temp#1 #3\ArgTerm
455 % If a _delimited_ argument is enclosed in braces, they get stripped; so
456 % to get _exactly_ the rest of the line, we had to prevent such situation.
457 % We prepended an \empty token at the very beginning and we expand it now,
458 % just before passing the control to \argtorun.
459 % (Similarly, we have to think about #3 of \argcheckspacesY above: it is
460 % either the null string, or it ends with \^^M---thus there is no danger
461 % that a pair of braces would be stripped.
463 % But first, we have to remove the trailing space token.
465 \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
468 % \parseargdef - define a command taking an argument on the line
470 % \parseargdef\foo{...}
471 % is roughly equivalent to
472 % \def\foo{\parsearg\Xfoo}
473 % \def\Xfoo#1{...}
474 \def\parseargdef#1{%
475 \expandafter \doparseargdef \csname\string#1\endcsname #1%
477 \def\doparseargdef#1#2{%
478 \def#2{\parsearg#1}%
479 \def#1##1%
482 % Several utility definitions with active space:
484 \obeyspaces
485 \gdef\obeyedspace{ }
487 % Make each space character in the input produce a normal interword
488 % space in the output. Don't allow a line break at this space, as this
489 % is used only in environments like @example, where each line of input
490 % should produce a line of output anyway.
492 \gdef\sepspaces{\obeyspaces\let =\tie}
494 % If an index command is used in an @example environment, any spaces
495 % therein should become regular spaces in the raw index file, not the
496 % expansion of \tie (\leavevmode \penalty \@M \ ).
497 \gdef\unsepspaces{\let =\space}
501 \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
503 % Define the framework for environments in texinfo.tex. It's used like this:
505 % \envdef\foo{...}
506 % \def\Efoo{...}
508 % It's the responsibility of \envdef to insert \begingroup before the
509 % actual body; @end closes the group after calling \Efoo. \envdef also
510 % defines \thisenv, so the current environment is known; @end checks
511 % whether the environment name matches. The \checkenv macro can also be
512 % used to check whether the current environment is the one expected.
514 % Non-false conditionals (@iftex, @ifset) don't fit into this, so they
515 % are not treated as environments; they don't open a group. (The
516 % implementation of @end takes care not to call \endgroup in this
517 % special case.)
520 % At run-time, environments start with this:
521 \def\startenvironment#1{\begingroup\def\thisenv{#1}}
522 % initialize
523 \let\thisenv\empty
525 % ... but they get defined via ``\envdef\foo{...}'':
526 \long\def\envdef#1#2{\def#1{\startenvironment#1#2}}
527 \long\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}}
529 % Check whether we're in the right environment:
530 \def\checkenv#1{%
531 \def\temp{#1}%
532 \ifx\thisenv\temp
533 \else
534 \badenverr
538 % Environment mismatch, #1 expected:
539 \def\badenverr{%
540 \errhelp = \EMsimple
541 \errmessage{This command can appear only \inenvironment\temp,
542 not \inenvironment\thisenv}%
544 \def\inenvironment#1{%
545 \ifx#1\empty
546 outside of any environment%
547 \else
548 in environment \expandafter\string#1%
553 % @end foo calls \checkenv and executes the definition of \Efoo.
554 \parseargdef\end{%
555 \if 1\csname iscond.#1\endcsname
556 \else
557 % The general wording of \badenverr may not be ideal.
558 \expandafter\checkenv\csname#1\endcsname
559 \csname E#1\endcsname
560 \endgroup
564 \newhelp\EMsimple{Press RETURN to continue.}
567 % Be sure we're in horizontal mode when doing a tie, since we make space
568 % equivalent to this in @example-like environments. Otherwise, a space
569 % at the beginning of a line will start with \penalty -- and
570 % since \penalty is valid in vertical mode, we'd end up putting the
571 % penalty on the vertical list instead of in the new paragraph.
572 {\catcode`@ = 11
573 % Avoid using \@M directly, because that causes trouble
574 % if the definition is written into an index file.
575 \global\let\tiepenalty = \@M
576 \gdef\tie{\leavevmode\penalty\tiepenalty\ }
579 % @: forces normal size whitespace following.
580 \def\:{\spacefactor=1000 }
582 % @* forces a line break.
583 \def\*{\unskip\hfil\break\hbox{}\ignorespaces}
585 % @/ allows a line break.
586 \let\/=\allowbreak
588 % @- allows explicit insertion of hyphenation points
589 \def\-{\discretionary{\normaldash}{}{}}%
591 % @. is an end-of-sentence period.
592 \def\.{.\spacefactor=\endofsentencespacefactor\space}
594 % @! is an end-of-sentence bang.
595 \def\!{!\spacefactor=\endofsentencespacefactor\space}
597 % @? is an end-of-sentence query.
598 \def\?{?\spacefactor=\endofsentencespacefactor\space}
600 % @w prevents a word break. Without the \leavevmode, @w at the
601 % beginning of a paragraph, when TeX is still in vertical mode, would
602 % produce a whole line of output instead of starting the paragraph.
603 \def\w#1{\leavevmode\hbox{#1}}
605 % @group ... @end group forces ... to be all on one page, by enclosing
606 % it in a TeX vbox. We use \vtop instead of \vbox to construct the box
607 % to keep its height that of a normal line. According to the rules for
608 % \topskip (p.114 of the TeXbook), the glue inserted is
609 % max (\topskip - \ht (first item), 0). If that height is large,
610 % therefore, no glue is inserted, and the space between the headline and
611 % the text is small, which looks bad.
613 % Another complication is that the group might be very large. This can
614 % cause the glue on the previous page to be unduly stretched, because it
615 % does not have much material. In this case, it's better to add an
616 % explicit \vfill so that the extra space is at the bottom. The
617 % threshold for doing this is if the group is more than \vfilllimit
618 % percent of a page (\vfilllimit can be changed inside of @tex).
620 \newbox\groupbox
621 \def\vfilllimit{0.7}
623 \envdef\group{%
624 \ifnum\catcode`\^^M=\active \else
625 \errhelp = \groupinvalidhelp
626 \errmessage{@group invalid in context where filling is enabled}%
628 \startsavinginserts
630 \setbox\groupbox = \vtop\bgroup
631 % Do @comment since we are called inside an environment such as
632 % @example, where each end-of-line in the input causes an
633 % end-of-line in the output. We don't want the end-of-line after
634 % the `@group' to put extra space in the output. Since @group
635 % should appear on a line by itself (according to the Texinfo
636 % manual), we don't worry about eating any user text.
637 \comment
640 % The \vtop produces a box with normal height and large depth; thus, TeX puts
641 % \baselineskip glue before it, and (when the next line of text is done)
642 % \lineskip glue after it. Thus, space below is not quite equal to space
643 % above. But it's pretty close.
644 \def\Egroup{%
645 % To get correct interline space between the last line of the group
646 % and the first line afterwards, we have to propagate \prevdepth.
647 \endgraf % Not \par, as it may have been set to \lisppar.
648 \global\dimen1 = \prevdepth
649 \egroup % End the \vtop.
650 \addgroupbox
651 \prevdepth = \dimen1
652 \checkinserts
655 \def\addgroupbox{
656 % \dimen0 is the vertical size of the group's box.
657 \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox
658 % \dimen2 is how much space is left on the page (more or less).
659 \dimen2 = \txipageheight \advance\dimen2 by -\pagetotal
660 % if the group doesn't fit on the current page, and it's a big big
661 % group, force a page break.
662 \ifdim \dimen0 > \dimen2
663 \ifdim \pagetotal < \vfilllimit\txipageheight
664 \page
667 \box\groupbox
671 % TeX puts in an \escapechar (i.e., `@') at the beginning of the help
672 % message, so this ends up printing `@group can only ...'.
674 \newhelp\groupinvalidhelp{%
675 group can only be used in environments such as @example,^^J%
676 where each line of input produces a line of output.}
678 % @need space-in-mils
679 % forces a page break if there is not space-in-mils remaining.
681 \newdimen\mil \mil=0.001in
683 \parseargdef\need{%
684 % Ensure vertical mode, so we don't make a big box in the middle of a
685 % paragraph.
686 \par
688 % If the @need value is less than one line space, it's useless.
689 \dimen0 = #1\mil
690 \dimen2 = \ht\strutbox
691 \advance\dimen2 by \dp\strutbox
692 \ifdim\dimen0 > \dimen2
693 % This is similar to the 'needspace' module in LaTeX.
694 % The first penalty allows a break if the end of the page is
695 % not too far away. Following penalties and skips are discarded.
696 % Otherwise, require at least \dimen0 of vertical space.
698 % (We used to use a \vtop to reserve space, but this had spacing issues
699 % when followed by a section heading, as it was not a "discardable item".
700 % This also has the benefit of providing glue before the page break if
701 % there isn't enough space.)
702 \vskip0pt plus \dimen0
703 \penalty-100
704 \vskip0pt plus -\dimen0
705 \vskip \dimen0
706 \penalty9999
707 \vskip -\dimen0
708 \penalty0\relax % this hides the above glue from \safewhatsit and \dobreak
712 % @br forces paragraph break (and is undocumented).
714 \let\br = \par
716 % @page forces the start of a new page.
718 \def\page{\par\vfill\supereject}
720 % @exdent text....
721 % outputs text on separate line in roman font, starting at standard page margin
723 % This records the amount of indent in the innermost environment.
724 % That's how much \exdent should take out.
725 \newskip\exdentamount
727 % This defn is used inside fill environments such as @defun.
728 \parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}
730 % This defn is used inside nofill environments such as @example.
731 \parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount
732 \leftline{\hskip\leftskip{\rm#1}}}}
734 % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
735 % paragraph. For more general purposes, use the \margin insertion
736 % class. WHICH is `l' or `r'. Not documented, written for gawk manual.
738 \newskip\inmarginspacing \inmarginspacing=1cm
739 \def\strutdepth{\dp\strutbox}
741 \def\doinmargin#1#2{\strut\vadjust{%
742 \nobreak
743 \kern-\strutdepth
744 \vtop to \strutdepth{%
745 \baselineskip=\strutdepth
746 \vss
747 % if you have multiple lines of stuff to put here, you'll need to
748 % make the vbox yourself of the appropriate size.
749 \ifx#1l%
750 \llap{\ignorespaces #2\hskip\inmarginspacing}%
751 \else
752 \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}%
754 \null
757 \def\inleftmargin{\doinmargin l}
758 \def\inrightmargin{\doinmargin r}
760 % @inmargin{TEXT [, RIGHT-TEXT]}
761 % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right;
762 % else use TEXT for both).
764 \def\inmargin#1{\parseinmargin #1,,\finish}
765 \def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing.
766 \setbox0 = \hbox{\ignorespaces #2}%
767 \ifdim\wd0 > 0pt
768 \def\lefttext{#1}% have both texts
769 \def\righttext{#2}%
770 \else
771 \def\lefttext{#1}% have only one text
772 \def\righttext{#1}%
775 \ifodd\pageno
776 \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin
777 \else
778 \def\temp{\inleftmargin\lefttext}%
780 \temp
783 % @include FILE -- \input text of FILE.
785 \def\include{\parseargusing\filenamecatcodes\includezzz}
786 \def\includezzz#1{%
787 \pushthisfilestack
788 \def\thisfile{#1}%
790 \makevalueexpandable % we want to expand any @value in FILE.
791 \turnoffactive % and allow special characters in the expansion
792 \indexnofonts % Allow `@@' and other weird things in file names.
793 \wlog{texinfo.tex: doing @include of #1^^J}%
794 \edef\temp{\noexpand\input #1 }%
796 % This trickery is to read FILE outside of a group, in case it makes
797 % definitions, etc.
798 \expandafter
799 }\temp
800 \popthisfilestack
802 \def\filenamecatcodes{%
803 \catcode`\\=\other
804 \catcode`~=\other
805 \catcode`^=\other
806 \catcode`_=\other
807 \catcode`|=\other
808 \catcode`<=\other
809 \catcode`>=\other
810 \catcode`+=\other
811 \catcode`-=\other
812 \catcode`\`=\other
813 \catcode`\'=\other
816 \def\pushthisfilestack{%
817 \expandafter\pushthisfilestackX\popthisfilestack\StackTerm
819 \def\pushthisfilestackX{%
820 \expandafter\pushthisfilestackY\thisfile\StackTerm
822 \def\pushthisfilestackY #1\StackTerm #2\StackTerm {%
823 \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}%
826 \def\popthisfilestack{\errthisfilestackempty}
827 \def\errthisfilestackempty{\errmessage{Internal error:
828 the stack of filenames is empty.}}
830 \def\thisfile{}
832 % @center line
833 % outputs that line, centered.
835 \parseargdef\center{%
836 \ifhmode
837 \let\centersub\centerH
838 \else
839 \let\centersub\centerV
841 \centersub{\hfil \ignorespaces#1\unskip \hfil}%
842 \let\centersub\relax % don't let the definition persist, just in case
844 \def\centerH#1{{%
845 \hfil\break
846 \advance\hsize by -\leftskip
847 \advance\hsize by -\rightskip
848 \line{#1}%
849 \break
852 \newcount\centerpenalty
853 \def\centerV#1{%
854 % The idea here is the same as in \startdefun, \cartouche, etc.: if
855 % @center is the first thing after a section heading, we need to wipe
856 % out the negative parskip inserted by \sectionheading, but still
857 % prevent a page break here.
858 \centerpenalty = \lastpenalty
859 \ifnum\centerpenalty>10000 \vskip\parskip \fi
860 \ifnum\centerpenalty>9999 \penalty\centerpenalty \fi
861 \line{\kern\leftskip #1\kern\rightskip}%
864 % @sp n outputs n lines of vertical space
866 \parseargdef\sp{\vskip #1\baselineskip}
868 % @comment ...line which is ignored...
869 % @c is the same as @comment
870 % @ignore ... @end ignore is another way to write a comment
873 \def\c{\begingroup \catcode`\^^M=\active%
874 \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
875 \cxxx}
876 {\catcode`\^^M=\active \gdef\cxxx#1^^M{\endgroup}}
878 \let\comment\c
880 % @paragraphindent NCHARS
881 % We'll use ems for NCHARS, close enough.
882 % NCHARS can also be the word `asis' or `none'.
883 % We cannot feasibly implement @paragraphindent asis, though.
885 \def\asisword{asis} % no translation, these are keywords
886 \def\noneword{none}
888 \parseargdef\paragraphindent{%
889 \def\temp{#1}%
890 \ifx\temp\asisword
891 \else
892 \ifx\temp\noneword
893 \defaultparindent = 0pt
894 \else
895 \defaultparindent = #1em
898 \parindent = \defaultparindent
901 % @exampleindent NCHARS
902 % We'll use ems for NCHARS like @paragraphindent.
903 % It seems @exampleindent asis isn't necessary, but
904 % I preserve it to make it similar to @paragraphindent.
905 \parseargdef\exampleindent{%
906 \def\temp{#1}%
907 \ifx\temp\asisword
908 \else
909 \ifx\temp\noneword
910 \lispnarrowing = 0pt
911 \else
912 \lispnarrowing = #1em
917 % @firstparagraphindent WORD
918 % If WORD is `none', then suppress indentation of the first paragraph
919 % after a section heading. If WORD is `insert', then do indent at such
920 % paragraphs.
922 % The paragraph indentation is suppressed or not by calling
923 % \suppressfirstparagraphindent, which the sectioning commands do.
924 % We switch the definition of this back and forth according to WORD.
925 % By default, we suppress indentation.
927 \def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent}
928 \def\insertword{insert}
930 \parseargdef\firstparagraphindent{%
931 \def\temp{#1}%
932 \ifx\temp\noneword
933 \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent
934 \else\ifx\temp\insertword
935 \let\suppressfirstparagraphindent = \relax
936 \else
937 \errhelp = \EMsimple
938 \errmessage{Unknown @firstparagraphindent option `\temp'}%
939 \fi\fi
942 % Here is how we actually suppress indentation. Redefine \everypar to
943 % \kern backwards by \parindent, and then reset itself to empty.
945 % We also make \indent itself not actually do anything until the next
946 % paragraph.
948 \gdef\dosuppressfirstparagraphindent{%
949 \gdef\indent {\restorefirstparagraphindent \indent}%
950 \gdef\noindent{\restorefirstparagraphindent \noindent}%
951 \global\everypar = {\kern -\parindent \restorefirstparagraphindent}%
954 \gdef\restorefirstparagraphindent{%
955 \global\let\indent = \ptexindent
956 \global\let\noindent = \ptexnoindent
957 \global\everypar = {}%
960 % leave vertical mode without cancelling any first paragraph indent
961 \gdef\imageindent{%
962 \toks0=\everypar
963 \everypar={}%
964 \ptexnoindent
965 \global\everypar=\toks0
969 % @refill is a no-op.
970 \let\refill=\relax
972 % @setfilename INFO-FILENAME - ignored
973 \let\setfilename=\comment
975 % @bye.
976 \outer\def\bye{\chappager\pagelabels\tracingstats=1\ptexend}
979 \message{pdf,}
980 % adobe `portable' document format
981 \newcount\tempnum
982 \newcount\lnkcount
983 \newtoks\filename
984 \newcount\filenamelength
985 \newcount\pgn
986 \newtoks\toksA
987 \newtoks\toksB
988 \newtoks\toksC
989 \newtoks\toksD
990 \newbox\boxA
991 \newbox\boxB
992 \newcount\countA
993 \newif\ifpdf
994 \newif\ifpdfmakepagedest
997 % For LuaTeX
1000 \newif\iftxiuseunicodedestname
1001 \txiuseunicodedestnamefalse % For pdfTeX etc.
1003 \ifx\luatexversion\thisisundefined
1004 \else
1005 % Use Unicode destination names
1006 \txiuseunicodedestnametrue
1007 % Escape PDF strings with converting UTF-16 from UTF-8
1008 \begingroup
1009 \catcode`\%=12
1010 \directlua{
1011 function UTF16oct(str)
1012 tex.sprint(string.char(0x5c) .. '376' .. string.char(0x5c) .. '377')
1013 for c in string.utfvalues(str) do
1014 if c < 0x10000 then
1015 tex.sprint(
1016 string.format(string.char(0x5c) .. string.char(0x25) .. '03o' ..
1017 string.char(0x5c) .. string.char(0x25) .. '03o',
1018 math.floor(c / 256), math.floor(c % 256)))
1019 else
1020 c = c - 0x10000
1021 local c_hi = c / 1024 + 0xd800
1022 local c_lo = c % 1024 + 0xdc00
1023 tex.sprint(
1024 string.format(string.char(0x5c) .. string.char(0x25) .. '03o' ..
1025 string.char(0x5c) .. string.char(0x25) .. '03o' ..
1026 string.char(0x5c) .. string.char(0x25) .. '03o' ..
1027 string.char(0x5c) .. string.char(0x25) .. '03o',
1028 math.floor(c_hi / 256), math.floor(c_hi % 256),
1029 math.floor(c_lo / 256), math.floor(c_lo % 256)))
1034 \endgroup
1035 \def\pdfescapestrutfsixteen#1{\directlua{UTF16oct('\luaescapestring{#1}')}}
1036 % Escape PDF strings without converting
1037 \begingroup
1038 \directlua{
1039 function PDFescstr(str)
1040 for c in string.bytes(str) do
1041 if c <= 0x20 or c >= 0x80 or c == 0x28 or c == 0x29 or c == 0x5c then
1042 tex.sprint(-2,
1043 string.format(string.char(0x5c) .. string.char(0x25) .. '03o',
1045 else
1046 tex.sprint(-2, string.char(c))
1051 % The -2 in the arguments here gives all the input to TeX catcode 12
1052 % (other) or 10 (space), preventing undefined control sequence errors. See
1053 % https://lists.gnu.org/archive/html/bug-texinfo/2019-08/msg00031.html
1055 \endgroup
1056 \def\pdfescapestring#1{\directlua{PDFescstr('\luaescapestring{#1}')}}
1057 \ifnum\luatexversion>84
1058 % For LuaTeX >= 0.85
1059 \def\pdfdest{\pdfextension dest}
1060 \let\pdfoutput\outputmode
1061 \def\pdfliteral{\pdfextension literal}
1062 \def\pdfcatalog{\pdfextension catalog}
1063 \def\pdftexversion{\numexpr\pdffeedback version\relax}
1064 \let\pdfximage\saveimageresource
1065 \let\pdfrefximage\useimageresource
1066 \let\pdflastximage\lastsavedimageresourceindex
1067 \def\pdfendlink{\pdfextension endlink\relax}
1068 \def\pdfoutline{\pdfextension outline}
1069 \def\pdfstartlink{\pdfextension startlink}
1070 \def\pdffontattr{\pdfextension fontattr}
1071 \def\pdfobj{\pdfextension obj}
1072 \def\pdflastobj{\numexpr\pdffeedback lastobj\relax}
1073 \let\pdfpagewidth\pagewidth
1074 \let\pdfpageheight\pageheight
1075 \edef\pdfhorigin{\pdfvariable horigin}
1076 \edef\pdfvorigin{\pdfvariable vorigin}
1080 % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
1081 % can be set). So we test for \relax and 0 as well as being undefined.
1082 \ifx\pdfoutput\thisisundefined
1083 \else
1084 \ifx\pdfoutput\relax
1085 \else
1086 \ifcase\pdfoutput
1087 \else
1088 \pdftrue
1093 \newif\ifpdforxetex
1094 \pdforxetexfalse
1095 \ifpdf
1096 \pdforxetextrue
1098 \ifx\XeTeXrevision\thisisundefined\else
1099 \pdforxetextrue
1103 % Output page labels information.
1104 % See PDF reference v.1.7 p.594, section 8.3.1.
1105 \ifpdf
1106 \def\pagelabels{%
1107 \def\title{0 << /P (T-) /S /D >>}%
1108 \edef\roman{\the\romancount << /S /r >>}%
1109 \edef\arabic{\the\arabiccount << /S /D >>}%
1111 % Page label ranges must be increasing. Remove any duplicates.
1112 % (There is a slight chance of this being wrong if e.g. there is
1113 % a @contents but no @titlepage, etc.)
1115 \ifnum\romancount=0 \def\roman{}\fi
1116 \ifnum\arabiccount=0 \def\title{}%
1117 \else
1118 \ifnum\romancount=\arabiccount \def\roman{}\fi
1121 \ifnum\romancount<\arabiccount
1122 \pdfcatalog{/PageLabels << /Nums [\title \roman \arabic ] >> }\relax
1123 \else
1124 \pdfcatalog{/PageLabels << /Nums [\title \arabic \roman ] >> }\relax
1127 \else
1128 \let\pagelabels\relax
1131 \newcount\pagecount \pagecount=0
1132 \newcount\romancount \romancount=0
1133 \newcount\arabiccount \arabiccount=0
1134 \ifpdf
1135 \let\ptxadvancepageno\advancepageno
1136 \def\advancepageno{%
1137 \ptxadvancepageno\global\advance\pagecount by 1
1142 % PDF uses PostScript string constants for the names of xref targets,
1143 % for display in the outlines, and in other places. Thus, we have to
1144 % double any backslashes. Otherwise, a name like "\node" will be
1145 % interpreted as a newline (\n), followed by o, d, e. Not good.
1147 % See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and
1148 % related messages. The final outcome is that it is up to the TeX user
1149 % to double the backslashes and otherwise make the string valid, so
1150 % that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to
1151 % do this reliably, so we use it.
1153 % #1 is a control sequence in which to do the replacements,
1154 % which we \xdef.
1155 \def\txiescapepdf#1{%
1156 \ifx\pdfescapestring\thisisundefined
1157 % No primitive available; should we give a warning or log?
1158 % Many times it won't matter.
1159 \xdef#1{#1}%
1160 \else
1161 % The expandable \pdfescapestring primitive escapes parentheses,
1162 % backslashes, and other special chars.
1163 \xdef#1{\pdfescapestring{#1}}%
1166 \def\txiescapepdfutfsixteen#1{%
1167 \ifx\pdfescapestrutfsixteen\thisisundefined
1168 % No UTF-16 converting macro available.
1169 \txiescapepdf{#1}%
1170 \else
1171 \xdef#1{\pdfescapestrutfsixteen{#1}}%
1175 \newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
1176 with PDF output, and none of those formats could be found. (.eps cannot
1177 be supported due to the design of the PDF format; use regular TeX (DVI
1178 output) for that.)}
1180 \ifpdf
1182 % Color manipulation macros using ideas from pdfcolor.tex,
1183 % except using rgb instead of cmyk; the latter is said to render as a
1184 % very dark gray on-screen and a very dark halftone in print, instead
1185 % of actual black. The dark red here is dark enough to print on paper as
1186 % nearly black, but still distinguishable for online viewing. We use
1187 % black by default, though.
1188 \def\rgbDarkRed{0.50 0.09 0.12}
1189 \def\rgbBlack{0 0 0}
1191 % rg sets the color for filling (usual text, etc.);
1192 % RG sets the color for stroking (thin rules, e.g., normal _'s).
1193 \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}}
1195 % Set color, and create a mark which defines \thiscolor accordingly,
1196 % so that \makeheadline knows which color to restore.
1197 \def\curcolor{0 0 0}%
1198 \def\setcolor#1{%
1199 \ifx#1\curcolor\else
1200 \xdef\currentcolordefs{\gdef\noexpand\thiscolor{#1}}%
1201 \domark
1202 \pdfsetcolor{#1}%
1203 \xdef\curcolor{#1}%
1207 \let\maincolor\rgbBlack
1208 \pdfsetcolor{\maincolor}
1209 \edef\thiscolor{\maincolor}
1210 \def\currentcolordefs{}
1212 \def\makefootline{%
1213 \baselineskip24pt
1214 \line{\pdfsetcolor{\maincolor}\the\footline}%
1217 \def\makeheadline{%
1218 \vbox to 0pt{%
1219 \vskip-22.5pt
1220 \line{%
1221 \vbox to8.5pt{}%
1222 % Extract \thiscolor definition from the marks.
1223 \getcolormarks
1224 % Typeset the headline with \maincolor, then restore the color.
1225 \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
1227 \vss
1229 \nointerlineskip
1233 \pdfcatalog{/PageMode /UseOutlines}
1235 % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
1236 \def\dopdfimage#1#2#3{%
1237 \def\pdfimagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
1238 \def\pdfimageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
1240 % pdftex (and the PDF format) support .pdf, .png, .jpg (among
1241 % others). Let's try in that order, PDF first since if
1242 % someone has a scalable image, presumably better to use that than a
1243 % bitmap.
1244 \let\pdfimgext=\empty
1245 \begingroup
1246 \openin 1 #1.pdf \ifeof 1
1247 \openin 1 #1.PDF \ifeof 1
1248 \openin 1 #1.png \ifeof 1
1249 \openin 1 #1.jpg \ifeof 1
1250 \openin 1 #1.jpeg \ifeof 1
1251 \openin 1 #1.JPG \ifeof 1
1252 \errhelp = \nopdfimagehelp
1253 \errmessage{Could not find image file #1 for pdf}%
1254 \else \gdef\pdfimgext{JPG}%
1256 \else \gdef\pdfimgext{jpeg}%
1258 \else \gdef\pdfimgext{jpg}%
1260 \else \gdef\pdfimgext{png}%
1262 \else \gdef\pdfimgext{PDF}%
1264 \else \gdef\pdfimgext{pdf}%
1266 \closein 1
1267 \endgroup
1269 % without \immediate, ancient pdftex seg faults when the same image is
1270 % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
1271 \ifnum\pdftexversion < 14
1272 \immediate\pdfimage
1273 \else
1274 \immediate\pdfximage
1276 \ifdim \wd0 >0pt width \pdfimagewidth \fi
1277 \ifdim \wd2 >0pt height \pdfimageheight \fi
1278 \ifnum\pdftexversion<13
1279 #1.\pdfimgext
1280 \else
1281 {#1.\pdfimgext}%
1283 \ifnum\pdftexversion < 14 \else
1284 \pdfrefximage \pdflastximage
1285 \fi}
1287 \def\setpdfdestname#1{{%
1288 % We have to set dummies so commands such as @code, and characters
1289 % such as \, aren't expanded when present in a section title.
1290 \indexnofonts
1291 \makevalueexpandable
1292 \turnoffactive
1293 \iftxiuseunicodedestname
1294 \ifx \declaredencoding \latone
1295 % Pass through Latin-1 characters.
1296 % LuaTeX with byte wise I/O converts Latin-1 characters to Unicode.
1297 \else
1298 \ifx \declaredencoding \utfeight
1299 % Pass through Unicode characters.
1300 \else
1301 % Use ASCII approximations in destination names.
1302 \passthroughcharsfalse
1305 \else
1306 % Use ASCII approximations in destination names.
1307 \passthroughcharsfalse
1309 \def\pdfdestname{#1}%
1310 \txiescapepdf\pdfdestname
1313 \def\setpdfoutlinetext#1{{%
1314 \indexnofonts
1315 \makevalueexpandable
1316 \turnoffactive
1317 \ifx \declaredencoding \latone
1318 % The PDF format can use an extended form of Latin-1 in bookmark
1319 % strings. See Appendix D of the PDF Reference, Sixth Edition, for
1320 % the "PDFDocEncoding".
1321 \passthroughcharstrue
1322 % Pass through Latin-1 characters.
1323 % LuaTeX: Convert to Unicode
1324 % pdfTeX: Use Latin-1 as PDFDocEncoding
1325 \def\pdfoutlinetext{#1}%
1326 \else
1327 \ifx \declaredencoding \utfeight
1328 \ifx\luatexversion\thisisundefined
1329 % For pdfTeX with UTF-8.
1330 % TODO: the PDF format can use UTF-16 in bookmark strings,
1331 % but the code for this isn't done yet.
1332 % Use ASCII approximations.
1333 \passthroughcharsfalse
1334 \def\pdfoutlinetext{#1}%
1335 \else
1336 % For LuaTeX with UTF-8.
1337 % Pass through Unicode characters for title texts.
1338 \passthroughcharstrue
1339 \def\pdfoutlinetext{#1}%
1341 \else
1342 % For non-Latin-1 or non-UTF-8 encodings.
1343 % Use ASCII approximations.
1344 \passthroughcharsfalse
1345 \def\pdfoutlinetext{#1}%
1348 % LuaTeX: Convert to UTF-16
1349 % pdfTeX: Use Latin-1 as PDFDocEncoding
1350 \txiescapepdfutfsixteen\pdfoutlinetext
1353 \def\pdfmkdest#1{%
1354 \setpdfdestname{#1}%
1355 \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
1358 % used to mark target names; must be expandable.
1359 \def\pdfmkpgn#1{#1}
1361 % by default, use black for everything.
1362 \def\urlcolor{\rgbBlack}
1363 \let\linkcolor\rgbBlack
1364 \def\endlink{\setcolor{\maincolor}\pdfendlink}
1366 % Adding outlines to PDF; macros for calculating structure of outlines
1367 % come from Petr Olsak
1368 \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
1369 \else \csname#1\endcsname \fi}
1370 \def\advancenumber#1{\tempnum=\expnumber{#1}\relax
1371 \advance\tempnum by 1
1372 \expandafter\xdef\csname#1\endcsname{\the\tempnum}}
1374 % #1 is the section text, which is what will be displayed in the
1375 % outline by the pdf viewer. #2 is the pdf expression for the number
1376 % of subentries (or empty, for subsubsections). #3 is the node text,
1377 % which might be empty if this toc entry had no corresponding node.
1378 % #4 is the page number
1380 \def\dopdfoutline#1#2#3#4{%
1381 % Generate a link to the node text if that exists; else, use the
1382 % page number. We could generate a destination for the section
1383 % text in the case where a section has no node, but it doesn't
1384 % seem worth the trouble, since most documents are normally structured.
1385 \setpdfoutlinetext{#1}
1386 \setpdfdestname{#3}
1387 \ifx\pdfdestname\empty
1388 \def\pdfdestname{#4}%
1391 \pdfoutline goto name{\pdfmkpgn{\pdfdestname}}#2{\pdfoutlinetext}%
1394 \def\pdfmakeoutlines{%
1395 \begingroup
1396 % Read toc silently, to get counts of subentries for \pdfoutline.
1397 \def\partentry##1##2##3##4{}% ignore parts in the outlines
1398 \def\numchapentry##1##2##3##4{%
1399 \def\thischapnum{##2}%
1400 \def\thissecnum{0}%
1401 \def\thissubsecnum{0}%
1403 \def\numsecentry##1##2##3##4{%
1404 \advancenumber{chap\thischapnum}%
1405 \def\thissecnum{##2}%
1406 \def\thissubsecnum{0}%
1408 \def\numsubsecentry##1##2##3##4{%
1409 \advancenumber{sec\thissecnum}%
1410 \def\thissubsecnum{##2}%
1412 \def\numsubsubsecentry##1##2##3##4{%
1413 \advancenumber{subsec\thissubsecnum}%
1415 \def\thischapnum{0}%
1416 \def\thissecnum{0}%
1417 \def\thissubsecnum{0}%
1419 % use \def rather than \let here because we redefine \chapentry et
1420 % al. a second time, below.
1421 \def\appentry{\numchapentry}%
1422 \def\appsecentry{\numsecentry}%
1423 \def\appsubsecentry{\numsubsecentry}%
1424 \def\appsubsubsecentry{\numsubsubsecentry}%
1425 \def\unnchapentry{\numchapentry}%
1426 \def\unnsecentry{\numsecentry}%
1427 \def\unnsubsecentry{\numsubsecentry}%
1428 \def\unnsubsubsecentry{\numsubsubsecentry}%
1429 \readdatafile{toc}%
1431 % Read toc second time, this time actually producing the outlines.
1432 % The `-' means take the \expnumber as the absolute number of
1433 % subentries, which we calculated on our first read of the .toc above.
1435 % We use the node names as the destinations.
1437 % Currently we prefix the section name with the section number
1438 % for chapter and appendix headings only in order to avoid too much
1439 % horizontal space being required in the PDF viewer.
1440 \def\numchapentry##1##2##3##4{%
1441 \dopdfoutline{##2 ##1}{count-\expnumber{chap##2}}{##3}{##4}}%
1442 \def\unnchapentry##1##2##3##4{%
1443 \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}%
1444 \def\numsecentry##1##2##3##4{%
1445 \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}%
1446 \def\numsubsecentry##1##2##3##4{%
1447 \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}%
1448 \def\numsubsubsecentry##1##2##3##4{% count is always zero
1449 \dopdfoutline{##1}{}{##3}{##4}}%
1451 % PDF outlines are displayed using system fonts, instead of
1452 % document fonts. Therefore we cannot use special characters,
1453 % since the encoding is unknown. For example, the eogonek from
1454 % Latin 2 (0xea) gets translated to a | character. Info from
1455 % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
1457 % TODO this right, we have to translate 8-bit characters to
1458 % their "best" equivalent, based on the @documentencoding. Too
1459 % much work for too little return. Just use the ASCII equivalents
1460 % we use for the index sort strings.
1462 \indexnofonts
1463 \setupdatafile
1464 % We can have normal brace characters in the PDF outlines, unlike
1465 % Texinfo index files. So set that up.
1466 \def\{{\lbracecharliteral}%
1467 \def\}{\rbracecharliteral}%
1468 \catcode`\\=\active \otherbackslash
1469 \input \tocreadfilename
1470 \endgroup
1472 {\catcode`[=1 \catcode`]=2
1473 \catcode`{=\other \catcode`}=\other
1474 \gdef\lbracecharliteral[{]%
1475 \gdef\rbracecharliteral[}]%
1478 \def\skipspaces#1{\def\PP{#1}\def\D{|}%
1479 \ifx\PP\D\let\nextsp\relax
1480 \else\let\nextsp\skipspaces
1481 \addtokens{\filename}{\PP}%
1482 \advance\filenamelength by 1
1484 \nextsp}
1485 \def\getfilename#1{%
1486 \filenamelength=0
1487 % If we don't expand the argument now, \skipspaces will get
1488 % snagged on things like "@value{foo}".
1489 \edef\temp{#1}%
1490 \expandafter\skipspaces\temp|\relax
1492 \ifnum\pdftexversion < 14
1493 \let \startlink \pdfannotlink
1494 \else
1495 \let \startlink \pdfstartlink
1497 % make a live url in pdf output.
1498 \def\pdfurl#1{%
1499 \begingroup
1500 % it seems we really need yet another set of dummies; have not
1501 % tried to figure out what each command should do in the context
1502 % of @url. for now, just make @/ a no-op, that's the only one
1503 % people have actually reported a problem with.
1505 \normalturnoffactive
1506 \def\@{@}%
1507 \let\/=\empty
1508 \makevalueexpandable
1509 % do we want to go so far as to use \indexnofonts instead of just
1510 % special-casing \var here?
1511 \def\var##1{##1}%
1513 \leavevmode\setcolor{\urlcolor}%
1514 \startlink attr{/Border [0 0 0]}%
1515 user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
1516 \endgroup}
1517 % \pdfgettoks - Surround page numbers in #1 with @pdflink. #1 may
1518 % be a simple number, or a list of numbers in the case of an index
1519 % entry.
1520 \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
1521 \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
1522 \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
1523 \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
1524 \def\maketoks{%
1525 \expandafter\poptoks\the\toksA|ENDTOKS|\relax
1526 \ifx\first0\adn0
1527 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
1528 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
1529 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
1530 \else
1531 \ifnum0=\countA\else\makelink\fi
1532 \ifx\first.\let\next=\done\else
1533 \let\next=\maketoks
1534 \addtokens{\toksB}{\the\toksD}
1535 \ifx\first,\addtokens{\toksB}{\space}\fi
1537 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
1538 \next}
1539 \def\makelink{\addtokens{\toksB}%
1540 {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
1541 \def\pdflink#1{\pdflinkpage{#1}{#1}}%
1542 \def\pdflinkpage#1#2{%
1543 \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
1544 \setcolor{\linkcolor}#2\endlink}
1545 \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
1546 \else
1547 % non-pdf mode
1548 \let\pdfmkdest = \gobble
1549 \let\pdfurl = \gobble
1550 \let\endlink = \relax
1551 \let\setcolor = \gobble
1552 \let\pdfsetcolor = \gobble
1553 \let\pdfmakeoutlines = \relax
1554 \fi % \ifx\pdfoutput
1557 % For XeTeX
1559 \ifx\XeTeXrevision\thisisundefined
1560 \else
1562 % XeTeX version check
1564 \ifnum\strcmp{\the\XeTeXversion\XeTeXrevision}{0.99996}>-1
1565 % TeX Live 2016 contains XeTeX 0.99996 and xdvipdfmx 20160307.
1566 % It can use the `dvipdfmx:config' special (from TeX Live SVN r40941).
1567 % For avoiding PDF destination name replacement, we use this special
1568 % instead of xdvipdfmx's command line option `-C 0x0010'.
1569 \special{dvipdfmx:config C 0x0010}
1570 % XeTeX 0.99995+ comes with xdvipdfmx 20160307+.
1571 % It can handle Unicode destination names for PDF.
1572 \txiuseunicodedestnametrue
1573 \else
1574 % XeTeX < 0.99996 (TeX Live < 2016) cannot use the
1575 % `dvipdfmx:config' special.
1576 % So for avoiding PDF destination name replacement,
1577 % xdvipdfmx's command line option `-C 0x0010' is necessary.
1579 % XeTeX < 0.99995 can not handle Unicode destination names for PDF
1580 % because xdvipdfmx 20150315 has a UTF-16 conversion issue.
1581 % It is fixed by xdvipdfmx 20160106 (TeX Live SVN r39753).
1582 \txiuseunicodedestnamefalse
1585 % Color support
1587 \def\rgbDarkRed{0.50 0.09 0.12}
1588 \def\rgbBlack{0 0 0}
1590 \def\pdfsetcolor#1{\special{pdf:scolor [#1]}}
1592 % Set color, and create a mark which defines \thiscolor accordingly,
1593 % so that \makeheadline knows which color to restore.
1594 \def\setcolor#1{%
1595 \xdef\currentcolordefs{\gdef\noexpand\thiscolor{#1}}%
1596 \domark
1597 \pdfsetcolor{#1}%
1600 \def\maincolor{\rgbBlack}
1601 \pdfsetcolor{\maincolor}
1602 \edef\thiscolor{\maincolor}
1603 \def\currentcolordefs{}
1605 \def\makefootline{%
1606 \baselineskip24pt
1607 \line{\pdfsetcolor{\maincolor}\the\footline}%
1610 \def\makeheadline{%
1611 \vbox to 0pt{%
1612 \vskip-22.5pt
1613 \line{%
1614 \vbox to8.5pt{}%
1615 % Extract \thiscolor definition from the marks.
1616 \getcolormarks
1617 % Typeset the headline with \maincolor, then restore the color.
1618 \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
1620 \vss
1622 \nointerlineskip
1625 % PDF outline support
1627 % Emulate pdfTeX primitive
1628 \def\pdfdest name#1 xyz{%
1629 \special{pdf:dest (#1) [@thispage /XYZ @xpos @ypos null]}%
1632 \def\setpdfdestname#1{{%
1633 % We have to set dummies so commands such as @code, and characters
1634 % such as \, aren't expanded when present in a section title.
1635 \indexnofonts
1636 \makevalueexpandable
1637 \turnoffactive
1638 \iftxiuseunicodedestname
1639 % Pass through Unicode characters.
1640 \else
1641 % Use ASCII approximations in destination names.
1642 \passthroughcharsfalse
1644 \def\pdfdestname{#1}%
1645 \txiescapepdf\pdfdestname
1648 \def\setpdfoutlinetext#1{{%
1649 \turnoffactive
1650 % Always use Unicode characters in title texts.
1651 \def\pdfoutlinetext{#1}%
1652 % For XeTeX, xdvipdfmx converts to UTF-16.
1653 % So we do not convert.
1654 \txiescapepdf\pdfoutlinetext
1657 \def\pdfmkdest#1{%
1658 \setpdfdestname{#1}%
1659 \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
1662 % by default, use black for everything.
1663 \def\urlcolor{\rgbBlack}
1664 \def\linkcolor{\rgbBlack}
1665 \def\endlink{\setcolor{\maincolor}\pdfendlink}
1667 \def\dopdfoutline#1#2#3#4{%
1668 \setpdfoutlinetext{#1}
1669 \setpdfdestname{#3}
1670 \ifx\pdfdestname\empty
1671 \def\pdfdestname{#4}%
1674 \special{pdf:out [-] #2 << /Title (\pdfoutlinetext) /A
1675 << /S /GoTo /D (\pdfdestname) >> >> }%
1678 \def\pdfmakeoutlines{%
1679 \begingroup
1681 % For XeTeX, counts of subentries are not necessary.
1682 % Therefore, we read toc only once.
1684 % We use node names as destinations.
1686 % Currently we prefix the section name with the section number
1687 % for chapter and appendix headings only in order to avoid too much
1688 % horizontal space being required in the PDF viewer.
1689 \def\partentry##1##2##3##4{}% ignore parts in the outlines
1690 \def\numchapentry##1##2##3##4{%
1691 \dopdfoutline{##2 ##1}{1}{##3}{##4}}%
1692 \def\numsecentry##1##2##3##4{%
1693 \dopdfoutline{##1}{2}{##3}{##4}}%
1694 \def\numsubsecentry##1##2##3##4{%
1695 \dopdfoutline{##1}{3}{##3}{##4}}%
1696 \def\numsubsubsecentry##1##2##3##4{%
1697 \dopdfoutline{##1}{4}{##3}{##4}}%
1699 \let\appentry\numchapentry%
1700 \let\appsecentry\numsecentry%
1701 \let\appsubsecentry\numsubsecentry%
1702 \let\appsubsubsecentry\numsubsubsecentry%
1703 \def\unnchapentry##1##2##3##4{%
1704 \dopdfoutline{##1}{1}{##3}{##4}}%
1705 \let\unnsecentry\numsecentry%
1706 \let\unnsubsecentry\numsubsecentry%
1707 \let\unnsubsubsecentry\numsubsubsecentry%
1709 % For XeTeX, xdvipdfmx converts strings to UTF-16.
1710 % Therefore, the encoding and the language may not be considered.
1712 \indexnofonts
1713 \setupdatafile
1714 % We can have normal brace characters in the PDF outlines, unlike
1715 % Texinfo index files. So set that up.
1716 \def\{{\lbracecharliteral}%
1717 \def\}{\rbracecharliteral}%
1718 \catcode`\\=\active \otherbackslash
1719 \input \tocreadfilename
1720 \endgroup
1722 {\catcode`[=1 \catcode`]=2
1723 \catcode`{=\other \catcode`}=\other
1724 \gdef\lbracecharliteral[{]%
1725 \gdef\rbracecharliteral[}]%
1728 \special{pdf:docview << /PageMode /UseOutlines >> }
1729 % ``\special{pdf:tounicode ...}'' is not necessary
1730 % because xdvipdfmx converts strings from UTF-8 to UTF-16 without it.
1731 % However, due to a UTF-16 conversion issue of xdvipdfmx 20150315,
1732 % ``\special{pdf:dest ...}'' cannot handle non-ASCII strings.
1733 % It is fixed by xdvipdfmx 20160106 (TeX Live SVN r39753).
1735 \def\skipspaces#1{\def\PP{#1}\def\D{|}%
1736 \ifx\PP\D\let\nextsp\relax
1737 \else\let\nextsp\skipspaces
1738 \addtokens{\filename}{\PP}%
1739 \advance\filenamelength by 1
1741 \nextsp}
1742 \def\getfilename#1{%
1743 \filenamelength=0
1744 % If we don't expand the argument now, \skipspaces will get
1745 % snagged on things like "@value{foo}".
1746 \edef\temp{#1}%
1747 \expandafter\skipspaces\temp|\relax
1749 % make a live url in pdf output.
1750 \def\pdfurl#1{%
1751 \begingroup
1752 % it seems we really need yet another set of dummies; have not
1753 % tried to figure out what each command should do in the context
1754 % of @url. for now, just make @/ a no-op, that's the only one
1755 % people have actually reported a problem with.
1757 \normalturnoffactive
1758 \def\@{@}%
1759 \let\/=\empty
1760 \makevalueexpandable
1761 % do we want to go so far as to use \indexnofonts instead of just
1762 % special-casing \var here?
1763 \def\var##1{##1}%
1765 \leavevmode\setcolor{\urlcolor}%
1766 \special{pdf:bann << /Border [0 0 0]
1767 /Subtype /Link /A << /S /URI /URI (#1) >> >>}%
1768 \endgroup}
1769 \def\endlink{\setcolor{\maincolor}\special{pdf:eann}}
1770 \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
1771 \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
1772 \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
1773 \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
1774 \def\maketoks{%
1775 \expandafter\poptoks\the\toksA|ENDTOKS|\relax
1776 \ifx\first0\adn0
1777 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
1778 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
1779 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
1780 \else
1781 \ifnum0=\countA\else\makelink\fi
1782 \ifx\first.\let\next=\done\else
1783 \let\next=\maketoks
1784 \addtokens{\toksB}{\the\toksD}
1785 \ifx\first,\addtokens{\toksB}{\space}\fi
1787 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
1788 \next}
1789 \def\makelink{\addtokens{\toksB}%
1790 {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
1791 \def\pdflink#1{\pdflinkpage{#1}{#1}}%
1792 \def\pdflinkpage#1#2{%
1793 \special{pdf:bann << /Border [0 0 0]
1794 /Type /Annot /Subtype /Link /A << /S /GoTo /D (#1) >> >>}%
1795 \setcolor{\linkcolor}#2\endlink}
1796 \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
1799 % @image support
1801 % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
1802 \def\doxeteximage#1#2#3{%
1803 \def\xeteximagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
1804 \def\xeteximageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
1806 % XeTeX (and the PDF format) supports .pdf, .png, .jpg (among
1807 % others). Let's try in that order, PDF first since if
1808 % someone has a scalable image, presumably better to use that than a
1809 % bitmap.
1810 \let\xeteximgext=\empty
1811 \begingroup
1812 \openin 1 #1.pdf \ifeof 1
1813 \openin 1 #1.PDF \ifeof 1
1814 \openin 1 #1.png \ifeof 1
1815 \openin 1 #1.jpg \ifeof 1
1816 \openin 1 #1.jpeg \ifeof 1
1817 \openin 1 #1.JPG \ifeof 1
1818 \errmessage{Could not find image file #1 for XeTeX}%
1819 \else \gdef\xeteximgext{JPG}%
1821 \else \gdef\xeteximgext{jpeg}%
1823 \else \gdef\xeteximgext{jpg}%
1825 \else \gdef\xeteximgext{png}%
1827 \else \gdef\xeteximgext{PDF}%
1829 \else \gdef\xeteximgext{pdf}%
1831 \closein 1
1832 \endgroup
1834 % Putting an \hbox around the image can prevent an over-long line
1835 % after the image.
1836 \hbox\bgroup
1837 \def\xetexpdfext{pdf}%
1838 \ifx\xeteximgext\xetexpdfext
1839 \XeTeXpdffile "#1".\xeteximgext ""
1840 \else
1841 \def\xetexpdfext{PDF}%
1842 \ifx\xeteximgext\xetexpdfext
1843 \XeTeXpdffile "#1".\xeteximgext ""
1844 \else
1845 \XeTeXpicfile "#1".\xeteximgext ""
1848 \ifdim \wd0 >0pt width \xeteximagewidth \fi
1849 \ifdim \wd2 >0pt height \xeteximageheight \fi \relax
1850 \egroup
1856 \message{fonts,}
1858 % Set the baselineskip to #1, and the lineskip and strut size
1859 % correspondingly. There is no deep meaning behind these magic numbers
1860 % used as factors; they just match (closely enough) what Knuth defined.
1862 \def\lineskipfactor{.08333}
1863 \def\strutheightpercent{.70833}
1864 \def\strutdepthpercent {.29167}
1866 % can get a sort of poor man's double spacing by redefining this.
1867 \def\baselinefactor{1}
1869 \newdimen\textleading
1870 \def\setleading#1{%
1871 \dimen0 = #1\relax
1872 \normalbaselineskip = \baselinefactor\dimen0
1873 \normallineskip = \lineskipfactor\normalbaselineskip
1874 \normalbaselines
1875 \setbox\strutbox =\hbox{%
1876 \vrule width0pt height\strutheightpercent\baselineskip
1877 depth \strutdepthpercent \baselineskip
1881 % PDF CMaps. See also LaTeX's t1.cmap.
1883 % do nothing with this by default.
1884 \expandafter\let\csname cmapOT1\endcsname\gobble
1885 \expandafter\let\csname cmapOT1IT\endcsname\gobble
1886 \expandafter\let\csname cmapOT1TT\endcsname\gobble
1888 % if we are producing pdf, and we have \pdffontattr, then define cmaps.
1889 % (\pdffontattr was introduced many years ago, but people still run
1890 % older pdftex's; it's easy to conditionalize, so we do.)
1891 \ifpdf \ifx\pdffontattr\thisisundefined \else
1892 \begingroup
1893 \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
1894 \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
1895 %%DocumentNeededResources: ProcSet (CIDInit)
1896 %%IncludeResource: ProcSet (CIDInit)
1897 %%BeginResource: CMap (TeX-OT1-0)
1898 %%Title: (TeX-OT1-0 TeX OT1 0)
1899 %%Version: 1.000
1900 %%EndComments
1901 /CIDInit /ProcSet findresource begin
1902 12 dict begin
1903 begincmap
1904 /CIDSystemInfo
1905 << /Registry (TeX)
1906 /Ordering (OT1)
1907 /Supplement 0
1908 >> def
1909 /CMapName /TeX-OT1-0 def
1910 /CMapType 2 def
1911 1 begincodespacerange
1912 <00> <7F>
1913 endcodespacerange
1914 8 beginbfrange
1915 <00> <01> <0393>
1916 <09> <0A> <03A8>
1917 <23> <26> <0023>
1918 <28> <3B> <0028>
1919 <3F> <5B> <003F>
1920 <5D> <5E> <005D>
1921 <61> <7A> <0061>
1922 <7B> <7C> <2013>
1923 endbfrange
1924 40 beginbfchar
1925 <02> <0398>
1926 <03> <039B>
1927 <04> <039E>
1928 <05> <03A0>
1929 <06> <03A3>
1930 <07> <03D2>
1931 <08> <03A6>
1932 <0B> <00660066>
1933 <0C> <00660069>
1934 <0D> <0066006C>
1935 <0E> <006600660069>
1936 <0F> <00660066006C>
1937 <10> <0131>
1938 <11> <0237>
1939 <12> <0060>
1940 <13> <00B4>
1941 <14> <02C7>
1942 <15> <02D8>
1943 <16> <00AF>
1944 <17> <02DA>
1945 <18> <00B8>
1946 <19> <00DF>
1947 <1A> <00E6>
1948 <1B> <0153>
1949 <1C> <00F8>
1950 <1D> <00C6>
1951 <1E> <0152>
1952 <1F> <00D8>
1953 <21> <0021>
1954 <22> <201D>
1955 <27> <2019>
1956 <3C> <00A1>
1957 <3D> <003D>
1958 <3E> <00BF>
1959 <5C> <201C>
1960 <5F> <02D9>
1961 <60> <2018>
1962 <7D> <02DD>
1963 <7E> <007E>
1964 <7F> <00A8>
1965 endbfchar
1966 endcmap
1967 CMapName currentdict /CMap defineresource pop
1970 %%EndResource
1971 %%EOF
1972 }\endgroup
1973 \expandafter\edef\csname cmapOT1\endcsname#1{%
1974 \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
1977 % \cmapOT1IT
1978 \begingroup
1979 \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
1980 \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
1981 %%DocumentNeededResources: ProcSet (CIDInit)
1982 %%IncludeResource: ProcSet (CIDInit)
1983 %%BeginResource: CMap (TeX-OT1IT-0)
1984 %%Title: (TeX-OT1IT-0 TeX OT1IT 0)
1985 %%Version: 1.000
1986 %%EndComments
1987 /CIDInit /ProcSet findresource begin
1988 12 dict begin
1989 begincmap
1990 /CIDSystemInfo
1991 << /Registry (TeX)
1992 /Ordering (OT1IT)
1993 /Supplement 0
1994 >> def
1995 /CMapName /TeX-OT1IT-0 def
1996 /CMapType 2 def
1997 1 begincodespacerange
1998 <00> <7F>
1999 endcodespacerange
2000 8 beginbfrange
2001 <00> <01> <0393>
2002 <09> <0A> <03A8>
2003 <25> <26> <0025>
2004 <28> <3B> <0028>
2005 <3F> <5B> <003F>
2006 <5D> <5E> <005D>
2007 <61> <7A> <0061>
2008 <7B> <7C> <2013>
2009 endbfrange
2010 42 beginbfchar
2011 <02> <0398>
2012 <03> <039B>
2013 <04> <039E>
2014 <05> <03A0>
2015 <06> <03A3>
2016 <07> <03D2>
2017 <08> <03A6>
2018 <0B> <00660066>
2019 <0C> <00660069>
2020 <0D> <0066006C>
2021 <0E> <006600660069>
2022 <0F> <00660066006C>
2023 <10> <0131>
2024 <11> <0237>
2025 <12> <0060>
2026 <13> <00B4>
2027 <14> <02C7>
2028 <15> <02D8>
2029 <16> <00AF>
2030 <17> <02DA>
2031 <18> <00B8>
2032 <19> <00DF>
2033 <1A> <00E6>
2034 <1B> <0153>
2035 <1C> <00F8>
2036 <1D> <00C6>
2037 <1E> <0152>
2038 <1F> <00D8>
2039 <21> <0021>
2040 <22> <201D>
2041 <23> <0023>
2042 <24> <00A3>
2043 <27> <2019>
2044 <3C> <00A1>
2045 <3D> <003D>
2046 <3E> <00BF>
2047 <5C> <201C>
2048 <5F> <02D9>
2049 <60> <2018>
2050 <7D> <02DD>
2051 <7E> <007E>
2052 <7F> <00A8>
2053 endbfchar
2054 endcmap
2055 CMapName currentdict /CMap defineresource pop
2058 %%EndResource
2059 %%EOF
2060 }\endgroup
2061 \expandafter\edef\csname cmapOT1IT\endcsname#1{%
2062 \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
2065 % \cmapOT1TT
2066 \begingroup
2067 \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
2068 \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
2069 %%DocumentNeededResources: ProcSet (CIDInit)
2070 %%IncludeResource: ProcSet (CIDInit)
2071 %%BeginResource: CMap (TeX-OT1TT-0)
2072 %%Title: (TeX-OT1TT-0 TeX OT1TT 0)
2073 %%Version: 1.000
2074 %%EndComments
2075 /CIDInit /ProcSet findresource begin
2076 12 dict begin
2077 begincmap
2078 /CIDSystemInfo
2079 << /Registry (TeX)
2080 /Ordering (OT1TT)
2081 /Supplement 0
2082 >> def
2083 /CMapName /TeX-OT1TT-0 def
2084 /CMapType 2 def
2085 1 begincodespacerange
2086 <00> <7F>
2087 endcodespacerange
2088 5 beginbfrange
2089 <00> <01> <0393>
2090 <09> <0A> <03A8>
2091 <21> <26> <0021>
2092 <28> <5F> <0028>
2093 <61> <7E> <0061>
2094 endbfrange
2095 32 beginbfchar
2096 <02> <0398>
2097 <03> <039B>
2098 <04> <039E>
2099 <05> <03A0>
2100 <06> <03A3>
2101 <07> <03D2>
2102 <08> <03A6>
2103 <0B> <2191>
2104 <0C> <2193>
2105 <0D> <0027>
2106 <0E> <00A1>
2107 <0F> <00BF>
2108 <10> <0131>
2109 <11> <0237>
2110 <12> <0060>
2111 <13> <00B4>
2112 <14> <02C7>
2113 <15> <02D8>
2114 <16> <00AF>
2115 <17> <02DA>
2116 <18> <00B8>
2117 <19> <00DF>
2118 <1A> <00E6>
2119 <1B> <0153>
2120 <1C> <00F8>
2121 <1D> <00C6>
2122 <1E> <0152>
2123 <1F> <00D8>
2124 <20> <2423>
2125 <27> <2019>
2126 <60> <2018>
2127 <7F> <00A8>
2128 endbfchar
2129 endcmap
2130 CMapName currentdict /CMap defineresource pop
2133 %%EndResource
2134 %%EOF
2135 }\endgroup
2136 \expandafter\edef\csname cmapOT1TT\endcsname#1{%
2137 \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
2139 \fi\fi
2141 % This is what gets called when #5 of \setfont is empty.
2142 \let\cmap\gobble
2144 % (end of cmaps)
2147 % Set the font macro #1 to the font named \fontprefix#2.
2148 % #3 is the font's design size, #4 is a scale factor, #5 is the CMap
2149 % encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit).
2150 % Example:
2151 % #1 = \textrm
2152 % #2 = \rmshape
2153 % #3 = 10
2154 % #4 = \mainmagstep
2155 % #5 = OT1
2157 \def\setfont#1#2#3#4#5{%
2158 \font#1=\fontprefix#2#3 scaled #4
2159 \csname cmap#5\endcsname#1%
2160 \ifx#2\ttshape\hyphenchar#1=-1 \fi
2161 \ifx#2\ttbshape\hyphenchar#1=-1 \fi
2162 \ifx#2\ttslshape\hyphenchar#1=-1 \fi
2165 % Use cm as the default font prefix.
2166 % To specify the font prefix, you must define \fontprefix
2167 % before you read in texinfo.tex.
2168 \ifx\fontprefix\thisisundefined
2169 \def\fontprefix{cm}
2171 % Support font families that don't use the same naming scheme as CM.
2172 \def\rmshape{r}
2173 \def\rmbshape{bx} % where the normal face is bold
2174 \def\bfshape{b}
2175 \def\bxshape{bx}
2176 \def\ttshape{tt}
2177 \def\ttbshape{tt}
2178 \def\ttslshape{sltt}
2179 \def\itshape{ti}
2180 \def\itbshape{bxti}
2181 \def\slshape{sl}
2182 \def\slbshape{bxsl}
2183 \def\sfshape{ss}
2184 \def\sfbshape{ss}
2185 \def\scshape{csc}
2186 \def\scbshape{csc}
2188 % Definitions for a main text size of 11pt. (The default in Texinfo.)
2190 \def\definetextfontsizexi{%
2191 % Text fonts (11.2pt, magstep1).
2192 \def\textnominalsize{11pt}
2193 \edef\mainmagstep{\magstephalf}
2194 \setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
2195 \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
2196 \setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
2197 \setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
2198 \setfont\textsl\slshape{10}{\mainmagstep}{OT1}
2199 \setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
2200 \setfont\textsc\scshape{10}{\mainmagstep}{OT1}
2201 \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
2202 \font\texti=cmmi10 scaled \mainmagstep
2203 \font\textsy=cmsy10 scaled \mainmagstep
2204 \def\textecsize{1095}
2206 % A few fonts for @defun names and args.
2207 \setfont\defbf\bfshape{10}{\magstep1}{OT1}
2208 \setfont\deftt\ttshape{10}{\magstep1}{OT1TT}
2209 \setfont\defsl\slshape{10}{\magstep1}{OT1}
2210 \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT}
2211 \def\df{\let\ttfont=\deftt \let\bffont = \defbf
2212 \let\ttslfont=\defttsl \let\slfont=\defsl \bf}
2214 % Fonts for indices, footnotes, small examples (9pt).
2215 \def\smallnominalsize{9pt}
2216 \setfont\smallrm\rmshape{9}{1000}{OT1}
2217 \setfont\smalltt\ttshape{9}{1000}{OT1TT}
2218 \setfont\smallbf\bfshape{10}{900}{OT1}
2219 \setfont\smallit\itshape{9}{1000}{OT1IT}
2220 \setfont\smallsl\slshape{9}{1000}{OT1}
2221 \setfont\smallsf\sfshape{9}{1000}{OT1}
2222 \setfont\smallsc\scshape{10}{900}{OT1}
2223 \setfont\smallttsl\ttslshape{10}{900}{OT1TT}
2224 \font\smalli=cmmi9
2225 \font\smallsy=cmsy9
2226 \def\smallecsize{0900}
2228 % Fonts for small examples (8pt).
2229 \def\smallernominalsize{8pt}
2230 \setfont\smallerrm\rmshape{8}{1000}{OT1}
2231 \setfont\smallertt\ttshape{8}{1000}{OT1TT}
2232 \setfont\smallerbf\bfshape{10}{800}{OT1}
2233 \setfont\smallerit\itshape{8}{1000}{OT1IT}
2234 \setfont\smallersl\slshape{8}{1000}{OT1}
2235 \setfont\smallersf\sfshape{8}{1000}{OT1}
2236 \setfont\smallersc\scshape{10}{800}{OT1}
2237 \setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
2238 \font\smalleri=cmmi8
2239 \font\smallersy=cmsy8
2240 \def\smallerecsize{0800}
2242 % Fonts for math mode superscripts (7pt).
2243 \def\sevennominalsize{7pt}
2244 \setfont\sevenrm\rmshape{7}{1000}{OT1}
2245 \setfont\seventt\ttshape{10}{700}{OT1TT}
2246 \setfont\sevenbf\bfshape{10}{700}{OT1}
2247 \setfont\sevenit\itshape{7}{1000}{OT1IT}
2248 \setfont\sevensl\slshape{10}{700}{OT1}
2249 \setfont\sevensf\sfshape{10}{700}{OT1}
2250 \setfont\sevensc\scshape{10}{700}{OT1}
2251 \setfont\seventtsl\ttslshape{10}{700}{OT1TT}
2252 \font\seveni=cmmi7
2253 \font\sevensy=cmsy7
2254 \def\sevenecsize{0700}
2256 % Fonts for title page (20.4pt):
2257 \def\titlenominalsize{20pt}
2258 \setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
2259 \setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
2260 \setfont\titlesl\slbshape{10}{\magstep4}{OT1}
2261 \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
2262 \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
2263 \setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
2264 \let\titlebf=\titlerm
2265 \setfont\titlesc\scbshape{10}{\magstep4}{OT1}
2266 \font\titlei=cmmi12 scaled \magstep3
2267 \font\titlesy=cmsy10 scaled \magstep4
2268 \def\titleecsize{2074}
2270 % Chapter (and unnumbered) fonts (17.28pt).
2271 \def\chapnominalsize{17pt}
2272 \setfont\chaprm\rmbshape{12}{\magstep2}{OT1}
2273 \setfont\chapit\itbshape{10}{\magstep3}{OT1IT}
2274 \setfont\chapsl\slbshape{10}{\magstep3}{OT1}
2275 \setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT}
2276 \setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT}
2277 \setfont\chapsf\sfbshape{17}{1000}{OT1}
2278 \let\chapbf=\chaprm
2279 \setfont\chapsc\scbshape{10}{\magstep3}{OT1}
2280 \font\chapi=cmmi12 scaled \magstep2
2281 \font\chapsy=cmsy10 scaled \magstep3
2282 \def\chapecsize{1728}
2284 % Section fonts (14.4pt).
2285 \def\secnominalsize{14pt}
2286 \setfont\secrm\rmbshape{12}{\magstep1}{OT1}
2287 \setfont\secrmnotbold\rmshape{12}{\magstep1}{OT1}
2288 \setfont\secit\itbshape{10}{\magstep2}{OT1IT}
2289 \setfont\secsl\slbshape{10}{\magstep2}{OT1}
2290 \setfont\sectt\ttbshape{12}{\magstep1}{OT1TT}
2291 \setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT}
2292 \setfont\secsf\sfbshape{12}{\magstep1}{OT1}
2293 \let\secbf\secrm
2294 \setfont\secsc\scbshape{10}{\magstep2}{OT1}
2295 \font\seci=cmmi12 scaled \magstep1
2296 \font\secsy=cmsy10 scaled \magstep2
2297 \def\sececsize{1440}
2299 % Subsection fonts (13.15pt).
2300 \def\ssecnominalsize{13pt}
2301 \setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1}
2302 \setfont\ssecit\itbshape{10}{1315}{OT1IT}
2303 \setfont\ssecsl\slbshape{10}{1315}{OT1}
2304 \setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT}
2305 \setfont\ssecttsl\ttslshape{10}{1315}{OT1TT}
2306 \setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1}
2307 \let\ssecbf\ssecrm
2308 \setfont\ssecsc\scbshape{10}{1315}{OT1}
2309 \font\sseci=cmmi12 scaled \magstephalf
2310 \font\ssecsy=cmsy10 scaled 1315
2311 \def\ssececsize{1200}
2313 % Reduced fonts for @acronym in text (10pt).
2314 \def\reducednominalsize{10pt}
2315 \setfont\reducedrm\rmshape{10}{1000}{OT1}
2316 \setfont\reducedtt\ttshape{10}{1000}{OT1TT}
2317 \setfont\reducedbf\bfshape{10}{1000}{OT1}
2318 \setfont\reducedit\itshape{10}{1000}{OT1IT}
2319 \setfont\reducedsl\slshape{10}{1000}{OT1}
2320 \setfont\reducedsf\sfshape{10}{1000}{OT1}
2321 \setfont\reducedsc\scshape{10}{1000}{OT1}
2322 \setfont\reducedttsl\ttslshape{10}{1000}{OT1TT}
2323 \font\reducedi=cmmi10
2324 \font\reducedsy=cmsy10
2325 \def\reducedecsize{1000}
2327 \textleading = 13.2pt % line spacing for 11pt CM
2328 \textfonts % reset the current fonts
2330 } % end of 11pt text font size definitions, \definetextfontsizexi
2333 % Definitions to make the main text be 10pt Computer Modern, with
2334 % section, chapter, etc., sizes following suit. This is for the GNU
2335 % Press printing of the Emacs 22 manual. Maybe other manuals in the
2336 % future. Used with @smallbook, which sets the leading to 12pt.
2338 \def\definetextfontsizex{%
2339 % Text fonts (10pt).
2340 \def\textnominalsize{10pt}
2341 \edef\mainmagstep{1000}
2342 \setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
2343 \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
2344 \setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
2345 \setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
2346 \setfont\textsl\slshape{10}{\mainmagstep}{OT1}
2347 \setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
2348 \setfont\textsc\scshape{10}{\mainmagstep}{OT1}
2349 \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
2350 \font\texti=cmmi10 scaled \mainmagstep
2351 \font\textsy=cmsy10 scaled \mainmagstep
2352 \def\textecsize{1000}
2354 % A few fonts for @defun names and args.
2355 \setfont\defbf\bfshape{10}{\magstephalf}{OT1}
2356 \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT}
2357 \setfont\defsl\slshape{10}{\magstephalf}{OT1}
2358 \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT}
2359 \def\df{\let\ttfont=\deftt \let\bffont = \defbf
2360 \let\slfont=\defsl \let\ttslfont=\defttsl \bf}
2362 % Fonts for indices, footnotes, small examples (9pt).
2363 \def\smallnominalsize{9pt}
2364 \setfont\smallrm\rmshape{9}{1000}{OT1}
2365 \setfont\smalltt\ttshape{9}{1000}{OT1TT}
2366 \setfont\smallbf\bfshape{10}{900}{OT1}
2367 \setfont\smallit\itshape{9}{1000}{OT1IT}
2368 \setfont\smallsl\slshape{9}{1000}{OT1}
2369 \setfont\smallsf\sfshape{9}{1000}{OT1}
2370 \setfont\smallsc\scshape{10}{900}{OT1}
2371 \setfont\smallttsl\ttslshape{10}{900}{OT1TT}
2372 \font\smalli=cmmi9
2373 \font\smallsy=cmsy9
2374 \def\smallecsize{0900}
2376 % Fonts for small examples (8pt).
2377 \def\smallernominalsize{8pt}
2378 \setfont\smallerrm\rmshape{8}{1000}{OT1}
2379 \setfont\smallertt\ttshape{8}{1000}{OT1TT}
2380 \setfont\smallerbf\bfshape{10}{800}{OT1}
2381 \setfont\smallerit\itshape{8}{1000}{OT1IT}
2382 \setfont\smallersl\slshape{8}{1000}{OT1}
2383 \setfont\smallersf\sfshape{8}{1000}{OT1}
2384 \setfont\smallersc\scshape{10}{800}{OT1}
2385 \setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
2386 \font\smalleri=cmmi8
2387 \font\smallersy=cmsy8
2388 \def\smallerecsize{0800}
2390 % Fonts for math mode superscripts (7pt).
2391 \def\sevennominalsize{7pt}
2392 \setfont\sevenrm\rmshape{7}{1000}{OT1}
2393 \setfont\seventt\ttshape{10}{700}{OT1TT}
2394 \setfont\sevenbf\bfshape{10}{700}{OT1}
2395 \setfont\sevenit\itshape{7}{1000}{OT1IT}
2396 \setfont\sevensl\slshape{10}{700}{OT1}
2397 \setfont\sevensf\sfshape{10}{700}{OT1}
2398 \setfont\sevensc\scshape{10}{700}{OT1}
2399 \setfont\seventtsl\ttslshape{10}{700}{OT1TT}
2400 \font\seveni=cmmi7
2401 \font\sevensy=cmsy7
2402 \def\sevenecsize{0700}
2404 % Fonts for title page (20.4pt):
2405 \def\titlenominalsize{20pt}
2406 \setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
2407 \setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
2408 \setfont\titlesl\slbshape{10}{\magstep4}{OT1}
2409 \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
2410 \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
2411 \setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
2412 \let\titlebf=\titlerm
2413 \setfont\titlesc\scbshape{10}{\magstep4}{OT1}
2414 \font\titlei=cmmi12 scaled \magstep3
2415 \font\titlesy=cmsy10 scaled \magstep4
2416 \def\titleecsize{2074}
2418 % Chapter fonts (14.4pt).
2419 \def\chapnominalsize{14pt}
2420 \setfont\chaprm\rmbshape{12}{\magstep1}{OT1}
2421 \setfont\chapit\itbshape{10}{\magstep2}{OT1IT}
2422 \setfont\chapsl\slbshape{10}{\magstep2}{OT1}
2423 \setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT}
2424 \setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT}
2425 \setfont\chapsf\sfbshape{12}{\magstep1}{OT1}
2426 \let\chapbf\chaprm
2427 \setfont\chapsc\scbshape{10}{\magstep2}{OT1}
2428 \font\chapi=cmmi12 scaled \magstep1
2429 \font\chapsy=cmsy10 scaled \magstep2
2430 \def\chapecsize{1440}
2432 % Section fonts (12pt).
2433 \def\secnominalsize{12pt}
2434 \setfont\secrm\rmbshape{12}{1000}{OT1}
2435 \setfont\secit\itbshape{10}{\magstep1}{OT1IT}
2436 \setfont\secsl\slbshape{10}{\magstep1}{OT1}
2437 \setfont\sectt\ttbshape{12}{1000}{OT1TT}
2438 \setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT}
2439 \setfont\secsf\sfbshape{12}{1000}{OT1}
2440 \let\secbf\secrm
2441 \setfont\secsc\scbshape{10}{\magstep1}{OT1}
2442 \font\seci=cmmi12
2443 \font\secsy=cmsy10 scaled \magstep1
2444 \def\sececsize{1200}
2446 % Subsection fonts (10pt).
2447 \def\ssecnominalsize{10pt}
2448 \setfont\ssecrm\rmbshape{10}{1000}{OT1}
2449 \setfont\ssecit\itbshape{10}{1000}{OT1IT}
2450 \setfont\ssecsl\slbshape{10}{1000}{OT1}
2451 \setfont\ssectt\ttbshape{10}{1000}{OT1TT}
2452 \setfont\ssecttsl\ttslshape{10}{1000}{OT1TT}
2453 \setfont\ssecsf\sfbshape{10}{1000}{OT1}
2454 \let\ssecbf\ssecrm
2455 \setfont\ssecsc\scbshape{10}{1000}{OT1}
2456 \font\sseci=cmmi10
2457 \font\ssecsy=cmsy10
2458 \def\ssececsize{1000}
2460 % Reduced fonts for @acronym in text (9pt).
2461 \def\reducednominalsize{9pt}
2462 \setfont\reducedrm\rmshape{9}{1000}{OT1}
2463 \setfont\reducedtt\ttshape{9}{1000}{OT1TT}
2464 \setfont\reducedbf\bfshape{10}{900}{OT1}
2465 \setfont\reducedit\itshape{9}{1000}{OT1IT}
2466 \setfont\reducedsl\slshape{9}{1000}{OT1}
2467 \setfont\reducedsf\sfshape{9}{1000}{OT1}
2468 \setfont\reducedsc\scshape{10}{900}{OT1}
2469 \setfont\reducedttsl\ttslshape{10}{900}{OT1TT}
2470 \font\reducedi=cmmi9
2471 \font\reducedsy=cmsy9
2472 \def\reducedecsize{0900}
2474 \divide\parskip by 2 % reduce space between paragraphs
2475 \textleading = 12pt % line spacing for 10pt CM
2476 \textfonts % reset the current fonts
2478 } % end of 10pt text font size definitions, \definetextfontsizex
2480 % Fonts for short table of contents.
2481 \setfont\shortcontrm\rmshape{12}{1000}{OT1}
2482 \setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12
2483 \setfont\shortcontsl\slshape{12}{1000}{OT1}
2484 \setfont\shortconttt\ttshape{12}{1000}{OT1TT}
2487 % We provide the user-level command
2488 % @fonttextsize 10
2489 % (or 11) to redefine the text font size. pt is assumed.
2491 \def\xiword{11}
2492 \def\xword{10}
2493 \def\xwordpt{10pt}
2495 \parseargdef\fonttextsize{%
2496 \def\textsizearg{#1}%
2497 %\wlog{doing @fonttextsize \textsizearg}%
2499 % Set \globaldefs so that documents can use this inside @tex, since
2500 % makeinfo 4.8 does not support it, but we need it nonetheless.
2502 \begingroup \globaldefs=1
2503 \ifx\textsizearg\xword \definetextfontsizex
2504 \else \ifx\textsizearg\xiword \definetextfontsizexi
2505 \else
2506 \errhelp=\EMsimple
2507 \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'}
2508 \fi\fi
2509 \endgroup
2513 % Change the current font style to #1, remembering it in \curfontstyle.
2514 % For now, we do not accumulate font styles: @b{@i{foo}} prints foo in
2515 % italics, not bold italics.
2517 \def\setfontstyle#1{%
2518 \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd.
2519 \csname #1font\endcsname % change the current font
2522 \def\rm{\fam=0 \setfontstyle{rm}}
2523 \def\it{\fam=\itfam \setfontstyle{it}}
2524 \def\sl{\fam=\slfam \setfontstyle{sl}}
2525 \def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
2526 \def\tt{\fam=\ttfam \setfontstyle{tt}}
2528 % Texinfo sort of supports the sans serif font style, which plain TeX does not.
2529 % So we set up a \sf.
2530 \newfam\sffam
2531 \def\sf{\fam=\sffam \setfontstyle{sf}}
2533 % We don't need math for this font style.
2534 \def\ttsl{\setfontstyle{ttsl}}
2537 % In order for the font changes to affect most math symbols and letters,
2538 % we have to define the \textfont of the standard families.
2539 % We don't bother to reset \scriptscriptfont; awaiting user need.
2541 \def\resetmathfonts{%
2542 \textfont0=\rmfont \textfont1=\ifont \textfont2=\syfont
2543 \textfont\itfam=\itfont \textfont\slfam=\slfont \textfont\bffam=\bffont
2544 \textfont\ttfam=\ttfont \textfont\sffam=\sffont
2546 % Fonts for superscript. Note that the 7pt fonts are used regardless
2547 % of the current font size.
2548 \scriptfont0=\sevenrm \scriptfont1=\seveni \scriptfont2=\sevensy
2549 \scriptfont\itfam=\sevenit \scriptfont\slfam=\sevensl
2550 \scriptfont\bffam=\sevenbf \scriptfont\ttfam=\seventt
2551 \scriptfont\sffam=\sevensf
2556 % \defineassignfonts{SIZE} -
2557 % Define sequence \assignfontsSIZE, which switches between font sizes
2558 % by redefining the meanings of \STYLEfont. (Just \STYLE additionally sets
2559 % the current \fam for math mode.)
2561 \def\defineassignfonts#1{%
2562 \expandafter\edef\csname assignfonts#1\endcsname{%
2563 \let\noexpand\rmfont\csname #1rm\endcsname
2564 \let\noexpand\itfont\csname #1it\endcsname
2565 \let\noexpand\slfont\csname #1sl\endcsname
2566 \let\noexpand\bffont\csname #1bf\endcsname
2567 \let\noexpand\ttfont\csname #1tt\endcsname
2568 \let\noexpand\smallcaps\csname #1sc\endcsname
2569 \let\noexpand\sffont \csname #1sf\endcsname
2570 \let\noexpand\ifont \csname #1i\endcsname
2571 \let\noexpand\syfont \csname #1sy\endcsname
2572 \let\noexpand\ttslfont\csname #1ttsl\endcsname
2576 \def\assignfonts#1{%
2577 \csname assignfonts#1\endcsname
2580 \newif\ifrmisbold
2582 % Select smaller font size with the current style. Used to change font size
2583 % in, e.g., the LaTeX logo and acronyms. If we are using bold fonts for
2584 % normal roman text, also use bold fonts for roman text in the smaller size.
2585 \def\switchtolllsize{%
2586 \expandafter\assignfonts\expandafter{\lllsize}%
2587 \ifrmisbold
2588 \let\rmfont\bffont
2590 \csname\curfontstyle\endcsname
2593 \def\switchtolsize{%
2594 \expandafter\assignfonts\expandafter{\lsize}%
2595 \ifrmisbold
2596 \let\rmfont\bffont
2598 \csname\curfontstyle\endcsname
2601 % Define the font-changing commands (all called \...fonts).
2602 % Each font-changing command also sets the names \lsize (one size lower)
2603 % and \lllsize (three sizes lower). These relative commands are used
2604 % in, e.g., the LaTeX logo and acronyms.
2606 % Note: The fonts used for \ifont are for "math italics" (\itfont is for
2607 % italics in regular text). \syfont is also used in math mode only.
2609 \def\definefontsetatsize#1#2#3#4#5{%
2610 \defineassignfonts{#1}%
2611 \expandafter\def\csname #1fonts\endcsname{%
2612 \def\curfontsize{#1}%
2613 \def\lsize{#2}\def\lllsize{#3}%
2614 \csname rmisbold#5\endcsname
2615 \csname assignfonts#1\endcsname
2616 \resetmathfonts
2617 \setleading{#4}%
2620 \definefontsetatsize{text} {reduced}{smaller}{\textleading}{false}
2621 \definefontsetatsize{title} {chap} {subsec} {27pt} {true}
2622 \definefontsetatsize{chap} {sec} {text} {19pt} {true}
2623 \definefontsetatsize{sec} {subsec} {reduced}{17pt} {true}
2624 \definefontsetatsize{ssec} {text} {small} {15pt} {true}
2625 \definefontsetatsize{reduced}{small} {smaller}{10.5pt}{false}
2626 \definefontsetatsize{small} {smaller}{smaller}{10.5pt}{false}
2627 \definefontsetatsize{smaller}{smaller}{smaller}{9.5pt} {false}
2629 \def\titlefont#1{{\titlefonts\rm #1}}
2630 \let\subsecfonts = \ssecfonts
2631 \let\subsubsecfonts = \ssecfonts
2633 % Define these just so they can be easily changed for other fonts.
2634 \def\angleleft{$\langle$}
2635 \def\angleright{$\rangle$}
2637 % Set the fonts to use with the @small... environments.
2638 \let\smallexamplefonts = \smallfonts
2640 % About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample
2641 % can fit this many characters:
2642 % 8.5x11=86 smallbook=72 a4=90 a5=69
2643 % If we use \scriptfonts (8pt), then we can fit this many characters:
2644 % 8.5x11=90+ smallbook=80 a4=90+ a5=77
2645 % For me, subjectively, the few extra characters that fit aren't worth
2646 % the additional smallness of 8pt. So I'm making the default 9pt.
2648 % By the way, for comparison, here's what fits with @example (10pt):
2649 % 8.5x11=71 smallbook=60 a4=75 a5=58
2650 % --karl, 24jan03.
2652 % Set up the default fonts, so we can use them for creating boxes.
2654 \definetextfontsizexi
2657 % Check if we are currently using a typewriter font. Since all the
2658 % Computer Modern typewriter fonts have zero interword stretch (and
2659 % shrink), and it is reasonable to expect all typewriter fonts to have
2660 % this property, we can check that font parameter. #1 is what to
2661 % print if we are indeed using \tt; #2 is what to print otherwise.
2662 \def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi}
2664 % Same as above, but check for italic font. Actually this also catches
2665 % non-italic slanted fonts since it is impossible to distinguish them from
2666 % italic fonts. But since this is only used by $ and it uses \sl anyway
2667 % this is not a problem.
2668 \def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
2671 % Check if internal flag is clear, i.e. has not been @set.
2672 \def\ifflagclear#1#2#3{%
2673 \expandafter\ifx\csname SET#1\endcsname\relax
2674 #2\else#3\fi
2678 \catcode`\'=\active
2679 \catcode`\`=\active
2681 \gdef\setcodequotes{\let`\codequoteleft \let'\codequoteright}
2682 \gdef\setregularquotes{\let`\lq \let'\rq}
2684 \setregularquotes
2686 % output for ' in @code
2687 % in tt font hex 0D (undirected) or 27 (curly right quote)
2689 \def\codequoteright{%
2690 \ifusingtt
2691 {\ifflagclear{txicodequoteundirected}%
2692 {\ifflagclear{codequoteundirected}%
2693 {'}%
2694 {\char"0D }}%
2695 {\char"0D }}%
2696 {'}%
2699 % output for ` in @code
2700 % in tt font hex 12 (grave accent) or 60 (curly left quote)
2701 % \relax disables Spanish ligatures ?` and !` of \tt font.
2703 \def\codequoteleft{%
2704 \ifusingtt
2705 {\ifflagclear{txicodequotebacktick}%
2706 {\ifflagclear{codequotebacktick}%
2707 {\relax`}%
2708 {\char"12 }}%
2709 {\char"12 }}%
2710 {\relax`}%
2713 % Commands to set the quote options.
2715 \parseargdef\codequoteundirected{%
2716 \def\temp{#1}%
2717 \ifx\temp\onword
2718 \expandafter\let\csname SETtxicodequoteundirected\endcsname
2719 = t%
2720 \else\ifx\temp\offword
2721 \expandafter\let\csname SETtxicodequoteundirected\endcsname
2722 = \relax
2723 \else
2724 \errhelp = \EMsimple
2725 \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}%
2726 \fi\fi
2729 \parseargdef\codequotebacktick{%
2730 \def\temp{#1}%
2731 \ifx\temp\onword
2732 \expandafter\let\csname SETtxicodequotebacktick\endcsname
2733 = t%
2734 \else\ifx\temp\offword
2735 \expandafter\let\csname SETtxicodequotebacktick\endcsname
2736 = \relax
2737 \else
2738 \errhelp = \EMsimple
2739 \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}%
2740 \fi\fi
2743 % Turn them on by default
2744 \let\SETtxicodequoteundirected = t
2745 \let\SETtxicodequotebacktick = t
2748 % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
2749 \def\noligaturesquoteleft{\relax\lq}
2751 % Count depth in font-changes, for error checks
2752 \newcount\fontdepth \fontdepth=0
2754 % Font commands.
2756 % #1 is the font command (\sl or \it), #2 is the text to slant.
2757 % If we are in a monospaced environment, however, 1) always use \ttsl,
2758 % and 2) do not add an italic correction.
2759 \def\dosmartslant#1#2{%
2760 \ifusingtt
2761 {{\ttsl #2}\let\next=\relax}%
2762 {\def\next{{#1#2}\smartitaliccorrection}}%
2763 \next
2765 \def\smartslanted{\dosmartslant\sl}
2766 \def\smartitalic{\dosmartslant\it}
2768 % Output an italic correction unless the following character is such as
2769 % not to need one.
2770 \def\smartitaliccorrection{\futurelet\next\smartitaliccorrectionx}
2771 \def\smartitaliccorrectionx{%
2772 \ifx\next,%
2773 \else\ifx\next-%
2774 \else\ifx\next.%
2775 \else\ifx\next\.%
2776 \else\ifx\next\comma%
2777 \else\ptexslash
2778 \fi\fi\fi\fi\fi
2779 \aftersmartic
2782 % @cite unconditionally uses \sl with \smartitaliccorrection.
2783 \def\cite#1{{\sl #1}\smartitaliccorrection}
2785 % @var unconditionally uses \sl. This gives consistency for
2786 % parameter names whether they are in @def, @table @code or a
2787 % regular paragraph.
2788 % To get ttsl font for @var when used in code context, @set txicodevaristt.
2789 % The \null is to reset \spacefactor.
2790 \def\aftersmartic{}
2791 \def\var#1{%
2792 \let\saveaftersmartic = \aftersmartic
2793 \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}%
2795 \ifflagclear{txicodevaristt}%
2796 {\def\varnext{{{\sl #1}}\smartitaliccorrection}}%
2797 {\def\varnext{\smartslanted{#1}}}%
2798 \varnext
2801 % To be removed after next release
2802 \def\SETtxicodevaristt{}% @set txicodevaristt
2804 \let\i=\smartitalic
2805 \let\slanted=\smartslanted
2806 \let\dfn=\smartslanted
2807 \let\emph=\smartitalic
2809 % @r for roman font, used for code comment
2810 \def\r#1{{%
2811 \usenormaldash % get --, --- ligatures even if in @code
2812 \defcharsdefault % in case on def line
2813 \rm #1}}
2814 {\catcode`-=\active \gdef\usenormaldash{\let-\normaldash}}
2816 % @sc, undocumented @ii.
2817 \def\sc#1{{\smallcaps#1}} % smallcaps font
2818 \def\ii#1{{\it #1}} % italic font
2820 % @b, explicit bold. Also @strong.
2821 \def\b#1{{\bf #1}}
2822 \let\strong=\b
2824 % @sansserif, explicit sans.
2825 \def\sansserif#1{{\sf #1}}
2827 \newif\iffrenchspacing
2828 \frenchspacingfalse
2830 % Set sfcode to normal for the chars that usually have another value.
2831 % Can't use plain's \frenchspacing because it uses the `\x notation, and
2832 % sometimes \x has an active definition that messes things up.
2834 \catcode`@=11
2835 \def\plainfrenchspacing{%
2836 \iffrenchspacing\else
2837 \frenchspacingtrue
2838 \sfcode`\.=\@m \sfcode`\?=\@m \sfcode`\!=\@m
2839 \sfcode`\:=\@m \sfcode`\;=\@m \sfcode`\,=\@m
2840 \def\endofsentencespacefactor{1000}% for @. and friends
2843 \def\plainnonfrenchspacing{%
2844 \iffrenchspacing
2845 \frenchspacingfalse
2846 \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
2847 \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
2848 \def\endofsentencespacefactor{3000}% for @. and friends
2851 \catcode`@=\other
2852 \def\endofsentencespacefactor{3000}% default
2854 % @frenchspacing on|off says whether to put extra space after punctuation.
2856 \def\onword{on}
2857 \def\offword{off}
2859 \let\frenchspacingsetting\plainnonfrenchspacing % used in output routine
2860 \parseargdef\frenchspacing{%
2861 \def\temp{#1}%
2862 \ifx\temp\onword \let\frenchspacingsetting\plainfrenchspacing
2863 \else\ifx\temp\offword \let\frenchspacingsetting\plainnonfrenchspacing
2864 \else
2865 \errhelp = \EMsimple
2866 \errmessage{Unknown @frenchspacing option `\temp', must be on|off}%
2867 \fi\fi
2868 \frenchspacingsetting
2872 % @t, explicit typewriter.
2873 \def\t#1{%
2874 {\tt \defcharsdefault \plainfrenchspacing #1}%
2875 \null
2878 % @samp.
2879 \def\samp#1{{\setcodequotes\lq\tclose{#1}\rq\null}}
2881 % @indicateurl is \samp, that is, with quotes.
2882 \let\indicateurl=\samp
2884 % @code (and similar) prints in typewriter, but with spaces the same
2885 % size as normal in the surrounding text, without hyphenation, etc.
2886 % This is a subroutine for that.
2887 \def\tclose#1{%
2889 % Change normal interword space to be same as for the current font.
2890 \spaceskip = \fontdimen2\font
2892 % Switch to typewriter.
2895 % `\ ' produces the large typewriter interword space.
2896 \def\ {{\spaceskip = 0pt{} }}%
2898 \plainfrenchspacing
2901 \null % reset spacefactor to 1000
2904 % This is for LuaTeX: It is not sufficient to disable hyphenation at
2905 % explicit dashes by setting `\hyphenchar` to -1.
2906 \def\dashnobreak{%
2907 \normaldash
2908 \penalty 10000 }
2910 % We must turn on hyphenation at `-' and `_' in @code.
2911 % Otherwise, it is too hard to avoid overfull hboxes
2912 % in the Emacs manual, the Library manual, etc.
2913 % We explicitly allow hyphenation at these characters
2914 % using \discretionary.
2916 % Hyphenation at - and hyphenation within words was turned off
2917 % by default for the tt fonts using the \hyphenchar parameter of TeX.
2919 \catcode`\-=\active \catcode`\_=\active
2920 \catcode`\'=\active \catcode`\`=\active
2921 \global\let'=\rq \global\let`=\lq % default definitions
2923 \global\def\code{\begingroup
2924 \setcodequotes
2925 \catcode\dashChar=\active \catcode\underChar=\active
2926 \ifallowcodebreaks
2927 \let-\codedash
2928 \let_\codeunder
2929 \else
2930 \let-\dashnobreak
2931 \let_\realunder
2933 \codex
2936 \gdef\codedash{\futurelet\next\codedashfinish}
2937 \gdef\codedashfinish{%
2938 \normaldash % always output the dash character itself.
2940 % Now, output a discretionary to allow a line break, unless
2941 % (a) the next character is a -, or
2942 % (b) the preceding character is a -, or
2943 % (c) we are at the start of the string.
2944 % In both cases (b) and (c), \codedashnobreak should be set to \codedash.
2946 % E.g., given --posix, we do not want to allow a break after either -.
2947 % Given --foo-bar, we do want to allow a break between the - and the b.
2948 \ifx\next\codedash \else
2949 \ifx\codedashnobreak\codedash
2950 \else \discretionary{}{}{}\fi
2952 % we need the space after the = for the case when \next itself is a
2953 % space token; it would get swallowed otherwise. As in @code{- a}.
2954 \global\let\codedashnobreak= \next
2957 \def\normaldash{-}
2959 \def\codex #1{\tclose{%
2960 % Given -foo (with a single dash), we do not want to allow a break
2961 % after the -. \codedashnobreak is set to the first character in
2962 % @code.
2963 \futurelet\codedashnobreak\relax
2965 }\endgroup}
2967 \def\codeunder{%
2968 % this is all so @math{@code{var_name}+1} can work. In math mode, _
2969 % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
2970 % will therefore expand the active definition of _, which is us
2971 % (inside @code that is), therefore an endless loop.
2972 \ifusingtt{\ifmmode
2973 \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_.
2974 \else\normalunderscore \fi
2975 \discretionary{}{}{}}%
2976 {\_}%
2979 % An additional complication: the above will allow breaks after, e.g.,
2980 % each of the four underscores in __typeof__. This is bad.
2981 % @allowcodebreaks provides a document-level way to turn breaking at -
2982 % and _ on and off.
2984 \newif\ifallowcodebreaks \allowcodebreakstrue
2986 \def\keywordtrue{true}
2987 \def\keywordfalse{false}
2989 \parseargdef\allowcodebreaks{%
2990 \def\txiarg{#1}%
2991 \ifx\txiarg\keywordtrue
2992 \allowcodebreakstrue
2993 \else\ifx\txiarg\keywordfalse
2994 \allowcodebreaksfalse
2995 \else
2996 \errhelp = \EMsimple
2997 \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}%
2998 \fi\fi
3001 % For @command, @env, @file, @option quotes seem unnecessary,
3002 % so use \code rather than \samp.
3003 \let\command=\code
3004 \let\env=\code
3005 \let\file=\code
3006 \let\option=\code
3008 % @uref (abbreviation for `urlref') aka @url takes an optional
3009 % (comma-separated) second argument specifying the text to display and
3010 % an optional third arg as text to display instead of (rather than in
3011 % addition to) the url itself. First (mandatory) arg is the url.
3013 % TeX-only option to allow changing PDF output to show only the second
3014 % arg (if given), and not the url (which is then just the link target).
3015 \newif\ifurefurlonlylink
3017 % The default \pretolerance setting stops the penalty inserted in
3018 % \urefallowbreak being a discouragement to line breaking. Set it to
3019 % a negative value for this paragraph only. Hopefully this does not
3020 % conflict with redefinitions of \par done elsewhere.
3021 \def\nopretolerance{%
3022 \pretolerance=-1
3023 \def\par{\endgraf\pretolerance=100 \let\par\endgraf}%
3026 % The main macro is \urefbreak, which allows breaking at expected
3027 % places within the url.
3028 \def\urefbreak{\nopretolerance \begingroup \urefcatcodes \dourefbreak}
3029 \let\uref=\urefbreak
3031 \def\dourefbreak#1{\urefbreakfinish #1,,,\finish}
3032 \def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example
3033 \unsepspaces
3034 \pdfurl{#1}%
3035 \setbox0 = \hbox{\ignorespaces #3}%
3036 \ifdim\wd0 > 0pt
3037 \unhbox0 % third arg given, show only that
3038 \else
3039 \setbox0 = \hbox{\ignorespaces #2}% look for second arg
3040 \ifdim\wd0 > 0pt
3041 \ifpdf
3042 % For pdfTeX and LuaTeX
3043 \ifurefurlonlylink
3044 % PDF plus option to not display url, show just arg
3045 \unhbox0
3046 \else
3047 % PDF, normally display both arg and url for consistency,
3048 % visibility, if the pdf is eventually used to print, etc.
3049 \unhbox0\ (\urefcode{#1})%
3051 \else
3052 \ifx\XeTeXrevision\thisisundefined
3053 \unhbox0\ (\urefcode{#1})% DVI, always show arg and url
3054 \else
3055 % For XeTeX
3056 \ifurefurlonlylink
3057 % PDF plus option to not display url, show just arg
3058 \unhbox0
3059 \else
3060 % PDF, normally display both arg and url for consistency,
3061 % visibility, if the pdf is eventually used to print, etc.
3062 \unhbox0\ (\urefcode{#1})%
3066 \else
3067 \urefcode{#1}% only url given, so show it
3070 \endlink
3071 \endgroup}
3073 % Allow line breaks around only a few characters (only).
3074 \def\urefcatcodes{%
3075 \catcode`\&=\active \catcode`\.=\active
3076 \catcode`\#=\active \catcode`\?=\active
3077 \catcode`\/=\active
3080 \urefcatcodes
3082 \global\def\urefcode{\begingroup
3083 \setcodequotes
3084 \urefcatcodes
3085 \let&\urefcodeamp
3086 \let.\urefcodedot
3087 \let#\urefcodehash
3088 \let?\urefcodequest
3089 \let/\urefcodeslash
3090 \codex
3093 % By default, they are just regular characters.
3094 \global\def&{\normalamp}
3095 \global\def.{\normaldot}
3096 \global\def#{\normalhash}
3097 \global\def?{\normalquest}
3098 \global\def/{\normalslash}
3101 \def\urefcodeamp{\urefprebreak \&\urefpostbreak}
3102 \def\urefcodedot{\urefprebreak .\urefpostbreak}
3103 \def\urefcodehash{\urefprebreak \#\urefpostbreak}
3104 \def\urefcodequest{\urefprebreak ?\urefpostbreak}
3105 \def\urefcodeslash{\futurelet\next\urefcodeslashfinish}
3107 \catcode`\/=\active
3108 \global\def\urefcodeslashfinish{%
3109 \urefprebreak \slashChar
3110 % Allow line break only after the final / in a sequence of
3111 % slashes, to avoid line break between the slashes in http://.
3112 \ifx\next/\else \urefpostbreak \fi
3116 % By default we'll break after the special characters, but some people like to
3117 % break before the special chars, so allow that. Also allow no breaking at
3118 % all, for manual control.
3120 \parseargdef\urefbreakstyle{%
3121 \def\txiarg{#1}%
3122 \ifx\txiarg\wordnone
3123 \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak}
3124 \else\ifx\txiarg\wordbefore
3125 \def\urefprebreak{\urefallowbreak}\def\urefpostbreak{\nobreak}
3126 \else\ifx\txiarg\wordafter
3127 \def\urefprebreak{\nobreak}\def\urefpostbreak{\urefallowbreak}
3128 \else
3129 \errhelp = \EMsimple
3130 \errmessage{Unknown @urefbreakstyle setting `\txiarg'}%
3131 \fi\fi\fi
3133 \def\wordafter{after}
3134 \def\wordbefore{before}
3135 \def\wordnone{none}
3137 % Allow a ragged right output to aid breaking long URL's. There can
3138 % be a break at the \allowbreak with no extra glue (if the existing stretch in
3139 % the line is sufficient), a break at the \penalty with extra glue added
3140 % at the end of the line, or no break at all here.
3141 % Changing the value of the penalty and/or the amount of stretch affects how
3142 % preferable one choice is over the other.
3143 \def\urefallowbreak{%
3144 \penalty0\relax
3145 \hskip 0pt plus 2 em\relax
3146 \penalty1000\relax
3147 \hskip 0pt plus -2 em\relax
3150 \urefbreakstyle after
3152 % @url synonym for @uref, since that's how everyone uses it.
3154 \let\url=\uref
3156 % rms does not like angle brackets --karl, 17may97.
3157 % So now @email is just like @uref, unless we are pdf.
3159 %\def\email#1{\angleleft{\tt #1}\angleright}
3160 \ifpdforxetex
3161 \def\email#1{\doemail#1,,\finish}
3162 \def\doemail#1,#2,#3\finish{\begingroup
3163 \unsepspaces
3164 \pdfurl{mailto:#1}%
3165 \setbox0 = \hbox{\ignorespaces #2}%
3166 \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
3167 \endlink
3168 \endgroup}
3169 \else
3170 \let\email=\uref
3173 % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
3174 % `example' (@kbd uses ttsl only inside of @example and friends),
3175 % or `code' (@kbd uses normal tty font always).
3176 \parseargdef\kbdinputstyle{%
3177 \def\txiarg{#1}%
3178 \ifx\txiarg\worddistinct
3179 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
3180 \else\ifx\txiarg\wordexample
3181 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
3182 \else\ifx\txiarg\wordcode
3183 \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
3184 \else
3185 \errhelp = \EMsimple
3186 \errmessage{Unknown @kbdinputstyle setting `\txiarg'}%
3187 \fi\fi\fi
3189 \def\worddistinct{distinct}
3190 \def\wordexample{example}
3191 \def\wordcode{code}
3193 % Default is `distinct'.
3194 \kbdinputstyle distinct
3196 \def\kbd#1{%
3197 \tclose{\kbdfont\setcodequotes#1}%
3200 % definition of @key that produces a lozenge. Doesn't adjust to text size.
3201 %\setfont\keyrm\rmshape{8}{1000}{OT1}
3202 %\font\keysy=cmsy9
3203 %\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
3204 % \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
3205 % \vbox{\hrule\kern-0.4pt
3206 % \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
3207 % \kern-0.4pt\hrule}%
3208 % \kern-.06em\raise0.4pt\hbox{\angleright}}}}
3210 % definition of @key with no lozenge.
3212 \def\key#1{{\setregularquotes \tt #1}\null}
3214 % @clicksequence{File @click{} Open ...}
3215 \def\clicksequence#1{\begingroup #1\endgroup}
3217 % @clickstyle @arrow (by default)
3218 \parseargdef\clickstyle{\def\click{#1}}
3219 \def\click{\arrow}
3221 % Typeset a dimension, e.g., `in' or `pt'. The only reason for the
3222 % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
3224 \def\dmn#1{\thinspace #1}
3226 % @acronym for "FBI", "NATO", and the like.
3227 % We print this one point size smaller, since it's intended for
3228 % all-uppercase.
3230 \def\acronym#1{\doacronym #1,,\finish}
3231 \def\doacronym#1,#2,#3\finish{%
3232 {\switchtolsize #1}%
3233 \def\temp{#2}%
3234 \ifx\temp\empty \else
3235 \space ({\unsepspaces \ignorespaces \temp \unskip})%
3237 \null % reset \spacefactor=1000
3240 % @abbr for "Comput. J." and the like.
3241 % No font change, but don't do end-of-sentence spacing.
3243 \def\abbr#1{\doabbr #1,,\finish}
3244 \def\doabbr#1,#2,#3\finish{%
3245 {\plainfrenchspacing #1}%
3246 \def\temp{#2}%
3247 \ifx\temp\empty \else
3248 \space ({\unsepspaces \ignorespaces \temp \unskip})%
3250 \null % reset \spacefactor=1000
3253 % @asis just yields its argument. Used with @table, for example.
3255 \def\asis#1{#1}
3257 % @math outputs its argument in math mode.
3259 % One complication: _ usually means subscripts, but it could also mean
3260 % an actual _ character, as in @math{@var{some_variable} + 1}. So make
3261 % _ active, and distinguish by seeing if the current family is \slfam,
3262 % which is what @var uses.
3264 \catcode`\_ = \active
3265 \gdef\mathunderscore{%
3266 \catcode`\_=\active
3267 \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
3270 % Another complication: we want \\ (and @\) to output a math (or tt) \.
3271 % FYI, plain.tex uses \\ as a temporary control sequence (for no
3272 % particular reason), but this is not advertised and we don't care.
3274 % The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
3275 \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
3277 \def\math{%
3278 \ifmmode\else % only go into math if not in math mode already
3279 \tex
3280 \mathunderscore
3281 \let\\ = \mathbackslash
3282 \mathactive
3283 % make the texinfo accent commands work in math mode
3284 \let\"=\ddot
3285 \let\'=\acute
3286 \let\==\bar
3287 \let\^=\hat
3288 \let\`=\grave
3289 \let\u=\breve
3290 \let\v=\check
3291 \let\~=\tilde
3292 \let\dotaccent=\dot
3293 % have to provide another name for sup operator
3294 \let\mathopsup=\sup
3295 $\expandafter\finishmath\fi
3297 \def\finishmath#1{#1$\endgroup} % Close the group opened by \tex.
3299 % Some active characters (such as <) are spaced differently in math.
3300 % We have to reset their definitions in case the @math was an argument
3301 % to a command which sets the catcodes (such as @item or @section).
3304 \catcode`^ = \active
3305 \catcode`< = \active
3306 \catcode`> = \active
3307 \catcode`+ = \active
3308 \catcode`' = \active
3309 \gdef\mathactive{%
3310 \let^ = \ptexhat
3311 \let< = \ptexless
3312 \let> = \ptexgtr
3313 \let+ = \ptexplus
3314 \let' = \ptexquoteright
3318 % for @sub and @sup, if in math mode, just do a normal sub/superscript.
3319 % If in text, use math to place as sub/superscript, but switch
3320 % into text mode, with smaller fonts. This is a different font than the
3321 % one used for real math sub/superscripts (8pt vs. 7pt), but let's not
3322 % fix it (significant additions to font machinery) until someone notices.
3324 \def\sub{\ifmmode \expandafter\sb \else \expandafter\finishsub\fi}
3325 \def\finishsub#1{$\sb{\hbox{\switchtolllsize #1}}$}%
3327 \def\sup{\ifmmode \expandafter\ptexsp \else \expandafter\finishsup\fi}
3328 \def\finishsup#1{$\ptexsp{\hbox{\switchtolllsize #1}}$}%
3330 % provide this command from LaTeX as it is very common
3331 \def\frac#1#2{{{#1}\over{#2}}}
3333 % @displaymath.
3334 % \globaldefs is needed to recognize the end lines in \tex and
3335 % \end tex. Set \thisenv as @end displaymath is seen before @end tex.
3336 {\obeylines
3337 \globaldefs=1
3338 \envdef\displaymath{%
3339 \tex%
3340 \def\thisenv{\displaymath}%
3341 \begingroup\let\end\displaymathend%
3345 \def\displaymathend{$$\endgroup\end}%
3347 \def\Edisplaymath{%
3348 \def\thisenv{\tex}%
3349 \end tex
3353 % @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
3354 % Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
3355 % except specified as a normal braced arg, so no newlines to worry about.
3357 \def\outfmtnametex{tex}
3359 \long\def\inlinefmt#1{\doinlinefmt #1,\finish}
3360 \long\def\doinlinefmt#1,#2,\finish{%
3361 \def\inlinefmtname{#1}%
3362 \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi
3365 % @inlinefmtifelse{FMTNAME,THEN-TEXT,ELSE-TEXT} expands THEN-TEXT if
3366 % FMTNAME is tex, else ELSE-TEXT.
3367 \long\def\inlinefmtifelse#1{\doinlinefmtifelse #1,,,\finish}
3368 \long\def\doinlinefmtifelse#1,#2,#3,#4,\finish{%
3369 \def\inlinefmtname{#1}%
3370 \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\else \ignorespaces #3\fi
3373 % For raw, must switch into @tex before parsing the argument, to avoid
3374 % setting catcodes prematurely. Doing it this way means that, for
3375 % example, @inlineraw{html, foo{bar} gets a parse error instead of being
3376 % ignored. But this isn't important because if people want a literal
3377 % *right* brace they would have to use a command anyway, so they may as
3378 % well use a command to get a left brace too. We could re-use the
3379 % delimiter character idea from \verb, but it seems like overkill.
3381 \long\def\inlineraw{\tex \doinlineraw}
3382 \long\def\doinlineraw#1{\doinlinerawtwo #1,\finish}
3383 \def\doinlinerawtwo#1,#2,\finish{%
3384 \def\inlinerawname{#1}%
3385 \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi
3386 \endgroup % close group opened by \tex.
3389 % @inlineifset{VAR, TEXT} expands TEXT if VAR is @set.
3391 \long\def\inlineifset#1{\doinlineifset #1,\finish}
3392 \long\def\doinlineifset#1,#2,\finish{%
3393 \def\inlinevarname{#1}%
3394 \expandafter\ifx\csname SET\inlinevarname\endcsname\relax
3395 \else\ignorespaces#2\fi
3398 % @inlineifclear{VAR, TEXT} expands TEXT if VAR is not @set.
3400 \long\def\inlineifclear#1{\doinlineifclear #1,\finish}
3401 \long\def\doinlineifclear#1,#2,\finish{%
3402 \def\inlinevarname{#1}%
3403 \expandafter\ifx\csname SET\inlinevarname\endcsname\relax \ignorespaces#2\fi
3407 \message{glyphs,}
3408 % and logos.
3410 % @@ prints an @, as does @atchar{}.
3411 \def\@{\char64 }
3412 \let\atchar=\@
3414 % @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
3415 \def\lbracechar{{\ifusingtt{\char123}{\ensuremath\lbrace}}}
3416 \def\rbracechar{{\ifusingtt{\char125}{\ensuremath\rbrace}}}
3417 \let\{=\lbracechar
3418 \let\}=\rbracechar
3420 % @comma{} to avoid , parsing problems.
3421 \let\comma = ,
3423 % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
3424 % Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
3425 \let\, = \ptexc
3426 \let\dotaccent = \ptexdot
3427 \def\ringaccent#1{{\accent23 #1}}
3428 \let\tieaccent = \ptext
3429 \let\ubaraccent = \ptexb
3430 \let\udotaccent = \d
3432 % Other special characters: @questiondown @exclamdown @ordf @ordm
3433 % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
3434 \def\questiondown{?`}
3435 \def\exclamdown{!`}
3436 \def\ordf{\leavevmode\raise1ex\hbox{\switchtolllsize \underbar{a}}}
3437 \def\ordm{\leavevmode\raise1ex\hbox{\switchtolllsize \underbar{o}}}
3439 % Dotless i and dotless j, used for accents.
3440 \def\imacro{i}
3441 \def\jmacro{j}
3442 \def\dotless#1{%
3443 \def\temp{#1}%
3444 \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
3445 \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
3446 \else \errmessage{@dotless can be used only with i or j}%
3447 \fi\fi
3450 % The \TeX{} logo, as in plain, but resetting the spacing so that a
3451 % period following counts as ending a sentence. (Idea found in latex.)
3453 \edef\TeX{\TeX \spacefactor=1000 }
3455 % @LaTeX{} logo. Not quite the same results as the definition in
3456 % latex.ltx, since we use a different font for the raised A; it's most
3457 % convenient for us to use an explicitly smaller font, rather than using
3458 % the \scriptstyle font (since we don't reset \scriptstyle and
3459 % \scriptscriptstyle).
3461 \def\LaTeX{%
3462 L\kern-.36em
3463 {\setbox0=\hbox{T}%
3464 \vbox to \ht0{\hbox{%
3465 \ifx\textnominalsize\xwordpt
3466 % for 10pt running text, lllsize (8pt) is too small for the A in LaTeX.
3467 % Revert to plain's \scriptsize, which is 7pt.
3468 \count255=\the\fam $\fam\count255 \scriptstyle A$%
3469 \else
3470 \ifx\curfontsize\smallword
3471 % For footnotes and indices
3472 \count255=\the\fam $\fam\count255 \scriptstyle A$%
3473 \else
3474 % For 11pt, we can use our lllsize.
3475 \switchtolllsize A%
3479 \vss
3481 \kern-.15em
3482 \TeX
3484 \def\smallword{small}
3486 % Some math mode symbols. Define \ensuremath to switch into math mode
3487 % unless we are already there. Expansion tricks may not be needed here,
3488 % but safer, and can't hurt.
3489 \def\ensuremath{\ifmmode \expandafter\asis \else\expandafter\ensuredmath \fi}
3490 \def\ensuredmath#1{$\relax#1$}
3492 \def\bullet{\ensuremath\ptexbullet}
3493 \def\geq{\ensuremath\ge}
3494 \def\leq{\ensuremath\le}
3495 \def\minus{\ensuremath-}
3497 % @dots{} outputs an ellipsis using the current font.
3498 % We do .5em per period so that it has the same spacing in the cm
3499 % typewriter fonts as three actual period characters; on the other hand,
3500 % in other typewriter fonts three periods are wider than 1.5em. So do
3501 % whichever is larger.
3503 \def\dots{%
3504 \leavevmode
3505 \setbox0=\hbox{...}% get width of three periods
3506 \ifdim\wd0 > 1.5em
3507 \dimen0 = \wd0
3508 \else
3509 \dimen0 = 1.5em
3511 \hbox to \dimen0{%
3512 \hskip 0pt plus.25fil
3513 .\hskip 0pt plus1fil
3514 .\hskip 0pt plus1fil
3515 .\hskip 0pt plus.5fil
3519 % @enddots{} is an end-of-sentence ellipsis.
3521 \def\enddots{%
3522 \dots
3523 \spacefactor=\endofsentencespacefactor
3526 % @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
3528 % Since these characters are used in examples, they should be an even number of
3529 % \tt widths. Each \tt character is 1en, so two makes it 1em.
3531 \def\point{$\star$}
3532 \def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}}
3533 \def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
3534 \def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}}
3535 \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
3536 \def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}}
3538 % The @error{} command.
3539 % Adapted from the TeXbook's \boxit.
3541 \newbox\errorbox
3543 {\ttfont \global\dimen0 = 3em}% Width of the box.
3544 \dimen2 = .55pt % Thickness of rules
3545 % The text. (`r' is open on the right, `e' somewhat less so on the left.)
3546 \setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt}
3548 \setbox\errorbox=\hbox to \dimen0{\hfil
3549 \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
3550 \advance\hsize by -2\dimen2 % Rules.
3551 \vbox{%
3552 \hrule height\dimen2
3553 \hbox{\vrule width\dimen2 \kern3pt % Space to left of text.
3554 \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
3555 \kern3pt\vrule width\dimen2}% Space to right.
3556 \hrule height\dimen2}
3557 \hfil}
3559 \def\error{\leavevmode\lower.7ex\copy\errorbox}
3561 % @pounds{} is a sterling sign, which Knuth put in the CM italic font.
3563 \def\pounds{{\ifusingtt{\ecfont\char"BF}{\it\$}}}
3565 % @euro{} comes from a separate font, depending on the current style.
3566 % We use the free feym* fonts from the eurosym package by Henrik
3567 % Theiling, which support regular, slanted, bold and bold slanted (and
3568 % "outlined" (blackboard board, sort of) versions, which we don't need).
3569 % It is available from http://www.ctan.org/tex-archive/fonts/eurosym.
3571 % Although only regular is the truly official Euro symbol, we ignore
3572 % that. The Euro is designed to be slightly taller than the regular
3573 % font height.
3575 % feymr - regular
3576 % feymo - slanted
3577 % feybr - bold
3578 % feybo - bold slanted
3580 % There is no good (free) typewriter version, to my knowledge.
3581 % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide.
3582 % Hmm.
3584 % Also doesn't work in math. Do we need to do math with euro symbols?
3585 % Hope not.
3588 \def\euro{{\eurofont e}}
3589 \def\eurofont{%
3590 % We set the font at each command, rather than predefining it in
3591 % \textfonts and the other font-switching commands, so that
3592 % installations which never need the symbol don't have to have the
3593 % font installed.
3595 % There is only one designed size (nominal 10pt), so we always scale
3596 % that to the current nominal size.
3598 % By the way, simply using "at 1em" works for cmr10 and the like, but
3599 % does not work for cmbx10 and other extended/shrunken fonts.
3601 \def\eurosize{\csname\curfontsize nominalsize\endcsname}%
3603 \ifx\curfontstyle\bfstylename
3604 % bold:
3605 \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize
3606 \else
3607 % regular:
3608 \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize
3610 \thiseurofont
3613 % Glyphs from the EC fonts. We don't use \let for the aliases, because
3614 % sometimes we redefine the original macro, and the alias should reflect
3615 % the redefinition.
3617 % Use LaTeX names for the Icelandic letters.
3618 \def\DH{{\ecfont \char"D0}} % Eth
3619 \def\dh{{\ecfont \char"F0}} % eth
3620 \def\TH{{\ecfont \char"DE}} % Thorn
3621 \def\th{{\ecfont \char"FE}} % thorn
3623 \def\guillemetleft{{\ecfont \char"13}}
3624 \def\guillemotleft{\guillemetleft}
3625 \def\guillemetright{{\ecfont \char"14}}
3626 \def\guillemotright{\guillemetright}
3627 \def\guilsinglleft{{\ecfont \char"0E}}
3628 \def\guilsinglright{{\ecfont \char"0F}}
3629 \def\quotedblbase{{\ecfont \char"12}}
3630 \def\quotesinglbase{{\ecfont \char"0D}}
3632 \def\L{{\ecfont \char"8A}} % L with stroke
3633 \def\l{{\ecfont \char"AA}} % l with stroke
3635 % This positioning is not perfect (see the ogonek LaTeX package), but
3636 % we have the precomposed glyphs for the most common cases. We put the
3637 % tests to use those glyphs in the single \ogonek macro so we have fewer
3638 % dummy definitions to worry about for index entries, etc.
3640 % ogonek is also used with other letters in Lithuanian (IOU), but using
3641 % the precomposed glyphs for those is not so easy since they aren't in
3642 % the same EC font.
3643 \def\ogonek#1{{%
3644 \def\temp{#1}%
3645 \ifx\temp\macrocharA\Aogonek
3646 \else\ifx\temp\macrochara\aogonek
3647 \else\ifx\temp\macrocharE\Eogonek
3648 \else\ifx\temp\macrochare\eogonek
3649 \else
3650 \ecfont \setbox0=\hbox{#1}%
3651 \ifdim\ht0=1ex\accent"0C #1%
3652 \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}%
3654 \fi\fi\fi\fi
3657 \def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A}
3658 \def\aogonek{{\ecfont \char"A1}}\def\macrochara{a}
3659 \def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E}
3660 \def\eogonek{{\ecfont \char"A6}}\def\macrochare{e}
3662 % Use the European Computer Modern fonts (cm-super in outline format)
3663 % for non-CM glyphs. That is ec* for regular text and tc* for the text
3664 % companion symbols (LaTeX TS1 encoding). Both are part of the ec
3665 % package and follow the same conventions.
3667 \def\ecfont{\etcfont{e}}
3668 \def\tcfont{\etcfont{t}}
3670 \def\etcfont#1{%
3671 % We can't distinguish serif/sans and italic/slanted, but this
3672 % is used for crude hacks anyway (like adding French and German
3673 % quotes to documents typeset with CM, where we lose kerning), so
3674 % hopefully nobody will notice/care.
3675 \edef\ecsize{\csname\curfontsize ecsize\endcsname}%
3676 \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
3677 \ifusingtt
3678 % typewriter:
3679 {\font\thisecfont = #1ctt\ecsize \space at \nominalsize}%
3680 % else
3681 {\ifx\curfontstyle\bfstylename
3682 % bold:
3683 \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize
3684 \else
3685 % regular:
3686 \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space at \nominalsize
3687 \fi}%
3688 \thisecfont
3691 % @registeredsymbol - R in a circle. The font for the R should really
3692 % be smaller yet, but lllsize is the best we can do for now.
3693 % Adapted from the plain.tex definition of \copyright.
3695 \def\registeredsymbol{%
3696 $^{{\ooalign{\hfil\raise.07ex\hbox{\switchtolllsize R}%
3697 \hfil\crcr\Orb}}%
3701 % @textdegree - the normal degrees sign.
3703 \def\textdegree{%
3704 \ifmmode ^\circ
3705 \else {\tcfont \char 176}%
3706 \fi}
3708 % Laurent Siebenmann reports \Orb undefined with:
3709 % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38
3710 % so we'll define it if necessary.
3712 \ifx\Orb\thisisundefined
3713 \def\Orb{\mathhexbox20D}
3716 % Quotes.
3717 \chardef\quoteleft=`\`
3718 \chardef\quoteright=`\'
3720 % only change font for tt for correct kerning and to avoid using
3721 % \ecfont unless necessary.
3722 \def\quotedblleft{%
3723 \ifusingtt{{\ecfont\char"10}}{{\char"5C}}%
3726 \def\quotedblright{%
3727 \ifusingtt{{\ecfont\char"11}}{{\char`\"}}%
3731 \message{page headings,}
3733 \newskip\titlepagetopglue \titlepagetopglue = 1.5in
3734 \newskip\titlepagebottomglue \titlepagebottomglue = 2pc
3736 % First the title page. Must do @settitle before @titlepage.
3737 \newif\ifseenauthor
3738 \newif\iffinishedtitlepage
3740 % @setcontentsaftertitlepage used to do an implicit @contents or
3741 % @shortcontents after @end titlepage, but it is now obsolete.
3742 \def\setcontentsaftertitlepage{%
3743 \errmessage{@setcontentsaftertitlepage has been removed as a Texinfo
3744 command; move your @contents command if you want the contents
3745 after the title page.}}%
3746 \def\setshortcontentsaftertitlepage{%
3747 \errmessage{@setshortcontentsaftertitlepage has been removed as a Texinfo
3748 command; move your @shortcontents and @contents commands if you
3749 want the contents after the title page.}}%
3751 \parseargdef\shorttitlepage{%
3752 {\headingsoff \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}%
3753 \endgroup\page\hbox{}\page}\pageone}
3755 \envdef\titlepage{%
3756 % Open one extra group, as we want to close it in the middle of \Etitlepage.
3757 \begingroup
3758 \parindent=0pt \textfonts
3759 \headingsoff
3760 % Leave some space at the very top of the page.
3761 \vglue\titlepagetopglue
3762 % No rule at page bottom unless we print one at the top with @title.
3763 \finishedtitlepagetrue
3765 % Most title ``pages'' are actually two pages long, with space
3766 % at the top of the second. We don't want the ragged left on the second.
3767 \let\oldpage = \page
3768 \def\page{%
3769 \iffinishedtitlepage\else
3770 \finishtitlepage
3772 \let\page = \oldpage
3773 \page
3774 \null
3778 \def\Etitlepage{%
3779 \iffinishedtitlepage\else
3780 \finishtitlepage
3782 % It is important to do the page break before ending the group,
3783 % because the headline and footline are only empty inside the group.
3784 % If we use the new definition of \page, we always get a blank page
3785 % after the title page, which we certainly don't want.
3786 \oldpage
3787 \pageone
3788 \endgroup
3792 \def\finishtitlepage{%
3793 \vskip4pt \hrule height 2pt width \hsize
3794 \vskip\titlepagebottomglue
3795 \finishedtitlepagetrue
3798 % Settings used for typesetting titles: no hyphenation, no indentation,
3799 % don't worry much about spacing, ragged right. This should be used
3800 % inside a \vbox, and fonts need to be set appropriately first. \par should
3801 % be specified before the end of the \vbox, since a vbox is a group.
3803 \def\raggedtitlesettings{%
3805 \hyphenpenalty=10000
3806 \parindent=0pt
3807 \tolerance=5000
3808 \ptexraggedright
3811 % Macros to be used within @titlepage:
3813 \let\subtitlerm=\rmfont
3814 \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
3816 \parseargdef\title{%
3817 \checkenv\titlepage
3818 \vbox{\titlefonts \raggedtitlesettings #1\par}%
3819 % print a rule at the page bottom also.
3820 \finishedtitlepagefalse
3821 \vskip4pt \hrule height 4pt width \hsize \vskip4pt
3824 \parseargdef\subtitle{%
3825 \checkenv\titlepage
3826 {\subtitlefont \rightline{#1}}%
3829 % @author should come last, but may come many times.
3830 % It can also be used inside @quotation.
3832 \parseargdef\author{%
3833 \def\temp{\quotation}%
3834 \ifx\thisenv\temp
3835 \def\quotationauthor{#1}% printed in \Equotation.
3836 \else
3837 \checkenv\titlepage
3838 \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
3839 {\secfonts\rm \leftline{#1}}%
3844 % Set up page headings and footings.
3846 \let\thispage=\folio
3848 \newtoks\evenheadline % headline on even pages
3849 \newtoks\oddheadline % headline on odd pages
3850 \newtoks\evenchapheadline% headline on even pages with a new chapter
3851 \newtoks\oddchapheadline % headline on odd pages with a new chapter
3852 \newtoks\evenfootline % footline on even pages
3853 \newtoks\oddfootline % footline on odd pages
3855 % Now make \makeheadline and \makefootline in Plain TeX use those variables
3856 \headline={{\textfonts\rm\frenchspacingsetting
3857 \ifchapterpage
3858 \ifodd\pageno\the\oddchapheadline\else\the\evenchapheadline\fi
3859 \else
3860 \ifodd\pageno\the\oddheadline\else\the\evenheadline\fi
3861 \fi}}
3863 \footline={{\textfonts\rm\frenchspacingsetting
3864 \ifodd\pageno \the\oddfootline \else \the\evenfootline \fi}%
3865 \HEADINGShook}
3866 \let\HEADINGShook=\relax
3868 % Commands to set those variables.
3869 % For example, this is what @headings on does
3870 % @evenheading @thistitle|@thispage|@thischapter
3871 % @oddheading @thischapter|@thispage|@thistitle
3872 % @evenfooting @thisfile||
3873 % @oddfooting ||@thisfile
3876 \def\evenheading{\parsearg\evenheadingxxx}
3877 \def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish}
3878 \def\evenheadingyyy #1\|#2\|#3\|#4\finish{%
3879 \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}
3880 \global\evenchapheadline=\evenheadline}
3882 \def\oddheading{\parsearg\oddheadingxxx}
3883 \def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish}
3884 \def\oddheadingyyy #1\|#2\|#3\|#4\finish{%
3885 \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}%
3886 \global\oddchapheadline=\oddheadline}
3888 \parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}%
3890 \def\evenfooting{\parsearg\evenfootingxxx}
3891 \def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish}
3892 \def\evenfootingyyy #1\|#2\|#3\|#4\finish{%
3893 \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
3895 \def\oddfooting{\parsearg\oddfootingxxx}
3896 \def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish}
3897 \def\oddfootingyyy #1\|#2\|#3\|#4\finish{%
3898 \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}%
3900 % Leave some space for the footline. Hopefully ok to assume
3901 % @evenfooting will not be used by itself.
3902 \global\advance\txipageheight by -12pt
3903 \global\advance\vsize by -12pt
3906 \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}}
3908 % @evenheadingmarks top \thischapter <- chapter at the top of a page
3909 % @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page
3911 % The same set of arguments for:
3913 % @oddheadingmarks
3914 % @evenfootingmarks
3915 % @oddfootingmarks
3916 % @everyheadingmarks
3917 % @everyfootingmarks
3919 % These define \getoddheadingmarks, \getevenheadingmarks,
3920 % \getoddfootingmarks, and \getevenfootingmarks, each to one of
3921 % \gettopheadingmarks, \getbottomheadingmarks.
3923 \def\evenheadingmarks{\headingmarks{even}{heading}}
3924 \def\oddheadingmarks{\headingmarks{odd}{heading}}
3925 \def\evenfootingmarks{\headingmarks{even}{footing}}
3926 \def\oddfootingmarks{\headingmarks{odd}{footing}}
3927 \parseargdef\everyheadingmarks{\headingmarks{even}{heading}{#1}
3928 \headingmarks{odd}{heading}{#1} }
3929 \parseargdef\everyfootingmarks{\headingmarks{even}{footing}{#1}
3930 \headingmarks{odd}{footing}{#1} }
3931 % #1 = even/odd, #2 = heading/footing, #3 = top/bottom.
3932 \def\headingmarks#1#2#3 {%
3933 \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname
3934 \global\expandafter\let\csname get#1#2marks\endcsname \temp
3937 \everyheadingmarks bottom
3938 \everyfootingmarks bottom
3940 % @headings double turns headings on for double-sided printing.
3941 % @headings single turns headings on for single-sided printing.
3942 % @headings off turns them off.
3943 % @headings on same as @headings double, retained for compatibility.
3944 % @headings after turns on double-sided headings after this page.
3945 % @headings doubleafter turns on double-sided headings after this page.
3946 % @headings singleafter turns on single-sided headings after this page.
3947 % By default, they are off at the start of a document,
3948 % and turned `on' after @end titlepage.
3950 \parseargdef\headings{\csname HEADINGS#1\endcsname}
3952 \def\headingsoff{% non-global headings elimination
3953 \evenheadline={\hfil}\evenfootline={\hfil}\evenchapheadline={\hfil}%
3954 \oddheadline={\hfil}\oddfootline={\hfil}\oddchapheadline={\hfil}%
3957 \def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting
3959 % Set the page number to 1.
3960 \def\pageone{
3961 \global\pageno=1
3962 \global\arabiccount = \pagecount
3965 \let\contentsalignmacro = \chappager
3967 % \def\HEADINGSon{\HEADINGSdouble} % defined by \CHAPPAGon
3969 % For double-sided printing, put current file name in lower left corner,
3970 % chapter name on inside top of right hand pages, document
3971 % title on inside top of left hand pages, and page numbers on outside top
3972 % edge of all pages.
3973 \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdouble}
3974 \let\HEADINGSdoubleafter=\HEADINGSafter
3975 \def\HEADINGSdouble{%
3976 \global\evenfootline={\hfil}
3977 \global\oddfootline={\hfil}
3978 \global\evenheadline={\line{\folio\hfil\thistitle}}
3979 \global\oddheadline={\line{\thischapter\hfil\folio}}
3980 \global\evenchapheadline={\line{\folio\hfil\thistitle}}
3981 \global\oddchapheadline={\line{\hfil\folio}}
3982 \global\let\contentsalignmacro = \chapoddpage
3985 % For single-sided printing, chapter title goes across top left of page,
3986 % page number on top right.
3987 \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsingle}
3988 \def\HEADINGSsingle{%
3989 \global\evenfootline={\hfil}
3990 \global\oddfootline={\hfil}
3991 \global\evenheadline={\line{\thischapter\hfil\folio}}
3992 \global\oddheadline={\line{\thischapter\hfil\folio}}
3993 \global\evenchapheadline={\line{\hfil\folio}}
3994 \global\oddchapheadline={\line{\hfil\folio}}
3995 \global\let\contentsalignmacro = \chappager
3998 % for @setchapternewpage off
3999 \def\HEADINGSsinglechapoff{%
4000 \global\evenfootline={\hfil}
4001 \global\oddfootline={\hfil}
4002 \global\evenheadline={\line{\thischapter\hfil\folio}}
4003 \global\oddheadline={\line{\thischapter\hfil\folio}}
4004 \global\evenchapheadline=\evenheadline
4005 \global\oddchapheadline=\oddheadline
4006 \global\let\contentsalignmacro = \chappager
4009 % Subroutines used in generating headings
4010 % This produces Day Month Year style of output.
4011 % Only define if not already defined, in case a txi-??.tex file has set
4012 % up a different format (e.g., txi-cs.tex does this).
4013 \ifx\today\thisisundefined
4014 \def\today{%
4015 \number\day\space
4016 \ifcase\month
4017 \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr
4018 \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug
4019 \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec
4021 \space\number\year}
4024 % @settitle line... specifies the title of the document, for headings.
4025 % It generates no output of its own.
4026 \def\thistitle{\putwordNoTitle}
4027 \def\settitle{\parsearg{\gdef\thistitle}}
4030 \message{tables,}
4031 % Tables -- @table, @ftable, @vtable, @item(x).
4033 % default indentation of table text
4034 \newdimen\tableindent \tableindent=.8in
4035 % default indentation of @itemize and @enumerate text
4036 \newdimen\itemindent \itemindent=.3in
4037 % margin between end of table item and start of table text.
4038 \newdimen\itemmargin \itemmargin=.1in
4040 % used internally for \itemindent minus \itemmargin
4041 \newdimen\itemmax
4043 % Note @table, @ftable, and @vtable define @item, @itemx, etc., with
4044 % these defs.
4045 % They also define \itemindex
4046 % to index the item name in whatever manner is desired (perhaps none).
4048 \newif\ifitemxneedsnegativevskip
4050 \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi}
4052 \def\internalBitem{\smallbreak \parsearg\itemzzz}
4053 \def\internalBitemx{\itemxpar \parsearg\itemzzz}
4055 \def\itemzzz #1{\begingroup %
4056 \advance\hsize by -\rightskip
4057 \advance\hsize by -\tableindent
4058 \setbox0=\hbox{\itemindicate{#1}}%
4059 \itemindex{#1}%
4060 \nobreak % This prevents a break before @itemx.
4062 % If the item text does not fit in the space we have, put it on a line
4063 % by itself, and do not allow a page break either before or after that
4064 % line. We do not start a paragraph here because then if the next
4065 % command is, e.g., @kindex, the whatsit would get put into the
4066 % horizontal list on a line by itself, resulting in extra blank space.
4067 \ifdim \wd0>\itemmax
4069 % Make this a paragraph so we get the \parskip glue and wrapping,
4070 % but leave it ragged-right.
4071 \begingroup
4072 \advance\leftskip by-\tableindent
4073 \advance\hsize by\tableindent
4074 \advance\rightskip by0pt plus1fil\relax
4075 \leavevmode\unhbox0\par
4076 \endgroup
4078 % We're going to be starting a paragraph, but we don't want the
4079 % \parskip glue -- logically it's part of the @item we just started.
4080 \nobreak \vskip-\parskip
4082 % Stop a page break at the \parskip glue coming up. However, if
4083 % what follows is an environment such as @example, there will be no
4084 % \parskip glue; then the negative vskip we just inserted would
4085 % cause the example and the item to crash together. So we use this
4086 % bizarre value of 10001 as a signal to \aboveenvbreak to insert
4087 % \parskip glue after all. Section titles are handled this way also.
4089 \penalty 10001
4090 \endgroup
4091 \itemxneedsnegativevskipfalse
4092 \else
4093 % The item text fits into the space. Start a paragraph, so that the
4094 % following text (if any) will end up on the same line.
4095 \noindent
4096 % Do this with kerns and \unhbox so that if there is a footnote in
4097 % the item text, it can migrate to the main vertical list and
4098 % eventually be printed.
4099 \nobreak\kern-\tableindent
4100 \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0
4101 \unhbox0
4102 \nobreak\kern\dimen0
4103 \endgroup
4104 \itemxneedsnegativevskiptrue
4108 \def\item{\errmessage{@item while not in a list environment}}
4109 \def\itemx{\errmessage{@itemx while not in a list environment}}
4111 % @table, @ftable, @vtable.
4112 \envdef\table{%
4113 \let\itemindex\gobble
4114 \tablecheck{table}%
4116 \envdef\ftable{%
4117 \def\itemindex ##1{\doind {fn}{\code{##1}}}%
4118 \tablecheck{ftable}%
4120 \envdef\vtable{%
4121 \def\itemindex ##1{\doind {vr}{\code{##1}}}%
4122 \tablecheck{vtable}%
4124 \def\tablecheck#1{%
4125 \ifnum \the\catcode`\^^M=\active
4126 \endgroup
4127 \errmessage{This command won't work in this context; perhaps the problem is
4128 that we are \inenvironment\thisenv}%
4129 \def\next{\doignore{#1}}%
4130 \else
4131 \let\next\tablex
4133 \next
4135 \def\tablex#1{%
4136 \def\itemindicate{#1}%
4137 \parsearg\tabley
4139 \def\tabley#1{%
4141 \makevalueexpandable
4142 \edef\temp{\noexpand\tablez #1\space\space\space}%
4143 \expandafter
4144 }\temp \endtablez
4146 \def\tablez #1 #2 #3 #4\endtablez{%
4147 \aboveenvbreak
4148 \ifnum 0#1>0 \advance \leftskip by #1\mil \fi
4149 \ifnum 0#2>0 \tableindent=#2\mil \fi
4150 \ifnum 0#3>0 \advance \rightskip by #3\mil \fi
4151 \itemmax=\tableindent
4152 \advance \itemmax by -\itemmargin
4153 \advance \leftskip by \tableindent
4154 \exdentamount=\tableindent
4155 \parindent = 0pt
4156 \parskip = \smallskipamount
4157 \ifdim \parskip=0pt \parskip=2pt \fi
4158 \let\item = \internalBitem
4159 \let\itemx = \internalBitemx
4161 \def\Etable{\endgraf\afterenvbreak}
4162 \let\Eftable\Etable
4163 \let\Evtable\Etable
4164 \let\Eitemize\Etable
4165 \let\Eenumerate\Etable
4167 % This is the counter used by @enumerate, which is really @itemize
4169 \newcount \itemno
4171 \envdef\itemize{\parsearg\doitemize}
4173 \def\doitemize#1{%
4174 \aboveenvbreak
4175 \itemmax=\itemindent
4176 \advance\itemmax by -\itemmargin
4177 \advance\leftskip by \itemindent
4178 \exdentamount=\itemindent
4179 \parindent=0pt
4180 \parskip=\smallskipamount
4181 \ifdim\parskip=0pt \parskip=2pt \fi
4183 % Try typesetting the item mark so that if the document erroneously says
4184 % something like @itemize @samp (intending @table), there's an error
4185 % right away at the @itemize. It's not the best error message in the
4186 % world, but it's better than leaving it to the @item. This means if
4187 % the user wants an empty mark, they have to say @w{} not just @w.
4188 \def\itemcontents{#1}%
4189 \setbox0 = \hbox{\itemcontents}%
4191 % @itemize with no arg is equivalent to @itemize @bullet.
4192 \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi
4194 \let\item=\itemizeitem
4197 % Definition of @item while inside @itemize and @enumerate.
4199 \def\itemizeitem{%
4200 \advance\itemno by 1 % for enumerations
4201 {\let\par=\endgraf \smallbreak}% reasonable place to break
4203 % If the document has an @itemize directly after a section title, a
4204 % \nobreak will be last on the list, and \sectionheading will have
4205 % done a \vskip-\parskip. In that case, we don't want to zero
4206 % parskip, or the item text will crash with the heading. On the
4207 % other hand, when there is normal text preceding the item (as there
4208 % usually is), we do want to zero parskip, or there would be too much
4209 % space. In that case, we won't have a \nobreak before. At least
4210 % that's the theory.
4211 \ifnum\lastpenalty<10000 \parskip=0in \fi
4212 \noindent
4213 \hbox to 0pt{\hss \itemcontents \kern\itemmargin}%
4215 \ifinner\else
4216 \vadjust{\penalty 1200}% not good to break after first line of item.
4218 % We can be in inner vertical mode in a footnote, although an
4219 % @itemize looks awful there.
4221 \flushcr
4224 % \splitoff TOKENS\endmark defines \first to be the first token in
4225 % TOKENS, and \rest to be the remainder.
4227 \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}%
4229 % Allow an optional argument of an uppercase letter, lowercase letter,
4230 % or number, to specify the first label in the enumerated list. No
4231 % argument is the same as `1'.
4233 \envparseargdef\enumerate{\enumeratey #1 \endenumeratey}
4234 \def\enumeratey #1 #2\endenumeratey{%
4235 % If we were given no argument, pretend we were given `1'.
4236 \def\thearg{#1}%
4237 \ifx\thearg\empty \def\thearg{1}\fi
4239 % Detect if the argument is a single token. If so, it might be a
4240 % letter. Otherwise, the only valid thing it can be is a number.
4241 % (We will always have one token, because of the test we just made.
4242 % This is a good thing, since \splitoff doesn't work given nothing at
4243 % all -- the first parameter is undelimited.)
4244 \expandafter\splitoff\thearg\endmark
4245 \ifx\rest\empty
4246 % Only one token in the argument. It could still be anything.
4247 % A ``lowercase letter'' is one whose \lccode is nonzero.
4248 % An ``uppercase letter'' is one whose \lccode is both nonzero, and
4249 % not equal to itself.
4250 % Otherwise, we assume it's a number.
4252 % We need the \relax at the end of the \ifnum lines to stop TeX from
4253 % continuing to look for a <number>.
4255 \ifnum\lccode\expandafter`\thearg=0\relax
4256 \numericenumerate % a number (we hope)
4257 \else
4258 % It's a letter.
4259 \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax
4260 \lowercaseenumerate % lowercase letter
4261 \else
4262 \uppercaseenumerate % uppercase letter
4265 \else
4266 % Multiple tokens in the argument. We hope it's a number.
4267 \numericenumerate
4271 % An @enumerate whose labels are integers. The starting integer is
4272 % given in \thearg.
4274 \def\numericenumerate{%
4275 \itemno = \thearg
4276 \startenumeration{\the\itemno}%
4279 % The starting (lowercase) letter is in \thearg.
4280 \def\lowercaseenumerate{%
4281 \itemno = \expandafter`\thearg
4282 \startenumeration{%
4283 % Be sure we're not beyond the end of the alphabet.
4284 \ifnum\itemno=0
4285 \errmessage{No more lowercase letters in @enumerate; get a bigger
4286 alphabet}%
4288 \char\lccode\itemno
4292 % The starting (uppercase) letter is in \thearg.
4293 \def\uppercaseenumerate{%
4294 \itemno = \expandafter`\thearg
4295 \startenumeration{%
4296 % Be sure we're not beyond the end of the alphabet.
4297 \ifnum\itemno=0
4298 \errmessage{No more uppercase letters in @enumerate; get a bigger
4299 alphabet}
4301 \char\uccode\itemno
4305 % Call \doitemize, adding a period to the first argument and supplying the
4306 % common last two arguments. Also subtract one from the initial value in
4307 % \itemno, since @item increments \itemno.
4309 \def\startenumeration#1{%
4310 \advance\itemno by -1
4311 \doitemize{#1.}\flushcr
4315 % @multitable macros
4317 % Macros used to set up halign preamble:
4319 \let\endsetuptable\relax
4320 \def\xendsetuptable{\endsetuptable}
4321 \let\columnfractions\relax
4322 \def\xcolumnfractions{\columnfractions}
4323 \newif\ifsetpercent
4325 % #1 is the @columnfraction, usually a decimal number like .5, but might
4326 % be just 1. We just use it, whatever it is.
4328 \def\pickupwholefraction#1 {%
4329 \global\advance\colcount by 1
4330 \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}%
4331 \setuptable
4334 \newcount\colcount
4335 \def\setuptable#1{%
4336 \def\firstarg{#1}%
4337 \ifx\firstarg\xendsetuptable
4338 \let\go = \relax
4339 \else
4340 \ifx\firstarg\xcolumnfractions
4341 \global\setpercenttrue
4342 \else
4343 \ifsetpercent
4344 \let\go\pickupwholefraction
4345 \else
4346 \global\advance\colcount by 1
4347 \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a
4348 % separator; typically that is always in the input, anyway.
4349 \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%
4352 \ifx\go\pickupwholefraction
4353 % Put the argument back for the \pickupwholefraction call, so
4354 % we'll always have a period there to be parsed.
4355 \def\go{\pickupwholefraction#1}%
4356 \else
4357 \let\go = \setuptable
4358 \fi%
4363 % @headitem starts a heading row, which we typeset in bold. Assignments
4364 % have to be global since we are inside the implicit group of an
4365 % alignment entry. \everycr below resets \everytab so we don't have to
4366 % undo it ourselves.
4367 \def\headitemfont{\b}% for people to use in the template row; not changeable
4368 \def\headitem{%
4369 \crcr % must appear first
4370 \gdef\headitemcrhook{\nobreak}% attempt to avoid page break after headings
4371 \global\everytab={\bf}% can't use \headitemfont since the parsing differs
4372 \the\everytab % for the first item
4375 % default for tables with no headings.
4376 \let\headitemcrhook=\relax
4378 \def\tab{\checkenv\multitable &\the\everytab}%
4380 \newtoks\everytab % insert after every tab.
4382 \envdef\multitable{%
4383 \vskip\parskip
4384 \startsavinginserts
4386 % @item within a multitable starts a normal row.
4387 % We use \def instead of \let so that if one of the multitable entries
4388 % contains an @itemize, we don't choke on the \item (seen as \crcr aka
4389 % \endtemplate) expanding \doitemize.
4390 \def\item{\crcr}%
4392 \tolerance=9500
4393 \hbadness=9500
4394 \parskip=0pt
4395 \parindent=6pt
4396 \overfullrule=0pt
4397 \global\colcount=0
4399 \everycr = {%
4400 \noalign{%
4401 \global\everytab={}% Reset from possible headitem.
4402 \global\colcount=0 % Reset the column counter.
4404 % Check for saved footnotes, etc.:
4405 \checkinserts
4407 % Perhaps a \nobreak, then reset:
4408 \headitemcrhook
4409 \global\let\headitemcrhook=\relax
4413 \parsearg\domultitable
4415 \def\domultitable#1{%
4416 % To parse everything between @multitable and @item:
4417 \setuptable#1 \endsetuptable
4419 % This preamble sets up a generic column definition, which will
4420 % be used as many times as user calls for columns.
4421 % \vtop will set a single line and will also let text wrap and
4422 % continue for many paragraphs if desired.
4423 \halign\bgroup &%
4424 \global\advance\colcount by 1
4425 \strut
4426 \vtop{%
4427 \advance\hsize by -1\leftskip
4428 % Find the correct column width
4429 \hsize=\expandafter\csname col\the\colcount\endcsname
4431 \advance\rightskip by -1\rightskip % Zero leaving only any stretch
4432 \ifnum\colcount=1
4433 \advance\hsize by\leftskip % Add indent of surrounding text
4434 \else
4435 % In order to keep entries from bumping into each other.
4436 \leftskip=12pt
4437 \ifsetpercent \else
4438 % If a template has been used
4439 \advance\hsize by \leftskip
4442 \noindent\ignorespaces##\unskip\strut
4443 }\cr
4445 \def\Emultitable{%
4446 \crcr
4447 \egroup % end the \halign
4448 \global\setpercentfalse
4452 \message{conditionals,}
4454 % @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotlatex, @ifnotplaintext,
4455 % @ifnotxml always succeed. They currently do nothing; we don't
4456 % attempt to check whether the conditionals are properly nested. But we
4457 % have to remember that they are conditionals, so that @end doesn't
4458 % attempt to close an environment group.
4460 \def\makecond#1{%
4461 \expandafter\let\csname #1\endcsname = \relax
4462 \expandafter\let\csname iscond.#1\endcsname = 1
4464 \makecond{iftex}
4465 \makecond{ifnotdocbook}
4466 \makecond{ifnothtml}
4467 \makecond{ifnotinfo}
4468 \makecond{ifnotlatex}
4469 \makecond{ifnotplaintext}
4470 \makecond{ifnotxml}
4472 % Ignore @ignore, @ifhtml, @ifinfo, and the like.
4474 \def\direntry{\doignore{direntry}}
4475 \def\documentdescription{\doignore{documentdescription}}
4476 \def\docbook{\doignore{docbook}}
4477 \def\html{\doignore{html}}
4478 \def\ifdocbook{\doignore{ifdocbook}}
4479 \def\ifhtml{\doignore{ifhtml}}
4480 \def\ifinfo{\doignore{ifinfo}}
4481 \def\iflatex{\doignore{iflatex}}
4482 \def\ifnottex{\doignore{ifnottex}}
4483 \def\ifplaintext{\doignore{ifplaintext}}
4484 \def\ifxml{\doignore{ifxml}}
4485 \def\ignore{\doignore{ignore}}
4486 \def\latex{\doignore{latex}}
4487 \def\menu{\doignore{menu}}
4488 \def\xml{\doignore{xml}}
4490 % Ignore text until a line `@end #1', keeping track of nested conditionals.
4492 % A count to remember the depth of nesting.
4493 \newcount\doignorecount
4495 \def\doignore#1{\begingroup
4496 % Scan in ``verbatim'' mode:
4497 \obeylines
4498 \catcode`\@ = \other
4499 \catcode`\{ = \other
4500 \catcode`\} = \other
4502 % Make sure that spaces turn into tokens that match what \doignoretext wants.
4503 \spaceisspace
4505 % Count number of #1's that we've seen.
4506 \doignorecount = 0
4508 % Swallow text until we reach the matching `@end #1'.
4509 \dodoignore{#1}%
4512 { \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source.
4513 \obeylines %
4515 \gdef\dodoignore#1{%
4516 % #1 contains the command name as a string, e.g., `ifinfo'.
4518 % Define a command to find the next `@end #1'.
4519 \long\def\doignoretext##1^^M@end #1{%
4520 \doignoretextyyy##1^^M@#1\_STOP_}%
4522 % And this command to find another #1 command, at the beginning of a
4523 % line. (Otherwise, we would consider a line `@c @ifset', for
4524 % example, to count as an @ifset for nesting.)
4525 \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}%
4527 % And now expand that command.
4528 \doignoretext ^^M%
4532 \def\doignoreyyy#1{%
4533 \def\temp{#1}%
4534 \ifx\temp\empty % Nothing found.
4535 \let\next\doignoretextzzz
4536 \else % Found a nested condition, ...
4537 \advance\doignorecount by 1
4538 \let\next\doignoretextyyy % ..., look for another.
4539 % If we're here, #1 ends with ^^M\ifinfo (for example).
4541 \next #1% the token \_STOP_ is present just after this macro.
4544 % We have to swallow the remaining "\_STOP_".
4546 \def\doignoretextzzz#1{%
4547 \ifnum\doignorecount = 0 % We have just found the outermost @end.
4548 \let\next\enddoignore
4549 \else % Still inside a nested condition.
4550 \advance\doignorecount by -1
4551 \let\next\doignoretext % Look for the next @end.
4553 \next
4556 % Finish off ignored text.
4557 { \obeylines%
4558 % Ignore anything after the last `@end #1'; this matters in verbatim
4559 % environments, where otherwise the newline after an ignored conditional
4560 % would result in a blank line in the output.
4561 \gdef\enddoignore#1^^M{\endgroup\ignorespaces}%
4565 % @set VAR sets the variable VAR to an empty value.
4566 % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
4568 % Since we want to separate VAR from REST-OF-LINE (which might be
4569 % empty), we can't just use \parsearg; we have to insert a space of our
4570 % own to delimit the rest of the line, and then take it out again if we
4571 % didn't need it.
4572 % We rely on the fact that \parsearg sets \catcode`\ =10.
4574 \parseargdef\set{\setyyy#1 \endsetyyy}
4575 \def\setyyy#1 #2\endsetyyy{%
4577 \makevalueexpandable
4578 \def\temp{#2}%
4579 \edef\next{\gdef\makecsname{SET#1}}%
4580 \ifx\temp\empty
4581 \next{}%
4582 \else
4583 \setzzz#2\endsetzzz
4587 % Remove the trailing space \setxxx inserted.
4588 \def\setzzz#1 \endsetzzz{\next{#1}}
4590 % @clear VAR clears (i.e., unsets) the variable VAR.
4592 \parseargdef\clear{%
4594 \makevalueexpandable
4595 \global\expandafter\let\csname SET#1\endcsname=\relax
4599 % @value{foo} gets the text saved in variable foo.
4600 \def\value{\begingroup\makevalueexpandable\valuexxx}
4601 \def\valuexxx#1{\expandablevalue{#1}\endgroup}
4603 \catcode`\-=\active \catcode`\_=\active
4605 \gdef\makevalueexpandable{%
4606 \let\value = \expandablevalue
4607 % We don't want these characters active, ...
4608 \catcode`\-=\other \catcode`\_=\other
4609 % ..., but we might end up with active ones in the argument if
4610 % we're called from @code, as @code{@value{foo-bar_}}, though.
4611 % So \let them to their normal equivalents.
4612 \let-\normaldash \let_\normalunderscore
4616 \def\expandablevalue#1{%
4617 \expandafter\ifx\csname SET#1\endcsname\relax
4618 {[No value for ``#1'']}%
4619 \message{Variable `#1', used in @value, is not set.}%
4620 \else
4621 \csname SET#1\endcsname
4625 % Like \expandablevalue, but completely expandable (the \message in the
4626 % definition above operates at the execution level of TeX). Used when
4627 % writing to auxiliary files, due to the expansion that \write does.
4628 % If flag is undefined, pass through an unexpanded @value command: maybe it
4629 % will be set by the time it is read back in.
4631 % NB flag names containing - or _ may not work here.
4632 \def\dummyvalue#1{%
4633 \expandafter\ifx\csname SET#1\endcsname\relax
4634 \string\value{#1}%
4635 \else
4636 \csname SET#1\endcsname
4640 % Used for @value's in index entries to form the sort key: expand the @value
4641 % if possible, otherwise sort late.
4642 \def\indexnofontsvalue#1{%
4643 \expandafter\ifx\csname SET#1\endcsname\relax
4644 ZZZZZZZ%
4645 \else
4646 \csname SET#1\endcsname
4650 % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
4651 % with @set.
4653 % To get the special treatment we need for `@end ifset,' we call
4654 % \makecond and then redefine.
4656 \makecond{ifset}
4657 \def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}}
4658 \def\doifset#1#2{%
4660 \makevalueexpandable
4661 \let\next=\empty
4662 \expandafter\ifx\csname SET#2\endcsname\relax
4663 #1% If not set, redefine \next.
4665 \expandafter
4666 }\next
4668 \def\ifsetfail{\doignore{ifset}}
4670 % @ifclear VAR ... @end executes the `...' iff VAR has never been
4671 % defined with @set, or has been undefined with @clear.
4673 % The `\else' inside the `\doifset' parameter is a trick to reuse the
4674 % above code: if the variable is not set, do nothing, if it is set,
4675 % then redefine \next to \ifclearfail.
4677 \makecond{ifclear}
4678 \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}}
4679 \def\ifclearfail{\doignore{ifclear}}
4681 % @ifcommandisdefined CMD ... @end executes the `...' if CMD (written
4682 % without the @) is in fact defined. We can only feasibly check at the
4683 % TeX level, so something like `mathcode' is going to considered
4684 % defined even though it is not a Texinfo command.
4686 \makecond{ifcommanddefined}
4687 \def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}}
4689 \def\doifcmddefined#1#2{{%
4690 \makevalueexpandable
4691 \let\next=\empty
4692 \expandafter\ifx\csname #2\endcsname\relax
4693 #1% If not defined, \let\next as above.
4695 \expandafter
4696 }\next
4698 \def\ifcmddefinedfail{\doignore{ifcommanddefined}}
4700 % @ifcommandnotdefined CMD ... handled similar to @ifclear above.
4701 \makecond{ifcommandnotdefined}
4702 \def\ifcommandnotdefined{%
4703 \parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}}
4704 \def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined}}
4706 % Set the `txicommandconditionals' variable, so documents have a way to
4707 % test if the @ifcommand...defined conditionals are available.
4708 \set txicommandconditionals
4710 % @dircategory CATEGORY -- specify a category of the dir file
4711 % which this file should belong to. Ignore this in TeX.
4712 \let\dircategory=\comment
4714 % @defininfoenclose.
4715 \let\definfoenclose=\comment
4718 \message{indexing,}
4719 % Index generation facilities
4721 % Define \newwrite to be identical to plain tex's \newwrite
4722 % except not \outer, so it can be used within macros and \if's.
4723 \edef\newwrite{\makecsname{ptexnewwrite}}
4725 % \newindex {foo} defines an index named IX.
4726 % It automatically defines \IXindex such that
4727 % \IXindex ...rest of line... puts an entry in the index IX.
4728 % It also defines \IXindfile to be the number of the output channel for
4729 % the file that accumulates this index. The file's extension is IX.
4730 % The name of an index should be no more than 2 characters long
4731 % for the sake of vms.
4733 \def\newindex#1{%
4734 \expandafter\chardef\csname#1indfile\endcsname=0
4735 \expandafter\xdef\csname#1index\endcsname{% % Define @#1index
4736 \noexpand\doindex{#1}}
4739 % @defindex foo == \newindex{foo}
4741 \def\defindex{\parsearg\newindex}
4743 % Define @defcodeindex, like @defindex except put all entries in @code.
4745 \def\defcodeindex{\parsearg\newcodeindex}
4747 \def\newcodeindex#1{%
4748 \expandafter\chardef\csname#1indfile\endcsname=0
4749 \expandafter\xdef\csname#1index\endcsname{%
4750 \noexpand\docodeindex{#1}}%
4753 % The default indices:
4754 \newindex{cp}% concepts,
4755 \newcodeindex{fn}% functions,
4756 \newcodeindex{vr}% variables,
4757 \newcodeindex{tp}% types,
4758 \newcodeindex{ky}% keys
4759 \newcodeindex{pg}% and programs.
4762 % @synindex foo bar makes index foo feed into index bar.
4763 % Do this instead of @defindex foo if you don't want it as a separate index.
4765 % @syncodeindex foo bar similar, but put all entries made for index foo
4766 % inside @code.
4768 \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}}
4769 \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}}
4771 % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo),
4772 % #3 the target index (bar).
4773 \def\dosynindex#1#2#3{%
4774 \requireopenindexfile{#3}%
4775 % redefine \fooindfile:
4776 \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname
4777 \expandafter\let\csname#2indfile\endcsname=\temp
4778 % redefine \fooindex:
4779 \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}%
4782 % Define \doindex, the driver for all index macros.
4783 % Argument #1 is generated by the calling \fooindex macro,
4784 % and it is the two-letter name of the index.
4786 \def\doindex#1{\edef\indexname{#1}\parsearg\doindexxxx}
4787 \def\doindexxxx #1{\doind{\indexname}{#1}}
4789 % like the previous two, but they put @code around the argument.
4790 \def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx}
4791 \def\docodeindexxxx #1{\docind{\indexname}{#1}}
4794 % \definedummyword defines \#1 as \string\#1\space, thus effectively
4795 % preventing its expansion. This is used only for control words,
4796 % not control letters, because the \space would be incorrect for
4797 % control characters, but is needed to separate the control word
4798 % from whatever follows.
4800 % These can be used both for control words that take an argument and
4801 % those that do not. If it is followed by {arg} in the input, then
4802 % that will dutifully get written to the index (or wherever).
4804 % For control letters, we have \definedummyletter, which omits the
4805 % space.
4807 \def\definedummyword #1{\def#1{\string#1\space}}%
4808 \def\definedummyletter#1{\def#1{\string#1}}%
4810 % Used for the aux, toc and index files to prevent expansion of Texinfo
4811 % commands. Most of the commands are controlled through the
4812 % \ifdummies conditional.
4814 \def\atdummies{%
4815 \dummiestrue
4817 \definedummyletter\@%
4818 \definedummyletter\ %
4819 \definedummyletter\{%
4820 \definedummyletter\}%
4821 \definedummyletter\&%
4823 \definedummyletter\_%
4824 \definedummyletter\-%
4826 \definedummyword\subentry
4828 % We want to disable all macros so that they are not expanded by \write.
4829 \let\commondummyword\definedummyword
4830 \macrolist
4831 \let\value\dummyvalue
4833 \turnoffactive
4836 \newif\ifdummies
4837 \newif\ifindexnofonts
4839 \def\commondummyletter#1{%
4840 \expandafter\let\csname\string#1:impl\endcsname#1%
4841 \edef#1{%
4842 \noexpand\ifindexnofonts
4843 % empty expansion
4844 \noexpand\else
4845 \noexpand\ifdummies\string#1%
4846 \noexpand\else
4847 \noexpand\jumptwofi % dispose of the \fi
4848 \expandafter\noexpand\csname\string#1:impl\endcsname
4849 \noexpand\fi
4850 \noexpand\fi}%
4853 \def\commondummyaccent#1{%
4854 \expandafter\let\csname\string#1:impl\endcsname#1%
4855 \edef#1{%
4856 \noexpand\ifindexnofonts
4857 \noexpand\expandafter % dispose of \else ... \fi
4858 \noexpand\asis
4859 \noexpand\else
4860 \noexpand\ifdummies\string#1%
4861 \noexpand\else
4862 \noexpand\jumptwofi % dispose of the \fi
4863 \expandafter\noexpand\csname\string#1:impl\endcsname
4864 \noexpand\fi
4865 \noexpand\fi}%
4868 % Like \commondummyaccent but add a \space at the end of the dummy expansion
4869 % #2 is the expansion used for \indexnofonts. #2 is always followed by
4870 % \asis to remove a pair of following braces.
4871 \def\commondummyword#1#2{%
4872 \expandafter\let\csname\string#1:impl\endcsname#1%
4873 \expandafter\def\csname\string#1:ixnf\endcsname{#2\asis}%
4874 \edef#1{%
4875 \noexpand\ifindexnofonts
4876 \noexpand\expandafter % dispose of \else ... \fi
4877 \expandafter\noexpand\csname\string#1:ixnf\endcsname
4878 \noexpand\else
4879 \noexpand\ifdummies\string#1\space
4880 \noexpand\else
4881 \noexpand\jumptwofi % dispose of the \fi \fi
4882 \expandafter\noexpand\csname\string#1:impl\endcsname
4883 \noexpand\fi
4884 \noexpand\fi}%
4886 \def\jumptwofi#1\fi\fi{\fi\fi#1}
4888 % For \atdummies and \indexnofonts. \atdummies sets
4889 % \dummiestrue and \indexnofonts sets \indexnofontstrue.
4890 \def\definedummies{
4891 % @-sign is always an escape character when reading auxiliary files
4892 \escapechar = `\@
4894 \commondummyletter\!%
4895 \commondummyaccent\"%
4896 \commondummyaccent\'%
4897 \commondummyletter\*%
4898 \commondummyaccent\,%
4899 \commondummyletter\.%
4900 \commondummyletter\/%
4901 \commondummyletter\:%
4902 \commondummyaccent\=%
4903 \commondummyletter\?%
4904 \commondummyaccent\^%
4905 \commondummyaccent\`%
4906 \commondummyaccent\~%
4908 % Control letters and accents.
4909 \commondummyword\u {}%
4910 \commondummyword\v {}%
4911 \commondummyword\H {}%
4912 \commondummyword\dotaccent {}%
4913 \commondummyword\ogonek {}%
4914 \commondummyword\ringaccent {}%
4915 \commondummyword\tieaccent {}%
4916 \commondummyword\ubaraccent {}%
4917 \commondummyword\udotaccent {}%
4918 \commondummyword\dotless {}%
4920 % Texinfo font commands.
4921 \commondummyword\b {}%
4922 \commondummyword\i {}%
4923 \commondummyword\r {}%
4924 \commondummyword\sansserif {}%
4925 \commondummyword\sc {}%
4926 \commondummyword\slanted {}%
4927 \commondummyword\t {}%
4929 % Commands that take arguments.
4930 \commondummyword\abbr {}%
4931 \commondummyword\acronym {}%
4932 \commondummyword\anchor {}%
4933 \commondummyword\cite {}%
4934 \commondummyword\code {}%
4935 \commondummyword\command {}%
4936 \commondummyword\dfn {}%
4937 \commondummyword\dmn {}%
4938 \commondummyword\email {}%
4939 \commondummyword\emph {}%
4940 \commondummyword\env {}%
4941 \commondummyword\file {}%
4942 \commondummyword\image {}%
4943 \commondummyword\indicateurl{}%
4944 \commondummyword\inforef {}%
4945 \commondummyword\kbd {}%
4946 \commondummyword\key {}%
4947 \commondummyword\math {}%
4948 \commondummyword\option {}%
4949 \commondummyword\pxref {}%
4950 \commondummyword\ref {}%
4951 \commondummyword\samp {}%
4952 \commondummyword\strong {}%
4953 \commondummyword\tie {}%
4954 \commondummyword\U {}%
4955 \commondummyword\uref {}%
4956 \commondummyword\url {}%
4957 \commondummyword\var {}%
4958 \commondummyword\verb {}%
4959 \commondummyword\w {}%
4960 \commondummyword\xref {}%
4962 \commondummyword\AA {AA}%
4963 \commondummyword\AE {AE}%
4964 \commondummyword\DH {DZZ}%
4965 \commondummyword\L {L}%
4966 \commondummyword\O {O}%
4967 \commondummyword\OE {OE}%
4968 \commondummyword\TH {TH}%
4969 \commondummyword\aa {aa}%
4970 \commondummyword\ae {ae}%
4971 \commondummyword\dh {dzz}%
4972 \commondummyword\exclamdown {!}%
4973 \commondummyword\l {l}%
4974 \commondummyword\o {o}%
4975 \commondummyword\oe {oe}%
4976 \commondummyword\ordf {a}%
4977 \commondummyword\ordm {o}%
4978 \commondummyword\questiondown {?}%
4979 \commondummyword\ss {ss}%
4980 \commondummyword\th {th}%
4982 \commondummyword\LaTeX {LaTeX}%
4983 \commondummyword\TeX {TeX}%
4985 % Assorted special characters.
4986 \commondummyword\ampchar {\normalamp}%
4987 \commondummyword\atchar {\@}%
4988 \commondummyword\arrow {->}%
4989 \commondummyword\backslashchar {\realbackslash}%
4990 \commondummyword\bullet {bullet}%
4991 \commondummyword\comma {,}%
4992 \commondummyword\copyright {copyright}%
4993 \commondummyword\dots {...}%
4994 \commondummyword\enddots {...}%
4995 \commondummyword\entrybreak {}%
4996 \commondummyword\equiv {===}%
4997 \commondummyword\error {error}%
4998 \commondummyword\euro {euro}%
4999 \commondummyword\expansion {==>}%
5000 \commondummyword\geq {>=}%
5001 \commondummyword\guillemetleft {<<}%
5002 \commondummyword\guillemetright {>>}%
5003 \commondummyword\guilsinglleft {<}%
5004 \commondummyword\guilsinglright {>}%
5005 \commondummyword\lbracechar {\{}%
5006 \commondummyword\leq {<=}%
5007 \commondummyword\mathopsup {sup}%
5008 \commondummyword\minus {-}%
5009 \commondummyword\pounds {pounds}%
5010 \commondummyword\point {.}%
5011 \commondummyword\print {-|}%
5012 \commondummyword\quotedblbase {"}%
5013 \commondummyword\quotedblleft {"}%
5014 \commondummyword\quotedblright {"}%
5015 \commondummyword\quoteleft {`}%
5016 \commondummyword\quoteright {'}%
5017 \commondummyword\quotesinglbase {,}%
5018 \commondummyword\rbracechar {\}}%
5019 \commondummyword\registeredsymbol {R}%
5020 \commondummyword\result {=>}%
5021 \commondummyword\sub {}%
5022 \commondummyword\sup {}%
5023 \commondummyword\textdegree {o}%
5026 \let\indexlbrace\relax
5027 \let\indexrbrace\relax
5028 \let\indexatchar\relax
5029 \let\indexbackslash\relax
5031 {\catcode`\@=0
5032 \catcode`\\=13
5033 @gdef@backslashdisappear{@def\{}}
5037 \catcode`\<=13
5038 \catcode`\-=13
5039 \catcode`\`=13
5040 \gdef\indexnonalnumdisappear{%
5041 \ifflagclear{txiindexlquoteignore}{}{%
5042 % @set txiindexlquoteignore makes us ignore left quotes in the sort term.
5043 % (Introduced for FSFS 2nd ed.)
5044 \let`=\empty
5047 \ifflagclear{txiindexbackslashignore}{}{%
5048 \backslashdisappear
5050 \ifflagclear{txiindexhyphenignore}{}{%
5051 \def-{}%
5053 \ifflagclear{txiindexlessthanignore}{}{%
5054 \def<{}%
5056 \ifflagclear{txiindexatsignignore}{}{%
5057 \def\@{}%
5061 \gdef\indexnonalnumreappear{%
5062 \let-\normaldash
5063 \let<\normalless
5068 % \indexnofonts is used when outputting the strings to sort the index
5069 % by, and when constructing control sequence names. It eliminates all
5070 % control sequences and just writes whatever the best ASCII sort string
5071 % would be for a given command (usually its argument).
5073 \def\indexnofonts{%
5074 \indexnofontstrue
5076 \def\ { }%
5077 \def\@{@}%
5078 \def\_{\normalunderscore}%
5079 \def\-{}% @- shouldn't affect sorting
5081 \uccode`\1=`\{ \uppercase{\def\{{1}}%
5082 \uccode`\1=`\} \uppercase{\def\}{1}}%
5083 \let\lbracechar\{%
5084 \let\rbracechar\}%
5087 % We need to get rid of all macros, leaving only the arguments (if present).
5088 % Of course this is not nearly correct, but it is the best we can do for now.
5090 % Since macro invocations are followed by braces, we can just redefine them
5091 % to take a single TeX argument. The case of a macro invocation that
5092 % goes to end-of-line is not handled.
5094 \def\commondummyword##1{\let##1\asis}%
5095 \macrolist
5096 \let\value\indexnofontsvalue
5102 % #1 is the index name, #2 is the entry text.
5103 \def\doind#1#2{%
5104 \iflinks
5107 \requireopenindexfile{#1}%
5108 \edef\writeto{\csname#1indfile\endcsname}%
5110 \def\indextext{#2}%
5111 \safewhatsit\doindwrite
5116 % Same as \doind, but for code indices
5117 \def\docind#1#2{%
5118 \iflinks
5121 \requireopenindexfile{#1}%
5122 \edef\writeto{\csname#1indfile\endcsname}%
5124 \def\indextext{#2}%
5125 \safewhatsit\docindwrite
5130 % Check if an index file has been opened, and if not, open it.
5131 \def\requireopenindexfile#1{%
5132 \ifnum\csname #1indfile\endcsname=0
5133 \expandafter\newwrite \csname#1indfile\endcsname
5134 \edef\suffix{#1}%
5135 % A .fls suffix would conflict with the file extension for the output
5136 % of -recorder, so use .f1s instead.
5137 \ifx\suffix\indexisfl\def\suffix{f1}\fi
5138 % Open the file
5139 \immediate\openout\csname#1indfile\endcsname \jobname.\suffix
5140 % Using \immediate above here prevents an object entering into the current
5141 % box, which could confound checks such as those in \safewhatsit for
5142 % preceding skips.
5143 \typeout{Writing index file \jobname.\suffix}%
5144 \fi}
5145 \def\indexisfl{fl}
5147 % Definition for writing index entry sort key.
5149 \catcode`\-=13
5150 \gdef\indexwritesortas{%
5151 \begingroup
5152 \indexnonalnumreappear
5153 \indexwritesortasxxx}
5154 \gdef\indexwritesortasxxx#1{%
5155 \xdef\indexsortkey{#1}\endgroup}
5158 \def\indexwriteseealso#1{
5159 \gdef\pagenumbertext{\string\seealso{#1}}%
5161 \def\indexwriteseeentry#1{
5162 \gdef\pagenumbertext{\string\seeentry{#1}}%
5165 % The default definitions
5166 \def\sortas#1{}%
5167 \def\seealso#1{\i{\putwordSeeAlso}\ #1}% for sorted index file only
5168 \def\putwordSeeAlso{See also}
5169 \def\seeentry#1{\i{\putwordSee}\ #1}% for sorted index file only
5172 % Given index entry text like "aaa @subentry bbb @sortas{ZZZ}":
5173 % * Set \bracedtext to "{aaa}{bbb}"
5174 % * Set \fullindexsortkey to "aaa @subentry ZZZ"
5175 % * If @seealso occurs, set \pagenumbertext
5177 \def\splitindexentry#1{%
5178 \gdef\fullindexsortkey{}%
5179 \xdef\bracedtext{}%
5180 \def\sep{}%
5181 \def\seealso##1{}%
5182 \def\seeentry##1{}%
5183 \expandafter\doindexsegment#1\subentry\finish\subentry
5186 % append the results from the next segment
5187 \def\doindexsegment#1\subentry{%
5188 \def\segment{#1}%
5189 \ifx\segment\isfinish
5190 \else
5192 % Fully expand the segment, throwing away any @sortas directives, and
5193 % trim spaces.
5194 \edef\trimmed{\segment}%
5195 \edef\trimmed{\expandafter\eatspaces\expandafter{\trimmed}}%
5196 \ifincodeindex
5197 \edef\trimmed{\noexpand\code{\trimmed}}%
5200 \xdef\bracedtext{\bracedtext{\trimmed}}%
5202 % Get the string to sort by. Process the segment with all
5203 % font commands turned off.
5204 \bgroup
5205 \let\sortas\indexwritesortas
5206 \let\seealso\indexwriteseealso
5207 \let\seeentry\indexwriteseeentry
5208 \indexnofonts
5209 % The braces around the commands are recognized by texindex.
5210 \def\lbracechar{{\string\indexlbrace}}%
5211 \def\rbracechar{{\string\indexrbrace}}%
5212 \let\{=\lbracechar
5213 \let\}=\rbracechar
5214 \def\@{{\string\indexatchar}}%
5215 \def\atchar##1{\@}%
5216 \def\backslashchar{{\string\indexbackslash}}%
5217 \uccode`\~=`\\ \uppercase{\let~\backslashchar}%
5219 \let\indexsortkey\empty
5220 \global\let\pagenumbertext\empty
5221 % Execute the segment and throw away the typeset output. This executes
5222 % any @sortas or @seealso commands in this segment.
5223 \setbox\dummybox = \hbox{\segment}%
5224 \ifx\indexsortkey\empty{%
5225 \indexnonalnumdisappear
5226 \xdef\trimmed{\segment}%
5227 \xdef\trimmed{\expandafter\eatspaces\expandafter{\trimmed}}%
5228 \xdef\indexsortkey{\trimmed}%
5229 \ifx\indexsortkey\empty
5230 \message{Empty index sort key near line \the\inputlineno}%
5231 \xdef\indexsortkey{ }%
5233 }\fi
5235 % Append to \fullindexsortkey.
5236 \edef\tmp{\gdef\noexpand\fullindexsortkey{%
5237 \fullindexsortkey\sep\indexsortkey}}%
5238 \tmp
5239 \egroup
5240 \def\sep{\subentry}%
5242 \expandafter\doindexsegment
5245 \def\isfinish{\finish}%
5246 \newbox\dummybox % used above
5248 \let\subentry\relax
5250 % Use \ instead of @ in index files. To support old texi2dvi and texindex.
5251 % This works without changing the escape character used in the toc or aux
5252 % files because the index entries are fully expanded here, and \string uses
5253 % the current value of \escapechar.
5254 \def\escapeisbackslash{\escapechar=`\\}
5256 % Use \ in index files by default. texi2dvi didn't support @ as the escape
5257 % character (as it checked for "\entry" in the files, and not "@entry"). When
5258 % the new version of texi2dvi has had a chance to become more prevalent, then
5259 % the escape character can change back to @ again. This should be an easy
5260 % change to make now because both @ and \ are only used as escape characters in
5261 % index files, never standing for themselves.
5263 \set txiindexescapeisbackslash
5265 % Write the entry in \indextext to the index file.
5268 \newif\ifincodeindex
5269 \def\doindwrite{\incodeindexfalse\doindwritex}
5270 \def\docindwrite{\incodeindextrue\doindwritex}
5272 \def\doindwritex{%
5273 \maybemarginindex
5275 \atdummies
5277 \ifflagclear{txiindexescapeisbackslash}{}{\escapeisbackslash}%
5279 % For texindex which always views { and } as separators.
5280 \def\{{\lbracechar{}}%
5281 \def\}{\rbracechar{}}%
5282 \uccode`\~=`\\ \uppercase{\def~{\backslashchar{}}}%
5284 % Split the entry into primary entry and any subentries, and get the index
5285 % sort key.
5286 \splitindexentry\indextext
5288 % Set up the complete index entry, with both the sort key and
5289 % the original text, including any font commands. We write
5290 % three arguments to \entry to the .?? file (four in the
5291 % subentry case), texindex reduces to two when writing the .??s
5292 % sorted result.
5294 \edef\temp{%
5295 \write\writeto{%
5296 \string\entry{\fullindexsortkey}%
5297 {\ifx\pagenumbertext\empty\noexpand\folio\else\pagenumbertext\fi}%
5298 \bracedtext}%
5300 \temp
5303 % Put the index entry in the margin if desired (undocumented).
5304 \def\maybemarginindex{%
5305 \ifx\SETmarginindex\relax\else
5306 \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \relax\indextext}}%
5309 \let\SETmarginindex=\relax
5312 % Take care of unwanted page breaks/skips around a whatsit:
5314 % If a skip is the last thing on the list now, preserve it
5315 % by backing up by \lastskip, doing the \write, then inserting
5316 % the skip again. Otherwise, the whatsit generated by the
5317 % \write or \pdfdest will make \lastskip zero. The result is that
5318 % sequences like this:
5319 % @end defun
5320 % @tindex whatever
5321 % @defun ...
5322 % will have extra space inserted, because the \medbreak in the
5323 % start of the @defun won't see the skip inserted by the @end of
5324 % the previous defun.
5326 % But don't do any of this if we're not in vertical mode. We
5327 % don't want to do a \vskip and prematurely end a paragraph.
5329 % Avoid page breaks due to these extra skips, too.
5331 % But wait, there is a catch there:
5332 % We'll have to check whether \lastskip is zero skip. \ifdim is not
5333 % sufficient for this purpose, as it ignores stretch and shrink parts
5334 % of the skip. The only way seems to be to check the textual
5335 % representation of the skip.
5337 % The following is almost like \def\zeroskipmacro{0.0pt} except that
5338 % the ``p'' and ``t'' characters have catcode \other, not 11 (letter).
5340 \edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname}
5342 \newskip\whatsitskip
5343 \newcount\whatsitpenalty
5345 % ..., ready, GO:
5347 \def\safewhatsit#1{\ifhmode
5349 \else
5350 % \lastskip and \lastpenalty cannot both be nonzero simultaneously.
5351 \whatsitskip = \lastskip
5352 \edef\lastskipmacro{\the\lastskip}%
5353 \whatsitpenalty = \lastpenalty
5355 % If \lastskip is nonzero, that means the last item was a
5356 % skip. And since a skip is discardable, that means this
5357 % -\whatsitskip glue we're inserting is preceded by a
5358 % non-discardable item, therefore it is not a potential
5359 % breakpoint, therefore no \nobreak needed.
5360 \ifx\lastskipmacro\zeroskipmacro
5361 \else
5362 \vskip-\whatsitskip
5367 \ifx\lastskipmacro\zeroskipmacro
5368 % If \lastskip was zero, perhaps the last item was a penalty, and
5369 % perhaps it was >=10000, e.g., a \nobreak. In that case, we want
5370 % to re-insert the same penalty (values >10000 are used for various
5371 % signals); since we just inserted a non-discardable item, any
5372 % following glue (such as a \parskip) would be a breakpoint. For example:
5373 % @deffn deffn-whatever
5374 % @vindex index-whatever
5375 % Description.
5376 % would allow a break between the index-whatever whatsit
5377 % and the "Description." paragraph.
5378 \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi
5379 \else
5380 % On the other hand, if we had a nonzero \lastskip,
5381 % this make-up glue would be preceded by a non-discardable item
5382 % (the whatsit from the \write), so we must insert a \nobreak.
5383 \nobreak\vskip\whatsitskip
5385 \fi}
5387 % The index entry written in the file actually looks like
5388 % \entry {sortstring}{page}{topic}
5389 % or
5390 % \entry {sortstring}{page}{topic}{subtopic}
5391 % The texindex program reads in these files and writes files
5392 % containing these kinds of lines:
5393 % \initial {c}
5394 % before the first topic whose initial is c
5395 % \entry {topic}{pagelist}
5396 % for a topic that is used without subtopics
5397 % \primary {topic}
5398 % \entry {topic}{}
5399 % for the beginning of a topic that is used with subtopics
5400 % \secondary {subtopic}{pagelist}
5401 % for each subtopic.
5402 % \secondary {subtopic}{}
5403 % for a subtopic with sub-subtopics
5404 % \tertiary {subtopic}{subsubtopic}{pagelist}
5405 % for each sub-subtopic.
5407 % Define the user-accessible indexing commands
5408 % @findex, @vindex, @kindex, @cindex.
5410 \def\findex {\fnindex}
5411 \def\kindex {\kyindex}
5412 \def\cindex {\cpindex}
5413 \def\vindex {\vrindex}
5414 \def\tindex {\tpindex}
5415 \def\pindex {\pgindex}
5417 % Define the macros used in formatting output of the sorted index material.
5419 % @printindex causes a particular index (the ??s file) to get printed.
5420 % It does not print any chapter heading (usually an @unnumbered).
5422 \parseargdef\printindex{\begingroup
5423 \dobreak \chapheadingskip{10000}%
5425 \smallfonts \rm
5426 \tolerance = 9500
5427 \plainfrenchspacing
5428 \everypar = {}% don't want the \kern\-parindent from indentation suppression.
5430 % See comment in \requireopenindexfile.
5431 \def\indexname{#1}\ifx\indexname\indexisfl\def\indexname{f1}\fi
5433 % See if the index file exists and is nonempty.
5434 \openin 1 \jobname.\indexname s
5435 \ifeof 1
5436 % \enddoublecolumns gets confused if there is no text in the index,
5437 % and it loses the chapter title and the aux file entries for the
5438 % index. The easiest way to prevent this problem is to make sure
5439 % there is some text.
5440 \putwordIndexNonexistent
5441 \typeout{No file \jobname.\indexname s.}%
5442 \else
5443 % If the index file exists but is empty, then \openin leaves \ifeof
5444 % false. We have to make TeX try to read something from the file, so
5445 % it can discover if there is anything in it.
5446 \read 1 to \thisline
5447 \ifeof 1
5448 \putwordIndexIsEmpty
5449 \else
5450 \expandafter\printindexzz\thisline\relax\relax\finish%
5453 \closein 1
5454 \endgroup}
5456 % If the index file starts with a backslash, forgo reading the index
5457 % file altogether. If somebody upgrades texinfo.tex they may still have
5458 % old index files using \ as the escape character. Reading this would
5459 % at best lead to typesetting garbage, at worst a TeX syntax error.
5460 \def\printindexzz#1#2\finish{%
5461 \ifflagclear{txiindexescapeisbackslash}{%
5462 \uccode`\~=`\\ \uppercase{\if\noexpand~}\noexpand#1
5463 \ifflagclear{txiskipindexfileswithbackslash}{%
5464 \errmessage{%
5465 ERROR: A sorted index file in an obsolete format was skipped.
5466 To fix this problem, please upgrade your version of 'texi2dvi'
5467 or 'texi2pdf' to that at <https://ftp.gnu.org/gnu/texinfo>.
5468 If you are using an old version of 'texindex' (part of the Texinfo
5469 distribution), you may also need to upgrade to a newer version (at least 6.0).
5470 You may be able to typeset the index if you run
5471 'texindex \jobname.\indexname' yourself.
5472 You could also try setting the 'txiindexescapeisbackslash' flag by
5473 running a command like
5474 'texi2dvi -t "@set txiindexescapeisbackslash" \jobname.texi'. If you do
5475 this, Texinfo will try to use index files in the old format.
5476 If you continue to have problems, deleting the index files and starting again
5477 might help (with 'rm \jobname.?? \jobname.??s')%
5480 (Skipped sorted index file in obsolete format)
5482 \else
5483 \begindoublecolumns
5484 \input \jobname.\indexname s
5485 \enddoublecolumns
5488 \begindoublecolumns
5489 \catcode`\\=0\relax
5491 % Make @ an escape character to give macros a chance to work. This
5492 % should work because we (hopefully) don't otherwise use @ in index files.
5493 %\catcode`\@=12\relax
5494 \catcode`\@=0\relax
5495 \input \jobname.\indexname s
5496 \enddoublecolumns
5500 % These macros are used by the sorted index file itself.
5501 % Change them to control the appearance of the index.
5503 {\catcode`\/=13 \catcode`\-=13 \catcode`\^=13 \catcode`\~=13 \catcode`\_=13
5504 \catcode`\|=13 \catcode`\<=13 \catcode`\>=13 \catcode`\+=13 \catcode`\"=13
5505 \catcode`\$=3
5506 \gdef\initialglyphs{%
5507 % special control sequences used in the index sort key
5508 \let\indexlbrace\{%
5509 \let\indexrbrace\}%
5510 \let\indexatchar\@%
5511 \def\indexbackslash{\math{\backslash}}%
5513 % Some changes for non-alphabetic characters. Using the glyphs from the
5514 % math fonts looks more consistent than the typewriter font used elsewhere
5515 % for these characters.
5516 \uccode`\~=`\\ \uppercase{\def~{\math{\backslash}}}
5518 % In case @\ is used for backslash
5519 \uppercase{\let\\=~}
5520 % Can't get bold backslash so don't use bold forward slash
5521 \catcode`\/=13
5522 \def/{{\secrmnotbold \normalslash}}%
5523 \def-{{\normaldash\normaldash}}% en dash `--'
5524 \def^{{\chapbf \normalcaret}}%
5525 \def~{{\chapbf \normaltilde}}%
5526 \def\_{%
5527 \leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }%
5528 \def|{$\vert$}%
5529 \def<{$\less$}%
5530 \def>{$\gtr$}%
5531 \def+{$\normalplus$}%
5534 \def\initial{%
5535 \bgroup
5536 \initialglyphs
5537 \initialx
5540 \def\initialx#1{%
5541 % Remove any glue we may have, we'll be inserting our own.
5542 \removelastskip
5544 % We like breaks before the index initials, so insert a bonus.
5545 % The glue before the bonus allows a little bit of space at the
5546 % bottom of a column to reduce an increase in inter-line spacing.
5547 \nobreak
5548 \vskip 0pt plus 5\baselineskip
5549 \penalty -300
5550 \vskip 0pt plus -5\baselineskip
5552 % Typeset the initial. Making this add up to a whole number of
5553 % baselineskips increases the chance of the dots lining up from column
5554 % to column. It still won't often be perfect, because of the stretch
5555 % we need before each entry, but it's better.
5557 % No shrink because it confuses \balancecolumns.
5558 \vskip 1.67\baselineskip plus 1\baselineskip
5559 \leftline{\secfonts \kern-0.05em \secbf #1}%
5560 % \secfonts is inside the argument of \leftline so that the change of
5561 % \baselineskip will not affect any glue inserted before the vbox that
5562 % \leftline creates.
5563 % Do our best not to break after the initial.
5564 \nobreak
5565 \vskip .33\baselineskip plus .1\baselineskip
5566 \egroup % \initialglyphs
5569 \newdimen\entryrightmargin
5570 \entryrightmargin=0pt
5572 % for PDF output, whether to make the text of the entry a link to the page
5573 % number. set for @contents and @shortcontents where there is only one
5574 % page number.
5575 \newif\iflinkentrytext
5577 % \entry typesets a paragraph consisting of the text (#1), dot leaders, and
5578 % then page number (#2) flushed to the right margin. It is used for index
5579 % and table of contents entries. The paragraph is indented by \leftskip.
5581 \def\entry{%
5582 \begingroup
5584 % Start a new paragraph if necessary, so our assignments below can't
5585 % affect previous text.
5586 \par
5588 % No extra space above this paragraph.
5589 \parskip = 0in
5591 % When reading the text of entry, convert explicit line breaks
5592 % from @* into spaces. The user might give these in long section
5593 % titles, for instance.
5594 \def\*{\unskip\space\ignorespaces}%
5595 \def\entrybreak{\hfil\break}% An undocumented command
5597 % Swallow the left brace of the text (first parameter):
5598 \afterassignment\doentry
5599 \let\temp =
5601 \def\entrybreak{\unskip\space\ignorespaces}%
5602 \def\doentry{%
5603 % Save the text of the entry in \boxA
5604 \global\setbox\boxA=\hbox\bgroup
5605 \bgroup % Instead of the swallowed brace.
5606 \noindent
5607 \aftergroup\finishentry
5608 % And now comes the text of the entry.
5609 % Not absorbing as a macro argument reduces the chance of problems
5610 % with catcodes occurring.
5612 {\catcode`\@=11
5613 % #1 is the page number
5614 \gdef\finishentry#1{%
5615 \egroup % end \boxA
5616 \dimen@ = \wd\boxA % Length of text of entry
5617 % add any leaders and page number to \boxA.
5618 \global\setbox\boxA=\hbox\bgroup
5619 \ifpdforxetex
5620 \iflinkentrytext
5621 \pdflinkpage{#1}{\unhbox\boxA}%
5622 \else
5623 \unhbox\boxA
5625 \else
5626 \unhbox\boxA
5629 % Get the width of the page numbers, and only use
5630 % leaders if they are present.
5631 \global\setbox\boxB = \hbox{#1}%
5632 \ifdim\wd\boxB = 0pt
5633 \null\nobreak\hfill\ %
5634 \else
5636 \null\nobreak\indexdotfill % Have leaders before the page number.
5638 \ifpdforxetex
5639 \pdfgettoks#1.%
5640 \hskip\skip\thinshrinkable\the\toksA
5641 \else
5642 \hskip\skip\thinshrinkable #1%
5645 \egroup % end \boxA
5647 % now output
5648 \ifdim\wd\boxB = 0pt
5649 \noindent\unhbox\boxA\par
5650 \nobreak
5651 \else\bgroup
5652 % We want the text of the entries to be aligned to the left, and the
5653 % page numbers to be aligned to the right.
5655 \parindent = 0pt
5656 \advance\leftskip by 0pt plus 1fil
5657 \advance\leftskip by 0pt plus -1fill
5658 \rightskip = 0pt plus -1fil
5659 \advance\rightskip by 0pt plus 1fill
5660 % Cause last line, which could consist of page numbers on their own
5661 % if the list of page numbers is long, to be aligned to the right.
5662 \parfillskip=0pt plus -1fill
5664 \advance\rightskip by \entryrightmargin
5665 % Determine how far we can stretch into the margin.
5666 % This allows, e.g., "Appendix H GNU Free Documentation License" to
5667 % fit on one line in @letterpaper format.
5668 \ifdim\entryrightmargin>2.1em
5669 \dimen@i=2.1em
5670 \else
5671 \dimen@i=0em
5673 \advance \parfillskip by 0pt minus 1\dimen@i
5675 \dimen@ii = \hsize
5676 \advance\dimen@ii by -1\leftskip
5677 \advance\dimen@ii by -1\entryrightmargin
5678 \advance\dimen@ii by 1\dimen@i
5679 \ifdim\wd\boxA > \dimen@ii % If the entry doesn't fit in one line
5680 \ifdim\dimen@ > 0.8\dimen@ii % due to long index text
5681 % Try to split the text roughly evenly. \dimen@ will be the length of
5682 % the first line.
5683 \dimen@ = 0.7\dimen@
5684 \dimen@ii = \hsize
5685 \ifnum\dimen@>\dimen@ii
5686 % If the entry is too long (for example, if it needs more than
5687 % two lines), use all the space in the first line.
5688 \dimen@ = \dimen@ii
5690 \advance\leftskip by 0pt plus 1fill % ragged right
5691 \advance \dimen@ by 1\rightskip
5692 \parshape = 2 0pt \dimen@ 0em \dimen@ii
5693 % Ideally we'd add a finite glue at the end of the first line only,
5694 % instead of using \parshape with explicit line lengths, but TeX
5695 % doesn't seem to provide a way to do such a thing.
5697 % Indent all lines but the first one.
5698 \advance\leftskip by 1em
5699 \advance\parindent by -1em
5700 \fi\fi
5701 \indent % start paragraph
5702 \unhbox\boxA
5704 % Do not prefer a separate line ending with a hyphen to fewer lines.
5705 \finalhyphendemerits = 0
5707 % Word spacing - no stretch
5708 \spaceskip=\fontdimen2\font minus \fontdimen4\font
5710 \linepenalty=1000 % Discourage line breaks.
5711 \hyphenpenalty=5000 % Discourage hyphenation.
5713 \par % format the paragraph
5714 \egroup % The \vbox
5716 \endgroup
5719 \newskip\thinshrinkable
5720 \skip\thinshrinkable=.15em minus .15em
5722 % Like plain.tex's \dotfill, except uses up at least 1 em.
5723 % The filll stretch here overpowers both the fil and fill stretch to push
5724 % the page number to the right.
5725 \def\indexdotfill{\cleaders
5726 \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1filll}
5729 \def\primary #1{\line{#1\hfil}}
5731 \def\secondary{\indententry{0.5cm}}
5732 \def\tertiary{\indententry{1cm}}
5734 \def\indententry#1#2#3{%
5735 \bgroup
5736 \leftskip=#1
5737 \entry{#2}{#3}%
5738 \egroup
5741 % Define two-column mode, which we use to typeset indexes.
5742 % Adapted from the TeXbook, page 416, which is to say,
5743 % the manmac.tex format used to print the TeXbook itself.
5744 \catcode`\@=11 % private names
5746 \newbox\partialpage
5747 \newdimen\doublecolumnhsize
5749 \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
5750 % If not much space left on page, start a new page.
5751 \ifdim\pagetotal>0.8\vsize\vfill\eject\fi
5753 % Grab any single-column material above us.
5754 \output = {%
5755 \savetopmark
5757 \global\setbox\partialpage = \vbox{%
5758 % Unvbox the main output page.
5759 \unvbox\PAGE
5760 \kern-\topskip \kern\baselineskip
5763 \eject % run that output routine to set \partialpage
5765 % Use the double-column output routine for subsequent pages.
5766 \output = {\doublecolumnout}%
5768 % Change the page size parameters. We could do this once outside this
5769 % routine, in each of @smallbook, @afourpaper, and the default 8.5x11
5770 % format, but then we repeat the same computation. Repeating a couple
5771 % of assignments once per index is clearly meaningless for the
5772 % execution time, so we may as well do it in one place.
5774 % First we halve the line length, less a little for the gutter between
5775 % the columns. We compute the gutter based on the line length, so it
5776 % changes automatically with the paper format. The magic constant
5777 % below is chosen so that the gutter has the same value (well, +-<1pt)
5778 % as it did when we hard-coded it.
5780 % We put the result in a separate register, \doublecolumhsize, so we
5781 % can restore it in \pagesofar, after \hsize itself has (potentially)
5782 % been clobbered.
5784 \doublecolumnhsize = \hsize
5785 \advance\doublecolumnhsize by -.04154\hsize
5786 \divide\doublecolumnhsize by 2
5787 \hsize = \doublecolumnhsize
5789 % Get the available space for the double columns -- the normal
5790 % (undoubled) page height minus any material left over from the
5791 % previous page.
5792 \advance\vsize by -\ht\partialpage
5793 \vsize = 2\vsize
5795 % For the benefit of balancing columns
5796 \advance\baselineskip by 0pt plus 0.5pt
5799 % The double-column output routine for all double-column pages except
5800 % the last, which is done by \balancecolumns.
5802 \def\doublecolumnout{%
5804 \savetopmark
5805 \splittopskip=\topskip \splitmaxdepth=\maxdepth
5806 \dimen@ = \vsize
5807 \divide\dimen@ by 2
5809 % box0 will be the left-hand column, box2 the right.
5810 \setbox0=\vsplit\PAGE to\dimen@ \setbox2=\vsplit\PAGE to\dimen@
5811 \global\advance\vsize by 2\ht\partialpage
5812 \onepageout\pagesofar % empty except for the first time we are called
5813 \unvbox\PAGE
5814 \penalty\outputpenalty
5817 % Re-output the contents of the output page -- any previous material,
5818 % followed by the two boxes we just split, in box0 and box2.
5819 \def\pagesofar{%
5820 \unvbox\partialpage
5822 \hsize = \doublecolumnhsize
5823 \wd0=\hsize \wd2=\hsize
5824 \hbox to\txipagewidth{\box0\hfil\box2}%
5828 % Finished with double columns.
5829 \def\enddoublecolumns{%
5830 % The following penalty ensures that the page builder is exercised
5831 % _before_ we change the output routine. This is necessary in the
5832 % following situation:
5834 % The last section of the index consists only of a single entry.
5835 % Before this section, \pagetotal is less than \pagegoal, so no
5836 % break occurs before the last section starts. However, the last
5837 % section, consisting of \initial and the single \entry, does not
5838 % fit on the page and has to be broken off. Without the following
5839 % penalty the page builder will not be exercised until \eject
5840 % below, and by that time we'll already have changed the output
5841 % routine to the \balancecolumns version, so the next-to-last
5842 % double-column page will be processed with \balancecolumns, which
5843 % is wrong: The two columns will go to the main vertical list, with
5844 % the broken-off section in the recent contributions. As soon as
5845 % the output routine finishes, TeX starts reconsidering the page
5846 % break. The two columns and the broken-off section both fit on the
5847 % page, because the two columns now take up only half of the page
5848 % goal. When TeX sees \eject from below which follows the final
5849 % section, it invokes the new output routine that we've set after
5850 % \balancecolumns below; \onepageout will try to fit the two columns
5851 % and the final section into the vbox of \txipageheight (see
5852 % \pagebody), causing an overfull box.
5854 % Note that glue won't work here, because glue does not exercise the
5855 % page builder, unlike penalties (see The TeXbook, pp. 280-281).
5856 \penalty0
5858 \output = {%
5859 % Split the last of the double-column material.
5860 \savetopmark
5861 \balancecolumns
5863 \eject % call the \output just set
5864 \ifdim\pagetotal=0pt
5865 % Having called \balancecolumns once, we do not
5866 % want to call it again. Therefore, reset \output to its normal
5867 % definition right away.
5868 \global\output=\expandafter{\the\defaultoutput}
5870 \endgroup % started in \begindoublecolumns
5871 % Leave the double-column material on the current page, no automatic
5872 % page break.
5873 \box\balancedcolumns
5875 % \pagegoal was set to the doubled \vsize above, since we restarted
5876 % the current page. We're now back to normal single-column
5877 % typesetting, so reset \pagegoal to the normal \vsize.
5878 \global\vsize = \txipageheight %
5879 \pagegoal = \txipageheight %
5880 \else
5881 % We had some left-over material. This might happen when \doublecolumnout
5882 % is called in \balancecolumns. Try again.
5883 \expandafter\enddoublecolumns
5886 \newbox\balancedcolumns
5887 \setbox\balancedcolumns=\vbox{shouldnt see this}%
5889 % Only called for the last of the double column material. \doublecolumnout
5890 % does the others.
5891 \def\balancecolumns{%
5892 \setbox0 = \vbox{\unvbox\PAGE}% like \box255 but more efficient, see p.120.
5893 \dimen@ = \ht0
5894 \ifdim\dimen@<7\baselineskip
5895 % Don't split a short final column in two.
5896 \setbox2=\vbox{}%
5897 \global\setbox\balancedcolumns=\vbox{\pagesofar}%
5898 \else
5899 % double the leading vertical space
5900 \advance\dimen@ by \topskip
5901 \advance\dimen@ by-\baselineskip
5902 \divide\dimen@ by 2 % target to split to
5903 \dimen@ii = \dimen@
5904 \splittopskip = \topskip
5905 % Loop until left column is at least as high as the right column.
5907 \vbadness = 10000
5908 \loop
5909 \global\setbox3 = \copy0
5910 \global\setbox1 = \vsplit3 to \dimen@
5911 \ifdim\ht1<\ht3
5912 \global\advance\dimen@ by 1pt
5913 \repeat
5915 % Now the left column is in box 1, and the right column in box 3.
5917 % Check whether the left column has come out higher than the page itself.
5918 % (Note that we have doubled \vsize for the double columns, so
5919 % the actual height of the page is 0.5\vsize).
5920 \ifdim2\ht1>\vsize
5921 % It appears that we have been called upon to balance too much material.
5922 % Output some of it with \doublecolumnout, leaving the rest on the page.
5923 \setbox\PAGE=\box0
5924 \doublecolumnout
5925 \else
5926 % Compare the heights of the two columns.
5927 \ifdim4\ht1>5\ht3
5928 % Column heights are too different, so don't make their bottoms
5929 % flush with each other.
5930 \setbox2=\vbox to \ht1 {\unvbox3\vfill}%
5931 \setbox0=\vbox to \ht1 {\unvbox1\vfill}%
5932 \else
5933 % Make column bottoms flush with each other.
5934 \setbox2=\vbox to\ht1{\unvbox3\unskip}%
5935 \setbox0=\vbox to\ht1{\unvbox1\unskip}%
5937 \global\setbox\balancedcolumns=\vbox{\pagesofar}%
5942 \catcode`\@ = \other
5945 \message{sectioning,}
5946 % Chapters, sections, etc.
5948 % Let's start with @part.
5949 \parseargdef\part{\partzzz{#1}}
5950 \def\partzzz#1{%
5951 \chapoddpage
5952 \null
5953 \vskip.3\vsize % move it down on the page a bit
5954 \begingroup
5955 \noindent \titlefonts\rm #1\par % the text
5956 \let\lastnode=\empty % no node to associate with
5957 \writetocentry{part}{#1}{}% but put it in the toc
5958 \headingsoff % no headline or footline on the part page
5959 % This outputs a mark at the end of the page that clears \thischapter
5960 % and \thissection, as is done in \startcontents.
5961 \let\pchapsepmacro\relax
5962 \chapmacro{}{Yomitfromtoc}{}%
5963 \chapoddpage
5964 \endgroup
5967 % \unnumberedno is an oxymoron. But we count the unnumbered
5968 % sections so that we can refer to them unambiguously in the pdf
5969 % outlines by their "section number". We avoid collisions with chapter
5970 % numbers by starting them at 10000. (If a document ever has 10000
5971 % chapters, we're in trouble anyway, I'm sure.)
5972 \newcount\unnumberedno \unnumberedno = 10000
5973 \newcount\chapno
5974 \newcount\secno \secno=0
5975 \newcount\subsecno \subsecno=0
5976 \newcount\subsubsecno \subsubsecno=0
5978 % This counter is funny since it counts through charcodes of letters A, B, ...
5979 \newcount\appendixno \appendixno = `\@
5981 % \def\appendixletter{\char\the\appendixno}
5982 % We do the following ugly conditional instead of the above simple
5983 % construct for the sake of pdftex, which needs the actual
5984 % letter in the expansion, not just typeset.
5986 \def\appendixletter{%
5987 \ifnum\appendixno=`A A%
5988 \else\ifnum\appendixno=`B B%
5989 \else\ifnum\appendixno=`C C%
5990 \else\ifnum\appendixno=`D D%
5991 \else\ifnum\appendixno=`E E%
5992 \else\ifnum\appendixno=`F F%
5993 \else\ifnum\appendixno=`G G%
5994 \else\ifnum\appendixno=`H H%
5995 \else\ifnum\appendixno=`I I%
5996 \else\ifnum\appendixno=`J J%
5997 \else\ifnum\appendixno=`K K%
5998 \else\ifnum\appendixno=`L L%
5999 \else\ifnum\appendixno=`M M%
6000 \else\ifnum\appendixno=`N N%
6001 \else\ifnum\appendixno=`O O%
6002 \else\ifnum\appendixno=`P P%
6003 \else\ifnum\appendixno=`Q Q%
6004 \else\ifnum\appendixno=`R R%
6005 \else\ifnum\appendixno=`S S%
6006 \else\ifnum\appendixno=`T T%
6007 \else\ifnum\appendixno=`U U%
6008 \else\ifnum\appendixno=`V V%
6009 \else\ifnum\appendixno=`W W%
6010 \else\ifnum\appendixno=`X X%
6011 \else\ifnum\appendixno=`Y Y%
6012 \else\ifnum\appendixno=`Z Z%
6013 % The \the is necessary, despite appearances, because \appendixletter is
6014 % expanded while writing the .toc file. \char\appendixno is not
6015 % expandable, thus it is written literally, thus all appendixes come out
6016 % with the same letter (or @) in the toc without it.
6017 \else\char\the\appendixno
6018 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
6019 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
6021 % Each @chapter defines these (using marks) as the number+name, number
6022 % and name of the chapter. Page headings and footings can use
6023 % these. @section does likewise.
6024 \def\thischapter{}
6025 \def\thischapternum{}
6026 \def\thischaptername{}
6027 \def\thissection{}
6028 \def\thissectionnum{}
6029 \def\thissectionname{}
6031 \newcount\absseclevel % used to calculate proper heading level
6032 \newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count
6034 % @raisesections: treat @section as chapter, @subsection as section, etc.
6035 \def\raisesections{\global\advance\secbase by -1}
6037 % @lowersections: treat @chapter as section, @section as subsection, etc.
6038 \def\lowersections{\global\advance\secbase by 1}
6040 % we only have subsub.
6041 \chardef\maxseclevel = 3
6043 % A numbered section within an unnumbered changes to unnumbered too.
6044 % To achieve this, remember the "biggest" unnum. sec. we are currently in:
6045 \chardef\unnlevel = \maxseclevel
6047 % Trace whether the current chapter is an appendix or not:
6048 % \chapheadtype is "N" or "A", unnumbered chapters are ignored.
6049 \def\chapheadtype{N}
6051 % Choose a heading macro
6052 % #1 is heading type
6053 % #2 is heading level
6054 % #3 is text for heading
6055 \def\genhead#1#2#3{%
6056 % Compute the abs. sec. level:
6057 \absseclevel=#2
6058 \advance\absseclevel by \secbase
6059 % Make sure \absseclevel doesn't fall outside the range:
6060 \ifnum \absseclevel < 0
6061 \absseclevel = 0
6062 \else
6063 \ifnum \absseclevel > 3
6064 \absseclevel = 3
6067 % The heading type:
6068 \def\headtype{#1}%
6069 \if \headtype U%
6070 \ifnum \absseclevel < \unnlevel
6071 \chardef\unnlevel = \absseclevel
6073 \else
6074 % Check for appendix sections:
6075 \ifnum \absseclevel = 0
6076 \edef\chapheadtype{\headtype}%
6077 \else
6078 \if \headtype A\if \chapheadtype N%
6079 \errmessage{@appendix... within a non-appendix chapter}%
6080 \fi\fi
6082 % Check for numbered within unnumbered:
6083 \ifnum \absseclevel > \unnlevel
6084 \def\headtype{U}%
6085 \else
6086 \chardef\unnlevel = 3
6089 % Now print the heading:
6090 \if \headtype U%
6091 \ifcase\absseclevel
6092 \unnumberedzzz{#3}%
6093 \or \unnumberedseczzz{#3}%
6094 \or \unnumberedsubseczzz{#3}%
6095 \or \unnumberedsubsubseczzz{#3}%
6097 \else
6098 \if \headtype A%
6099 \ifcase\absseclevel
6100 \appendixzzz{#3}%
6101 \or \appendixsectionzzz{#3}%
6102 \or \appendixsubseczzz{#3}%
6103 \or \appendixsubsubseczzz{#3}%
6105 \else
6106 \ifcase\absseclevel
6107 \chapterzzz{#3}%
6108 \or \seczzz{#3}%
6109 \or \numberedsubseczzz{#3}%
6110 \or \numberedsubsubseczzz{#3}%
6114 \suppressfirstparagraphindent
6117 % an interface:
6118 \def\numhead{\genhead N}
6119 \def\apphead{\genhead A}
6120 \def\unnmhead{\genhead U}
6122 % @chapter, @appendix, @unnumbered. Increment top-level counter, reset
6123 % all lower-level sectioning counters to zero.
6125 % Also set \chaplevelprefix, which we prepend to @float sequence numbers
6126 % (e.g., figures), q.v. By default (before any chapter), that is empty.
6127 \let\chaplevelprefix = \empty
6129 \outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz
6130 \def\chapterzzz#1{%
6131 % section resetting is \global in case the chapter is in a group, such
6132 % as an @include file.
6133 \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
6134 \global\advance\chapno by 1
6136 % Used for \float.
6137 \gdef\chaplevelprefix{\the\chapno.}%
6138 \resetallfloatnos
6140 % \putwordChapter can contain complex things in translations.
6141 \toks0=\expandafter{\putwordChapter}%
6142 \message{\the\toks0 \space \the\chapno}%
6144 % Write the actual heading.
6145 \chapmacro{#1}{Ynumbered}{\the\chapno}%
6147 % So @section and the like are numbered underneath this chapter.
6148 \global\let\section = \numberedsec
6149 \global\let\subsection = \numberedsubsec
6150 \global\let\subsubsection = \numberedsubsubsec
6153 \outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz
6155 \def\appendixzzz#1{%
6156 \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
6157 \global\advance\appendixno by 1
6158 \gdef\chaplevelprefix{\appendixletter.}%
6159 \resetallfloatnos
6161 % \putwordAppendix can contain complex things in translations.
6162 \toks0=\expandafter{\putwordAppendix}%
6163 \message{\the\toks0 \space \appendixletter}%
6165 \chapmacro{#1}{Yappendix}{\appendixletter}%
6167 \global\let\section = \appendixsec
6168 \global\let\subsection = \appendixsubsec
6169 \global\let\subsubsection = \appendixsubsubsec
6172 % normally unnmhead0 calls unnumberedzzz:
6173 \outer\parseargdef\unnumbered{\unnmhead0{#1}}
6174 \def\unnumberedzzz#1{%
6175 \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
6176 \global\advance\unnumberedno by 1
6178 % Since an unnumbered has no number, no prefix for figures.
6179 \global\let\chaplevelprefix = \empty
6180 \resetallfloatnos
6182 % This used to be simply \message{#1}, but TeX fully expands the
6183 % argument to \message. Therefore, if #1 contained @-commands, TeX
6184 % expanded them. For example, in `@unnumbered The @cite{Book}', TeX
6185 % expanded @cite (which turns out to cause errors because \cite is meant
6186 % to be executed, not expanded).
6188 % Anyway, we don't want the fully-expanded definition of @cite to appear
6189 % as a result of the \message, we just want `@cite' itself. We use
6190 % \the<toks register> to achieve this: TeX expands \the<toks> only once,
6191 % simply yielding the contents of <toks register>. (We also do this for
6192 % the toc entries.)
6193 \toks0 = {#1}%
6194 \message{(\the\toks0)}%
6196 \chapmacro{#1}{Ynothing}{\the\unnumberedno}%
6198 \global\let\section = \unnumberedsec
6199 \global\let\subsection = \unnumberedsubsec
6200 \global\let\subsubsection = \unnumberedsubsubsec
6203 % @centerchap is like @unnumbered, but the heading is centered.
6204 \outer\parseargdef\centerchap{%
6205 \let\centerparametersmaybe = \centerparameters
6206 \unnmhead0{#1}%
6207 \let\centerparametersmaybe = \relax
6210 % @top is like @unnumbered.
6211 \let\top\unnumbered
6213 % Sections.
6215 \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz
6216 \def\seczzz#1{%
6217 \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
6218 \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}%
6221 % normally calls appendixsectionzzz:
6222 \outer\parseargdef\appendixsection{\apphead1{#1}}
6223 \def\appendixsectionzzz#1{%
6224 \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
6225 \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}%
6227 \let\appendixsec\appendixsection
6229 % normally calls unnumberedseczzz:
6230 \outer\parseargdef\unnumberedsec{\unnmhead1{#1}}
6231 \def\unnumberedseczzz#1{%
6232 \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
6233 \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}%
6236 % Subsections.
6238 % normally calls numberedsubseczzz:
6239 \outer\parseargdef\numberedsubsec{\numhead2{#1}}
6240 \def\numberedsubseczzz#1{%
6241 \global\subsubsecno=0 \global\advance\subsecno by 1
6242 \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}%
6245 % normally calls appendixsubseczzz:
6246 \outer\parseargdef\appendixsubsec{\apphead2{#1}}
6247 \def\appendixsubseczzz#1{%
6248 \global\subsubsecno=0 \global\advance\subsecno by 1
6249 \sectionheading{#1}{subsec}{Yappendix}%
6250 {\appendixletter.\the\secno.\the\subsecno}%
6253 % normally calls unnumberedsubseczzz:
6254 \outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}}
6255 \def\unnumberedsubseczzz#1{%
6256 \global\subsubsecno=0 \global\advance\subsecno by 1
6257 \sectionheading{#1}{subsec}{Ynothing}%
6258 {\the\unnumberedno.\the\secno.\the\subsecno}%
6261 % Subsubsections.
6263 % normally numberedsubsubseczzz:
6264 \outer\parseargdef\numberedsubsubsec{\numhead3{#1}}
6265 \def\numberedsubsubseczzz#1{%
6266 \global\advance\subsubsecno by 1
6267 \sectionheading{#1}{subsubsec}{Ynumbered}%
6268 {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}%
6271 % normally appendixsubsubseczzz:
6272 \outer\parseargdef\appendixsubsubsec{\apphead3{#1}}
6273 \def\appendixsubsubseczzz#1{%
6274 \global\advance\subsubsecno by 1
6275 \sectionheading{#1}{subsubsec}{Yappendix}%
6276 {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}%
6279 % normally unnumberedsubsubseczzz:
6280 \outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}}
6281 \def\unnumberedsubsubseczzz#1{%
6282 \global\advance\subsubsecno by 1
6283 \sectionheading{#1}{subsubsec}{Ynothing}%
6284 {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}%
6287 % These macros control what the section commands do, according
6288 % to what kind of chapter we are in (ordinary, appendix, or unnumbered).
6289 % Define them by default for a numbered chapter.
6290 \let\section = \numberedsec
6291 \let\subsection = \numberedsubsec
6292 \let\subsubsection = \numberedsubsubsec
6294 % Define @majorheading, @heading and @subheading
6296 \def\majorheading{%
6297 {\advance\chapheadingskip by 10pt \chapbreak }%
6298 \parsearg\chapheadingzzz
6301 \def\chapheading{\chapbreak \parsearg\chapheadingzzz}
6302 \def\chapheadingzzz#1{%
6303 \vbox{\chapfonts \raggedtitlesettings #1\par}%
6304 \nobreak\bigskip \nobreak
6305 \suppressfirstparagraphindent
6308 % @heading, @subheading, @subsubheading.
6309 \parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{}
6310 \suppressfirstparagraphindent}
6311 \parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{}
6312 \suppressfirstparagraphindent}
6313 \parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{}
6314 \suppressfirstparagraphindent}
6316 % These macros generate a chapter, section, etc. heading only
6317 % (including whitespace, linebreaking, etc. around it),
6318 % given all the information in convenient, parsed form.
6320 % Args are the skip and penalty (usually negative)
6321 \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
6323 % Parameter controlling skip before chapter headings (if needed)
6324 \newskip\chapheadingskip
6326 % Define plain chapter starts, and page on/off switching for it.
6327 \def\chapbreak{\dobreak \chapheadingskip {-4000}}
6329 % Start a new page
6330 \def\chappager{\par\vfill\supereject}
6332 % \chapoddpage - start on an odd page for a new chapter
6333 % Because \domark is called before \chapoddpage, the filler page will
6334 % get the headings for the next chapter, which is wrong. But we don't
6335 % care -- we just disable all headings on the filler page.
6336 \def\chapoddpage{%
6337 \chappager
6338 \ifodd\pageno \else
6339 \begingroup
6340 \headingsoff
6341 \null
6342 \chappager
6343 \endgroup
6347 \parseargdef\setchapternewpage{\csname CHAPPAG#1\endcsname\HEADINGSon}
6349 \def\CHAPPAGoff{%
6350 \global\let\contentsalignmacro = \chappager
6351 \global\let\pchapsepmacro=\chapbreak
6352 \global\def\HEADINGSon{\HEADINGSsinglechapoff}}
6354 \def\CHAPPAGon{%
6355 \global\let\contentsalignmacro = \chappager
6356 \global\let\pchapsepmacro=\chappager
6357 \global\def\HEADINGSon{\HEADINGSsingle}}
6359 \def\CHAPPAGodd{%
6360 \global\let\contentsalignmacro = \chapoddpage
6361 \global\let\pchapsepmacro=\chapoddpage
6362 \global\def\HEADINGSon{\HEADINGSdouble}}
6364 \setchapternewpage on
6366 % \chapmacro - Chapter opening.
6368 % #1 is the text, #2 is the section type (Ynumbered, Ynothing,
6369 % Yappendix, Yomitfromtoc), #3 the chapter number.
6370 % Not used for @heading series.
6372 % To test against our argument.
6373 \def\Ynothingkeyword{Ynothing}
6374 \def\Yappendixkeyword{Yappendix}
6375 \def\Yomitfromtockeyword{Yomitfromtoc}
6378 % Definitions for @thischapter. These can be overridden in translation
6379 % files.
6380 \def\thischapterAppendix{%
6381 \putwordAppendix{} \thischapternum: \thischaptername}
6383 \def\thischapterChapter{%
6384 \putwordChapter{} \thischapternum: \thischaptername}
6387 \def\chapmacro#1#2#3{%
6388 \expandafter\ifx\thisenv\titlepage\else
6389 \checkenv{}% chapters, etc., should not start inside an environment.
6391 % Insert the first mark before the heading break (see notes for \domark).
6392 \let\prevchapterdefs=\currentchapterdefs
6393 \let\prevsectiondefs=\currentsectiondefs
6394 \gdef\currentsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}%
6395 \gdef\thissection{}}%
6397 \def\temptype{#2}%
6398 \ifx\temptype\Ynothingkeyword
6399 \gdef\currentchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
6400 \gdef\thischapter{\thischaptername}}%
6401 \else\ifx\temptype\Yomitfromtockeyword
6402 \gdef\currentchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
6403 \gdef\thischapter{}}%
6404 \else\ifx\temptype\Yappendixkeyword
6405 \toks0={#1}%
6406 \xdef\currentchapterdefs{%
6407 \gdef\noexpand\thischaptername{\the\toks0}%
6408 \gdef\noexpand\thischapternum{\appendixletter}%
6409 \let\noexpand\thischapter\noexpand\thischapterAppendix
6411 \else
6412 \toks0={#1}%
6413 \xdef\currentchapterdefs{%
6414 \gdef\noexpand\thischaptername{\the\toks0}%
6415 \gdef\noexpand\thischapternum{\the\chapno}%
6416 \let\noexpand\thischapter\noexpand\thischapterChapter
6418 \fi\fi\fi
6420 % Output the mark. Pass it through \safewhatsit, to take care of
6421 % the preceding space.
6422 \safewhatsit\domark
6424 % Insert the chapter heading break.
6425 \pchapsepmacro
6427 % Now the second mark, after the heading break. No break points
6428 % between here and the heading.
6429 \let\prevchapterdefs=\currentchapterdefs
6430 \let\prevsectiondefs=\currentsectiondefs
6431 \domark
6434 \chapfonts \rm
6435 \let\footnote=\errfootnoteheading % give better error message
6437 % Have to define \currentsection before calling \donoderef, because the
6438 % xref code eventually uses it. On the other hand, it has to be called
6439 % after \pchapsepmacro, or the headline will change too soon.
6440 \gdef\currentsection{#1}%
6442 % Only insert the separating space if we have a chapter/appendix
6443 % number, and don't print the unnumbered ``number''.
6444 \ifx\temptype\Ynothingkeyword
6445 \setbox0 = \hbox{}%
6446 \def\toctype{unnchap}%
6447 \else\ifx\temptype\Yomitfromtockeyword
6448 \setbox0 = \hbox{}% contents like unnumbered, but no toc entry
6449 \def\toctype{omit}%
6450 \else\ifx\temptype\Yappendixkeyword
6451 \setbox0 = \hbox{\putwordAppendix{} #3\enspace}%
6452 \def\toctype{app}%
6453 \else
6454 \setbox0 = \hbox{#3\enspace}%
6455 \def\toctype{numchap}%
6456 \fi\fi\fi
6458 % Write the toc entry for this chapter. Must come before the
6459 % \donoderef, because we include the current node name in the toc
6460 % entry, and \donoderef resets it to empty.
6461 \writetocentry{\toctype}{#1}{#3}%
6463 % For pdftex, we have to write out the node definition (aka, make
6464 % the pdfdest) after any page break, but before the actual text has
6465 % been typeset. If the destination for the pdf outline is after the
6466 % text, then jumping from the outline may wind up with the text not
6467 % being visible, for instance under high magnification.
6468 \donoderef{#2}%
6470 % Typeset the actual heading.
6471 \nobreak % Avoid page breaks at the interline glue.
6472 \vbox{\raggedtitlesettings \hangindent=\wd0 \centerparametersmaybe
6473 \unhbox0 #1\par}%
6475 \nobreak\bigskip % no page break after a chapter title
6476 \nobreak
6479 % @centerchap -- centered and unnumbered.
6480 \let\centerparametersmaybe = \relax
6481 \def\centerparameters{%
6482 \advance\rightskip by 3\rightskip
6483 \leftskip = \rightskip
6484 \parfillskip = 0pt
6488 % Section titles. These macros combine the section number parts and
6489 % call the generic \sectionheading to do the printing.
6491 \newskip\secheadingskip
6492 \def\secheadingbreak{\dobreak \secheadingskip{-1000}}
6494 % Subsection titles.
6495 \newskip\subsecheadingskip
6496 \def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}}
6498 % Subsubsection titles.
6499 \def\subsubsecheadingskip{\subsecheadingskip}
6500 \def\subsubsecheadingbreak{\subsecheadingbreak}
6502 % Definition for @thissection. This can be overridden in translation
6503 % files.
6504 \def\thissectionDef{%
6505 \putwordSection{} \thissectionnum: \thissectionname}
6509 % Print any size, any type, section title.
6511 % #1 is the text of the title,
6512 % #2 is the section level (sec/subsec/subsubsec),
6513 % #3 is the section type (Ynumbered, Ynothing, Yappendix, Yomitfromtoc),
6514 % #4 is the section number.
6516 \def\seckeyword{sec}
6518 \def\sectionheading#1#2#3#4{%
6520 \def\sectionlevel{#2}%
6521 \def\temptype{#3}%
6523 % It is ok for the @heading series commands to appear inside an
6524 % environment (it's been historically allowed, though the logic is
6525 % dubious), but not the others.
6526 \ifx\temptype\Yomitfromtockeyword\else
6527 \checkenv{}% non-@*heading should not be in an environment.
6529 \let\footnote=\errfootnoteheading
6531 % Switch to the right set of fonts.
6532 \csname #2fonts\endcsname \rm
6534 % Insert first mark before the heading break (see notes for \domark).
6535 \let\prevsectiondefs=\currentsectiondefs
6536 \ifx\temptype\Ynothingkeyword
6537 \ifx\sectionlevel\seckeyword
6538 \gdef\currentsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}%
6539 \gdef\thissection{\thissectionname}}%
6541 \else\ifx\temptype\Yomitfromtockeyword
6542 % Don't redefine \thissection.
6543 \else\ifx\temptype\Yappendixkeyword
6544 \ifx\sectionlevel\seckeyword
6545 \toks0={#1}%
6546 \xdef\currentsectiondefs{%
6547 \gdef\noexpand\thissectionname{\the\toks0}%
6548 \gdef\noexpand\thissectionnum{#4}%
6549 \let\noexpand\thissection\noexpand\thissectionDef
6552 \else
6553 \ifx\sectionlevel\seckeyword
6554 \toks0={#1}%
6555 \xdef\currentsectiondefs{%
6556 \gdef\noexpand\thissectionname{\the\toks0}%
6557 \gdef\noexpand\thissectionnum{#4}%
6558 \let\noexpand\thissection\noexpand\thissectionDef
6561 \fi\fi\fi
6563 % Go into vertical mode. Usually we'll already be there, but we
6564 % don't want the following whatsit to end up in a preceding paragraph
6565 % if the document didn't happen to have a blank line.
6566 \par
6568 % Output the mark. Pass it through \safewhatsit, to take care of
6569 % the preceding space.
6570 \safewhatsit\domark
6572 % Insert space above the heading.
6573 \csname #2headingbreak\endcsname
6575 % Now the second mark, after the heading break. No break points
6576 % between here and the heading.
6577 \global\let\prevsectiondefs=\currentsectiondefs
6578 \domark
6580 % Only insert the space after the number if we have a section number.
6581 \ifx\temptype\Ynothingkeyword
6582 \setbox0 = \hbox{}%
6583 \def\toctype{unn}%
6584 \gdef\currentsection{#1}%
6585 \else\ifx\temptype\Yomitfromtockeyword
6586 % for @headings -- no section number, don't include in toc,
6587 % and don't redefine \currentsection.
6588 \setbox0 = \hbox{}%
6589 \def\toctype{omit}%
6590 \let\sectionlevel=\empty
6591 \else\ifx\temptype\Yappendixkeyword
6592 \setbox0 = \hbox{#4\enspace}%
6593 \def\toctype{app}%
6594 \gdef\currentsection{#1}%
6595 \else
6596 \setbox0 = \hbox{#4\enspace}%
6597 \def\toctype{num}%
6598 \gdef\currentsection{#1}%
6599 \fi\fi\fi
6601 % Write the toc entry (before \donoderef). See comments in \chapmacro.
6602 \writetocentry{\toctype\sectionlevel}{#1}{#4}%
6604 % Write the node reference (= pdf destination for pdftex).
6605 % Again, see comments in \chapmacro.
6606 \donoderef{#3}%
6608 % Interline glue will be inserted when the vbox is completed.
6609 % That glue will be a valid breakpoint for the page, since it'll be
6610 % preceded by a whatsit (usually from the \donoderef, or from the
6611 % \writetocentry if there was no node). We don't want to allow that
6612 % break, since then the whatsits could end up on page n while the
6613 % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000.
6614 \nobreak
6616 % Output the actual section heading.
6617 \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
6618 \hangindent=\wd0 % zero if no section number
6619 \unhbox0 #1}%
6621 % Add extra space after the heading -- half of whatever came above it.
6622 % Don't allow stretch, though.
6623 \kern .5 \csname #2headingskip\endcsname
6625 % Do not let the kern be a potential breakpoint, as it would be if it
6626 % was followed by glue.
6627 \nobreak
6629 % We'll almost certainly start a paragraph next, so don't let that
6630 % glue accumulate. (Not a breakpoint because it's preceded by a
6631 % discardable item.) However, when a paragraph is not started next
6632 % (\startdefun, \cartouche, \center, etc.), this needs to be wiped out
6633 % or the negative glue will cause weirdly wrong output, typically
6634 % obscuring the section heading with something else.
6635 \vskip-\parskip
6637 % This is so the last item on the main vertical list is a known
6638 % \penalty > 10000, so \startdefun, etc., can recognize the situation
6639 % and do the needful.
6640 \penalty 10001
6644 \message{toc,}
6645 % Table of contents.
6646 \newwrite\tocfile
6648 % Write an entry to the toc file, opening it if necessary.
6649 % Called from @chapter, etc.
6651 % Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno}
6652 % We append the current node name (if any) and page number as additional
6653 % arguments for the \{chap,sec,...}entry macros which will eventually
6654 % read this. The node name is used in the pdf outlines as the
6655 % destination to jump to.
6657 % We open the .toc file for writing here instead of at @setfilename (or
6658 % any other fixed time) so that @contents can be anywhere in the document.
6659 % But if #1 is `omit', then we don't do anything. This is used for the
6660 % table of contents chapter openings themselves.
6662 \newif\iftocfileopened
6663 \def\omitkeyword{omit}%
6665 \def\writetocentry#1#2#3{%
6666 \edef\writetoctype{#1}%
6667 \ifx\writetoctype\omitkeyword \else
6668 \iftocfileopened\else
6669 \immediate\openout\tocfile = \jobname.toc
6670 \global\tocfileopenedtrue
6673 \iflinks
6674 {\atdummies
6675 \edef\temp{%
6676 \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}%
6677 \temp
6682 % Tell \shipout to create a pdf destination on each page, if we're
6683 % writing pdf. These are used in the table of contents. We can't
6684 % just write one on every page because the title pages are numbered
6685 % 1 and 2 (the page numbers aren't printed), and so are the first
6686 % two pages of the document. Thus, we'd have two destinations named
6687 % `1', and two named `2'.
6688 \ifpdforxetex
6689 \global\pdfmakepagedesttrue
6694 % These characters do not print properly in the Computer Modern roman
6695 % fonts, so we must take special care. This is more or less redundant
6696 % with the Texinfo input format setup at the end of this file.
6698 \def\activecatcodes{%
6699 \catcode`\"=\active
6700 \catcode`\$=\active
6701 \catcode`\<=\active
6702 \catcode`\>=\active
6703 \catcode`\\=\active
6704 \catcode`\^=\active
6705 \catcode`\_=\active
6706 \catcode`\|=\active
6707 \catcode`\~=\active
6711 % Read the toc file, which is essentially Texinfo input.
6712 \def\readtocfile{%
6713 \setupdatafile
6714 \activecatcodes
6715 \input \tocreadfilename
6718 \newskip\contentsrightmargin \contentsrightmargin=1in
6719 \newcount\savepageno
6720 \newcount\lastnegativepageno \lastnegativepageno = -1
6722 % Prepare to read what we've written to \tocfile.
6724 \def\startcontents#1{%
6725 % If @setchapternewpage on, and @headings double, the contents should
6726 % start on an odd page, unlike chapters.
6727 \contentsalignmacro
6728 \immediate\closeout\tocfile
6730 % Don't need to put `Contents' or `Short Contents' in the headline.
6731 % It is abundantly clear what they are.
6732 \chapmacro{#1}{Yomitfromtoc}{}%
6734 \savepageno = \pageno
6735 \begingroup % Set up to handle contents files properly.
6736 \raggedbottom % Worry more about breakpoints than the bottom.
6737 \entryrightmargin=\contentsrightmargin % Don't use the full line length.
6739 % Roman numerals for page numbers.
6740 \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi
6741 \def\thistitle{}% no title in double-sided headings
6742 % Record where the Roman numerals started.
6743 \ifnum\romancount=0 \global\romancount=\pagecount \fi
6744 \linkentrytexttrue
6747 % \raggedbottom in plain.tex hardcodes \topskip so override it
6748 \catcode`\@=11
6749 \def\raggedbottom{\advance\topskip by 0pt plus60pt \r@ggedbottomtrue}
6750 \catcode`\@=\other
6752 % redefined for the two-volume lispref. We always output on
6753 % \jobname.toc even if this is redefined.
6755 \def\tocreadfilename{\jobname.toc}
6757 % Normal (long) toc.
6759 \def\contents{%
6760 \startcontents{\putwordTOC}%
6761 \openin 1 \tocreadfilename\space
6762 \ifeof 1 \else
6763 \readtocfile
6765 \vfill \eject
6766 \contentsalignmacro % in case @setchapternewpage odd is in effect
6767 \ifeof 1 \else
6768 \pdfmakeoutlines
6770 \closein 1
6771 \endgroup
6772 \contentsendroman
6775 % And just the chapters.
6776 \def\summarycontents{%
6777 \startcontents{\putwordShortTOC}%
6779 \let\partentry = \shortpartentry
6780 \let\numchapentry = \shortchapentry
6781 \let\appentry = \shortchapentry
6782 \let\unnchapentry = \shortunnchapentry
6783 % We want a true roman here for the page numbers.
6784 \secfonts
6785 \let\rm=\shortcontrm \let\bf=\shortcontbf
6786 \let\sl=\shortcontsl \let\tt=\shortconttt
6788 \hyphenpenalty = 10000
6789 \advance\baselineskip by 1pt % Open it up a little.
6790 \def\numsecentry##1##2##3##4{}
6791 \let\appsecentry = \numsecentry
6792 \let\unnsecentry = \numsecentry
6793 \let\numsubsecentry = \numsecentry
6794 \let\appsubsecentry = \numsecentry
6795 \let\unnsubsecentry = \numsecentry
6796 \let\numsubsubsecentry = \numsecentry
6797 \let\appsubsubsecentry = \numsecentry
6798 \let\unnsubsubsecentry = \numsecentry
6799 \openin 1 \tocreadfilename\space
6800 \ifeof 1 \else
6801 \readtocfile
6803 \closein 1
6804 \vfill \eject
6805 \contentsalignmacro % in case @setchapternewpage odd is in effect
6806 \endgroup
6807 \contentsendroman
6809 \let\shortcontents = \summarycontents
6811 % Get ready to use Arabic numerals again
6812 \def\contentsendroman{%
6813 \lastnegativepageno = \pageno
6814 \global\pageno = \savepageno
6816 % If \romancount > \arabiccount, the contents are at the end of the
6817 % document. Otherwise, advance where the Arabic numerals start for
6818 % the page numbers.
6819 \ifnum\romancount>\arabiccount\else\global\arabiccount=\pagecount\fi
6822 % Typeset the label for a chapter or appendix for the short contents.
6823 % The arg is, e.g., `A' for an appendix, or `3' for a chapter.
6825 \def\shortchaplabel#1{%
6826 % This space should be enough, since a single number is .5em, and the
6827 % widest letter (M) is 1em, at least in the Computer Modern fonts.
6828 % But use \hss just in case.
6829 % (This space doesn't include the extra space that gets added after
6830 % the label; that gets put in by \shortchapentry above.)
6832 % We'd like to right-justify chapter numbers, but that looks strange
6833 % with appendix letters. And right-justifying numbers and
6834 % left-justifying letters looks strange when there is less than 10
6835 % chapters. Have to read the whole toc once to know how many chapters
6836 % there are before deciding ...
6837 \hbox to 1em{#1\hss}%
6840 % These macros generate individual entries in the table of contents.
6841 % The first argument is the chapter or section name.
6842 % The last argument is the page number.
6843 % The arguments in between are the chapter number, section number, ...
6845 % Parts, in the main contents. Replace the part number, which doesn't
6846 % exist, with an empty box. Let's hope all the numbers have the same width.
6847 % Also ignore the page number, which is conventionally not printed.
6848 \def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}}
6849 \def\partentry#1#2#3#4{%
6850 % Add stretch and a bonus for breaking the page before the part heading.
6851 % This reduces the chance of the page being broken immediately after the
6852 % part heading, before a following chapter heading.
6853 \vskip 0pt plus 5\baselineskip
6854 \penalty-300
6855 \vskip 0pt plus -5\baselineskip
6856 \dochapentry{\numeralbox\labelspace#1}{}%
6859 % Parts, in the short toc.
6860 \def\shortpartentry#1#2#3#4{%
6861 \penalty-300
6862 \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip
6863 \shortchapentry{{\bf #1}}{\numeralbox}{}{}%
6866 % Chapters, in the main contents.
6867 \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
6869 % Chapters, in the short toc.
6870 % See comments in \dochapentry re vbox and related settings.
6871 \def\shortchapentry#1#2#3#4{%
6872 \tocentry{\shortchaplabel{#2}\labelspace #1}{#4}%
6875 % Appendices, in the main contents.
6876 % Need the word Appendix, and a fixed-size box.
6878 \def\appendixbox#1{%
6879 % We use M since it's probably the widest letter.
6880 \setbox0 = \hbox{\putwordAppendix{} M}%
6881 \hbox to \wd0{\putwordAppendix{} #1\hss}}
6883 \def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\hskip.7em#1}{#4}}
6885 % Unnumbered chapters.
6886 \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}}
6887 \def\shortunnchapentry#1#2#3#4{\tocentry{#1}{#4}}
6889 % Sections.
6890 \def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}}
6891 \let\appsecentry=\numsecentry
6892 \def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}}
6894 % Subsections.
6895 \def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}}
6896 \let\appsubsecentry=\numsubsecentry
6897 \def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}}
6899 % And subsubsections.
6900 \def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}}
6901 \let\appsubsubsecentry=\numsubsubsecentry
6902 \def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}}
6904 % This parameter controls the indentation of the various levels.
6905 % Same as \defaultparindent.
6906 \newdimen\tocindent \tocindent = 15pt
6908 % Now for the actual typesetting. In all these, #1 is the text and #2 is the
6909 % page number.
6911 % If the toc has to be broken over pages, we want it to be at chapters
6912 % if at all possible; hence the \penalty.
6913 \def\dochapentry#1#2{%
6914 \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
6915 \begingroup
6916 % Move the page numbers slightly to the right
6917 \advance\entryrightmargin by -0.05em
6918 \chapentryfonts
6919 \tocentry{#1}{#2}%
6920 \endgroup
6921 \nobreak\vskip .25\baselineskip plus.1\baselineskip
6924 \def\dosecentry#1#2{\begingroup
6925 \secentryfonts \leftskip=\tocindent
6926 \tocentry{#1}{#2}%
6927 \endgroup}
6929 \def\dosubsecentry#1#2{\begingroup
6930 \subsecentryfonts \leftskip=2\tocindent
6931 \tocentry{#1}{#2}%
6932 \endgroup}
6934 \def\dosubsubsecentry#1#2{\begingroup
6935 \subsubsecentryfonts \leftskip=3\tocindent
6936 \tocentry{#1}{#2}%
6937 \endgroup}
6939 % We use the same \entry macro as for the index entries.
6940 \let\tocentry = \entry
6942 % Space between chapter (or whatever) number and the title.
6943 \def\labelspace{\hskip1em \relax}
6945 \def\chapentryfonts{\secfonts \rm}
6946 \def\secentryfonts{\textfonts}
6947 \def\subsecentryfonts{\textfonts}
6948 \def\subsubsecentryfonts{\textfonts}
6951 \message{environments,}
6952 % @foo ... @end foo.
6954 % @tex ... @end tex escapes into raw TeX temporarily.
6955 % One exception: @ is still an escape character, so that @end tex works.
6956 % But \@ or @@ will get a plain @ character.
6958 \envdef\tex{%
6959 \setregularquotes
6960 \catcode `\\=0 \catcode `\{=1 \catcode `\}=2
6961 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6
6962 \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie
6963 \catcode `\%=14
6964 \catcode `\+=\other
6965 \catcode `\"=\other
6966 \catcode `\|=\other
6967 \catcode `\<=\other
6968 \catcode `\>=\other
6969 \catcode `\`=\other
6970 \catcode `\'=\other
6972 % ' is active in math mode (mathcode"8000). So reset it, and all our
6973 % other math active characters (just in case), to plain's definitions.
6974 \mathactive
6976 % Inverse of the list at the beginning of the file.
6977 \let\b=\ptexb
6978 \let\bullet=\ptexbullet
6979 \let\c=\ptexc
6980 \let\,=\ptexcomma
6981 \let\.=\ptexdot
6982 \let\dots=\ptexdots
6983 \let\equiv=\ptexequiv
6984 \let\!=\ptexexclam
6985 \let\i=\ptexi
6986 \let\indent=\ptexindent
6987 \let\noindent=\ptexnoindent
6988 \let\{=\ptexlbrace
6989 \let\+=\tabalign
6990 \let\}=\ptexrbrace
6991 \let\/=\ptexslash
6992 \let\sp=\ptexsp
6993 \let\*=\ptexstar
6994 %\let\sup=\ptexsup % do not redefine, we want @sup to work in math mode
6995 \let\t=\ptext
6996 \expandafter \let\csname top\endcsname=\ptextop % we've made it outer
6997 \let\frenchspacing=\plainfrenchspacing
6999 \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
7000 \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
7001 \def\@{@}%
7003 % There is no need to define \Etex.
7005 % Define @lisp ... @end lisp.
7006 % @lisp environment forms a group so it can rebind things,
7007 % including the definition of @end lisp (which normally is erroneous).
7009 % Amount to narrow the margins by for @lisp.
7010 \newskip\lispnarrowing \lispnarrowing=0.4in
7012 % This is the definition that ^^M gets inside @lisp, @example, and other
7013 % such environments. \null is better than a space, since it doesn't
7014 % have any width.
7015 \def\lisppar{\null\endgraf}
7017 % This space is always present above and below environments.
7018 \newskip\envskipamount \envskipamount = 0pt
7020 % Make spacing and below environment symmetrical. We use \parskip here
7021 % to help in doing that, since in @example-like environments \parskip
7022 % is reset to zero; thus the \afterenvbreak inserts no space -- but the
7023 % start of the next paragraph will insert \parskip.
7025 \def\aboveenvbreak{{%
7026 % =10000 instead of <10000 because of a special case in \itemzzz and
7027 % \sectionheading, q.v.
7028 \ifnum \lastpenalty=10000 \else
7029 \advance\envskipamount by \parskip
7030 \endgraf
7031 \ifdim\lastskip<\envskipamount
7032 \removelastskip
7033 \ifnum\lastpenalty<10000
7034 % Penalize breaking before the environment, because preceding text
7035 % often leads into it.
7036 \penalty100
7038 \vskip\envskipamount
7043 \def\afterenvbreak{{%
7044 % =10000 instead of <10000 because of a special case in \itemzzz and
7045 % \sectionheading, q.v.
7046 \ifnum \lastpenalty=10000 \else
7047 \advance\envskipamount by \parskip
7048 \endgraf
7049 \ifdim\lastskip<\envskipamount
7050 \removelastskip
7051 % it's not a good place to break if the last penalty was \nobreak
7052 % or better ...
7053 \ifnum\lastpenalty<10000 \penalty-50 \fi
7054 \vskip\envskipamount
7059 % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will
7060 % also clear it, so that its embedded environments do the narrowing again.
7061 \let\nonarrowing=\relax
7063 % @cartouche ... @end cartouche: draw rectangle w/rounded corners around
7064 % environment contents.
7067 \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth
7068 \def\ctr{{\hskip 6pt\circle\char'010}}
7069 \def\cbl{{\circle\char'012\hskip -6pt}}
7070 \def\cbr{{\hskip 6pt\circle\char'011}}
7071 \def\carttop{\hbox to \cartouter{\hskip\lskip
7072 \ctl\leaders\hrule height\circthick\hfil\ctr
7073 \hskip\rskip}}
7074 \def\cartbot{\hbox to \cartouter{\hskip\lskip
7075 \cbl\leaders\hrule height\circthick\hfil\cbr
7076 \hskip\rskip}}
7078 \newskip\lskip\newskip\rskip
7080 % only require the font if @cartouche is actually used
7081 \def\cartouchefontdefs{%
7082 \font\circle=lcircle10\relax
7083 \circthick=\fontdimen8\circle
7085 \newdimen\circthick
7086 \newdimen\cartouter\newdimen\cartinner
7087 \newskip\normbskip\newskip\normpskip\newskip\normlskip
7089 \envparseargdef\cartouche{%
7090 \cartouchefontdefs
7091 \ifhmode\par\fi % can't be in the midst of a paragraph.
7092 \startsavinginserts
7093 \lskip=\leftskip \rskip=\rightskip
7094 \leftskip=0pt\rightskip=0pt % we want these *outside*.
7096 % Set paragraph width for text inside cartouche. There are
7097 % left and right margins of 3pt each plus two vrules 0.4pt each.
7098 \cartinner=\hsize \advance\cartinner by-\lskip
7099 \advance\cartinner by-\rskip
7100 \advance\cartinner by -6.8pt
7102 % For drawing top and bottom of cartouche. Each corner char
7103 % adds 6pt and we take off the width of a rule to line up with the
7104 % right boundary perfectly.
7105 \cartouter=\hsize
7106 \advance\cartouter by 11.6pt
7108 \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
7110 % If this cartouche directly follows a sectioning command, we need the
7111 % \parskip glue (backspaced over by default) or the cartouche can
7112 % collide with the section heading.
7113 \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi
7115 \setbox\groupbox=\vtop\bgroup
7116 \baselineskip=0pt\parskip=0pt\lineskip=0pt
7117 \carttop
7118 \hbox\bgroup
7119 \hskip\lskip
7120 \vrule\kern3pt
7121 \vbox\bgroup
7122 \hsize=\cartinner
7123 \baselineskip=\normbskip
7124 \lineskip=\normlskip
7125 \parskip=\normpskip
7126 \def\arg{#1}%
7127 \ifx\arg\empty\else
7128 \centerV{\hfil \bf #1 \hfil}%
7130 \kern3pt
7131 \vskip -\parskip
7133 \def\Ecartouche{%
7134 \ifhmode\par\fi
7135 \kern3pt
7136 \egroup
7137 \kern3pt\vrule
7138 \hskip\rskip
7139 \egroup
7140 \cartbot
7141 \egroup
7142 \addgroupbox
7143 \checkinserts
7147 % This macro is called at the beginning of all the @example variants,
7148 % inside a group.
7149 \newdimen\nonfillparindent
7150 \def\nonfillstart{%
7151 \aboveenvbreak
7152 \ifdim\hfuzz < 12pt \hfuzz = 12pt \fi % Don't be fussy
7153 \sepspaces % Make spaces be word-separators rather than space tokens.
7154 \let\par = \lisppar % don't ignore blank lines
7155 \obeylines % each line of input is a line of output
7156 \parskip = 0pt
7157 % Turn off paragraph indentation but redefine \indent to emulate
7158 % the normal \indent.
7159 \nonfillparindent=\parindent
7160 \parindent = 0pt
7161 \let\indent\nonfillindent
7163 \emergencystretch = 0pt % don't try to avoid overfull boxes
7164 \ifx\nonarrowing\relax
7165 \advance \leftskip by \lispnarrowing
7166 \exdentamount=\lispnarrowing
7167 \else
7168 \let\nonarrowing = \relax
7170 \let\exdent=\nofillexdent
7173 \begingroup
7174 \obeyspaces
7175 % We want to swallow spaces (but not other tokens) after the fake
7176 % @indent in our nonfill-environments, where spaces are normally
7177 % active and set to @tie, resulting in them not being ignored after
7178 % @indent.
7179 \gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}%
7180 \gdef\nonfillindentcheck{%
7181 \ifx\temp %
7182 \expandafter\nonfillindentgobble%
7183 \else%
7184 \leavevmode\nonfillindentbox%
7185 \fi%
7187 \endgroup
7188 \def\nonfillindentgobble#1{\nonfillindent}
7189 \def\nonfillindentbox{\hbox to \nonfillparindent{\hss}}
7191 % If you want all examples etc. small: @set dispenvsize small.
7192 % If you want even small examples the full size: @set dispenvsize nosmall.
7193 % This affects the following displayed environments:
7194 % @example, @display, @format, @lisp, @verbatim
7196 \def\smallword{small}
7197 \def\nosmallword{nosmall}
7198 \let\SETdispenvsize\relax
7199 \def\setnormaldispenv{%
7200 \ifx\SETdispenvsize\smallword
7201 % end paragraph for sake of leading, in case document has no blank
7202 % line. This is redundant with what happens in \aboveenvbreak, but
7203 % we need to do it before changing the fonts, and it's inconvenient
7204 % to change the fonts afterward.
7205 \ifnum \lastpenalty=10000 \else \endgraf \fi
7206 \smallexamplefonts \rm
7209 \def\setsmalldispenv{%
7210 \ifx\SETdispenvsize\nosmallword
7211 \else
7212 \ifnum \lastpenalty=10000 \else \endgraf \fi
7213 \smallexamplefonts \rm
7217 % We often define two environments, @foo and @smallfoo.
7218 % Let's do it in one command. #1 is the env name, #2 the definition.
7219 \def\makedispenvdef#1#2{%
7220 \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}%
7221 \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}%
7222 \expandafter\let\csname E#1\endcsname \afterenvbreak
7223 \expandafter\let\csname Esmall#1\endcsname \afterenvbreak
7226 % Define two environment synonyms (#1 and #2) for an environment.
7227 \def\maketwodispenvdef#1#2#3{%
7228 \makedispenvdef{#1}{#3}%
7229 \makedispenvdef{#2}{#3}%
7232 % @lisp: indented, narrowed, typewriter font;
7233 % @example: same as @lisp.
7235 % @smallexample and @smalllisp: use smaller fonts.
7236 % Originally contributed by Pavel@xerox.
7238 \maketwodispenvdef{lisp}{example}{%
7239 \nonfillstart
7240 \tt\setcodequotes
7241 \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
7242 \parsearg\gobble
7244 % @display/@smalldisplay: same as @lisp except keep current font.
7246 \makedispenvdef{display}{%
7247 \nonfillstart
7248 \gobble
7251 % @format/@smallformat: same as @display except don't narrow margins.
7253 \makedispenvdef{format}{%
7254 \let\nonarrowing = t%
7255 \nonfillstart
7256 \gobble
7259 % @flushleft: same as @format, but doesn't obey \SETdispenvsize.
7260 \envdef\flushleft{%
7261 \let\nonarrowing = t%
7262 \nonfillstart
7263 \gobble
7265 \let\Eflushleft = \afterenvbreak
7267 % @flushright.
7269 \envdef\flushright{%
7270 \let\nonarrowing = t%
7271 \nonfillstart
7272 \advance\leftskip by 0pt plus 1fill\relax
7273 \gobble
7275 \let\Eflushright = \afterenvbreak
7278 % @raggedright does more-or-less normal line breaking but no right
7279 % justification. From plain.tex.
7280 \envdef\raggedright{%
7281 \rightskip0pt plus2.4em \spaceskip.3333em \xspaceskip.5em\relax
7283 \let\Eraggedright\par
7286 % @quotation does normal linebreaking (hence we can't use \nonfillstart)
7287 % and narrows the margins. We keep \parskip nonzero in general, since
7288 % we're doing normal filling. So, when using \aboveenvbreak and
7289 % \afterenvbreak, temporarily make \parskip 0.
7291 \makedispenvdef{quotation}{\quotationstart}
7293 \def\quotationstart{%
7294 \indentedblockstart % same as \indentedblock, but increase right margin too.
7295 \ifx\nonarrowing\relax
7296 \advance\rightskip by \lispnarrowing
7298 \parsearg\quotationlabel
7301 % We have retained a nonzero parskip for the environment, since we're
7302 % doing normal filling.
7304 \def\Equotation{%
7305 \par
7306 \ifx\quotationauthor\thisisundefined\else
7307 % indent a bit.
7308 \leftline{\kern 2\leftskip \sl ---\quotationauthor}%
7310 {\parskip=0pt \afterenvbreak}%
7312 \def\Esmallquotation{\Equotation}
7314 % If we're given an argument, typeset it in bold with a colon after.
7315 \def\quotationlabel#1{%
7316 \def\temp{#1}%
7317 \ifx\temp\empty \else
7318 {\bf #1: }%
7322 % @indentedblock is like @quotation, but indents only on the left and
7323 % has no optional argument.
7325 \makedispenvdef{indentedblock}{\indentedblockstart}
7327 \def\indentedblockstart{%
7328 {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
7329 \parindent=0pt
7331 % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
7332 \ifx\nonarrowing\relax
7333 \advance\leftskip by \lispnarrowing
7334 \exdentamount = \lispnarrowing
7335 \else
7336 \let\nonarrowing = \relax
7340 % Keep a nonzero parskip for the environment, since we're doing normal filling.
7342 \def\Eindentedblock{%
7343 \par
7344 {\parskip=0pt \afterenvbreak}%
7346 \def\Esmallindentedblock{\Eindentedblock}
7349 % LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
7350 % If we want to allow any <char> as delimiter,
7351 % we need the curly braces so that makeinfo sees the @verb command, eg:
7352 % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org
7354 % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook.
7356 % [Knuth] p.344; only we need to do the other characters Texinfo sets
7357 % active too. Otherwise, they get lost as the first character on a
7358 % verbatim line.
7359 \def\dospecials{%
7360 \do\ \do\\\do\{\do\}\do\$\do\&%
7361 \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~%
7362 \do\<\do\>\do\|\do\@\do+\do\"%
7363 % Don't do the quotes -- if we do, @set txicodequoteundirected and
7364 % @set txicodequotebacktick will not have effect on @verb and
7365 % @verbatim, and ?` and !` ligatures won't get disabled.
7366 %\do\`\do\'%
7369 % [Knuth] p. 380
7370 \def\uncatcodespecials{%
7371 \def\do##1{\catcode`##1=\other}\dospecials}
7373 % Setup for the @verb command.
7375 % Eight spaces for a tab
7376 \begingroup
7377 \catcode`\^^I=\active
7378 \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }}
7379 \endgroup
7381 \def\setupverb{%
7383 \def\par{\leavevmode\endgraf}%
7384 \parindent = 0pt
7385 \setcodequotes
7386 \tabeightspaces
7387 % Respect line breaks,
7388 % print special symbols as themselves, and
7389 % make each space count
7390 % must do in this order:
7391 \obeylines \uncatcodespecials \sepspaces
7394 % Setup for the @verbatim environment
7396 % Real tab expansion.
7397 \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
7399 % We typeset each line of the verbatim in an \hbox, so we can handle
7400 % tabs.
7401 \newbox\verbbox
7402 \def\starttabbox{\setbox\verbbox=\hbox\bgroup}
7404 \begingroup
7405 \catcode`\^^I=\active
7406 \gdef\tabexpand{%
7407 \catcode`\^^I=\active
7408 \def^^I{\leavevmode\egroup
7409 \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab
7410 \divide\dimen\verbbox by\tabw
7411 \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw
7412 \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw
7413 \wd\verbbox=\dimen\verbbox
7414 \leavevmode\box\verbbox \starttabbox
7417 \endgroup
7419 % start the verbatim environment.
7420 \def\setupverbatim{%
7421 \let\nonarrowing = t%
7422 \nonfillstart
7423 \tt % easiest (and conventionally used) font for verbatim
7424 \def\par{\egroup\leavevmode\box\verbbox\endgraf\starttabbox}%
7425 \tabexpand
7426 \setcodequotes
7427 % Respect line breaks,
7428 % print special symbols as themselves, and
7429 % make each space count.
7430 % Must do in this order:
7431 \obeylines \uncatcodespecials \sepspaces
7434 % Do the @verb magic: verbatim text is quoted by unique
7435 % delimiter characters. Before first delimiter expect a
7436 % right brace, after last delimiter expect closing brace:
7438 % \def\doverb'{'<char>#1<char>'}'{#1}
7440 % [Knuth] p. 382; only eat outer {}
7441 \begingroup
7442 \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other
7443 \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next]
7444 \endgroup
7446 \def\verb{\begingroup\setupverb\doverb}
7449 % Do the @verbatim magic: define the macro \doverbatim so that
7450 % the (first) argument ends when '@end verbatim' is reached, ie:
7452 % \def\doverbatim#1@end verbatim{#1}
7454 % For Texinfo it's a lot easier than for LaTeX,
7455 % because texinfo's \verbatim doesn't stop at '\end{verbatim}':
7456 % we need not redefine '\', '{' and '}'.
7458 % Inspired by LaTeX's verbatim command set [latex.ltx]
7460 \begingroup
7461 \catcode`\ =\active
7462 \obeylines %
7463 % ignore everything up to the first ^^M, that's the newline at the end
7464 % of the @verbatim input line itself. Otherwise we get an extra blank
7465 % line in the output.
7466 \xdef\doverbatim#1^^M#2@end verbatim{%
7467 \starttabbox#2\egroup\noexpand\end\gobble verbatim}%
7468 % We really want {...\end verbatim} in the body of the macro, but
7469 % without the active space; thus we have to use \xdef and \gobble.
7470 % The \egroup ends the \verbbox started at the end of the last line in
7471 % the block.
7472 \endgroup
7474 \envdef\verbatim{%
7475 \setnormaldispenv\setupverbatim\doverbatim
7477 \let\Everbatim = \afterenvbreak
7480 % @verbatiminclude FILE - insert text of file in verbatim environment.
7482 \def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude}
7484 \def\doverbatiminclude#1{%
7486 \makevalueexpandable
7487 \setupverbatim
7489 \indexnofonts % Allow `@@' and other weird things in file names.
7490 \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}%
7491 \edef\tmp{\noexpand\input #1 }
7492 \expandafter
7493 }\expandafter\starttabbox\tmp\egroup
7494 \afterenvbreak
7498 % @copying ... @end copying.
7499 % Save the text away for @insertcopying later.
7501 % We save the uninterpreted tokens, rather than creating a box.
7502 % Saving the text in a box would be much easier, but then all the
7503 % typesetting commands (@smallbook, font changes, etc.) have to be done
7504 % beforehand -- and a) we want @copying to be done first in the source
7505 % file; b) letting users define the frontmatter in as flexible order as
7506 % possible is desirable.
7508 \def\copying{\checkenv{}\begingroup\macrobodyctxt\docopying}
7509 {\catcode`\ =\other
7510 \gdef\docopying#1@end copying{\endgroup\def\copyingtext{#1}}
7513 \def\insertcopying{%
7514 \begingroup
7515 \parindent = 0pt % paragraph indentation looks wrong on title page
7516 \scanexp\copyingtext
7517 \endgroup
7521 \message{defuns,}
7522 % @defun etc.
7524 \newskip\defbodyindent \defbodyindent=.4in
7525 \newskip\defargsindent \defargsindent=50pt
7526 \newskip\deflastargmargin \deflastargmargin=18pt
7527 \newcount\defunpenalty
7529 % Start the processing of @deffn:
7530 \def\startdefun{%
7531 \ifnum\lastpenalty<10000
7532 \medbreak
7533 \defunpenalty=10003 % Will keep this @deffn together with the
7534 % following @def command, see below.
7535 \else
7536 % If there are two @def commands in a row, we'll have a \nobreak,
7537 % which is there to keep the function description together with its
7538 % header. But if there's nothing but headers, we need to allow a
7539 % break somewhere. Check specifically for penalty 10002, inserted
7540 % by \printdefunline, instead of 10000, since the sectioning
7541 % commands also insert a nobreak penalty, and we don't want to allow
7542 % a break between a section heading and a defun.
7544 % As a further refinement, we avoid "club" headers by signalling
7545 % with penalty of 10003 after the very first @deffn in the
7546 % sequence (see above), and penalty of 10002 after any following
7547 % @def command.
7548 \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi
7550 % Similarly, after a section heading, do not allow a break.
7551 % But do insert the glue.
7552 \medskip % preceded by discardable penalty, so not a breakpoint
7555 \parindent=0in
7556 \advance\leftskip by \defbodyindent
7557 \exdentamount=\defbodyindent
7560 \newtoks\defidx
7561 \newtoks\deftext
7563 \def\useindex#1{\global\defidx={#1}\ignorespaces}
7565 % Called as \printdefunline \deffooheader{text}
7567 \def\printdefunline#1#2{%
7568 \begingroup
7569 \plainfrenchspacing
7570 % call \deffooheader:
7571 #1#2 \endheader
7572 % create the index entry
7573 \defcharsdefault
7574 \edef\temp{\noexpand\doind{\the\defidx}{\the\deftext}}%
7575 \temp
7576 % common ending:
7577 \interlinepenalty = 10000
7578 \advance\rightskip by 0pt plus 1fil\relax
7579 \endgraf
7580 \nobreak\vskip -\parskip
7581 \penalty\defunpenalty % signal to \startdefun and \deffoox
7582 % Some of the @defun-type tags do not enable magic parentheses,
7583 % rendering the following check redundant. But we don't optimize.
7584 \checkparencounts
7585 \endgroup
7588 \def\Edefun{\endgraf\medbreak}
7590 % \makedefun{deffoo} (\deffooheader parameters) { (\deffooheader expansion) }
7592 % Define \deffoo, \deffoox \Edeffoo and \deffooheader.
7593 \def\makedefun#1{%
7594 \expandafter\let\csname E#1\endcsname = \Edefun
7595 \edef\temp{\noexpand\domakedefun
7596 \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}%
7597 \temp
7599 \def\domakedefun#1#2#3{%
7600 \envdef#1{%
7601 \startdefun
7602 \doingtypefnfalse % distinguish typed functions from all else
7603 \parseargusing\activeparens{\printdefunline#3}%
7605 \def#2{%
7606 % First, check whether we are in the right environment:
7607 \checkenv#1%
7609 % As in \startdefun, allow line break if we have multiple x headers
7610 % in a row. It's not a great place, though.
7611 \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi
7613 \doingtypefnfalse % distinguish typed functions from all else
7614 \parseargusing\activeparens{\printdefunline#3}%
7616 \def#3% definition of \deffooheader follows
7619 \newif\ifdoingtypefn % doing typed function?
7620 \newif\ifrettypeownline % typeset return type on its own line?
7622 % @deftypefnnewline on|off says whether the return type of typed functions
7623 % are printed on their own line. This affects @deftypefn, @deftypefun,
7624 % @deftypeop, and @deftypemethod.
7626 \parseargdef\deftypefnnewline{%
7627 \def\temp{#1}%
7628 \ifx\temp\onword
7629 \expandafter\let\csname SETtxideftypefnnl\endcsname
7630 = \empty
7631 \else\ifx\temp\offword
7632 \expandafter\let\csname SETtxideftypefnnl\endcsname
7633 = \relax
7634 \else
7635 \errhelp = \EMsimple
7636 \errmessage{Unknown @txideftypefnnl value `\temp',
7637 must be on|off}%
7638 \fi\fi
7641 \def\defind#1#2{
7642 \defidx={#1}%
7643 \deftext={#2}%
7646 % Untyped functions:
7648 % @deffn category name args
7649 \makedefun{deffn}#1 #2 #3\endheader{%
7650 \defind{fn}{\code{#2}}%
7651 \defname{#1}{}{#2}\magicamp\defunargs{#3\unskip}%
7654 % @defop category class name args
7655 \makedefun{defop}#1 {\defopheaderx{#1\ \putwordon}}
7656 \def\defopheaderx#1#2 #3 #4\endheader{%
7657 \defind{fn}{\code{#3}\space\putwordon\ \code{#2}}%
7658 \defname{#1\ \code{#2}}{}{#3}\magicamp\defunargs{#4\unskip}%
7661 % Typed functions:
7663 % @deftypefn category type name args
7664 \makedefun{deftypefn}#1 #2 #3 #4\endheader{%
7665 \defind{fn}{\code{#3}}%
7666 \doingtypefntrue
7667 \defname{#1}{#2}{#3}\defunargs{#4\unskip}%
7670 % @deftypeop category class type name args
7671 \makedefun{deftypeop}#1 {\deftypeopheaderx{#1\ \putwordon}}
7672 \def\deftypeopheaderx#1#2 #3 #4 #5\endheader{%
7673 \defind{fn}{\code{#4}\space\putwordon\ \code{#1\ \code{#2}}}%
7674 \doingtypefntrue
7675 \defname{#1\ \code{#2}}{#3}{#4}\defunargs{#5\unskip}%
7678 % Typed variables:
7680 % @deftypevr category type var args
7681 \makedefun{deftypevr}#1 #2 #3 #4\endheader{%
7682 \defind{vr}{\code{#3}}%
7683 \defname{#1}{#2}{#3}\defunargs{#4\unskip}%
7686 % @deftypecv category class type var args
7687 \makedefun{deftypecv}#1 {\deftypecvheaderx{#1\ \putwordof}}
7688 \def\deftypecvheaderx#1#2 #3 #4 #5\endheader{%
7689 \defind{vr}{\code{#4}\space\putwordof\ \code{#2}}%
7690 \defname{#1\ \code{#2}}{#3}{#4}\defunargs{#5\unskip}%
7693 % Untyped variables:
7695 % @defvr category var args
7696 \makedefun{defvr}#1 {\deftypevrheader{#1} {} }
7698 % @defcv category class var args
7699 \makedefun{defcv}#1 {\defcvheaderx{#1\ \putwordof}}
7700 \def\defcvheaderx#1#2 {\deftypecvheaderx{#1}#2 {} }
7702 % Types:
7704 % @deftp category name args
7705 \makedefun{deftp}#1 #2 #3\endheader{%
7706 \defind{tp}{\code{#2}}%
7707 \defname{#1}{}{#2}\defunargs{#3\unskip}%
7710 % Remaining @defun-like shortcuts:
7711 \makedefun{defun}{\deffnheader{\putwordDeffunc} }
7712 \makedefun{defmac}{\deffnheader{\putwordDefmac} }
7713 \makedefun{defspec}{\deffnheader{\putwordDefspec} }
7714 \makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} }
7715 \makedefun{defvar}{\defvrheader{\putwordDefvar} }
7716 \makedefun{defopt}{\defvrheader{\putwordDefopt} }
7717 \makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} }
7718 \makedefun{defmethod}{\defopheaderx\putwordMethodon}
7719 \makedefun{deftypemethod}{\deftypeopheaderx\putwordMethodon}
7720 \makedefun{defivar}{\defcvheaderx\putwordInstanceVariableof}
7721 \makedefun{deftypeivar}{\deftypecvheaderx\putwordInstanceVariableof}
7723 % \defname, which formats the name of the @def (not the args).
7724 % #1 is the category, such as "Function".
7725 % #2 is the return type, if any.
7726 % #3 is the function name.
7728 % We are followed by (but not passed) the arguments, if any.
7730 \def\defname#1#2#3{%
7731 \par
7732 % Get the values of \leftskip and \rightskip as they were outside the @def...
7733 \advance\leftskip by -\defbodyindent
7735 % Determine if we are typesetting the return type of a typed function
7736 % on a line by itself.
7737 \rettypeownlinefalse
7738 \ifdoingtypefn % doing a typed function specifically?
7739 % then check user option for putting return type on its own line:
7740 \ifflagclear{txideftypefnnl}{}{\rettypeownlinetrue}%
7743 % How we'll format the category name. Putting it in brackets helps
7744 % distinguish it from the body text that may end up on the next line
7745 % just below it.
7746 \def\temp{#1}%
7747 \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi}
7749 % Figure out line sizes for the paragraph shape. We'll always have at
7750 % least two.
7751 \tempnum = 2
7753 % The first line needs space for \box0; but if \rightskip is nonzero,
7754 % we need only space for the part of \box0 which exceeds it:
7755 \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip
7757 % If doing a return type on its own line, we'll have another line.
7758 \ifrettypeownline
7759 \advance\tempnum by 1
7760 \def\maybeshapeline{0in \hsize}%
7761 \else
7762 \def\maybeshapeline{}%
7765 % The continuations:
7766 \dimen2=\hsize \advance\dimen2 by -\defargsindent
7768 % The final paragraph shape:
7769 \parshape \tempnum 0in \dimen0 \maybeshapeline \defargsindent \dimen2
7771 % Put the category name at the right margin.
7772 \noindent
7773 \hbox to 0pt{%
7774 \hfil\box0 \kern-\hsize
7775 % \hsize has to be shortened this way:
7776 \kern\leftskip
7777 % Intentionally do not respect \rightskip, since we need the space.
7780 % Allow all lines to be underfull without complaint:
7781 \tolerance=10000 \hbadness=10000
7782 \exdentamount=\defbodyindent
7784 % defun fonts. We use typewriter by default (used to be bold) because:
7785 % . we're printing identifiers, they should be in tt in principle.
7786 % . in languages with many accents, such as Czech or French, it's
7787 % common to leave accents off identifiers. The result looks ok in
7788 % tt, but exceedingly strange in rm.
7789 % . we don't want -- and --- to be treated as ligatures.
7790 % . this still does not fix the ?` and !` ligatures, but so far no
7791 % one has made identifiers using them :).
7792 \df \tt
7793 \def\temp{#2}% text of the return type
7794 \ifx\temp\empty\else
7795 \tclose{\temp}% typeset the return type
7796 \ifrettypeownline
7797 % put return type on its own line; prohibit line break following:
7798 \hfil\vadjust{\nobreak}\break
7799 \else
7800 \space % type on same line, so just followed by a space
7802 \fi % no return type
7803 #3% output function name
7805 \ifflagclear{txidefnamenospace}{%
7806 {\rm\enskip}% hskip 0.5 em of \rmfont
7807 }{}%
7809 \boldbrax
7810 % arguments will be output next, if any.
7813 % Print arguments. Use slanted for @def*, typewriter for @deftype*.
7814 \def\defunargs#1{%
7815 \bgroup
7816 \df \ifdoingtypefn \tt \else \sl \fi
7817 \ifflagclear{txicodevaristt}{}%
7818 {\def\var##1{{\setregularquotes \ttsl ##1}}}%
7820 \egroup
7823 % We want ()&[] to print specially on the defun line.
7825 \def\activeparens{%
7826 \catcode`\(=\active \catcode`\)=\active
7827 \catcode`\[=\active \catcode`\]=\active
7828 \catcode`\&=\active
7831 % Make control sequences which act like normal parenthesis chars.
7832 \let\lparen = ( \let\rparen = )
7834 % Be sure that we always have a definition for `(', etc. For example,
7835 % if the fn name has parens in it, \boldbrax will not be in effect yet,
7836 % so TeX would otherwise complain about undefined control sequence.
7838 \activeparens
7839 \gdef\defcharsdefault{%
7840 \let(=\lparen \let)=\rparen
7841 \let[=\lbrack \let]=\rbrack
7842 \let& = \&%
7844 \globaldefs=1 \defcharsdefault
7846 \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
7847 \gdef\magicamp{\let&=\amprm}
7849 \let\ampchar\&
7851 \newcount\parencount
7853 % If we encounter &foo, then turn on ()-hacking afterwards
7854 \newif\ifampseen
7855 \def\amprm#1 {\ampseentrue{\bf\&#1 }}
7857 \def\parenfont{%
7858 \ifampseen
7859 % At the first level, print parens in roman,
7860 % otherwise use the default font.
7861 \ifnum \parencount=1 \rm \fi
7862 \else
7863 % The \sf parens (in \boldbrax) actually are a little bolder than
7864 % the contained text. This is especially needed for [ and ] .
7868 \def\infirstlevel#1{%
7869 \ifampseen
7870 \ifnum\parencount=1
7875 \def\bfafterword#1 {#1 \bf}
7877 \def\opnr{%
7878 \global\advance\parencount by 1
7879 {\parenfont(}%
7880 \infirstlevel \bfafterword
7882 \def\clnr{%
7883 {\parenfont)}%
7884 \infirstlevel \sl
7885 \global\advance\parencount by -1
7888 \newcount\brackcount
7889 \def\lbrb{%
7890 \global\advance\brackcount by 1
7891 {\bf[}%
7893 \def\rbrb{%
7894 {\bf]}%
7895 \global\advance\brackcount by -1
7898 \def\checkparencounts{%
7899 \ifnum\parencount=0 \else \badparencount \fi
7900 \ifnum\brackcount=0 \else \badbrackcount \fi
7902 % these should not use \errmessage; the glibc manual, at least, actually
7903 % has such constructs (when documenting function pointers).
7904 \def\badparencount{%
7905 \message{Warning: unbalanced parentheses in @def...}%
7906 \global\parencount=0
7908 \def\badbrackcount{%
7909 \message{Warning: unbalanced square brackets in @def...}%
7910 \global\brackcount=0
7914 \message{macros,}
7915 % @macro.
7917 % To do this right we need a feature of e-TeX, \scantokens,
7918 % which we arrange to emulate with a temporary file in ordinary TeX.
7919 \ifx\eTeXversion\thisisundefined
7920 \newwrite\macscribble
7921 \def\scantokens#1{%
7922 \toks0={#1}%
7923 \immediate\openout\macscribble=\jobname.tmp
7924 \immediate\write\macscribble{\the\toks0}%
7925 \immediate\closeout\macscribble
7926 \input \jobname.tmp
7930 \let\E=\expandafter
7932 % Used at the time of macro expansion.
7933 % Argument is macro body with arguments substituted
7934 \def\scanmacro#1{%
7935 \newlinechar`\^^M
7936 % expand the expansion of \eatleadingcr twice to maybe remove a leading
7937 % newline (and \else and \fi tokens), then call \eatspaces on the result.
7938 \def\xeatspaces##1{%
7939 \E\E\E\E\E\E\E\eatspaces\E\E\E\E\E\E\E{\eatleadingcr##1%
7941 \def\xempty##1{}%
7943 % Process the macro body under the current catcode regime.
7944 \scantokens{#1@comment}%
7946 % The \comment is to remove the \newlinechar added by \scantokens, and
7947 % can be noticed by \parsearg. Note \c isn't used because this means cedilla
7948 % in math mode.
7951 % Used for copying and captions
7952 \def\scanexp#1{%
7953 \expandafter\scanmacro\expandafter{#1}%
7956 \newcount\paramno % Count of parameters
7957 \newtoks\macname % Macro name
7958 \newif\ifrecursive % Is it recursive?
7960 % List of all defined macros in the form
7961 % \commondummyword\macro1\commondummyword\macro2...
7962 % Currently is also contains all @aliases; the list can be split
7963 % if there is a need.
7964 \def\macrolist{}
7966 % Add the macro to \macrolist
7967 \def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname}
7968 \def\addtomacrolistxxx#1{%
7969 \toks0 = \expandafter{\macrolist\commondummyword#1}%
7970 \xdef\macrolist{\the\toks0}%
7973 % Utility routines.
7974 % This does \let #1 = #2, with \csnames; that is,
7975 % \let \csname#1\endcsname = \csname#2\endcsname
7976 % (except of course we have to play expansion games).
7978 \def\cslet#1#2{%
7979 \expandafter\let
7980 \csname#1\expandafter\endcsname
7981 \csname#2\endcsname
7984 % Trim leading and trailing spaces off a string.
7985 % Concepts from aro-bend problem 15 (see CTAN).
7986 {\catcode`\@=11
7987 \gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }}
7988 \gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@}
7989 \gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @}
7990 \def\unbrace#1{#1}
7991 \unbrace{\gdef\trim@@@ #1 } #2@{#1}
7994 {\catcode`\^^M=\other%
7995 \gdef\eatleadingcr#1{\if\noexpand#1\noexpand^^M\else\E#1\fi}}%
7996 % Warning: this won't work for a delimited argument
7997 % or for an empty argument
7999 % Trim a single trailing ^^M off a string.
8000 {\catcode`\^^M=\other \catcode`\Q=3%
8001 \gdef\eatcr #1{\eatcra #1Q^^MQ}%
8002 \gdef\eatcra#1^^MQ{\eatcrb#1Q}%
8003 \gdef\eatcrb#1Q#2Q{#1}%
8006 % Macro bodies are absorbed as an argument in a context where
8007 % all characters are catcode 10, 11 or 12, except \ which is active
8008 % (as in normal texinfo). It is necessary to change the definition of \
8009 % to recognize macro arguments; this is the job of \mbodybackslash.
8011 % Non-ASCII encodings make 8-bit characters active, so un-activate
8012 % them to avoid their expansion. Must do this non-globally, to
8013 % confine the change to the current group.
8015 % It's necessary to have hard CRs when the macro is executed. This is
8016 % done by making ^^M (\endlinechar) catcode 12 when reading the macro
8017 % body, and then making it the \newlinechar in \scanmacro.
8019 \def\scanctxt{% used as subroutine
8020 \catcode`\"=\other
8021 \catcode`\+=\other
8022 \catcode`\<=\other
8023 \catcode`\>=\other
8024 \catcode`\^=\other
8025 \catcode`\_=\other
8026 \catcode`\|=\other
8027 \catcode`\~=\other
8028 \catcode`\@=\other
8029 \catcode`\^^M=\other
8030 \catcode`\\=\active
8031 \passthroughcharstrue
8034 \def\macrobodyctxt{% used for @macro definitions and @copying
8035 \scanctxt
8036 \catcode`\ =\other
8037 \catcode`\{=\other
8038 \catcode`\}=\other
8041 % Used when scanning braced macro arguments. Note, however, that catcode
8042 % changes here are ineffectual if the macro invocation was nested inside
8043 % an argument to another Texinfo command.
8044 \def\macroargctxt{%
8045 \scanctxt
8046 \catcode`\ =\active
8049 \def\macrolineargctxt{% used for whole-line arguments without braces
8050 \scanctxt
8051 \catcode`\{=\other
8052 \catcode`\}=\other
8055 % \mbodybackslash is the definition of \ in @macro bodies.
8056 % It maps \foo\ => \csname macarg.foo\endcsname => #N
8057 % where N is the macro parameter number.
8058 % We define \csname macarg.\endcsname to be \realbackslash, so
8059 % \\ in macro replacement text gets you a backslash.
8061 {\catcode`@=0 @catcode`@\=@active
8062 @gdef@usembodybackslash{@let\=@mbodybackslash}
8063 @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname}
8065 \expandafter\def\csname macarg.\endcsname{\realbackslash}
8067 \def\margbackslash#1{\char`\#1 }
8069 \def\macro{\recursivefalse\parsearg\macroxxx}
8070 \def\rmacro{\recursivetrue\parsearg\macroxxx}
8072 \def\macroxxx#1{%
8073 \getargs{#1}% now \macname is the macname and \argl the arglist
8074 \ifx\argl\empty % no arguments
8075 \paramno=0\relax
8076 \else
8077 \expandafter\parsemargdef \argl;%
8078 \if\paramno>256\relax
8079 \ifx\eTeXversion\thisisundefined
8080 \errhelp = \EMsimple
8081 \errmessage{You need eTeX to compile a file with macros with more than 256 arguments}
8085 \if1\csname ismacro.\the\macname\endcsname
8086 \message{Warning: redefining \the\macname}%
8087 \else
8088 \expandafter\ifx\csname \the\macname\endcsname \relax
8089 \else \errmessage{Macro name \the\macname\space already defined}\fi
8090 \global\cslet{macsave.\the\macname}{\the\macname}%
8091 \global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
8092 \addtomacrolist{\the\macname}%
8094 \begingroup \macrobodyctxt \usembodybackslash
8095 \ifrecursive \expandafter\parsermacbody
8096 \else \expandafter\parsemacbody
8097 \fi}
8099 \parseargdef\unmacro{%
8100 \if1\csname ismacro.#1\endcsname
8101 \global\cslet{#1}{macsave.#1}%
8102 \global\expandafter\let \csname ismacro.#1\endcsname=0%
8103 % Remove the macro name from \macrolist:
8104 \begingroup
8105 \expandafter\let\csname#1\endcsname \relax
8106 \let\commondummyword\unmacrodo
8107 \xdef\macrolist{\macrolist}%
8108 \endgroup
8109 \else
8110 \errmessage{Macro #1 not defined}%
8114 % Called by \do from \dounmacro on each macro. The idea is to omit any
8115 % macro definitions that have been changed to \relax.
8117 \def\unmacrodo#1{%
8118 \ifx #1\relax
8119 % remove this
8120 \else
8121 \noexpand\commondummyword \noexpand#1%
8125 % \getargs -- Parse the arguments to a @macro line. Set \macname to
8126 % the name of the macro, and \argl to the braced argument list.
8127 \def\getargs#1{\getargsxxx#1{}}
8128 \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
8129 \def\getmacname#1 #2\relax{\macname={#1}}
8130 \def\getmacargs#1{\def\argl{#1}}
8131 % This made use of the feature that if the last token of a
8132 % <parameter list> is #, then the preceding argument is delimited by
8133 % an opening brace, and that opening brace is not consumed.
8135 % Parse the optional {params} list to @macro or @rmacro.
8136 % Set \paramno to the number of arguments,
8137 % and \paramlist to a parameter text for the macro (e.g. #1,#2,#3 for a
8138 % three-param macro.) Define \macarg.BLAH for each BLAH in the params
8139 % list to some hook where the argument is to be expanded. If there are
8140 % less than 10 arguments that hook is to be replaced by ##N where N
8141 % is the position in that list, that is to say the macro arguments are to be
8142 % defined `a la TeX in the macro body.
8144 % That gets used by \mbodybackslash (above).
8146 % If there are 10 or more arguments, a different technique is used: see
8147 % \parsemmanyargdef.
8149 \def\parsemargdef#1;{%
8150 \paramno=0\def\paramlist{}%
8151 \let\hash\relax
8152 % \hash is redefined to `#' later to get it into definitions
8153 \let\xeatspaces\relax
8154 \let\xempty\relax
8155 \parsemargdefxxx#1,;,%
8156 \ifnum\paramno<10\relax\else
8157 \paramno0\relax
8158 \parsemmanyargdef@@#1,;,% 10 or more arguments
8161 \def\parsemargdefxxx#1,{%
8162 \if#1;\let\next=\relax
8163 \else \let\next=\parsemargdefxxx
8164 \advance\paramno by 1
8165 \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
8166 {\xeatspaces{\hash\the\paramno\noexpand\xempty{}}}%
8167 \edef\paramlist{\paramlist\hash\the\paramno,}%
8168 \fi\next}
8169 % the \xempty{} is to give \eatleadingcr an argument in the case of an
8170 % empty macro argument.
8172 % \parsemacbody, \parsermacbody
8174 % Read recursive and nonrecursive macro bodies. (They're different since
8175 % rec and nonrec macros end differently.)
8177 % We are in \macrobodyctxt, and the \xdef causes backslashshes in the macro
8178 % body to be transformed.
8179 % Set \macrobody to the body of the macro, and call \defmacro.
8181 {\catcode`\ =\other\long\gdef\parsemacbody#1@end macro{%
8182 \xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}%
8183 {\catcode`\ =\other\long\gdef\parsermacbody#1@end rmacro{%
8184 \xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}%
8186 % Make @ a letter, so that we can make private-to-Texinfo macro names.
8187 \edef\texiatcatcode{\the\catcode`\@}
8188 \catcode `@=11\relax
8190 %%%%%%%%%%%%%% Code for > 10 arguments only %%%%%%%%%%%%%%%%%%
8192 % If there are 10 or more arguments, a different technique is used, where the
8193 % hook remains in the body, and when macro is to be expanded the body is
8194 % processed again to replace the arguments.
8196 % In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the
8197 % argument N value and then \edef the body (nothing else will expand because of
8198 % the catcode regime under which the body was input).
8200 % If you compile with TeX (not eTeX), and you have macros with 10 or more
8201 % arguments, no macro can have more than 256 arguments (else error).
8203 % In case that there are 10 or more arguments we parse again the arguments
8204 % list to set new definitions for the \macarg.BLAH macros corresponding to
8205 % each BLAH argument. It was anyhow needed to parse already once this list
8206 % in order to count the arguments, and as macros with at most 9 arguments
8207 % are by far more frequent than macro with 10 or more arguments, defining
8208 % twice the \macarg.BLAH macros does not cost too much processing power.
8209 \def\parsemmanyargdef@@#1,{%
8210 \if#1;\let\next=\relax
8211 \else
8212 \let\next=\parsemmanyargdef@@
8213 \edef\tempb{\eatspaces{#1}}%
8214 \expandafter\def\expandafter\tempa
8215 \expandafter{\csname macarg.\tempb\endcsname}%
8216 % Note that we need some extra \noexpand\noexpand, this is because we
8217 % don't want \the to be expanded in the \parsermacbody as it uses an
8218 % \xdef .
8219 \expandafter\edef\tempa
8220 {\noexpand\noexpand\noexpand\the\toks\the\paramno}%
8221 \advance\paramno by 1\relax
8222 \fi\next}
8225 \let\endargs@\relax
8226 \let\nil@\relax
8227 \def\nilm@{\nil@}%
8228 \long\def\nillm@{\nil@}%
8230 % This macro is expanded during the Texinfo macro expansion, not during its
8231 % definition. It gets all the arguments' values and assigns them to macros
8232 % macarg.ARGNAME
8234 % #1 is the macro name
8235 % #2 is the list of argument names
8236 % #3 is the list of argument values
8237 \def\getargvals@#1#2#3{%
8238 \def\macargdeflist@{}%
8239 \def\saveparamlist@{#2}% Need to keep a copy for parameter expansion.
8240 \def\paramlist{#2,\nil@}%
8241 \def\macroname{#1}%
8242 \begingroup
8243 \macroargctxt
8244 \def\argvaluelist{#3,\nil@}%
8245 \def\@tempa{#3}%
8246 \ifx\@tempa\empty
8247 \setemptyargvalues@
8248 \else
8249 \getargvals@@
8252 \def\getargvals@@{%
8253 \ifx\paramlist\nilm@
8254 % Some sanity check needed here that \argvaluelist is also empty.
8255 \ifx\argvaluelist\nillm@
8256 \else
8257 \errhelp = \EMsimple
8258 \errmessage{Too many arguments in macro `\macroname'!}%
8260 \let\next\macargexpandinbody@
8261 \else
8262 \ifx\argvaluelist\nillm@
8263 % No more arguments values passed to macro. Set remaining named-arg
8264 % macros to empty.
8265 \let\next\setemptyargvalues@
8266 \else
8267 % pop current arg name into \@tempb
8268 \def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}%
8269 \expandafter\@tempa\expandafter{\paramlist}%
8270 % pop current argument value into \@tempc
8271 \def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}%
8272 \expandafter\@tempa\expandafter{\argvaluelist}%
8273 % Here \@tempb is the current arg name and \@tempc is the current arg value.
8274 % First place the new argument macro definition into \@tempd
8275 \expandafter\macname\expandafter{\@tempc}%
8276 \expandafter\let\csname macarg.\@tempb\endcsname\relax
8277 \expandafter\def\expandafter\@tempe\expandafter{%
8278 \csname macarg.\@tempb\endcsname}%
8279 \edef\@tempd{\long\def\@tempe{\the\macname}}%
8280 \push@\@tempd\macargdeflist@
8281 \let\next\getargvals@@
8284 \next
8287 \def\push@#1#2{%
8288 \expandafter\expandafter\expandafter\def
8289 \expandafter\expandafter\expandafter#2%
8290 \expandafter\expandafter\expandafter{%
8291 \expandafter#1#2}%
8294 % Replace arguments by their values in the macro body, and place the result
8295 % in macro \@tempa.
8297 \def\macvalstoargs@{%
8298 % To do this we use the property that token registers that are \the'ed
8299 % within an \edef expand only once. So we are going to place all argument
8300 % values into respective token registers.
8302 % First we save the token context, and initialize argument numbering.
8303 \begingroup
8304 \paramno0\relax
8305 % Then, for each argument number #N, we place the corresponding argument
8306 % value into a new token list register \toks#N
8307 \expandafter\putargsintokens@\saveparamlist@,;,%
8308 % Then, we expand the body so that argument are replaced by their
8309 % values. The trick for values not to be expanded themselves is that they
8310 % are within tokens and that tokens expand only once in an \edef .
8311 \edef\@tempc{\csname mac.\macroname .body\endcsname}%
8312 % Now we restore the token stack pointer to free the token list registers
8313 % which we have used, but we make sure that expanded body is saved after
8314 % group.
8315 \expandafter
8316 \endgroup
8317 \expandafter\def\expandafter\@tempa\expandafter{\@tempc}%
8320 % Define the named-macro outside of this group and then close this group.
8322 \def\macargexpandinbody@{%
8323 \expandafter
8324 \endgroup
8325 \macargdeflist@
8326 % First the replace in body the macro arguments by their values, the result
8327 % is in \@tempa .
8328 \macvalstoargs@
8329 % Then we point at the \norecurse or \gobble (for recursive) macro value
8330 % with \@tempb .
8331 \expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname
8332 % Depending on whether it is recursive or not, we need some tailing
8333 % \egroup .
8334 \ifx\@tempb\gobble
8335 \let\@tempc\relax
8336 \else
8337 \let\@tempc\egroup
8339 % And now we do the real job:
8340 \edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}%
8341 \@tempd
8344 \def\putargsintokens@#1,{%
8345 \if#1;\let\next\relax
8346 \else
8347 \let\next\putargsintokens@
8348 % First we allocate the new token list register, and give it a temporary
8349 % alias \@tempb .
8350 \toksdef\@tempb\the\paramno
8351 % Then we place the argument value into that token list register.
8352 \expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname
8353 \expandafter\@tempb\expandafter{\@tempa}%
8354 \advance\paramno by 1\relax
8356 \next
8359 % Trailing missing arguments are set to empty.
8361 \def\setemptyargvalues@{%
8362 \ifx\paramlist\nilm@
8363 \let\next\macargexpandinbody@
8364 \else
8365 \expandafter\setemptyargvaluesparser@\paramlist\endargs@
8366 \let\next\setemptyargvalues@
8368 \next
8371 \def\setemptyargvaluesparser@#1,#2\endargs@{%
8372 \expandafter\def\expandafter\@tempa\expandafter{%
8373 \expandafter\def\csname macarg.#1\endcsname{}}%
8374 \push@\@tempa\macargdeflist@
8375 \def\paramlist{#2}%
8378 % #1 is the element target macro
8379 % #2 is the list macro
8380 % #3,#4\endargs@ is the list value
8381 \def\pop@#1#2#3,#4\endargs@{%
8382 \def#1{#3}%
8383 \def#2{#4}%
8385 \long\def\longpop@#1#2#3,#4\endargs@{%
8386 \long\def#1{#3}%
8387 \long\def#2{#4}%
8391 %%%%%%%%%%%%%% End of code for > 10 arguments %%%%%%%%%%%%%%%%%%
8394 % This defines a Texinfo @macro or @rmacro, called by \parsemacbody.
8395 % \macrobody has the body of the macro in it, with placeholders for
8396 % its parameters, looking like "\xeatspaces{\hash 1}".
8397 % \paramno is the number of parameters
8398 % \paramlist is a TeX parameter text, e.g. "#1,#2,#3,"
8399 % There are four cases: macros of zero, one, up to nine, and many arguments.
8400 % \xdef is used so that macro definitions will survive the file
8401 % they're defined in: @include reads the file inside a group.
8403 \def\defmacro{%
8404 \let\hash=##% convert placeholders to macro parameter chars
8405 \ifnum\paramno=1
8406 \def\xeatspaces##1{##1}%
8407 % This removes the pair of braces around the argument. We don't
8408 % use \eatspaces, because this can cause ends of lines to be lost
8409 % when the argument to \eatspaces is read, leading to line-based
8410 % commands like "@itemize" not being read correctly.
8411 \else
8412 \let\xeatspaces\relax % suppress expansion
8414 \ifcase\paramno
8416 \expandafter\xdef\csname\the\macname\endcsname{%
8417 \begingroup
8418 \noexpand\spaceisspace
8419 \noexpand\endlineisspace
8420 \noexpand\expandafter % skip any whitespace after the macro name.
8421 \expandafter\noexpand\csname\the\macname @@@\endcsname}%
8422 \expandafter\xdef\csname\the\macname @@@\endcsname{%
8423 \endgroup
8424 \noexpand\scanmacro{\macrobody}}%
8425 \or % 1
8426 \expandafter\xdef\csname\the\macname\endcsname{%
8427 \begingroup
8428 \noexpand\braceorline
8429 \expandafter\noexpand\csname\the\macname @@@\endcsname}%
8430 \expandafter\xdef\csname\the\macname @@@\endcsname##1{%
8431 \endgroup
8432 \noexpand\scanmacro{\macrobody}%
8434 \else % at most 9
8435 \ifnum\paramno<10\relax
8436 % @MACNAME sets the context for reading the macro argument
8437 % @MACNAME@@ gets the argument, processes backslashes and appends a
8438 % comma.
8439 % @MACNAME@@@ removes braces surrounding the argument list.
8440 % @MACNAME@@@@ scans the macro body with arguments substituted.
8441 \expandafter\xdef\csname\the\macname\endcsname{%
8442 \begingroup
8443 \noexpand\expandafter % This \expandafter skip any spaces after the
8444 \noexpand\macroargctxt % macro before we change the catcode of space.
8445 \noexpand\expandafter
8446 \expandafter\noexpand\csname\the\macname @@\endcsname}%
8447 \expandafter\xdef\csname\the\macname @@\endcsname##1{%
8448 \noexpand\passargtomacro
8449 \expandafter\noexpand\csname\the\macname @@@\endcsname{##1,}}%
8450 \expandafter\xdef\csname\the\macname @@@\endcsname##1{%
8451 \expandafter\noexpand\csname\the\macname @@@@\endcsname ##1}%
8452 \expandafter\expandafter
8453 \expandafter\xdef
8454 \expandafter\expandafter
8455 \csname\the\macname @@@@\endcsname\paramlist{%
8456 \endgroup\noexpand\scanmacro{\macrobody}}%
8457 \else % 10 or more:
8458 \expandafter\xdef\csname\the\macname\endcsname{%
8459 \noexpand\getargvals@{\the\macname}{\argl}%
8461 \global\expandafter\let\csname mac.\the\macname .body\endcsname\macrobody
8462 \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble
8464 \fi}
8466 \catcode `\@\texiatcatcode\relax % end private-to-Texinfo catcodes
8468 \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
8471 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8473 {\catcode`\@=0 \catcode`\\=13 % We need to manipulate \ so use @ as escape
8474 @catcode`@_=11 % private names
8475 @catcode`@!=11 % used as argument separator
8477 % \passargtomacro#1#2 -
8478 % Call #1 with a list of tokens #2, with any doubled backslashes in #2
8479 % compressed to one.
8481 % This implementation works by expansion, and not execution (so we cannot use
8482 % \def or similar). This reduces the risk of this failing in contexts where
8483 % complete expansion is done with no execution (for example, in writing out to
8484 % an auxiliary file for an index entry).
8486 % State is kept in the input stream: the argument passed to
8487 % @look_ahead, @gobble_and_check_finish and @add_segment is
8489 % THE_MACRO ARG_RESULT ! {PENDING_BS} NEXT_TOKEN (... rest of input)
8491 % where:
8492 % THE_MACRO - name of the macro we want to call
8493 % ARG_RESULT - argument list we build to pass to that macro
8494 % PENDING_BS - either a backslash or nothing
8495 % NEXT_TOKEN - used to look ahead in the input stream to see what's coming next
8497 @gdef@passargtomacro#1#2{%
8498 @add_segment #1!{}@relax#2\@_finish\%
8500 @gdef@_finish{@_finishx} @global@let@_finishx@relax
8502 % #1 - THE_MACRO ARG_RESULT
8503 % #2 - PENDING_BS
8504 % #3 - NEXT_TOKEN
8505 % #4 used to look ahead
8507 % If the next token is not a backslash, process the rest of the argument;
8508 % otherwise, remove the next token.
8509 @gdef@look_ahead#1!#2#3#4{%
8510 @ifx#4\%
8511 @expandafter@gobble_and_check_finish
8512 @else
8513 @expandafter@add_segment
8514 @fi#1!{#2}#4#4%
8517 % #1 - THE_MACRO ARG_RESULT
8518 % #2 - PENDING_BS
8519 % #3 - NEXT_TOKEN
8520 % #4 should be a backslash, which is gobbled.
8521 % #5 looks ahead
8523 % Double backslash found. Add a single backslash, and look ahead.
8524 @gdef@gobble_and_check_finish#1!#2#3#4#5{%
8525 @add_segment#1\!{}#5#5%
8528 @gdef@is_fi{@fi}
8530 % #1 - THE_MACRO ARG_RESULT
8531 % #2 - PENDING_BS
8532 % #3 - NEXT_TOKEN
8533 % #4 is input stream until next backslash
8535 % Input stream is either at the start of the argument, or just after a
8536 % backslash sequence, either a lone backslash, or a doubled backslash.
8537 % NEXT_TOKEN contains the first token in the input stream: if it is \finish,
8538 % finish; otherwise, append to ARG_RESULT the segment of the argument up until
8539 % the next backslash. PENDING_BACKSLASH contains a backslash to represent
8540 % a backslash just before the start of the input stream that has not been
8541 % added to ARG_RESULT.
8542 @gdef@add_segment#1!#2#3#4\{%
8543 @ifx#3@_finish
8544 @call_the_macro#1!%
8545 @else
8546 % append the pending backslash to the result, followed by the next segment
8547 @expandafter@is_fi@look_ahead#1#2#4!{\}@fi
8548 % this @fi is discarded by @look_ahead.
8549 % we can't get rid of it with \expandafter because we don't know how
8550 % long #4 is.
8553 % #1 - THE_MACRO
8554 % #2 - ARG_RESULT
8555 % #3 discards the res of the conditional in @add_segment, and @is_fi ends the
8556 % conditional.
8557 @gdef@call_the_macro#1#2!#3@fi{@is_fi #1{#2}}
8560 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8562 % \braceorline MAC is used for a one-argument macro MAC. It checks
8563 % whether the next non-whitespace character is a {. It sets the context
8564 % for reading the argument (slightly different in the two cases). Then,
8565 % to read the argument, in the whole-line case, it then calls the regular
8566 % \parsearg MAC; in the lbrace case, it calls \passargtomacro MAC.
8568 \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
8569 \def\braceorlinexxx{%
8570 \ifx\nchar\bgroup
8571 \macroargctxt
8572 \expandafter\passargtomacro
8573 \else
8574 \macrolineargctxt\expandafter\parsearg
8575 \fi \macnamexxx}
8578 % @alias.
8579 % We need some trickery to remove the optional spaces around the equal
8580 % sign. Make them active and then expand them all to nothing.
8582 \def\alias{\parseargusing\obeyspaces\aliasxxx}
8583 \def\aliasxxx #1{\aliasyyy#1\relax}
8584 \def\aliasyyy #1=#2\relax{%
8586 \expandafter\let\obeyedspace=\empty
8587 \addtomacrolist{#1}%
8588 \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}%
8590 \next
8594 \message{cross references,}
8596 \newwrite\auxfile
8597 \newif\ifhavexrefs % True if xref values are known.
8598 \newif\ifwarnedxrefs % True if we warned once that they aren't known.
8600 % @inforef is relatively simple.
8601 \def\inforef #1{\inforefzzz #1,,,,**}
8602 \def\inforefzzz #1,#2,#3,#4**{%
8603 \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
8604 node \samp{\ignorespaces#1{}}}
8606 % @node's only job in TeX is to define \lastnode, which is used in
8607 % cross-references. The @node line might or might not have commas, and
8608 % might or might not have spaces before the first comma, like:
8609 % @node foo , bar , ...
8610 % We don't want such trailing spaces in the node name.
8612 \parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse}
8614 % also remove a trailing comma, in case of something like this:
8615 % @node Help-Cross, , , Cross-refs
8616 \def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse}
8617 \def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}\omittopnode}
8619 % Used so that the @top node doesn't have to be wrapped in an @ifnottex
8620 % conditional.
8621 % \doignore goes to more effort to skip nested conditionals but we don't need
8622 % that here.
8623 \def\omittopnode{%
8624 \ifx\lastnode\wordTop
8625 \expandafter\ignorenode\fi
8627 \def\wordTop{Top}
8629 % Until the next @node, @part or @bye command, divert output to a box that
8630 % is not output.
8631 \def\ignorenode{\setbox\dummybox\vbox\bgroup
8632 \def\part{\egroup\part}%
8633 \def\node{\egroup\node}%
8634 \ignorenodebye
8637 {\let\bye\relax
8638 \gdef\ignorenodebye{\let\bye\ignorenodebyedef}
8639 \gdef\ignorenodebyedef{\egroup(`Top' node ignored)\bye}}
8640 % The redefinition of \bye here is because it is declared \outer
8642 \let\lastnode=\empty
8644 % Write a cross-reference definition for the current node. #1 is the
8645 % type (Ynumbered, Yappendix, Ynothing).
8647 \def\donoderef#1{%
8648 \ifx\lastnode\empty\else
8649 \setref{\lastnode}{#1}%
8650 \global\let\lastnode=\empty
8654 % @anchor{NAME} -- define xref target at arbitrary point.
8656 \newcount\savesfregister
8658 \def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi}
8659 \def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi}
8660 \def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces}
8662 % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
8663 % anchor), which consists of three parts:
8664 % 1) NAME-title - the current sectioning name taken from \currentsection,
8665 % or the anchor name.
8666 % 2) NAME-snt - section number and type, passed as the SNT arg, or
8667 % empty for anchors.
8668 % 3) NAME-pg - the page number.
8670 % This is called from \donoderef, \anchor, and \dofloat. In the case of
8671 % floats, there is an additional part, which is not written here:
8672 % 4) NAME-lof - the text as it should appear in a @listoffloats.
8674 \def\setref#1#2{%
8675 \pdfmkdest{#1}%
8676 \iflinks
8678 \requireauxfile
8679 \atdummies % preserve commands, but don't expand them
8680 % match definition in \xrdef, \refx, \xrefX.
8681 \def\value##1{##1}%
8682 \edef\writexrdef##1##2{%
8683 \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
8684 ##1}{##2}}% these are parameters of \writexrdef
8686 \toks0 = \expandafter{\currentsection}%
8687 \immediate \writexrdef{title}{\the\toks0 }%
8688 \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
8689 \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout
8694 % @xrefautosectiontitle on|off says whether @section(ing) names are used
8695 % automatically in xrefs, if the third arg is not explicitly specified.
8696 % This was provided as a "secret" @set xref-automatic-section-title
8697 % variable, now it's official.
8699 \parseargdef\xrefautomaticsectiontitle{%
8700 \def\temp{#1}%
8701 \ifx\temp\onword
8702 \expandafter\let\csname SETxref-automatic-section-title\endcsname
8703 = \empty
8704 \else\ifx\temp\offword
8705 \expandafter\let\csname SETxref-automatic-section-title\endcsname
8706 = \relax
8707 \else
8708 \errhelp = \EMsimple
8709 \errmessage{Unknown @xrefautomaticsectiontitle value `\temp',
8710 must be on|off}%
8711 \fi\fi
8714 % \f
8715 % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is
8716 % the node name, #2 the name of the Info cross-reference, #3 the printed
8717 % node name, #4 the name of the Info file, #5 the name of the printed
8718 % manual. All but the node name can be omitted.
8720 \def\pxref{\putwordsee{} \xrefXX}
8721 \def\xref{\putwordSee{} \xrefXX}
8722 \def\ref{\xrefXX}
8724 \def\xrefXX#1{\def\xrefXXarg{#1}\futurelet\tokenafterxref\xrefXXX}
8725 \def\xrefXXX{\expandafter\xrefX\expandafter[\xrefXXarg,,,,,,,]}
8727 \newbox\toprefbox
8728 \newbox\printedrefnamebox
8729 \newbox\infofilenamebox
8730 \newbox\printedmanualbox
8732 \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
8733 \unsepspaces
8735 % Get args without leading/trailing spaces.
8736 \def\printedrefname{\ignorespaces #3}%
8737 \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}%
8739 \def\infofilename{\ignorespaces #4}%
8740 \setbox\infofilenamebox = \hbox{\infofilename\unskip}%
8742 \def\printedmanual{\ignorespaces #5}%
8743 \setbox\printedmanualbox = \hbox{\printedmanual\unskip}%
8745 % If the printed reference name (arg #3) was not explicitly given in
8746 % the @xref, figure out what we want to use.
8747 \ifdim \wd\printedrefnamebox = 0pt
8748 % No printed node name was explicitly given.
8749 \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax
8750 % Not auto section-title: use node name inside the square brackets.
8751 \def\printedrefname{\ignorespaces #1}%
8752 \else
8753 % Auto section-title: use chapter/section title inside
8754 % the square brackets if we have it.
8755 \ifdim \wd\printedmanualbox > 0pt
8756 % It is in another manual, so we don't have it; use node name.
8757 \def\printedrefname{\ignorespaces #1}%
8758 \else
8759 \ifhavexrefs
8760 % We (should) know the real title if we have the xref values.
8761 \def\printedrefname{\refx{#1-title}}%
8762 \else
8763 % Otherwise just copy the Info node name.
8764 \def\printedrefname{\ignorespaces #1}%
8765 \fi%
8770 % Make link in pdf output.
8771 \ifpdf
8772 % For pdfTeX and LuaTeX
8773 {\indexnofonts
8774 \makevalueexpandable
8775 \turnoffactive
8776 % This expands tokens, so do it after making catcode changes, so _
8777 % etc. don't get their TeX definitions. This ignores all spaces in
8778 % #4, including (wrongly) those in the middle of the filename.
8779 \getfilename{#4}%
8781 % This (wrongly) does not take account of leading or trailing
8782 % spaces in #1, which should be ignored.
8783 \setpdfdestname{#1}%
8785 \ifx\pdfdestname\empty
8786 \def\pdfdestname{Top}% no empty targets
8789 \leavevmode
8790 \startlink attr{/Border [0 0 0]}%
8791 \ifnum\filenamelength>0
8792 goto file{\the\filename.pdf} name{\pdfdestname}%
8793 \else
8794 goto name{\pdfmkpgn{\pdfdestname}}%
8797 \setcolor{\linkcolor}%
8798 \else
8799 \ifx\XeTeXrevision\thisisundefined
8800 \else
8801 % For XeTeX
8802 {\indexnofonts
8803 \makevalueexpandable
8804 \turnoffactive
8805 % This expands tokens, so do it after making catcode changes, so _
8806 % etc. don't get their TeX definitions. This ignores all spaces in
8807 % #4, including (wrongly) those in the middle of the filename.
8808 \getfilename{#4}%
8810 % This (wrongly) does not take account of leading or trailing
8811 % spaces in #1, which should be ignored.
8812 \setpdfdestname{#1}%
8814 \ifx\pdfdestname\empty
8815 \def\pdfdestname{Top}% no empty targets
8818 \leavevmode
8819 \ifnum\filenamelength>0
8820 % With default settings,
8821 % XeTeX (xdvipdfmx) replaces link destination names with integers.
8822 % In this case, the replaced destination names of
8823 % remote PDFs are no longer known. In order to avoid a replacement,
8824 % you can use xdvipdfmx's command line option `-C 0x0010'.
8825 % If you use XeTeX 0.99996+ (TeX Live 2016+),
8826 % this command line option is no longer necessary
8827 % because we can use the `dvipdfmx:config' special.
8828 \special{pdf:bann << /Border [0 0 0] /Type /Annot /Subtype /Link /A
8829 << /S /GoToR /F (\the\filename.pdf) /D (\pdfdestname) >> >>}%
8830 \else
8831 \special{pdf:bann << /Border [0 0 0] /Type /Annot /Subtype /Link /A
8832 << /S /GoTo /D (\pdfdestname) >> >>}%
8835 \setcolor{\linkcolor}%
8839 % Have to otherify everything special to allow the \csname to
8840 % include an _ in the xref name, etc.
8841 \indexnofonts
8842 \turnoffactive
8843 \def\value##1{##1}%
8844 \expandafter\global\expandafter\let\expandafter\Xthisreftitle
8845 \csname XR#1-title\endcsname
8848 % Float references are printed completely differently: "Figure 1.2"
8849 % instead of "[somenode], p.3". \iffloat distinguishes them by
8850 % \Xthisreftitle being set to a magic string.
8851 \iffloat\Xthisreftitle
8852 % If the user specified the print name (third arg) to the ref,
8853 % print it instead of our usual "Figure 1.2".
8854 \ifdim\wd\printedrefnamebox = 0pt
8855 \refx{#1-snt}%
8856 \else
8857 \printedrefname
8860 % If the user also gave the printed manual name (fifth arg), append
8861 % "in MANUALNAME".
8862 \ifdim \wd\printedmanualbox > 0pt
8863 \space \putwordin{} \cite{\printedmanual}%
8865 \else
8866 % node/anchor (non-float) references.
8868 % If we use \unhbox to print the node names, TeX does not insert
8869 % empty discretionaries after hyphens, which means that it will not
8870 % find a line break at a hyphen in a node names. Since some manuals
8871 % are best written with fairly long node names, containing hyphens,
8872 % this is a loss. Therefore, we give the text of the node name
8873 % again, so it is as if TeX is seeing it for the first time.
8875 \ifdim \wd\printedmanualbox > 0pt
8876 % Cross-manual reference with a printed manual name.
8878 \crossmanualxref{\cite{\printedmanual\unskip}}%
8880 \else\ifdim \wd\infofilenamebox > 0pt
8881 % Cross-manual reference with only an info filename (arg 4), no
8882 % printed manual name (arg 5). This is essentially the same as
8883 % the case above; we output the filename, since we have nothing else.
8885 \crossmanualxref{\code{\infofilename\unskip}}%
8887 \else
8888 % Reference within this manual.
8890 % Only output a following space if the -snt ref is nonempty, as the ref
8891 % will be empty for @unnumbered and @anchor.
8892 \setbox2 = \hbox{\ignorespaces \refx{#1-snt}}%
8893 \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
8895 % output the `[mynode]' via the macro below so it can be overridden.
8896 \xrefprintnodename\printedrefname
8898 \ifflagclear{txiomitxrefpg}{%
8899 % We always want a comma
8901 % output the `page 3'.
8902 \turnoffactive \putpageref{#1}%
8903 % Add a , if xref followed by a space
8904 \if\space\noexpand\tokenafterxref ,%
8905 \else\ifx\ \tokenafterxref ,% @TAB
8906 \else\ifx\*\tokenafterxref ,% @*
8907 \else\ifx\ \tokenafterxref ,% @SPACE
8908 \else\ifx\
8909 \tokenafterxref ,% @NL
8910 \else\ifx\tie\tokenafterxref ,% @tie
8911 \fi\fi\fi\fi\fi\fi
8912 }{}%
8913 \fi\fi
8915 \endlink
8916 \endgroup}
8918 % can be overridden in translation files
8919 \def\putpageref#1{%
8920 \space\putwordpage\tie\refx{#1-pg}}
8922 % Output a cross-manual xref to #1. Used just above (twice).
8924 % Only include the text "Section ``foo'' in" if the foo is neither
8925 % missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply
8926 % "see The Foo Manual", the idea being to refer to the whole manual.
8928 % But, this being TeX, we can't easily compare our node name against the
8929 % string "Top" while ignoring the possible spaces before and after in
8930 % the input. By adding the arbitrary 7sp below, we make it much less
8931 % likely that a real node name would have the same width as "Top" (e.g.,
8932 % in a monospaced font). Hopefully it will never happen in practice.
8934 % For the same basic reason, we retypeset the "Top" at every
8935 % reference, since the current font is indeterminate.
8937 \def\crossmanualxref#1{%
8938 \setbox\toprefbox = \hbox{Top\kern7sp}%
8939 \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}%
8940 \ifdim \wd2 > 7sp % nonempty?
8941 \ifdim \wd2 = \wd\toprefbox \else % same as Top?
8942 \putwordSection{} ``\printedrefname'' \putwordin{}\space
8948 % This macro is called from \xrefX for the `[nodename]' part of xref
8949 % output. It's a separate macro only so it can be changed more easily,
8950 % since square brackets don't work well in some documents. Particularly
8951 % one that Bob is working on :).
8953 \def\xrefprintnodename#1{[#1]}
8955 % Things referred to by \setref.
8957 \def\Ynothing{}
8958 \def\Yomitfromtoc{}
8959 \def\Ynumbered{%
8960 \ifnum\secno=0
8961 \putwordChapter@tie \the\chapno
8962 \else \ifnum\subsecno=0
8963 \putwordSection@tie \the\chapno.\the\secno
8964 \else \ifnum\subsubsecno=0
8965 \putwordSection@tie \the\chapno.\the\secno.\the\subsecno
8966 \else
8967 \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno
8968 \fi\fi\fi
8970 \def\Yappendix{%
8971 \ifnum\secno=0
8972 \putwordAppendix@tie @char\the\appendixno{}%
8973 \else \ifnum\subsecno=0
8974 \putwordSection@tie @char\the\appendixno.\the\secno
8975 \else \ifnum\subsubsecno=0
8976 \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno
8977 \else
8978 \putwordSection@tie
8979 @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno
8980 \fi\fi\fi
8983 % \refx{NAME} - reference a cross-reference string named NAME.
8984 \def\refx#1{%
8985 \requireauxfile
8987 \indexnofonts
8988 \turnoffactive
8989 \def\value##1{##1}%
8990 \expandafter\global\expandafter\let\expandafter\thisrefX
8991 \csname XR#1\endcsname
8993 \ifx\thisrefX\relax
8994 % If not defined, say something at least.
8995 \angleleft un\-de\-fined\angleright
8996 \iflinks
8997 \ifhavexrefs
8998 {\toks0 = {#1}% avoid expansion of possibly-complex value
8999 \message{\linenumber Undefined cross reference `\the\toks0'.}}%
9000 \else
9001 \ifwarnedxrefs\else
9002 \global\warnedxrefstrue
9003 \message{Cross reference values unknown; you must run TeX again.}%
9007 \else
9008 % It's defined, so just use it.
9009 \thisrefX
9013 % This is the macro invoked by entries in the aux file. Define a control
9014 % sequence for a cross-reference target (we prepend XR to the control sequence
9015 % name to avoid collisions). The value is the page number. If this is a float
9016 % type, we have more work to do.
9018 \def\xrdef#1#2{%
9019 {% Expand the node or anchor name to remove control sequences.
9020 % \turnoffactive stops 8-bit characters being changed to commands
9021 % like @'e. \refx does the same to retrieve the value in the definition.
9022 \indexnofonts
9023 \turnoffactive
9024 \def\value##1{##1}%
9025 \xdef\safexrefname{#1}%
9028 \bgroup
9029 \expandafter\gdef\csname XR\safexrefname\endcsname{#2}%
9030 \egroup
9031 % We put the \gdef inside a group to avoid the definitions building up on
9032 % TeX's save stack, which can cause it to run out of space for aux files with
9033 % thousands of lines. \gdef doesn't use the save stack, but \csname does
9034 % when it defines an unknown control sequence as \relax.
9036 % Was that xref control sequence that we just defined for a float?
9037 \expandafter\iffloat\csname XR\safexrefname\endcsname
9038 % it was a float, and we have the (safe) float type in \iffloattype.
9039 \expandafter\let\expandafter\floatlist
9040 \csname floatlist\iffloattype\endcsname
9042 % Is this the first time we've seen this float type?
9043 \expandafter\ifx\floatlist\relax
9044 \toks0 = {\do}% yes, so just \do
9045 \else
9046 % had it before, so preserve previous elements in list.
9047 \toks0 = \expandafter{\floatlist\do}%
9050 % Remember this xref in the control sequence \floatlistFLOATTYPE,
9051 % for later use in \listoffloats.
9052 \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0
9053 {\safexrefname}}%
9057 % If working on a large document in chapters, it is convenient to
9058 % be able to disable indexing, cross-referencing, and contents, for test runs.
9059 % This is done with @novalidate at the beginning of the file.
9061 \newif\iflinks \linkstrue % by default we want the aux files.
9062 \let\novalidate = \linksfalse
9064 % Used when writing to the aux file, or when using data from it.
9065 \def\requireauxfile{%
9066 \iflinks
9067 \tryauxfile
9068 % Open the new aux file. TeX will close it automatically at exit.
9069 \immediate\openout\auxfile=\jobname.aux
9071 \global\let\requireauxfile=\relax % Only do this once.
9074 % Read the last existing aux file, if any. No error if none exists.
9076 \def\tryauxfile{%
9077 \openin 1 \jobname.aux
9078 \ifeof 1 \else
9079 \readdatafile{aux}%
9080 \global\havexrefstrue
9082 \closein 1
9085 \def\setupdatafile{%
9086 \catcode`\^^@=\other
9087 \catcode`\^^A=\other
9088 \catcode`\^^B=\other
9089 \catcode`\^^C=\other
9090 \catcode`\^^D=\other
9091 \catcode`\^^E=\other
9092 \catcode`\^^F=\other
9093 \catcode`\^^G=\other
9094 \catcode`\^^H=\other
9095 \catcode`\^^K=\other
9096 \catcode`\^^L=\other
9097 \catcode`\^^N=\other
9098 \catcode`\^^P=\other
9099 \catcode`\^^Q=\other
9100 \catcode`\^^R=\other
9101 \catcode`\^^S=\other
9102 \catcode`\^^T=\other
9103 \catcode`\^^U=\other
9104 \catcode`\^^V=\other
9105 \catcode`\^^W=\other
9106 \catcode`\^^X=\other
9107 \catcode`\^^Z=\other
9108 \catcode`\^^[=\other
9109 \catcode`\^^\=\other
9110 \catcode`\^^]=\other
9111 \catcode`\^^^=\other
9112 \catcode`\^^_=\other
9113 \catcode`\^=\other
9115 % Special characters. Should be turned off anyway, but...
9116 \catcode`\~=\other
9117 \catcode`\[=\other
9118 \catcode`\]=\other
9119 \catcode`\"=\other
9120 \catcode`\_=\active
9121 \catcode`\|=\active
9122 \catcode`\<=\active
9123 \catcode`\>=\active
9124 \catcode`\$=\other
9125 \catcode`\#=\other
9126 \catcode`\&=\other
9127 \catcode`\%=\other
9128 \catcode`+=\other % avoid \+ for paranoia even though we've turned it off
9130 \catcode`\\=\active
9132 % @ is our escape character in .aux files, and we need braces.
9133 \catcode`\{=1
9134 \catcode`\}=2
9135 \catcode`\@=0
9138 \def\readdatafile#1{%
9139 \begingroup
9140 \setupdatafile
9141 \input\jobname.#1
9142 \endgroup}
9145 \message{insertions,}
9146 % including footnotes.
9148 \newcount \footnoteno
9150 % The trailing space in the following definition for supereject is
9151 % vital for proper filling; pages come out unaligned when you do a
9152 % pagealignmacro call if that space before the closing brace is
9153 % removed. (Generally, numeric constants should always be followed by a
9154 % space to prevent strange expansion errors.)
9155 \def\supereject{\par\penalty -20000\footnoteno =0 }
9157 % @footnotestyle is meaningful for Info output only.
9158 \let\footnotestyle=\comment
9160 {\catcode `\@=11
9162 % Auto-number footnotes. Otherwise like plain.
9163 \gdef\footnote{%
9164 \global\advance\footnoteno by \@ne
9165 \edef\thisfootno{$^{\the\footnoteno}$}%
9167 % In case the footnote comes at the end of a sentence, preserve the
9168 % extra spacing after we do the footnote number.
9169 \let\@sf\empty
9170 \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi
9172 % Remove inadvertent blank space before typesetting the footnote number.
9173 \unskip
9174 \thisfootno\@sf
9175 \dofootnote
9178 % Don't bother with the trickery in plain.tex to not require the
9179 % footnote text as a parameter. Our footnotes don't need to be so general.
9181 % Oh yes, they do; otherwise, @ifset (and anything else that uses
9182 % \parseargline) fails inside footnotes because the tokens are fixed when
9183 % the footnote is read. --karl, 16nov96.
9185 \gdef\dofootnote{%
9186 \insert\footins\bgroup
9188 % Nested footnotes are not supported in TeX, that would take a lot
9189 % more work. (\startsavinginserts does not suffice.)
9190 \let\footnote=\errfootnotenest
9192 % We want to typeset this text as a normal paragraph, even if the
9193 % footnote reference occurs in (for example) a display environment.
9194 % So reset some parameters.
9195 \hsize=\txipagewidth
9196 \interlinepenalty\interfootnotelinepenalty
9197 \splittopskip\ht\strutbox % top baseline for broken footnotes
9198 \splitmaxdepth\dp\strutbox
9199 \floatingpenalty\@MM
9200 \leftskip\z@skip
9201 \rightskip\z@skip
9202 \spaceskip\z@skip
9203 \xspaceskip\z@skip
9204 \parindent\defaultparindent
9206 \smallfonts \rm
9208 % Because we use hanging indentation in footnotes, a @noindent appears
9209 % to exdent this text, so make it be a no-op. makeinfo does not use
9210 % hanging indentation so @noindent can still be needed within footnote
9211 % text after an @example or the like (not that this is good style).
9212 \let\noindent = \relax
9214 % Hang the footnote text off the number. Use \everypar in case the
9215 % footnote extends for more than one paragraph.
9216 \everypar = {\hang}%
9217 \textindent{\thisfootno}%
9219 % Don't crash into the line above the footnote text. Since this
9220 % expands into a box, it must come within the paragraph, lest it
9221 % provide a place where TeX can split the footnote.
9222 \footstrut
9224 % Invoke rest of plain TeX footnote routine.
9225 \futurelet\next\fo@t
9227 }%end \catcode `\@=11
9229 \def\errfootnotenest{%
9230 \errhelp=\EMsimple
9231 \errmessage{Nested footnotes not supported in texinfo.tex,
9232 even though they work in makeinfo; sorry}
9235 \def\errfootnoteheading{%
9236 \errhelp=\EMsimple
9237 \errmessage{Footnotes in chapters, sections, etc., are not supported}
9240 % In case a @footnote appears in a vbox, save the footnote text and create
9241 % the real \insert just after the vbox finished. Otherwise, the insertion
9242 % would be lost.
9243 % Similarly, if a @footnote appears inside an alignment, save the footnote
9244 % text to a box and make the \insert when a row of the table is finished.
9245 % And the same can be done for other insert classes. --kasal, 16nov03.
9247 % Replace the \insert primitive by a cheating macro.
9248 % Deeper inside, just make sure that the saved insertions are not spilled
9249 % out prematurely.
9251 \def\startsavinginserts{%
9252 \ifx \insert\ptexinsert
9253 \let\insert\saveinsert
9254 \else
9255 \let\checkinserts\relax
9259 % This \insert replacement works for both \insert\footins{foo} and
9260 % \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}.
9262 \def\saveinsert#1{%
9263 \edef\next{\noexpand\savetobox \makeSAVEname#1}%
9264 \afterassignment\next
9265 % swallow the left brace
9266 \let\temp =
9268 \def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}}
9269 \def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1}
9271 \def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi}
9273 \def\placesaveins#1{%
9274 \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname
9275 {\box#1}%
9278 % eat @SAVE -- beware, all of them have catcode \other:
9280 \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-)
9281 \gdef\gobblesave @SAVE{}
9284 % initialization:
9285 \def\newsaveins #1{%
9286 \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}%
9287 \next
9289 \def\newsaveinsX #1{%
9290 \csname newbox\endcsname #1%
9291 \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts
9292 \checksaveins #1}%
9295 % initialize:
9296 \let\checkinserts\empty
9297 \newsaveins\footins
9298 \newsaveins\margin
9301 % @image. We use the macros from epsf.tex to support this.
9302 % If epsf.tex is not installed and @image is used, we complain.
9304 % Check for and read epsf.tex up front. If we read it only at @image
9305 % time, we might be inside a group, and then its definitions would get
9306 % undone and the next image would fail.
9307 \openin 1 = epsf.tex
9308 \ifeof 1 \else
9309 % Do not bother showing banner with epsf.tex v2.7k (available in
9310 % doc/epsf.tex and on ctan).
9311 \def\epsfannounce{\toks0 = }%
9312 \input epsf.tex
9314 \closein 1
9316 % We will only complain once about lack of epsf.tex.
9317 \newif\ifwarnednoepsf
9318 \newhelp\noepsfhelp{epsf.tex must be installed for images to
9319 work. It is also included in the Texinfo distribution, or you can get
9320 it from https://ctan.org/texarchive/macros/texinfo/texinfo/doc/epsf.tex.}
9322 \def\image#1{%
9323 \ifx\epsfbox\thisisundefined
9324 \ifwarnednoepsf \else
9325 \errhelp = \noepsfhelp
9326 \errmessage{epsf.tex not found, images will be ignored}%
9327 \global\warnednoepsftrue
9329 \else
9330 \imagexxx #1,,,,,\finish
9334 % Approximate height of a line in the standard text font.
9335 \newdimen\capheight
9336 \setbox0=\vbox{\tenrm H}
9337 \capheight=\ht0
9340 % Arguments to @image:
9341 % #1 is (mandatory) image filename; we tack on .eps extension.
9342 % #2 is (optional) width, #3 is (optional) height.
9343 % #4 is (ignored optional) html alt text.
9344 % #5 is (ignored optional) extension.
9345 % #6 is just the usual extra ignored arg for parsing stuff.
9346 \newif\ifimagevmode
9347 \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
9348 \catcode`\^^M = 5 % in case we're inside an example
9349 \normalturnoffactive % allow _ et al. in names
9350 \makevalueexpandable
9351 \ifvmode
9352 \imagevmodetrue
9353 \medskip
9354 % Usually we'll have text after the image which will insert
9355 % \parskip glue, so insert it here too to equalize the space
9356 % above and below.
9357 \vskip\parskip
9359 % Place image in a \vtop for a top page margin that is (close to) correct,
9360 % as \topskip glue is relative to the first baseline.
9361 \vtop\bgroup \kern -\capheight \vskip-\parskip
9364 \ifx\centersub\centerV
9365 % For @center @image, enter vertical mode and add vertical space
9366 % Enter an extra \parskip because @center doesn't add space itself.
9367 \vbox\bgroup\vskip\parskip\medskip\vskip\parskip
9368 \else
9369 % Enter horizontal mode so that indentation from an enclosing
9370 % environment such as @quotation is respected.
9371 % However, if we're at the top level, we don't want the
9372 % normal paragraph indentation.
9373 \imageindent
9376 % Output the image.
9377 \ifpdf
9378 % For pdfTeX and LuaTeX <= 0.80
9379 \dopdfimage{#1}{#2}{#3}%
9380 \else
9381 \ifx\XeTeXrevision\thisisundefined
9382 % For epsf.tex
9383 % \epsfbox itself resets \epsf?size at each figure.
9384 \setbox0 = \hbox{\ignorespaces #2}%
9385 \ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
9386 \setbox0 = \hbox{\ignorespaces #3}%
9387 \ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
9388 \epsfbox{#1.eps}%
9389 \else
9390 % For XeTeX
9391 \doxeteximage{#1}{#2}{#3}%
9395 \ifimagevmode
9396 \egroup
9397 \medskip % space after a standalone image
9399 \ifx\centersub\centerV % @center @image
9400 \medskip
9401 \egroup % close \vbox
9403 \endgroup}
9406 % @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables,
9407 % etc. We don't actually implement floating yet, we always include the
9408 % float "here". But it seemed the best name for the future.
9410 \envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish}
9412 % There may be a space before second and/or third parameter; delete it.
9413 \def\eatcommaspace#1, {#1,}
9415 % #1 is the optional FLOATTYPE, the text label for this float, typically
9416 % "Figure", "Table", "Example", etc. Can't contain commas. If omitted,
9417 % this float will not be numbered and cannot be referred to.
9419 % #2 is the optional xref label. Also must be present for the float to
9420 % be referable.
9422 % #3 is the optional positioning argument; for now, it is ignored. It
9423 % will somehow specify the positions allowed to float to (here, top, bottom).
9425 % We keep a separate counter for each FLOATTYPE, which we reset at each
9426 % chapter-level command.
9427 \let\resetallfloatnos=\empty
9429 \def\dofloat#1,#2,#3,#4\finish{%
9430 \let\thiscaption=\empty
9431 \let\thisshortcaption=\empty
9433 % don't lose footnotes inside @float.
9435 % BEWARE: when the floats start float, we have to issue warning whenever an
9436 % insert appears inside a float which could possibly float. --kasal, 26may04
9438 \startsavinginserts
9440 % We can't be used inside a paragraph.
9441 \par
9443 \vtop\bgroup
9444 \def\floattype{#1}%
9445 \def\floatlabel{#2}%
9446 \def\floatloc{#3}% we do nothing with this yet.
9448 \ifx\floattype\empty
9449 \let\safefloattype=\empty
9450 \else
9452 % the floattype might have accents or other special characters,
9453 % but we need to use it in a control sequence name.
9454 \indexnofonts
9455 \turnoffactive
9456 \xdef\safefloattype{\floattype}%
9460 % If label is given but no type, we handle that as the empty type.
9461 \ifx\floatlabel\empty \else
9462 % We want each FLOATTYPE to be numbered separately (Figure 1,
9463 % Table 1, Figure 2, ...). (And if no label, no number.)
9465 \expandafter\getfloatno\csname\safefloattype floatno\endcsname
9466 \global\advance\floatno by 1
9469 % This magic value for \currentsection is output by \setref as the
9470 % XREFLABEL-title value. \xrefX uses it to distinguish float
9471 % labels (which have a completely different output format) from
9472 % node and anchor labels. And \xrdef uses it to construct the
9473 % lists of floats.
9475 \edef\currentsection{\floatmagic=\safefloattype}%
9476 \setref{\floatlabel}{Yfloat}%
9480 % start with \parskip glue, I guess.
9481 \vskip\parskip
9483 % Don't suppress indentation if a float happens to start a section.
9484 \restorefirstparagraphindent
9487 % we have these possibilities:
9488 % @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap
9489 % @float Foo,lbl & no caption: Foo 1.1
9490 % @float Foo & @caption{Cap}: Foo: Cap
9491 % @float Foo & no caption: Foo
9492 % @float ,lbl & Caption{Cap}: 1.1: Cap
9493 % @float ,lbl & no caption: 1.1
9494 % @float & @caption{Cap}: Cap
9495 % @float & no caption:
9497 \def\Efloat{%
9498 \let\floatident = \empty
9500 % In all cases, if we have a float type, it comes first.
9501 \ifx\floattype\empty \else \def\floatident{\floattype}\fi
9503 % If we have an xref label, the number comes next.
9504 \ifx\floatlabel\empty \else
9505 \ifx\floattype\empty \else % if also had float type, need tie first.
9506 \appendtomacro\floatident{\tie}%
9508 % the number.
9509 \appendtomacro\floatident{\chaplevelprefix\the\floatno}%
9512 % Start the printed caption with what we've constructed in
9513 % \floatident, but keep it separate; we need \floatident again.
9514 \let\captionline = \floatident
9516 \ifx\thiscaption\empty \else
9517 \ifx\floatident\empty \else
9518 \appendtomacro\captionline{: }% had ident, so need a colon between
9521 % caption text.
9522 \appendtomacro\captionline{\scanexp\thiscaption}%
9525 % If we have anything to print, print it, with space before.
9526 % Eventually this needs to become an \insert.
9527 \ifx\captionline\empty \else
9528 \vskip.5\parskip
9529 \captionline
9531 % Space below caption.
9532 \vskip\parskip
9535 % If have an xref label, write the list of floats info. Do this
9536 % after the caption, to avoid chance of it being a breakpoint.
9537 \ifx\floatlabel\empty \else
9538 % Write the text that goes in the lof to the aux file as
9539 % \floatlabel-lof. Besides \floatident, we include the short
9540 % caption if specified, else the full caption if specified, else nothing.
9542 \requireauxfile
9543 \atdummies
9545 \ifx\thisshortcaption\empty
9546 \def\gtemp{\thiscaption}%
9547 \else
9548 \def\gtemp{\thisshortcaption}%
9550 \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident
9551 \ifx\gtemp\empty \else : \gtemp \fi}}%
9554 \egroup % end of \vtop
9556 \checkinserts
9559 % Append the tokens #2 to the definition of macro #1, not expanding either.
9561 \def\appendtomacro#1#2{%
9562 \expandafter\def\expandafter#1\expandafter{#1#2}%
9565 % @caption, @shortcaption
9567 \def\caption{\docaption\thiscaption}
9568 \def\shortcaption{\docaption\thisshortcaption}
9569 \def\docaption{\checkenv\float \bgroup\scanctxt\defcaption}
9570 \def\defcaption#1#2{\egroup \def#1{#2}}
9572 % The parameter is the control sequence identifying the counter we are
9573 % going to use. Create it if it doesn't exist and assign it to \floatno.
9574 \def\getfloatno#1{%
9575 \ifx#1\relax
9576 % Haven't seen this figure type before.
9577 \csname newcount\endcsname #1%
9579 % Remember to reset this floatno at the next chap.
9580 \expandafter\gdef\expandafter\resetallfloatnos
9581 \expandafter{\resetallfloatnos #1=0 }%
9583 \let\floatno#1%
9586 % \setref calls this to get the XREFLABEL-snt value. We want an @xref
9587 % to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we
9588 % first read the @float command.
9590 \def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}%
9592 % Magic string used for the XREFLABEL-title value, so \xrefX can
9593 % distinguish floats from other xref types.
9594 \def\floatmagic{!!float!!}
9596 % #1 is the control sequence we are passed; we expand into a conditional
9597 % which is true if #1 represents a float ref. That is, the magic
9598 % \currentsection value which we \setref above.
9600 \def\iffloat#1{\expandafter\doiffloat#1==\finish}
9602 % #1 is (maybe) the \floatmagic string. If so, #2 will be the
9603 % (safe) float type for this float. We set \iffloattype to #2.
9605 \def\doiffloat#1=#2=#3\finish{%
9606 \def\temp{#1}%
9607 \def\iffloattype{#2}%
9608 \ifx\temp\floatmagic
9611 % @listoffloats FLOATTYPE - print a list of floats like a table of contents.
9613 \parseargdef\listoffloats{%
9614 \def\floattype{#1}% floattype
9616 % the floattype might have accents or other special characters,
9617 % but we need to use it in a control sequence name.
9618 \indexnofonts
9619 \turnoffactive
9620 \xdef\safefloattype{\floattype}%
9623 % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE.
9624 \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax
9625 \ifhavexrefs
9626 % if the user said @listoffloats foo but never @float foo.
9627 \message{\linenumber No `\safefloattype' floats to list.}%
9629 \else
9630 \begingroup
9631 \leftskip=\tocindent % indent these entries like a toc
9632 \let\do=\listoffloatsdo
9633 \csname floatlist\safefloattype\endcsname
9634 \endgroup
9638 % This is called on each entry in a list of floats. We're passed the
9639 % xref label, in the form LABEL-title, which is how we save it in the
9640 % aux file. We strip off the -title and look up \XRLABEL-lof, which
9641 % has the text we're supposed to typeset here.
9643 % Figures without xref labels will not be included in the list (since
9644 % they won't appear in the aux file).
9646 \def\listoffloatsdo#1{\listoffloatsdoentry#1\finish}
9647 \def\listoffloatsdoentry#1-title\finish{{%
9648 % Can't fully expand XR#1-lof because it can contain anything. Just
9649 % pass the control sequence. On the other hand, XR#1-pg is just the
9650 % page number, and we want to fully expand that so we can get a link
9651 % in pdf output.
9652 \toksA = \expandafter{\csname XR#1-lof\endcsname}%
9654 % use the same \entry macro we use to generate the TOC and index.
9655 \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}%
9656 \writeentry
9660 \message{localization,}
9662 % For single-language documents, @documentlanguage is usually given very
9663 % early, just after @documentencoding. Single argument is the language
9664 % (de) or locale (de_DE) abbreviation.
9667 \catcode`\_ = \active
9668 \globaldefs=1
9669 \parseargdef\documentlanguage{%
9670 \tex % read txi-??.tex file in plain TeX.
9671 % Read the file by the name they passed if it exists.
9672 \let_ = \normalunderscore % normal _ character for filename test
9673 \openin 1 txi-#1.tex
9674 \ifeof 1
9675 \documentlanguagetrywithoutunderscore #1_\finish
9676 \else
9677 \globaldefs = 1 % everything in the txi-LL files needs to persist
9678 \input txi-#1.tex
9680 \closein 1
9681 \endgroup % end raw TeX
9684 % If they passed de_DE, and txi-de_DE.tex doesn't exist,
9685 % try txi-de.tex.
9687 \gdef\documentlanguagetrywithoutunderscore#1_#2\finish{%
9688 \openin 1 txi-#1.tex
9689 \ifeof 1
9690 \errhelp = \nolanghelp
9691 \errmessage{Cannot read language file txi-#1.tex}%
9692 \else
9693 \globaldefs = 1 % everything in the txi-LL files needs to persist
9694 \input txi-#1.tex
9696 \closein 1
9698 }% end of special _ catcode
9700 \newhelp\nolanghelp{The given language definition file cannot be found or
9701 is empty. Maybe you need to install it? Putting it in the current
9702 directory should work if nowhere else does.}
9704 % This macro is called from txi-??.tex files; the first argument is the
9705 % \language name to set (without the "\lang@" prefix), the second and
9706 % third args are \{left,right}hyphenmin.
9708 % The language names to pass are determined when the format is built.
9709 % See the etex.log file created at that time, e.g.,
9710 % /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log.
9712 % With TeX Live 2008, etex now includes hyphenation patterns for all
9713 % available languages. This means we can support hyphenation in
9714 % Texinfo, at least to some extent. (This still doesn't solve the
9715 % accented characters problem.)
9717 \catcode`@=11
9718 \def\txisetlanguage#1#2#3{%
9719 % do not set the language if the name is undefined in the current TeX.
9720 \expandafter\ifx\csname lang@#1\endcsname \relax
9721 \message{no patterns for #1}%
9722 \else
9723 \global\language = \csname lang@#1\endcsname
9725 % but there is no harm in adjusting the hyphenmin values regardless.
9726 \global\lefthyphenmin = #2\relax
9727 \global\righthyphenmin = #3\relax
9730 % XeTeX and LuaTeX can handle Unicode natively.
9731 % Their default I/O uses UTF-8 sequences instead of a byte-wise operation.
9732 % Other TeX engines' I/O (pdfTeX, etc.) is byte-wise.
9734 \newif\iftxinativeunicodecapable
9735 \newif\iftxiusebytewiseio
9737 \ifx\XeTeXrevision\thisisundefined
9738 \ifx\luatexversion\thisisundefined
9739 \txinativeunicodecapablefalse
9740 \txiusebytewiseiotrue
9741 \else
9742 \txinativeunicodecapabletrue
9743 \txiusebytewiseiofalse
9745 \else
9746 \txinativeunicodecapabletrue
9747 \txiusebytewiseiofalse
9750 % Set I/O by bytes instead of UTF-8 sequence for XeTeX and LuaTex
9751 % for non-UTF-8 (byte-wise) encodings.
9753 \def\setbytewiseio{%
9754 \ifx\XeTeXrevision\thisisundefined
9755 \else
9756 \XeTeXdefaultencoding "bytes" % For subsequent files to be read
9757 \XeTeXinputencoding "bytes" % For document root file
9758 % Unfortunately, there seems to be no corresponding XeTeX command for
9759 % output encoding. This is a problem for auxiliary index and TOC files.
9760 % The only solution would be perhaps to write out @U{...} sequences in
9761 % place of non-ASCII characters.
9764 \ifx\luatexversion\thisisundefined
9765 \else
9766 \directlua{
9767 local utf8_char, byte, gsub = unicode.utf8.char, string.byte, string.gsub
9768 local function convert_char (char)
9769 return utf8_char(byte(char))
9772 local function convert_line (line)
9773 return gsub(line, ".", convert_char)
9776 callback.register("process_input_buffer", convert_line)
9778 local function convert_line_out (line)
9779 local line_out = ""
9780 for c in string.utfvalues(line) do
9781 line_out = line_out .. string.char(c)
9783 return line_out
9786 callback.register("process_output_buffer", convert_line_out)
9790 \txiusebytewiseiotrue
9794 % Helpers for encodings.
9795 % Set the catcode of characters 128 through 255 to the specified number.
9797 \def\setnonasciicharscatcode#1{%
9798 \count255=128
9799 \loop\ifnum\count255<256
9800 \global\catcode\count255=#1\relax
9801 \advance\count255 by 1
9802 \repeat
9805 \def\setnonasciicharscatcodenonglobal#1{%
9806 \count255=128
9807 \loop\ifnum\count255<256
9808 \catcode\count255=#1\relax
9809 \advance\count255 by 1
9810 \repeat
9813 % @documentencoding sets the definition of non-ASCII characters
9814 % according to the specified encoding.
9816 \def\documentencoding{\parseargusing\filenamecatcodes\documentencodingzzz}
9817 \def\documentencodingzzz#1{%
9819 % Encoding being declared for the document.
9820 \def\declaredencoding{\csname #1.enc\endcsname}%
9822 % Supported encodings: names converted to tokens in order to be able
9823 % to compare them with \ifx.
9824 \def\ascii{\csname US-ASCII.enc\endcsname}%
9825 \def\latnine{\csname ISO-8859-15.enc\endcsname}%
9826 \def\latone{\csname ISO-8859-1.enc\endcsname}%
9827 \def\lattwo{\csname ISO-8859-2.enc\endcsname}%
9828 \def\utfeight{\csname UTF-8.enc\endcsname}%
9830 \ifx \declaredencoding \ascii
9831 \asciichardefs
9833 \else \ifx \declaredencoding \lattwo
9834 \iftxinativeunicodecapable
9835 \setbytewiseio
9837 \setnonasciicharscatcode\active
9838 \lattwochardefs
9840 \else \ifx \declaredencoding \latone
9841 \iftxinativeunicodecapable
9842 \setbytewiseio
9844 \setnonasciicharscatcode\active
9845 \latonechardefs
9847 \else \ifx \declaredencoding \latnine
9848 \iftxinativeunicodecapable
9849 \setbytewiseio
9851 \setnonasciicharscatcode\active
9852 \latninechardefs
9854 \else \ifx \declaredencoding \utfeight
9855 \iftxinativeunicodecapable
9856 % For native Unicode handling (XeTeX and LuaTeX)
9857 \nativeunicodechardefs
9858 \else
9859 % For treating UTF-8 as byte sequences (TeX, eTeX and pdfTeX).
9860 % Since we already invoke \utfeightchardefs at the top level,
9861 % making non-ascii chars active is sufficient.
9862 \setnonasciicharscatcode\active
9865 \else
9866 \message{Ignoring unknown document encoding: #1.}%
9868 \fi % utfeight
9869 \fi % latnine
9870 \fi % latone
9871 \fi % lattwo
9872 \fi % ascii
9874 \ifx\XeTeXrevision\thisisundefined
9875 \else
9876 \ifx \declaredencoding \utfeight
9877 \else
9878 \ifx \declaredencoding \ascii
9879 \else
9880 \message{Warning: XeTeX with non-UTF-8 encodings cannot handle %
9881 non-ASCII characters in auxiliary files.}%
9887 % A message to be logged when using a character that isn't available
9888 % the default font encoding (OT1).
9890 \def\missingcharmsg#1{\message{Character missing, sorry: #1.}}
9892 % Take account of \c (plain) vs. \, (Texinfo) difference.
9893 \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi}
9895 \def\gdefchar#1#2{%
9896 \gdef#1{%
9897 \ifpassthroughchars
9898 \string#1%
9899 \else
9904 \begingroup
9906 % Make non-ASCII characters active for defining the character definition
9907 % macros.
9908 \setnonasciicharscatcode\active
9910 % Latin1 (ISO-8859-1) character definitions.
9911 \gdef\latonechardefs{%
9912 \gdefchar^^a0{\tie}
9913 \gdefchar^^a1{\exclamdown}
9914 \gdefchar^^a2{{\tcfont \char162}} % cent
9915 \gdefchar^^a3{\pounds{}}
9916 \gdefchar^^a4{{\tcfont \char164}} % currency
9917 \gdefchar^^a5{{\tcfont \char165}} % yen
9918 \gdefchar^^a6{{\tcfont \char166}} % broken bar
9919 \gdefchar^^a7{\S}
9920 \gdefchar^^a8{\"{}}
9921 \gdefchar^^a9{\copyright{}}
9922 \gdefchar^^aa{\ordf}
9923 \gdefchar^^ab{\guillemetleft{}}
9924 \gdefchar^^ac{\ensuremath\lnot}
9925 \gdefchar^^ad{\-}
9926 \gdefchar^^ae{\registeredsymbol{}}
9927 \gdefchar^^af{\={}}
9929 \gdefchar^^b0{\textdegree}
9930 \gdefchar^^b1{$\pm$}
9931 \gdefchar^^b2{$^2$}
9932 \gdefchar^^b3{$^3$}
9933 \gdefchar^^b4{\'{}}
9934 \gdefchar^^b5{$\mu$}
9935 \gdefchar^^b6{\P}
9936 \gdefchar^^b7{\ensuremath\cdot}
9937 \gdefchar^^b8{\cedilla\ }
9938 \gdefchar^^b9{$^1$}
9939 \gdefchar^^ba{\ordm}
9940 \gdefchar^^bb{\guillemetright{}}
9941 \gdefchar^^bc{$1\over4$}
9942 \gdefchar^^bd{$1\over2$}
9943 \gdefchar^^be{$3\over4$}
9944 \gdefchar^^bf{\questiondown}
9946 \gdefchar^^c0{\`A}
9947 \gdefchar^^c1{\'A}
9948 \gdefchar^^c2{\^A}
9949 \gdefchar^^c3{\~A}
9950 \gdefchar^^c4{\"A}
9951 \gdefchar^^c5{\ringaccent A}
9952 \gdefchar^^c6{\AE}
9953 \gdefchar^^c7{\cedilla C}
9954 \gdefchar^^c8{\`E}
9955 \gdefchar^^c9{\'E}
9956 \gdefchar^^ca{\^E}
9957 \gdefchar^^cb{\"E}
9958 \gdefchar^^cc{\`I}
9959 \gdefchar^^cd{\'I}
9960 \gdefchar^^ce{\^I}
9961 \gdefchar^^cf{\"I}
9963 \gdefchar^^d0{\DH}
9964 \gdefchar^^d1{\~N}
9965 \gdefchar^^d2{\`O}
9966 \gdefchar^^d3{\'O}
9967 \gdefchar^^d4{\^O}
9968 \gdefchar^^d5{\~O}
9969 \gdefchar^^d6{\"O}
9970 \gdefchar^^d7{$\times$}
9971 \gdefchar^^d8{\O}
9972 \gdefchar^^d9{\`U}
9973 \gdefchar^^da{\'U}
9974 \gdefchar^^db{\^U}
9975 \gdefchar^^dc{\"U}
9976 \gdefchar^^dd{\'Y}
9977 \gdefchar^^de{\TH}
9978 \gdefchar^^df{\ss}
9980 \gdefchar^^e0{\`a}
9981 \gdefchar^^e1{\'a}
9982 \gdefchar^^e2{\^a}
9983 \gdefchar^^e3{\~a}
9984 \gdefchar^^e4{\"a}
9985 \gdefchar^^e5{\ringaccent a}
9986 \gdefchar^^e6{\ae}
9987 \gdefchar^^e7{\cedilla c}
9988 \gdefchar^^e8{\`e}
9989 \gdefchar^^e9{\'e}
9990 \gdefchar^^ea{\^e}
9991 \gdefchar^^eb{\"e}
9992 \gdefchar^^ec{\`{\dotless i}}
9993 \gdefchar^^ed{\'{\dotless i}}
9994 \gdefchar^^ee{\^{\dotless i}}
9995 \gdefchar^^ef{\"{\dotless i}}
9997 \gdefchar^^f0{\dh}
9998 \gdefchar^^f1{\~n}
9999 \gdefchar^^f2{\`o}
10000 \gdefchar^^f3{\'o}
10001 \gdefchar^^f4{\^o}
10002 \gdefchar^^f5{\~o}
10003 \gdefchar^^f6{\"o}
10004 \gdefchar^^f7{$\div$}
10005 \gdefchar^^f8{\o}
10006 \gdefchar^^f9{\`u}
10007 \gdefchar^^fa{\'u}
10008 \gdefchar^^fb{\^u}
10009 \gdefchar^^fc{\"u}
10010 \gdefchar^^fd{\'y}
10011 \gdefchar^^fe{\th}
10012 \gdefchar^^ff{\"y}
10015 % Latin9 (ISO-8859-15) encoding character definitions.
10016 \gdef\latninechardefs{%
10017 % Encoding is almost identical to Latin1.
10018 \latonechardefs
10020 \gdefchar^^a4{\euro{}}
10021 \gdefchar^^a6{\v S}
10022 \gdefchar^^a8{\v s}
10023 \gdefchar^^b4{\v Z}
10024 \gdefchar^^b8{\v z}
10025 \gdefchar^^bc{\OE}
10026 \gdefchar^^bd{\oe}
10027 \gdefchar^^be{\"Y}
10030 % Latin2 (ISO-8859-2) character definitions.
10031 \gdef\lattwochardefs{%
10032 \gdefchar^^a0{\tie}
10033 \gdefchar^^a1{\ogonek{A}}
10034 \gdefchar^^a2{\u{}}
10035 \gdefchar^^a3{\L}
10036 \gdefchar^^a4{\missingcharmsg{CURRENCY SIGN}}
10037 \gdefchar^^a5{\v L}
10038 \gdefchar^^a6{\'S}
10039 \gdefchar^^a7{\S}
10040 \gdefchar^^a8{\"{}}
10041 \gdefchar^^a9{\v S}
10042 \gdefchar^^aa{\cedilla S}
10043 \gdefchar^^ab{\v T}
10044 \gdefchar^^ac{\'Z}
10045 \gdefchar^^ad{\-}
10046 \gdefchar^^ae{\v Z}
10047 \gdefchar^^af{\dotaccent Z}
10049 \gdefchar^^b0{\textdegree}
10050 \gdefchar^^b1{\ogonek{a}}
10051 \gdefchar^^b2{\ogonek{ }}
10052 \gdefchar^^b3{\l}
10053 \gdefchar^^b4{\'{}}
10054 \gdefchar^^b5{\v l}
10055 \gdefchar^^b6{\'s}
10056 \gdefchar^^b7{\v{}}
10057 \gdefchar^^b8{\cedilla\ }
10058 \gdefchar^^b9{\v s}
10059 \gdefchar^^ba{\cedilla s}
10060 \gdefchar^^bb{\v t}
10061 \gdefchar^^bc{\'z}
10062 \gdefchar^^bd{\H{}}
10063 \gdefchar^^be{\v z}
10064 \gdefchar^^bf{\dotaccent z}
10066 \gdefchar^^c0{\'R}
10067 \gdefchar^^c1{\'A}
10068 \gdefchar^^c2{\^A}
10069 \gdefchar^^c3{\u A}
10070 \gdefchar^^c4{\"A}
10071 \gdefchar^^c5{\'L}
10072 \gdefchar^^c6{\'C}
10073 \gdefchar^^c7{\cedilla C}
10074 \gdefchar^^c8{\v C}
10075 \gdefchar^^c9{\'E}
10076 \gdefchar^^ca{\ogonek{E}}
10077 \gdefchar^^cb{\"E}
10078 \gdefchar^^cc{\v E}
10079 \gdefchar^^cd{\'I}
10080 \gdefchar^^ce{\^I}
10081 \gdefchar^^cf{\v D}
10083 \gdefchar^^d0{\DH}
10084 \gdefchar^^d1{\'N}
10085 \gdefchar^^d2{\v N}
10086 \gdefchar^^d3{\'O}
10087 \gdefchar^^d4{\^O}
10088 \gdefchar^^d5{\H O}
10089 \gdefchar^^d6{\"O}
10090 \gdefchar^^d7{$\times$}
10091 \gdefchar^^d8{\v R}
10092 \gdefchar^^d9{\ringaccent U}
10093 \gdefchar^^da{\'U}
10094 \gdefchar^^db{\H U}
10095 \gdefchar^^dc{\"U}
10096 \gdefchar^^dd{\'Y}
10097 \gdefchar^^de{\cedilla T}
10098 \gdefchar^^df{\ss}
10100 \gdefchar^^e0{\'r}
10101 \gdefchar^^e1{\'a}
10102 \gdefchar^^e2{\^a}
10103 \gdefchar^^e3{\u a}
10104 \gdefchar^^e4{\"a}
10105 \gdefchar^^e5{\'l}
10106 \gdefchar^^e6{\'c}
10107 \gdefchar^^e7{\cedilla c}
10108 \gdefchar^^e8{\v c}
10109 \gdefchar^^e9{\'e}
10110 \gdefchar^^ea{\ogonek{e}}
10111 \gdefchar^^eb{\"e}
10112 \gdefchar^^ec{\v e}
10113 \gdefchar^^ed{\'{\dotless{i}}}
10114 \gdefchar^^ee{\^{\dotless{i}}}
10115 \gdefchar^^ef{\v d}
10117 \gdefchar^^f0{\dh}
10118 \gdefchar^^f1{\'n}
10119 \gdefchar^^f2{\v n}
10120 \gdefchar^^f3{\'o}
10121 \gdefchar^^f4{\^o}
10122 \gdefchar^^f5{\H o}
10123 \gdefchar^^f6{\"o}
10124 \gdefchar^^f7{$\div$}
10125 \gdefchar^^f8{\v r}
10126 \gdefchar^^f9{\ringaccent u}
10127 \gdefchar^^fa{\'u}
10128 \gdefchar^^fb{\H u}
10129 \gdefchar^^fc{\"u}
10130 \gdefchar^^fd{\'y}
10131 \gdefchar^^fe{\cedilla t}
10132 \gdefchar^^ff{\dotaccent{}}
10135 \endgroup % active chars
10137 % UTF-8 character definitions.
10139 % This code to support UTF-8 is based on LaTeX's utf8.def, with some
10140 % changes for Texinfo conventions. It is included here under the GPL by
10141 % permission from Frank Mittelbach and the LaTeX team.
10143 \newcount\countUTFx
10144 \newcount\countUTFy
10145 \newcount\countUTFz
10147 \gdef\UTFviiiTwoOctets#1#2{\expandafter
10148 \UTFviiiDefined\csname u8:#1\string #2\endcsname}
10150 \gdef\UTFviiiThreeOctets#1#2#3{\expandafter
10151 \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname}
10153 \gdef\UTFviiiFourOctets#1#2#3#4{\expandafter
10154 \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname}
10156 \gdef\UTFviiiDefined#1{%
10157 \ifx #1\relax
10158 \message{\linenumber Unicode char \string #1 not defined for Texinfo}%
10159 \else
10160 \expandafter #1%
10164 % Give non-ASCII bytes the active definitions for processing UTF-8 sequences
10165 \begingroup
10166 \catcode`\~13
10167 \catcode`\$12
10168 \catcode`\"12
10170 % Loop from \countUTFx to \countUTFy, performing \UTFviiiTmp
10171 % substituting ~ and $ with a character token of that value.
10172 \def\UTFviiiLoop{%
10173 \global\catcode\countUTFx\active
10174 \uccode`\~\countUTFx
10175 \uccode`\$\countUTFx
10176 \uppercase\expandafter{\UTFviiiTmp}%
10177 \advance\countUTFx by 1
10178 \ifnum\countUTFx < \countUTFy
10179 \expandafter\UTFviiiLoop
10180 \fi}
10182 % For bytes other than the first in a UTF-8 sequence. Not expected to
10183 % be expanded except when writing to auxiliary files.
10184 \countUTFx = "80
10185 \countUTFy = "C2
10186 \def\UTFviiiTmp{%
10187 \gdef~{%
10188 \ifpassthroughchars $\fi}}%
10189 \UTFviiiLoop
10191 \countUTFx = "C2
10192 \countUTFy = "E0
10193 \def\UTFviiiTmp{%
10194 \gdef~{%
10195 \ifpassthroughchars $%
10196 \else\expandafter\UTFviiiTwoOctets\expandafter$\fi}}%
10197 \UTFviiiLoop
10199 \countUTFx = "E0
10200 \countUTFy = "F0
10201 \def\UTFviiiTmp{%
10202 \gdef~{%
10203 \ifpassthroughchars $%
10204 \else\expandafter\UTFviiiThreeOctets\expandafter$\fi}}%
10205 \UTFviiiLoop
10207 \countUTFx = "F0
10208 \countUTFy = "F4
10209 \def\UTFviiiTmp{%
10210 \gdef~{%
10211 \ifpassthroughchars $%
10212 \else\expandafter\UTFviiiFourOctets\expandafter$\fi
10214 \UTFviiiLoop
10215 \endgroup
10217 \def\globallet{\global\let} % save some \expandafter's below
10219 % @U{xxxx} to produce U+xxxx, if we support it.
10220 \def\U#1{%
10221 \expandafter\ifx\csname uni:#1\endcsname \relax
10222 \iftxinativeunicodecapable
10223 % All Unicode characters can be used if native Unicode handling is
10224 % active. However, if the font does not have the glyph,
10225 % letters are missing.
10226 \begingroup
10227 \uccode`\.="#1\relax
10228 \uppercase{.}
10229 \endgroup
10230 \else
10231 \errhelp = \EMsimple
10232 \errmessage{Unicode character U+#1 not supported, sorry}%
10234 \else
10235 \csname uni:#1\endcsname
10239 % These macros are used here to construct the name of a control
10240 % sequence to be defined.
10241 \def\UTFviiiTwoOctetsName#1#2{%
10242 \csname u8:#1\string #2\endcsname}%
10243 \def\UTFviiiThreeOctetsName#1#2#3{%
10244 \csname u8:#1\string #2\string #3\endcsname}%
10245 \def\UTFviiiFourOctetsName#1#2#3#4{%
10246 \csname u8:#1\string #2\string #3\string #4\endcsname}%
10248 % For UTF-8 byte sequences (TeX, e-TeX and pdfTeX),
10249 % provide a definition macro to replace a Unicode character;
10250 % this gets used by the @U command
10252 \begingroup
10253 \catcode`\"=12
10254 \catcode`\<=12
10255 \catcode`\.=12
10256 \catcode`\,=12
10257 \catcode`\;=12
10258 \catcode`\!=12
10259 \catcode`\~=13
10260 \gdef\DeclareUnicodeCharacterUTFviii#1#2{%
10261 \countUTFz = "#1\relax
10262 \begingroup
10263 \parseXMLCharref
10265 % Give \u8:... its definition. The sequence of seven \expandafter's
10266 % expands after the \gdef three times, e.g.
10268 % 1. \UTFviiTwoOctetsName B1 B2
10269 % 2. \csname u8:B1 \string B2 \endcsname
10270 % 3. \u8: B1 B2 (a single control sequence token)
10272 \expandafter\expandafter
10273 \expandafter\expandafter
10274 \expandafter\expandafter
10275 \expandafter\gdef \UTFviiiTmp{#2}%
10277 \expandafter\ifx\csname uni:#1\endcsname \relax \else
10278 \message{Internal error, already defined: #1}%
10281 % define an additional control sequence for this code point.
10282 \expandafter\globallet\csname uni:#1\endcsname \UTFviiiTmp
10283 \endgroup}
10285 % Given the value in \countUTFz as a Unicode code point, set \UTFviiiTmp
10286 % to the corresponding UTF-8 sequence.
10287 \gdef\parseXMLCharref{%
10288 \ifnum\countUTFz < "20\relax
10289 \errhelp = \EMsimple
10290 \errmessage{Cannot define Unicode char value < 0020}%
10291 \else\ifnum\countUTFz < "800\relax
10292 \parseUTFviiiA,%
10293 \parseUTFviiiB C\UTFviiiTwoOctetsName.,%
10294 \else\ifnum\countUTFz < "10000\relax
10295 \parseUTFviiiA;%
10296 \parseUTFviiiA,%
10297 \parseUTFviiiB E\UTFviiiThreeOctetsName.{,;}%
10298 \else
10299 \parseUTFviiiA;%
10300 \parseUTFviiiA,%
10301 \parseUTFviiiA!%
10302 \parseUTFviiiB F\UTFviiiFourOctetsName.{!,;}%
10303 \fi\fi\fi
10306 % Extract a byte from the end of the UTF-8 representation of \countUTFx.
10307 % It must be a non-initial byte in the sequence.
10308 % Change \uccode of #1 for it to be used in \parseUTFviiiB as one
10309 % of the bytes.
10310 \gdef\parseUTFviiiA#1{%
10311 \countUTFx = \countUTFz
10312 \divide\countUTFz by 64
10313 \countUTFy = \countUTFz % Save to be the future value of \countUTFz.
10314 \multiply\countUTFz by 64
10316 % \countUTFz is now \countUTFx with the last 5 bits cleared. Subtract
10317 % in order to get the last five bits.
10318 \advance\countUTFx by -\countUTFz
10320 % Convert this to the byte in the UTF-8 sequence.
10321 \advance\countUTFx by 128
10322 \uccode `#1\countUTFx
10323 \countUTFz = \countUTFy}
10325 % Used to put a UTF-8 byte sequence into \UTFviiiTmp
10326 % #1 is the increment for \countUTFz to yield a the first byte of the UTF-8
10327 % sequence.
10328 % #2 is one of the \UTFviii*OctetsName macros.
10329 % #3 is always a full stop (.)
10330 % #4 is a template for the other bytes in the sequence. The values for these
10331 % bytes is substituted in here with \uppercase using the \uccode's.
10332 \gdef\parseUTFviiiB#1#2#3#4{%
10333 \advance\countUTFz by "#10\relax
10334 \uccode `#3\countUTFz
10335 \uppercase{\gdef\UTFviiiTmp{#2#3#4}}}
10336 \endgroup
10338 % For native Unicode handling (XeTeX and LuaTeX),
10339 % provide a definition macro that sets a catcode to `other' non-globally
10341 \def\DeclareUnicodeCharacterNativeOther#1#2{%
10342 \catcode"#1=\other
10345 % https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_M
10346 % U+0000..U+007F = https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block)
10347 % U+0080..U+00FF = https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)
10348 % U+0100..U+017F = https://en.wikipedia.org/wiki/Latin_Extended-A
10349 % U+0180..U+024F = https://en.wikipedia.org/wiki/Latin_Extended-B
10351 % Many of our renditions are less than wonderful, and all the missing
10352 % characters are available somewhere. Loading the necessary fonts
10353 % awaits user request. We can't truly support Unicode without
10354 % reimplementing everything that's been done in LaTeX for many years,
10355 % plus probably using luatex or xetex, and who knows what else.
10356 % We won't be doing that here in this simple file. But we can try to at
10357 % least make most of the characters not bomb out.
10359 \def\unicodechardefs{%
10360 \DeclareUnicodeCharacter{0020}{ } % space
10361 \DeclareUnicodeCharacter{0021}{\char"21 }% % space to terminate number
10362 \DeclareUnicodeCharacter{0022}{\char"22 }%
10363 \DeclareUnicodeCharacter{0023}{\char"23 }%
10364 \DeclareUnicodeCharacter{0024}{\char"24 }%
10365 \DeclareUnicodeCharacter{0025}{\char"25 }%
10366 \DeclareUnicodeCharacter{0026}{\char"26 }%
10367 \DeclareUnicodeCharacter{0027}{\char"27 }%
10368 \DeclareUnicodeCharacter{0028}{\char"28 }%
10369 \DeclareUnicodeCharacter{0029}{\char"29 }%
10370 \DeclareUnicodeCharacter{002A}{\char"2A }%
10371 \DeclareUnicodeCharacter{002B}{\char"2B }%
10372 \DeclareUnicodeCharacter{002C}{\char"2C }%
10373 \DeclareUnicodeCharacter{002D}{\char"2D }%
10374 \DeclareUnicodeCharacter{002E}{\char"2E }%
10375 \DeclareUnicodeCharacter{002F}{\char"2F }%
10376 \DeclareUnicodeCharacter{0030}{0}%
10377 \DeclareUnicodeCharacter{0031}{1}%
10378 \DeclareUnicodeCharacter{0032}{2}%
10379 \DeclareUnicodeCharacter{0033}{3}%
10380 \DeclareUnicodeCharacter{0034}{4}%
10381 \DeclareUnicodeCharacter{0035}{5}%
10382 \DeclareUnicodeCharacter{0036}{6}%
10383 \DeclareUnicodeCharacter{0037}{7}%
10384 \DeclareUnicodeCharacter{0038}{8}%
10385 \DeclareUnicodeCharacter{0039}{9}%
10386 \DeclareUnicodeCharacter{003A}{\char"3A }%
10387 \DeclareUnicodeCharacter{003B}{\char"3B }%
10388 \DeclareUnicodeCharacter{003C}{\char"3C }%
10389 \DeclareUnicodeCharacter{003D}{\char"3D }%
10390 \DeclareUnicodeCharacter{003E}{\char"3E }%
10391 \DeclareUnicodeCharacter{003F}{\char"3F }%
10392 \DeclareUnicodeCharacter{0040}{\char"40 }%
10393 \DeclareUnicodeCharacter{0041}{A}%
10394 \DeclareUnicodeCharacter{0042}{B}%
10395 \DeclareUnicodeCharacter{0043}{C}%
10396 \DeclareUnicodeCharacter{0044}{D}%
10397 \DeclareUnicodeCharacter{0045}{E}%
10398 \DeclareUnicodeCharacter{0046}{F}%
10399 \DeclareUnicodeCharacter{0047}{G}%
10400 \DeclareUnicodeCharacter{0048}{H}%
10401 \DeclareUnicodeCharacter{0049}{I}%
10402 \DeclareUnicodeCharacter{004A}{J}%
10403 \DeclareUnicodeCharacter{004B}{K}%
10404 \DeclareUnicodeCharacter{004C}{L}%
10405 \DeclareUnicodeCharacter{004D}{M}%
10406 \DeclareUnicodeCharacter{004E}{N}%
10407 \DeclareUnicodeCharacter{004F}{O}%
10408 \DeclareUnicodeCharacter{0050}{P}%
10409 \DeclareUnicodeCharacter{0051}{Q}%
10410 \DeclareUnicodeCharacter{0052}{R}%
10411 \DeclareUnicodeCharacter{0053}{S}%
10412 \DeclareUnicodeCharacter{0054}{T}%
10413 \DeclareUnicodeCharacter{0055}{U}%
10414 \DeclareUnicodeCharacter{0056}{V}%
10415 \DeclareUnicodeCharacter{0057}{W}%
10416 \DeclareUnicodeCharacter{0058}{X}%
10417 \DeclareUnicodeCharacter{0059}{Y}%
10418 \DeclareUnicodeCharacter{005A}{Z}%
10419 \DeclareUnicodeCharacter{005B}{\char"5B }%
10420 \DeclareUnicodeCharacter{005C}{\char"5C }%
10421 \DeclareUnicodeCharacter{005D}{\char"5D }%
10422 \DeclareUnicodeCharacter{005E}{\char"5E }%
10423 \DeclareUnicodeCharacter{005F}{\char"5F }%
10424 \DeclareUnicodeCharacter{0060}{\char"60 }%
10425 \DeclareUnicodeCharacter{0061}{a}%
10426 \DeclareUnicodeCharacter{0062}{b}%
10427 \DeclareUnicodeCharacter{0063}{c}%
10428 \DeclareUnicodeCharacter{0064}{d}%
10429 \DeclareUnicodeCharacter{0065}{e}%
10430 \DeclareUnicodeCharacter{0066}{f}%
10431 \DeclareUnicodeCharacter{0067}{g}%
10432 \DeclareUnicodeCharacter{0068}{h}%
10433 \DeclareUnicodeCharacter{0069}{i}%
10434 \DeclareUnicodeCharacter{006A}{j}%
10435 \DeclareUnicodeCharacter{006B}{k}%
10436 \DeclareUnicodeCharacter{006C}{l}%
10437 \DeclareUnicodeCharacter{006D}{m}%
10438 \DeclareUnicodeCharacter{006E}{n}%
10439 \DeclareUnicodeCharacter{006F}{o}%
10440 \DeclareUnicodeCharacter{0070}{p}%
10441 \DeclareUnicodeCharacter{0071}{q}%
10442 \DeclareUnicodeCharacter{0072}{r}%
10443 \DeclareUnicodeCharacter{0073}{s}%
10444 \DeclareUnicodeCharacter{0074}{t}%
10445 \DeclareUnicodeCharacter{0075}{u}%
10446 \DeclareUnicodeCharacter{0076}{v}%
10447 \DeclareUnicodeCharacter{0077}{w}%
10448 \DeclareUnicodeCharacter{0078}{x}%
10449 \DeclareUnicodeCharacter{0079}{y}%
10450 \DeclareUnicodeCharacter{007A}{z}%
10451 \DeclareUnicodeCharacter{007B}{\char"7B }%
10452 \DeclareUnicodeCharacter{007C}{\char"7C }%
10453 \DeclareUnicodeCharacter{007D}{\char"7D }%
10454 \DeclareUnicodeCharacter{007E}{\char"7E }%
10455 % \DeclareUnicodeCharacter{007F}{} % DEL
10457 \DeclareUnicodeCharacter{00A0}{\tie}%
10458 \DeclareUnicodeCharacter{00A1}{\exclamdown}%
10459 \DeclareUnicodeCharacter{00A2}{{\tcfont \char162}}% 0242=cent
10460 \DeclareUnicodeCharacter{00A3}{\pounds{}}%
10461 \DeclareUnicodeCharacter{00A4}{{\tcfont \char164}}% 0244=currency
10462 \DeclareUnicodeCharacter{00A5}{{\tcfont \char165}}% 0245=yen
10463 \DeclareUnicodeCharacter{00A6}{{\tcfont \char166}}% 0246=brokenbar
10464 \DeclareUnicodeCharacter{00A7}{\S}%
10465 \DeclareUnicodeCharacter{00A8}{\"{ }}%
10466 \DeclareUnicodeCharacter{00A9}{\copyright{}}%
10467 \DeclareUnicodeCharacter{00AA}{\ordf}%
10468 \DeclareUnicodeCharacter{00AB}{\guillemetleft{}}%
10469 \DeclareUnicodeCharacter{00AC}{\ensuremath\lnot}%
10470 \DeclareUnicodeCharacter{00AD}{\-}%
10471 \DeclareUnicodeCharacter{00AE}{\registeredsymbol{}}%
10472 \DeclareUnicodeCharacter{00AF}{\={ }}%
10474 \DeclareUnicodeCharacter{00B0}{\textdegree}%
10475 \DeclareUnicodeCharacter{00B1}{\ensuremath\pm}%
10476 \DeclareUnicodeCharacter{00B2}{$^2$}%
10477 \DeclareUnicodeCharacter{00B3}{$^3$}%
10478 \DeclareUnicodeCharacter{00B4}{\'{ }}%
10479 \DeclareUnicodeCharacter{00B5}{$\mu$}%
10480 \DeclareUnicodeCharacter{00B6}{\P}%
10481 \DeclareUnicodeCharacter{00B7}{\ensuremath\cdot}%
10482 \DeclareUnicodeCharacter{00B8}{\cedilla{ }}%
10483 \DeclareUnicodeCharacter{00B9}{$^1$}%
10484 \DeclareUnicodeCharacter{00BA}{\ordm}%
10485 \DeclareUnicodeCharacter{00BB}{\guillemetright{}}%
10486 \DeclareUnicodeCharacter{00BC}{$1\over4$}%
10487 \DeclareUnicodeCharacter{00BD}{$1\over2$}%
10488 \DeclareUnicodeCharacter{00BE}{$3\over4$}%
10489 \DeclareUnicodeCharacter{00BF}{\questiondown}%
10491 \DeclareUnicodeCharacter{00C0}{\`A}%
10492 \DeclareUnicodeCharacter{00C1}{\'A}%
10493 \DeclareUnicodeCharacter{00C2}{\^A}%
10494 \DeclareUnicodeCharacter{00C3}{\~A}%
10495 \DeclareUnicodeCharacter{00C4}{\"A}%
10496 \DeclareUnicodeCharacter{00C5}{\AA}%
10497 \DeclareUnicodeCharacter{00C6}{\AE}%
10498 \DeclareUnicodeCharacter{00C7}{\cedilla{C}}%
10499 \DeclareUnicodeCharacter{00C8}{\`E}%
10500 \DeclareUnicodeCharacter{00C9}{\'E}%
10501 \DeclareUnicodeCharacter{00CA}{\^E}%
10502 \DeclareUnicodeCharacter{00CB}{\"E}%
10503 \DeclareUnicodeCharacter{00CC}{\`I}%
10504 \DeclareUnicodeCharacter{00CD}{\'I}%
10505 \DeclareUnicodeCharacter{00CE}{\^I}%
10506 \DeclareUnicodeCharacter{00CF}{\"I}%
10508 \DeclareUnicodeCharacter{00D0}{\DH}%
10509 \DeclareUnicodeCharacter{00D1}{\~N}%
10510 \DeclareUnicodeCharacter{00D2}{\`O}%
10511 \DeclareUnicodeCharacter{00D3}{\'O}%
10512 \DeclareUnicodeCharacter{00D4}{\^O}%
10513 \DeclareUnicodeCharacter{00D5}{\~O}%
10514 \DeclareUnicodeCharacter{00D6}{\"O}%
10515 \DeclareUnicodeCharacter{00D7}{\ensuremath\times}%
10516 \DeclareUnicodeCharacter{00D8}{\O}%
10517 \DeclareUnicodeCharacter{00D9}{\`U}%
10518 \DeclareUnicodeCharacter{00DA}{\'U}%
10519 \DeclareUnicodeCharacter{00DB}{\^U}%
10520 \DeclareUnicodeCharacter{00DC}{\"U}%
10521 \DeclareUnicodeCharacter{00DD}{\'Y}%
10522 \DeclareUnicodeCharacter{00DE}{\TH}%
10523 \DeclareUnicodeCharacter{00DF}{\ss}%
10525 \DeclareUnicodeCharacter{00E0}{\`a}%
10526 \DeclareUnicodeCharacter{00E1}{\'a}%
10527 \DeclareUnicodeCharacter{00E2}{\^a}%
10528 \DeclareUnicodeCharacter{00E3}{\~a}%
10529 \DeclareUnicodeCharacter{00E4}{\"a}%
10530 \DeclareUnicodeCharacter{00E5}{\aa}%
10531 \DeclareUnicodeCharacter{00E6}{\ae}%
10532 \DeclareUnicodeCharacter{00E7}{\cedilla{c}}%
10533 \DeclareUnicodeCharacter{00E8}{\`e}%
10534 \DeclareUnicodeCharacter{00E9}{\'e}%
10535 \DeclareUnicodeCharacter{00EA}{\^e}%
10536 \DeclareUnicodeCharacter{00EB}{\"e}%
10537 \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}}%
10538 \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}}%
10539 \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}}%
10540 \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}}%
10542 \DeclareUnicodeCharacter{00F0}{\dh}%
10543 \DeclareUnicodeCharacter{00F1}{\~n}%
10544 \DeclareUnicodeCharacter{00F2}{\`o}%
10545 \DeclareUnicodeCharacter{00F3}{\'o}%
10546 \DeclareUnicodeCharacter{00F4}{\^o}%
10547 \DeclareUnicodeCharacter{00F5}{\~o}%
10548 \DeclareUnicodeCharacter{00F6}{\"o}%
10549 \DeclareUnicodeCharacter{00F7}{\ensuremath\div}%
10550 \DeclareUnicodeCharacter{00F8}{\o}%
10551 \DeclareUnicodeCharacter{00F9}{\`u}%
10552 \DeclareUnicodeCharacter{00FA}{\'u}%
10553 \DeclareUnicodeCharacter{00FB}{\^u}%
10554 \DeclareUnicodeCharacter{00FC}{\"u}%
10555 \DeclareUnicodeCharacter{00FD}{\'y}%
10556 \DeclareUnicodeCharacter{00FE}{\th}%
10557 \DeclareUnicodeCharacter{00FF}{\"y}%
10559 \DeclareUnicodeCharacter{0100}{\=A}%
10560 \DeclareUnicodeCharacter{0101}{\=a}%
10561 \DeclareUnicodeCharacter{0102}{\u{A}}%
10562 \DeclareUnicodeCharacter{0103}{\u{a}}%
10563 \DeclareUnicodeCharacter{0104}{\ogonek{A}}%
10564 \DeclareUnicodeCharacter{0105}{\ogonek{a}}%
10565 \DeclareUnicodeCharacter{0106}{\'C}%
10566 \DeclareUnicodeCharacter{0107}{\'c}%
10567 \DeclareUnicodeCharacter{0108}{\^C}%
10568 \DeclareUnicodeCharacter{0109}{\^c}%
10569 \DeclareUnicodeCharacter{010A}{\dotaccent{C}}%
10570 \DeclareUnicodeCharacter{010B}{\dotaccent{c}}%
10571 \DeclareUnicodeCharacter{010C}{\v{C}}%
10572 \DeclareUnicodeCharacter{010D}{\v{c}}%
10573 \DeclareUnicodeCharacter{010E}{\v{D}}%
10574 \DeclareUnicodeCharacter{010F}{d'}%
10576 \DeclareUnicodeCharacter{0110}{\DH}%
10577 \DeclareUnicodeCharacter{0111}{\dh}%
10578 \DeclareUnicodeCharacter{0112}{\=E}%
10579 \DeclareUnicodeCharacter{0113}{\=e}%
10580 \DeclareUnicodeCharacter{0114}{\u{E}}%
10581 \DeclareUnicodeCharacter{0115}{\u{e}}%
10582 \DeclareUnicodeCharacter{0116}{\dotaccent{E}}%
10583 \DeclareUnicodeCharacter{0117}{\dotaccent{e}}%
10584 \DeclareUnicodeCharacter{0118}{\ogonek{E}}%
10585 \DeclareUnicodeCharacter{0119}{\ogonek{e}}%
10586 \DeclareUnicodeCharacter{011A}{\v{E}}%
10587 \DeclareUnicodeCharacter{011B}{\v{e}}%
10588 \DeclareUnicodeCharacter{011C}{\^G}%
10589 \DeclareUnicodeCharacter{011D}{\^g}%
10590 \DeclareUnicodeCharacter{011E}{\u{G}}%
10591 \DeclareUnicodeCharacter{011F}{\u{g}}%
10593 \DeclareUnicodeCharacter{0120}{\dotaccent{G}}%
10594 \DeclareUnicodeCharacter{0121}{\dotaccent{g}}%
10595 \DeclareUnicodeCharacter{0122}{\cedilla{G}}%
10596 \DeclareUnicodeCharacter{0123}{\cedilla{g}}%
10597 \DeclareUnicodeCharacter{0124}{\^H}%
10598 \DeclareUnicodeCharacter{0125}{\^h}%
10599 \DeclareUnicodeCharacter{0126}{\missingcharmsg{H WITH STROKE}}%
10600 \DeclareUnicodeCharacter{0127}{\missingcharmsg{h WITH STROKE}}%
10601 \DeclareUnicodeCharacter{0128}{\~I}%
10602 \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}}%
10603 \DeclareUnicodeCharacter{012A}{\=I}%
10604 \DeclareUnicodeCharacter{012B}{\={\dotless{i}}}%
10605 \DeclareUnicodeCharacter{012C}{\u{I}}%
10606 \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}}%
10607 \DeclareUnicodeCharacter{012E}{\ogonek{I}}%
10608 \DeclareUnicodeCharacter{012F}{\ogonek{i}}%
10610 \DeclareUnicodeCharacter{0130}{\dotaccent{I}}%
10611 \DeclareUnicodeCharacter{0131}{\dotless{i}}%
10612 \DeclareUnicodeCharacter{0132}{IJ}%
10613 \DeclareUnicodeCharacter{0133}{ij}%
10614 \DeclareUnicodeCharacter{0134}{\^J}%
10615 \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}}%
10616 \DeclareUnicodeCharacter{0136}{\cedilla{K}}%
10617 \DeclareUnicodeCharacter{0137}{\cedilla{k}}%
10618 \DeclareUnicodeCharacter{0138}{\ensuremath\kappa}%
10619 \DeclareUnicodeCharacter{0139}{\'L}%
10620 \DeclareUnicodeCharacter{013A}{\'l}%
10621 \DeclareUnicodeCharacter{013B}{\cedilla{L}}%
10622 \DeclareUnicodeCharacter{013C}{\cedilla{l}}%
10623 \DeclareUnicodeCharacter{013D}{L'}% should kern
10624 \DeclareUnicodeCharacter{013E}{l'}% should kern
10625 \DeclareUnicodeCharacter{013F}{L\U{00B7}}%
10627 \DeclareUnicodeCharacter{0140}{l\U{00B7}}%
10628 \DeclareUnicodeCharacter{0141}{\L}%
10629 \DeclareUnicodeCharacter{0142}{\l}%
10630 \DeclareUnicodeCharacter{0143}{\'N}%
10631 \DeclareUnicodeCharacter{0144}{\'n}%
10632 \DeclareUnicodeCharacter{0145}{\cedilla{N}}%
10633 \DeclareUnicodeCharacter{0146}{\cedilla{n}}%
10634 \DeclareUnicodeCharacter{0147}{\v{N}}%
10635 \DeclareUnicodeCharacter{0148}{\v{n}}%
10636 \DeclareUnicodeCharacter{0149}{'n}%
10637 \DeclareUnicodeCharacter{014A}{\missingcharmsg{ENG}}%
10638 \DeclareUnicodeCharacter{014B}{\missingcharmsg{eng}}%
10639 \DeclareUnicodeCharacter{014C}{\=O}%
10640 \DeclareUnicodeCharacter{014D}{\=o}%
10641 \DeclareUnicodeCharacter{014E}{\u{O}}%
10642 \DeclareUnicodeCharacter{014F}{\u{o}}%
10644 \DeclareUnicodeCharacter{0150}{\H{O}}%
10645 \DeclareUnicodeCharacter{0151}{\H{o}}%
10646 \DeclareUnicodeCharacter{0152}{\OE}%
10647 \DeclareUnicodeCharacter{0153}{\oe}%
10648 \DeclareUnicodeCharacter{0154}{\'R}%
10649 \DeclareUnicodeCharacter{0155}{\'r}%
10650 \DeclareUnicodeCharacter{0156}{\cedilla{R}}%
10651 \DeclareUnicodeCharacter{0157}{\cedilla{r}}%
10652 \DeclareUnicodeCharacter{0158}{\v{R}}%
10653 \DeclareUnicodeCharacter{0159}{\v{r}}%
10654 \DeclareUnicodeCharacter{015A}{\'S}%
10655 \DeclareUnicodeCharacter{015B}{\'s}%
10656 \DeclareUnicodeCharacter{015C}{\^S}%
10657 \DeclareUnicodeCharacter{015D}{\^s}%
10658 \DeclareUnicodeCharacter{015E}{\cedilla{S}}%
10659 \DeclareUnicodeCharacter{015F}{\cedilla{s}}%
10661 \DeclareUnicodeCharacter{0160}{\v{S}}%
10662 \DeclareUnicodeCharacter{0161}{\v{s}}%
10663 \DeclareUnicodeCharacter{0162}{\cedilla{T}}%
10664 \DeclareUnicodeCharacter{0163}{\cedilla{t}}%
10665 \DeclareUnicodeCharacter{0164}{\v{T}}%
10666 \DeclareUnicodeCharacter{0165}{\v{t}}%
10667 \DeclareUnicodeCharacter{0166}{\missingcharmsg{H WITH STROKE}}%
10668 \DeclareUnicodeCharacter{0167}{\missingcharmsg{h WITH STROKE}}%
10669 \DeclareUnicodeCharacter{0168}{\~U}%
10670 \DeclareUnicodeCharacter{0169}{\~u}%
10671 \DeclareUnicodeCharacter{016A}{\=U}%
10672 \DeclareUnicodeCharacter{016B}{\=u}%
10673 \DeclareUnicodeCharacter{016C}{\u{U}}%
10674 \DeclareUnicodeCharacter{016D}{\u{u}}%
10675 \DeclareUnicodeCharacter{016E}{\ringaccent{U}}%
10676 \DeclareUnicodeCharacter{016F}{\ringaccent{u}}%
10678 \DeclareUnicodeCharacter{0170}{\H{U}}%
10679 \DeclareUnicodeCharacter{0171}{\H{u}}%
10680 \DeclareUnicodeCharacter{0172}{\ogonek{U}}%
10681 \DeclareUnicodeCharacter{0173}{\ogonek{u}}%
10682 \DeclareUnicodeCharacter{0174}{\^W}%
10683 \DeclareUnicodeCharacter{0175}{\^w}%
10684 \DeclareUnicodeCharacter{0176}{\^Y}%
10685 \DeclareUnicodeCharacter{0177}{\^y}%
10686 \DeclareUnicodeCharacter{0178}{\"Y}%
10687 \DeclareUnicodeCharacter{0179}{\'Z}%
10688 \DeclareUnicodeCharacter{017A}{\'z}%
10689 \DeclareUnicodeCharacter{017B}{\dotaccent{Z}}%
10690 \DeclareUnicodeCharacter{017C}{\dotaccent{z}}%
10691 \DeclareUnicodeCharacter{017D}{\v{Z}}%
10692 \DeclareUnicodeCharacter{017E}{\v{z}}%
10693 \DeclareUnicodeCharacter{017F}{\missingcharmsg{LONG S}}%
10695 \DeclareUnicodeCharacter{01C4}{D\v{Z}}%
10696 \DeclareUnicodeCharacter{01C5}{D\v{z}}%
10697 \DeclareUnicodeCharacter{01C6}{d\v{z}}%
10698 \DeclareUnicodeCharacter{01C7}{LJ}%
10699 \DeclareUnicodeCharacter{01C8}{Lj}%
10700 \DeclareUnicodeCharacter{01C9}{lj}%
10701 \DeclareUnicodeCharacter{01CA}{NJ}%
10702 \DeclareUnicodeCharacter{01CB}{Nj}%
10703 \DeclareUnicodeCharacter{01CC}{nj}%
10704 \DeclareUnicodeCharacter{01CD}{\v{A}}%
10705 \DeclareUnicodeCharacter{01CE}{\v{a}}%
10706 \DeclareUnicodeCharacter{01CF}{\v{I}}%
10708 \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}}%
10709 \DeclareUnicodeCharacter{01D1}{\v{O}}%
10710 \DeclareUnicodeCharacter{01D2}{\v{o}}%
10711 \DeclareUnicodeCharacter{01D3}{\v{U}}%
10712 \DeclareUnicodeCharacter{01D4}{\v{u}}%
10714 \DeclareUnicodeCharacter{01E2}{\={\AE}}%
10715 \DeclareUnicodeCharacter{01E3}{\={\ae}}%
10716 \DeclareUnicodeCharacter{01E6}{\v{G}}%
10717 \DeclareUnicodeCharacter{01E7}{\v{g}}%
10718 \DeclareUnicodeCharacter{01E8}{\v{K}}%
10719 \DeclareUnicodeCharacter{01E9}{\v{k}}%
10721 \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}}%
10722 \DeclareUnicodeCharacter{01F1}{DZ}%
10723 \DeclareUnicodeCharacter{01F2}{Dz}%
10724 \DeclareUnicodeCharacter{01F3}{dz}%
10725 \DeclareUnicodeCharacter{01F4}{\'G}%
10726 \DeclareUnicodeCharacter{01F5}{\'g}%
10727 \DeclareUnicodeCharacter{01F8}{\`N}%
10728 \DeclareUnicodeCharacter{01F9}{\`n}%
10729 \DeclareUnicodeCharacter{01FC}{\'{\AE}}%
10730 \DeclareUnicodeCharacter{01FD}{\'{\ae}}%
10731 \DeclareUnicodeCharacter{01FE}{\'{\O}}%
10732 \DeclareUnicodeCharacter{01FF}{\'{\o}}%
10734 \DeclareUnicodeCharacter{021E}{\v{H}}%
10735 \DeclareUnicodeCharacter{021F}{\v{h}}%
10737 \DeclareUnicodeCharacter{0226}{\dotaccent{A}}%
10738 \DeclareUnicodeCharacter{0227}{\dotaccent{a}}%
10739 \DeclareUnicodeCharacter{0228}{\cedilla{E}}%
10740 \DeclareUnicodeCharacter{0229}{\cedilla{e}}%
10741 \DeclareUnicodeCharacter{022E}{\dotaccent{O}}%
10742 \DeclareUnicodeCharacter{022F}{\dotaccent{o}}%
10744 \DeclareUnicodeCharacter{0232}{\=Y}%
10745 \DeclareUnicodeCharacter{0233}{\=y}%
10746 \DeclareUnicodeCharacter{0237}{\dotless{j}}%
10748 \DeclareUnicodeCharacter{02BC}{'}%
10750 \DeclareUnicodeCharacter{02DB}{\ogonek{ }}%
10752 % Greek letters upper case
10753 \DeclareUnicodeCharacter{0391}{{\it A}}%
10754 \DeclareUnicodeCharacter{0392}{{\it B}}%
10755 \DeclareUnicodeCharacter{0393}{\ensuremath{\mit\Gamma}}%
10756 \DeclareUnicodeCharacter{0394}{\ensuremath{\mit\Delta}}%
10757 \DeclareUnicodeCharacter{0395}{{\it E}}%
10758 \DeclareUnicodeCharacter{0396}{{\it Z}}%
10759 \DeclareUnicodeCharacter{0397}{{\it H}}%
10760 \DeclareUnicodeCharacter{0398}{\ensuremath{\mit\Theta}}%
10761 \DeclareUnicodeCharacter{0399}{{\it I}}%
10762 \DeclareUnicodeCharacter{039A}{{\it K}}%
10763 \DeclareUnicodeCharacter{039B}{\ensuremath{\mit\Lambda}}%
10764 \DeclareUnicodeCharacter{039C}{{\it M}}%
10765 \DeclareUnicodeCharacter{039D}{{\it N}}%
10766 \DeclareUnicodeCharacter{039E}{\ensuremath{\mit\Xi}}%
10767 \DeclareUnicodeCharacter{039F}{{\it O}}%
10768 \DeclareUnicodeCharacter{03A0}{\ensuremath{\mit\Pi}}%
10769 \DeclareUnicodeCharacter{03A1}{{\it P}}%
10770 %\DeclareUnicodeCharacter{03A2}{} % none - corresponds to final sigma
10771 \DeclareUnicodeCharacter{03A3}{\ensuremath{\mit\Sigma}}%
10772 \DeclareUnicodeCharacter{03A4}{{\it T}}%
10773 \DeclareUnicodeCharacter{03A5}{\ensuremath{\mit\Upsilon}}%
10774 \DeclareUnicodeCharacter{03A6}{\ensuremath{\mit\Phi}}%
10775 \DeclareUnicodeCharacter{03A7}{{\it X}}%
10776 \DeclareUnicodeCharacter{03A8}{\ensuremath{\mit\Psi}}%
10777 \DeclareUnicodeCharacter{03A9}{\ensuremath{\mit\Omega}}%
10779 % Vowels with accents
10780 \DeclareUnicodeCharacter{0390}{\ensuremath{\ddot{\acute\iota}}}%
10781 \DeclareUnicodeCharacter{03AC}{\ensuremath{\acute\alpha}}%
10782 \DeclareUnicodeCharacter{03AD}{\ensuremath{\acute\epsilon}}%
10783 \DeclareUnicodeCharacter{03AE}{\ensuremath{\acute\eta}}%
10784 \DeclareUnicodeCharacter{03AF}{\ensuremath{\acute\iota}}%
10785 \DeclareUnicodeCharacter{03B0}{\ensuremath{\acute{\ddot\upsilon}}}%
10787 % Standalone accent
10788 \DeclareUnicodeCharacter{0384}{\ensuremath{\acute{\ }}}%
10790 % Greek letters lower case
10791 \DeclareUnicodeCharacter{03B1}{\ensuremath\alpha}%
10792 \DeclareUnicodeCharacter{03B2}{\ensuremath\beta}%
10793 \DeclareUnicodeCharacter{03B3}{\ensuremath\gamma}%
10794 \DeclareUnicodeCharacter{03B4}{\ensuremath\delta}%
10795 \DeclareUnicodeCharacter{03B5}{\ensuremath\epsilon}%
10796 \DeclareUnicodeCharacter{03B6}{\ensuremath\zeta}%
10797 \DeclareUnicodeCharacter{03B7}{\ensuremath\eta}%
10798 \DeclareUnicodeCharacter{03B8}{\ensuremath\theta}%
10799 \DeclareUnicodeCharacter{03B9}{\ensuremath\iota}%
10800 \DeclareUnicodeCharacter{03BA}{\ensuremath\kappa}%
10801 \DeclareUnicodeCharacter{03BB}{\ensuremath\lambda}%
10802 \DeclareUnicodeCharacter{03BC}{\ensuremath\mu}%
10803 \DeclareUnicodeCharacter{03BD}{\ensuremath\nu}%
10804 \DeclareUnicodeCharacter{03BE}{\ensuremath\xi}%
10805 \DeclareUnicodeCharacter{03BF}{{\it o}}% omicron
10806 \DeclareUnicodeCharacter{03C0}{\ensuremath\pi}%
10807 \DeclareUnicodeCharacter{03C1}{\ensuremath\rho}%
10808 \DeclareUnicodeCharacter{03C2}{\ensuremath\varsigma}%
10809 \DeclareUnicodeCharacter{03C3}{\ensuremath\sigma}%
10810 \DeclareUnicodeCharacter{03C4}{\ensuremath\tau}%
10811 \DeclareUnicodeCharacter{03C5}{\ensuremath\upsilon}%
10812 \DeclareUnicodeCharacter{03C6}{\ensuremath\phi}%
10813 \DeclareUnicodeCharacter{03C7}{\ensuremath\chi}%
10814 \DeclareUnicodeCharacter{03C8}{\ensuremath\psi}%
10815 \DeclareUnicodeCharacter{03C9}{\ensuremath\omega}%
10817 % More Greek vowels with accents
10818 \DeclareUnicodeCharacter{03CA}{\ensuremath{\ddot\iota}}%
10819 \DeclareUnicodeCharacter{03CB}{\ensuremath{\ddot\upsilon}}%
10820 \DeclareUnicodeCharacter{03CC}{\ensuremath{\acute o}}%
10821 \DeclareUnicodeCharacter{03CD}{\ensuremath{\acute\upsilon}}%
10822 \DeclareUnicodeCharacter{03CE}{\ensuremath{\acute\omega}}%
10824 % Variant Greek letters
10825 \DeclareUnicodeCharacter{03D1}{\ensuremath\vartheta}%
10826 \DeclareUnicodeCharacter{03D6}{\ensuremath\varpi}%
10827 \DeclareUnicodeCharacter{03F1}{\ensuremath\varrho}%
10829 \DeclareUnicodeCharacter{1E02}{\dotaccent{B}}%
10830 \DeclareUnicodeCharacter{1E03}{\dotaccent{b}}%
10831 \DeclareUnicodeCharacter{1E04}{\udotaccent{B}}%
10832 \DeclareUnicodeCharacter{1E05}{\udotaccent{b}}%
10833 \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}}%
10834 \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}}%
10835 \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}}%
10836 \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}}%
10837 \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}}%
10838 \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}}%
10839 \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}}%
10840 \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}}%
10842 \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}}%
10843 \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}}%
10845 \DeclareUnicodeCharacter{1E20}{\=G}%
10846 \DeclareUnicodeCharacter{1E21}{\=g}%
10847 \DeclareUnicodeCharacter{1E22}{\dotaccent{H}}%
10848 \DeclareUnicodeCharacter{1E23}{\dotaccent{h}}%
10849 \DeclareUnicodeCharacter{1E24}{\udotaccent{H}}%
10850 \DeclareUnicodeCharacter{1E25}{\udotaccent{h}}%
10851 \DeclareUnicodeCharacter{1E26}{\"H}%
10852 \DeclareUnicodeCharacter{1E27}{\"h}%
10854 \DeclareUnicodeCharacter{1E30}{\'K}%
10855 \DeclareUnicodeCharacter{1E31}{\'k}%
10856 \DeclareUnicodeCharacter{1E32}{\udotaccent{K}}%
10857 \DeclareUnicodeCharacter{1E33}{\udotaccent{k}}%
10858 \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}}%
10859 \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}}%
10860 \DeclareUnicodeCharacter{1E36}{\udotaccent{L}}%
10861 \DeclareUnicodeCharacter{1E37}{\udotaccent{l}}%
10862 \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}}%
10863 \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}}%
10864 \DeclareUnicodeCharacter{1E3E}{\'M}%
10865 \DeclareUnicodeCharacter{1E3F}{\'m}%
10867 \DeclareUnicodeCharacter{1E40}{\dotaccent{M}}%
10868 \DeclareUnicodeCharacter{1E41}{\dotaccent{m}}%
10869 \DeclareUnicodeCharacter{1E42}{\udotaccent{M}}%
10870 \DeclareUnicodeCharacter{1E43}{\udotaccent{m}}%
10871 \DeclareUnicodeCharacter{1E44}{\dotaccent{N}}%
10872 \DeclareUnicodeCharacter{1E45}{\dotaccent{n}}%
10873 \DeclareUnicodeCharacter{1E46}{\udotaccent{N}}%
10874 \DeclareUnicodeCharacter{1E47}{\udotaccent{n}}%
10875 \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}}%
10876 \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}}%
10878 \DeclareUnicodeCharacter{1E54}{\'P}%
10879 \DeclareUnicodeCharacter{1E55}{\'p}%
10880 \DeclareUnicodeCharacter{1E56}{\dotaccent{P}}%
10881 \DeclareUnicodeCharacter{1E57}{\dotaccent{p}}%
10882 \DeclareUnicodeCharacter{1E58}{\dotaccent{R}}%
10883 \DeclareUnicodeCharacter{1E59}{\dotaccent{r}}%
10884 \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}}%
10885 \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}}%
10886 \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}}%
10887 \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}}%
10889 \DeclareUnicodeCharacter{1E60}{\dotaccent{S}}%
10890 \DeclareUnicodeCharacter{1E61}{\dotaccent{s}}%
10891 \DeclareUnicodeCharacter{1E62}{\udotaccent{S}}%
10892 \DeclareUnicodeCharacter{1E63}{\udotaccent{s}}%
10893 \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}}%
10894 \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}}%
10895 \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}}%
10896 \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}}%
10897 \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}}%
10898 \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}}%
10900 \DeclareUnicodeCharacter{1E7C}{\~V}%
10901 \DeclareUnicodeCharacter{1E7D}{\~v}%
10902 \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}}%
10903 \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}}%
10905 \DeclareUnicodeCharacter{1E80}{\`W}%
10906 \DeclareUnicodeCharacter{1E81}{\`w}%
10907 \DeclareUnicodeCharacter{1E82}{\'W}%
10908 \DeclareUnicodeCharacter{1E83}{\'w}%
10909 \DeclareUnicodeCharacter{1E84}{\"W}%
10910 \DeclareUnicodeCharacter{1E85}{\"w}%
10911 \DeclareUnicodeCharacter{1E86}{\dotaccent{W}}%
10912 \DeclareUnicodeCharacter{1E87}{\dotaccent{w}}%
10913 \DeclareUnicodeCharacter{1E88}{\udotaccent{W}}%
10914 \DeclareUnicodeCharacter{1E89}{\udotaccent{w}}%
10915 \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}}%
10916 \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}}%
10917 \DeclareUnicodeCharacter{1E8C}{\"X}%
10918 \DeclareUnicodeCharacter{1E8D}{\"x}%
10919 \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}}%
10920 \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}}%
10922 \DeclareUnicodeCharacter{1E90}{\^Z}%
10923 \DeclareUnicodeCharacter{1E91}{\^z}%
10924 \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}}%
10925 \DeclareUnicodeCharacter{1E93}{\udotaccent{z}}%
10926 \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}}%
10927 \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}}%
10928 \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}}%
10929 \DeclareUnicodeCharacter{1E97}{\"t}%
10930 \DeclareUnicodeCharacter{1E98}{\ringaccent{w}}%
10931 \DeclareUnicodeCharacter{1E99}{\ringaccent{y}}%
10933 \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}}%
10934 \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}}%
10936 \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}}%
10937 \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}}%
10938 \DeclareUnicodeCharacter{1EBC}{\~E}%
10939 \DeclareUnicodeCharacter{1EBD}{\~e}%
10941 \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}}%
10942 \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}}%
10943 \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}}%
10944 \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}}%
10946 \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}}%
10947 \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}}%
10949 \DeclareUnicodeCharacter{1EF2}{\`Y}%
10950 \DeclareUnicodeCharacter{1EF3}{\`y}%
10951 \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}}%
10953 \DeclareUnicodeCharacter{1EF8}{\~Y}%
10954 \DeclareUnicodeCharacter{1EF9}{\~y}%
10956 % Exotic spaces
10957 \DeclareUnicodeCharacter{2007}{\hphantom{0}}%
10959 % Punctuation
10960 \DeclareUnicodeCharacter{2013}{--}%
10961 \DeclareUnicodeCharacter{2014}{---}%
10962 \DeclareUnicodeCharacter{2018}{\quoteleft{}}%
10963 \DeclareUnicodeCharacter{2019}{\quoteright{}}%
10964 \DeclareUnicodeCharacter{201A}{\quotesinglbase{}}%
10965 \DeclareUnicodeCharacter{201C}{\quotedblleft{}}%
10966 \DeclareUnicodeCharacter{201D}{\quotedblright{}}%
10967 \DeclareUnicodeCharacter{201E}{\quotedblbase{}}%
10968 \DeclareUnicodeCharacter{2020}{\ensuremath\dagger}%
10969 \DeclareUnicodeCharacter{2021}{\ensuremath\ddagger}%
10970 \DeclareUnicodeCharacter{2022}{\bullet{}}%
10971 \DeclareUnicodeCharacter{202F}{\thinspace}%
10972 \DeclareUnicodeCharacter{2026}{\dots{}}%
10973 \DeclareUnicodeCharacter{2039}{\guilsinglleft{}}%
10974 \DeclareUnicodeCharacter{203A}{\guilsinglright{}}%
10976 \DeclareUnicodeCharacter{20AC}{\euro{}}%
10978 \DeclareUnicodeCharacter{2192}{\arrow}%
10979 \DeclareUnicodeCharacter{21D2}{\result{}}%
10981 % Mathematical symbols
10982 \DeclareUnicodeCharacter{2200}{\ensuremath\forall}%
10983 \DeclareUnicodeCharacter{2203}{\ensuremath\exists}%
10984 \DeclareUnicodeCharacter{2208}{\ensuremath\in}%
10985 \DeclareUnicodeCharacter{2212}{\minus{}}%
10986 \DeclareUnicodeCharacter{2217}{\ast}%
10987 \DeclareUnicodeCharacter{221E}{\ensuremath\infty}%
10988 \DeclareUnicodeCharacter{2225}{\ensuremath\parallel}%
10989 \DeclareUnicodeCharacter{2227}{\ensuremath\wedge}%
10990 \DeclareUnicodeCharacter{2229}{\ensuremath\cap}%
10991 \DeclareUnicodeCharacter{2261}{\equiv{}}%
10992 \DeclareUnicodeCharacter{2264}{\ensuremath\leq}%
10993 \DeclareUnicodeCharacter{2265}{\ensuremath\geq}%
10994 \DeclareUnicodeCharacter{2282}{\ensuremath\subset}%
10995 \DeclareUnicodeCharacter{2287}{\ensuremath\supseteq}%
10997 \DeclareUnicodeCharacter{2016}{\ensuremath\Vert}%
10998 \DeclareUnicodeCharacter{2032}{\ensuremath\prime}%
10999 \DeclareUnicodeCharacter{210F}{\ensuremath\hbar}%
11000 \DeclareUnicodeCharacter{2111}{\ensuremath\Im}%
11001 \DeclareUnicodeCharacter{2113}{\ensuremath\ell}%
11002 \DeclareUnicodeCharacter{2118}{\ensuremath\wp}%
11003 \DeclareUnicodeCharacter{211C}{\ensuremath\Re}%
11004 \DeclareUnicodeCharacter{2135}{\ensuremath\aleph}%
11005 \DeclareUnicodeCharacter{2190}{\ensuremath\leftarrow}%
11006 \DeclareUnicodeCharacter{2191}{\ensuremath\uparrow}%
11007 \DeclareUnicodeCharacter{2193}{\ensuremath\downarrow}%
11008 \DeclareUnicodeCharacter{2194}{\ensuremath\leftrightarrow}%
11009 \DeclareUnicodeCharacter{2195}{\ensuremath\updownarrow}%
11010 \DeclareUnicodeCharacter{2196}{\ensuremath\nwarrow}%
11011 \DeclareUnicodeCharacter{2197}{\ensuremath\nearrow}%
11012 \DeclareUnicodeCharacter{2198}{\ensuremath\searrow}%
11013 \DeclareUnicodeCharacter{2199}{\ensuremath\swarrow}%
11014 \DeclareUnicodeCharacter{21A6}{\ensuremath\mapsto}%
11015 \DeclareUnicodeCharacter{21A9}{\ensuremath\hookleftarrow}%
11016 \DeclareUnicodeCharacter{21AA}{\ensuremath\hookrightarrow}%
11017 \DeclareUnicodeCharacter{21BC}{\ensuremath\leftharpoonup}%
11018 \DeclareUnicodeCharacter{21BD}{\ensuremath\leftharpoondown}%
11019 \DeclareUnicodeCharacter{21C0}{\ensuremath\rightharpoonup}%
11020 \DeclareUnicodeCharacter{21C1}{\ensuremath\rightharpoondown}%
11021 \DeclareUnicodeCharacter{21CC}{\ensuremath\rightleftharpoons}%
11022 \DeclareUnicodeCharacter{21D0}{\ensuremath\Leftarrow}%
11023 \DeclareUnicodeCharacter{21D1}{\ensuremath\Uparrow}%
11024 \DeclareUnicodeCharacter{21D3}{\ensuremath\Downarrow}%
11025 \DeclareUnicodeCharacter{21D4}{\ensuremath\Leftrightarrow}%
11026 \DeclareUnicodeCharacter{21D5}{\ensuremath\Updownarrow}%
11027 \DeclareUnicodeCharacter{2202}{\ensuremath\partial}%
11028 \DeclareUnicodeCharacter{2205}{\ensuremath\emptyset}%
11029 \DeclareUnicodeCharacter{2207}{\ensuremath\nabla}%
11030 \DeclareUnicodeCharacter{2209}{\ensuremath\notin}%
11031 \DeclareUnicodeCharacter{220B}{\ensuremath\owns}%
11032 \DeclareUnicodeCharacter{220F}{\ensuremath\prod}%
11033 \DeclareUnicodeCharacter{2210}{\ensuremath\coprod}%
11034 \DeclareUnicodeCharacter{2211}{\ensuremath\sum}%
11035 \DeclareUnicodeCharacter{2213}{\ensuremath\mp}%
11036 \DeclareUnicodeCharacter{2218}{\ensuremath\circ}%
11037 \DeclareUnicodeCharacter{221A}{\ensuremath\surd}%
11038 \DeclareUnicodeCharacter{221D}{\ensuremath\propto}%
11039 \DeclareUnicodeCharacter{2220}{\ensuremath\angle}%
11040 \DeclareUnicodeCharacter{2223}{\ensuremath\mid}%
11041 \DeclareUnicodeCharacter{2228}{\ensuremath\vee}%
11042 \DeclareUnicodeCharacter{222A}{\ensuremath\cup}%
11043 \DeclareUnicodeCharacter{222B}{\ensuremath\smallint}%
11044 \DeclareUnicodeCharacter{222E}{\ensuremath\oint}%
11045 \DeclareUnicodeCharacter{223C}{\ensuremath\sim}%
11046 \DeclareUnicodeCharacter{2240}{\ensuremath\wr}%
11047 \DeclareUnicodeCharacter{2243}{\ensuremath\simeq}%
11048 \DeclareUnicodeCharacter{2245}{\ensuremath\cong}%
11049 \DeclareUnicodeCharacter{2248}{\ensuremath\approx}%
11050 \DeclareUnicodeCharacter{224D}{\ensuremath\asymp}%
11051 \DeclareUnicodeCharacter{2250}{\ensuremath\doteq}%
11052 \DeclareUnicodeCharacter{2260}{\ensuremath\neq}%
11053 \DeclareUnicodeCharacter{226A}{\ensuremath\ll}%
11054 \DeclareUnicodeCharacter{226B}{\ensuremath\gg}%
11055 \DeclareUnicodeCharacter{227A}{\ensuremath\prec}%
11056 \DeclareUnicodeCharacter{227B}{\ensuremath\succ}%
11057 \DeclareUnicodeCharacter{2283}{\ensuremath\supset}%
11058 \DeclareUnicodeCharacter{2286}{\ensuremath\subseteq}%
11059 \DeclareUnicodeCharacter{228E}{\ensuremath\uplus}%
11060 \DeclareUnicodeCharacter{2291}{\ensuremath\sqsubseteq}%
11061 \DeclareUnicodeCharacter{2292}{\ensuremath\sqsupseteq}%
11062 \DeclareUnicodeCharacter{2293}{\ensuremath\sqcap}%
11063 \DeclareUnicodeCharacter{2294}{\ensuremath\sqcup}%
11064 \DeclareUnicodeCharacter{2295}{\ensuremath\oplus}%
11065 \DeclareUnicodeCharacter{2296}{\ensuremath\ominus}%
11066 \DeclareUnicodeCharacter{2297}{\ensuremath\otimes}%
11067 \DeclareUnicodeCharacter{2298}{\ensuremath\oslash}%
11068 \DeclareUnicodeCharacter{2299}{\ensuremath\odot}%
11069 \DeclareUnicodeCharacter{22A2}{\ensuremath\vdash}%
11070 \DeclareUnicodeCharacter{22A3}{\ensuremath\dashv}%
11071 \DeclareUnicodeCharacter{22A4}{\ensuremath\ptextop}%
11072 \DeclareUnicodeCharacter{22A5}{\ensuremath\bot}%
11073 \DeclareUnicodeCharacter{22A8}{\ensuremath\models}%
11074 \DeclareUnicodeCharacter{22C0}{\ensuremath\bigwedge}%
11075 \DeclareUnicodeCharacter{22C1}{\ensuremath\bigvee}%
11076 \DeclareUnicodeCharacter{22C2}{\ensuremath\bigcap}%
11077 \DeclareUnicodeCharacter{22C3}{\ensuremath\bigcup}%
11078 \DeclareUnicodeCharacter{22C4}{\ensuremath\diamond}%
11079 \DeclareUnicodeCharacter{22C5}{\ensuremath\cdot}%
11080 \DeclareUnicodeCharacter{22C6}{\ensuremath\star}%
11081 \DeclareUnicodeCharacter{22C8}{\ensuremath\bowtie}%
11082 \DeclareUnicodeCharacter{2308}{\ensuremath\lceil}%
11083 \DeclareUnicodeCharacter{2309}{\ensuremath\rceil}%
11084 \DeclareUnicodeCharacter{230A}{\ensuremath\lfloor}%
11085 \DeclareUnicodeCharacter{230B}{\ensuremath\rfloor}%
11086 \DeclareUnicodeCharacter{2322}{\ensuremath\frown}%
11087 \DeclareUnicodeCharacter{2323}{\ensuremath\smile}%
11089 \DeclareUnicodeCharacter{25B3}{\ensuremath\triangle}%
11090 \DeclareUnicodeCharacter{25B7}{\ensuremath\triangleright}%
11091 \DeclareUnicodeCharacter{25BD}{\ensuremath\bigtriangledown}%
11092 \DeclareUnicodeCharacter{25C1}{\ensuremath\triangleleft}%
11093 \DeclareUnicodeCharacter{25C7}{\ensuremath\diamond}%
11094 \DeclareUnicodeCharacter{2660}{\ensuremath\spadesuit}%
11095 \DeclareUnicodeCharacter{2661}{\ensuremath\heartsuit}%
11096 \DeclareUnicodeCharacter{2662}{\ensuremath\diamondsuit}%
11097 \DeclareUnicodeCharacter{2663}{\ensuremath\clubsuit}%
11098 \DeclareUnicodeCharacter{266D}{\ensuremath\flat}%
11099 \DeclareUnicodeCharacter{266E}{\ensuremath\natural}%
11100 \DeclareUnicodeCharacter{266F}{\ensuremath\sharp}%
11101 \DeclareUnicodeCharacter{26AA}{\ensuremath\bigcirc}%
11102 \DeclareUnicodeCharacter{27B9}{\ensuremath\rangle}%
11103 \DeclareUnicodeCharacter{27C2}{\ensuremath\perp}%
11104 \DeclareUnicodeCharacter{27E8}{\ensuremath\langle}%
11105 \DeclareUnicodeCharacter{27F5}{\ensuremath\longleftarrow}%
11106 \DeclareUnicodeCharacter{27F6}{\ensuremath\longrightarrow}%
11107 \DeclareUnicodeCharacter{27F7}{\ensuremath\longleftrightarrow}%
11108 \DeclareUnicodeCharacter{27FC}{\ensuremath\longmapsto}%
11109 \DeclareUnicodeCharacter{29F5}{\ensuremath\setminus}%
11110 \DeclareUnicodeCharacter{2A00}{\ensuremath\bigodot}%
11111 \DeclareUnicodeCharacter{2A01}{\ensuremath\bigoplus}%
11112 \DeclareUnicodeCharacter{2A02}{\ensuremath\bigotimes}%
11113 \DeclareUnicodeCharacter{2A04}{\ensuremath\biguplus}%
11114 \DeclareUnicodeCharacter{2A06}{\ensuremath\bigsqcup}%
11115 \DeclareUnicodeCharacter{2A3F}{\ensuremath\amalg}%
11116 \DeclareUnicodeCharacter{2AAF}{\ensuremath\preceq}%
11117 \DeclareUnicodeCharacter{2AB0}{\ensuremath\succeq}%
11119 \global\mathchardef\checkmark="1370% actually the square root sign
11120 \DeclareUnicodeCharacter{2713}{\ensuremath\checkmark}%
11121 }% end of \unicodechardefs
11123 % UTF-8 byte sequence (pdfTeX) definitions (replacing and @U command)
11124 % It makes the setting that replace UTF-8 byte sequence.
11125 \def\utfeightchardefs{%
11126 \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterUTFviii
11127 \unicodechardefs
11130 % Whether the active definitions of non-ASCII characters expand to
11131 % non-active tokens with the same character code. This is used to
11132 % write characters literally, instead of using active definitions for
11133 % printing the correct glyphs.
11134 \newif\ifpassthroughchars
11135 \passthroughcharsfalse
11137 % For native Unicode handling (XeTeX and LuaTeX),
11138 % provide a definition macro to replace/pass-through a Unicode character
11140 \def\DeclareUnicodeCharacterNative#1#2{%
11141 \ifnum"#1>"7F % only make non-ASCII chars active
11142 \catcode"#1=\active
11143 \def\dodeclareunicodecharacternative##1##2##3{%
11144 \begingroup
11145 \uccode`\~="##2\relax
11146 \uppercase{\gdef~}{%
11147 \ifpassthroughchars
11148 ##1%
11149 \else
11150 ##3%
11153 \endgroup
11155 \begingroup
11156 \uccode`\.="#1\relax
11157 \uppercase{\def\UTFNativeTmp{.}}%
11158 \expandafter\dodeclareunicodecharacternative\UTFNativeTmp{#1}{#2}%
11159 \endgroup
11163 % Native Unicode handling (XeTeX and LuaTeX) character replacing definition.
11164 % It activates the setting that replaces Unicode characters.
11165 \def\nativeunicodechardefs{%
11166 \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterNative
11167 \unicodechardefs
11170 % For native Unicode handling (XeTeX and LuaTeX),
11171 % make the character token expand
11172 % to the sequences given in \unicodechardefs for printing.
11173 \def\DeclareUnicodeCharacterNativeAtU#1#2{%
11174 \def\UTFAtUTmp{#2}
11175 \expandafter\globallet\csname uni:#1\endcsname \UTFAtUTmp
11178 % @U command definitions for native Unicode handling (XeTeX and LuaTeX).
11179 \def\nativeunicodechardefsatu{%
11180 \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterNativeAtU
11181 \unicodechardefs
11184 % US-ASCII character definitions.
11185 \def\asciichardefs{% nothing need be done
11186 \relax
11189 % Define all Unicode characters we know about
11190 \iftxinativeunicodecapable
11191 \nativeunicodechardefsatu
11192 \else
11193 \utfeightchardefs
11197 \message{formatting,}
11199 \newdimen\defaultparindent \defaultparindent = 15pt
11201 \chapheadingskip = 15pt plus 4pt minus 2pt
11202 \secheadingskip = 12pt plus 3pt minus 2pt
11203 \subsecheadingskip = 9pt plus 2pt minus 2pt
11205 % Prevent underfull vbox error messages.
11206 \vbadness = 10000
11208 % Don't be very finicky about underfull hboxes, either.
11209 \hbadness = 6666
11211 % Following George Bush, get rid of widows and orphans.
11212 \widowpenalty=10000
11213 \clubpenalty=10000
11215 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're
11216 % using an old version of TeX, don't do anything. We want the amount of
11217 % stretch added to depend on the line length, hence the dependence on
11218 % \hsize. We call this whenever the paper size is set.
11220 \def\setemergencystretch{%
11221 \ifx\emergencystretch\thisisundefined
11222 % Allow us to assign to \emergencystretch anyway.
11223 \def\emergencystretch{\dimen0}%
11224 \else
11225 \emergencystretch = .15\hsize
11229 % Parameters in order: 1) textheight; 2) textwidth;
11230 % 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
11231 % 7) physical page height; 8) physical page width.
11233 % We also call \setleading{\textleading}, so the caller should define
11234 % \textleading. The caller should also set \parskip.
11236 \def\internalpagesizes#1#2#3#4#5#6#7#8{%
11237 \voffset = #3\relax
11238 \topskip = #6\relax
11239 \splittopskip = \topskip
11241 \vsize = #1\relax
11242 \advance\vsize by \topskip
11243 \txipageheight = \vsize
11245 \hsize = #2\relax
11246 \txipagewidth = \hsize
11248 \normaloffset = #4\relax
11249 \bindingoffset = #5\relax
11251 \ifpdf
11252 \pdfpageheight #7\relax
11253 \pdfpagewidth #8\relax
11254 % if we don't reset these, they will remain at "1 true in" of
11255 % whatever layout pdftex was dumped with.
11256 \pdfhorigin = 1 true in
11257 \pdfvorigin = 1 true in
11258 \else
11259 \ifx\XeTeXrevision\thisisundefined
11260 \special{papersize=#8,#7}%
11261 \else
11262 \pdfpageheight #7\relax
11263 \pdfpagewidth #8\relax
11264 % XeTeX does not have \pdfhorigin and \pdfvorigin.
11268 \setleading{\textleading}
11270 \parindent = \defaultparindent
11271 \setemergencystretch
11274 % @letterpaper (the default).
11275 \def\letterpaper{{\globaldefs = 1
11276 \parskip = 3pt plus 2pt minus 1pt
11277 \textleading = 13.2pt
11279 % If page is nothing but text, make it come out even.
11280 \internalpagesizes{607.2pt}{6in}% that's 46 lines
11281 {\voffset}{.25in}%
11282 {\bindingoffset}{36pt}%
11283 {11in}{8.5in}%
11286 % Use @smallbook to reset parameters for 7x9.25 trim size.
11287 \def\smallbook{{\globaldefs = 1
11288 \parskip = 2pt plus 1pt
11289 \textleading = 12pt
11291 \internalpagesizes{7.5in}{5in}%
11292 {-.2in}{0in}%
11293 {\bindingoffset}{16pt}%
11294 {9.25in}{7in}%
11296 \lispnarrowing = 0.3in
11297 \tolerance = 700
11298 \contentsrightmargin = 0pt
11299 \defbodyindent = .5cm
11302 % Use @afourpaper to print on European A4 paper.
11303 \def\afourpaper{{\globaldefs = 1
11304 \parskip = 3pt plus 2pt minus 1pt
11305 \textleading = 13.2pt
11307 % Double-side printing via postscript on Laserjet 4050
11308 % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm.
11309 % To change the settings for a different printer or situation, adjust
11310 % \normaloffset until the front-side and back-side texts align. Then
11311 % do the same for \bindingoffset. You can set these for testing in
11312 % your texinfo source file like this:
11313 % @tex
11314 % \global\normaloffset = -6mm
11315 % \global\bindingoffset = 10mm
11316 % @end tex
11317 \internalpagesizes{673.2pt}{160mm}% that's 51 lines
11318 {\voffset}{\hoffset}%
11319 {\bindingoffset}{44pt}%
11320 {297mm}{210mm}%
11322 \tolerance = 700
11323 \contentsrightmargin = 0pt
11324 \defbodyindent = 5mm
11327 % Use @afivepaper to print on European A5 paper.
11328 % From romildo@urano.iceb.ufop.br, 2 July 2000.
11329 % He also recommends making @example and @lisp be small.
11330 \def\afivepaper{{\globaldefs = 1
11331 \parskip = 2pt plus 1pt minus 0.1pt
11332 \textleading = 12.5pt
11334 \internalpagesizes{160mm}{120mm}%
11335 {\voffset}{-11.4mm}%
11336 {\bindingoffset}{8pt}%
11337 {210mm}{148mm}%
11339 \lispnarrowing = 0.2in
11340 \tolerance = 800
11341 \contentsrightmargin = 0pt
11342 \defbodyindent = 2mm
11343 \tableindent = 12mm
11346 % A specific text layout, 24x15cm overall, intended for A4 paper.
11347 \def\afourlatex{{\globaldefs = 1
11348 \afourpaper
11349 \internalpagesizes{237mm}{150mm}%
11350 {\voffset}{4.6mm}%
11351 {\bindingoffset}{7mm}%
11352 {297mm}{210mm}%
11354 % Must explicitly reset to 0 because we call \afourpaper.
11355 \globaldefs = 0
11358 % Use @afourwide to print on A4 paper in landscape format.
11359 \def\afourwide{{\globaldefs = 1
11360 \afourpaper
11361 \internalpagesizes{241mm}{165mm}%
11362 {\voffset}{-2.95mm}%
11363 {\bindingoffset}{7mm}%
11364 {297mm}{210mm}%
11365 \globaldefs = 0
11368 \def\bsixpaper{{\globaldefs = 1
11369 \afourpaper
11370 \internalpagesizes{140mm}{100mm}%
11371 {-6.35mm}{-12.7mm}%
11372 {\bindingoffset}{14pt}%
11373 {176mm}{125mm}%
11374 \let\SETdispenvsize=\smallword
11375 \lispnarrowing = 0.2in
11376 \globaldefs = 0
11380 % @pagesizes TEXTHEIGHT[,TEXTWIDTH]
11381 % Perhaps we should allow setting the margins, \topskip, \parskip,
11382 % and/or leading, also. Or perhaps we should compute them somehow.
11384 \parseargdef\pagesizes{\pagesizesyyy #1,,\finish}
11385 \def\pagesizesyyy#1,#2,#3\finish{{%
11386 \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi
11387 \globaldefs = 1
11389 \parskip = 3pt plus 2pt minus 1pt
11390 \setleading{\textleading}%
11392 \dimen0 = #1\relax
11393 \advance\dimen0 by 2.5in % default 1in margin above heading line
11394 % and 1.5in to include heading, footing and
11395 % bottom margin
11397 \dimen2 = \hsize
11398 \advance\dimen2 by 2in % default to 1 inch margin on each side
11400 \internalpagesizes{#1}{\hsize}%
11401 {\voffset}{\normaloffset}%
11402 {\bindingoffset}{44pt}%
11403 {\dimen0}{\dimen2}%
11406 % Set default to letter.
11408 \letterpaper
11410 % Default value of \hfuzz, for suppressing warnings about overfull hboxes.
11411 \hfuzz = 1pt
11414 \message{microtype,}
11416 % protrusion, from Thanh's protcode.tex.
11417 \def\mtsetprotcode#1{%
11418 \rpcode#1`\!=200 \rpcode#1`\,=700 \rpcode#1`\-=700 \rpcode#1`\.=700
11419 \rpcode#1`\;=500 \rpcode#1`\:=500 \rpcode#1`\?=200
11420 \rpcode#1`\'=700
11421 \rpcode#1 34=500 % ''
11422 \rpcode#1 123=300 % --
11423 \rpcode#1 124=200 % ---
11424 \rpcode#1`\)=50 \rpcode#1`\A=50 \rpcode#1`\F=50 \rpcode#1`\K=50
11425 \rpcode#1`\L=50 \rpcode#1`\T=50 \rpcode#1`\V=50 \rpcode#1`\W=50
11426 \rpcode#1`\X=50 \rpcode#1`\Y=50 \rpcode#1`\k=50 \rpcode#1`\r=50
11427 \rpcode#1`\t=50 \rpcode#1`\v=50 \rpcode#1`\w=50 \rpcode#1`\x=50
11428 \rpcode#1`\y=50
11430 \lpcode#1`\`=700
11431 \lpcode#1 92=500 % ``
11432 \lpcode#1`\(=50 \lpcode#1`\A=50 \lpcode#1`\J=50 \lpcode#1`\T=50
11433 \lpcode#1`\V=50 \lpcode#1`\W=50 \lpcode#1`\X=50 \lpcode#1`\Y=50
11434 \lpcode#1`\v=50 \lpcode#1`\w=50 \lpcode#1`\x=50 \lpcode#1`\y=0
11436 \mtadjustprotcode#1\relax
11439 \newcount\countC
11440 \def\mtadjustprotcode#1{%
11441 \countC=0
11442 \loop
11443 \ifcase\lpcode#1\countC\else
11444 \mtadjustcp\lpcode#1\countC
11446 \ifcase\rpcode#1\countC\else
11447 \mtadjustcp\rpcode#1\countC
11449 \advance\countC 1
11450 \ifnum\countC < 256 \repeat
11453 \newcount\countB
11454 \def\mtadjustcp#1#2#3{%
11455 \setbox\boxA=\hbox{%
11456 \ifx#2\font\else#2\fi
11457 \char#3}%
11458 \countB=\wd\boxA
11459 \multiply\countB #1#2#3\relax
11460 \divide\countB \fontdimen6 #2\relax
11461 #1#2#3=\countB\relax
11464 \ifx\XeTeXrevision\thisisundefined
11465 \ifx\luatexversion\thisisundefined
11466 \ifpdf % pdfTeX
11467 \mtsetprotcode\textrm
11468 \def\mtfontexpand#1{\pdffontexpand#1 20 20 1 autoexpand\relax}
11469 \else % TeX
11470 \def\mtfontexpand#1{}
11472 \else % LuaTeX
11473 \mtsetprotcode\textrm
11474 \def\mtfontexpand#1{\expandglyphsinfont#1 20 20 1\relax}
11476 \else % XeTeX
11477 \mtsetprotcode\textrm
11478 \def\mtfontexpand#1{}
11482 \newif\ifmicrotype
11484 \def\microtypeON{%
11485 \microtypetrue
11487 \ifx\XeTeXrevision\thisisundefined
11488 \ifx\luatexversion\thisisundefined
11489 \ifpdf % pdfTeX
11490 \pdfadjustspacing=2
11491 \pdfprotrudechars=2
11493 \else % LuaTeX
11494 \adjustspacing=2
11495 \protrudechars=2
11497 \else % XeTeX
11498 \XeTeXprotrudechars=2
11501 \mtfontexpand\textrm
11502 \mtfontexpand\textsl
11503 \mtfontexpand\textbf
11506 \def\microtypeOFF{%
11507 \microtypefalse
11509 \ifx\XeTeXrevision\thisisundefined
11510 \ifx\luatexversion\thisisundefined
11511 \ifpdf % pdfTeX
11512 \pdfadjustspacing=0
11513 \pdfprotrudechars=0
11515 \else % LuaTeX
11516 \adjustspacing=0
11517 \protrudechars=0
11519 \else % XeTeX
11520 \XeTeXprotrudechars=0
11524 \microtypeOFF
11526 \parseargdef\microtype{%
11527 \def\txiarg{#1}%
11528 \ifx\txiarg\onword
11529 \microtypeON
11530 \else\ifx\txiarg\offword
11531 \microtypeOFF
11532 \else
11533 \errhelp = \EMsimple
11534 \errmessage{Unknown @microtype option `\txiarg', must be on|off}%
11535 \fi\fi
11539 \message{and turning on texinfo input format.}
11541 % Make UTF-8 the default encoding.
11542 \documentencodingzzz{UTF-8}
11544 \def^^L{\par} % remove \outer, so ^L can appear in an @comment
11545 \catcode`\^^K = 10 % treat vertical tab as whitespace
11547 % DEL is a comment character, in case @c does not suffice.
11548 \catcode`\^^? = 14
11550 % Define macros to output various characters with catcode for normal text.
11551 \catcode`\"=\other \def\normaldoublequote{"}
11552 \catcode`\$=\other \def\normaldollar{$}%$ font-lock fix
11553 \catcode`\+=\other \def\normalplus{+}
11554 \catcode`\<=\other \def\normalless{<}
11555 \catcode`\>=\other \def\normalgreater{>}
11556 \catcode`\^=\other \def\normalcaret{^}
11557 \catcode`\_=\other \def\normalunderscore{_}
11558 \catcode`\|=\other \def\normalverticalbar{|}
11559 \catcode`\~=\other \def\normaltilde{~}
11561 % Set catcodes for Texinfo file
11563 % Active characters for printing the wanted glyph.
11564 % Most of these we simply print from the \tt font, but for some, we can
11565 % use math or other variants that look better in normal text.
11567 \catcode`\"=\active
11568 \def\activedoublequote{{\tt\char34}}
11569 \let"=\activedoublequote
11570 \catcode`\~=\active \def\activetilde{{\tt\char126}} \let~ = \activetilde
11571 \chardef\hatchar=`\^
11572 \catcode`\^=\active \def\activehat{{\tt \hatchar}} \let^ = \activehat
11574 \catcode`\_=\active
11575 \def_{\ifusingtt\normalunderscore\_}
11576 \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }
11577 \let\realunder=_
11579 \catcode`\|=\active \def|{{\tt\char124}}
11581 \chardef \less=`\<
11582 \catcode`\<=\active \def\activeless{{\tt \less}}\let< = \activeless
11583 \chardef \gtr=`\>
11584 \catcode`\>=\active \def\activegtr{{\tt \gtr}}\let> = \activegtr
11585 \catcode`\+=\active \def+{{\tt \char 43}}
11586 \catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
11587 \catcode`\-=\active \let-=\normaldash
11590 % used for headline/footline in the output routine, in case the page
11591 % breaks in the middle of an @tex block.
11592 \def\texinfochars{%
11593 \let< = \activeless
11594 \let> = \activegtr
11595 \let~ = \activetilde
11596 \let^ = \activehat
11597 \setregularquotes
11598 \let\b = \strong
11599 \let\i = \smartitalic
11600 % in principle, all other definitions in \tex have to be undone too.
11603 % Used sometimes to turn off (effectively) the active characters even after
11604 % parsing them.
11605 \def\turnoffactive{%
11606 \passthroughcharstrue
11607 \let-=\normaldash
11608 \let"=\normaldoublequote
11609 \let$=\normaldollar %$ font-lock fix
11610 \let+=\normalplus
11611 \let<=\normalless
11612 \let>=\normalgreater
11613 \let^=\normalcaret
11614 \let_=\normalunderscore
11615 \let|=\normalverticalbar
11616 \let~=\normaltilde
11617 \otherbackslash
11618 \setregularquotes
11619 \unsepspaces
11622 % If a .fmt file is being used, characters that might appear in a file
11623 % name cannot be active until we have parsed the command line.
11624 % So turn them off again, and have \loadconf turn them back on.
11625 \catcode`+=\other \catcode`\_=\other
11628 % \backslashcurfont outputs one backslash character in current font,
11629 % as in \char`\\.
11630 \global\chardef\backslashcurfont=`\\
11632 % Print a typewriter backslash. For math mode, we can't simply use
11633 % \backslashcurfont: the story here is that in math mode, the \char
11634 % of \backslashcurfont ends up printing the roman \ from the math symbol
11635 % font (because \char in math mode uses the \mathcode, and plain.tex
11636 % sets \mathcode`\\="026E). Hence we use an explicit \mathchar,
11637 % which is the decimal equivalent of "715c (class 7, e.g., use \fam;
11638 % ignored family value; char position "5C). We can't use " for the
11639 % usual hex value because it has already been made active.
11641 \def\ttbackslash{{\tt \ifmmode \mathchar29020 \else \backslashcurfont \fi}}
11642 \let\backslashchar = \ttbackslash % \backslashchar{} is for user documents.
11644 % These are made active for url-breaking, so need
11645 % active definitions as the normal characters.
11646 \def\normaldot{.}
11647 \def\normalquest{?}
11648 \def\normalslash{/}
11650 % \newlinesloadsconf - call \loadconf as soon as possible in the
11651 % file, e.g. at the first newline.
11653 {\catcode`\^=7
11654 \catcode`\^^M=13
11655 \gdef\newlineloadsconf{%
11656 \catcode`\^^M=13 %
11657 \newlineloadsconfzz%
11659 \gdef\newlineloadsconfzz#1^^M{%
11660 \def\c{\loadconf\c}%
11661 % Definition for the first newline read in the file
11662 \def ^^M{\loadconf}%
11663 % In case the first line has a whole-line command on it
11664 \let\originalparsearg\parsearg%
11665 \def\parsearg{\loadconf\originalparsearg}%
11669 % Emergency active definition of newline, in case an active newline token
11670 % appears by mistake.
11671 {\catcode`\^=7 \catcode13=13%
11672 \gdef\enableemergencynewline{%
11673 \gdef^^M{%
11674 \par%
11675 %<warning: active newline>\par%
11679 % \loadconf gets called at the beginning of every Texinfo file.
11680 % If texinfo.cnf is present on the system, read it. Useful for site-wide
11681 % @afourpaper, etc. Not opening texinfo.cnf directly in texinfo.tex
11682 % makes it possible to make a format file for Texinfo.
11684 \gdef\loadconf{%
11685 \relax % Terminate the filename if running as "tex '&texinfo' FILE.texi".
11687 % Turn off the definitions that trigger \loadconf
11688 \everyjobreset
11689 \catcode13=5 % regular end of line
11690 \enableemergencynewline
11691 \let\c=\comment
11692 \let\parsearg\originalparsearg
11694 % Also turn back on active characters that might appear in the input
11695 % file name, in case not using a pre-dumped format.
11696 \catcode`+=\active
11697 \catcode`\_=\active
11699 \openin 1 texinfo.cnf
11700 \ifeof 1 \else \input texinfo.cnf \fi
11701 \closein 1
11704 % Redefine some control sequences to be controlled by the \ifdummies
11705 % and \ifindexnofonts switches. Do this at the end so that the control
11706 % sequences are all defined.
11707 \definedummies
11712 \catcode`\@=0
11714 % \realbackslash is an actual character `\' with catcode other.
11715 {\catcode`\\=\other @gdef@realbackslash{\}}
11717 % In Texinfo, backslash is an active character; it prints the backslash
11718 % in fixed width font.
11719 \catcode`\\=\active % @ for escape char from now on.
11721 @let\ = @ttbackslash
11723 % If in a .fmt file, print the version number.
11724 % \eatinput stops the `\input texinfo' from showing up.
11725 % After that, `\' should revert to printing a backslash.
11726 % Turn on active characters that we couldn't do earlier because
11727 % they might have appeared in the input file name.
11729 @everyjob{@message{[Texinfo version @texinfoversion]}%
11730 @global@let\ = @eatinput
11731 @catcode`+=@active @catcode`@_=@active}
11733 {@catcode`@^=7 @catcode`@^^M=13%
11734 @gdef@eatinput input texinfo#1^^M{@loadconf}}
11736 @def@everyjobreset{@ifx\@eatinput @let\ = @ttbackslash @fi}
11738 % \otherbackslash defines an active \ to be a literal `\' character with
11739 % catcode other.
11740 @gdef@otherbackslash{@let\=@realbackslash}
11742 % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
11743 % the literal character `\'.
11745 {@catcode`- = @active
11746 @gdef@normalturnoffactive{%
11747 @turnoffactive
11748 @let\=@ttbackslash
11752 % Say @foo, not \foo, in error messages.
11753 @escapechar = `@@
11755 % These look ok in all fonts, so just make them not special.
11756 % @hashchar{} gets its own user-level command, because of #line.
11757 @catcode`@& = @other @def@normalamp{&}
11758 @catcode`@# = @other @def@normalhash{#}
11759 @catcode`@% = @other @def@normalpercent{%}
11761 @let @hashchar = @normalhash
11763 @c Finally, make ` and ' active, so that txicodequoteundirected and
11764 @c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we
11765 @c don't make ` and ' active, @code will not get them as active chars.
11766 @c Do this last of all since we use ` in the previous @catcode assignments.
11767 @catcode`@'=@active
11768 @catcode`@`=@active
11770 @c Local variables:
11771 @c eval: (add-hook 'before-save-hook 'time-stamp nil t)
11772 @c time-stamp-pattern: "texinfoversion{%Y-%02m-%02d.%02H}"
11773 @c page-delimiter: "^\\\\message"
11774 @c End:
11776 @newlineloadsconf