1 % texinfo.tex -- TeX macros to handle Texinfo files.
3 % Load plain if necessary, i.e., if running under initex.
4 \expandafter\ifx\csname fmtname
\endcsname\relax\input plain
\fi
6 \def\texinfoversion{2017-
06-
04.19}
8 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
9 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
10 % 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
11 % Free Software Foundation, Inc.
13 % This texinfo.tex file is free software: you can redistribute it and/or
14 % modify it under the terms of the GNU General Public License as
15 % published by the Free Software Foundation, either version 3 of the
16 % License, or (at your option) any later version.
18 % This texinfo.tex file is distributed in the hope that it will be
19 % useful, but WITHOUT ANY WARRANTY; without even the implied warranty
20 % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 % General Public License for more details.
23 % You should have received a copy of the GNU General Public License
24 % along with this program. If not, see <http://www.gnu.org/licenses/>.
26 % As a special exception, when this file is read by TeX when processing
27 % a Texinfo source document, you may use the result without
28 % restriction. This Exception is an additional permission under section 7
29 % of the GNU General Public License, version 3 ("GPLv3").
31 % Please try the latest version of texinfo.tex before submitting bug
32 % reports; you can get the latest version from:
33 % http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or
34 % http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or
35 % http://www.gnu.org/software/texinfo/ (the Texinfo home page)
36 % The texinfo.tex in any given distribution could well be out
37 % of date, so if that's what you're using, please check.
39 % Send bug reports to bug-texinfo@gnu.org. Please include including a
40 % complete document in each bug report with which we can reproduce the
41 % problem. Patches are, of course, greatly appreciated.
43 % To process a Texinfo manual with TeX, it's most reliable to use the
44 % texi2dvi shell script that comes with the distribution. For a simple
45 % manual foo.texi, however, you can get away with this:
50 % dvips foo.dvi -o # or whatever; this makes foo.ps.
51 % The extra TeX runs get the cross-reference information correct.
52 % Sometimes one run after texindex suffices, and sometimes you need more
53 % than two; texi2dvi does it as many times as necessary.
55 % It is possible to adapt texinfo.tex for other languages, to some
56 % extent. You can get the existing language-specific files from the
57 % full Texinfo distribution.
59 % The GNU Texinfo home page is http://www.gnu.org/software/texinfo.
62 \message{Loading texinfo
[version
\texinfoversion]:
}
64 % If in a .fmt file, print the version number
65 % and turn on active characters that we couldn't do earlier because
66 % they might have appeared in the input file name.
67 \everyjob{\message{[Texinfo version
\texinfoversion]}%
68 \catcode`+=
\active \catcode`
\_=
\active}
70 % LaTeX's \typeout. This ensures that the messages it is used for
71 % are identical in format to the corresponding ones from latex/pdflatex.
72 \def\typeout{\immediate\write17}%
76 % We never want plain's \outer definition of \+ in Texinfo.
77 % For @tex, we can use \tabalign.
80 % Save some plain tex macros whose names we will redefine.
82 \let\ptexbullet=
\bullet
90 \let\ptexfootnote=
\footnote
94 \let\ptexindent=
\indent
95 \let\ptexinsert=
\insert
98 \let\ptexnewwrite\newwrite
99 \let\ptexnoindent=
\noindent
101 \let\ptexraggedright=
\raggedright
109 {\catcode`\'=
\active \global\let\ptexquoteright'
}% active in plain's math mode
111 % If this character appears in an error message or help string, it
112 % starts a new line in the output.
115 % Use TeX 3.0's \inputlineno to get the line number, for better error
116 % messages, but if we're using an old version of TeX, don't do anything.
118 \ifx\inputlineno\thisisundefined
119 \let\linenumber =
\empty % Pre-3.0.
121 \def\linenumber{l.
\the\inputlineno:
\space}
124 % Set up fixed words for English if not already set.
125 \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix
}\fi
126 \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter
}\fi
127 \ifx\putworderror\undefined \gdef\putworderror{error
}\fi
128 \ifx\putwordfile\undefined \gdef\putwordfile{file
}\fi
129 \ifx\putwordin\undefined \gdef\putwordin{in
}\fi
130 \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)
}\fi
131 \ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)
}\fi
132 \ifx\putwordInfo\undefined \gdef\putwordInfo{Info
}\fi
133 \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of
}\fi
134 \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on
}\fi
135 \ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title
}\fi
136 \ifx\putwordof\undefined \gdef\putwordof{of
}\fi
137 \ifx\putwordon\undefined \gdef\putwordon{on
}\fi
138 \ifx\putwordpage\undefined \gdef\putwordpage{page
}\fi
139 \ifx\putwordsection\undefined \gdef\putwordsection{section
}\fi
140 \ifx\putwordSection\undefined \gdef\putwordSection{Section
}\fi
141 \ifx\putwordsee\undefined \gdef\putwordsee{see
}\fi
142 \ifx\putwordSee\undefined \gdef\putwordSee{See
}\fi
143 \ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents
}\fi
144 \ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents
}\fi
146 \ifx\putwordMJan\undefined \gdef\putwordMJan{January
}\fi
147 \ifx\putwordMFeb\undefined \gdef\putwordMFeb{February
}\fi
148 \ifx\putwordMMar\undefined \gdef\putwordMMar{March
}\fi
149 \ifx\putwordMApr\undefined \gdef\putwordMApr{April
}\fi
150 \ifx\putwordMMay\undefined \gdef\putwordMMay{May
}\fi
151 \ifx\putwordMJun\undefined \gdef\putwordMJun{June
}\fi
152 \ifx\putwordMJul\undefined \gdef\putwordMJul{July
}\fi
153 \ifx\putwordMAug\undefined \gdef\putwordMAug{August
}\fi
154 \ifx\putwordMSep\undefined \gdef\putwordMSep{September
}\fi
155 \ifx\putwordMOct\undefined \gdef\putwordMOct{October
}\fi
156 \ifx\putwordMNov\undefined \gdef\putwordMNov{November
}\fi
157 \ifx\putwordMDec\undefined \gdef\putwordMDec{December
}\fi
159 \ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro
}\fi
160 \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form
}\fi
161 \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable
}\fi
162 \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option
}\fi
163 \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function
}\fi
165 % Give the space character the catcode for a space.
166 \def\spaceisspace{\catcode`\ =
10\relax}
168 % Likewise for ^^M, the end of line character.
169 \def\endlineisspace{\catcode13=
10\relax}
171 \chardef\dashChar = `\-
172 \chardef\slashChar = `\/
173 \chardef\underChar = `
\_
179 % The following is used inside several \edef's.
180 \def\makecsname#1{\expandafter\noexpand\csname#1\endcsname}
184 Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script
185 ap-pen-dix bit-map bit-maps
186 data-base data-bases eshell fall-ing half-way long-est man-u-script
187 man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm
188 par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces
190 stand-alone strong-est time-stamp time-stamps which-ever white-space
191 wide-spread wrap-around
194 % Sometimes it is convenient to have everything in the transcript file
195 % and nothing on the terminal. We don't just call \tracingall here,
196 % since that produces some useless output on the terminal. We also make
197 % some effort to order the tracing commands to reduce output in the log
198 % file; cf. trace.sty in LaTeX.
200 \def\gloggingall{\begingroup \globaldefs =
1 \loggingall \endgroup}%
204 \tracinglostchars2 % 2 gives us more in etex
209 \showboxbreadth\maxdimen \showboxdepth\maxdimen
210 \ifx\eTeXversion\thisisundefined\else % etex gives us more logging
217 \tracingcommands3 % 3 gives us more in etex
221 % @errormsg{MSG}. Do the index-like expansions on MSG, but if things
222 % aren't perfect, it's not the end of the world, being an error message,
225 \def\errormsg{\begingroup \indexnofonts \doerrormsg}
226 \def\doerrormsg#1{\errmessage{#1}}
228 % add check for \lastpenalty to plain's definitions. If the last thing
229 % we did was a \nobreak, we don't want to insert more space.
231 \def\smallbreak{\ifnum\lastpenalty<
10000\par\ifdim\lastskip<
\smallskipamount
232 \removelastskip\penalty-
50\smallskip\fi\fi}
233 \def\medbreak{\ifnum\lastpenalty<
10000\par\ifdim\lastskip<
\medskipamount
234 \removelastskip\penalty-
100\medskip\fi\fi}
235 \def\bigbreak{\ifnum\lastpenalty<
10000\par\ifdim\lastskip<
\bigskipamount
236 \removelastskip\penalty-
200\bigskip\fi\fi}
241 % For a final copy, take out the rectangles
242 % that mark overfull boxes (in case you have decided
243 % that the text looks ok even though it passes the margin).
245 \def\finalout{\overfullrule=
0pt
}
247 % Do @cropmarks to get crop marks.
250 \let\cropmarks =
\cropmarkstrue
252 % Dimensions to add cropmarks at corners.
253 % Added by P. A. MacKay, 12 Nov. 1986
255 \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines
256 \newdimen\cornerlong \cornerlong=
1pc
257 \newdimen\cornerthick \cornerthick=
.3pt
258 \newdimen\topandbottommargin \topandbottommargin=
.75in
260 % Output a mark which sets \thischapter, \thissection and \thiscolor.
261 % We dump everything together because we only have one kind of mark.
262 % This works because we only use \botmark / \topmark, not \firstmark.
264 % A mark contains a subexpression of the \ifcase ... \fi construct.
265 % \get*marks macros below extract the needed part using \ifcase.
267 % Another complication is to let the user choose whether \thischapter
268 % (\thissection) refers to the chapter (section) in effect at the top
269 % of a page, or that at the bottom of a page.
271 % \domark is called twice inside \chapmacro, to add one
272 % mark before the section break, and one after.
273 % In the second call \prevchapterdefs is the same as \lastchapterdefs,
274 % and \prevsectiondefs is the same as \lastsectiondefs.
275 % Then if the page is not broken at the mark, some of the previous
276 % section appears on the page, and we can get the name of this section
277 % from \firstmark for @everyheadingmarks top.
278 % @everyheadingmarks bottom uses \botmark.
280 % See page 260 of The TeXbook.
282 \toks0=
\expandafter{\lastchapterdefs}%
283 \toks2=
\expandafter{\lastsectiondefs}%
284 \toks4=
\expandafter{\prevchapterdefs}%
285 \toks6=
\expandafter{\prevsectiondefs}%
286 \toks8=
\expandafter{\lastcolordefs}%
288 \the\toks0 \the\toks2 % 0: marks for @everyheadingmarks top
289 \noexpand\or \the\toks4 \the\toks6 % 1: for @everyheadingmarks bottom
290 \noexpand\else \the\toks8 % 2: color marks
294 % \gettopheadingmarks, \getbottomheadingmarks,
295 % \getcolormarks - extract needed part of mark.
297 % \topmark doesn't work for the very first chapter (after the title
298 % page or the contents), so we use \firstmark there -- this gets us
299 % the mark with the chapter defs, unless the user sneaks in, e.g.,
300 % @setcolor (or @url, or @link, etc.) between @contents and the very
302 \def\gettopheadingmarks{%
304 \ifx\thischapter\empty \ifcase0\firstmark\fi \fi
306 \def\getbottomheadingmarks{\ifcase1\botmark\fi}
307 \def\getcolormarks{\ifcase2\topmark\fi}
309 % Avoid "undefined control sequence" errors.
310 \def\lastchapterdefs{}
311 \def\lastsectiondefs{}
313 \def\prevchapterdefs{}
314 \def\prevsectiondefs{}
317 % Margin to add to right of even pages, to left of odd pages.
318 \newdimen\bindingoffset
319 \newdimen\normaloffset
320 \newdimen\txipagewidth \newdimen\txipageheight
322 % Main output routine.
325 \output =
{\onepageout{\pagecontents\PAGE}}
330 % \onepageout takes a vbox as an argument.
331 % \shipout a vbox for a single page, adding an optional header, footer,
332 % cropmarks, and footnote. This also causes index entries for this page
333 % to be written to the auxiliary files.
336 \ifcropmarks \hoffset=
0pt
\else \hoffset=
\normaloffset \fi
338 \ifodd\pageno \advance\hoffset by
\bindingoffset
339 \else \advance\hoffset by -
\bindingoffset\fi
341 % Common context changes for both heading and footing.
342 % Do this outside of the \shipout so @code etc. will be expanded in
343 % the headline as they should be, not taken literally (outputting ''code).
344 \def\commmonheadfootline{\let\hsize=
\txipagewidth \texinfochars}
346 % Retrieve the information for the headings from the marks in the page,
347 % and call Plain TeX's \makeheadline and \makefootline, which use the
348 % values in \headline and \footline.
350 % This is used to check if we are on the first page of a chapter.
352 \let\prevchaptername\thischaptername
353 \ifcase0\firstmark\fi
354 \let\curchaptername\thischaptername
356 \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
357 \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
359 \ifx\curchaptername\prevchaptername
360 \let\thischapterheading\thischapter
362 % \thischapterheading is the same as \thischapter except it is blank
363 % for the first page of a chapter. This is to prevent the chapter name
365 \def\thischapterheading{}%
368 \global\setbox\headlinebox =
\vbox{\commmonheadfootline \makeheadline}%
369 \global\setbox\footlinebox =
\vbox{\commmonheadfootline \makefootline}%
372 % Set context for writing to auxiliary files like index files.
373 % Have to do this stuff outside the \shipout because we want it to
374 % take effect in \write's, yet the group defined by the \vbox ends
375 % before the \shipout runs.
377 \indexdummies % don't expand commands in the output.
378 \normalturnoffactive % \ in index entries must not stay \, e.g., if
379 % the page break happens to be in the middle of an example.
380 % We don't want .vr (or whatever) entries like this:
381 % \entry{{\indexbackslash }acronym}{32}{\code {\acronym}}
382 % "\acronym" won't work when it's read back in;
384 % {\code {{\backslashcurfont }acronym}
386 % Do this early so pdf references go to the beginning of the page.
387 \ifpdfmakepagedest \pdfdest name
{\the\pageno} xyz
\fi
389 \ifcropmarks \vbox to
\outervsize\bgroup
391 \vskip-
\topandbottommargin
393 \line{\ewtop\hfil\ewtop}%
396 \vbox{\moveleft\cornerthick\nstop}%
398 \vbox{\moveright\cornerthick\nstop}%
401 \vskip\topandbottommargin
403 \hfil % center the page within the outer (page) hsize.
404 \ifodd\pageno\hskip\bindingoffset\fi
410 \ifdim\ht\footlinebox >
0pt
411 % Only leave this space if the footline is nonempty.
412 % (We lessened \vsize for it in \oddfootingyyy.)
413 % The \baselineskip=24pt in plain's \makefootline has no effect.
419 \egroup % end of \vbox\bgroup
420 \hfil\egroup % end of (centering) \line\bgroup
421 \vskip\topandbottommargin plus1fill minus1fill
422 \boxmaxdepth =
\cornerthick
425 \vbox{\moveleft\cornerthick\nsbot}%
427 \vbox{\moveright\cornerthick\nsbot}%
430 \line{\ewbot\hfil\ewbot}%
432 \egroup % \vbox from first cropmarks clause
434 }% end of \shipout\vbox
435 }% end of group with \indexdummies
437 \ifnum\outputpenalty>-
20000 \else\dosupereject\fi
440 \newinsert\margin \dimen\margin=
\maxdimen
442 % Main part of page, including any footnotes
443 \def\pagebody#1{\vbox to
\txipageheight{\boxmaxdepth=
\maxdepth #1}}
445 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
446 % marginal hacks, juha@viisa.uucp (Juha Takala)
447 \ifvoid\margin\else % marginal info is present
448 \rlap{\kern\hsize\vbox to
\z@
{\kern1pt\box\margin \vss}}\fi
449 \dimen@=
\dp#1\relax \unvbox#1\relax
450 \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
451 \ifr@ggedbottom
\kern-
\dimen@
\vfil \fi}
454 % Here are the rules for the cropmarks. Note that they are
455 % offset so that the space between them is truly \outerhsize or \outervsize
456 % (P. A. MacKay, 12 November, 1986)
458 \def\ewtop{\vrule height
\cornerthick depth0pt width
\cornerlong}
460 {\hrule height
\cornerthick depth
\cornerlong width
\cornerthick}}
461 \def\ewbot{\vrule height0pt depth
\cornerthick width
\cornerlong}
463 {\hrule height
\cornerlong depth
\cornerthick width
\cornerthick}}
468 % Parse an argument, then pass it to #1. The argument is the rest of
469 % the input line (except we remove a trailing comment). #1 should be a
470 % macro which expects an ordinary undelimited TeX argument.
471 % For example, \def\foo{\parsearg\fooxxx}.
473 \def\parsearg{\parseargusing{}}
474 \def\parseargusing#1#2{%
480 \parseargline\empty% Insert the \empty token, see \finishparsearg below.
484 \gdef\parseargline#1^^M
{%
485 \endgroup % End of the group started in \parsearg.
486 \argremovecomment #1\comment\ArgTerm%
490 % First remove any @comment, then any @c comment. Also remove a @texinfoc
491 % comment (see \scanmacro for details). Pass the result on to \argcheckspaces.
492 \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
493 \def\argremovec#1\c#2\ArgTerm{\argremovetexinfoc #1\texinfoc\ArgTerm}
494 \def\argremovetexinfoc#1\texinfoc#2\ArgTerm{\argcheckspaces#1\^^M
\ArgTerm}
496 % Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space.
498 % \argremovec might leave us with trailing space, e.g.,
499 % @end itemize @c foo
500 % This space token undergoes the same procedure and is eventually removed
501 % by \finishparsearg.
503 \def\argcheckspaces#1\^^M
{\argcheckspacesX#1\^^M \^^M
}
504 \def\argcheckspacesX#1 \^^M
{\argcheckspacesY#1\^^M
}
505 \def\argcheckspacesY#1\^^M
#2\^^M
#3\ArgTerm{%
508 % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp:
509 \let\temp\finishparsearg
511 \let\temp\argcheckspaces
513 % Put the space token in:
517 % If a _delimited_ argument is enclosed in braces, they get stripped; so
518 % to get _exactly_ the rest of the line, we had to prevent such situation.
519 % We prepended an \empty token at the very beginning and we expand it now,
520 % just before passing the control to \argtorun.
521 % (Similarly, we have to think about #3 of \argcheckspacesY above: it is
522 % either the null string, or it ends with \^^M---thus there is no danger
523 % that a pair of braces would be stripped.
525 % But first, we have to remove the trailing space token.
527 \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
530 % \parseargdef - define a command taking an argument on the line
532 % \parseargdef\foo{...}
533 % is roughly equivalent to
534 % \def\foo{\parsearg\Xfoo}
537 \expandafter \doparseargdef \csname\string#1\endcsname #1%
539 \def\doparseargdef#1#2{%
544 % Several utility definitions with active space:
549 % Make each space character in the input produce a normal interword
550 % space in the output. Don't allow a line break at this space, as this
551 % is used only in environments like @example, where each line of input
552 % should produce a line of output anyway.
554 \gdef\sepspaces{\obeyspaces\let =
\tie}
556 % If an index command is used in an @example environment, any spaces
557 % therein should become regular spaces in the raw index file, not the
558 % expansion of \tie (\leavevmode \penalty \@M \ ).
559 \gdef\unsepspaces{\let =
\space}
563 \def\flushcr{\ifx\par\lisppar \def\next#
#1{}\else \let\next=
\relax \fi \next}
565 % Define the framework for environments in texinfo.tex. It's used like this:
570 % It's the responsibility of \envdef to insert \begingroup before the
571 % actual body; @end closes the group after calling \Efoo. \envdef also
572 % defines \thisenv, so the current environment is known; @end checks
573 % whether the environment name matches. The \checkenv macro can also be
574 % used to check whether the current environment is the one expected.
576 % Non-false conditionals (@iftex, @ifset) don't fit into this, so they
577 % are not treated as environments; they don't open a group. (The
578 % implementation of @end takes care not to call \endgroup in this
582 % At run-time, environments start with this:
583 \def\startenvironment#1{\begingroup\def\thisenv{#1}}
587 % ... but they get defined via ``\envdef\foo{...}'':
588 \long\def\envdef#1#2{\def#1{\startenvironment#1#2}}
589 \def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}}
591 % Check whether we're in the right environment:
600 % Environment mismatch, #1 expected:
603 \errmessage{This command can appear only
\inenvironment\temp,
604 not
\inenvironment\thisenv}%
606 \def\inenvironment#1{%
608 outside of any environment
%
610 in environment
\expandafter\string#1%
614 % @end foo executes the definition of \Efoo.
615 % But first, it executes a specialized version of \checkenv
618 \if 1\csname iscond.
#1\endcsname
620 % The general wording of \badenverr may not be ideal.
621 \expandafter\checkenv\csname#1\endcsname
622 \csname E
#1\endcsname
627 \newhelp\EMsimple{Press RETURN to continue.
}
630 % Be sure we're in horizontal mode when doing a tie, since we make space
631 % equivalent to this in @example-like environments. Otherwise, a space
632 % at the beginning of a line will start with \penalty -- and
633 % since \penalty is valid in vertical mode, we'd end up putting the
634 % penalty on the vertical list instead of in the new paragraph.
636 % Avoid using \@M directly, because that causes trouble
637 % if the definition is written into an index file.
638 \global\let\tiepenalty = \@M
639 \gdef\tie{\leavevmode\penalty\tiepenalty\
}
642 % @: forces normal size whitespace following.
643 \def\:
{\spacefactor=
1000 }
645 % @* forces a line break.
646 \def\*
{\unskip\hfil\break\hbox{}\ignorespaces}
648 % @/ allows a line break.
651 % @. is an end-of-sentence period.
652 \def\.
{.
\spacefactor=
\endofsentencespacefactor\space}
654 % @! is an end-of-sentence bang.
655 \def\!
{!
\spacefactor=
\endofsentencespacefactor\space}
657 % @? is an end-of-sentence query.
658 \def\?
{?
\spacefactor=
\endofsentencespacefactor\space}
660 % @frenchspacing on|off says whether to put extra space after punctuation.
665 \parseargdef\frenchspacing{%
667 \ifx\temp\onword \plainfrenchspacing
668 \else\ifx\temp\offword \plainnonfrenchspacing
671 \errmessage{Unknown @frenchspacing option `
\temp', must be on|off
}%
675 % @w prevents a word break. Without the \leavevmode, @w at the
676 % beginning of a paragraph, when TeX is still in vertical mode, would
677 % produce a whole line of output instead of starting the paragraph.
678 \def\w#1{\leavevmode\hbox{#1}}
680 % @group ... @end group forces ... to be all on one page, by enclosing
681 % it in a TeX vbox. We use \vtop instead of \vbox to construct the box
682 % to keep its height that of a normal line. According to the rules for
683 % \topskip (p.114 of the TeXbook), the glue inserted is
684 % max (\topskip - \ht (first item), 0). If that height is large,
685 % therefore, no glue is inserted, and the space between the headline and
686 % the text is small, which looks bad.
688 % Another complication is that the group might be very large. This can
689 % cause the glue on the previous page to be unduly stretched, because it
690 % does not have much material. In this case, it's better to add an
691 % explicit \vfill so that the extra space is at the bottom. The
692 % threshold for doing this is if the group is more than \vfilllimit
693 % percent of a page (\vfilllimit can be changed inside of @tex).
699 \ifnum\catcode`\^^M=
\active \else
700 \errhelp =
\groupinvalidhelp
701 \errmessage{@group invalid in context where filling is enabled
}%
705 \setbox\groupbox =
\vtop\bgroup
706 % Do @comment since we are called inside an environment such as
707 % @example, where each end-of-line in the input causes an
708 % end-of-line in the output. We don't want the end-of-line after
709 % the `@group' to put extra space in the output. Since @group
710 % should appear on a line by itself (according to the Texinfo
711 % manual), we don't worry about eating any user text.
715 % The \vtop produces a box with normal height and large depth; thus, TeX puts
716 % \baselineskip glue before it, and (when the next line of text is done)
717 % \lineskip glue after it. Thus, space below is not quite equal to space
718 % above. But it's pretty close.
720 % To get correct interline space between the last line of the group
721 % and the first line afterwards, we have to propagate \prevdepth.
722 \endgraf % Not \par, as it may have been set to \lisppar.
723 \global\dimen1 =
\prevdepth
724 \egroup % End the \vtop.
731 % \dimen0 is the vertical size of the group's box.
732 \dimen0 =
\ht\groupbox \advance\dimen0 by
\dp\groupbox
733 % \dimen2 is how much space is left on the page (more or less).
734 \dimen2 =
\txipageheight \advance\dimen2 by -
\pagetotal
735 % if the group doesn't fit on the current page, and it's a big big
736 % group, force a page break.
737 \ifdim \dimen0 >
\dimen2
738 \ifdim \pagetotal <
\vfilllimit\txipageheight
746 % TeX puts in an \escapechar (i.e., `@') at the beginning of the help
747 % message, so this ends up printing `@group can only ...'.
749 \newhelp\groupinvalidhelp{%
750 group can only be used in environments such as @example,^^J
%
751 where each line of input produces a line of output.
}
753 % @need space-in-mils
754 % forces a page break if there is not space-in-mils remaining.
756 \newdimen\mil \mil=
0.001in
759 % Ensure vertical mode, so we don't make a big box in the middle of a
763 % If the @need value is less than one line space, it's useless.
765 \dimen2 =
\ht\strutbox
766 \advance\dimen2 by
\dp\strutbox
767 \ifdim\dimen0 >
\dimen2
769 % Do a \strut just to make the height of this box be normal, so the
770 % normal leading is inserted relative to the preceding line.
771 % And a page break here is fine.
772 \vtop to
#1\mil{\strut\vfil}%
774 % TeX does not even consider page breaks if a penalty added to the
775 % main vertical list is 10000 or more. But in order to see if the
776 % empty box we just added fits on the page, we must make it consider
777 % page breaks. On the other hand, we don't want to actually break the
778 % page after the empty box. So we use a penalty of 9999.
780 % There is an extremely small chance that TeX will actually break the
781 % page at this \penalty, if there are no other feasible breakpoints in
782 % sight. (If the user is using lots of big @group commands, which
783 % almost-but-not-quite fill up a page, TeX will have a hard time doing
784 % good page breaking, for example.) However, I could not construct an
785 % example where a page broke at this \penalty; if it happens in a real
786 % document, then we can reconsider our strategy.
789 % Back up by the size of the box, whether we did a page break or not.
792 % Do not allow a page break right after this kern.
797 % @br forces paragraph break (and is undocumented).
801 % @page forces the start of a new page.
803 \def\page{\par\vfill\supereject}
806 % outputs text on separate line in roman font, starting at standard page margin
808 % This records the amount of indent in the innermost environment.
809 % That's how much \exdent should take out.
810 \newskip\exdentamount
812 % This defn is used inside fill environments such as @defun.
813 \parseargdef\exdent{\hfil\break\hbox{\kern -
\exdentamount{\rm#1}}\hfil\break}
815 % This defn is used inside nofill environments such as @example.
816 \parseargdef\nofillexdent{{\advance \leftskip by -
\exdentamount
817 \leftline{\hskip\leftskip{\rm#1}}}}
819 % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
820 % paragraph. For more general purposes, use the \margin insertion
821 % class. WHICH is `l' or `r'. Not documented, written for gawk manual.
823 \newskip\inmarginspacing \inmarginspacing=
1cm
824 \def\strutdepth{\dp\strutbox}
826 \def\doinmargin#1#2{\strut\vadjust{%
829 \vtop to
\strutdepth{%
830 \baselineskip=
\strutdepth
832 % if you have multiple lines of stuff to put here, you'll need to
833 % make the vbox yourself of the appropriate size.
835 \llap{\ignorespaces #2\hskip\inmarginspacing}%
837 \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}%
842 \def\inleftmargin{\doinmargin l
}
843 \def\inrightmargin{\doinmargin r
}
845 % @inmargin{TEXT [, RIGHT-TEXT]}
846 % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right;
847 % else use TEXT for both).
849 \def\inmargin#1{\parseinmargin #1,,
\finish}
850 \def\parseinmargin#1,
#2,
#3\finish{% not perfect, but better than nothing.
851 \setbox0 =
\hbox{\ignorespaces #2}%
853 \def\lefttext{#1}% have both texts
856 \def\lefttext{#1}% have only one text
861 \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin
863 \def\temp{\inleftmargin\lefttext}%
868 % @include FILE -- \input text of FILE.
870 \def\include{\parseargusing\filenamecatcodes\includezzz}
875 \makevalueexpandable % we want to expand any @value in FILE.
876 \turnoffactive % and allow special characters in the expansion
877 \indexnofonts % Allow `@@' and other weird things in file names.
878 \wlog{texinfo.tex: doing @include of
#1^^J
}%
879 \edef\temp{\noexpand\input #1 }%
881 % This trickery is to read FILE outside of a group, in case it makes
887 \def\filenamecatcodes{%
901 \def\pushthisfilestack{%
902 \expandafter\pushthisfilestackX\popthisfilestack\StackTerm
904 \def\pushthisfilestackX{%
905 \expandafter\pushthisfilestackY\thisfile\StackTerm
907 \def\pushthisfilestackY #1\StackTerm #2\StackTerm {%
908 \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}%
911 \def\popthisfilestack{\errthisfilestackempty}
912 \def\errthisfilestackempty{\errmessage{Internal error:
913 the stack of filenames is empty.
}}
918 % outputs that line, centered.
920 \parseargdef\center{%
922 \let\centersub\centerH
924 \let\centersub\centerV
926 \centersub{\hfil \ignorespaces#1\unskip \hfil}%
927 \let\centersub\relax % don't let the definition persist, just in case
931 \advance\hsize by -
\leftskip
932 \advance\hsize by -
\rightskip
937 \newcount\centerpenalty
939 % The idea here is the same as in \startdefun, \cartouche, etc.: if
940 % @center is the first thing after a section heading, we need to wipe
941 % out the negative parskip inserted by \sectionheading, but still
942 % prevent a page break here.
943 \centerpenalty =
\lastpenalty
944 \ifnum\centerpenalty>
10000 \vskip\parskip \fi
945 \ifnum\centerpenalty>
9999 \penalty\centerpenalty \fi
946 \line{\kern\leftskip #1\kern\rightskip}%
949 % @sp n outputs n lines of vertical space
951 \parseargdef\sp{\vskip #1\baselineskip}
953 % @comment ...line which is ignored...
954 % @c is the same as @comment
955 % @ignore ... @end ignore is another way to write a comment
958 \def\c{\begingroup \catcode`\^^M=
\active%
959 \catcode`\@=
\other \catcode`\
{=
\other \catcode`\
}=
\other%
961 {\catcode`\^^M=
\active \gdef\cxxx#1^^M
{\endgroup}}
965 % @paragraphindent NCHARS
966 % We'll use ems for NCHARS, close enough.
967 % NCHARS can also be the word `asis' or `none'.
968 % We cannot feasibly implement @paragraphindent asis, though.
970 \def\asisword{asis
} % no translation, these are keywords
973 \parseargdef\paragraphindent{%
978 \defaultparindent =
0pt
980 \defaultparindent =
#1em
983 \parindent =
\defaultparindent
986 % @exampleindent NCHARS
987 % We'll use ems for NCHARS like @paragraphindent.
988 % It seems @exampleindent asis isn't necessary, but
989 % I preserve it to make it similar to @paragraphindent.
990 \parseargdef\exampleindent{%
997 \lispnarrowing =
#1em
1002 % @firstparagraphindent WORD
1003 % If WORD is `none', then suppress indentation of the first paragraph
1004 % after a section heading. If WORD is `insert', then do indent at such
1007 % The paragraph indentation is suppressed or not by calling
1008 % \suppressfirstparagraphindent, which the sectioning commands do.
1009 % We switch the definition of this back and forth according to WORD.
1010 % By default, we suppress indentation.
1012 \def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent}
1013 \def\insertword{insert
}
1015 \parseargdef\firstparagraphindent{%
1018 \let\suppressfirstparagraphindent =
\dosuppressfirstparagraphindent
1019 \else\ifx\temp\insertword
1020 \let\suppressfirstparagraphindent =
\relax
1022 \errhelp =
\EMsimple
1023 \errmessage{Unknown @firstparagraphindent option `
\temp'
}%
1027 % Here is how we actually suppress indentation. Redefine \everypar to
1028 % \kern backwards by \parindent, and then reset itself to empty.
1030 % We also make \indent itself not actually do anything until the next
1033 \gdef\dosuppressfirstparagraphindent{%
1034 \gdef\indent {\restorefirstparagraphindent \indent}%
1035 \gdef\noindent{\restorefirstparagraphindent \noindent}%
1036 \global\everypar =
{\kern -
\parindent \restorefirstparagraphindent}%
1039 \gdef\restorefirstparagraphindent{%
1040 \global\let\indent =
\ptexindent
1041 \global\let\noindent =
\ptexnoindent
1042 \global\everypar =
{}%
1046 % @refill is a no-op.
1049 % @setfilename INFO-FILENAME - ignored
1050 \let\setfilename=
\comment
1053 \outer\def\bye{\pagealignmacro\tracingstats=
1\ptexend}
1057 % adobe `portable' document format
1061 \newcount\filenamelength
1071 \newif\ifpdfmakepagedest
1077 \newif\iftxiuseunicodedestname
1078 \txiuseunicodedestnamefalse % For pdfTeX etc.
1080 \ifx\luatexversion\thisisundefined
1082 % Use Unicode destination names
1083 \txiuseunicodedestnametrue
1084 % Escape PDF strings with converting UTF-16 from UTF-8
1088 function UTF16oct(str
)
1089 tex
.sprint(string.char(0x5c) .. '376' .. string.char(0x5c) .. '377')
1090 for c
in string.utfvalues(str
) do
1093 string.format(string.char(0x5c) .. string.char(0x25) .. '03o' ..
1094 string.char(0x5c) .. string.char(0x25) .. '03o',
1095 (c
/ 256), (c
% 256)))
1098 local c_hi
= c
/ 1024 + 0xd800
1099 local c_lo
= c
% 1024 + 0xdc00
1101 string.format(string.char(0x5c) .. string.char(0x25) .. '03o' ..
1102 string.char(0x5c) .. string.char(0x25) .. '03o' ..
1103 string.char(0x5c) .. string.char(0x25) .. '03o' ..
1104 string.char(0x5c) .. string.char(0x25) .. '03o',
1105 (c_hi
/ 256), (c_hi
% 256),
1106 (c_lo
/ 256), (c_lo
% 256)))
1112 \def\pdfescapestrutfsixteen#1{\directlua{UTF16oct('\luaescapestring{#1}')}}
1113 % Escape PDF strings without converting
1116 function PDFescstr(str
)
1117 for c
in string.bytes(str
) do
1118 if c
<= 0x20 or c
>= 0x80 or c
== 0x28 or c
== 0x29 or c
== 0x5c then
1120 string.format(string.char(0x5c) .. string.char(0x25) .. '03o',
1123 tex
.sprint(string.char(c
))
1129 \def\pdfescapestring#1{\directlua{PDFescstr('\luaescapestring{#1}')}}
1130 \ifnum\luatexversion>
84
1131 % For LuaTeX >= 0.85
1132 \def\pdfdest{\pdfextension dest
}
1133 \let\pdfoutput\outputmode
1134 \def\pdfliteral{\pdfextension literal
}
1135 \def\pdfcatalog{\pdfextension catalog
}
1136 \def\pdftexversion{\numexpr\pdffeedback version
\relax}
1137 \let\pdfximage\saveimageresource
1138 \let\pdfrefximage\useimageresource
1139 \let\pdflastximage\lastsavedimageresourceindex
1140 \def\pdfendlink{\pdfextension endlink
\relax}
1141 \def\pdfoutline{\pdfextension outline
}
1142 \def\pdfstartlink{\pdfextension startlink
}
1143 \def\pdffontattr{\pdfextension fontattr
}
1144 \def\pdfobj{\pdfextension obj
}
1145 \def\pdflastobj{\numexpr\pdffeedback lastobj
\relax}
1146 \let\pdfpagewidth\pagewidth
1147 \let\pdfpageheight\pageheight
1148 \edef\pdfhorigin{\pdfvariable horigin
}
1149 \edef\pdfvorigin{\pdfvariable vorigin
}
1153 % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
1154 % can be set). So we test for \relax and 0 as well as being undefined.
1155 \ifx\pdfoutput\thisisundefined
1157 \ifx\pdfoutput\relax
1166 % PDF uses PostScript string constants for the names of xref targets,
1167 % for display in the outlines, and in other places. Thus, we have to
1168 % double any backslashes. Otherwise, a name like "\node" will be
1169 % interpreted as a newline (\n), followed by o, d, e. Not good.
1171 % See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and
1172 % related messages. The final outcome is that it is up to the TeX user
1173 % to double the backslashes and otherwise make the string valid, so
1174 % that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to
1175 % do this reliably, so we use it.
1177 % #1 is a control sequence in which to do the replacements,
1179 \def\txiescapepdf#1{%
1180 \ifx\pdfescapestring\thisisundefined
1181 % No primitive available; should we give a warning or log?
1182 % Many times it won't matter.
1185 % The expandable \pdfescapestring primitive escapes parentheses,
1186 % backslashes, and other special chars.
1187 \xdef#1{\pdfescapestring{#1}}%
1190 \def\txiescapepdfutfsixteen#1{%
1191 \ifx\pdfescapestrutfsixteen\thisisundefined
1192 % No UTF-16 converting macro available.
1195 \xdef#1{\pdfescapestrutfsixteen{#1}}%
1199 \newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
1200 with PDF output, and none of those formats could be found. (.eps cannot
1201 be supported due to the design of the PDF format; use regular TeX (DVI
1206 % Color manipulation macros using ideas from pdfcolor.tex,
1207 % except using rgb instead of cmyk; the latter is said to render as a
1208 % very dark gray on-screen and a very dark halftone in print, instead
1209 % of actual black. The dark red here is dark enough to print on paper as
1210 % nearly black, but still distinguishable for online viewing. We use
1211 % black by default, though.
1212 \def\rgbDarkRed{0.50 0.09 0.12}
1213 \def\rgbBlack{0 0 0}
1215 % rg sets the color for filling (usual text, etc.);
1216 % RG sets the color for stroking (thin rules, e.g., normal _'s).
1217 \def\pdfsetcolor#1{\pdfliteral{#1 rg
#1 RG
}}
1219 % Set color, and create a mark which defines \thiscolor accordingly,
1220 % so that \makeheadline knows which color to restore.
1222 \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}%
1227 \def\maincolor{\rgbBlack}
1228 \pdfsetcolor{\maincolor}
1229 \edef\thiscolor{\maincolor}
1230 \def\lastcolordefs{}
1234 \line{\pdfsetcolor{\maincolor}\the\footline}%
1242 % Extract \thiscolor definition from the marks.
1244 % Typeset the headline with \maincolor, then restore the color.
1245 \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
1253 \pdfcatalog{/PageMode /UseOutlines
}
1255 % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
1256 \def\dopdfimage#1#2#3{%
1257 \def\pdfimagewidth{#2}\setbox0 =
\hbox{\ignorespaces #2}%
1258 \def\pdfimageheight{#3}\setbox2 =
\hbox{\ignorespaces #3}%
1260 % pdftex (and the PDF format) support .pdf, .png, .jpg (among
1261 % others). Let's try in that order, PDF first since if
1262 % someone has a scalable image, presumably better to use that than a
1264 \let\pdfimgext=
\empty
1266 \openin 1 #1.pdf
\ifeof 1
1267 \openin 1 #1.PDF
\ifeof 1
1268 \openin 1 #1.png
\ifeof 1
1269 \openin 1 #1.jpg
\ifeof 1
1270 \openin 1 #1.jpeg
\ifeof 1
1271 \openin 1 #1.JPG
\ifeof 1
1272 \errhelp =
\nopdfimagehelp
1273 \errmessage{Could not find image file
#1 for pdf
}%
1274 \else \gdef\pdfimgext{JPG
}%
1276 \else \gdef\pdfimgext{jpeg
}%
1278 \else \gdef\pdfimgext{jpg
}%
1280 \else \gdef\pdfimgext{png
}%
1282 \else \gdef\pdfimgext{PDF
}%
1284 \else \gdef\pdfimgext{pdf
}%
1289 % without \immediate, ancient pdftex seg faults when the same image is
1290 % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
1291 \ifnum\pdftexversion <
14
1294 \immediate\pdfximage
1296 \ifdim \wd0 >
0pt width
\pdfimagewidth \fi
1297 \ifdim \wd2 >
0pt height
\pdfimageheight \fi
1298 \ifnum\pdftexversion<
13
1303 \ifnum\pdftexversion <
14 \else
1304 \pdfrefximage \pdflastximage
1307 \def\setpdfdestname#1{{%
1308 % We have to set dummies so commands such as @code, and characters
1309 % such as \, aren't expanded when present in a section title.
1311 \makevalueexpandable
1313 \iftxiuseunicodedestname
1314 \ifx \declaredencoding \latone
1315 % Pass through Latin-1 characters.
1316 % LuaTeX with byte wise I/O converts Latin-1 characters to Unicode.
1318 \ifx \declaredencoding \utfeight
1319 % Pass through Unicode characters.
1321 % Use ASCII approximations in destination names.
1322 \passthroughcharsfalse
1326 % Use ASCII approximations in destination names.
1327 \passthroughcharsfalse
1329 \def\pdfdestname{#1}%
1330 \txiescapepdf\pdfdestname
1333 \def\setpdfoutlinetext#1{{%
1335 \makevalueexpandable
1337 \ifx \declaredencoding \latone
1338 % The PDF format can use an extended form of Latin-1 in bookmark
1339 % strings. See Appendix D of the PDF Reference, Sixth Edition, for
1340 % the "PDFDocEncoding".
1341 \passthroughcharstrue
1342 % Pass through Latin-1 characters.
1343 % LuaTeX: Convert to Unicode
1344 % pdfTeX: Use Latin-1 as PDFDocEncoding
1345 \def\pdfoutlinetext{#1}%
1347 \ifx \declaredencoding \utfeight
1348 \ifx\luatexversion\thisisundefined
1349 % For pdfTeX with UTF-8.
1350 % TODO: the PDF format can use UTF-16 in bookmark strings,
1351 % but the code for this isn't done yet.
1352 % Use ASCII approximations.
1353 \passthroughcharsfalse
1354 \def\pdfoutlinetext{#1}%
1356 % For LuaTeX with UTF-8.
1357 % Pass through Unicode characters for title texts.
1358 \passthroughcharstrue
1359 \def\pdfoutlinetext{#1}%
1362 % For non-Latin-1 or non-UTF-8 encodings.
1363 % Use ASCII approximations.
1364 \passthroughcharsfalse
1365 \def\pdfoutlinetext{#1}%
1368 % LuaTeX: Convert to UTF-16
1369 % pdfTeX: Use Latin-1 as PDFDocEncoding
1370 \txiescapepdfutfsixteen\pdfoutlinetext
1374 \setpdfdestname{#1}%
1375 \safewhatsit{\pdfdest name
{\pdfdestname} xyz
}%
1378 % used to mark target names; must be expandable.
1381 % by default, use black for everything.
1382 \def\urlcolor{\rgbBlack}
1383 \def\linkcolor{\rgbBlack}
1384 \def\endlink{\setcolor{\maincolor}\pdfendlink}
1386 % Adding outlines to PDF; macros for calculating structure of outlines
1387 % come from Petr Olsak
1388 \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
1389 \else \csname#1\endcsname \fi}
1390 \def\advancenumber#1{\tempnum=
\expnumber{#1}\relax
1391 \advance\tempnum by
1
1392 \expandafter\xdef\csname#1\endcsname{\the\tempnum}}
1394 % #1 is the section text, which is what will be displayed in the
1395 % outline by the pdf viewer. #2 is the pdf expression for the number
1396 % of subentries (or empty, for subsubsections). #3 is the node text,
1397 % which might be empty if this toc entry had no corresponding node.
1398 % #4 is the page number
1400 \def\dopdfoutline#1#2#3#4{%
1401 % Generate a link to the node text if that exists; else, use the
1402 % page number. We could generate a destination for the section
1403 % text in the case where a section has no node, but it doesn't
1404 % seem worth the trouble, since most documents are normally structured.
1405 \setpdfoutlinetext{#1}
1407 \ifx\pdfdestname\empty
1408 \def\pdfdestname{#4}%
1411 \pdfoutline goto name
{\pdfmkpgn{\pdfdestname}}#2{\pdfoutlinetext}%
1414 \def\pdfmakeoutlines{%
1416 % Read toc silently, to get counts of subentries for \pdfoutline.
1417 \def\partentry#
#1#
#2#
#3#
#4{}% ignore parts in the outlines
1418 \def\numchapentry#
#1#
#2#
#3#
#4{%
1419 \def\thischapnum{#
#2}%
1421 \def\thissubsecnum{0}%
1423 \def\numsecentry#
#1#
#2#
#3#
#4{%
1424 \advancenumber{chap
\thischapnum}%
1425 \def\thissecnum{#
#2}%
1426 \def\thissubsecnum{0}%
1428 \def\numsubsecentry#
#1#
#2#
#3#
#4{%
1429 \advancenumber{sec
\thissecnum}%
1430 \def\thissubsecnum{#
#2}%
1432 \def\numsubsubsecentry#
#1#
#2#
#3#
#4{%
1433 \advancenumber{subsec
\thissubsecnum}%
1435 \def\thischapnum{0}%
1437 \def\thissubsecnum{0}%
1439 % use \def rather than \let here because we redefine \chapentry et
1440 % al. a second time, below.
1441 \def\appentry{\numchapentry}%
1442 \def\appsecentry{\numsecentry}%
1443 \def\appsubsecentry{\numsubsecentry}%
1444 \def\appsubsubsecentry{\numsubsubsecentry}%
1445 \def\unnchapentry{\numchapentry}%
1446 \def\unnsecentry{\numsecentry}%
1447 \def\unnsubsecentry{\numsubsecentry}%
1448 \def\unnsubsubsecentry{\numsubsubsecentry}%
1451 % Read toc second time, this time actually producing the outlines.
1452 % The `-' means take the \expnumber as the absolute number of
1453 % subentries, which we calculated on our first read of the .toc above.
1455 % We use the node names as the destinations.
1456 \def\numchapentry#
#1#
#2#
#3#
#4{%
1457 \dopdfoutline{#
#1}{count-
\expnumber{chap#
#2}}{#
#3}{#
#4}}%
1458 \def\numsecentry#
#1#
#2#
#3#
#4{%
1459 \dopdfoutline{#
#1}{count-
\expnumber{sec#
#2}}{#
#3}{#
#4}}%
1460 \def\numsubsecentry#
#1#
#2#
#3#
#4{%
1461 \dopdfoutline{#
#1}{count-
\expnumber{subsec#
#2}}{#
#3}{#
#4}}%
1462 \def\numsubsubsecentry#
#1#
#2#
#3#
#4{% count is always zero
1463 \dopdfoutline{#
#1}{}{#
#3}{#
#4}}%
1465 % PDF outlines are displayed using system fonts, instead of
1466 % document fonts. Therefore we cannot use special characters,
1467 % since the encoding is unknown. For example, the eogonek from
1468 % Latin 2 (0xea) gets translated to a | character. Info from
1469 % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
1471 % TODO this right, we have to translate 8-bit characters to
1472 % their "best" equivalent, based on the @documentencoding. Too
1473 % much work for too little return. Just use the ASCII equivalents
1474 % we use for the index sort strings.
1478 % We can have normal brace characters in the PDF outlines, unlike
1479 % Texinfo index files. So set that up.
1480 \def\
{{\lbracecharliteral}%
1481 \def\
}{\rbracecharliteral}%
1482 \catcode`\\=
\active \otherbackslash
1483 \input \tocreadfilename
1486 {\catcode`
[=
1 \catcode`
]=
2
1487 \catcode`
{=
\other \catcode`
}=
\other
1488 \gdef\lbracecharliteral[{]%
1489 \gdef\rbracecharliteral[}]%
1492 \def\skipspaces#1{\def\PP{#1}\def\D{|
}%
1493 \ifx\PP\D\let\nextsp\relax
1494 \else\let\nextsp\skipspaces
1495 \addtokens{\filename}{\PP}%
1496 \advance\filenamelength by
1
1499 \def\getfilename#1{%
1501 % If we don't expand the argument now, \skipspaces will get
1502 % snagged on things like "@value{foo}".
1504 \expandafter\skipspaces\temp|
\relax
1506 \ifnum\pdftexversion <
14
1507 \let \startlink \pdfannotlink
1509 \let \startlink \pdfstartlink
1511 % make a live url in pdf output.
1514 % it seems we really need yet another set of dummies; have not
1515 % tried to figure out what each command should do in the context
1516 % of @url. for now, just make @/ a no-op, that's the only one
1517 % people have actually reported a problem with.
1519 \normalturnoffactive
1522 \makevalueexpandable
1523 % do we want to go so far as to use \indexnofonts instead of just
1524 % special-casing \var here?
1527 \leavevmode\setcolor{\urlcolor}%
1528 \startlink attr
{/Border
[0 0 0]}%
1529 user
{/Subtype /Link /A << /S /URI /URI (
#1) >>
}%
1531 \def\pdfgettoks#1.
{\setbox\boxA=
\hbox{\toksA=
{#1.
}\toksB=
{}\maketoks}}
1532 \def\addtokens#1#2{\edef\addtoks{\noexpand#1=
{\the#1#2}}\addtoks}
1533 \def\adn#1{\addtokens{\toksC}{#1}\global\countA=
1\let\next=
\maketoks}
1534 \def\poptoks#1#2|ENDTOKS|
{\let\first=
#1\toksD=
{#1}\toksA=
{#2}}
1536 \expandafter\poptoks\the\toksA|ENDTOKS|
\relax
1538 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
1539 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
1540 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
1542 \ifnum0=
\countA\else\makelink\fi
1543 \ifx\first.
\let\next=
\done\else
1545 \addtokens{\toksB}{\the\toksD}
1546 \ifx\first,
\addtokens{\toksB}{\space}\fi
1548 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
1550 \def\makelink{\addtokens{\toksB}%
1551 {\noexpand\pdflink{\the\toksC}}\toksC=
{}\global\countA=
0}
1553 \startlink attr
{/Border
[0 0 0]} goto name
{\pdfmkpgn{#1}}
1554 \setcolor{\linkcolor}#1\endlink}
1555 \def\done{\edef\st{\global\noexpand\toksA=
{\the\toksB}}\st}
1558 \let\pdfmkdest =
\gobble
1559 \let\pdfurl =
\gobble
1560 \let\endlink =
\relax
1561 \let\setcolor =
\gobble
1562 \let\pdfsetcolor =
\gobble
1563 \let\pdfmakeoutlines =
\relax
1564 \fi % \ifx\pdfoutput
1569 \ifx\XeTeXrevision\thisisundefined
1572 % XeTeX version check
1574 \ifnum\strcmp{\the\XeTeXversion\XeTeXrevision}{0.99996}>-
1
1575 % TeX Live 2016 contains XeTeX 0.99996 and xdvipdfmx 20160307.
1576 % It can use the `dvipdfmx:config' special (from TeX Live SVN r40941).
1577 % For avoiding PDF destination name replacement, we use this special
1578 % instead of xdvipdfmx's command line option `-C 0x0010'.
1579 \special{dvipdfmx:config C
0x0010}
1580 % XeTeX 0.99995+ comes with xdvipdfmx 20160307+.
1581 % It can handle Unicode destination names for PDF.
1582 \txiuseunicodedestnametrue
1584 % XeTeX < 0.99996 (TeX Live < 2016) cannot use the
1585 % `dvipdfmx:config' special.
1586 % So for avoiding PDF destination name replacement,
1587 % xdvipdfmx's command line option `-C 0x0010' is necessary.
1589 % XeTeX < 0.99995 can not handle Unicode destination names for PDF
1590 % because xdvipdfmx 20150315 has a UTF-16 conversion issue.
1591 % It is fixed by xdvipdfmx 20160106 (TeX Live SVN r39753).
1592 \txiuseunicodedestnamefalse
1597 \def\rgbDarkRed{0.50 0.09 0.12}
1598 \def\rgbBlack{0 0 0}
1600 \def\pdfsetcolor#1{\special{pdf:scolor
[#1]}}
1602 % Set color, and create a mark which defines \thiscolor accordingly,
1603 % so that \makeheadline knows which color to restore.
1605 \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}%
1610 \def\maincolor{\rgbBlack}
1611 \pdfsetcolor{\maincolor}
1612 \edef\thiscolor{\maincolor}
1613 \def\lastcolordefs{}
1617 \line{\pdfsetcolor{\maincolor}\the\footline}%
1625 % Extract \thiscolor definition from the marks.
1627 % Typeset the headline with \maincolor, then restore the color.
1628 \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
1635 % PDF outline support
1637 % Emulate pdfTeX primitive
1638 \def\pdfdest name
#1 xyz
{%
1639 \special{pdf:dest (
#1)
[@thispage /XYZ @xpos @ypos null
]}%
1642 \def\setpdfdestname#1{{%
1643 % We have to set dummies so commands such as @code, and characters
1644 % such as \, aren't expanded when present in a section title.
1646 \makevalueexpandable
1648 \iftxiuseunicodedestname
1649 % Pass through Unicode characters.
1651 % Use ASCII approximations in destination names.
1652 \passthroughcharsfalse
1654 \def\pdfdestname{#1}%
1655 \txiescapepdf\pdfdestname
1658 \def\setpdfoutlinetext#1{{%
1660 % Always use Unicode characters in title texts.
1661 \def\pdfoutlinetext{#1}%
1662 % For XeTeX, xdvipdfmx converts to UTF-16.
1663 % So we do not convert.
1664 \txiescapepdf\pdfoutlinetext
1668 \setpdfdestname{#1}%
1669 \safewhatsit{\pdfdest name
{\pdfdestname} xyz
}%
1672 % by default, use black for everything.
1673 \def\urlcolor{\rgbBlack}
1674 \def\linkcolor{\rgbBlack}
1675 \def\endlink{\setcolor{\maincolor}\pdfendlink}
1677 \def\dopdfoutline#1#2#3#4{%
1678 \setpdfoutlinetext{#1}
1680 \ifx\pdfdestname\empty
1681 \def\pdfdestname{#4}%
1684 \special{pdf:out
[-
] #2 << /Title (
\pdfoutlinetext) /A
1685 << /S /GoTo /D (
\pdfdestname) >> >>
}%
1688 \def\pdfmakeoutlines{%
1691 % For XeTeX, counts of subentries are not necessary.
1692 % Therefore, we read toc only once.
1694 % We use node names as destinations.
1695 \def\partentry#
#1#
#2#
#3#
#4{}% ignore parts in the outlines
1696 \def\numchapentry#
#1#
#2#
#3#
#4{%
1697 \dopdfoutline{#
#1}{1}{#
#3}{#
#4}}%
1698 \def\numsecentry#
#1#
#2#
#3#
#4{%
1699 \dopdfoutline{#
#1}{2}{#
#3}{#
#4}}%
1700 \def\numsubsecentry#
#1#
#2#
#3#
#4{%
1701 \dopdfoutline{#
#1}{3}{#
#3}{#
#4}}%
1702 \def\numsubsubsecentry#
#1#
#2#
#3#
#4{%
1703 \dopdfoutline{#
#1}{4}{#
#3}{#
#4}}%
1705 \let\appentry\numchapentry%
1706 \let\appsecentry\numsecentry%
1707 \let\appsubsecentry\numsubsecentry%
1708 \let\appsubsubsecentry\numsubsubsecentry%
1709 \let\unnchapentry\numchapentry%
1710 \let\unnsecentry\numsecentry%
1711 \let\unnsubsecentry\numsubsecentry%
1712 \let\unnsubsubsecentry\numsubsubsecentry%
1714 % For XeTeX, xdvipdfmx converts strings to UTF-16.
1715 % Therefore, the encoding and the language may not be considered.
1719 % We can have normal brace characters in the PDF outlines, unlike
1720 % Texinfo index files. So set that up.
1721 \def\
{{\lbracecharliteral}%
1722 \def\
}{\rbracecharliteral}%
1723 \catcode`\\=
\active \otherbackslash
1724 \input \tocreadfilename
1727 {\catcode`
[=
1 \catcode`
]=
2
1728 \catcode`
{=
\other \catcode`
}=
\other
1729 \gdef\lbracecharliteral[{]%
1730 \gdef\rbracecharliteral[}]%
1733 \special{pdf:docview << /PageMode /UseOutlines >>
}
1734 % ``\special{pdf:tounicode ...}'' is not necessary
1735 % because xdvipdfmx converts strings from UTF-8 to UTF-16 without it.
1736 % However, due to a UTF-16 conversion issue of xdvipdfmx 20150315,
1737 % ``\special{pdf:dest ...}'' cannot handle non-ASCII strings.
1738 % It is fixed by xdvipdfmx 20160106 (TeX Live SVN r39753).
1740 \def\skipspaces#1{\def\PP{#1}\def\D{|
}%
1741 \ifx\PP\D\let\nextsp\relax
1742 \else\let\nextsp\skipspaces
1743 \addtokens{\filename}{\PP}%
1744 \advance\filenamelength by
1
1747 \def\getfilename#1{%
1749 % If we don't expand the argument now, \skipspaces will get
1750 % snagged on things like "@value{foo}".
1752 \expandafter\skipspaces\temp|
\relax
1754 % make a live url in pdf output.
1757 % it seems we really need yet another set of dummies; have not
1758 % tried to figure out what each command should do in the context
1759 % of @url. for now, just make @/ a no-op, that's the only one
1760 % people have actually reported a problem with.
1762 \normalturnoffactive
1765 \makevalueexpandable
1766 % do we want to go so far as to use \indexnofonts instead of just
1767 % special-casing \var here?
1770 \leavevmode\setcolor{\urlcolor}%
1771 \special{pdf:bann << /Border
[0 0 0]
1772 /Subtype /Link /A << /S /URI /URI (
#1) >> >>
}%
1774 \def\endlink{\setcolor{\maincolor}\special{pdf:eann
}}
1775 \def\pdfgettoks#1.
{\setbox\boxA=
\hbox{\toksA=
{#1.
}\toksB=
{}\maketoks}}
1776 \def\addtokens#1#2{\edef\addtoks{\noexpand#1=
{\the#1#2}}\addtoks}
1777 \def\adn#1{\addtokens{\toksC}{#1}\global\countA=
1\let\next=
\maketoks}
1778 \def\poptoks#1#2|ENDTOKS|
{\let\first=
#1\toksD=
{#1}\toksA=
{#2}}
1780 \expandafter\poptoks\the\toksA|ENDTOKS|
\relax
1782 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
1783 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
1784 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
1786 \ifnum0=
\countA\else\makelink\fi
1787 \ifx\first.
\let\next=
\done\else
1789 \addtokens{\toksB}{\the\toksD}
1790 \ifx\first,
\addtokens{\toksB}{\space}\fi
1792 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
1794 \def\makelink{\addtokens{\toksB}%
1795 {\noexpand\pdflink{\the\toksC}}\toksC=
{}\global\countA=
0}
1797 \special{pdf:bann << /Border
[0 0 0]
1798 /Type /Annot /Subtype /Link /A << /S /GoTo /D (
#1) >> >>
}%
1799 \setcolor{\linkcolor}#1\endlink}
1800 \def\done{\edef\st{\global\noexpand\toksA=
{\the\toksB}}\st}
1805 % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
1806 \def\doxeteximage#1#2#3{%
1807 \def\xeteximagewidth{#2}\setbox0 =
\hbox{\ignorespaces #2}%
1808 \def\xeteximageheight{#3}\setbox2 =
\hbox{\ignorespaces #3}%
1810 % XeTeX (and the PDF format) supports .pdf, .png, .jpg (among
1811 % others). Let's try in that order, PDF first since if
1812 % someone has a scalable image, presumably better to use that than a
1814 \let\xeteximgext=
\empty
1816 \openin 1 #1.pdf
\ifeof 1
1817 \openin 1 #1.PDF
\ifeof 1
1818 \openin 1 #1.png
\ifeof 1
1819 \openin 1 #1.jpg
\ifeof 1
1820 \openin 1 #1.jpeg
\ifeof 1
1821 \openin 1 #1.JPG
\ifeof 1
1822 \errmessage{Could not find image file
#1 for XeTeX
}%
1823 \else \gdef\xeteximgext{JPG
}%
1825 \else \gdef\xeteximgext{jpeg
}%
1827 \else \gdef\xeteximgext{jpg
}%
1829 \else \gdef\xeteximgext{png
}%
1831 \else \gdef\xeteximgext{PDF
}%
1833 \else \gdef\xeteximgext{pdf
}%
1838 \def\xetexpdfext{pdf
}%
1839 \ifx\xeteximgext\xetexpdfext
1840 \XeTeXpdffile "
#1".
\xeteximgext ""
1842 \def\xetexpdfext{PDF
}%
1843 \ifx\xeteximgext\xetexpdfext
1844 \XeTeXpdffile "
#1".
\xeteximgext ""
1846 \XeTeXpicfile "
#1".
\xeteximgext ""
1849 \ifdim \wd0 >
0pt width
\xeteximagewidth \fi
1850 \ifdim \wd2 >
0pt height
\xeteximageheight \fi \relax
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
1872 \normalbaselineskip =
\baselinefactor\dimen0
1873 \normallineskip =
\lineskipfactor\normalbaselineskip
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
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)
1901 /CIDInit /ProcSet findresource begin
1909 /CMapName /TeX-OT1-
0 def
1911 1 begincodespacerange
1967 CMapName currentdict /CMap defineresource pop
1973 \expandafter\edef\csname cmapOT1
\endcsname#1{%
1974 \pdffontattr#1{/ToUnicode
\the\pdflastobj\space 0 R
}%
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)
1987 /CIDInit /ProcSet findresource begin
1995 /CMapName /TeX-OT1IT-
0 def
1997 1 begincodespacerange
2055 CMapName currentdict /CMap defineresource pop
2061 \expandafter\edef\csname cmapOT1IT
\endcsname#1{%
2062 \pdffontattr#1{/ToUnicode
\the\pdflastobj\space 0 R
}%
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)
2075 /CIDInit /ProcSet findresource begin
2083 /CMapName /TeX-OT1TT-
0 def
2085 1 begincodespacerange
2130 CMapName currentdict /CMap defineresource pop
2136 \expandafter\edef\csname cmapOT1TT
\endcsname#1{%
2137 \pdffontattr#1{/ToUnicode
\the\pdflastobj\space 0 R
}%
2142 % Set the font macro #1 to the font named \fontprefix#2.
2143 % #3 is the font's design size, #4 is a scale factor, #5 is the CMap
2144 % encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit).
2152 \def\setfont#1#2#3#4#5{%
2153 \font#1=
\fontprefix#2#3 scaled
#4
2154 \csname cmap
#5\endcsname#1%
2156 % This is what gets called when #5 of \setfont is empty.
2161 % Use cm as the default font prefix.
2162 % To specify the font prefix, you must define \fontprefix
2163 % before you read in texinfo.tex.
2164 \ifx\fontprefix\thisisundefined
2167 % Support font families that don't use the same naming scheme as CM.
2169 \def\rmbshape{bx
} % where the normal face is bold
2174 \def\ttslshape{sltt
}
2184 % Definitions for a main text size of 11pt. (The default in Texinfo.)
2186 \def\definetextfontsizexi{%
2187 % Text fonts (11.2pt, magstep1).
2188 \def\textnominalsize{11pt
}
2189 \edef\mainmagstep{\magstephalf}
2190 \setfont\textrm\rmshape{10}{\mainmagstep}{OT1
}
2191 \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT
}
2192 \setfont\textbf\bfshape{10}{\mainmagstep}{OT1
}
2193 \setfont\textit\itshape{10}{\mainmagstep}{OT1IT
}
2194 \setfont\textsl\slshape{10}{\mainmagstep}{OT1
}
2195 \setfont\textsf\sfshape{10}{\mainmagstep}{OT1
}
2196 \setfont\textsc\scshape{10}{\mainmagstep}{OT1
}
2197 \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT
}
2198 \font\texti=cmmi10 scaled
\mainmagstep
2199 \font\textsy=cmsy10 scaled
\mainmagstep
2200 \def\textecsize{1095}
2202 % A few fonts for @defun names and args.
2203 \setfont\defbf\bfshape{10}{\magstep1}{OT1
}
2204 \setfont\deftt\ttshape{10}{\magstep1}{OT1TT
}
2205 \setfont\defsl\slshape{10}{\magstep1}{OT1TT
}
2206 \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT
}
2207 \def\df{\let\ttfont=
\deftt \let\bffont =
\defbf
2208 \let\ttslfont=
\defttsl \let\slfont=
\defsl \bf}
2210 % Fonts for indices, footnotes, small examples (9pt).
2211 \def\smallnominalsize{9pt
}
2212 \setfont\smallrm\rmshape{9}{1000}{OT1
}
2213 \setfont\smalltt\ttshape{9}{1000}{OT1TT
}
2214 \setfont\smallbf\bfshape{10}{900}{OT1
}
2215 \setfont\smallit\itshape{9}{1000}{OT1IT
}
2216 \setfont\smallsl\slshape{9}{1000}{OT1
}
2217 \setfont\smallsf\sfshape{9}{1000}{OT1
}
2218 \setfont\smallsc\scshape{10}{900}{OT1
}
2219 \setfont\smallttsl\ttslshape{10}{900}{OT1TT
}
2222 \def\smallecsize{0900}
2224 % Fonts for small examples (8pt).
2225 \def\smallernominalsize{8pt
}
2226 \setfont\smallerrm\rmshape{8}{1000}{OT1
}
2227 \setfont\smallertt\ttshape{8}{1000}{OT1TT
}
2228 \setfont\smallerbf\bfshape{10}{800}{OT1
}
2229 \setfont\smallerit\itshape{8}{1000}{OT1IT
}
2230 \setfont\smallersl\slshape{8}{1000}{OT1
}
2231 \setfont\smallersf\sfshape{8}{1000}{OT1
}
2232 \setfont\smallersc\scshape{10}{800}{OT1
}
2233 \setfont\smallerttsl\ttslshape{10}{800}{OT1TT
}
2234 \font\smalleri=cmmi8
2235 \font\smallersy=cmsy8
2236 \def\smallerecsize{0800}
2238 % Fonts for title page (20.4pt):
2239 \def\titlenominalsize{20pt
}
2240 \setfont\titlerm\rmbshape{12}{\magstep3}{OT1
}
2241 \setfont\titleit\itbshape{10}{\magstep4}{OT1IT
}
2242 \setfont\titlesl\slbshape{10}{\magstep4}{OT1
}
2243 \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT
}
2244 \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT
}
2245 \setfont\titlesf\sfbshape{17}{\magstep1}{OT1
}
2246 \let\titlebf=
\titlerm
2247 \setfont\titlesc\scbshape{10}{\magstep4}{OT1
}
2248 \font\titlei=cmmi12 scaled
\magstep3
2249 \font\titlesy=cmsy10 scaled
\magstep4
2250 \def\titleecsize{2074}
2252 % Chapter (and unnumbered) fonts (17.28pt).
2253 \def\chapnominalsize{17pt
}
2254 \setfont\chaprm\rmbshape{12}{\magstep2}{OT1
}
2255 \setfont\chapit\itbshape{10}{\magstep3}{OT1IT
}
2256 \setfont\chapsl\slbshape{10}{\magstep3}{OT1
}
2257 \setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT
}
2258 \setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT
}
2259 \setfont\chapsf\sfbshape{17}{1000}{OT1
}
2261 \setfont\chapsc\scbshape{10}{\magstep3}{OT1
}
2262 \font\chapi=cmmi12 scaled
\magstep2
2263 \font\chapsy=cmsy10 scaled
\magstep3
2264 \def\chapecsize{1728}
2266 % Section fonts (14.4pt).
2267 \def\secnominalsize{14pt
}
2268 \setfont\secrm\rmbshape{12}{\magstep1}{OT1
}
2269 \setfont\secrmnotbold\rmshape{12}{\magstep1}{OT1
}
2270 \setfont\secit\itbshape{10}{\magstep2}{OT1IT
}
2271 \setfont\secsl\slbshape{10}{\magstep2}{OT1
}
2272 \setfont\sectt\ttbshape{12}{\magstep1}{OT1TT
}
2273 \setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT
}
2274 \setfont\secsf\sfbshape{12}{\magstep1}{OT1
}
2276 \setfont\secsc\scbshape{10}{\magstep2}{OT1
}
2277 \font\seci=cmmi12 scaled
\magstep1
2278 \font\secsy=cmsy10 scaled
\magstep2
2279 \def\sececsize{1440}
2281 % Subsection fonts (13.15pt).
2282 \def\ssecnominalsize{13pt
}
2283 \setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1
}
2284 \setfont\ssecit\itbshape{10}{1315}{OT1IT
}
2285 \setfont\ssecsl\slbshape{10}{1315}{OT1
}
2286 \setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT
}
2287 \setfont\ssecttsl\ttslshape{10}{1315}{OT1TT
}
2288 \setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1
}
2290 \setfont\ssecsc\scbshape{10}{1315}{OT1
}
2291 \font\sseci=cmmi12 scaled
\magstephalf
2292 \font\ssecsy=cmsy10 scaled
1315
2293 \def\ssececsize{1200}
2295 % Reduced fonts for @acronym in text (10pt).
2296 \def\reducednominalsize{10pt
}
2297 \setfont\reducedrm\rmshape{10}{1000}{OT1
}
2298 \setfont\reducedtt\ttshape{10}{1000}{OT1TT
}
2299 \setfont\reducedbf\bfshape{10}{1000}{OT1
}
2300 \setfont\reducedit\itshape{10}{1000}{OT1IT
}
2301 \setfont\reducedsl\slshape{10}{1000}{OT1
}
2302 \setfont\reducedsf\sfshape{10}{1000}{OT1
}
2303 \setfont\reducedsc\scshape{10}{1000}{OT1
}
2304 \setfont\reducedttsl\ttslshape{10}{1000}{OT1TT
}
2305 \font\reducedi=cmmi10
2306 \font\reducedsy=cmsy10
2307 \def\reducedecsize{1000}
2309 \textleading =
13.2pt
% line spacing for 11pt CM
2310 \textfonts % reset the current fonts
2312 } % end of 11pt text font size definitions, \definetextfontsizexi
2315 % Definitions to make the main text be 10pt Computer Modern, with
2316 % section, chapter, etc., sizes following suit. This is for the GNU
2317 % Press printing of the Emacs 22 manual. Maybe other manuals in the
2318 % future. Used with @smallbook, which sets the leading to 12pt.
2320 \def\definetextfontsizex{%
2321 % Text fonts (10pt).
2322 \def\textnominalsize{10pt
}
2323 \edef\mainmagstep{1000}
2324 \setfont\textrm\rmshape{10}{\mainmagstep}{OT1
}
2325 \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT
}
2326 \setfont\textbf\bfshape{10}{\mainmagstep}{OT1
}
2327 \setfont\textit\itshape{10}{\mainmagstep}{OT1IT
}
2328 \setfont\textsl\slshape{10}{\mainmagstep}{OT1
}
2329 \setfont\textsf\sfshape{10}{\mainmagstep}{OT1
}
2330 \setfont\textsc\scshape{10}{\mainmagstep}{OT1
}
2331 \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT
}
2332 \font\texti=cmmi10 scaled
\mainmagstep
2333 \font\textsy=cmsy10 scaled
\mainmagstep
2334 \def\textecsize{1000}
2336 % A few fonts for @defun names and args.
2337 \setfont\defbf\bfshape{10}{\magstephalf}{OT1
}
2338 \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT
}
2339 \setfont\defsl\slshape{10}{\magstephalf}{OT1TT
}
2340 \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT
}
2341 \def\df{\let\ttfont=
\deftt \let\bffont =
\defbf
2342 \let\slfont=
\defsl \let\ttslfont=
\defttsl \bf}
2344 % Fonts for indices, footnotes, small examples (9pt).
2345 \def\smallnominalsize{9pt
}
2346 \setfont\smallrm\rmshape{9}{1000}{OT1
}
2347 \setfont\smalltt\ttshape{9}{1000}{OT1TT
}
2348 \setfont\smallbf\bfshape{10}{900}{OT1
}
2349 \setfont\smallit\itshape{9}{1000}{OT1IT
}
2350 \setfont\smallsl\slshape{9}{1000}{OT1
}
2351 \setfont\smallsf\sfshape{9}{1000}{OT1
}
2352 \setfont\smallsc\scshape{10}{900}{OT1
}
2353 \setfont\smallttsl\ttslshape{10}{900}{OT1TT
}
2356 \def\smallecsize{0900}
2358 % Fonts for small examples (8pt).
2359 \def\smallernominalsize{8pt
}
2360 \setfont\smallerrm\rmshape{8}{1000}{OT1
}
2361 \setfont\smallertt\ttshape{8}{1000}{OT1TT
}
2362 \setfont\smallerbf\bfshape{10}{800}{OT1
}
2363 \setfont\smallerit\itshape{8}{1000}{OT1IT
}
2364 \setfont\smallersl\slshape{8}{1000}{OT1
}
2365 \setfont\smallersf\sfshape{8}{1000}{OT1
}
2366 \setfont\smallersc\scshape{10}{800}{OT1
}
2367 \setfont\smallerttsl\ttslshape{10}{800}{OT1TT
}
2368 \font\smalleri=cmmi8
2369 \font\smallersy=cmsy8
2370 \def\smallerecsize{0800}
2372 % Fonts for title page (20.4pt):
2373 \def\titlenominalsize{20pt
}
2374 \setfont\titlerm\rmbshape{12}{\magstep3}{OT1
}
2375 \setfont\titleit\itbshape{10}{\magstep4}{OT1IT
}
2376 \setfont\titlesl\slbshape{10}{\magstep4}{OT1
}
2377 \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT
}
2378 \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT
}
2379 \setfont\titlesf\sfbshape{17}{\magstep1}{OT1
}
2380 \let\titlebf=
\titlerm
2381 \setfont\titlesc\scbshape{10}{\magstep4}{OT1
}
2382 \font\titlei=cmmi12 scaled
\magstep3
2383 \font\titlesy=cmsy10 scaled
\magstep4
2384 \def\titleecsize{2074}
2386 % Chapter fonts (14.4pt).
2387 \def\chapnominalsize{14pt
}
2388 \setfont\chaprm\rmbshape{12}{\magstep1}{OT1
}
2389 \setfont\chapit\itbshape{10}{\magstep2}{OT1IT
}
2390 \setfont\chapsl\slbshape{10}{\magstep2}{OT1
}
2391 \setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT
}
2392 \setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT
}
2393 \setfont\chapsf\sfbshape{12}{\magstep1}{OT1
}
2395 \setfont\chapsc\scbshape{10}{\magstep2}{OT1
}
2396 \font\chapi=cmmi12 scaled
\magstep1
2397 \font\chapsy=cmsy10 scaled
\magstep2
2398 \def\chapecsize{1440}
2400 % Section fonts (12pt).
2401 \def\secnominalsize{12pt
}
2402 \setfont\secrm\rmbshape{12}{1000}{OT1
}
2403 \setfont\secit\itbshape{10}{\magstep1}{OT1IT
}
2404 \setfont\secsl\slbshape{10}{\magstep1}{OT1
}
2405 \setfont\sectt\ttbshape{12}{1000}{OT1TT
}
2406 \setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT
}
2407 \setfont\secsf\sfbshape{12}{1000}{OT1
}
2409 \setfont\secsc\scbshape{10}{\magstep1}{OT1
}
2411 \font\secsy=cmsy10 scaled
\magstep1
2412 \def\sececsize{1200}
2414 % Subsection fonts (10pt).
2415 \def\ssecnominalsize{10pt
}
2416 \setfont\ssecrm\rmbshape{10}{1000}{OT1
}
2417 \setfont\ssecit\itbshape{10}{1000}{OT1IT
}
2418 \setfont\ssecsl\slbshape{10}{1000}{OT1
}
2419 \setfont\ssectt\ttbshape{10}{1000}{OT1TT
}
2420 \setfont\ssecttsl\ttslshape{10}{1000}{OT1TT
}
2421 \setfont\ssecsf\sfbshape{10}{1000}{OT1
}
2423 \setfont\ssecsc\scbshape{10}{1000}{OT1
}
2426 \def\ssececsize{1000}
2428 % Reduced fonts for @acronym in text (9pt).
2429 \def\reducednominalsize{9pt
}
2430 \setfont\reducedrm\rmshape{9}{1000}{OT1
}
2431 \setfont\reducedtt\ttshape{9}{1000}{OT1TT
}
2432 \setfont\reducedbf\bfshape{10}{900}{OT1
}
2433 \setfont\reducedit\itshape{9}{1000}{OT1IT
}
2434 \setfont\reducedsl\slshape{9}{1000}{OT1
}
2435 \setfont\reducedsf\sfshape{9}{1000}{OT1
}
2436 \setfont\reducedsc\scshape{10}{900}{OT1
}
2437 \setfont\reducedttsl\ttslshape{10}{900}{OT1TT
}
2438 \font\reducedi=cmmi9
2439 \font\reducedsy=cmsy9
2440 \def\reducedecsize{0900}
2442 \divide\parskip by
2 % reduce space between paragraphs
2443 \textleading =
12pt
% line spacing for 10pt CM
2444 \textfonts % reset the current fonts
2446 } % end of 10pt text font size definitions, \definetextfontsizex
2448 % Fonts for short table of contents.
2449 \setfont\shortcontrm\rmshape{12}{1000}{OT1
}
2450 \setfont\shortcontbf\bfshape{10}{\magstep1}{OT1
} % no cmb12
2451 \setfont\shortcontsl\slshape{12}{1000}{OT1
}
2452 \setfont\shortconttt\ttshape{12}{1000}{OT1TT
}
2455 % We provide the user-level command
2457 % (or 11) to redefine the text font size. pt is assumed.
2463 \parseargdef\fonttextsize{%
2464 \def\textsizearg{#1}%
2465 %\wlog{doing @fonttextsize \textsizearg}%
2467 % Set \globaldefs so that documents can use this inside @tex, since
2468 % makeinfo 4.8 does not support it, but we need it nonetheless.
2470 \begingroup \globaldefs=
1
2471 \ifx\textsizearg\xword \definetextfontsizex
2472 \else \ifx\textsizearg\xiword \definetextfontsizexi
2475 \errmessage{@fonttextsize only supports `
10' or `
11', not `
\textsizearg'
}
2481 % Change the current font style to #1, remembering it in \curfontstyle.
2482 % For now, we do not accumulate font styles: @b{@i{foo}} prints foo in
2483 % italics, not bold italics.
2485 \def\setfontstyle#1{%
2486 \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd.
2487 \csname #1font
\endcsname % change the current font
2490 \def\rm{\fam=
0 \setfontstyle{rm
}}
2491 \def\it{\fam=
\itfam \setfontstyle{it
}}
2492 \def\sl{\fam=
\slfam \setfontstyle{sl
}}
2493 \def\bf{\fam=
\bffam \setfontstyle{bf
}}\def\bfstylename{bf
}
2494 \def\tt{\fam=
\ttfam \setfontstyle{tt
}}
2496 % Texinfo sort of supports the sans serif font style, which plain TeX does not.
2497 % So we set up a \sf.
2499 \def\sf{\fam=
\sffam \setfontstyle{sf
}}
2501 % We don't need math for this font style.
2502 \def\ttsl{\setfontstyle{ttsl
}}
2505 % In order for the font changes to affect most math symbols and letters,
2506 % we have to define the \textfont of the standard families. We don't
2507 % bother to reset \scriptfont and \scriptscriptfont; awaiting user need.
2509 \def\resetmathfonts{%
2510 \textfont0=
\rmfont \textfont1=
\ifont \textfont2=
\syfont
2511 \textfont\itfam=
\itfont \textfont\slfam=
\slfont \textfont\bffam=
\bffont
2512 \textfont\ttfam=
\ttfont \textfont\sffam=
\sffont
2517 % The font-changing commands (all called \...fonts) redefine the meanings
2518 % of \STYLEfont, instead of just \STYLE. We do this because \STYLE needs
2519 % to also set the current \fam for math mode. Our \STYLE (e.g., \rm)
2520 % commands hardwire \STYLEfont to set the current font.
2522 % Each font-changing command also sets the names \lsize (one size lower)
2523 % and \lllsize (three sizes lower). These relative commands are used
2524 % in, e.g., the LaTeX logo and acronyms.
2526 % This all needs generalizing, badly.
2529 \def\assignfonts#1{%
2530 \expandafter\let\expandafter\rmfont\csname #1rm
\endcsname
2531 \expandafter\let\expandafter\itfont\csname #1it
\endcsname
2532 \expandafter\let\expandafter\slfont\csname #1sl
\endcsname
2533 \expandafter\let\expandafter\bffont\csname #1bf
\endcsname
2534 \expandafter\let\expandafter\ttfont\csname #1tt
\endcsname
2535 \expandafter\let\expandafter\smallcaps\csname #1sc
\endcsname
2536 \expandafter\let\expandafter\sffont \csname #1sf
\endcsname
2537 \expandafter\let\expandafter\ifont \csname #1i
\endcsname
2538 \expandafter\let\expandafter\syfont \csname #1sy
\endcsname
2539 \expandafter\let\expandafter\ttslfont\csname #1ttsl
\endcsname
2544 % Select smaller font size with the current style. Used to change font size
2545 % in, e.g., the LaTeX logo and acronyms. If we are using bold fonts for
2546 % normal roman text, also use bold fonts for roman text in the smaller size.
2547 \def\switchtolllsize{%
2548 \expandafter\assignfonts\expandafter{\lllsize}%
2552 \csname\curfontstyle\endcsname
2555 \def\switchtolsize{%
2556 \expandafter\assignfonts\expandafter{\lsize}%
2560 \csname\curfontstyle\endcsname
2563 \def\definefontsetatsize#1#2#3#4#5{%
2564 \expandafter\def\csname #1fonts
\endcsname{%
2565 \def\curfontsize{#1}%
2566 \def\lsize{#2}\def\lllsize{#3}%
2567 \csname rmisbold
#5\endcsname
2573 \definefontsetatsize{text
} {reduced
}{smaller
}{\textleading}{false
}
2574 \definefontsetatsize{title
} {chap
} {subsec
} {27pt
} {true
}
2575 \definefontsetatsize{chap
} {sec
} {text
} {19pt
} {true
}
2576 \definefontsetatsize{sec
} {subsec
} {reduced
}{17pt
} {true
}
2577 \definefontsetatsize{ssec
} {text
} {small
} {15pt
} {true
}
2578 \definefontsetatsize{reduced
}{small
} {smaller
}{10.5pt
}{false
}
2579 \definefontsetatsize{small
} {smaller
}{smaller
}{10.5pt
}{false
}
2580 \definefontsetatsize{smaller
}{smaller
}{smaller
}{9.5pt
} {false
}
2582 \def\titlefont#1{{\titlefonts\rm #1}}
2583 \let\subsecfonts =
\ssecfonts
2584 \let\subsubsecfonts =
\ssecfonts
2586 % Define these just so they can be easily changed for other fonts.
2587 \def\angleleft{$
\langle$
}
2588 \def\angleright{$
\rangle$
}
2590 % Set the fonts to use with the @small... environments.
2591 \let\smallexamplefonts =
\smallfonts
2593 % About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample
2594 % can fit this many characters:
2595 % 8.5x11=86 smallbook=72 a4=90 a5=69
2596 % If we use \scriptfonts (8pt), then we can fit this many characters:
2597 % 8.5x11=90+ smallbook=80 a4=90+ a5=77
2598 % For me, subjectively, the few extra characters that fit aren't worth
2599 % the additional smallness of 8pt. So I'm making the default 9pt.
2601 % By the way, for comparison, here's what fits with @example (10pt):
2602 % 8.5x11=71 smallbook=60 a4=75 a5=58
2605 % Set up the default fonts, so we can use them for creating boxes.
2607 \definetextfontsizexi
2612 % Check if we are currently using a typewriter font. Since all the
2613 % Computer Modern typewriter fonts have zero interword stretch (and
2614 % shrink), and it is reasonable to expect all typewriter fonts to have
2615 % this property, we can check that font parameter.
2617 \def\ifmonospace{\ifdim\fontdimen3\font=
0pt
}
2619 % Markup style infrastructure. \defmarkupstylesetup\INITMACRO will
2620 % define and register \INITMACRO to be called on markup style changes.
2621 % \INITMACRO can check \currentmarkupstyle for the innermost
2622 % style and the set of \ifmarkupSTYLE switches for all styles
2623 % currently in effect.
2627 %\newif\ifmarkupfile % @file == @samp.
2628 %\newif\ifmarkupoption % @option == @samp.
2631 %\newif\ifmarkupenv % @env == @code.
2632 %\newif\ifmarkupcommand % @command == @code.
2633 \newif\ifmarkuptex % @tex (and part of @math, for now).
2634 \newif\ifmarkupexample
2636 \newif\ifmarkupverbatim
2638 \let\currentmarkupstyle\empty
2640 \def\setupmarkupstyle#1{%
2641 \csname markup
#1true
\endcsname
2642 \def\currentmarkupstyle{#1}%
2646 \let\markupstylesetup\empty
2648 \def\defmarkupstylesetup#1{%
2649 \expandafter\def\expandafter\markupstylesetup
2650 \expandafter{\markupstylesetup #1}%
2654 % Markup style setup for left and right quotes.
2655 \defmarkupstylesetup\markupsetuplq{%
2656 \expandafter\let\expandafter \temp
2657 \csname markupsetuplq
\currentmarkupstyle\endcsname
2658 \ifx\temp\relax \markupsetuplqdefault \else \temp \fi
2661 \defmarkupstylesetup\markupsetuprq{%
2662 \expandafter\let\expandafter \temp
2663 \csname markupsetuprq
\currentmarkupstyle\endcsname
2664 \ifx\temp\relax \markupsetuprqdefault \else \temp \fi
2671 \gdef\markupsetuplqdefault{\let`
\lq}
2672 \gdef\markupsetuprqdefault{\let'
\rq}
2674 \gdef\markupsetcodequoteleft{\let`
\codequoteleft}
2675 \gdef\markupsetcodequoteright{\let'
\codequoteright}
2678 \let\markupsetuplqcode \markupsetcodequoteleft
2679 \let\markupsetuprqcode \markupsetcodequoteright
2681 \let\markupsetuplqexample \markupsetcodequoteleft
2682 \let\markupsetuprqexample \markupsetcodequoteright
2684 \let\markupsetuplqkbd \markupsetcodequoteleft
2685 \let\markupsetuprqkbd \markupsetcodequoteright
2687 \let\markupsetuplqsamp \markupsetcodequoteleft
2688 \let\markupsetuprqsamp \markupsetcodequoteright
2690 \let\markupsetuplqverb \markupsetcodequoteleft
2691 \let\markupsetuprqverb \markupsetcodequoteright
2693 \let\markupsetuplqverbatim \markupsetcodequoteleft
2694 \let\markupsetuprqverbatim \markupsetcodequoteright
2696 % Allow an option to not use regular directed right quote/apostrophe
2697 % (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
2698 % The undirected quote is ugly, so don't make it the default, but it
2699 % works for pasting with more pdf viewers (at least evince), the
2700 % lilypond developers report. xpdf does work with the regular 0x27.
2702 \def\codequoteright{%
2703 \expandafter\ifx\csname SETtxicodequoteundirected
\endcsname\relax
2704 \expandafter\ifx\csname SETcodequoteundirected
\endcsname\relax
2710 % and a similar option for the left quote char vs. a grave accent.
2711 % Modern fonts display ASCII 0x60 as a grave accent, so some people like
2712 % the code environments to do likewise.
2714 \def\codequoteleft{%
2715 \expandafter\ifx\csname SETtxicodequotebacktick
\endcsname\relax
2716 \expandafter\ifx\csname SETcodequotebacktick
\endcsname\relax
2717 % [Knuth] pp. 380,381,391
2718 % \relax disables Spanish ligatures ?` and !` of \tt font.
2724 % Commands to set the quote options.
2726 \parseargdef\codequoteundirected{%
2729 \expandafter\let\csname SETtxicodequoteundirected
\endcsname
2731 \else\ifx\temp\offword
2732 \expandafter\let\csname SETtxicodequoteundirected
\endcsname
2735 \errhelp =
\EMsimple
2736 \errmessage{Unknown @codequoteundirected value `
\temp', must be on|off
}%
2740 \parseargdef\codequotebacktick{%
2743 \expandafter\let\csname SETtxicodequotebacktick
\endcsname
2745 \else\ifx\temp\offword
2746 \expandafter\let\csname SETtxicodequotebacktick
\endcsname
2749 \errhelp =
\EMsimple
2750 \errmessage{Unknown @codequotebacktick value `
\temp', must be on|off
}%
2754 % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
2755 \def\noligaturesquoteleft{\relax\lq}
2757 % Count depth in font-changes, for error checks
2758 \newcount\fontdepth \fontdepth=
0
2762 % #1 is the font command (\sl or \it), #2 is the text to slant.
2763 % If we are in a monospaced environment, however, 1) always use \ttsl,
2764 % and 2) do not add an italic correction.
2765 \def\dosmartslant#1#2{%
2767 {{\ttsl #2}\let\next=
\relax}%
2768 {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}%
2771 \def\smartslanted{\dosmartslant\sl}
2772 \def\smartitalic{\dosmartslant\it}
2774 % Output an italic correction unless \next (presumed to be the following
2775 % character) is such as not to need one.
2776 \def\smartitaliccorrection{%
2781 \else\ifx\next\comma%
2787 % Unconditional use \ttsl, and no ic. @var is set to this for defuns.
2788 \def\ttslanted#1{{\ttsl #1}}
2790 % @cite is like \smartslanted except unconditionally use \sl. We never want
2791 % ttsl for book titles, do we?
2792 \def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection}
2796 \let\saveaftersmartic =
\aftersmartic
2797 \def\aftersmartic{\null\let\aftersmartic=
\saveaftersmartic}%
2802 \let\slanted=
\smartslanted
2803 \let\dfn=
\smartslanted
2804 \let\emph=
\smartitalic
2806 % Explicit font changes: @r, @sc, undocumented @ii.
2807 \def\r#1{{\rm #1}} % roman font
2808 \def\sc#1{{\smallcaps#1}} % smallcaps font
2809 \def\ii#1{{\it #1}} % italic font
2811 % @b, explicit bold. Also @strong.
2815 % @sansserif, explicit sans.
2816 \def\sansserif#1{{\sf #1}}
2818 % We can't just use \exhyphenpenalty, because that only has effect at
2819 % the end of a paragraph. Restore normal hyphenation at the end of the
2820 % group within which \nohyphenation is presumably called.
2822 \def\nohyphenation{\hyphenchar\font = -
1 \aftergroup\restorehyphenation}
2823 \def\restorehyphenation{\hyphenchar\font = `-
}
2825 % Set sfcode to normal for the chars that usually have another value.
2826 % Can't use plain's \frenchspacing because it uses the `\x notation, and
2827 % sometimes \x has an active definition that messes things up.
2830 \def\plainfrenchspacing{%
2831 \sfcode`\.=\@m
\sfcode`\?=\@m
\sfcode`\!=\@m
2832 \sfcode`\:=\@m
\sfcode`\;=\@m
\sfcode`\,=\@m
2833 \def\endofsentencespacefactor{1000}% for @. and friends
2835 \def\plainnonfrenchspacing{%
2836 \sfcode`\
.3000\sfcode`\?
3000\sfcode`\!
3000
2837 \sfcode`\:
2000\sfcode`\;
1500\sfcode`\,
1250
2838 \def\endofsentencespacefactor{3000}% for @. and friends
2841 \def\endofsentencespacefactor{3000}% default
2843 % @t, explicit typewriter.
2845 {\tt \rawbackslash \plainfrenchspacing #1}%
2850 \def\samp#1{{\setupmarkupstyle{samp
}\lq\tclose{#1}\rq\null}}
2852 % @indicateurl is \samp, that is, with quotes.
2853 \let\indicateurl=
\samp
2855 % @code (and similar) prints in typewriter, but with spaces the same
2856 % size as normal in the surrounding text, without hyphenation, etc.
2857 % This is a subroutine for that.
2860 % Change normal interword space to be same as for the current font.
2861 \spaceskip =
\fontdimen2\font
2863 % Switch to typewriter.
2866 % But `\ ' produces the large typewriter interword space.
2867 \def\
{{\spaceskip =
0pt
{} }}%
2869 % Turn off hyphenation.
2876 \null % reset spacefactor to 1000
2879 % We *must* turn on hyphenation at `-' and `_' in @code.
2880 % (But see \codedashfinish below.)
2881 % Otherwise, it is too hard to avoid overfull hboxes
2882 % in the Emacs manual, the Library manual, etc.
2884 % Unfortunately, TeX uses one parameter (\hyphenchar) to control
2885 % both hyphenation at - and hyphenation within words.
2886 % We must therefore turn them both off (\tclose does that)
2887 % and arrange explicitly to hyphenate at a dash. -- rms.
2889 \catcode`\-=
\active \catcode`
\_=
\active
2890 \catcode`\'=
\active \catcode`\`=
\active
2891 \global\let'=
\rq \global\let`=
\lq % default definitions
2893 \global\def\code{\begingroup
2894 \setupmarkupstyle{code
}%
2895 % The following should really be moved into \setupmarkupstyle handlers.
2896 \catcode\dashChar=
\active \catcode\underChar=
\active
2904 % Given -foo (with a single dash), we do not want to allow a break
2906 \global\let\codedashprev=
\codedash
2911 \gdef\codedash{\futurelet\next\codedashfinish}
2912 \gdef\codedashfinish{%
2913 \normaldash % always output the dash character itself.
2915 % Now, output a discretionary to allow a line break, unless
2916 % (a) the next character is a -, or
2917 % (b) the preceding character is a -.
2918 % E.g., given --posix, we do not want to allow a break after either -.
2919 % Given --foo-bar, we do want to allow a break between the - and the b.
2920 \ifx\next\codedash \else
2921 \ifx\codedashprev\codedash
2922 \else \discretionary{}{}{}\fi
2924 % we need the space after the = for the case when \next itself is a
2925 % space token; it would get swallowed otherwise. As in @code{- a}.
2926 \global\let\codedashprev=
\next
2931 \def\codex #1{\tclose{#1}\endgroup}
2934 % this is all so @math{@code{var_name}+1} can work. In math mode, _
2935 % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
2936 % will therefore expand the active definition of _, which is us
2937 % (inside @code that is), therefore an endless loop.
2939 \mathchar"
075F
% class 0=ordinary, family 7=ttfam, pos 0x5F=_.
2940 \else\normalunderscore \fi
2941 \discretionary{}{}{}}%
2945 % An additional complication: the above will allow breaks after, e.g.,
2946 % each of the four underscores in __typeof__. This is bad.
2947 % @allowcodebreaks provides a document-level way to turn breaking at -
2950 \newif\ifallowcodebreaks \allowcodebreakstrue
2952 \def\keywordtrue{true
}
2953 \def\keywordfalse{false
}
2955 \parseargdef\allowcodebreaks{%
2957 \ifx\txiarg\keywordtrue
2958 \allowcodebreakstrue
2959 \else\ifx\txiarg\keywordfalse
2960 \allowcodebreaksfalse
2962 \errhelp =
\EMsimple
2963 \errmessage{Unknown @allowcodebreaks option `
\txiarg', must be true|false
}%
2967 % For @command, @env, @file, @option quotes seem unnecessary,
2968 % so use \code rather than \samp.
2974 % @uref (abbreviation for `urlref') aka @url takes an optional
2975 % (comma-separated) second argument specifying the text to display and
2976 % an optional third arg as text to display instead of (rather than in
2977 % addition to) the url itself. First (mandatory) arg is the url.
2979 % TeX-only option to allow changing PDF output to show only the second
2980 % arg (if given), and not the url (which is then just the link target).
2981 \newif\ifurefurlonlylink
2983 % The main macro is \urefbreak, which allows breaking at expected
2984 % places within the url. (There used to be another version, which
2985 % didn't support automatic breaking.)
2986 \def\urefbreak{\begingroup \urefcatcodes \dourefbreak}
2987 \let\uref=
\urefbreak
2989 \def\dourefbreak#1{\urefbreakfinish #1,,,
\finish}
2990 \def\urefbreakfinish#1,
#2,
#3,
#4\finish{% doesn't work in @example
2993 \setbox0 =
\hbox{\ignorespaces #3}%
2995 \unhbox0 % third arg given, show only that
2997 \setbox0 =
\hbox{\ignorespaces #2}% look for second arg
3000 % For pdfTeX and LuaTeX
3002 % PDF plus option to not display url, show just arg
3005 % PDF, normally display both arg and url for consistency,
3006 % visibility, if the pdf is eventually used to print, etc.
3007 \unhbox0\ (
\urefcode{#1})
%
3010 \ifx\XeTeXrevision\thisisundefined
3011 \unhbox0\ (
\urefcode{#1})
% DVI, always show arg and url
3015 % PDF plus option to not display url, show just arg
3018 % PDF, normally display both arg and url for consistency,
3019 % visibility, if the pdf is eventually used to print, etc.
3020 \unhbox0\ (
\urefcode{#1})
%
3025 \urefcode{#1}% only url given, so show it
3031 % Allow line breaks around only a few characters (only).
3033 \catcode`\&=
\active \catcode`\.=
\active
3034 \catcode`\#=
\active \catcode`\?=
\active
3040 \global\def\urefcode{\begingroup
3041 \setupmarkupstyle{code
}%
3051 % By default, they are just regular characters.
3052 \global\def&
{\normalamp}
3053 \global\def.
{\normaldot}
3054 \global\def#
{\normalhash}
3055 \global\def?
{\normalquest}
3056 \global\def/
{\normalslash}
3059 % we put a little stretch before and after the breakable chars, to help
3060 % line breaking of long url's. The unequal skips make look better in
3061 % cmtt at least, especially for dots.
3062 \def\urefprestretchamount{.13em
}
3063 \def\urefpoststretchamount{.1em
}
3064 \def\urefprestretch{\urefprebreak \hskip0pt plus
\urefprestretchamount\relax}
3065 \def\urefpoststretch{\urefpostbreak \hskip0pt plus
\urefprestretchamount\relax}
3067 \def\urefcodeamp{\urefprestretch \&
\urefpoststretch}
3068 \def\urefcodedot{\urefprestretch .
\urefpoststretch}
3069 \def\urefcodehash{\urefprestretch \#
\urefpoststretch}
3070 \def\urefcodequest{\urefprestretch ?
\urefpoststretch}
3071 \def\urefcodeslash{\futurelet\next\urefcodeslashfinish}
3074 \global\def\urefcodeslashfinish{%
3075 \urefprestretch \slashChar
3076 % Allow line break only after the final / in a sequence of
3077 % slashes, to avoid line break between the slashes in http://.
3078 \ifx\next/
\else \urefpoststretch \fi
3082 % One more complication: by default we'll break after the special
3083 % characters, but some people like to break before the special chars, so
3084 % allow that. Also allow no breaking at all, for manual control.
3086 \parseargdef\urefbreakstyle{%
3088 \ifx\txiarg\wordnone
3089 \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak}
3090 \else\ifx\txiarg\wordbefore
3091 \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak}
3092 \else\ifx\txiarg\wordafter
3093 \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak}
3095 \errhelp =
\EMsimple
3096 \errmessage{Unknown @urefbreakstyle setting `
\txiarg'
}%
3099 \def\wordafter{after
}
3100 \def\wordbefore{before
}
3103 \urefbreakstyle after
3105 % @url synonym for @uref, since that's how everyone uses it.
3109 % rms does not like angle brackets --karl, 17may97.
3110 % So now @email is just like @uref, unless we are pdf.
3112 %\def\email#1{\angleleft{\tt #1}\angleright}
3114 \def\email#1{\doemail#1,,
\finish}
3115 \def\doemail#1,
#2,
#3\finish{\begingroup
3118 \setbox0 =
\hbox{\ignorespaces #2}%
3119 \ifdim\wd0>
0pt
\unhbox0\else\code{#1}\fi
3123 \ifx\XeTeXrevision\thisisundefined
3126 \def\email#1{\doemail#1,,
\finish}
3127 \def\doemail#1,
#2,
#3\finish{\begingroup
3130 \setbox0 =
\hbox{\ignorespaces #2}%
3131 \ifdim\wd0>
0pt
\unhbox0\else\code{#1}\fi
3137 % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
3138 % `example' (@kbd uses ttsl only inside of @example and friends),
3139 % or `code' (@kbd uses normal tty font always).
3140 \parseargdef\kbdinputstyle{%
3142 \ifx\txiarg\worddistinct
3143 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
3144 \else\ifx\txiarg\wordexample
3145 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
3146 \else\ifx\txiarg\wordcode
3147 \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
3149 \errhelp =
\EMsimple
3150 \errmessage{Unknown @kbdinputstyle setting `
\txiarg'
}%
3153 \def\worddistinct{distinct
}
3154 \def\wordexample{example
}
3157 % Default is `distinct'.
3158 \kbdinputstyle distinct
3160 % @kbd is like @code, except that if the argument is just one @key command,
3161 % then @kbd has no effect.
3162 \def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??
\par}}
3165 \def\kbdsub#1#2#3\par{%
3166 \def\one{#1}\def\three{#3}\def\threex{??
}%
3167 \ifx\one\xkey\ifx\threex\three \key{#2}%
3168 \else{\tclose{\kbdfont\setupmarkupstyle{kbd
}\look}}\fi
3169 \else{\tclose{\kbdfont\setupmarkupstyle{kbd
}\look}}\fi
3172 % definition of @key that produces a lozenge. Doesn't adjust to text size.
3173 %\setfont\keyrm\rmshape{8}{1000}{OT1}
3175 %\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
3176 % \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
3177 % \vbox{\hrule\kern-0.4pt
3178 % \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
3179 % \kern-0.4pt\hrule}%
3180 % \kern-.06em\raise0.4pt\hbox{\angleright}}}}
3182 % definition of @key with no lozenge. If the current font is already
3183 % monospace, don't change it; that way, we respect @kbdinputstyle. But
3184 % if it isn't monospace, then use \tt.
3186 \def\key#1{{\setupmarkupstyle{key
}%
3188 \ifmonospace\else\tt\fi
3191 % @clicksequence{File @click{} Open ...}
3192 \def\clicksequence#1{\begingroup #1\endgroup}
3194 % @clickstyle @arrow (by default)
3195 \parseargdef\clickstyle{\def\click{#1}}
3198 % Typeset a dimension, e.g., `in' or `pt'. The only reason for the
3199 % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
3201 \def\dmn#1{\thinspace #1}
3203 % @acronym for "FBI", "NATO", and the like.
3204 % We print this one point size smaller, since it's intended for
3207 \def\acronym#1{\doacronym #1,,
\finish}
3208 \def\doacronym#1,
#2,
#3\finish{%
3209 {\switchtolsize #1}%
3211 \ifx\temp\empty \else
3212 \space (
{\unsepspaces \ignorespaces \temp \unskip})
%
3214 \null % reset \spacefactor=1000
3217 % @abbr for "Comput. J." and the like.
3218 % No font change, but don't do end-of-sentence spacing.
3220 \def\abbr#1{\doabbr #1,,
\finish}
3221 \def\doabbr#1,
#2,
#3\finish{%
3222 {\plainfrenchspacing #1}%
3224 \ifx\temp\empty \else
3225 \space (
{\unsepspaces \ignorespaces \temp \unskip})
%
3227 \null % reset \spacefactor=1000
3230 % @asis just yields its argument. Used with @table, for example.
3234 % @math outputs its argument in math mode.
3236 % One complication: _ usually means subscripts, but it could also mean
3237 % an actual _ character, as in @math{@var{some_variable} + 1}. So make
3238 % _ active, and distinguish by seeing if the current family is \slfam,
3239 % which is what @var uses.
3241 \catcode`
\_ =
\active
3242 \gdef\mathunderscore{%
3244 \def_{\ifnum\fam=
\slfam \_\else\sb\fi}%
3247 % Another complication: we want \\ (and @\) to output a math (or tt) \.
3248 % FYI, plain.tex uses \\ as a temporary control sequence (for no
3249 % particular reason), but this is not advertised and we don't care.
3251 % The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
3252 \def\mathbackslash{\ifnum\fam=
\ttfam \mathchar"
075C
\else\backslash \fi}
3255 \ifmmode\else % only go into math if not in math mode already
3258 \let\\ =
\mathbackslash
3260 % make the texinfo accent commands work in math mode
3270 % have to provide another name for sup operator
3272 $
\expandafter\finishmath\fi
3274 \def\finishmath#1{#1$
\endgroup} % Close the group opened by \tex.
3276 % Some active characters (such as <) are spaced differently in math.
3277 % We have to reset their definitions in case the @math was an argument
3278 % to a command which sets the catcodes (such as @item or @section).
3281 \catcode`^ =
\active
3282 \catcode`< =
\active
3283 \catcode`> =
\active
3284 \catcode`+ =
\active
3285 \catcode`' =
\active
3291 \let' =
\ptexquoteright
3295 % for @sub and @sup, if in math mode, just do a normal sub/superscript.
3296 % If in text, use math to place as sub/superscript, but switch
3297 % into text mode, with smaller fonts. This is a different font than the
3298 % one used for real math sub/superscripts (8pt vs. 7pt), but let's not
3299 % fix it (significant additions to font machinery) until someone notices.
3301 \def\sub{\ifmmode \expandafter\sb \else \expandafter\finishsub\fi}
3302 \def\finishsub#1{$
\sb{\hbox{\switchtolllsize #1}}$
}%
3304 \def\sup{\ifmmode \expandafter\ptexsp \else \expandafter\finishsup\fi}
3305 \def\finishsup#1{$
\ptexsp{\hbox{\switchtolllsize #1}}$
}%
3307 % @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
3308 % Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
3309 % except specified as a normal braced arg, so no newlines to worry about.
3311 \def\outfmtnametex{tex
}
3313 \long\def\inlinefmt#1{\doinlinefmt #1,
\finish}
3314 \long\def\doinlinefmt#1,
#2,
\finish{%
3315 \def\inlinefmtname{#1}%
3316 \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi
3319 % @inlinefmtifelse{FMTNAME,THEN-TEXT,ELSE-TEXT} expands THEN-TEXT if
3320 % FMTNAME is tex, else ELSE-TEXT.
3321 \long\def\inlinefmtifelse#1{\doinlinefmtifelse #1,,,
\finish}
3322 \long\def\doinlinefmtifelse#1,
#2,
#3,
#4,
\finish{%
3323 \def\inlinefmtname{#1}%
3324 \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\else \ignorespaces #3\fi
3327 % For raw, must switch into @tex before parsing the argument, to avoid
3328 % setting catcodes prematurely. Doing it this way means that, for
3329 % example, @inlineraw{html, foo{bar} gets a parse error instead of being
3330 % ignored. But this isn't important because if people want a literal
3331 % *right* brace they would have to use a command anyway, so they may as
3332 % well use a command to get a left brace too. We could re-use the
3333 % delimiter character idea from \verb, but it seems like overkill.
3335 \long\def\inlineraw{\tex \doinlineraw}
3336 \long\def\doinlineraw#1{\doinlinerawtwo #1,
\finish}
3337 \def\doinlinerawtwo#1,
#2,
\finish{%
3338 \def\inlinerawname{#1}%
3339 \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi
3340 \endgroup % close group opened by \tex.
3343 % @inlineifset{VAR, TEXT} expands TEXT if VAR is @set.
3345 \long\def\inlineifset#1{\doinlineifset #1,
\finish}
3346 \long\def\doinlineifset#1,
#2,
\finish{%
3347 \def\inlinevarname{#1}%
3348 \expandafter\ifx\csname SET
\inlinevarname\endcsname\relax
3349 \else\ignorespaces#2\fi
3352 % @inlineifclear{VAR, TEXT} expands TEXT if VAR is not @set.
3354 \long\def\inlineifclear#1{\doinlineifclear #1,
\finish}
3355 \long\def\doinlineifclear#1,
#2,
\finish{%
3356 \def\inlinevarname{#1}%
3357 \expandafter\ifx\csname SET
\inlinevarname\endcsname\relax \ignorespaces#2\fi
3364 % @@ prints an @, as does @atchar{}.
3368 % @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
3369 \def\lbracechar{{\ifmonospace\char123\else\ensuremath\lbrace\fi}}
3370 \def\rbracechar{{\ifmonospace\char125\else\ensuremath\rbrace\fi}}
3374 % @comma{} to avoid , parsing problems.
3377 % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
3378 % Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
3380 \let\dotaccent =
\ptexdot
3381 \def\ringaccent#1{{\accent23 #1}}
3382 \let\tieaccent =
\ptext
3383 \let\ubaraccent =
\ptexb
3384 \let\udotaccent =
\d
3386 % Other special characters: @questiondown @exclamdown @ordf @ordm
3387 % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
3388 \def\questiondown{?`
}
3390 \def\ordf{\leavevmode\raise1ex\hbox{\switchtolllsize \underbar{a
}}}
3391 \def\ordm{\leavevmode\raise1ex\hbox{\switchtolllsize \underbar{o
}}}
3393 % Dotless i and dotless j, used for accents.
3398 \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
3399 \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
3400 \else \errmessage{@dotless can be used only with i or j
}%
3404 % The \TeX{} logo, as in plain, but resetting the spacing so that a
3405 % period following counts as ending a sentence. (Idea found in latex.)
3407 \edef\TeX{\TeX \spacefactor=
1000 }
3409 % @LaTeX{} logo. Not quite the same results as the definition in
3410 % latex.ltx, since we use a different font for the raised A; it's most
3411 % convenient for us to use an explicitly smaller font, rather than using
3412 % the \scriptstyle font (since we don't reset \scriptstyle and
3413 % \scriptscriptstyle).
3418 \vbox to
\ht0{\hbox{%
3419 \ifx\textnominalsize\xwordpt
3420 % for 10pt running text, lllsize (8pt) is too small for the A in LaTeX.
3421 % Revert to plain's \scriptsize, which is 7pt.
3422 \count255=
\the\fam $
\fam\count255 \scriptstyle A$
%
3424 % For 11pt, we can use our lllsize.
3434 % Some math mode symbols. Define \ensuremath to switch into math mode
3435 % unless we are already there. Expansion tricks may not be needed here,
3436 % but safer, and can't hurt.
3437 \def\ensuremath{\ifmmode \expandafter\asis \else\expandafter\ensuredmath \fi}
3438 \def\ensuredmath#1{$
\relax#1$
}
3440 \def\bullet{\ensuremath\ptexbullet}
3441 \def\geq{\ensuremath\ge}
3442 \def\leq{\ensuremath\le}
3443 \def\minus{\ensuremath-
}
3445 % @dots{} outputs an ellipsis using the current font.
3446 % We do .5em per period so that it has the same spacing in the cm
3447 % typewriter fonts as three actual period characters; on the other hand,
3448 % in other typewriter fonts three periods are wider than 1.5em. So do
3449 % whichever is larger.
3453 \setbox0=
\hbox{...
}% get width of three periods
3460 \hskip 0pt plus
.25fil
3461 .
\hskip 0pt plus1fil
3462 .
\hskip 0pt plus1fil
3463 .
\hskip 0pt plus
.5fil
3467 % @enddots{} is an end-of-sentence ellipsis.
3471 \spacefactor=
\endofsentencespacefactor
3474 % @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
3476 % Since these characters are used in examples, they should be an even number of
3477 % \tt widths. Each \tt character is 1en, so two makes it 1em.
3480 \def\arrow{\leavevmode\raise.05ex
\hbox to
1em
{\hfil$
\rightarrow$
\hfil}}
3481 \def\result{\leavevmode\raise.05ex
\hbox to
1em
{\hfil$
\Rightarrow$
\hfil}}
3482 \def\expansion{\leavevmode\hbox to
1em
{\hfil$
\mapsto$
\hfil}}
3483 \def\print{\leavevmode\lower.1ex
\hbox to
1em
{\hfil$
\dashv$
\hfil}}
3484 \def\equiv{\leavevmode\hbox to
1em
{\hfil$
\ptexequiv$
\hfil}}
3486 % The @error{} command.
3487 % Adapted from the TeXbook's \boxit.
3491 {\ttfont \global\dimen0 =
3em
}% Width of the box.
3492 \dimen2 =
.55pt
% Thickness of rules
3493 % The text. (`r' is open on the right, `e' somewhat less so on the left.)
3494 \setbox0 =
\hbox{\kern-
.75pt
\reducedsf \putworderror\kern-
1.5pt
}
3496 \setbox\errorbox=
\hbox to
\dimen0{\hfil
3497 \hsize =
\dimen0 \advance\hsize by -
5.8pt
% Space to left+right.
3498 \advance\hsize by -
2\dimen2 % Rules.
3500 \hrule height
\dimen2
3501 \hbox{\vrule width
\dimen2 \kern3pt % Space to left of text.
3502 \vtop{\kern2.4pt
\box0 \kern2.4pt
}% Space above/below.
3503 \kern3pt\vrule width
\dimen2}% Space to right.
3504 \hrule height
\dimen2}
3507 \def\error{\leavevmode\lower.7ex
\copy\errorbox}
3509 % @pounds{} is a sterling sign, which Knuth put in the CM italic font.
3511 \def\pounds{{\it\$
}}
3513 % @euro{} comes from a separate font, depending on the current style.
3514 % We use the free feym* fonts from the eurosym package by Henrik
3515 % Theiling, which support regular, slanted, bold and bold slanted (and
3516 % "outlined" (blackboard board, sort of) versions, which we don't need).
3517 % It is available from http://www.ctan.org/tex-archive/fonts/eurosym.
3519 % Although only regular is the truly official Euro symbol, we ignore
3520 % that. The Euro is designed to be slightly taller than the regular
3526 % feybo - bold slanted
3528 % There is no good (free) typewriter version, to my knowledge.
3529 % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide.
3532 % Also doesn't work in math. Do we need to do math with euro symbols?
3536 \def\euro{{\eurofont e
}}
3538 % We set the font at each command, rather than predefining it in
3539 % \textfonts and the other font-switching commands, so that
3540 % installations which never need the symbol don't have to have the
3543 % There is only one designed size (nominal 10pt), so we always scale
3544 % that to the current nominal size.
3546 % By the way, simply using "at 1em" works for cmr10 and the like, but
3547 % does not work for cmbx10 and other extended/shrunken fonts.
3549 \def\eurosize{\csname\curfontsize nominalsize
\endcsname}%
3551 \ifx\curfontstyle\bfstylename
3553 \font\thiseurofont =
\ifusingit{feybo10
}{feybr10
} at
\eurosize
3556 \font\thiseurofont =
\ifusingit{feymo10
}{feymr10
} at
\eurosize
3561 % Glyphs from the EC fonts. We don't use \let for the aliases, because
3562 % sometimes we redefine the original macro, and the alias should reflect
3565 % Use LaTeX names for the Icelandic letters.
3566 \def\DH{{\ecfont \char"D0
}} % Eth
3567 \def\dh{{\ecfont \char"F0
}} % eth
3568 \def\TH{{\ecfont \char"DE
}} % Thorn
3569 \def\th{{\ecfont \char"FE
}} % thorn
3571 \def\guillemetleft{{\ecfont \char"
13}}
3572 \def\guillemotleft{\guillemetleft}
3573 \def\guillemetright{{\ecfont \char"
14}}
3574 \def\guillemotright{\guillemetright}
3575 \def\guilsinglleft{{\ecfont \char"
0E
}}
3576 \def\guilsinglright{{\ecfont \char"
0F
}}
3577 \def\quotedblbase{{\ecfont \char"
12}}
3578 \def\quotesinglbase{{\ecfont \char"
0D
}}
3580 % This positioning is not perfect (see the ogonek LaTeX package), but
3581 % we have the precomposed glyphs for the most common cases. We put the
3582 % tests to use those glyphs in the single \ogonek macro so we have fewer
3583 % dummy definitions to worry about for index entries, etc.
3585 % ogonek is also used with other letters in Lithuanian (IOU), but using
3586 % the precomposed glyphs for those is not so easy since they aren't in
3590 \ifx\temp\macrocharA\Aogonek
3591 \else\ifx\temp\macrochara\aogonek
3592 \else\ifx\temp\macrocharE\Eogonek
3593 \else\ifx\temp\macrochare\eogonek
3595 \ecfont \setbox0=
\hbox{#1}%
3596 \ifdim\ht0=
1ex
\accent"
0C
#1%
3597 \else\ooalign{\unhbox0\crcr\hidewidth\char"
0C
\hidewidth}%
3602 \def\Aogonek{{\ecfont \char"
81}}\def\macrocharA{A
}
3603 \def\aogonek{{\ecfont \char"A1
}}\def\macrochara{a
}
3604 \def\Eogonek{{\ecfont \char"
86}}\def\macrocharE{E
}
3605 \def\eogonek{{\ecfont \char"A6
}}\def\macrochare{e
}
3607 % Use the European Computer Modern fonts (cm-super in outline format)
3608 % for non-CM glyphs. That is ec* for regular text and tc* for the text
3609 % companion symbols (LaTeX TS1 encoding). Both are part of the ec
3610 % package and follow the same conventions.
3612 \def\ecfont{\etcfont{e
}}
3613 \def\tcfont{\etcfont{t
}}
3616 % We can't distinguish serif/sans and italic/slanted, but this
3617 % is used for crude hacks anyway (like adding French and German
3618 % quotes to documents typeset with CM, where we lose kerning), so
3619 % hopefully nobody will notice/care.
3620 \edef\ecsize{\csname\curfontsize ecsize
\endcsname}%
3621 \edef\nominalsize{\csname\curfontsize nominalsize
\endcsname}%
3624 \font\thisecfont =
#1ctt
\ecsize \space at
\nominalsize
3626 \ifx\curfontstyle\bfstylename
3628 \font\thisecfont =
#1cb
\ifusingit{i
}{x
}\ecsize \space at
\nominalsize
3631 \font\thisecfont =
#1c
\ifusingit{ti
}{rm
}\ecsize \space at
\nominalsize
3637 % @registeredsymbol - R in a circle. The font for the R should really
3638 % be smaller yet, but lllsize is the best we can do for now.
3639 % Adapted from the plain.tex definition of \copyright.
3641 \def\registeredsymbol{%
3642 $^
{{\ooalign{\hfil\raise.07ex
\hbox{\switchtolllsize R
}%
3647 % @textdegree - the normal degrees sign.
3649 \def\textdegree{$^
\circ$
}
3651 % Laurent Siebenmann reports \Orb undefined with:
3652 % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38
3653 % so we'll define it if necessary.
3655 \ifx\Orb\thisisundefined
3656 \def\Orb{\mathhexbox20D}
3660 \chardef\quotedblleft="
5C
3661 \chardef\quotedblright=`\"
3662 \chardef\quoteleft=`\`
3663 \chardef\quoteright=`\'
3666 \message{page headings,
}
3668 \newskip\titlepagetopglue \titlepagetopglue =
1.5in
3669 \newskip\titlepagebottomglue \titlepagebottomglue =
2pc
3671 % First the title page. Must do @settitle before @titlepage.
3673 \newif\iffinishedtitlepage
3675 % @setcontentsaftertitlepage used to do an implicit @contents or
3676 % @shortcontents after @end titlepage, but it is now obsolete.
3677 \def\setcontentsaftertitlepage{%
3678 \errmessage{@setcontentsaftertitlepage has been removed as a Texinfo
3679 command; move your @contents command if you want the contents
3680 after the title page.
}}%
3681 \def\setshortcontentsaftertitlepage{%
3682 \errmessage{@setshortcontentsaftertitlepage has been removed as a Texinfo
3683 command; move your @shortcontents and @contents commands if you
3684 want the contents after the title page.
}}%
3686 \parseargdef\shorttitlepage{%
3687 \begingroup \hbox{}\vskip 1.5in
\chaprm \centerline{#1}%
3688 \endgroup\page\hbox{}\page}
3691 % Open one extra group, as we want to close it in the middle of \Etitlepage.
3693 \parindent=
0pt
\textfonts
3694 % Leave some space at the very top of the page.
3695 \vglue\titlepagetopglue
3696 % No rule at page bottom unless we print one at the top with @title.
3697 \finishedtitlepagetrue
3699 % Most title ``pages'' are actually two pages long, with space
3700 % at the top of the second. We don't want the ragged left on the second.
3701 \let\oldpage =
\page
3703 \iffinishedtitlepage\else
3706 \let\page =
\oldpage
3713 \iffinishedtitlepage\else
3716 % It is important to do the page break before ending the group,
3717 % because the headline and footline are only empty inside the group.
3718 % If we use the new definition of \page, we always get a blank page
3719 % after the title page, which we certainly don't want.
3723 % Need this before the \...aftertitlepage checks so that if they are
3724 % in effect the toc pages will come out with page numbers.
3728 \def\finishtitlepage{%
3729 \vskip4pt \hrule height
2pt width
\hsize
3730 \vskip\titlepagebottomglue
3731 \finishedtitlepagetrue
3734 % Settings used for typesetting titles: no hyphenation, no indentation,
3735 % don't worry much about spacing, ragged right. This should be used
3736 % inside a \vbox, and fonts need to be set appropriately first. \par should
3737 % be specified before the end of the \vbox, since a vbox is a group.
3739 \def\raggedtitlesettings{%
3741 \hyphenpenalty=
10000
3747 % Macros to be used within @titlepage:
3749 \let\subtitlerm=
\rmfont
3750 \def\subtitlefont{\subtitlerm \normalbaselineskip =
13pt
\normalbaselines}
3752 \parseargdef\title{%
3754 \vbox{\titlefonts \raggedtitlesettings #1\par}%
3755 % print a rule at the page bottom also.
3756 \finishedtitlepagefalse
3757 \vskip4pt \hrule height
4pt width
\hsize \vskip4pt
3760 \parseargdef\subtitle{%
3762 {\subtitlefont \rightline{#1}}%
3765 % @author should come last, but may come many times.
3766 % It can also be used inside @quotation.
3768 \parseargdef\author{%
3769 \def\temp{\quotation}%
3771 \def\quotationauthor{#1}% printed in \Equotation.
3774 \ifseenauthor\else \vskip 0pt plus
1filll
\seenauthortrue \fi
3775 {\secfonts\rm \leftline{#1}}%
3780 % Set up page headings and footings.
3782 \let\thispage=
\folio
3784 \newtoks\evenheadline % headline on even pages
3785 \newtoks\oddheadline % headline on odd pages
3786 \newtoks\evenfootline % footline on even pages
3787 \newtoks\oddfootline % footline on odd pages
3789 % Now make \makeheadline and \makefootline in Plain TeX use those variables
3790 \headline=
{{\textfonts\rm \ifodd\pageno \the\oddheadline
3791 \else \the\evenheadline \fi}}
3792 \footline=
{{\textfonts\rm \ifodd\pageno \the\oddfootline
3793 \else \the\evenfootline \fi}\HEADINGShook}
3794 \let\HEADINGShook=
\relax
3796 % Commands to set those variables.
3797 % For example, this is what @headings on does
3798 % @evenheading @thistitle|@thispage|@thischapter
3799 % @oddheading @thischapter|@thispage|@thistitle
3800 % @evenfooting @thisfile||
3801 % @oddfooting ||@thisfile
3804 \def\evenheading{\parsearg\evenheadingxxx}
3805 \def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|
\finish}
3806 \def\evenheadingyyy #1\|
#2\|
#3\|
#4\finish{%
3807 \global\evenheadline=
{\rlap{\centerline{#2}}\line{#1\hfil#3}}}
3809 \def\oddheading{\parsearg\oddheadingxxx}
3810 \def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|
\finish}
3811 \def\oddheadingyyy #1\|
#2\|
#3\|
#4\finish{%
3812 \global\oddheadline=
{\rlap{\centerline{#2}}\line{#1\hfil#3}}}
3814 \parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}%
3816 \def\evenfooting{\parsearg\evenfootingxxx}
3817 \def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|
\finish}
3818 \def\evenfootingyyy #1\|
#2\|
#3\|
#4\finish{%
3819 \global\evenfootline=
{\rlap{\centerline{#2}}\line{#1\hfil#3}}}
3821 \def\oddfooting{\parsearg\oddfootingxxx}
3822 \def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|
\finish}
3823 \def\oddfootingyyy #1\|
#2\|
#3\|
#4\finish{%
3824 \global\oddfootline =
{\rlap{\centerline{#2}}\line{#1\hfil#3}}%
3826 % Leave some space for the footline. Hopefully ok to assume
3827 % @evenfooting will not be used by itself.
3828 \global\advance\txipageheight by -
12pt
3829 \global\advance\vsize by -
12pt
3832 \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}}
3834 % @evenheadingmarks top \thischapter <- chapter at the top of a page
3835 % @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page
3837 % The same set of arguments for:
3842 % @everyheadingmarks
3843 % @everyfootingmarks
3845 % These define \getoddheadingmarks, \getevenheadingmarks,
3846 % \getoddfootingmarks, and \getevenfootingmarks, each to one of
3847 % \gettopheadingmarks, \getbottomheadingmarks.
3849 \def\evenheadingmarks{\headingmarks{even
}{heading
}}
3850 \def\oddheadingmarks{\headingmarks{odd
}{heading
}}
3851 \def\evenfootingmarks{\headingmarks{even
}{footing
}}
3852 \def\oddfootingmarks{\headingmarks{odd
}{footing
}}
3853 \parseargdef\everyheadingmarks{\headingmarks{even
}{heading
}{#1}
3854 \headingmarks{odd
}{heading
}{#1} }
3855 \parseargdef\everyfootingmarks{\headingmarks{even
}{footing
}{#1}
3856 \headingmarks{odd
}{footing
}{#1} }
3857 % #1 = even/odd, #2 = heading/footing, #3 = top/bottom.
3858 \def\headingmarks#1#2#3 {%
3859 \expandafter\let\expandafter\temp \csname get
#3headingmarks
\endcsname
3860 \global\expandafter\let\csname get
#1#2marks
\endcsname \temp
3863 \everyheadingmarks bottom
3864 \everyfootingmarks bottom
3866 % @headings double turns headings on for double-sided printing.
3867 % @headings single turns headings on for single-sided printing.
3868 % @headings off turns them off.
3869 % @headings on same as @headings double, retained for compatibility.
3870 % @headings after turns on double-sided headings after this page.
3871 % @headings doubleafter turns on double-sided headings after this page.
3872 % @headings singleafter turns on single-sided headings after this page.
3873 % By default, they are off at the start of a document,
3874 % and turned `on' after @end titlepage.
3876 \parseargdef\headings{\csname HEADINGS
#1\endcsname}
3878 \def\headingsoff{% non-global headings elimination
3879 \evenheadline=
{\hfil}\evenfootline=
{\hfil}%
3880 \oddheadline=
{\hfil}\oddfootline=
{\hfil}%
3883 \def\HEADINGSoff{{\globaldefs=
1 \headingsoff}} % global setting
3884 \HEADINGSoff % it's the default
3886 % When we turn headings on, set the page number to 1.
3887 % For double-sided printing, put current file name in lower left corner,
3888 % chapter name on inside top of right hand pages, document
3889 % title on inside top of left hand pages, and page numbers on outside top
3890 % edge of all pages.
3891 \def\HEADINGSdouble{%
3893 \global\evenfootline=
{\hfil}
3894 \global\oddfootline=
{\hfil}
3895 \global\evenheadline=
{\line{\folio\hfil\thistitle}}
3896 \global\oddheadline=
{\line{\thischapterheading\hfil\folio}}
3897 \global\let\contentsalignmacro =
\chapoddpage
3899 \let\contentsalignmacro =
\chappager
3901 % For single-sided printing, chapter title goes across top left of page,
3902 % page number on top right.
3903 \def\HEADINGSsingle{%
3905 \global\evenfootline=
{\hfil}
3906 \global\oddfootline=
{\hfil}
3907 \global\evenheadline=
{\line{\thischapterheading\hfil\folio}}
3908 \global\oddheadline=
{\line{\thischapterheading\hfil\folio}}
3909 \global\let\contentsalignmacro =
\chappager
3911 \def\HEADINGSon{\HEADINGSdouble}
3913 \def\HEADINGSafter{\let\HEADINGShook=
\HEADINGSdoublex}
3914 \let\HEADINGSdoubleafter=
\HEADINGSafter
3915 \def\HEADINGSdoublex{%
3916 \global\evenfootline=
{\hfil}
3917 \global\oddfootline=
{\hfil}
3918 \global\evenheadline=
{\line{\folio\hfil\thistitle}}
3919 \global\oddheadline=
{\line{\thischapterheading\hfil\folio}}
3920 \global\let\contentsalignmacro =
\chapoddpage
3923 \def\HEADINGSsingleafter{\let\HEADINGShook=
\HEADINGSsinglex}
3924 \def\HEADINGSsinglex{%
3925 \global\evenfootline=
{\hfil}
3926 \global\oddfootline=
{\hfil}
3927 \global\evenheadline=
{\line{\thischapterheading\hfil\folio}}
3928 \global\oddheadline=
{\line{\thischapterheading\hfil\folio}}
3929 \global\let\contentsalignmacro =
\chappager
3932 % Subroutines used in generating headings
3933 % This produces Day Month Year style of output.
3934 % Only define if not already defined, in case a txi-??.tex file has set
3935 % up a different format (e.g., txi-cs.tex does this).
3936 \ifx\today\thisisundefined
3940 \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr
3941 \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug
3942 \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec
3947 % @settitle line... specifies the title of the document, for headings.
3948 % It generates no output of its own.
3949 \def\thistitle{\putwordNoTitle}
3950 \def\settitle{\parsearg{\gdef\thistitle}}
3954 % Tables -- @table, @ftable, @vtable, @item(x).
3956 % default indentation of table text
3957 \newdimen\tableindent \tableindent=
.8in
3958 % default indentation of @itemize and @enumerate text
3959 \newdimen\itemindent \itemindent=
.3in
3960 % margin between end of table item and start of table text.
3961 \newdimen\itemmargin \itemmargin=
.1in
3963 % used internally for \itemindent minus \itemmargin
3966 % Note @table, @ftable, and @vtable define @item, @itemx, etc., with
3968 % They also define \itemindex
3969 % to index the item name in whatever manner is desired (perhaps none).
3971 \newif\ifitemxneedsnegativevskip
3973 \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-
\parskip\nobreak\fi}
3975 \def\internalBitem{\smallbreak \parsearg\itemzzz}
3976 \def\internalBitemx{\itemxpar \parsearg\itemzzz}
3978 \def\itemzzz #1{\begingroup %
3979 \advance\hsize by -
\rightskip
3980 \advance\hsize by -
\tableindent
3981 \setbox0=
\hbox{\itemindicate{#1}}%
3983 \nobreak % This prevents a break before @itemx.
3985 % If the item text does not fit in the space we have, put it on a line
3986 % by itself, and do not allow a page break either before or after that
3987 % line. We do not start a paragraph here because then if the next
3988 % command is, e.g., @kindex, the whatsit would get put into the
3989 % horizontal list on a line by itself, resulting in extra blank space.
3990 \ifdim \wd0>
\itemmax
3992 % Make this a paragraph so we get the \parskip glue and wrapping,
3993 % but leave it ragged-right.
3995 \advance\leftskip by-
\tableindent
3996 \advance\hsize by
\tableindent
3997 \advance\rightskip by0pt plus1fil
\relax
3998 \leavevmode\unhbox0\par
4001 % We're going to be starting a paragraph, but we don't want the
4002 % \parskip glue -- logically it's part of the @item we just started.
4003 \nobreak \vskip-
\parskip
4005 % Stop a page break at the \parskip glue coming up. However, if
4006 % what follows is an environment such as @example, there will be no
4007 % \parskip glue; then the negative vskip we just inserted would
4008 % cause the example and the item to crash together. So we use this
4009 % bizarre value of 10001 as a signal to \aboveenvbreak to insert
4010 % \parskip glue after all. Section titles are handled this way also.
4014 \itemxneedsnegativevskipfalse
4016 % The item text fits into the space. Start a paragraph, so that the
4017 % following text (if any) will end up on the same line.
4019 % Do this with kerns and \unhbox so that if there is a footnote in
4020 % the item text, it can migrate to the main vertical list and
4021 % eventually be printed.
4022 \nobreak\kern-
\tableindent
4023 \dimen0 =
\itemmax \advance\dimen0 by
\itemmargin \advance\dimen0 by -
\wd0
4025 \nobreak\kern\dimen0
4027 \itemxneedsnegativevskiptrue
4031 \def\item{\errmessage{@item while not in a list environment
}}
4032 \def\itemx{\errmessage{@itemx while not in a list environment
}}
4034 % @table, @ftable, @vtable.
4036 \let\itemindex\gobble
4040 \def\itemindex #
#1{\doind {fn
}{\code{#
#1}}}%
4041 \tablecheck{ftable
}%
4044 \def\itemindex #
#1{\doind {vr
}{\code{#
#1}}}%
4045 \tablecheck{vtable
}%
4048 \ifnum \the\catcode`\^^M=
\active
4050 \errmessage{This command won't work in this context; perhaps the problem is
4051 that we are
\inenvironment\thisenv}%
4052 \def\next{\doignore{#1}}%
4059 \def\itemindicate{#1}%
4064 \makevalueexpandable
4065 \edef\temp{\noexpand\tablez #1\space\space\space}%
4069 \def\tablez #1 #2 #3 #4\endtablez{%
4071 \ifnum 0#1>
0 \advance \leftskip by
#1\mil \fi
4072 \ifnum 0#2>
0 \tableindent=
#2\mil \fi
4073 \ifnum 0#3>
0 \advance \rightskip by
#3\mil \fi
4074 \itemmax=
\tableindent
4075 \advance \itemmax by -
\itemmargin
4076 \advance \leftskip by
\tableindent
4077 \exdentamount=
\tableindent
4079 \parskip =
\smallskipamount
4080 \ifdim \parskip=
0pt
\parskip=
2pt
\fi
4081 \let\item =
\internalBitem
4082 \let\itemx =
\internalBitemx
4084 \def\Etable{\endgraf\afterenvbreak}
4087 \let\Eitemize\Etable
4088 \let\Eenumerate\Etable
4090 % This is the counter used by @enumerate, which is really @itemize
4094 \envdef\itemize{\parsearg\doitemize}
4098 \itemmax=
\itemindent
4099 \advance\itemmax by -
\itemmargin
4100 \advance\leftskip by
\itemindent
4101 \exdentamount=
\itemindent
4103 \parskip=
\smallskipamount
4104 \ifdim\parskip=
0pt
\parskip=
2pt
\fi
4106 % Try typesetting the item mark so that if the document erroneously says
4107 % something like @itemize @samp (intending @table), there's an error
4108 % right away at the @itemize. It's not the best error message in the
4109 % world, but it's better than leaving it to the @item. This means if
4110 % the user wants an empty mark, they have to say @w{} not just @w.
4111 \def\itemcontents{#1}%
4112 \setbox0 =
\hbox{\itemcontents}%
4114 % @itemize with no arg is equivalent to @itemize @bullet.
4115 \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi
4117 \let\item=
\itemizeitem
4120 % Definition of @item while inside @itemize and @enumerate.
4123 \advance\itemno by
1 % for enumerations
4124 {\let\par=
\endgraf \smallbreak}% reasonable place to break
4126 % If the document has an @itemize directly after a section title, a
4127 % \nobreak will be last on the list, and \sectionheading will have
4128 % done a \vskip-\parskip. In that case, we don't want to zero
4129 % parskip, or the item text will crash with the heading. On the
4130 % other hand, when there is normal text preceding the item (as there
4131 % usually is), we do want to zero parskip, or there would be too much
4132 % space. In that case, we won't have a \nobreak before. At least
4133 % that's the theory.
4134 \ifnum\lastpenalty<
10000 \parskip=
0in
\fi
4136 \hbox to
0pt
{\hss \itemcontents \kern\itemmargin}%
4139 \vadjust{\penalty 1200}% not good to break after first line of item.
4141 % We can be in inner vertical mode in a footnote, although an
4142 % @itemize looks awful there.
4147 % \splitoff TOKENS\endmark defines \first to be the first token in
4148 % TOKENS, and \rest to be the remainder.
4150 \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}%
4152 % Allow an optional argument of an uppercase letter, lowercase letter,
4153 % or number, to specify the first label in the enumerated list. No
4154 % argument is the same as `1'.
4156 \envparseargdef\enumerate{\enumeratey #1 \endenumeratey}
4157 \def\enumeratey #1 #2\endenumeratey{%
4158 % If we were given no argument, pretend we were given `1'.
4160 \ifx\thearg\empty \def\thearg{1}\fi
4162 % Detect if the argument is a single token. If so, it might be a
4163 % letter. Otherwise, the only valid thing it can be is a number.
4164 % (We will always have one token, because of the test we just made.
4165 % This is a good thing, since \splitoff doesn't work given nothing at
4166 % all -- the first parameter is undelimited.)
4167 \expandafter\splitoff\thearg\endmark
4169 % Only one token in the argument. It could still be anything.
4170 % A ``lowercase letter'' is one whose \lccode is nonzero.
4171 % An ``uppercase letter'' is one whose \lccode is both nonzero, and
4172 % not equal to itself.
4173 % Otherwise, we assume it's a number.
4175 % We need the \relax at the end of the \ifnum lines to stop TeX from
4176 % continuing to look for a <number>.
4178 \ifnum\lccode\expandafter`
\thearg=
0\relax
4179 \numericenumerate % a number (we hope)
4182 \ifnum\lccode\expandafter`
\thearg=
\expandafter`
\thearg\relax
4183 \lowercaseenumerate % lowercase letter
4185 \uppercaseenumerate % uppercase letter
4189 % Multiple tokens in the argument. We hope it's a number.
4194 % An @enumerate whose labels are integers. The starting integer is
4197 \def\numericenumerate{%
4199 \startenumeration{\the\itemno}%
4202 % The starting (lowercase) letter is in \thearg.
4203 \def\lowercaseenumerate{%
4204 \itemno =
\expandafter`
\thearg
4206 % Be sure we're not beyond the end of the alphabet.
4208 \errmessage{No more lowercase letters in @enumerate; get a bigger
4215 % The starting (uppercase) letter is in \thearg.
4216 \def\uppercaseenumerate{%
4217 \itemno =
\expandafter`
\thearg
4219 % Be sure we're not beyond the end of the alphabet.
4221 \errmessage{No more uppercase letters in @enumerate; get a bigger
4228 % Call \doitemize, adding a period to the first argument and supplying the
4229 % common last two arguments. Also subtract one from the initial value in
4230 % \itemno, since @item increments \itemno.
4232 \def\startenumeration#1{%
4233 \advance\itemno by -
1
4234 \doitemize{#1.
}\flushcr
4237 % @alphaenumerate and @capsenumerate are abbreviations for giving an arg
4240 \def\alphaenumerate{\enumerate{a
}}
4241 \def\capsenumerate{\enumerate{A
}}
4242 \def\Ealphaenumerate{\Eenumerate}
4243 \def\Ecapsenumerate{\Eenumerate}
4246 % @multitable macros
4247 % Amy Hendrickson, 8/18/94, 3/6/96
4249 % @multitable ... @end multitable will make as many columns as desired.
4250 % Contents of each column will wrap at width given in preamble. Width
4251 % can be specified either with sample text given in a template line,
4252 % or in percent of \hsize, the current width of text on page.
4254 % Table can continue over pages but will only break between lines.
4258 % Either define widths of columns in terms of percent of \hsize:
4259 % @multitable @columnfractions .25 .3 .45
4262 % Numbers following @columnfractions are the percent of the total
4263 % current hsize to be used for each column. You may use as many
4264 % columns as desired.
4267 % Or use a template:
4268 % @multitable {Column 1 template} {Column 2 template} {Column 3 template}
4270 % using the widest term desired in each column.
4272 % Each new table line starts with @item, each subsequent new column
4273 % starts with @tab. Empty columns may be produced by supplying @tab's
4274 % with nothing between them for as many times as empty columns are needed,
4275 % ie, @tab@tab@tab will produce two empty columns.
4277 % @item, @tab do not need to be on their own lines, but it will not hurt
4280 % Sample multitable:
4282 % @multitable {Column 1 template} {Column 2 template} {Column 3 template}
4283 % @item first col stuff @tab second col stuff @tab third col
4290 % @item first col stuff @tab second col stuff
4291 % @tab Many paragraphs of text may be used in any column.
4293 % They will wrap at the width determined by the template.
4294 % @item@tab@tab This will be in third column.
4297 % Default dimensions may be reset by user.
4298 % @multitableparskip is vertical space between paragraphs in table.
4299 % @multitableparindent is paragraph indent in table.
4300 % @multitablecolmargin is horizontal space to be left between columns.
4301 % @multitablelinespace is space to leave between table items, baseline
4303 % 0pt means it depends on current normal line spacing.
4305 \newskip\multitableparskip
4306 \newskip\multitableparindent
4307 \newdimen\multitablecolspace
4308 \newskip\multitablelinespace
4309 \multitableparskip=
0pt
4310 \multitableparindent=
6pt
4311 \multitablecolspace=
12pt
4312 \multitablelinespace=
0pt
4314 % Macros used to set up halign preamble:
4316 \let\endsetuptable\relax
4317 \def\xendsetuptable{\endsetuptable}
4318 \let\columnfractions\relax
4319 \def\xcolumnfractions{\columnfractions}
4322 % #1 is the @columnfraction, usually a decimal number like .5, but might
4323 % be just 1. We just use it, whatever it is.
4325 \def\pickupwholefraction#1 {%
4326 \global\advance\colcount by
1
4327 \expandafter\xdef\csname col
\the\colcount\endcsname{#1\hsize}%
4334 \ifx\firstarg\xendsetuptable
4337 \ifx\firstarg\xcolumnfractions
4338 \global\setpercenttrue
4341 \let\go\pickupwholefraction
4343 \global\advance\colcount by
1
4344 \setbox0=
\hbox{#1\unskip\space}% Add a normal word space as a
4345 % separator; typically that is always in the input, anyway.
4346 \expandafter\xdef\csname col
\the\colcount\endcsname{\the\wd0}%
4349 \ifx\go\pickupwholefraction
4350 % Put the argument back for the \pickupwholefraction call, so
4351 % we'll always have a period there to be parsed.
4352 \def\go{\pickupwholefraction#1}%
4354 \let\go =
\setuptable
4360 % multitable-only commands.
4362 % @headitem starts a heading row, which we typeset in bold. Assignments
4363 % have to be global since we are inside the implicit group of an
4364 % alignment entry. \everycr below resets \everytab so we don't have to
4365 % undo it ourselves.
4366 \def\headitemfont{\b}% for people to use in the template row; not changeable
4368 \checkenv\multitable
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 % A \tab used to include \hskip1sp. But then the space in a template
4379 % line is not enough. That is bad. So let's go back to just `&' until
4380 % we again encounter the problem the 1sp was intended to solve.
4381 % --karl, nathan@acm.org, 20apr99.
4382 \def\tab{\checkenv\multitable &
\the\everytab}%
4384 % @multitable ... @end multitable definitions:
4386 \newtoks\everytab % insert after every tab.
4388 \envdef\multitable{%
4392 % @item within a multitable starts a normal row.
4393 % We use \def instead of \let so that if one of the multitable entries
4394 % contains an @itemize, we don't choke on the \item (seen as \crcr aka
4395 % \endtemplate) expanding \doitemize.
4400 \setmultitablespacing
4401 \parskip=
\multitableparskip
4402 \parindent=
\multitableparindent
4408 \global\everytab=
{}% Reset from possible headitem.
4409 \global\colcount=
0 % Reset the column counter.
4411 % Check for saved footnotes, etc.:
4414 % Perhaps a \nobreak, then reset:
4416 \global\let\headitemcrhook=
\relax
4420 \parsearg\domultitable
4422 \def\domultitable#1{%
4423 % To parse everything between @multitable and @item:
4424 \setuptable#1 \endsetuptable
4426 % This preamble sets up a generic column definition, which will
4427 % be used as many times as user calls for columns.
4428 % \vtop will set a single line and will also let text wrap and
4429 % continue for many paragraphs if desired.
4431 \global\advance\colcount by
1
4434 % Use the current \colcount to find the correct column width:
4435 \hsize=
\expandafter\csname col
\the\colcount\endcsname
4437 % In order to keep entries from bumping into each other
4438 % we will add a \leftskip of \multitablecolspace to all columns after
4441 % If a template has been used, we will add \multitablecolspace
4442 % to the width of each template entry.
4444 % If the user has set preamble in terms of percent of \hsize we will
4445 % use that dimension as the width of the column, and the \leftskip
4446 % will keep entries from bumping into each other. Table will start at
4447 % left margin and final column will justify at right margin.
4449 % Make sure we don't inherit \rightskip from the outer environment.
4452 % The first column will be indented with the surrounding text.
4453 \advance\hsize by
\leftskip
4456 % If user has not set preamble in terms of percent of \hsize
4457 % we will advance \hsize by \multitablecolspace.
4458 \advance\hsize by
\multitablecolspace
4460 % In either case we will make \leftskip=\multitablecolspace:
4461 \leftskip=
\multitablecolspace
4463 % Ignoring space at the beginning and end avoids an occasional spurious
4464 % blank line, when TeX decides to break the line at the space before the
4465 % box from the multistrut, so the strut ends up on a line by itself.
4467 % @multitable @columnfractions .11 .89
4469 % @tab Legal holiday which is valid in major parts of the whole country.
4470 % Is automatically provided with highlighting sequences respectively
4471 % marking characters.
4472 \noindent\ignorespaces##
\unskip\multistrut
4477 \egroup % end the \halign
4478 \global\setpercentfalse
4481 \def\setmultitablespacing{%
4482 \def\multistrut{\strut}% just use the standard line spacing
4484 % Compute \multitablelinespace (if not defined by user) for use in
4485 % \multitableparskip calculation. We used define \multistrut based on
4486 % this, but (ironically) that caused the spacing to be off.
4487 % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100.
4488 \ifdim\multitablelinespace=
0pt
4489 \setbox0=
\vbox{X
}\global\multitablelinespace=
\the\baselineskip
4490 \global\advance\multitablelinespace by-
\ht0
4492 % Test to see if parskip is larger than space between lines of
4493 % table. If not, do nothing.
4494 % If so, set to same dimension as multitablelinespace.
4495 \ifdim\multitableparskip>
\multitablelinespace
4496 \global\multitableparskip=
\multitablelinespace
4497 \global\advance\multitableparskip-
7pt
% to keep parskip somewhat smaller
4498 % than skip between lines in the table.
4500 \ifdim\multitableparskip=
0pt
4501 \global\multitableparskip=
\multitablelinespace
4502 \global\advance\multitableparskip-
7pt
% to keep parskip somewhat smaller
4503 % than skip between lines in the table.
4507 \message{conditionals,
}
4509 % @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext,
4510 % @ifnotxml always succeed. They currently do nothing; we don't
4511 % attempt to check whether the conditionals are properly nested. But we
4512 % have to remember that they are conditionals, so that @end doesn't
4513 % attempt to close an environment group.
4516 \expandafter\let\csname #1\endcsname =
\relax
4517 \expandafter\let\csname iscond.
#1\endcsname =
1
4520 \makecond{ifnotdocbook
}
4521 \makecond{ifnothtml
}
4522 \makecond{ifnotinfo
}
4523 \makecond{ifnotplaintext
}
4526 % Ignore @ignore, @ifhtml, @ifinfo, and the like.
4528 \def\direntry{\doignore{direntry
}}
4529 \def\documentdescription{\doignore{documentdescription
}}
4530 \def\docbook{\doignore{docbook
}}
4531 \def\html{\doignore{html
}}
4532 \def\ifdocbook{\doignore{ifdocbook
}}
4533 \def\ifhtml{\doignore{ifhtml
}}
4534 \def\ifinfo{\doignore{ifinfo
}}
4535 \def\ifnottex{\doignore{ifnottex
}}
4536 \def\ifplaintext{\doignore{ifplaintext
}}
4537 \def\ifxml{\doignore{ifxml
}}
4538 \def\ignore{\doignore{ignore
}}
4539 \def\menu{\doignore{menu
}}
4540 \def\xml{\doignore{xml
}}
4542 % Ignore text until a line `@end #1', keeping track of nested conditionals.
4544 % A count to remember the depth of nesting.
4545 \newcount\doignorecount
4547 \def\doignore#1{\begingroup
4548 % Scan in ``verbatim'' mode:
4550 \catcode`\@ =
\other
4551 \catcode`\
{ =
\other
4552 \catcode`\
} =
\other
4554 % Make sure that spaces turn into tokens that match what \doignoretext wants.
4557 % Count number of #1's that we've seen.
4560 % Swallow text until we reach the matching `@end #1'.
4564 { \catcode`_=
11 % We want to use \_STOP_ which cannot appear in texinfo source.
4567 \gdef\dodoignore#1{%
4568 % #1 contains the command name as a string, e.g., `ifinfo'.
4570 % Define a command to find the next `@end #1'.
4571 \long\def\doignoretext#
#1^^M@end
#1{%
4572 \doignoretextyyy#
#1^^M@
#1\_STOP_}%
4574 % And this command to find another #1 command, at the beginning of a
4575 % line. (Otherwise, we would consider a line `@c @ifset', for
4576 % example, to count as an @ifset for nesting.)
4577 \long\def\doignoretextyyy#
#1^^M@
#1#
#2\_STOP_{\doignoreyyy{#
#2}\_STOP_}%
4579 % And now expand that command.
4584 \def\doignoreyyy#1{%
4586 \ifx\temp\empty % Nothing found.
4587 \let\next\doignoretextzzz
4588 \else % Found a nested condition, ...
4589 \advance\doignorecount by
1
4590 \let\next\doignoretextyyy % ..., look for another.
4591 % If we're here, #1 ends with ^^M\ifinfo (for example).
4593 \next #1% the token \_STOP_ is present just after this macro.
4596 % We have to swallow the remaining "\_STOP_".
4598 \def\doignoretextzzz#1{%
4599 \ifnum\doignorecount =
0 % We have just found the outermost @end.
4600 \let\next\enddoignore
4601 \else % Still inside a nested condition.
4602 \advance\doignorecount by -
1
4603 \let\next\doignoretext % Look for the next @end.
4608 % Finish off ignored text.
4610 % Ignore anything after the last `@end #1'; this matters in verbatim
4611 % environments, where otherwise the newline after an ignored conditional
4612 % would result in a blank line in the output.
4613 \gdef\enddoignore#1^^M
{\endgroup\ignorespaces}%
4617 % @set VAR sets the variable VAR to an empty value.
4618 % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
4620 % Since we want to separate VAR from REST-OF-LINE (which might be
4621 % empty), we can't just use \parsearg; we have to insert a space of our
4622 % own to delimit the rest of the line, and then take it out again if we
4624 % We rely on the fact that \parsearg sets \catcode`\ =10.
4626 \parseargdef\set{\setyyy#1 \endsetyyy}
4627 \def\setyyy#1 #2\endsetyyy{%
4629 \makevalueexpandable
4631 \edef\next{\gdef\makecsname{SET
#1}}%
4639 % Remove the trailing space \setxxx inserted.
4640 \def\setzzz#1 \endsetzzz{\next{#1}}
4642 % @clear VAR clears (i.e., unsets) the variable VAR.
4644 \parseargdef\clear{%
4646 \makevalueexpandable
4647 \global\expandafter\let\csname SET
#1\endcsname=
\relax
4651 % @value{foo} gets the text saved in variable foo.
4652 \def\value{\begingroup\makevalueexpandable\valuexxx}
4653 \def\valuexxx#1{\expandablevalue{#1}\endgroup}
4655 \catcode`\-=
\active \catcode`
\_=
\active
4657 \gdef\makevalueexpandable{%
4658 \let\value =
\expandablevalue
4659 % We don't want these characters active, ...
4660 \catcode`\-=
\other \catcode`
\_=
\other
4661 % ..., but we might end up with active ones in the argument if
4662 % we're called from @code, as @code{@value{foo-bar_}}, though.
4663 % So \let them to their normal equivalents.
4664 \let-
\normaldash \let_\normalunderscore
4668 % We have this subroutine so that we can handle at least some @value's
4669 % properly in indexes (we call \makevalueexpandable in \indexdummies).
4670 % The command has to be fully expandable (if the variable is set), since
4671 % the result winds up in the index file. This means that if the
4672 % variable's value contains other Texinfo commands, it's almost certain
4673 % it will fail (although perhaps we could fix that with sufficient work
4674 % to do a one-level expansion on the result, instead of complete).
4676 % Unfortunately, this has the consequence that when _ is in the *value*
4677 % of an @set, it does not print properly in the roman fonts (get the cmr
4678 % dot accent at position 126 instead). No fix comes to mind, and it's
4679 % been this way since 2003 or earlier, so just ignore it.
4681 \def\expandablevalue#1{%
4682 \expandafter\ifx\csname SET
#1\endcsname\relax
4683 {[No value for ``
#1''
]}%
4684 \message{Variable `
#1', used in @value, is not set.
}%
4686 \csname SET
#1\endcsname
4690 % Like \expandablevalue, but completely expandable (the \message in the
4691 % definition above operates at the execution level of TeX). Used when
4692 % writing to auxiliary files, due to the expansion that \write does.
4693 % If flag is undefined, pass through an unexpanded @value command: maybe it
4694 % will be set by the time it is read back in.
4696 % NB flag names containing - or _ may not work here.
4698 \expandafter\ifx\csname SET
#1\endcsname\relax
4699 \noexpand\value{#1}%
4701 \csname SET
#1\endcsname
4705 % Used for @value's in index entries to form the sort key: expand the @value
4706 % if possible, otherwise sort late.
4707 \def\indexnofontsvalue#1{%
4708 \expandafter\ifx\csname SET
#1\endcsname\relax
4711 \csname SET
#1\endcsname
4715 % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
4718 % To get the special treatment we need for `@end ifset,' we call
4719 % \makecond and then redefine.
4722 \def\ifset{\parsearg{\doifset{\let\next=
\ifsetfail}}}
4725 \makevalueexpandable
4727 \expandafter\ifx\csname SET
#2\endcsname\relax
4728 #1% If not set, redefine \next.
4733 \def\ifsetfail{\doignore{ifset
}}
4735 % @ifclear VAR ... @end executes the `...' iff VAR has never been
4736 % defined with @set, or has been undefined with @clear.
4738 % The `\else' inside the `\doifset' parameter is a trick to reuse the
4739 % above code: if the variable is not set, do nothing, if it is set,
4740 % then redefine \next to \ifclearfail.
4743 \def\ifclear{\parsearg{\doifset{\else \let\next=
\ifclearfail}}}
4744 \def\ifclearfail{\doignore{ifclear
}}
4746 % @ifcommandisdefined CMD ... @end executes the `...' if CMD (written
4747 % without the @) is in fact defined. We can only feasibly check at the
4748 % TeX level, so something like `mathcode' is going to considered
4749 % defined even though it is not a Texinfo command.
4751 \makecond{ifcommanddefined
}
4752 \def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=
\ifcmddefinedfail}}}
4754 \def\doifcmddefined#1#2{{%
4755 \makevalueexpandable
4757 \expandafter\ifx\csname #2\endcsname\relax
4758 #1% If not defined, \let\next as above.
4763 \def\ifcmddefinedfail{\doignore{ifcommanddefined
}}
4765 % @ifcommandnotdefined CMD ... handled similar to @ifclear above.
4766 \makecond{ifcommandnotdefined
}
4767 \def\ifcommandnotdefined{%
4768 \parsearg{\doifcmddefined{\else \let\next=
\ifcmdnotdefinedfail}}}
4769 \def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined
}}
4771 % Set the `txicommandconditionals' variable, so documents have a way to
4772 % test if the @ifcommand...defined conditionals are available.
4773 \set txicommandconditionals
4775 % @dircategory CATEGORY -- specify a category of the dir file
4776 % which this file should belong to. Ignore this in TeX.
4777 \let\dircategory=
\comment
4779 % @defininfoenclose.
4780 \let\definfoenclose=
\comment
4784 % Index generation facilities
4786 % Define \newwrite to be identical to plain tex's \newwrite
4787 % except not \outer, so it can be used within macros and \if's.
4788 \edef\newwrite{\makecsname{ptexnewwrite
}}
4790 % \newindex {foo} defines an index named IX.
4791 % It automatically defines \IXindex such that
4792 % \IXindex ...rest of line... puts an entry in the index IX.
4793 % It also defines \IXindfile to be the number of the output channel for
4794 % the file that accumulates this index. The file's extension is IX.
4795 % The name of an index should be no more than 2 characters long
4796 % for the sake of vms.
4799 \expandafter\chardef\csname#1indfile
\endcsname=
0
4800 \expandafter\xdef\csname#1index
\endcsname{% % Define @#1index
4801 \noexpand\doindex{#1}}
4804 % @defindex foo == \newindex{foo}
4806 \def\defindex{\parsearg\newindex}
4808 % Define @defcodeindex, like @defindex except put all entries in @code.
4810 \def\defcodeindex{\parsearg\newcodeindex}
4812 \def\newcodeindex#1{%
4813 \expandafter\chardef\csname#1indfile
\endcsname=
0
4814 \expandafter\xdef\csname#1index
\endcsname{%
4815 \noexpand\docodeindex{#1}}%
4818 % The default indices:
4819 \newindex{cp
}% concepts,
4820 \newcodeindex{fn
}% functions,
4821 \newcodeindex{vr
}% variables,
4822 \newcodeindex{tp
}% types,
4823 \newcodeindex{ky
}% keys
4824 \newcodeindex{pg
}% and programs.
4827 % @synindex foo bar makes index foo feed into index bar.
4828 % Do this instead of @defindex foo if you don't want it as a separate index.
4830 % @syncodeindex foo bar similar, but put all entries made for index foo
4833 \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}}
4834 \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}}
4836 % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo),
4837 % #3 the target index (bar).
4838 \def\dosynindex#1#2#3{%
4839 \requireopenindexfile{#3}%
4840 % redefine \fooindfile:
4841 \expandafter\let\expandafter\temp\expandafter=
\csname#3indfile
\endcsname
4842 \expandafter\let\csname#2indfile
\endcsname=
\temp
4843 % redefine \fooindex:
4844 \expandafter\xdef\csname#2index
\endcsname{\noexpand#1{#3}}%
4847 % Define \doindex, the driver for all index macros.
4848 % Argument #1 is generated by the calling \fooindex macro,
4849 % and it is the two-letter name of the index.
4851 \def\doindex#1{\edef\indexname{#1}\parsearg\doindexxxx}
4852 \def\doindexxxx #1{\doind{\indexname}{#1}}
4854 % like the previous two, but they put @code around the argument.
4855 \def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx}
4856 \def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}}
4859 % Used when writing an index entry out to an index file to prevent
4860 % expansion of Texinfo commands that can appear in an index entry.
4863 \escapechar = `\\
% use backslash in output files.
4864 \definedummyletter\@
%
4865 \definedummyletter\
%
4867 % For texindex which always views { and } as separators.
4868 \def\
{{\lbracechar{}}%
4869 \def\
}{\rbracechar{}}%
4871 % Do the redefinitions.
4875 % Used for the aux and toc files, where @ is the escape character.
4878 \definedummyletter\@
%
4879 \definedummyletter\
%
4880 \definedummyletter\
{%
4881 \definedummyletter\
}%
4883 % Do the redefinitions.
4888 % \definedummyword defines \#1 as \string\#1\space, thus effectively
4889 % preventing its expansion. This is used only for control words,
4890 % not control letters, because the \space would be incorrect for
4891 % control characters, but is needed to separate the control word
4892 % from whatever follows.
4894 % These can be used both for control words that take an argument and
4895 % those that do not. If it is followed by {arg} in the input, then
4896 % that will dutifully get written to the index (or wherever).
4898 % For control letters, we have \definedummyletter, which omits the
4901 \def\definedummyword #1{\def#1{\string#1\space}}%
4902 \def\definedummyletter#1{\def#1{\string#1}}%
4903 \let\definedummyaccent\definedummyletter
4905 % Called from \indexdummies and \atdummies, to effectively prevent
4906 % the expansion of commands.
4908 \def\definedummies{%
4910 \let\commondummyword\definedummyword
4911 \let\commondummyletter\definedummyletter
4912 \let\commondummyaccent\definedummyaccent
4913 \commondummiesnofonts
4915 \definedummyletter\_%
4916 \definedummyletter\-
%
4918 % Non-English letters.
4929 \definedummyword\exclamdown
4933 \definedummyword\ordf
4934 \definedummyword\ordm
4935 \definedummyword\questiondown
4939 % Although these internal commands shouldn't show up, sometimes they do.
4941 \definedummyword\gtr
4942 \definedummyword\hat
4943 \definedummyword\less
4946 \definedummyword\tclose
4949 \definedummyword\LaTeX
4950 \definedummyword\TeX
4952 % Assorted special characters.
4953 \definedummyword\atchar
4954 \definedummyword\arrow
4955 \definedummyword\bullet
4956 \definedummyword\comma
4957 \definedummyword\copyright
4958 \definedummyword\registeredsymbol
4959 \definedummyword\dots
4960 \definedummyword\enddots
4961 \definedummyword\entrybreak
4962 \definedummyword\equiv
4963 \definedummyword\error
4964 \definedummyword\euro
4965 \definedummyword\expansion
4966 \definedummyword\geq
4967 \definedummyword\guillemetleft
4968 \definedummyword\guillemetright
4969 \definedummyword\guilsinglleft
4970 \definedummyword\guilsinglright
4971 \definedummyword\lbracechar
4972 \definedummyword\leq
4973 \definedummyword\mathopsup
4974 \definedummyword\minus
4975 \definedummyword\ogonek
4976 \definedummyword\pounds
4977 \definedummyword\point
4978 \definedummyword\print
4979 \definedummyword\quotedblbase
4980 \definedummyword\quotedblleft
4981 \definedummyword\quotedblright
4982 \definedummyword\quoteleft
4983 \definedummyword\quoteright
4984 \definedummyword\quotesinglbase
4985 \definedummyword\rbracechar
4986 \definedummyword\result
4987 \definedummyword\sub
4988 \definedummyword\sup
4989 \definedummyword\textdegree
4991 % We want to disable all macros so that they are not expanded by \write.
4993 \let\value\dummyvalue
4995 \normalturnoffactive
4998 % \commondummiesnofonts: common to \definedummies and \indexnofonts.
4999 % Define \commondummyletter, \commondummyaccent and \commondummyword before
5000 % using. Used for accents, font commands, and various control letters.
5002 \def\commondummiesnofonts{%
5003 % Control letters and accents.
5004 \commondummyletter\!
%
5005 \commondummyaccent\"
%
5006 \commondummyaccent\'
%
5007 \commondummyletter\*
%
5008 \commondummyaccent\,
%
5009 \commondummyletter\.
%
5010 \commondummyletter\/
%
5011 \commondummyletter\:
%
5012 \commondummyaccent\=
%
5013 \commondummyletter\?
%
5014 \commondummyaccent\^
%
5015 \commondummyaccent\`
%
5016 \commondummyaccent\~
%
5020 \commondummyword\dotaccent
5021 \commondummyword\ogonek
5022 \commondummyword\ringaccent
5023 \commondummyword\tieaccent
5024 \commondummyword\ubaraccent
5025 \commondummyword\udotaccent
5026 \commondummyword\dotless
5028 % Texinfo font commands.
5032 \commondummyword\sansserif
5034 \commondummyword\slanted
5037 % Commands that take arguments.
5038 \commondummyword\abbr
5039 \commondummyword\acronym
5040 \commondummyword\anchor
5041 \commondummyword\cite
5042 \commondummyword\code
5043 \commondummyword\command
5044 \commondummyword\dfn
5045 \commondummyword\dmn
5046 \commondummyword\email
5047 \commondummyword\emph
5048 \commondummyword\env
5049 \commondummyword\file
5050 \commondummyword\image
5051 \commondummyword\indicateurl
5052 \commondummyword\inforef
5053 \commondummyword\kbd
5054 \commondummyword\key
5055 \commondummyword\math
5056 \commondummyword\option
5057 \commondummyword\pxref
5058 \commondummyword\ref
5059 \commondummyword\samp
5060 \commondummyword\strong
5061 \commondummyword\tie
5063 \commondummyword\uref
5064 \commondummyword\url
5065 \commondummyword\var
5066 \commondummyword\verb
5068 \commondummyword\xref
5071 % For testing: output @{ and @} in index sort strings as \{ and \}.
5072 \newif\ifusebracesinindexes
5074 \let\indexlbrace\relax
5075 \let\indexrbrace\relax
5079 @gdef@backslashdisappear
{@def\
{}}
5086 \gdef\indexnonalnumdisappear{%
5087 \expandafter\ifx\csname SETtxiindexlquoteignore
\endcsname\relax\else
5088 % @set txiindexlquoteignore makes us ignore left quotes in the sort term.
5089 % (Introduced for FSFS 2nd ed.)
5093 \expandafter\ifx\csname SETtxiindexbackslashignore
\endcsname\relax\else
5097 \expandafter\ifx\csname SETtxiindexhyphenignore
\endcsname\relax\else
5100 \expandafter\ifx\csname SETtxiindexlessthanignore
\endcsname\relax\else
5103 \expandafter\ifx\csname SETtxiindexatsignignore
\endcsname\relax\else
5108 \gdef\indexnonalnumreappear{%
5117 % \indexnofonts is used when outputting the strings to sort the index
5118 % by, and when constructing control sequence names. It eliminates all
5119 % control sequences and just writes whatever the best ASCII sort string
5120 % would be for a given command (usually its argument).
5123 % Accent commands should become @asis.
5124 \def\commondummyaccent#
#1{\let#
#1\asis}%
5125 % We can just ignore other control letters.
5126 \def\commondummyletter#
#1{\let#
#1\empty}%
5127 % All control words become @asis by default; overrides below.
5128 \let\commondummyword\commondummyaccent
5129 \commondummiesnofonts
5131 % Don't no-op \tt, since it isn't a user-level command
5132 % and is used in the definitions of the active chars like <, >, |, etc.
5133 % Likewise with the other plain tex font commands.
5138 \def\_{\normalunderscore}%
5139 \def\-
{}% @- shouldn't affect sorting
5141 \uccode`
\1=`\
{ \uppercase{\def\
{{1}}%
5142 \uccode`
\1=`\
} \uppercase{\def\
}{1}}%
5146 % Non-English letters.
5163 \def\questiondown{?
}%
5170 % Assorted special characters. \defglyph gives the control sequence a
5171 % definition that removes the {} that follows its use.
5172 \defglyph\atchar{@
}%
5173 \defglyph\arrow{->
}%
5174 \defglyph\bullet{bullet
}%
5176 \defglyph\copyright{copyright
}%
5177 \defglyph\dots{...
}%
5178 \defglyph\enddots{...
}%
5179 \defglyph\equiv{==
}%
5180 \defglyph\error{error
}%
5181 \defglyph\euro{euro
}%
5182 \defglyph\expansion{==>
}%
5184 \defglyph\guillemetleft{<<
}%
5185 \defglyph\guillemetright{>>
}%
5186 \defglyph\guilsinglleft{<
}%
5187 \defglyph\guilsinglright{>
}%
5189 \defglyph\lbracechar{\
{}%
5192 \defglyph\pounds{pounds
}%
5193 \defglyph\print{-|
}%
5194 \defglyph\quotedblbase{"
}%
5195 \defglyph\quotedblleft{"
}%
5196 \defglyph\quotedblright{"
}%
5197 \defglyph\quoteleft{`
}%
5198 \defglyph\quoteright{'
}%
5199 \defglyph\quotesinglbase{,
}%
5200 \defglyph\rbracechar{\
}}%
5201 \defglyph\registeredsymbol{R
}%
5202 \defglyph\result{=>
}%
5203 \defglyph\textdegree{o
}%
5205 % We need to get rid of all macros, leaving only the arguments (if present).
5206 % Of course this is not nearly correct, but it is the best we can do for now.
5207 % makeinfo does not expand macros in the argument to @deffn, which ends up
5208 % writing an index entry, and texindex isn't prepared for an index sort entry
5209 % that starts with \.
5211 % Since macro invocations are followed by braces, we can just redefine them
5212 % to take a single TeX argument. The case of a macro invocation that
5213 % goes to end-of-line is not handled.
5216 \let\value\indexnofontsvalue
5218 \def\defglyph#1#2{\def#1#
#1{#2}} % see above
5223 \let\SETmarginindex=
\relax % put index entries in margin (undocumented)?
5225 % Most index entries go through here, but \dosubind is the general case.
5226 % #1 is the index name, #2 is the entry text.
5227 \def\doind#1#2{\dosubind{#1}{#2}{}}
5229 % There is also \dosubind {index}{topic}{subtopic}
5230 % which makes an entry in a two-level index such as the operation index.
5231 % TODO: Two-level index? Operation index?
5233 % Workhorse for all indexes.
5234 % #1 is name of index, #2 is stuff to put there, #3 is subentry --
5235 % empty if called from \doind, as we usually are (the main exception
5236 % is with most defuns, which call us directly).
5238 \def\dosubind#1#2#3{%
5241 \requireopenindexfile{#1}%
5242 % Store the main index entry text (including the third arg).
5244 % If third arg is present, precede it with a space.
5246 \ifx\thirdarg\empty \else
5247 \toks0 =
\expandafter{\the\toks0 \space #3}%
5250 \edef\writeto{\csname#1indfile
\endcsname}%
5252 \safewhatsit\dosubindwrite
5257 % Check if an index file has been opened, and if not, open it.
5258 \def\requireopenindexfile#1{%
5259 \ifnum\csname #1indfile
\endcsname=
0
5260 \expandafter\newwrite \csname#1indfile
\endcsname
5262 % A .fls suffix would conflict with the file extension for the output
5263 % of -recorder, so use .f1s instead.
5264 \ifx\suffix\indexisfl\def\suffix{f1
}\fi
5266 \immediate\openout\csname#1indfile
\endcsname \jobname.
\suffix
5267 % Using \immediate above here prevents an object entering into the current
5268 % box, which could confound checks such as those in \safewhatsit for
5270 \typeout{Writing index file
\jobname.
\suffix}%
5274 % Output \ as {\indexbackslash}, because \ is an escape character in
5276 \let\indexbackslash=
\relax
5277 {\catcode`\@=
0 \catcode`\\=
\active
5278 @gdef@useindexbackslash
{@def\
{{@indexbackslash
}}}
5281 % Definition for writing index entry text.
5282 \def\sortas#1{\ignorespaces}%
5284 % Definition for writing index entry sort key. Should occur at the at
5285 % the beginning of the index entry, like
5286 % @cindex @sortas{september} \september
5287 % The \ignorespaces takes care of following space, but there's no way
5288 % to remove space before it.
5291 \gdef\indexwritesortas{%
5293 \indexnonalnumreappear
5294 \indexwritesortasxxx}
5295 \gdef\indexwritesortasxxx#1{%
5296 \xdef\indexsortkey{#1}\endgroup}
5300 % Write the entry in \toks0 to the index file.
5302 \def\dosubindwrite{%
5303 % Put the index entry in the margin if desired.
5304 \ifx\SETmarginindex\relax\else
5305 \insert\margin{\hbox{\vrule height8pt depth3pt width0pt
\the\toks0}}%
5308 % Remember, we are within a group.
5309 \indexdummies % Must do this here, since \bf, etc expand at this stage
5310 \useindexbackslash % \indexbackslash isn't defined now so it will be output
5311 % as is; and it will print as backslash.
5312 % The braces around \indexbrace are recognized by texindex.
5314 % Get the string to sort by, by processing the index entry with all
5315 % font commands turned off.
5317 \def\lbracechar{{\indexlbrace}}%
5318 \def\rbracechar{{\indexrbrace}}%
5321 \indexnonalnumdisappear
5322 \xdef\indexsortkey{}%
5323 \let\sortas=
\indexwritesortas
5324 \edef\temp{\the\toks0}%
5325 \setbox\dummybox =
\hbox{\temp}% Make sure to execute any \sortas
5326 \ifx\indexsortkey\empty
5327 \xdef\indexsortkey{\temp}%
5328 \ifx\indexsortkey\empty\xdef\indexsortkey{ }\fi
5332 % Set up the complete index entry, with both the sort key and
5333 % the original text, including any font commands. We write
5334 % three arguments to \entry to the .?? file (four in the
5335 % subentry case), texindex reduces to two when writing the .??s
5339 \string\entry{\indexsortkey}{\noexpand\folio}{\the\toks0}}%
5343 \newbox\dummybox % used above
5345 % Take care of unwanted page breaks/skips around a whatsit:
5347 % If a skip is the last thing on the list now, preserve it
5348 % by backing up by \lastskip, doing the \write, then inserting
5349 % the skip again. Otherwise, the whatsit generated by the
5350 % \write or \pdfdest will make \lastskip zero. The result is that
5351 % sequences like this:
5355 % will have extra space inserted, because the \medbreak in the
5356 % start of the @defun won't see the skip inserted by the @end of
5357 % the previous defun.
5359 % But don't do any of this if we're not in vertical mode. We
5360 % don't want to do a \vskip and prematurely end a paragraph.
5362 % Avoid page breaks due to these extra skips, too.
5364 % But wait, there is a catch there:
5365 % We'll have to check whether \lastskip is zero skip. \ifdim is not
5366 % sufficient for this purpose, as it ignores stretch and shrink parts
5367 % of the skip. The only way seems to be to check the textual
5368 % representation of the skip.
5370 % The following is almost like \def\zeroskipmacro{0.0pt} except that
5371 % the ``p'' and ``t'' characters have catcode \other, not 11 (letter).
5373 \edef\zeroskipmacro{\expandafter\the\csname z@skip
\endcsname}
5375 \newskip\whatsitskip
5376 \newcount\whatsitpenalty
5380 \def\safewhatsit#1{\ifhmode
5383 % \lastskip and \lastpenalty cannot both be nonzero simultaneously.
5384 \whatsitskip =
\lastskip
5385 \edef\lastskipmacro{\the\lastskip}%
5386 \whatsitpenalty =
\lastpenalty
5388 % If \lastskip is nonzero, that means the last item was a
5389 % skip. And since a skip is discardable, that means this
5390 % -\whatsitskip glue we're inserting is preceded by a
5391 % non-discardable item, therefore it is not a potential
5392 % breakpoint, therefore no \nobreak needed.
5393 \ifx\lastskipmacro\zeroskipmacro
5400 \ifx\lastskipmacro\zeroskipmacro
5401 % If \lastskip was zero, perhaps the last item was a penalty, and
5402 % perhaps it was >=10000, e.g., a \nobreak. In that case, we want
5403 % to re-insert the same penalty (values >10000 are used for various
5404 % signals); since we just inserted a non-discardable item, any
5405 % following glue (such as a \parskip) would be a breakpoint. For example:
5406 % @deffn deffn-whatever
5407 % @vindex index-whatever
5409 % would allow a break between the index-whatever whatsit
5410 % and the "Description." paragraph.
5411 \ifnum\whatsitpenalty>
9999 \penalty\whatsitpenalty \fi
5413 % On the other hand, if we had a nonzero \lastskip,
5414 % this make-up glue would be preceded by a non-discardable item
5415 % (the whatsit from the \write), so we must insert a \nobreak.
5416 \nobreak\vskip\whatsitskip
5420 % The index entry written in the file actually looks like
5421 % \entry {sortstring}{page}{topic}
5423 % \entry {sortstring}{page}{topic}{subtopic}
5424 % The texindex program reads in these files and writes files
5425 % containing these kinds of lines:
5427 % before the first topic whose initial is c
5428 % \entry {topic}{pagelist}
5429 % for a topic that is used without subtopics
5431 % for the beginning of a topic that is used with subtopics
5432 % \secondary {subtopic}{pagelist}
5433 % for each subtopic.
5435 % Define the user-accessible indexing commands
5436 % @findex, @vindex, @kindex, @cindex.
5438 \def\findex {\fnindex}
5439 \def\kindex {\kyindex}
5440 \def\cindex {\cpindex}
5441 \def\vindex {\vrindex}
5442 \def\tindex {\tpindex}
5443 \def\pindex {\pgindex}
5445 \def\cindexsub {\begingroup\obeylines\cindexsub}
5447 \gdef\cindexsub "
#1"
#2^^M
{\endgroup %
5448 \dosubind{cp
}{#2}{#1}}}
5450 % Define the macros used in formatting output of the sorted index material.
5452 % @printindex causes a particular index (the ??s file) to get printed.
5453 % It does not print any chapter heading (usually an @unnumbered).
5455 \parseargdef\printindex{\begingroup
5456 \dobreak \chapheadingskip{10000}%
5461 \everypar =
{}% don't want the \kern\-parindent from indentation suppression.
5463 % See if the index file exists and is nonempty.
5464 % Change catcode of @ here so that if the index file contains
5466 % as its first line, TeX doesn't complain about mismatched braces
5467 % (because it thinks @} is a control sequence).
5469 % See comment in \requireopenindexfile.
5470 \def\indexname{#1}\ifx\indexname\indexisfl\def\indexname{f1
}\fi
5471 \openin 1 \jobname.
\indexname s
5473 % \enddoublecolumns gets confused if there is no text in the index,
5474 % and it loses the chapter title and the aux file entries for the
5475 % index. The easiest way to prevent this problem is to make sure
5476 % there is some text.
5477 \putwordIndexNonexistent
5478 \typeout{No file
\jobname.
\indexname s.
}%
5482 % If the index file exists but is empty, then \openin leaves \ifeof
5483 % false. We have to make TeX try to read something from the file, so
5484 % it can discover if there is anything in it.
5485 \read 1 to
\thisline
5487 \putwordIndexIsEmpty
5489 % Index files are almost Texinfo source, but we use \ as the escape
5490 % character. It would be better to use @, but that's too big a change
5491 % to make right now.
5492 \def\indexbackslash{\ttbackslash}%
5493 \let\indexlbrace\
{ % Likewise, set these sequences for braces
5494 \let\indexrbrace\
} % used in the sort key.
5496 \let\dotheinsertentrybox\dotheinsertentryboxwithpenalty
5498 % Read input from the index file line by line.
5501 \read 1 to
\nextline
5504 \indexinputprocessing
5508 \let\thisline\nextline
5516 \def\loopdo#1\repeat{\def\body{#1}\loopdoxxx}
5517 \def\loopdoxxx{\let\next=
\relax\body\let\next=
\loopdoxxx\fi\next}
5519 \def\indexinputprocessing{%
5521 \let\firsttoken\relax
5523 \edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}%
5527 \def\getfirsttoken#1{\expandafter\getfirsttokenx#1\endfirsttoken}
5528 \long\def\getfirsttokenx#1#2\endfirsttoken{\noexpand#1}
5531 % These macros are used by the sorted index file itself.
5532 % Change them to control the appearance of the index.
5534 {\catcode`\/=
13 \catcode`\-=
13 \catcode`\^=
13 \catcode`\~=
13 \catcode`
\_=
13
5535 \catcode`\|=
13 \catcode`\<=
13 \catcode`\>=
13 \catcode`\+=
13 \catcode`\"=
13
5537 \gdef\initialglyphs{%
5538 % Some changes for non-alphabetic characters. Using the glyphs from the
5539 % math fonts looks more consistent than the typewriter font used elsewhere
5540 % for these characters.
5541 \def\indexbackslash{\math{\backslash}}%
5542 \let\\=
\indexbackslash
5544 % Can't get bold backslash so don't use bold forward slash
5546 \def/
{{\secrmnotbold \normalslash}}%
5547 \def-
{{\normaldash\normaldash}}% en dash `--'
5548 \def^
{{\chapbf \normalcaret}}%
5549 \def~
{{\chapbf \normaltilde}}%
5551 \leavevmode \kern.07em
\vbox{\hrule width
.3em height
.1ex
}\kern .07em
}%
5555 \def+
{$
\normalplus$
}%
5565 % Remove any glue we may have, we'll be inserting our own.
5568 % We like breaks before the index initials, so insert a bonus.
5569 % The glue before the bonus allows a little bit of space at the
5570 % bottom of a column to reduce an increase in inter-line spacing.
5572 \vskip 0pt plus
5\baselineskip
5574 \vskip 0pt plus -
5\baselineskip
5576 % Typeset the initial. Making this add up to a whole number of
5577 % baselineskips increases the chance of the dots lining up from column
5578 % to column. It still won't often be perfect, because of the stretch
5579 % we need before each entry, but it's better.
5581 % No shrink because it confuses \balancecolumns.
5582 \vskip 1.67\baselineskip plus
1\baselineskip
5583 \leftline{\secfonts \kern-
0.05em
\secbf #1}%
5584 % \secfonts is inside the argument of \leftline so that the change of
5585 % \baselineskip will not affect any glue inserted before the vbox that
5586 % \leftline creates.
5587 % Do our best not to break after the initial.
5589 \vskip .33\baselineskip plus
.1\baselineskip
5590 \egroup % \initialglyphs
5593 \newdimen\entryrightmargin
5594 \entryrightmargin=
0pt
5596 % \entry typesets a paragraph consisting of the text (#1), dot leaders, and
5597 % then page number (#2) flushed to the right margin. It is used for index
5598 % and table of contents entries. The paragraph is indented by \leftskip.
5603 % For pdfTeX and XeTeX.
5604 % The redefinition of \domark stops marks being added in \pdflink to
5605 % preserve coloured links across page boundaries. Otherwise the marks
5606 % would get in the way of \lastbox in \insertentrybox.
5609 % Start a new paragraph if necessary, so our assignments below can't
5610 % affect previous text.
5613 % No extra space above this paragraph.
5616 % When reading the text of entry, convert explicit line breaks
5617 % from @* into spaces. The user might give these in long section
5618 % titles, for instance.
5619 \def\*
{\unskip\space\ignorespaces}%
5620 \def\entrybreak{\hfil\break}% An undocumented command
5622 % Swallow the left brace of the text (first parameter):
5623 \afterassignment\doentry
5626 \def\entrybreak{\unskip\space\ignorespaces}%
5628 % Save the text of the entry
5629 \global\setbox\boxA=
\hbox\bgroup
5630 \bgroup % Instead of the swallowed brace.
5632 \aftergroup\finishentry
5633 % And now comes the text of the entry.
5634 % Not absorbing as a macro argument reduces the chance of problems
5635 % with catcodes occurring.
5638 \gdef\finishentry#1{%
5640 \dimen@ =
\wd\boxA % Length of text of entry
5641 \global\setbox\boxA=
\hbox\bgroup\unhbox\boxA
5642 % #1 is the page number.
5644 % Get the width of the page numbers, and only use
5645 % leaders if they are present.
5646 \global\setbox\boxB =
\hbox{#1}%
5647 \ifdim\wd\boxB =
0pt
5648 \null\nobreak\hfill\
%
5651 \null\nobreak\indexdotfill % Have leaders before the page number.
5655 \hskip\skip\thinshrinkable\the\toksA
5657 \ifx\XeTeXrevision\thisisundefined
5658 \hskip\skip\thinshrinkable #1%
5661 \hskip\skip\thinshrinkable\the\toksA
5666 \ifdim\wd\boxB =
0pt
5667 \global\setbox\entrybox=
\vbox{\unhbox\boxA}%
5669 \global\setbox\entrybox=
\vbox\bgroup
5670 % We want the text of the entries to be aligned to the left, and the
5671 % page numbers to be aligned to the right.
5674 \advance\leftskip by
0pt plus
1fil
5675 \advance\leftskip by
0pt plus -
1fill
5676 \rightskip =
0pt plus -
1fil
5677 \advance\rightskip by
0pt plus
1fill
5678 % Cause last line, which could consist of page numbers on their own
5679 % if the list of page numbers is long, to be aligned to the right.
5680 \parfillskip=
0pt plus -
1fill
5682 \advance\rightskip by
\entryrightmargin
5683 % Determine how far we can stretch into the margin.
5684 % This allows, e.g., "Appendix H GNU Free Documentation License" to
5685 % fit on one line in @letterpaper format.
5686 \ifdim\entryrightmargin>
2.1em
5691 \advance \parfillskip by
0pt minus
1\dimen@i
5694 \advance\dimen@ii by -
1\leftskip
5695 \advance\dimen@ii by -
1\entryrightmargin
5696 \advance\dimen@ii by
1\dimen@i
5697 \ifdim\wd\boxA >
\dimen@ii
% If the entry doesn't fit in one line
5698 \ifdim\dimen@ >
0.8\dimen@ii
% due to long index text
5699 \dimen@ =
0.7\dimen@
% Try to split the text roughly evenly
5701 \ifnum\dimen@>
\dimen@ii
5702 % If the entry is too long, use the whole line
5705 \advance\leftskip by
0pt plus
1fill
% ragged right
5706 \advance \dimen@ by
1\rightskip
5707 \parshape =
2 0pt
\dimen@
0em
\dimen@ii
5708 % Ideally we'd add a finite glue at the end of the first line only,
5709 % instead of using \parshape with explicit line lengths, but TeX
5710 % doesn't seem to provide a way to do such a thing.
5715 \indent % start paragraph
5718 % Do not prefer a separate line ending with a hyphen to fewer lines.
5719 \finalhyphendemerits =
0
5721 % Word spacing - no stretch
5722 \spaceskip=
\fontdimen2\font minus
\fontdimen4\font
5724 \linepenalty=
1000 % Discourage line breaks.
5725 \hyphenpenalty=
5000 % Discourage hyphenation.
5727 \par % format the paragraph
5731 \dotheinsertentrybox
5734 \newskip\thinshrinkable
5735 \skip\thinshrinkable=
.15em minus
.15em
5738 \def\insertentrybox{%
5742 % default definition
5743 \let\dotheinsertentrybox\insertentrybox
5745 % Use \lastbox to take apart vbox box by box, and add each sub-box
5746 % to the current vertical list.
5748 \bgroup % for local binding of \delayedbox
5749 % Remove the last box from box #1
5750 \global\setbox#1=
\vbox{%
5752 \unskip % remove any glue
5754 \global\setbox\interbox=
\lastbox
5756 \setbox\delayedbox=
\box\interbox
5757 \ifdim\ht#1=
0pt
\else
5758 \ourunvbox#1 % Repeat on what's left of the box
5767 % Used from \printindex. \firsttoken should be the first token
5768 % after the \entry. If it's not another \entry, we are at the last
5769 % line of a group of index entries, so insert a penalty to discourage
5770 % widowed index entries.
5771 \def\dotheinsertentryboxwithpenalty{%
5772 \ifx\firsttoken\isentry
5778 \def\isentry{\entry}%
5780 % Like plain.tex's \dotfill, except uses up at least 1 em.
5781 % The filll stretch here overpowers both the fil and fill stretch to push
5782 % the page number to the right.
5783 \def\indexdotfill{\cleaders
5784 \hbox{$
\mathsurround=
0pt
\mkern1.5mu.
\mkern1.5mu$
}\hskip 1em plus
1filll
}
5787 \def\primary #1{\line{#1\hfil}}
5789 \newskip\secondaryindent \secondaryindent=
0.5cm
5790 \def\secondary#1#2{{%
5795 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill
5797 \pdfgettoks#2.\
\the\toksA % The page number ends the paragraph.
5799 \ifx\XeTeXrevision\thisisundefined
5802 \pdfgettoks#2.\
\the\toksA % The page number ends the paragraph.
5808 % Define two-column mode, which we use to typeset indexes.
5809 % Adapted from the TeXbook, page 416, which is to say,
5810 % the manmac.tex format used to print the TeXbook itself.
5811 \catcode`\@=
11 % private names
5814 \newdimen\doublecolumnhsize
5816 % Use inside an output routine to save \topmark and \firstmark
5818 \global\savedtopmark=
\expandafter{\topmark }%
5819 \global\savedfirstmark=
\expandafter{\firstmark }%
5821 \newtoks\savedtopmark
5822 \newtoks\savedfirstmark
5824 % Set \topmark and \firstmark for next time \output runs.
5825 % Can't be run from withinside \output (because any material
5826 % added while an output routine is active, including
5827 % penalties, is saved for after it finishes). The page so far
5828 % should be empty, otherwise what's on it will be thrown away.
5830 \mark{\the\savedtopmark}%
5832 \setbox\dummybox=
\box\PAGE
5834 % "abc" because output routine doesn't fire for a completely empty page.
5835 \mark{\the\savedfirstmark}%
5838 \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
5839 % If not much space left on page, start a new page.
5840 \ifdim\pagetotal>
0.8\vsize\vfill\eject\fi
5842 % Grab any single-column material above us.
5845 % Here is a possibility not foreseen in manmac: if we accumulate a
5846 % whole lot of material, we might end up calling this \output
5847 % routine twice in a row (see the doublecol-lose test, which is
5848 % essentially a couple of indexes with @setchapternewpage off). In
5849 % that case we just ship out what is in \partialpage with the normal
5850 % output routine. Generally, \partialpage will be empty when this
5851 % runs and this will be a no-op. See the indexspread.tex test case.
5852 \ifvoid\partialpage \else
5853 \onepageout{\pagecontents\partialpage}%
5856 \global\setbox\partialpage =
\vbox{%
5857 % Unvbox the main output page.
5859 \kern-
\topskip \kern\baselineskip
5863 \eject % run that output routine to set \partialpage
5866 % We recover the two marks that the last output routine saved in order
5867 % to propagate the information in marks added around a chapter heading,
5868 % which could be otherwise be lost by the time the final page is output.
5871 % Use the double-column output routine for subsequent pages.
5872 \output =
{\doublecolumnout}%
5874 % Change the page size parameters. We could do this once outside this
5875 % routine, in each of @smallbook, @afourpaper, and the default 8.5x11
5876 % format, but then we repeat the same computation. Repeating a couple
5877 % of assignments once per index is clearly meaningless for the
5878 % execution time, so we may as well do it in one place.
5880 % First we halve the line length, less a little for the gutter between
5881 % the columns. We compute the gutter based on the line length, so it
5882 % changes automatically with the paper format. The magic constant
5883 % below is chosen so that the gutter has the same value (well, +-<1pt)
5884 % as it did when we hard-coded it.
5886 % We put the result in a separate register, \doublecolumhsize, so we
5887 % can restore it in \pagesofar, after \hsize itself has (potentially)
5890 \doublecolumnhsize =
\hsize
5891 \advance\doublecolumnhsize by -
.04154\hsize
5892 \divide\doublecolumnhsize by
2
5893 \hsize =
\doublecolumnhsize
5895 % Double the \vsize as well.
5896 \advance\vsize by -
\ht\partialpage
5899 % For the benefit of balancing columns
5900 \advance\baselineskip by
0pt plus
0.5pt
5903 % The double-column output routine for all double-column pages except
5904 % the last, which is done by \balancecolumns.
5906 \def\doublecolumnout{%
5908 \splittopskip=
\topskip \splitmaxdepth=
\maxdepth
5909 % Get the available space for the double columns -- the normal
5910 % (undoubled) page height minus any material left over from the
5915 % box0 will be the left-hand column, box2 the right.
5916 \setbox0=
\vsplit\PAGE to
\dimen@
\setbox2=
\vsplit\PAGE to
\dimen@
5917 \global\advance\vsize by
2\ht\partialpage
5918 \onepageout\pagesofar
5920 \penalty\outputpenalty
5923 % Re-output the contents of the output page -- any previous material,
5924 % followed by the two boxes we just split, in box0 and box2.
5928 \hsize =
\doublecolumnhsize
5929 \wd0=
\hsize \wd2=
\hsize
5930 \hbox to
\txipagewidth{\box0\hfil\box2}%
5934 % Finished with with double columns.
5935 \def\enddoublecolumns{%
5936 % The following penalty ensures that the page builder is exercised
5937 % _before_ we change the output routine. This is necessary in the
5938 % following situation:
5940 % The last section of the index consists only of a single entry.
5941 % Before this section, \pagetotal is less than \pagegoal, so no
5942 % break occurs before the last section starts. However, the last
5943 % section, consisting of \initial and the single \entry, does not
5944 % fit on the page and has to be broken off. Without the following
5945 % penalty the page builder will not be exercised until \eject
5946 % below, and by that time we'll already have changed the output
5947 % routine to the \balancecolumns version, so the next-to-last
5948 % double-column page will be processed with \balancecolumns, which
5949 % is wrong: The two columns will go to the main vertical list, with
5950 % the broken-off section in the recent contributions. As soon as
5951 % the output routine finishes, TeX starts reconsidering the page
5952 % break. The two columns and the broken-off section both fit on the
5953 % page, because the two columns now take up only half of the page
5954 % goal. When TeX sees \eject from below which follows the final
5955 % section, it invokes the new output routine that we've set after
5956 % \balancecolumns below; \onepageout will try to fit the two columns
5957 % and the final section into the vbox of \txipageheight (see
5958 % \pagebody), causing an overfull box.
5960 % Note that glue won't work here, because glue does not exercise the
5961 % page builder, unlike penalties (see The TeXbook, pp. 280-281).
5965 % Split the last of the double-column material.
5969 % Having called \balancecolumns once, we do not
5970 % want to call it again. Therefore, reset \output to its normal
5971 % definition right away.
5972 \global\output =
{\onepageout{\pagecontents\PAGE}}%
5975 \endgroup % started in \begindoublecolumns
5977 % Leave the double-column material on the current page, no automatic
5979 \box\balancedcolumns
5981 % \pagegoal was set to the doubled \vsize above, since we restarted
5982 % the current page. We're now back to normal single-column
5983 % typesetting, so reset \pagegoal to the normal \vsize.
5984 \global\vsize =
\txipageheight %
5985 \pagegoal =
\txipageheight %
5987 \newbox\balancedcolumns
5988 \setbox\balancedcolumns=
\vbox{shouldnt see this
}%
5990 % Only called for the last of the double column material. \doublecolumnout
5992 \def\balancecolumns{%
5993 \setbox0 =
\vbox{\unvbox\PAGE}% like \box255 but more efficient, see p.120.
5995 \advance\dimen@ by
\topskip
5996 \advance\dimen@ by-
\baselineskip
5997 \ifdim\dimen@<
5\baselineskip
5998 % Don't split a short final column in two.
6001 \divide\dimen@ by
2 % target to split to
6003 \splittopskip =
\topskip
6004 % Loop until left column is at least as high as the right column.
6008 \global\setbox3 =
\copy0
6009 \global\setbox1 =
\vsplit3 to
\dimen@
6011 \global\advance\dimen@ by
1pt
6014 % Now the left column is in box 1, and the right column in box 3.
6015 % Check whether the left column has come out higher than the page itself.
6016 % (Note that we have doubled \vsize for the double columns, so
6017 % the actual height of the page is 0.5\vsize).
6019 % Just split the last of the double column material roughly in half.
6021 \setbox0 =
\vsplit2 to
\dimen@ii
6022 \setbox0=
\vbox to
\dimen@ii
{\unvbox0\vfill}%
6023 \setbox2=
\vbox to
\dimen@ii
{\unvbox2\vfill}%
6025 % Compare the heights of the two columns.
6027 % Column heights are too different, so don't make their bottoms
6028 % flush with each other.
6029 \setbox2=
\vbox to
\ht1 {\unvbox3\vfill}%
6030 \setbox0=
\vbox to
\ht1 {\unvbox1\vfill}%
6032 % Make column bottoms flush with each other.
6033 \setbox2=
\vbox to
\ht1{\unvbox3\unskip}%
6034 \setbox0=
\vbox to
\ht1{\unvbox1\unskip}%
6039 \global\setbox\balancedcolumns=
\vbox{\pagesofar}%
6041 \catcode`\@ =
\other
6044 \message{sectioning,
}
6045 % Chapters, sections, etc.
6047 % Let's start with @part.
6048 \outer\parseargdef\part{\partzzz{#1}}
6052 \vskip.3\vsize % move it down on the page a bit
6054 \noindent \titlefonts\rm #1\par % the text
6055 \let\lastnode=
\empty % no node to associate with
6056 \writetocentry{part
}{#1}{}% but put it in the toc
6057 \headingsoff % no headline or footline on the part page
6058 % This outputs a mark at the end of the page that clears \thischapter
6059 % and \thissection, as is done in \startcontents.
6060 \let\pchapsepmacro\relax
6061 \chapmacro{}{Yomitfromtoc
}{}%
6066 % \unnumberedno is an oxymoron. But we count the unnumbered
6067 % sections so that we can refer to them unambiguously in the pdf
6068 % outlines by their "section number". We avoid collisions with chapter
6069 % numbers by starting them at 10000. (If a document ever has 10000
6070 % chapters, we're in trouble anyway, I'm sure.)
6071 \newcount\unnumberedno \unnumberedno =
10000
6073 \newcount\secno \secno=
0
6074 \newcount\subsecno \subsecno=
0
6075 \newcount\subsubsecno \subsubsecno=
0
6077 % This counter is funny since it counts through charcodes of letters A, B, ...
6078 \newcount\appendixno \appendixno = `\@
6080 % \def\appendixletter{\char\the\appendixno}
6081 % We do the following ugly conditional instead of the above simple
6082 % construct for the sake of pdftex, which needs the actual
6083 % letter in the expansion, not just typeset.
6085 \def\appendixletter{%
6086 \ifnum\appendixno=`A A
%
6087 \else\ifnum\appendixno=`B B
%
6088 \else\ifnum\appendixno=`C C
%
6089 \else\ifnum\appendixno=`D D
%
6090 \else\ifnum\appendixno=`E E
%
6091 \else\ifnum\appendixno=`F F
%
6092 \else\ifnum\appendixno=`G G
%
6093 \else\ifnum\appendixno=`H H
%
6094 \else\ifnum\appendixno=`I I
%
6095 \else\ifnum\appendixno=`J J
%
6096 \else\ifnum\appendixno=`K K
%
6097 \else\ifnum\appendixno=`L L
%
6098 \else\ifnum\appendixno=`M M
%
6099 \else\ifnum\appendixno=`N N
%
6100 \else\ifnum\appendixno=`O O
%
6101 \else\ifnum\appendixno=`P P
%
6102 \else\ifnum\appendixno=`Q Q
%
6103 \else\ifnum\appendixno=`R R
%
6104 \else\ifnum\appendixno=`S S
%
6105 \else\ifnum\appendixno=`T T
%
6106 \else\ifnum\appendixno=`U U
%
6107 \else\ifnum\appendixno=`V V
%
6108 \else\ifnum\appendixno=`W W
%
6109 \else\ifnum\appendixno=`X X
%
6110 \else\ifnum\appendixno=`Y Y
%
6111 \else\ifnum\appendixno=`Z Z
%
6112 % The \the is necessary, despite appearances, because \appendixletter is
6113 % expanded while writing the .toc file. \char\appendixno is not
6114 % expandable, thus it is written literally, thus all appendixes come out
6115 % with the same letter (or @) in the toc without it.
6116 \else\char\the\appendixno
6117 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
6118 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
6120 % Each @chapter defines these (using marks) as the number+name, number
6121 % and name of the chapter. Page headings and footings can use
6122 % these. @section does likewise.
6124 \def\thischapternum{}
6125 \def\thischaptername{}
6127 \def\thissectionnum{}
6128 \def\thissectionname{}
6130 \newcount\absseclevel % used to calculate proper heading level
6131 \newcount\secbase\secbase=
0 % @raisesections/@lowersections modify this count
6133 % @raisesections: treat @section as chapter, @subsection as section, etc.
6134 \def\raisesections{\global\advance\secbase by -
1}
6135 \let\up=
\raisesections % original BFox name
6137 % @lowersections: treat @chapter as section, @section as subsection, etc.
6138 \def\lowersections{\global\advance\secbase by
1}
6139 \let\down=
\lowersections % original BFox name
6141 % we only have subsub.
6142 \chardef\maxseclevel =
3
6144 % A numbered section within an unnumbered changes to unnumbered too.
6145 % To achieve this, remember the "biggest" unnum. sec. we are currently in:
6146 \chardef\unnlevel =
\maxseclevel
6148 % Trace whether the current chapter is an appendix or not:
6149 % \chapheadtype is "N" or "A", unnumbered chapters are ignored.
6150 \def\chapheadtype{N
}
6152 % Choose a heading macro
6153 % #1 is heading type
6154 % #2 is heading level
6155 % #3 is text for heading
6156 \def\genhead#1#2#3{%
6157 % Compute the abs. sec. level:
6159 \advance\absseclevel by
\secbase
6160 % Make sure \absseclevel doesn't fall outside the range:
6161 \ifnum \absseclevel <
0
6164 \ifnum \absseclevel >
3
6171 \ifnum \absseclevel <
\unnlevel
6172 \chardef\unnlevel =
\absseclevel
6175 % Check for appendix sections:
6176 \ifnum \absseclevel =
0
6177 \edef\chapheadtype{\headtype}%
6179 \if \headtype A
\if \chapheadtype N
%
6180 \errmessage{@appendix... within a non-appendix chapter
}%
6183 % Check for numbered within unnumbered:
6184 \ifnum \absseclevel >
\unnlevel
6187 \chardef\unnlevel =
3
6190 % Now print the heading:
6194 \or \unnumberedseczzz{#3}%
6195 \or \unnumberedsubseczzz{#3}%
6196 \or \unnumberedsubsubseczzz{#3}%
6202 \or \appendixsectionzzz{#3}%
6203 \or \appendixsubseczzz{#3}%
6204 \or \appendixsubsubseczzz{#3}%
6210 \or \numberedsubseczzz{#3}%
6211 \or \numberedsubsubseczzz{#3}%
6215 \suppressfirstparagraphindent
6219 \def\numhead{\genhead N
}
6220 \def\apphead{\genhead A
}
6221 \def\unnmhead{\genhead U
}
6223 % @chapter, @appendix, @unnumbered. Increment top-level counter, reset
6224 % all lower-level sectioning counters to zero.
6226 % Also set \chaplevelprefix, which we prepend to @float sequence numbers
6227 % (e.g., figures), q.v. By default (before any chapter), that is empty.
6228 \let\chaplevelprefix =
\empty
6230 \outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz
6232 % section resetting is \global in case the chapter is in a group, such
6233 % as an @include file.
6234 \global\secno=
0 \global\subsecno=
0 \global\subsubsecno=
0
6235 \global\advance\chapno by
1
6238 \gdef\chaplevelprefix{\the\chapno.
}%
6241 % \putwordChapter can contain complex things in translations.
6242 \toks0=
\expandafter{\putwordChapter}%
6243 \message{\the\toks0 \space \the\chapno}%
6245 % Write the actual heading.
6246 \chapmacro{#1}{Ynumbered
}{\the\chapno}%
6248 % So @section and the like are numbered underneath this chapter.
6249 \global\let\section =
\numberedsec
6250 \global\let\subsection =
\numberedsubsec
6251 \global\let\subsubsection =
\numberedsubsubsec
6254 \outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz
6256 \def\appendixzzz#1{%
6257 \global\secno=
0 \global\subsecno=
0 \global\subsubsecno=
0
6258 \global\advance\appendixno by
1
6259 \gdef\chaplevelprefix{\appendixletter.
}%
6262 % \putwordAppendix can contain complex things in translations.
6263 \toks0=
\expandafter{\putwordAppendix}%
6264 \message{\the\toks0 \space \appendixletter}%
6266 \chapmacro{#1}{Yappendix
}{\appendixletter}%
6268 \global\let\section =
\appendixsec
6269 \global\let\subsection =
\appendixsubsec
6270 \global\let\subsubsection =
\appendixsubsubsec
6273 % normally unnmhead0 calls unnumberedzzz:
6274 \outer\parseargdef\unnumbered{\unnmhead0{#1}}
6275 \def\unnumberedzzz#1{%
6276 \global\secno=
0 \global\subsecno=
0 \global\subsubsecno=
0
6277 \global\advance\unnumberedno by
1
6279 % Since an unnumbered has no number, no prefix for figures.
6280 \global\let\chaplevelprefix =
\empty
6283 % This used to be simply \message{#1}, but TeX fully expands the
6284 % argument to \message. Therefore, if #1 contained @-commands, TeX
6285 % expanded them. For example, in `@unnumbered The @cite{Book}', TeX
6286 % expanded @cite (which turns out to cause errors because \cite is meant
6287 % to be executed, not expanded).
6289 % Anyway, we don't want the fully-expanded definition of @cite to appear
6290 % as a result of the \message, we just want `@cite' itself. We use
6291 % \the<toks register> to achieve this: TeX expands \the<toks> only once,
6292 % simply yielding the contents of <toks register>. (We also do this for
6295 \message{(
\the\toks0)
}%
6297 \chapmacro{#1}{Ynothing
}{\the\unnumberedno}%
6299 \global\let\section =
\unnumberedsec
6300 \global\let\subsection =
\unnumberedsubsec
6301 \global\let\subsubsection =
\unnumberedsubsubsec
6304 % @centerchap is like @unnumbered, but the heading is centered.
6305 \outer\parseargdef\centerchap{%
6306 \let\centerparametersmaybe =
\centerparameters
6308 \let\centerparametersmaybe =
\relax
6311 % @top is like @unnumbered.
6316 \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz
6318 \global\subsecno=
0 \global\subsubsecno=
0 \global\advance\secno by
1
6319 \sectionheading{#1}{sec
}{Ynumbered
}{\the\chapno.
\the\secno}%
6322 % normally calls appendixsectionzzz:
6323 \outer\parseargdef\appendixsection{\apphead1{#1}}
6324 \def\appendixsectionzzz#1{%
6325 \global\subsecno=
0 \global\subsubsecno=
0 \global\advance\secno by
1
6326 \sectionheading{#1}{sec
}{Yappendix
}{\appendixletter.
\the\secno}%
6328 \let\appendixsec\appendixsection
6330 % normally calls unnumberedseczzz:
6331 \outer\parseargdef\unnumberedsec{\unnmhead1{#1}}
6332 \def\unnumberedseczzz#1{%
6333 \global\subsecno=
0 \global\subsubsecno=
0 \global\advance\secno by
1
6334 \sectionheading{#1}{sec
}{Ynothing
}{\the\unnumberedno.
\the\secno}%
6339 % normally calls numberedsubseczzz:
6340 \outer\parseargdef\numberedsubsec{\numhead2{#1}}
6341 \def\numberedsubseczzz#1{%
6342 \global\subsubsecno=
0 \global\advance\subsecno by
1
6343 \sectionheading{#1}{subsec
}{Ynumbered
}{\the\chapno.
\the\secno.
\the\subsecno}%
6346 % normally calls appendixsubseczzz:
6347 \outer\parseargdef\appendixsubsec{\apphead2{#1}}
6348 \def\appendixsubseczzz#1{%
6349 \global\subsubsecno=
0 \global\advance\subsecno by
1
6350 \sectionheading{#1}{subsec
}{Yappendix
}%
6351 {\appendixletter.
\the\secno.
\the\subsecno}%
6354 % normally calls unnumberedsubseczzz:
6355 \outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}}
6356 \def\unnumberedsubseczzz#1{%
6357 \global\subsubsecno=
0 \global\advance\subsecno by
1
6358 \sectionheading{#1}{subsec
}{Ynothing
}%
6359 {\the\unnumberedno.
\the\secno.
\the\subsecno}%
6364 % normally numberedsubsubseczzz:
6365 \outer\parseargdef\numberedsubsubsec{\numhead3{#1}}
6366 \def\numberedsubsubseczzz#1{%
6367 \global\advance\subsubsecno by
1
6368 \sectionheading{#1}{subsubsec
}{Ynumbered
}%
6369 {\the\chapno.
\the\secno.
\the\subsecno.
\the\subsubsecno}%
6372 % normally appendixsubsubseczzz:
6373 \outer\parseargdef\appendixsubsubsec{\apphead3{#1}}
6374 \def\appendixsubsubseczzz#1{%
6375 \global\advance\subsubsecno by
1
6376 \sectionheading{#1}{subsubsec
}{Yappendix
}%
6377 {\appendixletter.
\the\secno.
\the\subsecno.
\the\subsubsecno}%
6380 % normally unnumberedsubsubseczzz:
6381 \outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}}
6382 \def\unnumberedsubsubseczzz#1{%
6383 \global\advance\subsubsecno by
1
6384 \sectionheading{#1}{subsubsec
}{Ynothing
}%
6385 {\the\unnumberedno.
\the\secno.
\the\subsecno.
\the\subsubsecno}%
6388 % These macros control what the section commands do, according
6389 % to what kind of chapter we are in (ordinary, appendix, or unnumbered).
6390 % Define them by default for a numbered chapter.
6391 \let\section =
\numberedsec
6392 \let\subsection =
\numberedsubsec
6393 \let\subsubsection =
\numberedsubsubsec
6395 % Define @majorheading, @heading and @subheading
6398 {\advance\chapheadingskip by
10pt
\chapbreak }%
6399 \parsearg\chapheadingzzz
6402 \def\chapheading{\chapbreak \parsearg\chapheadingzzz}
6403 \def\chapheadingzzz#1{%
6404 \vbox{\chapfonts \raggedtitlesettings #1\par}%
6405 \nobreak\bigskip \nobreak
6406 \suppressfirstparagraphindent
6409 % @heading, @subheading, @subsubheading.
6410 \parseargdef\heading{\sectionheading{#1}{sec
}{Yomitfromtoc
}{}
6411 \suppressfirstparagraphindent}
6412 \parseargdef\subheading{\sectionheading{#1}{subsec
}{Yomitfromtoc
}{}
6413 \suppressfirstparagraphindent}
6414 \parseargdef\subsubheading{\sectionheading{#1}{subsubsec
}{Yomitfromtoc
}{}
6415 \suppressfirstparagraphindent}
6417 % These macros generate a chapter, section, etc. heading only
6418 % (including whitespace, linebreaking, etc. around it),
6419 % given all the information in convenient, parsed form.
6421 % Args are the skip and penalty (usually negative)
6422 \def\dobreak#1#2{\par\ifdim\lastskip<
#1\removelastskip\penalty#2\vskip#1\fi}
6424 % Parameter controlling skip before chapter headings (if needed)
6425 \newskip\chapheadingskip
6427 % Define plain chapter starts, and page on/off switching for it.
6428 \def\chapbreak{\dobreak \chapheadingskip {-
4000}}
6431 \def\chappager{\par\vfill\supereject}
6433 % \chapoddpage - start on an odd page for a new chapter
6434 % Because \domark is called before \chapoddpage, the filler page will
6435 % get the headings for the next chapter, which is wrong. But we don't
6436 % care -- we just disable all headings on the filler page.
6448 \parseargdef\setchapternewpage{\csname CHAPPAG
#1\endcsname}
6451 \global\let\contentsalignmacro =
\chappager
6452 \global\let\pchapsepmacro=
\chapbreak
6453 \global\let\pagealignmacro=
\chappager}
6456 \global\let\contentsalignmacro =
\chappager
6457 \global\let\pchapsepmacro=
\chappager
6458 \global\let\pagealignmacro=
\chappager
6459 \global\def\HEADINGSon{\HEADINGSsingle}}
6462 \global\let\contentsalignmacro =
\chapoddpage
6463 \global\let\pchapsepmacro=
\chapoddpage
6464 \global\let\pagealignmacro=
\chapoddpage
6465 \global\def\HEADINGSon{\HEADINGSdouble}}
6469 % \chapmacro - Chapter opening.
6471 % #1 is the text, #2 is the section type (Ynumbered, Ynothing,
6472 % Yappendix, Yomitfromtoc), #3 the chapter number.
6473 % Not used for @heading series.
6475 % To test against our argument.
6476 \def\Ynothingkeyword{Ynothing
}
6477 \def\Yappendixkeyword{Yappendix
}
6478 \def\Yomitfromtockeyword{Yomitfromtoc
}
6480 \def\chapmacro#1#2#3{%
6481 \expandafter\ifx\thisenv\titlepage\else
6482 \checkenv{}% chapters, etc., should not start inside an environment.
6484 % FIXME: \chapmacro is currently called from inside \titlepage when
6485 % \setcontentsaftertitlepage to print the "Table of Contents" heading, but
6486 % this should probably be done by \sectionheading with an option to print
6489 % Insert the first mark before the heading break (see notes for \domark).
6490 \let\prevchapterdefs=
\lastchapterdefs
6491 \let\prevsectiondefs=
\lastsectiondefs
6492 \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}%
6493 \gdef\thissection{}}%
6496 \ifx\temptype\Ynothingkeyword
6497 \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
6498 \gdef\thischapter{\thischaptername}}%
6499 \else\ifx\temptype\Yomitfromtockeyword
6500 \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
6501 \gdef\thischapter{}}%
6502 \else\ifx\temptype\Yappendixkeyword
6504 \xdef\lastchapterdefs{%
6505 \gdef\noexpand\thischaptername{\the\toks0}%
6506 \gdef\noexpand\thischapternum{\appendixletter}%
6507 % \noexpand\putwordAppendix avoids expanding indigestible
6508 % commands in some of the translations.
6509 \gdef\noexpand\thischapter{\noexpand\putwordAppendix{}
6510 \noexpand\thischapternum:
6511 \noexpand\thischaptername}%
6515 \xdef\lastchapterdefs{%
6516 \gdef\noexpand\thischaptername{\the\toks0}%
6517 \gdef\noexpand\thischapternum{\the\chapno}%
6518 % \noexpand\putwordChapter avoids expanding indigestible
6519 % commands in some of the translations.
6520 \gdef\noexpand\thischapter{\noexpand\putwordChapter{}
6521 \noexpand\thischapternum:
6522 \noexpand\thischaptername}%
6526 % Output the mark. Pass it through \safewhatsit, to take care of
6527 % the preceding space.
6530 % Insert the chapter heading break.
6533 % Now the second mark, after the heading break. No break points
6534 % between here and the heading.
6535 \let\prevchapterdefs=
\lastchapterdefs
6536 \let\prevsectiondefs=
\lastsectiondefs
6541 \let\footnote=
\errfootnoteheading % give better error message
6543 % Have to define \lastsection before calling \donoderef, because the
6544 % xref code eventually uses it. On the other hand, it has to be called
6545 % after \pchapsepmacro, or the headline will change too soon.
6546 \gdef\lastsection{#1}%
6548 % Only insert the separating space if we have a chapter/appendix
6549 % number, and don't print the unnumbered ``number''.
6550 \ifx\temptype\Ynothingkeyword
6552 \def\toctype{unnchap
}%
6553 \else\ifx\temptype\Yomitfromtockeyword
6554 \setbox0 =
\hbox{}% contents like unnumbered, but no toc entry
6556 \else\ifx\temptype\Yappendixkeyword
6557 \setbox0 =
\hbox{\putwordAppendix{} #3\enspace}%
6560 \setbox0 =
\hbox{#3\enspace}%
6561 \def\toctype{numchap
}%
6564 % Write the toc entry for this chapter. Must come before the
6565 % \donoderef, because we include the current node name in the toc
6566 % entry, and \donoderef resets it to empty.
6567 \writetocentry{\toctype}{#1}{#3}%
6569 % For pdftex, we have to write out the node definition (aka, make
6570 % the pdfdest) after any page break, but before the actual text has
6571 % been typeset. If the destination for the pdf outline is after the
6572 % text, then jumping from the outline may wind up with the text not
6573 % being visible, for instance under high magnification.
6576 % Typeset the actual heading.
6577 \nobreak % Avoid page breaks at the interline glue.
6578 \vbox{\raggedtitlesettings \hangindent=
\wd0 \centerparametersmaybe
6581 \nobreak\bigskip % no page break after a chapter title
6585 % @centerchap -- centered and unnumbered.
6586 \let\centerparametersmaybe =
\relax
6587 \def\centerparameters{%
6588 \advance\rightskip by
3\rightskip
6589 \leftskip =
\rightskip
6594 % Section titles. These macros combine the section number parts and
6595 % call the generic \sectionheading to do the printing.
6597 \newskip\secheadingskip
6598 \def\secheadingbreak{\dobreak \secheadingskip{-
1000}}
6600 % Subsection titles.
6601 \newskip\subsecheadingskip
6602 \def\subsecheadingbreak{\dobreak \subsecheadingskip{-
500}}
6604 % Subsubsection titles.
6605 \def\subsubsecheadingskip{\subsecheadingskip}
6606 \def\subsubsecheadingbreak{\subsecheadingbreak}
6609 % Print any size, any type, section title.
6611 % #1 is the text of the title,
6612 % #2 is the section level (sec/subsec/subsubsec),
6613 % #3 is the section type (Ynumbered, Ynothing, Yappendix, Yomitfromtoc),
6614 % #4 is the section number.
6616 \def\seckeyword{sec
}
6618 \def\sectionheading#1#2#3#4{%
6620 \def\sectionlevel{#2}%
6623 % It is ok for the @heading series commands to appear inside an
6624 % environment (it's been historically allowed, though the logic is
6625 % dubious), but not the others.
6626 \ifx\temptype\Yomitfromtockeyword\else
6627 \checkenv{}% non-@*heading should not be in an environment.
6629 \let\footnote=
\errfootnoteheading
6631 % Switch to the right set of fonts.
6632 \csname #2fonts
\endcsname \rm
6634 % Insert first mark before the heading break (see notes for \domark).
6635 \let\prevsectiondefs=
\lastsectiondefs
6636 \ifx\temptype\Ynothingkeyword
6637 \ifx\sectionlevel\seckeyword
6638 \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}%
6639 \gdef\thissection{\thissectionname}}%
6641 \else\ifx\temptype\Yomitfromtockeyword
6642 % Don't redefine \thissection.
6643 \else\ifx\temptype\Yappendixkeyword
6644 \ifx\sectionlevel\seckeyword
6646 \xdef\lastsectiondefs{%
6647 \gdef\noexpand\thissectionname{\the\toks0}%
6648 \gdef\noexpand\thissectionnum{#4}%
6649 % \noexpand\putwordSection avoids expanding indigestible
6650 % commands in some of the translations.
6651 \gdef\noexpand\thissection{\noexpand\putwordSection{}
6652 \noexpand\thissectionnum:
6653 \noexpand\thissectionname}%
6657 \ifx\sectionlevel\seckeyword
6659 \xdef\lastsectiondefs{%
6660 \gdef\noexpand\thissectionname{\the\toks0}%
6661 \gdef\noexpand\thissectionnum{#4}%
6662 % \noexpand\putwordSection avoids expanding indigestible
6663 % commands in some of the translations.
6664 \gdef\noexpand\thissection{\noexpand\putwordSection{}
6665 \noexpand\thissectionnum:
6666 \noexpand\thissectionname}%
6671 % Go into vertical mode. Usually we'll already be there, but we
6672 % don't want the following whatsit to end up in a preceding paragraph
6673 % if the document didn't happen to have a blank line.
6676 % Output the mark. Pass it through \safewhatsit, to take care of
6677 % the preceding space.
6680 % Insert space above the heading.
6681 \csname #2headingbreak
\endcsname
6683 % Now the second mark, after the heading break. No break points
6684 % between here and the heading.
6685 \global\let\prevsectiondefs=
\lastsectiondefs
6688 % Only insert the space after the number if we have a section number.
6689 \ifx\temptype\Ynothingkeyword
6692 \gdef\lastsection{#1}%
6693 \else\ifx\temptype\Yomitfromtockeyword
6694 % for @headings -- no section number, don't include in toc,
6695 % and don't redefine \lastsection.
6698 \let\sectionlevel=
\empty
6699 \else\ifx\temptype\Yappendixkeyword
6700 \setbox0 =
\hbox{#4\enspace}%
6702 \gdef\lastsection{#1}%
6704 \setbox0 =
\hbox{#4\enspace}%
6706 \gdef\lastsection{#1}%
6709 % Write the toc entry (before \donoderef). See comments in \chapmacro.
6710 \writetocentry{\toctype\sectionlevel}{#1}{#4}%
6712 % Write the node reference (= pdf destination for pdftex).
6713 % Again, see comments in \chapmacro.
6716 % Interline glue will be inserted when the vbox is completed.
6717 % That glue will be a valid breakpoint for the page, since it'll be
6718 % preceded by a whatsit (usually from the \donoderef, or from the
6719 % \writetocentry if there was no node). We don't want to allow that
6720 % break, since then the whatsits could end up on page n while the
6721 % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000.
6724 % Output the actual section heading.
6725 \vbox{\hyphenpenalty=
10000 \tolerance=
5000 \parindent=
0pt
\ptexraggedright
6726 \hangindent=
\wd0 % zero if no section number
6729 % Add extra space after the heading -- half of whatever came above it.
6730 % Don't allow stretch, though.
6731 \kern .5 \csname #2headingskip
\endcsname
6733 % Do not let the kern be a potential breakpoint, as it would be if it
6734 % was followed by glue.
6737 % We'll almost certainly start a paragraph next, so don't let that
6738 % glue accumulate. (Not a breakpoint because it's preceded by a
6739 % discardable item.) However, when a paragraph is not started next
6740 % (\startdefun, \cartouche, \center, etc.), this needs to be wiped out
6741 % or the negative glue will cause weirdly wrong output, typically
6742 % obscuring the section heading with something else.
6745 % This is so the last item on the main vertical list is a known
6746 % \penalty > 10000, so \startdefun, etc., can recognize the situation
6747 % and do the needful.
6753 % Table of contents.
6756 % Write an entry to the toc file, opening it if necessary.
6757 % Called from @chapter, etc.
6759 % Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno}
6760 % We append the current node name (if any) and page number as additional
6761 % arguments for the \{chap,sec,...}entry macros which will eventually
6762 % read this. The node name is used in the pdf outlines as the
6763 % destination to jump to.
6765 % We open the .toc file for writing here instead of at @setfilename (or
6766 % any other fixed time) so that @contents can be anywhere in the document.
6767 % But if #1 is `omit', then we don't do anything. This is used for the
6768 % table of contents chapter openings themselves.
6770 \newif\iftocfileopened
6771 \def\omitkeyword{omit
}%
6773 \def\writetocentry#1#2#3{%
6774 \edef\writetoctype{#1}%
6775 \ifx\writetoctype\omitkeyword \else
6776 \iftocfileopened\else
6777 \immediate\openout\tocfile =
\jobname.toc
6778 \global\tocfileopenedtrue
6784 \write\tocfile{@
#1entry
{#2}{#3}{\lastnode}{\noexpand\folio}}}%
6790 % Tell \shipout to create a pdf destination on each page, if we're
6791 % writing pdf. These are used in the table of contents. We can't
6792 % just write one on every page because the title pages are numbered
6793 % 1 and 2 (the page numbers aren't printed), and so are the first
6794 % two pages of the document. Thus, we'd have two destinations named
6795 % `1', and two named `2'.
6797 \global\pdfmakepagedesttrue
6799 \ifx\XeTeXrevision\thisisundefined
6801 \global\pdfmakepagedesttrue
6807 % These characters do not print properly in the Computer Modern roman
6808 % fonts, so we must take special care. This is more or less redundant
6809 % with the Texinfo input format setup at the end of this file.
6811 \def\activecatcodes{%
6824 % Read the toc file, which is essentially Texinfo input.
6828 \input \tocreadfilename
6831 \newskip\contentsrightmargin \contentsrightmargin=
1in
6832 \newcount\savepageno
6833 \newcount\lastnegativepageno \lastnegativepageno = -
1
6835 % Prepare to read what we've written to \tocfile.
6837 \def\startcontents#1{%
6838 % If @setchapternewpage on, and @headings double, the contents should
6839 % start on an odd page, unlike chapters. Thus, we maintain
6840 % \contentsalignmacro in parallel with \pagealignmacro.
6841 % From: Torbjorn Granlund <tege@matematik.su.se>
6843 \immediate\closeout\tocfile
6845 % Don't need to put `Contents' or `Short Contents' in the headline.
6846 % It is abundantly clear what they are.
6847 \chapmacro{#1}{Yomitfromtoc
}{}%
6849 \savepageno =
\pageno
6850 \begingroup % Set up to handle contents files properly.
6851 \raggedbottom % Worry more about breakpoints than the bottom.
6852 \entryrightmargin=
\contentsrightmargin % Don't use the full line length.
6854 % Roman numerals for page numbers.
6855 \ifnum \pageno>
0 \global\pageno =
\lastnegativepageno \fi
6858 % redefined for the two-volume lispref. We always output on
6859 % \jobname.toc even if this is redefined.
6861 \def\tocreadfilename{\jobname.toc
}
6863 % Normal (long) toc.
6866 \startcontents{\putwordTOC}%
6867 \openin 1 \tocreadfilename\space
6872 \contentsalignmacro % in case @setchapternewpage odd is in effect
6878 \lastnegativepageno =
\pageno
6879 \global\pageno =
\savepageno
6882 % And just the chapters.
6883 \def\summarycontents{%
6884 \startcontents{\putwordShortTOC}%
6886 \let\partentry =
\shortpartentry
6887 \let\numchapentry =
\shortchapentry
6888 \let\appentry =
\shortchapentry
6889 \let\unnchapentry =
\shortunnchapentry
6890 % We want a true roman here for the page numbers.
6892 \let\rm=
\shortcontrm \let\bf=
\shortcontbf
6893 \let\sl=
\shortcontsl \let\tt=
\shortconttt
6895 \hyphenpenalty =
10000
6896 \advance\baselineskip by
1pt
% Open it up a little.
6897 \def\numsecentry#
#1#
#2#
#3#
#4{}
6898 \let\appsecentry =
\numsecentry
6899 \let\unnsecentry =
\numsecentry
6900 \let\numsubsecentry =
\numsecentry
6901 \let\appsubsecentry =
\numsecentry
6902 \let\unnsubsecentry =
\numsecentry
6903 \let\numsubsubsecentry =
\numsecentry
6904 \let\appsubsubsecentry =
\numsecentry
6905 \let\unnsubsubsecentry =
\numsecentry
6906 \openin 1 \tocreadfilename\space
6912 \contentsalignmacro % in case @setchapternewpage odd is in effect
6914 \lastnegativepageno =
\pageno
6915 \global\pageno =
\savepageno
6917 \let\shortcontents =
\summarycontents
6919 % Typeset the label for a chapter or appendix for the short contents.
6920 % The arg is, e.g., `A' for an appendix, or `3' for a chapter.
6922 \def\shortchaplabel#1{%
6923 % This space should be enough, since a single number is .5em, and the
6924 % widest letter (M) is 1em, at least in the Computer Modern fonts.
6925 % But use \hss just in case.
6926 % (This space doesn't include the extra space that gets added after
6927 % the label; that gets put in by \shortchapentry above.)
6929 % We'd like to right-justify chapter numbers, but that looks strange
6930 % with appendix letters. And right-justifying numbers and
6931 % left-justifying letters looks strange when there is less than 10
6932 % chapters. Have to read the whole toc once to know how many chapters
6933 % there are before deciding ...
6934 \hbox to
1em
{#1\hss}%
6937 % These macros generate individual entries in the table of contents.
6938 % The first argument is the chapter or section name.
6939 % The last argument is the page number.
6940 % The arguments in between are the chapter number, section number, ...
6942 % Parts, in the main contents. Replace the part number, which doesn't
6943 % exist, with an empty box. Let's hope all the numbers have the same width.
6944 % Also ignore the page number, which is conventionally not printed.
6945 \def\numeralbox{\setbox0=
\hbox{8}\hbox to
\wd0{\hfil}}
6946 \def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}}
6948 % Parts, in the short toc.
6949 \def\shortpartentry#1#2#3#4{%
6951 \vskip.5\baselineskip plus
.15\baselineskip minus
.1\baselineskip
6952 \shortchapentry{{\bf #1}}{\numeralbox}{}{}%
6955 % Chapters, in the main contents.
6956 \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
6958 % Chapters, in the short toc.
6959 % See comments in \dochapentry re vbox and related settings.
6960 \def\shortchapentry#1#2#3#4{%
6961 \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}%
6964 % Appendices, in the main contents.
6965 % Need the word Appendix, and a fixed-size box.
6967 \def\appendixbox#1{%
6968 % We use M since it's probably the widest letter.
6969 \setbox0 =
\hbox{\putwordAppendix{} M
}%
6970 \hbox to
\wd0{\putwordAppendix{} #1\hss}}
6972 \def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\hskip.7em
#1}{#4}}
6974 % Unnumbered chapters.
6975 \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}}
6976 \def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}}
6979 \def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}}
6980 \let\appsecentry=
\numsecentry
6981 \def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}}
6984 \def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}}
6985 \let\appsubsecentry=
\numsubsecentry
6986 \def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}}
6988 % And subsubsections.
6989 \def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}}
6990 \let\appsubsubsecentry=
\numsubsubsecentry
6991 \def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}}
6993 % This parameter controls the indentation of the various levels.
6994 % Same as \defaultparindent.
6995 \newdimen\tocindent \tocindent =
15pt
6997 % Now for the actual typesetting. In all these, #1 is the text and #2 is the
7000 % If the toc has to be broken over pages, we want it to be at chapters
7001 % if at all possible; hence the \penalty.
7002 \def\dochapentry#1#2{%
7003 \penalty-
300 \vskip1\baselineskip plus
.33\baselineskip minus
.25\baselineskip
7005 % Move the page numbers slightly to the right
7006 \advance\entryrightmargin by -
0.05em
7008 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
7010 \nobreak\vskip .25\baselineskip plus
.1\baselineskip
7013 \def\dosecentry#1#2{\begingroup
7014 \secentryfonts \leftskip=
\tocindent
7015 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
7018 \def\dosubsecentry#1#2{\begingroup
7019 \subsecentryfonts \leftskip=
2\tocindent
7020 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
7023 \def\dosubsubsecentry#1#2{\begingroup
7024 \subsubsecentryfonts \leftskip=
3\tocindent
7025 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
7028 % We use the same \entry macro as for the index entries.
7029 \let\tocentry =
\entry
7031 % Space between chapter (or whatever) number and the title.
7032 \def\labelspace{\hskip1em \relax}
7034 \def\dopageno#1{{\rm #1}}
7035 \def\doshortpageno#1{{\rm #1}}
7037 \def\chapentryfonts{\secfonts \rm}
7038 \def\secentryfonts{\textfonts}
7039 \def\subsecentryfonts{\textfonts}
7040 \def\subsubsecentryfonts{\textfonts}
7043 \message{environments,
}
7044 % @foo ... @end foo.
7046 % @tex ... @end tex escapes into raw TeX temporarily.
7047 % One exception: @ is still an escape character, so that @end tex works.
7048 % But \@ or @@ will get a plain @ character.
7051 \setupmarkupstyle{tex
}%
7052 \catcode `\\=
0 \catcode `\
{=
1 \catcode `\
}=
2
7053 \catcode `\$=
3 \catcode `\&=
4 \catcode `\#=
6
7054 \catcode `\^=
7 \catcode `
\_=
8 \catcode `\~=
\active \let~=
\tie
7064 % ' is active in math mode (mathcode"8000). So reset it, and all our
7065 % other math active characters (just in case), to plain's definitions.
7068 % Inverse of the list at the beginning of the file.
7070 \let\bullet=
\ptexbullet
7075 \let\equiv=
\ptexequiv
7078 \let\indent=
\ptexindent
7079 \let\noindent=
\ptexnoindent
7086 %\let\sup=\ptexsup % do not redefine, we want @sup to work in math mode
7088 \expandafter \let\csname top
\endcsname=
\ptextop % we've made it outer
7089 \let\frenchspacing=
\plainfrenchspacing
7091 \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
7092 \def\enddots{\relax\ifmmode\endldots\else$
\mathsurround=
0pt
\endldots\,$
\fi}%
7095 % There is no need to define \Etex.
7097 % Define @lisp ... @end lisp.
7098 % @lisp environment forms a group so it can rebind things,
7099 % including the definition of @end lisp (which normally is erroneous).
7101 % Amount to narrow the margins by for @lisp.
7102 \newskip\lispnarrowing \lispnarrowing=
0.4in
7104 % This is the definition that ^^M gets inside @lisp, @example, and other
7105 % such environments. \null is better than a space, since it doesn't
7107 \def\lisppar{\null\endgraf}
7109 % This space is always present above and below environments.
7110 \newskip\envskipamount \envskipamount =
0pt
7112 % Make spacing and below environment symmetrical. We use \parskip here
7113 % to help in doing that, since in @example-like environments \parskip
7114 % is reset to zero; thus the \afterenvbreak inserts no space -- but the
7115 % start of the next paragraph will insert \parskip.
7117 \def\aboveenvbreak{{%
7118 % =10000 instead of <10000 because of a special case in \itemzzz and
7119 % \sectionheading, q.v.
7120 \ifnum \lastpenalty=
10000 \else
7121 \advance\envskipamount by
\parskip
7123 \ifdim\lastskip<
\envskipamount
7125 \ifnum\lastpenalty<
10000
7126 % Penalize breaking before the environment, because preceding text
7127 % often leads into it.
7130 \vskip\envskipamount
7135 \def\afterenvbreak{{%
7136 % =10000 instead of <10000 because of a special case in \itemzzz and
7137 % \sectionheading, q.v.
7138 \ifnum \lastpenalty=
10000 \else
7139 \advance\envskipamount by
\parskip
7141 \ifdim\lastskip<
\envskipamount
7143 % it's not a good place to break if the last penalty was \nobreak
7145 \ifnum\lastpenalty<
10000 \penalty-
50 \fi
7146 \vskip\envskipamount
7151 % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will
7152 % also clear it, so that its embedded environments do the narrowing again.
7153 \let\nonarrowing=
\relax
7155 % @cartouche ... @end cartouche: draw rectangle w/rounded corners around
7156 % environment contents.
7157 \font\circle=lcircle10
7159 \newdimen\cartouter\newdimen\cartinner
7160 \newskip\normbskip\newskip\normpskip\newskip\normlskip
7161 \circthick=
\fontdimen8\circle
7163 \def\ctl{{\circle\char'
013\hskip -
6pt
}}% 6pt from pl file: 1/2charwidth
7164 \def\ctr{{\hskip 6pt
\circle\char'
010}}
7165 \def\cbl{{\circle\char'
012\hskip -
6pt
}}
7166 \def\cbr{{\hskip 6pt
\circle\char'
011}}
7167 \def\carttop{\hbox to
\cartouter{\hskip\lskip
7168 \ctl\leaders\hrule height
\circthick\hfil\ctr
7170 \def\cartbot{\hbox to
\cartouter{\hskip\lskip
7171 \cbl\leaders\hrule height
\circthick\hfil\cbr
7174 \newskip\lskip\newskip\rskip
7177 \ifhmode\par\fi % can't be in the midst of a paragraph.
7179 \lskip=
\leftskip \rskip=
\rightskip
7180 \leftskip=
0pt
\rightskip=
0pt
% we want these *outside*.
7181 \cartinner=
\hsize \advance\cartinner by-
\lskip
7182 \advance\cartinner by-
\rskip
7184 \advance\cartouter by
18.4pt
% allow for 3pt kerns on either
7185 % side, and for 6pt waste from
7186 % each corner char, and rule thickness
7187 \normbskip=
\baselineskip \normpskip=
\parskip \normlskip=
\lineskip
7189 % If this cartouche directly follows a sectioning command, we need the
7190 % \parskip glue (backspaced over by default) or the cartouche can
7191 % collide with the section heading.
7192 \ifnum\lastpenalty>
10000 \vskip\parskip \penalty\lastpenalty \fi
7194 \setbox\groupbox=
\vbox\bgroup
7195 \baselineskip=
0pt
\parskip=
0pt
\lineskip=
0pt
7203 \baselineskip=
\normbskip
7204 \lineskip=
\normlskip
7207 \comment % For explanation, see the end of def\group.
7223 % This macro is called at the beginning of all the @example variants,
7225 \newdimen\nonfillparindent
7228 \ifdim\hfuzz <
12pt
\hfuzz =
12pt
\fi % Don't be fussy
7229 \sepspaces % Make spaces be word-separators rather than space tokens.
7230 \let\par =
\lisppar % don't ignore blank lines
7231 \obeylines % each line of input is a line of output
7233 % Turn off paragraph indentation but redefine \indent to emulate
7234 % the normal \indent.
7235 \nonfillparindent=
\parindent
7237 \let\indent\nonfillindent
7239 \emergencystretch =
0pt
% don't try to avoid overfull boxes
7240 \ifx\nonarrowing\relax
7241 \advance \leftskip by
\lispnarrowing
7242 \exdentamount=
\lispnarrowing
7244 \let\nonarrowing =
\relax
7246 \let\exdent=
\nofillexdent
7251 % We want to swallow spaces (but not other tokens) after the fake
7252 % @indent in our nonfill-environments, where spaces are normally
7253 % active and set to @tie, resulting in them not being ignored after
7255 \gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}%
7256 \gdef\nonfillindentcheck{%
7258 \expandafter\nonfillindentgobble%
7260 \leavevmode\nonfillindentbox%
7264 \def\nonfillindentgobble#1{\nonfillindent}
7265 \def\nonfillindentbox{\hbox to
\nonfillparindent{\hss}}
7267 % If you want all examples etc. small: @set dispenvsize small.
7268 % If you want even small examples the full size: @set dispenvsize nosmall.
7269 % This affects the following displayed environments:
7270 % @example, @display, @format, @lisp
7272 \def\smallword{small
}
7273 \def\nosmallword{nosmall
}
7274 \let\SETdispenvsize\relax
7275 \def\setnormaldispenv{%
7276 \ifx\SETdispenvsize\smallword
7277 % end paragraph for sake of leading, in case document has no blank
7278 % line. This is redundant with what happens in \aboveenvbreak, but
7279 % we need to do it before changing the fonts, and it's inconvenient
7280 % to change the fonts afterward.
7281 \ifnum \lastpenalty=
10000 \else \endgraf \fi
7282 \smallexamplefonts \rm
7285 \def\setsmalldispenv{%
7286 \ifx\SETdispenvsize\nosmallword
7288 \ifnum \lastpenalty=
10000 \else \endgraf \fi
7289 \smallexamplefonts \rm
7293 % We often define two environments, @foo and @smallfoo.
7294 % Let's do it in one command. #1 is the env name, #2 the definition.
7295 \def\makedispenvdef#1#2{%
7296 \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}%
7297 \expandafter\envdef\csname small
#1\endcsname {\setsmalldispenv #2}%
7298 \expandafter\let\csname E
#1\endcsname \afterenvbreak
7299 \expandafter\let\csname Esmall
#1\endcsname \afterenvbreak
7302 % Define two environment synonyms (#1 and #2) for an environment.
7303 \def\maketwodispenvdef#1#2#3{%
7304 \makedispenvdef{#1}{#3}%
7305 \makedispenvdef{#2}{#3}%
7308 % @lisp: indented, narrowed, typewriter font;
7309 % @example: same as @lisp.
7311 % @smallexample and @smalllisp: use smaller fonts.
7312 % Originally contributed by Pavel@xerox.
7314 \maketwodispenvdef{lisp
}{example
}{%
7316 \tt\setupmarkupstyle{example
}%
7317 \let\kbdfont =
\kbdexamplefont % Allow @kbd to do something special.
7318 \gobble % eat return
7320 % @display/@smalldisplay: same as @lisp except keep current font.
7322 \makedispenvdef{display
}{%
7327 % @format/@smallformat: same as @display except don't narrow margins.
7329 \makedispenvdef{format
}{%
7330 \let\nonarrowing = t
%
7335 % @flushleft: same as @format, but doesn't obey \SETdispenvsize.
7337 \let\nonarrowing = t
%
7341 \let\Eflushleft =
\afterenvbreak
7345 \envdef\flushright{%
7346 \let\nonarrowing = t
%
7348 \advance\leftskip by
0pt plus
1fill
\relax
7351 \let\Eflushright =
\afterenvbreak
7354 % @raggedright does more-or-less normal line breaking but no right
7355 % justification. From plain.tex. Don't stretch around special
7356 % characters in urls in this environment, since the stretch at the right
7358 \envdef\raggedright{%
7359 \rightskip0pt plus2.4em
\spaceskip.3333em
\xspaceskip.5em
\relax
7360 \def\urefprestretchamount{0pt
}%
7361 \def\urefpoststretchamount{0pt
}%
7363 \let\Eraggedright\par
7365 \envdef\raggedleft{%
7366 \parindent=
0pt
\leftskip0pt plus2em
7367 \spaceskip.3333em
\xspaceskip.5em
\parfillskip=
0pt
7368 \hbadness=
10000 % Last line will usually be underfull, so turn off
7369 % badness reporting.
7371 \let\Eraggedleft\par
7373 \envdef\raggedcenter{%
7374 \parindent=
0pt
\rightskip0pt plus1em
\leftskip0pt plus1em
7375 \spaceskip.3333em
\xspaceskip.5em
\parfillskip=
0pt
7376 \hbadness=
10000 % Last line will usually be underfull, so turn off
7377 % badness reporting.
7379 \let\Eraggedcenter\par
7382 % @quotation does normal linebreaking (hence we can't use \nonfillstart)
7383 % and narrows the margins. We keep \parskip nonzero in general, since
7384 % we're doing normal filling. So, when using \aboveenvbreak and
7385 % \afterenvbreak, temporarily make \parskip 0.
7387 \makedispenvdef{quotation
}{\quotationstart}
7389 \def\quotationstart{%
7390 \indentedblockstart % same as \indentedblock, but increase right margin too.
7391 \ifx\nonarrowing\relax
7392 \advance\rightskip by
\lispnarrowing
7394 \parsearg\quotationlabel
7397 % We have retained a nonzero parskip for the environment, since we're
7398 % doing normal filling.
7402 \ifx\quotationauthor\thisisundefined\else
7404 \leftline{\kern 2\leftskip \sl ---
\quotationauthor}%
7406 {\parskip=
0pt
\afterenvbreak}%
7408 \def\Esmallquotation{\Equotation}
7410 % If we're given an argument, typeset it in bold with a colon after.
7411 \def\quotationlabel#1{%
7413 \ifx\temp\empty \else
7418 % @indentedblock is like @quotation, but indents only on the left and
7419 % has no optional argument.
7421 \makedispenvdef{indentedblock
}{\indentedblockstart}
7423 \def\indentedblockstart{%
7424 {\parskip=
0pt
\aboveenvbreak}% because \aboveenvbreak inserts \parskip
7427 % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
7428 \ifx\nonarrowing\relax
7429 \advance\leftskip by
\lispnarrowing
7430 \exdentamount =
\lispnarrowing
7432 \let\nonarrowing =
\relax
7436 % Keep a nonzero parskip for the environment, since we're doing normal filling.
7438 \def\Eindentedblock{%
7440 {\parskip=
0pt
\afterenvbreak}%
7442 \def\Esmallindentedblock{\Eindentedblock}
7445 % LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
7446 % If we want to allow any <char> as delimiter,
7447 % we need the curly braces so that makeinfo sees the @verb command, eg:
7448 % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org
7450 % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook.
7452 % [Knuth] p.344; only we need to do the other characters Texinfo sets
7453 % active too. Otherwise, they get lost as the first character on a
7456 \do\
\do\\
\do\
{\do\
}\do\$
\do\&
%
7457 \do\#
\do\^
\do\^^K
\do\_\do\^^A
\do\%
\do\~
%
7458 \do\<
\do\>
\do\|
\do\@
\do+
\do\"
%
7459 % Don't do the quotes -- if we do, @set txicodequoteundirected and
7460 % @set txicodequotebacktick will not have effect on @verb and
7461 % @verbatim, and ?` and !` ligatures won't get disabled.
7466 \def\uncatcodespecials{%
7467 \def\do#
#1{\catcode`#
#1=
\other}\dospecials}
7469 % Setup for the @verb command.
7471 % Eight spaces for a tab
7473 \catcode`\^^I=
\active
7474 \gdef\tabeightspaces{\catcode`\^^I=
\active\def^^I
{\ \ \ \ \ \ \ \
}}
7478 \tt % easiest (and conventionally used) font for verbatim
7479 \def\par{\leavevmode\endgraf}%
7480 \setupmarkupstyle{verb
}%
7482 % Respect line breaks,
7483 % print special symbols as themselves, and
7484 % make each space count
7485 % must do in this order:
7486 \obeylines \uncatcodespecials \sepspaces
7489 % Setup for the @verbatim environment
7491 % Real tab expansion.
7492 \newdimen\tabw \setbox0=
\hbox{\tt\space} \tabw=
8\wd0 % tab amount
7494 % We typeset each line of the verbatim in an \hbox, so we can handle
7495 % tabs. The \global is in case the verbatim line starts with an accent,
7496 % or some other command that starts with a begin-group. Otherwise, the
7497 % entire \verbbox would disappear at the corresponding end-group, before
7498 % it is typeset. Meanwhile, we can't have nested verbatim commands
7499 % (can we?), so the \global won't be overwriting itself.
7501 \def\starttabbox{\global\setbox\verbbox=
\hbox\bgroup}
7504 \catcode`\^^I=
\active
7506 \catcode`\^^I=
\active
7507 \def^^I
{\leavevmode\egroup
7508 \dimen\verbbox=
\wd\verbbox % the width so far, or since the previous tab
7509 \divide\dimen\verbbox by
\tabw
7510 \multiply\dimen\verbbox by
\tabw % compute previous multiple of \tabw
7511 \advance\dimen\verbbox by
\tabw % advance to next multiple of \tabw
7512 \wd\verbbox=
\dimen\verbbox \box\verbbox \starttabbox
7517 % start the verbatim environment.
7518 \def\setupverbatim{%
7519 \let\nonarrowing = t
%
7521 \tt % easiest (and conventionally used) font for verbatim
7522 % The \leavevmode here is for blank lines. Otherwise, we would
7523 % never \starttabox and the \egroup would end verbatim mode.
7524 \def\par{\leavevmode\egroup\box\verbbox\endgraf}%
7526 \setupmarkupstyle{verbatim
}%
7527 % Respect line breaks,
7528 % print special symbols as themselves, and
7529 % make each space count.
7530 % Must do in this order:
7531 \obeylines \uncatcodespecials \sepspaces
7532 \everypar{\starttabbox}%
7535 % Do the @verb magic: verbatim text is quoted by unique
7536 % delimiter characters. Before first delimiter expect a
7537 % right brace, after last delimiter expect closing brace:
7539 % \def\doverb'{'<char>#1<char>'}'{#1}
7541 % [Knuth] p. 382; only eat outer {}
7543 \catcode`
[=
1\catcode`
]=
2\catcode`\
{=
\other\catcode`\
}=
\other
7544 \gdef\doverb{#1[\def\next#
#1#1}[#
#1\endgroup]\next]
7547 \def\verb{\begingroup\setupverb\doverb}
7550 % Do the @verbatim magic: define the macro \doverbatim so that
7551 % the (first) argument ends when '@end verbatim' is reached, ie:
7553 % \def\doverbatim#1@end verbatim{#1}
7555 % For Texinfo it's a lot easier than for LaTeX,
7556 % because texinfo's \verbatim doesn't stop at '\end{verbatim}':
7557 % we need not redefine '\', '{' and '}'.
7559 % Inspired by LaTeX's verbatim command set [latex.ltx]
7564 % ignore everything up to the first ^^M, that's the newline at the end
7565 % of the @verbatim input line itself. Otherwise we get an extra blank
7566 % line in the output.
7567 \xdef\doverbatim#1^^M
#2@end verbatim
{#2\noexpand\end\gobble verbatim
}%
7568 % We really want {...\end verbatim} in the body of the macro, but
7569 % without the active space; thus we have to use \xdef and \gobble.
7573 \setupverbatim\doverbatim
7575 \let\Everbatim =
\afterenvbreak
7578 % @verbatiminclude FILE - insert text of file in verbatim environment.
7580 \def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude}
7582 \def\doverbatiminclude#1{%
7584 \makevalueexpandable
7586 \indexnofonts % Allow `@@' and other weird things in file names.
7587 \wlog{texinfo.tex: doing @verbatiminclude of
#1^^J
}%
7593 % @copying ... @end copying.
7594 % Save the text away for @insertcopying later.
7596 % We save the uninterpreted tokens, rather than creating a box.
7597 % Saving the text in a box would be much easier, but then all the
7598 % typesetting commands (@smallbook, font changes, etc.) have to be done
7599 % beforehand -- and a) we want @copying to be done first in the source
7600 % file; b) letting users define the frontmatter in as flexible order as
7601 % possible is desirable.
7603 \def\copying{\checkenv{}\begingroup\scanargctxt\docopying}
7604 \def\docopying#1@end copying
{\endgroup\def\copyingtext{#1}}
7606 \def\insertcopying{%
7608 \parindent =
0pt
% paragraph indentation looks wrong on title page
7609 \scanexp\copyingtext
7617 \newskip\defbodyindent \defbodyindent=
.4in
7618 \newskip\defargsindent \defargsindent=
50pt
7619 \newskip\deflastargmargin \deflastargmargin=
18pt
7620 \newcount\defunpenalty
7622 % Start the processing of @deffn:
7624 \ifnum\lastpenalty<
10000
7626 \defunpenalty=
10003 % Will keep this @deffn together with the
7627 % following @def command, see below.
7629 % If there are two @def commands in a row, we'll have a \nobreak,
7630 % which is there to keep the function description together with its
7631 % header. But if there's nothing but headers, we need to allow a
7632 % break somewhere. Check specifically for penalty 10002, inserted
7633 % by \printdefunline, instead of 10000, since the sectioning
7634 % commands also insert a nobreak penalty, and we don't want to allow
7635 % a break between a section heading and a defun.
7637 % As a further refinement, we avoid "club" headers by signalling
7638 % with penalty of 10003 after the very first @deffn in the
7639 % sequence (see above), and penalty of 10002 after any following
7641 \ifnum\lastpenalty=
10002 \penalty2000 \else \defunpenalty=
10002 \fi
7643 % Similarly, after a section heading, do not allow a break.
7644 % But do insert the glue.
7645 \medskip % preceded by discardable penalty, so not a breakpoint
7649 \advance\leftskip by
\defbodyindent
7650 \exdentamount=
\defbodyindent
7654 % First, check whether we are in the right environment:
7657 % As above, allow line break if we have multiple x headers in a row.
7658 % It's not a great place, though.
7659 \ifnum\lastpenalty=
10002 \penalty3000 \else \defunpenalty=
10002 \fi
7661 % And now, it's time to reuse the body of the original defun:
7662 \expandafter\gobbledefun#1%
7664 \def\gobbledefun#1\startdefun{}
7666 % \printdefunline \deffnheader{text}
7668 \def\printdefunline#1#2{%
7670 % call \deffnheader:
7673 \interlinepenalty =
10000
7674 \advance\rightskip by
0pt plus
1fil
\relax
7676 \nobreak\vskip -
\parskip
7677 \penalty\defunpenalty % signal to \startdefun and \dodefunx
7678 % Some of the @defun-type tags do not enable magic parentheses,
7679 % rendering the following check redundant. But we don't optimize.
7684 \def\Edefun{\endgraf\medbreak}
7686 % \makedefun{deffn} creates \deffn, \deffnx and \Edeffn;
7687 % the only thing remaining is to define \deffnheader.
7690 \expandafter\let\csname E
#1\endcsname =
\Edefun
7691 \edef\temp{\noexpand\domakedefun
7692 \makecsname{#1}\makecsname{#1x
}\makecsname{#1header
}}%
7696 % \domakedefun \deffn \deffnx \deffnheader { (defn. of \deffnheader) }
7698 % Define \deffn and \deffnx, without parameters.
7699 % \deffnheader has to be defined explicitly.
7701 \def\domakedefun#1#2#3{%
7704 \doingtypefnfalse % distinguish typed functions from all else
7705 \parseargusing\activeparens{\printdefunline#3}%
7707 \def#2{\dodefunx#1}%
7711 \newif\ifdoingtypefn % doing typed function?
7712 \newif\ifrettypeownline % typeset return type on its own line?
7714 % @deftypefnnewline on|off says whether the return type of typed functions
7715 % are printed on their own line. This affects @deftypefn, @deftypefun,
7716 % @deftypeop, and @deftypemethod.
7718 \parseargdef\deftypefnnewline{%
7721 \expandafter\let\csname SETtxideftypefnnl
\endcsname
7723 \else\ifx\temp\offword
7724 \expandafter\let\csname SETtxideftypefnnl
\endcsname
7727 \errhelp =
\EMsimple
7728 \errmessage{Unknown @txideftypefnnl value `
\temp',
7733 % Untyped functions:
7735 % @deffn category name args
7736 \makedefun{deffn
}{\deffngeneral{}}
7738 % @deffn category class name args
7739 \makedefun{defop
}#1 {\defopon{#1\
\putwordon}}
7741 % \defopon {category on}class name args
7742 \def\defopon#1#2 {\deffngeneral{\putwordon\
\code{#2}}{#1\
\code{#2}} }
7744 % \deffngeneral {subind}category name args
7746 \def\deffngeneral#1#2 #3 #4\endheader{%
7747 % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}.
7748 \dosubind{fn
}{\code{#3}}{#1}%
7749 \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}%
7754 % @deftypefn category type name args
7755 \makedefun{deftypefn
}{\deftypefngeneral{}}
7757 % @deftypeop category class type name args
7758 \makedefun{deftypeop
}#1 {\deftypeopon{#1\
\putwordon}}
7760 % \deftypeopon {category on}class type name args
7761 \def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\
\code{#2}}{#1\
\code{#2}} }
7763 % \deftypefngeneral {subind}category type name args
7765 \def\deftypefngeneral#1#2 #3 #4 #5\endheader{%
7766 \dosubind{fn
}{\code{#4}}{#1}%
7768 \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
7773 % @deftypevr category type var args
7774 \makedefun{deftypevr
}{\deftypecvgeneral{}}
7776 % @deftypecv category class type var args
7777 \makedefun{deftypecv
}#1 {\deftypecvof{#1\
\putwordof}}
7779 % \deftypecvof {category of}class type var args
7780 \def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\
\code{#2}}{#1\
\code{#2}} }
7782 % \deftypecvgeneral {subind}category type var args
7784 \def\deftypecvgeneral#1#2 #3 #4 #5\endheader{%
7785 \dosubind{vr
}{\code{#4}}{#1}%
7786 \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
7789 % Untyped variables:
7791 % @defvr category var args
7792 \makedefun{defvr
}#1 {\deftypevrheader{#1} {} }
7794 % @defcv category class var args
7795 \makedefun{defcv
}#1 {\defcvof{#1\
\putwordof}}
7797 % \defcvof {category of}class var args
7798 \def\defcvof#1#2 {\deftypecvof{#1}#2 {} }
7802 % @deftp category name args
7803 \makedefun{deftp
}#1 #2 #3\endheader{%
7804 \doind{tp
}{\code{#2}}%
7805 \defname{#1}{}{#2}\defunargs{#3\unskip}%
7808 % Remaining @defun-like shortcuts:
7809 \makedefun{defun
}{\deffnheader{\putwordDeffunc} }
7810 \makedefun{defmac
}{\deffnheader{\putwordDefmac} }
7811 \makedefun{defspec
}{\deffnheader{\putwordDefspec} }
7812 \makedefun{deftypefun
}{\deftypefnheader{\putwordDeffunc} }
7813 \makedefun{defvar
}{\defvrheader{\putwordDefvar} }
7814 \makedefun{defopt
}{\defvrheader{\putwordDefopt} }
7815 \makedefun{deftypevar
}{\deftypevrheader{\putwordDefvar} }
7816 \makedefun{defmethod
}{\defopon\putwordMethodon}
7817 \makedefun{deftypemethod
}{\deftypeopon\putwordMethodon}
7818 \makedefun{defivar
}{\defcvof\putwordInstanceVariableof}
7819 \makedefun{deftypeivar
}{\deftypecvof\putwordInstanceVariableof}
7821 % \defname, which formats the name of the @def (not the args).
7822 % #1 is the category, such as "Function".
7823 % #2 is the return type, if any.
7824 % #3 is the function name.
7826 % We are followed by (but not passed) the arguments, if any.
7828 \def\defname#1#2#3{%
7830 % Get the values of \leftskip and \rightskip as they were outside the @def...
7831 \advance\leftskip by -
\defbodyindent
7833 % Determine if we are typesetting the return type of a typed function
7834 % on a line by itself.
7835 \rettypeownlinefalse
7836 \ifdoingtypefn % doing a typed function specifically?
7837 % then check user option for putting return type on its own line:
7838 \expandafter\ifx\csname SETtxideftypefnnl
\endcsname\relax \else
7843 % How we'll format the category name. Putting it in brackets helps
7844 % distinguish it from the body text that may end up on the next line
7847 \setbox0=
\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi}
7849 % Figure out line sizes for the paragraph shape. We'll always have at
7853 % The first line needs space for \box0; but if \rightskip is nonzero,
7854 % we need only space for the part of \box0 which exceeds it:
7855 \dimen0=
\hsize \advance\dimen0 by -
\wd0 \advance\dimen0 by
\rightskip
7857 % If doing a return type on its own line, we'll have another line.
7859 \advance\tempnum by
1
7860 \def\maybeshapeline{0in
\hsize}%
7862 \def\maybeshapeline{}%
7865 % The continuations:
7866 \dimen2=
\hsize \advance\dimen2 by -
\defargsindent
7868 % The final paragraph shape:
7869 \parshape \tempnum 0in
\dimen0 \maybeshapeline \defargsindent \dimen2
7871 % Put the category name at the right margin.
7874 \hfil\box0 \kern-
\hsize
7875 % \hsize has to be shortened this way:
7877 % Intentionally do not respect \rightskip, since we need the space.
7880 % Allow all lines to be underfull without complaint:
7881 \tolerance=
10000 \hbadness=
10000
7882 \exdentamount=
\defbodyindent
7884 % defun fonts. We use typewriter by default (used to be bold) because:
7885 % . we're printing identifiers, they should be in tt in principle.
7886 % . in languages with many accents, such as Czech or French, it's
7887 % common to leave accents off identifiers. The result looks ok in
7888 % tt, but exceedingly strange in rm.
7889 % . we don't want -- and --- to be treated as ligatures.
7890 % . this still does not fix the ?` and !` ligatures, but so far no
7891 % one has made identifiers using them :).
7893 \def\temp{#2}% text of the return type
7894 \ifx\temp\empty\else
7895 \tclose{\temp}% typeset the return type
7897 % put return type on its own line; prohibit line break following:
7898 \hfil\vadjust{\nobreak}\break
7900 \space % type on same line, so just followed by a space
7902 \fi % no return type
7903 #3% output function name
7905 {\rm\enskip}% hskip 0.5 em of \rmfont
7908 % arguments will be output next, if any.
7911 % Print arguments in slanted roman (not ttsl), inconsistently with using
7912 % tt for the name. This is because literal text is sometimes needed in
7913 % the argument list (groff manual), and ttsl and tt are not very
7914 % distinguishable. Prevent hyphenation at `-' chars.
7917 % use sl by default (not ttsl),
7919 \df \sl \hyphenchar\font=
0
7921 % On the other hand, if an argument has two dashes (for instance), we
7922 % want a way to get ttsl. We used to recommend @var for that, so
7923 % leave the code in, but it's strange for @var to lead to typewriter.
7924 % Nowadays we recommend @code, since the difference between a ttsl hyphen
7925 % and a tt hyphen is pretty tiny. @code also disables ?` !`.
7926 \def\var#
#1{{\setupmarkupstyle{var
}\ttslanted{#
#1}}}%
7928 \sl\hyphenchar\font=
45
7931 % We want ()&[] to print specially on the defun line.
7934 \catcode`\(=
\active \catcode`\)=
\active
7935 \catcode`\
[=
\active \catcode`\
]=
\active
7939 % Make control sequences which act like normal parenthesis chars.
7940 \let\lparen = (
\let\rparen = )
7942 % Be sure that we always have a definition for `(', etc. For example,
7943 % if the fn name has parens in it, \boldbrax will not be in effect yet,
7944 % so TeX would otherwise complain about undefined control sequence.
7947 \global\let(=
\lparen \global\let)=
\rparen
7948 \global\let[=
\lbrack \global\let]=
\rbrack
7951 \gdef\boldbrax{\let(=
\opnr\let)=
\clnr\let[=
\lbrb\let]=
\rbrb}
7952 \gdef\magicamp{\let&=
\amprm}
7955 \newcount\parencount
7957 % If we encounter &foo, then turn on ()-hacking afterwards
7959 \def\amprm#1 {\ampseentrue{\bf\&
#1 }}
7963 % At the first level, print parens in roman,
7964 % otherwise use the default font.
7965 \ifnum \parencount=
1 \rm \fi
7967 % The \sf parens (in \boldbrax) actually are a little bolder than
7968 % the contained text. This is especially needed for [ and ] .
7972 \def\infirstlevel#1{%
7979 \def\bfafterword#1 {#1 \bf}
7982 \global\advance\parencount by
1
7984 \infirstlevel \bfafterword
7989 \global\advance\parencount by -
1
7992 \newcount\brackcount
7994 \global\advance\brackcount by
1
7999 \global\advance\brackcount by -
1
8002 \def\checkparencounts{%
8003 \ifnum\parencount=
0 \else \badparencount \fi
8004 \ifnum\brackcount=
0 \else \badbrackcount \fi
8006 % these should not use \errmessage; the glibc manual, at least, actually
8007 % has such constructs (when documenting function pointers).
8008 \def\badparencount{%
8009 \message{Warning: unbalanced parentheses in @def...
}%
8010 \global\parencount=
0
8012 \def\badbrackcount{%
8013 \message{Warning: unbalanced square brackets in @def...
}%
8014 \global\brackcount=
0
8021 % To do this right we need a feature of e-TeX, \scantokens,
8022 % which we arrange to emulate with a temporary file in ordinary TeX.
8023 \ifx\eTeXversion\thisisundefined
8024 \newwrite\macscribble
8027 \immediate\openout\macscribble=
\jobname.tmp
8028 \immediate\write\macscribble{\the\toks0}%
8029 \immediate\closeout\macscribble
8034 % alias because \c means cedilla in @tex or @math
8037 \newcount\savedcatcodeone
8038 \newcount\savedcatcodetwo
8040 % Used at the time of macro expansion.
8041 % Argument is macro body with arguments substituted
8044 \def\xeatspaces{\eatspaces}%
8046 % Temporarily undo catcode changes of \printindex. Set catcode of @ to
8047 % 0 so that @-commands in macro expansions aren't printed literally when
8048 % formatting an index file, where \ is used as the escape character.
8049 \savedcatcodeone=
\catcode`\@
8050 \savedcatcodetwo=
\catcode`\\
8054 % Process the macro body under the current catcode regime.
8055 \scantokens{#1@texinfoc
}%
8057 \catcode`\@=
\savedcatcodeone
8058 \catcode`\\=
\savedcatcodetwo
8060 % The \texinfoc is to remove the \newlinechar added by \scantokens, and
8061 % can be noticed by \parsearg.
8062 % We avoid surrounding the call to \scantokens with \bgroup and \egroup
8063 % to allow macros to open or close groups themselves.
8066 % Used for copying and captions
8068 \expandafter\scanmacro\expandafter{#1}%
8071 \newcount\paramno % Count of parameters
8072 \newtoks\macname % Macro name
8073 \newif\ifrecursive % Is it recursive?
8075 % List of all defined macros in the form
8076 % \commondummyword\macro1\commondummyword\macro2...
8077 % Currently is also contains all @aliases; the list can be split
8078 % if there is a need.
8081 % Add the macro to \macrolist
8082 \def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname}
8083 \def\addtomacrolistxxx#1{%
8084 \toks0 =
\expandafter{\macrolist\commondummyword#1}%
8085 \xdef\macrolist{\the\toks0}%
8089 % This does \let #1 = #2, with \csnames; that is,
8090 % \let \csname#1\endcsname = \csname#2\endcsname
8091 % (except of course we have to play expansion games).
8095 \csname#1\expandafter\endcsname
8099 % Trim leading and trailing spaces off a string.
8100 % Concepts from aro-bend problem 15 (see CTAN).
8102 \gdef\eatspaces #1{\expandafter\trim@
\expandafter{#1 }}
8103 \gdef\trim@
#1{\trim@@ @
#1 @
#1 @ @@
}
8104 \gdef\trim@@
#1@
#2@
#3@@
{\trim@@@
\empty #2 @
}
8106 \unbrace{\gdef\trim@@@
#1 } #2@
{#1}
8109 % Trim a single trailing ^^M off a string.
8110 {\catcode`\^^M=
\other \catcode`
\Q=
3%
8111 \gdef\eatcr #1{\eatcra #1Q^^MQ
}%
8112 \gdef\eatcra#1^^MQ
{\eatcrb#1Q
}%
8113 \gdef\eatcrb#1Q
#2Q
{#1}%
8116 % Macro bodies are absorbed as an argument in a context where
8117 % all characters are catcode 10, 11 or 12, except \ which is active
8118 % (as in normal texinfo). It is necessary to change the definition of \
8119 % to recognize macro arguments; this is the job of \mbodybackslash.
8121 % Non-ASCII encodings make 8-bit characters active, so un-activate
8122 % them to avoid their expansion. Must do this non-globally, to
8123 % confine the change to the current group.
8125 % It's necessary to have hard CRs when the macro is executed. This is
8126 % done by making ^^M (\endlinechar) catcode 12 when reading the macro
8127 % body, and then making it the \newlinechar in \scanmacro.
8129 \def\scanctxt{% used as subroutine
8138 \passthroughcharstrue
8141 \def\scanargctxt{% used for copying and captions, not macros.
8145 \catcode`\^^M=
\other
8148 \def\macrobodyctxt{% used for @macro definitions
8154 \catcode`\^^M=
\other
8158 % Used when scanning braced macro arguments. Note, however, that catcode
8159 % changes here are ineffectual if the macro invocation was nested inside
8160 % an argument to another Texinfo command.
8164 \catcode`\^^M=
\other
8168 \def\macrolineargctxt{% used for whole-line arguments without braces
8174 % \mbodybackslash is the definition of \ in @macro bodies.
8175 % It maps \foo\ => \csname macarg.foo\endcsname => #N
8176 % where N is the macro parameter number.
8177 % We define \csname macarg.\endcsname to be \realbackslash, so
8178 % \\ in macro replacement text gets you a backslash.
8180 {\catcode`@=
0 @catcode`@\=@active
8181 @gdef@usembodybackslash
{@let\=@mbodybackslash
}
8182 @gdef@mbodybackslash
#1\
{@csname macarg.
#1@endcsname
}
8184 \expandafter\def\csname macarg.
\endcsname{\realbackslash}
8186 \def\margbackslash#1{\char`\
#1 }
8188 \def\macro{\recursivefalse\parsearg\macroxxx}
8189 \def\rmacro{\recursivetrue\parsearg\macroxxx}
8192 \getargs{#1}% now \macname is the macname and \argl the arglist
8193 \ifx\argl\empty % no arguments
8196 \expandafter\parsemargdef \argl;
%
8197 \if\paramno>
256\relax
8198 \ifx\eTeXversion\thisisundefined
8199 \errhelp =
\EMsimple
8200 \errmessage{You need eTeX to compile a file with macros with more than
256 arguments
}
8204 \if1\csname ismacro.
\the\macname\endcsname
8205 \message{Warning: redefining
\the\macname}%
8207 \expandafter\ifx\csname \the\macname\endcsname \relax
8208 \else \errmessage{Macro name
\the\macname\space already defined
}\fi
8209 \global\cslet{macsave.
\the\macname}{\the\macname}%
8210 \global\expandafter\let\csname ismacro.
\the\macname\endcsname=
1%
8211 \addtomacrolist{\the\macname}%
8213 \begingroup \macrobodyctxt
8214 \ifrecursive \expandafter\parsermacbody
8215 \else \expandafter\parsemacbody
8218 \parseargdef\unmacro{%
8219 \if1\csname ismacro.
#1\endcsname
8220 \global\cslet{#1}{macsave.
#1}%
8221 \global\expandafter\let \csname ismacro.
#1\endcsname=
0%
8222 % Remove the macro name from \macrolist:
8224 \expandafter\let\csname#1\endcsname \relax
8225 \let\commondummyword\unmacrodo
8226 \xdef\macrolist{\macrolist}%
8229 \errmessage{Macro
#1 not defined
}%
8233 % Called by \do from \dounmacro on each macro. The idea is to omit any
8234 % macro definitions that have been changed to \relax.
8240 \noexpand\commondummyword \noexpand#1%
8244 % \getargs -- Parse the arguments to a @macro line. Set \macname to
8245 % the name of the macro, and \argl to the braced argument list.
8246 \def\getargs#1{\getargsxxx#1{}}
8247 \def\getargsxxx#1#
{\getmacname #1 \relax\getmacargs}
8248 \def\getmacname#1 #2\relax{\macname=
{#1}}
8249 \def\getmacargs#1{\def\argl{#1}}
8250 % This made use of the feature that if the last token of a
8251 % <parameter list> is #, then the preceding argument is delimited by
8252 % an opening brace, and that opening brace is not consumed.
8254 % Parse the optional {params} list to @macro or @rmacro.
8255 % Set \paramno to the number of arguments,
8256 % and \paramlist to a parameter text for the macro (e.g. #1,#2,#3 for a
8257 % three-param macro.) Define \macarg.BLAH for each BLAH in the params
8258 % list to some hook where the argument is to be expanded. If there are
8259 % less than 10 arguments that hook is to be replaced by ##N where N
8260 % is the position in that list, that is to say the macro arguments are to be
8261 % defined `a la TeX in the macro body.
8263 % That gets used by \mbodybackslash (above).
8265 % If there are 10 or more arguments, a different technique is used: see
8266 % \parsemmanyargdef.
8268 \def\parsemargdef#1;
{%
8269 \paramno=
0\def\paramlist{}%
8271 % \hash is redefined to `#' later to get it into definitions
8272 \let\xeatspaces\relax
8273 \parsemargdefxxx#1,;,
%
8274 \ifnum\paramno<
10\relax\else
8276 \parsemmanyargdef@@
#1,;,
% 10 or more arguments
8279 \def\parsemargdefxxx#1,
{%
8280 \if#1;
\let\next=
\relax
8281 \else \let\next=
\parsemargdefxxx
8282 \advance\paramno by
1
8283 \expandafter\edef\csname macarg.
\eatspaces{#1}\endcsname
8284 {\xeatspaces{\hash\the\paramno}}%
8285 \edef\paramlist{\paramlist\hash\the\paramno,
}%
8288 % \parsemacbody, \parsermacbody
8290 % Read recursive and nonrecursive macro bodies. (They're different since
8291 % rec and nonrec macros end differently.)
8293 % We are in \macrobodyctxt, and the \xdef causes backslashshes in the macro
8294 % body to be transformed.
8295 % Set \macrobody to the body of the macro, and call \defmacro.
8297 {\catcode`\ =
\other\long\gdef\parsemacbody#1@end macro
{%
8298 \xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}%
8299 {\catcode`\ =
\other\long\gdef\parsermacbody#1@end rmacro
{%
8300 \xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}%
8302 % Make @ a letter, so that we can make private-to-Texinfo macro names.
8303 \edef\texiatcatcode{\the\catcode`\@
}
8304 \catcode `@=
11\relax
8306 %%%%%%%%%%%%%% Code for > 10 arguments only %%%%%%%%%%%%%%%%%%
8308 % If there are 10 or more arguments, a different technique is used, where the
8309 % hook remains in the body, and when macro is to be expanded the body is
8310 % processed again to replace the arguments.
8312 % In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the
8313 % argument N value and then \edef the body (nothing else will expand because of
8314 % the catcode regime under which the body was input).
8316 % If you compile with TeX (not eTeX), and you have macros with 10 or more
8317 % arguments, no macro can have more than 256 arguments (else error).
8319 % In case that there are 10 or more arguments we parse again the arguments
8320 % list to set new definitions for the \macarg.BLAH macros corresponding to
8321 % each BLAH argument. It was anyhow needed to parse already once this list
8322 % in order to count the arguments, and as macros with at most 9 arguments
8323 % are by far more frequent than macro with 10 or more arguments, defining
8324 % twice the \macarg.BLAH macros does not cost too much processing power.
8325 \def\parsemmanyargdef@@
#1,
{%
8326 \if#1;
\let\next=
\relax
8328 \let\next=
\parsemmanyargdef@@
8329 \edef\tempb{\eatspaces{#1}}%
8330 \expandafter\def\expandafter\tempa
8331 \expandafter{\csname macarg.
\tempb\endcsname}%
8332 % Note that we need some extra \noexpand\noexpand, this is because we
8333 % don't want \the to be expanded in the \parsermacbody as it uses an
8335 \expandafter\edef\tempa
8336 {\noexpand\noexpand\noexpand\the\toks\the\paramno}%
8337 \advance\paramno by
1\relax
8344 \long\def\nillm@
{\nil@
}%
8346 % This macro is expanded during the Texinfo macro expansion, not during its
8347 % definition. It gets all the arguments' values and assigns them to macros
8350 % #1 is the macro name
8351 % #2 is the list of argument names
8352 % #3 is the list of argument values
8353 \def\getargvals@
#1#2#3{%
8354 \def\macargdeflist@
{}%
8355 \def\saveparamlist@
{#2}% Need to keep a copy for parameter expansion.
8356 \def\paramlist{#2,
\nil@
}%
8360 \def\argvaluelist{#3,
\nil@
}%
8369 \ifx\paramlist\nilm@
8370 % Some sanity check needed here that \argvaluelist is also empty.
8371 \ifx\argvaluelist\nillm@
8373 \errhelp =
\EMsimple
8374 \errmessage{Too many arguments in macro `
\macroname'!
}%
8376 \let\next\macargexpandinbody@
8378 \ifx\argvaluelist\nillm@
8379 % No more arguments values passed to macro. Set remaining named-arg
8381 \let\next\setemptyargvalues@
8383 % pop current arg name into \@tempb
8384 \def\@tempa#
#1{\pop@
{\@tempb
}{\paramlist}#
#1\endargs@
}%
8385 \expandafter\@tempa
\expandafter{\paramlist}%
8386 % pop current argument value into \@tempc
8387 \def\@tempa#
#1{\longpop@
{\@tempc
}{\argvaluelist}#
#1\endargs@
}%
8388 \expandafter\@tempa
\expandafter{\argvaluelist}%
8389 % Here \@tempb is the current arg name and \@tempc is the current arg value.
8390 % First place the new argument macro definition into \@tempd
8391 \expandafter\macname\expandafter{\@tempc
}%
8392 \expandafter\let\csname macarg.\@tempb
\endcsname\relax
8393 \expandafter\def\expandafter\@tempe
\expandafter{%
8394 \csname macarg.\@tempb
\endcsname}%
8395 \edef\@tempd
{\long\def\@tempe
{\the\macname}}%
8396 \push@\@tempd
\macargdeflist@
8397 \let\next\getargvals@@
8404 \expandafter\expandafter\expandafter\def
8405 \expandafter\expandafter\expandafter#2%
8406 \expandafter\expandafter\expandafter{%
8410 % Replace arguments by their values in the macro body, and place the result
8413 \def\macvalstoargs@
{%
8414 % To do this we use the property that token registers that are \the'ed
8415 % within an \edef expand only once. So we are going to place all argument
8416 % values into respective token registers.
8418 % First we save the token context, and initialize argument numbering.
8421 % Then, for each argument number #N, we place the corresponding argument
8422 % value into a new token list register \toks#N
8423 \expandafter\putargsintokens@
\saveparamlist@,;,
%
8424 % Then, we expand the body so that argument are replaced by their
8425 % values. The trick for values not to be expanded themselves is that they
8426 % are within tokens and that tokens expand only once in an \edef .
8427 \edef\@tempc
{\csname mac.
\macroname .body
\endcsname}%
8428 % Now we restore the token stack pointer to free the token list registers
8429 % which we have used, but we make sure that expanded body is saved after
8433 \expandafter\def\expandafter\@tempa
\expandafter{\@tempc
}%
8436 % Define the named-macro outside of this group and then close this group.
8438 \def\macargexpandinbody@
{%
8442 % First the replace in body the macro arguments by their values, the result
8445 % Then we point at the \norecurse or \gobble (for recursive) macro value
8447 \expandafter\let\expandafter\@tempb
\csname mac.
\macroname .recurse
\endcsname
8448 % Depending on whether it is recursive or not, we need some tailing
8455 % And now we do the real job:
8456 \edef\@tempd
{\noexpand\@tempb
{\macroname}\noexpand\scanmacro{\@tempa
}\@tempc
}%
8460 \def\putargsintokens@
#1,
{%
8461 \if#1;
\let\next\relax
8463 \let\next\putargsintokens@
8464 % First we allocate the new token list register, and give it a temporary
8466 \toksdef\@tempb
\the\paramno
8467 % Then we place the argument value into that token list register.
8468 \expandafter\let\expandafter\@tempa
\csname macarg.
#1\endcsname
8469 \expandafter\@tempb
\expandafter{\@tempa
}%
8470 \advance\paramno by
1\relax
8475 % Trailing missing arguments are set to empty.
8477 \def\setemptyargvalues@
{%
8478 \ifx\paramlist\nilm@
8479 \let\next\macargexpandinbody@
8481 \expandafter\setemptyargvaluesparser@
\paramlist\endargs@
8482 \let\next\setemptyargvalues@
8487 \def\setemptyargvaluesparser@
#1,
#2\endargs@
{%
8488 \expandafter\def\expandafter\@tempa
\expandafter{%
8489 \expandafter\def\csname macarg.
#1\endcsname{}}%
8490 \push@\@tempa
\macargdeflist@
8494 % #1 is the element target macro
8495 % #2 is the list macro
8496 % #3,#4\endargs@ is the list value
8497 \def\pop@
#1#2#3,
#4\endargs@
{%
8501 \long\def\longpop@
#1#2#3,
#4\endargs@
{%
8507 %%%%%%%%%%%%%% End of code for > 10 arguments %%%%%%%%%%%%%%%%%%
8510 % This defines a Texinfo @macro or @rmacro, called by \parsemacbody.
8511 % \macrobody has the body of the macro in it, with placeholders for
8512 % its parameters, looking like "\xeatspaces{\hash 1}".
8513 % \paramno is the number of parameters
8514 % \paramlist is a TeX parameter text, e.g. "#1,#2,#3,"
8515 % There are four cases: macros of zero, one, up to nine, and many arguments.
8516 % \xdef is used so that macro definitions will survive the file
8517 % they're defined in: @include reads the file inside a group.
8520 \let\hash=##
% convert placeholders to macro parameter chars
8522 \def\xeatspaces#
#1{#
#1}%
8523 % This removes the pair of braces around the argument. We don't
8524 % use \eatspaces, because this can cause ends of lines to be lost
8525 % when the argument to \eatspaces is read, leading to line-based
8526 % commands like "@itemize" not being read correctly.
8528 \let\xeatspaces\relax % suppress expansion
8532 \expandafter\xdef\csname\the\macname\endcsname{%
8534 \noexpand\spaceisspace
8535 \noexpand\endlineisspace
8536 \noexpand\expandafter % skip any whitespace after the macro name.
8537 \expandafter\noexpand\csname\the\macname @@@
\endcsname}%
8538 \expandafter\xdef\csname\the\macname @@@
\endcsname{%
8540 \noexpand\scanmacro{\macrobody}}%
8542 \expandafter\xdef\csname\the\macname\endcsname{%
8544 \noexpand\braceorline
8545 \expandafter\noexpand\csname\the\macname @@@
\endcsname}%
8546 \expandafter\xdef\csname\the\macname @@@
\endcsname#
#1{%
8548 \noexpand\scanmacro{\macrobody}%
8551 \ifnum\paramno<
10\relax
8552 % @MACNAME sets the context for reading the macro argument
8553 % @MACNAME@@ gets the argument, processes backslashes and appends a
8555 % @MACNAME@@@ removes braces surrounding the argument list.
8556 % @MACNAME@@@@ scans the macro body with arguments substituted.
8557 \expandafter\xdef\csname\the\macname\endcsname{%
8559 \noexpand\expandafter % This \expandafter skip any spaces after the
8560 \noexpand\macroargctxt % macro before we change the catcode of space.
8561 \noexpand\expandafter
8562 \expandafter\noexpand\csname\the\macname @@
\endcsname}%
8563 \expandafter\xdef\csname\the\macname @@
\endcsname#
#1{%
8564 \noexpand\passargtomacro
8565 \expandafter\noexpand\csname\the\macname @@@
\endcsname{#
#1,
}}%
8566 \expandafter\xdef\csname\the\macname @@@
\endcsname#
#1{%
8567 \expandafter\noexpand\csname\the\macname @@@@
\endcsname #
#1}%
8568 \expandafter\expandafter
8570 \expandafter\expandafter
8571 \csname\the\macname @@@@
\endcsname\paramlist{%
8572 \egroup\noexpand\scanmacro{\macrobody}}%
8574 \expandafter\xdef\csname\the\macname\endcsname{%
8575 \noexpand\getargvals@
{\the\macname}{\argl}%
8577 \global\expandafter\let\csname mac.
\the\macname .body
\endcsname\macrobody
8578 \global\expandafter\let\csname mac.
\the\macname .recurse
\endcsname\gobble
8582 \catcode `\@
\texiatcatcode\relax % end private-to-Texinfo catcodes
8584 \def\norecurse#1{\bgroup\cslet{#1}{macsave.
#1}}
8587 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8589 {\catcode`\@=
0 \catcode`\\=
13 % We need to manipulate \ so use @ as escape
8590 @catcode`@_=
11 % private names
8591 @catcode`@!=
11 % used as argument separator
8593 % \passargtomacro#1#2 -
8594 % Call #1 with a list of tokens #2, with any doubled backslashes in #2
8595 % compressed to one.
8597 % This implementation works by expansion, and not execution (so we cannot use
8598 % \def or similar). This reduces the risk of this failing in contexts where
8599 % complete expansion is done with no execution (for example, in writing out to
8600 % an auxiliary file for an index entry).
8602 % State is kept in the input stream: the argument passed to
8603 % @look_ahead, @gobble_and_check_finish and @add_segment is
8605 % THE_MACRO ARG_RESULT ! {PENDING_BS} NEXT_TOKEN (... rest of input)
8608 % THE_MACRO - name of the macro we want to call
8609 % ARG_RESULT - argument list we build to pass to that macro
8610 % PENDING_BS - either a backslash or nothing
8611 % NEXT_TOKEN - used to look ahead in the input stream to see what's coming next
8613 @gdef@passargtomacro
#1#2{%
8614 @add_segment
#1!
{}@relax
#2\@_finish\%
8616 @gdef@_finish
{@_finishx
} @global@let@_finishx@relax
8618 % #1 - THE_MACRO ARG_RESULT
8621 % #4 used to look ahead
8623 % If the next token is not a backslash, process the rest of the argument;
8624 % otherwise, remove the next token.
8625 @gdef@look_ahead
#1!
#2#3#4{%
8627 @expandafter@gobble_and_check_finish
8629 @expandafter@add_segment
8633 % #1 - THE_MACRO ARG_RESULT
8636 % #4 should be a backslash, which is gobbled.
8639 % Double backslash found. Add a single backslash, and look ahead.
8640 @gdef@gobble_and_check_finish
#1!
#2#3#4#5{%
8641 @add_segment
#1\!
{}#5#5%
8646 % #1 - THE_MACRO ARG_RESULT
8649 % #4 is input stream until next backslash
8651 % Input stream is either at the start of the argument, or just after a
8652 % backslash sequence, either a lone backslash, or a doubled backslash.
8653 % NEXT_TOKEN contains the first token in the input stream: if it is \finish,
8654 % finish; otherwise, append to ARG_RESULT the segment of the argument up until
8655 % the next backslash. PENDING_BACKSLASH contains a backslash to represent
8656 % a backslash just before the start of the input stream that has not been
8657 % added to ARG_RESULT.
8658 @gdef@add_segment
#1!
#2#3#4\
{%
8662 % append the pending backslash to the result, followed by the next segment
8663 @expandafter@is_fi@look_ahead
#1#2#4!
{\
}@fi
8664 % this @fi is discarded by @look_ahead.
8665 % we can't get rid of it with \expandafter because we don't know how
8671 % #3 discards the res of the conditional in @add_segment, and @is_fi ends the
8673 @gdef@call_the_macro
#1#2!
#3@fi
{@is_fi
#1{#2}}
8676 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8678 % \braceorline MAC is used for a one-argument macro MAC. It checks
8679 % whether the next non-whitespace character is a {. It sets the context
8680 % for reading the argument (slightly different in the two cases). Then,
8681 % to read the argument, in the whole-line case, it then calls the regular
8682 % \parsearg MAC; in the lbrace case, it calls \passargtomacro MAC.
8684 \def\braceorline#1{\let\macnamexxx=
#1\futurelet\nchar\braceorlinexxx}
8685 \def\braceorlinexxx{%
8688 \expandafter\passargtomacro
8690 \macrolineargctxt\expandafter\parsearg
8695 % We need some trickery to remove the optional spaces around the equal
8696 % sign. Make them active and then expand them all to nothing.
8698 \def\alias{\parseargusing\obeyspaces\aliasxxx}
8699 \def\aliasxxx #1{\aliasyyy#1\relax}
8700 \def\aliasyyy #1=
#2\relax{%
8702 \expandafter\let\obeyedspace=
\empty
8703 \addtomacrolist{#1}%
8704 \xdef\next{\global\let\makecsname{#1}=
\makecsname{#2}}%
8710 \message{cross references,
}
8713 \newif\ifhavexrefs % True if xref values are known.
8714 \newif\ifwarnedxrefs % True if we warned once that they aren't known.
8716 % @inforef is relatively simple.
8717 \def\inforef #1{\inforefzzz #1,,,,**
}
8718 \def\inforefzzz #1,
#2,
#3,
#4**
{%
8719 \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
8720 node
\samp{\ignorespaces#1{}}}
8722 % @node's only job in TeX is to define \lastnode, which is used in
8723 % cross-references. The @node line might or might not have commas, and
8724 % might or might not have spaces before the first comma, like:
8725 % @node foo , bar , ...
8726 % We don't want such trailing spaces in the node name.
8728 \parseargdef\node{\checkenv{}\donode #1 ,
\finishnodeparse}
8730 % also remove a trailing comma, in case of something like this:
8731 % @node Help-Cross, , , Cross-refs
8732 \def\donode#1 ,
#2\finishnodeparse{\dodonode #1,
\finishnodeparse}
8733 \def\dodonode#1,
#2\finishnodeparse{\gdef\lastnode{#1}}
8736 \let\lastnode=
\empty
8738 % Write a cross-reference definition for the current node. #1 is the
8739 % type (Ynumbered, Yappendix, Ynothing).
8742 \ifx\lastnode\empty\else
8743 \setref{\lastnode}{#1}%
8744 \global\let\lastnode=
\empty
8748 % @anchor{NAME} -- define xref target at arbitrary point.
8750 \newcount\savesfregister
8752 \def\savesf{\relax \ifhmode \savesfregister=
\spacefactor \fi}
8753 \def\restoresf{\relax \ifhmode \spacefactor=
\savesfregister \fi}
8754 \def\anchor#1{\savesf \setref{#1}{Ynothing
}\restoresf \ignorespaces}
8756 % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
8757 % anchor), which consists of three parts:
8758 % 1) NAME-title - the current sectioning name taken from \lastsection,
8759 % or the anchor name.
8760 % 2) NAME-snt - section number and type, passed as the SNT arg, or
8761 % empty for anchors.
8762 % 3) NAME-pg - the page number.
8764 % This is called from \donoderef, \anchor, and \dofloat. In the case of
8765 % floats, there is an additional part, which is not written here:
8766 % 4) NAME-lof - the text as it should appear in a @listoffloats.
8773 \atdummies % preserve commands, but don't expand them
8774 % match definition in \xrdef, \refx, \xrefX.
8776 \edef\writexrdef#
#1#
#2{%
8777 \write\auxfile{@xrdef
{#1-
% #1 of \setref, expanded by the \edef
8778 #
#1}{#
#2}}% these are parameters of \writexrdef
8780 \toks0 =
\expandafter{\lastsection}%
8781 \immediate \writexrdef{title
}{\the\toks0 }%
8782 \immediate \writexrdef{snt
}{\csname #2\endcsname}% \Ynumbered etc.
8783 \safewhatsit{\writexrdef{pg
}{\folio}}% will be written later, at \shipout
8788 % @xrefautosectiontitle on|off says whether @section(ing) names are used
8789 % automatically in xrefs, if the third arg is not explicitly specified.
8790 % This was provided as a "secret" @set xref-automatic-section-title
8791 % variable, now it's official.
8793 \parseargdef\xrefautomaticsectiontitle{%
8796 \expandafter\let\csname SETxref-automatic-section-title
\endcsname
8798 \else\ifx\temp\offword
8799 \expandafter\let\csname SETxref-automatic-section-title
\endcsname
8802 \errhelp =
\EMsimple
8803 \errmessage{Unknown @xrefautomaticsectiontitle value `
\temp',
8809 % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is
8810 % the node name, #2 the name of the Info cross-reference, #3 the printed
8811 % node name, #4 the name of the Info file, #5 the name of the printed
8812 % manual. All but the node name can be omitted.
8814 \def\pxref{\putwordsee{} \xrefXX}
8815 \def\xref{\putwordSee{} \xrefXX}
8818 \def\xrefXX#1{\def\xrefXXarg{#1}\futurelet\tokenafterxref\xrefXXX}
8819 \def\xrefXXX{\expandafter\xrefX\expandafter[\xrefXXarg,,,,,,,
]}
8822 \newbox\printedrefnamebox
8823 \newbox\infofilenamebox
8824 \newbox\printedmanualbox
8826 \def\xrefX[#1,
#2,
#3,
#4,
#5,
#6]{\begingroup
8829 % Get args without leading/trailing spaces.
8830 \def\printedrefname{\ignorespaces #3}%
8831 \setbox\printedrefnamebox =
\hbox{\printedrefname\unskip}%
8833 \def\infofilename{\ignorespaces #4}%
8834 \setbox\infofilenamebox =
\hbox{\infofilename\unskip}%
8836 \def\printedmanual{\ignorespaces #5}%
8837 \setbox\printedmanualbox =
\hbox{\printedmanual\unskip}%
8839 % If the printed reference name (arg #3) was not explicitly given in
8840 % the @xref, figure out what we want to use.
8841 \ifdim \wd\printedrefnamebox =
0pt
8842 % No printed node name was explicitly given.
8843 \expandafter\ifx\csname SETxref-automatic-section-title
\endcsname \relax
8844 % Not auto section-title: use node name inside the square brackets.
8845 \def\printedrefname{\ignorespaces #1}%
8847 % Auto section-title: use chapter/section title inside
8848 % the square brackets if we have it.
8849 \ifdim \wd\printedmanualbox >
0pt
8850 % It is in another manual, so we don't have it; use node name.
8851 \def\printedrefname{\ignorespaces #1}%
8854 % We (should) know the real title if we have the xref values.
8855 \def\printedrefname{\refx{#1-title
}{}}%
8857 % Otherwise just copy the Info node name.
8858 \def\printedrefname{\ignorespaces #1}%
8864 % Make link in pdf output.
8866 % For pdfTeX and LuaTeX
8868 \makevalueexpandable
8870 % This expands tokens, so do it after making catcode changes, so _
8871 % etc. don't get their TeX definitions. This ignores all spaces in
8872 % #4, including (wrongly) those in the middle of the filename.
8875 % This (wrongly) does not take account of leading or trailing
8876 % spaces in #1, which should be ignored.
8877 \setpdfdestname{#1}%
8879 \ifx\pdfdestname\empty
8880 \def\pdfdestname{Top
}% no empty targets
8884 \startlink attr
{/Border
[0 0 0]}%
8885 \ifnum\filenamelength>
0
8886 goto file
{\the\filename.pdf
} name
{\pdfdestname}%
8888 goto name
{\pdfmkpgn{\pdfdestname}}%
8891 \setcolor{\linkcolor}%
8893 \ifx\XeTeXrevision\thisisundefined
8897 \makevalueexpandable
8899 % This expands tokens, so do it after making catcode changes, so _
8900 % etc. don't get their TeX definitions. This ignores all spaces in
8901 % #4, including (wrongly) those in the middle of the filename.
8904 % This (wrongly) does not take account of leading or trailing
8905 % spaces in #1, which should be ignored.
8906 \setpdfdestname{#1}%
8908 \ifx\pdfdestname\empty
8909 \def\pdfdestname{Top
}% no empty targets
8913 \ifnum\filenamelength>
0
8914 % With default settings,
8915 % XeTeX (xdvipdfmx) replaces link destination names with integers.
8916 % In this case, the replaced destination names of
8917 % remote PDFs are no longer known. In order to avoid a replacement,
8918 % you can use xdvipdfmx's command line option `-C 0x0010'.
8919 % If you use XeTeX 0.99996+ (TeX Live 2016+),
8920 % this command line option is no longer necessary
8921 % because we can use the `dvipdfmx:config' special.
8922 \special{pdf:bann << /Border
[0 0 0] /Type /Annot /Subtype /Link /A
8923 << /S /GoToR /F (
\the\filename.pdf) /D (
\pdfdestname) >> >>
}%
8925 \special{pdf:bann << /Border
[0 0 0] /Type /Annot /Subtype /Link /A
8926 << /S /GoTo /D (
\pdfdestname) >> >>
}%
8929 \setcolor{\linkcolor}%
8933 % Have to otherify everything special to allow the \csname to
8934 % include an _ in the xref name, etc.
8938 \expandafter\global\expandafter\let\expandafter\Xthisreftitle
8939 \csname XR
#1-title
\endcsname
8942 % Float references are printed completely differently: "Figure 1.2"
8943 % instead of "[somenode], p.3". \iffloat distinguishes them by
8944 % \Xthisreftitle being set to a magic string.
8945 \iffloat\Xthisreftitle
8946 % If the user specified the print name (third arg) to the ref,
8947 % print it instead of our usual "Figure 1.2".
8948 \ifdim\wd\printedrefnamebox =
0pt
8954 % If the user also gave the printed manual name (fifth arg), append
8956 \ifdim \wd\printedmanualbox >
0pt
8957 \space \putwordin{} \cite{\printedmanual}%
8960 % node/anchor (non-float) references.
8962 % If we use \unhbox to print the node names, TeX does not insert
8963 % empty discretionaries after hyphens, which means that it will not
8964 % find a line break at a hyphen in a node names. Since some manuals
8965 % are best written with fairly long node names, containing hyphens,
8966 % this is a loss. Therefore, we give the text of the node name
8967 % again, so it is as if TeX is seeing it for the first time.
8969 \ifdim \wd\printedmanualbox >
0pt
8970 % Cross-manual reference with a printed manual name.
8972 \crossmanualxref{\cite{\printedmanual\unskip}}%
8974 \else\ifdim \wd\infofilenamebox >
0pt
8975 % Cross-manual reference with only an info filename (arg 4), no
8976 % printed manual name (arg 5). This is essentially the same as
8977 % the case above; we output the filename, since we have nothing else.
8979 \crossmanualxref{\code{\infofilename\unskip}}%
8982 % Reference within this manual.
8984 % _ (for example) has to be the character _ for the purposes of the
8985 % control sequence corresponding to the node, but it has to expand
8986 % into the usual \leavevmode...\vrule stuff for purposes of
8987 % printing. So we \turnoffactive for the \refx-snt, back on for the
8988 % printing, back off for the \refx-pg.
8990 % Only output a following space if the -snt ref is nonempty; for
8991 % @unnumbered and @anchor, it won't be.
8992 \setbox2 =
\hbox{\ignorespaces \refx{#1-snt
}{}}%
8993 \ifdim \wd2 >
0pt
\refx{#1-snt
}\space\fi
8995 % output the `[mynode]' via the macro below so it can be overridden.
8996 \xrefprintnodename\printedrefname
8998 % But we always want a comma and a space:
9001 % output the `page 3'.
9002 \turnoffactive \putwordpage\tie\refx{#1-pg
}{}%
9003 % Add a , if xref followed by a space
9004 \if\space\noexpand\tokenafterxref ,
%
9005 \else\ifx\
\tokenafterxref ,
% @TAB
9006 \else\ifx\*
\tokenafterxref ,
% @*
9007 \else\ifx\
\tokenafterxref ,
% @SPACE
9009 \tokenafterxref ,
% @NL
9010 \else\ifx\tie\tokenafterxref ,
% @tie
9017 % Output a cross-manual xref to #1. Used just above (twice).
9019 % Only include the text "Section ``foo'' in" if the foo is neither
9020 % missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply
9021 % "see The Foo Manual", the idea being to refer to the whole manual.
9023 % But, this being TeX, we can't easily compare our node name against the
9024 % string "Top" while ignoring the possible spaces before and after in
9025 % the input. By adding the arbitrary 7sp below, we make it much less
9026 % likely that a real node name would have the same width as "Top" (e.g.,
9027 % in a monospaced font). Hopefully it will never happen in practice.
9029 % For the same basic reason, we retypeset the "Top" at every
9030 % reference, since the current font is indeterminate.
9032 \def\crossmanualxref#1{%
9033 \setbox\toprefbox =
\hbox{Top
\kern7sp}%
9034 \setbox2 =
\hbox{\ignorespaces \printedrefname \unskip \kern7sp}%
9035 \ifdim \wd2 >
7sp
% nonempty?
9036 \ifdim \wd2 =
\wd\toprefbox \else % same as Top?
9037 \putwordSection{} ``
\printedrefname''
\putwordin{}\space
9043 % This macro is called from \xrefX for the `[nodename]' part of xref
9044 % output. It's a separate macro only so it can be changed more easily,
9045 % since square brackets don't work well in some documents. Particularly
9046 % one that Bob is working on :).
9048 \def\xrefprintnodename#1{[#1]}
9050 % Things referred to by \setref.
9056 \putwordChapter@tie
\the\chapno
9057 \else \ifnum\subsecno=
0
9058 \putwordSection@tie
\the\chapno.
\the\secno
9059 \else \ifnum\subsubsecno=
0
9060 \putwordSection@tie
\the\chapno.
\the\secno.
\the\subsecno
9062 \putwordSection@tie
\the\chapno.
\the\secno.
\the\subsecno.
\the\subsubsecno
9067 \putwordAppendix@tie @char
\the\appendixno{}%
9068 \else \ifnum\subsecno=
0
9069 \putwordSection@tie @char
\the\appendixno.
\the\secno
9070 \else \ifnum\subsubsecno=
0
9071 \putwordSection@tie @char
\the\appendixno.
\the\secno.
\the\subsecno
9074 @char
\the\appendixno.
\the\secno.
\the\subsecno.
\the\subsubsecno
9078 % \refx{NAME}{SUFFIX} - reference a cross-reference string named NAME. SUFFIX
9079 % is output afterwards if non-empty.
9086 \expandafter\global\expandafter\let\expandafter\thisrefX
9087 \csname XR
#1\endcsname
9090 % If not defined, say something at least.
9091 \angleleft un\-de\-fined
\angleright
9094 {\toks0 =
{#1}% avoid expansion of possibly-complex value
9095 \message{\linenumber Undefined cross reference `
\the\toks0'.
}}%
9098 \global\warnedxrefstrue
9099 \message{Cross reference values unknown; you must run TeX again.
}%
9104 % It's defined, so just use it.
9107 #2% Output the suffix in any case.
9110 % This is the macro invoked by entries in the aux file. Define a control
9111 % sequence for a cross-reference target (we prepend XR to the control sequence
9112 % name to avoid collisions). The value is the page number. If this is a float
9113 % type, we have more work to do.
9116 {% Expand the node or anchor name to remove control sequences.
9117 % \turnoffactive stops 8-bit characters being changed to commands
9118 % like @'e. \refx does the same to retrieve the value in the definition.
9122 \xdef\safexrefname{#1}%
9126 \expandafter\gdef\csname XR
\safexrefname\endcsname{#2}%
9128 % We put the \gdef inside a group to avoid the definitions building up on
9129 % TeX's save stack, which can cause it to run out of space for aux files with
9130 % thousands of lines. \gdef doesn't use the save stack, but \csname does
9131 % when it defines an unknown control sequence as \relax.
9133 % Was that xref control sequence that we just defined for a float?
9134 \expandafter\iffloat\csname XR
\safexrefname\endcsname
9135 % it was a float, and we have the (safe) float type in \iffloattype.
9136 \expandafter\let\expandafter\floatlist
9137 \csname floatlist
\iffloattype\endcsname
9139 % Is this the first time we've seen this float type?
9140 \expandafter\ifx\floatlist\relax
9141 \toks0 =
{\do}% yes, so just \do
9143 % had it before, so preserve previous elements in list.
9144 \toks0 =
\expandafter{\floatlist\do}%
9147 % Remember this xref in the control sequence \floatlistFLOATTYPE,
9148 % for later use in \listoffloats.
9149 \expandafter\xdef\csname floatlist
\iffloattype\endcsname{\the\toks0
9154 % If working on a large document in chapters, it is convenient to
9155 % be able to disable indexing, cross-referencing, and contents, for test runs.
9156 % This is done with @novalidate at the beginning of the file.
9158 \newif\iflinks \linkstrue % by default we want the aux files.
9159 \let\novalidate =
\linksfalse
9161 % Used when writing to the aux file, or when using data from it.
9162 \def\requireauxfile{%
9165 % Open the new aux file. TeX will close it automatically at exit.
9166 \immediate\openout\auxfile=
\jobname.aux
9168 \global\let\requireauxfile=
\relax % Only do this once.
9171 % Read the last existing aux file, if any. No error if none exists.
9174 \openin 1 \jobname.aux
9177 \global\havexrefstrue
9182 \def\setupdatafile{%
9183 \catcode`\^^@=
\other
9184 \catcode`\^^A=
\other
9185 \catcode`\^^B=
\other
9186 \catcode`\^^C=
\other
9187 \catcode`\^^D=
\other
9188 \catcode`\^^E=
\other
9189 \catcode`\^^F=
\other
9190 \catcode`\^^G=
\other
9191 \catcode`\^^H=
\other
9192 \catcode`\^^K=
\other
9193 \catcode`\^^L=
\other
9194 \catcode`\^^N=
\other
9195 \catcode`\^^P=
\other
9196 \catcode`\^^Q=
\other
9197 \catcode`\^^R=
\other
9198 \catcode`\^^S=
\other
9199 \catcode`\^^T=
\other
9200 \catcode`\^^U=
\other
9201 \catcode`\^^V=
\other
9202 \catcode`\^^W=
\other
9203 \catcode`\^^X=
\other
9204 \catcode`\^^Z=
\other
9205 \catcode`\^^
[=
\other
9206 \catcode`\^^\=
\other
9207 \catcode`\^^
]=
\other
9208 \catcode`\^^^=
\other
9209 \catcode`\^^_=
\other
9210 % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc.
9211 % in xref tags, i.e., node names. But since ^^e4 notation isn't
9212 % supported in the main text, it doesn't seem desirable. Furthermore,
9213 % that is not enough: for node names that actually contain a ^
9214 % character, we would end up writing a line like this: 'xrdef {'hat
9215 % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first
9216 % argument, and \hat is not an expandable control sequence. It could
9217 % all be worked out, but why? Either we support ^^ or we don't.
9219 % The other change necessary for this was to define \auxhat:
9220 % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter
9221 % and then to call \auxhat in \setq.
9225 % Special characters. Should be turned off anyway, but...
9238 \catcode`+=
\other % avoid \+ for paranoia even though we've turned it off
9240 % This is to support \ in node names and titles, since the \
9241 % characters end up in a \csname. It's easier than
9242 % leaving it active and making its active definition an actual \
9243 % character. What I don't understand is why it works in the *value*
9244 % of the xrdef. Seems like it should be a catcode12 \, and that
9245 % should not typeset properly. But it works, so I'm moving on for
9246 % now. --karl, 15jan04.
9249 % @ is our escape character in .aux files, and we need braces.
9255 \def\readdatafile#1{%
9262 \message{insertions,
}
9263 % including footnotes.
9265 \newcount \footnoteno
9267 % The trailing space in the following definition for supereject is
9268 % vital for proper filling; pages come out unaligned when you do a
9269 % pagealignmacro call if that space before the closing brace is
9270 % removed. (Generally, numeric constants should always be followed by a
9271 % space to prevent strange expansion errors.)
9272 \def\supereject{\par\penalty -
20000\footnoteno =
0 }
9274 % @footnotestyle is meaningful for Info output only.
9275 \let\footnotestyle=
\comment
9279 % Auto-number footnotes. Otherwise like plain.
9281 \global\advance\footnoteno by \@ne
9282 \edef\thisfootno{$^
{\the\footnoteno}$
}%
9284 % In case the footnote comes at the end of a sentence, preserve the
9285 % extra spacing after we do the footnote number.
9287 \ifhmode\edef\@sf
{\spacefactor\the\spacefactor}\ptexslash\fi
9289 % Remove inadvertent blank space before typesetting the footnote number.
9295 % Don't bother with the trickery in plain.tex to not require the
9296 % footnote text as a parameter. Our footnotes don't need to be so general.
9298 % Oh yes, they do; otherwise, @ifset (and anything else that uses
9299 % \parseargline) fails inside footnotes because the tokens are fixed when
9300 % the footnote is read. --karl, 16nov96.
9303 \insert\footins\bgroup
9305 % Nested footnotes are not supported in TeX, that would take a lot
9306 % more work. (\startsavinginserts does not suffice.)
9307 \let\footnote=
\errfootnotenest
9309 % We want to typeset this text as a normal paragraph, even if the
9310 % footnote reference occurs in (for example) a display environment.
9311 % So reset some parameters.
9312 \hsize=
\txipagewidth
9313 \interlinepenalty\interfootnotelinepenalty
9314 \splittopskip\ht\strutbox % top baseline for broken footnotes
9315 \splitmaxdepth\dp\strutbox
9316 \floatingpenalty\@MM
9321 \parindent\defaultparindent
9325 % Because we use hanging indentation in footnotes, a @noindent appears
9326 % to exdent this text, so make it be a no-op. makeinfo does not use
9327 % hanging indentation so @noindent can still be needed within footnote
9328 % text after an @example or the like (not that this is good style).
9329 \let\noindent =
\relax
9331 % Hang the footnote text off the number. Use \everypar in case the
9332 % footnote extends for more than one paragraph.
9333 \everypar =
{\hang}%
9334 \textindent{\thisfootno}%
9336 % Don't crash into the line above the footnote text. Since this
9337 % expands into a box, it must come within the paragraph, lest it
9338 % provide a place where TeX can split the footnote.
9341 % Invoke rest of plain TeX footnote routine.
9342 \futurelet\next\fo@t
9344 }%end \catcode `\@=11
9346 \def\errfootnotenest{%
9348 \errmessage{Nested footnotes not supported in texinfo.tex,
9349 even though they work in makeinfo; sorry
}
9352 \def\errfootnoteheading{%
9354 \errmessage{Footnotes in chapters, sections, etc., are not supported
}
9357 % In case a @footnote appears in a vbox, save the footnote text and create
9358 % the real \insert just after the vbox finished. Otherwise, the insertion
9360 % Similarly, if a @footnote appears inside an alignment, save the footnote
9361 % text to a box and make the \insert when a row of the table is finished.
9362 % And the same can be done for other insert classes. --kasal, 16nov03.
9364 % Replace the \insert primitive by a cheating macro.
9365 % Deeper inside, just make sure that the saved insertions are not spilled
9368 \def\startsavinginserts{%
9369 \ifx \insert\ptexinsert
9370 \let\insert\saveinsert
9372 \let\checkinserts\relax
9376 % This \insert replacement works for both \insert\footins{foo} and
9377 % \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}.
9380 \edef\next{\noexpand\savetobox \makeSAVEname#1}%
9381 \afterassignment\next
9382 % swallow the left brace
9385 \def\makeSAVEname#1{\makecsname{SAVE
\expandafter\gobble\string#1}}
9386 \def\savetobox#1{\global\setbox#1 =
\vbox\bgroup \unvbox#1}
9388 \def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi}
9390 \def\placesaveins#1{%
9391 \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname
9395 % eat @SAVE -- beware, all of them have catcode \other:
9397 \def\dospecials{\do S
\do A
\do V
\do E
} \uncatcodespecials % ;-)
9398 \gdef\gobblesave @SAVE
{}
9402 \def\newsaveins #1{%
9403 \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}%
9406 \def\newsaveinsX #1{%
9407 \csname newbox
\endcsname #1%
9408 \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts
9413 \let\checkinserts\empty
9418 % @image. We use the macros from epsf.tex to support this.
9419 % If epsf.tex is not installed and @image is used, we complain.
9421 % Check for and read epsf.tex up front. If we read it only at @image
9422 % time, we might be inside a group, and then its definitions would get
9423 % undone and the next image would fail.
9424 \openin 1 = epsf.tex
9426 % Do not bother showing banner with epsf.tex v2.7k (available in
9427 % doc/epsf.tex and on ctan).
9428 \def\epsfannounce{\toks0 =
}%
9433 % We will only complain once about lack of epsf.tex.
9434 \newif\ifwarnednoepsf
9435 \newhelp\noepsfhelp{epsf.tex must be installed for images to
9436 work. It is also included in the Texinfo distribution, or you can get
9437 it from ftp://tug.org/tex/epsf.tex.
}
9440 \ifx\epsfbox\thisisundefined
9441 \ifwarnednoepsf \else
9442 \errhelp =
\noepsfhelp
9443 \errmessage{epsf.tex not found, images will be ignored
}%
9444 \global\warnednoepsftrue
9447 \imagexxx #1,,,,,
\finish
9451 % Arguments to @image:
9452 % #1 is (mandatory) image filename; we tack on .eps extension.
9453 % #2 is (optional) width, #3 is (optional) height.
9454 % #4 is (ignored optional) html alt text.
9455 % #5 is (ignored optional) extension.
9456 % #6 is just the usual extra ignored arg for parsing stuff.
9458 \def\imagexxx#1,
#2,
#3,
#4,
#5,
#6\finish{\begingroup
9459 \catcode`\^^M =
5 % in case we're inside an example
9460 \normalturnoffactive % allow _ et al. in names
9461 \def\xprocessmacroarg{\eatspaces}% in case we are being used via a macro
9462 % If the image is by itself, center it.
9465 \else \ifx\centersub\centerV
9466 % for @center @image, we need a vbox so we can have our vertical space
9468 \vbox\bgroup % vbox has better behavior than vtop herev
9473 % Usually we'll have text after the image which will insert
9474 % \parskip glue, so insert it here too to equalize the space
9476 \nobreak\vskip\parskip
9480 % Leave vertical mode so that indentation from an enclosing
9481 % environment such as @quotation is respected.
9482 % However, if we're at the top level, we don't want the
9483 % normal paragraph indentation.
9484 % On the other hand, if we are in the case of @center @image, we don't
9485 % want to start a paragraph, which will create a hsize-width box and
9486 % eradicate the centering.
9487 \ifx\centersub\centerV\else \noindent \fi
9491 % For pdfTeX and LuaTeX <= 0.80
9492 \dopdfimage{#1}{#2}{#3}%
9494 \ifx\XeTeXrevision\thisisundefined
9496 % \epsfbox itself resets \epsf?size at each figure.
9497 \setbox0 =
\hbox{\ignorespaces #2}%
9498 \ifdim\wd0 >
0pt
\epsfxsize=
#2\relax \fi
9499 \setbox0 =
\hbox{\ignorespaces #3}%
9500 \ifdim\wd0 >
0pt
\epsfysize=
#3\relax \fi
9504 \doxeteximage{#1}{#2}{#3}%
9509 \medskip % space after a standalone image
9511 \ifx\centersub\centerV \egroup \fi
9515 % @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables,
9516 % etc. We don't actually implement floating yet, we always include the
9517 % float "here". But it seemed the best name for the future.
9519 \envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,
\finish}
9521 % There may be a space before second and/or third parameter; delete it.
9522 \def\eatcommaspace#1,
{#1,
}
9524 % #1 is the optional FLOATTYPE, the text label for this float, typically
9525 % "Figure", "Table", "Example", etc. Can't contain commas. If omitted,
9526 % this float will not be numbered and cannot be referred to.
9528 % #2 is the optional xref label. Also must be present for the float to
9531 % #3 is the optional positioning argument; for now, it is ignored. It
9532 % will somehow specify the positions allowed to float to (here, top, bottom).
9534 % We keep a separate counter for each FLOATTYPE, which we reset at each
9535 % chapter-level command.
9536 \let\resetallfloatnos=
\empty
9538 \def\dofloat#1,
#2,
#3,
#4\finish{%
9539 \let\thiscaption=
\empty
9540 \let\thisshortcaption=
\empty
9542 % don't lose footnotes inside @float.
9544 % BEWARE: when the floats start float, we have to issue warning whenever an
9545 % insert appears inside a float which could possibly float. --kasal, 26may04
9549 % We can't be used inside a paragraph.
9554 \def\floatlabel{#2}%
9555 \def\floatloc{#3}% we do nothing with this yet.
9557 \ifx\floattype\empty
9558 \let\safefloattype=
\empty
9561 % the floattype might have accents or other special characters,
9562 % but we need to use it in a control sequence name.
9565 \xdef\safefloattype{\floattype}%
9569 % If label is given but no type, we handle that as the empty type.
9570 \ifx\floatlabel\empty \else
9571 % We want each FLOATTYPE to be numbered separately (Figure 1,
9572 % Table 1, Figure 2, ...). (And if no label, no number.)
9574 \expandafter\getfloatno\csname\safefloattype floatno
\endcsname
9575 \global\advance\floatno by
1
9578 % This magic value for \lastsection is output by \setref as the
9579 % XREFLABEL-title value. \xrefX uses it to distinguish float
9580 % labels (which have a completely different output format) from
9581 % node and anchor labels. And \xrdef uses it to construct the
9584 \edef\lastsection{\floatmagic=
\safefloattype}%
9585 \setref{\floatlabel}{Yfloat
}%
9589 % start with \parskip glue, I guess.
9592 % Don't suppress indentation if a float happens to start a section.
9593 \restorefirstparagraphindent
9596 % we have these possibilities:
9597 % @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap
9598 % @float Foo,lbl & no caption: Foo 1.1
9599 % @float Foo & @caption{Cap}: Foo: Cap
9600 % @float Foo & no caption: Foo
9601 % @float ,lbl & Caption{Cap}: 1.1: Cap
9602 % @float ,lbl & no caption: 1.1
9603 % @float & @caption{Cap}: Cap
9604 % @float & no caption:
9607 \let\floatident =
\empty
9609 % In all cases, if we have a float type, it comes first.
9610 \ifx\floattype\empty \else \def\floatident{\floattype}\fi
9612 % If we have an xref label, the number comes next.
9613 \ifx\floatlabel\empty \else
9614 \ifx\floattype\empty \else % if also had float type, need tie first.
9615 \appendtomacro\floatident{\tie}%
9618 \appendtomacro\floatident{\chaplevelprefix\the\floatno}%
9621 % Start the printed caption with what we've constructed in
9622 % \floatident, but keep it separate; we need \floatident again.
9623 \let\captionline =
\floatident
9625 \ifx\thiscaption\empty \else
9626 \ifx\floatident\empty \else
9627 \appendtomacro\captionline{:
}% had ident, so need a colon between
9631 \appendtomacro\captionline{\scanexp\thiscaption}%
9634 % If we have anything to print, print it, with space before.
9635 % Eventually this needs to become an \insert.
9636 \ifx\captionline\empty \else
9640 % Space below caption.
9644 % If have an xref label, write the list of floats info. Do this
9645 % after the caption, to avoid chance of it being a breakpoint.
9646 \ifx\floatlabel\empty \else
9647 % Write the text that goes in the lof to the aux file as
9648 % \floatlabel-lof. Besides \floatident, we include the short
9649 % caption if specified, else the full caption if specified, else nothing.
9654 \ifx\thisshortcaption\empty
9655 \def\gtemp{\thiscaption}%
9657 \def\gtemp{\thisshortcaption}%
9659 \immediate\write\auxfile{@xrdef
{\floatlabel-lof
}{\floatident
9660 \ifx\gtemp\empty \else :
\gtemp \fi}}%
9663 \egroup % end of \vtop
9668 % Append the tokens #2 to the definition of macro #1, not expanding either.
9670 \def\appendtomacro#1#2{%
9671 \expandafter\def\expandafter#1\expandafter{#1#2}%
9674 % @caption, @shortcaption
9676 \def\caption{\docaption\thiscaption}
9677 \def\shortcaption{\docaption\thisshortcaption}
9678 \def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption}
9679 \def\defcaption#1#2{\egroup \def#1{#2}}
9681 % The parameter is the control sequence identifying the counter we are
9682 % going to use. Create it if it doesn't exist and assign it to \floatno.
9685 % Haven't seen this figure type before.
9686 \csname newcount
\endcsname #1%
9688 % Remember to reset this floatno at the next chap.
9689 \expandafter\gdef\expandafter\resetallfloatnos
9690 \expandafter{\resetallfloatnos #1=
0 }%
9695 % \setref calls this to get the XREFLABEL-snt value. We want an @xref
9696 % to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we
9697 % first read the @float command.
9699 \def\Yfloat{\floattype@tie
\chaplevelprefix\the\floatno}%
9701 % Magic string used for the XREFLABEL-title value, so \xrefX can
9702 % distinguish floats from other xref types.
9703 \def\floatmagic{!!float!!
}
9705 % #1 is the control sequence we are passed; we expand into a conditional
9706 % which is true if #1 represents a float ref. That is, the magic
9707 % \lastsection value which we \setref above.
9709 \def\iffloat#1{\expandafter\doiffloat#1==
\finish}
9711 % #1 is (maybe) the \floatmagic string. If so, #2 will be the
9712 % (safe) float type for this float. We set \iffloattype to #2.
9714 \def\doiffloat#1=
#2=
#3\finish{%
9716 \def\iffloattype{#2}%
9717 \ifx\temp\floatmagic
9720 % @listoffloats FLOATTYPE - print a list of floats like a table of contents.
9722 \parseargdef\listoffloats{%
9723 \def\floattype{#1}% floattype
9725 % the floattype might have accents or other special characters,
9726 % but we need to use it in a control sequence name.
9729 \xdef\safefloattype{\floattype}%
9732 % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE.
9733 \expandafter\ifx\csname floatlist
\safefloattype\endcsname \relax
9735 % if the user said @listoffloats foo but never @float foo.
9736 \message{\linenumber No `
\safefloattype' floats to list.
}%
9740 \leftskip=
\tocindent % indent these entries like a toc
9741 \let\do=
\listoffloatsdo
9742 \csname floatlist
\safefloattype\endcsname
9747 % This is called on each entry in a list of floats. We're passed the
9748 % xref label, in the form LABEL-title, which is how we save it in the
9749 % aux file. We strip off the -title and look up \XRLABEL-lof, which
9750 % has the text we're supposed to typeset here.
9752 % Figures without xref labels will not be included in the list (since
9753 % they won't appear in the aux file).
9755 \def\listoffloatsdo#1{\listoffloatsdoentry#1\finish}
9756 \def\listoffloatsdoentry#1-title
\finish{{%
9757 % Can't fully expand XR#1-lof because it can contain anything. Just
9758 % pass the control sequence. On the other hand, XR#1-pg is just the
9759 % page number, and we want to fully expand that so we can get a link
9761 \toksA =
\expandafter{\csname XR
#1-lof
\endcsname}%
9763 % use the same \entry macro we use to generate the TOC and index.
9764 \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR
#1-pg
\endcsname}}%
9769 \message{localization,
}
9771 % For single-language documents, @documentlanguage is usually given very
9772 % early, just after @documentencoding. Single argument is the language
9773 % (de) or locale (de_DE) abbreviation.
9776 \catcode`
\_ =
\active
9778 \parseargdef\documentlanguage{%
9779 \tex % read txi-??.tex file in plain TeX.
9780 % Read the file by the name they passed if it exists.
9781 \let_ =
\normalunderscore % normal _ character for filename test
9782 \openin 1 txi-
#1.tex
9784 \documentlanguagetrywithoutunderscore #1_
\finish
9786 \globaldefs =
1 % everything in the txi-LL files needs to persist
9790 \endgroup % end raw TeX
9793 % If they passed de_DE, and txi-de_DE.tex doesn't exist,
9796 \gdef\documentlanguagetrywithoutunderscore#1_
#2\finish{%
9797 \openin 1 txi-
#1.tex
9799 \errhelp =
\nolanghelp
9800 \errmessage{Cannot read language file txi-
#1.tex
}%
9802 \globaldefs =
1 % everything in the txi-LL files needs to persist
9807 }% end of special _ catcode
9809 \newhelp\nolanghelp{The given language definition file cannot be found or
9810 is empty. Maybe you need to install it? Putting it in the current
9811 directory should work if nowhere else does.
}
9813 % This macro is called from txi-??.tex files; the first argument is the
9814 % \language name to set (without the "\lang@" prefix), the second and
9815 % third args are \{left,right}hyphenmin.
9817 % The language names to pass are determined when the format is built.
9818 % See the etex.log file created at that time, e.g.,
9819 % /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log.
9821 % With TeX Live 2008, etex now includes hyphenation patterns for all
9822 % available languages. This means we can support hyphenation in
9823 % Texinfo, at least to some extent. (This still doesn't solve the
9824 % accented characters problem.)
9827 \def\txisetlanguage#1#2#3{%
9828 % do not set the language if the name is undefined in the current TeX.
9829 \expandafter\ifx\csname lang@
#1\endcsname \relax
9830 \message{no patterns for
#1}%
9832 \global\language =
\csname lang@
#1\endcsname
9834 % but there is no harm in adjusting the hyphenmin values regardless.
9835 \global\lefthyphenmin =
#2\relax
9836 \global\righthyphenmin =
#3\relax
9839 % XeTeX and LuaTeX can handle Unicode natively.
9840 % Their default I/O uses UTF-8 sequences instead of a byte-wise operation.
9841 % Other TeX engines' I/O (pdfTeX, etc.) is byte-wise.
9843 \newif\iftxinativeunicodecapable
9844 \newif\iftxiusebytewiseio
9846 \ifx\XeTeXrevision\thisisundefined
9847 \ifx\luatexversion\thisisundefined
9848 \txinativeunicodecapablefalse
9849 \txiusebytewiseiotrue
9851 \txinativeunicodecapabletrue
9852 \txiusebytewiseiofalse
9855 \txinativeunicodecapabletrue
9856 \txiusebytewiseiofalse
9859 % Set I/O by bytes instead of UTF-8 sequence for XeTeX and LuaTex
9860 % for non-UTF-8 (byte-wise) encodings.
9862 \def\setbytewiseio{%
9863 \ifx\XeTeXrevision\thisisundefined
9865 \XeTeXdefaultencoding "bytes"
% For subsequent files to be read
9866 \XeTeXinputencoding "bytes"
% For document root file
9867 % Unfortunately, there seems to be no corresponding XeTeX command for
9868 % output encoding. This is a problem for auxiliary index and TOC files.
9869 % The only solution would be perhaps to write out @U{...} sequences in
9870 % place of non-ASCII characters.
9873 \ifx\luatexversion\thisisundefined
9876 local utf8_char
, byte
, gsub = unicode
.utf8
.char
, string.byte
, string.gsub
9877 local function convert_char (char
)
9878 return utf8_char(byte(char
))
9881 local function convert_line (line
)
9882 return gsub(line
, ".", convert_char
)
9885 callback
.register("process_input_buffer", convert_line
)
9887 local function convert_line_out (line
)
9889 for c
in string.utfvalues(line
) do
9890 line_out
= line_out
.. string.char(c
)
9895 callback
.register("process_output_buffer", convert_line_out
)
9899 \txiusebytewiseiotrue
9903 % Helpers for encodings.
9904 % Set the catcode of characters 128 through 255 to the specified number.
9906 \def\setnonasciicharscatcode#1{%
9908 \loop\ifnum\count255<
256
9909 \global\catcode\count255=
#1\relax
9910 \advance\count255 by
1
9914 \def\setnonasciicharscatcodenonglobal#1{%
9916 \loop\ifnum\count255<
256
9917 \catcode\count255=
#1\relax
9918 \advance\count255 by
1
9922 % @documentencoding sets the definition of non-ASCII characters
9923 % according to the specified encoding.
9925 \def\documentencoding{\parseargusing\filenamecatcodes\documentencodingzzz}
9926 \def\documentencodingzzz#1{%
9928 % Encoding being declared for the document.
9929 \def\declaredencoding{\csname #1.enc
\endcsname}%
9931 % Supported encodings: names converted to tokens in order to be able
9932 % to compare them with \ifx.
9933 \def\ascii{\csname US-ASCII.enc
\endcsname}%
9934 \def\latnine{\csname ISO-
8859-
15.enc
\endcsname}%
9935 \def\latone{\csname ISO-
8859-
1.enc
\endcsname}%
9936 \def\lattwo{\csname ISO-
8859-
2.enc
\endcsname}%
9937 \def\utfeight{\csname UTF-
8.enc
\endcsname}%
9939 \ifx \declaredencoding \ascii
9942 \else \ifx \declaredencoding \lattwo
9943 \iftxinativeunicodecapable
9946 \setnonasciicharscatcode\active
9949 \else \ifx \declaredencoding \latone
9950 \iftxinativeunicodecapable
9953 \setnonasciicharscatcode\active
9956 \else \ifx \declaredencoding \latnine
9957 \iftxinativeunicodecapable
9960 \setnonasciicharscatcode\active
9963 \else \ifx \declaredencoding \utfeight
9964 \iftxinativeunicodecapable
9965 % For native Unicode handling (XeTeX and LuaTeX)
9966 \nativeunicodechardefs
9968 % For treating UTF-8 as byte sequences (TeX, eTeX and pdfTeX)
9969 \setnonasciicharscatcode\active
9970 % since we already invoked \utfeightchardefs at the top level
9971 % (below), do not re-invoke it, otherwise our check for duplicated
9972 % definitions gets triggered. Making non-ascii chars active is
9977 \message{Ignoring unknown
document encoding:
#1.
}%
9985 \ifx\XeTeXrevision\thisisundefined
9987 \ifx \declaredencoding \utfeight
9989 \ifx \declaredencoding \ascii
9991 \message{Warning: XeTeX with non-UTF-
8 encodings cannot handle
%
9992 non-ASCII characters in auxiliary files.
}%
9999 % A message to be logged when using a character that isn't available
10000 % the default font encoding (OT1).
10002 \def\missingcharmsg#1{\message{Character missing, sorry:
#1.
}}
10004 % Take account of \c (plain) vs. \, (Texinfo) difference.
10005 \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,
{#1}\fi}
10007 % First, make active non-ASCII characters in order for them to be
10008 % correctly categorized when TeX reads the replacement text of
10009 % macros containing the character definitions.
10010 \setnonasciicharscatcode\active
10013 \def\gdefchar#1#2{%
10015 \ifpassthroughchars
10022 % Latin1 (ISO-8859-1) character definitions.
10023 \def\latonechardefs{%
10024 \gdefchar^^a0
{\tie}
10025 \gdefchar^^a1
{\exclamdown}
10026 \gdefchar^^a2
{{\tcfont \char162}} % cent
10027 \gdefchar^^a3
{\pounds{}}
10028 \gdefchar^^a4
{{\tcfont \char164}} % currency
10029 \gdefchar^^a5
{{\tcfont \char165}} % yen
10030 \gdefchar^^a6
{{\tcfont \char166}} % broken bar
10032 \gdefchar^^a8
{\"
{}}
10033 \gdefchar^^a9
{\copyright{}}
10034 \gdefchar^^aa
{\ordf}
10035 \gdefchar^^ab
{\guillemetleft{}}
10036 \gdefchar^^ac
{\ensuremath\lnot}
10038 \gdefchar^^ae
{\registeredsymbol{}}
10039 \gdefchar^^af
{\=
{}}
10041 \gdefchar^^b0
{\textdegree}
10042 \gdefchar^^b1
{$
\pm$
}
10043 \gdefchar^^b2
{$^
2$
}
10044 \gdefchar^^b3
{$^
3$
}
10045 \gdefchar^^b4
{\'
{}}
10046 \gdefchar^^b5
{$
\mu$
}
10048 \gdefchar^^b7
{\ensuremath\cdot}
10049 \gdefchar^^b8
{\cedilla\
}
10050 \gdefchar^^b9
{$^
1$
}
10051 \gdefchar^^ba
{\ordm}
10052 \gdefchar^^bb
{\guillemetright{}}
10053 \gdefchar^^bc
{$
1\over4$
}
10054 \gdefchar^^bd
{$
1\over2$
}
10055 \gdefchar^^be
{$
3\over4$
}
10056 \gdefchar^^bf
{\questiondown}
10063 \gdefchar^^c5
{\ringaccent A
}
10065 \gdefchar^^c7
{\cedilla C
}
10082 \gdefchar^^d7
{$
\times$
}
10097 \gdefchar^^e5
{\ringaccent a
}
10099 \gdefchar^^e7
{\cedilla c
}
10104 \gdefchar^^ec
{\`
{\dotless i
}}
10105 \gdefchar^^ed
{\'
{\dotless i
}}
10106 \gdefchar^^ee
{\^
{\dotless i
}}
10107 \gdefchar^^ef
{\"
{\dotless i
}}
10116 \gdefchar^^f7
{$
\div$
}
10127 % Latin9 (ISO-8859-15) encoding character definitions.
10128 \def\latninechardefs{%
10129 % Encoding is almost identical to Latin1.
10132 \gdefchar^^a4
{\euro{}}
10133 \gdefchar^^a6
{\v S
}
10134 \gdefchar^^a8
{\v s
}
10135 \gdefchar^^b4
{\v Z
}
10136 \gdefchar^^b8
{\v z
}
10142 % Latin2 (ISO-8859-2) character definitions.
10143 \def\lattwochardefs{%
10144 \gdefchar^^a0
{\tie}
10145 \gdefchar^^a1
{\ogonek{A
}}
10146 \gdefchar^^a2
{\u{}}
10148 \gdefchar^^a4
{\missingcharmsg{CURRENCY SIGN
}}
10149 \gdefchar^^a5
{\v L
}
10152 \gdefchar^^a8
{\"
{}}
10153 \gdefchar^^a9
{\v S
}
10154 \gdefchar^^aa
{\cedilla S
}
10155 \gdefchar^^ab
{\v T
}
10158 \gdefchar^^ae
{\v Z
}
10159 \gdefchar^^af
{\dotaccent Z
}
10161 \gdefchar^^b0
{\textdegree{}}
10162 \gdefchar^^b1
{\ogonek{a
}}
10163 \gdefchar^^b2
{\ogonek{ }}
10165 \gdefchar^^b4
{\'
{}}
10166 \gdefchar^^b5
{\v l
}
10168 \gdefchar^^b7
{\v{}}
10169 \gdefchar^^b8
{\cedilla\
}
10170 \gdefchar^^b9
{\v s
}
10171 \gdefchar^^ba
{\cedilla s
}
10172 \gdefchar^^bb
{\v t
}
10174 \gdefchar^^bd
{\H{}}
10175 \gdefchar^^be
{\v z
}
10176 \gdefchar^^bf
{\dotaccent z
}
10181 \gdefchar^^c3
{\u A
}
10185 \gdefchar^^c7
{\cedilla C
}
10186 \gdefchar^^c8
{\v C
}
10188 \gdefchar^^ca
{\ogonek{E
}}
10190 \gdefchar^^cc
{\v E
}
10193 \gdefchar^^cf
{\v D
}
10197 \gdefchar^^d2
{\v N
}
10200 \gdefchar^^d5
{\H O
}
10202 \gdefchar^^d7
{$
\times$
}
10203 \gdefchar^^d8
{\v R
}
10204 \gdefchar^^d9
{\ringaccent U
}
10206 \gdefchar^^db
{\H U
}
10209 \gdefchar^^de
{\cedilla T
}
10215 \gdefchar^^e3
{\u a
}
10219 \gdefchar^^e7
{\cedilla c
}
10220 \gdefchar^^e8
{\v c
}
10222 \gdefchar^^ea
{\ogonek{e
}}
10224 \gdefchar^^ec
{\v e
}
10225 \gdefchar^^ed
{\'
{\dotless{i
}}}
10226 \gdefchar^^ee
{\^
{\dotless{i
}}}
10227 \gdefchar^^ef
{\v d
}
10231 \gdefchar^^f2
{\v n
}
10234 \gdefchar^^f5
{\H o
}
10236 \gdefchar^^f7
{$
\div$
}
10237 \gdefchar^^f8
{\v r
}
10238 \gdefchar^^f9
{\ringaccent u
}
10240 \gdefchar^^fb
{\H u
}
10243 \gdefchar^^fe
{\cedilla t
}
10244 \gdefchar^^ff
{\dotaccent{}}
10247 % UTF-8 character definitions.
10249 % This code to support UTF-8 is based on LaTeX's utf8.def, with some
10250 % changes for Texinfo conventions. It is included here under the GPL by
10251 % permission from Frank Mittelbach and the LaTeX team.
10253 \newcount\countUTFx
10254 \newcount\countUTFy
10255 \newcount\countUTFz
10257 \gdef\UTFviiiTwoOctets#1#2{\expandafter
10258 \UTFviiiDefined\csname u8:
#1\string #2\endcsname}
10260 \gdef\UTFviiiThreeOctets#1#2#3{\expandafter
10261 \UTFviiiDefined\csname u8:
#1\string #2\string #3\endcsname}
10263 \gdef\UTFviiiFourOctets#1#2#3#4{\expandafter
10264 \UTFviiiDefined\csname u8:
#1\string #2\string #3\string #4\endcsname}
10266 \gdef\UTFviiiDefined#1{%
10268 \message{\linenumber Unicode char
\string #1 not defined for Texinfo
}%
10274 % Give non-ASCII bytes the active definitions for processing UTF-8 sequences
10280 % Loop from \countUTFx to \countUTFy, performing \UTFviiiTmp
10281 % substituting ~ and $ with a character token of that value.
10283 \global\catcode\countUTFx\active
10284 \uccode`\~
\countUTFx
10285 \uccode`\$
\countUTFx
10286 \uppercase\expandafter{\UTFviiiTmp}%
10287 \advance\countUTFx by
1
10288 \ifnum\countUTFx <
\countUTFy
10289 \expandafter\UTFviiiLoop
10292 % For bytes other than the first in a UTF-8 sequence. Not expected to
10293 % be expanded except when writing to auxiliary files.
10298 \ifpassthroughchars $
\fi}}%
10305 \ifpassthroughchars $
%
10306 \else\expandafter\UTFviiiTwoOctets\expandafter$
\fi}}%
10313 \ifpassthroughchars $
%
10314 \else\expandafter\UTFviiiThreeOctets\expandafter$
\fi}}%
10321 \ifpassthroughchars $
%
10322 \else\expandafter\UTFviiiFourOctets\expandafter$
\fi
10327 \def\globallet{\global\let} % save some \expandafter's below
10329 % @U{xxxx} to produce U+xxxx, if we support it.
10331 \expandafter\ifx\csname uni:
#1\endcsname \relax
10332 \iftxinativeunicodecapable
10333 % All Unicode characters can be used if native Unicode handling is
10334 % active. However, if the font does not have the glyph,
10335 % letters are missing.
10337 \uccode`\.="
#1\relax
10341 \errhelp =
\EMsimple
10342 \errmessage{Unicode character U+
#1 not supported, sorry
}%
10345 \csname uni:
#1\endcsname
10349 % These macros are used here to construct the name of a control
10350 % sequence to be defined.
10351 \def\UTFviiiTwoOctetsName#1#2{%
10352 \csname u8:
#1\string #2\endcsname}%
10353 \def\UTFviiiThreeOctetsName#1#2#3{%
10354 \csname u8:
#1\string #2\string #3\endcsname}%
10355 \def\UTFviiiFourOctetsName#1#2#3#4{%
10356 \csname u8:
#1\string #2\string #3\string #4\endcsname}%
10358 % For UTF-8 byte sequences (TeX, e-TeX and pdfTeX),
10359 % provide a definition macro to replace a Unicode character;
10360 % this gets used by the @U command
10370 \gdef\DeclareUnicodeCharacterUTFviii#1#2{%
10371 \countUTFz = "
#1\relax
10375 % Give \u8:... its definition. The sequence of seven \expandafter's
10376 % expands after the \gdef three times, e.g.
10378 % 1. \UTFviiTwoOctetsName B1 B2
10379 % 2. \csname u8:B1 \string B2 \endcsname
10380 % 3. \u8: B1 B2 (a single control sequence token)
10382 \expandafter\expandafter
10383 \expandafter\expandafter
10384 \expandafter\expandafter
10385 \expandafter\gdef \UTFviiiTmp{#2}%
10387 \expandafter\ifx\csname uni:
#1\endcsname \relax \else
10388 \message{Internal error, already defined:
#1}%
10391 % define an additional control sequence for this code point.
10392 \expandafter\globallet\csname uni:
#1\endcsname \UTFviiiTmp
10395 % Given the value in \countUTFz as a Unicode code point, set \UTFviiiTmp
10396 % to the corresponding UTF-8 sequence.
10397 \gdef\parseXMLCharref{%
10398 \ifnum\countUTFz < "A0
\relax
10399 \errhelp =
\EMsimple
10400 \errmessage{Cannot define Unicode char value <
00A0
}%
10401 \else\ifnum\countUTFz < "
800\relax
10403 \parseUTFviiiB C
\UTFviiiTwoOctetsName.,
%
10404 \else\ifnum\countUTFz < "
10000\relax
10407 \parseUTFviiiB E
\UTFviiiThreeOctetsName.
{,;
}%
10412 \parseUTFviiiB F
\UTFviiiFourOctetsName.
{!,;
}%
10416 % Extract a byte from the end of the UTF-8 representation of \countUTFx.
10417 % It must be a non-initial byte in the sequence.
10418 % Change \uccode of #1 for it to be used in \parseUTFviiiB as one
10420 \gdef\parseUTFviiiA#1{%
10421 \countUTFx =
\countUTFz
10422 \divide\countUTFz by
64
10423 \countUTFy =
\countUTFz % Save to be the future value of \countUTFz.
10424 \multiply\countUTFz by
64
10426 % \countUTFz is now \countUTFx with the last 5 bits cleared. Subtract
10427 % in order to get the last five bits.
10428 \advance\countUTFx by -
\countUTFz
10430 % Convert this to the byte in the UTF-8 sequence.
10431 \advance\countUTFx by
128
10432 \uccode `
#1\countUTFx
10433 \countUTFz =
\countUTFy}
10435 % Used to put a UTF-8 byte sequence into \UTFviiiTmp
10436 % #1 is the increment for \countUTFz to yield a the first byte of the UTF-8
10438 % #2 is one of the \UTFviii*OctetsName macros.
10439 % #3 is always a full stop (.)
10440 % #4 is a template for the other bytes in the sequence. The values for these
10441 % bytes is substituted in here with \uppercase using the \uccode's.
10442 \gdef\parseUTFviiiB#1#2#3#4{%
10443 \advance\countUTFz by "
#10\relax
10444 \uccode `
#3\countUTFz
10445 \uppercase{\gdef\UTFviiiTmp{#2#3#4}}}
10448 % For native Unicode handling (XeTeX and LuaTeX),
10449 % provide a definition macro that sets a catcode to `other' non-globally
10451 \def\DeclareUnicodeCharacterNativeOther#1#2{%
10455 % https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_M
10456 % U+0000..U+007F = https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block)
10457 % U+0080..U+00FF = https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)
10458 % U+0100..U+017F = https://en.wikipedia.org/wiki/Latin_Extended-A
10459 % U+0180..U+024F = https://en.wikipedia.org/wiki/Latin_Extended-B
10461 % Many of our renditions are less than wonderful, and all the missing
10462 % characters are available somewhere. Loading the necessary fonts
10463 % awaits user request. We can't truly support Unicode without
10464 % reimplementing everything that's been done in LaTeX for many years,
10465 % plus probably using luatex or xetex, and who knows what else.
10466 % We won't be doing that here in this simple file. But we can try to at
10467 % least make most of the characters not bomb out.
10469 \def\unicodechardefs{%
10470 \DeclareUnicodeCharacter{00A0
}{\tie}%
10471 \DeclareUnicodeCharacter{00A1
}{\exclamdown}%
10472 \DeclareUnicodeCharacter{00A2
}{{\tcfont \char162}}% 0242=cent
10473 \DeclareUnicodeCharacter{00A3
}{\pounds{}}%
10474 \DeclareUnicodeCharacter{00A4
}{{\tcfont \char164}}% 0244=currency
10475 \DeclareUnicodeCharacter{00A5
}{{\tcfont \char165}}% 0245=yen
10476 \DeclareUnicodeCharacter{00A6
}{{\tcfont \char166}}% 0246=brokenbar
10477 \DeclareUnicodeCharacter{00A7
}{\S}%
10478 \DeclareUnicodeCharacter{00A8
}{\"
{ }}%
10479 \DeclareUnicodeCharacter{00A9
}{\copyright{}}%
10480 \DeclareUnicodeCharacter{00AA
}{\ordf}%
10481 \DeclareUnicodeCharacter{00AB
}{\guillemetleft{}}%
10482 \DeclareUnicodeCharacter{00AC
}{\ensuremath\lnot}%
10483 \DeclareUnicodeCharacter{00AD
}{\-
}%
10484 \DeclareUnicodeCharacter{00AE
}{\registeredsymbol{}}%
10485 \DeclareUnicodeCharacter{00AF
}{\=
{ }}%
10487 \DeclareUnicodeCharacter{00B0
}{\ringaccent{ }}%
10488 \DeclareUnicodeCharacter{00B1
}{\ensuremath\pm}%
10489 \DeclareUnicodeCharacter{00B2
}{$^
2$
}%
10490 \DeclareUnicodeCharacter{00B3
}{$^
3$
}%
10491 \DeclareUnicodeCharacter{00B4
}{\'
{ }}%
10492 \DeclareUnicodeCharacter{00B5
}{$
\mu$
}%
10493 \DeclareUnicodeCharacter{00B6
}{\P}%
10494 \DeclareUnicodeCharacter{00B7
}{\ensuremath\cdot}%
10495 \DeclareUnicodeCharacter{00B8
}{\cedilla{ }}%
10496 \DeclareUnicodeCharacter{00B9
}{$^
1$
}%
10497 \DeclareUnicodeCharacter{00BA
}{\ordm}%
10498 \DeclareUnicodeCharacter{00BB
}{\guillemetright{}}%
10499 \DeclareUnicodeCharacter{00BC
}{$
1\over4$
}%
10500 \DeclareUnicodeCharacter{00BD
}{$
1\over2$
}%
10501 \DeclareUnicodeCharacter{00BE
}{$
3\over4$
}%
10502 \DeclareUnicodeCharacter{00BF
}{\questiondown}%
10504 \DeclareUnicodeCharacter{00C0
}{\`A
}%
10505 \DeclareUnicodeCharacter{00C1
}{\'A
}%
10506 \DeclareUnicodeCharacter{00C2
}{\^A
}%
10507 \DeclareUnicodeCharacter{00C3
}{\~A
}%
10508 \DeclareUnicodeCharacter{00C4
}{\"A
}%
10509 \DeclareUnicodeCharacter{00C5
}{\AA}%
10510 \DeclareUnicodeCharacter{00C6
}{\AE}%
10511 \DeclareUnicodeCharacter{00C7
}{\cedilla{C
}}%
10512 \DeclareUnicodeCharacter{00C8
}{\`E
}%
10513 \DeclareUnicodeCharacter{00C9
}{\'E
}%
10514 \DeclareUnicodeCharacter{00CA
}{\^E
}%
10515 \DeclareUnicodeCharacter{00CB
}{\"E
}%
10516 \DeclareUnicodeCharacter{00CC
}{\`I
}%
10517 \DeclareUnicodeCharacter{00CD
}{\'I
}%
10518 \DeclareUnicodeCharacter{00CE
}{\^I
}%
10519 \DeclareUnicodeCharacter{00CF
}{\"I
}%
10521 \DeclareUnicodeCharacter{00D0
}{\DH}%
10522 \DeclareUnicodeCharacter{00D1
}{\~N
}%
10523 \DeclareUnicodeCharacter{00D2
}{\`O
}%
10524 \DeclareUnicodeCharacter{00D3
}{\'O
}%
10525 \DeclareUnicodeCharacter{00D4
}{\^O
}%
10526 \DeclareUnicodeCharacter{00D5
}{\~O
}%
10527 \DeclareUnicodeCharacter{00D6
}{\"O
}%
10528 \DeclareUnicodeCharacter{00D7
}{\ensuremath\times}%
10529 \DeclareUnicodeCharacter{00D8
}{\O}%
10530 \DeclareUnicodeCharacter{00D9
}{\`U
}%
10531 \DeclareUnicodeCharacter{00DA
}{\'U
}%
10532 \DeclareUnicodeCharacter{00DB
}{\^U
}%
10533 \DeclareUnicodeCharacter{00DC
}{\"U
}%
10534 \DeclareUnicodeCharacter{00DD
}{\'Y
}%
10535 \DeclareUnicodeCharacter{00DE
}{\TH}%
10536 \DeclareUnicodeCharacter{00DF
}{\ss}%
10538 \DeclareUnicodeCharacter{00E0
}{\`a
}%
10539 \DeclareUnicodeCharacter{00E1
}{\'a
}%
10540 \DeclareUnicodeCharacter{00E2
}{\^a
}%
10541 \DeclareUnicodeCharacter{00E3
}{\~a
}%
10542 \DeclareUnicodeCharacter{00E4
}{\"a
}%
10543 \DeclareUnicodeCharacter{00E5
}{\aa}%
10544 \DeclareUnicodeCharacter{00E6
}{\ae}%
10545 \DeclareUnicodeCharacter{00E7
}{\cedilla{c
}}%
10546 \DeclareUnicodeCharacter{00E8
}{\`e
}%
10547 \DeclareUnicodeCharacter{00E9
}{\'e
}%
10548 \DeclareUnicodeCharacter{00EA
}{\^e
}%
10549 \DeclareUnicodeCharacter{00EB
}{\"e
}%
10550 \DeclareUnicodeCharacter{00EC
}{\`
{\dotless{i
}}}%
10551 \DeclareUnicodeCharacter{00ED
}{\'
{\dotless{i
}}}%
10552 \DeclareUnicodeCharacter{00EE
}{\^
{\dotless{i
}}}%
10553 \DeclareUnicodeCharacter{00EF
}{\"
{\dotless{i
}}}%
10555 \DeclareUnicodeCharacter{00F0
}{\dh}%
10556 \DeclareUnicodeCharacter{00F1
}{\~n
}%
10557 \DeclareUnicodeCharacter{00F2
}{\`o
}%
10558 \DeclareUnicodeCharacter{00F3
}{\'o
}%
10559 \DeclareUnicodeCharacter{00F4
}{\^o
}%
10560 \DeclareUnicodeCharacter{00F5
}{\~o
}%
10561 \DeclareUnicodeCharacter{00F6
}{\"o
}%
10562 \DeclareUnicodeCharacter{00F7
}{\ensuremath\div}%
10563 \DeclareUnicodeCharacter{00F8
}{\o}%
10564 \DeclareUnicodeCharacter{00F9
}{\`u
}%
10565 \DeclareUnicodeCharacter{00FA
}{\'u
}%
10566 \DeclareUnicodeCharacter{00FB
}{\^u
}%
10567 \DeclareUnicodeCharacter{00FC
}{\"u
}%
10568 \DeclareUnicodeCharacter{00FD
}{\'y
}%
10569 \DeclareUnicodeCharacter{00FE
}{\th}%
10570 \DeclareUnicodeCharacter{00FF
}{\"y
}%
10572 \DeclareUnicodeCharacter{0100}{\=A
}%
10573 \DeclareUnicodeCharacter{0101}{\=a
}%
10574 \DeclareUnicodeCharacter{0102}{\u{A
}}%
10575 \DeclareUnicodeCharacter{0103}{\u{a
}}%
10576 \DeclareUnicodeCharacter{0104}{\ogonek{A
}}%
10577 \DeclareUnicodeCharacter{0105}{\ogonek{a
}}%
10578 \DeclareUnicodeCharacter{0106}{\'C
}%
10579 \DeclareUnicodeCharacter{0107}{\'c
}%
10580 \DeclareUnicodeCharacter{0108}{\^C
}%
10581 \DeclareUnicodeCharacter{0109}{\^c
}%
10582 \DeclareUnicodeCharacter{010A
}{\dotaccent{C
}}%
10583 \DeclareUnicodeCharacter{010B
}{\dotaccent{c
}}%
10584 \DeclareUnicodeCharacter{010C
}{\v{C
}}%
10585 \DeclareUnicodeCharacter{010D
}{\v{c
}}%
10586 \DeclareUnicodeCharacter{010E
}{\v{D
}}%
10587 \DeclareUnicodeCharacter{010F
}{d'
}%
10589 \DeclareUnicodeCharacter{0110}{\DH}%
10590 \DeclareUnicodeCharacter{0111}{\dh}%
10591 \DeclareUnicodeCharacter{0112}{\=E
}%
10592 \DeclareUnicodeCharacter{0113}{\=e
}%
10593 \DeclareUnicodeCharacter{0114}{\u{E
}}%
10594 \DeclareUnicodeCharacter{0115}{\u{e
}}%
10595 \DeclareUnicodeCharacter{0116}{\dotaccent{E
}}%
10596 \DeclareUnicodeCharacter{0117}{\dotaccent{e
}}%
10597 \DeclareUnicodeCharacter{0118}{\ogonek{E
}}%
10598 \DeclareUnicodeCharacter{0119}{\ogonek{e
}}%
10599 \DeclareUnicodeCharacter{011A
}{\v{E
}}%
10600 \DeclareUnicodeCharacter{011B
}{\v{e
}}%
10601 \DeclareUnicodeCharacter{011C
}{\^G
}%
10602 \DeclareUnicodeCharacter{011D
}{\^g
}%
10603 \DeclareUnicodeCharacter{011E
}{\u{G
}}%
10604 \DeclareUnicodeCharacter{011F
}{\u{g
}}%
10606 \DeclareUnicodeCharacter{0120}{\dotaccent{G
}}%
10607 \DeclareUnicodeCharacter{0121}{\dotaccent{g
}}%
10608 \DeclareUnicodeCharacter{0122}{\cedilla{G
}}%
10609 \DeclareUnicodeCharacter{0123}{\cedilla{g
}}%
10610 \DeclareUnicodeCharacter{0124}{\^H
}%
10611 \DeclareUnicodeCharacter{0125}{\^h
}%
10612 \DeclareUnicodeCharacter{0126}{\missingcharmsg{H WITH STROKE
}}%
10613 \DeclareUnicodeCharacter{0127}{\missingcharmsg{h WITH STROKE
}}%
10614 \DeclareUnicodeCharacter{0128}{\~I
}%
10615 \DeclareUnicodeCharacter{0129}{\~
{\dotless{i
}}}%
10616 \DeclareUnicodeCharacter{012A
}{\=I
}%
10617 \DeclareUnicodeCharacter{012B
}{\=
{\dotless{i
}}}%
10618 \DeclareUnicodeCharacter{012C
}{\u{I
}}%
10619 \DeclareUnicodeCharacter{012D
}{\u{\dotless{i
}}}%
10620 \DeclareUnicodeCharacter{012E
}{\ogonek{I
}}%
10621 \DeclareUnicodeCharacter{012F
}{\ogonek{i
}}%
10623 \DeclareUnicodeCharacter{0130}{\dotaccent{I
}}%
10624 \DeclareUnicodeCharacter{0131}{\dotless{i
}}%
10625 \DeclareUnicodeCharacter{0132}{IJ
}%
10626 \DeclareUnicodeCharacter{0133}{ij
}%
10627 \DeclareUnicodeCharacter{0134}{\^J
}%
10628 \DeclareUnicodeCharacter{0135}{\^
{\dotless{j
}}}%
10629 \DeclareUnicodeCharacter{0136}{\cedilla{K
}}%
10630 \DeclareUnicodeCharacter{0137}{\cedilla{k
}}%
10631 \DeclareUnicodeCharacter{0138}{\ensuremath\kappa}%
10632 \DeclareUnicodeCharacter{0139}{\'L
}%
10633 \DeclareUnicodeCharacter{013A
}{\'l
}%
10634 \DeclareUnicodeCharacter{013B
}{\cedilla{L
}}%
10635 \DeclareUnicodeCharacter{013C
}{\cedilla{l
}}%
10636 \DeclareUnicodeCharacter{013D
}{L'
}% should kern
10637 \DeclareUnicodeCharacter{013E
}{l'
}% should kern
10638 \DeclareUnicodeCharacter{013F
}{L
\U{00B7
}}%
10640 \DeclareUnicodeCharacter{0140}{l
\U{00B7
}}%
10641 \DeclareUnicodeCharacter{0141}{\L}%
10642 \DeclareUnicodeCharacter{0142}{\l}%
10643 \DeclareUnicodeCharacter{0143}{\'N
}%
10644 \DeclareUnicodeCharacter{0144}{\'n
}%
10645 \DeclareUnicodeCharacter{0145}{\cedilla{N
}}%
10646 \DeclareUnicodeCharacter{0146}{\cedilla{n
}}%
10647 \DeclareUnicodeCharacter{0147}{\v{N
}}%
10648 \DeclareUnicodeCharacter{0148}{\v{n
}}%
10649 \DeclareUnicodeCharacter{0149}{'n
}%
10650 \DeclareUnicodeCharacter{014A
}{\missingcharmsg{ENG
}}%
10651 \DeclareUnicodeCharacter{014B
}{\missingcharmsg{eng
}}%
10652 \DeclareUnicodeCharacter{014C
}{\=O
}%
10653 \DeclareUnicodeCharacter{014D
}{\=o
}%
10654 \DeclareUnicodeCharacter{014E
}{\u{O
}}%
10655 \DeclareUnicodeCharacter{014F
}{\u{o
}}%
10657 \DeclareUnicodeCharacter{0150}{\H{O
}}%
10658 \DeclareUnicodeCharacter{0151}{\H{o
}}%
10659 \DeclareUnicodeCharacter{0152}{\OE}%
10660 \DeclareUnicodeCharacter{0153}{\oe}%
10661 \DeclareUnicodeCharacter{0154}{\'R
}%
10662 \DeclareUnicodeCharacter{0155}{\'r
}%
10663 \DeclareUnicodeCharacter{0156}{\cedilla{R
}}%
10664 \DeclareUnicodeCharacter{0157}{\cedilla{r
}}%
10665 \DeclareUnicodeCharacter{0158}{\v{R
}}%
10666 \DeclareUnicodeCharacter{0159}{\v{r
}}%
10667 \DeclareUnicodeCharacter{015A
}{\'S
}%
10668 \DeclareUnicodeCharacter{015B
}{\'s
}%
10669 \DeclareUnicodeCharacter{015C
}{\^S
}%
10670 \DeclareUnicodeCharacter{015D
}{\^s
}%
10671 \DeclareUnicodeCharacter{015E
}{\cedilla{S
}}%
10672 \DeclareUnicodeCharacter{015F
}{\cedilla{s
}}%
10674 \DeclareUnicodeCharacter{0160}{\v{S
}}%
10675 \DeclareUnicodeCharacter{0161}{\v{s
}}%
10676 \DeclareUnicodeCharacter{0162}{\cedilla{T
}}%
10677 \DeclareUnicodeCharacter{0163}{\cedilla{t
}}%
10678 \DeclareUnicodeCharacter{0164}{\v{T
}}%
10679 \DeclareUnicodeCharacter{0165}{\v{t
}}%
10680 \DeclareUnicodeCharacter{0166}{\missingcharmsg{H WITH STROKE
}}%
10681 \DeclareUnicodeCharacter{0167}{\missingcharmsg{h WITH STROKE
}}%
10682 \DeclareUnicodeCharacter{0168}{\~U
}%
10683 \DeclareUnicodeCharacter{0169}{\~u
}%
10684 \DeclareUnicodeCharacter{016A
}{\=U
}%
10685 \DeclareUnicodeCharacter{016B
}{\=u
}%
10686 \DeclareUnicodeCharacter{016C
}{\u{U
}}%
10687 \DeclareUnicodeCharacter{016D
}{\u{u
}}%
10688 \DeclareUnicodeCharacter{016E
}{\ringaccent{U
}}%
10689 \DeclareUnicodeCharacter{016F
}{\ringaccent{u
}}%
10691 \DeclareUnicodeCharacter{0170}{\H{U
}}%
10692 \DeclareUnicodeCharacter{0171}{\H{u
}}%
10693 \DeclareUnicodeCharacter{0172}{\ogonek{U
}}%
10694 \DeclareUnicodeCharacter{0173}{\ogonek{u
}}%
10695 \DeclareUnicodeCharacter{0174}{\^W
}%
10696 \DeclareUnicodeCharacter{0175}{\^w
}%
10697 \DeclareUnicodeCharacter{0176}{\^Y
}%
10698 \DeclareUnicodeCharacter{0177}{\^y
}%
10699 \DeclareUnicodeCharacter{0178}{\"Y
}%
10700 \DeclareUnicodeCharacter{0179}{\'Z
}%
10701 \DeclareUnicodeCharacter{017A
}{\'z
}%
10702 \DeclareUnicodeCharacter{017B
}{\dotaccent{Z
}}%
10703 \DeclareUnicodeCharacter{017C
}{\dotaccent{z
}}%
10704 \DeclareUnicodeCharacter{017D
}{\v{Z
}}%
10705 \DeclareUnicodeCharacter{017E
}{\v{z
}}%
10706 \DeclareUnicodeCharacter{017F
}{\missingcharmsg{LONG S
}}%
10708 \DeclareUnicodeCharacter{01C4
}{D
\v{Z
}}%
10709 \DeclareUnicodeCharacter{01C5
}{D
\v{z
}}%
10710 \DeclareUnicodeCharacter{01C6
}{d
\v{z
}}%
10711 \DeclareUnicodeCharacter{01C7
}{LJ
}%
10712 \DeclareUnicodeCharacter{01C8
}{Lj
}%
10713 \DeclareUnicodeCharacter{01C9
}{lj
}%
10714 \DeclareUnicodeCharacter{01CA
}{NJ
}%
10715 \DeclareUnicodeCharacter{01CB
}{Nj
}%
10716 \DeclareUnicodeCharacter{01CC
}{nj
}%
10717 \DeclareUnicodeCharacter{01CD
}{\v{A
}}%
10718 \DeclareUnicodeCharacter{01CE
}{\v{a
}}%
10719 \DeclareUnicodeCharacter{01CF
}{\v{I
}}%
10721 \DeclareUnicodeCharacter{01D0
}{\v{\dotless{i
}}}%
10722 \DeclareUnicodeCharacter{01D1
}{\v{O
}}%
10723 \DeclareUnicodeCharacter{01D2
}{\v{o
}}%
10724 \DeclareUnicodeCharacter{01D3
}{\v{U
}}%
10725 \DeclareUnicodeCharacter{01D4
}{\v{u
}}%
10727 \DeclareUnicodeCharacter{01E2
}{\=
{\AE}}%
10728 \DeclareUnicodeCharacter{01E3
}{\=
{\ae}}%
10729 \DeclareUnicodeCharacter{01E6
}{\v{G
}}%
10730 \DeclareUnicodeCharacter{01E7
}{\v{g
}}%
10731 \DeclareUnicodeCharacter{01E8
}{\v{K
}}%
10732 \DeclareUnicodeCharacter{01E9
}{\v{k
}}%
10734 \DeclareUnicodeCharacter{01F0
}{\v{\dotless{j
}}}%
10735 \DeclareUnicodeCharacter{01F1
}{DZ
}%
10736 \DeclareUnicodeCharacter{01F2
}{Dz
}%
10737 \DeclareUnicodeCharacter{01F3
}{dz
}%
10738 \DeclareUnicodeCharacter{01F4
}{\'G
}%
10739 \DeclareUnicodeCharacter{01F5
}{\'g
}%
10740 \DeclareUnicodeCharacter{01F8
}{\`N
}%
10741 \DeclareUnicodeCharacter{01F9
}{\`n
}%
10742 \DeclareUnicodeCharacter{01FC
}{\'
{\AE}}%
10743 \DeclareUnicodeCharacter{01FD
}{\'
{\ae}}%
10744 \DeclareUnicodeCharacter{01FE
}{\'
{\O}}%
10745 \DeclareUnicodeCharacter{01FF
}{\'
{\o}}%
10747 \DeclareUnicodeCharacter{021E
}{\v{H
}}%
10748 \DeclareUnicodeCharacter{021F
}{\v{h
}}%
10750 \DeclareUnicodeCharacter{0226}{\dotaccent{A
}}%
10751 \DeclareUnicodeCharacter{0227}{\dotaccent{a
}}%
10752 \DeclareUnicodeCharacter{0228}{\cedilla{E
}}%
10753 \DeclareUnicodeCharacter{0229}{\cedilla{e
}}%
10754 \DeclareUnicodeCharacter{022E
}{\dotaccent{O
}}%
10755 \DeclareUnicodeCharacter{022F
}{\dotaccent{o
}}%
10757 \DeclareUnicodeCharacter{0232}{\=Y
}%
10758 \DeclareUnicodeCharacter{0233}{\=y
}%
10759 \DeclareUnicodeCharacter{0237}{\dotless{j
}}%
10761 \DeclareUnicodeCharacter{02DB
}{\ogonek{ }}%
10763 % Greek letters upper case
10764 \DeclareUnicodeCharacter{0391}{{\it A
}}%
10765 \DeclareUnicodeCharacter{0392}{{\it B
}}%
10766 \DeclareUnicodeCharacter{0393}{\ensuremath{\mit\Gamma}}%
10767 \DeclareUnicodeCharacter{0394}{\ensuremath{\mit\Delta}}%
10768 \DeclareUnicodeCharacter{0395}{{\it E
}}%
10769 \DeclareUnicodeCharacter{0396}{{\it Z
}}%
10770 \DeclareUnicodeCharacter{0397}{{\it H
}}%
10771 \DeclareUnicodeCharacter{0398}{\ensuremath{\mit\Theta}}%
10772 \DeclareUnicodeCharacter{0399}{{\it I
}}%
10773 \DeclareUnicodeCharacter{039A
}{{\it K
}}%
10774 \DeclareUnicodeCharacter{039B
}{\ensuremath{\mit\Lambda}}%
10775 \DeclareUnicodeCharacter{039C
}{{\it M
}}%
10776 \DeclareUnicodeCharacter{039D
}{{\it N
}}%
10777 \DeclareUnicodeCharacter{039E
}{\ensuremath{\mit\Xi}}%
10778 \DeclareUnicodeCharacter{039F
}{{\it O
}}%
10779 \DeclareUnicodeCharacter{03A0
}{\ensuremath{\mit\Pi}}%
10780 \DeclareUnicodeCharacter{03A1
}{{\it P
}}%
10781 %\DeclareUnicodeCharacter{03A2}{} % none - corresponds to final sigma
10782 \DeclareUnicodeCharacter{03A3
}{\ensuremath{\mit\Sigma}}%
10783 \DeclareUnicodeCharacter{03A4
}{{\it T
}}%
10784 \DeclareUnicodeCharacter{03A5
}{\ensuremath{\mit\Upsilon}}%
10785 \DeclareUnicodeCharacter{03A6
}{\ensuremath{\mit\Phi}}%
10786 \DeclareUnicodeCharacter{03A7
}{{\it X
}}%
10787 \DeclareUnicodeCharacter{03A8
}{\ensuremath{\mit\Psi}}%
10788 \DeclareUnicodeCharacter{03A9
}{\ensuremath{\mit\Omega}}%
10790 % Vowels with accents
10791 \DeclareUnicodeCharacter{0390}{\ensuremath{\ddot{\acute\iota}}}%
10792 \DeclareUnicodeCharacter{03AC
}{\ensuremath{\acute\alpha}}%
10793 \DeclareUnicodeCharacter{03AD
}{\ensuremath{\acute\epsilon}}%
10794 \DeclareUnicodeCharacter{03AE
}{\ensuremath{\acute\eta}}%
10795 \DeclareUnicodeCharacter{03AF
}{\ensuremath{\acute\iota}}%
10796 \DeclareUnicodeCharacter{03B0
}{\ensuremath{\acute{\ddot\upsilon}}}%
10798 % Standalone accent
10799 \DeclareUnicodeCharacter{0384}{\ensuremath{\acute{\
}}}%
10801 % Greek letters lower case
10802 \DeclareUnicodeCharacter{03B1
}{\ensuremath\alpha}%
10803 \DeclareUnicodeCharacter{03B2
}{\ensuremath\beta}%
10804 \DeclareUnicodeCharacter{03B3
}{\ensuremath\gamma}%
10805 \DeclareUnicodeCharacter{03B4
}{\ensuremath\delta}%
10806 \DeclareUnicodeCharacter{03B5
}{\ensuremath\epsilon}%
10807 \DeclareUnicodeCharacter{03B6
}{\ensuremath\zeta}%
10808 \DeclareUnicodeCharacter{03B7
}{\ensuremath\eta}%
10809 \DeclareUnicodeCharacter{03B8
}{\ensuremath\theta}%
10810 \DeclareUnicodeCharacter{03B9
}{\ensuremath\iota}%
10811 \DeclareUnicodeCharacter{03BA
}{\ensuremath\kappa}%
10812 \DeclareUnicodeCharacter{03BB
}{\ensuremath\lambda}%
10813 \DeclareUnicodeCharacter{03BC
}{\ensuremath\mu}%
10814 \DeclareUnicodeCharacter{03BD
}{\ensuremath\nu}%
10815 \DeclareUnicodeCharacter{03BE
}{\ensuremath\xi}%
10816 \DeclareUnicodeCharacter{03BF
}{{\it o
}}% omicron
10817 \DeclareUnicodeCharacter{03C0
}{\ensuremath\pi}%
10818 \DeclareUnicodeCharacter{03C1
}{\ensuremath\rho}%
10819 \DeclareUnicodeCharacter{03C2
}{\ensuremath\varsigma}%
10820 \DeclareUnicodeCharacter{03C3
}{\ensuremath\sigma}%
10821 \DeclareUnicodeCharacter{03C4
}{\ensuremath\tau}%
10822 \DeclareUnicodeCharacter{03C5
}{\ensuremath\upsilon}%
10823 \DeclareUnicodeCharacter{03C6
}{\ensuremath\phi}%
10824 \DeclareUnicodeCharacter{03C7
}{\ensuremath\chi}%
10825 \DeclareUnicodeCharacter{03C8
}{\ensuremath\psi}%
10826 \DeclareUnicodeCharacter{03C9
}{\ensuremath\omega}%
10828 % More Greek vowels with accents
10829 \DeclareUnicodeCharacter{03CA
}{\ensuremath{\ddot\iota}}%
10830 \DeclareUnicodeCharacter{03CB
}{\ensuremath{\ddot\upsilon}}%
10831 \DeclareUnicodeCharacter{03CC
}{\ensuremath{\acute o
}}%
10832 \DeclareUnicodeCharacter{03CD
}{\ensuremath{\acute\upsilon}}%
10833 \DeclareUnicodeCharacter{03CE
}{\ensuremath{\acute\omega}}%
10835 % Variant Greek letters
10836 \DeclareUnicodeCharacter{03D1
}{\ensuremath\vartheta}%
10837 \DeclareUnicodeCharacter{03D6
}{\ensuremath\varpi}%
10838 \DeclareUnicodeCharacter{03F1
}{\ensuremath\varrho}%
10840 \DeclareUnicodeCharacter{1E02
}{\dotaccent{B
}}%
10841 \DeclareUnicodeCharacter{1E03
}{\dotaccent{b
}}%
10842 \DeclareUnicodeCharacter{1E04
}{\udotaccent{B
}}%
10843 \DeclareUnicodeCharacter{1E05
}{\udotaccent{b
}}%
10844 \DeclareUnicodeCharacter{1E06
}{\ubaraccent{B
}}%
10845 \DeclareUnicodeCharacter{1E07
}{\ubaraccent{b
}}%
10846 \DeclareUnicodeCharacter{1E0A
}{\dotaccent{D
}}%
10847 \DeclareUnicodeCharacter{1E0B
}{\dotaccent{d
}}%
10848 \DeclareUnicodeCharacter{1E0C
}{\udotaccent{D
}}%
10849 \DeclareUnicodeCharacter{1E0D
}{\udotaccent{d
}}%
10850 \DeclareUnicodeCharacter{1E0E
}{\ubaraccent{D
}}%
10851 \DeclareUnicodeCharacter{1E0F
}{\ubaraccent{d
}}%
10853 \DeclareUnicodeCharacter{1E1E
}{\dotaccent{F
}}%
10854 \DeclareUnicodeCharacter{1E1F
}{\dotaccent{f
}}%
10856 \DeclareUnicodeCharacter{1E20
}{\=G
}%
10857 \DeclareUnicodeCharacter{1E21
}{\=g
}%
10858 \DeclareUnicodeCharacter{1E22
}{\dotaccent{H
}}%
10859 \DeclareUnicodeCharacter{1E23
}{\dotaccent{h
}}%
10860 \DeclareUnicodeCharacter{1E24
}{\udotaccent{H
}}%
10861 \DeclareUnicodeCharacter{1E25
}{\udotaccent{h
}}%
10862 \DeclareUnicodeCharacter{1E26
}{\"H
}%
10863 \DeclareUnicodeCharacter{1E27
}{\"h
}%
10865 \DeclareUnicodeCharacter{1E30
}{\'K
}%
10866 \DeclareUnicodeCharacter{1E31
}{\'k
}%
10867 \DeclareUnicodeCharacter{1E32
}{\udotaccent{K
}}%
10868 \DeclareUnicodeCharacter{1E33
}{\udotaccent{k
}}%
10869 \DeclareUnicodeCharacter{1E34
}{\ubaraccent{K
}}%
10870 \DeclareUnicodeCharacter{1E35
}{\ubaraccent{k
}}%
10871 \DeclareUnicodeCharacter{1E36
}{\udotaccent{L
}}%
10872 \DeclareUnicodeCharacter{1E37
}{\udotaccent{l
}}%
10873 \DeclareUnicodeCharacter{1E3A
}{\ubaraccent{L
}}%
10874 \DeclareUnicodeCharacter{1E3B
}{\ubaraccent{l
}}%
10875 \DeclareUnicodeCharacter{1E3E
}{\'M
}%
10876 \DeclareUnicodeCharacter{1E3F
}{\'m
}%
10878 \DeclareUnicodeCharacter{1E40
}{\dotaccent{M
}}%
10879 \DeclareUnicodeCharacter{1E41
}{\dotaccent{m
}}%
10880 \DeclareUnicodeCharacter{1E42
}{\udotaccent{M
}}%
10881 \DeclareUnicodeCharacter{1E43
}{\udotaccent{m
}}%
10882 \DeclareUnicodeCharacter{1E44
}{\dotaccent{N
}}%
10883 \DeclareUnicodeCharacter{1E45
}{\dotaccent{n
}}%
10884 \DeclareUnicodeCharacter{1E46
}{\udotaccent{N
}}%
10885 \DeclareUnicodeCharacter{1E47
}{\udotaccent{n
}}%
10886 \DeclareUnicodeCharacter{1E48
}{\ubaraccent{N
}}%
10887 \DeclareUnicodeCharacter{1E49
}{\ubaraccent{n
}}%
10889 \DeclareUnicodeCharacter{1E54
}{\'P
}%
10890 \DeclareUnicodeCharacter{1E55
}{\'p
}%
10891 \DeclareUnicodeCharacter{1E56
}{\dotaccent{P
}}%
10892 \DeclareUnicodeCharacter{1E57
}{\dotaccent{p
}}%
10893 \DeclareUnicodeCharacter{1E58
}{\dotaccent{R
}}%
10894 \DeclareUnicodeCharacter{1E59
}{\dotaccent{r
}}%
10895 \DeclareUnicodeCharacter{1E5A
}{\udotaccent{R
}}%
10896 \DeclareUnicodeCharacter{1E5B
}{\udotaccent{r
}}%
10897 \DeclareUnicodeCharacter{1E5E
}{\ubaraccent{R
}}%
10898 \DeclareUnicodeCharacter{1E5F
}{\ubaraccent{r
}}%
10900 \DeclareUnicodeCharacter{1E60
}{\dotaccent{S
}}%
10901 \DeclareUnicodeCharacter{1E61
}{\dotaccent{s
}}%
10902 \DeclareUnicodeCharacter{1E62
}{\udotaccent{S
}}%
10903 \DeclareUnicodeCharacter{1E63
}{\udotaccent{s
}}%
10904 \DeclareUnicodeCharacter{1E6A
}{\dotaccent{T
}}%
10905 \DeclareUnicodeCharacter{1E6B
}{\dotaccent{t
}}%
10906 \DeclareUnicodeCharacter{1E6C
}{\udotaccent{T
}}%
10907 \DeclareUnicodeCharacter{1E6D
}{\udotaccent{t
}}%
10908 \DeclareUnicodeCharacter{1E6E
}{\ubaraccent{T
}}%
10909 \DeclareUnicodeCharacter{1E6F
}{\ubaraccent{t
}}%
10911 \DeclareUnicodeCharacter{1E7C
}{\~V
}%
10912 \DeclareUnicodeCharacter{1E7D
}{\~v
}%
10913 \DeclareUnicodeCharacter{1E7E
}{\udotaccent{V
}}%
10914 \DeclareUnicodeCharacter{1E7F
}{\udotaccent{v
}}%
10916 \DeclareUnicodeCharacter{1E80
}{\`W
}%
10917 \DeclareUnicodeCharacter{1E81
}{\`w
}%
10918 \DeclareUnicodeCharacter{1E82
}{\'W
}%
10919 \DeclareUnicodeCharacter{1E83
}{\'w
}%
10920 \DeclareUnicodeCharacter{1E84
}{\"W
}%
10921 \DeclareUnicodeCharacter{1E85
}{\"w
}%
10922 \DeclareUnicodeCharacter{1E86
}{\dotaccent{W
}}%
10923 \DeclareUnicodeCharacter{1E87
}{\dotaccent{w
}}%
10924 \DeclareUnicodeCharacter{1E88
}{\udotaccent{W
}}%
10925 \DeclareUnicodeCharacter{1E89
}{\udotaccent{w
}}%
10926 \DeclareUnicodeCharacter{1E8A
}{\dotaccent{X
}}%
10927 \DeclareUnicodeCharacter{1E8B
}{\dotaccent{x
}}%
10928 \DeclareUnicodeCharacter{1E8C
}{\"X
}%
10929 \DeclareUnicodeCharacter{1E8D
}{\"x
}%
10930 \DeclareUnicodeCharacter{1E8E
}{\dotaccent{Y
}}%
10931 \DeclareUnicodeCharacter{1E8F
}{\dotaccent{y
}}%
10933 \DeclareUnicodeCharacter{1E90
}{\^Z
}%
10934 \DeclareUnicodeCharacter{1E91
}{\^z
}%
10935 \DeclareUnicodeCharacter{1E92
}{\udotaccent{Z
}}%
10936 \DeclareUnicodeCharacter{1E93
}{\udotaccent{z
}}%
10937 \DeclareUnicodeCharacter{1E94
}{\ubaraccent{Z
}}%
10938 \DeclareUnicodeCharacter{1E95
}{\ubaraccent{z
}}%
10939 \DeclareUnicodeCharacter{1E96
}{\ubaraccent{h
}}%
10940 \DeclareUnicodeCharacter{1E97
}{\"t
}%
10941 \DeclareUnicodeCharacter{1E98
}{\ringaccent{w
}}%
10942 \DeclareUnicodeCharacter{1E99
}{\ringaccent{y
}}%
10944 \DeclareUnicodeCharacter{1EA0
}{\udotaccent{A
}}%
10945 \DeclareUnicodeCharacter{1EA1
}{\udotaccent{a
}}%
10947 \DeclareUnicodeCharacter{1EB8
}{\udotaccent{E
}}%
10948 \DeclareUnicodeCharacter{1EB9
}{\udotaccent{e
}}%
10949 \DeclareUnicodeCharacter{1EBC
}{\~E
}%
10950 \DeclareUnicodeCharacter{1EBD
}{\~e
}%
10952 \DeclareUnicodeCharacter{1ECA
}{\udotaccent{I
}}%
10953 \DeclareUnicodeCharacter{1ECB
}{\udotaccent{i
}}%
10954 \DeclareUnicodeCharacter{1ECC
}{\udotaccent{O
}}%
10955 \DeclareUnicodeCharacter{1ECD
}{\udotaccent{o
}}%
10957 \DeclareUnicodeCharacter{1EE4
}{\udotaccent{U
}}%
10958 \DeclareUnicodeCharacter{1EE5
}{\udotaccent{u
}}%
10960 \DeclareUnicodeCharacter{1EF2
}{\`Y
}%
10961 \DeclareUnicodeCharacter{1EF3
}{\`y
}%
10962 \DeclareUnicodeCharacter{1EF4
}{\udotaccent{Y
}}%
10964 \DeclareUnicodeCharacter{1EF8
}{\~Y
}%
10965 \DeclareUnicodeCharacter{1EF9
}{\~y
}%
10968 \DeclareUnicodeCharacter{2013}{--
}%
10969 \DeclareUnicodeCharacter{2014}{---
}%
10970 \DeclareUnicodeCharacter{2018}{\quoteleft{}}%
10971 \DeclareUnicodeCharacter{2019}{\quoteright{}}%
10972 \DeclareUnicodeCharacter{201A
}{\quotesinglbase{}}%
10973 \DeclareUnicodeCharacter{201C
}{\quotedblleft{}}%
10974 \DeclareUnicodeCharacter{201D
}{\quotedblright{}}%
10975 \DeclareUnicodeCharacter{201E
}{\quotedblbase{}}%
10976 \DeclareUnicodeCharacter{2020}{\ensuremath\dagger}%
10977 \DeclareUnicodeCharacter{2021}{\ensuremath\ddagger}%
10978 \DeclareUnicodeCharacter{2022}{\bullet{}}%
10979 \DeclareUnicodeCharacter{202F
}{\thinspace}%
10980 \DeclareUnicodeCharacter{2026}{\dots{}}%
10981 \DeclareUnicodeCharacter{2039}{\guilsinglleft{}}%
10982 \DeclareUnicodeCharacter{203A
}{\guilsinglright{}}%
10984 \DeclareUnicodeCharacter{20AC
}{\euro{}}%
10986 \DeclareUnicodeCharacter{2192}{\expansion{}}%
10987 \DeclareUnicodeCharacter{21D2
}{\result{}}%
10989 % Mathematical symbols
10990 \DeclareUnicodeCharacter{2200}{\ensuremath\forall}%
10991 \DeclareUnicodeCharacter{2203}{\ensuremath\exists}%
10992 \DeclareUnicodeCharacter{2208}{\ensuremath\in}%
10993 \DeclareUnicodeCharacter{2212}{\minus{}}%
10994 \DeclareUnicodeCharacter{2217}{\ast}%
10995 \DeclareUnicodeCharacter{221E
}{\ensuremath\infty}%
10996 \DeclareUnicodeCharacter{2225}{\ensuremath\parallel}%
10997 \DeclareUnicodeCharacter{2227}{\ensuremath\wedge}%
10998 \DeclareUnicodeCharacter{2229}{\ensuremath\cap}%
10999 \DeclareUnicodeCharacter{2261}{\equiv{}}%
11000 \DeclareUnicodeCharacter{2264}{\ensuremath\leq}%
11001 \DeclareUnicodeCharacter{2265}{\ensuremath\geq}%
11002 \DeclareUnicodeCharacter{2282}{\ensuremath\subset}%
11003 \DeclareUnicodeCharacter{2287}{\ensuremath\supseteq}%
11005 \DeclareUnicodeCharacter{2016}{\ensuremath\Vert}%
11006 \DeclareUnicodeCharacter{2032}{\ensuremath\prime}%
11007 \DeclareUnicodeCharacter{210F
}{\ensuremath\hbar}%
11008 \DeclareUnicodeCharacter{2111}{\ensuremath\Im}%
11009 \DeclareUnicodeCharacter{2113}{\ensuremath\ell}%
11010 \DeclareUnicodeCharacter{2118}{\ensuremath\wp}%
11011 \DeclareUnicodeCharacter{211C
}{\ensuremath\Re}%
11012 \DeclareUnicodeCharacter{2127}{\ensuremath\mho}%
11013 \DeclareUnicodeCharacter{2135}{\ensuremath\aleph}%
11014 \DeclareUnicodeCharacter{2190}{\ensuremath\leftarrow}%
11015 \DeclareUnicodeCharacter{2191}{\ensuremath\uparrow}%
11016 \DeclareUnicodeCharacter{2193}{\ensuremath\downarrow}%
11017 \DeclareUnicodeCharacter{2194}{\ensuremath\leftrightarrow}%
11018 \DeclareUnicodeCharacter{2195}{\ensuremath\updownarrow}%
11019 \DeclareUnicodeCharacter{2196}{\ensuremath\nwarrow}%
11020 \DeclareUnicodeCharacter{2197}{\ensuremath\nearrow}%
11021 \DeclareUnicodeCharacter{2198}{\ensuremath\searrow}%
11022 \DeclareUnicodeCharacter{2199}{\ensuremath\swarrow}%
11023 \DeclareUnicodeCharacter{21A6
}{\ensuremath\mapsto}%
11024 \DeclareUnicodeCharacter{21A9
}{\ensuremath\hookleftarrow}%
11025 \DeclareUnicodeCharacter{21AA
}{\ensuremath\hookrightarrow}%
11026 \DeclareUnicodeCharacter{21BC
}{\ensuremath\leftharpoonup}%
11027 \DeclareUnicodeCharacter{21BD
}{\ensuremath\leftharpoondown}%
11028 \DeclareUnicodeCharacter{21BE
}{\ensuremath\upharpoonright}%
11029 \DeclareUnicodeCharacter{21C0
}{\ensuremath\rightharpoonup}%
11030 \DeclareUnicodeCharacter{21C1
}{\ensuremath\rightharpoondown}%
11031 \DeclareUnicodeCharacter{21CC
}{\ensuremath\rightleftharpoons}%
11032 \DeclareUnicodeCharacter{21D0
}{\ensuremath\Leftarrow}%
11033 \DeclareUnicodeCharacter{21D1
}{\ensuremath\Uparrow}%
11034 \DeclareUnicodeCharacter{21D3
}{\ensuremath\Downarrow}%
11035 \DeclareUnicodeCharacter{21D4
}{\ensuremath\Leftrightarrow}%
11036 \DeclareUnicodeCharacter{21D5
}{\ensuremath\Updownarrow}%
11037 \DeclareUnicodeCharacter{21DD
}{\ensuremath\leadsto}%
11038 \DeclareUnicodeCharacter{2201}{\ensuremath\complement}%
11039 \DeclareUnicodeCharacter{2202}{\ensuremath\partial}%
11040 \DeclareUnicodeCharacter{2205}{\ensuremath\emptyset}%
11041 \DeclareUnicodeCharacter{2207}{\ensuremath\nabla}%
11042 \DeclareUnicodeCharacter{2209}{\ensuremath\notin}%
11043 \DeclareUnicodeCharacter{220B
}{\ensuremath\owns}%
11044 \DeclareUnicodeCharacter{220F
}{\ensuremath\prod}%
11045 \DeclareUnicodeCharacter{2210}{\ensuremath\coprod}%
11046 \DeclareUnicodeCharacter{2211}{\ensuremath\sum}%
11047 \DeclareUnicodeCharacter{2213}{\ensuremath\mp}%
11048 \DeclareUnicodeCharacter{2218}{\ensuremath\circ}%
11049 \DeclareUnicodeCharacter{221A
}{\ensuremath\surd}%
11050 \DeclareUnicodeCharacter{221D
}{\ensuremath\propto}%
11051 \DeclareUnicodeCharacter{2220}{\ensuremath\angle}%
11052 \DeclareUnicodeCharacter{2223}{\ensuremath\mid}%
11053 \DeclareUnicodeCharacter{2228}{\ensuremath\vee}%
11054 \DeclareUnicodeCharacter{222A
}{\ensuremath\cup}%
11055 \DeclareUnicodeCharacter{222B
}{\ensuremath\smallint}%
11056 \DeclareUnicodeCharacter{222E
}{\ensuremath\oint}%
11057 \DeclareUnicodeCharacter{223C
}{\ensuremath\sim}%
11058 \DeclareUnicodeCharacter{2240}{\ensuremath\wr}%
11059 \DeclareUnicodeCharacter{2243}{\ensuremath\simeq}%
11060 \DeclareUnicodeCharacter{2245}{\ensuremath\cong}%
11061 \DeclareUnicodeCharacter{2248}{\ensuremath\approx}%
11062 \DeclareUnicodeCharacter{224D
}{\ensuremath\asymp}%
11063 \DeclareUnicodeCharacter{2250}{\ensuremath\doteq}%
11064 \DeclareUnicodeCharacter{2260}{\ensuremath\neq}%
11065 \DeclareUnicodeCharacter{226A
}{\ensuremath\ll}%
11066 \DeclareUnicodeCharacter{226B
}{\ensuremath\gg}%
11067 \DeclareUnicodeCharacter{227A
}{\ensuremath\prec}%
11068 \DeclareUnicodeCharacter{227B
}{\ensuremath\succ}%
11069 \DeclareUnicodeCharacter{2283}{\ensuremath\supset}%
11070 \DeclareUnicodeCharacter{2286}{\ensuremath\subseteq}%
11071 \DeclareUnicodeCharacter{228E
}{\ensuremath\uplus}%
11072 \DeclareUnicodeCharacter{228F
}{\ensuremath\sqsubset}%
11073 \DeclareUnicodeCharacter{2290}{\ensuremath\sqsupset}%
11074 \DeclareUnicodeCharacter{2291}{\ensuremath\sqsubseteq}%
11075 \DeclareUnicodeCharacter{2292}{\ensuremath\sqsupseteq}%
11076 \DeclareUnicodeCharacter{2293}{\ensuremath\sqcap}%
11077 \DeclareUnicodeCharacter{2294}{\ensuremath\sqcup}%
11078 \DeclareUnicodeCharacter{2295}{\ensuremath\oplus}%
11079 \DeclareUnicodeCharacter{2296}{\ensuremath\ominus}%
11080 \DeclareUnicodeCharacter{2297}{\ensuremath\otimes}%
11081 \DeclareUnicodeCharacter{2298}{\ensuremath\oslash}%
11082 \DeclareUnicodeCharacter{2299}{\ensuremath\odot}%
11083 \DeclareUnicodeCharacter{22A2
}{\ensuremath\vdash}%
11084 \DeclareUnicodeCharacter{22A3
}{\ensuremath\dashv}%
11085 \DeclareUnicodeCharacter{22A4
}{\ensuremath\ptextop}%
11086 \DeclareUnicodeCharacter{22A5
}{\ensuremath\bot}%
11087 \DeclareUnicodeCharacter{22A8
}{\ensuremath\models}%
11088 \DeclareUnicodeCharacter{22B4
}{\ensuremath\unlhd}%
11089 \DeclareUnicodeCharacter{22B5
}{\ensuremath\unrhd}%
11090 \DeclareUnicodeCharacter{22C0
}{\ensuremath\bigwedge}%
11091 \DeclareUnicodeCharacter{22C1
}{\ensuremath\bigvee}%
11092 \DeclareUnicodeCharacter{22C2
}{\ensuremath\bigcap}%
11093 \DeclareUnicodeCharacter{22C3
}{\ensuremath\bigcup}%
11094 \DeclareUnicodeCharacter{22C4
}{\ensuremath\diamond}%
11095 \DeclareUnicodeCharacter{22C5
}{\ensuremath\cdot}%
11096 \DeclareUnicodeCharacter{22C6
}{\ensuremath\star}%
11097 \DeclareUnicodeCharacter{22C8
}{\ensuremath\bowtie}%
11098 \DeclareUnicodeCharacter{2308}{\ensuremath\lceil}%
11099 \DeclareUnicodeCharacter{2309}{\ensuremath\rceil}%
11100 \DeclareUnicodeCharacter{230A
}{\ensuremath\lfloor}%
11101 \DeclareUnicodeCharacter{230B
}{\ensuremath\rfloor}%
11102 \DeclareUnicodeCharacter{2322}{\ensuremath\frown}%
11103 \DeclareUnicodeCharacter{2323}{\ensuremath\smile}%
11105 \DeclareUnicodeCharacter{25A1
}{\ensuremath\Box}%
11106 \DeclareUnicodeCharacter{25B3
}{\ensuremath\triangle}%
11107 \DeclareUnicodeCharacter{25B7
}{\ensuremath\triangleright}%
11108 \DeclareUnicodeCharacter{25BD
}{\ensuremath\bigtriangledown}%
11109 \DeclareUnicodeCharacter{25C1
}{\ensuremath\triangleleft}%
11110 \DeclareUnicodeCharacter{25C7
}{\ensuremath\Diamond}%
11111 \DeclareUnicodeCharacter{2660}{\ensuremath\spadesuit}%
11112 \DeclareUnicodeCharacter{2661}{\ensuremath\heartsuit}%
11113 \DeclareUnicodeCharacter{2662}{\ensuremath\diamondsuit}%
11114 \DeclareUnicodeCharacter{2663}{\ensuremath\clubsuit}%
11115 \DeclareUnicodeCharacter{266D
}{\ensuremath\flat}%
11116 \DeclareUnicodeCharacter{266E
}{\ensuremath\natural}%
11117 \DeclareUnicodeCharacter{266F
}{\ensuremath\sharp}%
11118 \DeclareUnicodeCharacter{26AA
}{\ensuremath\bigcirc}%
11119 \DeclareUnicodeCharacter{27B9
}{\ensuremath\rangle}%
11120 \DeclareUnicodeCharacter{27C2
}{\ensuremath\perp}%
11121 \DeclareUnicodeCharacter{27E8
}{\ensuremath\langle}%
11122 \DeclareUnicodeCharacter{27F5
}{\ensuremath\longleftarrow}%
11123 \DeclareUnicodeCharacter{27F6
}{\ensuremath\longrightarrow}%
11124 \DeclareUnicodeCharacter{27F7
}{\ensuremath\longleftrightarrow}%
11125 \DeclareUnicodeCharacter{27FC
}{\ensuremath\longmapsto}%
11126 \DeclareUnicodeCharacter{29F5
}{\ensuremath\setminus}%
11127 \DeclareUnicodeCharacter{2A00
}{\ensuremath\bigodot}%
11128 \DeclareUnicodeCharacter{2A01
}{\ensuremath\bigoplus}%
11129 \DeclareUnicodeCharacter{2A02
}{\ensuremath\bigotimes}%
11130 \DeclareUnicodeCharacter{2A04
}{\ensuremath\biguplus}%
11131 \DeclareUnicodeCharacter{2A06
}{\ensuremath\bigsqcup}%
11132 \DeclareUnicodeCharacter{2A1D
}{\ensuremath\Join}%
11133 \DeclareUnicodeCharacter{2A3F
}{\ensuremath\amalg}%
11134 \DeclareUnicodeCharacter{2AAF
}{\ensuremath\preceq}%
11135 \DeclareUnicodeCharacter{2AB0
}{\ensuremath\succeq}%
11137 \global\mathchardef\checkmark="
1370% actually the square root sign
11138 \DeclareUnicodeCharacter{2713}{\ensuremath\checkmark}%
11139 }% end of \unicodechardefs
11141 % UTF-8 byte sequence (pdfTeX) definitions (replacing and @U command)
11142 % It makes the setting that replace UTF-8 byte sequence.
11143 \def\utfeightchardefs{%
11144 \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterUTFviii
11148 % Whether the active definitions of non-ASCII characters expand to
11149 % non-active tokens with the same character code. This is used to
11150 % write characters literally, instead of using active definitions for
11151 % printing the correct glyphs.
11152 \newif\ifpassthroughchars
11153 \passthroughcharsfalse
11155 % For native Unicode handling (XeTeX and LuaTeX),
11156 % provide a definition macro to replace/pass-through a Unicode character
11158 \def\DeclareUnicodeCharacterNative#1#2{%
11159 \catcode"
#1=
\active
11160 \def\dodeclareunicodecharacternative#
#1#
#2#
#3{%
11162 \uccode`\~="#
#2\relax
11163 \uppercase{\gdef~
}{%
11164 \ifpassthroughchars
11173 \uccode`\.="
#1\relax
11174 \uppercase{\def\UTFNativeTmp{.
}}%
11175 \expandafter\dodeclareunicodecharacternative\UTFNativeTmp{#1}{#2}%
11179 % Native Unicode handling (XeTeX and LuaTeX) character replacing definition.
11180 % It activates the setting that replaces Unicode characters.
11181 \def\nativeunicodechardefs{%
11182 \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterNative
11186 % For native Unicode handling (XeTeX and LuaTeX),
11187 % make the character token expand
11188 % to the sequences given in \unicodechardefs for printing.
11189 \def\DeclareUnicodeCharacterNativeAtU#1#2{%
11191 \expandafter\globallet\csname uni:
#1\endcsname \UTFAtUTmp
11194 % @U command definitions for native Unicode handling (XeTeX and LuaTeX).
11195 \def\nativeunicodechardefsatu{%
11196 \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterNativeAtU
11200 % US-ASCII character definitions.
11201 \def\asciichardefs{% nothing need be done
11205 % define all Unicode characters we know about, for the sake of @U.
11206 \iftxinativeunicodecapable
11207 \nativeunicodechardefsatu
11213 % Make non-ASCII characters printable again for compatibility with
11214 % existing Texinfo documents that may use them, even without declaring a
11215 % document encoding.
11217 \setnonasciicharscatcode \other
11220 \message{formatting,
}
11222 \newdimen\defaultparindent \defaultparindent =
15pt
11224 \chapheadingskip =
15pt plus
4pt minus
2pt
11225 \secheadingskip =
12pt plus
3pt minus
2pt
11226 \subsecheadingskip =
9pt plus
2pt minus
2pt
11228 % Prevent underfull vbox error messages.
11231 % Don't be very finicky about underfull hboxes, either.
11234 % Following George Bush, get rid of widows and orphans.
11235 \widowpenalty=
10000
11238 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're
11239 % using an old version of TeX, don't do anything. We want the amount of
11240 % stretch added to depend on the line length, hence the dependence on
11241 % \hsize. We call this whenever the paper size is set.
11243 \def\setemergencystretch{%
11244 \ifx\emergencystretch\thisisundefined
11245 % Allow us to assign to \emergencystretch anyway.
11246 \def\emergencystretch{\dimen0}%
11248 \emergencystretch =
.15\hsize
11252 % Parameters in order: 1) textheight; 2) textwidth;
11253 % 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
11254 % 7) physical page height; 8) physical page width.
11256 % We also call \setleading{\textleading}, so the caller should define
11257 % \textleading. The caller should also set \parskip.
11259 \def\internalpagesizes#1#2#3#4#5#6#7#8{%
11260 \voffset =
#3\relax
11261 \topskip =
#6\relax
11262 \splittopskip =
\topskip
11265 \advance\vsize by
\topskip
11266 \outervsize =
\vsize
11267 \advance\outervsize by
2\topandbottommargin
11268 \txipageheight =
\vsize
11271 \outerhsize =
\hsize
11272 \advance\outerhsize by
0.5in
11273 \txipagewidth =
\hsize
11275 \normaloffset =
#4\relax
11276 \bindingoffset =
#5\relax
11279 \pdfpageheight #7\relax
11280 \pdfpagewidth #8\relax
11281 % if we don't reset these, they will remain at "1 true in" of
11282 % whatever layout pdftex was dumped with.
11283 \pdfhorigin =
1 true in
11284 \pdfvorigin =
1 true in
11286 \ifx\XeTeXrevision\thisisundefined
11287 \special{papersize=
#8,
#7}%
11289 \pdfpageheight #7\relax
11290 \pdfpagewidth #8\relax
11291 % XeTeX does not have \pdfhorigin and \pdfvorigin.
11295 \setleading{\textleading}
11297 \parindent =
\defaultparindent
11298 \setemergencystretch
11301 % @letterpaper (the default).
11302 \def\letterpaper{{\globaldefs =
1
11303 \parskip =
3pt plus
2pt minus
1pt
11304 \textleading =
13.2pt
11306 % If page is nothing but text, make it come out even.
11307 \internalpagesizes{607.2pt
}{6in
}% that's 46 lines
11309 {\bindingoffset}{36pt
}%
11313 % Use @smallbook to reset parameters for 7x9.25 trim size.
11314 \def\smallbook{{\globaldefs =
1
11315 \parskip =
2pt plus
1pt
11316 \textleading =
12pt
11318 \internalpagesizes{7.5in
}{5in
}%
11320 {\bindingoffset}{16pt
}%
11323 \lispnarrowing =
0.3in
11325 \contentsrightmargin =
0pt
11326 \defbodyindent =
.5cm
11329 % Use @smallerbook to reset parameters for 6x9 trim size.
11330 % (Just testing, parameters still in flux.)
11331 \def\smallerbook{{\globaldefs =
1
11332 \parskip =
1.5pt plus
1pt
11333 \textleading =
12pt
11335 \internalpagesizes{7.4in
}{4.8in
}%
11340 \lispnarrowing =
0.25in
11342 \contentsrightmargin =
0pt
11343 \defbodyindent =
.4cm
11346 % Use @afourpaper to print on European A4 paper.
11347 \def\afourpaper{{\globaldefs =
1
11348 \parskip =
3pt plus
2pt minus
1pt
11349 \textleading =
13.2pt
11351 % Double-side printing via postscript on Laserjet 4050
11352 % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm.
11353 % To change the settings for a different printer or situation, adjust
11354 % \normaloffset until the front-side and back-side texts align. Then
11355 % do the same for \bindingoffset. You can set these for testing in
11356 % your texinfo source file like this:
11358 % \global\normaloffset = -6mm
11359 % \global\bindingoffset = 10mm
11361 \internalpagesizes{673.2pt
}{160mm
}% that's 51 lines
11362 {\voffset}{\hoffset}%
11363 {\bindingoffset}{44pt
}%
11367 \contentsrightmargin =
0pt
11368 \defbodyindent =
5mm
11371 % Use @afivepaper to print on European A5 paper.
11372 % From romildo@urano.iceb.ufop.br, 2 July 2000.
11373 % He also recommends making @example and @lisp be small.
11374 \def\afivepaper{{\globaldefs =
1
11375 \parskip =
2pt plus
1pt minus
0.1pt
11376 \textleading =
12.5pt
11378 \internalpagesizes{160mm
}{120mm
}%
11379 {\voffset}{\hoffset}%
11380 {\bindingoffset}{8pt
}%
11383 \lispnarrowing =
0.2in
11385 \contentsrightmargin =
0pt
11386 \defbodyindent =
2mm
11387 \tableindent =
12mm
11390 % A specific text layout, 24x15cm overall, intended for A4 paper.
11391 \def\afourlatex{{\globaldefs =
1
11393 \internalpagesizes{237mm
}{150mm
}%
11395 {\bindingoffset}{7mm
}%
11398 % Must explicitly reset to 0 because we call \afourpaper.
11402 % Use @afourwide to print on A4 paper in landscape format.
11403 \def\afourwide{{\globaldefs =
1
11405 \internalpagesizes{241mm
}{165mm
}%
11406 {\voffset}{-
2.95mm
}%
11407 {\bindingoffset}{7mm
}%
11412 % @pagesizes TEXTHEIGHT[,TEXTWIDTH]
11413 % Perhaps we should allow setting the margins, \topskip, \parskip,
11414 % and/or leading, also. Or perhaps we should compute them somehow.
11416 \parseargdef\pagesizes{\pagesizesyyy #1,,
\finish}
11417 \def\pagesizesyyy#1,
#2,
#3\finish{{%
11418 \setbox0 =
\hbox{\ignorespaces #2}\ifdim\wd0 >
0pt
\hsize=
#2\relax \fi
11421 \parskip =
3pt plus
2pt minus
1pt
11422 \setleading{\textleading}%
11425 \advance\dimen0 by
\voffset
11428 \advance\dimen2 by
\normaloffset
11430 \internalpagesizes{#1}{\hsize}%
11431 {\voffset}{\normaloffset}%
11432 {\bindingoffset}{44pt
}%
11433 {\dimen0}{\dimen2}%
11436 % Set default to letter.
11440 % Default value of \hfuzz, for suppressing warnings about overfull hboxes.
11444 \message{and turning on texinfo input format.
}
11446 \def^^L
{\par} % remove \outer, so ^L can appear in an @comment
11448 % DEL is a comment character, in case @c does not suffice.
11451 % Define macros to output various characters with catcode for normal text.
11452 \catcode`\"=
\other \def\normaldoublequote{"
}
11453 \catcode`\$=
\other \def\normaldollar{$
}%$ font-lock fix
11454 \catcode`\+=
\other \def\normalplus{+
}
11455 \catcode`\<=
\other \def\normalless{<
}
11456 \catcode`\>=
\other \def\normalgreater{>
}
11457 \catcode`\^=
\other \def\normalcaret{^
}
11458 \catcode`
\_=
\other \def\normalunderscore{_
}
11459 \catcode`\|=
\other \def\normalverticalbar{|
}
11460 \catcode`\~=
\other \def\normaltilde{~
}
11462 % This macro is used to make a character print one way in \tt
11463 % (where it can probably be output as-is), and another way in other fonts,
11464 % where something hairier probably needs to be done.
11466 % #1 is what to print if we are indeed using \tt; #2 is what to print
11467 % otherwise. Since all the Computer Modern typewriter fonts have zero
11468 % interword stretch (and shrink), and it is reasonable to expect all
11469 % typewriter fonts to have this, we can check that font parameter.
11471 \def\ifusingtt#1#2{\ifdim \fontdimen3\font=
0pt
#1\else #2\fi}
11473 % Same as above, but check for italic font. Actually this also catches
11474 % non-italic slanted fonts since it is impossible to distinguish them from
11475 % italic fonts. But since this is only used by $ and it uses \sl anyway
11476 % this is not a problem.
11477 \def\ifusingit#1#2{\ifdim \fontdimen1\font>
0pt
#1\else #2\fi}
11479 % Set catcodes for Texinfo file
11481 % Active characters for printing the wanted glyph.
11482 % Most of these we simply print from the \tt font, but for some, we can
11483 % use math or other variants that look better in normal text.
11485 \catcode`\"=
\active
11486 \def\activedoublequote{{\tt\char34}}
11487 \let"=
\activedoublequote
11488 \catcode`\~=
\active \def\activetilde{{\tt\char126}} \let~ =
\activetilde
11489 \chardef\hatchar=`\^
11490 \catcode`\^=
\active \def\activehat{{\tt \hatchar}} \let^ =
\activehat
11492 \catcode`
\_=
\active
11493 \def_{\ifusingtt\normalunderscore\_}
11494 \def\_{\leavevmode \kern.07em
\vbox{\hrule width
.3em height
.1ex
}\kern .07em
}
11497 \catcode`\|=
\active \def|
{{\tt\char124}}
11500 \catcode`\<=
\active \def\activeless{{\tt \less}}\let< =
\activeless
11502 \catcode`\>=
\active \def\activegtr{{\tt \gtr}}\let> =
\activegtr
11503 \catcode`\+=
\active \def+
{{\tt \char 43}}
11504 \catcode`\$=
\active \def$
{\ifusingit{{\sl\$
}}\normaldollar}%$ font-lock fix
11505 \catcode`\-=
\active \let-=
\normaldash
11508 % used for headline/footline in the output routine, in case the page
11509 % breaks in the middle of an @tex block.
11510 \def\texinfochars{%
11511 \let< =
\activeless
11513 \let~ =
\activetilde
11515 \markupsetuplqdefault \markupsetuprqdefault
11517 \let\i =
\smartitalic
11518 % in principle, all other definitions in \tex have to be undone too.
11521 % Used sometimes to turn off (effectively) the active characters even after
11523 \def\turnoffactive{%
11524 \normalturnoffactive
11530 % \backslashcurfont outputs one backslash character in current font,
11532 \global\chardef\backslashcurfont=`\\
11533 \global\let\rawbackslashxx=
\backslashcurfont % let existing .??s files work
11535 % \realbackslash is an actual character `\' with catcode other, and
11536 % \doublebackslash is two of them (for the pdf outlines).
11537 {\catcode`\\=
\other @gdef@realbackslash
{\
} @gdef@doublebackslash
{\\
}}
11539 % In Texinfo, backslash is an active character; it prints the backslash
11540 % in fixed width font.
11541 \catcode`\\=
\active % @ for escape char from now on.
11543 % Print a typewriter backslash. For math mode, we can't simply use
11544 % \backslashcurfont: the story here is that in math mode, the \char
11545 % of \backslashcurfont ends up printing the roman \ from the math symbol
11546 % font (because \char in math mode uses the \mathcode, and plain.tex
11547 % sets \mathcode`\\="026E). Hence we use an explicit \mathchar,
11548 % which is the decimal equivalent of "715c (class 7, e.g., use \fam;
11549 % ignored family value; char position "5C). We can't use " for the
11550 % usual hex value because it has already been made active.
11552 @def@ttbackslash
{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi
}}
11553 @let@backslashchar = @ttbackslash
% @backslashchar{} is for user documents.
11555 % \rawbackslash defines an active \ to do \backslashcurfont.
11556 % \otherbackslash defines an active \ to be a literal `\' character with
11557 % catcode other. We switch back and forth between these.
11558 @gdef@rawbackslash
{@let\=@backslashcurfont
}
11559 @gdef@otherbackslash
{@let\=@realbackslash
}
11561 % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
11562 % the literal character `\'.
11564 {@catcode`- = @active
11565 @gdef@normalturnoffactive
{%
11566 @passthroughcharstrue
11568 @let"=@normaldoublequote
11569 @let$=@normaldollar
%$ font-lock fix
11572 @let>=@normalgreater
11574 @let_=@normalunderscore
11575 @let|=@normalverticalbar
11578 @markupsetuplqdefault
11579 @markupsetuprqdefault
11584 % If a .fmt file is being used, characters that might appear in a file
11585 % name cannot be active until we have parsed the command line.
11586 % So turn them off again, and have @fixbackslash turn them back on.
11587 @catcode`+=@other @catcode`@_=@other
11589 % \enablebackslashhack - allow file to begin `\input texinfo'
11591 % If a .fmt file is being used, we don't want the `\input texinfo' to show up.
11592 % That is what \eatinput is for; after that, the `\' should revert to printing
11594 % If the file did not have a `\input texinfo', then it is turned off after
11595 % the first line; otherwise the first `\' in the file would cause an error.
11596 % This is used on the very last line of this file, texinfo.tex.
11597 % We also use @c to call @fixbackslash, in case ends of lines are hidden.
11600 @catcode`@^^M=
13@gdef@enablebackslashhack
{%
11601 @global@let\ = @eatinput
%
11603 @def@c
{@fixbackslash@c
}%
11604 % Definition for the newline at the end of this file.
11605 @def ^^M
{@let^^M@secondlinenl
}%
11606 % Definition for a newline in the main Texinfo file.
11607 @gdef @secondlinenl
{@fixbackslash
}%
11608 % In case the first line has a whole-line command on it
11609 @let@originalparsearg@parsearg
11610 @def@parsearg
{@fixbackslash@originalparsearg
}
11613 {@catcode`@^=
7 @catcode`@^^M=
13%
11614 @gdef@eatinput input texinfo
#1^^M
{@fixbackslash
}}
11616 % Emergency active definition of newline, in case an active newline token
11617 % appears by mistake.
11618 {@catcode`@^=
7 @catcode13=
13%
11619 @gdef@enableemergencynewline
{%
11622 %<warning: active newline>@par%
11626 @gdef@fixbackslash
{%
11627 @ifx\@eatinput @let\ = @ttbackslash @fi
11628 @catcode13=
5 % regular end of line
11629 @enableemergencynewline
11631 @let@parsearg@originalparsearg
11632 % Also turn back on active characters that might appear in the input
11633 % file name, in case not using a pre-dumped format.
11635 @catcode`@_=@active
11637 % If texinfo.cnf is present on the system, read it.
11638 % Useful for site-wide @afourpaper, etc. This macro, @fixbackslash, gets
11639 % called at the beginning of every Texinfo file. Not opening texinfo.cnf
11640 % directly in this file, texinfo.tex, makes it possible to make a format
11641 % file for Texinfo.
11643 @openin
1 texinfo.cnf
11644 @ifeof
1 @else @input texinfo.cnf @fi
11649 % Say @foo, not \foo, in error messages.
11652 % These (along with & and #) are made active for url-breaking, so need
11653 % active definitions as the normal characters.
11655 @def@normalquest
{?
}
11656 @def@normalslash
{/
}
11658 % These look ok in all fonts, so just make them not special.
11659 % @hashchar{} gets its own user-level command, because of #line.
11660 @catcode`@& = @other @def@normalamp
{&
}
11661 @catcode`@# = @other @def@normalhash
{#
}
11662 @catcode`@
% = @other @def@normalpercent{%}
11664 @let @hashchar = @normalhash
11666 @c Finally, make ` and ' active, so that txicodequoteundirected and
11667 @c txicodequotebacktick work right in, e.g., @w
{@code
{`foo'
}}. If we
11668 @c don't make ` and ' active, @code will not get them as active chars.
11669 @c Do this last of all since we use ` in the previous @catcode assignments.
11670 @catcode`@'=@active
11671 @catcode`@`=@active
11672 @markupsetuplqdefault
11673 @markupsetuprqdefault
11675 @c Local variables:
11676 @c eval: (add-hook 'write-file-hooks 'time-stamp)
11677 @c page-delimiter: "^\\\
\message\\|emacs-page"
11678 @c time-stamp-start: "def\\\
\texinfoversion{"
11679 @c time-stamp-format: "
%:y-%02m-%02d.%02H"
11680 @c time-stamp-end: "
}"
11685 @enablebackslashhack