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{2016-
03-
25.17}
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
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}
72 % We never want plain's \outer definition of \+ in Texinfo.
73 % For @tex, we can use \tabalign.
76 % Save some plain tex macros whose names we will redefine.
78 \let\ptexbullet=
\bullet
86 \let\ptexfootnote=
\footnote
90 \let\ptexindent=
\indent
91 \let\ptexinsert=
\insert
94 \let\ptexnewwrite\newwrite
95 \let\ptexnoindent=
\noindent
97 \let\ptexraggedright=
\raggedright
105 {\catcode`\'=
\active \global\let\ptexquoteright'
}% active in plain's math mode
107 % If this character appears in an error message or help string, it
108 % starts a new line in the output.
111 % Use TeX 3.0's \inputlineno to get the line number, for better error
112 % messages, but if we're using an old version of TeX, don't do anything.
114 \ifx\inputlineno\thisisundefined
115 \let\linenumber =
\empty % Pre-3.0.
117 \def\linenumber{l.
\the\inputlineno:
\space}
120 % Set up fixed words for English if not already set.
121 \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix
}\fi
122 \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter
}\fi
123 \ifx\putworderror\undefined \gdef\putworderror{error
}\fi
124 \ifx\putwordfile\undefined \gdef\putwordfile{file
}\fi
125 \ifx\putwordin\undefined \gdef\putwordin{in
}\fi
126 \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)
}\fi
127 \ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)
}\fi
128 \ifx\putwordInfo\undefined \gdef\putwordInfo{Info
}\fi
129 \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of
}\fi
130 \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on
}\fi
131 \ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title
}\fi
132 \ifx\putwordof\undefined \gdef\putwordof{of
}\fi
133 \ifx\putwordon\undefined \gdef\putwordon{on
}\fi
134 \ifx\putwordpage\undefined \gdef\putwordpage{page
}\fi
135 \ifx\putwordsection\undefined \gdef\putwordsection{section
}\fi
136 \ifx\putwordSection\undefined \gdef\putwordSection{Section
}\fi
137 \ifx\putwordsee\undefined \gdef\putwordsee{see
}\fi
138 \ifx\putwordSee\undefined \gdef\putwordSee{See
}\fi
139 \ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents
}\fi
140 \ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents
}\fi
142 \ifx\putwordMJan\undefined \gdef\putwordMJan{January
}\fi
143 \ifx\putwordMFeb\undefined \gdef\putwordMFeb{February
}\fi
144 \ifx\putwordMMar\undefined \gdef\putwordMMar{March
}\fi
145 \ifx\putwordMApr\undefined \gdef\putwordMApr{April
}\fi
146 \ifx\putwordMMay\undefined \gdef\putwordMMay{May
}\fi
147 \ifx\putwordMJun\undefined \gdef\putwordMJun{June
}\fi
148 \ifx\putwordMJul\undefined \gdef\putwordMJul{July
}\fi
149 \ifx\putwordMAug\undefined \gdef\putwordMAug{August
}\fi
150 \ifx\putwordMSep\undefined \gdef\putwordMSep{September
}\fi
151 \ifx\putwordMOct\undefined \gdef\putwordMOct{October
}\fi
152 \ifx\putwordMNov\undefined \gdef\putwordMNov{November
}\fi
153 \ifx\putwordMDec\undefined \gdef\putwordMDec{December
}\fi
155 \ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro
}\fi
156 \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form
}\fi
157 \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable
}\fi
158 \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option
}\fi
159 \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function
}\fi
161 % Give the space character the catcode for a space.
162 \def\spaceisspace{\catcode`\ =
10\relax}
164 \chardef\dashChar = `\-
165 \chardef\slashChar = `\/
166 \chardef\underChar = `
\_
172 % The following is used inside several \edef's.
173 \def\makecsname#1{\expandafter\noexpand\csname#1\endcsname}
177 Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script
178 ap-pen-dix bit-map bit-maps
179 data-base data-bases eshell fall-ing half-way long-est man-u-script
180 man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm
181 par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces
183 stand-alone strong-est time-stamp time-stamps which-ever white-space
184 wide-spread wrap-around
187 % Sometimes it is convenient to have everything in the transcript file
188 % and nothing on the terminal. We don't just call \tracingall here,
189 % since that produces some useless output on the terminal. We also make
190 % some effort to order the tracing commands to reduce output in the log
191 % file; cf. trace.sty in LaTeX.
193 \def\gloggingall{\begingroup \globaldefs =
1 \loggingall \endgroup}%
197 \tracinglostchars2 % 2 gives us more in etex
202 \showboxbreadth\maxdimen \showboxdepth\maxdimen
203 \ifx\eTeXversion\thisisundefined\else % etex gives us more logging
210 \tracingcommands3 % 3 gives us more in etex
214 % @errormsg{MSG}. Do the index-like expansions on MSG, but if things
215 % aren't perfect, it's not the end of the world, being an error message,
218 \def\errormsg{\begingroup \indexnofonts \doerrormsg}
219 \def\doerrormsg#1{\errmessage{#1}}
221 % add check for \lastpenalty to plain's definitions. If the last thing
222 % we did was a \nobreak, we don't want to insert more space.
224 \def\smallbreak{\ifnum\lastpenalty<
10000\par\ifdim\lastskip<
\smallskipamount
225 \removelastskip\penalty-
50\smallskip\fi\fi}
226 \def\medbreak{\ifnum\lastpenalty<
10000\par\ifdim\lastskip<
\medskipamount
227 \removelastskip\penalty-
100\medskip\fi\fi}
228 \def\bigbreak{\ifnum\lastpenalty<
10000\par\ifdim\lastskip<
\bigskipamount
229 \removelastskip\penalty-
200\bigskip\fi\fi}
234 % For a final copy, take out the rectangles
235 % that mark overfull boxes (in case you have decided
236 % that the text looks ok even though it passes the margin).
238 \def\finalout{\overfullrule=
0pt
}
240 % Do @cropmarks to get crop marks.
243 \let\cropmarks =
\cropmarkstrue
245 % Dimensions to add cropmarks at corners.
246 % Added by P. A. MacKay, 12 Nov. 1986
248 \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines
249 \newdimen\cornerlong \cornerlong=
1pc
250 \newdimen\cornerthick \cornerthick=
.3pt
251 \newdimen\topandbottommargin \topandbottommargin=
.75in
253 % Output a mark which sets \thischapter, \thissection and \thiscolor.
254 % We dump everything together because we only have one kind of mark.
255 % This works because we only use \botmark / \topmark, not \firstmark.
257 % A mark contains a subexpression of the \ifcase ... \fi construct.
258 % \get*marks macros below extract the needed part using \ifcase.
260 % Another complication is to let the user choose whether \thischapter
261 % (\thissection) refers to the chapter (section) in effect at the top
262 % of a page, or that at the bottom of a page.
264 % \domark is called twice inside \chapmacro, to add one
265 % mark before the section break, and one after.
266 % In the second call \prevchapterdefs is the same as \lastchapterdefs,
267 % and \prevsectiondefs is the same as \lastsectiondefs.
268 % Then if the page is not broken at the mark, some of the previous
269 % section appears on the page, and we can get the name of this section
270 % from \firstmark for @everyheadingmarks top.
271 % @everyheadingmarks bottom uses \botmark.
273 % See page 260 of The TeXbook.
275 \toks0=
\expandafter{\lastchapterdefs}%
276 \toks2=
\expandafter{\lastsectiondefs}%
277 \toks4=
\expandafter{\prevchapterdefs}%
278 \toks6=
\expandafter{\prevsectiondefs}%
279 \toks8=
\expandafter{\lastcolordefs}%
281 \the\toks0 \the\toks2 % 0: marks for @everyheadingmarks top
282 \noexpand\or \the\toks4 \the\toks6 % 1: for @everyheadingmarks bottom
283 \noexpand\else \the\toks8 % 2: color marks
287 % \gettopheadingmarks, \getbottomheadingmarks,
288 % \getcolormarks - extract needed part of mark.
290 % \topmark doesn't work for the very first chapter (after the title
291 % page or the contents), so we use \firstmark there -- this gets us
292 % the mark with the chapter defs, unless the user sneaks in, e.g.,
293 % @setcolor (or @url, or @link, etc.) between @contents and the very
295 \def\gettopheadingmarks{%
297 \ifx\thischapter\empty \ifcase0\firstmark\fi \fi
299 \def\getbottomheadingmarks{\ifcase1\botmark\fi}
300 \def\getcolormarks{\ifcase2\topmark\fi}
302 % Avoid "undefined control sequence" errors.
303 \def\lastchapterdefs{}
304 \def\lastsectiondefs{}
306 \def\prevchapterdefs{}
307 \def\prevsectiondefs{}
310 % Margin to add to right of even pages, to left of odd pages.
311 \newdimen\bindingoffset
312 \newdimen\normaloffset
313 \newdimen\txipagewidth \newdimen\txipageheight
315 % Main output routine.
318 \output =
{\onepageout{\pagecontents\PAGE}}
323 % \onepageout takes a vbox as an argument.
324 % \shipout a vbox for a single page, adding an optional header, footer,
325 % cropmarks, and footnote. This also causes index entries for this page
326 % to be written to the auxiliary files.
329 \ifcropmarks \hoffset=
0pt
\else \hoffset=
\normaloffset \fi
331 \ifodd\pageno \advance\hoffset by
\bindingoffset
332 \else \advance\hoffset by -
\bindingoffset\fi
334 % Common context changes for both heading and footing.
335 % Do this outside of the \shipout so @code etc. will be expanded in
336 % the headline as they should be, not taken literally (outputting ''code).
337 \def\commmonheadfootline{\let\hsize=
\txipagewidth \texinfochars}
339 % Retrieve the information for the headings from the marks in the page,
340 % and call Plain TeX's \makeheadline and \makefootline, which use the
341 % values in \headline and \footline.
343 % This is used to check if we are on the first page of a chapter.
345 \let\prevchaptername\thischaptername
346 \ifcase0\firstmark\fi
347 \let\curchaptername\thischaptername
349 \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
350 \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
352 \ifx\curchaptername\prevchaptername
353 \let\thischapterheading\thischapter
355 % \thischapterheading is the same as \thischapter except it is blank
356 % for the first page of a chapter. This is to prevent the chapter name
358 \def\thischapterheading{}%
361 \global\setbox\headlinebox =
\vbox{\commmonheadfootline \makeheadline}%
362 \global\setbox\footlinebox =
\vbox{\commmonheadfootline \makefootline}%
365 % Set context for writing to auxiliary files like index files.
366 % Have to do this stuff outside the \shipout because we want it to
367 % take effect in \write's, yet the group defined by the \vbox ends
368 % before the \shipout runs.
370 \indexdummies % don't expand commands in the output.
371 \normalturnoffactive % \ in index entries must not stay \, e.g., if
372 % the page break happens to be in the middle of an example.
373 % We don't want .vr (or whatever) entries like this:
374 % \entry{{\indexbackslash }acronym}{32}{\code {\acronym}}
375 % "\acronym" won't work when it's read back in;
377 % {\code {{\backslashcurfont }acronym}
379 % Do this early so pdf references go to the beginning of the page.
380 \ifpdfmakepagedest \pdfdest name
{\the\pageno} xyz
\fi
382 \ifcropmarks \vbox to
\outervsize\bgroup
384 \vskip-
\topandbottommargin
386 \line{\ewtop\hfil\ewtop}%
389 \vbox{\moveleft\cornerthick\nstop}%
391 \vbox{\moveright\cornerthick\nstop}%
394 \vskip\topandbottommargin
396 \hfil % center the page within the outer (page) hsize.
397 \ifodd\pageno\hskip\bindingoffset\fi
403 \ifdim\ht\footlinebox >
0pt
404 % Only leave this space if the footline is nonempty.
405 % (We lessened \vsize for it in \oddfootingyyy.)
406 % The \baselineskip=24pt in plain's \makefootline has no effect.
412 \egroup % end of \vbox\bgroup
413 \hfil\egroup % end of (centering) \line\bgroup
414 \vskip\topandbottommargin plus1fill minus1fill
415 \boxmaxdepth =
\cornerthick
418 \vbox{\moveleft\cornerthick\nsbot}%
420 \vbox{\moveright\cornerthick\nsbot}%
423 \line{\ewbot\hfil\ewbot}%
425 \egroup % \vbox from first cropmarks clause
427 }% end of \shipout\vbox
428 }% end of group with \indexdummies
430 \ifnum\outputpenalty>-
20000 \else\dosupereject\fi
433 \newinsert\margin \dimen\margin=
\maxdimen
435 % Main part of page, including any footnotes
436 \def\pagebody#1{\vbox to
\txipageheight{\boxmaxdepth=
\maxdepth #1}}
438 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
439 % marginal hacks, juha@viisa.uucp (Juha Takala)
440 \ifvoid\margin\else % marginal info is present
441 \rlap{\kern\hsize\vbox to
\z@
{\kern1pt\box\margin \vss}}\fi
442 \dimen@=
\dp#1\relax \unvbox#1\relax
443 \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
444 \ifr@ggedbottom
\kern-
\dimen@
\vfil \fi}
447 % Here are the rules for the cropmarks. Note that they are
448 % offset so that the space between them is truly \outerhsize or \outervsize
449 % (P. A. MacKay, 12 November, 1986)
451 \def\ewtop{\vrule height
\cornerthick depth0pt width
\cornerlong}
453 {\hrule height
\cornerthick depth
\cornerlong width
\cornerthick}}
454 \def\ewbot{\vrule height0pt depth
\cornerthick width
\cornerlong}
456 {\hrule height
\cornerlong depth
\cornerthick width
\cornerthick}}
461 % Parse an argument, then pass it to #1. The argument is the rest of
462 % the input line (except we remove a trailing comment). #1 should be a
463 % macro which expects an ordinary undelimited TeX argument.
464 % For example, \def\foo{\parsearg\fooxxx}.
466 \def\parsearg{\parseargusing{}}
467 \def\parseargusing#1#2{%
473 \parseargline\empty% Insert the \empty token, see \finishparsearg below.
477 \gdef\parseargline#1^^M
{%
478 \endgroup % End of the group started in \parsearg.
479 \argremovecomment #1\comment\ArgTerm%
483 % First remove any @comment, then any @c comment. Also remove a @texinfoc
484 % comment (see \scanmacro for details). Pass the result on to \argcheckspaces.
485 \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
486 \def\argremovec#1\c#2\ArgTerm{\argremovetexinfoc #1\texinfoc\ArgTerm}
487 \def\argremovetexinfoc#1\texinfoc#2\ArgTerm{\argcheckspaces#1\^^M
\ArgTerm}
489 % Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space.
491 % \argremovec might leave us with trailing space, e.g.,
492 % @end itemize @c foo
493 % This space token undergoes the same procedure and is eventually removed
494 % by \finishparsearg.
496 \def\argcheckspaces#1\^^M
{\argcheckspacesX#1\^^M \^^M
}
497 \def\argcheckspacesX#1 \^^M
{\argcheckspacesY#1\^^M
}
498 \def\argcheckspacesY#1\^^M
#2\^^M
#3\ArgTerm{%
501 % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp:
502 \let\temp\finishparsearg
504 \let\temp\argcheckspaces
506 % Put the space token in:
510 % If a _delimited_ argument is enclosed in braces, they get stripped; so
511 % to get _exactly_ the rest of the line, we had to prevent such situation.
512 % We prepended an \empty token at the very beginning and we expand it now,
513 % just before passing the control to \argtorun.
514 % (Similarly, we have to think about #3 of \argcheckspacesY above: it is
515 % either the null string, or it ends with \^^M---thus there is no danger
516 % that a pair of braces would be stripped.
518 % But first, we have to remove the trailing space token.
520 \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
523 % \parseargdef - define a command taking an argument on the line
525 % \parseargdef\foo{...}
526 % is roughly equivalent to
527 % \def\foo{\parsearg\Xfoo}
530 \expandafter \doparseargdef \csname\string#1\endcsname #1%
532 \def\doparseargdef#1#2{%
537 % Several utility definitions with active space:
542 % Make each space character in the input produce a normal interword
543 % space in the output. Don't allow a line break at this space, as this
544 % is used only in environments like @example, where each line of input
545 % should produce a line of output anyway.
547 \gdef\sepspaces{\obeyspaces\let =
\tie}
549 % If an index command is used in an @example environment, any spaces
550 % therein should become regular spaces in the raw index file, not the
551 % expansion of \tie (\leavevmode \penalty \@M \ ).
552 \gdef\unsepspaces{\let =
\space}
556 \def\flushcr{\ifx\par\lisppar \def\next#
#1{}\else \let\next=
\relax \fi \next}
558 % Define the framework for environments in texinfo.tex. It's used like this:
563 % It's the responsibility of \envdef to insert \begingroup before the
564 % actual body; @end closes the group after calling \Efoo. \envdef also
565 % defines \thisenv, so the current environment is known; @end checks
566 % whether the environment name matches. The \checkenv macro can also be
567 % used to check whether the current environment is the one expected.
569 % Non-false conditionals (@iftex, @ifset) don't fit into this, so they
570 % are not treated as environments; they don't open a group. (The
571 % implementation of @end takes care not to call \endgroup in this
575 % At run-time, environments start with this:
576 \def\startenvironment#1{\begingroup\def\thisenv{#1}}
580 % ... but they get defined via ``\envdef\foo{...}'':
581 \long\def\envdef#1#2{\def#1{\startenvironment#1#2}}
582 \def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}}
584 % Check whether we're in the right environment:
593 % Environment mismatch, #1 expected:
596 \errmessage{This command can appear only
\inenvironment\temp,
597 not
\inenvironment\thisenv}%
599 \def\inenvironment#1{%
601 outside of any environment
%
603 in environment
\expandafter\string#1%
607 % @end foo executes the definition of \Efoo.
608 % But first, it executes a specialized version of \checkenv
611 \if 1\csname iscond.
#1\endcsname
613 % The general wording of \badenverr may not be ideal.
614 \expandafter\checkenv\csname#1\endcsname
615 \csname E
#1\endcsname
620 \newhelp\EMsimple{Press RETURN to continue.
}
623 % Be sure we're in horizontal mode when doing a tie, since we make space
624 % equivalent to this in @example-like environments. Otherwise, a space
625 % at the beginning of a line will start with \penalty -- and
626 % since \penalty is valid in vertical mode, we'd end up putting the
627 % penalty on the vertical list instead of in the new paragraph.
629 % Avoid using \@M directly, because that causes trouble
630 % if the definition is written into an index file.
631 \global\let\tiepenalty = \@M
632 \gdef\tie{\leavevmode\penalty\tiepenalty\
}
635 % @: forces normal size whitespace following.
636 \def\:
{\spacefactor=
1000 }
638 % @* forces a line break.
639 \def\*
{\unskip\hfil\break\hbox{}\ignorespaces}
641 % @/ allows a line break.
644 % @. is an end-of-sentence period.
645 \def\.
{.
\spacefactor=
\endofsentencespacefactor\space}
647 % @! is an end-of-sentence bang.
648 \def\!
{!
\spacefactor=
\endofsentencespacefactor\space}
650 % @? is an end-of-sentence query.
651 \def\?
{?
\spacefactor=
\endofsentencespacefactor\space}
653 % @frenchspacing on|off says whether to put extra space after punctuation.
658 \parseargdef\frenchspacing{%
660 \ifx\temp\onword \plainfrenchspacing
661 \else\ifx\temp\offword \plainnonfrenchspacing
664 \errmessage{Unknown @frenchspacing option `
\temp', must be on|off
}%
668 % @w prevents a word break. Without the \leavevmode, @w at the
669 % beginning of a paragraph, when TeX is still in vertical mode, would
670 % produce a whole line of output instead of starting the paragraph.
671 \def\w#1{\leavevmode\hbox{#1}}
673 % @group ... @end group forces ... to be all on one page, by enclosing
674 % it in a TeX vbox. We use \vtop instead of \vbox to construct the box
675 % to keep its height that of a normal line. According to the rules for
676 % \topskip (p.114 of the TeXbook), the glue inserted is
677 % max (\topskip - \ht (first item), 0). If that height is large,
678 % therefore, no glue is inserted, and the space between the headline and
679 % the text is small, which looks bad.
681 % Another complication is that the group might be very large. This can
682 % cause the glue on the previous page to be unduly stretched, because it
683 % does not have much material. In this case, it's better to add an
684 % explicit \vfill so that the extra space is at the bottom. The
685 % threshold for doing this is if the group is more than \vfilllimit
686 % percent of a page (\vfilllimit can be changed inside of @tex).
692 \ifnum\catcode`\^^M=
\active \else
693 \errhelp =
\groupinvalidhelp
694 \errmessage{@group invalid in context where filling is enabled
}%
698 \setbox\groupbox =
\vtop\bgroup
699 % Do @comment since we are called inside an environment such as
700 % @example, where each end-of-line in the input causes an
701 % end-of-line in the output. We don't want the end-of-line after
702 % the `@group' to put extra space in the output. Since @group
703 % should appear on a line by itself (according to the Texinfo
704 % manual), we don't worry about eating any user text.
708 % The \vtop produces a box with normal height and large depth; thus, TeX puts
709 % \baselineskip glue before it, and (when the next line of text is done)
710 % \lineskip glue after it. Thus, space below is not quite equal to space
711 % above. But it's pretty close.
713 % To get correct interline space between the last line of the group
714 % and the first line afterwards, we have to propagate \prevdepth.
715 \endgraf % Not \par, as it may have been set to \lisppar.
716 \global\dimen1 =
\prevdepth
717 \egroup % End the \vtop.
724 % \dimen0 is the vertical size of the group's box.
725 \dimen0 =
\ht\groupbox \advance\dimen0 by
\dp\groupbox
726 % \dimen2 is how much space is left on the page (more or less).
727 \dimen2 =
\txipageheight \advance\dimen2 by -
\pagetotal
728 % if the group doesn't fit on the current page, and it's a big big
729 % group, force a page break.
730 \ifdim \dimen0 >
\dimen2
731 \ifdim \pagetotal <
\vfilllimit\txipageheight
739 % TeX puts in an \escapechar (i.e., `@') at the beginning of the help
740 % message, so this ends up printing `@group can only ...'.
742 \newhelp\groupinvalidhelp{%
743 group can only be used in environments such as @example,^^J
%
744 where each line of input produces a line of output.
}
746 % @need space-in-mils
747 % forces a page break if there is not space-in-mils remaining.
749 \newdimen\mil \mil=
0.001in
752 % Ensure vertical mode, so we don't make a big box in the middle of a
756 % If the @need value is less than one line space, it's useless.
758 \dimen2 =
\ht\strutbox
759 \advance\dimen2 by
\dp\strutbox
760 \ifdim\dimen0 >
\dimen2
762 % Do a \strut just to make the height of this box be normal, so the
763 % normal leading is inserted relative to the preceding line.
764 % And a page break here is fine.
765 \vtop to
#1\mil{\strut\vfil}%
767 % TeX does not even consider page breaks if a penalty added to the
768 % main vertical list is 10000 or more. But in order to see if the
769 % empty box we just added fits on the page, we must make it consider
770 % page breaks. On the other hand, we don't want to actually break the
771 % page after the empty box. So we use a penalty of 9999.
773 % There is an extremely small chance that TeX will actually break the
774 % page at this \penalty, if there are no other feasible breakpoints in
775 % sight. (If the user is using lots of big @group commands, which
776 % almost-but-not-quite fill up a page, TeX will have a hard time doing
777 % good page breaking, for example.) However, I could not construct an
778 % example where a page broke at this \penalty; if it happens in a real
779 % document, then we can reconsider our strategy.
782 % Back up by the size of the box, whether we did a page break or not.
785 % Do not allow a page break right after this kern.
790 % @br forces paragraph break (and is undocumented).
794 % @page forces the start of a new page.
796 \def\page{\par\vfill\supereject}
799 % outputs text on separate line in roman font, starting at standard page margin
801 % This records the amount of indent in the innermost environment.
802 % That's how much \exdent should take out.
803 \newskip\exdentamount
805 % This defn is used inside fill environments such as @defun.
806 \parseargdef\exdent{\hfil\break\hbox{\kern -
\exdentamount{\rm#1}}\hfil\break}
808 % This defn is used inside nofill environments such as @example.
809 \parseargdef\nofillexdent{{\advance \leftskip by -
\exdentamount
810 \leftline{\hskip\leftskip{\rm#1}}}}
812 % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
813 % paragraph. For more general purposes, use the \margin insertion
814 % class. WHICH is `l' or `r'. Not documented, written for gawk manual.
816 \newskip\inmarginspacing \inmarginspacing=
1cm
817 \def\strutdepth{\dp\strutbox}
819 \def\doinmargin#1#2{\strut\vadjust{%
822 \vtop to
\strutdepth{%
823 \baselineskip=
\strutdepth
825 % if you have multiple lines of stuff to put here, you'll need to
826 % make the vbox yourself of the appropriate size.
828 \llap{\ignorespaces #2\hskip\inmarginspacing}%
830 \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}%
835 \def\inleftmargin{\doinmargin l
}
836 \def\inrightmargin{\doinmargin r
}
838 % @inmargin{TEXT [, RIGHT-TEXT]}
839 % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right;
840 % else use TEXT for both).
842 \def\inmargin#1{\parseinmargin #1,,
\finish}
843 \def\parseinmargin#1,
#2,
#3\finish{% not perfect, but better than nothing.
844 \setbox0 =
\hbox{\ignorespaces #2}%
846 \def\lefttext{#1}% have both texts
849 \def\lefttext{#1}% have only one text
854 \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin
856 \def\temp{\inleftmargin\lefttext}%
861 % @| inserts a changebar to the left of the current line. It should
862 % surround any changed text. This approach does *not* work if the
863 % change spans more than two lines of output. To handle that, we would
864 % have adopt a much more difficult approach (putting marks into the main
865 % vertical list for the beginning and end of each change). This command
866 % is not documented, not supported, and doesn't work.
869 % \vadjust can only be used in horizontal mode.
872 % Append this vertical mode material after the current line in the output.
874 % We want to insert a rule with the height and depth of the current
875 % leading; that is exactly what \strutbox is supposed to record.
878 % \vadjust-items are inserted at the left edge of the type. So
879 % the \llap here moves out into the left-hand margin.
882 % For a thicker or thinner bar, change the `1pt'.
883 \vrule height
\baselineskip width1pt
885 % This is the space between the bar and the text.
891 % @include FILE -- \input text of FILE.
893 \def\include{\parseargusing\filenamecatcodes\includezzz}
898 \makevalueexpandable % we want to expand any @value in FILE.
899 \turnoffactive % and allow special characters in the expansion
900 \indexnofonts % Allow `@@' and other weird things in file names.
901 \wlog{texinfo.tex: doing @include of
#1^^J
}%
902 \edef\temp{\noexpand\input #1 }%
904 % This trickery is to read FILE outside of a group, in case it makes
910 \def\filenamecatcodes{%
924 \def\pushthisfilestack{%
925 \expandafter\pushthisfilestackX\popthisfilestack\StackTerm
927 \def\pushthisfilestackX{%
928 \expandafter\pushthisfilestackY\thisfile\StackTerm
930 \def\pushthisfilestackY #1\StackTerm #2\StackTerm {%
931 \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}%
934 \def\popthisfilestack{\errthisfilestackempty}
935 \def\errthisfilestackempty{\errmessage{Internal error:
936 the stack of filenames is empty.
}}
941 % outputs that line, centered.
943 \parseargdef\center{%
945 \let\centersub\centerH
947 \let\centersub\centerV
949 \centersub{\hfil \ignorespaces#1\unskip \hfil}%
950 \let\centersub\relax % don't let the definition persist, just in case
954 \advance\hsize by -
\leftskip
955 \advance\hsize by -
\rightskip
960 \newcount\centerpenalty
962 % The idea here is the same as in \startdefun, \cartouche, etc.: if
963 % @center is the first thing after a section heading, we need to wipe
964 % out the negative parskip inserted by \sectionheading, but still
965 % prevent a page break here.
966 \centerpenalty =
\lastpenalty
967 \ifnum\centerpenalty>
10000 \vskip\parskip \fi
968 \ifnum\centerpenalty>
9999 \penalty\centerpenalty \fi
969 \line{\kern\leftskip #1\kern\rightskip}%
972 % @sp n outputs n lines of vertical space
974 \parseargdef\sp{\vskip #1\baselineskip}
976 % @comment ...line which is ignored...
977 % @c is the same as @comment
978 % @ignore ... @end ignore is another way to write a comment
980 \def\comment{\begingroup \catcode`\^^M=
\active%
981 \catcode`\@=
\other \catcode`\
{=
\other \catcode`\
}=
\other\commentxxx}%
983 {\catcode`\^^M=
\active%
984 \gdef\commentxxx#1^^M
{\endgroup%
985 \futurelet\nexttoken\commentxxxx}%
986 \gdef\commentxxxx{\ifx\nexttoken\aftermacro\expandafter\comment\fi}%
989 \def\c{\begingroup \catcode`\^^M=
\active%
990 \catcode`\@=
\other \catcode`\
{=
\other \catcode`\
}=
\other%
992 {\catcode`\^^M=
\active \gdef\cxxx#1^^M
{\endgroup}}
993 % See comment in \scanmacro about why the definitions of @c and @comment differ
995 % @paragraphindent NCHARS
996 % We'll use ems for NCHARS, close enough.
997 % NCHARS can also be the word `asis' or `none'.
998 % We cannot feasibly implement @paragraphindent asis, though.
1000 \def\asisword{asis
} % no translation, these are keywords
1003 \parseargdef\paragraphindent{%
1008 \defaultparindent =
0pt
1010 \defaultparindent =
#1em
1013 \parindent =
\defaultparindent
1016 % @exampleindent NCHARS
1017 % We'll use ems for NCHARS like @paragraphindent.
1018 % It seems @exampleindent asis isn't necessary, but
1019 % I preserve it to make it similar to @paragraphindent.
1020 \parseargdef\exampleindent{%
1025 \lispnarrowing =
0pt
1027 \lispnarrowing =
#1em
1032 % @firstparagraphindent WORD
1033 % If WORD is `none', then suppress indentation of the first paragraph
1034 % after a section heading. If WORD is `insert', then do indent at such
1037 % The paragraph indentation is suppressed or not by calling
1038 % \suppressfirstparagraphindent, which the sectioning commands do.
1039 % We switch the definition of this back and forth according to WORD.
1040 % By default, we suppress indentation.
1042 \def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent}
1043 \def\insertword{insert
}
1045 \parseargdef\firstparagraphindent{%
1048 \let\suppressfirstparagraphindent =
\dosuppressfirstparagraphindent
1049 \else\ifx\temp\insertword
1050 \let\suppressfirstparagraphindent =
\relax
1052 \errhelp =
\EMsimple
1053 \errmessage{Unknown @firstparagraphindent option `
\temp'
}%
1057 % Here is how we actually suppress indentation. Redefine \everypar to
1058 % \kern backwards by \parindent, and then reset itself to empty.
1060 % We also make \indent itself not actually do anything until the next
1063 \gdef\dosuppressfirstparagraphindent{%
1064 \gdef\indent {\restorefirstparagraphindent \indent}%
1065 \gdef\noindent{\restorefirstparagraphindent \noindent}%
1066 \global\everypar =
{\kern -
\parindent \restorefirstparagraphindent}%
1069 \gdef\restorefirstparagraphindent{%
1070 \global\let\indent =
\ptexindent
1071 \global\let\noindent =
\ptexnoindent
1072 \global\everypar =
{}%
1076 % @refill is a no-op.
1079 % @setfilename INFO-FILENAME - ignored
1080 \let\setfilename=
\comment
1083 \outer\def\bye{\pagealignmacro\tracingstats=
1\ptexend}
1087 % adobe `portable' document format
1091 \newcount\filenamelength
1101 \newif\ifpdfmakepagedest
1107 \ifx\luatexversion\thisisundefined
1109 % Escape PDF strings UTF-8 to UTF-16
1113 function UTF16oct(str
)
1114 tex
.sprint(string.char(0x5c) .. '376' .. string.char(0x5c) .. '377')
1115 for c
in string.utfvalues(str
) do
1118 string.format(string.char(0x5c) .. string.char(0x25) .. '03o' ..
1119 string.char(0x5c) .. string.char(0x25) .. '03o',
1120 (c
/ 256), (c
% 256)))
1123 local c_hi
= c
/ 1024 + 0xd800
1124 local c_lo
= c
% 1024 + 0xdc00
1126 string.format(string.char(0x5c) .. string.char(0x25) .. '03o' ..
1127 string.char(0x5c) .. string.char(0x25) .. '03o' ..
1128 string.char(0x5c) .. string.char(0x25) .. '03o' ..
1129 string.char(0x5c) .. string.char(0x25) .. '03o',
1130 (c_hi
/ 256), (c_hi
% 256),
1131 (c_lo
/ 256), (c_lo
% 256)))
1137 \def\pdfescapestring#1{\directlua{UTF16oct('\luaescapestring{#1}')}}
1138 \ifnum\luatexversion>
84
1139 % For LuaTeX >= 0.85
1140 \def\pdfdest{\pdfextension dest
}
1141 \let\pdfoutput\outputmode
1142 \def\pdfliteral{\pdfextension literal
}
1143 \def\pdfcatalog{\pdfextension catalog
}
1144 \def\pdftexversion{\numexpr\pdffeedback version
\relax}
1145 \let\pdfximage\saveimageresource
1146 \let\pdfrefximage\useimageresource
1147 \let\pdflastximage\lastsavedimageresourceindex
1148 \def\pdfendlink{\pdfextension endlink
\relax}
1149 \def\pdfoutline{\pdfextension outline
}
1150 \def\pdfstartlink{\pdfextension startlink
}
1151 \def\pdffontattr{\pdfextension fontattr
}
1152 \def\pdfobj{\pdfextension obj
}
1153 \def\pdflastobj{\numexpr\pdffeedback lastobj
\relax}
1154 \let\pdfpagewidth\pagewidth
1155 \let\pdfpageheight\pageheight
1156 \edef\pdfhorigin{\pdfvariable horigin
}
1157 \edef\pdfvorigin{\pdfvariable vorigin
}
1161 % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
1162 % can be set). So we test for \relax and 0 as well as being undefined.
1163 \ifx\pdfoutput\thisisundefined
1165 \ifx\pdfoutput\relax
1174 % PDF uses PostScript string constants for the names of xref targets,
1175 % for display in the outlines, and in other places. Thus, we have to
1176 % double any backslashes. Otherwise, a name like "\node" will be
1177 % interpreted as a newline (\n), followed by o, d, e. Not good.
1179 % See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and
1180 % related messages. The final outcome is that it is up to the TeX user
1181 % to double the backslashes and otherwise make the string valid, so
1182 % that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to
1183 % do this reliably, so we use it.
1185 % #1 is a control sequence in which to do the replacements,
1187 \def\txiescapepdf#1{%
1188 \ifx\pdfescapestring\thisisundefined
1189 % No primitive available; should we give a warning or log?
1190 % Many times it won't matter.
1192 % The expandable \pdfescapestring primitive escapes parentheses,
1193 % backslashes, and other special chars.
1194 \xdef#1{\pdfescapestring{#1}}%
1198 \newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
1199 with PDF output, and none of those formats could be found. (.eps cannot
1200 be supported due to the design of the PDF format; use regular TeX (DVI
1205 % Color manipulation macros using ideas from pdfcolor.tex,
1206 % except using rgb instead of cmyk; the latter is said to render as a
1207 % very dark gray on-screen and a very dark halftone in print, instead
1208 % of actual black. The dark red here is dark enough to print on paper as
1209 % nearly black, but still distinguishable for online viewing. We use
1210 % black by default, though.
1211 \def\rgbDarkRed{0.50 0.09 0.12}
1212 \def\rgbBlack{0 0 0}
1214 % rg sets the color for filling (usual text, etc.);
1215 % RG sets the color for stroking (thin rules, e.g., normal _'s).
1216 \def\pdfsetcolor#1{\pdfliteral{#1 rg
#1 RG
}}
1218 % Set color, and create a mark which defines \thiscolor accordingly,
1219 % so that \makeheadline knows which color to restore.
1221 \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}%
1226 \def\maincolor{\rgbBlack}
1227 \pdfsetcolor{\maincolor}
1228 \edef\thiscolor{\maincolor}
1229 \def\lastcolordefs{}
1233 \line{\pdfsetcolor{\maincolor}\the\footline}%
1241 % Extract \thiscolor definition from the marks.
1243 % Typeset the headline with \maincolor, then restore the color.
1244 \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
1252 \pdfcatalog{/PageMode /UseOutlines
}
1254 % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
1255 \def\dopdfimage#1#2#3{%
1256 \def\pdfimagewidth{#2}\setbox0 =
\hbox{\ignorespaces #2}%
1257 \def\pdfimageheight{#3}\setbox2 =
\hbox{\ignorespaces #3}%
1259 % pdftex (and the PDF format) support .pdf, .png, .jpg (among
1260 % others). Let's try in that order, PDF first since if
1261 % someone has a scalable image, presumably better to use that than a
1263 \let\pdfimgext=
\empty
1265 \openin 1 #1.pdf
\ifeof 1
1266 \openin 1 #1.PDF
\ifeof 1
1267 \openin 1 #1.png
\ifeof 1
1268 \openin 1 #1.jpg
\ifeof 1
1269 \openin 1 #1.jpeg
\ifeof 1
1270 \openin 1 #1.JPG
\ifeof 1
1271 \errhelp =
\nopdfimagehelp
1272 \errmessage{Could not find image file
#1 for pdf
}%
1273 \else \gdef\pdfimgext{JPG
}%
1275 \else \gdef\pdfimgext{jpeg
}%
1277 \else \gdef\pdfimgext{jpg
}%
1279 \else \gdef\pdfimgext{png
}%
1281 \else \gdef\pdfimgext{PDF
}%
1283 \else \gdef\pdfimgext{pdf
}%
1288 % without \immediate, ancient pdftex seg faults when the same image is
1289 % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
1290 \ifnum\pdftexversion <
14
1293 \immediate\pdfximage
1295 \ifdim \wd0 >
0pt width
\pdfimagewidth \fi
1296 \ifdim \wd2 >
0pt height
\pdfimageheight \fi
1297 \ifnum\pdftexversion<
13
1302 \ifnum\pdftexversion <
14 \else
1303 \pdfrefximage \pdflastximage
1307 % We have to set dummies so commands such as @code, and characters
1308 % such as \, aren't expanded when present in a section title.
1311 \makevalueexpandable
1312 \def\pdfdestname{#1}%
1313 \txiescapepdf\pdfdestname
1314 \safewhatsit{\pdfdest name
{\pdfdestname} xyz
}%
1317 % used to mark target names; must be expandable.
1320 % by default, use black for everything.
1321 \def\urlcolor{\rgbBlack}
1322 \def\linkcolor{\rgbBlack}
1323 \def\endlink{\setcolor{\maincolor}\pdfendlink}
1325 % Adding outlines to PDF; macros for calculating structure of outlines
1326 % come from Petr Olsak
1327 \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
1328 \else \csname#1\endcsname \fi}
1329 \def\advancenumber#1{\tempnum=
\expnumber{#1}\relax
1330 \advance\tempnum by
1
1331 \expandafter\xdef\csname#1\endcsname{\the\tempnum}}
1333 % #1 is the section text, which is what will be displayed in the
1334 % outline by the pdf viewer. #2 is the pdf expression for the number
1335 % of subentries (or empty, for subsubsections). #3 is the node text,
1336 % which might be empty if this toc entry had no corresponding node.
1337 % #4 is the page number
1339 \def\dopdfoutline#1#2#3#4{%
1340 % Generate a link to the node text if that exists; else, use the
1341 % page number. We could generate a destination for the section
1342 % text in the case where a section has no node, but it doesn't
1343 % seem worth the trouble, since most documents are normally structured.
1345 \ifx\luatexversion\thisisundefined \else
1346 \turnoffactive % LuaTeX can use Unicode strings for PDF
1348 \edef\pdfoutlinedest{#3}%
1349 \ifx\pdfoutlinedest\empty
1350 \def\pdfoutlinedest{#4}%
1352 \txiescapepdf\pdfoutlinedest
1355 % Also escape PDF chars in the display string.
1356 \edef\pdfoutlinetext{#1}%
1357 \txiescapepdf\pdfoutlinetext
1359 \pdfoutline goto name
{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
1363 \def\pdfmakeoutlines{%
1365 % Read toc silently, to get counts of subentries for \pdfoutline.
1366 \def\partentry#
#1#
#2#
#3#
#4{}% ignore parts in the outlines
1367 \def\numchapentry#
#1#
#2#
#3#
#4{%
1368 \def\thischapnum{#
#2}%
1370 \def\thissubsecnum{0}%
1372 \def\numsecentry#
#1#
#2#
#3#
#4{%
1373 \advancenumber{chap
\thischapnum}%
1374 \def\thissecnum{#
#2}%
1375 \def\thissubsecnum{0}%
1377 \def\numsubsecentry#
#1#
#2#
#3#
#4{%
1378 \advancenumber{sec
\thissecnum}%
1379 \def\thissubsecnum{#
#2}%
1381 \def\numsubsubsecentry#
#1#
#2#
#3#
#4{%
1382 \advancenumber{subsec
\thissubsecnum}%
1384 \def\thischapnum{0}%
1386 \def\thissubsecnum{0}%
1388 % use \def rather than \let here because we redefine \chapentry et
1389 % al. a second time, below.
1390 \def\appentry{\numchapentry}%
1391 \def\appsecentry{\numsecentry}%
1392 \def\appsubsecentry{\numsubsecentry}%
1393 \def\appsubsubsecentry{\numsubsubsecentry}%
1394 \def\unnchapentry{\numchapentry}%
1395 \def\unnsecentry{\numsecentry}%
1396 \def\unnsubsecentry{\numsubsecentry}%
1397 \def\unnsubsubsecentry{\numsubsubsecentry}%
1400 % Read toc second time, this time actually producing the outlines.
1401 % The `-' means take the \expnumber as the absolute number of
1402 % subentries, which we calculated on our first read of the .toc above.
1404 % We use the node names as the destinations.
1405 \def\numchapentry#
#1#
#2#
#3#
#4{%
1406 \dopdfoutline{#
#1}{count-
\expnumber{chap#
#2}}{#
#3}{#
#4}}%
1407 \def\numsecentry#
#1#
#2#
#3#
#4{%
1408 \dopdfoutline{#
#1}{count-
\expnumber{sec#
#2}}{#
#3}{#
#4}}%
1409 \def\numsubsecentry#
#1#
#2#
#3#
#4{%
1410 \dopdfoutline{#
#1}{count-
\expnumber{subsec#
#2}}{#
#3}{#
#4}}%
1411 \def\numsubsubsecentry#
#1#
#2#
#3#
#4{% count is always zero
1412 \dopdfoutline{#
#1}{}{#
#3}{#
#4}}%
1414 % PDF outlines are displayed using system fonts, instead of
1415 % document fonts. Therefore we cannot use special characters,
1416 % since the encoding is unknown. For example, the eogonek from
1417 % Latin 2 (0xea) gets translated to a | character. Info from
1418 % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
1420 % TODO this right, we have to translate 8-bit characters to
1421 % their "best" equivalent, based on the @documentencoding. Too
1422 % much work for too little return. Just use the ASCII equivalents
1423 % we use for the index sort strings.
1427 % We can have normal brace characters in the PDF outlines, unlike
1428 % Texinfo index files. So set that up.
1429 \def\
{{\lbracecharliteral}%
1430 \def\
}{\rbracecharliteral}%
1431 \catcode`\\=
\active \otherbackslash
1432 \input \tocreadfilename
1435 {\catcode`
[=
1 \catcode`
]=
2
1436 \catcode`
{=
\other \catcode`
}=
\other
1437 \gdef\lbracecharliteral[{]%
1438 \gdef\rbracecharliteral[}]%
1441 \def\skipspaces#1{\def\PP{#1}\def\D{|
}%
1442 \ifx\PP\D\let\nextsp\relax
1443 \else\let\nextsp\skipspaces
1444 \addtokens{\filename}{\PP}%
1445 \advance\filenamelength by
1
1448 \def\getfilename#1{%
1450 % If we don't expand the argument now, \skipspaces will get
1451 % snagged on things like "@value{foo}".
1453 \expandafter\skipspaces\temp|
\relax
1455 \ifnum\pdftexversion <
14
1456 \let \startlink \pdfannotlink
1458 \let \startlink \pdfstartlink
1460 % make a live url in pdf output.
1463 % it seems we really need yet another set of dummies; have not
1464 % tried to figure out what each command should do in the context
1465 % of @url. for now, just make @/ a no-op, that's the only one
1466 % people have actually reported a problem with.
1468 \normalturnoffactive
1471 \makevalueexpandable
1472 % do we want to go so far as to use \indexnofonts instead of just
1473 % special-casing \var here?
1476 \leavevmode\setcolor{\urlcolor}%
1477 \startlink attr
{/Border
[0 0 0]}%
1478 user
{/Subtype /Link /A << /S /URI /URI (
#1) >>
}%
1480 \def\pdfgettoks#1.
{\setbox\boxA=
\hbox{\toksA=
{#1.
}\toksB=
{}\maketoks}}
1481 \def\addtokens#1#2{\edef\addtoks{\noexpand#1=
{\the#1#2}}\addtoks}
1482 \def\adn#1{\addtokens{\toksC}{#1}\global\countA=
1\let\next=
\maketoks}
1483 \def\poptoks#1#2|ENDTOKS|
{\let\first=
#1\toksD=
{#1}\toksA=
{#2}}
1485 \expandafter\poptoks\the\toksA|ENDTOKS|
\relax
1487 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
1488 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
1489 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
1491 \ifnum0=
\countA\else\makelink\fi
1492 \ifx\first.
\let\next=
\done\else
1494 \addtokens{\toksB}{\the\toksD}
1495 \ifx\first,
\addtokens{\toksB}{\space}\fi
1497 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
1499 \def\makelink{\addtokens{\toksB}%
1500 {\noexpand\pdflink{\the\toksC}}\toksC=
{}\global\countA=
0}
1502 \startlink attr
{/Border
[0 0 0]} goto name
{\pdfmkpgn{#1}}
1503 \setcolor{\linkcolor}#1\endlink}
1504 \def\done{\edef\st{\global\noexpand\toksA=
{\the\toksB}}\st}
1507 \let\pdfmkdest =
\gobble
1508 \let\pdfurl =
\gobble
1509 \let\endlink =
\relax
1510 \let\setcolor =
\gobble
1511 \let\pdfsetcolor =
\gobble
1512 \let\pdfmakeoutlines =
\relax
1513 \fi % \ifx\pdfoutput
1518 \newif\iftxiuseunicodedestname
1519 \ifx\XeTeXrevision\thisisundefined
1522 % XeTeX version check
1524 \ifnum\strcmp{\the\XeTeXversion\XeTeXrevision}{0.99995}>-
1
1525 % XeTeX 0.99995+ contains xdvipdfmx 20160307+.
1526 % It can handle Unicode destination name for PDF.
1527 \txiuseunicodedestnametrue
1529 % XeTeX < 0.99995 can not handle Unicode destination name for PDF
1530 % because xdvipdfmx 20150315 has UTF-16 convert issue.
1531 % It fixed by xdvipdfmx 20160106 (TeX Live SVN r39753).
1532 \txiuseunicodedestnamefalse
1535 % PDF outline support
1537 \pdfmakepagedesttrue \relax
1538 % Emulate the primitive of pdfTeX
1539 \def\pdfdest name
#1 xyz
{%
1540 \special{pdf:dest (name
#1)
[@thispage /XYZ @xpos @ypos
]}%
1543 % We have to set dummies so commands such as @code, and characters
1544 % such as \, aren't expanded when present in a section title.
1546 \iftxiuseunicodedestname
1547 \def\pdfdestname{#1}% Pass through Unicode characters.
1549 \edef\pdfdestname{#1}% Replace Unicode characters to ASCII.
1552 \makevalueexpandable
1553 % In the case of XeTeX, xdvipdfmx converts strings to UTF-16.
1554 % Therefore \txiescapepdf is not necessary.
1555 \safewhatsit{\pdfdest name
{\pdfdestname} xyz
}%
1558 \def\dopdfoutline#1#2#3#4{%
1559 \iftxiuseunicodedestname
1560 \def\pdfoutlinedest{#3}% Pass through Unicode characters.
1562 \edef\pdfoutlinedest{#3}% Replace Unicode characters to ASCII.
1564 \ifx\pdfoutlinedest\empty
1565 \def\pdfoutlinedest{#4}%
1569 % In the case of XeTeX, xdvipdfmx converts strings to UTF-16.
1570 % Therefore \txiescapepdf is not necessary.
1571 \special{pdf:out
[-
] #2 << /Title (
#1) /A << /S /GoTo /D (name
\pdfoutlinedest) >> >>
}%
1575 \def\pdfmakeoutlines{%
1578 % In the case of XeTeX, counts of subentries is not necesary.
1579 % Therefore, read toc only once.
1581 % We use the node names as the destinations.
1582 \def\partentry#
#1#
#2#
#3#
#4{}% ignore parts in the outlines
1583 \def\numchapentry#
#1#
#2#
#3#
#4{%
1584 \dopdfoutline{#
#1}{1}{#
#3}{#
#4}}%
1585 \def\numsecentry#
#1#
#2#
#3#
#4{%
1586 \dopdfoutline{#
#1}{2}{#
#3}{#
#4}}%
1587 \def\numsubsecentry#
#1#
#2#
#3#
#4{%
1588 \dopdfoutline{#
#1}{3}{#
#3}{#
#4}}%
1589 \def\numsubsubsecentry#
#1#
#2#
#3#
#4{%
1590 \dopdfoutline{#
#1}{4}{#
#3}{#
#4}}%
1592 \let\appentry\numchapentry%
1593 \let\appsecentry\numsecentry%
1594 \let\appsubsecentry\numsubsecentry%
1595 \let\appsubsubsecentry\numsubsubsecentry%
1596 \let\unnchapentry\numchapentry%
1597 \let\unnsecentry\numsecentry%
1598 \let\unnsubsecentry\numsubsecentry%
1599 \let\unnsubsubsecentry\numsubsubsecentry%
1601 % In the case of XeTeX, xdvipdfmx converts strings to UTF-16.
1602 % Therefore, the encoding and the language may not be considered.
1606 % We can have normal brace characters in the PDF outlines, unlike
1607 % Texinfo index files. So set that up.
1608 \def\
{{\lbracecharliteral}%
1609 \def\
}{\rbracecharliteral}%
1610 \catcode`\\=
\active \otherbackslash
1611 \input \tocreadfilename
1614 {\catcode`
[=
1 \catcode`
]=
2
1615 \catcode`
{=
\other \catcode`
}=
\other
1616 \gdef\lbracecharliteral[{]%
1617 \gdef\rbracecharliteral[}]%
1620 \special{pdf:docview << /PageMode /UseOutlines >>
}
1621 % ``\special{pdf:tounicode ...}'' is not necessary
1622 % because xdvipdfmx converts strings from UTF-8 to UTF-16 without it.
1623 % However, due to UTF-16 convert issue of xdvipdfmx 20150315,
1624 % ``\special{pdf:dest ...}'' can not handle non-ASCII strings.
1625 % It fixed by xdvipdfmx 20160106 (TeX Live SVN r39753).
1627 % make a live url in pdf output.
1630 % it seems we really need yet another set of dummies; have not
1631 % tried to figure out what each command should do in the context
1632 % of @url. for now, just make @/ a no-op, that's the only one
1633 % people have actually reported a problem with.
1635 \normalturnoffactive
1638 \makevalueexpandable
1639 % do we want to go so far as to use \indexnofonts instead of just
1640 % special-casing \var here?
1643 \leavevmode\setcolor{\urlcolor}%
1644 \special{pdf:bann << /Border
[0 0 0]
1645 /Subtype /Link /A << /S /URI /URI (
#1) >> >>
}%
1647 \def\endlink{\setcolor{\maincolor}\special{pdf:eann
}}
1648 \def\pdfgettoks#1.
{\setbox\boxA=
\hbox{\toksA=
{#1.
}\toksB=
{}\maketoks}}
1649 \def\addtokens#1#2{\edef\addtoks{\noexpand#1=
{\the#1#2}}\addtoks}
1650 \def\adn#1{\addtokens{\toksC}{#1}\global\countA=
1\let\next=
\maketoks}
1651 \def\poptoks#1#2|ENDTOKS|
{\let\first=
#1\toksD=
{#1}\toksA=
{#2}}
1653 \expandafter\poptoks\the\toksA|ENDTOKS|
\relax
1655 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
1656 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
1657 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
1659 \ifnum0=
\countA\else\makelink\fi
1660 \ifx\first.
\let\next=
\done\else
1662 \addtokens{\toksB}{\the\toksD}
1663 \ifx\first,
\addtokens{\toksB}{\space}\fi
1665 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
1667 \def\makelink{\addtokens{\toksB}%
1668 {\noexpand\pdflink{\the\toksC}}\toksC=
{}\global\countA=
0}
1670 \special{pdf:bann << /Border
[0 0 0]
1671 /Type /Annot /Subtype /Link /A << /S /GoTo /D (name
#1) >> >>
}%
1672 \setcolor{\linkcolor}#1\endlink}
1673 \def\done{\edef\st{\global\noexpand\toksA=
{\the\toksB}}\st}
1678 % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
1679 \def\doxeteximage#1#2#3{%
1680 \def\xeteximagewidth{#2}\setbox0 =
\hbox{\ignorespaces #2}%
1681 \def\xeteximageheight{#3}\setbox2 =
\hbox{\ignorespaces #3}%
1683 % XeTeX (and the PDF format) support .pdf, .png, .jpg (among
1684 % others). Let's try in that order, PDF first since if
1685 % someone has a scalable image, presumably better to use that than a
1687 \let\xeteximgext=
\empty
1689 \openin 1 #1.pdf
\ifeof 1
1690 \openin 1 #1.PDF
\ifeof 1
1691 \openin 1 #1.png
\ifeof 1
1692 \openin 1 #1.jpg
\ifeof 1
1693 \openin 1 #1.jpeg
\ifeof 1
1694 \openin 1 #1.JPG
\ifeof 1
1695 \errmessage{Could not find image file
#1 for XeTeX
}%
1696 \else \gdef\xeteximgext{JPG
}%
1698 \else \gdef\xeteximgext{jpeg
}%
1700 \else \gdef\xeteximgext{jpg
}%
1702 \else \gdef\xeteximgext{png
}%
1704 \else \gdef\xeteximgext{PDF
}%
1706 \else \gdef\xeteximgext{pdf
}%
1711 \def\xetexpdfext{pdf
}%
1712 \ifx\xeteximgext\xetexpdfext
1713 \XeTeXpdffile "
#1".
\xeteximgext ""
1715 \def\xetexpdfext{PDF
}%
1716 \ifx\xeteximgext\xetexpdfext
1717 \XeTeXpdffile "
#1".
\xeteximgext ""
1719 \XeTeXpicfile "
#1".
\xeteximgext ""
1722 \ifdim \wd0 >
0pt width
\xeteximagewidth \fi
1723 \ifdim \wd2 >
0pt height
\xeteximageheight \fi \relax
1729 % Change the current font style to #1, remembering it in \curfontstyle.
1730 % For now, we do not accumulate font styles: @b{@i{foo}} prints foo in
1731 % italics, not bold italics.
1733 \def\setfontstyle#1{%
1734 \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd.
1735 \csname ten
#1\endcsname % change the current font
1738 % Select #1 fonts with the current style.
1740 \def\selectfonts#1{\csname #1fonts
\endcsname \csname\curfontstyle\endcsname}
1742 \def\rm{\fam=
0 \setfontstyle{rm
}}
1743 \def\it{\fam=
\itfam \setfontstyle{it
}}
1744 \def\sl{\fam=
\slfam \setfontstyle{sl
}}
1745 \def\bf{\fam=
\bffam \setfontstyle{bf
}}\def\bfstylename{bf
}
1746 \def\tt{\fam=
\ttfam \setfontstyle{tt
}}
1748 % Unfortunately, we have to override this for titles and the like, since
1749 % in those cases "rm" is bold. Sigh.
1750 \def\rmisbold{\rm\def\curfontstyle{bf
}}
1752 % Texinfo sort of supports the sans serif font style, which plain TeX does not.
1753 % So we set up a \sf.
1755 \def\sf{\fam=
\sffam \setfontstyle{sf
}}
1756 \let\li =
\sf % Sometimes we call it \li, not \sf.
1758 % We don't need math for this font style.
1759 \def\ttsl{\setfontstyle{ttsl
}}
1762 % Set the baselineskip to #1, and the lineskip and strut size
1763 % correspondingly. There is no deep meaning behind these magic numbers
1764 % used as factors; they just match (closely enough) what Knuth defined.
1766 \def\lineskipfactor{.08333}
1767 \def\strutheightpercent{.70833}
1768 \def\strutdepthpercent {.29167}
1770 % can get a sort of poor man's double spacing by redefining this.
1771 \def\baselinefactor{1}
1773 \newdimen\textleading
1776 \normalbaselineskip =
\baselinefactor\dimen0
1777 \normallineskip =
\lineskipfactor\normalbaselineskip
1779 \setbox\strutbox =
\hbox{%
1780 \vrule width0pt height
\strutheightpercent\baselineskip
1781 depth
\strutdepthpercent \baselineskip
1785 % PDF CMaps. See also LaTeX's t1.cmap.
1787 % do nothing with this by default.
1788 \expandafter\let\csname cmapOT1
\endcsname\gobble
1789 \expandafter\let\csname cmapOT1IT
\endcsname\gobble
1790 \expandafter\let\csname cmapOT1TT
\endcsname\gobble
1792 % if we are producing pdf, and we have \pdffontattr, then define cmaps.
1793 % (\pdffontattr was introduced many years ago, but people still run
1794 % older pdftex's; it's easy to conditionalize, so we do.)
1795 \ifpdf \ifx\pdffontattr\thisisundefined \else
1797 \catcode`\^^M=
\active \def^^M
{^^J
}% Output line endings as the ^^J char.
1798 \catcode`\%=
12 \immediate\pdfobj stream
{%!PS-Adobe-3.0 Resource-CMap
1799 %%DocumentNeededResources: ProcSet (CIDInit)
1800 %%IncludeResource: ProcSet (CIDInit)
1801 %%BeginResource: CMap (TeX-OT1-0)
1802 %%Title: (TeX-OT1-0 TeX OT1 0)
1805 /CIDInit /ProcSet findresource begin
1813 /CMapName /TeX-OT1-
0 def
1815 1 begincodespacerange
1871 CMapName currentdict /CMap defineresource pop
1877 \expandafter\edef\csname cmapOT1
\endcsname#1{%
1878 \pdffontattr#1{/ToUnicode
\the\pdflastobj\space 0 R
}%
1883 \catcode`\^^M=
\active \def^^M
{^^J
}% Output line endings as the ^^J char.
1884 \catcode`\%=
12 \immediate\pdfobj stream
{%!PS-Adobe-3.0 Resource-CMap
1885 %%DocumentNeededResources: ProcSet (CIDInit)
1886 %%IncludeResource: ProcSet (CIDInit)
1887 %%BeginResource: CMap (TeX-OT1IT-0)
1888 %%Title: (TeX-OT1IT-0 TeX OT1IT 0)
1891 /CIDInit /ProcSet findresource begin
1899 /CMapName /TeX-OT1IT-
0 def
1901 1 begincodespacerange
1959 CMapName currentdict /CMap defineresource pop
1965 \expandafter\edef\csname cmapOT1IT
\endcsname#1{%
1966 \pdffontattr#1{/ToUnicode
\the\pdflastobj\space 0 R
}%
1971 \catcode`\^^M=
\active \def^^M
{^^J
}% Output line endings as the ^^J char.
1972 \catcode`\%=
12 \immediate\pdfobj stream
{%!PS-Adobe-3.0 Resource-CMap
1973 %%DocumentNeededResources: ProcSet (CIDInit)
1974 %%IncludeResource: ProcSet (CIDInit)
1975 %%BeginResource: CMap (TeX-OT1TT-0)
1976 %%Title: (TeX-OT1TT-0 TeX OT1TT 0)
1979 /CIDInit /ProcSet findresource begin
1987 /CMapName /TeX-OT1TT-
0 def
1989 1 begincodespacerange
2034 CMapName currentdict /CMap defineresource pop
2040 \expandafter\edef\csname cmapOT1TT
\endcsname#1{%
2041 \pdffontattr#1{/ToUnicode
\the\pdflastobj\space 0 R
}%
2046 % Set the font macro #1 to the font named \fontprefix#2.
2047 % #3 is the font's design size, #4 is a scale factor, #5 is the CMap
2048 % encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit).
2056 \def\setfont#1#2#3#4#5{%
2057 \font#1=
\fontprefix#2#3 scaled
#4
2058 \csname cmap
#5\endcsname#1%
2060 % This is what gets called when #5 of \setfont is empty.
2065 % Use cm as the default font prefix.
2066 % To specify the font prefix, you must define \fontprefix
2067 % before you read in texinfo.tex.
2068 \ifx\fontprefix\thisisundefined
2071 % Support font families that don't use the same naming scheme as CM.
2073 \def\rmbshape{bx
} % where the normal face is bold
2078 \def\ttslshape{sltt
}
2088 % Definitions for a main text size of 11pt. (The default in Texinfo.)
2090 \def\definetextfontsizexi{%
2091 % Text fonts (11.2pt, magstep1).
2092 \def\textnominalsize{11pt
}
2093 \edef\mainmagstep{\magstephalf}
2094 \setfont\textrm\rmshape{10}{\mainmagstep}{OT1
}
2095 \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT
}
2096 \setfont\textbf\bfshape{10}{\mainmagstep}{OT1
}
2097 \setfont\textit\itshape{10}{\mainmagstep}{OT1IT
}
2098 \setfont\textsl\slshape{10}{\mainmagstep}{OT1
}
2099 \setfont\textsf\sfshape{10}{\mainmagstep}{OT1
}
2100 \setfont\textsc\scshape{10}{\mainmagstep}{OT1
}
2101 \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT
}
2102 \font\texti=cmmi10 scaled
\mainmagstep
2103 \font\textsy=cmsy10 scaled
\mainmagstep
2104 \def\textecsize{1095}
2106 % A few fonts for @defun names and args.
2107 \setfont\defbf\bfshape{10}{\magstep1}{OT1
}
2108 \setfont\deftt\ttshape{10}{\magstep1}{OT1TT
}
2109 \setfont\defsl\slshape{10}{\magstep1}{OT1TT
}
2110 \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT
}
2111 \def\df{\let\tentt=
\deftt \let\tenbf =
\defbf
2112 \let\tenttsl=
\defttsl \let\tensl=
\defsl \bf}
2114 % Fonts for indices, footnotes, small examples (9pt).
2115 \def\smallnominalsize{9pt
}
2116 \setfont\smallrm\rmshape{9}{1000}{OT1
}
2117 \setfont\smalltt\ttshape{9}{1000}{OT1TT
}
2118 \setfont\smallbf\bfshape{10}{900}{OT1
}
2119 \setfont\smallit\itshape{9}{1000}{OT1IT
}
2120 \setfont\smallsl\slshape{9}{1000}{OT1
}
2121 \setfont\smallsf\sfshape{9}{1000}{OT1
}
2122 \setfont\smallsc\scshape{10}{900}{OT1
}
2123 \setfont\smallttsl\ttslshape{10}{900}{OT1TT
}
2126 \def\smallecsize{0900}
2128 % Fonts for small examples (8pt).
2129 \def\smallernominalsize{8pt
}
2130 \setfont\smallerrm\rmshape{8}{1000}{OT1
}
2131 \setfont\smallertt\ttshape{8}{1000}{OT1TT
}
2132 \setfont\smallerbf\bfshape{10}{800}{OT1
}
2133 \setfont\smallerit\itshape{8}{1000}{OT1IT
}
2134 \setfont\smallersl\slshape{8}{1000}{OT1
}
2135 \setfont\smallersf\sfshape{8}{1000}{OT1
}
2136 \setfont\smallersc\scshape{10}{800}{OT1
}
2137 \setfont\smallerttsl\ttslshape{10}{800}{OT1TT
}
2138 \font\smalleri=cmmi8
2139 \font\smallersy=cmsy8
2140 \def\smallerecsize{0800}
2142 % Fonts for title page (20.4pt):
2143 \def\titlenominalsize{20pt
}
2144 \setfont\titlerm\rmbshape{12}{\magstep3}{OT1
}
2145 \setfont\titleit\itbshape{10}{\magstep4}{OT1IT
}
2146 \setfont\titlesl\slbshape{10}{\magstep4}{OT1
}
2147 \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT
}
2148 \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT
}
2149 \setfont\titlesf\sfbshape{17}{\magstep1}{OT1
}
2150 \let\titlebf=
\titlerm
2151 \setfont\titlesc\scbshape{10}{\magstep4}{OT1
}
2152 \font\titlei=cmmi12 scaled
\magstep3
2153 \font\titlesy=cmsy10 scaled
\magstep4
2154 \def\titleecsize{2074}
2156 % Chapter (and unnumbered) fonts (17.28pt).
2157 \def\chapnominalsize{17pt
}
2158 \setfont\chaprm\rmbshape{12}{\magstep2}{OT1
}
2159 \setfont\chapit\itbshape{10}{\magstep3}{OT1IT
}
2160 \setfont\chapsl\slbshape{10}{\magstep3}{OT1
}
2161 \setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT
}
2162 \setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT
}
2163 \setfont\chapsf\sfbshape{17}{1000}{OT1
}
2165 \setfont\chapsc\scbshape{10}{\magstep3}{OT1
}
2166 \font\chapi=cmmi12 scaled
\magstep2
2167 \font\chapsy=cmsy10 scaled
\magstep3
2168 \def\chapecsize{1728}
2170 % Section fonts (14.4pt).
2171 \def\secnominalsize{14pt
}
2172 \setfont\secrm\rmbshape{12}{\magstep1}{OT1
}
2173 \setfont\secrmnotbold\rmshape{12}{\magstep1}{OT1
}
2174 \setfont\secit\itbshape{10}{\magstep2}{OT1IT
}
2175 \setfont\secsl\slbshape{10}{\magstep2}{OT1
}
2176 \setfont\sectt\ttbshape{12}{\magstep1}{OT1TT
}
2177 \setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT
}
2178 \setfont\secsf\sfbshape{12}{\magstep1}{OT1
}
2180 \setfont\secsc\scbshape{10}{\magstep2}{OT1
}
2181 \font\seci=cmmi12 scaled
\magstep1
2182 \font\secsy=cmsy10 scaled
\magstep2
2183 \def\sececsize{1440}
2185 % Subsection fonts (13.15pt).
2186 \def\ssecnominalsize{13pt
}
2187 \setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1
}
2188 \setfont\ssecit\itbshape{10}{1315}{OT1IT
}
2189 \setfont\ssecsl\slbshape{10}{1315}{OT1
}
2190 \setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT
}
2191 \setfont\ssecttsl\ttslshape{10}{1315}{OT1TT
}
2192 \setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1
}
2194 \setfont\ssecsc\scbshape{10}{1315}{OT1
}
2195 \font\sseci=cmmi12 scaled
\magstephalf
2196 \font\ssecsy=cmsy10 scaled
1315
2197 \def\ssececsize{1200}
2199 % Reduced fonts for @acro in text (10pt).
2200 \def\reducednominalsize{10pt
}
2201 \setfont\reducedrm\rmshape{10}{1000}{OT1
}
2202 \setfont\reducedtt\ttshape{10}{1000}{OT1TT
}
2203 \setfont\reducedbf\bfshape{10}{1000}{OT1
}
2204 \setfont\reducedit\itshape{10}{1000}{OT1IT
}
2205 \setfont\reducedsl\slshape{10}{1000}{OT1
}
2206 \setfont\reducedsf\sfshape{10}{1000}{OT1
}
2207 \setfont\reducedsc\scshape{10}{1000}{OT1
}
2208 \setfont\reducedttsl\ttslshape{10}{1000}{OT1TT
}
2209 \font\reducedi=cmmi10
2210 \font\reducedsy=cmsy10
2211 \def\reducedecsize{1000}
2213 \textleading =
13.2pt
% line spacing for 11pt CM
2214 \textfonts % reset the current fonts
2216 } % end of 11pt text font size definitions, \definetextfontsizexi
2219 % Definitions to make the main text be 10pt Computer Modern, with
2220 % section, chapter, etc., sizes following suit. This is for the GNU
2221 % Press printing of the Emacs 22 manual. Maybe other manuals in the
2222 % future. Used with @smallbook, which sets the leading to 12pt.
2224 \def\definetextfontsizex{%
2225 % Text fonts (10pt).
2226 \def\textnominalsize{10pt
}
2227 \edef\mainmagstep{1000}
2228 \setfont\textrm\rmshape{10}{\mainmagstep}{OT1
}
2229 \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT
}
2230 \setfont\textbf\bfshape{10}{\mainmagstep}{OT1
}
2231 \setfont\textit\itshape{10}{\mainmagstep}{OT1IT
}
2232 \setfont\textsl\slshape{10}{\mainmagstep}{OT1
}
2233 \setfont\textsf\sfshape{10}{\mainmagstep}{OT1
}
2234 \setfont\textsc\scshape{10}{\mainmagstep}{OT1
}
2235 \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT
}
2236 \font\texti=cmmi10 scaled
\mainmagstep
2237 \font\textsy=cmsy10 scaled
\mainmagstep
2238 \def\textecsize{1000}
2240 % A few fonts for @defun names and args.
2241 \setfont\defbf\bfshape{10}{\magstephalf}{OT1
}
2242 \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT
}
2243 \setfont\defsl\slshape{10}{\magstephalf}{OT1TT
}
2244 \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT
}
2245 \def\df{\let\tentt=
\deftt \let\tenbf =
\defbf
2246 \let\tensl=
\defsl \let\tenttsl=
\defttsl \bf}
2248 % Fonts for indices, footnotes, small examples (9pt).
2249 \def\smallnominalsize{9pt
}
2250 \setfont\smallrm\rmshape{9}{1000}{OT1
}
2251 \setfont\smalltt\ttshape{9}{1000}{OT1TT
}
2252 \setfont\smallbf\bfshape{10}{900}{OT1
}
2253 \setfont\smallit\itshape{9}{1000}{OT1IT
}
2254 \setfont\smallsl\slshape{9}{1000}{OT1
}
2255 \setfont\smallsf\sfshape{9}{1000}{OT1
}
2256 \setfont\smallsc\scshape{10}{900}{OT1
}
2257 \setfont\smallttsl\ttslshape{10}{900}{OT1TT
}
2260 \def\smallecsize{0900}
2262 % Fonts for small examples (8pt).
2263 \def\smallernominalsize{8pt
}
2264 \setfont\smallerrm\rmshape{8}{1000}{OT1
}
2265 \setfont\smallertt\ttshape{8}{1000}{OT1TT
}
2266 \setfont\smallerbf\bfshape{10}{800}{OT1
}
2267 \setfont\smallerit\itshape{8}{1000}{OT1IT
}
2268 \setfont\smallersl\slshape{8}{1000}{OT1
}
2269 \setfont\smallersf\sfshape{8}{1000}{OT1
}
2270 \setfont\smallersc\scshape{10}{800}{OT1
}
2271 \setfont\smallerttsl\ttslshape{10}{800}{OT1TT
}
2272 \font\smalleri=cmmi8
2273 \font\smallersy=cmsy8
2274 \def\smallerecsize{0800}
2276 % Fonts for title page (20.4pt):
2277 \def\titlenominalsize{20pt
}
2278 \setfont\titlerm\rmbshape{12}{\magstep3}{OT1
}
2279 \setfont\titleit\itbshape{10}{\magstep4}{OT1IT
}
2280 \setfont\titlesl\slbshape{10}{\magstep4}{OT1
}
2281 \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT
}
2282 \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT
}
2283 \setfont\titlesf\sfbshape{17}{\magstep1}{OT1
}
2284 \let\titlebf=
\titlerm
2285 \setfont\titlesc\scbshape{10}{\magstep4}{OT1
}
2286 \font\titlei=cmmi12 scaled
\magstep3
2287 \font\titlesy=cmsy10 scaled
\magstep4
2288 \def\titleecsize{2074}
2290 % Chapter fonts (14.4pt).
2291 \def\chapnominalsize{14pt
}
2292 \setfont\chaprm\rmbshape{12}{\magstep1}{OT1
}
2293 \setfont\chapit\itbshape{10}{\magstep2}{OT1IT
}
2294 \setfont\chapsl\slbshape{10}{\magstep2}{OT1
}
2295 \setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT
}
2296 \setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT
}
2297 \setfont\chapsf\sfbshape{12}{\magstep1}{OT1
}
2299 \setfont\chapsc\scbshape{10}{\magstep2}{OT1
}
2300 \font\chapi=cmmi12 scaled
\magstep1
2301 \font\chapsy=cmsy10 scaled
\magstep2
2302 \def\chapecsize{1440}
2304 % Section fonts (12pt).
2305 \def\secnominalsize{12pt
}
2306 \setfont\secrm\rmbshape{12}{1000}{OT1
}
2307 \setfont\secit\itbshape{10}{\magstep1}{OT1IT
}
2308 \setfont\secsl\slbshape{10}{\magstep1}{OT1
}
2309 \setfont\sectt\ttbshape{12}{1000}{OT1TT
}
2310 \setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT
}
2311 \setfont\secsf\sfbshape{12}{1000}{OT1
}
2313 \setfont\secsc\scbshape{10}{\magstep1}{OT1
}
2315 \font\secsy=cmsy10 scaled
\magstep1
2316 \def\sececsize{1200}
2318 % Subsection fonts (10pt).
2319 \def\ssecnominalsize{10pt
}
2320 \setfont\ssecrm\rmbshape{10}{1000}{OT1
}
2321 \setfont\ssecit\itbshape{10}{1000}{OT1IT
}
2322 \setfont\ssecsl\slbshape{10}{1000}{OT1
}
2323 \setfont\ssectt\ttbshape{10}{1000}{OT1TT
}
2324 \setfont\ssecttsl\ttslshape{10}{1000}{OT1TT
}
2325 \setfont\ssecsf\sfbshape{10}{1000}{OT1
}
2327 \setfont\ssecsc\scbshape{10}{1000}{OT1
}
2330 \def\ssececsize{1000}
2332 % Reduced fonts for @acro in text (9pt).
2333 \def\reducednominalsize{9pt
}
2334 \setfont\reducedrm\rmshape{9}{1000}{OT1
}
2335 \setfont\reducedtt\ttshape{9}{1000}{OT1TT
}
2336 \setfont\reducedbf\bfshape{10}{900}{OT1
}
2337 \setfont\reducedit\itshape{9}{1000}{OT1IT
}
2338 \setfont\reducedsl\slshape{9}{1000}{OT1
}
2339 \setfont\reducedsf\sfshape{9}{1000}{OT1
}
2340 \setfont\reducedsc\scshape{10}{900}{OT1
}
2341 \setfont\reducedttsl\ttslshape{10}{900}{OT1TT
}
2342 \font\reducedi=cmmi9
2343 \font\reducedsy=cmsy9
2344 \def\reducedecsize{0900}
2346 \divide\parskip by
2 % reduce space between paragraphs
2347 \textleading =
12pt
% line spacing for 10pt CM
2348 \textfonts % reset the current fonts
2350 } % end of 10pt text font size definitions, \definetextfontsizex
2353 % We provide the user-level command
2355 % (or 11) to redefine the text font size. pt is assumed.
2361 \parseargdef\fonttextsize{%
2362 \def\textsizearg{#1}%
2363 %\wlog{doing @fonttextsize \textsizearg}%
2365 % Set \globaldefs so that documents can use this inside @tex, since
2366 % makeinfo 4.8 does not support it, but we need it nonetheless.
2368 \begingroup \globaldefs=
1
2369 \ifx\textsizearg\xword \definetextfontsizex
2370 \else \ifx\textsizearg\xiword \definetextfontsizexi
2373 \errmessage{@fonttextsize only supports `
10' or `
11', not `
\textsizearg'
}
2378 % In order for the font changes to affect most math symbols and letters,
2379 % we have to define the \textfont of the standard families. We don't
2380 % bother to reset \scriptfont and \scriptscriptfont; awaiting user need.
2382 \def\resetmathfonts{%
2383 \textfont0=
\tenrm \textfont1=
\teni \textfont2=
\tensy
2384 \textfont\itfam=
\tenit \textfont\slfam=
\tensl \textfont\bffam=
\tenbf
2385 \textfont\ttfam=
\tentt \textfont\sffam=
\tensf
2388 % The font-changing commands redefine the meanings of \tenSTYLE, instead
2389 % of just \STYLE. We do this because \STYLE needs to also set the
2390 % current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire
2391 % \tenSTYLE to set the current font.
2393 % Each font-changing command also sets the names \lsize (one size lower)
2394 % and \lllsize (three sizes lower). These relative commands are used
2395 % in, e.g., the LaTeX logo and acronyms.
2397 % This all needs generalizing, badly.
2400 \let\tenrm=
\textrm \let\tenit=
\textit \let\tensl=
\textsl
2401 \let\tenbf=
\textbf \let\tentt=
\texttt \let\smallcaps=
\textsc
2402 \let\tensf=
\textsf \let\teni=
\texti \let\tensy=
\textsy
2403 \let\tenttsl=
\textttsl
2404 \def\curfontsize{text
}%
2405 \def\lsize{reduced
}\def\lllsize{smaller
}%
2406 \resetmathfonts \setleading{\textleading}}
2408 \let\tenrm=
\titlerm \let\tenit=
\titleit \let\tensl=
\titlesl
2409 \let\tenbf=
\titlebf \let\tentt=
\titlett \let\smallcaps=
\titlesc
2410 \let\tensf=
\titlesf \let\teni=
\titlei \let\tensy=
\titlesy
2411 \let\tenttsl=
\titlettsl
2412 \def\curfontsize{title
}%
2413 \def\lsize{chap
}\def\lllsize{subsec
}%
2414 \resetmathfonts \setleading{27pt
}}
2415 \def\titlefont#1{{\titlefonts\rmisbold #1}}
2417 \let\tenrm=
\chaprm \let\tenit=
\chapit \let\tensl=
\chapsl
2418 \let\tenbf=
\chapbf \let\tentt=
\chaptt \let\smallcaps=
\chapsc
2419 \let\tensf=
\chapsf \let\teni=
\chapi \let\tensy=
\chapsy
2420 \let\tenttsl=
\chapttsl
2421 \def\curfontsize{chap
}%
2422 \def\lsize{sec
}\def\lllsize{text
}%
2423 \resetmathfonts \setleading{19pt
}}
2425 \let\tenrm=
\secrm \let\tenit=
\secit \let\tensl=
\secsl
2426 \let\tenbf=
\secbf \let\tentt=
\sectt \let\smallcaps=
\secsc
2427 \let\tensf=
\secsf \let\teni=
\seci \let\tensy=
\secsy
2428 \let\tenttsl=
\secttsl
2429 \def\curfontsize{sec
}%
2430 \def\lsize{subsec
}\def\lllsize{reduced
}%
2431 \resetmathfonts \setleading{17pt
}}
2433 \let\tenrm=
\ssecrm \let\tenit=
\ssecit \let\tensl=
\ssecsl
2434 \let\tenbf=
\ssecbf \let\tentt=
\ssectt \let\smallcaps=
\ssecsc
2435 \let\tensf=
\ssecsf \let\teni=
\sseci \let\tensy=
\ssecsy
2436 \let\tenttsl=
\ssecttsl
2437 \def\curfontsize{ssec
}%
2438 \def\lsize{text
}\def\lllsize{small
}%
2439 \resetmathfonts \setleading{15pt
}}
2440 \let\subsubsecfonts =
\subsecfonts
2442 \let\tenrm=
\reducedrm \let\tenit=
\reducedit \let\tensl=
\reducedsl
2443 \let\tenbf=
\reducedbf \let\tentt=
\reducedtt \let\reducedcaps=
\reducedsc
2444 \let\tensf=
\reducedsf \let\teni=
\reducedi \let\tensy=
\reducedsy
2445 \let\tenttsl=
\reducedttsl
2446 \def\curfontsize{reduced
}%
2447 \def\lsize{small
}\def\lllsize{smaller
}%
2448 \resetmathfonts \setleading{10.5pt
}}
2450 \let\tenrm=
\smallrm \let\tenit=
\smallit \let\tensl=
\smallsl
2451 \let\tenbf=
\smallbf \let\tentt=
\smalltt \let\smallcaps=
\smallsc
2452 \let\tensf=
\smallsf \let\teni=
\smalli \let\tensy=
\smallsy
2453 \let\tenttsl=
\smallttsl
2454 \def\curfontsize{small
}%
2455 \def\lsize{smaller
}\def\lllsize{smaller
}%
2456 \resetmathfonts \setleading{10.5pt
}}
2458 \let\tenrm=
\smallerrm \let\tenit=
\smallerit \let\tensl=
\smallersl
2459 \let\tenbf=
\smallerbf \let\tentt=
\smallertt \let\smallcaps=
\smallersc
2460 \let\tensf=
\smallersf \let\teni=
\smalleri \let\tensy=
\smallersy
2461 \let\tenttsl=
\smallerttsl
2462 \def\curfontsize{smaller
}%
2463 \def\lsize{smaller
}\def\lllsize{smaller
}%
2464 \resetmathfonts \setleading{9.5pt
}}
2466 % Fonts for short table of contents.
2467 \setfont\shortcontrm\rmshape{12}{1000}{OT1
}
2468 \setfont\shortcontbf\bfshape{10}{\magstep1}{OT1
} % no cmb12
2469 \setfont\shortcontsl\slshape{12}{1000}{OT1
}
2470 \setfont\shortconttt\ttshape{12}{1000}{OT1TT
}
2472 % Define these just so they can be easily changed for other fonts.
2473 \def\angleleft{$
\langle$
}
2474 \def\angleright{$
\rangle$
}
2476 % Set the fonts to use with the @small... environments.
2477 \let\smallexamplefonts =
\smallfonts
2479 % About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample
2480 % can fit this many characters:
2481 % 8.5x11=86 smallbook=72 a4=90 a5=69
2482 % If we use \scriptfonts (8pt), then we can fit this many characters:
2483 % 8.5x11=90+ smallbook=80 a4=90+ a5=77
2484 % For me, subjectively, the few extra characters that fit aren't worth
2485 % the additional smallness of 8pt. So I'm making the default 9pt.
2487 % By the way, for comparison, here's what fits with @example (10pt):
2488 % 8.5x11=71 smallbook=60 a4=75 a5=58
2491 % Set up the default fonts, so we can use them for creating boxes.
2493 \definetextfontsizexi
2498 % Check if we are currently using a typewriter font. Since all the
2499 % Computer Modern typewriter fonts have zero interword stretch (and
2500 % shrink), and it is reasonable to expect all typewriter fonts to have
2501 % this property, we can check that font parameter.
2503 \def\ifmonospace{\ifdim\fontdimen3\font=
0pt
}
2505 % Markup style infrastructure. \defmarkupstylesetup\INITMACRO will
2506 % define and register \INITMACRO to be called on markup style changes.
2507 % \INITMACRO can check \currentmarkupstyle for the innermost
2508 % style and the set of \ifmarkupSTYLE switches for all styles
2509 % currently in effect.
2513 %\newif\ifmarkupfile % @file == @samp.
2514 %\newif\ifmarkupoption % @option == @samp.
2517 %\newif\ifmarkupenv % @env == @code.
2518 %\newif\ifmarkupcommand % @command == @code.
2519 \newif\ifmarkuptex % @tex (and part of @math, for now).
2520 \newif\ifmarkupexample
2522 \newif\ifmarkupverbatim
2524 \let\currentmarkupstyle\empty
2526 \def\setupmarkupstyle#1{%
2527 \csname markup
#1true
\endcsname
2528 \def\currentmarkupstyle{#1}%
2532 \let\markupstylesetup\empty
2534 \def\defmarkupstylesetup#1{%
2535 \expandafter\def\expandafter\markupstylesetup
2536 \expandafter{\markupstylesetup #1}%
2540 % Markup style setup for left and right quotes.
2541 \defmarkupstylesetup\markupsetuplq{%
2542 \expandafter\let\expandafter \temp
2543 \csname markupsetuplq
\currentmarkupstyle\endcsname
2544 \ifx\temp\relax \markupsetuplqdefault \else \temp \fi
2547 \defmarkupstylesetup\markupsetuprq{%
2548 \expandafter\let\expandafter \temp
2549 \csname markupsetuprq
\currentmarkupstyle\endcsname
2550 \ifx\temp\relax \markupsetuprqdefault \else \temp \fi
2557 \gdef\markupsetuplqdefault{\let`
\lq}
2558 \gdef\markupsetuprqdefault{\let'
\rq}
2560 \gdef\markupsetcodequoteleft{\let`
\codequoteleft}
2561 \gdef\markupsetcodequoteright{\let'
\codequoteright}
2564 \let\markupsetuplqcode \markupsetcodequoteleft
2565 \let\markupsetuprqcode \markupsetcodequoteright
2567 \let\markupsetuplqexample \markupsetcodequoteleft
2568 \let\markupsetuprqexample \markupsetcodequoteright
2570 \let\markupsetuplqkbd \markupsetcodequoteleft
2571 \let\markupsetuprqkbd \markupsetcodequoteright
2573 \let\markupsetuplqsamp \markupsetcodequoteleft
2574 \let\markupsetuprqsamp \markupsetcodequoteright
2576 \let\markupsetuplqverb \markupsetcodequoteleft
2577 \let\markupsetuprqverb \markupsetcodequoteright
2579 \let\markupsetuplqverbatim \markupsetcodequoteleft
2580 \let\markupsetuprqverbatim \markupsetcodequoteright
2582 % Allow an option to not use regular directed right quote/apostrophe
2583 % (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
2584 % The undirected quote is ugly, so don't make it the default, but it
2585 % works for pasting with more pdf viewers (at least evince), the
2586 % lilypond developers report. xpdf does work with the regular 0x27.
2588 \def\codequoteright{%
2589 \expandafter\ifx\csname SETtxicodequoteundirected
\endcsname\relax
2590 \expandafter\ifx\csname SETcodequoteundirected
\endcsname\relax
2596 % and a similar option for the left quote char vs. a grave accent.
2597 % Modern fonts display ASCII 0x60 as a grave accent, so some people like
2598 % the code environments to do likewise.
2600 \def\codequoteleft{%
2601 \expandafter\ifx\csname SETtxicodequotebacktick
\endcsname\relax
2602 \expandafter\ifx\csname SETcodequotebacktick
\endcsname\relax
2603 % [Knuth] pp. 380,381,391
2604 % \relax disables Spanish ligatures ?` and !` of \tt font.
2610 % Commands to set the quote options.
2612 \parseargdef\codequoteundirected{%
2615 \expandafter\let\csname SETtxicodequoteundirected
\endcsname
2617 \else\ifx\temp\offword
2618 \expandafter\let\csname SETtxicodequoteundirected
\endcsname
2621 \errhelp =
\EMsimple
2622 \errmessage{Unknown @codequoteundirected value `
\temp', must be on|off
}%
2626 \parseargdef\codequotebacktick{%
2629 \expandafter\let\csname SETtxicodequotebacktick
\endcsname
2631 \else\ifx\temp\offword
2632 \expandafter\let\csname SETtxicodequotebacktick
\endcsname
2635 \errhelp =
\EMsimple
2636 \errmessage{Unknown @codequotebacktick value `
\temp', must be on|off
}%
2640 % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
2641 \def\noligaturesquoteleft{\relax\lq}
2643 % Count depth in font-changes, for error checks
2644 \newcount\fontdepth \fontdepth=
0
2648 % #1 is the font command (\sl or \it), #2 is the text to slant.
2649 % If we are in a monospaced environment, however, 1) always use \ttsl,
2650 % and 2) do not add an italic correction.
2651 \def\dosmartslant#1#2{%
2653 {{\ttsl #2}\let\next=
\relax}%
2654 {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}%
2657 \def\smartslanted{\dosmartslant\sl}
2658 \def\smartitalic{\dosmartslant\it}
2660 % Output an italic correction unless \next (presumed to be the following
2661 % character) is such as not to need one.
2662 \def\smartitaliccorrection{%
2667 \else\ifx\next\comma%
2673 % Unconditional use \ttsl, and no ic. @var is set to this for defuns.
2674 \def\ttslanted#1{{\ttsl #1}}
2676 % @cite is like \smartslanted except unconditionally use \sl. We never want
2677 % ttsl for book titles, do we?
2678 \def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection}
2682 \let\saveaftersmartic =
\aftersmartic
2683 \def\aftersmartic{\null\let\aftersmartic=
\saveaftersmartic}%
2688 \let\slanted=
\smartslanted
2689 \let\dfn=
\smartslanted
2690 \let\emph=
\smartitalic
2692 % Explicit font changes: @r, @sc, undocumented @ii.
2693 \def\r#1{{\rm #1}} % roman font
2694 \def\sc#1{{\smallcaps#1}} % smallcaps font
2695 \def\ii#1{{\it #1}} % italic font
2697 % @b, explicit bold. Also @strong.
2701 % @sansserif, explicit sans.
2702 \def\sansserif#1{{\sf #1}}
2704 % We can't just use \exhyphenpenalty, because that only has effect at
2705 % the end of a paragraph. Restore normal hyphenation at the end of the
2706 % group within which \nohyphenation is presumably called.
2708 \def\nohyphenation{\hyphenchar\font = -
1 \aftergroup\restorehyphenation}
2709 \def\restorehyphenation{\hyphenchar\font = `-
}
2711 % Set sfcode to normal for the chars that usually have another value.
2712 % Can't use plain's \frenchspacing because it uses the `\x notation, and
2713 % sometimes \x has an active definition that messes things up.
2716 \def\plainfrenchspacing{%
2717 \sfcode`\.=\@m
\sfcode`\?=\@m
\sfcode`\!=\@m
2718 \sfcode`\:=\@m
\sfcode`\;=\@m
\sfcode`\,=\@m
2719 \def\endofsentencespacefactor{1000}% for @. and friends
2721 \def\plainnonfrenchspacing{%
2722 \sfcode`\
.3000\sfcode`\?
3000\sfcode`\!
3000
2723 \sfcode`\:
2000\sfcode`\;
1500\sfcode`\,
1250
2724 \def\endofsentencespacefactor{3000}% for @. and friends
2727 \def\endofsentencespacefactor{3000}% default
2729 % @t, explicit typewriter.
2731 {\tt \rawbackslash \plainfrenchspacing #1}%
2736 \def\samp#1{{\setupmarkupstyle{samp
}\lq\tclose{#1}\rq\null}}
2738 % @indicateurl is \samp, that is, with quotes.
2739 \let\indicateurl=
\samp
2741 % @code (and similar) prints in typewriter, but with spaces the same
2742 % size as normal in the surrounding text, without hyphenation, etc.
2743 % This is a subroutine for that.
2746 % Change normal interword space to be same as for the current font.
2747 \spaceskip =
\fontdimen2\font
2749 % Switch to typewriter.
2752 % But `\ ' produces the large typewriter interword space.
2753 \def\
{{\spaceskip =
0pt
{} }}%
2755 % Turn off hyphenation.
2762 \null % reset spacefactor to 1000
2765 % We *must* turn on hyphenation at `-' and `_' in @code.
2766 % (But see \codedashfinish below.)
2767 % Otherwise, it is too hard to avoid overfull hboxes
2768 % in the Emacs manual, the Library manual, etc.
2770 % Unfortunately, TeX uses one parameter (\hyphenchar) to control
2771 % both hyphenation at - and hyphenation within words.
2772 % We must therefore turn them both off (\tclose does that)
2773 % and arrange explicitly to hyphenate at a dash. -- rms.
2775 \catcode`\-=
\active \catcode`
\_=
\active
2776 \catcode`\'=
\active \catcode`\`=
\active
2777 \global\let'=
\rq \global\let`=
\lq % default definitions
2779 \global\def\code{\begingroup
2780 \setupmarkupstyle{code
}%
2781 % The following should really be moved into \setupmarkupstyle handlers.
2782 \catcode\dashChar=
\active \catcode\underChar=
\active
2790 % Given -foo (with a single dash), we do not want to allow a break
2792 \global\let\codedashprev=
\codedash
2797 \gdef\codedash{\futurelet\next\codedashfinish}
2798 \gdef\codedashfinish{%
2799 \normaldash % always output the dash character itself.
2801 % Now, output a discretionary to allow a line break, unless
2802 % (a) the next character is a -, or
2803 % (b) the preceding character is a -.
2804 % E.g., given --posix, we do not want to allow a break after either -.
2805 % Given --foo-bar, we do want to allow a break between the - and the b.
2806 \ifx\next\codedash \else
2807 \ifx\codedashprev\codedash
2808 \else \discretionary{}{}{}\fi
2810 % we need the space after the = for the case when \next itself is a
2811 % space token; it would get swallowed otherwise. As in @code{- a}.
2812 \global\let\codedashprev=
\next
2817 \def\codex #1{\tclose{#1}\endgroup}
2820 % this is all so @math{@code{var_name}+1} can work. In math mode, _
2821 % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
2822 % will therefore expand the active definition of _, which is us
2823 % (inside @code that is), therefore an endless loop.
2825 \mathchar"
075F
% class 0=ordinary, family 7=ttfam, pos 0x5F=_.
2826 \else\normalunderscore \fi
2827 \discretionary{}{}{}}%
2831 % An additional complication: the above will allow breaks after, e.g.,
2832 % each of the four underscores in __typeof__. This is bad.
2833 % @allowcodebreaks provides a document-level way to turn breaking at -
2836 \newif\ifallowcodebreaks \allowcodebreakstrue
2838 \def\keywordtrue{true
}
2839 \def\keywordfalse{false
}
2841 \parseargdef\allowcodebreaks{%
2843 \ifx\txiarg\keywordtrue
2844 \allowcodebreakstrue
2845 \else\ifx\txiarg\keywordfalse
2846 \allowcodebreaksfalse
2848 \errhelp =
\EMsimple
2849 \errmessage{Unknown @allowcodebreaks option `
\txiarg', must be true|false
}%
2853 % For @command, @env, @file, @option quotes seem unnecessary,
2854 % so use \code rather than \samp.
2860 % @uref (abbreviation for `urlref') aka @url takes an optional
2861 % (comma-separated) second argument specifying the text to display and
2862 % an optional third arg as text to display instead of (rather than in
2863 % addition to) the url itself. First (mandatory) arg is the url.
2865 % TeX-only option to allow changing PDF output to show only the second
2866 % arg (if given), and not the url (which is then just the link target).
2867 \newif\ifurefurlonlylink
2869 % The main macro is \urefbreak, which allows breaking at expected
2870 % places within the url. (There used to be another version, which
2871 % didn't support automatic breaking.)
2872 \def\urefbreak{\begingroup \urefcatcodes \dourefbreak}
2873 \let\uref=
\urefbreak
2875 \def\dourefbreak#1{\urefbreakfinish #1,,,
\finish}
2876 \def\urefbreakfinish#1,
#2,
#3,
#4\finish{% doesn't work in @example
2879 \setbox0 =
\hbox{\ignorespaces #3}%
2881 \unhbox0 % third arg given, show only that
2883 \setbox0 =
\hbox{\ignorespaces #2}% look for second arg
2886 % For pdfTeX and LuaTeX
2888 % PDF plus option to not display url, show just arg
2891 % PDF, normally display both arg and url for consistency,
2892 % visibility, if the pdf is eventually used to print, etc.
2893 \unhbox0\ (
\urefcode{#1})
%
2896 \ifx\XeTeXrevision\thisisundefined
2897 \unhbox0\ (
\urefcode{#1})
% DVI, always show arg and url
2901 % PDF plus option to not display url, show just arg
2904 % PDF, normally display both arg and url for consistency,
2905 % visibility, if the pdf is eventually used to print, etc.
2906 \unhbox0\ (
\urefcode{#1})
%
2911 \urefcode{#1}% only url given, so show it
2917 % Allow line breaks around only a few characters (only).
2919 \catcode`\&=
\active \catcode`\.=
\active
2920 \catcode`\#=
\active \catcode`\?=
\active
2926 \global\def\urefcode{\begingroup
2927 \setupmarkupstyle{code
}%
2937 % By default, they are just regular characters.
2938 \global\def&
{\normalamp}
2939 \global\def.
{\normaldot}
2940 \global\def#
{\normalhash}
2941 \global\def?
{\normalquest}
2942 \global\def/
{\normalslash}
2945 % we put a little stretch before and after the breakable chars, to help
2946 % line breaking of long url's. The unequal skips make look better in
2947 % cmtt at least, especially for dots.
2948 \def\urefprestretchamount{.13em
}
2949 \def\urefpoststretchamount{.1em
}
2950 \def\urefprestretch{\urefprebreak \hskip0pt plus
\urefprestretchamount\relax}
2951 \def\urefpoststretch{\urefpostbreak \hskip0pt plus
\urefprestretchamount\relax}
2953 \def\urefcodeamp{\urefprestretch \&
\urefpoststretch}
2954 \def\urefcodedot{\urefprestretch .
\urefpoststretch}
2955 \def\urefcodehash{\urefprestretch \#
\urefpoststretch}
2956 \def\urefcodequest{\urefprestretch ?
\urefpoststretch}
2957 \def\urefcodeslash{\futurelet\next\urefcodeslashfinish}
2960 \global\def\urefcodeslashfinish{%
2961 \urefprestretch \slashChar
2962 % Allow line break only after the final / in a sequence of
2963 % slashes, to avoid line break between the slashes in http://.
2964 \ifx\next/
\else \urefpoststretch \fi
2968 % One more complication: by default we'll break after the special
2969 % characters, but some people like to break before the special chars, so
2970 % allow that. Also allow no breaking at all, for manual control.
2972 \parseargdef\urefbreakstyle{%
2974 \ifx\txiarg\wordnone
2975 \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak}
2976 \else\ifx\txiarg\wordbefore
2977 \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak}
2978 \else\ifx\txiarg\wordafter
2979 \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak}
2981 \errhelp =
\EMsimple
2982 \errmessage{Unknown @urefbreakstyle setting `
\txiarg'
}%
2985 \def\wordafter{after
}
2986 \def\wordbefore{before
}
2989 \urefbreakstyle after
2991 % @url synonym for @uref, since that's how everyone uses it.
2995 % rms does not like angle brackets --karl, 17may97.
2996 % So now @email is just like @uref, unless we are pdf.
2998 %\def\email#1{\angleleft{\tt #1}\angleright}
3000 \def\email#1{\doemail#1,,
\finish}
3001 \def\doemail#1,
#2,
#3\finish{\begingroup
3004 \setbox0 =
\hbox{\ignorespaces #2}%
3005 \ifdim\wd0>
0pt
\unhbox0\else\code{#1}\fi
3009 \ifx\XeTeXrevision\thisisundefined
3012 \def\email#1{\doemail#1,,
\finish}
3013 \def\doemail#1,
#2,
#3\finish{\begingroup
3016 \setbox0 =
\hbox{\ignorespaces #2}%
3017 \ifdim\wd0>
0pt
\unhbox0\else\code{#1}\fi
3023 % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
3024 % `example' (@kbd uses ttsl only inside of @example and friends),
3025 % or `code' (@kbd uses normal tty font always).
3026 \parseargdef\kbdinputstyle{%
3028 \ifx\txiarg\worddistinct
3029 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
3030 \else\ifx\txiarg\wordexample
3031 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
3032 \else\ifx\txiarg\wordcode
3033 \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
3035 \errhelp =
\EMsimple
3036 \errmessage{Unknown @kbdinputstyle setting `
\txiarg'
}%
3039 \def\worddistinct{distinct
}
3040 \def\wordexample{example
}
3043 % Default is `distinct'.
3044 \kbdinputstyle distinct
3046 % @kbd is like @code, except that if the argument is just one @key command,
3047 % then @kbd has no effect.
3048 \def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??
\par}}
3051 \def\kbdsub#1#2#3\par{%
3052 \def\one{#1}\def\three{#3}\def\threex{??
}%
3053 \ifx\one\xkey\ifx\threex\three \key{#2}%
3054 \else{\tclose{\kbdfont\setupmarkupstyle{kbd
}\look}}\fi
3055 \else{\tclose{\kbdfont\setupmarkupstyle{kbd
}\look}}\fi
3058 % definition of @key that produces a lozenge. Doesn't adjust to text size.
3059 %\setfont\keyrm\rmshape{8}{1000}{OT1}
3061 %\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
3062 % \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
3063 % \vbox{\hrule\kern-0.4pt
3064 % \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
3065 % \kern-0.4pt\hrule}%
3066 % \kern-.06em\raise0.4pt\hbox{\angleright}}}}
3068 % definition of @key with no lozenge. If the current font is already
3069 % monospace, don't change it; that way, we respect @kbdinputstyle. But
3070 % if it isn't monospace, then use \tt.
3072 \def\key#1{{\setupmarkupstyle{key
}%
3074 \ifmonospace\else\tt\fi
3077 % @clicksequence{File @click{} Open ...}
3078 \def\clicksequence#1{\begingroup #1\endgroup}
3080 % @clickstyle @arrow (by default)
3081 \parseargdef\clickstyle{\def\click{#1}}
3084 % Typeset a dimension, e.g., `in' or `pt'. The only reason for the
3085 % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
3087 \def\dmn#1{\thinspace #1}
3089 % @acronym for "FBI", "NATO", and the like.
3090 % We print this one point size smaller, since it's intended for
3093 \def\acronym#1{\doacronym #1,,
\finish}
3094 \def\doacronym#1,
#2,
#3\finish{%
3095 {\selectfonts\lsize #1}%
3097 \ifx\temp\empty \else
3098 \space (
{\unsepspaces \ignorespaces \temp \unskip})
%
3100 \null % reset \spacefactor=1000
3103 % @abbr for "Comput. J." and the like.
3104 % No font change, but don't do end-of-sentence spacing.
3106 \def\abbr#1{\doabbr #1,,
\finish}
3107 \def\doabbr#1,
#2,
#3\finish{%
3108 {\plainfrenchspacing #1}%
3110 \ifx\temp\empty \else
3111 \space (
{\unsepspaces \ignorespaces \temp \unskip})
%
3113 \null % reset \spacefactor=1000
3116 % @asis just yields its argument. Used with @table, for example.
3120 % @math outputs its argument in math mode.
3122 % One complication: _ usually means subscripts, but it could also mean
3123 % an actual _ character, as in @math{@var{some_variable} + 1}. So make
3124 % _ active, and distinguish by seeing if the current family is \slfam,
3125 % which is what @var uses.
3127 \catcode`
\_ =
\active
3128 \gdef\mathunderscore{%
3130 \def_{\ifnum\fam=
\slfam \_\else\sb\fi}%
3133 % Another complication: we want \\ (and @\) to output a math (or tt) \.
3134 % FYI, plain.tex uses \\ as a temporary control sequence (for no
3135 % particular reason), but this is not advertised and we don't care.
3137 % The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
3138 \def\mathbackslash{\ifnum\fam=
\ttfam \mathchar"
075C
\else\backslash \fi}
3141 \ifmmode\else % only go into math if not in math mode already
3144 \let\\ =
\mathbackslash
3146 % make the texinfo accent commands work in math mode
3156 % have to provide another name for sup operator
3158 $
\expandafter\finishmath\fi
3160 \def\finishmath#1{#1$
\endgroup} % Close the group opened by \tex.
3162 % Some active characters (such as <) are spaced differently in math.
3163 % We have to reset their definitions in case the @math was an argument
3164 % to a command which sets the catcodes (such as @item or @section).
3167 \catcode`^ =
\active
3168 \catcode`< =
\active
3169 \catcode`> =
\active
3170 \catcode`+ =
\active
3171 \catcode`' =
\active
3177 \let' =
\ptexquoteright
3181 % for @sub and @sup, if in math mode, just do a normal sub/superscript.
3182 % If in text, use math to place as sub/superscript, but switch
3183 % into text mode, with smaller fonts. This is a different font than the
3184 % one used for real math sub/superscripts (8pt vs. 7pt), but let's not
3185 % fix it (significant additions to font machinery) until someone notices.
3187 \def\sub{\ifmmode \expandafter\sb \else \expandafter\finishsub\fi}
3188 \def\finishsub#1{$
\sb{\hbox{\selectfonts\lllsize #1}}$
}%
3190 \def\sup{\ifmmode \expandafter\ptexsp \else \expandafter\finishsup\fi}
3191 \def\finishsup#1{$
\ptexsp{\hbox{\selectfonts\lllsize #1}}$
}%
3193 % @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
3194 % Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
3195 % except specified as a normal braced arg, so no newlines to worry about.
3197 \def\outfmtnametex{tex
}
3199 \long\def\inlinefmt#1{\doinlinefmt #1,
\finish}
3200 \long\def\doinlinefmt#1,
#2,
\finish{%
3201 \def\inlinefmtname{#1}%
3202 \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi
3205 % @inlinefmtifelse{FMTNAME,THEN-TEXT,ELSE-TEXT} expands THEN-TEXT if
3206 % FMTNAME is tex, else ELSE-TEXT.
3207 \long\def\inlinefmtifelse#1{\doinlinefmtifelse #1,,,
\finish}
3208 \long\def\doinlinefmtifelse#1,
#2,
#3,
#4,
\finish{%
3209 \def\inlinefmtname{#1}%
3210 \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\else \ignorespaces #3\fi
3213 % For raw, must switch into @tex before parsing the argument, to avoid
3214 % setting catcodes prematurely. Doing it this way means that, for
3215 % example, @inlineraw{html, foo{bar} gets a parse error instead of being
3216 % ignored. But this isn't important because if people want a literal
3217 % *right* brace they would have to use a command anyway, so they may as
3218 % well use a command to get a left brace too. We could re-use the
3219 % delimiter character idea from \verb, but it seems like overkill.
3221 \long\def\inlineraw{\tex \doinlineraw}
3222 \long\def\doinlineraw#1{\doinlinerawtwo #1,
\finish}
3223 \def\doinlinerawtwo#1,
#2,
\finish{%
3224 \def\inlinerawname{#1}%
3225 \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi
3226 \endgroup % close group opened by \tex.
3229 % @inlineifset{VAR, TEXT} expands TEXT if VAR is @set.
3231 \long\def\inlineifset#1{\doinlineifset #1,
\finish}
3232 \long\def\doinlineifset#1,
#2,
\finish{%
3233 \def\inlinevarname{#1}%
3234 \expandafter\ifx\csname SET
\inlinevarname\endcsname\relax
3235 \else\ignorespaces#2\fi
3238 % @inlineifclear{VAR, TEXT} expands TEXT if VAR is not @set.
3240 \long\def\inlineifclear#1{\doinlineifclear #1,
\finish}
3241 \long\def\doinlineifclear#1,
#2,
\finish{%
3242 \def\inlinevarname{#1}%
3243 \expandafter\ifx\csname SET
\inlinevarname\endcsname\relax \ignorespaces#2\fi
3250 % @@ prints an @, as does @atchar{}.
3254 % @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
3255 % Unless we're in typewriter, use \ecfont because the CM text fonts do
3256 % not have braces, and we don't want to switch into math.
3257 \def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}}
3258 \def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}}
3259 \let\
{=
\mylbrace \let\lbracechar=\
{
3260 \let\
}=
\myrbrace \let\rbracechar=\
}
3262 % Definitions to produce \{ and \} commands for indices,
3263 % and @{ and @} for the aux/toc files.
3264 \catcode`\
{ =
\other \catcode`\
} =
\other
3265 \catcode`\
[ =
1 \catcode`\
] =
2
3266 \catcode`\! =
0 \catcode`\\ =
\other
3267 !gdef!lbracecmd
[\
{]%
3268 !gdef!rbracecmd
[\
}]%
3269 !gdef!lbraceatcmd
[@
{]%
3270 !gdef!rbraceatcmd
[@
}]%
3273 % @comma{} to avoid , parsing problems.
3276 % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
3277 % Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
3279 \let\dotaccent =
\ptexdot
3280 \def\ringaccent#1{{\accent23 #1}}
3281 \let\tieaccent =
\ptext
3282 \let\ubaraccent =
\ptexb
3283 \let\udotaccent =
\d
3285 % Other special characters: @questiondown @exclamdown @ordf @ordm
3286 % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
3287 \def\questiondown{?`
}
3289 \def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a
}}}
3290 \def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o
}}}
3292 % Dotless i and dotless j, used for accents.
3297 \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
3298 \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
3299 \else \errmessage{@dotless can be used only with i or j
}%
3303 % The \TeX{} logo, as in plain, but resetting the spacing so that a
3304 % period following counts as ending a sentence. (Idea found in latex.)
3306 \edef\TeX{\TeX \spacefactor=
1000 }
3308 % @LaTeX{} logo. Not quite the same results as the definition in
3309 % latex.ltx, since we use a different font for the raised A; it's most
3310 % convenient for us to use an explicitly smaller font, rather than using
3311 % the \scriptstyle font (since we don't reset \scriptstyle and
3312 % \scriptscriptstyle).
3317 \vbox to
\ht0{\hbox{%
3318 \ifx\textnominalsize\xwordpt
3319 % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX.
3320 % Revert to plain's \scriptsize, which is 7pt.
3321 \count255=
\the\fam $
\fam\count255 \scriptstyle A$
%
3323 % For 11pt, we can use our lllsize.
3324 \selectfonts\lllsize A
%
3333 % Some math mode symbols. Define \ensuremath to switch into math mode
3334 % unless we are already there. Expansion tricks may not be needed here,
3335 % but safer, and can't hurt.
3336 \def\ensuremath{\ifmmode \expandafter\asis \else\expandafter\ensuredmath \fi}
3337 \def\ensuredmath#1{$
\relax#1$
}
3339 \def\bullet{\ensuremath\ptexbullet}
3340 \def\geq{\ensuremath\ge}
3341 \def\leq{\ensuremath\le}
3342 \def\minus{\ensuremath-
}
3344 % @dots{} outputs an ellipsis using the current font.
3345 % We do .5em per period so that it has the same spacing in the cm
3346 % typewriter fonts as three actual period characters; on the other hand,
3347 % in other typewriter fonts three periods are wider than 1.5em. So do
3348 % whichever is larger.
3352 \setbox0=
\hbox{...
}% get width of three periods
3359 \hskip 0pt plus
.25fil
3360 .
\hskip 0pt plus1fil
3361 .
\hskip 0pt plus1fil
3362 .
\hskip 0pt plus
.5fil
3366 % @enddots{} is an end-of-sentence ellipsis.
3370 \spacefactor=
\endofsentencespacefactor
3373 % @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
3375 % Since these characters are used in examples, they should be an even number of
3376 % \tt widths. Each \tt character is 1en, so two makes it 1em.
3379 \def\arrow{\leavevmode\raise.05ex
\hbox to
1em
{\hfil$
\rightarrow$
\hfil}}
3380 \def\result{\leavevmode\raise.05ex
\hbox to
1em
{\hfil$
\Rightarrow$
\hfil}}
3381 \def\expansion{\leavevmode\hbox to
1em
{\hfil$
\mapsto$
\hfil}}
3382 \def\print{\leavevmode\lower.1ex
\hbox to
1em
{\hfil$
\dashv$
\hfil}}
3383 \def\equiv{\leavevmode\hbox to
1em
{\hfil$
\ptexequiv$
\hfil}}
3385 % The @error{} command.
3386 % Adapted from the TeXbook's \boxit.
3390 {\tentt \global\dimen0 =
3em
}% Width of the box.
3391 \dimen2 =
.55pt
% Thickness of rules
3392 % The text. (`r' is open on the right, `e' somewhat less so on the left.)
3393 \setbox0 =
\hbox{\kern-
.75pt
\reducedsf \putworderror\kern-
1.5pt
}
3395 \setbox\errorbox=
\hbox to
\dimen0{\hfil
3396 \hsize =
\dimen0 \advance\hsize by -
5.8pt
% Space to left+right.
3397 \advance\hsize by -
2\dimen2 % Rules.
3399 \hrule height
\dimen2
3400 \hbox{\vrule width
\dimen2 \kern3pt % Space to left of text.
3401 \vtop{\kern2.4pt
\box0 \kern2.4pt
}% Space above/below.
3402 \kern3pt\vrule width
\dimen2}% Space to right.
3403 \hrule height
\dimen2}
3406 \def\error{\leavevmode\lower.7ex
\copy\errorbox}
3408 % @pounds{} is a sterling sign, which Knuth put in the CM italic font.
3410 \def\pounds{{\it\$
}}
3412 % @euro{} comes from a separate font, depending on the current style.
3413 % We use the free feym* fonts from the eurosym package by Henrik
3414 % Theiling, which support regular, slanted, bold and bold slanted (and
3415 % "outlined" (blackboard board, sort of) versions, which we don't need).
3416 % It is available from http://www.ctan.org/tex-archive/fonts/eurosym.
3418 % Although only regular is the truly official Euro symbol, we ignore
3419 % that. The Euro is designed to be slightly taller than the regular
3425 % feybo - bold slanted
3427 % There is no good (free) typewriter version, to my knowledge.
3428 % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide.
3431 % Also doesn't work in math. Do we need to do math with euro symbols?
3435 \def\euro{{\eurofont e
}}
3437 % We set the font at each command, rather than predefining it in
3438 % \textfonts and the other font-switching commands, so that
3439 % installations which never need the symbol don't have to have the
3442 % There is only one designed size (nominal 10pt), so we always scale
3443 % that to the current nominal size.
3445 % By the way, simply using "at 1em" works for cmr10 and the like, but
3446 % does not work for cmbx10 and other extended/shrunken fonts.
3448 \def\eurosize{\csname\curfontsize nominalsize
\endcsname}%
3450 \ifx\curfontstyle\bfstylename
3452 \font\thiseurofont =
\ifusingit{feybo10
}{feybr10
} at
\eurosize
3455 \font\thiseurofont =
\ifusingit{feymo10
}{feymr10
} at
\eurosize
3460 % Glyphs from the EC fonts. We don't use \let for the aliases, because
3461 % sometimes we redefine the original macro, and the alias should reflect
3464 % Use LaTeX names for the Icelandic letters.
3465 \def\DH{{\ecfont \char"D0
}} % Eth
3466 \def\dh{{\ecfont \char"F0
}} % eth
3467 \def\TH{{\ecfont \char"DE
}} % Thorn
3468 \def\th{{\ecfont \char"FE
}} % thorn
3470 \def\guillemetleft{{\ecfont \char"
13}}
3471 \def\guillemotleft{\guillemetleft}
3472 \def\guillemetright{{\ecfont \char"
14}}
3473 \def\guillemotright{\guillemetright}
3474 \def\guilsinglleft{{\ecfont \char"
0E
}}
3475 \def\guilsinglright{{\ecfont \char"
0F
}}
3476 \def\quotedblbase{{\ecfont \char"
12}}
3477 \def\quotesinglbase{{\ecfont \char"
0D
}}
3479 % This positioning is not perfect (see the ogonek LaTeX package), but
3480 % we have the precomposed glyphs for the most common cases. We put the
3481 % tests to use those glyphs in the single \ogonek macro so we have fewer
3482 % dummy definitions to worry about for index entries, etc.
3484 % ogonek is also used with other letters in Lithuanian (IOU), but using
3485 % the precomposed glyphs for those is not so easy since they aren't in
3489 \ifx\temp\macrocharA\Aogonek
3490 \else\ifx\temp\macrochara\aogonek
3491 \else\ifx\temp\macrocharE\Eogonek
3492 \else\ifx\temp\macrochare\eogonek
3494 \ecfont \setbox0=
\hbox{#1}%
3495 \ifdim\ht0=
1ex
\accent"
0C
#1%
3496 \else\ooalign{\unhbox0\crcr\hidewidth\char"
0C
\hidewidth}%
3501 \def\Aogonek{{\ecfont \char"
81}}\def\macrocharA{A
}
3502 \def\aogonek{{\ecfont \char"A1
}}\def\macrochara{a
}
3503 \def\Eogonek{{\ecfont \char"
86}}\def\macrocharE{E
}
3504 \def\eogonek{{\ecfont \char"A6
}}\def\macrochare{e
}
3506 % Use the European Computer Modern fonts (cm-super in outline format)
3507 % for non-CM glyphs. That is ec* for regular text and tc* for the text
3508 % companion symbols (LaTeX TS1 encoding). Both are part of the ec
3509 % package and follow the same conventions.
3511 \def\ecfont{\etcfont{e
}}
3512 \def\tcfont{\etcfont{t
}}
3515 % We can't distinguish serif/sans and italic/slanted, but this
3516 % is used for crude hacks anyway (like adding French and German
3517 % quotes to documents typeset with CM, where we lose kerning), so
3518 % hopefully nobody will notice/care.
3519 \edef\ecsize{\csname\curfontsize ecsize
\endcsname}%
3520 \edef\nominalsize{\csname\curfontsize nominalsize
\endcsname}%
3523 \font\thisecfont =
#1ctt
\ecsize \space at
\nominalsize
3525 \ifx\curfontstyle\bfstylename
3527 \font\thisecfont =
#1cb
\ifusingit{i
}{x
}\ecsize \space at
\nominalsize
3530 \font\thisecfont =
#1c
\ifusingit{ti
}{rm
}\ecsize \space at
\nominalsize
3536 % @registeredsymbol - R in a circle. The font for the R should really
3537 % be smaller yet, but lllsize is the best we can do for now.
3538 % Adapted from the plain.tex definition of \copyright.
3540 \def\registeredsymbol{%
3541 $^
{{\ooalign{\hfil\raise.07ex
\hbox{\selectfonts\lllsize R
}%
3546 % @textdegree - the normal degrees sign.
3548 \def\textdegree{$^
\circ$
}
3550 % Laurent Siebenmann reports \Orb undefined with:
3551 % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38
3552 % so we'll define it if necessary.
3554 \ifx\Orb\thisisundefined
3555 \def\Orb{\mathhexbox20D}
3559 \chardef\quotedblleft="
5C
3560 \chardef\quotedblright=`\"
3561 \chardef\quoteleft=`\`
3562 \chardef\quoteright=`\'
3565 \message{page headings,
}
3567 \newskip\titlepagetopglue \titlepagetopglue =
1.5in
3568 \newskip\titlepagebottomglue \titlepagebottomglue =
2pc
3570 % First the title page. Must do @settitle before @titlepage.
3572 \newif\iffinishedtitlepage
3574 % @setcontentsaftertitlepage used to do an implicit @contents or
3575 % @shortcontents after @end titlepage, but it is now obsolete.
3576 \def\setcontentsaftertitlepage{%
3577 \errmessage{@setcontentsaftertitlepage has been removed as a Texinfo
3578 command; move your @contents command if you want the contents
3579 after the title page.
}}%
3580 \def\setshortcontentsaftertitlepage{%
3581 \errmessage{@setshortcontentsaftertitlepage has been removed as a Texinfo
3582 command; move your @shortcontents and @contents commands if you
3583 want the contents after the title page.
}}%
3585 \parseargdef\shorttitlepage{%
3586 \begingroup \hbox{}\vskip 1.5in
\chaprm \centerline{#1}%
3587 \endgroup\page\hbox{}\page}
3590 % Open one extra group, as we want to close it in the middle of \Etitlepage.
3592 \parindent=
0pt
\textfonts
3593 % Leave some space at the very top of the page.
3594 \vglue\titlepagetopglue
3595 % No rule at page bottom unless we print one at the top with @title.
3596 \finishedtitlepagetrue
3598 % Most title ``pages'' are actually two pages long, with space
3599 % at the top of the second. We don't want the ragged left on the second.
3600 \let\oldpage =
\page
3602 \iffinishedtitlepage\else
3605 \let\page =
\oldpage
3612 \iffinishedtitlepage\else
3615 % It is important to do the page break before ending the group,
3616 % because the headline and footline are only empty inside the group.
3617 % If we use the new definition of \page, we always get a blank page
3618 % after the title page, which we certainly don't want.
3622 % Need this before the \...aftertitlepage checks so that if they are
3623 % in effect the toc pages will come out with page numbers.
3627 \def\finishtitlepage{%
3628 \vskip4pt \hrule height
2pt width
\hsize
3629 \vskip\titlepagebottomglue
3630 \finishedtitlepagetrue
3633 % Settings used for typesetting titles: no hyphenation, no indentation,
3634 % don't worry much about spacing, ragged right. This should be used
3635 % inside a \vbox, and fonts need to be set appropriately first. Because
3636 % it is always used for titles, nothing else, we call \rmisbold. \par
3637 % should be specified before the end of the \vbox, since a vbox is a group.
3639 \def\raggedtitlesettings{%
3641 \hyphenpenalty=
10000
3647 % Macros to be used within @titlepage:
3649 \let\subtitlerm=
\tenrm
3650 \def\subtitlefont{\subtitlerm \normalbaselineskip =
13pt
\normalbaselines}
3652 \parseargdef\title{%
3654 \vbox{\titlefonts \raggedtitlesettings #1\par}%
3655 % print a rule at the page bottom also.
3656 \finishedtitlepagefalse
3657 \vskip4pt \hrule height
4pt width
\hsize \vskip4pt
3660 \parseargdef\subtitle{%
3662 {\subtitlefont \rightline{#1}}%
3665 % @author should come last, but may come many times.
3666 % It can also be used inside @quotation.
3668 \parseargdef\author{%
3669 \def\temp{\quotation}%
3671 \def\quotationauthor{#1}% printed in \Equotation.
3674 \ifseenauthor\else \vskip 0pt plus
1filll
\seenauthortrue \fi
3675 {\secfonts\rmisbold \leftline{#1}}%
3680 % Set up page headings and footings.
3682 \let\thispage=
\folio
3684 \newtoks\evenheadline % headline on even pages
3685 \newtoks\oddheadline % headline on odd pages
3686 \newtoks\evenfootline % footline on even pages
3687 \newtoks\oddfootline % footline on odd pages
3689 % Now make \makeheadline and \makefootline in Plain TeX use those variables
3690 \headline=
{{\textfonts\rm \ifodd\pageno \the\oddheadline
3691 \else \the\evenheadline \fi}}
3692 \footline=
{{\textfonts\rm \ifodd\pageno \the\oddfootline
3693 \else \the\evenfootline \fi}\HEADINGShook}
3694 \let\HEADINGShook=
\relax
3696 % Commands to set those variables.
3697 % For example, this is what @headings on does
3698 % @evenheading @thistitle|@thispage|@thischapter
3699 % @oddheading @thischapter|@thispage|@thistitle
3700 % @evenfooting @thisfile||
3701 % @oddfooting ||@thisfile
3704 \def\evenheading{\parsearg\evenheadingxxx}
3705 \def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|
\finish}
3706 \def\evenheadingyyy #1\|
#2\|
#3\|
#4\finish{%
3707 \global\evenheadline=
{\rlap{\centerline{#2}}\line{#1\hfil#3}}}
3709 \def\oddheading{\parsearg\oddheadingxxx}
3710 \def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|
\finish}
3711 \def\oddheadingyyy #1\|
#2\|
#3\|
#4\finish{%
3712 \global\oddheadline=
{\rlap{\centerline{#2}}\line{#1\hfil#3}}}
3714 \parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}%
3716 \def\evenfooting{\parsearg\evenfootingxxx}
3717 \def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|
\finish}
3718 \def\evenfootingyyy #1\|
#2\|
#3\|
#4\finish{%
3719 \global\evenfootline=
{\rlap{\centerline{#2}}\line{#1\hfil#3}}}
3721 \def\oddfooting{\parsearg\oddfootingxxx}
3722 \def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|
\finish}
3723 \def\oddfootingyyy #1\|
#2\|
#3\|
#4\finish{%
3724 \global\oddfootline =
{\rlap{\centerline{#2}}\line{#1\hfil#3}}%
3726 % Leave some space for the footline. Hopefully ok to assume
3727 % @evenfooting will not be used by itself.
3728 \global\advance\txipageheight by -
12pt
3729 \global\advance\vsize by -
12pt
3732 \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}}
3734 % @evenheadingmarks top \thischapter <- chapter at the top of a page
3735 % @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page
3737 % The same set of arguments for:
3742 % @everyheadingmarks
3743 % @everyfootingmarks
3745 % These define \getoddheadingmarks, \getevenheadingmarks,
3746 % \getoddfootingmarks, and \getevenfootingmarks, each to one of
3747 % \gettopheadingmarks, \getbottomheadingmarks.
3749 \def\evenheadingmarks{\headingmarks{even
}{heading
}}
3750 \def\oddheadingmarks{\headingmarks{odd
}{heading
}}
3751 \def\evenfootingmarks{\headingmarks{even
}{footing
}}
3752 \def\oddfootingmarks{\headingmarks{odd
}{footing
}}
3753 \parseargdef\everyheadingmarks{\headingmarks{even
}{heading
}{#1}
3754 \headingmarks{odd
}{heading
}{#1} }
3755 \parseargdef\everyfootingmarks{\headingmarks{even
}{footing
}{#1}
3756 \headingmarks{odd
}{footing
}{#1} }
3757 % #1 = even/odd, #2 = heading/footing, #3 = top/bottom.
3758 \def\headingmarks#1#2#3 {%
3759 \expandafter\let\expandafter\temp \csname get
#3headingmarks
\endcsname
3760 \global\expandafter\let\csname get
#1#2marks
\endcsname \temp
3763 \everyheadingmarks bottom
3764 \everyfootingmarks bottom
3766 % @headings double turns headings on for double-sided printing.
3767 % @headings single turns headings on for single-sided printing.
3768 % @headings off turns them off.
3769 % @headings on same as @headings double, retained for compatibility.
3770 % @headings after turns on double-sided headings after this page.
3771 % @headings doubleafter turns on double-sided headings after this page.
3772 % @headings singleafter turns on single-sided headings after this page.
3773 % By default, they are off at the start of a document,
3774 % and turned `on' after @end titlepage.
3776 \parseargdef\headings{\csname HEADINGS
#1\endcsname}
3778 \def\headingsoff{% non-global headings elimination
3779 \evenheadline=
{\hfil}\evenfootline=
{\hfil}%
3780 \oddheadline=
{\hfil}\oddfootline=
{\hfil}%
3783 \def\HEADINGSoff{{\globaldefs=
1 \headingsoff}} % global setting
3784 \HEADINGSoff % it's the default
3786 % When we turn headings on, set the page number to 1.
3787 % For double-sided printing, put current file name in lower left corner,
3788 % chapter name on inside top of right hand pages, document
3789 % title on inside top of left hand pages, and page numbers on outside top
3790 % edge of all pages.
3791 \def\HEADINGSdouble{%
3793 \global\evenfootline=
{\hfil}
3794 \global\oddfootline=
{\hfil}
3795 \global\evenheadline=
{\line{\folio\hfil\thistitle}}
3796 \global\oddheadline=
{\line{\thischapterheading\hfil\folio}}
3797 \global\let\contentsalignmacro =
\chapoddpage
3799 \let\contentsalignmacro =
\chappager
3801 % For single-sided printing, chapter title goes across top left of page,
3802 % page number on top right.
3803 \def\HEADINGSsingle{%
3805 \global\evenfootline=
{\hfil}
3806 \global\oddfootline=
{\hfil}
3807 \global\evenheadline=
{\line{\thischapterheading\hfil\folio}}
3808 \global\oddheadline=
{\line{\thischapterheading\hfil\folio}}
3809 \global\let\contentsalignmacro =
\chappager
3811 \def\HEADINGSon{\HEADINGSdouble}
3813 \def\HEADINGSafter{\let\HEADINGShook=
\HEADINGSdoublex}
3814 \let\HEADINGSdoubleafter=
\HEADINGSafter
3815 \def\HEADINGSdoublex{%
3816 \global\evenfootline=
{\hfil}
3817 \global\oddfootline=
{\hfil}
3818 \global\evenheadline=
{\line{\folio\hfil\thistitle}}
3819 \global\oddheadline=
{\line{\thischapterheading\hfil\folio}}
3820 \global\let\contentsalignmacro =
\chapoddpage
3823 \def\HEADINGSsingleafter{\let\HEADINGShook=
\HEADINGSsinglex}
3824 \def\HEADINGSsinglex{%
3825 \global\evenfootline=
{\hfil}
3826 \global\oddfootline=
{\hfil}
3827 \global\evenheadline=
{\line{\thischapterheading\hfil\folio}}
3828 \global\oddheadline=
{\line{\thischapterheading\hfil\folio}}
3829 \global\let\contentsalignmacro =
\chappager
3832 % Subroutines used in generating headings
3833 % This produces Day Month Year style of output.
3834 % Only define if not already defined, in case a txi-??.tex file has set
3835 % up a different format (e.g., txi-cs.tex does this).
3836 \ifx\today\thisisundefined
3840 \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr
3841 \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug
3842 \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec
3847 % @settitle line... specifies the title of the document, for headings.
3848 % It generates no output of its own.
3849 \def\thistitle{\putwordNoTitle}
3850 \def\settitle{\parsearg{\gdef\thistitle}}
3854 % Tables -- @table, @ftable, @vtable, @item(x).
3856 % default indentation of table text
3857 \newdimen\tableindent \tableindent=
.8in
3858 % default indentation of @itemize and @enumerate text
3859 \newdimen\itemindent \itemindent=
.3in
3860 % margin between end of table item and start of table text.
3861 \newdimen\itemmargin \itemmargin=
.1in
3863 % used internally for \itemindent minus \itemmargin
3866 % Note @table, @ftable, and @vtable define @item, @itemx, etc., with
3868 % They also define \itemindex
3869 % to index the item name in whatever manner is desired (perhaps none).
3871 \newif\ifitemxneedsnegativevskip
3873 \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-
\parskip\nobreak\fi}
3875 \def\internalBitem{\smallbreak \parsearg\itemzzz}
3876 \def\internalBitemx{\itemxpar \parsearg\itemzzz}
3878 \def\itemzzz #1{\begingroup %
3879 \advance\hsize by -
\rightskip
3880 \advance\hsize by -
\tableindent
3881 \setbox0=
\hbox{\itemindicate{#1}}%
3883 \nobreak % This prevents a break before @itemx.
3885 % If the item text does not fit in the space we have, put it on a line
3886 % by itself, and do not allow a page break either before or after that
3887 % line. We do not start a paragraph here because then if the next
3888 % command is, e.g., @kindex, the whatsit would get put into the
3889 % horizontal list on a line by itself, resulting in extra blank space.
3890 \ifdim \wd0>
\itemmax
3892 % Make this a paragraph so we get the \parskip glue and wrapping,
3893 % but leave it ragged-right.
3895 \advance\leftskip by-
\tableindent
3896 \advance\hsize by
\tableindent
3897 \advance\rightskip by0pt plus1fil
\relax
3898 \leavevmode\unhbox0\par
3901 % We're going to be starting a paragraph, but we don't want the
3902 % \parskip glue -- logically it's part of the @item we just started.
3903 \nobreak \vskip-
\parskip
3905 % Stop a page break at the \parskip glue coming up. However, if
3906 % what follows is an environment such as @example, there will be no
3907 % \parskip glue; then the negative vskip we just inserted would
3908 % cause the example and the item to crash together. So we use this
3909 % bizarre value of 10001 as a signal to \aboveenvbreak to insert
3910 % \parskip glue after all. Section titles are handled this way also.
3914 \itemxneedsnegativevskipfalse
3916 % The item text fits into the space. Start a paragraph, so that the
3917 % following text (if any) will end up on the same line.
3919 % Do this with kerns and \unhbox so that if there is a footnote in
3920 % the item text, it can migrate to the main vertical list and
3921 % eventually be printed.
3922 \nobreak\kern-
\tableindent
3923 \dimen0 =
\itemmax \advance\dimen0 by
\itemmargin \advance\dimen0 by -
\wd0
3925 \nobreak\kern\dimen0
3927 \itemxneedsnegativevskiptrue
3931 \def\item{\errmessage{@item while not in a list environment
}}
3932 \def\itemx{\errmessage{@itemx while not in a list environment
}}
3934 % @table, @ftable, @vtable.
3936 \let\itemindex\gobble
3940 \def\itemindex #
#1{\doind {fn
}{\code{#
#1}}}%
3941 \tablecheck{ftable
}%
3944 \def\itemindex #
#1{\doind {vr
}{\code{#
#1}}}%
3945 \tablecheck{vtable
}%
3948 \ifnum \the\catcode`\^^M=
\active
3950 \errmessage{This command won't work in this context; perhaps the problem is
3951 that we are
\inenvironment\thisenv}%
3952 \def\next{\doignore{#1}}%
3959 \def\itemindicate{#1}%
3964 \makevalueexpandable
3965 \edef\temp{\noexpand\tablez #1\space\space\space}%
3969 \def\tablez #1 #2 #3 #4\endtablez{%
3971 \ifnum 0#1>
0 \advance \leftskip by
#1\mil \fi
3972 \ifnum 0#2>
0 \tableindent=
#2\mil \fi
3973 \ifnum 0#3>
0 \advance \rightskip by
#3\mil \fi
3974 \itemmax=
\tableindent
3975 \advance \itemmax by -
\itemmargin
3976 \advance \leftskip by
\tableindent
3977 \exdentamount=
\tableindent
3979 \parskip =
\smallskipamount
3980 \ifdim \parskip=
0pt
\parskip=
2pt
\fi
3981 \let\item =
\internalBitem
3982 \let\itemx =
\internalBitemx
3984 \def\Etable{\endgraf\afterenvbreak}
3987 \let\Eitemize\Etable
3988 \let\Eenumerate\Etable
3990 % This is the counter used by @enumerate, which is really @itemize
3994 \envdef\itemize{\parsearg\doitemize}
3998 \itemmax=
\itemindent
3999 \advance\itemmax by -
\itemmargin
4000 \advance\leftskip by
\itemindent
4001 \exdentamount=
\itemindent
4003 \parskip=
\smallskipamount
4004 \ifdim\parskip=
0pt
\parskip=
2pt
\fi
4006 % Try typesetting the item mark so that if the document erroneously says
4007 % something like @itemize @samp (intending @table), there's an error
4008 % right away at the @itemize. It's not the best error message in the
4009 % world, but it's better than leaving it to the @item. This means if
4010 % the user wants an empty mark, they have to say @w{} not just @w.
4011 \def\itemcontents{#1}%
4012 \setbox0 =
\hbox{\itemcontents}%
4014 % @itemize with no arg is equivalent to @itemize @bullet.
4015 \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi
4017 \let\item=
\itemizeitem
4020 % Definition of @item while inside @itemize and @enumerate.
4023 \advance\itemno by
1 % for enumerations
4024 {\let\par=
\endgraf \smallbreak}% reasonable place to break
4026 % If the document has an @itemize directly after a section title, a
4027 % \nobreak will be last on the list, and \sectionheading will have
4028 % done a \vskip-\parskip. In that case, we don't want to zero
4029 % parskip, or the item text will crash with the heading. On the
4030 % other hand, when there is normal text preceding the item (as there
4031 % usually is), we do want to zero parskip, or there would be too much
4032 % space. In that case, we won't have a \nobreak before. At least
4033 % that's the theory.
4034 \ifnum\lastpenalty<
10000 \parskip=
0in
\fi
4036 \hbox to
0pt
{\hss \itemcontents \kern\itemmargin}%
4039 \vadjust{\penalty 1200}% not good to break after first line of item.
4041 % We can be in inner vertical mode in a footnote, although an
4042 % @itemize looks awful there.
4047 % \splitoff TOKENS\endmark defines \first to be the first token in
4048 % TOKENS, and \rest to be the remainder.
4050 \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}%
4052 % Allow an optional argument of an uppercase letter, lowercase letter,
4053 % or number, to specify the first label in the enumerated list. No
4054 % argument is the same as `1'.
4056 \envparseargdef\enumerate{\enumeratey #1 \endenumeratey}
4057 \def\enumeratey #1 #2\endenumeratey{%
4058 % If we were given no argument, pretend we were given `1'.
4060 \ifx\thearg\empty \def\thearg{1}\fi
4062 % Detect if the argument is a single token. If so, it might be a
4063 % letter. Otherwise, the only valid thing it can be is a number.
4064 % (We will always have one token, because of the test we just made.
4065 % This is a good thing, since \splitoff doesn't work given nothing at
4066 % all -- the first parameter is undelimited.)
4067 \expandafter\splitoff\thearg\endmark
4069 % Only one token in the argument. It could still be anything.
4070 % A ``lowercase letter'' is one whose \lccode is nonzero.
4071 % An ``uppercase letter'' is one whose \lccode is both nonzero, and
4072 % not equal to itself.
4073 % Otherwise, we assume it's a number.
4075 % We need the \relax at the end of the \ifnum lines to stop TeX from
4076 % continuing to look for a <number>.
4078 \ifnum\lccode\expandafter`
\thearg=
0\relax
4079 \numericenumerate % a number (we hope)
4082 \ifnum\lccode\expandafter`
\thearg=
\expandafter`
\thearg\relax
4083 \lowercaseenumerate % lowercase letter
4085 \uppercaseenumerate % uppercase letter
4089 % Multiple tokens in the argument. We hope it's a number.
4094 % An @enumerate whose labels are integers. The starting integer is
4097 \def\numericenumerate{%
4099 \startenumeration{\the\itemno}%
4102 % The starting (lowercase) letter is in \thearg.
4103 \def\lowercaseenumerate{%
4104 \itemno =
\expandafter`
\thearg
4106 % Be sure we're not beyond the end of the alphabet.
4108 \errmessage{No more lowercase letters in @enumerate; get a bigger
4115 % The starting (uppercase) letter is in \thearg.
4116 \def\uppercaseenumerate{%
4117 \itemno =
\expandafter`
\thearg
4119 % Be sure we're not beyond the end of the alphabet.
4121 \errmessage{No more uppercase letters in @enumerate; get a bigger
4128 % Call \doitemize, adding a period to the first argument and supplying the
4129 % common last two arguments. Also subtract one from the initial value in
4130 % \itemno, since @item increments \itemno.
4132 \def\startenumeration#1{%
4133 \advance\itemno by -
1
4134 \doitemize{#1.
}\flushcr
4137 % @alphaenumerate and @capsenumerate are abbreviations for giving an arg
4140 \def\alphaenumerate{\enumerate{a
}}
4141 \def\capsenumerate{\enumerate{A
}}
4142 \def\Ealphaenumerate{\Eenumerate}
4143 \def\Ecapsenumerate{\Eenumerate}
4146 % @multitable macros
4147 % Amy Hendrickson, 8/18/94, 3/6/96
4149 % @multitable ... @end multitable will make as many columns as desired.
4150 % Contents of each column will wrap at width given in preamble. Width
4151 % can be specified either with sample text given in a template line,
4152 % or in percent of \hsize, the current width of text on page.
4154 % Table can continue over pages but will only break between lines.
4158 % Either define widths of columns in terms of percent of \hsize:
4159 % @multitable @columnfractions .25 .3 .45
4162 % Numbers following @columnfractions are the percent of the total
4163 % current hsize to be used for each column. You may use as many
4164 % columns as desired.
4167 % Or use a template:
4168 % @multitable {Column 1 template} {Column 2 template} {Column 3 template}
4170 % using the widest term desired in each column.
4172 % Each new table line starts with @item, each subsequent new column
4173 % starts with @tab. Empty columns may be produced by supplying @tab's
4174 % with nothing between them for as many times as empty columns are needed,
4175 % ie, @tab@tab@tab will produce two empty columns.
4177 % @item, @tab do not need to be on their own lines, but it will not hurt
4180 % Sample multitable:
4182 % @multitable {Column 1 template} {Column 2 template} {Column 3 template}
4183 % @item first col stuff @tab second col stuff @tab third col
4190 % @item first col stuff @tab second col stuff
4191 % @tab Many paragraphs of text may be used in any column.
4193 % They will wrap at the width determined by the template.
4194 % @item@tab@tab This will be in third column.
4197 % Default dimensions may be reset by user.
4198 % @multitableparskip is vertical space between paragraphs in table.
4199 % @multitableparindent is paragraph indent in table.
4200 % @multitablecolmargin is horizontal space to be left between columns.
4201 % @multitablelinespace is space to leave between table items, baseline
4203 % 0pt means it depends on current normal line spacing.
4205 \newskip\multitableparskip
4206 \newskip\multitableparindent
4207 \newdimen\multitablecolspace
4208 \newskip\multitablelinespace
4209 \multitableparskip=
0pt
4210 \multitableparindent=
6pt
4211 \multitablecolspace=
12pt
4212 \multitablelinespace=
0pt
4214 % Macros used to set up halign preamble:
4216 \let\endsetuptable\relax
4217 \def\xendsetuptable{\endsetuptable}
4218 \let\columnfractions\relax
4219 \def\xcolumnfractions{\columnfractions}
4222 % #1 is the @columnfraction, usually a decimal number like .5, but might
4223 % be just 1. We just use it, whatever it is.
4225 \def\pickupwholefraction#1 {%
4226 \global\advance\colcount by
1
4227 \expandafter\xdef\csname col
\the\colcount\endcsname{#1\hsize}%
4234 \ifx\firstarg\xendsetuptable
4237 \ifx\firstarg\xcolumnfractions
4238 \global\setpercenttrue
4241 \let\go\pickupwholefraction
4243 \global\advance\colcount by
1
4244 \setbox0=
\hbox{#1\unskip\space}% Add a normal word space as a
4245 % separator; typically that is always in the input, anyway.
4246 \expandafter\xdef\csname col
\the\colcount\endcsname{\the\wd0}%
4249 \ifx\go\pickupwholefraction
4250 % Put the argument back for the \pickupwholefraction call, so
4251 % we'll always have a period there to be parsed.
4252 \def\go{\pickupwholefraction#1}%
4254 \let\go =
\setuptable
4260 % multitable-only commands.
4262 % @headitem starts a heading row, which we typeset in bold. Assignments
4263 % have to be global since we are inside the implicit group of an
4264 % alignment entry. \everycr below resets \everytab so we don't have to
4265 % undo it ourselves.
4266 \def\headitemfont{\b}% for people to use in the template row; not changeable
4268 \checkenv\multitable
4270 \gdef\headitemcrhook{\nobreak}% attempt to avoid page break after headings
4271 \global\everytab=
{\bf}% can't use \headitemfont since the parsing differs
4272 \the\everytab % for the first item
4275 % default for tables with no headings.
4276 \let\headitemcrhook=
\relax
4278 % A \tab used to include \hskip1sp. But then the space in a template
4279 % line is not enough. That is bad. So let's go back to just `&' until
4280 % we again encounter the problem the 1sp was intended to solve.
4281 % --karl, nathan@acm.org, 20apr99.
4282 \def\tab{\checkenv\multitable &
\the\everytab}%
4284 % @multitable ... @end multitable definitions:
4286 \newtoks\everytab % insert after every tab.
4288 \envdef\multitable{%
4292 % @item within a multitable starts a normal row.
4293 % We use \def instead of \let so that if one of the multitable entries
4294 % contains an @itemize, we don't choke on the \item (seen as \crcr aka
4295 % \endtemplate) expanding \doitemize.
4300 \setmultitablespacing
4301 \parskip=
\multitableparskip
4302 \parindent=
\multitableparindent
4308 \global\everytab=
{}% Reset from possible headitem.
4309 \global\colcount=
0 % Reset the column counter.
4311 % Check for saved footnotes, etc.:
4314 % Perhaps a \nobreak, then reset:
4316 \global\let\headitemcrhook=
\relax
4320 \parsearg\domultitable
4322 \def\domultitable#1{%
4323 % To parse everything between @multitable and @item:
4324 \setuptable#1 \endsetuptable
4326 % This preamble sets up a generic column definition, which will
4327 % be used as many times as user calls for columns.
4328 % \vtop will set a single line and will also let text wrap and
4329 % continue for many paragraphs if desired.
4331 \global\advance\colcount by
1
4334 % Use the current \colcount to find the correct column width:
4335 \hsize=
\expandafter\csname col
\the\colcount\endcsname
4337 % In order to keep entries from bumping into each other
4338 % we will add a \leftskip of \multitablecolspace to all columns after
4341 % If a template has been used, we will add \multitablecolspace
4342 % to the width of each template entry.
4344 % If the user has set preamble in terms of percent of \hsize we will
4345 % use that dimension as the width of the column, and the \leftskip
4346 % will keep entries from bumping into each other. Table will start at
4347 % left margin and final column will justify at right margin.
4349 % Make sure we don't inherit \rightskip from the outer environment.
4352 % The first column will be indented with the surrounding text.
4353 \advance\hsize by
\leftskip
4356 % If user has not set preamble in terms of percent of \hsize
4357 % we will advance \hsize by \multitablecolspace.
4358 \advance\hsize by
\multitablecolspace
4360 % In either case we will make \leftskip=\multitablecolspace:
4361 \leftskip=
\multitablecolspace
4363 % Ignoring space at the beginning and end avoids an occasional spurious
4364 % blank line, when TeX decides to break the line at the space before the
4365 % box from the multistrut, so the strut ends up on a line by itself.
4367 % @multitable @columnfractions .11 .89
4369 % @tab Legal holiday which is valid in major parts of the whole country.
4370 % Is automatically provided with highlighting sequences respectively
4371 % marking characters.
4372 \noindent\ignorespaces##
\unskip\multistrut
4377 \egroup % end the \halign
4378 \global\setpercentfalse
4381 \def\setmultitablespacing{%
4382 \def\multistrut{\strut}% just use the standard line spacing
4384 % Compute \multitablelinespace (if not defined by user) for use in
4385 % \multitableparskip calculation. We used define \multistrut based on
4386 % this, but (ironically) that caused the spacing to be off.
4387 % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100.
4388 \ifdim\multitablelinespace=
0pt
4389 \setbox0=
\vbox{X
}\global\multitablelinespace=
\the\baselineskip
4390 \global\advance\multitablelinespace by-
\ht0
4392 % Test to see if parskip is larger than space between lines of
4393 % table. If not, do nothing.
4394 % If so, set to same dimension as multitablelinespace.
4395 \ifdim\multitableparskip>
\multitablelinespace
4396 \global\multitableparskip=
\multitablelinespace
4397 \global\advance\multitableparskip-
7pt
% to keep parskip somewhat smaller
4398 % than skip between lines in the table.
4400 \ifdim\multitableparskip=
0pt
4401 \global\multitableparskip=
\multitablelinespace
4402 \global\advance\multitableparskip-
7pt
% to keep parskip somewhat smaller
4403 % than skip between lines in the table.
4407 \message{conditionals,
}
4409 % @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext,
4410 % @ifnotxml always succeed. They currently do nothing; we don't
4411 % attempt to check whether the conditionals are properly nested. But we
4412 % have to remember that they are conditionals, so that @end doesn't
4413 % attempt to close an environment group.
4416 \expandafter\let\csname #1\endcsname =
\relax
4417 \expandafter\let\csname iscond.
#1\endcsname =
1
4420 \makecond{ifnotdocbook
}
4421 \makecond{ifnothtml
}
4422 \makecond{ifnotinfo
}
4423 \makecond{ifnotplaintext
}
4426 % Ignore @ignore, @ifhtml, @ifinfo, and the like.
4428 \def\direntry{\doignore{direntry
}}
4429 \def\documentdescription{\doignore{documentdescription
}}
4430 \def\docbook{\doignore{docbook
}}
4431 \def\html{\doignore{html
}}
4432 \def\ifdocbook{\doignore{ifdocbook
}}
4433 \def\ifhtml{\doignore{ifhtml
}}
4434 \def\ifinfo{\doignore{ifinfo
}}
4435 \def\ifnottex{\doignore{ifnottex
}}
4436 \def\ifplaintext{\doignore{ifplaintext
}}
4437 \def\ifxml{\doignore{ifxml
}}
4438 \def\ignore{\doignore{ignore
}}
4439 \def\menu{\doignore{menu
}}
4440 \def\xml{\doignore{xml
}}
4442 % Ignore text until a line `@end #1', keeping track of nested conditionals.
4444 % A count to remember the depth of nesting.
4445 \newcount\doignorecount
4447 \def\doignore#1{\begingroup
4448 % Scan in ``verbatim'' mode:
4450 \catcode`\@ =
\other
4451 \catcode`\
{ =
\other
4452 \catcode`\
} =
\other
4454 % Make sure that spaces turn into tokens that match what \doignoretext wants.
4457 % Count number of #1's that we've seen.
4460 % Swallow text until we reach the matching `@end #1'.
4464 { \catcode`_=
11 % We want to use \_STOP_ which cannot appear in texinfo source.
4467 \gdef\dodoignore#1{%
4468 % #1 contains the command name as a string, e.g., `ifinfo'.
4470 % Define a command to find the next `@end #1'.
4471 \long\def\doignoretext#
#1^^M@end
#1{%
4472 \doignoretextyyy#
#1^^M@
#1\_STOP_}%
4474 % And this command to find another #1 command, at the beginning of a
4475 % line. (Otherwise, we would consider a line `@c @ifset', for
4476 % example, to count as an @ifset for nesting.)
4477 \long\def\doignoretextyyy#
#1^^M@
#1#
#2\_STOP_{\doignoreyyy{#
#2}\_STOP_}%
4479 % And now expand that command.
4484 \def\doignoreyyy#1{%
4486 \ifx\temp\empty % Nothing found.
4487 \let\next\doignoretextzzz
4488 \else % Found a nested condition, ...
4489 \advance\doignorecount by
1
4490 \let\next\doignoretextyyy % ..., look for another.
4491 % If we're here, #1 ends with ^^M\ifinfo (for example).
4493 \next #1% the token \_STOP_ is present just after this macro.
4496 % We have to swallow the remaining "\_STOP_".
4498 \def\doignoretextzzz#1{%
4499 \ifnum\doignorecount =
0 % We have just found the outermost @end.
4500 \let\next\enddoignore
4501 \else % Still inside a nested condition.
4502 \advance\doignorecount by -
1
4503 \let\next\doignoretext % Look for the next @end.
4508 % Finish off ignored text.
4510 % Ignore anything after the last `@end #1'; this matters in verbatim
4511 % environments, where otherwise the newline after an ignored conditional
4512 % would result in a blank line in the output.
4513 \gdef\enddoignore#1^^M
{\endgroup\ignorespaces}%
4517 % @set VAR sets the variable VAR to an empty value.
4518 % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
4520 % Since we want to separate VAR from REST-OF-LINE (which might be
4521 % empty), we can't just use \parsearg; we have to insert a space of our
4522 % own to delimit the rest of the line, and then take it out again if we
4524 % We rely on the fact that \parsearg sets \catcode`\ =10.
4526 \parseargdef\set{\setyyy#1 \endsetyyy}
4527 \def\setyyy#1 #2\endsetyyy{%
4529 \makevalueexpandable
4531 \edef\next{\gdef\makecsname{SET
#1}}%
4539 % Remove the trailing space \setxxx inserted.
4540 \def\setzzz#1 \endsetzzz{\next{#1}}
4542 % @clear VAR clears (i.e., unsets) the variable VAR.
4544 \parseargdef\clear{%
4546 \makevalueexpandable
4547 \global\expandafter\let\csname SET
#1\endcsname=
\relax
4551 % @value{foo} gets the text saved in variable foo.
4552 \def\value{\begingroup\makevalueexpandable\valuexxx}
4553 \def\valuexxx#1{\expandablevalue{#1}\endgroup}
4555 \catcode`\-=
\active \catcode`
\_=
\active
4557 \gdef\makevalueexpandable{%
4558 \let\value =
\expandablevalue
4559 % We don't want these characters active, ...
4560 \catcode`\-=
\other \catcode`
\_=
\other
4561 % ..., but we might end up with active ones in the argument if
4562 % we're called from @code, as @code{@value{foo-bar_}}, though.
4563 % So \let them to their normal equivalents.
4564 \let-
\normaldash \let_\normalunderscore
4568 % We have this subroutine so that we can handle at least some @value's
4569 % properly in indexes (we call \makevalueexpandable in \indexdummies).
4570 % The command has to be fully expandable (if the variable is set), since
4571 % the result winds up in the index file. This means that if the
4572 % variable's value contains other Texinfo commands, it's almost certain
4573 % it will fail (although perhaps we could fix that with sufficient work
4574 % to do a one-level expansion on the result, instead of complete).
4576 % Unfortunately, this has the consequence that when _ is in the *value*
4577 % of an @set, it does not print properly in the roman fonts (get the cmr
4578 % dot accent at position 126 instead). No fix comes to mind, and it's
4579 % been this way since 2003 or earlier, so just ignore it.
4581 \def\expandablevalue#1{%
4582 \expandafter\ifx\csname SET
#1\endcsname\relax
4583 {[No value for ``
#1''
]}%
4584 \message{Variable `
#1', used in @value, is not set.
}%
4586 \csname SET
#1\endcsname
4590 % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
4593 % To get the special treatment we need for `@end ifset,' we call
4594 % \makecond and then redefine.
4597 \def\ifset{\parsearg{\doifset{\let\next=
\ifsetfail}}}
4600 \makevalueexpandable
4602 \expandafter\ifx\csname SET
#2\endcsname\relax
4603 #1% If not set, redefine \next.
4608 \def\ifsetfail{\doignore{ifset
}}
4610 % @ifclear VAR ... @end executes the `...' iff VAR has never been
4611 % defined with @set, or has been undefined with @clear.
4613 % The `\else' inside the `\doifset' parameter is a trick to reuse the
4614 % above code: if the variable is not set, do nothing, if it is set,
4615 % then redefine \next to \ifclearfail.
4618 \def\ifclear{\parsearg{\doifset{\else \let\next=
\ifclearfail}}}
4619 \def\ifclearfail{\doignore{ifclear
}}
4621 % @ifcommandisdefined CMD ... @end executes the `...' if CMD (written
4622 % without the @) is in fact defined. We can only feasibly check at the
4623 % TeX level, so something like `mathcode' is going to considered
4624 % defined even though it is not a Texinfo command.
4626 \makecond{ifcommanddefined
}
4627 \def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=
\ifcmddefinedfail}}}
4629 \def\doifcmddefined#1#2{{%
4630 \makevalueexpandable
4632 \expandafter\ifx\csname #2\endcsname\relax
4633 #1% If not defined, \let\next as above.
4638 \def\ifcmddefinedfail{\doignore{ifcommanddefined
}}
4640 % @ifcommandnotdefined CMD ... handled similar to @ifclear above.
4641 \makecond{ifcommandnotdefined
}
4642 \def\ifcommandnotdefined{%
4643 \parsearg{\doifcmddefined{\else \let\next=
\ifcmdnotdefinedfail}}}
4644 \def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined
}}
4646 % Set the `txicommandconditionals' variable, so documents have a way to
4647 % test if the @ifcommand...defined conditionals are available.
4648 \set txicommandconditionals
4650 % @dircategory CATEGORY -- specify a category of the dir file
4651 % which this file should belong to. Ignore this in TeX.
4652 \let\dircategory=
\comment
4654 % @defininfoenclose.
4655 \let\definfoenclose=
\comment
4659 % Index generation facilities
4661 % Define \newwrite to be identical to plain tex's \newwrite
4662 % except not \outer, so it can be used within macros and \if's.
4663 \edef\newwrite{\makecsname{ptexnewwrite
}}
4665 % \newindex {foo} defines an index named IX.
4666 % It automatically defines \IXindex such that
4667 % \IXindex ...rest of line... puts an entry in the index IX.
4668 % It also defines \IXindfile to be the number of the output channel for
4669 % the file that accumulates this index. The file's extension is IX.
4670 % The name of an index should be no more than 2 characters long
4671 % for the sake of vms.
4674 \expandafter\chardef\csname#1indfile
\endcsname=
0
4675 \expandafter\xdef\csname#1index
\endcsname{% % Define @#1index
4676 \noexpand\doindex{#1}}
4679 % @defindex foo == \newindex{foo}
4681 \def\defindex{\parsearg\newindex}
4683 % Define @defcodeindex, like @defindex except put all entries in @code.
4685 \def\defcodeindex{\parsearg\newcodeindex}
4687 \def\newcodeindex#1{%
4688 \expandafter\chardef\csname#1indfile
\endcsname=
0
4689 \expandafter\xdef\csname#1index
\endcsname{%
4690 \noexpand\docodeindex{#1}}%
4693 % The default indices:
4694 \newindex{cp
}% concepts,
4695 \newcodeindex{fn
}% functions,
4696 \newcodeindex{vr
}% variables,
4697 \newcodeindex{tp
}% types,
4698 \newcodeindex{ky
}% keys
4699 \newcodeindex{pg
}% and programs.
4702 % @synindex foo bar makes index foo feed into index bar.
4703 % Do this instead of @defindex foo if you don't want it as a separate index.
4705 % @syncodeindex foo bar similar, but put all entries made for index foo
4708 \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}}
4709 \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}}
4711 % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo),
4712 % #3 the target index (bar).
4713 \def\dosynindex#1#2#3{%
4714 % Only do \closeout if we haven't already done it, else we'll end up
4715 % closing the target index.
4716 \expandafter \ifx\csname donesynindex
#2\endcsname \relax
4717 % The \closeout helps reduce unnecessary open files; the limit on the
4718 % Acorn RISC OS is a mere 16 files.
4719 \expandafter\closeout\csname#2indfile
\endcsname
4720 \expandafter\let\csname donesynindex
#2\endcsname =
1
4722 % redefine \fooindfile:
4723 \expandafter\let\expandafter\temp\expandafter=
\csname#3indfile
\endcsname
4724 \expandafter\let\csname#2indfile
\endcsname=
\temp
4725 % redefine \fooindex:
4726 \expandafter\xdef\csname#2index
\endcsname{\noexpand#1{#3}}%
4729 % Define \doindex, the driver for all index macros.
4730 % Argument #1 is generated by the calling \fooindex macro,
4731 % and it the two-letter name of the index.
4733 \def\doindex#1{\edef\indexname{#1}\parsearg\doindexxxx}
4734 \def\doindexxxx #1{\doind{\indexname}{#1}}
4736 % like the previous two, but they put @code around the argument.
4737 \def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx}
4738 \def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}}
4740 % Used when writing an index entry out to an index file, to prevent
4741 % expansion of Texinfo commands that can appear in an index entry.
4744 \escapechar = `\\
% use backslash in output files.
4745 \def\@
{@
}% change to @@ when we switch to @ as escape char in index files.
4746 \def\
{\realbackslash\space }%
4748 % Need these unexpandable (because we define \tt as a dummy)
4749 % definitions when @{ or @} appear in index entry text. Also, more
4750 % complicated, when \tex is in effect and \{ is a \delimiter again.
4751 % We can't use \lbracecmd and \rbracecmd because texindex assumes
4752 % braces and backslashes are used only as delimiters. Perhaps we
4753 % should use @lbracechar and @rbracechar?
4754 \def\
{{{\tt\char123}}%
4755 \def\
}{{\tt\char125}}%
4757 % Do the redefinitions.
4761 % For the aux and toc files, @ is the escape character. So we want to
4762 % redefine everything using @ as the escape character (instead of
4763 % \realbackslash, still used for index files). When everything uses @,
4764 % this will be simpler.
4769 \let\
{ =
\lbraceatcmd
4770 \let\
} =
\rbraceatcmd
4772 % Do the redefinitions.
4777 % Called from \indexdummies and \atdummies.
4779 \def\commondummies{%
4780 % \definedummyword defines \#1 as \string\#1\space, thus effectively
4781 % preventing its expansion. This is used only for control words,
4782 % not control letters, because the \space would be incorrect for
4783 % control characters, but is needed to separate the control word
4784 % from whatever follows.
4786 % For control letters, we have \definedummyletter, which omits the
4789 % These can be used both for control words that take an argument and
4790 % those that do not. If it is followed by {arg} in the input, then
4791 % that will dutifully get written to the index (or wherever).
4793 \def\definedummyword #
#1{\def#
#1{\string#
#1\space}}%
4794 \def\definedummyletter#
#1{\def#
#1{\string#
#1}}%
4795 \let\definedummyaccent\definedummyletter
4797 \commondummiesnofonts
4799 \definedummyletter\_%
4800 \definedummyletter\-
%
4802 % Non-English letters.
4813 \definedummyword\exclamdown
4817 \definedummyword\ordf
4818 \definedummyword\ordm
4819 \definedummyword\questiondown
4823 % Although these internal commands shouldn't show up, sometimes they do.
4825 \definedummyword\gtr
4826 \definedummyword\hat
4827 \definedummyword\less
4830 \definedummyword\tclose
4833 \definedummyword\LaTeX
4834 \definedummyword\TeX
4836 % Assorted special characters.
4837 \definedummyword\arrow
4838 \definedummyword\bullet
4839 \definedummyword\comma
4840 \definedummyword\copyright
4841 \definedummyword\registeredsymbol
4842 \definedummyword\dots
4843 \definedummyword\enddots
4844 \definedummyword\entrybreak
4845 \definedummyword\equiv
4846 \definedummyword\error
4847 \definedummyword\euro
4848 \definedummyword\expansion
4849 \definedummyword\geq
4850 \definedummyword\guillemetleft
4851 \definedummyword\guillemetright
4852 \definedummyword\guilsinglleft
4853 \definedummyword\guilsinglright
4854 \definedummyword\lbracechar
4855 \definedummyword\leq
4856 \definedummyword\mathopsup
4857 \definedummyword\minus
4858 \definedummyword\ogonek
4859 \definedummyword\pounds
4860 \definedummyword\point
4861 \definedummyword\print
4862 \definedummyword\quotedblbase
4863 \definedummyword\quotedblleft
4864 \definedummyword\quotedblright
4865 \definedummyword\quoteleft
4866 \definedummyword\quoteright
4867 \definedummyword\quotesinglbase
4868 \definedummyword\rbracechar
4869 \definedummyword\result
4870 \definedummyword\sub
4871 \definedummyword\sup
4872 \definedummyword\textdegree
4874 % We want to disable all macros so that they are not expanded by \write.
4877 \normalturnoffactive
4879 % Handle some cases of @value -- where it does not contain any
4880 % (non-fully-expandable) commands.
4881 \makevalueexpandable
4884 % \commondummiesnofonts: common to \commondummies and \indexnofonts.
4885 % Define \definedumyletter, \definedummyaccent and \definedummyword before
4888 \def\commondummiesnofonts{%
4889 % Control letters and accents.
4890 \definedummyletter\!
%
4891 \definedummyaccent\"
%
4892 \definedummyaccent\'
%
4893 \definedummyletter\*
%
4894 \definedummyaccent\,
%
4895 \definedummyletter\.
%
4896 \definedummyletter\/
%
4897 \definedummyletter\:
%
4898 \definedummyaccent\=
%
4899 \definedummyletter\?
%
4900 \definedummyaccent\^
%
4901 \definedummyaccent\`
%
4902 \definedummyaccent\~
%
4906 \definedummyword\dotaccent
4907 \definedummyword\ogonek
4908 \definedummyword\ringaccent
4909 \definedummyword\tieaccent
4910 \definedummyword\ubaraccent
4911 \definedummyword\udotaccent
4912 \definedummyword\dotless
4914 % Texinfo font commands.
4918 \definedummyword\sansserif
4920 \definedummyword\slanted
4923 % Commands that take arguments.
4924 \definedummyword\abbr
4925 \definedummyword\acronym
4926 \definedummyword\anchor
4927 \definedummyword\cite
4928 \definedummyword\code
4929 \definedummyword\command
4930 \definedummyword\dfn
4931 \definedummyword\dmn
4932 \definedummyword\email
4933 \definedummyword\emph
4934 \definedummyword\env
4935 \definedummyword\file
4936 \definedummyword\image
4937 \definedummyword\indicateurl
4938 \definedummyword\inforef
4939 \definedummyword\kbd
4940 \definedummyword\key
4941 \definedummyword\math
4942 \definedummyword\option
4943 \definedummyword\pxref
4944 \definedummyword\ref
4945 \definedummyword\samp
4946 \definedummyword\strong
4947 \definedummyword\tie
4949 \definedummyword\uref
4950 \definedummyword\url
4951 \definedummyword\var
4952 \definedummyword\verb
4954 \definedummyword\xref
4957 % For testing: output @{ and @} in index sort strings as \{ and \}.
4958 \newif\ifusebracesinindexes
4960 \let\indexlbrace\relax
4961 \let\indexrbrace\relax
4965 @gdef@backslashdisappear
{@def\
{}}
4972 \gdef\indexnonalnumdisappear{%
4973 \expandafter\ifx\csname SETtxiindexlquoteignore
\endcsname\relax\else
4974 % @set txiindexlquoteignore makes us ignore left quotes in the sort term.
4975 % (Introduced for FSFS 2nd ed.)
4979 \expandafter\ifx\csname SETtxiindexbackslashignore
\endcsname\relax\else
4983 \expandafter\ifx\csname SETtxiindexhyphenignore
\endcsname\relax\else
4986 \expandafter\ifx\csname SETtxiindexlessthanignore
\endcsname\relax\else
4989 \expandafter\ifx\csname SETtxiindexatsignignore
\endcsname\relax\else
4994 \gdef\indexnonalnumreappear{%
5003 % \indexnofonts is used when outputting the strings to sort the index
5004 % by, and when constructing control sequence names. It eliminates all
5005 % control sequences and just writes whatever the best ASCII sort string
5006 % would be for a given command (usually its argument).
5009 % Accent commands should become @asis.
5010 \def\definedummyaccent#
#1{\let#
#1\asis}%
5011 % We can just ignore other control letters.
5012 \def\definedummyletter#
#1{\let#
#1\empty}%
5013 % All control words become @asis by default; overrides below.
5014 \let\definedummyword\definedummyaccent
5015 \commondummiesnofonts
5017 % Don't no-op \tt, since it isn't a user-level command
5018 % and is used in the definitions of the active chars like <, >, |, etc.
5019 % Likewise with the other plain tex font commands.
5024 \def\_{\normalunderscore}%
5025 \def\-
{}% @- shouldn't affect sorting
5027 \uccode`
\1=`\
{ \uppercase{\def\
{{1}}%
5028 \uccode`
\1=`\
} \uppercase{\def\
}{1}}%
5032 % Non-English letters.
5049 \def\questiondown{?
}%
5056 % Assorted special characters.
5057 % (The following {} will end up in the sort string, but that's ok.)
5059 \def\bullet{bullet
}%
5061 \def\copyright{copyright
}%
5067 \def\expansion{==>
}%
5069 \def\guillemetleft{<<
}%
5070 \def\guillemetright{>>
}%
5071 \def\guilsinglleft{<
}%
5072 \def\guilsinglright{>
}%
5076 \def\pounds{pounds
}%
5078 \def\quotedblbase{"
}%
5079 \def\quotedblleft{"
}%
5080 \def\quotedblright{"
}%
5083 \def\quotesinglbase{,
}%
5084 \def\registeredsymbol{R
}%
5088 % We need to get rid of all macros, leaving only the arguments (if present).
5089 % Of course this is not nearly correct, but it is the best we can do for now.
5090 % makeinfo does not expand macros in the argument to @deffn, which ends up
5091 % writing an index entry, and texindex isn't prepared for an index sort entry
5092 % that starts with \.
5094 % Since macro invocations are followed by braces, we can just redefine them
5095 % to take a single TeX argument. The case of a macro invocation that
5096 % goes to end-of-line is not handled.
5102 \let\SETmarginindex=
\relax % put index entries in margin (undocumented)?
5104 % Most index entries go through here, but \dosubind is the general case.
5105 % #1 is the index name, #2 is the entry text.
5106 \def\doind#1#2{\dosubind{#1}{#2}{}}
5108 % There is also \dosubind {index}{topic}{subtopic}
5109 % which makes an entry in a two-level index such as the operation index.
5110 % TODO: Two-level index? Operation index?
5112 % Workhorse for all indexes.
5113 % #1 is name of index, #2 is stuff to put there, #3 is subentry --
5114 % empty if called from \doind, as we usually are (the main exception
5115 % is with most defuns, which call us directly).
5117 \def\dosubind#1#2#3{%
5120 \requireopenindexfile{#1}%
5121 % Store the main index entry text (including the third arg).
5123 % If third arg is present, precede it with a space.
5125 \ifx\thirdarg\empty \else
5126 \toks0 =
\expandafter{\the\toks0 \space #3}%
5129 \edef\writeto{\csname#1indfile
\endcsname}%
5131 \safewhatsit\dosubindwrite
5136 % Check if an index file has been opened, and if not, open it.
5137 \def\requireopenindexfile#1{%
5138 \ifnum\csname #1indfile
\endcsname=
0
5139 \expandafter\newwrite \csname#1indfile
\endcsname
5141 % A .fls suffix would conflict with the file extension for the output
5142 % of -recorder, so use .f1s instead.
5143 \ifx\suffix\indexisfl\def\suffix{f1
}\fi
5145 \immediate\openout\csname#1indfile
\endcsname \jobname.
\suffix
5146 % Using \immediate here prevents an object entering into the current box,
5147 % which could confound checks such as those in \safewhatsit for preceding
5152 % Output \ as {\indexbackslash}, because \ is an escape character in
5154 \let\indexbackslash=
\relax
5155 {\catcode`\@=
0 \catcode`\\=
\active
5156 @gdef@useindexbackslash
{@def\
{{@indexbackslash
}}}
5159 % Definition for writing index entry text.
5160 \def\sortas#1{\ignorespaces}%
5162 % Definition for writing index entry sort key. Should occur at the at
5163 % the beginning of the index entry, like
5164 % @cindex @sortas{september} \september
5165 % The \ignorespaces takes care of following space, but there's no way
5166 % to remove space before it.
5169 \gdef\indexwritesortas{%
5171 \indexnonalnumreappear
5172 \indexwritesortasxxx}
5173 \gdef\indexwritesortasxxx#1{%
5174 \xdef\indexsortkey{#1}\endgroup}
5178 % Write the entry in \toks0 to the index file.
5180 \def\dosubindwrite{%
5181 % Put the index entry in the margin if desired.
5182 \ifx\SETmarginindex\relax\else
5183 \insert\margin{\hbox{\vrule height8pt depth3pt width0pt
\the\toks0}}%
5186 % Remember, we are within a group.
5187 \indexdummies % Must do this here, since \bf, etc expand at this stage
5188 \useindexbackslash % \indexbackslash isn't defined now so it will be output
5189 % as is; and it will print as backslash.
5190 % The braces around \indexbrace are recognized by texindex.
5192 % Get the string to sort by, by processing the index entry with all
5193 % font commands turned off.
5195 \def\lbracechar{{\indexlbrace}}%
5196 \def\rbracechar{{\indexrbrace}}%
5199 \indexnonalnumdisappear
5200 \xdef\indexsortkey{}%
5201 \let\sortas=
\indexwritesortas
5202 \edef\temp{\the\toks0}%
5203 \setbox\dummybox =
\hbox{\temp}% Make sure to execute any \sortas
5204 \ifx\indexsortkey\empty
5205 \xdef\indexsortkey{\temp}%
5206 \ifx\indexsortkey\empty\xdef\indexsortkey{ }\fi
5210 % Set up the complete index entry, with both the sort key and
5211 % the original text, including any font commands. We write
5212 % three arguments to \entry to the .?? file (four in the
5213 % subentry case), texindex reduces to two when writing the .??s
5217 \string\entry{\indexsortkey}{\noexpand\folio}{\the\toks0}}%
5221 \newbox\dummybox % used above
5223 % Take care of unwanted page breaks/skips around a whatsit:
5225 % If a skip is the last thing on the list now, preserve it
5226 % by backing up by \lastskip, doing the \write, then inserting
5227 % the skip again. Otherwise, the whatsit generated by the
5228 % \write or \pdfdest will make \lastskip zero. The result is that
5229 % sequences like this:
5233 % will have extra space inserted, because the \medbreak in the
5234 % start of the @defun won't see the skip inserted by the @end of
5235 % the previous defun.
5237 % But don't do any of this if we're not in vertical mode. We
5238 % don't want to do a \vskip and prematurely end a paragraph.
5240 % Avoid page breaks due to these extra skips, too.
5242 % But wait, there is a catch there:
5243 % We'll have to check whether \lastskip is zero skip. \ifdim is not
5244 % sufficient for this purpose, as it ignores stretch and shrink parts
5245 % of the skip. The only way seems to be to check the textual
5246 % representation of the skip.
5248 % The following is almost like \def\zeroskipmacro{0.0pt} except that
5249 % the ``p'' and ``t'' characters have catcode \other, not 11 (letter).
5251 \edef\zeroskipmacro{\expandafter\the\csname z@skip
\endcsname}
5253 \newskip\whatsitskip
5254 \newcount\whatsitpenalty
5258 \def\safewhatsit#1{\ifhmode
5261 % \lastskip and \lastpenalty cannot both be nonzero simultaneously.
5262 \whatsitskip =
\lastskip
5263 \edef\lastskipmacro{\the\lastskip}%
5264 \whatsitpenalty =
\lastpenalty
5266 % If \lastskip is nonzero, that means the last item was a
5267 % skip. And since a skip is discardable, that means this
5268 % -\whatsitskip glue we're inserting is preceded by a
5269 % non-discardable item, therefore it is not a potential
5270 % breakpoint, therefore no \nobreak needed.
5271 \ifx\lastskipmacro\zeroskipmacro
5278 \ifx\lastskipmacro\zeroskipmacro
5279 % If \lastskip was zero, perhaps the last item was a penalty, and
5280 % perhaps it was >=10000, e.g., a \nobreak. In that case, we want
5281 % to re-insert the same penalty (values >10000 are used for various
5282 % signals); since we just inserted a non-discardable item, any
5283 % following glue (such as a \parskip) would be a breakpoint. For example:
5284 % @deffn deffn-whatever
5285 % @vindex index-whatever
5287 % would allow a break between the index-whatever whatsit
5288 % and the "Description." paragraph.
5289 \ifnum\whatsitpenalty>
9999 \penalty\whatsitpenalty \fi
5291 % On the other hand, if we had a nonzero \lastskip,
5292 % this make-up glue would be preceded by a non-discardable item
5293 % (the whatsit from the \write), so we must insert a \nobreak.
5294 \nobreak\vskip\whatsitskip
5298 % The index entry written in the file actually looks like
5299 % \entry {sortstring}{page}{topic}
5301 % \entry {sortstring}{page}{topic}{subtopic}
5302 % The texindex program reads in these files and writes files
5303 % containing these kinds of lines:
5305 % before the first topic whose initial is c
5306 % \entry {topic}{pagelist}
5307 % for a topic that is used without subtopics
5309 % for the beginning of a topic that is used with subtopics
5310 % \secondary {subtopic}{pagelist}
5311 % for each subtopic.
5313 % Define the user-accessible indexing commands
5314 % @findex, @vindex, @kindex, @cindex.
5316 \def\findex {\fnindex}
5317 \def\kindex {\kyindex}
5318 \def\cindex {\cpindex}
5319 \def\vindex {\vrindex}
5320 \def\tindex {\tpindex}
5321 \def\pindex {\pgindex}
5323 \def\cindexsub {\begingroup\obeylines\cindexsub}
5325 \gdef\cindexsub "
#1"
#2^^M
{\endgroup %
5326 \dosubind{cp
}{#2}{#1}}}
5328 % Define the macros used in formatting output of the sorted index material.
5330 % @printindex causes a particular index (the ??s file) to get printed.
5331 % It does not print any chapter heading (usually an @unnumbered).
5333 \parseargdef\printindex{\begingroup
5334 \dobreak \chapheadingskip{10000}%
5339 \everypar =
{}% don't want the \kern\-parindent from indentation suppression.
5341 % See if the index file exists and is nonempty.
5342 % Change catcode of @ here so that if the index file contains
5344 % as its first line, TeX doesn't complain about mismatched braces
5345 % (because it thinks @} is a control sequence).
5347 % See comment in \requireopenindexfile.
5348 \def\indexname{#1}\ifx\indexname\indexisfl\def\indexname{f1
}\fi
5349 \openin 1 \jobname.
\indexname s
5351 % \enddoublecolumns gets confused if there is no text in the index,
5352 % and it loses the chapter title and the aux file entries for the
5353 % index. The easiest way to prevent this problem is to make sure
5354 % there is some text.
5355 \putwordIndexNonexistent
5360 % If the index file exists but is empty, then \openin leaves \ifeof
5361 % false. We have to make TeX try to read something from the file, so
5362 % it can discover if there is anything in it.
5363 \read 1 to
\thisline
5365 \putwordIndexIsEmpty
5367 % Index files are almost Texinfo source, but we use \ as the escape
5368 % character. It would be better to use @, but that's too big a change
5369 % to make right now.
5370 \def\indexbackslash{\ttbackslash}%
5371 \let\indexlbrace\
{ % Likewise, set these sequences for braces
5372 \let\indexrbrace\
} % used in the sort key.
5374 \let\entryorphanpenalty=
\indexorphanpenalty
5376 % Read input from the index file line by line.
5379 \let\firsttoken\relax
5381 \read 1 to
\nextline
5382 \edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}%
5388 \let\thisline\nextline
5397 \def\getfirsttoken#1{\expandafter\getfirsttokenx#1\endfirsttoken}
5398 \long\def\getfirsttokenx#1#2\endfirsttoken{\noexpand#1}
5400 \def\loopdo#1\repeat{\def\body{#1}\loopdoxxx}
5401 \def\loopdoxxx{\let\next=
\relax\body\let\next=
\loopdoxxx\fi\next}
5403 % These macros are used by the sorted index file itself.
5404 % Change them to control the appearance of the index.
5406 {\catcode`\/=
13 \catcode`\-=
13 \catcode`\^=
13 \catcode`\~=
13 \catcode`
\_=
13
5407 \catcode`\|=
13 \catcode`\<=
13 \catcode`\>=
13 \catcode`\+=
13 \catcode`\"=
13
5409 \gdef\initialglyphs{%
5410 % Some changes for non-alphabetic characters. Using the glyphs from the
5411 % math fonts looks more consistent than the typewriter font used elsewhere
5412 % for these characters.
5413 \def\indexbackslash{\math{\backslash}}%
5414 \let\\=
\indexbackslash
5416 % Can't get bold backslash so don't use bold forward slash
5418 \def/
{{\secrmnotbold \normalslash}}%
5419 \def-
{{\normaldash\normaldash}}% en dash `--'
5420 \def^
{{\chapbf \normalcaret}}%
5421 \def~
{{\chapbf \normaltilde}}%
5423 \leavevmode \kern.07em
\vbox{\hrule width
.3em height
.1ex
}\kern .07em
}%
5427 \def+
{$
\normalplus$
}%
5437 % Remove any glue we may have, we'll be inserting our own.
5440 % We like breaks before the index initials, so insert a bonus.
5441 % The glue before the bonus allows a little bit of space at the
5442 % bottom of a column to reduce an increase in inter-line spacing.
5444 \vskip 0pt plus
5\baselineskip
5446 \vskip 0pt plus -
5\baselineskip
5448 % Typeset the initial. Making this add up to a whole number of
5449 % baselineskips increases the chance of the dots lining up from column
5450 % to column. It still won't often be perfect, because of the stretch
5451 % we need before each entry, but it's better.
5453 % No shrink because it confuses \balancecolumns.
5454 \vskip 1.67\baselineskip plus
1\baselineskip
5455 \leftline{\secfonts \kern-
0.05em
\secbf #1}%
5456 % \secfonts is inside the argument of \leftline so that the change of
5457 % \baselineskip will not affect any glue inserted before the vbox that
5458 % \leftline creates.
5459 % Do our best not to break after the initial.
5461 \vskip .33\baselineskip plus
.1\baselineskip
5462 \egroup % \initialglyphs
5465 \newdimen\entryrightmargin
5466 \entryrightmargin=
0pt
5468 % \entry typesets a paragraph consisting of the text (#1), dot leaders, and
5469 % then page number (#2) flushed to the right margin. It is used for index
5470 % and table of contents entries. The paragraph is indented by \leftskip.
5475 % Start a new paragraph if necessary, so our assignments below can't
5476 % affect previous text.
5479 % No extra space above this paragraph.
5482 % When reading the text of entry, convert explicit line breaks
5483 % from @* into spaces. The user might give these in long section
5484 % titles, for instance.
5485 \def\*
{\unskip\space\ignorespaces}%
5486 \def\entrybreak{\hfil\break}% An undocumented command
5488 % A bit of stretch before each entry for the benefit of balancing
5490 \vskip 0pt plus0.5pt
5492 % Swallow the left brace of the text (first parameter):
5493 \afterassignment\doentry
5496 \def\entrybreak{\unskip\space\ignorespaces}%
5498 % Save the text of the entry
5499 \global\setbox\boxA=
\hbox\bgroup
5500 \bgroup % Instead of the swallowed brace.
5502 \aftergroup\finishentry
5503 % And now comes the text of the entry.
5504 % Not absorbing as a macro argument reduces the chance of problems
5505 % with catcodes occurring.
5508 \gdef\finishentry#1{%
5510 \dimen@ =
\wd\boxA % Length of text of entry
5511 \global\setbox\boxA=
\hbox\bgroup\unhbox\boxA
5512 % #1 is the page number.
5514 % Get the width of the page numbers, and only use
5515 % leaders if they are present.
5516 \global\setbox\boxB =
\hbox{#1}%
5517 \ifdim\wd\boxB =
0pt
5518 \null\nobreak\hfill\
%
5521 \null\nobreak\indexdotfill % Have leaders before the page number.
5525 \bgroup\let\domark\relax
5526 \hskip\skip\thinshrinkable\the\toksA
5528 % The redefinion of \domark stops marks being added in \pdflink to
5529 % preserve coloured links across page boundaries. Otherwise the marks
5530 % would get in the way of \lastbox in \insertindexentrybox.
5532 \ifx\XeTeXrevision\thisisundefined
5533 \hskip\skip\thinshrinkable #1%
5536 \bgroup\let\domark\relax
5537 \hskip\skip\thinshrinkable\the\toksA
5543 \ifdim\wd\boxB =
0pt
5544 \global\setbox\entryindexbox=
\vbox{\unhbox\boxA}%
5546 \global\setbox\entryindexbox=
\vbox\bgroup
5547 \prevdepth=
\entrylinedepth
5549 % We want the text of the entries to be aligned to the left, and the
5550 % page numbers to be aligned to the right.
5552 \advance\leftskip by
0pt plus
1fil
5553 \advance\leftskip by
0pt plus -
1fill
5554 \rightskip =
0pt plus -
1fil
5555 \advance\rightskip by
0pt plus
1fill
5556 % Cause last line, which could consist of page numbers on their own
5557 % if the list of page numbers is long, to be aligned to the right.
5558 \parfillskip=
0pt plus -
1fill
5562 \advance\rightskip by
\entryrightmargin
5563 % Determine how far we can stretch into the margin.
5564 % This allows, e.g., "Appendix H GNU Free Documentation License" to
5565 % fit on one line in @letterpaper format.
5566 \ifdim\entryrightmargin>
2.1em
5571 \advance \parfillskip by
0pt minus
1\dimen@i
5574 \advance\dimen@ii by -
1\leftskip
5575 \advance\dimen@ii by -
1\entryrightmargin
5576 \advance\dimen@ii by
1\dimen@i
5577 \ifdim\wd\boxA >
\dimen@ii
% If the entry doesn't fit in one line
5578 \ifdim\dimen@ >
0.8\dimen@ii
% due to long index text
5579 \dimen@ =
0.7\dimen@
% Try to split the text roughly evenly
5581 \advance \dimen@ii by -
1em
5582 \ifnum\dimen@>
\dimen@ii
5583 % If the entry is too long, use the whole line
5586 \advance\leftskip by
0pt plus
1fill
% ragged right
5587 \advance \dimen@ by
1\rightskip
5588 \parshape =
2 0pt
\dimen@
1em
\dimen@ii
5589 % Ideally we'd add a finite glue at the end of the first line only, but
5590 % TeX doesn't seem to provide a way to do such a thing.
5594 % Do not prefer a separate line ending with a hyphen to fewer lines.
5595 \finalhyphendemerits =
0
5597 % Word spacing - no stretch
5598 \spaceskip=
\fontdimen2\font minus
\fontdimen4\font
5600 \linepenalty=
1000 % Discourage line breaks.
5601 \hyphenpenalty=
5000 % Discourage hyphenation.
5603 \par % format the paragraph
5607 % delay text of entry until after penalty
5608 \bgroup\aftergroup\insertindexentrybox
5612 \newskip\thinshrinkable
5613 \skip\thinshrinkable=
.15em minus
.15em
5615 \newbox\entryindexbox
5616 \def\insertindexentrybox{%
5618 % The following gets the depth of the last box. This is for even
5619 % line spacing when entries span several lines.
5620 \setbox\dummybox\vbox{%
5621 \unvbox\entryindexbox
5624 \global\entrylinedepth=
\prevdepth
5626 % Note that we couldn't simply \unvbox\entryindexbox followed by
5627 % \nointerlineskip\lastbox to remove the last box and then reinstate it,
5628 % because this resets how far the box has been \moveleft'ed to 0. \unvbox
5629 % doesn't affect \prevdepth either.
5631 \newdimen\entrylinedepth
5633 % Default is no penalty
5634 \let\entryorphanpenalty\egroup
5636 % Used from \printindex. \firsttoken should be the first token
5637 % after the \entry. If it's not another \entry, we are at the last
5638 % line of a group of index entries, so insert a penalty to discourage
5639 % orphaned index entries.
5640 \long\def\indexorphanpenalty{%
5641 \def\isentry{\entry}%
5642 \ifx\firsttoken\isentry
5644 \unskip\penalty 9000
5645 % The \unskip here stops breaking before the glue. It relies on the
5646 % \vskip above being there, otherwise there is an error
5647 % "You can't use `\unskip' in vertical mode". There has to be glue
5648 % in the current vertical list that hasn't been added to the
5649 % "current page". See Chapter 24 of the TeXbook. This contradicts
5650 % Section 8.3.7 in "TeX by Topic," though.
5652 \egroup % now comes the box added with \aftergroup
5655 % Like plain.tex's \dotfill, except uses up at least 1 em.
5656 % The filll stretch here overpowers both the fil and fill stretch to push
5657 % the page number to the right.
5658 \def\indexdotfill{\cleaders
5659 \hbox{$
\mathsurround=
0pt
\mkern1.5mu.
\mkern1.5mu$
}\hskip 1em plus
1filll
}
5662 \def\primary #1{\line{#1\hfil}}
5664 \newskip\secondaryindent \secondaryindent=
0.5cm
5665 \def\secondary#1#2{{%
5670 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill
5672 \pdfgettoks#2.\
\the\toksA % The page number ends the paragraph.
5674 \ifx\XeTeXrevision\thisisundefined
5677 \pdfgettoks#2.\
\the\toksA % The page number ends the paragraph.
5683 % Define two-column mode, which we use to typeset indexes.
5684 % Adapted from the TeXbook, page 416, which is to say,
5685 % the manmac.tex format used to print the TeXbook itself.
5686 \catcode`\@=
11 % private names
5689 \newdimen\doublecolumnhsize
5690 \newdimen\doublecolumntopgap
5691 \doublecolumntopgap =
0pt
5693 % Use inside an output routine to save \topmark and \firstmark
5695 \global\savedtopmark=
\expandafter{\topmark }%
5696 \global\savedfirstmark=
\expandafter{\firstmark }%
5698 \newtoks\savedtopmark
5699 \newtoks\savedfirstmark
5701 % Set \topmark and \firstmark for next time \output runs.
5702 % Can't be run from withinside \output (because any material
5703 % added while an output routine is active, including
5704 % penalties, is saved for after it finishes). The page so far
5705 % should be empty, otherwise what's on it will be thrown away.
5707 \mark{\the\savedtopmark}%
5709 \setbox\dummybox=
\box\PAGE
5711 % "abc" because output routine doesn't fire for a completely empty page.
5712 \mark{\the\savedfirstmark}%
5715 \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
5716 % If not much space left on page, start a new page.
5717 \ifdim\pagetotal>
0.8\vsize\vfill\eject\fi
5719 % Grab any single-column material above us.
5722 % Here is a possibility not foreseen in manmac: if we accumulate a
5723 % whole lot of material, we might end up calling this \output
5724 % routine twice in a row (see the doublecol-lose test, which is
5725 % essentially a couple of indexes with @setchapternewpage off). In
5726 % that case we just ship out what is in \partialpage with the normal
5727 % output routine. Generally, \partialpage will be empty when this
5728 % runs and this will be a no-op. See the indexspread.tex test case.
5729 \ifvoid\partialpage \else
5730 \onepageout{\pagecontents\partialpage}%
5733 \global\setbox\partialpage =
\vbox{%
5734 % Unvbox the main output page.
5736 \kern-
\topskip \kern\baselineskip
5740 \eject % run that output routine to set \partialpage
5743 % We recover the two marks that the last output routine saved in order
5744 % to propagate the information in marks added around a chapter heading,
5745 % which could be otherwise be lost by the time the final page is output.
5748 % Use the double-column output routine for subsequent pages.
5749 \output =
{\doublecolumnout}%
5751 % Change the page size parameters. We could do this once outside this
5752 % routine, in each of @smallbook, @afourpaper, and the default 8.5x11
5753 % format, but then we repeat the same computation. Repeating a couple
5754 % of assignments once per index is clearly meaningless for the
5755 % execution time, so we may as well do it in one place.
5757 % First we halve the line length, less a little for the gutter between
5758 % the columns. We compute the gutter based on the line length, so it
5759 % changes automatically with the paper format. The magic constant
5760 % below is chosen so that the gutter has the same value (well, +-<1pt)
5761 % as it did when we hard-coded it.
5763 % We put the result in a separate register, \doublecolumhsize, so we
5764 % can restore it in \pagesofar, after \hsize itself has (potentially)
5767 \doublecolumnhsize =
\hsize
5768 \advance\doublecolumnhsize by -
.04154\hsize
5769 \divide\doublecolumnhsize by
2
5770 \hsize =
\doublecolumnhsize
5772 % Double the \vsize as well. (We don't need a separate register here,
5773 % since nobody clobbers \vsize.)
5774 \global\doublecolumntopgap =
\topskip
5775 \global\advance\doublecolumntopgap by -
1\baselineskip
5776 \advance\vsize by -
1\doublecolumntopgap
5779 \global\entrylinedepth=
0pt
\relax
5782 % The double-column output routine for all double-column pages except
5783 % the last, which is done by \balancecolumns.
5785 \def\doublecolumnout{%
5787 \splittopskip=
\topskip \splitmaxdepth=
\maxdepth
5788 % Get the available space for the double columns -- the normal
5789 % (undoubled) page height minus any material left over from the
5793 \advance\dimen@ by -
\ht\partialpage
5795 % box0 will be the left-hand column, box2 the right.
5796 \setbox0=
\vsplit255 to
\dimen@
\setbox2=
\vsplit255 to
\dimen@
5797 \onepageout\pagesofar
5799 \penalty\outputpenalty
5802 % Re-output the contents of the output page -- any previous material,
5803 % followed by the two boxes we just split, in box0 and box2.
5807 \hsize =
\doublecolumnhsize
5808 \wd0=
\hsize \wd2=
\hsize
5810 \vskip\doublecolumntopgap
5811 \hbox to
\txipagewidth{\box0\hfil\box2}}%
5815 % Finished with with double columns.
5816 \def\enddoublecolumns{%
5817 % The following penalty ensures that the page builder is exercised
5818 % _before_ we change the output routine. This is necessary in the
5819 % following situation:
5821 % The last section of the index consists only of a single entry.
5822 % Before this section, \pagetotal is less than \pagegoal, so no
5823 % break occurs before the last section starts. However, the last
5824 % section, consisting of \initial and the single \entry, does not
5825 % fit on the page and has to be broken off. Without the following
5826 % penalty the page builder will not be exercised until \eject
5827 % below, and by that time we'll already have changed the output
5828 % routine to the \balancecolumns version, so the next-to-last
5829 % double-column page will be processed with \balancecolumns, which
5830 % is wrong: The two columns will go to the main vertical list, with
5831 % the broken-off section in the recent contributions. As soon as
5832 % the output routine finishes, TeX starts reconsidering the page
5833 % break. The two columns and the broken-off section both fit on the
5834 % page, because the two columns now take up only half of the page
5835 % goal. When TeX sees \eject from below which follows the final
5836 % section, it invokes the new output routine that we've set after
5837 % \balancecolumns below; \onepageout will try to fit the two columns
5838 % and the final section into the vbox of \txipageheight (see
5839 % \pagebody), causing an overfull box.
5841 % Note that glue won't work here, because glue does not exercise the
5842 % page builder, unlike penalties (see The TeXbook, pp. 280-281).
5846 % Split the last of the double-column material.
5850 % Having called \balancecolumns once, we do not
5851 % want to call it again. Therefore, reset \output to its normal
5852 % definition right away.
5853 \global\output =
{\onepageout{\pagecontents\PAGE}}%
5856 \endgroup % started in \begindoublecolumns
5858 % Leave the double-column material on the current page, no automatic
5860 \box\balancedcolumns
5862 % \pagegoal was set to the doubled \vsize above, since we restarted
5863 % the current page. We're now back to normal single-column
5864 % typesetting, so reset \pagegoal to the normal \vsize (after the
5865 % \endgroup where \vsize got restored).
5868 \newbox\balancedcolumns
5869 \setbox\balancedcolumns=
\vbox{shouldnt see this
}%
5871 % Only called for the last of the double column material. \doublecolumnout
5873 \def\balancecolumns{%
5874 \setbox0 =
\vbox{\unvbox255}% like \box255 but more efficient, see p.120.
5876 \advance\dimen@ by
\topskip
5877 \advance\dimen@ by-
\baselineskip
5878 \ifdim\dimen@<
14\baselineskip
5879 % Don't split a short final column in two.
5882 \divide\dimen@ by
2 % target to split to
5884 \splittopskip =
\topskip
5885 % Loop until the second column is no higher than the first
5889 \global\setbox3 =
\copy0
5890 \global\setbox1 =
\vsplit3 to
\dimen@
5891 % Remove glue from bottom of first column to
5892 % make sure it is higher than the second.
5893 \global\setbox1 =
\vbox{\unvbox1\unpenalty\unskip}%
5895 \global\advance\dimen@ by
1pt
5898 \multiply\dimen@ii by
4
5899 \divide\dimen@ii by
5
5900 \ifdim\ht3<
\dimen@ii
5901 % Column heights are too different, so don't make their bottoms
5902 % flush with each other. The glue at the end of the second column
5903 % allows a second column to stretch, reducing the difference in
5904 % height between the two.
5905 \setbox0=
\vbox to
\dimen@
{\unvbox1\vfill}%
5906 \setbox2=
\vbox to
\dimen@
{\unvbox3\vskip 0pt plus
0.3\ht0}%
5908 \setbox0=
\vbox to
\dimen@
{\unvbox1}%
5909 \setbox2=
\vbox to
\dimen@
{\unvbox3}%
5913 \global\setbox\balancedcolumns=
\vbox{\pagesofar}%
5915 \catcode`\@ =
\other
5918 \message{sectioning,
}
5919 % Chapters, sections, etc.
5921 % Let's start with @part.
5922 \outer\parseargdef\part{\partzzz{#1}}
5926 \vskip.3\vsize % move it down on the page a bit
5928 \noindent \titlefonts\rmisbold #1\par % the text
5929 \let\lastnode=
\empty % no node to associate with
5930 \writetocentry{part
}{#1}{}% but put it in the toc
5931 \headingsoff % no headline or footline on the part page
5932 % This outputs a mark at the end of the page that clears \thischapter
5933 % and \thissection, as is done in \startcontents.
5934 \let\pchapsepmacro\relax
5935 \chapmacro{}{Yomitfromtoc
}{}%
5940 % \unnumberedno is an oxymoron. But we count the unnumbered
5941 % sections so that we can refer to them unambiguously in the pdf
5942 % outlines by their "section number". We avoid collisions with chapter
5943 % numbers by starting them at 10000. (If a document ever has 10000
5944 % chapters, we're in trouble anyway, I'm sure.)
5945 \newcount\unnumberedno \unnumberedno =
10000
5947 \newcount\secno \secno=
0
5948 \newcount\subsecno \subsecno=
0
5949 \newcount\subsubsecno \subsubsecno=
0
5951 % This counter is funny since it counts through charcodes of letters A, B, ...
5952 \newcount\appendixno \appendixno = `\@
5954 % \def\appendixletter{\char\the\appendixno}
5955 % We do the following ugly conditional instead of the above simple
5956 % construct for the sake of pdftex, which needs the actual
5957 % letter in the expansion, not just typeset.
5959 \def\appendixletter{%
5960 \ifnum\appendixno=`A A
%
5961 \else\ifnum\appendixno=`B B
%
5962 \else\ifnum\appendixno=`C C
%
5963 \else\ifnum\appendixno=`D D
%
5964 \else\ifnum\appendixno=`E E
%
5965 \else\ifnum\appendixno=`F F
%
5966 \else\ifnum\appendixno=`G G
%
5967 \else\ifnum\appendixno=`H H
%
5968 \else\ifnum\appendixno=`I I
%
5969 \else\ifnum\appendixno=`J J
%
5970 \else\ifnum\appendixno=`K K
%
5971 \else\ifnum\appendixno=`L L
%
5972 \else\ifnum\appendixno=`M M
%
5973 \else\ifnum\appendixno=`N N
%
5974 \else\ifnum\appendixno=`O O
%
5975 \else\ifnum\appendixno=`P P
%
5976 \else\ifnum\appendixno=`Q Q
%
5977 \else\ifnum\appendixno=`R R
%
5978 \else\ifnum\appendixno=`S S
%
5979 \else\ifnum\appendixno=`T T
%
5980 \else\ifnum\appendixno=`U U
%
5981 \else\ifnum\appendixno=`V V
%
5982 \else\ifnum\appendixno=`W W
%
5983 \else\ifnum\appendixno=`X X
%
5984 \else\ifnum\appendixno=`Y Y
%
5985 \else\ifnum\appendixno=`Z Z
%
5986 % The \the is necessary, despite appearances, because \appendixletter is
5987 % expanded while writing the .toc file. \char\appendixno is not
5988 % expandable, thus it is written literally, thus all appendixes come out
5989 % with the same letter (or @) in the toc without it.
5990 \else\char\the\appendixno
5991 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
5992 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
5994 % Each @chapter defines these (using marks) as the number+name, number
5995 % and name of the chapter. Page headings and footings can use
5996 % these. @section does likewise.
5998 \def\thischapternum{}
5999 \def\thischaptername{}
6001 \def\thissectionnum{}
6002 \def\thissectionname{}
6004 \newcount\absseclevel % used to calculate proper heading level
6005 \newcount\secbase\secbase=
0 % @raisesections/@lowersections modify this count
6007 % @raisesections: treat @section as chapter, @subsection as section, etc.
6008 \def\raisesections{\global\advance\secbase by -
1}
6009 \let\up=
\raisesections % original BFox name
6011 % @lowersections: treat @chapter as section, @section as subsection, etc.
6012 \def\lowersections{\global\advance\secbase by
1}
6013 \let\down=
\lowersections % original BFox name
6015 % we only have subsub.
6016 \chardef\maxseclevel =
3
6018 % A numbered section within an unnumbered changes to unnumbered too.
6019 % To achieve this, remember the "biggest" unnum. sec. we are currently in:
6020 \chardef\unnlevel =
\maxseclevel
6022 % Trace whether the current chapter is an appendix or not:
6023 % \chapheadtype is "N" or "A", unnumbered chapters are ignored.
6024 \def\chapheadtype{N
}
6026 % Choose a heading macro
6027 % #1 is heading type
6028 % #2 is heading level
6029 % #3 is text for heading
6030 \def\genhead#1#2#3{%
6031 % Compute the abs. sec. level:
6033 \advance\absseclevel by
\secbase
6034 % Make sure \absseclevel doesn't fall outside the range:
6035 \ifnum \absseclevel <
0
6038 \ifnum \absseclevel >
3
6045 \ifnum \absseclevel <
\unnlevel
6046 \chardef\unnlevel =
\absseclevel
6049 % Check for appendix sections:
6050 \ifnum \absseclevel =
0
6051 \edef\chapheadtype{\headtype}%
6053 \if \headtype A
\if \chapheadtype N
%
6054 \errmessage{@appendix... within a non-appendix chapter
}%
6057 % Check for numbered within unnumbered:
6058 \ifnum \absseclevel >
\unnlevel
6061 \chardef\unnlevel =
3
6064 % Now print the heading:
6068 \or \unnumberedseczzz{#3}%
6069 \or \unnumberedsubseczzz{#3}%
6070 \or \unnumberedsubsubseczzz{#3}%
6076 \or \appendixsectionzzz{#3}%
6077 \or \appendixsubseczzz{#3}%
6078 \or \appendixsubsubseczzz{#3}%
6084 \or \numberedsubseczzz{#3}%
6085 \or \numberedsubsubseczzz{#3}%
6089 \suppressfirstparagraphindent
6093 \def\numhead{\genhead N
}
6094 \def\apphead{\genhead A
}
6095 \def\unnmhead{\genhead U
}
6097 % @chapter, @appendix, @unnumbered. Increment top-level counter, reset
6098 % all lower-level sectioning counters to zero.
6100 % Also set \chaplevelprefix, which we prepend to @float sequence numbers
6101 % (e.g., figures), q.v. By default (before any chapter), that is empty.
6102 \let\chaplevelprefix =
\empty
6104 \outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz
6106 % section resetting is \global in case the chapter is in a group, such
6107 % as an @include file.
6108 \global\secno=
0 \global\subsecno=
0 \global\subsubsecno=
0
6109 \global\advance\chapno by
1
6112 \gdef\chaplevelprefix{\the\chapno.
}%
6115 % \putwordChapter can contain complex things in translations.
6116 \toks0=
\expandafter{\putwordChapter}%
6117 \message{\the\toks0 \space \the\chapno}%
6119 % Write the actual heading.
6120 \chapmacro{#1}{Ynumbered
}{\the\chapno}%
6122 % So @section and the like are numbered underneath this chapter.
6123 \global\let\section =
\numberedsec
6124 \global\let\subsection =
\numberedsubsec
6125 \global\let\subsubsection =
\numberedsubsubsec
6128 \outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz
6130 \def\appendixzzz#1{%
6131 \global\secno=
0 \global\subsecno=
0 \global\subsubsecno=
0
6132 \global\advance\appendixno by
1
6133 \gdef\chaplevelprefix{\appendixletter.
}%
6136 % \putwordAppendix can contain complex things in translations.
6137 \toks0=
\expandafter{\putwordAppendix}%
6138 \message{\the\toks0 \space \appendixletter}%
6140 \chapmacro{#1}{Yappendix
}{\appendixletter}%
6142 \global\let\section =
\appendixsec
6143 \global\let\subsection =
\appendixsubsec
6144 \global\let\subsubsection =
\appendixsubsubsec
6147 % normally unnmhead0 calls unnumberedzzz:
6148 \outer\parseargdef\unnumbered{\unnmhead0{#1}}
6149 \def\unnumberedzzz#1{%
6150 \global\secno=
0 \global\subsecno=
0 \global\subsubsecno=
0
6151 \global\advance\unnumberedno by
1
6153 % Since an unnumbered has no number, no prefix for figures.
6154 \global\let\chaplevelprefix =
\empty
6157 % This used to be simply \message{#1}, but TeX fully expands the
6158 % argument to \message. Therefore, if #1 contained @-commands, TeX
6159 % expanded them. For example, in `@unnumbered The @cite{Book}', TeX
6160 % expanded @cite (which turns out to cause errors because \cite is meant
6161 % to be executed, not expanded).
6163 % Anyway, we don't want the fully-expanded definition of @cite to appear
6164 % as a result of the \message, we just want `@cite' itself. We use
6165 % \the<toks register> to achieve this: TeX expands \the<toks> only once,
6166 % simply yielding the contents of <toks register>. (We also do this for
6169 \message{(
\the\toks0)
}%
6171 \chapmacro{#1}{Ynothing
}{\the\unnumberedno}%
6173 \global\let\section =
\unnumberedsec
6174 \global\let\subsection =
\unnumberedsubsec
6175 \global\let\subsubsection =
\unnumberedsubsubsec
6178 % @centerchap is like @unnumbered, but the heading is centered.
6179 \outer\parseargdef\centerchap{%
6180 \let\centerparametersmaybe =
\centerparameters
6182 \let\centerparametersmaybe =
\relax
6185 % @top is like @unnumbered.
6190 \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz
6192 \global\subsecno=
0 \global\subsubsecno=
0 \global\advance\secno by
1
6193 \sectionheading{#1}{sec
}{Ynumbered
}{\the\chapno.
\the\secno}%
6196 % normally calls appendixsectionzzz:
6197 \outer\parseargdef\appendixsection{\apphead1{#1}}
6198 \def\appendixsectionzzz#1{%
6199 \global\subsecno=
0 \global\subsubsecno=
0 \global\advance\secno by
1
6200 \sectionheading{#1}{sec
}{Yappendix
}{\appendixletter.
\the\secno}%
6202 \let\appendixsec\appendixsection
6204 % normally calls unnumberedseczzz:
6205 \outer\parseargdef\unnumberedsec{\unnmhead1{#1}}
6206 \def\unnumberedseczzz#1{%
6207 \global\subsecno=
0 \global\subsubsecno=
0 \global\advance\secno by
1
6208 \sectionheading{#1}{sec
}{Ynothing
}{\the\unnumberedno.
\the\secno}%
6213 % normally calls numberedsubseczzz:
6214 \outer\parseargdef\numberedsubsec{\numhead2{#1}}
6215 \def\numberedsubseczzz#1{%
6216 \global\subsubsecno=
0 \global\advance\subsecno by
1
6217 \sectionheading{#1}{subsec
}{Ynumbered
}{\the\chapno.
\the\secno.
\the\subsecno}%
6220 % normally calls appendixsubseczzz:
6221 \outer\parseargdef\appendixsubsec{\apphead2{#1}}
6222 \def\appendixsubseczzz#1{%
6223 \global\subsubsecno=
0 \global\advance\subsecno by
1
6224 \sectionheading{#1}{subsec
}{Yappendix
}%
6225 {\appendixletter.
\the\secno.
\the\subsecno}%
6228 % normally calls unnumberedsubseczzz:
6229 \outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}}
6230 \def\unnumberedsubseczzz#1{%
6231 \global\subsubsecno=
0 \global\advance\subsecno by
1
6232 \sectionheading{#1}{subsec
}{Ynothing
}%
6233 {\the\unnumberedno.
\the\secno.
\the\subsecno}%
6238 % normally numberedsubsubseczzz:
6239 \outer\parseargdef\numberedsubsubsec{\numhead3{#1}}
6240 \def\numberedsubsubseczzz#1{%
6241 \global\advance\subsubsecno by
1
6242 \sectionheading{#1}{subsubsec
}{Ynumbered
}%
6243 {\the\chapno.
\the\secno.
\the\subsecno.
\the\subsubsecno}%
6246 % normally appendixsubsubseczzz:
6247 \outer\parseargdef\appendixsubsubsec{\apphead3{#1}}
6248 \def\appendixsubsubseczzz#1{%
6249 \global\advance\subsubsecno by
1
6250 \sectionheading{#1}{subsubsec
}{Yappendix
}%
6251 {\appendixletter.
\the\secno.
\the\subsecno.
\the\subsubsecno}%
6254 % normally unnumberedsubsubseczzz:
6255 \outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}}
6256 \def\unnumberedsubsubseczzz#1{%
6257 \global\advance\subsubsecno by
1
6258 \sectionheading{#1}{subsubsec
}{Ynothing
}%
6259 {\the\unnumberedno.
\the\secno.
\the\subsecno.
\the\subsubsecno}%
6262 % These macros control what the section commands do, according
6263 % to what kind of chapter we are in (ordinary, appendix, or unnumbered).
6264 % Define them by default for a numbered chapter.
6265 \let\section =
\numberedsec
6266 \let\subsection =
\numberedsubsec
6267 \let\subsubsection =
\numberedsubsubsec
6269 % Define @majorheading, @heading and @subheading
6272 {\advance\chapheadingskip by
10pt
\chapbreak }%
6273 \parsearg\chapheadingzzz
6276 \def\chapheading{\chapbreak \parsearg\chapheadingzzz}
6277 \def\chapheadingzzz#1{%
6278 \vbox{\chapfonts \raggedtitlesettings #1\par}%
6279 \nobreak\bigskip \nobreak
6280 \suppressfirstparagraphindent
6283 % @heading, @subheading, @subsubheading.
6284 \parseargdef\heading{\sectionheading{#1}{sec
}{Yomitfromtoc
}{}
6285 \suppressfirstparagraphindent}
6286 \parseargdef\subheading{\sectionheading{#1}{subsec
}{Yomitfromtoc
}{}
6287 \suppressfirstparagraphindent}
6288 \parseargdef\subsubheading{\sectionheading{#1}{subsubsec
}{Yomitfromtoc
}{}
6289 \suppressfirstparagraphindent}
6291 % These macros generate a chapter, section, etc. heading only
6292 % (including whitespace, linebreaking, etc. around it),
6293 % given all the information in convenient, parsed form.
6295 % Args are the skip and penalty (usually negative)
6296 \def\dobreak#1#2{\par\ifdim\lastskip<
#1\removelastskip\penalty#2\vskip#1\fi}
6298 % Parameter controlling skip before chapter headings (if needed)
6299 \newskip\chapheadingskip
6301 % Define plain chapter starts, and page on/off switching for it.
6302 \def\chapbreak{\dobreak \chapheadingskip {-
4000}}
6305 \def\chappager{\par\vfill\supereject}
6307 % \chapoddpage - start on an odd page for a new chapter
6308 % Because \domark is called before \chapoddpage, the filler page will
6309 % get the headings for the next chapter, which is wrong. But we don't
6310 % care -- we just disable all headings on the filler page.
6322 \parseargdef\setchapternewpage{\csname CHAPPAG
#1\endcsname}
6325 \global\let\contentsalignmacro =
\chappager
6326 \global\let\pchapsepmacro=
\chapbreak
6327 \global\let\pagealignmacro=
\chappager}
6330 \global\let\contentsalignmacro =
\chappager
6331 \global\let\pchapsepmacro=
\chappager
6332 \global\let\pagealignmacro=
\chappager
6333 \global\def\HEADINGSon{\HEADINGSsingle}}
6336 \global\let\contentsalignmacro =
\chapoddpage
6337 \global\let\pchapsepmacro=
\chapoddpage
6338 \global\let\pagealignmacro=
\chapoddpage
6339 \global\def\HEADINGSon{\HEADINGSdouble}}
6343 % \chapmacro - Chapter opening.
6345 % #1 is the text, #2 is the section type (Ynumbered, Ynothing,
6346 % Yappendix, Yomitfromtoc), #3 the chapter number.
6347 % Not used for @heading series.
6349 % To test against our argument.
6350 \def\Ynothingkeyword{Ynothing
}
6351 \def\Yappendixkeyword{Yappendix
}
6352 \def\Yomitfromtockeyword{Yomitfromtoc
}
6354 \def\chapmacro#1#2#3{%
6355 \expandafter\ifx\thisenv\titlepage\else
6356 \checkenv{}% chapters, etc., should not start inside an environment.
6358 % FIXME: \chapmacro is currently called from inside \titlepage when
6359 % \setcontentsaftertitlepage to print the "Table of Contents" heading, but
6360 % this should probably be done by \sectionheading with an option to print
6363 % Insert the first mark before the heading break (see notes for \domark).
6364 \let\prevchapterdefs=
\lastchapterdefs
6365 \let\prevsectiondefs=
\lastsectiondefs
6366 \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}%
6367 \gdef\thissection{}}%
6370 \ifx\temptype\Ynothingkeyword
6371 \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
6372 \gdef\thischapter{\thischaptername}}%
6373 \else\ifx\temptype\Yomitfromtockeyword
6374 \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
6375 \gdef\thischapter{}}%
6376 \else\ifx\temptype\Yappendixkeyword
6378 \xdef\lastchapterdefs{%
6379 \gdef\noexpand\thischaptername{\the\toks0}%
6380 \gdef\noexpand\thischapternum{\appendixletter}%
6381 % \noexpand\putwordAppendix avoids expanding indigestible
6382 % commands in some of the translations.
6383 \gdef\noexpand\thischapter{\noexpand\putwordAppendix{}
6384 \noexpand\thischapternum:
6385 \noexpand\thischaptername}%
6389 \xdef\lastchapterdefs{%
6390 \gdef\noexpand\thischaptername{\the\toks0}%
6391 \gdef\noexpand\thischapternum{\the\chapno}%
6392 % \noexpand\putwordChapter avoids expanding indigestible
6393 % commands in some of the translations.
6394 \gdef\noexpand\thischapter{\noexpand\putwordChapter{}
6395 \noexpand\thischapternum:
6396 \noexpand\thischaptername}%
6400 % Output the mark. Pass it through \safewhatsit, to take care of
6401 % the preceding space.
6404 % Insert the chapter heading break.
6407 % Now the second mark, after the heading break. No break points
6408 % between here and the heading.
6409 \let\prevchapterdefs=
\lastchapterdefs
6410 \let\prevsectiondefs=
\lastsectiondefs
6414 \chapfonts \rmisbold
6415 \let\footnote=
\errfootnoteheading % give better error message
6417 % Have to define \lastsection before calling \donoderef, because the
6418 % xref code eventually uses it. On the other hand, it has to be called
6419 % after \pchapsepmacro, or the headline will change too soon.
6420 \gdef\lastsection{#1}%
6422 % Only insert the separating space if we have a chapter/appendix
6423 % number, and don't print the unnumbered ``number''.
6424 \ifx\temptype\Ynothingkeyword
6426 \def\toctype{unnchap
}%
6427 \else\ifx\temptype\Yomitfromtockeyword
6428 \setbox0 =
\hbox{}% contents like unnumbered, but no toc entry
6430 \else\ifx\temptype\Yappendixkeyword
6431 \setbox0 =
\hbox{\putwordAppendix{} #3\enspace}%
6434 \setbox0 =
\hbox{#3\enspace}%
6435 \def\toctype{numchap
}%
6438 % Write the toc entry for this chapter. Must come before the
6439 % \donoderef, because we include the current node name in the toc
6440 % entry, and \donoderef resets it to empty.
6441 \writetocentry{\toctype}{#1}{#3}%
6443 % For pdftex, we have to write out the node definition (aka, make
6444 % the pdfdest) after any page break, but before the actual text has
6445 % been typeset. If the destination for the pdf outline is after the
6446 % text, then jumping from the outline may wind up with the text not
6447 % being visible, for instance under high magnification.
6450 % Typeset the actual heading.
6451 \nobreak % Avoid page breaks at the interline glue.
6452 \vbox{\raggedtitlesettings \hangindent=
\wd0 \centerparametersmaybe
6455 \nobreak\bigskip % no page break after a chapter title
6459 % @centerchap -- centered and unnumbered.
6460 \let\centerparametersmaybe =
\relax
6461 \def\centerparameters{%
6462 \advance\rightskip by
3\rightskip
6463 \leftskip =
\rightskip
6468 % Section titles. These macros combine the section number parts and
6469 % call the generic \sectionheading to do the printing.
6471 \newskip\secheadingskip
6472 \def\secheadingbreak{\dobreak \secheadingskip{-
1000}}
6474 % Subsection titles.
6475 \newskip\subsecheadingskip
6476 \def\subsecheadingbreak{\dobreak \subsecheadingskip{-
500}}
6478 % Subsubsection titles.
6479 \def\subsubsecheadingskip{\subsecheadingskip}
6480 \def\subsubsecheadingbreak{\subsecheadingbreak}
6483 % Print any size, any type, section title.
6485 % #1 is the text of the title,
6486 % #2 is the section level (sec/subsec/subsubsec),
6487 % #3 is the section type (Ynumbered, Ynothing, Yappendix, Yomitfromtoc),
6488 % #4 is the section number.
6490 \def\seckeyword{sec
}
6492 \def\sectionheading#1#2#3#4{%
6494 \def\sectionlevel{#2}%
6497 % It is ok for the @heading series commands to appear inside an
6498 % environment (it's been historically allowed, though the logic is
6499 % dubious), but not the others.
6500 \ifx\temptype\Yomitfromtockeyword\else
6501 \checkenv{}% non-@*heading should not be in an environment.
6503 \let\footnote=
\errfootnoteheading
6505 % Switch to the right set of fonts.
6506 \csname #2fonts
\endcsname \rmisbold
6508 % Insert first mark before the heading break (see notes for \domark).
6509 \let\prevsectiondefs=
\lastsectiondefs
6510 \ifx\temptype\Ynothingkeyword
6511 \ifx\sectionlevel\seckeyword
6512 \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}%
6513 \gdef\thissection{\thissectionname}}%
6515 \else\ifx\temptype\Yomitfromtockeyword
6516 % Don't redefine \thissection.
6517 \else\ifx\temptype\Yappendixkeyword
6518 \ifx\sectionlevel\seckeyword
6520 \xdef\lastsectiondefs{%
6521 \gdef\noexpand\thissectionname{\the\toks0}%
6522 \gdef\noexpand\thissectionnum{#4}%
6523 % \noexpand\putwordSection avoids expanding indigestible
6524 % commands in some of the translations.
6525 \gdef\noexpand\thissection{\noexpand\putwordSection{}
6526 \noexpand\thissectionnum:
6527 \noexpand\thissectionname}%
6531 \ifx\sectionlevel\seckeyword
6533 \xdef\lastsectiondefs{%
6534 \gdef\noexpand\thissectionname{\the\toks0}%
6535 \gdef\noexpand\thissectionnum{#4}%
6536 % \noexpand\putwordSection avoids expanding indigestible
6537 % commands in some of the translations.
6538 \gdef\noexpand\thissection{\noexpand\putwordSection{}
6539 \noexpand\thissectionnum:
6540 \noexpand\thissectionname}%
6545 % Go into vertical mode. Usually we'll already be there, but we
6546 % don't want the following whatsit to end up in a preceding paragraph
6547 % if the document didn't happen to have a blank line.
6550 % Output the mark. Pass it through \safewhatsit, to take care of
6551 % the preceding space.
6554 % Insert space above the heading.
6555 \csname #2headingbreak
\endcsname
6557 % Now the second mark, after the heading break. No break points
6558 % between here and the heading.
6559 \global\let\prevsectiondefs=
\lastsectiondefs
6562 % Only insert the space after the number if we have a section number.
6563 \ifx\temptype\Ynothingkeyword
6566 \gdef\lastsection{#1}%
6567 \else\ifx\temptype\Yomitfromtockeyword
6568 % for @headings -- no section number, don't include in toc,
6569 % and don't redefine \lastsection.
6572 \let\sectionlevel=
\empty
6573 \else\ifx\temptype\Yappendixkeyword
6574 \setbox0 =
\hbox{#4\enspace}%
6576 \gdef\lastsection{#1}%
6578 \setbox0 =
\hbox{#4\enspace}%
6580 \gdef\lastsection{#1}%
6583 % Write the toc entry (before \donoderef). See comments in \chapmacro.
6584 \writetocentry{\toctype\sectionlevel}{#1}{#4}%
6586 % Write the node reference (= pdf destination for pdftex).
6587 % Again, see comments in \chapmacro.
6590 % Interline glue will be inserted when the vbox is completed.
6591 % That glue will be a valid breakpoint for the page, since it'll be
6592 % preceded by a whatsit (usually from the \donoderef, or from the
6593 % \writetocentry if there was no node). We don't want to allow that
6594 % break, since then the whatsits could end up on page n while the
6595 % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000.
6598 % Output the actual section heading.
6599 \vbox{\hyphenpenalty=
10000 \tolerance=
5000 \parindent=
0pt
\ptexraggedright
6600 \hangindent=
\wd0 % zero if no section number
6603 % Add extra space after the heading -- half of whatever came above it.
6604 % Don't allow stretch, though.
6605 \kern .5 \csname #2headingskip
\endcsname
6607 % Do not let the kern be a potential breakpoint, as it would be if it
6608 % was followed by glue.
6611 % We'll almost certainly start a paragraph next, so don't let that
6612 % glue accumulate. (Not a breakpoint because it's preceded by a
6613 % discardable item.) However, when a paragraph is not started next
6614 % (\startdefun, \cartouche, \center, etc.), this needs to be wiped out
6615 % or the negative glue will cause weirdly wrong output, typically
6616 % obscuring the section heading with something else.
6619 % This is so the last item on the main vertical list is a known
6620 % \penalty > 10000, so \startdefun, etc., can recognize the situation
6621 % and do the needful.
6627 % Table of contents.
6630 % Write an entry to the toc file, opening it if necessary.
6631 % Called from @chapter, etc.
6633 % Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno}
6634 % We append the current node name (if any) and page number as additional
6635 % arguments for the \{chap,sec,...}entry macros which will eventually
6636 % read this. The node name is used in the pdf outlines as the
6637 % destination to jump to.
6639 % We open the .toc file for writing here instead of at @setfilename (or
6640 % any other fixed time) so that @contents can be anywhere in the document.
6641 % But if #1 is `omit', then we don't do anything. This is used for the
6642 % table of contents chapter openings themselves.
6644 \newif\iftocfileopened
6645 \def\omitkeyword{omit
}%
6647 \def\writetocentry#1#2#3{%
6648 \edef\writetoctype{#1}%
6649 \ifx\writetoctype\omitkeyword \else
6650 \iftocfileopened\else
6651 \immediate\openout\tocfile =
\jobname.toc
6652 \global\tocfileopenedtrue
6658 \write\tocfile{@
#1entry
{#2}{#3}{\lastnode}{\noexpand\folio}}}%
6664 % Tell \shipout to create a pdf destination on each page, if we're
6665 % writing pdf. These are used in the table of contents. We can't
6666 % just write one on every page because the title pages are numbered
6667 % 1 and 2 (the page numbers aren't printed), and so are the first
6668 % two pages of the document. Thus, we'd have two destinations named
6669 % `1', and two named `2'.
6670 \ifpdf \global\pdfmakepagedesttrue \fi
6674 % These characters do not print properly in the Computer Modern roman
6675 % fonts, so we must take special care. This is more or less redundant
6676 % with the Texinfo input format setup at the end of this file.
6678 \def\activecatcodes{%
6691 % Read the toc file, which is essentially Texinfo input.
6695 \input \tocreadfilename
6698 \newskip\contentsrightmargin \contentsrightmargin=
1in
6699 \newcount\savepageno
6700 \newcount\lastnegativepageno \lastnegativepageno = -
1
6702 % Prepare to read what we've written to \tocfile.
6704 \def\startcontents#1{%
6705 % If @setchapternewpage on, and @headings double, the contents should
6706 % start on an odd page, unlike chapters. Thus, we maintain
6707 % \contentsalignmacro in parallel with \pagealignmacro.
6708 % From: Torbjorn Granlund <tege@matematik.su.se>
6710 \immediate\closeout\tocfile
6712 % Don't need to put `Contents' or `Short Contents' in the headline.
6713 % It is abundantly clear what they are.
6714 \chapmacro{#1}{Yomitfromtoc
}{}%
6716 \savepageno =
\pageno
6717 \begingroup % Set up to handle contents files properly.
6718 \raggedbottom % Worry more about breakpoints than the bottom.
6719 \entryrightmargin=
\contentsrightmargin % Don't use the full line length.
6721 % Roman numerals for page numbers.
6722 \ifnum \pageno>
0 \global\pageno =
\lastnegativepageno \fi
6725 % redefined for the two-volume lispref. We always output on
6726 % \jobname.toc even if this is redefined.
6728 \def\tocreadfilename{\jobname.toc
}
6730 % Normal (long) toc.
6733 \startcontents{\putwordTOC}%
6734 \openin 1 \tocreadfilename\space
6739 \contentsalignmacro % in case @setchapternewpage odd is in effect
6745 \lastnegativepageno =
\pageno
6746 \global\pageno =
\savepageno
6749 % And just the chapters.
6750 \def\summarycontents{%
6751 \startcontents{\putwordShortTOC}%
6753 \let\partentry =
\shortpartentry
6754 \let\numchapentry =
\shortchapentry
6755 \let\appentry =
\shortchapentry
6756 \let\unnchapentry =
\shortunnchapentry
6757 % We want a true roman here for the page numbers.
6759 \let\rm=
\shortcontrm \let\bf=
\shortcontbf
6760 \let\sl=
\shortcontsl \let\tt=
\shortconttt
6762 \hyphenpenalty =
10000
6763 \advance\baselineskip by
1pt
% Open it up a little.
6764 \def\numsecentry#
#1#
#2#
#3#
#4{}
6765 \let\appsecentry =
\numsecentry
6766 \let\unnsecentry =
\numsecentry
6767 \let\numsubsecentry =
\numsecentry
6768 \let\appsubsecentry =
\numsecentry
6769 \let\unnsubsecentry =
\numsecentry
6770 \let\numsubsubsecentry =
\numsecentry
6771 \let\appsubsubsecentry =
\numsecentry
6772 \let\unnsubsubsecentry =
\numsecentry
6773 \openin 1 \tocreadfilename\space
6779 \contentsalignmacro % in case @setchapternewpage odd is in effect
6781 \lastnegativepageno =
\pageno
6782 \global\pageno =
\savepageno
6784 \let\shortcontents =
\summarycontents
6786 % Typeset the label for a chapter or appendix for the short contents.
6787 % The arg is, e.g., `A' for an appendix, or `3' for a chapter.
6789 \def\shortchaplabel#1{%
6790 % This space should be enough, since a single number is .5em, and the
6791 % widest letter (M) is 1em, at least in the Computer Modern fonts.
6792 % But use \hss just in case.
6793 % (This space doesn't include the extra space that gets added after
6794 % the label; that gets put in by \shortchapentry above.)
6796 % We'd like to right-justify chapter numbers, but that looks strange
6797 % with appendix letters. And right-justifying numbers and
6798 % left-justifying letters looks strange when there is less than 10
6799 % chapters. Have to read the whole toc once to know how many chapters
6800 % there are before deciding ...
6801 \hbox to
1em
{#1\hss}%
6804 % These macros generate individual entries in the table of contents.
6805 % The first argument is the chapter or section name.
6806 % The last argument is the page number.
6807 % The arguments in between are the chapter number, section number, ...
6809 % Parts, in the main contents. Replace the part number, which doesn't
6810 % exist, with an empty box. Let's hope all the numbers have the same width.
6811 % Also ignore the page number, which is conventionally not printed.
6812 \def\numeralbox{\setbox0=
\hbox{8}\hbox to
\wd0{\hfil}}
6813 \def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}}
6815 % Parts, in the short toc.
6816 \def\shortpartentry#1#2#3#4{%
6818 \vskip.5\baselineskip plus
.15\baselineskip minus
.1\baselineskip
6819 \shortchapentry{{\bf #1}}{\numeralbox}{}{}%
6822 % Chapters, in the main contents.
6823 \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
6825 % Chapters, in the short toc.
6826 % See comments in \dochapentry re vbox and related settings.
6827 \def\shortchapentry#1#2#3#4{%
6828 \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}%
6831 % Appendices, in the main contents.
6832 % Need the word Appendix, and a fixed-size box.
6834 \def\appendixbox#1{%
6835 % We use M since it's probably the widest letter.
6836 \setbox0 =
\hbox{\putwordAppendix{} M
}%
6837 \hbox to
\wd0{\putwordAppendix{} #1\hss}}
6839 \def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\hskip.7em
#1}{#4}}
6841 % Unnumbered chapters.
6842 \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}}
6843 \def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}}
6846 \def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}}
6847 \let\appsecentry=
\numsecentry
6848 \def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}}
6851 \def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}}
6852 \let\appsubsecentry=
\numsubsecentry
6853 \def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}}
6855 % And subsubsections.
6856 \def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}}
6857 \let\appsubsubsecentry=
\numsubsubsecentry
6858 \def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}}
6860 % This parameter controls the indentation of the various levels.
6861 % Same as \defaultparindent.
6862 \newdimen\tocindent \tocindent =
15pt
6864 % Now for the actual typesetting. In all these, #1 is the text and #2 is the
6867 % If the toc has to be broken over pages, we want it to be at chapters
6868 % if at all possible; hence the \penalty.
6869 \def\dochapentry#1#2{%
6870 \penalty-
300 \vskip1\baselineskip plus
.33\baselineskip minus
.25\baselineskip
6872 % Move the page numbers slightly to the right
6873 \advance\entryrightmargin by -
0.05em
6875 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
6877 \nobreak\vskip .25\baselineskip plus
.1\baselineskip
6880 \def\dosecentry#1#2{\begingroup
6881 \secentryfonts \leftskip=
\tocindent
6882 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
6885 \def\dosubsecentry#1#2{\begingroup
6886 \subsecentryfonts \leftskip=
2\tocindent
6887 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
6890 \def\dosubsubsecentry#1#2{\begingroup
6891 \subsubsecentryfonts \leftskip=
3\tocindent
6892 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
6895 % We use the same \entry macro as for the index entries.
6896 \let\tocentry =
\entry
6898 % Space between chapter (or whatever) number and the title.
6899 \def\labelspace{\hskip1em \relax}
6901 \def\dopageno#1{{\rm #1}}
6902 \def\doshortpageno#1{{\rm #1}}
6904 \def\chapentryfonts{\secfonts \rm}
6905 \def\secentryfonts{\textfonts}
6906 \def\subsecentryfonts{\textfonts}
6907 \def\subsubsecentryfonts{\textfonts}
6910 \message{environments,
}
6911 % @foo ... @end foo.
6913 % @tex ... @end tex escapes into raw TeX temporarily.
6914 % One exception: @ is still an escape character, so that @end tex works.
6915 % But \@ or @@ will get a plain @ character.
6918 \setupmarkupstyle{tex
}%
6919 \catcode `\\=
0 \catcode `\
{=
1 \catcode `\
}=
2
6920 \catcode `\$=
3 \catcode `\&=
4 \catcode `\#=
6
6921 \catcode `\^=
7 \catcode `
\_=
8 \catcode `\~=
\active \let~=
\tie
6932 % ' is active in math mode (mathcode"8000). So reset it, and all our
6933 % other math active characters (just in case), to plain's definitions.
6936 % Inverse of the list at the beginning of the file.
6938 \let\bullet=
\ptexbullet
6943 \let\equiv=
\ptexequiv
6946 \let\indent=
\ptexindent
6947 \let\noindent=
\ptexnoindent
6954 %\let\sup=\ptexsup % do not redefine, we want @sup to work in math mode
6956 \expandafter \let\csname top
\endcsname=
\ptextop % we've made it outer
6957 \let\frenchspacing=
\plainfrenchspacing
6959 \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
6960 \def\enddots{\relax\ifmmode\endldots\else$
\mathsurround=
0pt
\endldots\,$
\fi}%
6963 % There is no need to define \Etex.
6965 % Define @lisp ... @end lisp.
6966 % @lisp environment forms a group so it can rebind things,
6967 % including the definition of @end lisp (which normally is erroneous).
6969 % Amount to narrow the margins by for @lisp.
6970 \newskip\lispnarrowing \lispnarrowing=
0.4in
6972 % This is the definition that ^^M gets inside @lisp, @example, and other
6973 % such environments. \null is better than a space, since it doesn't
6975 \def\lisppar{\null\endgraf}
6977 % This space is always present above and below environments.
6978 \newskip\envskipamount \envskipamount =
0pt
6980 % Make spacing and below environment symmetrical. We use \parskip here
6981 % to help in doing that, since in @example-like environments \parskip
6982 % is reset to zero; thus the \afterenvbreak inserts no space -- but the
6983 % start of the next paragraph will insert \parskip.
6985 \def\aboveenvbreak{{%
6986 % =10000 instead of <10000 because of a special case in \itemzzz and
6987 % \sectionheading, q.v.
6988 \ifnum \lastpenalty=
10000 \else
6989 \advance\envskipamount by
\parskip
6991 \ifdim\lastskip<
\envskipamount
6993 \ifnum\lastpenalty<
10000
6994 % Penalize breaking before the environment, because preceding text
6995 % often leads into it.
6998 \vskip\envskipamount
7003 \def\afterenvbreak{{%
7004 % =10000 instead of <10000 because of a special case in \itemzzz and
7005 % \sectionheading, q.v.
7006 \ifnum \lastpenalty=
10000 \else
7007 \advance\envskipamount by
\parskip
7009 \ifdim\lastskip<
\envskipamount
7011 % it's not a good place to break if the last penalty was \nobreak
7013 \ifnum\lastpenalty<
10000 \penalty-
50 \fi
7014 \vskip\envskipamount
7019 % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will
7020 % also clear it, so that its embedded environments do the narrowing again.
7021 \let\nonarrowing=
\relax
7023 % @cartouche ... @end cartouche: draw rectangle w/rounded corners around
7024 % environment contents.
7025 \font\circle=lcircle10
7027 \newdimen\cartouter\newdimen\cartinner
7028 \newskip\normbskip\newskip\normpskip\newskip\normlskip
7029 \circthick=
\fontdimen8\circle
7031 \def\ctl{{\circle\char'
013\hskip -
6pt
}}% 6pt from pl file: 1/2charwidth
7032 \def\ctr{{\hskip 6pt
\circle\char'
010}}
7033 \def\cbl{{\circle\char'
012\hskip -
6pt
}}
7034 \def\cbr{{\hskip 6pt
\circle\char'
011}}
7035 \def\carttop{\hbox to
\cartouter{\hskip\lskip
7036 \ctl\leaders\hrule height
\circthick\hfil\ctr
7038 \def\cartbot{\hbox to
\cartouter{\hskip\lskip
7039 \cbl\leaders\hrule height
\circthick\hfil\cbr
7042 \newskip\lskip\newskip\rskip
7045 \ifhmode\par\fi % can't be in the midst of a paragraph.
7047 \lskip=
\leftskip \rskip=
\rightskip
7048 \leftskip=
0pt
\rightskip=
0pt
% we want these *outside*.
7049 \cartinner=
\hsize \advance\cartinner by-
\lskip
7050 \advance\cartinner by-
\rskip
7052 \advance\cartouter by
18.4pt
% allow for 3pt kerns on either
7053 % side, and for 6pt waste from
7054 % each corner char, and rule thickness
7055 \normbskip=
\baselineskip \normpskip=
\parskip \normlskip=
\lineskip
7057 % If this cartouche directly follows a sectioning command, we need the
7058 % \parskip glue (backspaced over by default) or the cartouche can
7059 % collide with the section heading.
7060 \ifnum\lastpenalty>
10000 \vskip\parskip \penalty\lastpenalty \fi
7062 \setbox\groupbox=
\vbox\bgroup
7063 \baselineskip=
0pt
\parskip=
0pt
\lineskip=
0pt
7071 \baselineskip=
\normbskip
7072 \lineskip=
\normlskip
7075 \comment % For explanation, see the end of def\group.
7091 % This macro is called at the beginning of all the @example variants,
7093 \newdimen\nonfillparindent
7096 \ifdim\hfuzz <
12pt
\hfuzz =
12pt
\fi % Don't be fussy
7097 \sepspaces % Make spaces be word-separators rather than space tokens.
7098 \let\par =
\lisppar % don't ignore blank lines
7099 \obeylines % each line of input is a line of output
7101 % Turn off paragraph indentation but redefine \indent to emulate
7102 % the normal \indent.
7103 \nonfillparindent=
\parindent
7105 \let\indent\nonfillindent
7107 \emergencystretch =
0pt
% don't try to avoid overfull boxes
7108 \ifx\nonarrowing\relax
7109 \advance \leftskip by
\lispnarrowing
7110 \exdentamount=
\lispnarrowing
7112 \let\nonarrowing =
\relax
7114 \let\exdent=
\nofillexdent
7119 % We want to swallow spaces (but not other tokens) after the fake
7120 % @indent in our nonfill-environments, where spaces are normally
7121 % active and set to @tie, resulting in them not being ignored after
7123 \gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}%
7124 \gdef\nonfillindentcheck{%
7126 \expandafter\nonfillindentgobble%
7128 \leavevmode\nonfillindentbox%
7132 \def\nonfillindentgobble#1{\nonfillindent}
7133 \def\nonfillindentbox{\hbox to
\nonfillparindent{\hss}}
7135 % If you want all examples etc. small: @set dispenvsize small.
7136 % If you want even small examples the full size: @set dispenvsize nosmall.
7137 % This affects the following displayed environments:
7138 % @example, @display, @format, @lisp
7140 \def\smallword{small
}
7141 \def\nosmallword{nosmall
}
7142 \let\SETdispenvsize\relax
7143 \def\setnormaldispenv{%
7144 \ifx\SETdispenvsize\smallword
7145 % end paragraph for sake of leading, in case document has no blank
7146 % line. This is redundant with what happens in \aboveenvbreak, but
7147 % we need to do it before changing the fonts, and it's inconvenient
7148 % to change the fonts afterward.
7149 \ifnum \lastpenalty=
10000 \else \endgraf \fi
7150 \smallexamplefonts \rm
7153 \def\setsmalldispenv{%
7154 \ifx\SETdispenvsize\nosmallword
7156 \ifnum \lastpenalty=
10000 \else \endgraf \fi
7157 \smallexamplefonts \rm
7161 % We often define two environments, @foo and @smallfoo.
7162 % Let's do it in one command. #1 is the env name, #2 the definition.
7163 \def\makedispenvdef#1#2{%
7164 \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}%
7165 \expandafter\envdef\csname small
#1\endcsname {\setsmalldispenv #2}%
7166 \expandafter\let\csname E
#1\endcsname \afterenvbreak
7167 \expandafter\let\csname Esmall
#1\endcsname \afterenvbreak
7170 % Define two environment synonyms (#1 and #2) for an environment.
7171 \def\maketwodispenvdef#1#2#3{%
7172 \makedispenvdef{#1}{#3}%
7173 \makedispenvdef{#2}{#3}%
7176 % @lisp: indented, narrowed, typewriter font;
7177 % @example: same as @lisp.
7179 % @smallexample and @smalllisp: use smaller fonts.
7180 % Originally contributed by Pavel@xerox.
7182 \maketwodispenvdef{lisp
}{example
}{%
7184 \tt\setupmarkupstyle{example
}%
7185 \let\kbdfont =
\kbdexamplefont % Allow @kbd to do something special.
7186 \gobble % eat return
7188 % @display/@smalldisplay: same as @lisp except keep current font.
7190 \makedispenvdef{display
}{%
7195 % @format/@smallformat: same as @display except don't narrow margins.
7197 \makedispenvdef{format
}{%
7198 \let\nonarrowing = t
%
7203 % @flushleft: same as @format, but doesn't obey \SETdispenvsize.
7205 \let\nonarrowing = t
%
7209 \let\Eflushleft =
\afterenvbreak
7213 \envdef\flushright{%
7214 \let\nonarrowing = t
%
7216 \advance\leftskip by
0pt plus
1fill
\relax
7219 \let\Eflushright =
\afterenvbreak
7222 % @raggedright does more-or-less normal line breaking but no right
7223 % justification. From plain.tex. Don't stretch around special
7224 % characters in urls in this environment, since the stretch at the right
7226 \envdef\raggedright{%
7227 \rightskip0pt plus2.4em
\spaceskip.3333em
\xspaceskip.5em
\relax
7228 \def\urefprestretchamount{0pt
}%
7229 \def\urefpoststretchamount{0pt
}%
7231 \let\Eraggedright\par
7233 \envdef\raggedleft{%
7234 \parindent=
0pt
\leftskip0pt plus2em
7235 \spaceskip.3333em
\xspaceskip.5em
\parfillskip=
0pt
7236 \hbadness=
10000 % Last line will usually be underfull, so turn off
7237 % badness reporting.
7239 \let\Eraggedleft\par
7241 \envdef\raggedcenter{%
7242 \parindent=
0pt
\rightskip0pt plus1em
\leftskip0pt plus1em
7243 \spaceskip.3333em
\xspaceskip.5em
\parfillskip=
0pt
7244 \hbadness=
10000 % Last line will usually be underfull, so turn off
7245 % badness reporting.
7247 \let\Eraggedcenter\par
7250 % @quotation does normal linebreaking (hence we can't use \nonfillstart)
7251 % and narrows the margins. We keep \parskip nonzero in general, since
7252 % we're doing normal filling. So, when using \aboveenvbreak and
7253 % \afterenvbreak, temporarily make \parskip 0.
7255 \makedispenvdef{quotation
}{\quotationstart}
7257 \def\quotationstart{%
7258 \indentedblockstart % same as \indentedblock, but increase right margin too.
7259 \ifx\nonarrowing\relax
7260 \advance\rightskip by
\lispnarrowing
7262 \parsearg\quotationlabel
7265 % We have retained a nonzero parskip for the environment, since we're
7266 % doing normal filling.
7270 \ifx\quotationauthor\thisisundefined\else
7272 \leftline{\kern 2\leftskip \sl ---
\quotationauthor}%
7274 {\parskip=
0pt
\afterenvbreak}%
7276 \def\Esmallquotation{\Equotation}
7278 % If we're given an argument, typeset it in bold with a colon after.
7279 \def\quotationlabel#1{%
7281 \ifx\temp\empty \else
7286 % @indentedblock is like @quotation, but indents only on the left and
7287 % has no optional argument.
7289 \makedispenvdef{indentedblock
}{\indentedblockstart}
7291 \def\indentedblockstart{%
7292 {\parskip=
0pt
\aboveenvbreak}% because \aboveenvbreak inserts \parskip
7295 % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
7296 \ifx\nonarrowing\relax
7297 \advance\leftskip by
\lispnarrowing
7298 \exdentamount =
\lispnarrowing
7300 \let\nonarrowing =
\relax
7304 % Keep a nonzero parskip for the environment, since we're doing normal filling.
7306 \def\Eindentedblock{%
7308 {\parskip=
0pt
\afterenvbreak}%
7310 \def\Esmallindentedblock{\Eindentedblock}
7313 % LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
7314 % If we want to allow any <char> as delimiter,
7315 % we need the curly braces so that makeinfo sees the @verb command, eg:
7316 % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org
7318 % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook.
7320 % [Knuth] p.344; only we need to do the other characters Texinfo sets
7321 % active too. Otherwise, they get lost as the first character on a
7324 \do\
\do\\
\do\
{\do\
}\do\$
\do\&
%
7325 \do\#
\do\^
\do\^^K
\do\_\do\^^A
\do\%
\do\~
%
7326 \do\<
\do\>
\do\|
\do\@
\do+
\do\"
%
7327 % Don't do the quotes -- if we do, @set txicodequoteundirected and
7328 % @set txicodequotebacktick will not have effect on @verb and
7329 % @verbatim, and ?` and !` ligatures won't get disabled.
7334 \def\uncatcodespecials{%
7335 \def\do#
#1{\catcode`#
#1=
\other}\dospecials}
7337 % Setup for the @verb command.
7339 % Eight spaces for a tab
7341 \catcode`\^^I=
\active
7342 \gdef\tabeightspaces{\catcode`\^^I=
\active\def^^I
{\ \ \ \ \ \ \ \
}}
7346 \tt % easiest (and conventionally used) font for verbatim
7347 \def\par{\leavevmode\endgraf}%
7348 \setupmarkupstyle{verb
}%
7350 % Respect line breaks,
7351 % print special symbols as themselves, and
7352 % make each space count
7353 % must do in this order:
7354 \obeylines \uncatcodespecials \sepspaces
7357 % Setup for the @verbatim environment
7359 % Real tab expansion.
7360 \newdimen\tabw \setbox0=
\hbox{\tt\space} \tabw=
8\wd0 % tab amount
7362 % We typeset each line of the verbatim in an \hbox, so we can handle
7363 % tabs. The \global is in case the verbatim line starts with an accent,
7364 % or some other command that starts with a begin-group. Otherwise, the
7365 % entire \verbbox would disappear at the corresponding end-group, before
7366 % it is typeset. Meanwhile, we can't have nested verbatim commands
7367 % (can we?), so the \global won't be overwriting itself.
7369 \def\starttabbox{\global\setbox\verbbox=
\hbox\bgroup}
7372 \catcode`\^^I=
\active
7374 \catcode`\^^I=
\active
7375 \def^^I
{\leavevmode\egroup
7376 \dimen\verbbox=
\wd\verbbox % the width so far, or since the previous tab
7377 \divide\dimen\verbbox by
\tabw
7378 \multiply\dimen\verbbox by
\tabw % compute previous multiple of \tabw
7379 \advance\dimen\verbbox by
\tabw % advance to next multiple of \tabw
7380 \wd\verbbox=
\dimen\verbbox \box\verbbox \starttabbox
7385 % start the verbatim environment.
7386 \def\setupverbatim{%
7387 \let\nonarrowing = t
%
7389 \tt % easiest (and conventionally used) font for verbatim
7390 % The \leavevmode here is for blank lines. Otherwise, we would
7391 % never \starttabox and the \egroup would end verbatim mode.
7392 \def\par{\leavevmode\egroup\box\verbbox\endgraf}%
7394 \setupmarkupstyle{verbatim
}%
7395 % Respect line breaks,
7396 % print special symbols as themselves, and
7397 % make each space count.
7398 % Must do in this order:
7399 \obeylines \uncatcodespecials \sepspaces
7400 \everypar{\starttabbox}%
7403 % Do the @verb magic: verbatim text is quoted by unique
7404 % delimiter characters. Before first delimiter expect a
7405 % right brace, after last delimiter expect closing brace:
7407 % \def\doverb'{'<char>#1<char>'}'{#1}
7409 % [Knuth] p. 382; only eat outer {}
7411 \catcode`
[=
1\catcode`
]=
2\catcode`\
{=
\other\catcode`\
}=
\other
7412 \gdef\doverb{#1[\def\next#
#1#1}[#
#1\endgroup]\next]
7415 \def\verb{\begingroup\setupverb\doverb}
7418 % Do the @verbatim magic: define the macro \doverbatim so that
7419 % the (first) argument ends when '@end verbatim' is reached, ie:
7421 % \def\doverbatim#1@end verbatim{#1}
7423 % For Texinfo it's a lot easier than for LaTeX,
7424 % because texinfo's \verbatim doesn't stop at '\end{verbatim}':
7425 % we need not redefine '\', '{' and '}'.
7427 % Inspired by LaTeX's verbatim command set [latex.ltx]
7432 % ignore everything up to the first ^^M, that's the newline at the end
7433 % of the @verbatim input line itself. Otherwise we get an extra blank
7434 % line in the output.
7435 \xdef\doverbatim#1^^M
#2@end verbatim
{#2\noexpand\end\gobble verbatim
}%
7436 % We really want {...\end verbatim} in the body of the macro, but
7437 % without the active space; thus we have to use \xdef and \gobble.
7441 \setupverbatim\doverbatim
7443 \let\Everbatim =
\afterenvbreak
7446 % @verbatiminclude FILE - insert text of file in verbatim environment.
7448 \def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude}
7450 \def\doverbatiminclude#1{%
7452 \makevalueexpandable
7454 \indexnofonts % Allow `@@' and other weird things in file names.
7455 \wlog{texinfo.tex: doing @verbatiminclude of
#1^^J
}%
7461 % @copying ... @end copying.
7462 % Save the text away for @insertcopying later.
7464 % We save the uninterpreted tokens, rather than creating a box.
7465 % Saving the text in a box would be much easier, but then all the
7466 % typesetting commands (@smallbook, font changes, etc.) have to be done
7467 % beforehand -- and a) we want @copying to be done first in the source
7468 % file; b) letting users define the frontmatter in as flexible order as
7469 % possible is desirable.
7471 \def\copying{\checkenv{}\begingroup\scanargctxt\docopying}
7472 \def\docopying#1@end copying
{\endgroup\def\copyingtext{#1}}
7474 \def\insertcopying{%
7476 \parindent =
0pt
% paragraph indentation looks wrong on title page
7477 \scanexp\copyingtext
7485 \newskip\defbodyindent \defbodyindent=
.4in
7486 \newskip\defargsindent \defargsindent=
50pt
7487 \newskip\deflastargmargin \deflastargmargin=
18pt
7488 \newcount\defunpenalty
7490 % Start the processing of @deffn:
7492 \ifnum\lastpenalty<
10000
7494 \defunpenalty=
10003 % Will keep this @deffn together with the
7495 % following @def command, see below.
7497 % If there are two @def commands in a row, we'll have a \nobreak,
7498 % which is there to keep the function description together with its
7499 % header. But if there's nothing but headers, we need to allow a
7500 % break somewhere. Check specifically for penalty 10002, inserted
7501 % by \printdefunline, instead of 10000, since the sectioning
7502 % commands also insert a nobreak penalty, and we don't want to allow
7503 % a break between a section heading and a defun.
7505 % As a further refinement, we avoid "club" headers by signalling
7506 % with penalty of 10003 after the very first @deffn in the
7507 % sequence (see above), and penalty of 10002 after any following
7509 \ifnum\lastpenalty=
10002 \penalty2000 \else \defunpenalty=
10002 \fi
7511 % Similarly, after a section heading, do not allow a break.
7512 % But do insert the glue.
7513 \medskip % preceded by discardable penalty, so not a breakpoint
7517 \advance\leftskip by
\defbodyindent
7518 \exdentamount=
\defbodyindent
7522 % First, check whether we are in the right environment:
7525 % As above, allow line break if we have multiple x headers in a row.
7526 % It's not a great place, though.
7527 \ifnum\lastpenalty=
10002 \penalty3000 \else \defunpenalty=
10002 \fi
7529 % And now, it's time to reuse the body of the original defun:
7530 \expandafter\gobbledefun#1%
7532 \def\gobbledefun#1\startdefun{}
7534 % \printdefunline \deffnheader{text}
7536 \def\printdefunline#1#2{%
7538 % call \deffnheader:
7541 \interlinepenalty =
10000
7542 \advance\rightskip by
0pt plus
1fil
\relax
7544 \nobreak\vskip -
\parskip
7545 \penalty\defunpenalty % signal to \startdefun and \dodefunx
7546 % Some of the @defun-type tags do not enable magic parentheses,
7547 % rendering the following check redundant. But we don't optimize.
7552 \def\Edefun{\endgraf\medbreak}
7554 % \makedefun{deffn} creates \deffn, \deffnx and \Edeffn;
7555 % the only thing remaining is to define \deffnheader.
7558 \expandafter\let\csname E
#1\endcsname =
\Edefun
7559 \edef\temp{\noexpand\domakedefun
7560 \makecsname{#1}\makecsname{#1x
}\makecsname{#1header
}}%
7564 % \domakedefun \deffn \deffnx \deffnheader { (defn. of \deffnheader) }
7566 % Define \deffn and \deffnx, without parameters.
7567 % \deffnheader has to be defined explicitly.
7569 \def\domakedefun#1#2#3{%
7572 \doingtypefnfalse % distinguish typed functions from all else
7573 \parseargusing\activeparens{\printdefunline#3}%
7575 \def#2{\dodefunx#1}%
7579 \newif\ifdoingtypefn % doing typed function?
7580 \newif\ifrettypeownline % typeset return type on its own line?
7582 % @deftypefnnewline on|off says whether the return type of typed functions
7583 % are printed on their own line. This affects @deftypefn, @deftypefun,
7584 % @deftypeop, and @deftypemethod.
7586 \parseargdef\deftypefnnewline{%
7589 \expandafter\let\csname SETtxideftypefnnl
\endcsname
7591 \else\ifx\temp\offword
7592 \expandafter\let\csname SETtxideftypefnnl
\endcsname
7595 \errhelp =
\EMsimple
7596 \errmessage{Unknown @txideftypefnnl value `
\temp',
7601 % Untyped functions:
7603 % @deffn category name args
7604 \makedefun{deffn
}{\deffngeneral{}}
7606 % @deffn category class name args
7607 \makedefun{defop
}#1 {\defopon{#1\
\putwordon}}
7609 % \defopon {category on}class name args
7610 \def\defopon#1#2 {\deffngeneral{\putwordon\
\code{#2}}{#1\
\code{#2}} }
7612 % \deffngeneral {subind}category name args
7614 \def\deffngeneral#1#2 #3 #4\endheader{%
7615 % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}.
7616 \dosubind{fn
}{\code{#3}}{#1}%
7617 \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}%
7622 % @deftypefn category type name args
7623 \makedefun{deftypefn
}{\deftypefngeneral{}}
7625 % @deftypeop category class type name args
7626 \makedefun{deftypeop
}#1 {\deftypeopon{#1\
\putwordon}}
7628 % \deftypeopon {category on}class type name args
7629 \def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\
\code{#2}}{#1\
\code{#2}} }
7631 % \deftypefngeneral {subind}category type name args
7633 \def\deftypefngeneral#1#2 #3 #4 #5\endheader{%
7634 \dosubind{fn
}{\code{#4}}{#1}%
7636 \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
7641 % @deftypevr category type var args
7642 \makedefun{deftypevr
}{\deftypecvgeneral{}}
7644 % @deftypecv category class type var args
7645 \makedefun{deftypecv
}#1 {\deftypecvof{#1\
\putwordof}}
7647 % \deftypecvof {category of}class type var args
7648 \def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\
\code{#2}}{#1\
\code{#2}} }
7650 % \deftypecvgeneral {subind}category type var args
7652 \def\deftypecvgeneral#1#2 #3 #4 #5\endheader{%
7653 \dosubind{vr
}{\code{#4}}{#1}%
7654 \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
7657 % Untyped variables:
7659 % @defvr category var args
7660 \makedefun{defvr
}#1 {\deftypevrheader{#1} {} }
7662 % @defcv category class var args
7663 \makedefun{defcv
}#1 {\defcvof{#1\
\putwordof}}
7665 % \defcvof {category of}class var args
7666 \def\defcvof#1#2 {\deftypecvof{#1}#2 {} }
7670 % @deftp category name args
7671 \makedefun{deftp
}#1 #2 #3\endheader{%
7672 \doind{tp
}{\code{#2}}%
7673 \defname{#1}{}{#2}\defunargs{#3\unskip}%
7676 % Remaining @defun-like shortcuts:
7677 \makedefun{defun
}{\deffnheader{\putwordDeffunc} }
7678 \makedefun{defmac
}{\deffnheader{\putwordDefmac} }
7679 \makedefun{defspec
}{\deffnheader{\putwordDefspec} }
7680 \makedefun{deftypefun
}{\deftypefnheader{\putwordDeffunc} }
7681 \makedefun{defvar
}{\defvrheader{\putwordDefvar} }
7682 \makedefun{defopt
}{\defvrheader{\putwordDefopt} }
7683 \makedefun{deftypevar
}{\deftypevrheader{\putwordDefvar} }
7684 \makedefun{defmethod
}{\defopon\putwordMethodon}
7685 \makedefun{deftypemethod
}{\deftypeopon\putwordMethodon}
7686 \makedefun{defivar
}{\defcvof\putwordInstanceVariableof}
7687 \makedefun{deftypeivar
}{\deftypecvof\putwordInstanceVariableof}
7689 % \defname, which formats the name of the @def (not the args).
7690 % #1 is the category, such as "Function".
7691 % #2 is the return type, if any.
7692 % #3 is the function name.
7694 % We are followed by (but not passed) the arguments, if any.
7696 \def\defname#1#2#3{%
7698 % Get the values of \leftskip and \rightskip as they were outside the @def...
7699 \advance\leftskip by -
\defbodyindent
7701 % Determine if we are typesetting the return type of a typed function
7702 % on a line by itself.
7703 \rettypeownlinefalse
7704 \ifdoingtypefn % doing a typed function specifically?
7705 % then check user option for putting return type on its own line:
7706 \expandafter\ifx\csname SETtxideftypefnnl
\endcsname\relax \else
7711 % How we'll format the category name. Putting it in brackets helps
7712 % distinguish it from the body text that may end up on the next line
7715 \setbox0=
\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi}
7717 % Figure out line sizes for the paragraph shape. We'll always have at
7721 % The first line needs space for \box0; but if \rightskip is nonzero,
7722 % we need only space for the part of \box0 which exceeds it:
7723 \dimen0=
\hsize \advance\dimen0 by -
\wd0 \advance\dimen0 by
\rightskip
7725 % If doing a return type on its own line, we'll have another line.
7727 \advance\tempnum by
1
7728 \def\maybeshapeline{0in
\hsize}%
7730 \def\maybeshapeline{}%
7733 % The continuations:
7734 \dimen2=
\hsize \advance\dimen2 by -
\defargsindent
7736 % The final paragraph shape:
7737 \parshape \tempnum 0in
\dimen0 \maybeshapeline \defargsindent \dimen2
7739 % Put the category name at the right margin.
7742 \hfil\box0 \kern-
\hsize
7743 % \hsize has to be shortened this way:
7745 % Intentionally do not respect \rightskip, since we need the space.
7748 % Allow all lines to be underfull without complaint:
7749 \tolerance=
10000 \hbadness=
10000
7750 \exdentamount=
\defbodyindent
7752 % defun fonts. We use typewriter by default (used to be bold) because:
7753 % . we're printing identifiers, they should be in tt in principle.
7754 % . in languages with many accents, such as Czech or French, it's
7755 % common to leave accents off identifiers. The result looks ok in
7756 % tt, but exceedingly strange in rm.
7757 % . we don't want -- and --- to be treated as ligatures.
7758 % . this still does not fix the ?` and !` ligatures, but so far no
7759 % one has made identifiers using them :).
7761 \def\temp{#2}% text of the return type
7762 \ifx\temp\empty\else
7763 \tclose{\temp}% typeset the return type
7765 % put return type on its own line; prohibit line break following:
7766 \hfil\vadjust{\nobreak}\break
7768 \space % type on same line, so just followed by a space
7770 \fi % no return type
7771 #3% output function name
7773 {\rm\enskip}% hskip 0.5 em of \tenrm
7776 % arguments will be output next, if any.
7779 % Print arguments in slanted roman (not ttsl), inconsistently with using
7780 % tt for the name. This is because literal text is sometimes needed in
7781 % the argument list (groff manual), and ttsl and tt are not very
7782 % distinguishable. Prevent hyphenation at `-' chars.
7785 % use sl by default (not ttsl),
7787 \df \sl \hyphenchar\font=
0
7789 % On the other hand, if an argument has two dashes (for instance), we
7790 % want a way to get ttsl. We used to recommend @var for that, so
7791 % leave the code in, but it's strange for @var to lead to typewriter.
7792 % Nowadays we recommend @code, since the difference between a ttsl hyphen
7793 % and a tt hyphen is pretty tiny. @code also disables ?` !`.
7794 \def\var#
#1{{\setupmarkupstyle{var
}\ttslanted{#
#1}}}%
7796 \sl\hyphenchar\font=
45
7799 % We want ()&[] to print specially on the defun line.
7802 \catcode`\(=
\active \catcode`\)=
\active
7803 \catcode`\
[=
\active \catcode`\
]=
\active
7807 % Make control sequences which act like normal parenthesis chars.
7808 \let\lparen = (
\let\rparen = )
7810 % Be sure that we always have a definition for `(', etc. For example,
7811 % if the fn name has parens in it, \boldbrax will not be in effect yet,
7812 % so TeX would otherwise complain about undefined control sequence.
7815 \global\let(=
\lparen \global\let)=
\rparen
7816 \global\let[=
\lbrack \global\let]=
\rbrack
7819 \gdef\boldbrax{\let(=
\opnr\let)=
\clnr\let[=
\lbrb\let]=
\rbrb}
7820 \gdef\magicamp{\let&=
\amprm}
7823 \newcount\parencount
7825 % If we encounter &foo, then turn on ()-hacking afterwards
7827 \def\amprm#1 {\ampseentrue{\bf\&
#1 }}
7831 % At the first level, print parens in roman,
7832 % otherwise use the default font.
7833 \ifnum \parencount=
1 \rm \fi
7835 % The \sf parens (in \boldbrax) actually are a little bolder than
7836 % the contained text. This is especially needed for [ and ] .
7840 \def\infirstlevel#1{%
7847 \def\bfafterword#1 {#1 \bf}
7850 \global\advance\parencount by
1
7852 \infirstlevel \bfafterword
7857 \global\advance\parencount by -
1
7860 \newcount\brackcount
7862 \global\advance\brackcount by
1
7867 \global\advance\brackcount by -
1
7870 \def\checkparencounts{%
7871 \ifnum\parencount=
0 \else \badparencount \fi
7872 \ifnum\brackcount=
0 \else \badbrackcount \fi
7874 % these should not use \errmessage; the glibc manual, at least, actually
7875 % has such constructs (when documenting function pointers).
7876 \def\badparencount{%
7877 \message{Warning: unbalanced parentheses in @def...
}%
7878 \global\parencount=
0
7880 \def\badbrackcount{%
7881 \message{Warning: unbalanced square brackets in @def...
}%
7882 \global\brackcount=
0
7889 % To do this right we need a feature of e-TeX, \scantokens,
7890 % which we arrange to emulate with a temporary file in ordinary TeX.
7891 \ifx\eTeXversion\thisisundefined
7892 \newwrite\macscribble
7895 \immediate\openout\macscribble=
\jobname.tmp
7896 \immediate\write\macscribble{\the\toks0}%
7897 \immediate\closeout\macscribble
7902 \let\aftermacroxxx\relax
7903 \def\aftermacro{\aftermacroxxx}
7905 % alias because \c means cedilla in @tex or @math
7908 % Used at the time of macro expansion.
7909 % Argument is macro body with arguments substituted
7912 \def\xeatspaces{\eatspaces}%
7914 % Process the macro body under the current catcode regime.
7915 \scantokens{#1\texinfoc}\aftermacro%
7917 % The \texinfoc is to remove the \newlinechar added by \scantokens, and
7918 % can be noticed by \parsearg.
7919 % The \aftermacro allows a \comment at the end of the macro definition
7920 % to duplicate itself past the final \newlinechar added by \scantokens:
7921 % this is used in the definition of \group to comment out a newline. We
7922 % don't do the same for \c to support Texinfo files with macros that ended
7923 % with a @c, which should no longer be necessary.
7924 % We avoid surrounding the call to \scantokens with \bgroup and \egroup
7925 % to allow macros to open or close groups themselves.
7928 % Used for copying and captions
7930 \expandafter\scanmacro\expandafter{#1}%
7933 \newcount\paramno % Count of parameters
7934 \newtoks\macname % Macro name
7935 \newif\ifrecursive % Is it recursive?
7937 % List of all defined macros in the form
7938 % \definedummyword\macro1\definedummyword\macro2...
7939 % Currently is also contains all @aliases; the list can be split
7940 % if there is a need.
7943 % Add the macro to \macrolist
7944 \def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname}
7945 \def\addtomacrolistxxx#1{%
7946 \toks0 =
\expandafter{\macrolist\definedummyword#1}%
7947 \xdef\macrolist{\the\toks0}%
7951 % This does \let #1 = #2, with \csnames; that is,
7952 % \let \csname#1\endcsname = \csname#2\endcsname
7953 % (except of course we have to play expansion games).
7957 \csname#1\expandafter\endcsname
7961 % Trim leading and trailing spaces off a string.
7962 % Concepts from aro-bend problem 15 (see CTAN).
7964 \gdef\eatspaces #1{\expandafter\trim@
\expandafter{#1 }}
7965 \gdef\trim@
#1{\trim@@ @
#1 @
#1 @ @@
}
7966 \gdef\trim@@
#1@
#2@
#3@@
{\trim@@@
\empty #2 @
}
7968 \unbrace{\gdef\trim@@@
#1 } #2@
{#1}
7971 % Trim a single trailing ^^M off a string.
7972 {\catcode`\^^M=
\other \catcode`
\Q=
3%
7973 \gdef\eatcr #1{\eatcra #1Q^^MQ
}%
7974 \gdef\eatcra#1^^MQ
{\eatcrb#1Q
}%
7975 \gdef\eatcrb#1Q
#2Q
{#1}%
7978 % Macro bodies are absorbed as an argument in a context where
7979 % all characters are catcode 10, 11 or 12, except \ which is active
7980 % (as in normal texinfo). It is necessary to change the definition of \
7981 % to recognize macro arguments; this is the job of \mbodybackslash.
7983 % Non-ASCII encodings make 8-bit characters active, so un-activate
7984 % them to avoid their expansion. Must do this non-globally, to
7985 % confine the change to the current group.
7987 % It's necessary to have hard CRs when the macro is executed. This is
7988 % done by making ^^M (\endlinechar) catcode 12 when reading the macro
7989 % body, and then making it the \newlinechar in \scanmacro.
7991 \def\scanctxt{% used as subroutine
8000 \passthroughcharstrue
8003 \def\scanargctxt{% used for copying and captions, not macros.
8007 \catcode`\^^M=
\other
8010 \def\macrobodyctxt{% used for @macro definitions
8016 \catcode`\^^M=
\other
8020 % Used when scanning braced macro arguments. Note, however, that catcode
8021 % changes here are ineffectual if the macro invocation was nested inside
8022 % an argument to another Texinfo command.
8026 \catcode`\^^M=
\other
8030 \def\macrolineargctxt{% used for whole-line arguments without braces
8036 % \mbodybackslash is the definition of \ in @macro bodies.
8037 % It maps \foo\ => \csname macarg.foo\endcsname => #N
8038 % where N is the macro parameter number.
8039 % We define \csname macarg.\endcsname to be \realbackslash, so
8040 % \\ in macro replacement text gets you a backslash.
8042 {\catcode`@=
0 @catcode`@\=@active
8043 @gdef@usembodybackslash
{@let\=@mbodybackslash
}
8044 @gdef@mbodybackslash
#1\
{@csname macarg.
#1@endcsname
}
8046 \expandafter\def\csname macarg.
\endcsname{\realbackslash}
8048 \def\margbackslash#1{\char`\
#1 }
8050 \def\macro{\recursivefalse\parsearg\macroxxx}
8051 \def\rmacro{\recursivetrue\parsearg\macroxxx}
8054 \getargs{#1}% now \macname is the macname and \argl the arglist
8055 \ifx\argl\empty % no arguments
8058 \expandafter\parsemargdef \argl;
%
8059 \if\paramno>
256\relax
8060 \ifx\eTeXversion\thisisundefined
8061 \errhelp =
\EMsimple
8062 \errmessage{You need eTeX to compile a file with macros with more than
256 arguments
}
8066 \if1\csname ismacro.
\the\macname\endcsname
8067 \message{Warning: redefining
\the\macname}%
8069 \expandafter\ifx\csname \the\macname\endcsname \relax
8070 \else \errmessage{Macro name
\the\macname\space already defined
}\fi
8071 \global\cslet{macsave.
\the\macname}{\the\macname}%
8072 \global\expandafter\let\csname ismacro.
\the\macname\endcsname=
1%
8073 \addtomacrolist{\the\macname}%
8075 \begingroup \macrobodyctxt
8076 \ifrecursive \expandafter\parsermacbody
8077 \else \expandafter\parsemacbody
8080 \parseargdef\unmacro{%
8081 \if1\csname ismacro.
#1\endcsname
8082 \global\cslet{#1}{macsave.
#1}%
8083 \global\expandafter\let \csname ismacro.
#1\endcsname=
0%
8084 % Remove the macro name from \macrolist:
8086 \expandafter\let\csname#1\endcsname \relax
8087 \let\definedummyword\unmacrodo
8088 \xdef\macrolist{\macrolist}%
8091 \errmessage{Macro
#1 not defined
}%
8095 % Called by \do from \dounmacro on each macro. The idea is to omit any
8096 % macro definitions that have been changed to \relax.
8102 \noexpand\definedummyword \noexpand#1%
8106 % \getargs -- Parse the arguments to a @macro line. Set \macname to
8107 % the name of the macro, and \argl to the braced argument list.
8108 \def\getargs#1{\getargsxxx#1{}}
8109 \def\getargsxxx#1#
{\getmacname #1 \relax\getmacargs}
8110 \def\getmacname#1 #2\relax{\macname=
{#1}}
8111 \def\getmacargs#1{\def\argl{#1}}
8112 % This made use of the feature that if the last token of a
8113 % <parameter list> is #, then the preceding argument is delimited by
8114 % an opening brace, and that opening brace is not consumed.
8116 % Parse the optional {params} list to @macro or @rmacro.
8117 % Set \paramno to the number of arguments,
8118 % and \paramlist to a parameter text for the macro (e.g. #1,#2,#3 for a
8119 % three-param macro.) Define \macarg.BLAH for each BLAH in the params
8120 % list to some hook where the argument is to be expanded. If there are
8121 % less than 10 arguments that hook is to be replaced by ##N where N
8122 % is the position in that list, that is to say the macro arguments are to be
8123 % defined `a la TeX in the macro body.
8125 % That gets used by \mbodybackslash (above).
8127 % If there are 10 or more arguments, a different technique is used: see
8128 % \parsemmanyargdef.
8130 \def\parsemargdef#1;
{%
8131 \paramno=
0\def\paramlist{}%
8133 % \hash is redefined to `#' later to get it into definitions
8134 \let\xeatspaces\relax
8135 \parsemargdefxxx#1,;,
%
8136 \ifnum\paramno<
10\relax\else
8138 \parsemmanyargdef@@
#1,;,
% 10 or more arguments
8141 \def\parsemargdefxxx#1,
{%
8142 \if#1;
\let\next=
\relax
8143 \else \let\next=
\parsemargdefxxx
8144 \advance\paramno by
1
8145 \expandafter\edef\csname macarg.
\eatspaces{#1}\endcsname
8146 {\xeatspaces{\hash\the\paramno}}%
8147 \edef\paramlist{\paramlist\hash\the\paramno,
}%
8150 % \parsemacbody, \parsermacbody
8152 % Read recursive and nonrecursive macro bodies. (They're different since
8153 % rec and nonrec macros end differently.)
8155 % We are in \macrobodyctxt, and the \xdef causes backslashshes in the macro
8156 % body to be transformed.
8157 % Set \macrobody to the body of the macro, and call \defmacro.
8159 {\catcode`\ =
\other\long\gdef\parsemacbody#1@end macro
{%
8160 \xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}%
8161 {\catcode`\ =
\other\long\gdef\parsermacbody#1@end rmacro
{%
8162 \xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}%
8164 % Make @ a letter, so that we can make private-to-Texinfo macro names.
8165 \edef\texiatcatcode{\the\catcode`\@
}
8166 \catcode `@=
11\relax
8168 %%%%%%%%%%%%%% Code for > 10 arguments only %%%%%%%%%%%%%%%%%%
8170 % If there are 10 or more arguments, a different technique is used, where the
8171 % hook remains in the body, and when macro is to be expanded the body is
8172 % processed again to replace the arguments.
8174 % In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the
8175 % argument N value and then \edef the body (nothing else will expand because of
8176 % the catcode regime under which the body was input).
8178 % If you compile with TeX (not eTeX), and you have macros with 10 or more
8179 % arguments, no macro can have more than 256 arguments (else error).
8181 % In case that there are 10 or more arguments we parse again the arguments
8182 % list to set new definitions for the \macarg.BLAH macros corresponding to
8183 % each BLAH argument. It was anyhow needed to parse already once this list
8184 % in order to count the arguments, and as macros with at most 9 arguments
8185 % are by far more frequent than macro with 10 or more arguments, defining
8186 % twice the \macarg.BLAH macros does not cost too much processing power.
8187 \def\parsemmanyargdef@@
#1,
{%
8188 \if#1;
\let\next=
\relax
8190 \let\next=
\parsemmanyargdef@@
8191 \edef\tempb{\eatspaces{#1}}%
8192 \expandafter\def\expandafter\tempa
8193 \expandafter{\csname macarg.
\tempb\endcsname}%
8194 % Note that we need some extra \noexpand\noexpand, this is because we
8195 % don't want \the to be expanded in the \parsermacbody as it uses an
8197 \expandafter\edef\tempa
8198 {\noexpand\noexpand\noexpand\the\toks\the\paramno}%
8199 \advance\paramno by
1\relax
8206 \long\def\nillm@
{\nil@
}%
8208 % This macro is expanded during the Texinfo macro expansion, not during its
8209 % definition. It gets all the arguments' values and assigns them to macros
8212 % #1 is the macro name
8213 % #2 is the list of argument names
8214 % #3 is the list of argument values
8215 \def\getargvals@
#1#2#3{%
8216 \def\macargdeflist@
{}%
8217 \def\saveparamlist@
{#2}% Need to keep a copy for parameter expansion.
8218 \def\paramlist{#2,
\nil@
}%
8222 \def\argvaluelist{#3,
\nil@
}%
8231 \ifx\paramlist\nilm@
8232 % Some sanity check needed here that \argvaluelist is also empty.
8233 \ifx\argvaluelist\nillm@
8235 \errhelp =
\EMsimple
8236 \errmessage{Too many arguments in macro `
\macroname'!
}%
8238 \let\next\macargexpandinbody@
8240 \ifx\argvaluelist\nillm@
8241 % No more arguments values passed to macro. Set remaining named-arg
8243 \let\next\setemptyargvalues@
8245 % pop current arg name into \@tempb
8246 \def\@tempa#
#1{\pop@
{\@tempb
}{\paramlist}#
#1\endargs@
}%
8247 \expandafter\@tempa
\expandafter{\paramlist}%
8248 % pop current argument value into \@tempc
8249 \def\@tempa#
#1{\longpop@
{\@tempc
}{\argvaluelist}#
#1\endargs@
}%
8250 \expandafter\@tempa
\expandafter{\argvaluelist}%
8251 % Here \@tempb is the current arg name and \@tempc is the current arg value.
8252 % First place the new argument macro definition into \@tempd
8253 \expandafter\macname\expandafter{\@tempc
}%
8254 \expandafter\let\csname macarg.\@tempb
\endcsname\relax
8255 \expandafter\def\expandafter\@tempe
\expandafter{%
8256 \csname macarg.\@tempb
\endcsname}%
8257 \edef\@tempd
{\long\def\@tempe
{\the\macname}}%
8258 \push@\@tempd
\macargdeflist@
8259 \let\next\getargvals@@
8266 \expandafter\expandafter\expandafter\def
8267 \expandafter\expandafter\expandafter#2%
8268 \expandafter\expandafter\expandafter{%
8272 % Replace arguments by their values in the macro body, and place the result
8275 \def\macvalstoargs@
{%
8276 % To do this we use the property that token registers that are \the'ed
8277 % within an \edef expand only once. So we are going to place all argument
8278 % values into respective token registers.
8280 % First we save the token context, and initialize argument numbering.
8283 % Then, for each argument number #N, we place the corresponding argument
8284 % value into a new token list register \toks#N
8285 \expandafter\putargsintokens@
\saveparamlist@,;,
%
8286 % Then, we expand the body so that argument are replaced by their
8287 % values. The trick for values not to be expanded themselves is that they
8288 % are within tokens and that tokens expand only once in an \edef .
8289 \edef\@tempc
{\csname mac.
\macroname .body
\endcsname}%
8290 % Now we restore the token stack pointer to free the token list registers
8291 % which we have used, but we make sure that expanded body is saved after
8295 \expandafter\def\expandafter\@tempa
\expandafter{\@tempc
}%
8298 % Define the named-macro outside of this group and then close this group.
8300 \def\macargexpandinbody@
{%
8304 % First the replace in body the macro arguments by their values, the result
8307 % Then we point at the \norecurse or \gobble (for recursive) macro value
8309 \expandafter\let\expandafter\@tempb
\csname mac.
\macroname .recurse
\endcsname
8310 % Depending on whether it is recursive or not, we need some tailing
8317 % And now we do the real job:
8318 \edef\@tempd
{\noexpand\@tempb
{\macroname}\noexpand\scanmacro{\@tempa
}\@tempc
}%
8322 \def\putargsintokens@
#1,
{%
8323 \if#1;
\let\next\relax
8325 \let\next\putargsintokens@
8326 % First we allocate the new token list register, and give it a temporary
8328 \toksdef\@tempb
\the\paramno
8329 % Then we place the argument value into that token list register.
8330 \expandafter\let\expandafter\@tempa
\csname macarg.
#1\endcsname
8331 \expandafter\@tempb
\expandafter{\@tempa
}%
8332 \advance\paramno by
1\relax
8337 % Trailing missing arguments are set to empty.
8339 \def\setemptyargvalues@
{%
8340 \ifx\paramlist\nilm@
8341 \let\next\macargexpandinbody@
8343 \expandafter\setemptyargvaluesparser@
\paramlist\endargs@
8344 \let\next\setemptyargvalues@
8349 \def\setemptyargvaluesparser@
#1,
#2\endargs@
{%
8350 \expandafter\def\expandafter\@tempa
\expandafter{%
8351 \expandafter\def\csname macarg.
#1\endcsname{}}%
8352 \push@\@tempa
\macargdeflist@
8356 % #1 is the element target macro
8357 % #2 is the list macro
8358 % #3,#4\endargs@ is the list value
8359 \def\pop@
#1#2#3,
#4\endargs@
{%
8363 \long\def\longpop@
#1#2#3,
#4\endargs@
{%
8369 %%%%%%%%%%%%%% End of code for > 10 arguments %%%%%%%%%%%%%%%%%%
8372 % This defines a Texinfo @macro or @rmacro, called by \parsemacbody.
8373 % \macrobody has the body of the macro in it, with placeholders for
8374 % its parameters, looking like "\xeatspaces{\hash 1}".
8375 % \paramno is the number of parameters
8376 % \paramlist is a TeX parameter text, e.g. "#1,#2,#3,"
8377 % There are eight cases: recursive and nonrecursive macros of zero, one,
8378 % up to nine, and many arguments.
8379 % \xdef is used so that macro definitions will survive the file
8380 % they're defined in: @include reads the file inside a group.
8383 \let\hash=##
% convert placeholders to macro parameter chars
8385 \def\xeatspaces#
#1{#
#1}%
8386 % This removes the pair of braces around the argument. We don't
8387 % use \eatspaces, because this can cause ends of lines to be lost
8388 % when the argument to \eatspaces is read, leading to line-based
8389 % commands like "@itemize" not being read correctly.
8391 \let\xeatspaces\relax % suppress expansion
8393 \ifrecursive %%%%%%%%%%%%%% Recursive %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8396 \expandafter\xdef\csname\the\macname\endcsname{%
8397 \noexpand\scanmacro{\macrobody}}%
8399 \expandafter\xdef\csname\the\macname\endcsname{%
8401 \noexpand\braceorline
8402 \expandafter\noexpand\csname\the\macname @@@
\endcsname}%
8403 \expandafter\xdef\csname\the\macname @@@
\endcsname#
#1{%
8405 \noexpand\scanmacro{\macrobody}%
8408 \ifnum\paramno<
10\relax % at most 9
8409 % See non-recursive section below for comments
8410 \expandafter\xdef\csname\the\macname\endcsname{%
8412 \noexpand\expandafter
8413 \noexpand\macroargctxt
8414 \noexpand\expandafter
8415 \expandafter\noexpand\csname\the\macname @@
\endcsname}%
8416 \expandafter\xdef\csname\the\macname @@
\endcsname#
#1{%
8417 \noexpand\passargtomacro
8418 \expandafter\noexpand\csname\the\macname @@@
\endcsname{#
#1,
}}%
8419 \expandafter\xdef\csname\the\macname @@@
\endcsname#
#1{%
8420 \expandafter\noexpand\csname\the\macname @@@@
\endcsname #
#1}%
8421 \expandafter\expandafter
8423 \expandafter\expandafter
8424 \csname\the\macname @@@@
\endcsname\paramlist{%
8425 \egroup\noexpand\scanmacro{\macrobody}}%
8427 \expandafter\xdef\csname\the\macname\endcsname{%
8428 \noexpand\getargvals@
{\the\macname}{\argl}%
8430 \global\expandafter\let\csname mac.
\the\macname .body
\endcsname\macrobody
8431 \global\expandafter\let\csname mac.
\the\macname .recurse
\endcsname\gobble
8434 \else %%%%%%%%%%%%%%%%%%%%%% Non-recursive %%%%%%%%%%%%%%%%%%%%%%%%%%
8437 \expandafter\xdef\csname\the\macname\endcsname{%
8438 \noexpand\scanmacro{\macrobody}}%
8440 \expandafter\xdef\csname\the\macname\endcsname{%
8442 \noexpand\braceorline
8443 \expandafter\noexpand\csname\the\macname @@@
\endcsname}%
8444 \expandafter\xdef\csname\the\macname @@@
\endcsname#
#1{%
8446 \noexpand\scanmacro{\macrobody}%
8449 \ifnum\paramno<
10\relax
8450 % @MACNAME sets the context for reading the macro argument
8451 % @MACNAME@@ gets the argument, processes backslashes and appends a
8453 % @MACNAME@@@ removes braces surrounding the argument list.
8454 % @MACNAME@@@@ scans the macro body with arguments substituted.
8455 \expandafter\xdef\csname\the\macname\endcsname{%
8457 \noexpand\expandafter % This \expandafter skip any spaces after the
8458 \noexpand\macroargctxt % macro before we change the catcode of space.
8459 \noexpand\expandafter
8460 \expandafter\noexpand\csname\the\macname @@
\endcsname}%
8461 \expandafter\xdef\csname\the\macname @@
\endcsname#
#1{%
8462 \noexpand\passargtomacro
8463 \expandafter\noexpand\csname\the\macname @@@
\endcsname{#
#1,
}}%
8464 \expandafter\xdef\csname\the\macname @@@
\endcsname#
#1{%
8465 \expandafter\noexpand\csname\the\macname @@@@
\endcsname #
#1}%
8466 \expandafter\expandafter
8468 \expandafter\expandafter
8469 \csname\the\macname @@@@
\endcsname\paramlist{%
8470 \egroup\noexpand\scanmacro{\macrobody}}%
8472 \expandafter\xdef\csname\the\macname\endcsname{%
8473 \noexpand\getargvals@
{\the\macname}{\argl}%
8475 \global\expandafter\let\csname mac.
\the\macname .body
\endcsname\macrobody
8476 \global\expandafter\let\csname mac.
\the\macname .recurse
\endcsname\norecurse
8481 \catcode `\@
\texiatcatcode\relax % end private-to-Texinfo catcodes
8483 \def\norecurse#1{\bgroup\cslet{#1}{macsave.
#1}}
8486 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8488 {\catcode`\@=
0 \catcode`\\=
13 % We need to manipulate \ so use @ as escape
8489 @catcode`@_=
11 % private names
8490 @catcode`@!=
11 % used as argument separator
8492 % \passargtomacro#1#2 -
8493 % Call #1 with a list of tokens #2, with any doubled backslashes in #2
8494 % compressed to one.
8496 % This implementation works by expansion, and not execution (so we cannot use
8497 % \def or similar). This reduces the risk of this failing in contexts where
8498 % complete expansion is done with no execution (for example, in writing out to
8499 % an auxiliary file for an index entry).
8501 % State is kept in the input stream: the argument passed to
8502 % @look_ahead, @gobble_and_check_finish and @add_segment is
8504 % THE_MACRO ARG_RESULT ! {PENDING_BS} NEXT_TOKEN (... rest of input)
8507 % THE_MACRO - name of the macro we want to call
8508 % ARG_RESULT - argument list we build to pass to that macro
8509 % PENDING_BS - either a backslash or nothing
8510 % NEXT_TOKEN - used to look ahead in the input stream to see what's coming next
8512 @gdef@passargtomacro
#1#2{%
8513 @add_segment
#1!
{}@relax
#2\@_finish\%
8515 @gdef@_finish
{@_finishx
} @global@let@_finishx@relax
8517 % #1 - THE_MACRO ARG_RESULT
8520 % #4 used to look ahead
8522 % If the next token is not a backslash, process the rest of the argument;
8523 % otherwise, remove the next token.
8524 @gdef@look_ahead
#1!
#2#3#4{%
8526 @expandafter@gobble_and_check_finish
8528 @expandafter@add_segment
8532 % #1 - THE_MACRO ARG_RESULT
8535 % #4 should be a backslash, which is gobbled.
8538 % Double backslash found. Add a single backslash, and look ahead.
8539 @gdef@gobble_and_check_finish
#1!
#2#3#4#5{%
8540 @add_segment
#1\!
{}#5#5%
8545 % #1 - THE_MACRO ARG_RESULT
8548 % #4 is input stream until next backslash
8550 % Input stream is either at the start of the argument, or just after a
8551 % backslash sequence, either a lone backslash, or a doubled backslash.
8552 % NEXT_TOKEN contains the first token in the input stream: if it is \finish,
8553 % finish; otherwise, append to ARG_RESULT the segment of the argument up until
8554 % the next backslash. PENDING_BACKSLASH contains a backslash to represent
8555 % a backslash just before the start of the input stream that has not been
8556 % added to ARG_RESULT.
8557 @gdef@add_segment
#1!
#2#3#4\
{%
8561 % append the pending backslash to the result, followed by the next segment
8562 @expandafter@is_fi@look_ahead
#1#2#4!
{\
}@fi
8563 % this @fi is discarded by @look_ahead.
8564 % we can't get rid of it with \expandafter because we don't know how
8570 % #3 discards the res of the conditional in @add_segment, and @is_fi ends the
8572 @gdef@call_the_macro
#1#2!
#3@fi
{@is_fi
#1{#2}}
8575 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8577 % \braceorline MAC is used for a one-argument macro MAC. It checks
8578 % whether the next non-whitespace character is a {. It sets the context
8579 % for reading the argument (slightly different in the two cases). Then,
8580 % to read the argument, in the whole-line case, it then calls the regular
8581 % \parsearg MAC; in the lbrace case, it calls \passargtomacro MAC.
8583 \def\braceorline#1{\let\macnamexxx=
#1\futurelet\nchar\braceorlinexxx}
8584 \def\braceorlinexxx{%
8587 \expandafter\passargtomacro
8589 \macrolineargctxt\expandafter\parsearg
8594 % We need some trickery to remove the optional spaces around the equal
8595 % sign. Make them active and then expand them all to nothing.
8597 \def\alias{\parseargusing\obeyspaces\aliasxxx}
8598 \def\aliasxxx #1{\aliasyyy#1\relax}
8599 \def\aliasyyy #1=
#2\relax{%
8601 \expandafter\let\obeyedspace=
\empty
8602 \addtomacrolist{#1}%
8603 \xdef\next{\global\let\makecsname{#1}=
\makecsname{#2}}%
8609 \message{cross references,
}
8612 \newif\ifhavexrefs % True if xref values are known.
8613 \newif\ifwarnedxrefs % True if we warned once that they aren't known.
8615 % @inforef is relatively simple.
8616 \def\inforef #1{\inforefzzz #1,,,,**
}
8617 \def\inforefzzz #1,
#2,
#3,
#4**
{%
8618 \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
8619 node
\samp{\ignorespaces#1{}}}
8621 % @node's only job in TeX is to define \lastnode, which is used in
8622 % cross-references. The @node line might or might not have commas, and
8623 % might or might not have spaces before the first comma, like:
8624 % @node foo , bar , ...
8625 % We don't want such trailing spaces in the node name.
8627 \parseargdef\node{\checkenv{}\donode #1 ,
\finishnodeparse}
8629 % also remove a trailing comma, in case of something like this:
8630 % @node Help-Cross, , , Cross-refs
8631 \def\donode#1 ,
#2\finishnodeparse{\dodonode #1,
\finishnodeparse}
8632 \def\dodonode#1,
#2\finishnodeparse{\gdef\lastnode{#1}}
8635 \let\lastnode=
\empty
8637 % Write a cross-reference definition for the current node. #1 is the
8638 % type (Ynumbered, Yappendix, Ynothing).
8641 \ifx\lastnode\empty\else
8642 \setref{\lastnode}{#1}%
8643 \global\let\lastnode=
\empty
8647 % @anchor{NAME} -- define xref target at arbitrary point.
8649 \newcount\savesfregister
8651 \def\savesf{\relax \ifhmode \savesfregister=
\spacefactor \fi}
8652 \def\restoresf{\relax \ifhmode \spacefactor=
\savesfregister \fi}
8653 \def\anchor#1{\savesf \setref{#1}{Ynothing
}\restoresf \ignorespaces}
8655 % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
8656 % anchor), which consists of three parts:
8657 % 1) NAME-title - the current sectioning name taken from \lastsection,
8658 % or the anchor name.
8659 % 2) NAME-snt - section number and type, passed as the SNT arg, or
8660 % empty for anchors.
8661 % 3) NAME-pg - the page number.
8663 % This is called from \donoderef, \anchor, and \dofloat. In the case of
8664 % floats, there is an additional part, which is not written here:
8665 % 4) NAME-lof - the text as it should appear in a @listoffloats.
8672 \atdummies % preserve commands, but don't expand them
8673 \edef\writexrdef#
#1#
#2{%
8674 \write\auxfile{@xrdef
{#1-
% #1 of \setref, expanded by the \edef
8675 #
#1}{#
#2}}% these are parameters of \writexrdef
8677 \toks0 =
\expandafter{\lastsection}%
8678 \immediate \writexrdef{title
}{\the\toks0 }%
8679 \immediate \writexrdef{snt
}{\csname #2\endcsname}% \Ynumbered etc.
8680 \safewhatsit{\writexrdef{pg
}{\folio}}% will be written later, at \shipout
8685 % @xrefautosectiontitle on|off says whether @section(ing) names are used
8686 % automatically in xrefs, if the third arg is not explicitly specified.
8687 % This was provided as a "secret" @set xref-automatic-section-title
8688 % variable, now it's official.
8690 \parseargdef\xrefautomaticsectiontitle{%
8693 \expandafter\let\csname SETxref-automatic-section-title
\endcsname
8695 \else\ifx\temp\offword
8696 \expandafter\let\csname SETxref-automatic-section-title
\endcsname
8699 \errhelp =
\EMsimple
8700 \errmessage{Unknown @xrefautomaticsectiontitle value `
\temp',
8706 % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is
8707 % the node name, #2 the name of the Info cross-reference, #3 the printed
8708 % node name, #4 the name of the Info file, #5 the name of the printed
8709 % manual. All but the node name can be omitted.
8711 \def\pxref{\putwordsee{} \xrefXX}
8712 \def\xref{\putwordSee{} \xrefXX}
8715 \def\xrefXX#1{\def\xrefXXarg{#1}\futurelet\tokenafterxref\xrefXXX}
8716 \def\xrefXXX{\expandafter\xrefX\expandafter[\xrefXXarg,,,,,,,
]}
8719 \newbox\printedrefnamebox
8720 \newbox\infofilenamebox
8721 \newbox\printedmanualbox
8723 \def\xrefX[#1,
#2,
#3,
#4,
#5,
#6]{\begingroup
8726 % Get args without leading/trailing spaces.
8727 \def\printedrefname{\ignorespaces #3}%
8728 \setbox\printedrefnamebox =
\hbox{\printedrefname\unskip}%
8730 \def\infofilename{\ignorespaces #4}%
8731 \setbox\infofilenamebox =
\hbox{\infofilename\unskip}%
8733 \def\printedmanual{\ignorespaces #5}%
8734 \setbox\printedmanualbox =
\hbox{\printedmanual\unskip}%
8736 % If the printed reference name (arg #3) was not explicitly given in
8737 % the @xref, figure out what we want to use.
8738 \ifdim \wd\printedrefnamebox =
0pt
8739 % No printed node name was explicitly given.
8740 \expandafter\ifx\csname SETxref-automatic-section-title
\endcsname \relax
8741 % Not auto section-title: use node name inside the square brackets.
8742 \def\printedrefname{\ignorespaces #1}%
8744 % Auto section-title: use chapter/section title inside
8745 % the square brackets if we have it.
8746 \ifdim \wd\printedmanualbox >
0pt
8747 % It is in another manual, so we don't have it; use node name.
8748 \def\printedrefname{\ignorespaces #1}%
8751 % We (should) know the real title if we have the xref values.
8752 \def\printedrefname{\refx{#1-title
}{}}%
8754 % Otherwise just copy the Info node name.
8755 \def\printedrefname{\ignorespaces #1}%
8761 % Make link in pdf output.
8765 \makevalueexpandable
8766 % This expands tokens, so do it after making catcode changes, so _
8767 % etc. don't get their TeX definitions. This ignores all spaces in
8768 % #4, including (wrongly) those in the middle of the filename.
8771 % This (wrongly) does not take account of leading or trailing
8772 % spaces in #1, which should be ignored.
8773 \edef\pdfxrefdest{#1}%
8774 \ifx\pdfxrefdest\empty
8775 \def\pdfxrefdest{Top
}% no empty targets
8777 \txiescapepdf\pdfxrefdest % escape PDF special chars
8781 \startlink attr
{/Border
[0 0 0]}%
8782 \ifnum\filenamelength>
0
8783 goto file
{\the\filename.pdf
} name
{\pdfxrefdest}%
8785 goto name
{\pdfmkpgn{\pdfxrefdest}}%
8788 \setcolor{\linkcolor}%
8791 % Have to otherify everything special to allow the \csname to
8792 % include an _ in the xref name, etc.
8795 \expandafter\global\expandafter\let\expandafter\Xthisreftitle
8796 \csname XR
#1-title
\endcsname
8799 % Float references are printed completely differently: "Figure 1.2"
8800 % instead of "[somenode], p.3". \iffloat distinguishes them by
8801 % \Xthisreftitle being set to a magic string.
8802 \iffloat\Xthisreftitle
8803 % If the user specified the print name (third arg) to the ref,
8804 % print it instead of our usual "Figure 1.2".
8805 \ifdim\wd\printedrefnamebox =
0pt
8811 % If the user also gave the printed manual name (fifth arg), append
8813 \ifdim \wd\printedmanualbox >
0pt
8814 \space \putwordin{} \cite{\printedmanual}%
8817 % node/anchor (non-float) references.
8819 % If we use \unhbox to print the node names, TeX does not insert
8820 % empty discretionaries after hyphens, which means that it will not
8821 % find a line break at a hyphen in a node names. Since some manuals
8822 % are best written with fairly long node names, containing hyphens,
8823 % this is a loss. Therefore, we give the text of the node name
8824 % again, so it is as if TeX is seeing it for the first time.
8826 \ifdim \wd\printedmanualbox >
0pt
8827 % Cross-manual reference with a printed manual name.
8829 \crossmanualxref{\cite{\printedmanual\unskip}}%
8831 \else\ifdim \wd\infofilenamebox >
0pt
8832 % Cross-manual reference with only an info filename (arg 4), no
8833 % printed manual name (arg 5). This is essentially the same as
8834 % the case above; we output the filename, since we have nothing else.
8836 \crossmanualxref{\code{\infofilename\unskip}}%
8839 % Reference within this manual.
8841 % _ (for example) has to be the character _ for the purposes of the
8842 % control sequence corresponding to the node, but it has to expand
8843 % into the usual \leavevmode...\vrule stuff for purposes of
8844 % printing. So we \turnoffactive for the \refx-snt, back on for the
8845 % printing, back off for the \refx-pg.
8847 % Only output a following space if the -snt ref is nonempty; for
8848 % @unnumbered and @anchor, it won't be.
8849 \setbox2 =
\hbox{\ignorespaces \refx{#1-snt
}{}}%
8850 \ifdim \wd2 >
0pt
\refx{#1-snt
}\space\fi
8852 % output the `[mynode]' via the macro below so it can be overridden.
8853 \xrefprintnodename\printedrefname
8855 % But we always want a comma and a space:
8858 % output the `page 3'.
8859 \turnoffactive \putwordpage\tie\refx{#1-pg
}{}%
8860 % Add a , if xref followed by a space
8861 \if\space\noexpand\tokenafterxref ,
%
8862 \else\ifx\
\tokenafterxref ,
% @TAB
8863 \else\ifx\*
\tokenafterxref ,
% @*
8864 \else\ifx\
\tokenafterxref ,
% @SPACE
8866 \tokenafterxref ,
% @NL
8867 \else\ifx\tie\tokenafterxref ,
% @tie
8874 % Output a cross-manual xref to #1. Used just above (twice).
8876 % Only include the text "Section ``foo'' in" if the foo is neither
8877 % missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply
8878 % "see The Foo Manual", the idea being to refer to the whole manual.
8880 % But, this being TeX, we can't easily compare our node name against the
8881 % string "Top" while ignoring the possible spaces before and after in
8882 % the input. By adding the arbitrary 7sp below, we make it much less
8883 % likely that a real node name would have the same width as "Top" (e.g.,
8884 % in a monospaced font). Hopefully it will never happen in practice.
8886 % For the same basic reason, we retypeset the "Top" at every
8887 % reference, since the current font is indeterminate.
8889 \def\crossmanualxref#1{%
8890 \setbox\toprefbox =
\hbox{Top
\kern7sp}%
8891 \setbox2 =
\hbox{\ignorespaces \printedrefname \unskip \kern7sp}%
8892 \ifdim \wd2 >
7sp
% nonempty?
8893 \ifdim \wd2 =
\wd\toprefbox \else % same as Top?
8894 \putwordSection{} ``
\printedrefname''
\putwordin{}\space
8900 % This macro is called from \xrefX for the `[nodename]' part of xref
8901 % output. It's a separate macro only so it can be changed more easily,
8902 % since square brackets don't work well in some documents. Particularly
8903 % one that Bob is working on :).
8905 \def\xrefprintnodename#1{[#1]}
8907 % Things referred to by \setref.
8913 \putwordChapter@tie
\the\chapno
8914 \else \ifnum\subsecno=
0
8915 \putwordSection@tie
\the\chapno.
\the\secno
8916 \else \ifnum\subsubsecno=
0
8917 \putwordSection@tie
\the\chapno.
\the\secno.
\the\subsecno
8919 \putwordSection@tie
\the\chapno.
\the\secno.
\the\subsecno.
\the\subsubsecno
8924 \putwordAppendix@tie @char
\the\appendixno{}%
8925 \else \ifnum\subsecno=
0
8926 \putwordSection@tie @char
\the\appendixno.
\the\secno
8927 \else \ifnum\subsubsecno=
0
8928 \putwordSection@tie @char
\the\appendixno.
\the\secno.
\the\subsecno
8931 @char
\the\appendixno.
\the\secno.
\the\subsecno.
\the\subsubsecno
8935 % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
8936 % If its value is nonempty, SUFFIX is output afterward.
8943 \expandafter\global\expandafter\let\expandafter\thisrefX
8944 \csname XR
#1\endcsname
8947 % If not defined, say something at least.
8948 \angleleft un\-de\-fined
\angleright
8951 {\toks0 =
{#1}% avoid expansion of possibly-complex value
8952 \message{\linenumber Undefined cross reference `
\the\toks0'.
}}%
8955 \global\warnedxrefstrue
8956 \message{Cross reference values unknown; you must run TeX again.
}%
8961 % It's defined, so just use it.
8964 #2% Output the suffix in any case.
8967 % This is the macro invoked by entries in the aux file. Usually it's
8968 % just a \def (we prepend XR to the control sequence name to avoid
8969 % collisions). But if this is a float type, we have more work to do.
8972 {% The node name might contain 8-bit characters, which in our current
8973 % implementation are changed to commands like @'e. Don't let these
8974 % mess up the control sequence name.
8977 \xdef\safexrefname{#1}%
8980 \expandafter\gdef\csname XR
\safexrefname\endcsname{#2}% remember this xref
8982 % Was that xref control sequence that we just defined for a float?
8983 \expandafter\iffloat\csname XR
\safexrefname\endcsname
8984 % it was a float, and we have the (safe) float type in \iffloattype.
8985 \expandafter\let\expandafter\floatlist
8986 \csname floatlist
\iffloattype\endcsname
8988 % Is this the first time we've seen this float type?
8989 \expandafter\ifx\floatlist\relax
8990 \toks0 =
{\do}% yes, so just \do
8992 % had it before, so preserve previous elements in list.
8993 \toks0 =
\expandafter{\floatlist\do}%
8996 % Remember this xref in the control sequence \floatlistFLOATTYPE,
8997 % for later use in \listoffloats.
8998 \expandafter\xdef\csname floatlist
\iffloattype\endcsname{\the\toks0
9003 % If working on a large document in chapters, it is convenient to
9004 % be able to disable indexing, cross-referencing, and contents, for test runs.
9005 % This is done with @novalidate at the beginning of the file.
9007 \newif\iflinks \linkstrue % by default we want the aux files.
9008 \let\novalidate =
\linksfalse
9010 % Used when writing to the aux file, or when using data from it.
9011 \def\requireauxfile{%
9014 % Open the new aux file. TeX will close it automatically at exit.
9015 \immediate\openout\auxfile=
\jobname.aux
9017 \global\let\requireauxfile=
\relax % Only do this once.
9020 % Read the last existing aux file, if any. No error if none exists.
9023 \openin 1 \jobname.aux
9026 \global\havexrefstrue
9031 \def\setupdatafile{%
9032 \catcode`\^^@=
\other
9033 \catcode`\^^A=
\other
9034 \catcode`\^^B=
\other
9035 \catcode`\^^C=
\other
9036 \catcode`\^^D=
\other
9037 \catcode`\^^E=
\other
9038 \catcode`\^^F=
\other
9039 \catcode`\^^G=
\other
9040 \catcode`\^^H=
\other
9041 \catcode`\^^K=
\other
9042 \catcode`\^^L=
\other
9043 \catcode`\^^N=
\other
9044 \catcode`\^^P=
\other
9045 \catcode`\^^Q=
\other
9046 \catcode`\^^R=
\other
9047 \catcode`\^^S=
\other
9048 \catcode`\^^T=
\other
9049 \catcode`\^^U=
\other
9050 \catcode`\^^V=
\other
9051 \catcode`\^^W=
\other
9052 \catcode`\^^X=
\other
9053 \catcode`\^^Z=
\other
9054 \catcode`\^^
[=
\other
9055 \catcode`\^^\=
\other
9056 \catcode`\^^
]=
\other
9057 \catcode`\^^^=
\other
9058 \catcode`\^^_=
\other
9059 % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc.
9060 % in xref tags, i.e., node names. But since ^^e4 notation isn't
9061 % supported in the main text, it doesn't seem desirable. Furthermore,
9062 % that is not enough: for node names that actually contain a ^
9063 % character, we would end up writing a line like this: 'xrdef {'hat
9064 % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first
9065 % argument, and \hat is not an expandable control sequence. It could
9066 % all be worked out, but why? Either we support ^^ or we don't.
9068 % The other change necessary for this was to define \auxhat:
9069 % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter
9070 % and then to call \auxhat in \setq.
9074 % Special characters. Should be turned off anyway, but...
9087 \catcode`+=
\other % avoid \+ for paranoia even though we've turned it off
9089 % This is to support \ in node names and titles, since the \
9090 % characters end up in a \csname. It's easier than
9091 % leaving it active and making its active definition an actual \
9092 % character. What I don't understand is why it works in the *value*
9093 % of the xrdef. Seems like it should be a catcode12 \, and that
9094 % should not typeset properly. But it works, so I'm moving on for
9095 % now. --karl, 15jan04.
9098 % @ is our escape character in .aux files, and we need braces.
9104 \def\readdatafile#1{%
9111 \message{insertions,
}
9112 % including footnotes.
9114 \newcount \footnoteno
9116 % The trailing space in the following definition for supereject is
9117 % vital for proper filling; pages come out unaligned when you do a
9118 % pagealignmacro call if that space before the closing brace is
9119 % removed. (Generally, numeric constants should always be followed by a
9120 % space to prevent strange expansion errors.)
9121 \def\supereject{\par\penalty -
20000\footnoteno =
0 }
9123 % @footnotestyle is meaningful for Info output only.
9124 \let\footnotestyle=
\comment
9128 % Auto-number footnotes. Otherwise like plain.
9130 \global\advance\footnoteno by \@ne
9131 \edef\thisfootno{$^
{\the\footnoteno}$
}%
9133 % In case the footnote comes at the end of a sentence, preserve the
9134 % extra spacing after we do the footnote number.
9136 \ifhmode\edef\@sf
{\spacefactor\the\spacefactor}\ptexslash\fi
9138 % Remove inadvertent blank space before typesetting the footnote number.
9144 % Don't bother with the trickery in plain.tex to not require the
9145 % footnote text as a parameter. Our footnotes don't need to be so general.
9147 % Oh yes, they do; otherwise, @ifset (and anything else that uses
9148 % \parseargline) fails inside footnotes because the tokens are fixed when
9149 % the footnote is read. --karl, 16nov96.
9152 \insert\footins\bgroup
9154 % Nested footnotes are not supported in TeX, that would take a lot
9155 % more work. (\startsavinginserts does not suffice.)
9156 \let\footnote=
\errfootnotenest
9158 % We want to typeset this text as a normal paragraph, even if the
9159 % footnote reference occurs in (for example) a display environment.
9160 % So reset some parameters.
9161 \hsize=
\txipagewidth
9162 \interlinepenalty\interfootnotelinepenalty
9163 \splittopskip\ht\strutbox % top baseline for broken footnotes
9164 \splitmaxdepth\dp\strutbox
9165 \floatingpenalty\@MM
9170 \parindent\defaultparindent
9174 % Because we use hanging indentation in footnotes, a @noindent appears
9175 % to exdent this text, so make it be a no-op. makeinfo does not use
9176 % hanging indentation so @noindent can still be needed within footnote
9177 % text after an @example or the like (not that this is good style).
9178 \let\noindent =
\relax
9180 % Hang the footnote text off the number. Use \everypar in case the
9181 % footnote extends for more than one paragraph.
9182 \everypar =
{\hang}%
9183 \textindent{\thisfootno}%
9185 % Don't crash into the line above the footnote text. Since this
9186 % expands into a box, it must come within the paragraph, lest it
9187 % provide a place where TeX can split the footnote.
9190 % Invoke rest of plain TeX footnote routine.
9191 \futurelet\next\fo@t
9193 }%end \catcode `\@=11
9195 \def\errfootnotenest{%
9197 \errmessage{Nested footnotes not supported in texinfo.tex,
9198 even though they work in makeinfo; sorry
}
9201 \def\errfootnoteheading{%
9203 \errmessage{Footnotes in chapters, sections, etc., are not supported
}
9206 % In case a @footnote appears in a vbox, save the footnote text and create
9207 % the real \insert just after the vbox finished. Otherwise, the insertion
9209 % Similarly, if a @footnote appears inside an alignment, save the footnote
9210 % text to a box and make the \insert when a row of the table is finished.
9211 % And the same can be done for other insert classes. --kasal, 16nov03.
9213 % Replace the \insert primitive by a cheating macro.
9214 % Deeper inside, just make sure that the saved insertions are not spilled
9217 \def\startsavinginserts{%
9218 \ifx \insert\ptexinsert
9219 \let\insert\saveinsert
9221 \let\checkinserts\relax
9225 % This \insert replacement works for both \insert\footins{foo} and
9226 % \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}.
9229 \edef\next{\noexpand\savetobox \makeSAVEname#1}%
9230 \afterassignment\next
9231 % swallow the left brace
9234 \def\makeSAVEname#1{\makecsname{SAVE
\expandafter\gobble\string#1}}
9235 \def\savetobox#1{\global\setbox#1 =
\vbox\bgroup \unvbox#1}
9237 \def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi}
9239 \def\placesaveins#1{%
9240 \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname
9244 % eat @SAVE -- beware, all of them have catcode \other:
9246 \def\dospecials{\do S
\do A
\do V
\do E
} \uncatcodespecials % ;-)
9247 \gdef\gobblesave @SAVE
{}
9251 \def\newsaveins #1{%
9252 \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}%
9255 \def\newsaveinsX #1{%
9256 \csname newbox
\endcsname #1%
9257 \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts
9262 \let\checkinserts\empty
9267 % @image. We use the macros from epsf.tex to support this.
9268 % If epsf.tex is not installed and @image is used, we complain.
9270 % Check for and read epsf.tex up front. If we read it only at @image
9271 % time, we might be inside a group, and then its definitions would get
9272 % undone and the next image would fail.
9273 \openin 1 = epsf.tex
9275 % Do not bother showing banner with epsf.tex v2.7k (available in
9276 % doc/epsf.tex and on ctan).
9277 \def\epsfannounce{\toks0 =
}%
9282 % We will only complain once about lack of epsf.tex.
9283 \newif\ifwarnednoepsf
9284 \newhelp\noepsfhelp{epsf.tex must be installed for images to
9285 work. It is also included in the Texinfo distribution, or you can get
9286 it from ftp://tug.org/tex/epsf.tex.
}
9289 \ifx\epsfbox\thisisundefined
9290 \ifwarnednoepsf \else
9291 \errhelp =
\noepsfhelp
9292 \errmessage{epsf.tex not found, images will be ignored
}%
9293 \global\warnednoepsftrue
9296 \imagexxx #1,,,,,
\finish
9300 % Arguments to @image:
9301 % #1 is (mandatory) image filename; we tack on .eps extension.
9302 % #2 is (optional) width, #3 is (optional) height.
9303 % #4 is (ignored optional) html alt text.
9304 % #5 is (ignored optional) extension.
9305 % #6 is just the usual extra ignored arg for parsing stuff.
9307 \def\imagexxx#1,
#2,
#3,
#4,
#5,
#6\finish{\begingroup
9308 \catcode`\^^M =
5 % in case we're inside an example
9309 \normalturnoffactive % allow _ et al. in names
9310 \def\xprocessmacroarg{\eatspaces}% in case we are being used via a macro
9311 % If the image is by itself, center it.
9314 \else \ifx\centersub\centerV
9315 % for @center @image, we need a vbox so we can have our vertical space
9317 \vbox\bgroup % vbox has better behavior than vtop herev
9322 % Usually we'll have text after the image which will insert
9323 % \parskip glue, so insert it here too to equalize the space
9325 \nobreak\vskip\parskip
9329 % Leave vertical mode so that indentation from an enclosing
9330 % environment such as @quotation is respected.
9331 % However, if we're at the top level, we don't want the
9332 % normal paragraph indentation.
9333 % On the other hand, if we are in the case of @center @image, we don't
9334 % want to start a paragraph, which will create a hsize-width box and
9335 % eradicate the centering.
9336 \ifx\centersub\centerV\else \noindent \fi
9340 % For pdfTeX and LuaTeX <= 0.80
9341 \dopdfimage{#1}{#2}{#3}%
9343 \ifx\XeTeXrevision\thisisundefined
9345 % \epsfbox itself resets \epsf?size at each figure.
9346 \setbox0 =
\hbox{\ignorespaces #2}%
9347 \ifdim\wd0 >
0pt
\epsfxsize=
#2\relax \fi
9348 \setbox0 =
\hbox{\ignorespaces #3}%
9349 \ifdim\wd0 >
0pt
\epsfysize=
#3\relax \fi
9353 \doxeteximage{#1}{#2}{#3}%
9358 \medskip % space after a standalone image
9360 \ifx\centersub\centerV \egroup \fi
9364 % @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables,
9365 % etc. We don't actually implement floating yet, we always include the
9366 % float "here". But it seemed the best name for the future.
9368 \envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,
\finish}
9370 % There may be a space before second and/or third parameter; delete it.
9371 \def\eatcommaspace#1,
{#1,
}
9373 % #1 is the optional FLOATTYPE, the text label for this float, typically
9374 % "Figure", "Table", "Example", etc. Can't contain commas. If omitted,
9375 % this float will not be numbered and cannot be referred to.
9377 % #2 is the optional xref label. Also must be present for the float to
9380 % #3 is the optional positioning argument; for now, it is ignored. It
9381 % will somehow specify the positions allowed to float to (here, top, bottom).
9383 % We keep a separate counter for each FLOATTYPE, which we reset at each
9384 % chapter-level command.
9385 \let\resetallfloatnos=
\empty
9387 \def\dofloat#1,
#2,
#3,
#4\finish{%
9388 \let\thiscaption=
\empty
9389 \let\thisshortcaption=
\empty
9391 % don't lose footnotes inside @float.
9393 % BEWARE: when the floats start float, we have to issue warning whenever an
9394 % insert appears inside a float which could possibly float. --kasal, 26may04
9398 % We can't be used inside a paragraph.
9403 \def\floatlabel{#2}%
9404 \def\floatloc{#3}% we do nothing with this yet.
9406 \ifx\floattype\empty
9407 \let\safefloattype=
\empty
9410 % the floattype might have accents or other special characters,
9411 % but we need to use it in a control sequence name.
9414 \xdef\safefloattype{\floattype}%
9418 % If label is given but no type, we handle that as the empty type.
9419 \ifx\floatlabel\empty \else
9420 % We want each FLOATTYPE to be numbered separately (Figure 1,
9421 % Table 1, Figure 2, ...). (And if no label, no number.)
9423 \expandafter\getfloatno\csname\safefloattype floatno
\endcsname
9424 \global\advance\floatno by
1
9427 % This magic value for \lastsection is output by \setref as the
9428 % XREFLABEL-title value. \xrefX uses it to distinguish float
9429 % labels (which have a completely different output format) from
9430 % node and anchor labels. And \xrdef uses it to construct the
9433 \edef\lastsection{\floatmagic=
\safefloattype}%
9434 \setref{\floatlabel}{Yfloat
}%
9438 % start with \parskip glue, I guess.
9441 % Don't suppress indentation if a float happens to start a section.
9442 \restorefirstparagraphindent
9445 % we have these possibilities:
9446 % @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap
9447 % @float Foo,lbl & no caption: Foo 1.1
9448 % @float Foo & @caption{Cap}: Foo: Cap
9449 % @float Foo & no caption: Foo
9450 % @float ,lbl & Caption{Cap}: 1.1: Cap
9451 % @float ,lbl & no caption: 1.1
9452 % @float & @caption{Cap}: Cap
9453 % @float & no caption:
9456 \let\floatident =
\empty
9458 % In all cases, if we have a float type, it comes first.
9459 \ifx\floattype\empty \else \def\floatident{\floattype}\fi
9461 % If we have an xref label, the number comes next.
9462 \ifx\floatlabel\empty \else
9463 \ifx\floattype\empty \else % if also had float type, need tie first.
9464 \appendtomacro\floatident{\tie}%
9467 \appendtomacro\floatident{\chaplevelprefix\the\floatno}%
9470 % Start the printed caption with what we've constructed in
9471 % \floatident, but keep it separate; we need \floatident again.
9472 \let\captionline =
\floatident
9474 \ifx\thiscaption\empty \else
9475 \ifx\floatident\empty \else
9476 \appendtomacro\captionline{:
}% had ident, so need a colon between
9480 \appendtomacro\captionline{\scanexp\thiscaption}%
9483 % If we have anything to print, print it, with space before.
9484 % Eventually this needs to become an \insert.
9485 \ifx\captionline\empty \else
9489 % Space below caption.
9493 % If have an xref label, write the list of floats info. Do this
9494 % after the caption, to avoid chance of it being a breakpoint.
9495 \ifx\floatlabel\empty \else
9496 % Write the text that goes in the lof to the aux file as
9497 % \floatlabel-lof. Besides \floatident, we include the short
9498 % caption if specified, else the full caption if specified, else nothing.
9503 \ifx\thisshortcaption\empty
9504 \def\gtemp{\thiscaption}%
9506 \def\gtemp{\thisshortcaption}%
9508 \immediate\write\auxfile{@xrdef
{\floatlabel-lof
}{\floatident
9509 \ifx\gtemp\empty \else :
\gtemp \fi}}%
9512 \egroup % end of \vtop
9517 % Append the tokens #2 to the definition of macro #1, not expanding either.
9519 \def\appendtomacro#1#2{%
9520 \expandafter\def\expandafter#1\expandafter{#1#2}%
9523 % @caption, @shortcaption
9525 \def\caption{\docaption\thiscaption}
9526 \def\shortcaption{\docaption\thisshortcaption}
9527 \def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption}
9528 \def\defcaption#1#2{\egroup \def#1{#2}}
9530 % The parameter is the control sequence identifying the counter we are
9531 % going to use. Create it if it doesn't exist and assign it to \floatno.
9534 % Haven't seen this figure type before.
9535 \csname newcount
\endcsname #1%
9537 % Remember to reset this floatno at the next chap.
9538 \expandafter\gdef\expandafter\resetallfloatnos
9539 \expandafter{\resetallfloatnos #1=
0 }%
9544 % \setref calls this to get the XREFLABEL-snt value. We want an @xref
9545 % to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we
9546 % first read the @float command.
9548 \def\Yfloat{\floattype@tie
\chaplevelprefix\the\floatno}%
9550 % Magic string used for the XREFLABEL-title value, so \xrefX can
9551 % distinguish floats from other xref types.
9552 \def\floatmagic{!!float!!
}
9554 % #1 is the control sequence we are passed; we expand into a conditional
9555 % which is true if #1 represents a float ref. That is, the magic
9556 % \lastsection value which we \setref above.
9558 \def\iffloat#1{\expandafter\doiffloat#1==
\finish}
9560 % #1 is (maybe) the \floatmagic string. If so, #2 will be the
9561 % (safe) float type for this float. We set \iffloattype to #2.
9563 \def\doiffloat#1=
#2=
#3\finish{%
9565 \def\iffloattype{#2}%
9566 \ifx\temp\floatmagic
9569 % @listoffloats FLOATTYPE - print a list of floats like a table of contents.
9571 \parseargdef\listoffloats{%
9572 \def\floattype{#1}% floattype
9574 % the floattype might have accents or other special characters,
9575 % but we need to use it in a control sequence name.
9578 \xdef\safefloattype{\floattype}%
9581 % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE.
9582 \expandafter\ifx\csname floatlist
\safefloattype\endcsname \relax
9584 % if the user said @listoffloats foo but never @float foo.
9585 \message{\linenumber No `
\safefloattype' floats to list.
}%
9589 \leftskip=
\tocindent % indent these entries like a toc
9590 \let\do=
\listoffloatsdo
9591 \csname floatlist
\safefloattype\endcsname
9596 % This is called on each entry in a list of floats. We're passed the
9597 % xref label, in the form LABEL-title, which is how we save it in the
9598 % aux file. We strip off the -title and look up \XRLABEL-lof, which
9599 % has the text we're supposed to typeset here.
9601 % Figures without xref labels will not be included in the list (since
9602 % they won't appear in the aux file).
9604 \def\listoffloatsdo#1{\listoffloatsdoentry#1\finish}
9605 \def\listoffloatsdoentry#1-title
\finish{{%
9606 % Can't fully expand XR#1-lof because it can contain anything. Just
9607 % pass the control sequence. On the other hand, XR#1-pg is just the
9608 % page number, and we want to fully expand that so we can get a link
9610 \toksA =
\expandafter{\csname XR
#1-lof
\endcsname}%
9612 % use the same \entry macro we use to generate the TOC and index.
9613 \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR
#1-pg
\endcsname}}%
9618 \message{localization,
}
9620 % For single-language documents, @documentlanguage is usually given very
9621 % early, just after @documentencoding. Single argument is the language
9622 % (de) or locale (de_DE) abbreviation.
9625 \catcode`
\_ =
\active
9627 \parseargdef\documentlanguage{%
9628 \tex % read txi-??.tex file in plain TeX.
9629 % Read the file by the name they passed if it exists.
9630 \let_ =
\normalunderscore % normal _ character for filename test
9631 \openin 1 txi-
#1.tex
9633 \documentlanguagetrywithoutunderscore #1_
\finish
9635 \globaldefs =
1 % everything in the txi-LL files needs to persist
9639 \endgroup % end raw TeX
9642 % If they passed de_DE, and txi-de_DE.tex doesn't exist,
9645 \gdef\documentlanguagetrywithoutunderscore#1_
#2\finish{%
9646 \openin 1 txi-
#1.tex
9648 \errhelp =
\nolanghelp
9649 \errmessage{Cannot read language file txi-
#1.tex
}%
9651 \globaldefs =
1 % everything in the txi-LL files needs to persist
9656 }% end of special _ catcode
9658 \newhelp\nolanghelp{The given language definition file cannot be found or
9659 is empty. Maybe you need to install it? Putting it in the current
9660 directory should work if nowhere else does.
}
9662 % This macro is called from txi-??.tex files; the first argument is the
9663 % \language name to set (without the "\lang@" prefix), the second and
9664 % third args are \{left,right}hyphenmin.
9666 % The language names to pass are determined when the format is built.
9667 % See the etex.log file created at that time, e.g.,
9668 % /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log.
9670 % With TeX Live 2008, etex now includes hyphenation patterns for all
9671 % available languages. This means we can support hyphenation in
9672 % Texinfo, at least to some extent. (This still doesn't solve the
9673 % accented characters problem.)
9676 \def\txisetlanguage#1#2#3{%
9677 % do not set the language if the name is undefined in the current TeX.
9678 \expandafter\ifx\csname lang@
#1\endcsname \relax
9679 \message{no patterns for
#1}%
9681 \global\language =
\csname lang@
#1\endcsname
9683 % but there is no harm in adjusting the hyphenmin values regardless.
9684 \global\lefthyphenmin =
#2\relax
9685 \global\righthyphenmin =
#3\relax
9688 % XeTeX and LuaTeX can handle native Unicode.
9689 % Their default I/O is UTF-8 sequence instead of byte-wise.
9690 % Other TeX engine (pdfTeX etc.) I/O is byte-wise.
9692 \newif\iftxinativeunicodecapable
9693 \newif\iftxiusebytewiseio
9695 \ifx\XeTeXrevision\thisisundefined
9696 \ifx\luatexversion\thisisundefined
9697 \txinativeunicodecapablefalse
9698 \txiusebytewiseiotrue
9700 \txinativeunicodecapabletrue
9701 \txiusebytewiseiofalse
9704 \txinativeunicodecapabletrue
9705 \txiusebytewiseiofalse
9708 % Set I/O by bytes instead of UTF-8 sequence for XeTeX and LuaTex
9709 % for non-UTF-8 (byte-wise) encodings.
9711 \def\setbytewiseio{%
9712 \ifx\XeTeXrevision\thisisundefined
9714 \XeTeXdefaultencoding "bytes"
% For subsequent files to be read
9715 \XeTeXinputencoding "bytes"
% For document root file
9716 % Unfortunately, there seems to be no corresponding XeTeX command for
9717 % output encoding. This is a problem for auxiliary index and TOC files.
9718 % The only solution would be perhaps to write out @U{...} sequences in
9719 % place of non-ASCII characters.
9722 \ifx\luatexversion\thisisundefined
9725 local utf8_char
, byte
, gsub = unicode
.utf8
.char
, string.byte
, string.gsub
9726 local function convert_char (char
)
9727 return utf8_char(byte(char
))
9730 local function convert_line (line
)
9731 return gsub(line
, ".", convert_char
)
9734 callback
.register("process_input_buffer", convert_line
)
9736 local function convert_line_out (line
)
9738 for c
in string.utfvalues(line
) do
9739 line_out
= line_out
.. string.char(c
)
9744 callback
.register("process_output_buffer", convert_line_out
)
9748 \txiusebytewiseiotrue
9752 % Helpers for encodings.
9753 % Set the catcode of characters 128 through 255 to the specified number.
9755 \def\setnonasciicharscatcode#1{%
9757 \loop\ifnum\count255<
256
9758 \global\catcode\count255=
#1\relax
9759 \advance\count255 by
1
9763 \def\setnonasciicharscatcodenonglobal#1{%
9765 \loop\ifnum\count255<
256
9766 \catcode\count255=
#1\relax
9767 \advance\count255 by
1
9771 % @documentencoding sets the definition of non-ASCII characters
9772 % according to the specified encoding.
9774 \def\documentencoding{\parseargusing\filenamecatcodes\documentencodingzzz}
9775 \def\documentencodingzzz#1{%
9777 % Encoding being declared for the document.
9778 \def\declaredencoding{\csname #1.enc
\endcsname}%
9780 % Supported encodings: names converted to tokens in order to be able
9781 % to compare them with \ifx.
9782 \def\ascii{\csname US-ASCII.enc
\endcsname}%
9783 \def\latnine{\csname ISO-
8859-
15.enc
\endcsname}%
9784 \def\latone{\csname ISO-
8859-
1.enc
\endcsname}%
9785 \def\lattwo{\csname ISO-
8859-
2.enc
\endcsname}%
9786 \def\utfeight{\csname UTF-
8.enc
\endcsname}%
9788 \ifx \declaredencoding \ascii
9791 \else \ifx \declaredencoding \lattwo
9792 \iftxinativeunicodecapable
9795 \setnonasciicharscatcode\active
9798 \else \ifx \declaredencoding \latone
9799 \iftxinativeunicodecapable
9802 \setnonasciicharscatcode\active
9805 \else \ifx \declaredencoding \latnine
9806 \iftxinativeunicodecapable
9809 \setnonasciicharscatcode\active
9812 \else \ifx \declaredencoding \utfeight
9813 \iftxinativeunicodecapable
9814 % For native Unicode (XeTeX and LuaTeX)
9815 \nativeunicodechardefs
9817 % For UTF-8 byte sequence (TeX, eTeX and pdfTeX)
9818 \setnonasciicharscatcode\active
9819 % since we already invoked \utfeightchardefs at the top level
9820 % (below), do not re-invoke it, then our check for duplicated
9821 % definitions triggers. Making non-ascii chars active is enough.
9825 \message{Ignoring unknown
document encoding:
#1.
}%
9835 % A message to be logged when using a character that isn't available
9836 % the default font encoding (OT1).
9838 \def\missingcharmsg#1{\message{Character missing, sorry:
#1.
}}
9840 % Take account of \c (plain) vs. \, (Texinfo) difference.
9841 \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,
{#1}\fi}
9843 % First, make active non-ASCII characters in order for them to be
9844 % correctly categorized when TeX reads the replacement text of
9845 % macros containing the character definitions.
9846 \setnonasciicharscatcode\active
9858 % Latin1 (ISO-8859-1) character definitions.
9859 \def\latonechardefs{%
9861 \gdefchar^^a1
{\exclamdown}
9862 \gdefchar^^a2
{{\tcfont \char162}} % cent
9863 \gdefchar^^a3
{\pounds}
9864 \gdefchar^^a4
{{\tcfont \char164}} % currency
9865 \gdefchar^^a5
{{\tcfont \char165}} % yen
9866 \gdefchar^^a6
{{\tcfont \char166}} % broken bar
9869 \gdefchar^^a9
{\copyright}
9870 \gdefchar^^aa
{\ordf}
9871 \gdefchar^^ab
{\guillemetleft}
9872 \gdefchar^^ac
{\ensuremath\lnot}
9874 \gdefchar^^ae
{\registeredsymbol}
9877 \gdefchar^^b0
{\textdegree}
9878 \gdefchar^^b1
{$
\pm$
}
9882 \gdefchar^^b5
{$
\mu$
}
9884 \gdefchar^^b7
{\ensuremath\cdot}
9885 \gdefchar^^b8
{\cedilla\
}
9887 \gdefchar^^ba
{\ordm}
9888 \gdefchar^^bb
{\guillemetright}
9889 \gdefchar^^bc
{$
1\over4$
}
9890 \gdefchar^^bd
{$
1\over2$
}
9891 \gdefchar^^be
{$
3\over4$
}
9892 \gdefchar^^bf
{\questiondown}
9899 \gdefchar^^c5
{\ringaccent A
}
9901 \gdefchar^^c7
{\cedilla C
}
9918 \gdefchar^^d7
{$
\times$
}
9933 \gdefchar^^e5
{\ringaccent a
}
9935 \gdefchar^^e7
{\cedilla c
}
9940 \gdefchar^^ec
{\`
{\dotless i
}}
9941 \gdefchar^^ed
{\'
{\dotless i
}}
9942 \gdefchar^^ee
{\^
{\dotless i
}}
9943 \gdefchar^^ef
{\"
{\dotless i
}}
9952 \gdefchar^^f7
{$
\div$
}
9963 % Latin9 (ISO-8859-15) encoding character definitions.
9964 \def\latninechardefs{%
9965 % Encoding is almost identical to Latin1.
9968 \gdefchar^^a4
{\euro}
9978 % Latin2 (ISO-8859-2) character definitions.
9979 \def\lattwochardefs{%
9981 \gdefchar^^a1
{\ogonek{A
}}
9984 \gdefchar^^a4
{\missingcharmsg{CURRENCY SIGN
}}
9990 \gdefchar^^aa
{\cedilla S
}
9995 \gdefchar^^af
{\dotaccent Z
}
9997 \gdefchar^^b0
{\textdegree}
9998 \gdefchar^^b1
{\ogonek{a
}}
9999 \gdefchar^^b2
{\ogonek{ }}
10001 \gdefchar^^b4
{\'
{}}
10002 \gdefchar^^b5
{\v l
}
10004 \gdefchar^^b7
{\v{}}
10005 \gdefchar^^b8
{\cedilla\
}
10006 \gdefchar^^b9
{\v s
}
10007 \gdefchar^^ba
{\cedilla s
}
10008 \gdefchar^^bb
{\v t
}
10010 \gdefchar^^bd
{\H{}}
10011 \gdefchar^^be
{\v z
}
10012 \gdefchar^^bf
{\dotaccent z
}
10017 \gdefchar^^c3
{\u A
}
10021 \gdefchar^^c7
{\cedilla C
}
10022 \gdefchar^^c8
{\v C
}
10024 \gdefchar^^ca
{\ogonek{E
}}
10026 \gdefchar^^cc
{\v E
}
10029 \gdefchar^^cf
{\v D
}
10033 \gdefchar^^d2
{\v N
}
10036 \gdefchar^^d5
{\H O
}
10038 \gdefchar^^d7
{$
\times$
}
10039 \gdefchar^^d8
{\v R
}
10040 \gdefchar^^d9
{\ringaccent U
}
10042 \gdefchar^^db
{\H U
}
10045 \gdefchar^^de
{\cedilla T
}
10051 \gdefchar^^e3
{\u a
}
10055 \gdefchar^^e7
{\cedilla c
}
10056 \gdefchar^^e8
{\v c
}
10058 \gdefchar^^ea
{\ogonek{e
}}
10060 \gdefchar^^ec
{\v e
}
10061 \gdefchar^^ed
{\'
{\dotless{i
}}}
10062 \gdefchar^^ee
{\^
{\dotless{i
}}}
10063 \gdefchar^^ef
{\v d
}
10067 \gdefchar^^f2
{\v n
}
10070 \gdefchar^^f5
{\H o
}
10072 \gdefchar^^f7
{$
\div$
}
10073 \gdefchar^^f8
{\v r
}
10074 \gdefchar^^f9
{\ringaccent u
}
10076 \gdefchar^^fb
{\H u
}
10079 \gdefchar^^fe
{\cedilla t
}
10080 \gdefchar^^ff
{\dotaccent{}}
10083 % UTF-8 character definitions.
10085 % This code to support UTF-8 is based on LaTeX's utf8.def, with some
10086 % changes for Texinfo conventions. It is included here under the GPL by
10087 % permission from Frank Mittelbach and the LaTeX team.
10089 \newcount\countUTFx
10090 \newcount\countUTFy
10091 \newcount\countUTFz
10093 \gdef\UTFviiiTwoOctets#1#2{\expandafter
10094 \UTFviiiDefined\csname u8:
#1\string #2\endcsname}
10096 \gdef\UTFviiiThreeOctets#1#2#3{\expandafter
10097 \UTFviiiDefined\csname u8:
#1\string #2\string #3\endcsname}
10099 \gdef\UTFviiiFourOctets#1#2#3#4{\expandafter
10100 \UTFviiiDefined\csname u8:
#1\string #2\string #3\string #4\endcsname}
10102 \gdef\UTFviiiDefined#1{%
10104 \message{\linenumber Unicode char
\string #1 not defined for Texinfo
}%
10110 % Give non-ASCII bytes the active definitions for processing UTF-8 sequences
10116 % Loop from \countUTFx to \countUTFy, performing \UTFviiiTmp
10117 % substituting ~ and $ with a character token of that value.
10119 \global\catcode\countUTFx\active
10120 \uccode`\~
\countUTFx
10121 \uccode`\$
\countUTFx
10122 \uppercase\expandafter{\UTFviiiTmp}%
10123 \advance\countUTFx by
1
10124 \ifnum\countUTFx <
\countUTFy
10125 \expandafter\UTFviiiLoop
10128 % For bytes other than the first in a UTF-8 sequence. Not expected to
10129 % be expanded except when writing to auxiliary files.
10134 \ifpassthroughchars $
\fi}}%
10141 \ifpassthroughchars $
%
10142 \else\expandafter\UTFviiiTwoOctets\expandafter$
\fi}}%
10149 \ifpassthroughchars $
%
10150 \else\expandafter\UTFviiiThreeOctets\expandafter$
\fi}}%
10157 \ifpassthroughchars $
%
10158 \else\expandafter\UTFviiiFourOctets\expandafter$
\fi
10163 \def\globallet{\global\let} % save some \expandafter's below
10165 % @U{xxxx} to produce U+xxxx, if we support it.
10167 \expandafter\ifx\csname uni:
#1\endcsname \relax
10168 \iftxinativeunicodecapable
10169 % Any Unicode characters can be used by native Unicode.
10170 % However, if the font does not have the glyph, the letter will miss.
10172 \uccode`\.="
#1\relax
10176 \errhelp =
\EMsimple
10177 \errmessage{Unicode character U+
#1 not supported, sorry
}%
10180 \csname uni:
#1\endcsname
10184 % For UTF-8 byte sequence (TeX, e-TeX and pdfTeX)
10185 % Definition macro to replace the Unicode character
10186 % Definition macro that is used by @U command
10196 \gdef\DeclareUnicodeCharacterUTFviii#1#2{%
10197 \countUTFz = "
#1\relax
10201 % Access definitions of characters given UTF-8 sequences
10202 \def\UTFviiiTwoOctets#
#1#
#2{%
10203 \csname u8:#
#1\string #
#2\endcsname}%
10204 \def\UTFviiiThreeOctets#
#1#
#2#
#3{%
10205 \csname u8:#
#1\string #
#2\string #
#3\endcsname}%
10206 \def\UTFviiiFourOctets#
#1#
#2#
#3#
#4{%
10207 \csname u8:#
#1\string #
#2\string #
#3\string #
#4\endcsname}%
10208 \expandafter\expandafter\expandafter\expandafter
10209 \expandafter\expandafter\expandafter
10210 \gdef\UTFviiiTmp{#2}%
10212 \expandafter\ifx\csname uni:
#1\endcsname \relax \else
10213 \message{Internal error, already defined:
#1}%
10216 % define an additional control sequence for this code point.
10217 \expandafter\globallet\csname uni:
#1\endcsname \UTFviiiTmp
10220 % Given the value in \countUTFz as a Unicode code point, set \UTFviiiTmp.
10221 \gdef\parseXMLCharref{%
10222 \ifnum\countUTFz < "A0
\relax
10223 \errhelp =
\EMsimple
10224 \errmessage{Cannot define Unicode char value <
00A0
}%
10225 \else\ifnum\countUTFz < "
800\relax
10227 \parseUTFviiiB C
\UTFviiiTwoOctets.,
%
10228 \else\ifnum\countUTFz < "
10000\relax
10231 \parseUTFviiiB E
\UTFviiiThreeOctets.
{,;
}%
10236 \parseUTFviiiB F
\UTFviiiFourOctets.
{!,;
}%
10240 \gdef\parseUTFviiiA#1{%
10241 \countUTFx =
\countUTFz
10242 \divide\countUTFz by
64
10243 \countUTFy =
\countUTFz
10244 \multiply\countUTFz by
64
10245 \advance\countUTFx by -
\countUTFz
10246 \advance\countUTFx by
128
10247 \uccode `
#1\countUTFx
10248 \countUTFz =
\countUTFy}
10250 % Used to set \UTFviiiTmp to a UTF-8 byte sequence
10251 \gdef\parseUTFviiiB#1#2#3#4{%
10252 \advance\countUTFz by "
#10\relax
10253 \uccode `
#3\countUTFz
10254 \uppercase{\gdef\UTFviiiTmp{#2#3#4}}}
10257 % For native Unicode (XeTeX and LuaTeX)
10258 % Definition macro that is set catcode other non global
10260 \def\DeclareUnicodeCharacterNativeOther#1#2{%
10264 % https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_M
10265 % U+0000..U+007F = https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block)
10266 % U+0080..U+00FF = https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)
10267 % U+0100..U+017F = https://en.wikipedia.org/wiki/Latin_Extended-A
10268 % U+0180..U+024F = https://en.wikipedia.org/wiki/Latin_Extended-B
10270 % Many of our renditions are less than wonderful, and all the missing
10271 % characters are available somewhere. Loading the necessary fonts
10272 % awaits user request. We can't truly support Unicode without
10273 % reimplementing everything that's been done in LaTeX for many years,
10274 % plus probably using luatex or xetex, and who knows what else.
10275 % We won't be doing that here in this simple file. But we can try to at
10276 % least make most of the characters not bomb out.
10278 \def\unicodechardefs{%
10279 \DeclareUnicodeCharacter{00A0
}{\tie}%
10280 \DeclareUnicodeCharacter{00A1
}{\exclamdown}%
10281 \DeclareUnicodeCharacter{00A2
}{{\tcfont \char162}}% 0242=cent
10282 \DeclareUnicodeCharacter{00A3
}{\pounds}%
10283 \DeclareUnicodeCharacter{00A4
}{{\tcfont \char164}}% 0244=currency
10284 \DeclareUnicodeCharacter{00A5
}{{\tcfont \char165}}% 0245=yen
10285 \DeclareUnicodeCharacter{00A6
}{{\tcfont \char166}}% 0246=brokenbar
10286 \DeclareUnicodeCharacter{00A7
}{\S}%
10287 \DeclareUnicodeCharacter{00A8
}{\"
{ }}%
10288 \DeclareUnicodeCharacter{00A9
}{\copyright}%
10289 \DeclareUnicodeCharacter{00AA
}{\ordf}%
10290 \DeclareUnicodeCharacter{00AB
}{\guillemetleft}%
10291 \DeclareUnicodeCharacter{00AC
}{\ensuremath\lnot}%
10292 \DeclareUnicodeCharacter{00AD
}{\-
}%
10293 \DeclareUnicodeCharacter{00AE
}{\registeredsymbol}%
10294 \DeclareUnicodeCharacter{00AF
}{\=
{ }}%
10296 \DeclareUnicodeCharacter{00B0
}{\ringaccent{ }}%
10297 \DeclareUnicodeCharacter{00B1
}{\ensuremath\pm}%
10298 \DeclareUnicodeCharacter{00B2
}{$^
2$
}%
10299 \DeclareUnicodeCharacter{00B3
}{$^
3$
}%
10300 \DeclareUnicodeCharacter{00B4
}{\'
{ }}%
10301 \DeclareUnicodeCharacter{00B5
}{$
\mu$
}%
10302 \DeclareUnicodeCharacter{00B6
}{\P}%
10303 \DeclareUnicodeCharacter{00B7
}{\ensuremath\cdot}%
10304 \DeclareUnicodeCharacter{00B8
}{\cedilla{ }}%
10305 \DeclareUnicodeCharacter{00B9
}{$^
1$
}%
10306 \DeclareUnicodeCharacter{00BA
}{\ordm}%
10307 \DeclareUnicodeCharacter{00BB
}{\guillemetright}%
10308 \DeclareUnicodeCharacter{00BC
}{$
1\over4$
}%
10309 \DeclareUnicodeCharacter{00BD
}{$
1\over2$
}%
10310 \DeclareUnicodeCharacter{00BE
}{$
3\over4$
}%
10311 \DeclareUnicodeCharacter{00BF
}{\questiondown}%
10313 \DeclareUnicodeCharacter{00C0
}{\`A
}%
10314 \DeclareUnicodeCharacter{00C1
}{\'A
}%
10315 \DeclareUnicodeCharacter{00C2
}{\^A
}%
10316 \DeclareUnicodeCharacter{00C3
}{\~A
}%
10317 \DeclareUnicodeCharacter{00C4
}{\"A
}%
10318 \DeclareUnicodeCharacter{00C5
}{\AA}%
10319 \DeclareUnicodeCharacter{00C6
}{\AE}%
10320 \DeclareUnicodeCharacter{00C7
}{\cedilla{C
}}%
10321 \DeclareUnicodeCharacter{00C8
}{\`E
}%
10322 \DeclareUnicodeCharacter{00C9
}{\'E
}%
10323 \DeclareUnicodeCharacter{00CA
}{\^E
}%
10324 \DeclareUnicodeCharacter{00CB
}{\"E
}%
10325 \DeclareUnicodeCharacter{00CC
}{\`I
}%
10326 \DeclareUnicodeCharacter{00CD
}{\'I
}%
10327 \DeclareUnicodeCharacter{00CE
}{\^I
}%
10328 \DeclareUnicodeCharacter{00CF
}{\"I
}%
10330 \DeclareUnicodeCharacter{00D0
}{\DH}%
10331 \DeclareUnicodeCharacter{00D1
}{\~N
}%
10332 \DeclareUnicodeCharacter{00D2
}{\`O
}%
10333 \DeclareUnicodeCharacter{00D3
}{\'O
}%
10334 \DeclareUnicodeCharacter{00D4
}{\^O
}%
10335 \DeclareUnicodeCharacter{00D5
}{\~O
}%
10336 \DeclareUnicodeCharacter{00D6
}{\"O
}%
10337 \DeclareUnicodeCharacter{00D7
}{\ensuremath\times}%
10338 \DeclareUnicodeCharacter{00D8
}{\O}%
10339 \DeclareUnicodeCharacter{00D9
}{\`U
}%
10340 \DeclareUnicodeCharacter{00DA
}{\'U
}%
10341 \DeclareUnicodeCharacter{00DB
}{\^U
}%
10342 \DeclareUnicodeCharacter{00DC
}{\"U
}%
10343 \DeclareUnicodeCharacter{00DD
}{\'Y
}%
10344 \DeclareUnicodeCharacter{00DE
}{\TH}%
10345 \DeclareUnicodeCharacter{00DF
}{\ss}%
10347 \DeclareUnicodeCharacter{00E0
}{\`a
}%
10348 \DeclareUnicodeCharacter{00E1
}{\'a
}%
10349 \DeclareUnicodeCharacter{00E2
}{\^a
}%
10350 \DeclareUnicodeCharacter{00E3
}{\~a
}%
10351 \DeclareUnicodeCharacter{00E4
}{\"a
}%
10352 \DeclareUnicodeCharacter{00E5
}{\aa}%
10353 \DeclareUnicodeCharacter{00E6
}{\ae}%
10354 \DeclareUnicodeCharacter{00E7
}{\cedilla{c
}}%
10355 \DeclareUnicodeCharacter{00E8
}{\`e
}%
10356 \DeclareUnicodeCharacter{00E9
}{\'e
}%
10357 \DeclareUnicodeCharacter{00EA
}{\^e
}%
10358 \DeclareUnicodeCharacter{00EB
}{\"e
}%
10359 \DeclareUnicodeCharacter{00EC
}{\`
{\dotless{i
}}}%
10360 \DeclareUnicodeCharacter{00ED
}{\'
{\dotless{i
}}}%
10361 \DeclareUnicodeCharacter{00EE
}{\^
{\dotless{i
}}}%
10362 \DeclareUnicodeCharacter{00EF
}{\"
{\dotless{i
}}}%
10364 \DeclareUnicodeCharacter{00F0
}{\dh}%
10365 \DeclareUnicodeCharacter{00F1
}{\~n
}%
10366 \DeclareUnicodeCharacter{00F2
}{\`o
}%
10367 \DeclareUnicodeCharacter{00F3
}{\'o
}%
10368 \DeclareUnicodeCharacter{00F4
}{\^o
}%
10369 \DeclareUnicodeCharacter{00F5
}{\~o
}%
10370 \DeclareUnicodeCharacter{00F6
}{\"o
}%
10371 \DeclareUnicodeCharacter{00F7
}{\ensuremath\div}%
10372 \DeclareUnicodeCharacter{00F8
}{\o}%
10373 \DeclareUnicodeCharacter{00F9
}{\`u
}%
10374 \DeclareUnicodeCharacter{00FA
}{\'u
}%
10375 \DeclareUnicodeCharacter{00FB
}{\^u
}%
10376 \DeclareUnicodeCharacter{00FC
}{\"u
}%
10377 \DeclareUnicodeCharacter{00FD
}{\'y
}%
10378 \DeclareUnicodeCharacter{00FE
}{\th}%
10379 \DeclareUnicodeCharacter{00FF
}{\"y
}%
10381 \DeclareUnicodeCharacter{0100}{\=A
}%
10382 \DeclareUnicodeCharacter{0101}{\=a
}%
10383 \DeclareUnicodeCharacter{0102}{\u{A
}}%
10384 \DeclareUnicodeCharacter{0103}{\u{a
}}%
10385 \DeclareUnicodeCharacter{0104}{\ogonek{A
}}%
10386 \DeclareUnicodeCharacter{0105}{\ogonek{a
}}%
10387 \DeclareUnicodeCharacter{0106}{\'C
}%
10388 \DeclareUnicodeCharacter{0107}{\'c
}%
10389 \DeclareUnicodeCharacter{0108}{\^C
}%
10390 \DeclareUnicodeCharacter{0109}{\^c
}%
10391 \DeclareUnicodeCharacter{010A
}{\dotaccent{C
}}%
10392 \DeclareUnicodeCharacter{010B
}{\dotaccent{c
}}%
10393 \DeclareUnicodeCharacter{010C
}{\v{C
}}%
10394 \DeclareUnicodeCharacter{010D
}{\v{c
}}%
10395 \DeclareUnicodeCharacter{010E
}{\v{D
}}%
10396 \DeclareUnicodeCharacter{010F
}{d'
}%
10398 \DeclareUnicodeCharacter{0110}{\DH}%
10399 \DeclareUnicodeCharacter{0111}{\dh}%
10400 \DeclareUnicodeCharacter{0112}{\=E
}%
10401 \DeclareUnicodeCharacter{0113}{\=e
}%
10402 \DeclareUnicodeCharacter{0114}{\u{E
}}%
10403 \DeclareUnicodeCharacter{0115}{\u{e
}}%
10404 \DeclareUnicodeCharacter{0116}{\dotaccent{E
}}%
10405 \DeclareUnicodeCharacter{0117}{\dotaccent{e
}}%
10406 \DeclareUnicodeCharacter{0118}{\ogonek{E
}}%
10407 \DeclareUnicodeCharacter{0119}{\ogonek{e
}}%
10408 \DeclareUnicodeCharacter{011A
}{\v{E
}}%
10409 \DeclareUnicodeCharacter{011B
}{\v{e
}}%
10410 \DeclareUnicodeCharacter{011C
}{\^G
}%
10411 \DeclareUnicodeCharacter{011D
}{\^g
}%
10412 \DeclareUnicodeCharacter{011E
}{\u{G
}}%
10413 \DeclareUnicodeCharacter{011F
}{\u{g
}}%
10415 \DeclareUnicodeCharacter{0120}{\dotaccent{G
}}%
10416 \DeclareUnicodeCharacter{0121}{\dotaccent{g
}}%
10417 \DeclareUnicodeCharacter{0122}{\cedilla{G
}}%
10418 \DeclareUnicodeCharacter{0123}{\cedilla{g
}}%
10419 \DeclareUnicodeCharacter{0124}{\^H
}%
10420 \DeclareUnicodeCharacter{0125}{\^h
}%
10421 \DeclareUnicodeCharacter{0126}{\missingcharmsg{H WITH STROKE
}}%
10422 \DeclareUnicodeCharacter{0127}{\missingcharmsg{h WITH STROKE
}}%
10423 \DeclareUnicodeCharacter{0128}{\~I
}%
10424 \DeclareUnicodeCharacter{0129}{\~
{\dotless{i
}}}%
10425 \DeclareUnicodeCharacter{012A
}{\=I
}%
10426 \DeclareUnicodeCharacter{012B
}{\=
{\dotless{i
}}}%
10427 \DeclareUnicodeCharacter{012C
}{\u{I
}}%
10428 \DeclareUnicodeCharacter{012D
}{\u{\dotless{i
}}}%
10429 \DeclareUnicodeCharacter{012E
}{\ogonek{I
}}%
10430 \DeclareUnicodeCharacter{012F
}{\ogonek{i
}}%
10432 \DeclareUnicodeCharacter{0130}{\dotaccent{I
}}%
10433 \DeclareUnicodeCharacter{0131}{\dotless{i
}}%
10434 \DeclareUnicodeCharacter{0132}{IJ
}%
10435 \DeclareUnicodeCharacter{0133}{ij
}%
10436 \DeclareUnicodeCharacter{0134}{\^J
}%
10437 \DeclareUnicodeCharacter{0135}{\^
{\dotless{j
}}}%
10438 \DeclareUnicodeCharacter{0136}{\cedilla{K
}}%
10439 \DeclareUnicodeCharacter{0137}{\cedilla{k
}}%
10440 \DeclareUnicodeCharacter{0138}{\ensuremath\kappa}%
10441 \DeclareUnicodeCharacter{0139}{\'L
}%
10442 \DeclareUnicodeCharacter{013A
}{\'l
}%
10443 \DeclareUnicodeCharacter{013B
}{\cedilla{L
}}%
10444 \DeclareUnicodeCharacter{013C
}{\cedilla{l
}}%
10445 \DeclareUnicodeCharacter{013D
}{L'
}% should kern
10446 \DeclareUnicodeCharacter{013E
}{l'
}% should kern
10447 \DeclareUnicodeCharacter{013F
}{L
\U{00B7
}}%
10449 \DeclareUnicodeCharacter{0140}{l
\U{00B7
}}%
10450 \DeclareUnicodeCharacter{0141}{\L}%
10451 \DeclareUnicodeCharacter{0142}{\l}%
10452 \DeclareUnicodeCharacter{0143}{\'N
}%
10453 \DeclareUnicodeCharacter{0144}{\'n
}%
10454 \DeclareUnicodeCharacter{0145}{\cedilla{N
}}%
10455 \DeclareUnicodeCharacter{0146}{\cedilla{n
}}%
10456 \DeclareUnicodeCharacter{0147}{\v{N
}}%
10457 \DeclareUnicodeCharacter{0148}{\v{n
}}%
10458 \DeclareUnicodeCharacter{0149}{'n
}%
10459 \DeclareUnicodeCharacter{014A
}{\missingcharmsg{ENG
}}%
10460 \DeclareUnicodeCharacter{014B
}{\missingcharmsg{eng
}}%
10461 \DeclareUnicodeCharacter{014C
}{\=O
}%
10462 \DeclareUnicodeCharacter{014D
}{\=o
}%
10463 \DeclareUnicodeCharacter{014E
}{\u{O
}}%
10464 \DeclareUnicodeCharacter{014F
}{\u{o
}}%
10466 \DeclareUnicodeCharacter{0150}{\H{O
}}%
10467 \DeclareUnicodeCharacter{0151}{\H{o
}}%
10468 \DeclareUnicodeCharacter{0152}{\OE}%
10469 \DeclareUnicodeCharacter{0153}{\oe}%
10470 \DeclareUnicodeCharacter{0154}{\'R
}%
10471 \DeclareUnicodeCharacter{0155}{\'r
}%
10472 \DeclareUnicodeCharacter{0156}{\cedilla{R
}}%
10473 \DeclareUnicodeCharacter{0157}{\cedilla{r
}}%
10474 \DeclareUnicodeCharacter{0158}{\v{R
}}%
10475 \DeclareUnicodeCharacter{0159}{\v{r
}}%
10476 \DeclareUnicodeCharacter{015A
}{\'S
}%
10477 \DeclareUnicodeCharacter{015B
}{\'s
}%
10478 \DeclareUnicodeCharacter{015C
}{\^S
}%
10479 \DeclareUnicodeCharacter{015D
}{\^s
}%
10480 \DeclareUnicodeCharacter{015E
}{\cedilla{S
}}%
10481 \DeclareUnicodeCharacter{015F
}{\cedilla{s
}}%
10483 \DeclareUnicodeCharacter{0160}{\v{S
}}%
10484 \DeclareUnicodeCharacter{0161}{\v{s
}}%
10485 \DeclareUnicodeCharacter{0162}{\cedilla{T
}}%
10486 \DeclareUnicodeCharacter{0163}{\cedilla{t
}}%
10487 \DeclareUnicodeCharacter{0164}{\v{T
}}%
10488 \DeclareUnicodeCharacter{0165}{\v{t
}}%
10489 \DeclareUnicodeCharacter{0166}{\missingcharmsg{H WITH STROKE
}}%
10490 \DeclareUnicodeCharacter{0167}{\missingcharmsg{h WITH STROKE
}}%
10491 \DeclareUnicodeCharacter{0168}{\~U
}%
10492 \DeclareUnicodeCharacter{0169}{\~u
}%
10493 \DeclareUnicodeCharacter{016A
}{\=U
}%
10494 \DeclareUnicodeCharacter{016B
}{\=u
}%
10495 \DeclareUnicodeCharacter{016C
}{\u{U
}}%
10496 \DeclareUnicodeCharacter{016D
}{\u{u
}}%
10497 \DeclareUnicodeCharacter{016E
}{\ringaccent{U
}}%
10498 \DeclareUnicodeCharacter{016F
}{\ringaccent{u
}}%
10500 \DeclareUnicodeCharacter{0170}{\H{U
}}%
10501 \DeclareUnicodeCharacter{0171}{\H{u
}}%
10502 \DeclareUnicodeCharacter{0172}{\ogonek{U
}}%
10503 \DeclareUnicodeCharacter{0173}{\ogonek{u
}}%
10504 \DeclareUnicodeCharacter{0174}{\^W
}%
10505 \DeclareUnicodeCharacter{0175}{\^w
}%
10506 \DeclareUnicodeCharacter{0176}{\^Y
}%
10507 \DeclareUnicodeCharacter{0177}{\^y
}%
10508 \DeclareUnicodeCharacter{0178}{\"Y
}%
10509 \DeclareUnicodeCharacter{0179}{\'Z
}%
10510 \DeclareUnicodeCharacter{017A
}{\'z
}%
10511 \DeclareUnicodeCharacter{017B
}{\dotaccent{Z
}}%
10512 \DeclareUnicodeCharacter{017C
}{\dotaccent{z
}}%
10513 \DeclareUnicodeCharacter{017D
}{\v{Z
}}%
10514 \DeclareUnicodeCharacter{017E
}{\v{z
}}%
10515 \DeclareUnicodeCharacter{017F
}{\missingcharmsg{LONG S
}}%
10517 \DeclareUnicodeCharacter{01C4
}{D
\v{Z
}}%
10518 \DeclareUnicodeCharacter{01C5
}{D
\v{z
}}%
10519 \DeclareUnicodeCharacter{01C6
}{d
\v{z
}}%
10520 \DeclareUnicodeCharacter{01C7
}{LJ
}%
10521 \DeclareUnicodeCharacter{01C8
}{Lj
}%
10522 \DeclareUnicodeCharacter{01C9
}{lj
}%
10523 \DeclareUnicodeCharacter{01CA
}{NJ
}%
10524 \DeclareUnicodeCharacter{01CB
}{Nj
}%
10525 \DeclareUnicodeCharacter{01CC
}{nj
}%
10526 \DeclareUnicodeCharacter{01CD
}{\v{A
}}%
10527 \DeclareUnicodeCharacter{01CE
}{\v{a
}}%
10528 \DeclareUnicodeCharacter{01CF
}{\v{I
}}%
10530 \DeclareUnicodeCharacter{01D0
}{\v{\dotless{i
}}}%
10531 \DeclareUnicodeCharacter{01D1
}{\v{O
}}%
10532 \DeclareUnicodeCharacter{01D2
}{\v{o
}}%
10533 \DeclareUnicodeCharacter{01D3
}{\v{U
}}%
10534 \DeclareUnicodeCharacter{01D4
}{\v{u
}}%
10536 \DeclareUnicodeCharacter{01E2
}{\=
{\AE}}%
10537 \DeclareUnicodeCharacter{01E3
}{\=
{\ae}}%
10538 \DeclareUnicodeCharacter{01E6
}{\v{G
}}%
10539 \DeclareUnicodeCharacter{01E7
}{\v{g
}}%
10540 \DeclareUnicodeCharacter{01E8
}{\v{K
}}%
10541 \DeclareUnicodeCharacter{01E9
}{\v{k
}}%
10543 \DeclareUnicodeCharacter{01F0
}{\v{\dotless{j
}}}%
10544 \DeclareUnicodeCharacter{01F1
}{DZ
}%
10545 \DeclareUnicodeCharacter{01F2
}{Dz
}%
10546 \DeclareUnicodeCharacter{01F3
}{dz
}%
10547 \DeclareUnicodeCharacter{01F4
}{\'G
}%
10548 \DeclareUnicodeCharacter{01F5
}{\'g
}%
10549 \DeclareUnicodeCharacter{01F8
}{\`N
}%
10550 \DeclareUnicodeCharacter{01F9
}{\`n
}%
10551 \DeclareUnicodeCharacter{01FC
}{\'
{\AE}}%
10552 \DeclareUnicodeCharacter{01FD
}{\'
{\ae}}%
10553 \DeclareUnicodeCharacter{01FE
}{\'
{\O}}%
10554 \DeclareUnicodeCharacter{01FF
}{\'
{\o}}%
10556 \DeclareUnicodeCharacter{021E
}{\v{H
}}%
10557 \DeclareUnicodeCharacter{021F
}{\v{h
}}%
10559 \DeclareUnicodeCharacter{0226}{\dotaccent{A
}}%
10560 \DeclareUnicodeCharacter{0227}{\dotaccent{a
}}%
10561 \DeclareUnicodeCharacter{0228}{\cedilla{E
}}%
10562 \DeclareUnicodeCharacter{0229}{\cedilla{e
}}%
10563 \DeclareUnicodeCharacter{022E
}{\dotaccent{O
}}%
10564 \DeclareUnicodeCharacter{022F
}{\dotaccent{o
}}%
10566 \DeclareUnicodeCharacter{0232}{\=Y
}%
10567 \DeclareUnicodeCharacter{0233}{\=y
}%
10568 \DeclareUnicodeCharacter{0237}{\dotless{j
}}%
10570 \DeclareUnicodeCharacter{02DB
}{\ogonek{ }}%
10572 % Greek letters upper case
10573 \DeclareUnicodeCharacter{0391}{{\it A
}}%
10574 \DeclareUnicodeCharacter{0392}{{\it B
}}%
10575 \DeclareUnicodeCharacter{0393}{\ensuremath{\mit\Gamma}}%
10576 \DeclareUnicodeCharacter{0394}{\ensuremath{\mit\Delta}}%
10577 \DeclareUnicodeCharacter{0395}{{\it E
}}%
10578 \DeclareUnicodeCharacter{0396}{{\it Z
}}%
10579 \DeclareUnicodeCharacter{0397}{{\it H
}}%
10580 \DeclareUnicodeCharacter{0398}{\ensuremath{\mit\Theta}}%
10581 \DeclareUnicodeCharacter{0399}{{\it I
}}%
10582 \DeclareUnicodeCharacter{039A
}{{\it K
}}%
10583 \DeclareUnicodeCharacter{039B
}{\ensuremath{\mit\Lambda}}%
10584 \DeclareUnicodeCharacter{039C
}{{\it M
}}%
10585 \DeclareUnicodeCharacter{039D
}{{\it N
}}%
10586 \DeclareUnicodeCharacter{039E
}{\ensuremath{\mit\Xi}}%
10587 \DeclareUnicodeCharacter{039F
}{{\it O
}}%
10588 \DeclareUnicodeCharacter{03A0
}{\ensuremath{\mit\Pi}}%
10589 \DeclareUnicodeCharacter{03A1
}{{\it P
}}%
10590 %\DeclareUnicodeCharacter{03A2}{} % none - corresponds to final sigma
10591 \DeclareUnicodeCharacter{03A3
}{\ensuremath{\mit\Sigma}}%
10592 \DeclareUnicodeCharacter{03A4
}{{\it T
}}%
10593 \DeclareUnicodeCharacter{03A5
}{\ensuremath{\mit\Upsilon}}%
10594 \DeclareUnicodeCharacter{03A6
}{\ensuremath{\mit\Phi}}%
10595 \DeclareUnicodeCharacter{03A7
}{{\it X
}}%
10596 \DeclareUnicodeCharacter{03A8
}{\ensuremath{\mit\Psi}}%
10597 \DeclareUnicodeCharacter{03A9
}{\ensuremath{\mit\Omega}}%
10599 % Vowels with accents
10600 \DeclareUnicodeCharacter{0390}{\ensuremath{\ddot{\acute\iota}}}%
10601 \DeclareUnicodeCharacter{03AC
}{\ensuremath{\acute\alpha}}%
10602 \DeclareUnicodeCharacter{03AD
}{\ensuremath{\acute\epsilon}}%
10603 \DeclareUnicodeCharacter{03AE
}{\ensuremath{\acute\eta}}%
10604 \DeclareUnicodeCharacter{03AF
}{\ensuremath{\acute\iota}}%
10605 \DeclareUnicodeCharacter{03B0
}{\ensuremath{\acute{\ddot\upsilon}}}%
10607 % Standalone accent
10608 \DeclareUnicodeCharacter{0384}{\ensuremath{\acute{\
}}}%
10610 % Greek letters lower case
10611 \DeclareUnicodeCharacter{03B1
}{\ensuremath\alpha}%
10612 \DeclareUnicodeCharacter{03B2
}{\ensuremath\beta}%
10613 \DeclareUnicodeCharacter{03B3
}{\ensuremath\gamma}%
10614 \DeclareUnicodeCharacter{03B4
}{\ensuremath\delta}%
10615 \DeclareUnicodeCharacter{03B5
}{\ensuremath\epsilon}%
10616 \DeclareUnicodeCharacter{03B6
}{\ensuremath\zeta}%
10617 \DeclareUnicodeCharacter{03B7
}{\ensuremath\eta}%
10618 \DeclareUnicodeCharacter{03B8
}{\ensuremath\theta}%
10619 \DeclareUnicodeCharacter{03B9
}{\ensuremath\iota}%
10620 \DeclareUnicodeCharacter{03BA
}{\ensuremath\kappa}%
10621 \DeclareUnicodeCharacter{03BB
}{\ensuremath\lambda}%
10622 \DeclareUnicodeCharacter{03BC
}{\ensuremath\mu}%
10623 \DeclareUnicodeCharacter{03BD
}{\ensuremath\nu}%
10624 \DeclareUnicodeCharacter{03BE
}{\ensuremath\xi}%
10625 \DeclareUnicodeCharacter{03BF
}{{\it o
}}% omicron
10626 \DeclareUnicodeCharacter{03C0
}{\ensuremath\pi}%
10627 \DeclareUnicodeCharacter{03C1
}{\ensuremath\rho}%
10628 \DeclareUnicodeCharacter{03C2
}{\ensuremath\varsigma}%
10629 \DeclareUnicodeCharacter{03C3
}{\ensuremath\sigma}%
10630 \DeclareUnicodeCharacter{03C4
}{\ensuremath\tau}%
10631 \DeclareUnicodeCharacter{03C5
}{\ensuremath\upsilon}%
10632 \DeclareUnicodeCharacter{03C6
}{\ensuremath\phi}%
10633 \DeclareUnicodeCharacter{03C7
}{\ensuremath\chi}%
10634 \DeclareUnicodeCharacter{03C8
}{\ensuremath\psi}%
10635 \DeclareUnicodeCharacter{03C9
}{\ensuremath\omega}%
10637 % More Greek vowels with accents
10638 \DeclareUnicodeCharacter{03CA
}{\ensuremath{\ddot\iota}}%
10639 \DeclareUnicodeCharacter{03CB
}{\ensuremath{\ddot\upsilon}}%
10640 \DeclareUnicodeCharacter{03CC
}{\ensuremath{\acute o
}}%
10641 \DeclareUnicodeCharacter{03CD
}{\ensuremath{\acute\upsilon}}%
10642 \DeclareUnicodeCharacter{03CE
}{\ensuremath{\acute\omega}}%
10644 % Variant Greek letters
10645 \DeclareUnicodeCharacter{03D1
}{\ensuremath\vartheta}%
10646 \DeclareUnicodeCharacter{03D6
}{\ensuremath\varpi}%
10647 \DeclareUnicodeCharacter{03F1
}{\ensuremath\varrho}%
10649 \DeclareUnicodeCharacter{1E02
}{\dotaccent{B
}}%
10650 \DeclareUnicodeCharacter{1E03
}{\dotaccent{b
}}%
10651 \DeclareUnicodeCharacter{1E04
}{\udotaccent{B
}}%
10652 \DeclareUnicodeCharacter{1E05
}{\udotaccent{b
}}%
10653 \DeclareUnicodeCharacter{1E06
}{\ubaraccent{B
}}%
10654 \DeclareUnicodeCharacter{1E07
}{\ubaraccent{b
}}%
10655 \DeclareUnicodeCharacter{1E0A
}{\dotaccent{D
}}%
10656 \DeclareUnicodeCharacter{1E0B
}{\dotaccent{d
}}%
10657 \DeclareUnicodeCharacter{1E0C
}{\udotaccent{D
}}%
10658 \DeclareUnicodeCharacter{1E0D
}{\udotaccent{d
}}%
10659 \DeclareUnicodeCharacter{1E0E
}{\ubaraccent{D
}}%
10660 \DeclareUnicodeCharacter{1E0F
}{\ubaraccent{d
}}%
10662 \DeclareUnicodeCharacter{1E1E
}{\dotaccent{F
}}%
10663 \DeclareUnicodeCharacter{1E1F
}{\dotaccent{f
}}%
10665 \DeclareUnicodeCharacter{1E20
}{\=G
}%
10666 \DeclareUnicodeCharacter{1E21
}{\=g
}%
10667 \DeclareUnicodeCharacter{1E22
}{\dotaccent{H
}}%
10668 \DeclareUnicodeCharacter{1E23
}{\dotaccent{h
}}%
10669 \DeclareUnicodeCharacter{1E24
}{\udotaccent{H
}}%
10670 \DeclareUnicodeCharacter{1E25
}{\udotaccent{h
}}%
10671 \DeclareUnicodeCharacter{1E26
}{\"H
}%
10672 \DeclareUnicodeCharacter{1E27
}{\"h
}%
10674 \DeclareUnicodeCharacter{1E30
}{\'K
}%
10675 \DeclareUnicodeCharacter{1E31
}{\'k
}%
10676 \DeclareUnicodeCharacter{1E32
}{\udotaccent{K
}}%
10677 \DeclareUnicodeCharacter{1E33
}{\udotaccent{k
}}%
10678 \DeclareUnicodeCharacter{1E34
}{\ubaraccent{K
}}%
10679 \DeclareUnicodeCharacter{1E35
}{\ubaraccent{k
}}%
10680 \DeclareUnicodeCharacter{1E36
}{\udotaccent{L
}}%
10681 \DeclareUnicodeCharacter{1E37
}{\udotaccent{l
}}%
10682 \DeclareUnicodeCharacter{1E3A
}{\ubaraccent{L
}}%
10683 \DeclareUnicodeCharacter{1E3B
}{\ubaraccent{l
}}%
10684 \DeclareUnicodeCharacter{1E3E
}{\'M
}%
10685 \DeclareUnicodeCharacter{1E3F
}{\'m
}%
10687 \DeclareUnicodeCharacter{1E40
}{\dotaccent{M
}}%
10688 \DeclareUnicodeCharacter{1E41
}{\dotaccent{m
}}%
10689 \DeclareUnicodeCharacter{1E42
}{\udotaccent{M
}}%
10690 \DeclareUnicodeCharacter{1E43
}{\udotaccent{m
}}%
10691 \DeclareUnicodeCharacter{1E44
}{\dotaccent{N
}}%
10692 \DeclareUnicodeCharacter{1E45
}{\dotaccent{n
}}%
10693 \DeclareUnicodeCharacter{1E46
}{\udotaccent{N
}}%
10694 \DeclareUnicodeCharacter{1E47
}{\udotaccent{n
}}%
10695 \DeclareUnicodeCharacter{1E48
}{\ubaraccent{N
}}%
10696 \DeclareUnicodeCharacter{1E49
}{\ubaraccent{n
}}%
10698 \DeclareUnicodeCharacter{1E54
}{\'P
}%
10699 \DeclareUnicodeCharacter{1E55
}{\'p
}%
10700 \DeclareUnicodeCharacter{1E56
}{\dotaccent{P
}}%
10701 \DeclareUnicodeCharacter{1E57
}{\dotaccent{p
}}%
10702 \DeclareUnicodeCharacter{1E58
}{\dotaccent{R
}}%
10703 \DeclareUnicodeCharacter{1E59
}{\dotaccent{r
}}%
10704 \DeclareUnicodeCharacter{1E5A
}{\udotaccent{R
}}%
10705 \DeclareUnicodeCharacter{1E5B
}{\udotaccent{r
}}%
10706 \DeclareUnicodeCharacter{1E5E
}{\ubaraccent{R
}}%
10707 \DeclareUnicodeCharacter{1E5F
}{\ubaraccent{r
}}%
10709 \DeclareUnicodeCharacter{1E60
}{\dotaccent{S
}}%
10710 \DeclareUnicodeCharacter{1E61
}{\dotaccent{s
}}%
10711 \DeclareUnicodeCharacter{1E62
}{\udotaccent{S
}}%
10712 \DeclareUnicodeCharacter{1E63
}{\udotaccent{s
}}%
10713 \DeclareUnicodeCharacter{1E6A
}{\dotaccent{T
}}%
10714 \DeclareUnicodeCharacter{1E6B
}{\dotaccent{t
}}%
10715 \DeclareUnicodeCharacter{1E6C
}{\udotaccent{T
}}%
10716 \DeclareUnicodeCharacter{1E6D
}{\udotaccent{t
}}%
10717 \DeclareUnicodeCharacter{1E6E
}{\ubaraccent{T
}}%
10718 \DeclareUnicodeCharacter{1E6F
}{\ubaraccent{t
}}%
10720 \DeclareUnicodeCharacter{1E7C
}{\~V
}%
10721 \DeclareUnicodeCharacter{1E7D
}{\~v
}%
10722 \DeclareUnicodeCharacter{1E7E
}{\udotaccent{V
}}%
10723 \DeclareUnicodeCharacter{1E7F
}{\udotaccent{v
}}%
10725 \DeclareUnicodeCharacter{1E80
}{\`W
}%
10726 \DeclareUnicodeCharacter{1E81
}{\`w
}%
10727 \DeclareUnicodeCharacter{1E82
}{\'W
}%
10728 \DeclareUnicodeCharacter{1E83
}{\'w
}%
10729 \DeclareUnicodeCharacter{1E84
}{\"W
}%
10730 \DeclareUnicodeCharacter{1E85
}{\"w
}%
10731 \DeclareUnicodeCharacter{1E86
}{\dotaccent{W
}}%
10732 \DeclareUnicodeCharacter{1E87
}{\dotaccent{w
}}%
10733 \DeclareUnicodeCharacter{1E88
}{\udotaccent{W
}}%
10734 \DeclareUnicodeCharacter{1E89
}{\udotaccent{w
}}%
10735 \DeclareUnicodeCharacter{1E8A
}{\dotaccent{X
}}%
10736 \DeclareUnicodeCharacter{1E8B
}{\dotaccent{x
}}%
10737 \DeclareUnicodeCharacter{1E8C
}{\"X
}%
10738 \DeclareUnicodeCharacter{1E8D
}{\"x
}%
10739 \DeclareUnicodeCharacter{1E8E
}{\dotaccent{Y
}}%
10740 \DeclareUnicodeCharacter{1E8F
}{\dotaccent{y
}}%
10742 \DeclareUnicodeCharacter{1E90
}{\^Z
}%
10743 \DeclareUnicodeCharacter{1E91
}{\^z
}%
10744 \DeclareUnicodeCharacter{1E92
}{\udotaccent{Z
}}%
10745 \DeclareUnicodeCharacter{1E93
}{\udotaccent{z
}}%
10746 \DeclareUnicodeCharacter{1E94
}{\ubaraccent{Z
}}%
10747 \DeclareUnicodeCharacter{1E95
}{\ubaraccent{z
}}%
10748 \DeclareUnicodeCharacter{1E96
}{\ubaraccent{h
}}%
10749 \DeclareUnicodeCharacter{1E97
}{\"t
}%
10750 \DeclareUnicodeCharacter{1E98
}{\ringaccent{w
}}%
10751 \DeclareUnicodeCharacter{1E99
}{\ringaccent{y
}}%
10753 \DeclareUnicodeCharacter{1EA0
}{\udotaccent{A
}}%
10754 \DeclareUnicodeCharacter{1EA1
}{\udotaccent{a
}}%
10756 \DeclareUnicodeCharacter{1EB8
}{\udotaccent{E
}}%
10757 \DeclareUnicodeCharacter{1EB9
}{\udotaccent{e
}}%
10758 \DeclareUnicodeCharacter{1EBC
}{\~E
}%
10759 \DeclareUnicodeCharacter{1EBD
}{\~e
}%
10761 \DeclareUnicodeCharacter{1ECA
}{\udotaccent{I
}}%
10762 \DeclareUnicodeCharacter{1ECB
}{\udotaccent{i
}}%
10763 \DeclareUnicodeCharacter{1ECC
}{\udotaccent{O
}}%
10764 \DeclareUnicodeCharacter{1ECD
}{\udotaccent{o
}}%
10766 \DeclareUnicodeCharacter{1EE4
}{\udotaccent{U
}}%
10767 \DeclareUnicodeCharacter{1EE5
}{\udotaccent{u
}}%
10769 \DeclareUnicodeCharacter{1EF2
}{\`Y
}%
10770 \DeclareUnicodeCharacter{1EF3
}{\`y
}%
10771 \DeclareUnicodeCharacter{1EF4
}{\udotaccent{Y
}}%
10773 \DeclareUnicodeCharacter{1EF8
}{\~Y
}%
10774 \DeclareUnicodeCharacter{1EF9
}{\~y
}%
10777 \DeclareUnicodeCharacter{2013}{--
}%
10778 \DeclareUnicodeCharacter{2014}{---
}%
10779 \DeclareUnicodeCharacter{2018}{\quoteleft}%
10780 \DeclareUnicodeCharacter{2019}{\quoteright}%
10781 \DeclareUnicodeCharacter{201A
}{\quotesinglbase}%
10782 \DeclareUnicodeCharacter{201C
}{\quotedblleft}%
10783 \DeclareUnicodeCharacter{201D
}{\quotedblright}%
10784 \DeclareUnicodeCharacter{201E
}{\quotedblbase}%
10785 \DeclareUnicodeCharacter{2020}{\ensuremath\dagger}%
10786 \DeclareUnicodeCharacter{2021}{\ensuremath\ddagger}%
10787 \DeclareUnicodeCharacter{2022}{\bullet}%
10788 \DeclareUnicodeCharacter{202F
}{\thinspace}%
10789 \DeclareUnicodeCharacter{2026}{\dots}%
10790 \DeclareUnicodeCharacter{2039}{\guilsinglleft}%
10791 \DeclareUnicodeCharacter{203A
}{\guilsinglright}%
10793 \DeclareUnicodeCharacter{20AC
}{\euro}%
10795 \DeclareUnicodeCharacter{2192}{\expansion}%
10796 \DeclareUnicodeCharacter{21D2
}{\result}%
10798 % Mathematical symbols
10799 \DeclareUnicodeCharacter{2200}{\ensuremath\forall}%
10800 \DeclareUnicodeCharacter{2203}{\ensuremath\exists}%
10801 \DeclareUnicodeCharacter{2208}{\ensuremath\in}%
10802 \DeclareUnicodeCharacter{2212}{\minus}%
10803 \DeclareUnicodeCharacter{2217}{\ast}%
10804 \DeclareUnicodeCharacter{221E
}{\ensuremath\infty}%
10805 \DeclareUnicodeCharacter{2225}{\ensuremath\parallel}%
10806 \DeclareUnicodeCharacter{2227}{\ensuremath\wedge}%
10807 \DeclareUnicodeCharacter{2229}{\ensuremath\cap}%
10808 \DeclareUnicodeCharacter{2261}{\equiv}%
10809 \DeclareUnicodeCharacter{2264}{\ensuremath\leq}%
10810 \DeclareUnicodeCharacter{2265}{\ensuremath\geq}%
10811 \DeclareUnicodeCharacter{2282}{\ensuremath\subset}%
10812 \DeclareUnicodeCharacter{2287}{\ensuremath\supseteq}%
10814 \DeclareUnicodeCharacter{2016}{\ensuremath\Vert}%
10815 \DeclareUnicodeCharacter{2032}{\ensuremath\prime}%
10816 \DeclareUnicodeCharacter{210F
}{\ensuremath\hbar}%
10817 \DeclareUnicodeCharacter{2111}{\ensuremath\Im}%
10818 \DeclareUnicodeCharacter{2113}{\ensuremath\ell}%
10819 \DeclareUnicodeCharacter{2118}{\ensuremath\wp}%
10820 \DeclareUnicodeCharacter{211C
}{\ensuremath\Re}%
10821 \DeclareUnicodeCharacter{2127}{\ensuremath\mho}%
10822 \DeclareUnicodeCharacter{2135}{\ensuremath\aleph}%
10823 \DeclareUnicodeCharacter{2190}{\ensuremath\leftarrow}%
10824 \DeclareUnicodeCharacter{2191}{\ensuremath\uparrow}%
10825 \DeclareUnicodeCharacter{2193}{\ensuremath\downarrow}%
10826 \DeclareUnicodeCharacter{2194}{\ensuremath\leftrightarrow}%
10827 \DeclareUnicodeCharacter{2195}{\ensuremath\updownarrow}%
10828 \DeclareUnicodeCharacter{2196}{\ensuremath\nwarrow}%
10829 \DeclareUnicodeCharacter{2197}{\ensuremath\nearrow}%
10830 \DeclareUnicodeCharacter{2198}{\ensuremath\searrow}%
10831 \DeclareUnicodeCharacter{2199}{\ensuremath\swarrow}%
10832 \DeclareUnicodeCharacter{21A6
}{\ensuremath\mapsto}%
10833 \DeclareUnicodeCharacter{21A9
}{\ensuremath\hookleftarrow}%
10834 \DeclareUnicodeCharacter{21AA
}{\ensuremath\hookrightarrow}%
10835 \DeclareUnicodeCharacter{21BC
}{\ensuremath\leftharpoonup}%
10836 \DeclareUnicodeCharacter{21BD
}{\ensuremath\leftharpoondown}%
10837 \DeclareUnicodeCharacter{21BE
}{\ensuremath\upharpoonright}%
10838 \DeclareUnicodeCharacter{21C0
}{\ensuremath\rightharpoonup}%
10839 \DeclareUnicodeCharacter{21C1
}{\ensuremath\rightharpoondown}%
10840 \DeclareUnicodeCharacter{21CC
}{\ensuremath\rightleftharpoons}%
10841 \DeclareUnicodeCharacter{21D0
}{\ensuremath\Leftarrow}%
10842 \DeclareUnicodeCharacter{21D1
}{\ensuremath\Uparrow}%
10843 \DeclareUnicodeCharacter{21D3
}{\ensuremath\Downarrow}%
10844 \DeclareUnicodeCharacter{21D4
}{\ensuremath\Leftrightarrow}%
10845 \DeclareUnicodeCharacter{21D5
}{\ensuremath\Updownarrow}%
10846 \DeclareUnicodeCharacter{21DD
}{\ensuremath\leadsto}%
10847 \DeclareUnicodeCharacter{2201}{\ensuremath\complement}%
10848 \DeclareUnicodeCharacter{2202}{\ensuremath\partial}%
10849 \DeclareUnicodeCharacter{2205}{\ensuremath\emptyset}%
10850 \DeclareUnicodeCharacter{2207}{\ensuremath\nabla}%
10851 \DeclareUnicodeCharacter{2209}{\ensuremath\notin}%
10852 \DeclareUnicodeCharacter{220B
}{\ensuremath\owns}%
10853 \DeclareUnicodeCharacter{220F
}{\ensuremath\prod}%
10854 \DeclareUnicodeCharacter{2210}{\ensuremath\coprod}%
10855 \DeclareUnicodeCharacter{2211}{\ensuremath\sum}%
10856 \DeclareUnicodeCharacter{2213}{\ensuremath\mp}%
10857 \DeclareUnicodeCharacter{2218}{\ensuremath\circ}%
10858 \DeclareUnicodeCharacter{221A
}{\ensuremath\surd}%
10859 \DeclareUnicodeCharacter{221D
}{\ensuremath\propto}%
10860 \DeclareUnicodeCharacter{2220}{\ensuremath\angle}%
10861 \DeclareUnicodeCharacter{2223}{\ensuremath\mid}%
10862 \DeclareUnicodeCharacter{2228}{\ensuremath\vee}%
10863 \DeclareUnicodeCharacter{222A
}{\ensuremath\cup}%
10864 \DeclareUnicodeCharacter{222B
}{\ensuremath\smallint}%
10865 \DeclareUnicodeCharacter{222E
}{\ensuremath\oint}%
10866 \DeclareUnicodeCharacter{223C
}{\ensuremath\sim}%
10867 \DeclareUnicodeCharacter{2240}{\ensuremath\wr}%
10868 \DeclareUnicodeCharacter{2243}{\ensuremath\simeq}%
10869 \DeclareUnicodeCharacter{2245}{\ensuremath\cong}%
10870 \DeclareUnicodeCharacter{2248}{\ensuremath\approx}%
10871 \DeclareUnicodeCharacter{224D
}{\ensuremath\asymp}%
10872 \DeclareUnicodeCharacter{2250}{\ensuremath\doteq}%
10873 \DeclareUnicodeCharacter{2260}{\ensuremath\neq}%
10874 \DeclareUnicodeCharacter{226A
}{\ensuremath\ll}%
10875 \DeclareUnicodeCharacter{226B
}{\ensuremath\gg}%
10876 \DeclareUnicodeCharacter{227A
}{\ensuremath\prec}%
10877 \DeclareUnicodeCharacter{227B
}{\ensuremath\succ}%
10878 \DeclareUnicodeCharacter{2283}{\ensuremath\supset}%
10879 \DeclareUnicodeCharacter{2286}{\ensuremath\subseteq}%
10880 \DeclareUnicodeCharacter{228E
}{\ensuremath\uplus}%
10881 \DeclareUnicodeCharacter{228F
}{\ensuremath\sqsubset}%
10882 \DeclareUnicodeCharacter{2290}{\ensuremath\sqsupset}%
10883 \DeclareUnicodeCharacter{2291}{\ensuremath\sqsubseteq}%
10884 \DeclareUnicodeCharacter{2292}{\ensuremath\sqsupseteq}%
10885 \DeclareUnicodeCharacter{2293}{\ensuremath\sqcap}%
10886 \DeclareUnicodeCharacter{2294}{\ensuremath\sqcup}%
10887 \DeclareUnicodeCharacter{2295}{\ensuremath\oplus}%
10888 \DeclareUnicodeCharacter{2296}{\ensuremath\ominus}%
10889 \DeclareUnicodeCharacter{2297}{\ensuremath\otimes}%
10890 \DeclareUnicodeCharacter{2298}{\ensuremath\oslash}%
10891 \DeclareUnicodeCharacter{2299}{\ensuremath\odot}%
10892 \DeclareUnicodeCharacter{22A2
}{\ensuremath\vdash}%
10893 \DeclareUnicodeCharacter{22A3
}{\ensuremath\dashv}%
10894 \DeclareUnicodeCharacter{22A4
}{\ensuremath\ptextop}%
10895 \DeclareUnicodeCharacter{22A5
}{\ensuremath\bot}%
10896 \DeclareUnicodeCharacter{22A8
}{\ensuremath\models}%
10897 \DeclareUnicodeCharacter{22B4
}{\ensuremath\unlhd}%
10898 \DeclareUnicodeCharacter{22B5
}{\ensuremath\unrhd}%
10899 \DeclareUnicodeCharacter{22C0
}{\ensuremath\bigwedge}%
10900 \DeclareUnicodeCharacter{22C1
}{\ensuremath\bigvee}%
10901 \DeclareUnicodeCharacter{22C2
}{\ensuremath\bigcap}%
10902 \DeclareUnicodeCharacter{22C3
}{\ensuremath\bigcup}%
10903 \DeclareUnicodeCharacter{22C4
}{\ensuremath\diamond}%
10904 \DeclareUnicodeCharacter{22C5
}{\ensuremath\cdot}%
10905 \DeclareUnicodeCharacter{22C6
}{\ensuremath\star}%
10906 \DeclareUnicodeCharacter{22C8
}{\ensuremath\bowtie}%
10907 \DeclareUnicodeCharacter{2308}{\ensuremath\lceil}%
10908 \DeclareUnicodeCharacter{2309}{\ensuremath\rceil}%
10909 \DeclareUnicodeCharacter{230A
}{\ensuremath\lfloor}%
10910 \DeclareUnicodeCharacter{230B
}{\ensuremath\rfloor}%
10911 \DeclareUnicodeCharacter{2322}{\ensuremath\frown}%
10912 \DeclareUnicodeCharacter{2323}{\ensuremath\smile}%
10914 \DeclareUnicodeCharacter{25A1
}{\ensuremath\Box}%
10915 \DeclareUnicodeCharacter{25B3
}{\ensuremath\triangle}%
10916 \DeclareUnicodeCharacter{25B7
}{\ensuremath\triangleright}%
10917 \DeclareUnicodeCharacter{25BD
}{\ensuremath\bigtriangledown}%
10918 \DeclareUnicodeCharacter{25C1
}{\ensuremath\triangleleft}%
10919 \DeclareUnicodeCharacter{25C7
}{\ensuremath\Diamond}%
10920 \DeclareUnicodeCharacter{2660}{\ensuremath\spadesuit}%
10921 \DeclareUnicodeCharacter{2661}{\ensuremath\heartsuit}%
10922 \DeclareUnicodeCharacter{2662}{\ensuremath\diamondsuit}%
10923 \DeclareUnicodeCharacter{2663}{\ensuremath\clubsuit}%
10924 \DeclareUnicodeCharacter{266D
}{\ensuremath\flat}%
10925 \DeclareUnicodeCharacter{266E
}{\ensuremath\natural}%
10926 \DeclareUnicodeCharacter{266F
}{\ensuremath\sharp}%
10927 \DeclareUnicodeCharacter{26AA
}{\ensuremath\bigcirc}%
10928 \DeclareUnicodeCharacter{27B9
}{\ensuremath\rangle}%
10929 \DeclareUnicodeCharacter{27C2
}{\ensuremath\perp}%
10930 \DeclareUnicodeCharacter{27E8
}{\ensuremath\langle}%
10931 \DeclareUnicodeCharacter{27F5
}{\ensuremath\longleftarrow}%
10932 \DeclareUnicodeCharacter{27F6
}{\ensuremath\longrightarrow}%
10933 \DeclareUnicodeCharacter{27F7
}{\ensuremath\longleftrightarrow}%
10934 \DeclareUnicodeCharacter{27FC
}{\ensuremath\longmapsto}%
10935 \DeclareUnicodeCharacter{29F5
}{\ensuremath\setminus}%
10936 \DeclareUnicodeCharacter{2A00
}{\ensuremath\bigodot}%
10937 \DeclareUnicodeCharacter{2A01
}{\ensuremath\bigoplus}%
10938 \DeclareUnicodeCharacter{2A02
}{\ensuremath\bigotimes}%
10939 \DeclareUnicodeCharacter{2A04
}{\ensuremath\biguplus}%
10940 \DeclareUnicodeCharacter{2A06
}{\ensuremath\bigsqcup}%
10941 \DeclareUnicodeCharacter{2A1D
}{\ensuremath\Join}%
10942 \DeclareUnicodeCharacter{2A3F
}{\ensuremath\amalg}%
10943 \DeclareUnicodeCharacter{2AAF
}{\ensuremath\preceq}%
10944 \DeclareUnicodeCharacter{2AB0
}{\ensuremath\succeq}%
10946 \global\mathchardef\checkmark="
1370% actually the square root sign
10947 \DeclareUnicodeCharacter{2713}{\ensuremath\checkmark}%
10948 }% end of \unicodechardefs
10950 % UTF-8 byte sequence (pdfTeX) definitions (replacing and @U command)
10951 % It makes the setting that replace UTF-8 byte sequence.
10952 \def\utfeightchardefs{%
10953 \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterUTFviii
10957 % Whether the active definitions of non-ASCII characters expand to
10958 % non-active tokens with the same character code. This is used to
10959 % write characters literally, instead of using active definitions for
10960 % printing the correct glyphs.
10961 \newif\ifpassthroughchars
10962 \passthroughcharsfalse
10964 % For native Unicode (XeTeX and LuaTeX)
10965 % Definition macro to replace / pass-through the Unicode character
10967 \def\DeclareUnicodeCharacterNative#1#2{%
10968 \catcode"
#1=
\active
10969 \def\dodeclareunicodecharacternative#
#1#
#2#
#3{%
10971 \uccode`\~="#
#2\relax
10972 \uppercase{\gdef~
}{%
10973 \ifpassthroughchars
10982 \uccode`\.="
#1\relax
10983 \uppercase{\def\UTFNativeTmp{.
}}%
10984 \expandafter\dodeclareunicodecharacternative\UTFNativeTmp{#1}{#2}%
10988 % Native Unicode (XeTeX and LuaTeX) character replacing definitions
10989 % It makes the setting that replace the Unicode characters.
10990 \def\nativeunicodechardefs{%
10991 \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterNative
10995 % For native Unicode (XeTeX and LuaTeX). Make the character token expand
10996 % to the sequences given in \unicodechardefs for printing.
10997 \def\DeclareUnicodeCharacterNativeAtU#1#2{%
10999 \expandafter\globallet\csname uni:
#1\endcsname \UTFAtUTmp
11002 % Native Unicode (XeTeX and LuaTeX) @U command definitions
11003 \def\nativeunicodechardefsatu{%
11004 \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterNativeAtU
11008 % US-ASCII character definitions.
11009 \def\asciichardefs{% nothing need be done
11013 % define all the unicode characters we know about, for the sake of @U.
11014 \iftxinativeunicodecapable
11015 \nativeunicodechardefsatu
11021 % Make non-ASCII characters printable again for compatibility with
11022 % existing Texinfo documents that may use them, even without declaring a
11023 % document encoding.
11025 \setnonasciicharscatcode \other
11028 \message{formatting,
}
11030 \newdimen\defaultparindent \defaultparindent =
15pt
11032 \chapheadingskip =
15pt plus
4pt minus
2pt
11033 \secheadingskip =
12pt plus
3pt minus
2pt
11034 \subsecheadingskip =
9pt plus
2pt minus
2pt
11036 % Prevent underfull vbox error messages.
11039 % Don't be very finicky about underfull hboxes, either.
11042 % Following George Bush, get rid of widows and orphans.
11043 \widowpenalty=
10000
11046 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're
11047 % using an old version of TeX, don't do anything. We want the amount of
11048 % stretch added to depend on the line length, hence the dependence on
11049 % \hsize. We call this whenever the paper size is set.
11051 \def\setemergencystretch{%
11052 \ifx\emergencystretch\thisisundefined
11053 % Allow us to assign to \emergencystretch anyway.
11054 \def\emergencystretch{\dimen0}%
11056 \emergencystretch =
.15\hsize
11060 % Parameters in order: 1) textheight; 2) textwidth;
11061 % 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
11062 % 7) physical page height; 8) physical page width.
11064 % We also call \setleading{\textleading}, so the caller should define
11065 % \textleading. The caller should also set \parskip.
11067 \def\internalpagesizes#1#2#3#4#5#6#7#8{%
11068 \voffset =
#3\relax
11069 \topskip =
#6\relax
11070 \splittopskip =
\topskip
11073 \advance\vsize by
\topskip
11074 \outervsize =
\vsize
11075 \advance\outervsize by
2\topandbottommargin
11076 \txipageheight =
\vsize
11079 \outerhsize =
\hsize
11080 \advance\outerhsize by
0.5in
11081 \txipagewidth =
\hsize
11083 \normaloffset =
#4\relax
11084 \bindingoffset =
#5\relax
11087 \pdfpageheight #7\relax
11088 \pdfpagewidth #8\relax
11089 % if we don't reset these, they will remain at "1 true in" of
11090 % whatever layout pdftex was dumped with.
11091 \pdfhorigin =
1 true in
11092 \pdfvorigin =
1 true in
11094 \ifx\XeTeXrevision\thisisundefined
11096 \pdfpageheight #7\relax
11097 \pdfpagewidth #8\relax
11098 % XeTeX does not have \pdfhorigin and \pdfvorigin.
11102 \setleading{\textleading}
11104 \parindent =
\defaultparindent
11105 \setemergencystretch
11108 % @letterpaper (the default).
11109 \def\letterpaper{{\globaldefs =
1
11110 \parskip =
3pt plus
2pt minus
1pt
11111 \textleading =
13.2pt
11113 % If page is nothing but text, make it come out even.
11114 \internalpagesizes{607.2pt
}{6in
}% that's 46 lines
11116 {\bindingoffset}{36pt
}%
11120 % Use @smallbook to reset parameters for 7x9.25 trim size.
11121 \def\smallbook{{\globaldefs =
1
11122 \parskip =
2pt plus
1pt
11123 \textleading =
12pt
11125 \internalpagesizes{7.5in
}{5in
}%
11127 {\bindingoffset}{16pt
}%
11130 \lispnarrowing =
0.3in
11133 \contentsrightmargin =
0pt
11134 \defbodyindent =
.5cm
11137 % Use @smallerbook to reset parameters for 6x9 trim size.
11138 % (Just testing, parameters still in flux.)
11139 \def\smallerbook{{\globaldefs =
1
11140 \parskip =
1.5pt plus
1pt
11141 \textleading =
12pt
11143 \internalpagesizes{7.4in
}{4.8in
}%
11148 \lispnarrowing =
0.25in
11151 \contentsrightmargin =
0pt
11152 \defbodyindent =
.4cm
11155 % Use @afourpaper to print on European A4 paper.
11156 \def\afourpaper{{\globaldefs =
1
11157 \parskip =
3pt plus
2pt minus
1pt
11158 \textleading =
13.2pt
11160 % Double-side printing via postscript on Laserjet 4050
11161 % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm.
11162 % To change the settings for a different printer or situation, adjust
11163 % \normaloffset until the front-side and back-side texts align. Then
11164 % do the same for \bindingoffset. You can set these for testing in
11165 % your texinfo source file like this:
11167 % \global\normaloffset = -6mm
11168 % \global\bindingoffset = 10mm
11170 \internalpagesizes{673.2pt
}{160mm
}% that's 51 lines
11171 {\voffset}{\hoffset}%
11172 {\bindingoffset}{44pt
}%
11177 \contentsrightmargin =
0pt
11178 \defbodyindent =
5mm
11181 % Use @afivepaper to print on European A5 paper.
11182 % From romildo@urano.iceb.ufop.br, 2 July 2000.
11183 % He also recommends making @example and @lisp be small.
11184 \def\afivepaper{{\globaldefs =
1
11185 \parskip =
2pt plus
1pt minus
0.1pt
11186 \textleading =
12.5pt
11188 \internalpagesizes{160mm
}{120mm
}%
11189 {\voffset}{\hoffset}%
11190 {\bindingoffset}{8pt
}%
11193 \lispnarrowing =
0.2in
11196 \contentsrightmargin =
0pt
11197 \defbodyindent =
2mm
11198 \tableindent =
12mm
11201 % A specific text layout, 24x15cm overall, intended for A4 paper.
11202 \def\afourlatex{{\globaldefs =
1
11204 \internalpagesizes{237mm
}{150mm
}%
11206 {\bindingoffset}{7mm
}%
11209 % Must explicitly reset to 0 because we call \afourpaper.
11213 % Use @afourwide to print on A4 paper in landscape format.
11214 \def\afourwide{{\globaldefs =
1
11216 \internalpagesizes{241mm
}{165mm
}%
11217 {\voffset}{-
2.95mm
}%
11218 {\bindingoffset}{7mm
}%
11223 % @pagesizes TEXTHEIGHT[,TEXTWIDTH]
11224 % Perhaps we should allow setting the margins, \topskip, \parskip,
11225 % and/or leading, also. Or perhaps we should compute them somehow.
11227 \parseargdef\pagesizes{\pagesizesyyy #1,,
\finish}
11228 \def\pagesizesyyy#1,
#2,
#3\finish{{%
11229 \setbox0 =
\hbox{\ignorespaces #2}\ifdim\wd0 >
0pt
\hsize=
#2\relax \fi
11232 \parskip =
3pt plus
2pt minus
1pt
11233 \setleading{\textleading}%
11236 \advance\dimen0 by
\voffset
11239 \advance\dimen2 by
\normaloffset
11241 \internalpagesizes{#1}{\hsize}%
11242 {\voffset}{\normaloffset}%
11243 {\bindingoffset}{44pt
}%
11244 {\dimen0}{\dimen2}%
11247 % Set default to letter.
11252 \message{and turning on texinfo input format.
}
11254 \def^^L
{\par} % remove \outer, so ^L can appear in an @comment
11256 % DEL is a comment character, in case @c does not suffice.
11259 % Define macros to output various characters with catcode for normal text.
11260 \catcode`\"=
\other \def\normaldoublequote{"
}
11261 \catcode`\$=
\other \def\normaldollar{$
}%$ font-lock fix
11262 \catcode`\+=
\other \def\normalplus{+
}
11263 \catcode`\<=
\other \def\normalless{<
}
11264 \catcode`\>=
\other \def\normalgreater{>
}
11265 \catcode`\^=
\other \def\normalcaret{^
}
11266 \catcode`
\_=
\other \def\normalunderscore{_
}
11267 \catcode`\|=
\other \def\normalverticalbar{|
}
11268 \catcode`\~=
\other \def\normaltilde{~
}
11270 % This macro is used to make a character print one way in \tt
11271 % (where it can probably be output as-is), and another way in other fonts,
11272 % where something hairier probably needs to be done.
11274 % #1 is what to print if we are indeed using \tt; #2 is what to print
11275 % otherwise. Since all the Computer Modern typewriter fonts have zero
11276 % interword stretch (and shrink), and it is reasonable to expect all
11277 % typewriter fonts to have this, we can check that font parameter.
11279 \def\ifusingtt#1#2{\ifdim \fontdimen3\font=
0pt
#1\else #2\fi}
11281 % Same as above, but check for italic font. Actually this also catches
11282 % non-italic slanted fonts since it is impossible to distinguish them from
11283 % italic fonts. But since this is only used by $ and it uses \sl anyway
11284 % this is not a problem.
11285 \def\ifusingit#1#2{\ifdim \fontdimen1\font>
0pt
#1\else #2\fi}
11287 % Set catcodes for Texinfo file
11289 % Active characters for printing the wanted glyph.
11290 % Most of these we simply print from the \tt font, but for some, we can
11291 % use math or other variants that look better in normal text.
11293 \catcode`\"=
\active
11294 \def\activedoublequote{{\tt\char34}}
11295 \let"=
\activedoublequote
11296 \catcode`\~=
\active \def\activetilde{{\tt\char126}} \let~ =
\activetilde
11297 \chardef\hatchar=`\^
11298 \catcode`\^=
\active \def\activehat{{\tt \hatchar}} \let^ =
\activehat
11300 \catcode`
\_=
\active
11301 \def_{\ifusingtt\normalunderscore\_}
11302 \def\_{\leavevmode \kern.07em
\vbox{\hrule width
.3em height
.1ex
}\kern .07em
}
11305 \catcode`\|=
\active \def|
{{\tt\char124}}
11308 \catcode`\<=
\active \def\activeless{{\tt \less}}\let< =
\activeless
11310 \catcode`\>=
\active \def\activegtr{{\tt \gtr}}\let> =
\activegtr
11311 \catcode`\+=
\active \def+
{{\tt \char 43}}
11312 \catcode`\$=
\active \def$
{\ifusingit{{\sl\$
}}\normaldollar}%$ font-lock fix
11313 \catcode`\-=
\active \let-=
\normaldash
11316 % used for headline/footline in the output routine, in case the page
11317 % breaks in the middle of an @tex block.
11318 \def\texinfochars{%
11319 \let< =
\activeless
11321 \let~ =
\activetilde
11323 \markupsetuplqdefault \markupsetuprqdefault
11325 \let\i =
\smartitalic
11326 % in principle, all other definitions in \tex have to be undone too.
11329 % Used sometimes to turn off (effectively) the active characters even after
11331 \def\turnoffactive{%
11332 \normalturnoffactive
11338 % \backslashcurfont outputs one backslash character in current font,
11340 \global\chardef\backslashcurfont=`\\
11341 \global\let\rawbackslashxx=
\backslashcurfont % let existing .??s files work
11343 % \realbackslash is an actual character `\' with catcode other, and
11344 % \doublebackslash is two of them (for the pdf outlines).
11345 {\catcode`\\=
\other @gdef@realbackslash
{\
} @gdef@doublebackslash
{\\
}}
11347 % In Texinfo, backslash is an active character; it prints the backslash
11348 % in fixed width font.
11349 \catcode`\\=
\active % @ for escape char from now on.
11351 % Print a typewriter backslash. For math mode, we can't simply use
11352 % \backslashcurfont: the story here is that in math mode, the \char
11353 % of \backslashcurfont ends up printing the roman \ from the math symbol
11354 % font (because \char in math mode uses the \mathcode, and plain.tex
11355 % sets \mathcode`\\="026E). Hence we use an explicit \mathchar,
11356 % which is the decimal equivalent of "715c (class 7, e.g., use \fam;
11357 % ignored family value; char position "5C). We can't use " for the
11358 % usual hex value because it has already been made active.
11360 @def@ttbackslash
{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi
}}
11361 @let@backslashchar = @ttbackslash
% @backslashchar{} is for user documents.
11363 % \rawbackslash defines an active \ to do \backslashcurfont.
11364 % \otherbackslash defines an active \ to be a literal `\' character with
11365 % catcode other. We switch back and forth between these.
11366 @gdef@rawbackslash
{@let\=@backslashcurfont
}
11367 @gdef@otherbackslash
{@let\=@realbackslash
}
11369 % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
11370 % the literal character `\'.
11372 {@catcode`- = @active
11373 @gdef@normalturnoffactive
{%
11374 @passthroughcharstrue
11376 @let"=@normaldoublequote
11377 @let$=@normaldollar
%$ font-lock fix
11380 @let>=@normalgreater
11382 @let_=@normalunderscore
11383 @let|=@normalverticalbar
11386 @markupsetuplqdefault
11387 @markupsetuprqdefault
11392 % If a .fmt file is being used, characters that might appear in a file
11393 % name cannot be active until we have parsed the command line.
11394 % So turn them off again, and have @fixbackslash turn them back on.
11395 @catcode`+=@other @catcode`@_=@other
11397 % \enablebackslashhack - allow file to begin `\input texinfo'
11399 % If a .fmt file is being used, we don't want the `\input texinfo' to show up.
11400 % That is what \eatinput is for; after that, the `\' should revert to printing
11402 % If the file did not have a `\input texinfo', then it is turned off after
11403 % the first line; otherwise the first `\' in the file would cause an error.
11404 % This is used on the very last line of this file, texinfo.tex.
11405 % We also use @c to call @fixbackslash, in case ends of lines are hidden.
11408 @catcode`@^^M=
13@gdef@enablebackslashhack
{%
11409 @global@let\ = @eatinput
%
11411 @def@c
{@fixbackslash@c
}%
11412 % Definition for the newline at the end of this file.
11413 @def ^^M
{@let^^M@secondlinenl
}%
11414 % Definition for a newline in the main Texinfo file.
11415 @gdef @secondlinenl
{@fixbackslash
}%
11418 {@catcode`@^=
7 @catcode`@^^M=
13%
11419 @gdef@eatinput input texinfo
#1^^M
{@fixbackslash
}}
11421 % Emergency active definition of newline, in case an active newline token
11422 % appears by mistake.
11423 {@catcode`@^=
7 @catcode13=
13%
11424 @gdef@enableemergencynewline
{%
11427 %<warning: active newline>@par%
11431 @gdef@fixbackslash
{%
11432 @ifx\@eatinput @let\ = @ttbackslash @fi
11433 @catcode13=
5 % regular end of line
11434 @enableemergencynewline
11436 % Also turn back on active characters that might appear in the input
11437 % file name, in case not using a pre-dumped format.
11439 @catcode`@_=@active
11441 % If texinfo.cnf is present on the system, read it.
11442 % Useful for site-wide @afourpaper, etc. This macro, @fixbackslash, gets
11443 % called at the beginning of every Texinfo file. Not opening texinfo.cnf
11444 % directly in this file, texinfo.tex, makes it possible to make a format
11445 % file for Texinfo.
11447 @openin
1 texinfo.cnf
11448 @ifeof
1 @else @input texinfo.cnf @fi
11453 % Say @foo, not \foo, in error messages.
11456 % These (along with & and #) are made active for url-breaking, so need
11457 % active definitions as the normal characters.
11459 @def@normalquest
{?
}
11460 @def@normalslash
{/
}
11462 % These look ok in all fonts, so just make them not special.
11463 % @hashchar{} gets its own user-level command, because of #line.
11464 @catcode`@& = @other @def@normalamp
{&
}
11465 @catcode`@# = @other @def@normalhash
{#
}
11466 @catcode`@
% = @other @def@normalpercent{%}
11468 @let @hashchar = @normalhash
11470 @c Finally, make ` and ' active, so that txicodequoteundirected and
11471 @c txicodequotebacktick work right in, e.g., @w
{@code
{`foo'
}}. If we
11472 @c don't make ` and ' active, @code will not get them as active chars.
11473 @c Do this last of all since we use ` in the previous @catcode assignments.
11474 @catcode`@'=@active
11475 @catcode`@`=@active
11476 @markupsetuplqdefault
11477 @markupsetuprqdefault
11479 @c Local variables:
11480 @c eval: (add-hook 'write-file-hooks 'time-stamp)
11481 @c page-delimiter: "^\\\
\message\\|emacs-page"
11482 @c time-stamp-start: "def\\\
\texinfoversion{"
11483 @c time-stamp-format: "
%:y-%02m-%02d.%02H"
11484 @c time-stamp-end: "
}"
11490 arch-tag: e1b36e32-c96e-4135-a41a-
0b2efa2ea115
11492 @enablebackslashhack