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-
06-
18.21}
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}
70 % LaTeX's \typeout. This ensures that the messages it is used for
71 % are identical in format to the corresponding ones from latex/pdflatex.
72 \def\typeout{\immediate\write17}%
76 % We never want plain's \outer definition of \+ in Texinfo.
77 % For @tex, we can use \tabalign.
80 % Save some plain tex macros whose names we will redefine.
82 \let\ptexbullet=
\bullet
90 \let\ptexfootnote=
\footnote
94 \let\ptexindent=
\indent
95 \let\ptexinsert=
\insert
98 \let\ptexnewwrite\newwrite
99 \let\ptexnoindent=
\noindent
101 \let\ptexraggedright=
\raggedright
109 {\catcode`\'=
\active \global\let\ptexquoteright'
}% active in plain's math mode
111 % If this character appears in an error message or help string, it
112 % starts a new line in the output.
115 % Use TeX 3.0's \inputlineno to get the line number, for better error
116 % messages, but if we're using an old version of TeX, don't do anything.
118 \ifx\inputlineno\thisisundefined
119 \let\linenumber =
\empty % Pre-3.0.
121 \def\linenumber{l.
\the\inputlineno:
\space}
124 % Set up fixed words for English if not already set.
125 \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix
}\fi
126 \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter
}\fi
127 \ifx\putworderror\undefined \gdef\putworderror{error
}\fi
128 \ifx\putwordfile\undefined \gdef\putwordfile{file
}\fi
129 \ifx\putwordin\undefined \gdef\putwordin{in
}\fi
130 \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)
}\fi
131 \ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)
}\fi
132 \ifx\putwordInfo\undefined \gdef\putwordInfo{Info
}\fi
133 \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of
}\fi
134 \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on
}\fi
135 \ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title
}\fi
136 \ifx\putwordof\undefined \gdef\putwordof{of
}\fi
137 \ifx\putwordon\undefined \gdef\putwordon{on
}\fi
138 \ifx\putwordpage\undefined \gdef\putwordpage{page
}\fi
139 \ifx\putwordsection\undefined \gdef\putwordsection{section
}\fi
140 \ifx\putwordSection\undefined \gdef\putwordSection{Section
}\fi
141 \ifx\putwordsee\undefined \gdef\putwordsee{see
}\fi
142 \ifx\putwordSee\undefined \gdef\putwordSee{See
}\fi
143 \ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents
}\fi
144 \ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents
}\fi
146 \ifx\putwordMJan\undefined \gdef\putwordMJan{January
}\fi
147 \ifx\putwordMFeb\undefined \gdef\putwordMFeb{February
}\fi
148 \ifx\putwordMMar\undefined \gdef\putwordMMar{March
}\fi
149 \ifx\putwordMApr\undefined \gdef\putwordMApr{April
}\fi
150 \ifx\putwordMMay\undefined \gdef\putwordMMay{May
}\fi
151 \ifx\putwordMJun\undefined \gdef\putwordMJun{June
}\fi
152 \ifx\putwordMJul\undefined \gdef\putwordMJul{July
}\fi
153 \ifx\putwordMAug\undefined \gdef\putwordMAug{August
}\fi
154 \ifx\putwordMSep\undefined \gdef\putwordMSep{September
}\fi
155 \ifx\putwordMOct\undefined \gdef\putwordMOct{October
}\fi
156 \ifx\putwordMNov\undefined \gdef\putwordMNov{November
}\fi
157 \ifx\putwordMDec\undefined \gdef\putwordMDec{December
}\fi
159 \ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro
}\fi
160 \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form
}\fi
161 \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable
}\fi
162 \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option
}\fi
163 \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function
}\fi
165 % Give the space character the catcode for a space.
166 \def\spaceisspace{\catcode`\ =
10\relax}
168 \chardef\dashChar = `\-
169 \chardef\slashChar = `\/
170 \chardef\underChar = `
\_
176 % The following is used inside several \edef's.
177 \def\makecsname#1{\expandafter\noexpand\csname#1\endcsname}
181 Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script
182 ap-pen-dix bit-map bit-maps
183 data-base data-bases eshell fall-ing half-way long-est man-u-script
184 man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm
185 par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces
187 stand-alone strong-est time-stamp time-stamps which-ever white-space
188 wide-spread wrap-around
191 % Sometimes it is convenient to have everything in the transcript file
192 % and nothing on the terminal. We don't just call \tracingall here,
193 % since that produces some useless output on the terminal. We also make
194 % some effort to order the tracing commands to reduce output in the log
195 % file; cf. trace.sty in LaTeX.
197 \def\gloggingall{\begingroup \globaldefs =
1 \loggingall \endgroup}%
201 \tracinglostchars2 % 2 gives us more in etex
206 \showboxbreadth\maxdimen \showboxdepth\maxdimen
207 \ifx\eTeXversion\thisisundefined\else % etex gives us more logging
214 \tracingcommands3 % 3 gives us more in etex
218 % @errormsg{MSG}. Do the index-like expansions on MSG, but if things
219 % aren't perfect, it's not the end of the world, being an error message,
222 \def\errormsg{\begingroup \indexnofonts \doerrormsg}
223 \def\doerrormsg#1{\errmessage{#1}}
225 % add check for \lastpenalty to plain's definitions. If the last thing
226 % we did was a \nobreak, we don't want to insert more space.
228 \def\smallbreak{\ifnum\lastpenalty<
10000\par\ifdim\lastskip<
\smallskipamount
229 \removelastskip\penalty-
50\smallskip\fi\fi}
230 \def\medbreak{\ifnum\lastpenalty<
10000\par\ifdim\lastskip<
\medskipamount
231 \removelastskip\penalty-
100\medskip\fi\fi}
232 \def\bigbreak{\ifnum\lastpenalty<
10000\par\ifdim\lastskip<
\bigskipamount
233 \removelastskip\penalty-
200\bigskip\fi\fi}
238 % For a final copy, take out the rectangles
239 % that mark overfull boxes (in case you have decided
240 % that the text looks ok even though it passes the margin).
242 \def\finalout{\overfullrule=
0pt
}
244 % Do @cropmarks to get crop marks.
247 \let\cropmarks =
\cropmarkstrue
249 % Dimensions to add cropmarks at corners.
250 % Added by P. A. MacKay, 12 Nov. 1986
252 \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines
253 \newdimen\cornerlong \cornerlong=
1pc
254 \newdimen\cornerthick \cornerthick=
.3pt
255 \newdimen\topandbottommargin \topandbottommargin=
.75in
257 % Output a mark which sets \thischapter, \thissection and \thiscolor.
258 % We dump everything together because we only have one kind of mark.
259 % This works because we only use \botmark / \topmark, not \firstmark.
261 % A mark contains a subexpression of the \ifcase ... \fi construct.
262 % \get*marks macros below extract the needed part using \ifcase.
264 % Another complication is to let the user choose whether \thischapter
265 % (\thissection) refers to the chapter (section) in effect at the top
266 % of a page, or that at the bottom of a page.
268 % \domark is called twice inside \chapmacro, to add one
269 % mark before the section break, and one after.
270 % In the second call \prevchapterdefs is the same as \lastchapterdefs,
271 % and \prevsectiondefs is the same as \lastsectiondefs.
272 % Then if the page is not broken at the mark, some of the previous
273 % section appears on the page, and we can get the name of this section
274 % from \firstmark for @everyheadingmarks top.
275 % @everyheadingmarks bottom uses \botmark.
277 % See page 260 of The TeXbook.
279 \toks0=
\expandafter{\lastchapterdefs}%
280 \toks2=
\expandafter{\lastsectiondefs}%
281 \toks4=
\expandafter{\prevchapterdefs}%
282 \toks6=
\expandafter{\prevsectiondefs}%
283 \toks8=
\expandafter{\lastcolordefs}%
285 \the\toks0 \the\toks2 % 0: marks for @everyheadingmarks top
286 \noexpand\or \the\toks4 \the\toks6 % 1: for @everyheadingmarks bottom
287 \noexpand\else \the\toks8 % 2: color marks
291 % \gettopheadingmarks, \getbottomheadingmarks,
292 % \getcolormarks - extract needed part of mark.
294 % \topmark doesn't work for the very first chapter (after the title
295 % page or the contents), so we use \firstmark there -- this gets us
296 % the mark with the chapter defs, unless the user sneaks in, e.g.,
297 % @setcolor (or @url, or @link, etc.) between @contents and the very
299 \def\gettopheadingmarks{%
301 \ifx\thischapter\empty \ifcase0\firstmark\fi \fi
303 \def\getbottomheadingmarks{\ifcase1\botmark\fi}
304 \def\getcolormarks{\ifcase2\topmark\fi}
306 % Avoid "undefined control sequence" errors.
307 \def\lastchapterdefs{}
308 \def\lastsectiondefs{}
310 \def\prevchapterdefs{}
311 \def\prevsectiondefs{}
314 % Margin to add to right of even pages, to left of odd pages.
315 \newdimen\bindingoffset
316 \newdimen\normaloffset
317 \newdimen\txipagewidth \newdimen\txipageheight
319 % Main output routine.
322 \output =
{\onepageout{\pagecontents\PAGE}}
327 % \onepageout takes a vbox as an argument.
328 % \shipout a vbox for a single page, adding an optional header, footer,
329 % cropmarks, and footnote. This also causes index entries for this page
330 % to be written to the auxiliary files.
333 \ifcropmarks \hoffset=
0pt
\else \hoffset=
\normaloffset \fi
335 \ifodd\pageno \advance\hoffset by
\bindingoffset
336 \else \advance\hoffset by -
\bindingoffset\fi
338 % Common context changes for both heading and footing.
339 % Do this outside of the \shipout so @code etc. will be expanded in
340 % the headline as they should be, not taken literally (outputting ''code).
341 \def\commmonheadfootline{\let\hsize=
\txipagewidth \texinfochars}
343 % Retrieve the information for the headings from the marks in the page,
344 % and call Plain TeX's \makeheadline and \makefootline, which use the
345 % values in \headline and \footline.
347 % This is used to check if we are on the first page of a chapter.
349 \let\prevchaptername\thischaptername
350 \ifcase0\firstmark\fi
351 \let\curchaptername\thischaptername
353 \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
354 \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
356 \ifx\curchaptername\prevchaptername
357 \let\thischapterheading\thischapter
359 % \thischapterheading is the same as \thischapter except it is blank
360 % for the first page of a chapter. This is to prevent the chapter name
362 \def\thischapterheading{}%
365 \global\setbox\headlinebox =
\vbox{\commmonheadfootline \makeheadline}%
366 \global\setbox\footlinebox =
\vbox{\commmonheadfootline \makefootline}%
369 % Set context for writing to auxiliary files like index files.
370 % Have to do this stuff outside the \shipout because we want it to
371 % take effect in \write's, yet the group defined by the \vbox ends
372 % before the \shipout runs.
374 \indexdummies % don't expand commands in the output.
375 \normalturnoffactive % \ in index entries must not stay \, e.g., if
376 % the page break happens to be in the middle of an example.
377 % We don't want .vr (or whatever) entries like this:
378 % \entry{{\indexbackslash }acronym}{32}{\code {\acronym}}
379 % "\acronym" won't work when it's read back in;
381 % {\code {{\backslashcurfont }acronym}
383 % Do this early so pdf references go to the beginning of the page.
384 \ifpdfmakepagedest \pdfdest name
{\the\pageno} xyz
\fi
386 \ifcropmarks \vbox to
\outervsize\bgroup
388 \vskip-
\topandbottommargin
390 \line{\ewtop\hfil\ewtop}%
393 \vbox{\moveleft\cornerthick\nstop}%
395 \vbox{\moveright\cornerthick\nstop}%
398 \vskip\topandbottommargin
400 \hfil % center the page within the outer (page) hsize.
401 \ifodd\pageno\hskip\bindingoffset\fi
407 \ifdim\ht\footlinebox >
0pt
408 % Only leave this space if the footline is nonempty.
409 % (We lessened \vsize for it in \oddfootingyyy.)
410 % The \baselineskip=24pt in plain's \makefootline has no effect.
416 \egroup % end of \vbox\bgroup
417 \hfil\egroup % end of (centering) \line\bgroup
418 \vskip\topandbottommargin plus1fill minus1fill
419 \boxmaxdepth =
\cornerthick
422 \vbox{\moveleft\cornerthick\nsbot}%
424 \vbox{\moveright\cornerthick\nsbot}%
427 \line{\ewbot\hfil\ewbot}%
429 \egroup % \vbox from first cropmarks clause
431 }% end of \shipout\vbox
432 }% end of group with \indexdummies
434 \ifnum\outputpenalty>-
20000 \else\dosupereject\fi
437 \newinsert\margin \dimen\margin=
\maxdimen
439 % Main part of page, including any footnotes
440 \def\pagebody#1{\vbox to
\txipageheight{\boxmaxdepth=
\maxdepth #1}}
442 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
443 % marginal hacks, juha@viisa.uucp (Juha Takala)
444 \ifvoid\margin\else % marginal info is present
445 \rlap{\kern\hsize\vbox to
\z@
{\kern1pt\box\margin \vss}}\fi
446 \dimen@=
\dp#1\relax \unvbox#1\relax
447 \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
448 \ifr@ggedbottom
\kern-
\dimen@
\vfil \fi}
451 % Here are the rules for the cropmarks. Note that they are
452 % offset so that the space between them is truly \outerhsize or \outervsize
453 % (P. A. MacKay, 12 November, 1986)
455 \def\ewtop{\vrule height
\cornerthick depth0pt width
\cornerlong}
457 {\hrule height
\cornerthick depth
\cornerlong width
\cornerthick}}
458 \def\ewbot{\vrule height0pt depth
\cornerthick width
\cornerlong}
460 {\hrule height
\cornerlong depth
\cornerthick width
\cornerthick}}
465 % Parse an argument, then pass it to #1. The argument is the rest of
466 % the input line (except we remove a trailing comment). #1 should be a
467 % macro which expects an ordinary undelimited TeX argument.
468 % For example, \def\foo{\parsearg\fooxxx}.
470 \def\parsearg{\parseargusing{}}
471 \def\parseargusing#1#2{%
477 \parseargline\empty% Insert the \empty token, see \finishparsearg below.
481 \gdef\parseargline#1^^M
{%
482 \endgroup % End of the group started in \parsearg.
483 \argremovecomment #1\comment\ArgTerm%
487 % First remove any @comment, then any @c comment. Also remove a @texinfoc
488 % comment (see \scanmacro for details). Pass the result on to \argcheckspaces.
489 \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
490 \def\argremovec#1\c#2\ArgTerm{\argremovetexinfoc #1\texinfoc\ArgTerm}
491 \def\argremovetexinfoc#1\texinfoc#2\ArgTerm{\argcheckspaces#1\^^M
\ArgTerm}
493 % Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space.
495 % \argremovec might leave us with trailing space, e.g.,
496 % @end itemize @c foo
497 % This space token undergoes the same procedure and is eventually removed
498 % by \finishparsearg.
500 \def\argcheckspaces#1\^^M
{\argcheckspacesX#1\^^M \^^M
}
501 \def\argcheckspacesX#1 \^^M
{\argcheckspacesY#1\^^M
}
502 \def\argcheckspacesY#1\^^M
#2\^^M
#3\ArgTerm{%
505 % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp:
506 \let\temp\finishparsearg
508 \let\temp\argcheckspaces
510 % Put the space token in:
514 % If a _delimited_ argument is enclosed in braces, they get stripped; so
515 % to get _exactly_ the rest of the line, we had to prevent such situation.
516 % We prepended an \empty token at the very beginning and we expand it now,
517 % just before passing the control to \argtorun.
518 % (Similarly, we have to think about #3 of \argcheckspacesY above: it is
519 % either the null string, or it ends with \^^M---thus there is no danger
520 % that a pair of braces would be stripped.
522 % But first, we have to remove the trailing space token.
524 \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
527 % \parseargdef - define a command taking an argument on the line
529 % \parseargdef\foo{...}
530 % is roughly equivalent to
531 % \def\foo{\parsearg\Xfoo}
534 \expandafter \doparseargdef \csname\string#1\endcsname #1%
536 \def\doparseargdef#1#2{%
541 % Several utility definitions with active space:
546 % Make each space character in the input produce a normal interword
547 % space in the output. Don't allow a line break at this space, as this
548 % is used only in environments like @example, where each line of input
549 % should produce a line of output anyway.
551 \gdef\sepspaces{\obeyspaces\let =
\tie}
553 % If an index command is used in an @example environment, any spaces
554 % therein should become regular spaces in the raw index file, not the
555 % expansion of \tie (\leavevmode \penalty \@M \ ).
556 \gdef\unsepspaces{\let =
\space}
560 \def\flushcr{\ifx\par\lisppar \def\next#
#1{}\else \let\next=
\relax \fi \next}
562 % Define the framework for environments in texinfo.tex. It's used like this:
567 % It's the responsibility of \envdef to insert \begingroup before the
568 % actual body; @end closes the group after calling \Efoo. \envdef also
569 % defines \thisenv, so the current environment is known; @end checks
570 % whether the environment name matches. The \checkenv macro can also be
571 % used to check whether the current environment is the one expected.
573 % Non-false conditionals (@iftex, @ifset) don't fit into this, so they
574 % are not treated as environments; they don't open a group. (The
575 % implementation of @end takes care not to call \endgroup in this
579 % At run-time, environments start with this:
580 \def\startenvironment#1{\begingroup\def\thisenv{#1}}
584 % ... but they get defined via ``\envdef\foo{...}'':
585 \long\def\envdef#1#2{\def#1{\startenvironment#1#2}}
586 \def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}}
588 % Check whether we're in the right environment:
597 % Environment mismatch, #1 expected:
600 \errmessage{This command can appear only
\inenvironment\temp,
601 not
\inenvironment\thisenv}%
603 \def\inenvironment#1{%
605 outside of any environment
%
607 in environment
\expandafter\string#1%
611 % @end foo executes the definition of \Efoo.
612 % But first, it executes a specialized version of \checkenv
615 \if 1\csname iscond.
#1\endcsname
617 % The general wording of \badenverr may not be ideal.
618 \expandafter\checkenv\csname#1\endcsname
619 \csname E
#1\endcsname
624 \newhelp\EMsimple{Press RETURN to continue.
}
627 % Be sure we're in horizontal mode when doing a tie, since we make space
628 % equivalent to this in @example-like environments. Otherwise, a space
629 % at the beginning of a line will start with \penalty -- and
630 % since \penalty is valid in vertical mode, we'd end up putting the
631 % penalty on the vertical list instead of in the new paragraph.
633 % Avoid using \@M directly, because that causes trouble
634 % if the definition is written into an index file.
635 \global\let\tiepenalty = \@M
636 \gdef\tie{\leavevmode\penalty\tiepenalty\
}
639 % @: forces normal size whitespace following.
640 \def\:
{\spacefactor=
1000 }
642 % @* forces a line break.
643 \def\*
{\unskip\hfil\break\hbox{}\ignorespaces}
645 % @/ allows a line break.
648 % @. is an end-of-sentence period.
649 \def\.
{.
\spacefactor=
\endofsentencespacefactor\space}
651 % @! is an end-of-sentence bang.
652 \def\!
{!
\spacefactor=
\endofsentencespacefactor\space}
654 % @? is an end-of-sentence query.
655 \def\?
{?
\spacefactor=
\endofsentencespacefactor\space}
657 % @frenchspacing on|off says whether to put extra space after punctuation.
662 \parseargdef\frenchspacing{%
664 \ifx\temp\onword \plainfrenchspacing
665 \else\ifx\temp\offword \plainnonfrenchspacing
668 \errmessage{Unknown @frenchspacing option `
\temp', must be on|off
}%
672 % @w prevents a word break. Without the \leavevmode, @w at the
673 % beginning of a paragraph, when TeX is still in vertical mode, would
674 % produce a whole line of output instead of starting the paragraph.
675 \def\w#1{\leavevmode\hbox{#1}}
677 % @group ... @end group forces ... to be all on one page, by enclosing
678 % it in a TeX vbox. We use \vtop instead of \vbox to construct the box
679 % to keep its height that of a normal line. According to the rules for
680 % \topskip (p.114 of the TeXbook), the glue inserted is
681 % max (\topskip - \ht (first item), 0). If that height is large,
682 % therefore, no glue is inserted, and the space between the headline and
683 % the text is small, which looks bad.
685 % Another complication is that the group might be very large. This can
686 % cause the glue on the previous page to be unduly stretched, because it
687 % does not have much material. In this case, it's better to add an
688 % explicit \vfill so that the extra space is at the bottom. The
689 % threshold for doing this is if the group is more than \vfilllimit
690 % percent of a page (\vfilllimit can be changed inside of @tex).
696 \ifnum\catcode`\^^M=
\active \else
697 \errhelp =
\groupinvalidhelp
698 \errmessage{@group invalid in context where filling is enabled
}%
702 \setbox\groupbox =
\vtop\bgroup
703 % Do @comment since we are called inside an environment such as
704 % @example, where each end-of-line in the input causes an
705 % end-of-line in the output. We don't want the end-of-line after
706 % the `@group' to put extra space in the output. Since @group
707 % should appear on a line by itself (according to the Texinfo
708 % manual), we don't worry about eating any user text.
712 % The \vtop produces a box with normal height and large depth; thus, TeX puts
713 % \baselineskip glue before it, and (when the next line of text is done)
714 % \lineskip glue after it. Thus, space below is not quite equal to space
715 % above. But it's pretty close.
717 % To get correct interline space between the last line of the group
718 % and the first line afterwards, we have to propagate \prevdepth.
719 \endgraf % Not \par, as it may have been set to \lisppar.
720 \global\dimen1 =
\prevdepth
721 \egroup % End the \vtop.
728 % \dimen0 is the vertical size of the group's box.
729 \dimen0 =
\ht\groupbox \advance\dimen0 by
\dp\groupbox
730 % \dimen2 is how much space is left on the page (more or less).
731 \dimen2 =
\txipageheight \advance\dimen2 by -
\pagetotal
732 % if the group doesn't fit on the current page, and it's a big big
733 % group, force a page break.
734 \ifdim \dimen0 >
\dimen2
735 \ifdim \pagetotal <
\vfilllimit\txipageheight
743 % TeX puts in an \escapechar (i.e., `@') at the beginning of the help
744 % message, so this ends up printing `@group can only ...'.
746 \newhelp\groupinvalidhelp{%
747 group can only be used in environments such as @example,^^J
%
748 where each line of input produces a line of output.
}
750 % @need space-in-mils
751 % forces a page break if there is not space-in-mils remaining.
753 \newdimen\mil \mil=
0.001in
756 % Ensure vertical mode, so we don't make a big box in the middle of a
760 % If the @need value is less than one line space, it's useless.
762 \dimen2 =
\ht\strutbox
763 \advance\dimen2 by
\dp\strutbox
764 \ifdim\dimen0 >
\dimen2
766 % Do a \strut just to make the height of this box be normal, so the
767 % normal leading is inserted relative to the preceding line.
768 % And a page break here is fine.
769 \vtop to
#1\mil{\strut\vfil}%
771 % TeX does not even consider page breaks if a penalty added to the
772 % main vertical list is 10000 or more. But in order to see if the
773 % empty box we just added fits on the page, we must make it consider
774 % page breaks. On the other hand, we don't want to actually break the
775 % page after the empty box. So we use a penalty of 9999.
777 % There is an extremely small chance that TeX will actually break the
778 % page at this \penalty, if there are no other feasible breakpoints in
779 % sight. (If the user is using lots of big @group commands, which
780 % almost-but-not-quite fill up a page, TeX will have a hard time doing
781 % good page breaking, for example.) However, I could not construct an
782 % example where a page broke at this \penalty; if it happens in a real
783 % document, then we can reconsider our strategy.
786 % Back up by the size of the box, whether we did a page break or not.
789 % Do not allow a page break right after this kern.
794 % @br forces paragraph break (and is undocumented).
798 % @page forces the start of a new page.
800 \def\page{\par\vfill\supereject}
803 % outputs text on separate line in roman font, starting at standard page margin
805 % This records the amount of indent in the innermost environment.
806 % That's how much \exdent should take out.
807 \newskip\exdentamount
809 % This defn is used inside fill environments such as @defun.
810 \parseargdef\exdent{\hfil\break\hbox{\kern -
\exdentamount{\rm#1}}\hfil\break}
812 % This defn is used inside nofill environments such as @example.
813 \parseargdef\nofillexdent{{\advance \leftskip by -
\exdentamount
814 \leftline{\hskip\leftskip{\rm#1}}}}
816 % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
817 % paragraph. For more general purposes, use the \margin insertion
818 % class. WHICH is `l' or `r'. Not documented, written for gawk manual.
820 \newskip\inmarginspacing \inmarginspacing=
1cm
821 \def\strutdepth{\dp\strutbox}
823 \def\doinmargin#1#2{\strut\vadjust{%
826 \vtop to
\strutdepth{%
827 \baselineskip=
\strutdepth
829 % if you have multiple lines of stuff to put here, you'll need to
830 % make the vbox yourself of the appropriate size.
832 \llap{\ignorespaces #2\hskip\inmarginspacing}%
834 \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}%
839 \def\inleftmargin{\doinmargin l
}
840 \def\inrightmargin{\doinmargin r
}
842 % @inmargin{TEXT [, RIGHT-TEXT]}
843 % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right;
844 % else use TEXT for both).
846 \def\inmargin#1{\parseinmargin #1,,
\finish}
847 \def\parseinmargin#1,
#2,
#3\finish{% not perfect, but better than nothing.
848 \setbox0 =
\hbox{\ignorespaces #2}%
850 \def\lefttext{#1}% have both texts
853 \def\lefttext{#1}% have only one text
858 \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin
860 \def\temp{\inleftmargin\lefttext}%
865 % @| inserts a changebar to the left of the current line. It should
866 % surround any changed text. This approach does *not* work if the
867 % change spans more than two lines of output. To handle that, we would
868 % have adopt a much more difficult approach (putting marks into the main
869 % vertical list for the beginning and end of each change). This command
870 % is not documented, not supported, and doesn't work.
873 % \vadjust can only be used in horizontal mode.
876 % Append this vertical mode material after the current line in the output.
878 % We want to insert a rule with the height and depth of the current
879 % leading; that is exactly what \strutbox is supposed to record.
882 % \vadjust-items are inserted at the left edge of the type. So
883 % the \llap here moves out into the left-hand margin.
886 % For a thicker or thinner bar, change the `1pt'.
887 \vrule height
\baselineskip width1pt
889 % This is the space between the bar and the text.
895 % @include FILE -- \input text of FILE.
897 \def\include{\parseargusing\filenamecatcodes\includezzz}
902 \makevalueexpandable % we want to expand any @value in FILE.
903 \turnoffactive % and allow special characters in the expansion
904 \indexnofonts % Allow `@@' and other weird things in file names.
905 \wlog{texinfo.tex: doing @include of
#1^^J
}%
906 \edef\temp{\noexpand\input #1 }%
908 % This trickery is to read FILE outside of a group, in case it makes
914 \def\filenamecatcodes{%
928 \def\pushthisfilestack{%
929 \expandafter\pushthisfilestackX\popthisfilestack\StackTerm
931 \def\pushthisfilestackX{%
932 \expandafter\pushthisfilestackY\thisfile\StackTerm
934 \def\pushthisfilestackY #1\StackTerm #2\StackTerm {%
935 \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}%
938 \def\popthisfilestack{\errthisfilestackempty}
939 \def\errthisfilestackempty{\errmessage{Internal error:
940 the stack of filenames is empty.
}}
945 % outputs that line, centered.
947 \parseargdef\center{%
949 \let\centersub\centerH
951 \let\centersub\centerV
953 \centersub{\hfil \ignorespaces#1\unskip \hfil}%
954 \let\centersub\relax % don't let the definition persist, just in case
958 \advance\hsize by -
\leftskip
959 \advance\hsize by -
\rightskip
964 \newcount\centerpenalty
966 % The idea here is the same as in \startdefun, \cartouche, etc.: if
967 % @center is the first thing after a section heading, we need to wipe
968 % out the negative parskip inserted by \sectionheading, but still
969 % prevent a page break here.
970 \centerpenalty =
\lastpenalty
971 \ifnum\centerpenalty>
10000 \vskip\parskip \fi
972 \ifnum\centerpenalty>
9999 \penalty\centerpenalty \fi
973 \line{\kern\leftskip #1\kern\rightskip}%
976 % @sp n outputs n lines of vertical space
978 \parseargdef\sp{\vskip #1\baselineskip}
980 % @comment ...line which is ignored...
981 % @c is the same as @comment
982 % @ignore ... @end ignore is another way to write a comment
984 \def\comment{\begingroup \catcode`\^^M=
\active%
985 \catcode`\@=
\other \catcode`\
{=
\other \catcode`\
}=
\other\commentxxx}%
987 {\catcode`\^^M=
\active%
988 \gdef\commentxxx#1^^M
{\endgroup%
989 \futurelet\nexttoken\commentxxxx}%
990 \gdef\commentxxxx{\ifx\nexttoken\aftermacro\expandafter\comment\fi}%
993 \def\c{\begingroup \catcode`\^^M=
\active%
994 \catcode`\@=
\other \catcode`\
{=
\other \catcode`\
}=
\other%
996 {\catcode`\^^M=
\active \gdef\cxxx#1^^M
{\endgroup}}
997 % See comment in \scanmacro about why the definitions of @c and @comment differ
999 % @paragraphindent NCHARS
1000 % We'll use ems for NCHARS, close enough.
1001 % NCHARS can also be the word `asis' or `none'.
1002 % We cannot feasibly implement @paragraphindent asis, though.
1004 \def\asisword{asis
} % no translation, these are keywords
1007 \parseargdef\paragraphindent{%
1012 \defaultparindent =
0pt
1014 \defaultparindent =
#1em
1017 \parindent =
\defaultparindent
1020 % @exampleindent NCHARS
1021 % We'll use ems for NCHARS like @paragraphindent.
1022 % It seems @exampleindent asis isn't necessary, but
1023 % I preserve it to make it similar to @paragraphindent.
1024 \parseargdef\exampleindent{%
1029 \lispnarrowing =
0pt
1031 \lispnarrowing =
#1em
1036 % @firstparagraphindent WORD
1037 % If WORD is `none', then suppress indentation of the first paragraph
1038 % after a section heading. If WORD is `insert', then do indent at such
1041 % The paragraph indentation is suppressed or not by calling
1042 % \suppressfirstparagraphindent, which the sectioning commands do.
1043 % We switch the definition of this back and forth according to WORD.
1044 % By default, we suppress indentation.
1046 \def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent}
1047 \def\insertword{insert
}
1049 \parseargdef\firstparagraphindent{%
1052 \let\suppressfirstparagraphindent =
\dosuppressfirstparagraphindent
1053 \else\ifx\temp\insertword
1054 \let\suppressfirstparagraphindent =
\relax
1056 \errhelp =
\EMsimple
1057 \errmessage{Unknown @firstparagraphindent option `
\temp'
}%
1061 % Here is how we actually suppress indentation. Redefine \everypar to
1062 % \kern backwards by \parindent, and then reset itself to empty.
1064 % We also make \indent itself not actually do anything until the next
1067 \gdef\dosuppressfirstparagraphindent{%
1068 \gdef\indent {\restorefirstparagraphindent \indent}%
1069 \gdef\noindent{\restorefirstparagraphindent \noindent}%
1070 \global\everypar =
{\kern -
\parindent \restorefirstparagraphindent}%
1073 \gdef\restorefirstparagraphindent{%
1074 \global\let\indent =
\ptexindent
1075 \global\let\noindent =
\ptexnoindent
1076 \global\everypar =
{}%
1080 % @refill is a no-op.
1083 % @setfilename INFO-FILENAME - ignored
1084 \let\setfilename=
\comment
1087 \outer\def\bye{\pagealignmacro\tracingstats=
1\ptexend}
1091 % adobe `portable' document format
1095 \newcount\filenamelength
1105 \newif\ifpdfmakepagedest
1111 \ifx\luatexversion\thisisundefined
1113 % Escape PDF strings UTF-8 to UTF-16
1117 function UTF16oct(str
)
1118 tex
.sprint(string.char(0x5c) .. '376' .. string.char(0x5c) .. '377')
1119 for c
in string.utfvalues(str
) do
1122 string.format(string.char(0x5c) .. string.char(0x25) .. '03o' ..
1123 string.char(0x5c) .. string.char(0x25) .. '03o',
1124 (c
/ 256), (c
% 256)))
1127 local c_hi
= c
/ 1024 + 0xd800
1128 local c_lo
= c
% 1024 + 0xdc00
1130 string.format(string.char(0x5c) .. string.char(0x25) .. '03o' ..
1131 string.char(0x5c) .. string.char(0x25) .. '03o' ..
1132 string.char(0x5c) .. string.char(0x25) .. '03o' ..
1133 string.char(0x5c) .. string.char(0x25) .. '03o',
1134 (c_hi
/ 256), (c_hi
% 256),
1135 (c_lo
/ 256), (c_lo
% 256)))
1141 \def\pdfescapestring#1{\directlua{UTF16oct('\luaescapestring{#1}')}}
1142 \ifnum\luatexversion>
84
1143 % For LuaTeX >= 0.85
1144 \def\pdfdest{\pdfextension dest
}
1145 \let\pdfoutput\outputmode
1146 \def\pdfliteral{\pdfextension literal
}
1147 \def\pdfcatalog{\pdfextension catalog
}
1148 \def\pdftexversion{\numexpr\pdffeedback version
\relax}
1149 \let\pdfximage\saveimageresource
1150 \let\pdfrefximage\useimageresource
1151 \let\pdflastximage\lastsavedimageresourceindex
1152 \def\pdfendlink{\pdfextension endlink
\relax}
1153 \def\pdfoutline{\pdfextension outline
}
1154 \def\pdfstartlink{\pdfextension startlink
}
1155 \def\pdffontattr{\pdfextension fontattr
}
1156 \def\pdfobj{\pdfextension obj
}
1157 \def\pdflastobj{\numexpr\pdffeedback lastobj
\relax}
1158 \let\pdfpagewidth\pagewidth
1159 \let\pdfpageheight\pageheight
1160 \edef\pdfhorigin{\pdfvariable horigin
}
1161 \edef\pdfvorigin{\pdfvariable vorigin
}
1165 % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
1166 % can be set). So we test for \relax and 0 as well as being undefined.
1167 \ifx\pdfoutput\thisisundefined
1169 \ifx\pdfoutput\relax
1178 % PDF uses PostScript string constants for the names of xref targets,
1179 % for display in the outlines, and in other places. Thus, we have to
1180 % double any backslashes. Otherwise, a name like "\node" will be
1181 % interpreted as a newline (\n), followed by o, d, e. Not good.
1183 % See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and
1184 % related messages. The final outcome is that it is up to the TeX user
1185 % to double the backslashes and otherwise make the string valid, so
1186 % that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to
1187 % do this reliably, so we use it.
1189 % #1 is a control sequence in which to do the replacements,
1191 \def\txiescapepdf#1{%
1192 \ifx\pdfescapestring\thisisundefined
1193 % No primitive available; should we give a warning or log?
1194 % Many times it won't matter.
1197 % The expandable \pdfescapestring primitive escapes parentheses,
1198 % backslashes, and other special chars.
1199 \xdef#1{\pdfescapestring{#1}}%
1203 \newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
1204 with PDF output, and none of those formats could be found. (.eps cannot
1205 be supported due to the design of the PDF format; use regular TeX (DVI
1210 % Color manipulation macros using ideas from pdfcolor.tex,
1211 % except using rgb instead of cmyk; the latter is said to render as a
1212 % very dark gray on-screen and a very dark halftone in print, instead
1213 % of actual black. The dark red here is dark enough to print on paper as
1214 % nearly black, but still distinguishable for online viewing. We use
1215 % black by default, though.
1216 \def\rgbDarkRed{0.50 0.09 0.12}
1217 \def\rgbBlack{0 0 0}
1219 % rg sets the color for filling (usual text, etc.);
1220 % RG sets the color for stroking (thin rules, e.g., normal _'s).
1221 \def\pdfsetcolor#1{\pdfliteral{#1 rg
#1 RG
}}
1223 % Set color, and create a mark which defines \thiscolor accordingly,
1224 % so that \makeheadline knows which color to restore.
1226 \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}%
1231 \def\maincolor{\rgbBlack}
1232 \pdfsetcolor{\maincolor}
1233 \edef\thiscolor{\maincolor}
1234 \def\lastcolordefs{}
1238 \line{\pdfsetcolor{\maincolor}\the\footline}%
1246 % Extract \thiscolor definition from the marks.
1248 % Typeset the headline with \maincolor, then restore the color.
1249 \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
1257 \pdfcatalog{/PageMode /UseOutlines
}
1259 % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
1260 \def\dopdfimage#1#2#3{%
1261 \def\pdfimagewidth{#2}\setbox0 =
\hbox{\ignorespaces #2}%
1262 \def\pdfimageheight{#3}\setbox2 =
\hbox{\ignorespaces #3}%
1264 % pdftex (and the PDF format) support .pdf, .png, .jpg (among
1265 % others). Let's try in that order, PDF first since if
1266 % someone has a scalable image, presumably better to use that than a
1268 \let\pdfimgext=
\empty
1270 \openin 1 #1.pdf
\ifeof 1
1271 \openin 1 #1.PDF
\ifeof 1
1272 \openin 1 #1.png
\ifeof 1
1273 \openin 1 #1.jpg
\ifeof 1
1274 \openin 1 #1.jpeg
\ifeof 1
1275 \openin 1 #1.JPG
\ifeof 1
1276 \errhelp =
\nopdfimagehelp
1277 \errmessage{Could not find image file
#1 for pdf
}%
1278 \else \gdef\pdfimgext{JPG
}%
1280 \else \gdef\pdfimgext{jpeg
}%
1282 \else \gdef\pdfimgext{jpg
}%
1284 \else \gdef\pdfimgext{png
}%
1286 \else \gdef\pdfimgext{PDF
}%
1288 \else \gdef\pdfimgext{pdf
}%
1293 % without \immediate, ancient pdftex seg faults when the same image is
1294 % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
1295 \ifnum\pdftexversion <
14
1298 \immediate\pdfximage
1300 \ifdim \wd0 >
0pt width
\pdfimagewidth \fi
1301 \ifdim \wd2 >
0pt height
\pdfimageheight \fi
1302 \ifnum\pdftexversion<
13
1307 \ifnum\pdftexversion <
14 \else
1308 \pdfrefximage \pdflastximage
1312 % We have to set dummies so commands such as @code, and characters
1313 % such as \, aren't expanded when present in a section title.
1315 \makevalueexpandable
1317 % Use ASCII approximations in destination names.
1318 \passthroughcharsfalse
1319 \def\pdfdestname{#1}%
1320 \txiescapepdf\pdfdestname
1321 \safewhatsit{\pdfdest name
{\pdfdestname} xyz
}%
1324 % used to mark target names; must be expandable.
1327 % by default, use black for everything.
1328 \def\urlcolor{\rgbBlack}
1329 \def\linkcolor{\rgbBlack}
1330 \def\endlink{\setcolor{\maincolor}\pdfendlink}
1332 % Adding outlines to PDF; macros for calculating structure of outlines
1333 % come from Petr Olsak
1334 \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
1335 \else \csname#1\endcsname \fi}
1336 \def\advancenumber#1{\tempnum=
\expnumber{#1}\relax
1337 \advance\tempnum by
1
1338 \expandafter\xdef\csname#1\endcsname{\the\tempnum}}
1340 % #1 is the section text, which is what will be displayed in the
1341 % outline by the pdf viewer. #2 is the pdf expression for the number
1342 % of subentries (or empty, for subsubsections). #3 is the node text,
1343 % which might be empty if this toc entry had no corresponding node.
1344 % #4 is the page number
1346 \def\dopdfoutline#1#2#3#4{%
1347 % Generate a link to the node text if that exists; else, use the
1348 % page number. We could generate a destination for the section
1349 % text in the case where a section has no node, but it doesn't
1350 % seem worth the trouble, since most documents are normally structured.
1352 \ifx\luatexversion\thisisundefined \else
1353 \turnoffactive % LuaTeX can use Unicode strings for PDF
1355 \edef\pdfoutlinedest{#3}%
1356 \ifx\pdfoutlinedest\empty
1357 \def\pdfoutlinedest{#4}%
1359 \txiescapepdf\pdfoutlinedest
1362 % Also escape PDF chars in the display string.
1364 \ifx \declaredencoding \latone
1365 % The PDF format can use an extended form of Latin-1 in bookmark
1366 % strings. See Appendix D of the PDF Reference, Sixth Edition, for
1367 % the "PDFDocEncoding".
1368 \passthroughcharstrue
1370 \ifx \declaredencoding \utfeight
1371 % TODO: the PDF format can use UTF-16 in bookmark strings, but the
1372 % code for this isn't done yet.
1375 \edef\pdfoutlinetext{#1}%
1376 \txiescapepdf\pdfoutlinetext
1379 \pdfoutline goto name
{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
1383 \def\pdfmakeoutlines{%
1385 % Read toc silently, to get counts of subentries for \pdfoutline.
1386 \def\partentry#
#1#
#2#
#3#
#4{}% ignore parts in the outlines
1387 \def\numchapentry#
#1#
#2#
#3#
#4{%
1388 \def\thischapnum{#
#2}%
1390 \def\thissubsecnum{0}%
1392 \def\numsecentry#
#1#
#2#
#3#
#4{%
1393 \advancenumber{chap
\thischapnum}%
1394 \def\thissecnum{#
#2}%
1395 \def\thissubsecnum{0}%
1397 \def\numsubsecentry#
#1#
#2#
#3#
#4{%
1398 \advancenumber{sec
\thissecnum}%
1399 \def\thissubsecnum{#
#2}%
1401 \def\numsubsubsecentry#
#1#
#2#
#3#
#4{%
1402 \advancenumber{subsec
\thissubsecnum}%
1404 \def\thischapnum{0}%
1406 \def\thissubsecnum{0}%
1408 % use \def rather than \let here because we redefine \chapentry et
1409 % al. a second time, below.
1410 \def\appentry{\numchapentry}%
1411 \def\appsecentry{\numsecentry}%
1412 \def\appsubsecentry{\numsubsecentry}%
1413 \def\appsubsubsecentry{\numsubsubsecentry}%
1414 \def\unnchapentry{\numchapentry}%
1415 \def\unnsecentry{\numsecentry}%
1416 \def\unnsubsecentry{\numsubsecentry}%
1417 \def\unnsubsubsecentry{\numsubsubsecentry}%
1420 % Read toc second time, this time actually producing the outlines.
1421 % The `-' means take the \expnumber as the absolute number of
1422 % subentries, which we calculated on our first read of the .toc above.
1424 % We use the node names as the destinations.
1425 \def\numchapentry#
#1#
#2#
#3#
#4{%
1426 \dopdfoutline{#
#1}{count-
\expnumber{chap#
#2}}{#
#3}{#
#4}}%
1427 \def\numsecentry#
#1#
#2#
#3#
#4{%
1428 \dopdfoutline{#
#1}{count-
\expnumber{sec#
#2}}{#
#3}{#
#4}}%
1429 \def\numsubsecentry#
#1#
#2#
#3#
#4{%
1430 \dopdfoutline{#
#1}{count-
\expnumber{subsec#
#2}}{#
#3}{#
#4}}%
1431 \def\numsubsubsecentry#
#1#
#2#
#3#
#4{% count is always zero
1432 \dopdfoutline{#
#1}{}{#
#3}{#
#4}}%
1434 % PDF outlines are displayed using system fonts, instead of
1435 % document fonts. Therefore we cannot use special characters,
1436 % since the encoding is unknown. For example, the eogonek from
1437 % Latin 2 (0xea) gets translated to a | character. Info from
1438 % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
1440 % TODO this right, we have to translate 8-bit characters to
1441 % their "best" equivalent, based on the @documentencoding. Too
1442 % much work for too little return. Just use the ASCII equivalents
1443 % we use for the index sort strings.
1447 % We can have normal brace characters in the PDF outlines, unlike
1448 % Texinfo index files. So set that up.
1449 \def\
{{\lbracecharliteral}%
1450 \def\
}{\rbracecharliteral}%
1451 \catcode`\\=
\active \otherbackslash
1452 \input \tocreadfilename
1455 {\catcode`
[=
1 \catcode`
]=
2
1456 \catcode`
{=
\other \catcode`
}=
\other
1457 \gdef\lbracecharliteral[{]%
1458 \gdef\rbracecharliteral[}]%
1461 \def\skipspaces#1{\def\PP{#1}\def\D{|
}%
1462 \ifx\PP\D\let\nextsp\relax
1463 \else\let\nextsp\skipspaces
1464 \addtokens{\filename}{\PP}%
1465 \advance\filenamelength by
1
1468 \def\getfilename#1{%
1470 % If we don't expand the argument now, \skipspaces will get
1471 % snagged on things like "@value{foo}".
1473 \expandafter\skipspaces\temp|
\relax
1475 \ifnum\pdftexversion <
14
1476 \let \startlink \pdfannotlink
1478 \let \startlink \pdfstartlink
1480 % make a live url in pdf output.
1483 % it seems we really need yet another set of dummies; have not
1484 % tried to figure out what each command should do in the context
1485 % of @url. for now, just make @/ a no-op, that's the only one
1486 % people have actually reported a problem with.
1488 \normalturnoffactive
1491 \makevalueexpandable
1492 % do we want to go so far as to use \indexnofonts instead of just
1493 % special-casing \var here?
1496 \leavevmode\setcolor{\urlcolor}%
1497 \startlink attr
{/Border
[0 0 0]}%
1498 user
{/Subtype /Link /A << /S /URI /URI (
#1) >>
}%
1500 \def\pdfgettoks#1.
{\setbox\boxA=
\hbox{\toksA=
{#1.
}\toksB=
{}\maketoks}}
1501 \def\addtokens#1#2{\edef\addtoks{\noexpand#1=
{\the#1#2}}\addtoks}
1502 \def\adn#1{\addtokens{\toksC}{#1}\global\countA=
1\let\next=
\maketoks}
1503 \def\poptoks#1#2|ENDTOKS|
{\let\first=
#1\toksD=
{#1}\toksA=
{#2}}
1505 \expandafter\poptoks\the\toksA|ENDTOKS|
\relax
1507 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
1508 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
1509 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
1511 \ifnum0=
\countA\else\makelink\fi
1512 \ifx\first.
\let\next=
\done\else
1514 \addtokens{\toksB}{\the\toksD}
1515 \ifx\first,
\addtokens{\toksB}{\space}\fi
1517 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
1519 \def\makelink{\addtokens{\toksB}%
1520 {\noexpand\pdflink{\the\toksC}}\toksC=
{}\global\countA=
0}
1522 \startlink attr
{/Border
[0 0 0]} goto name
{\pdfmkpgn{#1}}
1523 \setcolor{\linkcolor}#1\endlink}
1524 \def\done{\edef\st{\global\noexpand\toksA=
{\the\toksB}}\st}
1527 \let\pdfmkdest =
\gobble
1528 \let\pdfurl =
\gobble
1529 \let\endlink =
\relax
1530 \let\setcolor =
\gobble
1531 \let\pdfsetcolor =
\gobble
1532 \let\pdfmakeoutlines =
\relax
1533 \fi % \ifx\pdfoutput
1538 \newif\iftxiuseunicodedestname
1539 \ifx\XeTeXrevision\thisisundefined
1542 % XeTeX version check
1544 \ifnum\strcmp{\the\XeTeXversion\XeTeXrevision}{0.99995}>-
1
1545 % XeTeX 0.99995+ contains xdvipdfmx 20160307+.
1546 % It can handle Unicode destination name for PDF.
1547 \txiuseunicodedestnametrue
1549 % XeTeX < 0.99995 can not handle Unicode destination name for PDF
1550 % because xdvipdfmx 20150315 has UTF-16 convert issue.
1551 % It fixed by xdvipdfmx 20160106 (TeX Live SVN r39753).
1552 \txiuseunicodedestnamefalse
1555 % PDF outline support
1557 % Emulate the primitive of pdfTeX
1558 \def\pdfdest name
#1 xyz
{%
1559 \special{pdf:dest (name
#1)
[@thispage /XYZ @xpos @ypos
]}%
1562 % We have to set dummies so commands such as @code, and characters
1563 % such as \, aren't expanded when present in a section title.
1565 \iftxiuseunicodedestname
1566 \def\pdfdestname{#1}% Pass through Unicode characters.
1568 \edef\pdfdestname{#1}% Replace Unicode characters to ASCII.
1571 \makevalueexpandable
1572 \txiescapepdf\pdfdestname
1573 \safewhatsit{\pdfdest name
{\pdfdestname} xyz
}%
1576 \def\dopdfoutline#1#2#3#4{%
1577 \iftxiuseunicodedestname
1578 \def\pdfoutlinedest{#3}% Pass through Unicode characters.
1580 \edef\pdfoutlinedest{#3}% Replace Unicode characters to ASCII.
1582 \ifx\pdfoutlinedest\empty
1583 \def\pdfoutlinedest{#4}%
1587 \txiescapepdf\pdfoutlinedest
1588 \edef\pdfoutlinetext{#1}%
1589 \txiescapepdf\pdfoutlinetext
1591 \special{pdf:out
[-
] #2 << /Title (
\pdfoutlinetext) /A
1592 << /S /GoTo /D (name
\pdfoutlinedest) >> >>
}%
1596 \def\pdfmakeoutlines{%
1599 % In the case of XeTeX, counts of subentries is not necesary.
1600 % Therefore, read toc only once.
1602 % We use the node names as the destinations.
1603 \def\partentry#
#1#
#2#
#3#
#4{}% ignore parts in the outlines
1604 \def\numchapentry#
#1#
#2#
#3#
#4{%
1605 \dopdfoutline{#
#1}{1}{#
#3}{#
#4}}%
1606 \def\numsecentry#
#1#
#2#
#3#
#4{%
1607 \dopdfoutline{#
#1}{2}{#
#3}{#
#4}}%
1608 \def\numsubsecentry#
#1#
#2#
#3#
#4{%
1609 \dopdfoutline{#
#1}{3}{#
#3}{#
#4}}%
1610 \def\numsubsubsecentry#
#1#
#2#
#3#
#4{%
1611 \dopdfoutline{#
#1}{4}{#
#3}{#
#4}}%
1613 \let\appentry\numchapentry%
1614 \let\appsecentry\numsecentry%
1615 \let\appsubsecentry\numsubsecentry%
1616 \let\appsubsubsecentry\numsubsubsecentry%
1617 \let\unnchapentry\numchapentry%
1618 \let\unnsecentry\numsecentry%
1619 \let\unnsubsecentry\numsubsecentry%
1620 \let\unnsubsubsecentry\numsubsubsecentry%
1622 % In the case of XeTeX, xdvipdfmx converts strings to UTF-16.
1623 % Therefore, the encoding and the language may not be considered.
1627 % We can have normal brace characters in the PDF outlines, unlike
1628 % Texinfo index files. So set that up.
1629 \def\
{{\lbracecharliteral}%
1630 \def\
}{\rbracecharliteral}%
1631 \catcode`\\=
\active \otherbackslash
1632 \input \tocreadfilename
1635 {\catcode`
[=
1 \catcode`
]=
2
1636 \catcode`
{=
\other \catcode`
}=
\other
1637 \gdef\lbracecharliteral[{]%
1638 \gdef\rbracecharliteral[}]%
1641 \special{pdf:docview << /PageMode /UseOutlines >>
}
1642 % ``\special{pdf:tounicode ...}'' is not necessary
1643 % because xdvipdfmx converts strings from UTF-8 to UTF-16 without it.
1644 % However, due to UTF-16 convert issue of xdvipdfmx 20150315,
1645 % ``\special{pdf:dest ...}'' can not handle non-ASCII strings.
1646 % It fixed by xdvipdfmx 20160106 (TeX Live SVN r39753).
1648 \def\skipspaces#1{\def\PP{#1}\def\D{|
}%
1649 \ifx\PP\D\let\nextsp\relax
1650 \else\let\nextsp\skipspaces
1651 \addtokens{\filename}{\PP}%
1652 \advance\filenamelength by
1
1655 \def\getfilename#1{%
1657 % If we don't expand the argument now, \skipspaces will get
1658 % snagged on things like "@value{foo}".
1660 \expandafter\skipspaces\temp|
\relax
1662 % make a live url in pdf output.
1665 % it seems we really need yet another set of dummies; have not
1666 % tried to figure out what each command should do in the context
1667 % of @url. for now, just make @/ a no-op, that's the only one
1668 % people have actually reported a problem with.
1670 \normalturnoffactive
1673 \makevalueexpandable
1674 % do we want to go so far as to use \indexnofonts instead of just
1675 % special-casing \var here?
1678 \leavevmode\setcolor{\urlcolor}%
1679 \special{pdf:bann << /Border
[0 0 0]
1680 /Subtype /Link /A << /S /URI /URI (
#1) >> >>
}%
1682 \def\endlink{\setcolor{\maincolor}\special{pdf:eann
}}
1683 \def\pdfgettoks#1.
{\setbox\boxA=
\hbox{\toksA=
{#1.
}\toksB=
{}\maketoks}}
1684 \def\addtokens#1#2{\edef\addtoks{\noexpand#1=
{\the#1#2}}\addtoks}
1685 \def\adn#1{\addtokens{\toksC}{#1}\global\countA=
1\let\next=
\maketoks}
1686 \def\poptoks#1#2|ENDTOKS|
{\let\first=
#1\toksD=
{#1}\toksA=
{#2}}
1688 \expandafter\poptoks\the\toksA|ENDTOKS|
\relax
1690 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
1691 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
1692 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
1694 \ifnum0=
\countA\else\makelink\fi
1695 \ifx\first.
\let\next=
\done\else
1697 \addtokens{\toksB}{\the\toksD}
1698 \ifx\first,
\addtokens{\toksB}{\space}\fi
1700 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
1702 \def\makelink{\addtokens{\toksB}%
1703 {\noexpand\pdflink{\the\toksC}}\toksC=
{}\global\countA=
0}
1705 \special{pdf:bann << /Border
[0 0 0]
1706 /Type /Annot /Subtype /Link /A << /S /GoTo /D (name
#1) >> >>
}%
1707 \setcolor{\linkcolor}#1\endlink}
1708 \def\done{\edef\st{\global\noexpand\toksA=
{\the\toksB}}\st}
1713 % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
1714 \def\doxeteximage#1#2#3{%
1715 \def\xeteximagewidth{#2}\setbox0 =
\hbox{\ignorespaces #2}%
1716 \def\xeteximageheight{#3}\setbox2 =
\hbox{\ignorespaces #3}%
1718 % XeTeX (and the PDF format) support .pdf, .png, .jpg (among
1719 % others). Let's try in that order, PDF first since if
1720 % someone has a scalable image, presumably better to use that than a
1722 \let\xeteximgext=
\empty
1724 \openin 1 #1.pdf
\ifeof 1
1725 \openin 1 #1.PDF
\ifeof 1
1726 \openin 1 #1.png
\ifeof 1
1727 \openin 1 #1.jpg
\ifeof 1
1728 \openin 1 #1.jpeg
\ifeof 1
1729 \openin 1 #1.JPG
\ifeof 1
1730 \errmessage{Could not find image file
#1 for XeTeX
}%
1731 \else \gdef\xeteximgext{JPG
}%
1733 \else \gdef\xeteximgext{jpeg
}%
1735 \else \gdef\xeteximgext{jpg
}%
1737 \else \gdef\xeteximgext{png
}%
1739 \else \gdef\xeteximgext{PDF
}%
1741 \else \gdef\xeteximgext{pdf
}%
1746 \def\xetexpdfext{pdf
}%
1747 \ifx\xeteximgext\xetexpdfext
1748 \XeTeXpdffile "
#1".
\xeteximgext ""
1750 \def\xetexpdfext{PDF
}%
1751 \ifx\xeteximgext\xetexpdfext
1752 \XeTeXpdffile "
#1".
\xeteximgext ""
1754 \XeTeXpicfile "
#1".
\xeteximgext ""
1757 \ifdim \wd0 >
0pt width
\xeteximagewidth \fi
1758 \ifdim \wd2 >
0pt height
\xeteximageheight \fi \relax
1764 % Change the current font style to #1, remembering it in \curfontstyle.
1765 % For now, we do not accumulate font styles: @b{@i{foo}} prints foo in
1766 % italics, not bold italics.
1768 \def\setfontstyle#1{%
1769 \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd.
1770 \csname ten
#1\endcsname % change the current font
1773 % Select #1 fonts with the current style.
1775 \def\selectfonts#1{\csname #1fonts
\endcsname \csname\curfontstyle\endcsname}
1777 \def\rm{\fam=
0 \setfontstyle{rm
}}
1778 \def\it{\fam=
\itfam \setfontstyle{it
}}
1779 \def\sl{\fam=
\slfam \setfontstyle{sl
}}
1780 \def\bf{\fam=
\bffam \setfontstyle{bf
}}\def\bfstylename{bf
}
1781 \def\tt{\fam=
\ttfam \setfontstyle{tt
}}
1783 % Unfortunately, we have to override this for titles and the like, since
1784 % in those cases "rm" is bold. Sigh.
1785 \def\rmisbold{\rm\def\curfontstyle{bf
}}
1787 % Texinfo sort of supports the sans serif font style, which plain TeX does not.
1788 % So we set up a \sf.
1790 \def\sf{\fam=
\sffam \setfontstyle{sf
}}
1791 \let\li =
\sf % Sometimes we call it \li, not \sf.
1793 % We don't need math for this font style.
1794 \def\ttsl{\setfontstyle{ttsl
}}
1797 % Set the baselineskip to #1, and the lineskip and strut size
1798 % correspondingly. There is no deep meaning behind these magic numbers
1799 % used as factors; they just match (closely enough) what Knuth defined.
1801 \def\lineskipfactor{.08333}
1802 \def\strutheightpercent{.70833}
1803 \def\strutdepthpercent {.29167}
1805 % can get a sort of poor man's double spacing by redefining this.
1806 \def\baselinefactor{1}
1808 \newdimen\textleading
1811 \normalbaselineskip =
\baselinefactor\dimen0
1812 \normallineskip =
\lineskipfactor\normalbaselineskip
1814 \setbox\strutbox =
\hbox{%
1815 \vrule width0pt height
\strutheightpercent\baselineskip
1816 depth
\strutdepthpercent \baselineskip
1820 % PDF CMaps. See also LaTeX's t1.cmap.
1822 % do nothing with this by default.
1823 \expandafter\let\csname cmapOT1
\endcsname\gobble
1824 \expandafter\let\csname cmapOT1IT
\endcsname\gobble
1825 \expandafter\let\csname cmapOT1TT
\endcsname\gobble
1827 % if we are producing pdf, and we have \pdffontattr, then define cmaps.
1828 % (\pdffontattr was introduced many years ago, but people still run
1829 % older pdftex's; it's easy to conditionalize, so we do.)
1830 \ifpdf \ifx\pdffontattr\thisisundefined \else
1832 \catcode`\^^M=
\active \def^^M
{^^J
}% Output line endings as the ^^J char.
1833 \catcode`\%=
12 \immediate\pdfobj stream
{%!PS-Adobe-3.0 Resource-CMap
1834 %%DocumentNeededResources: ProcSet (CIDInit)
1835 %%IncludeResource: ProcSet (CIDInit)
1836 %%BeginResource: CMap (TeX-OT1-0)
1837 %%Title: (TeX-OT1-0 TeX OT1 0)
1840 /CIDInit /ProcSet findresource begin
1848 /CMapName /TeX-OT1-
0 def
1850 1 begincodespacerange
1906 CMapName currentdict /CMap defineresource pop
1912 \expandafter\edef\csname cmapOT1
\endcsname#1{%
1913 \pdffontattr#1{/ToUnicode
\the\pdflastobj\space 0 R
}%
1918 \catcode`\^^M=
\active \def^^M
{^^J
}% Output line endings as the ^^J char.
1919 \catcode`\%=
12 \immediate\pdfobj stream
{%!PS-Adobe-3.0 Resource-CMap
1920 %%DocumentNeededResources: ProcSet (CIDInit)
1921 %%IncludeResource: ProcSet (CIDInit)
1922 %%BeginResource: CMap (TeX-OT1IT-0)
1923 %%Title: (TeX-OT1IT-0 TeX OT1IT 0)
1926 /CIDInit /ProcSet findresource begin
1934 /CMapName /TeX-OT1IT-
0 def
1936 1 begincodespacerange
1994 CMapName currentdict /CMap defineresource pop
2000 \expandafter\edef\csname cmapOT1IT
\endcsname#1{%
2001 \pdffontattr#1{/ToUnicode
\the\pdflastobj\space 0 R
}%
2006 \catcode`\^^M=
\active \def^^M
{^^J
}% Output line endings as the ^^J char.
2007 \catcode`\%=
12 \immediate\pdfobj stream
{%!PS-Adobe-3.0 Resource-CMap
2008 %%DocumentNeededResources: ProcSet (CIDInit)
2009 %%IncludeResource: ProcSet (CIDInit)
2010 %%BeginResource: CMap (TeX-OT1TT-0)
2011 %%Title: (TeX-OT1TT-0 TeX OT1TT 0)
2014 /CIDInit /ProcSet findresource begin
2022 /CMapName /TeX-OT1TT-
0 def
2024 1 begincodespacerange
2069 CMapName currentdict /CMap defineresource pop
2075 \expandafter\edef\csname cmapOT1TT
\endcsname#1{%
2076 \pdffontattr#1{/ToUnicode
\the\pdflastobj\space 0 R
}%
2081 % Set the font macro #1 to the font named \fontprefix#2.
2082 % #3 is the font's design size, #4 is a scale factor, #5 is the CMap
2083 % encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit).
2091 \def\setfont#1#2#3#4#5{%
2092 \font#1=
\fontprefix#2#3 scaled
#4
2093 \csname cmap
#5\endcsname#1%
2095 % This is what gets called when #5 of \setfont is empty.
2100 % Use cm as the default font prefix.
2101 % To specify the font prefix, you must define \fontprefix
2102 % before you read in texinfo.tex.
2103 \ifx\fontprefix\thisisundefined
2106 % Support font families that don't use the same naming scheme as CM.
2108 \def\rmbshape{bx
} % where the normal face is bold
2113 \def\ttslshape{sltt
}
2123 % Definitions for a main text size of 11pt. (The default in Texinfo.)
2125 \def\definetextfontsizexi{%
2126 % Text fonts (11.2pt, magstep1).
2127 \def\textnominalsize{11pt
}
2128 \edef\mainmagstep{\magstephalf}
2129 \setfont\textrm\rmshape{10}{\mainmagstep}{OT1
}
2130 \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT
}
2131 \setfont\textbf\bfshape{10}{\mainmagstep}{OT1
}
2132 \setfont\textit\itshape{10}{\mainmagstep}{OT1IT
}
2133 \setfont\textsl\slshape{10}{\mainmagstep}{OT1
}
2134 \setfont\textsf\sfshape{10}{\mainmagstep}{OT1
}
2135 \setfont\textsc\scshape{10}{\mainmagstep}{OT1
}
2136 \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT
}
2137 \font\texti=cmmi10 scaled
\mainmagstep
2138 \font\textsy=cmsy10 scaled
\mainmagstep
2139 \def\textecsize{1095}
2141 % A few fonts for @defun names and args.
2142 \setfont\defbf\bfshape{10}{\magstep1}{OT1
}
2143 \setfont\deftt\ttshape{10}{\magstep1}{OT1TT
}
2144 \setfont\defsl\slshape{10}{\magstep1}{OT1TT
}
2145 \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT
}
2146 \def\df{\let\tentt=
\deftt \let\tenbf =
\defbf
2147 \let\tenttsl=
\defttsl \let\tensl=
\defsl \bf}
2149 % Fonts for indices, footnotes, small examples (9pt).
2150 \def\smallnominalsize{9pt
}
2151 \setfont\smallrm\rmshape{9}{1000}{OT1
}
2152 \setfont\smalltt\ttshape{9}{1000}{OT1TT
}
2153 \setfont\smallbf\bfshape{10}{900}{OT1
}
2154 \setfont\smallit\itshape{9}{1000}{OT1IT
}
2155 \setfont\smallsl\slshape{9}{1000}{OT1
}
2156 \setfont\smallsf\sfshape{9}{1000}{OT1
}
2157 \setfont\smallsc\scshape{10}{900}{OT1
}
2158 \setfont\smallttsl\ttslshape{10}{900}{OT1TT
}
2161 \def\smallecsize{0900}
2163 % Fonts for small examples (8pt).
2164 \def\smallernominalsize{8pt
}
2165 \setfont\smallerrm\rmshape{8}{1000}{OT1
}
2166 \setfont\smallertt\ttshape{8}{1000}{OT1TT
}
2167 \setfont\smallerbf\bfshape{10}{800}{OT1
}
2168 \setfont\smallerit\itshape{8}{1000}{OT1IT
}
2169 \setfont\smallersl\slshape{8}{1000}{OT1
}
2170 \setfont\smallersf\sfshape{8}{1000}{OT1
}
2171 \setfont\smallersc\scshape{10}{800}{OT1
}
2172 \setfont\smallerttsl\ttslshape{10}{800}{OT1TT
}
2173 \font\smalleri=cmmi8
2174 \font\smallersy=cmsy8
2175 \def\smallerecsize{0800}
2177 % Fonts for title page (20.4pt):
2178 \def\titlenominalsize{20pt
}
2179 \setfont\titlerm\rmbshape{12}{\magstep3}{OT1
}
2180 \setfont\titleit\itbshape{10}{\magstep4}{OT1IT
}
2181 \setfont\titlesl\slbshape{10}{\magstep4}{OT1
}
2182 \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT
}
2183 \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT
}
2184 \setfont\titlesf\sfbshape{17}{\magstep1}{OT1
}
2185 \let\titlebf=
\titlerm
2186 \setfont\titlesc\scbshape{10}{\magstep4}{OT1
}
2187 \font\titlei=cmmi12 scaled
\magstep3
2188 \font\titlesy=cmsy10 scaled
\magstep4
2189 \def\titleecsize{2074}
2191 % Chapter (and unnumbered) fonts (17.28pt).
2192 \def\chapnominalsize{17pt
}
2193 \setfont\chaprm\rmbshape{12}{\magstep2}{OT1
}
2194 \setfont\chapit\itbshape{10}{\magstep3}{OT1IT
}
2195 \setfont\chapsl\slbshape{10}{\magstep3}{OT1
}
2196 \setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT
}
2197 \setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT
}
2198 \setfont\chapsf\sfbshape{17}{1000}{OT1
}
2200 \setfont\chapsc\scbshape{10}{\magstep3}{OT1
}
2201 \font\chapi=cmmi12 scaled
\magstep2
2202 \font\chapsy=cmsy10 scaled
\magstep3
2203 \def\chapecsize{1728}
2205 % Section fonts (14.4pt).
2206 \def\secnominalsize{14pt
}
2207 \setfont\secrm\rmbshape{12}{\magstep1}{OT1
}
2208 \setfont\secrmnotbold\rmshape{12}{\magstep1}{OT1
}
2209 \setfont\secit\itbshape{10}{\magstep2}{OT1IT
}
2210 \setfont\secsl\slbshape{10}{\magstep2}{OT1
}
2211 \setfont\sectt\ttbshape{12}{\magstep1}{OT1TT
}
2212 \setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT
}
2213 \setfont\secsf\sfbshape{12}{\magstep1}{OT1
}
2215 \setfont\secsc\scbshape{10}{\magstep2}{OT1
}
2216 \font\seci=cmmi12 scaled
\magstep1
2217 \font\secsy=cmsy10 scaled
\magstep2
2218 \def\sececsize{1440}
2220 % Subsection fonts (13.15pt).
2221 \def\ssecnominalsize{13pt
}
2222 \setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1
}
2223 \setfont\ssecit\itbshape{10}{1315}{OT1IT
}
2224 \setfont\ssecsl\slbshape{10}{1315}{OT1
}
2225 \setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT
}
2226 \setfont\ssecttsl\ttslshape{10}{1315}{OT1TT
}
2227 \setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1
}
2229 \setfont\ssecsc\scbshape{10}{1315}{OT1
}
2230 \font\sseci=cmmi12 scaled
\magstephalf
2231 \font\ssecsy=cmsy10 scaled
1315
2232 \def\ssececsize{1200}
2234 % Reduced fonts for @acro in text (10pt).
2235 \def\reducednominalsize{10pt
}
2236 \setfont\reducedrm\rmshape{10}{1000}{OT1
}
2237 \setfont\reducedtt\ttshape{10}{1000}{OT1TT
}
2238 \setfont\reducedbf\bfshape{10}{1000}{OT1
}
2239 \setfont\reducedit\itshape{10}{1000}{OT1IT
}
2240 \setfont\reducedsl\slshape{10}{1000}{OT1
}
2241 \setfont\reducedsf\sfshape{10}{1000}{OT1
}
2242 \setfont\reducedsc\scshape{10}{1000}{OT1
}
2243 \setfont\reducedttsl\ttslshape{10}{1000}{OT1TT
}
2244 \font\reducedi=cmmi10
2245 \font\reducedsy=cmsy10
2246 \def\reducedecsize{1000}
2248 \textleading =
13.2pt
% line spacing for 11pt CM
2249 \textfonts % reset the current fonts
2251 } % end of 11pt text font size definitions, \definetextfontsizexi
2254 % Definitions to make the main text be 10pt Computer Modern, with
2255 % section, chapter, etc., sizes following suit. This is for the GNU
2256 % Press printing of the Emacs 22 manual. Maybe other manuals in the
2257 % future. Used with @smallbook, which sets the leading to 12pt.
2259 \def\definetextfontsizex{%
2260 % Text fonts (10pt).
2261 \def\textnominalsize{10pt
}
2262 \edef\mainmagstep{1000}
2263 \setfont\textrm\rmshape{10}{\mainmagstep}{OT1
}
2264 \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT
}
2265 \setfont\textbf\bfshape{10}{\mainmagstep}{OT1
}
2266 \setfont\textit\itshape{10}{\mainmagstep}{OT1IT
}
2267 \setfont\textsl\slshape{10}{\mainmagstep}{OT1
}
2268 \setfont\textsf\sfshape{10}{\mainmagstep}{OT1
}
2269 \setfont\textsc\scshape{10}{\mainmagstep}{OT1
}
2270 \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT
}
2271 \font\texti=cmmi10 scaled
\mainmagstep
2272 \font\textsy=cmsy10 scaled
\mainmagstep
2273 \def\textecsize{1000}
2275 % A few fonts for @defun names and args.
2276 \setfont\defbf\bfshape{10}{\magstephalf}{OT1
}
2277 \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT
}
2278 \setfont\defsl\slshape{10}{\magstephalf}{OT1TT
}
2279 \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT
}
2280 \def\df{\let\tentt=
\deftt \let\tenbf =
\defbf
2281 \let\tensl=
\defsl \let\tenttsl=
\defttsl \bf}
2283 % Fonts for indices, footnotes, small examples (9pt).
2284 \def\smallnominalsize{9pt
}
2285 \setfont\smallrm\rmshape{9}{1000}{OT1
}
2286 \setfont\smalltt\ttshape{9}{1000}{OT1TT
}
2287 \setfont\smallbf\bfshape{10}{900}{OT1
}
2288 \setfont\smallit\itshape{9}{1000}{OT1IT
}
2289 \setfont\smallsl\slshape{9}{1000}{OT1
}
2290 \setfont\smallsf\sfshape{9}{1000}{OT1
}
2291 \setfont\smallsc\scshape{10}{900}{OT1
}
2292 \setfont\smallttsl\ttslshape{10}{900}{OT1TT
}
2295 \def\smallecsize{0900}
2297 % Fonts for small examples (8pt).
2298 \def\smallernominalsize{8pt
}
2299 \setfont\smallerrm\rmshape{8}{1000}{OT1
}
2300 \setfont\smallertt\ttshape{8}{1000}{OT1TT
}
2301 \setfont\smallerbf\bfshape{10}{800}{OT1
}
2302 \setfont\smallerit\itshape{8}{1000}{OT1IT
}
2303 \setfont\smallersl\slshape{8}{1000}{OT1
}
2304 \setfont\smallersf\sfshape{8}{1000}{OT1
}
2305 \setfont\smallersc\scshape{10}{800}{OT1
}
2306 \setfont\smallerttsl\ttslshape{10}{800}{OT1TT
}
2307 \font\smalleri=cmmi8
2308 \font\smallersy=cmsy8
2309 \def\smallerecsize{0800}
2311 % Fonts for title page (20.4pt):
2312 \def\titlenominalsize{20pt
}
2313 \setfont\titlerm\rmbshape{12}{\magstep3}{OT1
}
2314 \setfont\titleit\itbshape{10}{\magstep4}{OT1IT
}
2315 \setfont\titlesl\slbshape{10}{\magstep4}{OT1
}
2316 \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT
}
2317 \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT
}
2318 \setfont\titlesf\sfbshape{17}{\magstep1}{OT1
}
2319 \let\titlebf=
\titlerm
2320 \setfont\titlesc\scbshape{10}{\magstep4}{OT1
}
2321 \font\titlei=cmmi12 scaled
\magstep3
2322 \font\titlesy=cmsy10 scaled
\magstep4
2323 \def\titleecsize{2074}
2325 % Chapter fonts (14.4pt).
2326 \def\chapnominalsize{14pt
}
2327 \setfont\chaprm\rmbshape{12}{\magstep1}{OT1
}
2328 \setfont\chapit\itbshape{10}{\magstep2}{OT1IT
}
2329 \setfont\chapsl\slbshape{10}{\magstep2}{OT1
}
2330 \setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT
}
2331 \setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT
}
2332 \setfont\chapsf\sfbshape{12}{\magstep1}{OT1
}
2334 \setfont\chapsc\scbshape{10}{\magstep2}{OT1
}
2335 \font\chapi=cmmi12 scaled
\magstep1
2336 \font\chapsy=cmsy10 scaled
\magstep2
2337 \def\chapecsize{1440}
2339 % Section fonts (12pt).
2340 \def\secnominalsize{12pt
}
2341 \setfont\secrm\rmbshape{12}{1000}{OT1
}
2342 \setfont\secit\itbshape{10}{\magstep1}{OT1IT
}
2343 \setfont\secsl\slbshape{10}{\magstep1}{OT1
}
2344 \setfont\sectt\ttbshape{12}{1000}{OT1TT
}
2345 \setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT
}
2346 \setfont\secsf\sfbshape{12}{1000}{OT1
}
2348 \setfont\secsc\scbshape{10}{\magstep1}{OT1
}
2350 \font\secsy=cmsy10 scaled
\magstep1
2351 \def\sececsize{1200}
2353 % Subsection fonts (10pt).
2354 \def\ssecnominalsize{10pt
}
2355 \setfont\ssecrm\rmbshape{10}{1000}{OT1
}
2356 \setfont\ssecit\itbshape{10}{1000}{OT1IT
}
2357 \setfont\ssecsl\slbshape{10}{1000}{OT1
}
2358 \setfont\ssectt\ttbshape{10}{1000}{OT1TT
}
2359 \setfont\ssecttsl\ttslshape{10}{1000}{OT1TT
}
2360 \setfont\ssecsf\sfbshape{10}{1000}{OT1
}
2362 \setfont\ssecsc\scbshape{10}{1000}{OT1
}
2365 \def\ssececsize{1000}
2367 % Reduced fonts for @acro in text (9pt).
2368 \def\reducednominalsize{9pt
}
2369 \setfont\reducedrm\rmshape{9}{1000}{OT1
}
2370 \setfont\reducedtt\ttshape{9}{1000}{OT1TT
}
2371 \setfont\reducedbf\bfshape{10}{900}{OT1
}
2372 \setfont\reducedit\itshape{9}{1000}{OT1IT
}
2373 \setfont\reducedsl\slshape{9}{1000}{OT1
}
2374 \setfont\reducedsf\sfshape{9}{1000}{OT1
}
2375 \setfont\reducedsc\scshape{10}{900}{OT1
}
2376 \setfont\reducedttsl\ttslshape{10}{900}{OT1TT
}
2377 \font\reducedi=cmmi9
2378 \font\reducedsy=cmsy9
2379 \def\reducedecsize{0900}
2381 \divide\parskip by
2 % reduce space between paragraphs
2382 \textleading =
12pt
% line spacing for 10pt CM
2383 \textfonts % reset the current fonts
2385 } % end of 10pt text font size definitions, \definetextfontsizex
2388 % We provide the user-level command
2390 % (or 11) to redefine the text font size. pt is assumed.
2396 \parseargdef\fonttextsize{%
2397 \def\textsizearg{#1}%
2398 %\wlog{doing @fonttextsize \textsizearg}%
2400 % Set \globaldefs so that documents can use this inside @tex, since
2401 % makeinfo 4.8 does not support it, but we need it nonetheless.
2403 \begingroup \globaldefs=
1
2404 \ifx\textsizearg\xword \definetextfontsizex
2405 \else \ifx\textsizearg\xiword \definetextfontsizexi
2408 \errmessage{@fonttextsize only supports `
10' or `
11', not `
\textsizearg'
}
2413 % In order for the font changes to affect most math symbols and letters,
2414 % we have to define the \textfont of the standard families. We don't
2415 % bother to reset \scriptfont and \scriptscriptfont; awaiting user need.
2417 \def\resetmathfonts{%
2418 \textfont0=
\tenrm \textfont1=
\teni \textfont2=
\tensy
2419 \textfont\itfam=
\tenit \textfont\slfam=
\tensl \textfont\bffam=
\tenbf
2420 \textfont\ttfam=
\tentt \textfont\sffam=
\tensf
2423 % The font-changing commands redefine the meanings of \tenSTYLE, instead
2424 % of just \STYLE. We do this because \STYLE needs to also set the
2425 % current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire
2426 % \tenSTYLE to set the current font.
2428 % Each font-changing command also sets the names \lsize (one size lower)
2429 % and \lllsize (three sizes lower). These relative commands are used
2430 % in, e.g., the LaTeX logo and acronyms.
2432 % This all needs generalizing, badly.
2435 \let\tenrm=
\textrm \let\tenit=
\textit \let\tensl=
\textsl
2436 \let\tenbf=
\textbf \let\tentt=
\texttt \let\smallcaps=
\textsc
2437 \let\tensf=
\textsf \let\teni=
\texti \let\tensy=
\textsy
2438 \let\tenttsl=
\textttsl
2439 \def\curfontsize{text
}%
2440 \def\lsize{reduced
}\def\lllsize{smaller
}%
2441 \resetmathfonts \setleading{\textleading}}
2443 \let\tenrm=
\titlerm \let\tenit=
\titleit \let\tensl=
\titlesl
2444 \let\tenbf=
\titlebf \let\tentt=
\titlett \let\smallcaps=
\titlesc
2445 \let\tensf=
\titlesf \let\teni=
\titlei \let\tensy=
\titlesy
2446 \let\tenttsl=
\titlettsl
2447 \def\curfontsize{title
}%
2448 \def\lsize{chap
}\def\lllsize{subsec
}%
2449 \resetmathfonts \setleading{27pt
}}
2450 \def\titlefont#1{{\titlefonts\rmisbold #1}}
2452 \let\tenrm=
\chaprm \let\tenit=
\chapit \let\tensl=
\chapsl
2453 \let\tenbf=
\chapbf \let\tentt=
\chaptt \let\smallcaps=
\chapsc
2454 \let\tensf=
\chapsf \let\teni=
\chapi \let\tensy=
\chapsy
2455 \let\tenttsl=
\chapttsl
2456 \def\curfontsize{chap
}%
2457 \def\lsize{sec
}\def\lllsize{text
}%
2458 \resetmathfonts \setleading{19pt
}}
2460 \let\tenrm=
\secrm \let\tenit=
\secit \let\tensl=
\secsl
2461 \let\tenbf=
\secbf \let\tentt=
\sectt \let\smallcaps=
\secsc
2462 \let\tensf=
\secsf \let\teni=
\seci \let\tensy=
\secsy
2463 \let\tenttsl=
\secttsl
2464 \def\curfontsize{sec
}%
2465 \def\lsize{subsec
}\def\lllsize{reduced
}%
2466 \resetmathfonts \setleading{17pt
}}
2468 \let\tenrm=
\ssecrm \let\tenit=
\ssecit \let\tensl=
\ssecsl
2469 \let\tenbf=
\ssecbf \let\tentt=
\ssectt \let\smallcaps=
\ssecsc
2470 \let\tensf=
\ssecsf \let\teni=
\sseci \let\tensy=
\ssecsy
2471 \let\tenttsl=
\ssecttsl
2472 \def\curfontsize{ssec
}%
2473 \def\lsize{text
}\def\lllsize{small
}%
2474 \resetmathfonts \setleading{15pt
}}
2475 \let\subsubsecfonts =
\subsecfonts
2477 \let\tenrm=
\reducedrm \let\tenit=
\reducedit \let\tensl=
\reducedsl
2478 \let\tenbf=
\reducedbf \let\tentt=
\reducedtt \let\reducedcaps=
\reducedsc
2479 \let\tensf=
\reducedsf \let\teni=
\reducedi \let\tensy=
\reducedsy
2480 \let\tenttsl=
\reducedttsl
2481 \def\curfontsize{reduced
}%
2482 \def\lsize{small
}\def\lllsize{smaller
}%
2483 \resetmathfonts \setleading{10.5pt
}}
2485 \let\tenrm=
\smallrm \let\tenit=
\smallit \let\tensl=
\smallsl
2486 \let\tenbf=
\smallbf \let\tentt=
\smalltt \let\smallcaps=
\smallsc
2487 \let\tensf=
\smallsf \let\teni=
\smalli \let\tensy=
\smallsy
2488 \let\tenttsl=
\smallttsl
2489 \def\curfontsize{small
}%
2490 \def\lsize{smaller
}\def\lllsize{smaller
}%
2491 \resetmathfonts \setleading{10.5pt
}}
2493 \let\tenrm=
\smallerrm \let\tenit=
\smallerit \let\tensl=
\smallersl
2494 \let\tenbf=
\smallerbf \let\tentt=
\smallertt \let\smallcaps=
\smallersc
2495 \let\tensf=
\smallersf \let\teni=
\smalleri \let\tensy=
\smallersy
2496 \let\tenttsl=
\smallerttsl
2497 \def\curfontsize{smaller
}%
2498 \def\lsize{smaller
}\def\lllsize{smaller
}%
2499 \resetmathfonts \setleading{9.5pt
}}
2501 % Fonts for short table of contents.
2502 \setfont\shortcontrm\rmshape{12}{1000}{OT1
}
2503 \setfont\shortcontbf\bfshape{10}{\magstep1}{OT1
} % no cmb12
2504 \setfont\shortcontsl\slshape{12}{1000}{OT1
}
2505 \setfont\shortconttt\ttshape{12}{1000}{OT1TT
}
2507 % Define these just so they can be easily changed for other fonts.
2508 \def\angleleft{$
\langle$
}
2509 \def\angleright{$
\rangle$
}
2511 % Set the fonts to use with the @small... environments.
2512 \let\smallexamplefonts =
\smallfonts
2514 % About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample
2515 % can fit this many characters:
2516 % 8.5x11=86 smallbook=72 a4=90 a5=69
2517 % If we use \scriptfonts (8pt), then we can fit this many characters:
2518 % 8.5x11=90+ smallbook=80 a4=90+ a5=77
2519 % For me, subjectively, the few extra characters that fit aren't worth
2520 % the additional smallness of 8pt. So I'm making the default 9pt.
2522 % By the way, for comparison, here's what fits with @example (10pt):
2523 % 8.5x11=71 smallbook=60 a4=75 a5=58
2526 % Set up the default fonts, so we can use them for creating boxes.
2528 \definetextfontsizexi
2533 % Check if we are currently using a typewriter font. Since all the
2534 % Computer Modern typewriter fonts have zero interword stretch (and
2535 % shrink), and it is reasonable to expect all typewriter fonts to have
2536 % this property, we can check that font parameter.
2538 \def\ifmonospace{\ifdim\fontdimen3\font=
0pt
}
2540 % Markup style infrastructure. \defmarkupstylesetup\INITMACRO will
2541 % define and register \INITMACRO to be called on markup style changes.
2542 % \INITMACRO can check \currentmarkupstyle for the innermost
2543 % style and the set of \ifmarkupSTYLE switches for all styles
2544 % currently in effect.
2548 %\newif\ifmarkupfile % @file == @samp.
2549 %\newif\ifmarkupoption % @option == @samp.
2552 %\newif\ifmarkupenv % @env == @code.
2553 %\newif\ifmarkupcommand % @command == @code.
2554 \newif\ifmarkuptex % @tex (and part of @math, for now).
2555 \newif\ifmarkupexample
2557 \newif\ifmarkupverbatim
2559 \let\currentmarkupstyle\empty
2561 \def\setupmarkupstyle#1{%
2562 \csname markup
#1true
\endcsname
2563 \def\currentmarkupstyle{#1}%
2567 \let\markupstylesetup\empty
2569 \def\defmarkupstylesetup#1{%
2570 \expandafter\def\expandafter\markupstylesetup
2571 \expandafter{\markupstylesetup #1}%
2575 % Markup style setup for left and right quotes.
2576 \defmarkupstylesetup\markupsetuplq{%
2577 \expandafter\let\expandafter \temp
2578 \csname markupsetuplq
\currentmarkupstyle\endcsname
2579 \ifx\temp\relax \markupsetuplqdefault \else \temp \fi
2582 \defmarkupstylesetup\markupsetuprq{%
2583 \expandafter\let\expandafter \temp
2584 \csname markupsetuprq
\currentmarkupstyle\endcsname
2585 \ifx\temp\relax \markupsetuprqdefault \else \temp \fi
2592 \gdef\markupsetuplqdefault{\let`
\lq}
2593 \gdef\markupsetuprqdefault{\let'
\rq}
2595 \gdef\markupsetcodequoteleft{\let`
\codequoteleft}
2596 \gdef\markupsetcodequoteright{\let'
\codequoteright}
2599 \let\markupsetuplqcode \markupsetcodequoteleft
2600 \let\markupsetuprqcode \markupsetcodequoteright
2602 \let\markupsetuplqexample \markupsetcodequoteleft
2603 \let\markupsetuprqexample \markupsetcodequoteright
2605 \let\markupsetuplqkbd \markupsetcodequoteleft
2606 \let\markupsetuprqkbd \markupsetcodequoteright
2608 \let\markupsetuplqsamp \markupsetcodequoteleft
2609 \let\markupsetuprqsamp \markupsetcodequoteright
2611 \let\markupsetuplqverb \markupsetcodequoteleft
2612 \let\markupsetuprqverb \markupsetcodequoteright
2614 \let\markupsetuplqverbatim \markupsetcodequoteleft
2615 \let\markupsetuprqverbatim \markupsetcodequoteright
2617 % Allow an option to not use regular directed right quote/apostrophe
2618 % (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
2619 % The undirected quote is ugly, so don't make it the default, but it
2620 % works for pasting with more pdf viewers (at least evince), the
2621 % lilypond developers report. xpdf does work with the regular 0x27.
2623 \def\codequoteright{%
2624 \expandafter\ifx\csname SETtxicodequoteundirected
\endcsname\relax
2625 \expandafter\ifx\csname SETcodequoteundirected
\endcsname\relax
2631 % and a similar option for the left quote char vs. a grave accent.
2632 % Modern fonts display ASCII 0x60 as a grave accent, so some people like
2633 % the code environments to do likewise.
2635 \def\codequoteleft{%
2636 \expandafter\ifx\csname SETtxicodequotebacktick
\endcsname\relax
2637 \expandafter\ifx\csname SETcodequotebacktick
\endcsname\relax
2638 % [Knuth] pp. 380,381,391
2639 % \relax disables Spanish ligatures ?` and !` of \tt font.
2645 % Commands to set the quote options.
2647 \parseargdef\codequoteundirected{%
2650 \expandafter\let\csname SETtxicodequoteundirected
\endcsname
2652 \else\ifx\temp\offword
2653 \expandafter\let\csname SETtxicodequoteundirected
\endcsname
2656 \errhelp =
\EMsimple
2657 \errmessage{Unknown @codequoteundirected value `
\temp', must be on|off
}%
2661 \parseargdef\codequotebacktick{%
2664 \expandafter\let\csname SETtxicodequotebacktick
\endcsname
2666 \else\ifx\temp\offword
2667 \expandafter\let\csname SETtxicodequotebacktick
\endcsname
2670 \errhelp =
\EMsimple
2671 \errmessage{Unknown @codequotebacktick value `
\temp', must be on|off
}%
2675 % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
2676 \def\noligaturesquoteleft{\relax\lq}
2678 % Count depth in font-changes, for error checks
2679 \newcount\fontdepth \fontdepth=
0
2683 % #1 is the font command (\sl or \it), #2 is the text to slant.
2684 % If we are in a monospaced environment, however, 1) always use \ttsl,
2685 % and 2) do not add an italic correction.
2686 \def\dosmartslant#1#2{%
2688 {{\ttsl #2}\let\next=
\relax}%
2689 {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}%
2692 \def\smartslanted{\dosmartslant\sl}
2693 \def\smartitalic{\dosmartslant\it}
2695 % Output an italic correction unless \next (presumed to be the following
2696 % character) is such as not to need one.
2697 \def\smartitaliccorrection{%
2702 \else\ifx\next\comma%
2708 % Unconditional use \ttsl, and no ic. @var is set to this for defuns.
2709 \def\ttslanted#1{{\ttsl #1}}
2711 % @cite is like \smartslanted except unconditionally use \sl. We never want
2712 % ttsl for book titles, do we?
2713 \def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection}
2717 \let\saveaftersmartic =
\aftersmartic
2718 \def\aftersmartic{\null\let\aftersmartic=
\saveaftersmartic}%
2723 \let\slanted=
\smartslanted
2724 \let\dfn=
\smartslanted
2725 \let\emph=
\smartitalic
2727 % Explicit font changes: @r, @sc, undocumented @ii.
2728 \def\r#1{{\rm #1}} % roman font
2729 \def\sc#1{{\smallcaps#1}} % smallcaps font
2730 \def\ii#1{{\it #1}} % italic font
2732 % @b, explicit bold. Also @strong.
2736 % @sansserif, explicit sans.
2737 \def\sansserif#1{{\sf #1}}
2739 % We can't just use \exhyphenpenalty, because that only has effect at
2740 % the end of a paragraph. Restore normal hyphenation at the end of the
2741 % group within which \nohyphenation is presumably called.
2743 \def\nohyphenation{\hyphenchar\font = -
1 \aftergroup\restorehyphenation}
2744 \def\restorehyphenation{\hyphenchar\font = `-
}
2746 % Set sfcode to normal for the chars that usually have another value.
2747 % Can't use plain's \frenchspacing because it uses the `\x notation, and
2748 % sometimes \x has an active definition that messes things up.
2751 \def\plainfrenchspacing{%
2752 \sfcode`\.=\@m
\sfcode`\?=\@m
\sfcode`\!=\@m
2753 \sfcode`\:=\@m
\sfcode`\;=\@m
\sfcode`\,=\@m
2754 \def\endofsentencespacefactor{1000}% for @. and friends
2756 \def\plainnonfrenchspacing{%
2757 \sfcode`\
.3000\sfcode`\?
3000\sfcode`\!
3000
2758 \sfcode`\:
2000\sfcode`\;
1500\sfcode`\,
1250
2759 \def\endofsentencespacefactor{3000}% for @. and friends
2762 \def\endofsentencespacefactor{3000}% default
2764 % @t, explicit typewriter.
2766 {\tt \rawbackslash \plainfrenchspacing #1}%
2771 \def\samp#1{{\setupmarkupstyle{samp
}\lq\tclose{#1}\rq\null}}
2773 % @indicateurl is \samp, that is, with quotes.
2774 \let\indicateurl=
\samp
2776 % @code (and similar) prints in typewriter, but with spaces the same
2777 % size as normal in the surrounding text, without hyphenation, etc.
2778 % This is a subroutine for that.
2781 % Change normal interword space to be same as for the current font.
2782 \spaceskip =
\fontdimen2\font
2784 % Switch to typewriter.
2787 % But `\ ' produces the large typewriter interword space.
2788 \def\
{{\spaceskip =
0pt
{} }}%
2790 % Turn off hyphenation.
2797 \null % reset spacefactor to 1000
2800 % We *must* turn on hyphenation at `-' and `_' in @code.
2801 % (But see \codedashfinish below.)
2802 % Otherwise, it is too hard to avoid overfull hboxes
2803 % in the Emacs manual, the Library manual, etc.
2805 % Unfortunately, TeX uses one parameter (\hyphenchar) to control
2806 % both hyphenation at - and hyphenation within words.
2807 % We must therefore turn them both off (\tclose does that)
2808 % and arrange explicitly to hyphenate at a dash. -- rms.
2810 \catcode`\-=
\active \catcode`
\_=
\active
2811 \catcode`\'=
\active \catcode`\`=
\active
2812 \global\let'=
\rq \global\let`=
\lq % default definitions
2814 \global\def\code{\begingroup
2815 \setupmarkupstyle{code
}%
2816 % The following should really be moved into \setupmarkupstyle handlers.
2817 \catcode\dashChar=
\active \catcode\underChar=
\active
2825 % Given -foo (with a single dash), we do not want to allow a break
2827 \global\let\codedashprev=
\codedash
2832 \gdef\codedash{\futurelet\next\codedashfinish}
2833 \gdef\codedashfinish{%
2834 \normaldash % always output the dash character itself.
2836 % Now, output a discretionary to allow a line break, unless
2837 % (a) the next character is a -, or
2838 % (b) the preceding character is a -.
2839 % E.g., given --posix, we do not want to allow a break after either -.
2840 % Given --foo-bar, we do want to allow a break between the - and the b.
2841 \ifx\next\codedash \else
2842 \ifx\codedashprev\codedash
2843 \else \discretionary{}{}{}\fi
2845 % we need the space after the = for the case when \next itself is a
2846 % space token; it would get swallowed otherwise. As in @code{- a}.
2847 \global\let\codedashprev=
\next
2852 \def\codex #1{\tclose{#1}\endgroup}
2855 % this is all so @math{@code{var_name}+1} can work. In math mode, _
2856 % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
2857 % will therefore expand the active definition of _, which is us
2858 % (inside @code that is), therefore an endless loop.
2860 \mathchar"
075F
% class 0=ordinary, family 7=ttfam, pos 0x5F=_.
2861 \else\normalunderscore \fi
2862 \discretionary{}{}{}}%
2866 % An additional complication: the above will allow breaks after, e.g.,
2867 % each of the four underscores in __typeof__. This is bad.
2868 % @allowcodebreaks provides a document-level way to turn breaking at -
2871 \newif\ifallowcodebreaks \allowcodebreakstrue
2873 \def\keywordtrue{true
}
2874 \def\keywordfalse{false
}
2876 \parseargdef\allowcodebreaks{%
2878 \ifx\txiarg\keywordtrue
2879 \allowcodebreakstrue
2880 \else\ifx\txiarg\keywordfalse
2881 \allowcodebreaksfalse
2883 \errhelp =
\EMsimple
2884 \errmessage{Unknown @allowcodebreaks option `
\txiarg', must be true|false
}%
2888 % For @command, @env, @file, @option quotes seem unnecessary,
2889 % so use \code rather than \samp.
2895 % @uref (abbreviation for `urlref') aka @url takes an optional
2896 % (comma-separated) second argument specifying the text to display and
2897 % an optional third arg as text to display instead of (rather than in
2898 % addition to) the url itself. First (mandatory) arg is the url.
2900 % TeX-only option to allow changing PDF output to show only the second
2901 % arg (if given), and not the url (which is then just the link target).
2902 \newif\ifurefurlonlylink
2904 % The main macro is \urefbreak, which allows breaking at expected
2905 % places within the url. (There used to be another version, which
2906 % didn't support automatic breaking.)
2907 \def\urefbreak{\begingroup \urefcatcodes \dourefbreak}
2908 \let\uref=
\urefbreak
2910 \def\dourefbreak#1{\urefbreakfinish #1,,,
\finish}
2911 \def\urefbreakfinish#1,
#2,
#3,
#4\finish{% doesn't work in @example
2914 \setbox0 =
\hbox{\ignorespaces #3}%
2916 \unhbox0 % third arg given, show only that
2918 \setbox0 =
\hbox{\ignorespaces #2}% look for second arg
2921 % For pdfTeX and LuaTeX
2923 % PDF plus option to not display url, show just arg
2926 % PDF, normally display both arg and url for consistency,
2927 % visibility, if the pdf is eventually used to print, etc.
2928 \unhbox0\ (
\urefcode{#1})
%
2931 \ifx\XeTeXrevision\thisisundefined
2932 \unhbox0\ (
\urefcode{#1})
% DVI, always show arg and url
2936 % PDF plus option to not display url, show just arg
2939 % PDF, normally display both arg and url for consistency,
2940 % visibility, if the pdf is eventually used to print, etc.
2941 \unhbox0\ (
\urefcode{#1})
%
2946 \urefcode{#1}% only url given, so show it
2952 % Allow line breaks around only a few characters (only).
2954 \catcode`\&=
\active \catcode`\.=
\active
2955 \catcode`\#=
\active \catcode`\?=
\active
2961 \global\def\urefcode{\begingroup
2962 \setupmarkupstyle{code
}%
2972 % By default, they are just regular characters.
2973 \global\def&
{\normalamp}
2974 \global\def.
{\normaldot}
2975 \global\def#
{\normalhash}
2976 \global\def?
{\normalquest}
2977 \global\def/
{\normalslash}
2980 % we put a little stretch before and after the breakable chars, to help
2981 % line breaking of long url's. The unequal skips make look better in
2982 % cmtt at least, especially for dots.
2983 \def\urefprestretchamount{.13em
}
2984 \def\urefpoststretchamount{.1em
}
2985 \def\urefprestretch{\urefprebreak \hskip0pt plus
\urefprestretchamount\relax}
2986 \def\urefpoststretch{\urefpostbreak \hskip0pt plus
\urefprestretchamount\relax}
2988 \def\urefcodeamp{\urefprestretch \&
\urefpoststretch}
2989 \def\urefcodedot{\urefprestretch .
\urefpoststretch}
2990 \def\urefcodehash{\urefprestretch \#
\urefpoststretch}
2991 \def\urefcodequest{\urefprestretch ?
\urefpoststretch}
2992 \def\urefcodeslash{\futurelet\next\urefcodeslashfinish}
2995 \global\def\urefcodeslashfinish{%
2996 \urefprestretch \slashChar
2997 % Allow line break only after the final / in a sequence of
2998 % slashes, to avoid line break between the slashes in http://.
2999 \ifx\next/
\else \urefpoststretch \fi
3003 % One more complication: by default we'll break after the special
3004 % characters, but some people like to break before the special chars, so
3005 % allow that. Also allow no breaking at all, for manual control.
3007 \parseargdef\urefbreakstyle{%
3009 \ifx\txiarg\wordnone
3010 \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak}
3011 \else\ifx\txiarg\wordbefore
3012 \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak}
3013 \else\ifx\txiarg\wordafter
3014 \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak}
3016 \errhelp =
\EMsimple
3017 \errmessage{Unknown @urefbreakstyle setting `
\txiarg'
}%
3020 \def\wordafter{after
}
3021 \def\wordbefore{before
}
3024 \urefbreakstyle after
3026 % @url synonym for @uref, since that's how everyone uses it.
3030 % rms does not like angle brackets --karl, 17may97.
3031 % So now @email is just like @uref, unless we are pdf.
3033 %\def\email#1{\angleleft{\tt #1}\angleright}
3035 \def\email#1{\doemail#1,,
\finish}
3036 \def\doemail#1,
#2,
#3\finish{\begingroup
3039 \setbox0 =
\hbox{\ignorespaces #2}%
3040 \ifdim\wd0>
0pt
\unhbox0\else\code{#1}\fi
3044 \ifx\XeTeXrevision\thisisundefined
3047 \def\email#1{\doemail#1,,
\finish}
3048 \def\doemail#1,
#2,
#3\finish{\begingroup
3051 \setbox0 =
\hbox{\ignorespaces #2}%
3052 \ifdim\wd0>
0pt
\unhbox0\else\code{#1}\fi
3058 % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
3059 % `example' (@kbd uses ttsl only inside of @example and friends),
3060 % or `code' (@kbd uses normal tty font always).
3061 \parseargdef\kbdinputstyle{%
3063 \ifx\txiarg\worddistinct
3064 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
3065 \else\ifx\txiarg\wordexample
3066 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
3067 \else\ifx\txiarg\wordcode
3068 \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
3070 \errhelp =
\EMsimple
3071 \errmessage{Unknown @kbdinputstyle setting `
\txiarg'
}%
3074 \def\worddistinct{distinct
}
3075 \def\wordexample{example
}
3078 % Default is `distinct'.
3079 \kbdinputstyle distinct
3081 % @kbd is like @code, except that if the argument is just one @key command,
3082 % then @kbd has no effect.
3083 \def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??
\par}}
3086 \def\kbdsub#1#2#3\par{%
3087 \def\one{#1}\def\three{#3}\def\threex{??
}%
3088 \ifx\one\xkey\ifx\threex\three \key{#2}%
3089 \else{\tclose{\kbdfont\setupmarkupstyle{kbd
}\look}}\fi
3090 \else{\tclose{\kbdfont\setupmarkupstyle{kbd
}\look}}\fi
3093 % definition of @key that produces a lozenge. Doesn't adjust to text size.
3094 %\setfont\keyrm\rmshape{8}{1000}{OT1}
3096 %\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
3097 % \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
3098 % \vbox{\hrule\kern-0.4pt
3099 % \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
3100 % \kern-0.4pt\hrule}%
3101 % \kern-.06em\raise0.4pt\hbox{\angleright}}}}
3103 % definition of @key with no lozenge. If the current font is already
3104 % monospace, don't change it; that way, we respect @kbdinputstyle. But
3105 % if it isn't monospace, then use \tt.
3107 \def\key#1{{\setupmarkupstyle{key
}%
3109 \ifmonospace\else\tt\fi
3112 % @clicksequence{File @click{} Open ...}
3113 \def\clicksequence#1{\begingroup #1\endgroup}
3115 % @clickstyle @arrow (by default)
3116 \parseargdef\clickstyle{\def\click{#1}}
3119 % Typeset a dimension, e.g., `in' or `pt'. The only reason for the
3120 % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
3122 \def\dmn#1{\thinspace #1}
3124 % @acronym for "FBI", "NATO", and the like.
3125 % We print this one point size smaller, since it's intended for
3128 \def\acronym#1{\doacronym #1,,
\finish}
3129 \def\doacronym#1,
#2,
#3\finish{%
3130 {\selectfonts\lsize #1}%
3132 \ifx\temp\empty \else
3133 \space (
{\unsepspaces \ignorespaces \temp \unskip})
%
3135 \null % reset \spacefactor=1000
3138 % @abbr for "Comput. J." and the like.
3139 % No font change, but don't do end-of-sentence spacing.
3141 \def\abbr#1{\doabbr #1,,
\finish}
3142 \def\doabbr#1,
#2,
#3\finish{%
3143 {\plainfrenchspacing #1}%
3145 \ifx\temp\empty \else
3146 \space (
{\unsepspaces \ignorespaces \temp \unskip})
%
3148 \null % reset \spacefactor=1000
3151 % @asis just yields its argument. Used with @table, for example.
3155 % @math outputs its argument in math mode.
3157 % One complication: _ usually means subscripts, but it could also mean
3158 % an actual _ character, as in @math{@var{some_variable} + 1}. So make
3159 % _ active, and distinguish by seeing if the current family is \slfam,
3160 % which is what @var uses.
3162 \catcode`
\_ =
\active
3163 \gdef\mathunderscore{%
3165 \def_{\ifnum\fam=
\slfam \_\else\sb\fi}%
3168 % Another complication: we want \\ (and @\) to output a math (or tt) \.
3169 % FYI, plain.tex uses \\ as a temporary control sequence (for no
3170 % particular reason), but this is not advertised and we don't care.
3172 % The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
3173 \def\mathbackslash{\ifnum\fam=
\ttfam \mathchar"
075C
\else\backslash \fi}
3176 \ifmmode\else % only go into math if not in math mode already
3179 \let\\ =
\mathbackslash
3181 % make the texinfo accent commands work in math mode
3191 % have to provide another name for sup operator
3193 $
\expandafter\finishmath\fi
3195 \def\finishmath#1{#1$
\endgroup} % Close the group opened by \tex.
3197 % Some active characters (such as <) are spaced differently in math.
3198 % We have to reset their definitions in case the @math was an argument
3199 % to a command which sets the catcodes (such as @item or @section).
3202 \catcode`^ =
\active
3203 \catcode`< =
\active
3204 \catcode`> =
\active
3205 \catcode`+ =
\active
3206 \catcode`' =
\active
3212 \let' =
\ptexquoteright
3216 % for @sub and @sup, if in math mode, just do a normal sub/superscript.
3217 % If in text, use math to place as sub/superscript, but switch
3218 % into text mode, with smaller fonts. This is a different font than the
3219 % one used for real math sub/superscripts (8pt vs. 7pt), but let's not
3220 % fix it (significant additions to font machinery) until someone notices.
3222 \def\sub{\ifmmode \expandafter\sb \else \expandafter\finishsub\fi}
3223 \def\finishsub#1{$
\sb{\hbox{\selectfonts\lllsize #1}}$
}%
3225 \def\sup{\ifmmode \expandafter\ptexsp \else \expandafter\finishsup\fi}
3226 \def\finishsup#1{$
\ptexsp{\hbox{\selectfonts\lllsize #1}}$
}%
3228 % @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
3229 % Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
3230 % except specified as a normal braced arg, so no newlines to worry about.
3232 \def\outfmtnametex{tex
}
3234 \long\def\inlinefmt#1{\doinlinefmt #1,
\finish}
3235 \long\def\doinlinefmt#1,
#2,
\finish{%
3236 \def\inlinefmtname{#1}%
3237 \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi
3240 % @inlinefmtifelse{FMTNAME,THEN-TEXT,ELSE-TEXT} expands THEN-TEXT if
3241 % FMTNAME is tex, else ELSE-TEXT.
3242 \long\def\inlinefmtifelse#1{\doinlinefmtifelse #1,,,
\finish}
3243 \long\def\doinlinefmtifelse#1,
#2,
#3,
#4,
\finish{%
3244 \def\inlinefmtname{#1}%
3245 \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\else \ignorespaces #3\fi
3248 % For raw, must switch into @tex before parsing the argument, to avoid
3249 % setting catcodes prematurely. Doing it this way means that, for
3250 % example, @inlineraw{html, foo{bar} gets a parse error instead of being
3251 % ignored. But this isn't important because if people want a literal
3252 % *right* brace they would have to use a command anyway, so they may as
3253 % well use a command to get a left brace too. We could re-use the
3254 % delimiter character idea from \verb, but it seems like overkill.
3256 \long\def\inlineraw{\tex \doinlineraw}
3257 \long\def\doinlineraw#1{\doinlinerawtwo #1,
\finish}
3258 \def\doinlinerawtwo#1,
#2,
\finish{%
3259 \def\inlinerawname{#1}%
3260 \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi
3261 \endgroup % close group opened by \tex.
3264 % @inlineifset{VAR, TEXT} expands TEXT if VAR is @set.
3266 \long\def\inlineifset#1{\doinlineifset #1,
\finish}
3267 \long\def\doinlineifset#1,
#2,
\finish{%
3268 \def\inlinevarname{#1}%
3269 \expandafter\ifx\csname SET
\inlinevarname\endcsname\relax
3270 \else\ignorespaces#2\fi
3273 % @inlineifclear{VAR, TEXT} expands TEXT if VAR is not @set.
3275 \long\def\inlineifclear#1{\doinlineifclear #1,
\finish}
3276 \long\def\doinlineifclear#1,
#2,
\finish{%
3277 \def\inlinevarname{#1}%
3278 \expandafter\ifx\csname SET
\inlinevarname\endcsname\relax \ignorespaces#2\fi
3285 % @@ prints an @, as does @atchar{}.
3289 % @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
3290 % Unless we're in typewriter, use \ecfont because the CM text fonts do
3291 % not have braces, and we don't want to switch into math.
3292 \def\mylbrace{{\ifmonospace\char123\else\ensuremath\lbrace\fi}}
3293 \def\myrbrace{{\ifmonospace\char125\else\ensuremath\rbrace\fi}}
3294 \let\
{=
\mylbrace \let\lbracechar=\
{
3295 \let\
}=
\myrbrace \let\rbracechar=\
}
3297 % Definitions to produce \{ and \} commands for indices,
3298 % and @{ and @} for the aux/toc files.
3299 \catcode`\
{ =
\other \catcode`\
} =
\other
3300 \catcode`\
[ =
1 \catcode`\
] =
2
3301 \catcode`\! =
0 \catcode`\\ =
\other
3302 !gdef!lbracecmd
[\
{]%
3303 !gdef!rbracecmd
[\
}]%
3304 !gdef!lbraceatcmd
[@
{]%
3305 !gdef!rbraceatcmd
[@
}]%
3308 % @comma{} to avoid , parsing problems.
3311 % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
3312 % Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
3314 \let\dotaccent =
\ptexdot
3315 \def\ringaccent#1{{\accent23 #1}}
3316 \let\tieaccent =
\ptext
3317 \let\ubaraccent =
\ptexb
3318 \let\udotaccent =
\d
3320 % Other special characters: @questiondown @exclamdown @ordf @ordm
3321 % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
3322 \def\questiondown{?`
}
3324 \def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a
}}}
3325 \def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o
}}}
3327 % Dotless i and dotless j, used for accents.
3332 \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
3333 \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
3334 \else \errmessage{@dotless can be used only with i or j
}%
3338 % The \TeX{} logo, as in plain, but resetting the spacing so that a
3339 % period following counts as ending a sentence. (Idea found in latex.)
3341 \edef\TeX{\TeX \spacefactor=
1000 }
3343 % @LaTeX{} logo. Not quite the same results as the definition in
3344 % latex.ltx, since we use a different font for the raised A; it's most
3345 % convenient for us to use an explicitly smaller font, rather than using
3346 % the \scriptstyle font (since we don't reset \scriptstyle and
3347 % \scriptscriptstyle).
3352 \vbox to
\ht0{\hbox{%
3353 \ifx\textnominalsize\xwordpt
3354 % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX.
3355 % Revert to plain's \scriptsize, which is 7pt.
3356 \count255=
\the\fam $
\fam\count255 \scriptstyle A$
%
3358 % For 11pt, we can use our lllsize.
3359 \selectfonts\lllsize A
%
3368 % Some math mode symbols. Define \ensuremath to switch into math mode
3369 % unless we are already there. Expansion tricks may not be needed here,
3370 % but safer, and can't hurt.
3371 \def\ensuremath{\ifmmode \expandafter\asis \else\expandafter\ensuredmath \fi}
3372 \def\ensuredmath#1{$
\relax#1$
}
3374 \def\bullet{\ensuremath\ptexbullet}
3375 \def\geq{\ensuremath\ge}
3376 \def\leq{\ensuremath\le}
3377 \def\minus{\ensuremath-
}
3379 % @dots{} outputs an ellipsis using the current font.
3380 % We do .5em per period so that it has the same spacing in the cm
3381 % typewriter fonts as three actual period characters; on the other hand,
3382 % in other typewriter fonts three periods are wider than 1.5em. So do
3383 % whichever is larger.
3387 \setbox0=
\hbox{...
}% get width of three periods
3394 \hskip 0pt plus
.25fil
3395 .
\hskip 0pt plus1fil
3396 .
\hskip 0pt plus1fil
3397 .
\hskip 0pt plus
.5fil
3401 % @enddots{} is an end-of-sentence ellipsis.
3405 \spacefactor=
\endofsentencespacefactor
3408 % @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
3410 % Since these characters are used in examples, they should be an even number of
3411 % \tt widths. Each \tt character is 1en, so two makes it 1em.
3414 \def\arrow{\leavevmode\raise.05ex
\hbox to
1em
{\hfil$
\rightarrow$
\hfil}}
3415 \def\result{\leavevmode\raise.05ex
\hbox to
1em
{\hfil$
\Rightarrow$
\hfil}}
3416 \def\expansion{\leavevmode\hbox to
1em
{\hfil$
\mapsto$
\hfil}}
3417 \def\print{\leavevmode\lower.1ex
\hbox to
1em
{\hfil$
\dashv$
\hfil}}
3418 \def\equiv{\leavevmode\hbox to
1em
{\hfil$
\ptexequiv$
\hfil}}
3420 % The @error{} command.
3421 % Adapted from the TeXbook's \boxit.
3425 {\tentt \global\dimen0 =
3em
}% Width of the box.
3426 \dimen2 =
.55pt
% Thickness of rules
3427 % The text. (`r' is open on the right, `e' somewhat less so on the left.)
3428 \setbox0 =
\hbox{\kern-
.75pt
\reducedsf \putworderror\kern-
1.5pt
}
3430 \setbox\errorbox=
\hbox to
\dimen0{\hfil
3431 \hsize =
\dimen0 \advance\hsize by -
5.8pt
% Space to left+right.
3432 \advance\hsize by -
2\dimen2 % Rules.
3434 \hrule height
\dimen2
3435 \hbox{\vrule width
\dimen2 \kern3pt % Space to left of text.
3436 \vtop{\kern2.4pt
\box0 \kern2.4pt
}% Space above/below.
3437 \kern3pt\vrule width
\dimen2}% Space to right.
3438 \hrule height
\dimen2}
3441 \def\error{\leavevmode\lower.7ex
\copy\errorbox}
3443 % @pounds{} is a sterling sign, which Knuth put in the CM italic font.
3445 \def\pounds{{\it\$
}}
3447 % @euro{} comes from a separate font, depending on the current style.
3448 % We use the free feym* fonts from the eurosym package by Henrik
3449 % Theiling, which support regular, slanted, bold and bold slanted (and
3450 % "outlined" (blackboard board, sort of) versions, which we don't need).
3451 % It is available from http://www.ctan.org/tex-archive/fonts/eurosym.
3453 % Although only regular is the truly official Euro symbol, we ignore
3454 % that. The Euro is designed to be slightly taller than the regular
3460 % feybo - bold slanted
3462 % There is no good (free) typewriter version, to my knowledge.
3463 % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide.
3466 % Also doesn't work in math. Do we need to do math with euro symbols?
3470 \def\euro{{\eurofont e
}}
3472 % We set the font at each command, rather than predefining it in
3473 % \textfonts and the other font-switching commands, so that
3474 % installations which never need the symbol don't have to have the
3477 % There is only one designed size (nominal 10pt), so we always scale
3478 % that to the current nominal size.
3480 % By the way, simply using "at 1em" works for cmr10 and the like, but
3481 % does not work for cmbx10 and other extended/shrunken fonts.
3483 \def\eurosize{\csname\curfontsize nominalsize
\endcsname}%
3485 \ifx\curfontstyle\bfstylename
3487 \font\thiseurofont =
\ifusingit{feybo10
}{feybr10
} at
\eurosize
3490 \font\thiseurofont =
\ifusingit{feymo10
}{feymr10
} at
\eurosize
3495 % Glyphs from the EC fonts. We don't use \let for the aliases, because
3496 % sometimes we redefine the original macro, and the alias should reflect
3499 % Use LaTeX names for the Icelandic letters.
3500 \def\DH{{\ecfont \char"D0
}} % Eth
3501 \def\dh{{\ecfont \char"F0
}} % eth
3502 \def\TH{{\ecfont \char"DE
}} % Thorn
3503 \def\th{{\ecfont \char"FE
}} % thorn
3505 \def\guillemetleft{{\ecfont \char"
13}}
3506 \def\guillemotleft{\guillemetleft}
3507 \def\guillemetright{{\ecfont \char"
14}}
3508 \def\guillemotright{\guillemetright}
3509 \def\guilsinglleft{{\ecfont \char"
0E
}}
3510 \def\guilsinglright{{\ecfont \char"
0F
}}
3511 \def\quotedblbase{{\ecfont \char"
12}}
3512 \def\quotesinglbase{{\ecfont \char"
0D
}}
3514 % This positioning is not perfect (see the ogonek LaTeX package), but
3515 % we have the precomposed glyphs for the most common cases. We put the
3516 % tests to use those glyphs in the single \ogonek macro so we have fewer
3517 % dummy definitions to worry about for index entries, etc.
3519 % ogonek is also used with other letters in Lithuanian (IOU), but using
3520 % the precomposed glyphs for those is not so easy since they aren't in
3524 \ifx\temp\macrocharA\Aogonek
3525 \else\ifx\temp\macrochara\aogonek
3526 \else\ifx\temp\macrocharE\Eogonek
3527 \else\ifx\temp\macrochare\eogonek
3529 \ecfont \setbox0=
\hbox{#1}%
3530 \ifdim\ht0=
1ex
\accent"
0C
#1%
3531 \else\ooalign{\unhbox0\crcr\hidewidth\char"
0C
\hidewidth}%
3536 \def\Aogonek{{\ecfont \char"
81}}\def\macrocharA{A
}
3537 \def\aogonek{{\ecfont \char"A1
}}\def\macrochara{a
}
3538 \def\Eogonek{{\ecfont \char"
86}}\def\macrocharE{E
}
3539 \def\eogonek{{\ecfont \char"A6
}}\def\macrochare{e
}
3541 % Use the European Computer Modern fonts (cm-super in outline format)
3542 % for non-CM glyphs. That is ec* for regular text and tc* for the text
3543 % companion symbols (LaTeX TS1 encoding). Both are part of the ec
3544 % package and follow the same conventions.
3546 \def\ecfont{\etcfont{e
}}
3547 \def\tcfont{\etcfont{t
}}
3550 % We can't distinguish serif/sans and italic/slanted, but this
3551 % is used for crude hacks anyway (like adding French and German
3552 % quotes to documents typeset with CM, where we lose kerning), so
3553 % hopefully nobody will notice/care.
3554 \edef\ecsize{\csname\curfontsize ecsize
\endcsname}%
3555 \edef\nominalsize{\csname\curfontsize nominalsize
\endcsname}%
3558 \font\thisecfont =
#1ctt
\ecsize \space at
\nominalsize
3560 \ifx\curfontstyle\bfstylename
3562 \font\thisecfont =
#1cb
\ifusingit{i
}{x
}\ecsize \space at
\nominalsize
3565 \font\thisecfont =
#1c
\ifusingit{ti
}{rm
}\ecsize \space at
\nominalsize
3571 % @registeredsymbol - R in a circle. The font for the R should really
3572 % be smaller yet, but lllsize is the best we can do for now.
3573 % Adapted from the plain.tex definition of \copyright.
3575 \def\registeredsymbol{%
3576 $^
{{\ooalign{\hfil\raise.07ex
\hbox{\selectfonts\lllsize R
}%
3581 % @textdegree - the normal degrees sign.
3583 \def\textdegree{$^
\circ$
}
3585 % Laurent Siebenmann reports \Orb undefined with:
3586 % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38
3587 % so we'll define it if necessary.
3589 \ifx\Orb\thisisundefined
3590 \def\Orb{\mathhexbox20D}
3594 \chardef\quotedblleft="
5C
3595 \chardef\quotedblright=`\"
3596 \chardef\quoteleft=`\`
3597 \chardef\quoteright=`\'
3600 \message{page headings,
}
3602 \newskip\titlepagetopglue \titlepagetopglue =
1.5in
3603 \newskip\titlepagebottomglue \titlepagebottomglue =
2pc
3605 % First the title page. Must do @settitle before @titlepage.
3607 \newif\iffinishedtitlepage
3609 % @setcontentsaftertitlepage used to do an implicit @contents or
3610 % @shortcontents after @end titlepage, but it is now obsolete.
3611 \def\setcontentsaftertitlepage{%
3612 \errmessage{@setcontentsaftertitlepage has been removed as a Texinfo
3613 command; move your @contents command if you want the contents
3614 after the title page.
}}%
3615 \def\setshortcontentsaftertitlepage{%
3616 \errmessage{@setshortcontentsaftertitlepage has been removed as a Texinfo
3617 command; move your @shortcontents and @contents commands if you
3618 want the contents after the title page.
}}%
3620 \parseargdef\shorttitlepage{%
3621 \begingroup \hbox{}\vskip 1.5in
\chaprm \centerline{#1}%
3622 \endgroup\page\hbox{}\page}
3625 % Open one extra group, as we want to close it in the middle of \Etitlepage.
3627 \parindent=
0pt
\textfonts
3628 % Leave some space at the very top of the page.
3629 \vglue\titlepagetopglue
3630 % No rule at page bottom unless we print one at the top with @title.
3631 \finishedtitlepagetrue
3633 % Most title ``pages'' are actually two pages long, with space
3634 % at the top of the second. We don't want the ragged left on the second.
3635 \let\oldpage =
\page
3637 \iffinishedtitlepage\else
3640 \let\page =
\oldpage
3647 \iffinishedtitlepage\else
3650 % It is important to do the page break before ending the group,
3651 % because the headline and footline are only empty inside the group.
3652 % If we use the new definition of \page, we always get a blank page
3653 % after the title page, which we certainly don't want.
3657 % Need this before the \...aftertitlepage checks so that if they are
3658 % in effect the toc pages will come out with page numbers.
3662 \def\finishtitlepage{%
3663 \vskip4pt \hrule height
2pt width
\hsize
3664 \vskip\titlepagebottomglue
3665 \finishedtitlepagetrue
3668 % Settings used for typesetting titles: no hyphenation, no indentation,
3669 % don't worry much about spacing, ragged right. This should be used
3670 % inside a \vbox, and fonts need to be set appropriately first. Because
3671 % it is always used for titles, nothing else, we call \rmisbold. \par
3672 % should be specified before the end of the \vbox, since a vbox is a group.
3674 \def\raggedtitlesettings{%
3676 \hyphenpenalty=
10000
3682 % Macros to be used within @titlepage:
3684 \let\subtitlerm=
\tenrm
3685 \def\subtitlefont{\subtitlerm \normalbaselineskip =
13pt
\normalbaselines}
3687 \parseargdef\title{%
3689 \vbox{\titlefonts \raggedtitlesettings #1\par}%
3690 % print a rule at the page bottom also.
3691 \finishedtitlepagefalse
3692 \vskip4pt \hrule height
4pt width
\hsize \vskip4pt
3695 \parseargdef\subtitle{%
3697 {\subtitlefont \rightline{#1}}%
3700 % @author should come last, but may come many times.
3701 % It can also be used inside @quotation.
3703 \parseargdef\author{%
3704 \def\temp{\quotation}%
3706 \def\quotationauthor{#1}% printed in \Equotation.
3709 \ifseenauthor\else \vskip 0pt plus
1filll
\seenauthortrue \fi
3710 {\secfonts\rmisbold \leftline{#1}}%
3715 % Set up page headings and footings.
3717 \let\thispage=
\folio
3719 \newtoks\evenheadline % headline on even pages
3720 \newtoks\oddheadline % headline on odd pages
3721 \newtoks\evenfootline % footline on even pages
3722 \newtoks\oddfootline % footline on odd pages
3724 % Now make \makeheadline and \makefootline in Plain TeX use those variables
3725 \headline=
{{\textfonts\rm \ifodd\pageno \the\oddheadline
3726 \else \the\evenheadline \fi}}
3727 \footline=
{{\textfonts\rm \ifodd\pageno \the\oddfootline
3728 \else \the\evenfootline \fi}\HEADINGShook}
3729 \let\HEADINGShook=
\relax
3731 % Commands to set those variables.
3732 % For example, this is what @headings on does
3733 % @evenheading @thistitle|@thispage|@thischapter
3734 % @oddheading @thischapter|@thispage|@thistitle
3735 % @evenfooting @thisfile||
3736 % @oddfooting ||@thisfile
3739 \def\evenheading{\parsearg\evenheadingxxx}
3740 \def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|
\finish}
3741 \def\evenheadingyyy #1\|
#2\|
#3\|
#4\finish{%
3742 \global\evenheadline=
{\rlap{\centerline{#2}}\line{#1\hfil#3}}}
3744 \def\oddheading{\parsearg\oddheadingxxx}
3745 \def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|
\finish}
3746 \def\oddheadingyyy #1\|
#2\|
#3\|
#4\finish{%
3747 \global\oddheadline=
{\rlap{\centerline{#2}}\line{#1\hfil#3}}}
3749 \parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}%
3751 \def\evenfooting{\parsearg\evenfootingxxx}
3752 \def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|
\finish}
3753 \def\evenfootingyyy #1\|
#2\|
#3\|
#4\finish{%
3754 \global\evenfootline=
{\rlap{\centerline{#2}}\line{#1\hfil#3}}}
3756 \def\oddfooting{\parsearg\oddfootingxxx}
3757 \def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|
\finish}
3758 \def\oddfootingyyy #1\|
#2\|
#3\|
#4\finish{%
3759 \global\oddfootline =
{\rlap{\centerline{#2}}\line{#1\hfil#3}}%
3761 % Leave some space for the footline. Hopefully ok to assume
3762 % @evenfooting will not be used by itself.
3763 \global\advance\txipageheight by -
12pt
3764 \global\advance\vsize by -
12pt
3767 \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}}
3769 % @evenheadingmarks top \thischapter <- chapter at the top of a page
3770 % @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page
3772 % The same set of arguments for:
3777 % @everyheadingmarks
3778 % @everyfootingmarks
3780 % These define \getoddheadingmarks, \getevenheadingmarks,
3781 % \getoddfootingmarks, and \getevenfootingmarks, each to one of
3782 % \gettopheadingmarks, \getbottomheadingmarks.
3784 \def\evenheadingmarks{\headingmarks{even
}{heading
}}
3785 \def\oddheadingmarks{\headingmarks{odd
}{heading
}}
3786 \def\evenfootingmarks{\headingmarks{even
}{footing
}}
3787 \def\oddfootingmarks{\headingmarks{odd
}{footing
}}
3788 \parseargdef\everyheadingmarks{\headingmarks{even
}{heading
}{#1}
3789 \headingmarks{odd
}{heading
}{#1} }
3790 \parseargdef\everyfootingmarks{\headingmarks{even
}{footing
}{#1}
3791 \headingmarks{odd
}{footing
}{#1} }
3792 % #1 = even/odd, #2 = heading/footing, #3 = top/bottom.
3793 \def\headingmarks#1#2#3 {%
3794 \expandafter\let\expandafter\temp \csname get
#3headingmarks
\endcsname
3795 \global\expandafter\let\csname get
#1#2marks
\endcsname \temp
3798 \everyheadingmarks bottom
3799 \everyfootingmarks bottom
3801 % @headings double turns headings on for double-sided printing.
3802 % @headings single turns headings on for single-sided printing.
3803 % @headings off turns them off.
3804 % @headings on same as @headings double, retained for compatibility.
3805 % @headings after turns on double-sided headings after this page.
3806 % @headings doubleafter turns on double-sided headings after this page.
3807 % @headings singleafter turns on single-sided headings after this page.
3808 % By default, they are off at the start of a document,
3809 % and turned `on' after @end titlepage.
3811 \parseargdef\headings{\csname HEADINGS
#1\endcsname}
3813 \def\headingsoff{% non-global headings elimination
3814 \evenheadline=
{\hfil}\evenfootline=
{\hfil}%
3815 \oddheadline=
{\hfil}\oddfootline=
{\hfil}%
3818 \def\HEADINGSoff{{\globaldefs=
1 \headingsoff}} % global setting
3819 \HEADINGSoff % it's the default
3821 % When we turn headings on, set the page number to 1.
3822 % For double-sided printing, put current file name in lower left corner,
3823 % chapter name on inside top of right hand pages, document
3824 % title on inside top of left hand pages, and page numbers on outside top
3825 % edge of all pages.
3826 \def\HEADINGSdouble{%
3828 \global\evenfootline=
{\hfil}
3829 \global\oddfootline=
{\hfil}
3830 \global\evenheadline=
{\line{\folio\hfil\thistitle}}
3831 \global\oddheadline=
{\line{\thischapterheading\hfil\folio}}
3832 \global\let\contentsalignmacro =
\chapoddpage
3834 \let\contentsalignmacro =
\chappager
3836 % For single-sided printing, chapter title goes across top left of page,
3837 % page number on top right.
3838 \def\HEADINGSsingle{%
3840 \global\evenfootline=
{\hfil}
3841 \global\oddfootline=
{\hfil}
3842 \global\evenheadline=
{\line{\thischapterheading\hfil\folio}}
3843 \global\oddheadline=
{\line{\thischapterheading\hfil\folio}}
3844 \global\let\contentsalignmacro =
\chappager
3846 \def\HEADINGSon{\HEADINGSdouble}
3848 \def\HEADINGSafter{\let\HEADINGShook=
\HEADINGSdoublex}
3849 \let\HEADINGSdoubleafter=
\HEADINGSafter
3850 \def\HEADINGSdoublex{%
3851 \global\evenfootline=
{\hfil}
3852 \global\oddfootline=
{\hfil}
3853 \global\evenheadline=
{\line{\folio\hfil\thistitle}}
3854 \global\oddheadline=
{\line{\thischapterheading\hfil\folio}}
3855 \global\let\contentsalignmacro =
\chapoddpage
3858 \def\HEADINGSsingleafter{\let\HEADINGShook=
\HEADINGSsinglex}
3859 \def\HEADINGSsinglex{%
3860 \global\evenfootline=
{\hfil}
3861 \global\oddfootline=
{\hfil}
3862 \global\evenheadline=
{\line{\thischapterheading\hfil\folio}}
3863 \global\oddheadline=
{\line{\thischapterheading\hfil\folio}}
3864 \global\let\contentsalignmacro =
\chappager
3867 % Subroutines used in generating headings
3868 % This produces Day Month Year style of output.
3869 % Only define if not already defined, in case a txi-??.tex file has set
3870 % up a different format (e.g., txi-cs.tex does this).
3871 \ifx\today\thisisundefined
3875 \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr
3876 \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug
3877 \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec
3882 % @settitle line... specifies the title of the document, for headings.
3883 % It generates no output of its own.
3884 \def\thistitle{\putwordNoTitle}
3885 \def\settitle{\parsearg{\gdef\thistitle}}
3889 % Tables -- @table, @ftable, @vtable, @item(x).
3891 % default indentation of table text
3892 \newdimen\tableindent \tableindent=
.8in
3893 % default indentation of @itemize and @enumerate text
3894 \newdimen\itemindent \itemindent=
.3in
3895 % margin between end of table item and start of table text.
3896 \newdimen\itemmargin \itemmargin=
.1in
3898 % used internally for \itemindent minus \itemmargin
3901 % Note @table, @ftable, and @vtable define @item, @itemx, etc., with
3903 % They also define \itemindex
3904 % to index the item name in whatever manner is desired (perhaps none).
3906 \newif\ifitemxneedsnegativevskip
3908 \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-
\parskip\nobreak\fi}
3910 \def\internalBitem{\smallbreak \parsearg\itemzzz}
3911 \def\internalBitemx{\itemxpar \parsearg\itemzzz}
3913 \def\itemzzz #1{\begingroup %
3914 \advance\hsize by -
\rightskip
3915 \advance\hsize by -
\tableindent
3916 \setbox0=
\hbox{\itemindicate{#1}}%
3918 \nobreak % This prevents a break before @itemx.
3920 % If the item text does not fit in the space we have, put it on a line
3921 % by itself, and do not allow a page break either before or after that
3922 % line. We do not start a paragraph here because then if the next
3923 % command is, e.g., @kindex, the whatsit would get put into the
3924 % horizontal list on a line by itself, resulting in extra blank space.
3925 \ifdim \wd0>
\itemmax
3927 % Make this a paragraph so we get the \parskip glue and wrapping,
3928 % but leave it ragged-right.
3930 \advance\leftskip by-
\tableindent
3931 \advance\hsize by
\tableindent
3932 \advance\rightskip by0pt plus1fil
\relax
3933 \leavevmode\unhbox0\par
3936 % We're going to be starting a paragraph, but we don't want the
3937 % \parskip glue -- logically it's part of the @item we just started.
3938 \nobreak \vskip-
\parskip
3940 % Stop a page break at the \parskip glue coming up. However, if
3941 % what follows is an environment such as @example, there will be no
3942 % \parskip glue; then the negative vskip we just inserted would
3943 % cause the example and the item to crash together. So we use this
3944 % bizarre value of 10001 as a signal to \aboveenvbreak to insert
3945 % \parskip glue after all. Section titles are handled this way also.
3949 \itemxneedsnegativevskipfalse
3951 % The item text fits into the space. Start a paragraph, so that the
3952 % following text (if any) will end up on the same line.
3954 % Do this with kerns and \unhbox so that if there is a footnote in
3955 % the item text, it can migrate to the main vertical list and
3956 % eventually be printed.
3957 \nobreak\kern-
\tableindent
3958 \dimen0 =
\itemmax \advance\dimen0 by
\itemmargin \advance\dimen0 by -
\wd0
3960 \nobreak\kern\dimen0
3962 \itemxneedsnegativevskiptrue
3966 \def\item{\errmessage{@item while not in a list environment
}}
3967 \def\itemx{\errmessage{@itemx while not in a list environment
}}
3969 % @table, @ftable, @vtable.
3971 \let\itemindex\gobble
3975 \def\itemindex #
#1{\doind {fn
}{\code{#
#1}}}%
3976 \tablecheck{ftable
}%
3979 \def\itemindex #
#1{\doind {vr
}{\code{#
#1}}}%
3980 \tablecheck{vtable
}%
3983 \ifnum \the\catcode`\^^M=
\active
3985 \errmessage{This command won't work in this context; perhaps the problem is
3986 that we are
\inenvironment\thisenv}%
3987 \def\next{\doignore{#1}}%
3994 \def\itemindicate{#1}%
3999 \makevalueexpandable
4000 \edef\temp{\noexpand\tablez #1\space\space\space}%
4004 \def\tablez #1 #2 #3 #4\endtablez{%
4006 \ifnum 0#1>
0 \advance \leftskip by
#1\mil \fi
4007 \ifnum 0#2>
0 \tableindent=
#2\mil \fi
4008 \ifnum 0#3>
0 \advance \rightskip by
#3\mil \fi
4009 \itemmax=
\tableindent
4010 \advance \itemmax by -
\itemmargin
4011 \advance \leftskip by
\tableindent
4012 \exdentamount=
\tableindent
4014 \parskip =
\smallskipamount
4015 \ifdim \parskip=
0pt
\parskip=
2pt
\fi
4016 \let\item =
\internalBitem
4017 \let\itemx =
\internalBitemx
4019 \def\Etable{\endgraf\afterenvbreak}
4022 \let\Eitemize\Etable
4023 \let\Eenumerate\Etable
4025 % This is the counter used by @enumerate, which is really @itemize
4029 \envdef\itemize{\parsearg\doitemize}
4033 \itemmax=
\itemindent
4034 \advance\itemmax by -
\itemmargin
4035 \advance\leftskip by
\itemindent
4036 \exdentamount=
\itemindent
4038 \parskip=
\smallskipamount
4039 \ifdim\parskip=
0pt
\parskip=
2pt
\fi
4041 % Try typesetting the item mark so that if the document erroneously says
4042 % something like @itemize @samp (intending @table), there's an error
4043 % right away at the @itemize. It's not the best error message in the
4044 % world, but it's better than leaving it to the @item. This means if
4045 % the user wants an empty mark, they have to say @w{} not just @w.
4046 \def\itemcontents{#1}%
4047 \setbox0 =
\hbox{\itemcontents}%
4049 % @itemize with no arg is equivalent to @itemize @bullet.
4050 \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi
4052 \let\item=
\itemizeitem
4055 % Definition of @item while inside @itemize and @enumerate.
4058 \advance\itemno by
1 % for enumerations
4059 {\let\par=
\endgraf \smallbreak}% reasonable place to break
4061 % If the document has an @itemize directly after a section title, a
4062 % \nobreak will be last on the list, and \sectionheading will have
4063 % done a \vskip-\parskip. In that case, we don't want to zero
4064 % parskip, or the item text will crash with the heading. On the
4065 % other hand, when there is normal text preceding the item (as there
4066 % usually is), we do want to zero parskip, or there would be too much
4067 % space. In that case, we won't have a \nobreak before. At least
4068 % that's the theory.
4069 \ifnum\lastpenalty<
10000 \parskip=
0in
\fi
4071 \hbox to
0pt
{\hss \itemcontents \kern\itemmargin}%
4074 \vadjust{\penalty 1200}% not good to break after first line of item.
4076 % We can be in inner vertical mode in a footnote, although an
4077 % @itemize looks awful there.
4082 % \splitoff TOKENS\endmark defines \first to be the first token in
4083 % TOKENS, and \rest to be the remainder.
4085 \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}%
4087 % Allow an optional argument of an uppercase letter, lowercase letter,
4088 % or number, to specify the first label in the enumerated list. No
4089 % argument is the same as `1'.
4091 \envparseargdef\enumerate{\enumeratey #1 \endenumeratey}
4092 \def\enumeratey #1 #2\endenumeratey{%
4093 % If we were given no argument, pretend we were given `1'.
4095 \ifx\thearg\empty \def\thearg{1}\fi
4097 % Detect if the argument is a single token. If so, it might be a
4098 % letter. Otherwise, the only valid thing it can be is a number.
4099 % (We will always have one token, because of the test we just made.
4100 % This is a good thing, since \splitoff doesn't work given nothing at
4101 % all -- the first parameter is undelimited.)
4102 \expandafter\splitoff\thearg\endmark
4104 % Only one token in the argument. It could still be anything.
4105 % A ``lowercase letter'' is one whose \lccode is nonzero.
4106 % An ``uppercase letter'' is one whose \lccode is both nonzero, and
4107 % not equal to itself.
4108 % Otherwise, we assume it's a number.
4110 % We need the \relax at the end of the \ifnum lines to stop TeX from
4111 % continuing to look for a <number>.
4113 \ifnum\lccode\expandafter`
\thearg=
0\relax
4114 \numericenumerate % a number (we hope)
4117 \ifnum\lccode\expandafter`
\thearg=
\expandafter`
\thearg\relax
4118 \lowercaseenumerate % lowercase letter
4120 \uppercaseenumerate % uppercase letter
4124 % Multiple tokens in the argument. We hope it's a number.
4129 % An @enumerate whose labels are integers. The starting integer is
4132 \def\numericenumerate{%
4134 \startenumeration{\the\itemno}%
4137 % The starting (lowercase) letter is in \thearg.
4138 \def\lowercaseenumerate{%
4139 \itemno =
\expandafter`
\thearg
4141 % Be sure we're not beyond the end of the alphabet.
4143 \errmessage{No more lowercase letters in @enumerate; get a bigger
4150 % The starting (uppercase) letter is in \thearg.
4151 \def\uppercaseenumerate{%
4152 \itemno =
\expandafter`
\thearg
4154 % Be sure we're not beyond the end of the alphabet.
4156 \errmessage{No more uppercase letters in @enumerate; get a bigger
4163 % Call \doitemize, adding a period to the first argument and supplying the
4164 % common last two arguments. Also subtract one from the initial value in
4165 % \itemno, since @item increments \itemno.
4167 \def\startenumeration#1{%
4168 \advance\itemno by -
1
4169 \doitemize{#1.
}\flushcr
4172 % @alphaenumerate and @capsenumerate are abbreviations for giving an arg
4175 \def\alphaenumerate{\enumerate{a
}}
4176 \def\capsenumerate{\enumerate{A
}}
4177 \def\Ealphaenumerate{\Eenumerate}
4178 \def\Ecapsenumerate{\Eenumerate}
4181 % @multitable macros
4182 % Amy Hendrickson, 8/18/94, 3/6/96
4184 % @multitable ... @end multitable will make as many columns as desired.
4185 % Contents of each column will wrap at width given in preamble. Width
4186 % can be specified either with sample text given in a template line,
4187 % or in percent of \hsize, the current width of text on page.
4189 % Table can continue over pages but will only break between lines.
4193 % Either define widths of columns in terms of percent of \hsize:
4194 % @multitable @columnfractions .25 .3 .45
4197 % Numbers following @columnfractions are the percent of the total
4198 % current hsize to be used for each column. You may use as many
4199 % columns as desired.
4202 % Or use a template:
4203 % @multitable {Column 1 template} {Column 2 template} {Column 3 template}
4205 % using the widest term desired in each column.
4207 % Each new table line starts with @item, each subsequent new column
4208 % starts with @tab. Empty columns may be produced by supplying @tab's
4209 % with nothing between them for as many times as empty columns are needed,
4210 % ie, @tab@tab@tab will produce two empty columns.
4212 % @item, @tab do not need to be on their own lines, but it will not hurt
4215 % Sample multitable:
4217 % @multitable {Column 1 template} {Column 2 template} {Column 3 template}
4218 % @item first col stuff @tab second col stuff @tab third col
4225 % @item first col stuff @tab second col stuff
4226 % @tab Many paragraphs of text may be used in any column.
4228 % They will wrap at the width determined by the template.
4229 % @item@tab@tab This will be in third column.
4232 % Default dimensions may be reset by user.
4233 % @multitableparskip is vertical space between paragraphs in table.
4234 % @multitableparindent is paragraph indent in table.
4235 % @multitablecolmargin is horizontal space to be left between columns.
4236 % @multitablelinespace is space to leave between table items, baseline
4238 % 0pt means it depends on current normal line spacing.
4240 \newskip\multitableparskip
4241 \newskip\multitableparindent
4242 \newdimen\multitablecolspace
4243 \newskip\multitablelinespace
4244 \multitableparskip=
0pt
4245 \multitableparindent=
6pt
4246 \multitablecolspace=
12pt
4247 \multitablelinespace=
0pt
4249 % Macros used to set up halign preamble:
4251 \let\endsetuptable\relax
4252 \def\xendsetuptable{\endsetuptable}
4253 \let\columnfractions\relax
4254 \def\xcolumnfractions{\columnfractions}
4257 % #1 is the @columnfraction, usually a decimal number like .5, but might
4258 % be just 1. We just use it, whatever it is.
4260 \def\pickupwholefraction#1 {%
4261 \global\advance\colcount by
1
4262 \expandafter\xdef\csname col
\the\colcount\endcsname{#1\hsize}%
4269 \ifx\firstarg\xendsetuptable
4272 \ifx\firstarg\xcolumnfractions
4273 \global\setpercenttrue
4276 \let\go\pickupwholefraction
4278 \global\advance\colcount by
1
4279 \setbox0=
\hbox{#1\unskip\space}% Add a normal word space as a
4280 % separator; typically that is always in the input, anyway.
4281 \expandafter\xdef\csname col
\the\colcount\endcsname{\the\wd0}%
4284 \ifx\go\pickupwholefraction
4285 % Put the argument back for the \pickupwholefraction call, so
4286 % we'll always have a period there to be parsed.
4287 \def\go{\pickupwholefraction#1}%
4289 \let\go =
\setuptable
4295 % multitable-only commands.
4297 % @headitem starts a heading row, which we typeset in bold. Assignments
4298 % have to be global since we are inside the implicit group of an
4299 % alignment entry. \everycr below resets \everytab so we don't have to
4300 % undo it ourselves.
4301 \def\headitemfont{\b}% for people to use in the template row; not changeable
4303 \checkenv\multitable
4305 \gdef\headitemcrhook{\nobreak}% attempt to avoid page break after headings
4306 \global\everytab=
{\bf}% can't use \headitemfont since the parsing differs
4307 \the\everytab % for the first item
4310 % default for tables with no headings.
4311 \let\headitemcrhook=
\relax
4313 % A \tab used to include \hskip1sp. But then the space in a template
4314 % line is not enough. That is bad. So let's go back to just `&' until
4315 % we again encounter the problem the 1sp was intended to solve.
4316 % --karl, nathan@acm.org, 20apr99.
4317 \def\tab{\checkenv\multitable &
\the\everytab}%
4319 % @multitable ... @end multitable definitions:
4321 \newtoks\everytab % insert after every tab.
4323 \envdef\multitable{%
4327 % @item within a multitable starts a normal row.
4328 % We use \def instead of \let so that if one of the multitable entries
4329 % contains an @itemize, we don't choke on the \item (seen as \crcr aka
4330 % \endtemplate) expanding \doitemize.
4335 \setmultitablespacing
4336 \parskip=
\multitableparskip
4337 \parindent=
\multitableparindent
4343 \global\everytab=
{}% Reset from possible headitem.
4344 \global\colcount=
0 % Reset the column counter.
4346 % Check for saved footnotes, etc.:
4349 % Perhaps a \nobreak, then reset:
4351 \global\let\headitemcrhook=
\relax
4355 \parsearg\domultitable
4357 \def\domultitable#1{%
4358 % To parse everything between @multitable and @item:
4359 \setuptable#1 \endsetuptable
4361 % This preamble sets up a generic column definition, which will
4362 % be used as many times as user calls for columns.
4363 % \vtop will set a single line and will also let text wrap and
4364 % continue for many paragraphs if desired.
4366 \global\advance\colcount by
1
4369 % Use the current \colcount to find the correct column width:
4370 \hsize=
\expandafter\csname col
\the\colcount\endcsname
4372 % In order to keep entries from bumping into each other
4373 % we will add a \leftskip of \multitablecolspace to all columns after
4376 % If a template has been used, we will add \multitablecolspace
4377 % to the width of each template entry.
4379 % If the user has set preamble in terms of percent of \hsize we will
4380 % use that dimension as the width of the column, and the \leftskip
4381 % will keep entries from bumping into each other. Table will start at
4382 % left margin and final column will justify at right margin.
4384 % Make sure we don't inherit \rightskip from the outer environment.
4387 % The first column will be indented with the surrounding text.
4388 \advance\hsize by
\leftskip
4391 % If user has not set preamble in terms of percent of \hsize
4392 % we will advance \hsize by \multitablecolspace.
4393 \advance\hsize by
\multitablecolspace
4395 % In either case we will make \leftskip=\multitablecolspace:
4396 \leftskip=
\multitablecolspace
4398 % Ignoring space at the beginning and end avoids an occasional spurious
4399 % blank line, when TeX decides to break the line at the space before the
4400 % box from the multistrut, so the strut ends up on a line by itself.
4402 % @multitable @columnfractions .11 .89
4404 % @tab Legal holiday which is valid in major parts of the whole country.
4405 % Is automatically provided with highlighting sequences respectively
4406 % marking characters.
4407 \noindent\ignorespaces##
\unskip\multistrut
4412 \egroup % end the \halign
4413 \global\setpercentfalse
4416 \def\setmultitablespacing{%
4417 \def\multistrut{\strut}% just use the standard line spacing
4419 % Compute \multitablelinespace (if not defined by user) for use in
4420 % \multitableparskip calculation. We used define \multistrut based on
4421 % this, but (ironically) that caused the spacing to be off.
4422 % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100.
4423 \ifdim\multitablelinespace=
0pt
4424 \setbox0=
\vbox{X
}\global\multitablelinespace=
\the\baselineskip
4425 \global\advance\multitablelinespace by-
\ht0
4427 % Test to see if parskip is larger than space between lines of
4428 % table. If not, do nothing.
4429 % If so, set to same dimension as multitablelinespace.
4430 \ifdim\multitableparskip>
\multitablelinespace
4431 \global\multitableparskip=
\multitablelinespace
4432 \global\advance\multitableparskip-
7pt
% to keep parskip somewhat smaller
4433 % than skip between lines in the table.
4435 \ifdim\multitableparskip=
0pt
4436 \global\multitableparskip=
\multitablelinespace
4437 \global\advance\multitableparskip-
7pt
% to keep parskip somewhat smaller
4438 % than skip between lines in the table.
4442 \message{conditionals,
}
4444 % @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext,
4445 % @ifnotxml always succeed. They currently do nothing; we don't
4446 % attempt to check whether the conditionals are properly nested. But we
4447 % have to remember that they are conditionals, so that @end doesn't
4448 % attempt to close an environment group.
4451 \expandafter\let\csname #1\endcsname =
\relax
4452 \expandafter\let\csname iscond.
#1\endcsname =
1
4455 \makecond{ifnotdocbook
}
4456 \makecond{ifnothtml
}
4457 \makecond{ifnotinfo
}
4458 \makecond{ifnotplaintext
}
4461 % Ignore @ignore, @ifhtml, @ifinfo, and the like.
4463 \def\direntry{\doignore{direntry
}}
4464 \def\documentdescription{\doignore{documentdescription
}}
4465 \def\docbook{\doignore{docbook
}}
4466 \def\html{\doignore{html
}}
4467 \def\ifdocbook{\doignore{ifdocbook
}}
4468 \def\ifhtml{\doignore{ifhtml
}}
4469 \def\ifinfo{\doignore{ifinfo
}}
4470 \def\ifnottex{\doignore{ifnottex
}}
4471 \def\ifplaintext{\doignore{ifplaintext
}}
4472 \def\ifxml{\doignore{ifxml
}}
4473 \def\ignore{\doignore{ignore
}}
4474 \def\menu{\doignore{menu
}}
4475 \def\xml{\doignore{xml
}}
4477 % Ignore text until a line `@end #1', keeping track of nested conditionals.
4479 % A count to remember the depth of nesting.
4480 \newcount\doignorecount
4482 \def\doignore#1{\begingroup
4483 % Scan in ``verbatim'' mode:
4485 \catcode`\@ =
\other
4486 \catcode`\
{ =
\other
4487 \catcode`\
} =
\other
4489 % Make sure that spaces turn into tokens that match what \doignoretext wants.
4492 % Count number of #1's that we've seen.
4495 % Swallow text until we reach the matching `@end #1'.
4499 { \catcode`_=
11 % We want to use \_STOP_ which cannot appear in texinfo source.
4502 \gdef\dodoignore#1{%
4503 % #1 contains the command name as a string, e.g., `ifinfo'.
4505 % Define a command to find the next `@end #1'.
4506 \long\def\doignoretext#
#1^^M@end
#1{%
4507 \doignoretextyyy#
#1^^M@
#1\_STOP_}%
4509 % And this command to find another #1 command, at the beginning of a
4510 % line. (Otherwise, we would consider a line `@c @ifset', for
4511 % example, to count as an @ifset for nesting.)
4512 \long\def\doignoretextyyy#
#1^^M@
#1#
#2\_STOP_{\doignoreyyy{#
#2}\_STOP_}%
4514 % And now expand that command.
4519 \def\doignoreyyy#1{%
4521 \ifx\temp\empty % Nothing found.
4522 \let\next\doignoretextzzz
4523 \else % Found a nested condition, ...
4524 \advance\doignorecount by
1
4525 \let\next\doignoretextyyy % ..., look for another.
4526 % If we're here, #1 ends with ^^M\ifinfo (for example).
4528 \next #1% the token \_STOP_ is present just after this macro.
4531 % We have to swallow the remaining "\_STOP_".
4533 \def\doignoretextzzz#1{%
4534 \ifnum\doignorecount =
0 % We have just found the outermost @end.
4535 \let\next\enddoignore
4536 \else % Still inside a nested condition.
4537 \advance\doignorecount by -
1
4538 \let\next\doignoretext % Look for the next @end.
4543 % Finish off ignored text.
4545 % Ignore anything after the last `@end #1'; this matters in verbatim
4546 % environments, where otherwise the newline after an ignored conditional
4547 % would result in a blank line in the output.
4548 \gdef\enddoignore#1^^M
{\endgroup\ignorespaces}%
4552 % @set VAR sets the variable VAR to an empty value.
4553 % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
4555 % Since we want to separate VAR from REST-OF-LINE (which might be
4556 % empty), we can't just use \parsearg; we have to insert a space of our
4557 % own to delimit the rest of the line, and then take it out again if we
4559 % We rely on the fact that \parsearg sets \catcode`\ =10.
4561 \parseargdef\set{\setyyy#1 \endsetyyy}
4562 \def\setyyy#1 #2\endsetyyy{%
4564 \makevalueexpandable
4566 \edef\next{\gdef\makecsname{SET
#1}}%
4574 % Remove the trailing space \setxxx inserted.
4575 \def\setzzz#1 \endsetzzz{\next{#1}}
4577 % @clear VAR clears (i.e., unsets) the variable VAR.
4579 \parseargdef\clear{%
4581 \makevalueexpandable
4582 \global\expandafter\let\csname SET
#1\endcsname=
\relax
4586 % @value{foo} gets the text saved in variable foo.
4587 \def\value{\begingroup\makevalueexpandable\valuexxx}
4588 \def\valuexxx#1{\expandablevalue{#1}\endgroup}
4590 \catcode`\-=
\active \catcode`
\_=
\active
4592 \gdef\makevalueexpandable{%
4593 \let\value =
\expandablevalue
4594 % We don't want these characters active, ...
4595 \catcode`\-=
\other \catcode`
\_=
\other
4596 % ..., but we might end up with active ones in the argument if
4597 % we're called from @code, as @code{@value{foo-bar_}}, though.
4598 % So \let them to their normal equivalents.
4599 \let-
\normaldash \let_\normalunderscore
4603 % We have this subroutine so that we can handle at least some @value's
4604 % properly in indexes (we call \makevalueexpandable in \indexdummies).
4605 % The command has to be fully expandable (if the variable is set), since
4606 % the result winds up in the index file. This means that if the
4607 % variable's value contains other Texinfo commands, it's almost certain
4608 % it will fail (although perhaps we could fix that with sufficient work
4609 % to do a one-level expansion on the result, instead of complete).
4611 % Unfortunately, this has the consequence that when _ is in the *value*
4612 % of an @set, it does not print properly in the roman fonts (get the cmr
4613 % dot accent at position 126 instead). No fix comes to mind, and it's
4614 % been this way since 2003 or earlier, so just ignore it.
4616 \def\expandablevalue#1{%
4617 \expandafter\ifx\csname SET
#1\endcsname\relax
4618 {[No value for ``
#1''
]}%
4619 \message{Variable `
#1', used in @value, is not set.
}%
4621 \csname SET
#1\endcsname
4625 % Like \expandablevalue, but completely expandable (the \message in the
4626 % definition above operates at the execution level of TeX). Used when
4627 % writing to auxiliary files, due to the expansion that \write does.
4628 % If flag is undefined, pass through an unexpanded @value command: maybe it
4629 % will be set by the time it is read back in.
4631 % NB flag names containing - or _ may not work here.
4633 \expandafter\ifx\csname SET
#1\endcsname\relax
4634 \noexpand\value{#1}%
4636 \csname SET
#1\endcsname
4640 % Used for @value's in index entries to form the sort key: expand the @value
4641 % if possible, otherwise sort late.
4642 \def\indexnofontsvalue#1{%
4643 \expandafter\ifx\csname SET
#1\endcsname\relax
4646 \csname SET
#1\endcsname
4650 % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
4653 % To get the special treatment we need for `@end ifset,' we call
4654 % \makecond and then redefine.
4657 \def\ifset{\parsearg{\doifset{\let\next=
\ifsetfail}}}
4660 \makevalueexpandable
4662 \expandafter\ifx\csname SET
#2\endcsname\relax
4663 #1% If not set, redefine \next.
4668 \def\ifsetfail{\doignore{ifset
}}
4670 % @ifclear VAR ... @end executes the `...' iff VAR has never been
4671 % defined with @set, or has been undefined with @clear.
4673 % The `\else' inside the `\doifset' parameter is a trick to reuse the
4674 % above code: if the variable is not set, do nothing, if it is set,
4675 % then redefine \next to \ifclearfail.
4678 \def\ifclear{\parsearg{\doifset{\else \let\next=
\ifclearfail}}}
4679 \def\ifclearfail{\doignore{ifclear
}}
4681 % @ifcommandisdefined CMD ... @end executes the `...' if CMD (written
4682 % without the @) is in fact defined. We can only feasibly check at the
4683 % TeX level, so something like `mathcode' is going to considered
4684 % defined even though it is not a Texinfo command.
4686 \makecond{ifcommanddefined
}
4687 \def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=
\ifcmddefinedfail}}}
4689 \def\doifcmddefined#1#2{{%
4690 \makevalueexpandable
4692 \expandafter\ifx\csname #2\endcsname\relax
4693 #1% If not defined, \let\next as above.
4698 \def\ifcmddefinedfail{\doignore{ifcommanddefined
}}
4700 % @ifcommandnotdefined CMD ... handled similar to @ifclear above.
4701 \makecond{ifcommandnotdefined
}
4702 \def\ifcommandnotdefined{%
4703 \parsearg{\doifcmddefined{\else \let\next=
\ifcmdnotdefinedfail}}}
4704 \def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined
}}
4706 % Set the `txicommandconditionals' variable, so documents have a way to
4707 % test if the @ifcommand...defined conditionals are available.
4708 \set txicommandconditionals
4710 % @dircategory CATEGORY -- specify a category of the dir file
4711 % which this file should belong to. Ignore this in TeX.
4712 \let\dircategory=
\comment
4714 % @defininfoenclose.
4715 \let\definfoenclose=
\comment
4719 % Index generation facilities
4721 % Define \newwrite to be identical to plain tex's \newwrite
4722 % except not \outer, so it can be used within macros and \if's.
4723 \edef\newwrite{\makecsname{ptexnewwrite
}}
4725 % \newindex {foo} defines an index named IX.
4726 % It automatically defines \IXindex such that
4727 % \IXindex ...rest of line... puts an entry in the index IX.
4728 % It also defines \IXindfile to be the number of the output channel for
4729 % the file that accumulates this index. The file's extension is IX.
4730 % The name of an index should be no more than 2 characters long
4731 % for the sake of vms.
4734 \expandafter\chardef\csname#1indfile
\endcsname=
0
4735 \expandafter\xdef\csname#1index
\endcsname{% % Define @#1index
4736 \noexpand\doindex{#1}}
4739 % @defindex foo == \newindex{foo}
4741 \def\defindex{\parsearg\newindex}
4743 % Define @defcodeindex, like @defindex except put all entries in @code.
4745 \def\defcodeindex{\parsearg\newcodeindex}
4747 \def\newcodeindex#1{%
4748 \expandafter\chardef\csname#1indfile
\endcsname=
0
4749 \expandafter\xdef\csname#1index
\endcsname{%
4750 \noexpand\docodeindex{#1}}%
4753 % The default indices:
4754 \newindex{cp
}% concepts,
4755 \newcodeindex{fn
}% functions,
4756 \newcodeindex{vr
}% variables,
4757 \newcodeindex{tp
}% types,
4758 \newcodeindex{ky
}% keys
4759 \newcodeindex{pg
}% and programs.
4762 % @synindex foo bar makes index foo feed into index bar.
4763 % Do this instead of @defindex foo if you don't want it as a separate index.
4765 % @syncodeindex foo bar similar, but put all entries made for index foo
4768 \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}}
4769 \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}}
4771 % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo),
4772 % #3 the target index (bar).
4773 \def\dosynindex#1#2#3{%
4774 % Only do \closeout if we haven't already done it, else we'll end up
4775 % closing the target index.
4776 \expandafter \ifx\csname donesynindex
#2\endcsname \relax
4777 % The \closeout helps reduce unnecessary open files; the limit on the
4778 % Acorn RISC OS is a mere 16 files.
4779 \expandafter\closeout\csname#2indfile
\endcsname
4780 \expandafter\let\csname donesynindex
#2\endcsname =
1
4782 % redefine \fooindfile:
4783 \expandafter\let\expandafter\temp\expandafter=
\csname#3indfile
\endcsname
4784 \expandafter\let\csname#2indfile
\endcsname=
\temp
4785 % redefine \fooindex:
4786 \expandafter\xdef\csname#2index
\endcsname{\noexpand#1{#3}}%
4789 % Define \doindex, the driver for all index macros.
4790 % Argument #1 is generated by the calling \fooindex macro,
4791 % and it is the two-letter name of the index.
4793 \def\doindex#1{\edef\indexname{#1}\parsearg\doindexxxx}
4794 \def\doindexxxx #1{\doind{\indexname}{#1}}
4796 % like the previous two, but they put @code around the argument.
4797 \def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx}
4798 \def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}}
4801 % Used when writing an index entry out to an index file to prevent
4802 % expansion of Texinfo commands that can appear in an index entry.
4805 \escapechar = `\\
% use backslash in output files.
4806 \def\@
{@
}% change to @@ when we switch to @ as escape char in index files.
4807 \def\
{\realbackslash\space }%
4809 % Need these unexpandable (because we define \tt as a dummy)
4810 % definitions when @{ or @} appear in index entry text. Also, more
4811 % complicated, when \tex is in effect and \{ is a \delimiter again.
4812 % We can't use \lbracecmd and \rbracecmd because texindex assumes
4813 % braces and backslashes are used only as delimiters. Perhaps we
4814 % should use @lbracechar and @rbracechar?
4815 \def\
{{{\tt\char123}}%
4816 \def\
}{{\tt\char125}}%
4818 % Do the redefinitions.
4822 % Used for the aux and toc files, where @ is the escape character.
4824 % For the aux and toc files, @ is the escape character. So we want to
4825 % redefine everything using @ as the escape character (instead of
4826 % \realbackslash, still used for index files). When everything uses @,
4827 % this will be simpler.
4832 \let\
{ =
\lbraceatcmd
4833 \let\
} =
\rbraceatcmd
4835 % Do the redefinitions.
4840 % \definedummyword defines \#1 as \string\#1\space, thus effectively
4841 % preventing its expansion. This is used only for control words,
4842 % not control letters, because the \space would be incorrect for
4843 % control characters, but is needed to separate the control word
4844 % from whatever follows.
4846 % These can be used both for control words that take an argument and
4847 % those that do not. If it is followed by {arg} in the input, then
4848 % that will dutifully get written to the index (or wherever).
4850 % For control letters, we have \definedummyletter, which omits the
4853 \def\definedummyword #1{\def#1{\string#1\space}}%
4854 \def\definedummyletter#1{\def#1{\string#1}}%
4855 \let\definedummyaccent\definedummyletter
4857 % Called from \indexdummies and \atdummies, to effectively prevent
4858 % the expansion of commands.
4860 \def\definedummies{%
4862 \let\commondummyword\definedummyword
4863 \let\commondummyletter\definedummyletter
4864 \let\commondummyaccent\definedummyaccent
4865 \commondummiesnofonts
4867 \definedummyletter\_%
4868 \definedummyletter\-
%
4870 % Non-English letters.
4881 \definedummyword\exclamdown
4885 \definedummyword\ordf
4886 \definedummyword\ordm
4887 \definedummyword\questiondown
4891 % Although these internal commands shouldn't show up, sometimes they do.
4893 \definedummyword\gtr
4894 \definedummyword\hat
4895 \definedummyword\less
4898 \definedummyword\tclose
4901 \definedummyword\LaTeX
4902 \definedummyword\TeX
4904 % Assorted special characters.
4905 \definedummyword\arrow
4906 \definedummyword\bullet
4907 \definedummyword\comma
4908 \definedummyword\copyright
4909 \definedummyword\registeredsymbol
4910 \definedummyword\dots
4911 \definedummyword\enddots
4912 \definedummyword\entrybreak
4913 \definedummyword\equiv
4914 \definedummyword\error
4915 \definedummyword\euro
4916 \definedummyword\expansion
4917 \definedummyword\geq
4918 \definedummyword\guillemetleft
4919 \definedummyword\guillemetright
4920 \definedummyword\guilsinglleft
4921 \definedummyword\guilsinglright
4922 \definedummyword\lbracechar
4923 \definedummyword\leq
4924 \definedummyword\mathopsup
4925 \definedummyword\minus
4926 \definedummyword\ogonek
4927 \definedummyword\pounds
4928 \definedummyword\point
4929 \definedummyword\print
4930 \definedummyword\quotedblbase
4931 \definedummyword\quotedblleft
4932 \definedummyword\quotedblright
4933 \definedummyword\quoteleft
4934 \definedummyword\quoteright
4935 \definedummyword\quotesinglbase
4936 \definedummyword\rbracechar
4937 \definedummyword\result
4938 \definedummyword\sub
4939 \definedummyword\sup
4940 \definedummyword\textdegree
4942 % We want to disable all macros so that they are not expanded by \write.
4944 \let\value\dummyvalue
4946 \normalturnoffactive
4949 % \commondummiesnofonts: common to \definedummies and \indexnofonts.
4950 % Define \commondummyletter, \commondummyaccent and \commondummyword before
4951 % using. Used for accents, font commands, and various control letters.
4953 \def\commondummiesnofonts{%
4954 % Control letters and accents.
4955 \commondummyletter\!
%
4956 \commondummyaccent\"
%
4957 \commondummyaccent\'
%
4958 \commondummyletter\*
%
4959 \commondummyaccent\,
%
4960 \commondummyletter\.
%
4961 \commondummyletter\/
%
4962 \commondummyletter\:
%
4963 \commondummyaccent\=
%
4964 \commondummyletter\?
%
4965 \commondummyaccent\^
%
4966 \commondummyaccent\`
%
4967 \commondummyaccent\~
%
4971 \commondummyword\dotaccent
4972 \commondummyword\ogonek
4973 \commondummyword\ringaccent
4974 \commondummyword\tieaccent
4975 \commondummyword\ubaraccent
4976 \commondummyword\udotaccent
4977 \commondummyword\dotless
4979 % Texinfo font commands.
4983 \commondummyword\sansserif
4985 \commondummyword\slanted
4988 % Commands that take arguments.
4989 \commondummyword\abbr
4990 \commondummyword\acronym
4991 \commondummyword\anchor
4992 \commondummyword\cite
4993 \commondummyword\code
4994 \commondummyword\command
4995 \commondummyword\dfn
4996 \commondummyword\dmn
4997 \commondummyword\email
4998 \commondummyword\emph
4999 \commondummyword\env
5000 \commondummyword\file
5001 \commondummyword\image
5002 \commondummyword\indicateurl
5003 \commondummyword\inforef
5004 \commondummyword\kbd
5005 \commondummyword\key
5006 \commondummyword\math
5007 \commondummyword\option
5008 \commondummyword\pxref
5009 \commondummyword\ref
5010 \commondummyword\samp
5011 \commondummyword\strong
5012 \commondummyword\tie
5014 \commondummyword\uref
5015 \commondummyword\url
5016 \commondummyword\var
5017 \commondummyword\verb
5019 \commondummyword\xref
5022 % For testing: output @{ and @} in index sort strings as \{ and \}.
5023 \newif\ifusebracesinindexes
5025 \let\indexlbrace\relax
5026 \let\indexrbrace\relax
5030 @gdef@backslashdisappear
{@def\
{}}
5037 \gdef\indexnonalnumdisappear{%
5038 \expandafter\ifx\csname SETtxiindexlquoteignore
\endcsname\relax\else
5039 % @set txiindexlquoteignore makes us ignore left quotes in the sort term.
5040 % (Introduced for FSFS 2nd ed.)
5044 \expandafter\ifx\csname SETtxiindexbackslashignore
\endcsname\relax\else
5048 \expandafter\ifx\csname SETtxiindexhyphenignore
\endcsname\relax\else
5051 \expandafter\ifx\csname SETtxiindexlessthanignore
\endcsname\relax\else
5054 \expandafter\ifx\csname SETtxiindexatsignignore
\endcsname\relax\else
5059 \gdef\indexnonalnumreappear{%
5068 % \indexnofonts is used when outputting the strings to sort the index
5069 % by, and when constructing control sequence names. It eliminates all
5070 % control sequences and just writes whatever the best ASCII sort string
5071 % would be for a given command (usually its argument).
5074 % Accent commands should become @asis.
5075 \def\commondummyaccent#
#1{\let#
#1\asis}%
5076 % We can just ignore other control letters.
5077 \def\commondummyletter#
#1{\let#
#1\empty}%
5078 % All control words become @asis by default; overrides below.
5079 \let\commondummyword\commondummyaccent
5080 \commondummiesnofonts
5082 % Don't no-op \tt, since it isn't a user-level command
5083 % and is used in the definitions of the active chars like <, >, |, etc.
5084 % Likewise with the other plain tex font commands.
5089 \def\_{\normalunderscore}%
5090 \def\-
{}% @- shouldn't affect sorting
5092 \uccode`
\1=`\
{ \uppercase{\def\
{{1}}%
5093 \uccode`
\1=`\
} \uppercase{\def\
}{1}}%
5097 % Non-English letters.
5114 \def\questiondown{?
}%
5121 % Assorted special characters.
5122 % (The following {} will end up in the sort string, but that's ok.)
5124 \def\bullet{bullet
}%
5126 \def\copyright{copyright
}%
5132 \def\expansion{==>
}%
5134 \def\guillemetleft{<<
}%
5135 \def\guillemetright{>>
}%
5136 \def\guilsinglleft{<
}%
5137 \def\guilsinglright{>
}%
5141 \def\pounds{pounds
}%
5143 \def\quotedblbase{"
}%
5144 \def\quotedblleft{"
}%
5145 \def\quotedblright{"
}%
5148 \def\quotesinglbase{,
}%
5149 \def\registeredsymbol{R
}%
5153 % We need to get rid of all macros, leaving only the arguments (if present).
5154 % Of course this is not nearly correct, but it is the best we can do for now.
5155 % makeinfo does not expand macros in the argument to @deffn, which ends up
5156 % writing an index entry, and texindex isn't prepared for an index sort entry
5157 % that starts with \.
5159 % Since macro invocations are followed by braces, we can just redefine them
5160 % to take a single TeX argument. The case of a macro invocation that
5161 % goes to end-of-line is not handled.
5164 \let\value\indexnofontsvalue
5170 \let\SETmarginindex=
\relax % put index entries in margin (undocumented)?
5172 % Most index entries go through here, but \dosubind is the general case.
5173 % #1 is the index name, #2 is the entry text.
5174 \def\doind#1#2{\dosubind{#1}{#2}{}}
5176 % There is also \dosubind {index}{topic}{subtopic}
5177 % which makes an entry in a two-level index such as the operation index.
5178 % TODO: Two-level index? Operation index?
5180 % Workhorse for all indexes.
5181 % #1 is name of index, #2 is stuff to put there, #3 is subentry --
5182 % empty if called from \doind, as we usually are (the main exception
5183 % is with most defuns, which call us directly).
5185 \def\dosubind#1#2#3{%
5188 \requireopenindexfile{#1}%
5189 % Store the main index entry text (including the third arg).
5191 % If third arg is present, precede it with a space.
5193 \ifx\thirdarg\empty \else
5194 \toks0 =
\expandafter{\the\toks0 \space #3}%
5197 \edef\writeto{\csname#1indfile
\endcsname}%
5199 \safewhatsit\dosubindwrite
5204 % Check if an index file has been opened, and if not, open it.
5205 \def\requireopenindexfile#1{%
5206 \ifnum\csname #1indfile
\endcsname=
0
5207 \expandafter\newwrite \csname#1indfile
\endcsname
5209 % A .fls suffix would conflict with the file extension for the output
5210 % of -recorder, so use .f1s instead.
5211 \ifx\suffix\indexisfl\def\suffix{f1
}\fi
5213 \immediate\openout\csname#1indfile
\endcsname \jobname.
\suffix
5214 % Using \immediate above here prevents an object entering into the current
5215 % box, which could confound checks such as those in \safewhatsit for
5217 \typeout{Writing index file
\jobname.
\suffix}%
5221 % Output \ as {\indexbackslash}, because \ is an escape character in
5223 \let\indexbackslash=
\relax
5224 {\catcode`\@=
0 \catcode`\\=
\active
5225 @gdef@useindexbackslash
{@def\
{{@indexbackslash
}}}
5228 % Definition for writing index entry text.
5229 \def\sortas#1{\ignorespaces}%
5231 % Definition for writing index entry sort key. Should occur at the at
5232 % the beginning of the index entry, like
5233 % @cindex @sortas{september} \september
5234 % The \ignorespaces takes care of following space, but there's no way
5235 % to remove space before it.
5238 \gdef\indexwritesortas{%
5240 \indexnonalnumreappear
5241 \indexwritesortasxxx}
5242 \gdef\indexwritesortasxxx#1{%
5243 \xdef\indexsortkey{#1}\endgroup}
5247 % Write the entry in \toks0 to the index file.
5249 \def\dosubindwrite{%
5250 % Put the index entry in the margin if desired.
5251 \ifx\SETmarginindex\relax\else
5252 \insert\margin{\hbox{\vrule height8pt depth3pt width0pt
\the\toks0}}%
5255 % Remember, we are within a group.
5256 \indexdummies % Must do this here, since \bf, etc expand at this stage
5257 \useindexbackslash % \indexbackslash isn't defined now so it will be output
5258 % as is; and it will print as backslash.
5259 % The braces around \indexbrace are recognized by texindex.
5261 % Get the string to sort by, by processing the index entry with all
5262 % font commands turned off.
5264 \def\lbracechar{{\indexlbrace}}%
5265 \def\rbracechar{{\indexrbrace}}%
5268 \indexnonalnumdisappear
5269 \xdef\indexsortkey{}%
5270 \let\sortas=
\indexwritesortas
5271 \edef\temp{\the\toks0}%
5272 \setbox\dummybox =
\hbox{\temp}% Make sure to execute any \sortas
5273 \ifx\indexsortkey\empty
5274 \xdef\indexsortkey{\temp}%
5275 \ifx\indexsortkey\empty\xdef\indexsortkey{ }\fi
5279 % Set up the complete index entry, with both the sort key and
5280 % the original text, including any font commands. We write
5281 % three arguments to \entry to the .?? file (four in the
5282 % subentry case), texindex reduces to two when writing the .??s
5286 \string\entry{\indexsortkey}{\noexpand\folio}{\the\toks0}}%
5290 \newbox\dummybox % used above
5292 % Take care of unwanted page breaks/skips around a whatsit:
5294 % If a skip is the last thing on the list now, preserve it
5295 % by backing up by \lastskip, doing the \write, then inserting
5296 % the skip again. Otherwise, the whatsit generated by the
5297 % \write or \pdfdest will make \lastskip zero. The result is that
5298 % sequences like this:
5302 % will have extra space inserted, because the \medbreak in the
5303 % start of the @defun won't see the skip inserted by the @end of
5304 % the previous defun.
5306 % But don't do any of this if we're not in vertical mode. We
5307 % don't want to do a \vskip and prematurely end a paragraph.
5309 % Avoid page breaks due to these extra skips, too.
5311 % But wait, there is a catch there:
5312 % We'll have to check whether \lastskip is zero skip. \ifdim is not
5313 % sufficient for this purpose, as it ignores stretch and shrink parts
5314 % of the skip. The only way seems to be to check the textual
5315 % representation of the skip.
5317 % The following is almost like \def\zeroskipmacro{0.0pt} except that
5318 % the ``p'' and ``t'' characters have catcode \other, not 11 (letter).
5320 \edef\zeroskipmacro{\expandafter\the\csname z@skip
\endcsname}
5322 \newskip\whatsitskip
5323 \newcount\whatsitpenalty
5327 \def\safewhatsit#1{\ifhmode
5330 % \lastskip and \lastpenalty cannot both be nonzero simultaneously.
5331 \whatsitskip =
\lastskip
5332 \edef\lastskipmacro{\the\lastskip}%
5333 \whatsitpenalty =
\lastpenalty
5335 % If \lastskip is nonzero, that means the last item was a
5336 % skip. And since a skip is discardable, that means this
5337 % -\whatsitskip glue we're inserting is preceded by a
5338 % non-discardable item, therefore it is not a potential
5339 % breakpoint, therefore no \nobreak needed.
5340 \ifx\lastskipmacro\zeroskipmacro
5347 \ifx\lastskipmacro\zeroskipmacro
5348 % If \lastskip was zero, perhaps the last item was a penalty, and
5349 % perhaps it was >=10000, e.g., a \nobreak. In that case, we want
5350 % to re-insert the same penalty (values >10000 are used for various
5351 % signals); since we just inserted a non-discardable item, any
5352 % following glue (such as a \parskip) would be a breakpoint. For example:
5353 % @deffn deffn-whatever
5354 % @vindex index-whatever
5356 % would allow a break between the index-whatever whatsit
5357 % and the "Description." paragraph.
5358 \ifnum\whatsitpenalty>
9999 \penalty\whatsitpenalty \fi
5360 % On the other hand, if we had a nonzero \lastskip,
5361 % this make-up glue would be preceded by a non-discardable item
5362 % (the whatsit from the \write), so we must insert a \nobreak.
5363 \nobreak\vskip\whatsitskip
5367 % The index entry written in the file actually looks like
5368 % \entry {sortstring}{page}{topic}
5370 % \entry {sortstring}{page}{topic}{subtopic}
5371 % The texindex program reads in these files and writes files
5372 % containing these kinds of lines:
5374 % before the first topic whose initial is c
5375 % \entry {topic}{pagelist}
5376 % for a topic that is used without subtopics
5378 % for the beginning of a topic that is used with subtopics
5379 % \secondary {subtopic}{pagelist}
5380 % for each subtopic.
5382 % Define the user-accessible indexing commands
5383 % @findex, @vindex, @kindex, @cindex.
5385 \def\findex {\fnindex}
5386 \def\kindex {\kyindex}
5387 \def\cindex {\cpindex}
5388 \def\vindex {\vrindex}
5389 \def\tindex {\tpindex}
5390 \def\pindex {\pgindex}
5392 \def\cindexsub {\begingroup\obeylines\cindexsub}
5394 \gdef\cindexsub "
#1"
#2^^M
{\endgroup %
5395 \dosubind{cp
}{#2}{#1}}}
5397 % Define the macros used in formatting output of the sorted index material.
5399 % @printindex causes a particular index (the ??s file) to get printed.
5400 % It does not print any chapter heading (usually an @unnumbered).
5402 \parseargdef\printindex{\begingroup
5403 \dobreak \chapheadingskip{10000}%
5408 \everypar =
{}% don't want the \kern\-parindent from indentation suppression.
5410 % See if the index file exists and is nonempty.
5411 % Change catcode of @ here so that if the index file contains
5413 % as its first line, TeX doesn't complain about mismatched braces
5414 % (because it thinks @} is a control sequence).
5416 % See comment in \requireopenindexfile.
5417 \def\indexname{#1}\ifx\indexname\indexisfl\def\indexname{f1
}\fi
5418 \openin 1 \jobname.
\indexname s
5420 % \enddoublecolumns gets confused if there is no text in the index,
5421 % and it loses the chapter title and the aux file entries for the
5422 % index. The easiest way to prevent this problem is to make sure
5423 % there is some text.
5424 \putwordIndexNonexistent
5425 \typeout{No file
\jobname.
\indexname s.
}%
5429 % If the index file exists but is empty, then \openin leaves \ifeof
5430 % false. We have to make TeX try to read something from the file, so
5431 % it can discover if there is anything in it.
5432 \read 1 to
\thisline
5434 \putwordIndexIsEmpty
5436 % Index files are almost Texinfo source, but we use \ as the escape
5437 % character. It would be better to use @, but that's too big a change
5438 % to make right now.
5439 \def\indexbackslash{\ttbackslash}%
5440 \let\indexlbrace\
{ % Likewise, set these sequences for braces
5441 \let\indexrbrace\
} % used in the sort key.
5443 \let\entryorphanpenalty=
\indexorphanpenalty
5445 % Read input from the index file line by line.
5448 \let\firsttoken\relax
5450 \read 1 to
\nextline
5451 \edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}%
5457 \let\thisline\nextline
5466 \def\getfirsttoken#1{\expandafter\getfirsttokenx#1\endfirsttoken}
5467 \long\def\getfirsttokenx#1#2\endfirsttoken{\noexpand#1}
5469 \def\loopdo#1\repeat{\def\body{#1}\loopdoxxx}
5470 \def\loopdoxxx{\let\next=
\relax\body\let\next=
\loopdoxxx\fi\next}
5472 % These macros are used by the sorted index file itself.
5473 % Change them to control the appearance of the index.
5475 {\catcode`\/=
13 \catcode`\-=
13 \catcode`\^=
13 \catcode`\~=
13 \catcode`
\_=
13
5476 \catcode`\|=
13 \catcode`\<=
13 \catcode`\>=
13 \catcode`\+=
13 \catcode`\"=
13
5478 \gdef\initialglyphs{%
5479 % Some changes for non-alphabetic characters. Using the glyphs from the
5480 % math fonts looks more consistent than the typewriter font used elsewhere
5481 % for these characters.
5482 \def\indexbackslash{\math{\backslash}}%
5483 \let\\=
\indexbackslash
5485 % Can't get bold backslash so don't use bold forward slash
5487 \def/
{{\secrmnotbold \normalslash}}%
5488 \def-
{{\normaldash\normaldash}}% en dash `--'
5489 \def^
{{\chapbf \normalcaret}}%
5490 \def~
{{\chapbf \normaltilde}}%
5492 \leavevmode \kern.07em
\vbox{\hrule width
.3em height
.1ex
}\kern .07em
}%
5496 \def+
{$
\normalplus$
}%
5506 % Remove any glue we may have, we'll be inserting our own.
5509 % We like breaks before the index initials, so insert a bonus.
5510 % The glue before the bonus allows a little bit of space at the
5511 % bottom of a column to reduce an increase in inter-line spacing.
5513 \vskip 0pt plus
5\baselineskip
5515 \vskip 0pt plus -
5\baselineskip
5517 % Typeset the initial. Making this add up to a whole number of
5518 % baselineskips increases the chance of the dots lining up from column
5519 % to column. It still won't often be perfect, because of the stretch
5520 % we need before each entry, but it's better.
5522 % No shrink because it confuses \balancecolumns.
5523 \vskip 1.67\baselineskip plus
1\baselineskip
5524 \leftline{\secfonts \kern-
0.05em
\secbf #1}%
5525 % \secfonts is inside the argument of \leftline so that the change of
5526 % \baselineskip will not affect any glue inserted before the vbox that
5527 % \leftline creates.
5528 % Do our best not to break after the initial.
5530 \vskip .33\baselineskip plus
.1\baselineskip
5531 \egroup % \initialglyphs
5534 \newdimen\entryrightmargin
5535 \entryrightmargin=
0pt
5537 % \entry typesets a paragraph consisting of the text (#1), dot leaders, and
5538 % then page number (#2) flushed to the right margin. It is used for index
5539 % and table of contents entries. The paragraph is indented by \leftskip.
5544 % Start a new paragraph if necessary, so our assignments below can't
5545 % affect previous text.
5548 % No extra space above this paragraph.
5551 % When reading the text of entry, convert explicit line breaks
5552 % from @* into spaces. The user might give these in long section
5553 % titles, for instance.
5554 \def\*
{\unskip\space\ignorespaces}%
5555 \def\entrybreak{\hfil\break}% An undocumented command
5557 % A bit of stretch before each entry for the benefit of balancing
5559 \vskip 0pt plus0.5pt
5561 % Swallow the left brace of the text (first parameter):
5562 \afterassignment\doentry
5565 \def\entrybreak{\unskip\space\ignorespaces}%
5567 % Save the text of the entry
5568 \global\setbox\boxA=
\hbox\bgroup
5569 \bgroup % Instead of the swallowed brace.
5571 \aftergroup\finishentry
5572 % And now comes the text of the entry.
5573 % Not absorbing as a macro argument reduces the chance of problems
5574 % with catcodes occurring.
5577 \gdef\finishentry#1{%
5579 \dimen@ =
\wd\boxA % Length of text of entry
5580 \global\setbox\boxA=
\hbox\bgroup\unhbox\boxA
5581 % #1 is the page number.
5583 % Get the width of the page numbers, and only use
5584 % leaders if they are present.
5585 \global\setbox\boxB =
\hbox{#1}%
5586 \ifdim\wd\boxB =
0pt
5587 \null\nobreak\hfill\
%
5590 \null\nobreak\indexdotfill % Have leaders before the page number.
5594 \bgroup\let\domark\relax
5595 \hskip\skip\thinshrinkable\the\toksA
5597 % The redefinion of \domark stops marks being added in \pdflink to
5598 % preserve coloured links across page boundaries. Otherwise the marks
5599 % would get in the way of \lastbox in \insertindexentrybox.
5601 \ifx\XeTeXrevision\thisisundefined
5602 \hskip\skip\thinshrinkable #1%
5605 \bgroup\let\domark\relax
5606 \hskip\skip\thinshrinkable\the\toksA
5612 \ifdim\wd\boxB =
0pt
5613 \global\setbox\entryindexbox=
\vbox{\unhbox\boxA}%
5615 \global\setbox\entryindexbox=
\vbox\bgroup
5616 \prevdepth=
\entrylinedepth
5618 % We want the text of the entries to be aligned to the left, and the
5619 % page numbers to be aligned to the right.
5621 \advance\leftskip by
0pt plus
1fil
5622 \advance\leftskip by
0pt plus -
1fill
5623 \rightskip =
0pt plus -
1fil
5624 \advance\rightskip by
0pt plus
1fill
5625 % Cause last line, which could consist of page numbers on their own
5626 % if the list of page numbers is long, to be aligned to the right.
5627 \parfillskip=
0pt plus -
1fill
5631 \advance\rightskip by
\entryrightmargin
5632 % Determine how far we can stretch into the margin.
5633 % This allows, e.g., "Appendix H GNU Free Documentation License" to
5634 % fit on one line in @letterpaper format.
5635 \ifdim\entryrightmargin>
2.1em
5640 \advance \parfillskip by
0pt minus
1\dimen@i
5643 \advance\dimen@ii by -
1\leftskip
5644 \advance\dimen@ii by -
1\entryrightmargin
5645 \advance\dimen@ii by
1\dimen@i
5646 \ifdim\wd\boxA >
\dimen@ii
% If the entry doesn't fit in one line
5647 \ifdim\dimen@ >
0.8\dimen@ii
% due to long index text
5648 \dimen@ =
0.7\dimen@
% Try to split the text roughly evenly
5650 \advance \dimen@ii by -
1em
5651 \ifnum\dimen@>
\dimen@ii
5652 % If the entry is too long, use the whole line
5655 \advance\leftskip by
0pt plus
1fill
% ragged right
5656 \advance \dimen@ by
1\rightskip
5657 \parshape =
2 0pt
\dimen@
1em
\dimen@ii
5658 % Ideally we'd add a finite glue at the end of the first line only, but
5659 % TeX doesn't seem to provide a way to do such a thing.
5663 % Do not prefer a separate line ending with a hyphen to fewer lines.
5664 \finalhyphendemerits =
0
5666 % Word spacing - no stretch
5667 \spaceskip=
\fontdimen2\font minus
\fontdimen4\font
5669 \linepenalty=
1000 % Discourage line breaks.
5670 \hyphenpenalty=
5000 % Discourage hyphenation.
5672 \par % format the paragraph
5676 % delay text of entry until after penalty
5677 \bgroup\aftergroup\insertindexentrybox
5681 \newskip\thinshrinkable
5682 \skip\thinshrinkable=
.15em minus
.15em
5684 \newbox\entryindexbox
5685 \def\insertindexentrybox{%
5687 % The following gets the depth of the last box. This is for even
5688 % line spacing when entries span several lines.
5689 \setbox\dummybox\vbox{%
5690 \unvbox\entryindexbox
5693 \global\entrylinedepth=
\prevdepth
5695 % Note that we couldn't simply \unvbox\entryindexbox followed by
5696 % \nointerlineskip\lastbox to remove the last box and then reinstate it,
5697 % because this resets how far the box has been \moveleft'ed to 0. \unvbox
5698 % doesn't affect \prevdepth either.
5700 \newdimen\entrylinedepth
5702 % Default is no penalty
5703 \let\entryorphanpenalty\egroup
5705 % Used from \printindex. \firsttoken should be the first token
5706 % after the \entry. If it's not another \entry, we are at the last
5707 % line of a group of index entries, so insert a penalty to discourage
5708 % orphaned index entries.
5709 \long\def\indexorphanpenalty{%
5710 \def\isentry{\entry}%
5711 \ifx\firsttoken\isentry
5713 \unskip\penalty 9000
5714 % The \unskip here stops breaking before the glue. It relies on the
5715 % \vskip above being there, otherwise there is an error
5716 % "You can't use `\unskip' in vertical mode". There has to be glue
5717 % in the current vertical list that hasn't been added to the
5718 % "current page". See Chapter 24 of the TeXbook. This contradicts
5719 % Section 8.3.7 in "TeX by Topic," though.
5721 \egroup % now comes the box added with \aftergroup
5724 % Like plain.tex's \dotfill, except uses up at least 1 em.
5725 % The filll stretch here overpowers both the fil and fill stretch to push
5726 % the page number to the right.
5727 \def\indexdotfill{\cleaders
5728 \hbox{$
\mathsurround=
0pt
\mkern1.5mu.
\mkern1.5mu$
}\hskip 1em plus
1filll
}
5731 \def\primary #1{\line{#1\hfil}}
5733 \newskip\secondaryindent \secondaryindent=
0.5cm
5734 \def\secondary#1#2{{%
5739 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill
5741 \pdfgettoks#2.\
\the\toksA % The page number ends the paragraph.
5743 \ifx\XeTeXrevision\thisisundefined
5746 \pdfgettoks#2.\
\the\toksA % The page number ends the paragraph.
5752 % Define two-column mode, which we use to typeset indexes.
5753 % Adapted from the TeXbook, page 416, which is to say,
5754 % the manmac.tex format used to print the TeXbook itself.
5755 \catcode`\@=
11 % private names
5758 \newdimen\doublecolumnhsize
5759 \newdimen\doublecolumntopgap
5760 \doublecolumntopgap =
0pt
5762 % Use inside an output routine to save \topmark and \firstmark
5764 \global\savedtopmark=
\expandafter{\topmark }%
5765 \global\savedfirstmark=
\expandafter{\firstmark }%
5767 \newtoks\savedtopmark
5768 \newtoks\savedfirstmark
5770 % Set \topmark and \firstmark for next time \output runs.
5771 % Can't be run from withinside \output (because any material
5772 % added while an output routine is active, including
5773 % penalties, is saved for after it finishes). The page so far
5774 % should be empty, otherwise what's on it will be thrown away.
5776 \mark{\the\savedtopmark}%
5778 \setbox\dummybox=
\box\PAGE
5780 % "abc" because output routine doesn't fire for a completely empty page.
5781 \mark{\the\savedfirstmark}%
5784 \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
5785 % If not much space left on page, start a new page.
5786 \ifdim\pagetotal>
0.8\vsize\vfill\eject\fi
5788 % Grab any single-column material above us.
5791 % Here is a possibility not foreseen in manmac: if we accumulate a
5792 % whole lot of material, we might end up calling this \output
5793 % routine twice in a row (see the doublecol-lose test, which is
5794 % essentially a couple of indexes with @setchapternewpage off). In
5795 % that case we just ship out what is in \partialpage with the normal
5796 % output routine. Generally, \partialpage will be empty when this
5797 % runs and this will be a no-op. See the indexspread.tex test case.
5798 \ifvoid\partialpage \else
5799 \onepageout{\pagecontents\partialpage}%
5802 \global\setbox\partialpage =
\vbox{%
5803 % Unvbox the main output page.
5805 \kern-
\topskip \kern\baselineskip
5809 \eject % run that output routine to set \partialpage
5812 % We recover the two marks that the last output routine saved in order
5813 % to propagate the information in marks added around a chapter heading,
5814 % which could be otherwise be lost by the time the final page is output.
5817 % Use the double-column output routine for subsequent pages.
5818 \output =
{\doublecolumnout}%
5820 % Change the page size parameters. We could do this once outside this
5821 % routine, in each of @smallbook, @afourpaper, and the default 8.5x11
5822 % format, but then we repeat the same computation. Repeating a couple
5823 % of assignments once per index is clearly meaningless for the
5824 % execution time, so we may as well do it in one place.
5826 % First we halve the line length, less a little for the gutter between
5827 % the columns. We compute the gutter based on the line length, so it
5828 % changes automatically with the paper format. The magic constant
5829 % below is chosen so that the gutter has the same value (well, +-<1pt)
5830 % as it did when we hard-coded it.
5832 % We put the result in a separate register, \doublecolumhsize, so we
5833 % can restore it in \pagesofar, after \hsize itself has (potentially)
5836 \doublecolumnhsize =
\hsize
5837 \advance\doublecolumnhsize by -
.04154\hsize
5838 \divide\doublecolumnhsize by
2
5839 \hsize =
\doublecolumnhsize
5841 % Double the \vsize as well. (We don't need a separate register here,
5842 % since nobody clobbers \vsize.)
5843 \global\doublecolumntopgap =
\topskip
5844 \global\advance\doublecolumntopgap by -
1\baselineskip
5845 \advance\vsize by -
1\doublecolumntopgap
5848 \global\entrylinedepth=
0pt
\relax
5851 % The double-column output routine for all double-column pages except
5852 % the last, which is done by \balancecolumns.
5854 \def\doublecolumnout{%
5856 \splittopskip=
\topskip \splitmaxdepth=
\maxdepth
5857 % Get the available space for the double columns -- the normal
5858 % (undoubled) page height minus any material left over from the
5862 \advance\dimen@ by -
\ht\partialpage
5864 % box0 will be the left-hand column, box2 the right.
5865 \setbox0=
\vsplit255 to
\dimen@
\setbox2=
\vsplit255 to
\dimen@
5866 \onepageout\pagesofar
5868 \penalty\outputpenalty
5871 % Re-output the contents of the output page -- any previous material,
5872 % followed by the two boxes we just split, in box0 and box2.
5876 \hsize =
\doublecolumnhsize
5877 \wd0=
\hsize \wd2=
\hsize
5879 \vskip\doublecolumntopgap
5880 \hbox to
\txipagewidth{\box0\hfil\box2}}%
5884 % Finished with with double columns.
5885 \def\enddoublecolumns{%
5886 % The following penalty ensures that the page builder is exercised
5887 % _before_ we change the output routine. This is necessary in the
5888 % following situation:
5890 % The last section of the index consists only of a single entry.
5891 % Before this section, \pagetotal is less than \pagegoal, so no
5892 % break occurs before the last section starts. However, the last
5893 % section, consisting of \initial and the single \entry, does not
5894 % fit on the page and has to be broken off. Without the following
5895 % penalty the page builder will not be exercised until \eject
5896 % below, and by that time we'll already have changed the output
5897 % routine to the \balancecolumns version, so the next-to-last
5898 % double-column page will be processed with \balancecolumns, which
5899 % is wrong: The two columns will go to the main vertical list, with
5900 % the broken-off section in the recent contributions. As soon as
5901 % the output routine finishes, TeX starts reconsidering the page
5902 % break. The two columns and the broken-off section both fit on the
5903 % page, because the two columns now take up only half of the page
5904 % goal. When TeX sees \eject from below which follows the final
5905 % section, it invokes the new output routine that we've set after
5906 % \balancecolumns below; \onepageout will try to fit the two columns
5907 % and the final section into the vbox of \txipageheight (see
5908 % \pagebody), causing an overfull box.
5910 % Note that glue won't work here, because glue does not exercise the
5911 % page builder, unlike penalties (see The TeXbook, pp. 280-281).
5915 % Split the last of the double-column material.
5919 % Having called \balancecolumns once, we do not
5920 % want to call it again. Therefore, reset \output to its normal
5921 % definition right away.
5922 \global\output =
{\onepageout{\pagecontents\PAGE}}%
5925 \endgroup % started in \begindoublecolumns
5927 % Leave the double-column material on the current page, no automatic
5929 \box\balancedcolumns
5931 % \pagegoal was set to the doubled \vsize above, since we restarted
5932 % the current page. We're now back to normal single-column
5933 % typesetting, so reset \pagegoal to the normal \vsize (after the
5934 % \endgroup where \vsize got restored).
5937 \newbox\balancedcolumns
5938 \setbox\balancedcolumns=
\vbox{shouldnt see this
}%
5940 % Only called for the last of the double column material. \doublecolumnout
5942 \def\balancecolumns{%
5943 \setbox0 =
\vbox{\unvbox255}% like \box255 but more efficient, see p.120.
5945 \advance\dimen@ by
\topskip
5946 \advance\dimen@ by-
\baselineskip
5947 \ifdim\dimen@<
14\baselineskip
5948 % Don't split a short final column in two.
5951 \divide\dimen@ by
2 % target to split to
5953 \splittopskip =
\topskip
5954 % Loop until the second column is no higher than the first
5958 \global\setbox3 =
\copy0
5959 \global\setbox1 =
\vsplit3 to
\dimen@
5960 % Remove glue from bottom of first column to
5961 % make sure it is higher than the second.
5962 \global\setbox1 =
\vbox{\unvbox1\unpenalty\unskip}%
5964 \global\advance\dimen@ by
1pt
5968 % The left column has come out longer than the page itself. (Note
5969 % that we have doubled \vsize for the double columns, so
5970 % the actual height of the page is 0.5\vsize). Just split the last
5971 % of the double column material roughly in half.
5973 \setbox0 =
\vsplit2 to
\dimen@ii
5974 \setbox0=
\vbox to
\dimen@ii
{\unvbox0}%
5975 \setbox2=
\vbox to
\dimen@ii
{\unvbox2}%
5977 \multiply\dimen@ii by
5
5978 \divide\dimen@ii by
4
5979 \global\setbox3 =
\copy0
5980 \global\setbox1 =
\vsplit3 to
\dimen@ii
5981 \global\setbox\balancedcolumns=
\vbox{\pagesofar}%
5982 \ifdim\ht3<
\dimen@ii
5983 % Column heights are too different, so don't make their bottoms
5984 % flush with each other. The glue at the end of the second column
5985 % allows a second column to stretch, reducing the difference in
5986 % height between the two.
5987 \setbox0=
\vbox to
\dimen@
{\unvbox1\vfill}%
5988 \setbox2=
\vbox to
\dimen@
{\unvbox3\vskip 0pt plus
0.3\ht0}%
5990 \setbox0=
\vbox to
\dimen@
{\unvbox1}%
5991 \setbox2=
\vbox to
\dimen@
{\unvbox3}%
5996 \global\setbox\balancedcolumns=
\vbox{\pagesofar}%
5998 \catcode`\@ =
\other
6001 \message{sectioning,
}
6002 % Chapters, sections, etc.
6004 % Let's start with @part.
6005 \outer\parseargdef\part{\partzzz{#1}}
6009 \vskip.3\vsize % move it down on the page a bit
6011 \noindent \titlefonts\rmisbold #1\par % the text
6012 \let\lastnode=
\empty % no node to associate with
6013 \writetocentry{part
}{#1}{}% but put it in the toc
6014 \headingsoff % no headline or footline on the part page
6015 % This outputs a mark at the end of the page that clears \thischapter
6016 % and \thissection, as is done in \startcontents.
6017 \let\pchapsepmacro\relax
6018 \chapmacro{}{Yomitfromtoc
}{}%
6023 % \unnumberedno is an oxymoron. But we count the unnumbered
6024 % sections so that we can refer to them unambiguously in the pdf
6025 % outlines by their "section number". We avoid collisions with chapter
6026 % numbers by starting them at 10000. (If a document ever has 10000
6027 % chapters, we're in trouble anyway, I'm sure.)
6028 \newcount\unnumberedno \unnumberedno =
10000
6030 \newcount\secno \secno=
0
6031 \newcount\subsecno \subsecno=
0
6032 \newcount\subsubsecno \subsubsecno=
0
6034 % This counter is funny since it counts through charcodes of letters A, B, ...
6035 \newcount\appendixno \appendixno = `\@
6037 % \def\appendixletter{\char\the\appendixno}
6038 % We do the following ugly conditional instead of the above simple
6039 % construct for the sake of pdftex, which needs the actual
6040 % letter in the expansion, not just typeset.
6042 \def\appendixletter{%
6043 \ifnum\appendixno=`A A
%
6044 \else\ifnum\appendixno=`B B
%
6045 \else\ifnum\appendixno=`C C
%
6046 \else\ifnum\appendixno=`D D
%
6047 \else\ifnum\appendixno=`E E
%
6048 \else\ifnum\appendixno=`F F
%
6049 \else\ifnum\appendixno=`G G
%
6050 \else\ifnum\appendixno=`H H
%
6051 \else\ifnum\appendixno=`I I
%
6052 \else\ifnum\appendixno=`J J
%
6053 \else\ifnum\appendixno=`K K
%
6054 \else\ifnum\appendixno=`L L
%
6055 \else\ifnum\appendixno=`M M
%
6056 \else\ifnum\appendixno=`N N
%
6057 \else\ifnum\appendixno=`O O
%
6058 \else\ifnum\appendixno=`P P
%
6059 \else\ifnum\appendixno=`Q Q
%
6060 \else\ifnum\appendixno=`R R
%
6061 \else\ifnum\appendixno=`S S
%
6062 \else\ifnum\appendixno=`T T
%
6063 \else\ifnum\appendixno=`U U
%
6064 \else\ifnum\appendixno=`V V
%
6065 \else\ifnum\appendixno=`W W
%
6066 \else\ifnum\appendixno=`X X
%
6067 \else\ifnum\appendixno=`Y Y
%
6068 \else\ifnum\appendixno=`Z Z
%
6069 % The \the is necessary, despite appearances, because \appendixletter is
6070 % expanded while writing the .toc file. \char\appendixno is not
6071 % expandable, thus it is written literally, thus all appendixes come out
6072 % with the same letter (or @) in the toc without it.
6073 \else\char\the\appendixno
6074 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
6075 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
6077 % Each @chapter defines these (using marks) as the number+name, number
6078 % and name of the chapter. Page headings and footings can use
6079 % these. @section does likewise.
6081 \def\thischapternum{}
6082 \def\thischaptername{}
6084 \def\thissectionnum{}
6085 \def\thissectionname{}
6087 \newcount\absseclevel % used to calculate proper heading level
6088 \newcount\secbase\secbase=
0 % @raisesections/@lowersections modify this count
6090 % @raisesections: treat @section as chapter, @subsection as section, etc.
6091 \def\raisesections{\global\advance\secbase by -
1}
6092 \let\up=
\raisesections % original BFox name
6094 % @lowersections: treat @chapter as section, @section as subsection, etc.
6095 \def\lowersections{\global\advance\secbase by
1}
6096 \let\down=
\lowersections % original BFox name
6098 % we only have subsub.
6099 \chardef\maxseclevel =
3
6101 % A numbered section within an unnumbered changes to unnumbered too.
6102 % To achieve this, remember the "biggest" unnum. sec. we are currently in:
6103 \chardef\unnlevel =
\maxseclevel
6105 % Trace whether the current chapter is an appendix or not:
6106 % \chapheadtype is "N" or "A", unnumbered chapters are ignored.
6107 \def\chapheadtype{N
}
6109 % Choose a heading macro
6110 % #1 is heading type
6111 % #2 is heading level
6112 % #3 is text for heading
6113 \def\genhead#1#2#3{%
6114 % Compute the abs. sec. level:
6116 \advance\absseclevel by
\secbase
6117 % Make sure \absseclevel doesn't fall outside the range:
6118 \ifnum \absseclevel <
0
6121 \ifnum \absseclevel >
3
6128 \ifnum \absseclevel <
\unnlevel
6129 \chardef\unnlevel =
\absseclevel
6132 % Check for appendix sections:
6133 \ifnum \absseclevel =
0
6134 \edef\chapheadtype{\headtype}%
6136 \if \headtype A
\if \chapheadtype N
%
6137 \errmessage{@appendix... within a non-appendix chapter
}%
6140 % Check for numbered within unnumbered:
6141 \ifnum \absseclevel >
\unnlevel
6144 \chardef\unnlevel =
3
6147 % Now print the heading:
6151 \or \unnumberedseczzz{#3}%
6152 \or \unnumberedsubseczzz{#3}%
6153 \or \unnumberedsubsubseczzz{#3}%
6159 \or \appendixsectionzzz{#3}%
6160 \or \appendixsubseczzz{#3}%
6161 \or \appendixsubsubseczzz{#3}%
6167 \or \numberedsubseczzz{#3}%
6168 \or \numberedsubsubseczzz{#3}%
6172 \suppressfirstparagraphindent
6176 \def\numhead{\genhead N
}
6177 \def\apphead{\genhead A
}
6178 \def\unnmhead{\genhead U
}
6180 % @chapter, @appendix, @unnumbered. Increment top-level counter, reset
6181 % all lower-level sectioning counters to zero.
6183 % Also set \chaplevelprefix, which we prepend to @float sequence numbers
6184 % (e.g., figures), q.v. By default (before any chapter), that is empty.
6185 \let\chaplevelprefix =
\empty
6187 \outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz
6189 % section resetting is \global in case the chapter is in a group, such
6190 % as an @include file.
6191 \global\secno=
0 \global\subsecno=
0 \global\subsubsecno=
0
6192 \global\advance\chapno by
1
6195 \gdef\chaplevelprefix{\the\chapno.
}%
6198 % \putwordChapter can contain complex things in translations.
6199 \toks0=
\expandafter{\putwordChapter}%
6200 \message{\the\toks0 \space \the\chapno}%
6202 % Write the actual heading.
6203 \chapmacro{#1}{Ynumbered
}{\the\chapno}%
6205 % So @section and the like are numbered underneath this chapter.
6206 \global\let\section =
\numberedsec
6207 \global\let\subsection =
\numberedsubsec
6208 \global\let\subsubsection =
\numberedsubsubsec
6211 \outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz
6213 \def\appendixzzz#1{%
6214 \global\secno=
0 \global\subsecno=
0 \global\subsubsecno=
0
6215 \global\advance\appendixno by
1
6216 \gdef\chaplevelprefix{\appendixletter.
}%
6219 % \putwordAppendix can contain complex things in translations.
6220 \toks0=
\expandafter{\putwordAppendix}%
6221 \message{\the\toks0 \space \appendixletter}%
6223 \chapmacro{#1}{Yappendix
}{\appendixletter}%
6225 \global\let\section =
\appendixsec
6226 \global\let\subsection =
\appendixsubsec
6227 \global\let\subsubsection =
\appendixsubsubsec
6230 % normally unnmhead0 calls unnumberedzzz:
6231 \outer\parseargdef\unnumbered{\unnmhead0{#1}}
6232 \def\unnumberedzzz#1{%
6233 \global\secno=
0 \global\subsecno=
0 \global\subsubsecno=
0
6234 \global\advance\unnumberedno by
1
6236 % Since an unnumbered has no number, no prefix for figures.
6237 \global\let\chaplevelprefix =
\empty
6240 % This used to be simply \message{#1}, but TeX fully expands the
6241 % argument to \message. Therefore, if #1 contained @-commands, TeX
6242 % expanded them. For example, in `@unnumbered The @cite{Book}', TeX
6243 % expanded @cite (which turns out to cause errors because \cite is meant
6244 % to be executed, not expanded).
6246 % Anyway, we don't want the fully-expanded definition of @cite to appear
6247 % as a result of the \message, we just want `@cite' itself. We use
6248 % \the<toks register> to achieve this: TeX expands \the<toks> only once,
6249 % simply yielding the contents of <toks register>. (We also do this for
6252 \message{(
\the\toks0)
}%
6254 \chapmacro{#1}{Ynothing
}{\the\unnumberedno}%
6256 \global\let\section =
\unnumberedsec
6257 \global\let\subsection =
\unnumberedsubsec
6258 \global\let\subsubsection =
\unnumberedsubsubsec
6261 % @centerchap is like @unnumbered, but the heading is centered.
6262 \outer\parseargdef\centerchap{%
6263 \let\centerparametersmaybe =
\centerparameters
6265 \let\centerparametersmaybe =
\relax
6268 % @top is like @unnumbered.
6273 \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz
6275 \global\subsecno=
0 \global\subsubsecno=
0 \global\advance\secno by
1
6276 \sectionheading{#1}{sec
}{Ynumbered
}{\the\chapno.
\the\secno}%
6279 % normally calls appendixsectionzzz:
6280 \outer\parseargdef\appendixsection{\apphead1{#1}}
6281 \def\appendixsectionzzz#1{%
6282 \global\subsecno=
0 \global\subsubsecno=
0 \global\advance\secno by
1
6283 \sectionheading{#1}{sec
}{Yappendix
}{\appendixletter.
\the\secno}%
6285 \let\appendixsec\appendixsection
6287 % normally calls unnumberedseczzz:
6288 \outer\parseargdef\unnumberedsec{\unnmhead1{#1}}
6289 \def\unnumberedseczzz#1{%
6290 \global\subsecno=
0 \global\subsubsecno=
0 \global\advance\secno by
1
6291 \sectionheading{#1}{sec
}{Ynothing
}{\the\unnumberedno.
\the\secno}%
6296 % normally calls numberedsubseczzz:
6297 \outer\parseargdef\numberedsubsec{\numhead2{#1}}
6298 \def\numberedsubseczzz#1{%
6299 \global\subsubsecno=
0 \global\advance\subsecno by
1
6300 \sectionheading{#1}{subsec
}{Ynumbered
}{\the\chapno.
\the\secno.
\the\subsecno}%
6303 % normally calls appendixsubseczzz:
6304 \outer\parseargdef\appendixsubsec{\apphead2{#1}}
6305 \def\appendixsubseczzz#1{%
6306 \global\subsubsecno=
0 \global\advance\subsecno by
1
6307 \sectionheading{#1}{subsec
}{Yappendix
}%
6308 {\appendixletter.
\the\secno.
\the\subsecno}%
6311 % normally calls unnumberedsubseczzz:
6312 \outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}}
6313 \def\unnumberedsubseczzz#1{%
6314 \global\subsubsecno=
0 \global\advance\subsecno by
1
6315 \sectionheading{#1}{subsec
}{Ynothing
}%
6316 {\the\unnumberedno.
\the\secno.
\the\subsecno}%
6321 % normally numberedsubsubseczzz:
6322 \outer\parseargdef\numberedsubsubsec{\numhead3{#1}}
6323 \def\numberedsubsubseczzz#1{%
6324 \global\advance\subsubsecno by
1
6325 \sectionheading{#1}{subsubsec
}{Ynumbered
}%
6326 {\the\chapno.
\the\secno.
\the\subsecno.
\the\subsubsecno}%
6329 % normally appendixsubsubseczzz:
6330 \outer\parseargdef\appendixsubsubsec{\apphead3{#1}}
6331 \def\appendixsubsubseczzz#1{%
6332 \global\advance\subsubsecno by
1
6333 \sectionheading{#1}{subsubsec
}{Yappendix
}%
6334 {\appendixletter.
\the\secno.
\the\subsecno.
\the\subsubsecno}%
6337 % normally unnumberedsubsubseczzz:
6338 \outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}}
6339 \def\unnumberedsubsubseczzz#1{%
6340 \global\advance\subsubsecno by
1
6341 \sectionheading{#1}{subsubsec
}{Ynothing
}%
6342 {\the\unnumberedno.
\the\secno.
\the\subsecno.
\the\subsubsecno}%
6345 % These macros control what the section commands do, according
6346 % to what kind of chapter we are in (ordinary, appendix, or unnumbered).
6347 % Define them by default for a numbered chapter.
6348 \let\section =
\numberedsec
6349 \let\subsection =
\numberedsubsec
6350 \let\subsubsection =
\numberedsubsubsec
6352 % Define @majorheading, @heading and @subheading
6355 {\advance\chapheadingskip by
10pt
\chapbreak }%
6356 \parsearg\chapheadingzzz
6359 \def\chapheading{\chapbreak \parsearg\chapheadingzzz}
6360 \def\chapheadingzzz#1{%
6361 \vbox{\chapfonts \raggedtitlesettings #1\par}%
6362 \nobreak\bigskip \nobreak
6363 \suppressfirstparagraphindent
6366 % @heading, @subheading, @subsubheading.
6367 \parseargdef\heading{\sectionheading{#1}{sec
}{Yomitfromtoc
}{}
6368 \suppressfirstparagraphindent}
6369 \parseargdef\subheading{\sectionheading{#1}{subsec
}{Yomitfromtoc
}{}
6370 \suppressfirstparagraphindent}
6371 \parseargdef\subsubheading{\sectionheading{#1}{subsubsec
}{Yomitfromtoc
}{}
6372 \suppressfirstparagraphindent}
6374 % These macros generate a chapter, section, etc. heading only
6375 % (including whitespace, linebreaking, etc. around it),
6376 % given all the information in convenient, parsed form.
6378 % Args are the skip and penalty (usually negative)
6379 \def\dobreak#1#2{\par\ifdim\lastskip<
#1\removelastskip\penalty#2\vskip#1\fi}
6381 % Parameter controlling skip before chapter headings (if needed)
6382 \newskip\chapheadingskip
6384 % Define plain chapter starts, and page on/off switching for it.
6385 \def\chapbreak{\dobreak \chapheadingskip {-
4000}}
6388 \def\chappager{\par\vfill\supereject}
6390 % \chapoddpage - start on an odd page for a new chapter
6391 % Because \domark is called before \chapoddpage, the filler page will
6392 % get the headings for the next chapter, which is wrong. But we don't
6393 % care -- we just disable all headings on the filler page.
6405 \parseargdef\setchapternewpage{\csname CHAPPAG
#1\endcsname}
6408 \global\let\contentsalignmacro =
\chappager
6409 \global\let\pchapsepmacro=
\chapbreak
6410 \global\let\pagealignmacro=
\chappager}
6413 \global\let\contentsalignmacro =
\chappager
6414 \global\let\pchapsepmacro=
\chappager
6415 \global\let\pagealignmacro=
\chappager
6416 \global\def\HEADINGSon{\HEADINGSsingle}}
6419 \global\let\contentsalignmacro =
\chapoddpage
6420 \global\let\pchapsepmacro=
\chapoddpage
6421 \global\let\pagealignmacro=
\chapoddpage
6422 \global\def\HEADINGSon{\HEADINGSdouble}}
6426 % \chapmacro - Chapter opening.
6428 % #1 is the text, #2 is the section type (Ynumbered, Ynothing,
6429 % Yappendix, Yomitfromtoc), #3 the chapter number.
6430 % Not used for @heading series.
6432 % To test against our argument.
6433 \def\Ynothingkeyword{Ynothing
}
6434 \def\Yappendixkeyword{Yappendix
}
6435 \def\Yomitfromtockeyword{Yomitfromtoc
}
6437 \def\chapmacro#1#2#3{%
6438 \expandafter\ifx\thisenv\titlepage\else
6439 \checkenv{}% chapters, etc., should not start inside an environment.
6441 % FIXME: \chapmacro is currently called from inside \titlepage when
6442 % \setcontentsaftertitlepage to print the "Table of Contents" heading, but
6443 % this should probably be done by \sectionheading with an option to print
6446 % Insert the first mark before the heading break (see notes for \domark).
6447 \let\prevchapterdefs=
\lastchapterdefs
6448 \let\prevsectiondefs=
\lastsectiondefs
6449 \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}%
6450 \gdef\thissection{}}%
6453 \ifx\temptype\Ynothingkeyword
6454 \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
6455 \gdef\thischapter{\thischaptername}}%
6456 \else\ifx\temptype\Yomitfromtockeyword
6457 \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
6458 \gdef\thischapter{}}%
6459 \else\ifx\temptype\Yappendixkeyword
6461 \xdef\lastchapterdefs{%
6462 \gdef\noexpand\thischaptername{\the\toks0}%
6463 \gdef\noexpand\thischapternum{\appendixletter}%
6464 % \noexpand\putwordAppendix avoids expanding indigestible
6465 % commands in some of the translations.
6466 \gdef\noexpand\thischapter{\noexpand\putwordAppendix{}
6467 \noexpand\thischapternum:
6468 \noexpand\thischaptername}%
6472 \xdef\lastchapterdefs{%
6473 \gdef\noexpand\thischaptername{\the\toks0}%
6474 \gdef\noexpand\thischapternum{\the\chapno}%
6475 % \noexpand\putwordChapter avoids expanding indigestible
6476 % commands in some of the translations.
6477 \gdef\noexpand\thischapter{\noexpand\putwordChapter{}
6478 \noexpand\thischapternum:
6479 \noexpand\thischaptername}%
6483 % Output the mark. Pass it through \safewhatsit, to take care of
6484 % the preceding space.
6487 % Insert the chapter heading break.
6490 % Now the second mark, after the heading break. No break points
6491 % between here and the heading.
6492 \let\prevchapterdefs=
\lastchapterdefs
6493 \let\prevsectiondefs=
\lastsectiondefs
6497 \chapfonts \rmisbold
6498 \let\footnote=
\errfootnoteheading % give better error message
6500 % Have to define \lastsection before calling \donoderef, because the
6501 % xref code eventually uses it. On the other hand, it has to be called
6502 % after \pchapsepmacro, or the headline will change too soon.
6503 \gdef\lastsection{#1}%
6505 % Only insert the separating space if we have a chapter/appendix
6506 % number, and don't print the unnumbered ``number''.
6507 \ifx\temptype\Ynothingkeyword
6509 \def\toctype{unnchap
}%
6510 \else\ifx\temptype\Yomitfromtockeyword
6511 \setbox0 =
\hbox{}% contents like unnumbered, but no toc entry
6513 \else\ifx\temptype\Yappendixkeyword
6514 \setbox0 =
\hbox{\putwordAppendix{} #3\enspace}%
6517 \setbox0 =
\hbox{#3\enspace}%
6518 \def\toctype{numchap
}%
6521 % Write the toc entry for this chapter. Must come before the
6522 % \donoderef, because we include the current node name in the toc
6523 % entry, and \donoderef resets it to empty.
6524 \writetocentry{\toctype}{#1}{#3}%
6526 % For pdftex, we have to write out the node definition (aka, make
6527 % the pdfdest) after any page break, but before the actual text has
6528 % been typeset. If the destination for the pdf outline is after the
6529 % text, then jumping from the outline may wind up with the text not
6530 % being visible, for instance under high magnification.
6533 % Typeset the actual heading.
6534 \nobreak % Avoid page breaks at the interline glue.
6535 \vbox{\raggedtitlesettings \hangindent=
\wd0 \centerparametersmaybe
6538 \nobreak\bigskip % no page break after a chapter title
6542 % @centerchap -- centered and unnumbered.
6543 \let\centerparametersmaybe =
\relax
6544 \def\centerparameters{%
6545 \advance\rightskip by
3\rightskip
6546 \leftskip =
\rightskip
6551 % Section titles. These macros combine the section number parts and
6552 % call the generic \sectionheading to do the printing.
6554 \newskip\secheadingskip
6555 \def\secheadingbreak{\dobreak \secheadingskip{-
1000}}
6557 % Subsection titles.
6558 \newskip\subsecheadingskip
6559 \def\subsecheadingbreak{\dobreak \subsecheadingskip{-
500}}
6561 % Subsubsection titles.
6562 \def\subsubsecheadingskip{\subsecheadingskip}
6563 \def\subsubsecheadingbreak{\subsecheadingbreak}
6566 % Print any size, any type, section title.
6568 % #1 is the text of the title,
6569 % #2 is the section level (sec/subsec/subsubsec),
6570 % #3 is the section type (Ynumbered, Ynothing, Yappendix, Yomitfromtoc),
6571 % #4 is the section number.
6573 \def\seckeyword{sec
}
6575 \def\sectionheading#1#2#3#4{%
6577 \def\sectionlevel{#2}%
6580 % It is ok for the @heading series commands to appear inside an
6581 % environment (it's been historically allowed, though the logic is
6582 % dubious), but not the others.
6583 \ifx\temptype\Yomitfromtockeyword\else
6584 \checkenv{}% non-@*heading should not be in an environment.
6586 \let\footnote=
\errfootnoteheading
6588 % Switch to the right set of fonts.
6589 \csname #2fonts
\endcsname \rmisbold
6591 % Insert first mark before the heading break (see notes for \domark).
6592 \let\prevsectiondefs=
\lastsectiondefs
6593 \ifx\temptype\Ynothingkeyword
6594 \ifx\sectionlevel\seckeyword
6595 \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}%
6596 \gdef\thissection{\thissectionname}}%
6598 \else\ifx\temptype\Yomitfromtockeyword
6599 % Don't redefine \thissection.
6600 \else\ifx\temptype\Yappendixkeyword
6601 \ifx\sectionlevel\seckeyword
6603 \xdef\lastsectiondefs{%
6604 \gdef\noexpand\thissectionname{\the\toks0}%
6605 \gdef\noexpand\thissectionnum{#4}%
6606 % \noexpand\putwordSection avoids expanding indigestible
6607 % commands in some of the translations.
6608 \gdef\noexpand\thissection{\noexpand\putwordSection{}
6609 \noexpand\thissectionnum:
6610 \noexpand\thissectionname}%
6614 \ifx\sectionlevel\seckeyword
6616 \xdef\lastsectiondefs{%
6617 \gdef\noexpand\thissectionname{\the\toks0}%
6618 \gdef\noexpand\thissectionnum{#4}%
6619 % \noexpand\putwordSection avoids expanding indigestible
6620 % commands in some of the translations.
6621 \gdef\noexpand\thissection{\noexpand\putwordSection{}
6622 \noexpand\thissectionnum:
6623 \noexpand\thissectionname}%
6628 % Go into vertical mode. Usually we'll already be there, but we
6629 % don't want the following whatsit to end up in a preceding paragraph
6630 % if the document didn't happen to have a blank line.
6633 % Output the mark. Pass it through \safewhatsit, to take care of
6634 % the preceding space.
6637 % Insert space above the heading.
6638 \csname #2headingbreak
\endcsname
6640 % Now the second mark, after the heading break. No break points
6641 % between here and the heading.
6642 \global\let\prevsectiondefs=
\lastsectiondefs
6645 % Only insert the space after the number if we have a section number.
6646 \ifx\temptype\Ynothingkeyword
6649 \gdef\lastsection{#1}%
6650 \else\ifx\temptype\Yomitfromtockeyword
6651 % for @headings -- no section number, don't include in toc,
6652 % and don't redefine \lastsection.
6655 \let\sectionlevel=
\empty
6656 \else\ifx\temptype\Yappendixkeyword
6657 \setbox0 =
\hbox{#4\enspace}%
6659 \gdef\lastsection{#1}%
6661 \setbox0 =
\hbox{#4\enspace}%
6663 \gdef\lastsection{#1}%
6666 % Write the toc entry (before \donoderef). See comments in \chapmacro.
6667 \writetocentry{\toctype\sectionlevel}{#1}{#4}%
6669 % Write the node reference (= pdf destination for pdftex).
6670 % Again, see comments in \chapmacro.
6673 % Interline glue will be inserted when the vbox is completed.
6674 % That glue will be a valid breakpoint for the page, since it'll be
6675 % preceded by a whatsit (usually from the \donoderef, or from the
6676 % \writetocentry if there was no node). We don't want to allow that
6677 % break, since then the whatsits could end up on page n while the
6678 % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000.
6681 % Output the actual section heading.
6682 \vbox{\hyphenpenalty=
10000 \tolerance=
5000 \parindent=
0pt
\ptexraggedright
6683 \hangindent=
\wd0 % zero if no section number
6686 % Add extra space after the heading -- half of whatever came above it.
6687 % Don't allow stretch, though.
6688 \kern .5 \csname #2headingskip
\endcsname
6690 % Do not let the kern be a potential breakpoint, as it would be if it
6691 % was followed by glue.
6694 % We'll almost certainly start a paragraph next, so don't let that
6695 % glue accumulate. (Not a breakpoint because it's preceded by a
6696 % discardable item.) However, when a paragraph is not started next
6697 % (\startdefun, \cartouche, \center, etc.), this needs to be wiped out
6698 % or the negative glue will cause weirdly wrong output, typically
6699 % obscuring the section heading with something else.
6702 % This is so the last item on the main vertical list is a known
6703 % \penalty > 10000, so \startdefun, etc., can recognize the situation
6704 % and do the needful.
6710 % Table of contents.
6713 % Write an entry to the toc file, opening it if necessary.
6714 % Called from @chapter, etc.
6716 % Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno}
6717 % We append the current node name (if any) and page number as additional
6718 % arguments for the \{chap,sec,...}entry macros which will eventually
6719 % read this. The node name is used in the pdf outlines as the
6720 % destination to jump to.
6722 % We open the .toc file for writing here instead of at @setfilename (or
6723 % any other fixed time) so that @contents can be anywhere in the document.
6724 % But if #1 is `omit', then we don't do anything. This is used for the
6725 % table of contents chapter openings themselves.
6727 \newif\iftocfileopened
6728 \def\omitkeyword{omit
}%
6730 \def\writetocentry#1#2#3{%
6731 \edef\writetoctype{#1}%
6732 \ifx\writetoctype\omitkeyword \else
6733 \iftocfileopened\else
6734 \immediate\openout\tocfile =
\jobname.toc
6735 \global\tocfileopenedtrue
6741 \write\tocfile{@
#1entry
{#2}{#3}{\lastnode}{\noexpand\folio}}}%
6747 % Tell \shipout to create a pdf destination on each page, if we're
6748 % writing pdf. These are used in the table of contents. We can't
6749 % just write one on every page because the title pages are numbered
6750 % 1 and 2 (the page numbers aren't printed), and so are the first
6751 % two pages of the document. Thus, we'd have two destinations named
6752 % `1', and two named `2'.
6754 \global\pdfmakepagedesttrue
6756 \ifx\XeTeXrevision\thisisundefined
6758 \global\pdfmakepagedesttrue
6764 % These characters do not print properly in the Computer Modern roman
6765 % fonts, so we must take special care. This is more or less redundant
6766 % with the Texinfo input format setup at the end of this file.
6768 \def\activecatcodes{%
6781 % Read the toc file, which is essentially Texinfo input.
6785 \input \tocreadfilename
6788 \newskip\contentsrightmargin \contentsrightmargin=
1in
6789 \newcount\savepageno
6790 \newcount\lastnegativepageno \lastnegativepageno = -
1
6792 % Prepare to read what we've written to \tocfile.
6794 \def\startcontents#1{%
6795 % If @setchapternewpage on, and @headings double, the contents should
6796 % start on an odd page, unlike chapters. Thus, we maintain
6797 % \contentsalignmacro in parallel with \pagealignmacro.
6798 % From: Torbjorn Granlund <tege@matematik.su.se>
6800 \immediate\closeout\tocfile
6802 % Don't need to put `Contents' or `Short Contents' in the headline.
6803 % It is abundantly clear what they are.
6804 \chapmacro{#1}{Yomitfromtoc
}{}%
6806 \savepageno =
\pageno
6807 \begingroup % Set up to handle contents files properly.
6808 \raggedbottom % Worry more about breakpoints than the bottom.
6809 \entryrightmargin=
\contentsrightmargin % Don't use the full line length.
6811 % Roman numerals for page numbers.
6812 \ifnum \pageno>
0 \global\pageno =
\lastnegativepageno \fi
6815 % redefined for the two-volume lispref. We always output on
6816 % \jobname.toc even if this is redefined.
6818 \def\tocreadfilename{\jobname.toc
}
6820 % Normal (long) toc.
6823 \startcontents{\putwordTOC}%
6824 \openin 1 \tocreadfilename\space
6829 \contentsalignmacro % in case @setchapternewpage odd is in effect
6835 \lastnegativepageno =
\pageno
6836 \global\pageno =
\savepageno
6839 % And just the chapters.
6840 \def\summarycontents{%
6841 \startcontents{\putwordShortTOC}%
6843 \let\partentry =
\shortpartentry
6844 \let\numchapentry =
\shortchapentry
6845 \let\appentry =
\shortchapentry
6846 \let\unnchapentry =
\shortunnchapentry
6847 % We want a true roman here for the page numbers.
6849 \let\rm=
\shortcontrm \let\bf=
\shortcontbf
6850 \let\sl=
\shortcontsl \let\tt=
\shortconttt
6852 \hyphenpenalty =
10000
6853 \advance\baselineskip by
1pt
% Open it up a little.
6854 \def\numsecentry#
#1#
#2#
#3#
#4{}
6855 \let\appsecentry =
\numsecentry
6856 \let\unnsecentry =
\numsecentry
6857 \let\numsubsecentry =
\numsecentry
6858 \let\appsubsecentry =
\numsecentry
6859 \let\unnsubsecentry =
\numsecentry
6860 \let\numsubsubsecentry =
\numsecentry
6861 \let\appsubsubsecentry =
\numsecentry
6862 \let\unnsubsubsecentry =
\numsecentry
6863 \openin 1 \tocreadfilename\space
6869 \contentsalignmacro % in case @setchapternewpage odd is in effect
6871 \lastnegativepageno =
\pageno
6872 \global\pageno =
\savepageno
6874 \let\shortcontents =
\summarycontents
6876 % Typeset the label for a chapter or appendix for the short contents.
6877 % The arg is, e.g., `A' for an appendix, or `3' for a chapter.
6879 \def\shortchaplabel#1{%
6880 % This space should be enough, since a single number is .5em, and the
6881 % widest letter (M) is 1em, at least in the Computer Modern fonts.
6882 % But use \hss just in case.
6883 % (This space doesn't include the extra space that gets added after
6884 % the label; that gets put in by \shortchapentry above.)
6886 % We'd like to right-justify chapter numbers, but that looks strange
6887 % with appendix letters. And right-justifying numbers and
6888 % left-justifying letters looks strange when there is less than 10
6889 % chapters. Have to read the whole toc once to know how many chapters
6890 % there are before deciding ...
6891 \hbox to
1em
{#1\hss}%
6894 % These macros generate individual entries in the table of contents.
6895 % The first argument is the chapter or section name.
6896 % The last argument is the page number.
6897 % The arguments in between are the chapter number, section number, ...
6899 % Parts, in the main contents. Replace the part number, which doesn't
6900 % exist, with an empty box. Let's hope all the numbers have the same width.
6901 % Also ignore the page number, which is conventionally not printed.
6902 \def\numeralbox{\setbox0=
\hbox{8}\hbox to
\wd0{\hfil}}
6903 \def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}}
6905 % Parts, in the short toc.
6906 \def\shortpartentry#1#2#3#4{%
6908 \vskip.5\baselineskip plus
.15\baselineskip minus
.1\baselineskip
6909 \shortchapentry{{\bf #1}}{\numeralbox}{}{}%
6912 % Chapters, in the main contents.
6913 \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
6915 % Chapters, in the short toc.
6916 % See comments in \dochapentry re vbox and related settings.
6917 \def\shortchapentry#1#2#3#4{%
6918 \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}%
6921 % Appendices, in the main contents.
6922 % Need the word Appendix, and a fixed-size box.
6924 \def\appendixbox#1{%
6925 % We use M since it's probably the widest letter.
6926 \setbox0 =
\hbox{\putwordAppendix{} M
}%
6927 \hbox to
\wd0{\putwordAppendix{} #1\hss}}
6929 \def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\hskip.7em
#1}{#4}}
6931 % Unnumbered chapters.
6932 \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}}
6933 \def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}}
6936 \def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}}
6937 \let\appsecentry=
\numsecentry
6938 \def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}}
6941 \def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}}
6942 \let\appsubsecentry=
\numsubsecentry
6943 \def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}}
6945 % And subsubsections.
6946 \def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}}
6947 \let\appsubsubsecentry=
\numsubsubsecentry
6948 \def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}}
6950 % This parameter controls the indentation of the various levels.
6951 % Same as \defaultparindent.
6952 \newdimen\tocindent \tocindent =
15pt
6954 % Now for the actual typesetting. In all these, #1 is the text and #2 is the
6957 % If the toc has to be broken over pages, we want it to be at chapters
6958 % if at all possible; hence the \penalty.
6959 \def\dochapentry#1#2{%
6960 \penalty-
300 \vskip1\baselineskip plus
.33\baselineskip minus
.25\baselineskip
6962 % Move the page numbers slightly to the right
6963 \advance\entryrightmargin by -
0.05em
6965 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
6967 \nobreak\vskip .25\baselineskip plus
.1\baselineskip
6970 \def\dosecentry#1#2{\begingroup
6971 \secentryfonts \leftskip=
\tocindent
6972 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
6975 \def\dosubsecentry#1#2{\begingroup
6976 \subsecentryfonts \leftskip=
2\tocindent
6977 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
6980 \def\dosubsubsecentry#1#2{\begingroup
6981 \subsubsecentryfonts \leftskip=
3\tocindent
6982 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
6985 % We use the same \entry macro as for the index entries.
6986 \let\tocentry =
\entry
6988 % Space between chapter (or whatever) number and the title.
6989 \def\labelspace{\hskip1em \relax}
6991 \def\dopageno#1{{\rm #1}}
6992 \def\doshortpageno#1{{\rm #1}}
6994 \def\chapentryfonts{\secfonts \rm}
6995 \def\secentryfonts{\textfonts}
6996 \def\subsecentryfonts{\textfonts}
6997 \def\subsubsecentryfonts{\textfonts}
7000 \message{environments,
}
7001 % @foo ... @end foo.
7003 % @tex ... @end tex escapes into raw TeX temporarily.
7004 % One exception: @ is still an escape character, so that @end tex works.
7005 % But \@ or @@ will get a plain @ character.
7008 \setupmarkupstyle{tex
}%
7009 \catcode `\\=
0 \catcode `\
{=
1 \catcode `\
}=
2
7010 \catcode `\$=
3 \catcode `\&=
4 \catcode `\#=
6
7011 \catcode `\^=
7 \catcode `
\_=
8 \catcode `\~=
\active \let~=
\tie
7021 % ' is active in math mode (mathcode"8000). So reset it, and all our
7022 % other math active characters (just in case), to plain's definitions.
7025 % Inverse of the list at the beginning of the file.
7027 \let\bullet=
\ptexbullet
7032 \let\equiv=
\ptexequiv
7035 \let\indent=
\ptexindent
7036 \let\noindent=
\ptexnoindent
7043 %\let\sup=\ptexsup % do not redefine, we want @sup to work in math mode
7045 \expandafter \let\csname top
\endcsname=
\ptextop % we've made it outer
7046 \let\frenchspacing=
\plainfrenchspacing
7048 \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
7049 \def\enddots{\relax\ifmmode\endldots\else$
\mathsurround=
0pt
\endldots\,$
\fi}%
7052 % There is no need to define \Etex.
7054 % Define @lisp ... @end lisp.
7055 % @lisp environment forms a group so it can rebind things,
7056 % including the definition of @end lisp (which normally is erroneous).
7058 % Amount to narrow the margins by for @lisp.
7059 \newskip\lispnarrowing \lispnarrowing=
0.4in
7061 % This is the definition that ^^M gets inside @lisp, @example, and other
7062 % such environments. \null is better than a space, since it doesn't
7064 \def\lisppar{\null\endgraf}
7066 % This space is always present above and below environments.
7067 \newskip\envskipamount \envskipamount =
0pt
7069 % Make spacing and below environment symmetrical. We use \parskip here
7070 % to help in doing that, since in @example-like environments \parskip
7071 % is reset to zero; thus the \afterenvbreak inserts no space -- but the
7072 % start of the next paragraph will insert \parskip.
7074 \def\aboveenvbreak{{%
7075 % =10000 instead of <10000 because of a special case in \itemzzz and
7076 % \sectionheading, q.v.
7077 \ifnum \lastpenalty=
10000 \else
7078 \advance\envskipamount by
\parskip
7080 \ifdim\lastskip<
\envskipamount
7082 \ifnum\lastpenalty<
10000
7083 % Penalize breaking before the environment, because preceding text
7084 % often leads into it.
7087 \vskip\envskipamount
7092 \def\afterenvbreak{{%
7093 % =10000 instead of <10000 because of a special case in \itemzzz and
7094 % \sectionheading, q.v.
7095 \ifnum \lastpenalty=
10000 \else
7096 \advance\envskipamount by
\parskip
7098 \ifdim\lastskip<
\envskipamount
7100 % it's not a good place to break if the last penalty was \nobreak
7102 \ifnum\lastpenalty<
10000 \penalty-
50 \fi
7103 \vskip\envskipamount
7108 % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will
7109 % also clear it, so that its embedded environments do the narrowing again.
7110 \let\nonarrowing=
\relax
7112 % @cartouche ... @end cartouche: draw rectangle w/rounded corners around
7113 % environment contents.
7114 \font\circle=lcircle10
7116 \newdimen\cartouter\newdimen\cartinner
7117 \newskip\normbskip\newskip\normpskip\newskip\normlskip
7118 \circthick=
\fontdimen8\circle
7120 \def\ctl{{\circle\char'
013\hskip -
6pt
}}% 6pt from pl file: 1/2charwidth
7121 \def\ctr{{\hskip 6pt
\circle\char'
010}}
7122 \def\cbl{{\circle\char'
012\hskip -
6pt
}}
7123 \def\cbr{{\hskip 6pt
\circle\char'
011}}
7124 \def\carttop{\hbox to
\cartouter{\hskip\lskip
7125 \ctl\leaders\hrule height
\circthick\hfil\ctr
7127 \def\cartbot{\hbox to
\cartouter{\hskip\lskip
7128 \cbl\leaders\hrule height
\circthick\hfil\cbr
7131 \newskip\lskip\newskip\rskip
7134 \ifhmode\par\fi % can't be in the midst of a paragraph.
7136 \lskip=
\leftskip \rskip=
\rightskip
7137 \leftskip=
0pt
\rightskip=
0pt
% we want these *outside*.
7138 \cartinner=
\hsize \advance\cartinner by-
\lskip
7139 \advance\cartinner by-
\rskip
7141 \advance\cartouter by
18.4pt
% allow for 3pt kerns on either
7142 % side, and for 6pt waste from
7143 % each corner char, and rule thickness
7144 \normbskip=
\baselineskip \normpskip=
\parskip \normlskip=
\lineskip
7146 % If this cartouche directly follows a sectioning command, we need the
7147 % \parskip glue (backspaced over by default) or the cartouche can
7148 % collide with the section heading.
7149 \ifnum\lastpenalty>
10000 \vskip\parskip \penalty\lastpenalty \fi
7151 \setbox\groupbox=
\vbox\bgroup
7152 \baselineskip=
0pt
\parskip=
0pt
\lineskip=
0pt
7160 \baselineskip=
\normbskip
7161 \lineskip=
\normlskip
7164 \comment % For explanation, see the end of def\group.
7180 % This macro is called at the beginning of all the @example variants,
7182 \newdimen\nonfillparindent
7185 \ifdim\hfuzz <
12pt
\hfuzz =
12pt
\fi % Don't be fussy
7186 \sepspaces % Make spaces be word-separators rather than space tokens.
7187 \let\par =
\lisppar % don't ignore blank lines
7188 \obeylines % each line of input is a line of output
7190 % Turn off paragraph indentation but redefine \indent to emulate
7191 % the normal \indent.
7192 \nonfillparindent=
\parindent
7194 \let\indent\nonfillindent
7196 \emergencystretch =
0pt
% don't try to avoid overfull boxes
7197 \ifx\nonarrowing\relax
7198 \advance \leftskip by
\lispnarrowing
7199 \exdentamount=
\lispnarrowing
7201 \let\nonarrowing =
\relax
7203 \let\exdent=
\nofillexdent
7208 % We want to swallow spaces (but not other tokens) after the fake
7209 % @indent in our nonfill-environments, where spaces are normally
7210 % active and set to @tie, resulting in them not being ignored after
7212 \gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}%
7213 \gdef\nonfillindentcheck{%
7215 \expandafter\nonfillindentgobble%
7217 \leavevmode\nonfillindentbox%
7221 \def\nonfillindentgobble#1{\nonfillindent}
7222 \def\nonfillindentbox{\hbox to
\nonfillparindent{\hss}}
7224 % If you want all examples etc. small: @set dispenvsize small.
7225 % If you want even small examples the full size: @set dispenvsize nosmall.
7226 % This affects the following displayed environments:
7227 % @example, @display, @format, @lisp
7229 \def\smallword{small
}
7230 \def\nosmallword{nosmall
}
7231 \let\SETdispenvsize\relax
7232 \def\setnormaldispenv{%
7233 \ifx\SETdispenvsize\smallword
7234 % end paragraph for sake of leading, in case document has no blank
7235 % line. This is redundant with what happens in \aboveenvbreak, but
7236 % we need to do it before changing the fonts, and it's inconvenient
7237 % to change the fonts afterward.
7238 \ifnum \lastpenalty=
10000 \else \endgraf \fi
7239 \smallexamplefonts \rm
7242 \def\setsmalldispenv{%
7243 \ifx\SETdispenvsize\nosmallword
7245 \ifnum \lastpenalty=
10000 \else \endgraf \fi
7246 \smallexamplefonts \rm
7250 % We often define two environments, @foo and @smallfoo.
7251 % Let's do it in one command. #1 is the env name, #2 the definition.
7252 \def\makedispenvdef#1#2{%
7253 \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}%
7254 \expandafter\envdef\csname small
#1\endcsname {\setsmalldispenv #2}%
7255 \expandafter\let\csname E
#1\endcsname \afterenvbreak
7256 \expandafter\let\csname Esmall
#1\endcsname \afterenvbreak
7259 % Define two environment synonyms (#1 and #2) for an environment.
7260 \def\maketwodispenvdef#1#2#3{%
7261 \makedispenvdef{#1}{#3}%
7262 \makedispenvdef{#2}{#3}%
7265 % @lisp: indented, narrowed, typewriter font;
7266 % @example: same as @lisp.
7268 % @smallexample and @smalllisp: use smaller fonts.
7269 % Originally contributed by Pavel@xerox.
7271 \maketwodispenvdef{lisp
}{example
}{%
7273 \tt\setupmarkupstyle{example
}%
7274 \let\kbdfont =
\kbdexamplefont % Allow @kbd to do something special.
7275 \gobble % eat return
7277 % @display/@smalldisplay: same as @lisp except keep current font.
7279 \makedispenvdef{display
}{%
7284 % @format/@smallformat: same as @display except don't narrow margins.
7286 \makedispenvdef{format
}{%
7287 \let\nonarrowing = t
%
7292 % @flushleft: same as @format, but doesn't obey \SETdispenvsize.
7294 \let\nonarrowing = t
%
7298 \let\Eflushleft =
\afterenvbreak
7302 \envdef\flushright{%
7303 \let\nonarrowing = t
%
7305 \advance\leftskip by
0pt plus
1fill
\relax
7308 \let\Eflushright =
\afterenvbreak
7311 % @raggedright does more-or-less normal line breaking but no right
7312 % justification. From plain.tex. Don't stretch around special
7313 % characters in urls in this environment, since the stretch at the right
7315 \envdef\raggedright{%
7316 \rightskip0pt plus2.4em
\spaceskip.3333em
\xspaceskip.5em
\relax
7317 \def\urefprestretchamount{0pt
}%
7318 \def\urefpoststretchamount{0pt
}%
7320 \let\Eraggedright\par
7322 \envdef\raggedleft{%
7323 \parindent=
0pt
\leftskip0pt plus2em
7324 \spaceskip.3333em
\xspaceskip.5em
\parfillskip=
0pt
7325 \hbadness=
10000 % Last line will usually be underfull, so turn off
7326 % badness reporting.
7328 \let\Eraggedleft\par
7330 \envdef\raggedcenter{%
7331 \parindent=
0pt
\rightskip0pt plus1em
\leftskip0pt plus1em
7332 \spaceskip.3333em
\xspaceskip.5em
\parfillskip=
0pt
7333 \hbadness=
10000 % Last line will usually be underfull, so turn off
7334 % badness reporting.
7336 \let\Eraggedcenter\par
7339 % @quotation does normal linebreaking (hence we can't use \nonfillstart)
7340 % and narrows the margins. We keep \parskip nonzero in general, since
7341 % we're doing normal filling. So, when using \aboveenvbreak and
7342 % \afterenvbreak, temporarily make \parskip 0.
7344 \makedispenvdef{quotation
}{\quotationstart}
7346 \def\quotationstart{%
7347 \indentedblockstart % same as \indentedblock, but increase right margin too.
7348 \ifx\nonarrowing\relax
7349 \advance\rightskip by
\lispnarrowing
7351 \parsearg\quotationlabel
7354 % We have retained a nonzero parskip for the environment, since we're
7355 % doing normal filling.
7359 \ifx\quotationauthor\thisisundefined\else
7361 \leftline{\kern 2\leftskip \sl ---
\quotationauthor}%
7363 {\parskip=
0pt
\afterenvbreak}%
7365 \def\Esmallquotation{\Equotation}
7367 % If we're given an argument, typeset it in bold with a colon after.
7368 \def\quotationlabel#1{%
7370 \ifx\temp\empty \else
7375 % @indentedblock is like @quotation, but indents only on the left and
7376 % has no optional argument.
7378 \makedispenvdef{indentedblock
}{\indentedblockstart}
7380 \def\indentedblockstart{%
7381 {\parskip=
0pt
\aboveenvbreak}% because \aboveenvbreak inserts \parskip
7384 % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
7385 \ifx\nonarrowing\relax
7386 \advance\leftskip by
\lispnarrowing
7387 \exdentamount =
\lispnarrowing
7389 \let\nonarrowing =
\relax
7393 % Keep a nonzero parskip for the environment, since we're doing normal filling.
7395 \def\Eindentedblock{%
7397 {\parskip=
0pt
\afterenvbreak}%
7399 \def\Esmallindentedblock{\Eindentedblock}
7402 % LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
7403 % If we want to allow any <char> as delimiter,
7404 % we need the curly braces so that makeinfo sees the @verb command, eg:
7405 % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org
7407 % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook.
7409 % [Knuth] p.344; only we need to do the other characters Texinfo sets
7410 % active too. Otherwise, they get lost as the first character on a
7413 \do\
\do\\
\do\
{\do\
}\do\$
\do\&
%
7414 \do\#
\do\^
\do\^^K
\do\_\do\^^A
\do\%
\do\~
%
7415 \do\<
\do\>
\do\|
\do\@
\do+
\do\"
%
7416 % Don't do the quotes -- if we do, @set txicodequoteundirected and
7417 % @set txicodequotebacktick will not have effect on @verb and
7418 % @verbatim, and ?` and !` ligatures won't get disabled.
7423 \def\uncatcodespecials{%
7424 \def\do#
#1{\catcode`#
#1=
\other}\dospecials}
7426 % Setup for the @verb command.
7428 % Eight spaces for a tab
7430 \catcode`\^^I=
\active
7431 \gdef\tabeightspaces{\catcode`\^^I=
\active\def^^I
{\ \ \ \ \ \ \ \
}}
7435 \tt % easiest (and conventionally used) font for verbatim
7436 \def\par{\leavevmode\endgraf}%
7437 \setupmarkupstyle{verb
}%
7439 % Respect line breaks,
7440 % print special symbols as themselves, and
7441 % make each space count
7442 % must do in this order:
7443 \obeylines \uncatcodespecials \sepspaces
7446 % Setup for the @verbatim environment
7448 % Real tab expansion.
7449 \newdimen\tabw \setbox0=
\hbox{\tt\space} \tabw=
8\wd0 % tab amount
7451 % We typeset each line of the verbatim in an \hbox, so we can handle
7452 % tabs. The \global is in case the verbatim line starts with an accent,
7453 % or some other command that starts with a begin-group. Otherwise, the
7454 % entire \verbbox would disappear at the corresponding end-group, before
7455 % it is typeset. Meanwhile, we can't have nested verbatim commands
7456 % (can we?), so the \global won't be overwriting itself.
7458 \def\starttabbox{\global\setbox\verbbox=
\hbox\bgroup}
7461 \catcode`\^^I=
\active
7463 \catcode`\^^I=
\active
7464 \def^^I
{\leavevmode\egroup
7465 \dimen\verbbox=
\wd\verbbox % the width so far, or since the previous tab
7466 \divide\dimen\verbbox by
\tabw
7467 \multiply\dimen\verbbox by
\tabw % compute previous multiple of \tabw
7468 \advance\dimen\verbbox by
\tabw % advance to next multiple of \tabw
7469 \wd\verbbox=
\dimen\verbbox \box\verbbox \starttabbox
7474 % start the verbatim environment.
7475 \def\setupverbatim{%
7476 \let\nonarrowing = t
%
7478 \tt % easiest (and conventionally used) font for verbatim
7479 % The \leavevmode here is for blank lines. Otherwise, we would
7480 % never \starttabox and the \egroup would end verbatim mode.
7481 \def\par{\leavevmode\egroup\box\verbbox\endgraf}%
7483 \setupmarkupstyle{verbatim
}%
7484 % Respect line breaks,
7485 % print special symbols as themselves, and
7486 % make each space count.
7487 % Must do in this order:
7488 \obeylines \uncatcodespecials \sepspaces
7489 \everypar{\starttabbox}%
7492 % Do the @verb magic: verbatim text is quoted by unique
7493 % delimiter characters. Before first delimiter expect a
7494 % right brace, after last delimiter expect closing brace:
7496 % \def\doverb'{'<char>#1<char>'}'{#1}
7498 % [Knuth] p. 382; only eat outer {}
7500 \catcode`
[=
1\catcode`
]=
2\catcode`\
{=
\other\catcode`\
}=
\other
7501 \gdef\doverb{#1[\def\next#
#1#1}[#
#1\endgroup]\next]
7504 \def\verb{\begingroup\setupverb\doverb}
7507 % Do the @verbatim magic: define the macro \doverbatim so that
7508 % the (first) argument ends when '@end verbatim' is reached, ie:
7510 % \def\doverbatim#1@end verbatim{#1}
7512 % For Texinfo it's a lot easier than for LaTeX,
7513 % because texinfo's \verbatim doesn't stop at '\end{verbatim}':
7514 % we need not redefine '\', '{' and '}'.
7516 % Inspired by LaTeX's verbatim command set [latex.ltx]
7521 % ignore everything up to the first ^^M, that's the newline at the end
7522 % of the @verbatim input line itself. Otherwise we get an extra blank
7523 % line in the output.
7524 \xdef\doverbatim#1^^M
#2@end verbatim
{#2\noexpand\end\gobble verbatim
}%
7525 % We really want {...\end verbatim} in the body of the macro, but
7526 % without the active space; thus we have to use \xdef and \gobble.
7530 \setupverbatim\doverbatim
7532 \let\Everbatim =
\afterenvbreak
7535 % @verbatiminclude FILE - insert text of file in verbatim environment.
7537 \def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude}
7539 \def\doverbatiminclude#1{%
7541 \makevalueexpandable
7543 \indexnofonts % Allow `@@' and other weird things in file names.
7544 \wlog{texinfo.tex: doing @verbatiminclude of
#1^^J
}%
7550 % @copying ... @end copying.
7551 % Save the text away for @insertcopying later.
7553 % We save the uninterpreted tokens, rather than creating a box.
7554 % Saving the text in a box would be much easier, but then all the
7555 % typesetting commands (@smallbook, font changes, etc.) have to be done
7556 % beforehand -- and a) we want @copying to be done first in the source
7557 % file; b) letting users define the frontmatter in as flexible order as
7558 % possible is desirable.
7560 \def\copying{\checkenv{}\begingroup\scanargctxt\docopying}
7561 \def\docopying#1@end copying
{\endgroup\def\copyingtext{#1}}
7563 \def\insertcopying{%
7565 \parindent =
0pt
% paragraph indentation looks wrong on title page
7566 \scanexp\copyingtext
7574 \newskip\defbodyindent \defbodyindent=
.4in
7575 \newskip\defargsindent \defargsindent=
50pt
7576 \newskip\deflastargmargin \deflastargmargin=
18pt
7577 \newcount\defunpenalty
7579 % Start the processing of @deffn:
7581 \ifnum\lastpenalty<
10000
7583 \defunpenalty=
10003 % Will keep this @deffn together with the
7584 % following @def command, see below.
7586 % If there are two @def commands in a row, we'll have a \nobreak,
7587 % which is there to keep the function description together with its
7588 % header. But if there's nothing but headers, we need to allow a
7589 % break somewhere. Check specifically for penalty 10002, inserted
7590 % by \printdefunline, instead of 10000, since the sectioning
7591 % commands also insert a nobreak penalty, and we don't want to allow
7592 % a break between a section heading and a defun.
7594 % As a further refinement, we avoid "club" headers by signalling
7595 % with penalty of 10003 after the very first @deffn in the
7596 % sequence (see above), and penalty of 10002 after any following
7598 \ifnum\lastpenalty=
10002 \penalty2000 \else \defunpenalty=
10002 \fi
7600 % Similarly, after a section heading, do not allow a break.
7601 % But do insert the glue.
7602 \medskip % preceded by discardable penalty, so not a breakpoint
7606 \advance\leftskip by
\defbodyindent
7607 \exdentamount=
\defbodyindent
7611 % First, check whether we are in the right environment:
7614 % As above, allow line break if we have multiple x headers in a row.
7615 % It's not a great place, though.
7616 \ifnum\lastpenalty=
10002 \penalty3000 \else \defunpenalty=
10002 \fi
7618 % And now, it's time to reuse the body of the original defun:
7619 \expandafter\gobbledefun#1%
7621 \def\gobbledefun#1\startdefun{}
7623 % \printdefunline \deffnheader{text}
7625 \def\printdefunline#1#2{%
7627 % call \deffnheader:
7630 \interlinepenalty =
10000
7631 \advance\rightskip by
0pt plus
1fil
\relax
7633 \nobreak\vskip -
\parskip
7634 \penalty\defunpenalty % signal to \startdefun and \dodefunx
7635 % Some of the @defun-type tags do not enable magic parentheses,
7636 % rendering the following check redundant. But we don't optimize.
7641 \def\Edefun{\endgraf\medbreak}
7643 % \makedefun{deffn} creates \deffn, \deffnx and \Edeffn;
7644 % the only thing remaining is to define \deffnheader.
7647 \expandafter\let\csname E
#1\endcsname =
\Edefun
7648 \edef\temp{\noexpand\domakedefun
7649 \makecsname{#1}\makecsname{#1x
}\makecsname{#1header
}}%
7653 % \domakedefun \deffn \deffnx \deffnheader { (defn. of \deffnheader) }
7655 % Define \deffn and \deffnx, without parameters.
7656 % \deffnheader has to be defined explicitly.
7658 \def\domakedefun#1#2#3{%
7661 \doingtypefnfalse % distinguish typed functions from all else
7662 \parseargusing\activeparens{\printdefunline#3}%
7664 \def#2{\dodefunx#1}%
7668 \newif\ifdoingtypefn % doing typed function?
7669 \newif\ifrettypeownline % typeset return type on its own line?
7671 % @deftypefnnewline on|off says whether the return type of typed functions
7672 % are printed on their own line. This affects @deftypefn, @deftypefun,
7673 % @deftypeop, and @deftypemethod.
7675 \parseargdef\deftypefnnewline{%
7678 \expandafter\let\csname SETtxideftypefnnl
\endcsname
7680 \else\ifx\temp\offword
7681 \expandafter\let\csname SETtxideftypefnnl
\endcsname
7684 \errhelp =
\EMsimple
7685 \errmessage{Unknown @txideftypefnnl value `
\temp',
7690 % Untyped functions:
7692 % @deffn category name args
7693 \makedefun{deffn
}{\deffngeneral{}}
7695 % @deffn category class name args
7696 \makedefun{defop
}#1 {\defopon{#1\
\putwordon}}
7698 % \defopon {category on}class name args
7699 \def\defopon#1#2 {\deffngeneral{\putwordon\
\code{#2}}{#1\
\code{#2}} }
7701 % \deffngeneral {subind}category name args
7703 \def\deffngeneral#1#2 #3 #4\endheader{%
7704 % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}.
7705 \dosubind{fn
}{\code{#3}}{#1}%
7706 \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}%
7711 % @deftypefn category type name args
7712 \makedefun{deftypefn
}{\deftypefngeneral{}}
7714 % @deftypeop category class type name args
7715 \makedefun{deftypeop
}#1 {\deftypeopon{#1\
\putwordon}}
7717 % \deftypeopon {category on}class type name args
7718 \def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\
\code{#2}}{#1\
\code{#2}} }
7720 % \deftypefngeneral {subind}category type name args
7722 \def\deftypefngeneral#1#2 #3 #4 #5\endheader{%
7723 \dosubind{fn
}{\code{#4}}{#1}%
7725 \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
7730 % @deftypevr category type var args
7731 \makedefun{deftypevr
}{\deftypecvgeneral{}}
7733 % @deftypecv category class type var args
7734 \makedefun{deftypecv
}#1 {\deftypecvof{#1\
\putwordof}}
7736 % \deftypecvof {category of}class type var args
7737 \def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\
\code{#2}}{#1\
\code{#2}} }
7739 % \deftypecvgeneral {subind}category type var args
7741 \def\deftypecvgeneral#1#2 #3 #4 #5\endheader{%
7742 \dosubind{vr
}{\code{#4}}{#1}%
7743 \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
7746 % Untyped variables:
7748 % @defvr category var args
7749 \makedefun{defvr
}#1 {\deftypevrheader{#1} {} }
7751 % @defcv category class var args
7752 \makedefun{defcv
}#1 {\defcvof{#1\
\putwordof}}
7754 % \defcvof {category of}class var args
7755 \def\defcvof#1#2 {\deftypecvof{#1}#2 {} }
7759 % @deftp category name args
7760 \makedefun{deftp
}#1 #2 #3\endheader{%
7761 \doind{tp
}{\code{#2}}%
7762 \defname{#1}{}{#2}\defunargs{#3\unskip}%
7765 % Remaining @defun-like shortcuts:
7766 \makedefun{defun
}{\deffnheader{\putwordDeffunc} }
7767 \makedefun{defmac
}{\deffnheader{\putwordDefmac} }
7768 \makedefun{defspec
}{\deffnheader{\putwordDefspec} }
7769 \makedefun{deftypefun
}{\deftypefnheader{\putwordDeffunc} }
7770 \makedefun{defvar
}{\defvrheader{\putwordDefvar} }
7771 \makedefun{defopt
}{\defvrheader{\putwordDefopt} }
7772 \makedefun{deftypevar
}{\deftypevrheader{\putwordDefvar} }
7773 \makedefun{defmethod
}{\defopon\putwordMethodon}
7774 \makedefun{deftypemethod
}{\deftypeopon\putwordMethodon}
7775 \makedefun{defivar
}{\defcvof\putwordInstanceVariableof}
7776 \makedefun{deftypeivar
}{\deftypecvof\putwordInstanceVariableof}
7778 % \defname, which formats the name of the @def (not the args).
7779 % #1 is the category, such as "Function".
7780 % #2 is the return type, if any.
7781 % #3 is the function name.
7783 % We are followed by (but not passed) the arguments, if any.
7785 \def\defname#1#2#3{%
7787 % Get the values of \leftskip and \rightskip as they were outside the @def...
7788 \advance\leftskip by -
\defbodyindent
7790 % Determine if we are typesetting the return type of a typed function
7791 % on a line by itself.
7792 \rettypeownlinefalse
7793 \ifdoingtypefn % doing a typed function specifically?
7794 % then check user option for putting return type on its own line:
7795 \expandafter\ifx\csname SETtxideftypefnnl
\endcsname\relax \else
7800 % How we'll format the category name. Putting it in brackets helps
7801 % distinguish it from the body text that may end up on the next line
7804 \setbox0=
\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi}
7806 % Figure out line sizes for the paragraph shape. We'll always have at
7810 % The first line needs space for \box0; but if \rightskip is nonzero,
7811 % we need only space for the part of \box0 which exceeds it:
7812 \dimen0=
\hsize \advance\dimen0 by -
\wd0 \advance\dimen0 by
\rightskip
7814 % If doing a return type on its own line, we'll have another line.
7816 \advance\tempnum by
1
7817 \def\maybeshapeline{0in
\hsize}%
7819 \def\maybeshapeline{}%
7822 % The continuations:
7823 \dimen2=
\hsize \advance\dimen2 by -
\defargsindent
7825 % The final paragraph shape:
7826 \parshape \tempnum 0in
\dimen0 \maybeshapeline \defargsindent \dimen2
7828 % Put the category name at the right margin.
7831 \hfil\box0 \kern-
\hsize
7832 % \hsize has to be shortened this way:
7834 % Intentionally do not respect \rightskip, since we need the space.
7837 % Allow all lines to be underfull without complaint:
7838 \tolerance=
10000 \hbadness=
10000
7839 \exdentamount=
\defbodyindent
7841 % defun fonts. We use typewriter by default (used to be bold) because:
7842 % . we're printing identifiers, they should be in tt in principle.
7843 % . in languages with many accents, such as Czech or French, it's
7844 % common to leave accents off identifiers. The result looks ok in
7845 % tt, but exceedingly strange in rm.
7846 % . we don't want -- and --- to be treated as ligatures.
7847 % . this still does not fix the ?` and !` ligatures, but so far no
7848 % one has made identifiers using them :).
7850 \def\temp{#2}% text of the return type
7851 \ifx\temp\empty\else
7852 \tclose{\temp}% typeset the return type
7854 % put return type on its own line; prohibit line break following:
7855 \hfil\vadjust{\nobreak}\break
7857 \space % type on same line, so just followed by a space
7859 \fi % no return type
7860 #3% output function name
7862 {\rm\enskip}% hskip 0.5 em of \tenrm
7865 % arguments will be output next, if any.
7868 % Print arguments in slanted roman (not ttsl), inconsistently with using
7869 % tt for the name. This is because literal text is sometimes needed in
7870 % the argument list (groff manual), and ttsl and tt are not very
7871 % distinguishable. Prevent hyphenation at `-' chars.
7874 % use sl by default (not ttsl),
7876 \df \sl \hyphenchar\font=
0
7878 % On the other hand, if an argument has two dashes (for instance), we
7879 % want a way to get ttsl. We used to recommend @var for that, so
7880 % leave the code in, but it's strange for @var to lead to typewriter.
7881 % Nowadays we recommend @code, since the difference between a ttsl hyphen
7882 % and a tt hyphen is pretty tiny. @code also disables ?` !`.
7883 \def\var#
#1{{\setupmarkupstyle{var
}\ttslanted{#
#1}}}%
7885 \sl\hyphenchar\font=
45
7888 % We want ()&[] to print specially on the defun line.
7891 \catcode`\(=
\active \catcode`\)=
\active
7892 \catcode`\
[=
\active \catcode`\
]=
\active
7896 % Make control sequences which act like normal parenthesis chars.
7897 \let\lparen = (
\let\rparen = )
7899 % Be sure that we always have a definition for `(', etc. For example,
7900 % if the fn name has parens in it, \boldbrax will not be in effect yet,
7901 % so TeX would otherwise complain about undefined control sequence.
7904 \global\let(=
\lparen \global\let)=
\rparen
7905 \global\let[=
\lbrack \global\let]=
\rbrack
7908 \gdef\boldbrax{\let(=
\opnr\let)=
\clnr\let[=
\lbrb\let]=
\rbrb}
7909 \gdef\magicamp{\let&=
\amprm}
7912 \newcount\parencount
7914 % If we encounter &foo, then turn on ()-hacking afterwards
7916 \def\amprm#1 {\ampseentrue{\bf\&
#1 }}
7920 % At the first level, print parens in roman,
7921 % otherwise use the default font.
7922 \ifnum \parencount=
1 \rm \fi
7924 % The \sf parens (in \boldbrax) actually are a little bolder than
7925 % the contained text. This is especially needed for [ and ] .
7929 \def\infirstlevel#1{%
7936 \def\bfafterword#1 {#1 \bf}
7939 \global\advance\parencount by
1
7941 \infirstlevel \bfafterword
7946 \global\advance\parencount by -
1
7949 \newcount\brackcount
7951 \global\advance\brackcount by
1
7956 \global\advance\brackcount by -
1
7959 \def\checkparencounts{%
7960 \ifnum\parencount=
0 \else \badparencount \fi
7961 \ifnum\brackcount=
0 \else \badbrackcount \fi
7963 % these should not use \errmessage; the glibc manual, at least, actually
7964 % has such constructs (when documenting function pointers).
7965 \def\badparencount{%
7966 \message{Warning: unbalanced parentheses in @def...
}%
7967 \global\parencount=
0
7969 \def\badbrackcount{%
7970 \message{Warning: unbalanced square brackets in @def...
}%
7971 \global\brackcount=
0
7978 % To do this right we need a feature of e-TeX, \scantokens,
7979 % which we arrange to emulate with a temporary file in ordinary TeX.
7980 \ifx\eTeXversion\thisisundefined
7981 \newwrite\macscribble
7984 \immediate\openout\macscribble=
\jobname.tmp
7985 \immediate\write\macscribble{\the\toks0}%
7986 \immediate\closeout\macscribble
7991 \let\aftermacroxxx\relax
7992 \def\aftermacro{\aftermacroxxx}
7994 % alias because \c means cedilla in @tex or @math
7997 \newcount\savedcatcodeone
7998 \newcount\savedcatcodetwo
8000 % Used at the time of macro expansion.
8001 % Argument is macro body with arguments substituted
8004 \def\xeatspaces{\eatspaces}%
8006 % Temporarily undo catcode changes of \printindex. Set catcode of @ to
8007 % 0 so that @-commands in macro expansions aren't printed literally when
8008 % formatting an index file, where \ is used as the escape character.
8009 \savedcatcodeone=
\catcode`\@
8010 \savedcatcodetwo=
\catcode`\\
8014 % Process the macro body under the current catcode regime.
8015 \scantokens{#1@texinfoc
}\aftermacro%
8017 \catcode`\@=
\savedcatcodeone
8018 \catcode`\\=
\savedcatcodetwo
8020 % The \texinfoc is to remove the \newlinechar added by \scantokens, and
8021 % can be noticed by \parsearg.
8022 % The \aftermacro allows a \comment at the end of the macro definition
8023 % to duplicate itself past the final \newlinechar added by \scantokens:
8024 % this is used in the definition of \group to comment out a newline. We
8025 % don't do the same for \c to support Texinfo files with macros that ended
8026 % with a @c, which should no longer be necessary.
8027 % We avoid surrounding the call to \scantokens with \bgroup and \egroup
8028 % to allow macros to open or close groups themselves.
8031 % Used for copying and captions
8033 \expandafter\scanmacro\expandafter{#1}%
8036 \newcount\paramno % Count of parameters
8037 \newtoks\macname % Macro name
8038 \newif\ifrecursive % Is it recursive?
8040 % List of all defined macros in the form
8041 % \definedummyword\macro1\definedummyword\macro2...
8042 % Currently is also contains all @aliases; the list can be split
8043 % if there is a need.
8046 % Add the macro to \macrolist
8047 \def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname}
8048 \def\addtomacrolistxxx#1{%
8049 \toks0 =
\expandafter{\macrolist\definedummyword#1}%
8050 \xdef\macrolist{\the\toks0}%
8054 % This does \let #1 = #2, with \csnames; that is,
8055 % \let \csname#1\endcsname = \csname#2\endcsname
8056 % (except of course we have to play expansion games).
8060 \csname#1\expandafter\endcsname
8064 % Trim leading and trailing spaces off a string.
8065 % Concepts from aro-bend problem 15 (see CTAN).
8067 \gdef\eatspaces #1{\expandafter\trim@
\expandafter{#1 }}
8068 \gdef\trim@
#1{\trim@@ @
#1 @
#1 @ @@
}
8069 \gdef\trim@@
#1@
#2@
#3@@
{\trim@@@
\empty #2 @
}
8071 \unbrace{\gdef\trim@@@
#1 } #2@
{#1}
8074 % Trim a single trailing ^^M off a string.
8075 {\catcode`\^^M=
\other \catcode`
\Q=
3%
8076 \gdef\eatcr #1{\eatcra #1Q^^MQ
}%
8077 \gdef\eatcra#1^^MQ
{\eatcrb#1Q
}%
8078 \gdef\eatcrb#1Q
#2Q
{#1}%
8081 % Macro bodies are absorbed as an argument in a context where
8082 % all characters are catcode 10, 11 or 12, except \ which is active
8083 % (as in normal texinfo). It is necessary to change the definition of \
8084 % to recognize macro arguments; this is the job of \mbodybackslash.
8086 % Non-ASCII encodings make 8-bit characters active, so un-activate
8087 % them to avoid their expansion. Must do this non-globally, to
8088 % confine the change to the current group.
8090 % It's necessary to have hard CRs when the macro is executed. This is
8091 % done by making ^^M (\endlinechar) catcode 12 when reading the macro
8092 % body, and then making it the \newlinechar in \scanmacro.
8094 \def\scanctxt{% used as subroutine
8103 \passthroughcharstrue
8106 \def\scanargctxt{% used for copying and captions, not macros.
8110 \catcode`\^^M=
\other
8113 \def\macrobodyctxt{% used for @macro definitions
8119 \catcode`\^^M=
\other
8123 % Used when scanning braced macro arguments. Note, however, that catcode
8124 % changes here are ineffectual if the macro invocation was nested inside
8125 % an argument to another Texinfo command.
8129 \catcode`\^^M=
\other
8133 \def\macrolineargctxt{% used for whole-line arguments without braces
8139 % \mbodybackslash is the definition of \ in @macro bodies.
8140 % It maps \foo\ => \csname macarg.foo\endcsname => #N
8141 % where N is the macro parameter number.
8142 % We define \csname macarg.\endcsname to be \realbackslash, so
8143 % \\ in macro replacement text gets you a backslash.
8145 {\catcode`@=
0 @catcode`@\=@active
8146 @gdef@usembodybackslash
{@let\=@mbodybackslash
}
8147 @gdef@mbodybackslash
#1\
{@csname macarg.
#1@endcsname
}
8149 \expandafter\def\csname macarg.
\endcsname{\realbackslash}
8151 \def\margbackslash#1{\char`\
#1 }
8153 \def\macro{\recursivefalse\parsearg\macroxxx}
8154 \def\rmacro{\recursivetrue\parsearg\macroxxx}
8157 \getargs{#1}% now \macname is the macname and \argl the arglist
8158 \ifx\argl\empty % no arguments
8161 \expandafter\parsemargdef \argl;
%
8162 \if\paramno>
256\relax
8163 \ifx\eTeXversion\thisisundefined
8164 \errhelp =
\EMsimple
8165 \errmessage{You need eTeX to compile a file with macros with more than
256 arguments
}
8169 \if1\csname ismacro.
\the\macname\endcsname
8170 \message{Warning: redefining
\the\macname}%
8172 \expandafter\ifx\csname \the\macname\endcsname \relax
8173 \else \errmessage{Macro name
\the\macname\space already defined
}\fi
8174 \global\cslet{macsave.
\the\macname}{\the\macname}%
8175 \global\expandafter\let\csname ismacro.
\the\macname\endcsname=
1%
8176 \addtomacrolist{\the\macname}%
8178 \begingroup \macrobodyctxt
8179 \ifrecursive \expandafter\parsermacbody
8180 \else \expandafter\parsemacbody
8183 \parseargdef\unmacro{%
8184 \if1\csname ismacro.
#1\endcsname
8185 \global\cslet{#1}{macsave.
#1}%
8186 \global\expandafter\let \csname ismacro.
#1\endcsname=
0%
8187 % Remove the macro name from \macrolist:
8189 \expandafter\let\csname#1\endcsname \relax
8190 \let\definedummyword\unmacrodo
8191 \xdef\macrolist{\macrolist}%
8194 \errmessage{Macro
#1 not defined
}%
8198 % Called by \do from \dounmacro on each macro. The idea is to omit any
8199 % macro definitions that have been changed to \relax.
8205 \noexpand\definedummyword \noexpand#1%
8209 % \getargs -- Parse the arguments to a @macro line. Set \macname to
8210 % the name of the macro, and \argl to the braced argument list.
8211 \def\getargs#1{\getargsxxx#1{}}
8212 \def\getargsxxx#1#
{\getmacname #1 \relax\getmacargs}
8213 \def\getmacname#1 #2\relax{\macname=
{#1}}
8214 \def\getmacargs#1{\def\argl{#1}}
8215 % This made use of the feature that if the last token of a
8216 % <parameter list> is #, then the preceding argument is delimited by
8217 % an opening brace, and that opening brace is not consumed.
8219 % Parse the optional {params} list to @macro or @rmacro.
8220 % Set \paramno to the number of arguments,
8221 % and \paramlist to a parameter text for the macro (e.g. #1,#2,#3 for a
8222 % three-param macro.) Define \macarg.BLAH for each BLAH in the params
8223 % list to some hook where the argument is to be expanded. If there are
8224 % less than 10 arguments that hook is to be replaced by ##N where N
8225 % is the position in that list, that is to say the macro arguments are to be
8226 % defined `a la TeX in the macro body.
8228 % That gets used by \mbodybackslash (above).
8230 % If there are 10 or more arguments, a different technique is used: see
8231 % \parsemmanyargdef.
8233 \def\parsemargdef#1;
{%
8234 \paramno=
0\def\paramlist{}%
8236 % \hash is redefined to `#' later to get it into definitions
8237 \let\xeatspaces\relax
8238 \parsemargdefxxx#1,;,
%
8239 \ifnum\paramno<
10\relax\else
8241 \parsemmanyargdef@@
#1,;,
% 10 or more arguments
8244 \def\parsemargdefxxx#1,
{%
8245 \if#1;
\let\next=
\relax
8246 \else \let\next=
\parsemargdefxxx
8247 \advance\paramno by
1
8248 \expandafter\edef\csname macarg.
\eatspaces{#1}\endcsname
8249 {\xeatspaces{\hash\the\paramno}}%
8250 \edef\paramlist{\paramlist\hash\the\paramno,
}%
8253 % \parsemacbody, \parsermacbody
8255 % Read recursive and nonrecursive macro bodies. (They're different since
8256 % rec and nonrec macros end differently.)
8258 % We are in \macrobodyctxt, and the \xdef causes backslashshes in the macro
8259 % body to be transformed.
8260 % Set \macrobody to the body of the macro, and call \defmacro.
8262 {\catcode`\ =
\other\long\gdef\parsemacbody#1@end macro
{%
8263 \xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}%
8264 {\catcode`\ =
\other\long\gdef\parsermacbody#1@end rmacro
{%
8265 \xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}%
8267 % Make @ a letter, so that we can make private-to-Texinfo macro names.
8268 \edef\texiatcatcode{\the\catcode`\@
}
8269 \catcode `@=
11\relax
8271 %%%%%%%%%%%%%% Code for > 10 arguments only %%%%%%%%%%%%%%%%%%
8273 % If there are 10 or more arguments, a different technique is used, where the
8274 % hook remains in the body, and when macro is to be expanded the body is
8275 % processed again to replace the arguments.
8277 % In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the
8278 % argument N value and then \edef the body (nothing else will expand because of
8279 % the catcode regime under which the body was input).
8281 % If you compile with TeX (not eTeX), and you have macros with 10 or more
8282 % arguments, no macro can have more than 256 arguments (else error).
8284 % In case that there are 10 or more arguments we parse again the arguments
8285 % list to set new definitions for the \macarg.BLAH macros corresponding to
8286 % each BLAH argument. It was anyhow needed to parse already once this list
8287 % in order to count the arguments, and as macros with at most 9 arguments
8288 % are by far more frequent than macro with 10 or more arguments, defining
8289 % twice the \macarg.BLAH macros does not cost too much processing power.
8290 \def\parsemmanyargdef@@
#1,
{%
8291 \if#1;
\let\next=
\relax
8293 \let\next=
\parsemmanyargdef@@
8294 \edef\tempb{\eatspaces{#1}}%
8295 \expandafter\def\expandafter\tempa
8296 \expandafter{\csname macarg.
\tempb\endcsname}%
8297 % Note that we need some extra \noexpand\noexpand, this is because we
8298 % don't want \the to be expanded in the \parsermacbody as it uses an
8300 \expandafter\edef\tempa
8301 {\noexpand\noexpand\noexpand\the\toks\the\paramno}%
8302 \advance\paramno by
1\relax
8309 \long\def\nillm@
{\nil@
}%
8311 % This macro is expanded during the Texinfo macro expansion, not during its
8312 % definition. It gets all the arguments' values and assigns them to macros
8315 % #1 is the macro name
8316 % #2 is the list of argument names
8317 % #3 is the list of argument values
8318 \def\getargvals@
#1#2#3{%
8319 \def\macargdeflist@
{}%
8320 \def\saveparamlist@
{#2}% Need to keep a copy for parameter expansion.
8321 \def\paramlist{#2,
\nil@
}%
8325 \def\argvaluelist{#3,
\nil@
}%
8334 \ifx\paramlist\nilm@
8335 % Some sanity check needed here that \argvaluelist is also empty.
8336 \ifx\argvaluelist\nillm@
8338 \errhelp =
\EMsimple
8339 \errmessage{Too many arguments in macro `
\macroname'!
}%
8341 \let\next\macargexpandinbody@
8343 \ifx\argvaluelist\nillm@
8344 % No more arguments values passed to macro. Set remaining named-arg
8346 \let\next\setemptyargvalues@
8348 % pop current arg name into \@tempb
8349 \def\@tempa#
#1{\pop@
{\@tempb
}{\paramlist}#
#1\endargs@
}%
8350 \expandafter\@tempa
\expandafter{\paramlist}%
8351 % pop current argument value into \@tempc
8352 \def\@tempa#
#1{\longpop@
{\@tempc
}{\argvaluelist}#
#1\endargs@
}%
8353 \expandafter\@tempa
\expandafter{\argvaluelist}%
8354 % Here \@tempb is the current arg name and \@tempc is the current arg value.
8355 % First place the new argument macro definition into \@tempd
8356 \expandafter\macname\expandafter{\@tempc
}%
8357 \expandafter\let\csname macarg.\@tempb
\endcsname\relax
8358 \expandafter\def\expandafter\@tempe
\expandafter{%
8359 \csname macarg.\@tempb
\endcsname}%
8360 \edef\@tempd
{\long\def\@tempe
{\the\macname}}%
8361 \push@\@tempd
\macargdeflist@
8362 \let\next\getargvals@@
8369 \expandafter\expandafter\expandafter\def
8370 \expandafter\expandafter\expandafter#2%
8371 \expandafter\expandafter\expandafter{%
8375 % Replace arguments by their values in the macro body, and place the result
8378 \def\macvalstoargs@
{%
8379 % To do this we use the property that token registers that are \the'ed
8380 % within an \edef expand only once. So we are going to place all argument
8381 % values into respective token registers.
8383 % First we save the token context, and initialize argument numbering.
8386 % Then, for each argument number #N, we place the corresponding argument
8387 % value into a new token list register \toks#N
8388 \expandafter\putargsintokens@
\saveparamlist@,;,
%
8389 % Then, we expand the body so that argument are replaced by their
8390 % values. The trick for values not to be expanded themselves is that they
8391 % are within tokens and that tokens expand only once in an \edef .
8392 \edef\@tempc
{\csname mac.
\macroname .body
\endcsname}%
8393 % Now we restore the token stack pointer to free the token list registers
8394 % which we have used, but we make sure that expanded body is saved after
8398 \expandafter\def\expandafter\@tempa
\expandafter{\@tempc
}%
8401 % Define the named-macro outside of this group and then close this group.
8403 \def\macargexpandinbody@
{%
8407 % First the replace in body the macro arguments by their values, the result
8410 % Then we point at the \norecurse or \gobble (for recursive) macro value
8412 \expandafter\let\expandafter\@tempb
\csname mac.
\macroname .recurse
\endcsname
8413 % Depending on whether it is recursive or not, we need some tailing
8420 % And now we do the real job:
8421 \edef\@tempd
{\noexpand\@tempb
{\macroname}\noexpand\scanmacro{\@tempa
}\@tempc
}%
8425 \def\putargsintokens@
#1,
{%
8426 \if#1;
\let\next\relax
8428 \let\next\putargsintokens@
8429 % First we allocate the new token list register, and give it a temporary
8431 \toksdef\@tempb
\the\paramno
8432 % Then we place the argument value into that token list register.
8433 \expandafter\let\expandafter\@tempa
\csname macarg.
#1\endcsname
8434 \expandafter\@tempb
\expandafter{\@tempa
}%
8435 \advance\paramno by
1\relax
8440 % Trailing missing arguments are set to empty.
8442 \def\setemptyargvalues@
{%
8443 \ifx\paramlist\nilm@
8444 \let\next\macargexpandinbody@
8446 \expandafter\setemptyargvaluesparser@
\paramlist\endargs@
8447 \let\next\setemptyargvalues@
8452 \def\setemptyargvaluesparser@
#1,
#2\endargs@
{%
8453 \expandafter\def\expandafter\@tempa
\expandafter{%
8454 \expandafter\def\csname macarg.
#1\endcsname{}}%
8455 \push@\@tempa
\macargdeflist@
8459 % #1 is the element target macro
8460 % #2 is the list macro
8461 % #3,#4\endargs@ is the list value
8462 \def\pop@
#1#2#3,
#4\endargs@
{%
8466 \long\def\longpop@
#1#2#3,
#4\endargs@
{%
8472 %%%%%%%%%%%%%% End of code for > 10 arguments %%%%%%%%%%%%%%%%%%
8475 % This defines a Texinfo @macro or @rmacro, called by \parsemacbody.
8476 % \macrobody has the body of the macro in it, with placeholders for
8477 % its parameters, looking like "\xeatspaces{\hash 1}".
8478 % \paramno is the number of parameters
8479 % \paramlist is a TeX parameter text, e.g. "#1,#2,#3,"
8480 % There are eight cases: recursive and nonrecursive macros of zero, one,
8481 % up to nine, and many arguments.
8482 % \xdef is used so that macro definitions will survive the file
8483 % they're defined in: @include reads the file inside a group.
8486 \let\hash=##
% convert placeholders to macro parameter chars
8488 \def\xeatspaces#
#1{#
#1}%
8489 % This removes the pair of braces around the argument. We don't
8490 % use \eatspaces, because this can cause ends of lines to be lost
8491 % when the argument to \eatspaces is read, leading to line-based
8492 % commands like "@itemize" not being read correctly.
8494 \let\xeatspaces\relax % suppress expansion
8496 \ifrecursive %%%%%%%%%%%%%% Recursive %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8499 \expandafter\xdef\csname\the\macname\endcsname{%
8500 \noexpand\scanmacro{\macrobody}}%
8502 \expandafter\xdef\csname\the\macname\endcsname{%
8504 \noexpand\braceorline
8505 \expandafter\noexpand\csname\the\macname @@@
\endcsname}%
8506 \expandafter\xdef\csname\the\macname @@@
\endcsname#
#1{%
8508 \noexpand\scanmacro{\macrobody}%
8511 \ifnum\paramno<
10\relax % at most 9
8512 % See non-recursive section below for comments
8513 \expandafter\xdef\csname\the\macname\endcsname{%
8515 \noexpand\expandafter
8516 \noexpand\macroargctxt
8517 \noexpand\expandafter
8518 \expandafter\noexpand\csname\the\macname @@
\endcsname}%
8519 \expandafter\xdef\csname\the\macname @@
\endcsname#
#1{%
8520 \noexpand\passargtomacro
8521 \expandafter\noexpand\csname\the\macname @@@
\endcsname{#
#1,
}}%
8522 \expandafter\xdef\csname\the\macname @@@
\endcsname#
#1{%
8523 \expandafter\noexpand\csname\the\macname @@@@
\endcsname #
#1}%
8524 \expandafter\expandafter
8526 \expandafter\expandafter
8527 \csname\the\macname @@@@
\endcsname\paramlist{%
8528 \egroup\noexpand\scanmacro{\macrobody}}%
8530 \expandafter\xdef\csname\the\macname\endcsname{%
8531 \noexpand\getargvals@
{\the\macname}{\argl}%
8533 \global\expandafter\let\csname mac.
\the\macname .body
\endcsname\macrobody
8534 \global\expandafter\let\csname mac.
\the\macname .recurse
\endcsname\gobble
8537 \else %%%%%%%%%%%%%%%%%%%%%% Non-recursive %%%%%%%%%%%%%%%%%%%%%%%%%%
8540 \expandafter\xdef\csname\the\macname\endcsname{%
8541 \noexpand\scanmacro{\macrobody}}%
8543 \expandafter\xdef\csname\the\macname\endcsname{%
8545 \noexpand\braceorline
8546 \expandafter\noexpand\csname\the\macname @@@
\endcsname}%
8547 \expandafter\xdef\csname\the\macname @@@
\endcsname#
#1{%
8549 \noexpand\scanmacro{\macrobody}%
8552 \ifnum\paramno<
10\relax
8553 % @MACNAME sets the context for reading the macro argument
8554 % @MACNAME@@ gets the argument, processes backslashes and appends a
8556 % @MACNAME@@@ removes braces surrounding the argument list.
8557 % @MACNAME@@@@ scans the macro body with arguments substituted.
8558 \expandafter\xdef\csname\the\macname\endcsname{%
8560 \noexpand\expandafter % This \expandafter skip any spaces after the
8561 \noexpand\macroargctxt % macro before we change the catcode of space.
8562 \noexpand\expandafter
8563 \expandafter\noexpand\csname\the\macname @@
\endcsname}%
8564 \expandafter\xdef\csname\the\macname @@
\endcsname#
#1{%
8565 \noexpand\passargtomacro
8566 \expandafter\noexpand\csname\the\macname @@@
\endcsname{#
#1,
}}%
8567 \expandafter\xdef\csname\the\macname @@@
\endcsname#
#1{%
8568 \expandafter\noexpand\csname\the\macname @@@@
\endcsname #
#1}%
8569 \expandafter\expandafter
8571 \expandafter\expandafter
8572 \csname\the\macname @@@@
\endcsname\paramlist{%
8573 \egroup\noexpand\scanmacro{\macrobody}}%
8575 \expandafter\xdef\csname\the\macname\endcsname{%
8576 \noexpand\getargvals@
{\the\macname}{\argl}%
8578 \global\expandafter\let\csname mac.
\the\macname .body
\endcsname\macrobody
8579 \global\expandafter\let\csname mac.
\the\macname .recurse
\endcsname\norecurse
8584 \catcode `\@
\texiatcatcode\relax % end private-to-Texinfo catcodes
8586 \def\norecurse#1{\bgroup\cslet{#1}{macsave.
#1}}
8589 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8591 {\catcode`\@=
0 \catcode`\\=
13 % We need to manipulate \ so use @ as escape
8592 @catcode`@_=
11 % private names
8593 @catcode`@!=
11 % used as argument separator
8595 % \passargtomacro#1#2 -
8596 % Call #1 with a list of tokens #2, with any doubled backslashes in #2
8597 % compressed to one.
8599 % This implementation works by expansion, and not execution (so we cannot use
8600 % \def or similar). This reduces the risk of this failing in contexts where
8601 % complete expansion is done with no execution (for example, in writing out to
8602 % an auxiliary file for an index entry).
8604 % State is kept in the input stream: the argument passed to
8605 % @look_ahead, @gobble_and_check_finish and @add_segment is
8607 % THE_MACRO ARG_RESULT ! {PENDING_BS} NEXT_TOKEN (... rest of input)
8610 % THE_MACRO - name of the macro we want to call
8611 % ARG_RESULT - argument list we build to pass to that macro
8612 % PENDING_BS - either a backslash or nothing
8613 % NEXT_TOKEN - used to look ahead in the input stream to see what's coming next
8615 @gdef@passargtomacro
#1#2{%
8616 @add_segment
#1!
{}@relax
#2\@_finish\%
8618 @gdef@_finish
{@_finishx
} @global@let@_finishx@relax
8620 % #1 - THE_MACRO ARG_RESULT
8623 % #4 used to look ahead
8625 % If the next token is not a backslash, process the rest of the argument;
8626 % otherwise, remove the next token.
8627 @gdef@look_ahead
#1!
#2#3#4{%
8629 @expandafter@gobble_and_check_finish
8631 @expandafter@add_segment
8635 % #1 - THE_MACRO ARG_RESULT
8638 % #4 should be a backslash, which is gobbled.
8641 % Double backslash found. Add a single backslash, and look ahead.
8642 @gdef@gobble_and_check_finish
#1!
#2#3#4#5{%
8643 @add_segment
#1\!
{}#5#5%
8648 % #1 - THE_MACRO ARG_RESULT
8651 % #4 is input stream until next backslash
8653 % Input stream is either at the start of the argument, or just after a
8654 % backslash sequence, either a lone backslash, or a doubled backslash.
8655 % NEXT_TOKEN contains the first token in the input stream: if it is \finish,
8656 % finish; otherwise, append to ARG_RESULT the segment of the argument up until
8657 % the next backslash. PENDING_BACKSLASH contains a backslash to represent
8658 % a backslash just before the start of the input stream that has not been
8659 % added to ARG_RESULT.
8660 @gdef@add_segment
#1!
#2#3#4\
{%
8664 % append the pending backslash to the result, followed by the next segment
8665 @expandafter@is_fi@look_ahead
#1#2#4!
{\
}@fi
8666 % this @fi is discarded by @look_ahead.
8667 % we can't get rid of it with \expandafter because we don't know how
8673 % #3 discards the res of the conditional in @add_segment, and @is_fi ends the
8675 @gdef@call_the_macro
#1#2!
#3@fi
{@is_fi
#1{#2}}
8678 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8680 % \braceorline MAC is used for a one-argument macro MAC. It checks
8681 % whether the next non-whitespace character is a {. It sets the context
8682 % for reading the argument (slightly different in the two cases). Then,
8683 % to read the argument, in the whole-line case, it then calls the regular
8684 % \parsearg MAC; in the lbrace case, it calls \passargtomacro MAC.
8686 \def\braceorline#1{\let\macnamexxx=
#1\futurelet\nchar\braceorlinexxx}
8687 \def\braceorlinexxx{%
8690 \expandafter\passargtomacro
8692 \macrolineargctxt\expandafter\parsearg
8697 % We need some trickery to remove the optional spaces around the equal
8698 % sign. Make them active and then expand them all to nothing.
8700 \def\alias{\parseargusing\obeyspaces\aliasxxx}
8701 \def\aliasxxx #1{\aliasyyy#1\relax}
8702 \def\aliasyyy #1=
#2\relax{%
8704 \expandafter\let\obeyedspace=
\empty
8705 \addtomacrolist{#1}%
8706 \xdef\next{\global\let\makecsname{#1}=
\makecsname{#2}}%
8712 \message{cross references,
}
8715 \newif\ifhavexrefs % True if xref values are known.
8716 \newif\ifwarnedxrefs % True if we warned once that they aren't known.
8718 % @inforef is relatively simple.
8719 \def\inforef #1{\inforefzzz #1,,,,**
}
8720 \def\inforefzzz #1,
#2,
#3,
#4**
{%
8721 \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
8722 node
\samp{\ignorespaces#1{}}}
8724 % @node's only job in TeX is to define \lastnode, which is used in
8725 % cross-references. The @node line might or might not have commas, and
8726 % might or might not have spaces before the first comma, like:
8727 % @node foo , bar , ...
8728 % We don't want such trailing spaces in the node name.
8730 \parseargdef\node{\checkenv{}\donode #1 ,
\finishnodeparse}
8732 % also remove a trailing comma, in case of something like this:
8733 % @node Help-Cross, , , Cross-refs
8734 \def\donode#1 ,
#2\finishnodeparse{\dodonode #1,
\finishnodeparse}
8735 \def\dodonode#1,
#2\finishnodeparse{\gdef\lastnode{#1}}
8738 \let\lastnode=
\empty
8740 % Write a cross-reference definition for the current node. #1 is the
8741 % type (Ynumbered, Yappendix, Ynothing).
8744 \ifx\lastnode\empty\else
8745 \setref{\lastnode}{#1}%
8746 \global\let\lastnode=
\empty
8750 % @anchor{NAME} -- define xref target at arbitrary point.
8752 \newcount\savesfregister
8754 \def\savesf{\relax \ifhmode \savesfregister=
\spacefactor \fi}
8755 \def\restoresf{\relax \ifhmode \spacefactor=
\savesfregister \fi}
8756 \def\anchor#1{\savesf \setref{#1}{Ynothing
}\restoresf \ignorespaces}
8758 % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
8759 % anchor), which consists of three parts:
8760 % 1) NAME-title - the current sectioning name taken from \lastsection,
8761 % or the anchor name.
8762 % 2) NAME-snt - section number and type, passed as the SNT arg, or
8763 % empty for anchors.
8764 % 3) NAME-pg - the page number.
8766 % This is called from \donoderef, \anchor, and \dofloat. In the case of
8767 % floats, there is an additional part, which is not written here:
8768 % 4) NAME-lof - the text as it should appear in a @listoffloats.
8775 \atdummies % preserve commands, but don't expand them
8776 % match definition in \xrdef, \refx, \xrefX.
8778 \edef\writexrdef#
#1#
#2{%
8779 \write\auxfile{@xrdef
{#1-
% #1 of \setref, expanded by the \edef
8780 #
#1}{#
#2}}% these are parameters of \writexrdef
8782 \toks0 =
\expandafter{\lastsection}%
8783 \immediate \writexrdef{title
}{\the\toks0 }%
8784 \immediate \writexrdef{snt
}{\csname #2\endcsname}% \Ynumbered etc.
8785 \safewhatsit{\writexrdef{pg
}{\folio}}% will be written later, at \shipout
8790 % @xrefautosectiontitle on|off says whether @section(ing) names are used
8791 % automatically in xrefs, if the third arg is not explicitly specified.
8792 % This was provided as a "secret" @set xref-automatic-section-title
8793 % variable, now it's official.
8795 \parseargdef\xrefautomaticsectiontitle{%
8798 \expandafter\let\csname SETxref-automatic-section-title
\endcsname
8800 \else\ifx\temp\offword
8801 \expandafter\let\csname SETxref-automatic-section-title
\endcsname
8804 \errhelp =
\EMsimple
8805 \errmessage{Unknown @xrefautomaticsectiontitle value `
\temp',
8811 % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is
8812 % the node name, #2 the name of the Info cross-reference, #3 the printed
8813 % node name, #4 the name of the Info file, #5 the name of the printed
8814 % manual. All but the node name can be omitted.
8816 \def\pxref{\putwordsee{} \xrefXX}
8817 \def\xref{\putwordSee{} \xrefXX}
8820 \def\xrefXX#1{\def\xrefXXarg{#1}\futurelet\tokenafterxref\xrefXXX}
8821 \def\xrefXXX{\expandafter\xrefX\expandafter[\xrefXXarg,,,,,,,
]}
8824 \newbox\printedrefnamebox
8825 \newbox\infofilenamebox
8826 \newbox\printedmanualbox
8828 \def\xrefX[#1,
#2,
#3,
#4,
#5,
#6]{\begingroup
8831 % Get args without leading/trailing spaces.
8832 \def\printedrefname{\ignorespaces #3}%
8833 \setbox\printedrefnamebox =
\hbox{\printedrefname\unskip}%
8835 \def\infofilename{\ignorespaces #4}%
8836 \setbox\infofilenamebox =
\hbox{\infofilename\unskip}%
8838 \def\printedmanual{\ignorespaces #5}%
8839 \setbox\printedmanualbox =
\hbox{\printedmanual\unskip}%
8841 % If the printed reference name (arg #3) was not explicitly given in
8842 % the @xref, figure out what we want to use.
8843 \ifdim \wd\printedrefnamebox =
0pt
8844 % No printed node name was explicitly given.
8845 \expandafter\ifx\csname SETxref-automatic-section-title
\endcsname \relax
8846 % Not auto section-title: use node name inside the square brackets.
8847 \def\printedrefname{\ignorespaces #1}%
8849 % Auto section-title: use chapter/section title inside
8850 % the square brackets if we have it.
8851 \ifdim \wd\printedmanualbox >
0pt
8852 % It is in another manual, so we don't have it; use node name.
8853 \def\printedrefname{\ignorespaces #1}%
8856 % We (should) know the real title if we have the xref values.
8857 \def\printedrefname{\refx{#1-title
}{}}%
8859 % Otherwise just copy the Info node name.
8860 \def\printedrefname{\ignorespaces #1}%
8866 % Make link in pdf output.
8868 % For pdfTeX and LuaTeX
8871 \makevalueexpandable
8872 % This expands tokens, so do it after making catcode changes, so _
8873 % etc. don't get their TeX definitions. This ignores all spaces in
8874 % #4, including (wrongly) those in the middle of the filename.
8877 % This (wrongly) does not take account of leading or trailing
8878 % spaces in #1, which should be ignored.
8879 \edef\pdfxrefdest{#1}%
8880 \ifx\pdfxrefdest\empty
8881 \def\pdfxrefdest{Top
}% no empty targets
8883 \txiescapepdf\pdfxrefdest % escape PDF special chars
8887 \startlink attr
{/Border
[0 0 0]}%
8888 \ifnum\filenamelength>
0
8889 goto file
{\the\filename.pdf
} name
{\pdfxrefdest}%
8891 goto name
{\pdfmkpgn{\pdfxrefdest}}%
8894 \setcolor{\linkcolor}%
8896 \ifx\XeTeXrevision\thisisundefined
8901 \makevalueexpandable
8902 % This expands tokens, so do it after making catcode changes, so _
8903 % etc. don't get their TeX definitions. This ignores all spaces in
8904 % #4, including (wrongly) those in the middle of the filename.
8907 % This (wrongly) does not take account of leading or trailing
8908 % spaces in #1, which should be ignored.
8909 \iftxiuseunicodedestname
8910 \def\pdfxrefdest{#1}% Pass through Unicode characters.
8912 \edef\pdfxrefdest{#1}% Replace Unicode characters to ASCII.
8914 \ifx\pdfxrefdest\empty
8915 \def\pdfxrefdest{Top
}% no empty targets
8917 \txiescapepdf\pdfxrefdest % escape PDF special chars
8921 \ifnum\filenamelength>
0
8922 % By the default settings,
8923 % XeTeX (xdvipdfmx) replaces link destination names with integers.
8924 % In this case, the replaced destination names of
8925 % remote PDF cannot be known. In order to avoid replacement,
8926 % you can use commandline option `-C 0x0010' for xdvipdfmx.
8927 \special{pdf:bann << /Border
[0 0 0] /Type /Annot /Subtype /Link /A
8928 << /S /GoToR /F (
\the\filename.pdf) /D (name
\pdfxrefdest) >> >>
}%
8930 \special{pdf:bann << /Border
[0 0 0] /Type /Annot /Subtype /Link /A
8931 << /S /GoTo /D (name
\pdfxrefdest) >> >>
}%
8934 \setcolor{\linkcolor}%
8938 % Have to otherify everything special to allow the \csname to
8939 % include an _ in the xref name, etc.
8943 \expandafter\global\expandafter\let\expandafter\Xthisreftitle
8944 \csname XR
#1-title
\endcsname
8947 % Float references are printed completely differently: "Figure 1.2"
8948 % instead of "[somenode], p.3". \iffloat distinguishes them by
8949 % \Xthisreftitle being set to a magic string.
8950 \iffloat\Xthisreftitle
8951 % If the user specified the print name (third arg) to the ref,
8952 % print it instead of our usual "Figure 1.2".
8953 \ifdim\wd\printedrefnamebox =
0pt
8959 % If the user also gave the printed manual name (fifth arg), append
8961 \ifdim \wd\printedmanualbox >
0pt
8962 \space \putwordin{} \cite{\printedmanual}%
8965 % node/anchor (non-float) references.
8967 % If we use \unhbox to print the node names, TeX does not insert
8968 % empty discretionaries after hyphens, which means that it will not
8969 % find a line break at a hyphen in a node names. Since some manuals
8970 % are best written with fairly long node names, containing hyphens,
8971 % this is a loss. Therefore, we give the text of the node name
8972 % again, so it is as if TeX is seeing it for the first time.
8974 \ifdim \wd\printedmanualbox >
0pt
8975 % Cross-manual reference with a printed manual name.
8977 \crossmanualxref{\cite{\printedmanual\unskip}}%
8979 \else\ifdim \wd\infofilenamebox >
0pt
8980 % Cross-manual reference with only an info filename (arg 4), no
8981 % printed manual name (arg 5). This is essentially the same as
8982 % the case above; we output the filename, since we have nothing else.
8984 \crossmanualxref{\code{\infofilename\unskip}}%
8987 % Reference within this manual.
8989 % _ (for example) has to be the character _ for the purposes of the
8990 % control sequence corresponding to the node, but it has to expand
8991 % into the usual \leavevmode...\vrule stuff for purposes of
8992 % printing. So we \turnoffactive for the \refx-snt, back on for the
8993 % printing, back off for the \refx-pg.
8995 % Only output a following space if the -snt ref is nonempty; for
8996 % @unnumbered and @anchor, it won't be.
8997 \setbox2 =
\hbox{\ignorespaces \refx{#1-snt
}{}}%
8998 \ifdim \wd2 >
0pt
\refx{#1-snt
}\space\fi
9000 % output the `[mynode]' via the macro below so it can be overridden.
9001 \xrefprintnodename\printedrefname
9003 % But we always want a comma and a space:
9006 % output the `page 3'.
9007 \turnoffactive \putwordpage\tie\refx{#1-pg
}{}%
9008 % Add a , if xref followed by a space
9009 \if\space\noexpand\tokenafterxref ,
%
9010 \else\ifx\
\tokenafterxref ,
% @TAB
9011 \else\ifx\*
\tokenafterxref ,
% @*
9012 \else\ifx\
\tokenafterxref ,
% @SPACE
9014 \tokenafterxref ,
% @NL
9015 \else\ifx\tie\tokenafterxref ,
% @tie
9022 % Output a cross-manual xref to #1. Used just above (twice).
9024 % Only include the text "Section ``foo'' in" if the foo is neither
9025 % missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply
9026 % "see The Foo Manual", the idea being to refer to the whole manual.
9028 % But, this being TeX, we can't easily compare our node name against the
9029 % string "Top" while ignoring the possible spaces before and after in
9030 % the input. By adding the arbitrary 7sp below, we make it much less
9031 % likely that a real node name would have the same width as "Top" (e.g.,
9032 % in a monospaced font). Hopefully it will never happen in practice.
9034 % For the same basic reason, we retypeset the "Top" at every
9035 % reference, since the current font is indeterminate.
9037 \def\crossmanualxref#1{%
9038 \setbox\toprefbox =
\hbox{Top
\kern7sp}%
9039 \setbox2 =
\hbox{\ignorespaces \printedrefname \unskip \kern7sp}%
9040 \ifdim \wd2 >
7sp
% nonempty?
9041 \ifdim \wd2 =
\wd\toprefbox \else % same as Top?
9042 \putwordSection{} ``
\printedrefname''
\putwordin{}\space
9048 % This macro is called from \xrefX for the `[nodename]' part of xref
9049 % output. It's a separate macro only so it can be changed more easily,
9050 % since square brackets don't work well in some documents. Particularly
9051 % one that Bob is working on :).
9053 \def\xrefprintnodename#1{[#1]}
9055 % Things referred to by \setref.
9061 \putwordChapter@tie
\the\chapno
9062 \else \ifnum\subsecno=
0
9063 \putwordSection@tie
\the\chapno.
\the\secno
9064 \else \ifnum\subsubsecno=
0
9065 \putwordSection@tie
\the\chapno.
\the\secno.
\the\subsecno
9067 \putwordSection@tie
\the\chapno.
\the\secno.
\the\subsecno.
\the\subsubsecno
9072 \putwordAppendix@tie @char
\the\appendixno{}%
9073 \else \ifnum\subsecno=
0
9074 \putwordSection@tie @char
\the\appendixno.
\the\secno
9075 \else \ifnum\subsubsecno=
0
9076 \putwordSection@tie @char
\the\appendixno.
\the\secno.
\the\subsecno
9079 @char
\the\appendixno.
\the\secno.
\the\subsecno.
\the\subsubsecno
9083 % \refx{NAME}{SUFFIX} - reference a cross-reference string named NAME. SUFFIX
9084 % is output afterwards if non-empty.
9091 \expandafter\global\expandafter\let\expandafter\thisrefX
9092 \csname XR
#1\endcsname
9095 % If not defined, say something at least.
9096 \angleleft un\-de\-fined
\angleright
9099 {\toks0 =
{#1}% avoid expansion of possibly-complex value
9100 \message{\linenumber Undefined cross reference `
\the\toks0'.
}}%
9103 \global\warnedxrefstrue
9104 \message{Cross reference values unknown; you must run TeX again.
}%
9109 % It's defined, so just use it.
9112 #2% Output the suffix in any case.
9115 % This is the macro invoked by entries in the aux file. Define a control
9116 % sequence for a cross-reference target (we prepend XR to the control sequence
9117 % name to avoid collisions). The value is the page number. If this is a float
9118 % type, we have more work to do.
9121 {% Expand the node or anchor name to remove control sequences.
9122 % \turnoffactive stops 8-bit characters being changed to commands
9123 % like @'e. \refx does the same to retrieve the value in the definition.
9127 \xdef\safexrefname{#1}%
9130 \expandafter\gdef\csname XR
\safexrefname\endcsname{#2}% remember this xref
9132 % Was that xref control sequence that we just defined for a float?
9133 \expandafter\iffloat\csname XR
\safexrefname\endcsname
9134 % it was a float, and we have the (safe) float type in \iffloattype.
9135 \expandafter\let\expandafter\floatlist
9136 \csname floatlist
\iffloattype\endcsname
9138 % Is this the first time we've seen this float type?
9139 \expandafter\ifx\floatlist\relax
9140 \toks0 =
{\do}% yes, so just \do
9142 % had it before, so preserve previous elements in list.
9143 \toks0 =
\expandafter{\floatlist\do}%
9146 % Remember this xref in the control sequence \floatlistFLOATTYPE,
9147 % for later use in \listoffloats.
9148 \expandafter\xdef\csname floatlist
\iffloattype\endcsname{\the\toks0
9153 % If working on a large document in chapters, it is convenient to
9154 % be able to disable indexing, cross-referencing, and contents, for test runs.
9155 % This is done with @novalidate at the beginning of the file.
9157 \newif\iflinks \linkstrue % by default we want the aux files.
9158 \let\novalidate =
\linksfalse
9160 % Used when writing to the aux file, or when using data from it.
9161 \def\requireauxfile{%
9164 % Open the new aux file. TeX will close it automatically at exit.
9165 \immediate\openout\auxfile=
\jobname.aux
9167 \global\let\requireauxfile=
\relax % Only do this once.
9170 % Read the last existing aux file, if any. No error if none exists.
9173 \openin 1 \jobname.aux
9176 \global\havexrefstrue
9181 \def\setupdatafile{%
9182 \catcode`\^^@=
\other
9183 \catcode`\^^A=
\other
9184 \catcode`\^^B=
\other
9185 \catcode`\^^C=
\other
9186 \catcode`\^^D=
\other
9187 \catcode`\^^E=
\other
9188 \catcode`\^^F=
\other
9189 \catcode`\^^G=
\other
9190 \catcode`\^^H=
\other
9191 \catcode`\^^K=
\other
9192 \catcode`\^^L=
\other
9193 \catcode`\^^N=
\other
9194 \catcode`\^^P=
\other
9195 \catcode`\^^Q=
\other
9196 \catcode`\^^R=
\other
9197 \catcode`\^^S=
\other
9198 \catcode`\^^T=
\other
9199 \catcode`\^^U=
\other
9200 \catcode`\^^V=
\other
9201 \catcode`\^^W=
\other
9202 \catcode`\^^X=
\other
9203 \catcode`\^^Z=
\other
9204 \catcode`\^^
[=
\other
9205 \catcode`\^^\=
\other
9206 \catcode`\^^
]=
\other
9207 \catcode`\^^^=
\other
9208 \catcode`\^^_=
\other
9209 % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc.
9210 % in xref tags, i.e., node names. But since ^^e4 notation isn't
9211 % supported in the main text, it doesn't seem desirable. Furthermore,
9212 % that is not enough: for node names that actually contain a ^
9213 % character, we would end up writing a line like this: 'xrdef {'hat
9214 % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first
9215 % argument, and \hat is not an expandable control sequence. It could
9216 % all be worked out, but why? Either we support ^^ or we don't.
9218 % The other change necessary for this was to define \auxhat:
9219 % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter
9220 % and then to call \auxhat in \setq.
9224 % Special characters. Should be turned off anyway, but...
9237 \catcode`+=
\other % avoid \+ for paranoia even though we've turned it off
9239 % This is to support \ in node names and titles, since the \
9240 % characters end up in a \csname. It's easier than
9241 % leaving it active and making its active definition an actual \
9242 % character. What I don't understand is why it works in the *value*
9243 % of the xrdef. Seems like it should be a catcode12 \, and that
9244 % should not typeset properly. But it works, so I'm moving on for
9245 % now. --karl, 15jan04.
9248 % @ is our escape character in .aux files, and we need braces.
9254 \def\readdatafile#1{%
9261 \message{insertions,
}
9262 % including footnotes.
9264 \newcount \footnoteno
9266 % The trailing space in the following definition for supereject is
9267 % vital for proper filling; pages come out unaligned when you do a
9268 % pagealignmacro call if that space before the closing brace is
9269 % removed. (Generally, numeric constants should always be followed by a
9270 % space to prevent strange expansion errors.)
9271 \def\supereject{\par\penalty -
20000\footnoteno =
0 }
9273 % @footnotestyle is meaningful for Info output only.
9274 \let\footnotestyle=
\comment
9278 % Auto-number footnotes. Otherwise like plain.
9280 \global\advance\footnoteno by \@ne
9281 \edef\thisfootno{$^
{\the\footnoteno}$
}%
9283 % In case the footnote comes at the end of a sentence, preserve the
9284 % extra spacing after we do the footnote number.
9286 \ifhmode\edef\@sf
{\spacefactor\the\spacefactor}\ptexslash\fi
9288 % Remove inadvertent blank space before typesetting the footnote number.
9294 % Don't bother with the trickery in plain.tex to not require the
9295 % footnote text as a parameter. Our footnotes don't need to be so general.
9297 % Oh yes, they do; otherwise, @ifset (and anything else that uses
9298 % \parseargline) fails inside footnotes because the tokens are fixed when
9299 % the footnote is read. --karl, 16nov96.
9302 \insert\footins\bgroup
9304 % Nested footnotes are not supported in TeX, that would take a lot
9305 % more work. (\startsavinginserts does not suffice.)
9306 \let\footnote=
\errfootnotenest
9308 % We want to typeset this text as a normal paragraph, even if the
9309 % footnote reference occurs in (for example) a display environment.
9310 % So reset some parameters.
9311 \hsize=
\txipagewidth
9312 \interlinepenalty\interfootnotelinepenalty
9313 \splittopskip\ht\strutbox % top baseline for broken footnotes
9314 \splitmaxdepth\dp\strutbox
9315 \floatingpenalty\@MM
9320 \parindent\defaultparindent
9324 % Because we use hanging indentation in footnotes, a @noindent appears
9325 % to exdent this text, so make it be a no-op. makeinfo does not use
9326 % hanging indentation so @noindent can still be needed within footnote
9327 % text after an @example or the like (not that this is good style).
9328 \let\noindent =
\relax
9330 % Hang the footnote text off the number. Use \everypar in case the
9331 % footnote extends for more than one paragraph.
9332 \everypar =
{\hang}%
9333 \textindent{\thisfootno}%
9335 % Don't crash into the line above the footnote text. Since this
9336 % expands into a box, it must come within the paragraph, lest it
9337 % provide a place where TeX can split the footnote.
9340 % Invoke rest of plain TeX footnote routine.
9341 \futurelet\next\fo@t
9343 }%end \catcode `\@=11
9345 \def\errfootnotenest{%
9347 \errmessage{Nested footnotes not supported in texinfo.tex,
9348 even though they work in makeinfo; sorry
}
9351 \def\errfootnoteheading{%
9353 \errmessage{Footnotes in chapters, sections, etc., are not supported
}
9356 % In case a @footnote appears in a vbox, save the footnote text and create
9357 % the real \insert just after the vbox finished. Otherwise, the insertion
9359 % Similarly, if a @footnote appears inside an alignment, save the footnote
9360 % text to a box and make the \insert when a row of the table is finished.
9361 % And the same can be done for other insert classes. --kasal, 16nov03.
9363 % Replace the \insert primitive by a cheating macro.
9364 % Deeper inside, just make sure that the saved insertions are not spilled
9367 \def\startsavinginserts{%
9368 \ifx \insert\ptexinsert
9369 \let\insert\saveinsert
9371 \let\checkinserts\relax
9375 % This \insert replacement works for both \insert\footins{foo} and
9376 % \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}.
9379 \edef\next{\noexpand\savetobox \makeSAVEname#1}%
9380 \afterassignment\next
9381 % swallow the left brace
9384 \def\makeSAVEname#1{\makecsname{SAVE
\expandafter\gobble\string#1}}
9385 \def\savetobox#1{\global\setbox#1 =
\vbox\bgroup \unvbox#1}
9387 \def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi}
9389 \def\placesaveins#1{%
9390 \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname
9394 % eat @SAVE -- beware, all of them have catcode \other:
9396 \def\dospecials{\do S
\do A
\do V
\do E
} \uncatcodespecials % ;-)
9397 \gdef\gobblesave @SAVE
{}
9401 \def\newsaveins #1{%
9402 \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}%
9405 \def\newsaveinsX #1{%
9406 \csname newbox
\endcsname #1%
9407 \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts
9412 \let\checkinserts\empty
9417 % @image. We use the macros from epsf.tex to support this.
9418 % If epsf.tex is not installed and @image is used, we complain.
9420 % Check for and read epsf.tex up front. If we read it only at @image
9421 % time, we might be inside a group, and then its definitions would get
9422 % undone and the next image would fail.
9423 \openin 1 = epsf.tex
9425 % Do not bother showing banner with epsf.tex v2.7k (available in
9426 % doc/epsf.tex and on ctan).
9427 \def\epsfannounce{\toks0 =
}%
9432 % We will only complain once about lack of epsf.tex.
9433 \newif\ifwarnednoepsf
9434 \newhelp\noepsfhelp{epsf.tex must be installed for images to
9435 work. It is also included in the Texinfo distribution, or you can get
9436 it from ftp://tug.org/tex/epsf.tex.
}
9439 \ifx\epsfbox\thisisundefined
9440 \ifwarnednoepsf \else
9441 \errhelp =
\noepsfhelp
9442 \errmessage{epsf.tex not found, images will be ignored
}%
9443 \global\warnednoepsftrue
9446 \imagexxx #1,,,,,
\finish
9450 % Arguments to @image:
9451 % #1 is (mandatory) image filename; we tack on .eps extension.
9452 % #2 is (optional) width, #3 is (optional) height.
9453 % #4 is (ignored optional) html alt text.
9454 % #5 is (ignored optional) extension.
9455 % #6 is just the usual extra ignored arg for parsing stuff.
9457 \def\imagexxx#1,
#2,
#3,
#4,
#5,
#6\finish{\begingroup
9458 \catcode`\^^M =
5 % in case we're inside an example
9459 \normalturnoffactive % allow _ et al. in names
9460 \def\xprocessmacroarg{\eatspaces}% in case we are being used via a macro
9461 % If the image is by itself, center it.
9464 \else \ifx\centersub\centerV
9465 % for @center @image, we need a vbox so we can have our vertical space
9467 \vbox\bgroup % vbox has better behavior than vtop herev
9472 % Usually we'll have text after the image which will insert
9473 % \parskip glue, so insert it here too to equalize the space
9475 \nobreak\vskip\parskip
9479 % Leave vertical mode so that indentation from an enclosing
9480 % environment such as @quotation is respected.
9481 % However, if we're at the top level, we don't want the
9482 % normal paragraph indentation.
9483 % On the other hand, if we are in the case of @center @image, we don't
9484 % want to start a paragraph, which will create a hsize-width box and
9485 % eradicate the centering.
9486 \ifx\centersub\centerV\else \noindent \fi
9490 % For pdfTeX and LuaTeX <= 0.80
9491 \dopdfimage{#1}{#2}{#3}%
9493 \ifx\XeTeXrevision\thisisundefined
9495 % \epsfbox itself resets \epsf?size at each figure.
9496 \setbox0 =
\hbox{\ignorespaces #2}%
9497 \ifdim\wd0 >
0pt
\epsfxsize=
#2\relax \fi
9498 \setbox0 =
\hbox{\ignorespaces #3}%
9499 \ifdim\wd0 >
0pt
\epsfysize=
#3\relax \fi
9503 \doxeteximage{#1}{#2}{#3}%
9508 \medskip % space after a standalone image
9510 \ifx\centersub\centerV \egroup \fi
9514 % @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables,
9515 % etc. We don't actually implement floating yet, we always include the
9516 % float "here". But it seemed the best name for the future.
9518 \envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,
\finish}
9520 % There may be a space before second and/or third parameter; delete it.
9521 \def\eatcommaspace#1,
{#1,
}
9523 % #1 is the optional FLOATTYPE, the text label for this float, typically
9524 % "Figure", "Table", "Example", etc. Can't contain commas. If omitted,
9525 % this float will not be numbered and cannot be referred to.
9527 % #2 is the optional xref label. Also must be present for the float to
9530 % #3 is the optional positioning argument; for now, it is ignored. It
9531 % will somehow specify the positions allowed to float to (here, top, bottom).
9533 % We keep a separate counter for each FLOATTYPE, which we reset at each
9534 % chapter-level command.
9535 \let\resetallfloatnos=
\empty
9537 \def\dofloat#1,
#2,
#3,
#4\finish{%
9538 \let\thiscaption=
\empty
9539 \let\thisshortcaption=
\empty
9541 % don't lose footnotes inside @float.
9543 % BEWARE: when the floats start float, we have to issue warning whenever an
9544 % insert appears inside a float which could possibly float. --kasal, 26may04
9548 % We can't be used inside a paragraph.
9553 \def\floatlabel{#2}%
9554 \def\floatloc{#3}% we do nothing with this yet.
9556 \ifx\floattype\empty
9557 \let\safefloattype=
\empty
9560 % the floattype might have accents or other special characters,
9561 % but we need to use it in a control sequence name.
9564 \xdef\safefloattype{\floattype}%
9568 % If label is given but no type, we handle that as the empty type.
9569 \ifx\floatlabel\empty \else
9570 % We want each FLOATTYPE to be numbered separately (Figure 1,
9571 % Table 1, Figure 2, ...). (And if no label, no number.)
9573 \expandafter\getfloatno\csname\safefloattype floatno
\endcsname
9574 \global\advance\floatno by
1
9577 % This magic value for \lastsection is output by \setref as the
9578 % XREFLABEL-title value. \xrefX uses it to distinguish float
9579 % labels (which have a completely different output format) from
9580 % node and anchor labels. And \xrdef uses it to construct the
9583 \edef\lastsection{\floatmagic=
\safefloattype}%
9584 \setref{\floatlabel}{Yfloat
}%
9588 % start with \parskip glue, I guess.
9591 % Don't suppress indentation if a float happens to start a section.
9592 \restorefirstparagraphindent
9595 % we have these possibilities:
9596 % @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap
9597 % @float Foo,lbl & no caption: Foo 1.1
9598 % @float Foo & @caption{Cap}: Foo: Cap
9599 % @float Foo & no caption: Foo
9600 % @float ,lbl & Caption{Cap}: 1.1: Cap
9601 % @float ,lbl & no caption: 1.1
9602 % @float & @caption{Cap}: Cap
9603 % @float & no caption:
9606 \let\floatident =
\empty
9608 % In all cases, if we have a float type, it comes first.
9609 \ifx\floattype\empty \else \def\floatident{\floattype}\fi
9611 % If we have an xref label, the number comes next.
9612 \ifx\floatlabel\empty \else
9613 \ifx\floattype\empty \else % if also had float type, need tie first.
9614 \appendtomacro\floatident{\tie}%
9617 \appendtomacro\floatident{\chaplevelprefix\the\floatno}%
9620 % Start the printed caption with what we've constructed in
9621 % \floatident, but keep it separate; we need \floatident again.
9622 \let\captionline =
\floatident
9624 \ifx\thiscaption\empty \else
9625 \ifx\floatident\empty \else
9626 \appendtomacro\captionline{:
}% had ident, so need a colon between
9630 \appendtomacro\captionline{\scanexp\thiscaption}%
9633 % If we have anything to print, print it, with space before.
9634 % Eventually this needs to become an \insert.
9635 \ifx\captionline\empty \else
9639 % Space below caption.
9643 % If have an xref label, write the list of floats info. Do this
9644 % after the caption, to avoid chance of it being a breakpoint.
9645 \ifx\floatlabel\empty \else
9646 % Write the text that goes in the lof to the aux file as
9647 % \floatlabel-lof. Besides \floatident, we include the short
9648 % caption if specified, else the full caption if specified, else nothing.
9653 \ifx\thisshortcaption\empty
9654 \def\gtemp{\thiscaption}%
9656 \def\gtemp{\thisshortcaption}%
9658 \immediate\write\auxfile{@xrdef
{\floatlabel-lof
}{\floatident
9659 \ifx\gtemp\empty \else :
\gtemp \fi}}%
9662 \egroup % end of \vtop
9667 % Append the tokens #2 to the definition of macro #1, not expanding either.
9669 \def\appendtomacro#1#2{%
9670 \expandafter\def\expandafter#1\expandafter{#1#2}%
9673 % @caption, @shortcaption
9675 \def\caption{\docaption\thiscaption}
9676 \def\shortcaption{\docaption\thisshortcaption}
9677 \def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption}
9678 \def\defcaption#1#2{\egroup \def#1{#2}}
9680 % The parameter is the control sequence identifying the counter we are
9681 % going to use. Create it if it doesn't exist and assign it to \floatno.
9684 % Haven't seen this figure type before.
9685 \csname newcount
\endcsname #1%
9687 % Remember to reset this floatno at the next chap.
9688 \expandafter\gdef\expandafter\resetallfloatnos
9689 \expandafter{\resetallfloatnos #1=
0 }%
9694 % \setref calls this to get the XREFLABEL-snt value. We want an @xref
9695 % to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we
9696 % first read the @float command.
9698 \def\Yfloat{\floattype@tie
\chaplevelprefix\the\floatno}%
9700 % Magic string used for the XREFLABEL-title value, so \xrefX can
9701 % distinguish floats from other xref types.
9702 \def\floatmagic{!!float!!
}
9704 % #1 is the control sequence we are passed; we expand into a conditional
9705 % which is true if #1 represents a float ref. That is, the magic
9706 % \lastsection value which we \setref above.
9708 \def\iffloat#1{\expandafter\doiffloat#1==
\finish}
9710 % #1 is (maybe) the \floatmagic string. If so, #2 will be the
9711 % (safe) float type for this float. We set \iffloattype to #2.
9713 \def\doiffloat#1=
#2=
#3\finish{%
9715 \def\iffloattype{#2}%
9716 \ifx\temp\floatmagic
9719 % @listoffloats FLOATTYPE - print a list of floats like a table of contents.
9721 \parseargdef\listoffloats{%
9722 \def\floattype{#1}% floattype
9724 % the floattype might have accents or other special characters,
9725 % but we need to use it in a control sequence name.
9728 \xdef\safefloattype{\floattype}%
9731 % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE.
9732 \expandafter\ifx\csname floatlist
\safefloattype\endcsname \relax
9734 % if the user said @listoffloats foo but never @float foo.
9735 \message{\linenumber No `
\safefloattype' floats to list.
}%
9739 \leftskip=
\tocindent % indent these entries like a toc
9740 \let\do=
\listoffloatsdo
9741 \csname floatlist
\safefloattype\endcsname
9746 % This is called on each entry in a list of floats. We're passed the
9747 % xref label, in the form LABEL-title, which is how we save it in the
9748 % aux file. We strip off the -title and look up \XRLABEL-lof, which
9749 % has the text we're supposed to typeset here.
9751 % Figures without xref labels will not be included in the list (since
9752 % they won't appear in the aux file).
9754 \def\listoffloatsdo#1{\listoffloatsdoentry#1\finish}
9755 \def\listoffloatsdoentry#1-title
\finish{{%
9756 % Can't fully expand XR#1-lof because it can contain anything. Just
9757 % pass the control sequence. On the other hand, XR#1-pg is just the
9758 % page number, and we want to fully expand that so we can get a link
9760 \toksA =
\expandafter{\csname XR
#1-lof
\endcsname}%
9762 % use the same \entry macro we use to generate the TOC and index.
9763 \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR
#1-pg
\endcsname}}%
9768 \message{localization,
}
9770 % For single-language documents, @documentlanguage is usually given very
9771 % early, just after @documentencoding. Single argument is the language
9772 % (de) or locale (de_DE) abbreviation.
9775 \catcode`
\_ =
\active
9777 \parseargdef\documentlanguage{%
9778 \tex % read txi-??.tex file in plain TeX.
9779 % Read the file by the name they passed if it exists.
9780 \let_ =
\normalunderscore % normal _ character for filename test
9781 \openin 1 txi-
#1.tex
9783 \documentlanguagetrywithoutunderscore #1_
\finish
9785 \globaldefs =
1 % everything in the txi-LL files needs to persist
9789 \endgroup % end raw TeX
9792 % If they passed de_DE, and txi-de_DE.tex doesn't exist,
9795 \gdef\documentlanguagetrywithoutunderscore#1_
#2\finish{%
9796 \openin 1 txi-
#1.tex
9798 \errhelp =
\nolanghelp
9799 \errmessage{Cannot read language file txi-
#1.tex
}%
9801 \globaldefs =
1 % everything in the txi-LL files needs to persist
9806 }% end of special _ catcode
9808 \newhelp\nolanghelp{The given language definition file cannot be found or
9809 is empty. Maybe you need to install it? Putting it in the current
9810 directory should work if nowhere else does.
}
9812 % This macro is called from txi-??.tex files; the first argument is the
9813 % \language name to set (without the "\lang@" prefix), the second and
9814 % third args are \{left,right}hyphenmin.
9816 % The language names to pass are determined when the format is built.
9817 % See the etex.log file created at that time, e.g.,
9818 % /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log.
9820 % With TeX Live 2008, etex now includes hyphenation patterns for all
9821 % available languages. This means we can support hyphenation in
9822 % Texinfo, at least to some extent. (This still doesn't solve the
9823 % accented characters problem.)
9826 \def\txisetlanguage#1#2#3{%
9827 % do not set the language if the name is undefined in the current TeX.
9828 \expandafter\ifx\csname lang@
#1\endcsname \relax
9829 \message{no patterns for
#1}%
9831 \global\language =
\csname lang@
#1\endcsname
9833 % but there is no harm in adjusting the hyphenmin values regardless.
9834 \global\lefthyphenmin =
#2\relax
9835 \global\righthyphenmin =
#3\relax
9838 % XeTeX and LuaTeX can handle native Unicode.
9839 % Their default I/O is UTF-8 sequence instead of byte-wise.
9840 % Other TeX engine (pdfTeX etc.) I/O is byte-wise.
9842 \newif\iftxinativeunicodecapable
9843 \newif\iftxiusebytewiseio
9845 \ifx\XeTeXrevision\thisisundefined
9846 \ifx\luatexversion\thisisundefined
9847 \txinativeunicodecapablefalse
9848 \txiusebytewiseiotrue
9850 \txinativeunicodecapabletrue
9851 \txiusebytewiseiofalse
9854 \txinativeunicodecapabletrue
9855 \txiusebytewiseiofalse
9858 % Set I/O by bytes instead of UTF-8 sequence for XeTeX and LuaTex
9859 % for non-UTF-8 (byte-wise) encodings.
9861 \def\setbytewiseio{%
9862 \ifx\XeTeXrevision\thisisundefined
9864 \XeTeXdefaultencoding "bytes"
% For subsequent files to be read
9865 \XeTeXinputencoding "bytes"
% For document root file
9866 % Unfortunately, there seems to be no corresponding XeTeX command for
9867 % output encoding. This is a problem for auxiliary index and TOC files.
9868 % The only solution would be perhaps to write out @U{...} sequences in
9869 % place of non-ASCII characters.
9872 \ifx\luatexversion\thisisundefined
9875 local utf8_char
, byte
, gsub = unicode
.utf8
.char
, string.byte
, string.gsub
9876 local function convert_char (char
)
9877 return utf8_char(byte(char
))
9880 local function convert_line (line
)
9881 return gsub(line
, ".", convert_char
)
9884 callback
.register("process_input_buffer", convert_line
)
9886 local function convert_line_out (line
)
9888 for c
in string.utfvalues(line
) do
9889 line_out
= line_out
.. string.char(c
)
9894 callback
.register("process_output_buffer", convert_line_out
)
9898 \txiusebytewiseiotrue
9902 % Helpers for encodings.
9903 % Set the catcode of characters 128 through 255 to the specified number.
9905 \def\setnonasciicharscatcode#1{%
9907 \loop\ifnum\count255<
256
9908 \global\catcode\count255=
#1\relax
9909 \advance\count255 by
1
9913 \def\setnonasciicharscatcodenonglobal#1{%
9915 \loop\ifnum\count255<
256
9916 \catcode\count255=
#1\relax
9917 \advance\count255 by
1
9921 % @documentencoding sets the definition of non-ASCII characters
9922 % according to the specified encoding.
9924 \def\documentencoding{\parseargusing\filenamecatcodes\documentencodingzzz}
9925 \def\documentencodingzzz#1{%
9927 % Encoding being declared for the document.
9928 \def\declaredencoding{\csname #1.enc
\endcsname}%
9930 % Supported encodings: names converted to tokens in order to be able
9931 % to compare them with \ifx.
9932 \def\ascii{\csname US-ASCII.enc
\endcsname}%
9933 \def\latnine{\csname ISO-
8859-
15.enc
\endcsname}%
9934 \def\latone{\csname ISO-
8859-
1.enc
\endcsname}%
9935 \def\lattwo{\csname ISO-
8859-
2.enc
\endcsname}%
9936 \def\utfeight{\csname UTF-
8.enc
\endcsname}%
9938 \ifx \declaredencoding \ascii
9941 \else \ifx \declaredencoding \lattwo
9942 \iftxinativeunicodecapable
9945 \setnonasciicharscatcode\active
9948 \else \ifx \declaredencoding \latone
9949 \iftxinativeunicodecapable
9952 \setnonasciicharscatcode\active
9955 \else \ifx \declaredencoding \latnine
9956 \iftxinativeunicodecapable
9959 \setnonasciicharscatcode\active
9962 \else \ifx \declaredencoding \utfeight
9963 \iftxinativeunicodecapable
9964 % For native Unicode (XeTeX and LuaTeX)
9965 \nativeunicodechardefs
9967 % For UTF-8 byte sequence (TeX, eTeX and pdfTeX)
9968 \setnonasciicharscatcode\active
9969 % since we already invoked \utfeightchardefs at the top level
9970 % (below), do not re-invoke it, then our check for duplicated
9971 % definitions triggers. Making non-ascii chars active is enough.
9975 \message{Ignoring unknown
document encoding:
#1.
}%
9985 % A message to be logged when using a character that isn't available
9986 % the default font encoding (OT1).
9988 \def\missingcharmsg#1{\message{Character missing, sorry:
#1.
}}
9990 % Take account of \c (plain) vs. \, (Texinfo) difference.
9991 \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,
{#1}\fi}
9993 % First, make active non-ASCII characters in order for them to be
9994 % correctly categorized when TeX reads the replacement text of
9995 % macros containing the character definitions.
9996 \setnonasciicharscatcode\active
10001 \ifpassthroughchars
10008 % Latin1 (ISO-8859-1) character definitions.
10009 \def\latonechardefs{%
10010 \gdefchar^^a0
{\tie}
10011 \gdefchar^^a1
{\exclamdown}
10012 \gdefchar^^a2
{{\tcfont \char162}} % cent
10013 \gdefchar^^a3
{\pounds}
10014 \gdefchar^^a4
{{\tcfont \char164}} % currency
10015 \gdefchar^^a5
{{\tcfont \char165}} % yen
10016 \gdefchar^^a6
{{\tcfont \char166}} % broken bar
10018 \gdefchar^^a8
{\"
{}}
10019 \gdefchar^^a9
{\copyright}
10020 \gdefchar^^aa
{\ordf}
10021 \gdefchar^^ab
{\guillemetleft}
10022 \gdefchar^^ac
{\ensuremath\lnot}
10024 \gdefchar^^ae
{\registeredsymbol}
10025 \gdefchar^^af
{\=
{}}
10027 \gdefchar^^b0
{\textdegree}
10028 \gdefchar^^b1
{$
\pm$
}
10029 \gdefchar^^b2
{$^
2$
}
10030 \gdefchar^^b3
{$^
3$
}
10031 \gdefchar^^b4
{\'
{}}
10032 \gdefchar^^b5
{$
\mu$
}
10034 \gdefchar^^b7
{\ensuremath\cdot}
10035 \gdefchar^^b8
{\cedilla\
}
10036 \gdefchar^^b9
{$^
1$
}
10037 \gdefchar^^ba
{\ordm}
10038 \gdefchar^^bb
{\guillemetright}
10039 \gdefchar^^bc
{$
1\over4$
}
10040 \gdefchar^^bd
{$
1\over2$
}
10041 \gdefchar^^be
{$
3\over4$
}
10042 \gdefchar^^bf
{\questiondown}
10049 \gdefchar^^c5
{\ringaccent A
}
10051 \gdefchar^^c7
{\cedilla C
}
10068 \gdefchar^^d7
{$
\times$
}
10083 \gdefchar^^e5
{\ringaccent a
}
10085 \gdefchar^^e7
{\cedilla c
}
10090 \gdefchar^^ec
{\`
{\dotless i
}}
10091 \gdefchar^^ed
{\'
{\dotless i
}}
10092 \gdefchar^^ee
{\^
{\dotless i
}}
10093 \gdefchar^^ef
{\"
{\dotless i
}}
10102 \gdefchar^^f7
{$
\div$
}
10113 % Latin9 (ISO-8859-15) encoding character definitions.
10114 \def\latninechardefs{%
10115 % Encoding is almost identical to Latin1.
10118 \gdefchar^^a4
{\euro}
10119 \gdefchar^^a6
{\v S
}
10120 \gdefchar^^a8
{\v s
}
10121 \gdefchar^^b4
{\v Z
}
10122 \gdefchar^^b8
{\v z
}
10128 % Latin2 (ISO-8859-2) character definitions.
10129 \def\lattwochardefs{%
10130 \gdefchar^^a0
{\tie}
10131 \gdefchar^^a1
{\ogonek{A
}}
10132 \gdefchar^^a2
{\u{}}
10134 \gdefchar^^a4
{\missingcharmsg{CURRENCY SIGN
}}
10135 \gdefchar^^a5
{\v L
}
10138 \gdefchar^^a8
{\"
{}}
10139 \gdefchar^^a9
{\v S
}
10140 \gdefchar^^aa
{\cedilla S
}
10141 \gdefchar^^ab
{\v T
}
10144 \gdefchar^^ae
{\v Z
}
10145 \gdefchar^^af
{\dotaccent Z
}
10147 \gdefchar^^b0
{\textdegree}
10148 \gdefchar^^b1
{\ogonek{a
}}
10149 \gdefchar^^b2
{\ogonek{ }}
10151 \gdefchar^^b4
{\'
{}}
10152 \gdefchar^^b5
{\v l
}
10154 \gdefchar^^b7
{\v{}}
10155 \gdefchar^^b8
{\cedilla\
}
10156 \gdefchar^^b9
{\v s
}
10157 \gdefchar^^ba
{\cedilla s
}
10158 \gdefchar^^bb
{\v t
}
10160 \gdefchar^^bd
{\H{}}
10161 \gdefchar^^be
{\v z
}
10162 \gdefchar^^bf
{\dotaccent z
}
10167 \gdefchar^^c3
{\u A
}
10171 \gdefchar^^c7
{\cedilla C
}
10172 \gdefchar^^c8
{\v C
}
10174 \gdefchar^^ca
{\ogonek{E
}}
10176 \gdefchar^^cc
{\v E
}
10179 \gdefchar^^cf
{\v D
}
10183 \gdefchar^^d2
{\v N
}
10186 \gdefchar^^d5
{\H O
}
10188 \gdefchar^^d7
{$
\times$
}
10189 \gdefchar^^d8
{\v R
}
10190 \gdefchar^^d9
{\ringaccent U
}
10192 \gdefchar^^db
{\H U
}
10195 \gdefchar^^de
{\cedilla T
}
10201 \gdefchar^^e3
{\u a
}
10205 \gdefchar^^e7
{\cedilla c
}
10206 \gdefchar^^e8
{\v c
}
10208 \gdefchar^^ea
{\ogonek{e
}}
10210 \gdefchar^^ec
{\v e
}
10211 \gdefchar^^ed
{\'
{\dotless{i
}}}
10212 \gdefchar^^ee
{\^
{\dotless{i
}}}
10213 \gdefchar^^ef
{\v d
}
10217 \gdefchar^^f2
{\v n
}
10220 \gdefchar^^f5
{\H o
}
10222 \gdefchar^^f7
{$
\div$
}
10223 \gdefchar^^f8
{\v r
}
10224 \gdefchar^^f9
{\ringaccent u
}
10226 \gdefchar^^fb
{\H u
}
10229 \gdefchar^^fe
{\cedilla t
}
10230 \gdefchar^^ff
{\dotaccent{}}
10233 % UTF-8 character definitions.
10235 % This code to support UTF-8 is based on LaTeX's utf8.def, with some
10236 % changes for Texinfo conventions. It is included here under the GPL by
10237 % permission from Frank Mittelbach and the LaTeX team.
10239 \newcount\countUTFx
10240 \newcount\countUTFy
10241 \newcount\countUTFz
10243 \gdef\UTFviiiTwoOctets#1#2{\expandafter
10244 \UTFviiiDefined\csname u8:
#1\string #2\endcsname}
10246 \gdef\UTFviiiThreeOctets#1#2#3{\expandafter
10247 \UTFviiiDefined\csname u8:
#1\string #2\string #3\endcsname}
10249 \gdef\UTFviiiFourOctets#1#2#3#4{\expandafter
10250 \UTFviiiDefined\csname u8:
#1\string #2\string #3\string #4\endcsname}
10252 \gdef\UTFviiiDefined#1{%
10254 \message{\linenumber Unicode char
\string #1 not defined for Texinfo
}%
10260 % Give non-ASCII bytes the active definitions for processing UTF-8 sequences
10266 % Loop from \countUTFx to \countUTFy, performing \UTFviiiTmp
10267 % substituting ~ and $ with a character token of that value.
10269 \global\catcode\countUTFx\active
10270 \uccode`\~
\countUTFx
10271 \uccode`\$
\countUTFx
10272 \uppercase\expandafter{\UTFviiiTmp}%
10273 \advance\countUTFx by
1
10274 \ifnum\countUTFx <
\countUTFy
10275 \expandafter\UTFviiiLoop
10278 % For bytes other than the first in a UTF-8 sequence. Not expected to
10279 % be expanded except when writing to auxiliary files.
10284 \ifpassthroughchars $
\fi}}%
10291 \ifpassthroughchars $
%
10292 \else\expandafter\UTFviiiTwoOctets\expandafter$
\fi}}%
10299 \ifpassthroughchars $
%
10300 \else\expandafter\UTFviiiThreeOctets\expandafter$
\fi}}%
10307 \ifpassthroughchars $
%
10308 \else\expandafter\UTFviiiFourOctets\expandafter$
\fi
10313 \def\globallet{\global\let} % save some \expandafter's below
10315 % @U{xxxx} to produce U+xxxx, if we support it.
10317 \expandafter\ifx\csname uni:
#1\endcsname \relax
10318 \iftxinativeunicodecapable
10319 % Any Unicode characters can be used by native Unicode.
10320 % However, if the font does not have the glyph, the letter will miss.
10322 \uccode`\.="
#1\relax
10326 \errhelp =
\EMsimple
10327 \errmessage{Unicode character U+
#1 not supported, sorry
}%
10330 \csname uni:
#1\endcsname
10334 % These macros are used here to construct the name of a control
10335 % sequence to be defined.
10336 \def\UTFviiiTwoOctetsName#1#2{%
10337 \csname u8:
#1\string #2\endcsname}%
10338 \def\UTFviiiThreeOctetsName#1#2#3{%
10339 \csname u8:
#1\string #2\string #3\endcsname}%
10340 \def\UTFviiiFourOctetsName#1#2#3#4{%
10341 \csname u8:
#1\string #2\string #3\string #4\endcsname}%
10343 % For UTF-8 byte sequence (TeX, e-TeX and pdfTeX)
10344 % Definition macro to replace the Unicode character
10345 % Definition macro that is used by @U command
10355 \gdef\DeclareUnicodeCharacterUTFviii#1#2{%
10356 \countUTFz = "
#1\relax
10360 % Give \u8:... its definition. The sequence of seven \expandafter's
10361 % expands after the \gdef three times, e.g.
10363 % 1. \UTFviiTwoOctetsName B1 B2
10364 % 2. \csname u8:B1 \string B2 \endcsname
10365 % 3. \u8: B1 B2 (a single control sequence token)
10367 \expandafter\expandafter
10368 \expandafter\expandafter
10369 \expandafter\expandafter
10370 \expandafter\gdef \UTFviiiTmp{#2}%
10372 \expandafter\ifx\csname uni:
#1\endcsname \relax \else
10373 \message{Internal error, already defined:
#1}%
10376 % define an additional control sequence for this code point.
10377 \expandafter\globallet\csname uni:
#1\endcsname \UTFviiiTmp
10380 % Given the value in \countUTFz as a Unicode code point, set \UTFviiiTmp
10381 % to the corresponding UTF-8 sequence.
10382 \gdef\parseXMLCharref{%
10383 \ifnum\countUTFz < "A0
\relax
10384 \errhelp =
\EMsimple
10385 \errmessage{Cannot define Unicode char value <
00A0
}%
10386 \else\ifnum\countUTFz < "
800\relax
10388 \parseUTFviiiB C
\UTFviiiTwoOctetsName.,
%
10389 \else\ifnum\countUTFz < "
10000\relax
10392 \parseUTFviiiB E
\UTFviiiThreeOctetsName.
{,;
}%
10397 \parseUTFviiiB F
\UTFviiiFourOctetsName.
{!,;
}%
10401 % Extract a byte from the end of the UTF-8 representation of \countUTFx.
10402 % It must be a non-initial byte in the sequence.
10403 % Change \uccode of #1 for it to be used in \parseUTFviiiB as one
10405 \gdef\parseUTFviiiA#1{%
10406 \countUTFx =
\countUTFz
10407 \divide\countUTFz by
64
10408 \countUTFy =
\countUTFz % Save to be the future value of \countUTFz.
10409 \multiply\countUTFz by
64
10411 % \countUTFz is now \countUTFx with the last 5 bits cleared. Subtract
10412 % in order to get the last five bits.
10413 \advance\countUTFx by -
\countUTFz
10415 % Convert this to the byte in the UTF-8 sequence.
10416 \advance\countUTFx by
128
10417 \uccode `
#1\countUTFx
10418 \countUTFz =
\countUTFy}
10420 % Used to put a UTF-8 byte sequence into \UTFviiiTmp
10421 % #1 is the increment for \countUTFz to yield a the first byte of the UTF-8
10423 % #2 is one of the \UTFviii*OctetsName macros.
10424 % #3 is always a full stop (.)
10425 % #4 is a template for the other bytes in the sequence. The values for these
10426 % bytes is substituted in here with \uppercase using the \uccode's.
10427 \gdef\parseUTFviiiB#1#2#3#4{%
10428 \advance\countUTFz by "
#10\relax
10429 \uccode `
#3\countUTFz
10430 \uppercase{\gdef\UTFviiiTmp{#2#3#4}}}
10433 % For native Unicode (XeTeX and LuaTeX)
10434 % Definition macro that is set catcode other non global
10436 \def\DeclareUnicodeCharacterNativeOther#1#2{%
10440 % https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_M
10441 % U+0000..U+007F = https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block)
10442 % U+0080..U+00FF = https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)
10443 % U+0100..U+017F = https://en.wikipedia.org/wiki/Latin_Extended-A
10444 % U+0180..U+024F = https://en.wikipedia.org/wiki/Latin_Extended-B
10446 % Many of our renditions are less than wonderful, and all the missing
10447 % characters are available somewhere. Loading the necessary fonts
10448 % awaits user request. We can't truly support Unicode without
10449 % reimplementing everything that's been done in LaTeX for many years,
10450 % plus probably using luatex or xetex, and who knows what else.
10451 % We won't be doing that here in this simple file. But we can try to at
10452 % least make most of the characters not bomb out.
10454 \def\unicodechardefs{%
10455 \DeclareUnicodeCharacter{00A0
}{\tie}%
10456 \DeclareUnicodeCharacter{00A1
}{\exclamdown}%
10457 \DeclareUnicodeCharacter{00A2
}{{\tcfont \char162}}% 0242=cent
10458 \DeclareUnicodeCharacter{00A3
}{\pounds}%
10459 \DeclareUnicodeCharacter{00A4
}{{\tcfont \char164}}% 0244=currency
10460 \DeclareUnicodeCharacter{00A5
}{{\tcfont \char165}}% 0245=yen
10461 \DeclareUnicodeCharacter{00A6
}{{\tcfont \char166}}% 0246=brokenbar
10462 \DeclareUnicodeCharacter{00A7
}{\S}%
10463 \DeclareUnicodeCharacter{00A8
}{\"
{ }}%
10464 \DeclareUnicodeCharacter{00A9
}{\copyright}%
10465 \DeclareUnicodeCharacter{00AA
}{\ordf}%
10466 \DeclareUnicodeCharacter{00AB
}{\guillemetleft}%
10467 \DeclareUnicodeCharacter{00AC
}{\ensuremath\lnot}%
10468 \DeclareUnicodeCharacter{00AD
}{\-
}%
10469 \DeclareUnicodeCharacter{00AE
}{\registeredsymbol}%
10470 \DeclareUnicodeCharacter{00AF
}{\=
{ }}%
10472 \DeclareUnicodeCharacter{00B0
}{\ringaccent{ }}%
10473 \DeclareUnicodeCharacter{00B1
}{\ensuremath\pm}%
10474 \DeclareUnicodeCharacter{00B2
}{$^
2$
}%
10475 \DeclareUnicodeCharacter{00B3
}{$^
3$
}%
10476 \DeclareUnicodeCharacter{00B4
}{\'
{ }}%
10477 \DeclareUnicodeCharacter{00B5
}{$
\mu$
}%
10478 \DeclareUnicodeCharacter{00B6
}{\P}%
10479 \DeclareUnicodeCharacter{00B7
}{\ensuremath\cdot}%
10480 \DeclareUnicodeCharacter{00B8
}{\cedilla{ }}%
10481 \DeclareUnicodeCharacter{00B9
}{$^
1$
}%
10482 \DeclareUnicodeCharacter{00BA
}{\ordm}%
10483 \DeclareUnicodeCharacter{00BB
}{\guillemetright}%
10484 \DeclareUnicodeCharacter{00BC
}{$
1\over4$
}%
10485 \DeclareUnicodeCharacter{00BD
}{$
1\over2$
}%
10486 \DeclareUnicodeCharacter{00BE
}{$
3\over4$
}%
10487 \DeclareUnicodeCharacter{00BF
}{\questiondown}%
10489 \DeclareUnicodeCharacter{00C0
}{\`A
}%
10490 \DeclareUnicodeCharacter{00C1
}{\'A
}%
10491 \DeclareUnicodeCharacter{00C2
}{\^A
}%
10492 \DeclareUnicodeCharacter{00C3
}{\~A
}%
10493 \DeclareUnicodeCharacter{00C4
}{\"A
}%
10494 \DeclareUnicodeCharacter{00C5
}{\AA}%
10495 \DeclareUnicodeCharacter{00C6
}{\AE}%
10496 \DeclareUnicodeCharacter{00C7
}{\cedilla{C
}}%
10497 \DeclareUnicodeCharacter{00C8
}{\`E
}%
10498 \DeclareUnicodeCharacter{00C9
}{\'E
}%
10499 \DeclareUnicodeCharacter{00CA
}{\^E
}%
10500 \DeclareUnicodeCharacter{00CB
}{\"E
}%
10501 \DeclareUnicodeCharacter{00CC
}{\`I
}%
10502 \DeclareUnicodeCharacter{00CD
}{\'I
}%
10503 \DeclareUnicodeCharacter{00CE
}{\^I
}%
10504 \DeclareUnicodeCharacter{00CF
}{\"I
}%
10506 \DeclareUnicodeCharacter{00D0
}{\DH}%
10507 \DeclareUnicodeCharacter{00D1
}{\~N
}%
10508 \DeclareUnicodeCharacter{00D2
}{\`O
}%
10509 \DeclareUnicodeCharacter{00D3
}{\'O
}%
10510 \DeclareUnicodeCharacter{00D4
}{\^O
}%
10511 \DeclareUnicodeCharacter{00D5
}{\~O
}%
10512 \DeclareUnicodeCharacter{00D6
}{\"O
}%
10513 \DeclareUnicodeCharacter{00D7
}{\ensuremath\times}%
10514 \DeclareUnicodeCharacter{00D8
}{\O}%
10515 \DeclareUnicodeCharacter{00D9
}{\`U
}%
10516 \DeclareUnicodeCharacter{00DA
}{\'U
}%
10517 \DeclareUnicodeCharacter{00DB
}{\^U
}%
10518 \DeclareUnicodeCharacter{00DC
}{\"U
}%
10519 \DeclareUnicodeCharacter{00DD
}{\'Y
}%
10520 \DeclareUnicodeCharacter{00DE
}{\TH}%
10521 \DeclareUnicodeCharacter{00DF
}{\ss}%
10523 \DeclareUnicodeCharacter{00E0
}{\`a
}%
10524 \DeclareUnicodeCharacter{00E1
}{\'a
}%
10525 \DeclareUnicodeCharacter{00E2
}{\^a
}%
10526 \DeclareUnicodeCharacter{00E3
}{\~a
}%
10527 \DeclareUnicodeCharacter{00E4
}{\"a
}%
10528 \DeclareUnicodeCharacter{00E5
}{\aa}%
10529 \DeclareUnicodeCharacter{00E6
}{\ae}%
10530 \DeclareUnicodeCharacter{00E7
}{\cedilla{c
}}%
10531 \DeclareUnicodeCharacter{00E8
}{\`e
}%
10532 \DeclareUnicodeCharacter{00E9
}{\'e
}%
10533 \DeclareUnicodeCharacter{00EA
}{\^e
}%
10534 \DeclareUnicodeCharacter{00EB
}{\"e
}%
10535 \DeclareUnicodeCharacter{00EC
}{\`
{\dotless{i
}}}%
10536 \DeclareUnicodeCharacter{00ED
}{\'
{\dotless{i
}}}%
10537 \DeclareUnicodeCharacter{00EE
}{\^
{\dotless{i
}}}%
10538 \DeclareUnicodeCharacter{00EF
}{\"
{\dotless{i
}}}%
10540 \DeclareUnicodeCharacter{00F0
}{\dh}%
10541 \DeclareUnicodeCharacter{00F1
}{\~n
}%
10542 \DeclareUnicodeCharacter{00F2
}{\`o
}%
10543 \DeclareUnicodeCharacter{00F3
}{\'o
}%
10544 \DeclareUnicodeCharacter{00F4
}{\^o
}%
10545 \DeclareUnicodeCharacter{00F5
}{\~o
}%
10546 \DeclareUnicodeCharacter{00F6
}{\"o
}%
10547 \DeclareUnicodeCharacter{00F7
}{\ensuremath\div}%
10548 \DeclareUnicodeCharacter{00F8
}{\o}%
10549 \DeclareUnicodeCharacter{00F9
}{\`u
}%
10550 \DeclareUnicodeCharacter{00FA
}{\'u
}%
10551 \DeclareUnicodeCharacter{00FB
}{\^u
}%
10552 \DeclareUnicodeCharacter{00FC
}{\"u
}%
10553 \DeclareUnicodeCharacter{00FD
}{\'y
}%
10554 \DeclareUnicodeCharacter{00FE
}{\th}%
10555 \DeclareUnicodeCharacter{00FF
}{\"y
}%
10557 \DeclareUnicodeCharacter{0100}{\=A
}%
10558 \DeclareUnicodeCharacter{0101}{\=a
}%
10559 \DeclareUnicodeCharacter{0102}{\u{A
}}%
10560 \DeclareUnicodeCharacter{0103}{\u{a
}}%
10561 \DeclareUnicodeCharacter{0104}{\ogonek{A
}}%
10562 \DeclareUnicodeCharacter{0105}{\ogonek{a
}}%
10563 \DeclareUnicodeCharacter{0106}{\'C
}%
10564 \DeclareUnicodeCharacter{0107}{\'c
}%
10565 \DeclareUnicodeCharacter{0108}{\^C
}%
10566 \DeclareUnicodeCharacter{0109}{\^c
}%
10567 \DeclareUnicodeCharacter{010A
}{\dotaccent{C
}}%
10568 \DeclareUnicodeCharacter{010B
}{\dotaccent{c
}}%
10569 \DeclareUnicodeCharacter{010C
}{\v{C
}}%
10570 \DeclareUnicodeCharacter{010D
}{\v{c
}}%
10571 \DeclareUnicodeCharacter{010E
}{\v{D
}}%
10572 \DeclareUnicodeCharacter{010F
}{d'
}%
10574 \DeclareUnicodeCharacter{0110}{\DH}%
10575 \DeclareUnicodeCharacter{0111}{\dh}%
10576 \DeclareUnicodeCharacter{0112}{\=E
}%
10577 \DeclareUnicodeCharacter{0113}{\=e
}%
10578 \DeclareUnicodeCharacter{0114}{\u{E
}}%
10579 \DeclareUnicodeCharacter{0115}{\u{e
}}%
10580 \DeclareUnicodeCharacter{0116}{\dotaccent{E
}}%
10581 \DeclareUnicodeCharacter{0117}{\dotaccent{e
}}%
10582 \DeclareUnicodeCharacter{0118}{\ogonek{E
}}%
10583 \DeclareUnicodeCharacter{0119}{\ogonek{e
}}%
10584 \DeclareUnicodeCharacter{011A
}{\v{E
}}%
10585 \DeclareUnicodeCharacter{011B
}{\v{e
}}%
10586 \DeclareUnicodeCharacter{011C
}{\^G
}%
10587 \DeclareUnicodeCharacter{011D
}{\^g
}%
10588 \DeclareUnicodeCharacter{011E
}{\u{G
}}%
10589 \DeclareUnicodeCharacter{011F
}{\u{g
}}%
10591 \DeclareUnicodeCharacter{0120}{\dotaccent{G
}}%
10592 \DeclareUnicodeCharacter{0121}{\dotaccent{g
}}%
10593 \DeclareUnicodeCharacter{0122}{\cedilla{G
}}%
10594 \DeclareUnicodeCharacter{0123}{\cedilla{g
}}%
10595 \DeclareUnicodeCharacter{0124}{\^H
}%
10596 \DeclareUnicodeCharacter{0125}{\^h
}%
10597 \DeclareUnicodeCharacter{0126}{\missingcharmsg{H WITH STROKE
}}%
10598 \DeclareUnicodeCharacter{0127}{\missingcharmsg{h WITH STROKE
}}%
10599 \DeclareUnicodeCharacter{0128}{\~I
}%
10600 \DeclareUnicodeCharacter{0129}{\~
{\dotless{i
}}}%
10601 \DeclareUnicodeCharacter{012A
}{\=I
}%
10602 \DeclareUnicodeCharacter{012B
}{\=
{\dotless{i
}}}%
10603 \DeclareUnicodeCharacter{012C
}{\u{I
}}%
10604 \DeclareUnicodeCharacter{012D
}{\u{\dotless{i
}}}%
10605 \DeclareUnicodeCharacter{012E
}{\ogonek{I
}}%
10606 \DeclareUnicodeCharacter{012F
}{\ogonek{i
}}%
10608 \DeclareUnicodeCharacter{0130}{\dotaccent{I
}}%
10609 \DeclareUnicodeCharacter{0131}{\dotless{i
}}%
10610 \DeclareUnicodeCharacter{0132}{IJ
}%
10611 \DeclareUnicodeCharacter{0133}{ij
}%
10612 \DeclareUnicodeCharacter{0134}{\^J
}%
10613 \DeclareUnicodeCharacter{0135}{\^
{\dotless{j
}}}%
10614 \DeclareUnicodeCharacter{0136}{\cedilla{K
}}%
10615 \DeclareUnicodeCharacter{0137}{\cedilla{k
}}%
10616 \DeclareUnicodeCharacter{0138}{\ensuremath\kappa}%
10617 \DeclareUnicodeCharacter{0139}{\'L
}%
10618 \DeclareUnicodeCharacter{013A
}{\'l
}%
10619 \DeclareUnicodeCharacter{013B
}{\cedilla{L
}}%
10620 \DeclareUnicodeCharacter{013C
}{\cedilla{l
}}%
10621 \DeclareUnicodeCharacter{013D
}{L'
}% should kern
10622 \DeclareUnicodeCharacter{013E
}{l'
}% should kern
10623 \DeclareUnicodeCharacter{013F
}{L
\U{00B7
}}%
10625 \DeclareUnicodeCharacter{0140}{l
\U{00B7
}}%
10626 \DeclareUnicodeCharacter{0141}{\L}%
10627 \DeclareUnicodeCharacter{0142}{\l}%
10628 \DeclareUnicodeCharacter{0143}{\'N
}%
10629 \DeclareUnicodeCharacter{0144}{\'n
}%
10630 \DeclareUnicodeCharacter{0145}{\cedilla{N
}}%
10631 \DeclareUnicodeCharacter{0146}{\cedilla{n
}}%
10632 \DeclareUnicodeCharacter{0147}{\v{N
}}%
10633 \DeclareUnicodeCharacter{0148}{\v{n
}}%
10634 \DeclareUnicodeCharacter{0149}{'n
}%
10635 \DeclareUnicodeCharacter{014A
}{\missingcharmsg{ENG
}}%
10636 \DeclareUnicodeCharacter{014B
}{\missingcharmsg{eng
}}%
10637 \DeclareUnicodeCharacter{014C
}{\=O
}%
10638 \DeclareUnicodeCharacter{014D
}{\=o
}%
10639 \DeclareUnicodeCharacter{014E
}{\u{O
}}%
10640 \DeclareUnicodeCharacter{014F
}{\u{o
}}%
10642 \DeclareUnicodeCharacter{0150}{\H{O
}}%
10643 \DeclareUnicodeCharacter{0151}{\H{o
}}%
10644 \DeclareUnicodeCharacter{0152}{\OE}%
10645 \DeclareUnicodeCharacter{0153}{\oe}%
10646 \DeclareUnicodeCharacter{0154}{\'R
}%
10647 \DeclareUnicodeCharacter{0155}{\'r
}%
10648 \DeclareUnicodeCharacter{0156}{\cedilla{R
}}%
10649 \DeclareUnicodeCharacter{0157}{\cedilla{r
}}%
10650 \DeclareUnicodeCharacter{0158}{\v{R
}}%
10651 \DeclareUnicodeCharacter{0159}{\v{r
}}%
10652 \DeclareUnicodeCharacter{015A
}{\'S
}%
10653 \DeclareUnicodeCharacter{015B
}{\'s
}%
10654 \DeclareUnicodeCharacter{015C
}{\^S
}%
10655 \DeclareUnicodeCharacter{015D
}{\^s
}%
10656 \DeclareUnicodeCharacter{015E
}{\cedilla{S
}}%
10657 \DeclareUnicodeCharacter{015F
}{\cedilla{s
}}%
10659 \DeclareUnicodeCharacter{0160}{\v{S
}}%
10660 \DeclareUnicodeCharacter{0161}{\v{s
}}%
10661 \DeclareUnicodeCharacter{0162}{\cedilla{T
}}%
10662 \DeclareUnicodeCharacter{0163}{\cedilla{t
}}%
10663 \DeclareUnicodeCharacter{0164}{\v{T
}}%
10664 \DeclareUnicodeCharacter{0165}{\v{t
}}%
10665 \DeclareUnicodeCharacter{0166}{\missingcharmsg{H WITH STROKE
}}%
10666 \DeclareUnicodeCharacter{0167}{\missingcharmsg{h WITH STROKE
}}%
10667 \DeclareUnicodeCharacter{0168}{\~U
}%
10668 \DeclareUnicodeCharacter{0169}{\~u
}%
10669 \DeclareUnicodeCharacter{016A
}{\=U
}%
10670 \DeclareUnicodeCharacter{016B
}{\=u
}%
10671 \DeclareUnicodeCharacter{016C
}{\u{U
}}%
10672 \DeclareUnicodeCharacter{016D
}{\u{u
}}%
10673 \DeclareUnicodeCharacter{016E
}{\ringaccent{U
}}%
10674 \DeclareUnicodeCharacter{016F
}{\ringaccent{u
}}%
10676 \DeclareUnicodeCharacter{0170}{\H{U
}}%
10677 \DeclareUnicodeCharacter{0171}{\H{u
}}%
10678 \DeclareUnicodeCharacter{0172}{\ogonek{U
}}%
10679 \DeclareUnicodeCharacter{0173}{\ogonek{u
}}%
10680 \DeclareUnicodeCharacter{0174}{\^W
}%
10681 \DeclareUnicodeCharacter{0175}{\^w
}%
10682 \DeclareUnicodeCharacter{0176}{\^Y
}%
10683 \DeclareUnicodeCharacter{0177}{\^y
}%
10684 \DeclareUnicodeCharacter{0178}{\"Y
}%
10685 \DeclareUnicodeCharacter{0179}{\'Z
}%
10686 \DeclareUnicodeCharacter{017A
}{\'z
}%
10687 \DeclareUnicodeCharacter{017B
}{\dotaccent{Z
}}%
10688 \DeclareUnicodeCharacter{017C
}{\dotaccent{z
}}%
10689 \DeclareUnicodeCharacter{017D
}{\v{Z
}}%
10690 \DeclareUnicodeCharacter{017E
}{\v{z
}}%
10691 \DeclareUnicodeCharacter{017F
}{\missingcharmsg{LONG S
}}%
10693 \DeclareUnicodeCharacter{01C4
}{D
\v{Z
}}%
10694 \DeclareUnicodeCharacter{01C5
}{D
\v{z
}}%
10695 \DeclareUnicodeCharacter{01C6
}{d
\v{z
}}%
10696 \DeclareUnicodeCharacter{01C7
}{LJ
}%
10697 \DeclareUnicodeCharacter{01C8
}{Lj
}%
10698 \DeclareUnicodeCharacter{01C9
}{lj
}%
10699 \DeclareUnicodeCharacter{01CA
}{NJ
}%
10700 \DeclareUnicodeCharacter{01CB
}{Nj
}%
10701 \DeclareUnicodeCharacter{01CC
}{nj
}%
10702 \DeclareUnicodeCharacter{01CD
}{\v{A
}}%
10703 \DeclareUnicodeCharacter{01CE
}{\v{a
}}%
10704 \DeclareUnicodeCharacter{01CF
}{\v{I
}}%
10706 \DeclareUnicodeCharacter{01D0
}{\v{\dotless{i
}}}%
10707 \DeclareUnicodeCharacter{01D1
}{\v{O
}}%
10708 \DeclareUnicodeCharacter{01D2
}{\v{o
}}%
10709 \DeclareUnicodeCharacter{01D3
}{\v{U
}}%
10710 \DeclareUnicodeCharacter{01D4
}{\v{u
}}%
10712 \DeclareUnicodeCharacter{01E2
}{\=
{\AE}}%
10713 \DeclareUnicodeCharacter{01E3
}{\=
{\ae}}%
10714 \DeclareUnicodeCharacter{01E6
}{\v{G
}}%
10715 \DeclareUnicodeCharacter{01E7
}{\v{g
}}%
10716 \DeclareUnicodeCharacter{01E8
}{\v{K
}}%
10717 \DeclareUnicodeCharacter{01E9
}{\v{k
}}%
10719 \DeclareUnicodeCharacter{01F0
}{\v{\dotless{j
}}}%
10720 \DeclareUnicodeCharacter{01F1
}{DZ
}%
10721 \DeclareUnicodeCharacter{01F2
}{Dz
}%
10722 \DeclareUnicodeCharacter{01F3
}{dz
}%
10723 \DeclareUnicodeCharacter{01F4
}{\'G
}%
10724 \DeclareUnicodeCharacter{01F5
}{\'g
}%
10725 \DeclareUnicodeCharacter{01F8
}{\`N
}%
10726 \DeclareUnicodeCharacter{01F9
}{\`n
}%
10727 \DeclareUnicodeCharacter{01FC
}{\'
{\AE}}%
10728 \DeclareUnicodeCharacter{01FD
}{\'
{\ae}}%
10729 \DeclareUnicodeCharacter{01FE
}{\'
{\O}}%
10730 \DeclareUnicodeCharacter{01FF
}{\'
{\o}}%
10732 \DeclareUnicodeCharacter{021E
}{\v{H
}}%
10733 \DeclareUnicodeCharacter{021F
}{\v{h
}}%
10735 \DeclareUnicodeCharacter{0226}{\dotaccent{A
}}%
10736 \DeclareUnicodeCharacter{0227}{\dotaccent{a
}}%
10737 \DeclareUnicodeCharacter{0228}{\cedilla{E
}}%
10738 \DeclareUnicodeCharacter{0229}{\cedilla{e
}}%
10739 \DeclareUnicodeCharacter{022E
}{\dotaccent{O
}}%
10740 \DeclareUnicodeCharacter{022F
}{\dotaccent{o
}}%
10742 \DeclareUnicodeCharacter{0232}{\=Y
}%
10743 \DeclareUnicodeCharacter{0233}{\=y
}%
10744 \DeclareUnicodeCharacter{0237}{\dotless{j
}}%
10746 \DeclareUnicodeCharacter{02DB
}{\ogonek{ }}%
10748 % Greek letters upper case
10749 \DeclareUnicodeCharacter{0391}{{\it A
}}%
10750 \DeclareUnicodeCharacter{0392}{{\it B
}}%
10751 \DeclareUnicodeCharacter{0393}{\ensuremath{\mit\Gamma}}%
10752 \DeclareUnicodeCharacter{0394}{\ensuremath{\mit\Delta}}%
10753 \DeclareUnicodeCharacter{0395}{{\it E
}}%
10754 \DeclareUnicodeCharacter{0396}{{\it Z
}}%
10755 \DeclareUnicodeCharacter{0397}{{\it H
}}%
10756 \DeclareUnicodeCharacter{0398}{\ensuremath{\mit\Theta}}%
10757 \DeclareUnicodeCharacter{0399}{{\it I
}}%
10758 \DeclareUnicodeCharacter{039A
}{{\it K
}}%
10759 \DeclareUnicodeCharacter{039B
}{\ensuremath{\mit\Lambda}}%
10760 \DeclareUnicodeCharacter{039C
}{{\it M
}}%
10761 \DeclareUnicodeCharacter{039D
}{{\it N
}}%
10762 \DeclareUnicodeCharacter{039E
}{\ensuremath{\mit\Xi}}%
10763 \DeclareUnicodeCharacter{039F
}{{\it O
}}%
10764 \DeclareUnicodeCharacter{03A0
}{\ensuremath{\mit\Pi}}%
10765 \DeclareUnicodeCharacter{03A1
}{{\it P
}}%
10766 %\DeclareUnicodeCharacter{03A2}{} % none - corresponds to final sigma
10767 \DeclareUnicodeCharacter{03A3
}{\ensuremath{\mit\Sigma}}%
10768 \DeclareUnicodeCharacter{03A4
}{{\it T
}}%
10769 \DeclareUnicodeCharacter{03A5
}{\ensuremath{\mit\Upsilon}}%
10770 \DeclareUnicodeCharacter{03A6
}{\ensuremath{\mit\Phi}}%
10771 \DeclareUnicodeCharacter{03A7
}{{\it X
}}%
10772 \DeclareUnicodeCharacter{03A8
}{\ensuremath{\mit\Psi}}%
10773 \DeclareUnicodeCharacter{03A9
}{\ensuremath{\mit\Omega}}%
10775 % Vowels with accents
10776 \DeclareUnicodeCharacter{0390}{\ensuremath{\ddot{\acute\iota}}}%
10777 \DeclareUnicodeCharacter{03AC
}{\ensuremath{\acute\alpha}}%
10778 \DeclareUnicodeCharacter{03AD
}{\ensuremath{\acute\epsilon}}%
10779 \DeclareUnicodeCharacter{03AE
}{\ensuremath{\acute\eta}}%
10780 \DeclareUnicodeCharacter{03AF
}{\ensuremath{\acute\iota}}%
10781 \DeclareUnicodeCharacter{03B0
}{\ensuremath{\acute{\ddot\upsilon}}}%
10783 % Standalone accent
10784 \DeclareUnicodeCharacter{0384}{\ensuremath{\acute{\
}}}%
10786 % Greek letters lower case
10787 \DeclareUnicodeCharacter{03B1
}{\ensuremath\alpha}%
10788 \DeclareUnicodeCharacter{03B2
}{\ensuremath\beta}%
10789 \DeclareUnicodeCharacter{03B3
}{\ensuremath\gamma}%
10790 \DeclareUnicodeCharacter{03B4
}{\ensuremath\delta}%
10791 \DeclareUnicodeCharacter{03B5
}{\ensuremath\epsilon}%
10792 \DeclareUnicodeCharacter{03B6
}{\ensuremath\zeta}%
10793 \DeclareUnicodeCharacter{03B7
}{\ensuremath\eta}%
10794 \DeclareUnicodeCharacter{03B8
}{\ensuremath\theta}%
10795 \DeclareUnicodeCharacter{03B9
}{\ensuremath\iota}%
10796 \DeclareUnicodeCharacter{03BA
}{\ensuremath\kappa}%
10797 \DeclareUnicodeCharacter{03BB
}{\ensuremath\lambda}%
10798 \DeclareUnicodeCharacter{03BC
}{\ensuremath\mu}%
10799 \DeclareUnicodeCharacter{03BD
}{\ensuremath\nu}%
10800 \DeclareUnicodeCharacter{03BE
}{\ensuremath\xi}%
10801 \DeclareUnicodeCharacter{03BF
}{{\it o
}}% omicron
10802 \DeclareUnicodeCharacter{03C0
}{\ensuremath\pi}%
10803 \DeclareUnicodeCharacter{03C1
}{\ensuremath\rho}%
10804 \DeclareUnicodeCharacter{03C2
}{\ensuremath\varsigma}%
10805 \DeclareUnicodeCharacter{03C3
}{\ensuremath\sigma}%
10806 \DeclareUnicodeCharacter{03C4
}{\ensuremath\tau}%
10807 \DeclareUnicodeCharacter{03C5
}{\ensuremath\upsilon}%
10808 \DeclareUnicodeCharacter{03C6
}{\ensuremath\phi}%
10809 \DeclareUnicodeCharacter{03C7
}{\ensuremath\chi}%
10810 \DeclareUnicodeCharacter{03C8
}{\ensuremath\psi}%
10811 \DeclareUnicodeCharacter{03C9
}{\ensuremath\omega}%
10813 % More Greek vowels with accents
10814 \DeclareUnicodeCharacter{03CA
}{\ensuremath{\ddot\iota}}%
10815 \DeclareUnicodeCharacter{03CB
}{\ensuremath{\ddot\upsilon}}%
10816 \DeclareUnicodeCharacter{03CC
}{\ensuremath{\acute o
}}%
10817 \DeclareUnicodeCharacter{03CD
}{\ensuremath{\acute\upsilon}}%
10818 \DeclareUnicodeCharacter{03CE
}{\ensuremath{\acute\omega}}%
10820 % Variant Greek letters
10821 \DeclareUnicodeCharacter{03D1
}{\ensuremath\vartheta}%
10822 \DeclareUnicodeCharacter{03D6
}{\ensuremath\varpi}%
10823 \DeclareUnicodeCharacter{03F1
}{\ensuremath\varrho}%
10825 \DeclareUnicodeCharacter{1E02
}{\dotaccent{B
}}%
10826 \DeclareUnicodeCharacter{1E03
}{\dotaccent{b
}}%
10827 \DeclareUnicodeCharacter{1E04
}{\udotaccent{B
}}%
10828 \DeclareUnicodeCharacter{1E05
}{\udotaccent{b
}}%
10829 \DeclareUnicodeCharacter{1E06
}{\ubaraccent{B
}}%
10830 \DeclareUnicodeCharacter{1E07
}{\ubaraccent{b
}}%
10831 \DeclareUnicodeCharacter{1E0A
}{\dotaccent{D
}}%
10832 \DeclareUnicodeCharacter{1E0B
}{\dotaccent{d
}}%
10833 \DeclareUnicodeCharacter{1E0C
}{\udotaccent{D
}}%
10834 \DeclareUnicodeCharacter{1E0D
}{\udotaccent{d
}}%
10835 \DeclareUnicodeCharacter{1E0E
}{\ubaraccent{D
}}%
10836 \DeclareUnicodeCharacter{1E0F
}{\ubaraccent{d
}}%
10838 \DeclareUnicodeCharacter{1E1E
}{\dotaccent{F
}}%
10839 \DeclareUnicodeCharacter{1E1F
}{\dotaccent{f
}}%
10841 \DeclareUnicodeCharacter{1E20
}{\=G
}%
10842 \DeclareUnicodeCharacter{1E21
}{\=g
}%
10843 \DeclareUnicodeCharacter{1E22
}{\dotaccent{H
}}%
10844 \DeclareUnicodeCharacter{1E23
}{\dotaccent{h
}}%
10845 \DeclareUnicodeCharacter{1E24
}{\udotaccent{H
}}%
10846 \DeclareUnicodeCharacter{1E25
}{\udotaccent{h
}}%
10847 \DeclareUnicodeCharacter{1E26
}{\"H
}%
10848 \DeclareUnicodeCharacter{1E27
}{\"h
}%
10850 \DeclareUnicodeCharacter{1E30
}{\'K
}%
10851 \DeclareUnicodeCharacter{1E31
}{\'k
}%
10852 \DeclareUnicodeCharacter{1E32
}{\udotaccent{K
}}%
10853 \DeclareUnicodeCharacter{1E33
}{\udotaccent{k
}}%
10854 \DeclareUnicodeCharacter{1E34
}{\ubaraccent{K
}}%
10855 \DeclareUnicodeCharacter{1E35
}{\ubaraccent{k
}}%
10856 \DeclareUnicodeCharacter{1E36
}{\udotaccent{L
}}%
10857 \DeclareUnicodeCharacter{1E37
}{\udotaccent{l
}}%
10858 \DeclareUnicodeCharacter{1E3A
}{\ubaraccent{L
}}%
10859 \DeclareUnicodeCharacter{1E3B
}{\ubaraccent{l
}}%
10860 \DeclareUnicodeCharacter{1E3E
}{\'M
}%
10861 \DeclareUnicodeCharacter{1E3F
}{\'m
}%
10863 \DeclareUnicodeCharacter{1E40
}{\dotaccent{M
}}%
10864 \DeclareUnicodeCharacter{1E41
}{\dotaccent{m
}}%
10865 \DeclareUnicodeCharacter{1E42
}{\udotaccent{M
}}%
10866 \DeclareUnicodeCharacter{1E43
}{\udotaccent{m
}}%
10867 \DeclareUnicodeCharacter{1E44
}{\dotaccent{N
}}%
10868 \DeclareUnicodeCharacter{1E45
}{\dotaccent{n
}}%
10869 \DeclareUnicodeCharacter{1E46
}{\udotaccent{N
}}%
10870 \DeclareUnicodeCharacter{1E47
}{\udotaccent{n
}}%
10871 \DeclareUnicodeCharacter{1E48
}{\ubaraccent{N
}}%
10872 \DeclareUnicodeCharacter{1E49
}{\ubaraccent{n
}}%
10874 \DeclareUnicodeCharacter{1E54
}{\'P
}%
10875 \DeclareUnicodeCharacter{1E55
}{\'p
}%
10876 \DeclareUnicodeCharacter{1E56
}{\dotaccent{P
}}%
10877 \DeclareUnicodeCharacter{1E57
}{\dotaccent{p
}}%
10878 \DeclareUnicodeCharacter{1E58
}{\dotaccent{R
}}%
10879 \DeclareUnicodeCharacter{1E59
}{\dotaccent{r
}}%
10880 \DeclareUnicodeCharacter{1E5A
}{\udotaccent{R
}}%
10881 \DeclareUnicodeCharacter{1E5B
}{\udotaccent{r
}}%
10882 \DeclareUnicodeCharacter{1E5E
}{\ubaraccent{R
}}%
10883 \DeclareUnicodeCharacter{1E5F
}{\ubaraccent{r
}}%
10885 \DeclareUnicodeCharacter{1E60
}{\dotaccent{S
}}%
10886 \DeclareUnicodeCharacter{1E61
}{\dotaccent{s
}}%
10887 \DeclareUnicodeCharacter{1E62
}{\udotaccent{S
}}%
10888 \DeclareUnicodeCharacter{1E63
}{\udotaccent{s
}}%
10889 \DeclareUnicodeCharacter{1E6A
}{\dotaccent{T
}}%
10890 \DeclareUnicodeCharacter{1E6B
}{\dotaccent{t
}}%
10891 \DeclareUnicodeCharacter{1E6C
}{\udotaccent{T
}}%
10892 \DeclareUnicodeCharacter{1E6D
}{\udotaccent{t
}}%
10893 \DeclareUnicodeCharacter{1E6E
}{\ubaraccent{T
}}%
10894 \DeclareUnicodeCharacter{1E6F
}{\ubaraccent{t
}}%
10896 \DeclareUnicodeCharacter{1E7C
}{\~V
}%
10897 \DeclareUnicodeCharacter{1E7D
}{\~v
}%
10898 \DeclareUnicodeCharacter{1E7E
}{\udotaccent{V
}}%
10899 \DeclareUnicodeCharacter{1E7F
}{\udotaccent{v
}}%
10901 \DeclareUnicodeCharacter{1E80
}{\`W
}%
10902 \DeclareUnicodeCharacter{1E81
}{\`w
}%
10903 \DeclareUnicodeCharacter{1E82
}{\'W
}%
10904 \DeclareUnicodeCharacter{1E83
}{\'w
}%
10905 \DeclareUnicodeCharacter{1E84
}{\"W
}%
10906 \DeclareUnicodeCharacter{1E85
}{\"w
}%
10907 \DeclareUnicodeCharacter{1E86
}{\dotaccent{W
}}%
10908 \DeclareUnicodeCharacter{1E87
}{\dotaccent{w
}}%
10909 \DeclareUnicodeCharacter{1E88
}{\udotaccent{W
}}%
10910 \DeclareUnicodeCharacter{1E89
}{\udotaccent{w
}}%
10911 \DeclareUnicodeCharacter{1E8A
}{\dotaccent{X
}}%
10912 \DeclareUnicodeCharacter{1E8B
}{\dotaccent{x
}}%
10913 \DeclareUnicodeCharacter{1E8C
}{\"X
}%
10914 \DeclareUnicodeCharacter{1E8D
}{\"x
}%
10915 \DeclareUnicodeCharacter{1E8E
}{\dotaccent{Y
}}%
10916 \DeclareUnicodeCharacter{1E8F
}{\dotaccent{y
}}%
10918 \DeclareUnicodeCharacter{1E90
}{\^Z
}%
10919 \DeclareUnicodeCharacter{1E91
}{\^z
}%
10920 \DeclareUnicodeCharacter{1E92
}{\udotaccent{Z
}}%
10921 \DeclareUnicodeCharacter{1E93
}{\udotaccent{z
}}%
10922 \DeclareUnicodeCharacter{1E94
}{\ubaraccent{Z
}}%
10923 \DeclareUnicodeCharacter{1E95
}{\ubaraccent{z
}}%
10924 \DeclareUnicodeCharacter{1E96
}{\ubaraccent{h
}}%
10925 \DeclareUnicodeCharacter{1E97
}{\"t
}%
10926 \DeclareUnicodeCharacter{1E98
}{\ringaccent{w
}}%
10927 \DeclareUnicodeCharacter{1E99
}{\ringaccent{y
}}%
10929 \DeclareUnicodeCharacter{1EA0
}{\udotaccent{A
}}%
10930 \DeclareUnicodeCharacter{1EA1
}{\udotaccent{a
}}%
10932 \DeclareUnicodeCharacter{1EB8
}{\udotaccent{E
}}%
10933 \DeclareUnicodeCharacter{1EB9
}{\udotaccent{e
}}%
10934 \DeclareUnicodeCharacter{1EBC
}{\~E
}%
10935 \DeclareUnicodeCharacter{1EBD
}{\~e
}%
10937 \DeclareUnicodeCharacter{1ECA
}{\udotaccent{I
}}%
10938 \DeclareUnicodeCharacter{1ECB
}{\udotaccent{i
}}%
10939 \DeclareUnicodeCharacter{1ECC
}{\udotaccent{O
}}%
10940 \DeclareUnicodeCharacter{1ECD
}{\udotaccent{o
}}%
10942 \DeclareUnicodeCharacter{1EE4
}{\udotaccent{U
}}%
10943 \DeclareUnicodeCharacter{1EE5
}{\udotaccent{u
}}%
10945 \DeclareUnicodeCharacter{1EF2
}{\`Y
}%
10946 \DeclareUnicodeCharacter{1EF3
}{\`y
}%
10947 \DeclareUnicodeCharacter{1EF4
}{\udotaccent{Y
}}%
10949 \DeclareUnicodeCharacter{1EF8
}{\~Y
}%
10950 \DeclareUnicodeCharacter{1EF9
}{\~y
}%
10953 \DeclareUnicodeCharacter{2013}{--
}%
10954 \DeclareUnicodeCharacter{2014}{---
}%
10955 \DeclareUnicodeCharacter{2018}{\quoteleft}%
10956 \DeclareUnicodeCharacter{2019}{\quoteright}%
10957 \DeclareUnicodeCharacter{201A
}{\quotesinglbase}%
10958 \DeclareUnicodeCharacter{201C
}{\quotedblleft}%
10959 \DeclareUnicodeCharacter{201D
}{\quotedblright}%
10960 \DeclareUnicodeCharacter{201E
}{\quotedblbase}%
10961 \DeclareUnicodeCharacter{2020}{\ensuremath\dagger}%
10962 \DeclareUnicodeCharacter{2021}{\ensuremath\ddagger}%
10963 \DeclareUnicodeCharacter{2022}{\bullet}%
10964 \DeclareUnicodeCharacter{202F
}{\thinspace}%
10965 \DeclareUnicodeCharacter{2026}{\dots}%
10966 \DeclareUnicodeCharacter{2039}{\guilsinglleft}%
10967 \DeclareUnicodeCharacter{203A
}{\guilsinglright}%
10969 \DeclareUnicodeCharacter{20AC
}{\euro}%
10971 \DeclareUnicodeCharacter{2192}{\expansion}%
10972 \DeclareUnicodeCharacter{21D2
}{\result}%
10974 % Mathematical symbols
10975 \DeclareUnicodeCharacter{2200}{\ensuremath\forall}%
10976 \DeclareUnicodeCharacter{2203}{\ensuremath\exists}%
10977 \DeclareUnicodeCharacter{2208}{\ensuremath\in}%
10978 \DeclareUnicodeCharacter{2212}{\minus}%
10979 \DeclareUnicodeCharacter{2217}{\ast}%
10980 \DeclareUnicodeCharacter{221E
}{\ensuremath\infty}%
10981 \DeclareUnicodeCharacter{2225}{\ensuremath\parallel}%
10982 \DeclareUnicodeCharacter{2227}{\ensuremath\wedge}%
10983 \DeclareUnicodeCharacter{2229}{\ensuremath\cap}%
10984 \DeclareUnicodeCharacter{2261}{\equiv}%
10985 \DeclareUnicodeCharacter{2264}{\ensuremath\leq}%
10986 \DeclareUnicodeCharacter{2265}{\ensuremath\geq}%
10987 \DeclareUnicodeCharacter{2282}{\ensuremath\subset}%
10988 \DeclareUnicodeCharacter{2287}{\ensuremath\supseteq}%
10990 \DeclareUnicodeCharacter{2016}{\ensuremath\Vert}%
10991 \DeclareUnicodeCharacter{2032}{\ensuremath\prime}%
10992 \DeclareUnicodeCharacter{210F
}{\ensuremath\hbar}%
10993 \DeclareUnicodeCharacter{2111}{\ensuremath\Im}%
10994 \DeclareUnicodeCharacter{2113}{\ensuremath\ell}%
10995 \DeclareUnicodeCharacter{2118}{\ensuremath\wp}%
10996 \DeclareUnicodeCharacter{211C
}{\ensuremath\Re}%
10997 \DeclareUnicodeCharacter{2127}{\ensuremath\mho}%
10998 \DeclareUnicodeCharacter{2135}{\ensuremath\aleph}%
10999 \DeclareUnicodeCharacter{2190}{\ensuremath\leftarrow}%
11000 \DeclareUnicodeCharacter{2191}{\ensuremath\uparrow}%
11001 \DeclareUnicodeCharacter{2193}{\ensuremath\downarrow}%
11002 \DeclareUnicodeCharacter{2194}{\ensuremath\leftrightarrow}%
11003 \DeclareUnicodeCharacter{2195}{\ensuremath\updownarrow}%
11004 \DeclareUnicodeCharacter{2196}{\ensuremath\nwarrow}%
11005 \DeclareUnicodeCharacter{2197}{\ensuremath\nearrow}%
11006 \DeclareUnicodeCharacter{2198}{\ensuremath\searrow}%
11007 \DeclareUnicodeCharacter{2199}{\ensuremath\swarrow}%
11008 \DeclareUnicodeCharacter{21A6
}{\ensuremath\mapsto}%
11009 \DeclareUnicodeCharacter{21A9
}{\ensuremath\hookleftarrow}%
11010 \DeclareUnicodeCharacter{21AA
}{\ensuremath\hookrightarrow}%
11011 \DeclareUnicodeCharacter{21BC
}{\ensuremath\leftharpoonup}%
11012 \DeclareUnicodeCharacter{21BD
}{\ensuremath\leftharpoondown}%
11013 \DeclareUnicodeCharacter{21BE
}{\ensuremath\upharpoonright}%
11014 \DeclareUnicodeCharacter{21C0
}{\ensuremath\rightharpoonup}%
11015 \DeclareUnicodeCharacter{21C1
}{\ensuremath\rightharpoondown}%
11016 \DeclareUnicodeCharacter{21CC
}{\ensuremath\rightleftharpoons}%
11017 \DeclareUnicodeCharacter{21D0
}{\ensuremath\Leftarrow}%
11018 \DeclareUnicodeCharacter{21D1
}{\ensuremath\Uparrow}%
11019 \DeclareUnicodeCharacter{21D3
}{\ensuremath\Downarrow}%
11020 \DeclareUnicodeCharacter{21D4
}{\ensuremath\Leftrightarrow}%
11021 \DeclareUnicodeCharacter{21D5
}{\ensuremath\Updownarrow}%
11022 \DeclareUnicodeCharacter{21DD
}{\ensuremath\leadsto}%
11023 \DeclareUnicodeCharacter{2201}{\ensuremath\complement}%
11024 \DeclareUnicodeCharacter{2202}{\ensuremath\partial}%
11025 \DeclareUnicodeCharacter{2205}{\ensuremath\emptyset}%
11026 \DeclareUnicodeCharacter{2207}{\ensuremath\nabla}%
11027 \DeclareUnicodeCharacter{2209}{\ensuremath\notin}%
11028 \DeclareUnicodeCharacter{220B
}{\ensuremath\owns}%
11029 \DeclareUnicodeCharacter{220F
}{\ensuremath\prod}%
11030 \DeclareUnicodeCharacter{2210}{\ensuremath\coprod}%
11031 \DeclareUnicodeCharacter{2211}{\ensuremath\sum}%
11032 \DeclareUnicodeCharacter{2213}{\ensuremath\mp}%
11033 \DeclareUnicodeCharacter{2218}{\ensuremath\circ}%
11034 \DeclareUnicodeCharacter{221A
}{\ensuremath\surd}%
11035 \DeclareUnicodeCharacter{221D
}{\ensuremath\propto}%
11036 \DeclareUnicodeCharacter{2220}{\ensuremath\angle}%
11037 \DeclareUnicodeCharacter{2223}{\ensuremath\mid}%
11038 \DeclareUnicodeCharacter{2228}{\ensuremath\vee}%
11039 \DeclareUnicodeCharacter{222A
}{\ensuremath\cup}%
11040 \DeclareUnicodeCharacter{222B
}{\ensuremath\smallint}%
11041 \DeclareUnicodeCharacter{222E
}{\ensuremath\oint}%
11042 \DeclareUnicodeCharacter{223C
}{\ensuremath\sim}%
11043 \DeclareUnicodeCharacter{2240}{\ensuremath\wr}%
11044 \DeclareUnicodeCharacter{2243}{\ensuremath\simeq}%
11045 \DeclareUnicodeCharacter{2245}{\ensuremath\cong}%
11046 \DeclareUnicodeCharacter{2248}{\ensuremath\approx}%
11047 \DeclareUnicodeCharacter{224D
}{\ensuremath\asymp}%
11048 \DeclareUnicodeCharacter{2250}{\ensuremath\doteq}%
11049 \DeclareUnicodeCharacter{2260}{\ensuremath\neq}%
11050 \DeclareUnicodeCharacter{226A
}{\ensuremath\ll}%
11051 \DeclareUnicodeCharacter{226B
}{\ensuremath\gg}%
11052 \DeclareUnicodeCharacter{227A
}{\ensuremath\prec}%
11053 \DeclareUnicodeCharacter{227B
}{\ensuremath\succ}%
11054 \DeclareUnicodeCharacter{2283}{\ensuremath\supset}%
11055 \DeclareUnicodeCharacter{2286}{\ensuremath\subseteq}%
11056 \DeclareUnicodeCharacter{228E
}{\ensuremath\uplus}%
11057 \DeclareUnicodeCharacter{228F
}{\ensuremath\sqsubset}%
11058 \DeclareUnicodeCharacter{2290}{\ensuremath\sqsupset}%
11059 \DeclareUnicodeCharacter{2291}{\ensuremath\sqsubseteq}%
11060 \DeclareUnicodeCharacter{2292}{\ensuremath\sqsupseteq}%
11061 \DeclareUnicodeCharacter{2293}{\ensuremath\sqcap}%
11062 \DeclareUnicodeCharacter{2294}{\ensuremath\sqcup}%
11063 \DeclareUnicodeCharacter{2295}{\ensuremath\oplus}%
11064 \DeclareUnicodeCharacter{2296}{\ensuremath\ominus}%
11065 \DeclareUnicodeCharacter{2297}{\ensuremath\otimes}%
11066 \DeclareUnicodeCharacter{2298}{\ensuremath\oslash}%
11067 \DeclareUnicodeCharacter{2299}{\ensuremath\odot}%
11068 \DeclareUnicodeCharacter{22A2
}{\ensuremath\vdash}%
11069 \DeclareUnicodeCharacter{22A3
}{\ensuremath\dashv}%
11070 \DeclareUnicodeCharacter{22A4
}{\ensuremath\ptextop}%
11071 \DeclareUnicodeCharacter{22A5
}{\ensuremath\bot}%
11072 \DeclareUnicodeCharacter{22A8
}{\ensuremath\models}%
11073 \DeclareUnicodeCharacter{22B4
}{\ensuremath\unlhd}%
11074 \DeclareUnicodeCharacter{22B5
}{\ensuremath\unrhd}%
11075 \DeclareUnicodeCharacter{22C0
}{\ensuremath\bigwedge}%
11076 \DeclareUnicodeCharacter{22C1
}{\ensuremath\bigvee}%
11077 \DeclareUnicodeCharacter{22C2
}{\ensuremath\bigcap}%
11078 \DeclareUnicodeCharacter{22C3
}{\ensuremath\bigcup}%
11079 \DeclareUnicodeCharacter{22C4
}{\ensuremath\diamond}%
11080 \DeclareUnicodeCharacter{22C5
}{\ensuremath\cdot}%
11081 \DeclareUnicodeCharacter{22C6
}{\ensuremath\star}%
11082 \DeclareUnicodeCharacter{22C8
}{\ensuremath\bowtie}%
11083 \DeclareUnicodeCharacter{2308}{\ensuremath\lceil}%
11084 \DeclareUnicodeCharacter{2309}{\ensuremath\rceil}%
11085 \DeclareUnicodeCharacter{230A
}{\ensuremath\lfloor}%
11086 \DeclareUnicodeCharacter{230B
}{\ensuremath\rfloor}%
11087 \DeclareUnicodeCharacter{2322}{\ensuremath\frown}%
11088 \DeclareUnicodeCharacter{2323}{\ensuremath\smile}%
11090 \DeclareUnicodeCharacter{25A1
}{\ensuremath\Box}%
11091 \DeclareUnicodeCharacter{25B3
}{\ensuremath\triangle}%
11092 \DeclareUnicodeCharacter{25B7
}{\ensuremath\triangleright}%
11093 \DeclareUnicodeCharacter{25BD
}{\ensuremath\bigtriangledown}%
11094 \DeclareUnicodeCharacter{25C1
}{\ensuremath\triangleleft}%
11095 \DeclareUnicodeCharacter{25C7
}{\ensuremath\Diamond}%
11096 \DeclareUnicodeCharacter{2660}{\ensuremath\spadesuit}%
11097 \DeclareUnicodeCharacter{2661}{\ensuremath\heartsuit}%
11098 \DeclareUnicodeCharacter{2662}{\ensuremath\diamondsuit}%
11099 \DeclareUnicodeCharacter{2663}{\ensuremath\clubsuit}%
11100 \DeclareUnicodeCharacter{266D
}{\ensuremath\flat}%
11101 \DeclareUnicodeCharacter{266E
}{\ensuremath\natural}%
11102 \DeclareUnicodeCharacter{266F
}{\ensuremath\sharp}%
11103 \DeclareUnicodeCharacter{26AA
}{\ensuremath\bigcirc}%
11104 \DeclareUnicodeCharacter{27B9
}{\ensuremath\rangle}%
11105 \DeclareUnicodeCharacter{27C2
}{\ensuremath\perp}%
11106 \DeclareUnicodeCharacter{27E8
}{\ensuremath\langle}%
11107 \DeclareUnicodeCharacter{27F5
}{\ensuremath\longleftarrow}%
11108 \DeclareUnicodeCharacter{27F6
}{\ensuremath\longrightarrow}%
11109 \DeclareUnicodeCharacter{27F7
}{\ensuremath\longleftrightarrow}%
11110 \DeclareUnicodeCharacter{27FC
}{\ensuremath\longmapsto}%
11111 \DeclareUnicodeCharacter{29F5
}{\ensuremath\setminus}%
11112 \DeclareUnicodeCharacter{2A00
}{\ensuremath\bigodot}%
11113 \DeclareUnicodeCharacter{2A01
}{\ensuremath\bigoplus}%
11114 \DeclareUnicodeCharacter{2A02
}{\ensuremath\bigotimes}%
11115 \DeclareUnicodeCharacter{2A04
}{\ensuremath\biguplus}%
11116 \DeclareUnicodeCharacter{2A06
}{\ensuremath\bigsqcup}%
11117 \DeclareUnicodeCharacter{2A1D
}{\ensuremath\Join}%
11118 \DeclareUnicodeCharacter{2A3F
}{\ensuremath\amalg}%
11119 \DeclareUnicodeCharacter{2AAF
}{\ensuremath\preceq}%
11120 \DeclareUnicodeCharacter{2AB0
}{\ensuremath\succeq}%
11122 \global\mathchardef\checkmark="
1370% actually the square root sign
11123 \DeclareUnicodeCharacter{2713}{\ensuremath\checkmark}%
11124 }% end of \unicodechardefs
11126 % UTF-8 byte sequence (pdfTeX) definitions (replacing and @U command)
11127 % It makes the setting that replace UTF-8 byte sequence.
11128 \def\utfeightchardefs{%
11129 \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterUTFviii
11133 % Whether the active definitions of non-ASCII characters expand to
11134 % non-active tokens with the same character code. This is used to
11135 % write characters literally, instead of using active definitions for
11136 % printing the correct glyphs.
11137 \newif\ifpassthroughchars
11138 \passthroughcharsfalse
11140 % For native Unicode (XeTeX and LuaTeX)
11141 % Definition macro to replace / pass-through the Unicode character
11143 \def\DeclareUnicodeCharacterNative#1#2{%
11144 \catcode"
#1=
\active
11145 \def\dodeclareunicodecharacternative#
#1#
#2#
#3{%
11147 \uccode`\~="#
#2\relax
11148 \uppercase{\gdef~
}{%
11149 \ifpassthroughchars
11158 \uccode`\.="
#1\relax
11159 \uppercase{\def\UTFNativeTmp{.
}}%
11160 \expandafter\dodeclareunicodecharacternative\UTFNativeTmp{#1}{#2}%
11164 % Native Unicode (XeTeX and LuaTeX) character replacing definitions
11165 % It makes the setting that replace the Unicode characters.
11166 \def\nativeunicodechardefs{%
11167 \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterNative
11171 % For native Unicode (XeTeX and LuaTeX). Make the character token expand
11172 % to the sequences given in \unicodechardefs for printing.
11173 \def\DeclareUnicodeCharacterNativeAtU#1#2{%
11175 \expandafter\globallet\csname uni:
#1\endcsname \UTFAtUTmp
11178 % Native Unicode (XeTeX and LuaTeX) @U command definitions
11179 \def\nativeunicodechardefsatu{%
11180 \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterNativeAtU
11184 % US-ASCII character definitions.
11185 \def\asciichardefs{% nothing need be done
11189 % define all the unicode characters we know about, for the sake of @U.
11190 \iftxinativeunicodecapable
11191 \nativeunicodechardefsatu
11197 % Make non-ASCII characters printable again for compatibility with
11198 % existing Texinfo documents that may use them, even without declaring a
11199 % document encoding.
11201 \setnonasciicharscatcode \other
11204 \message{formatting,
}
11206 \newdimen\defaultparindent \defaultparindent =
15pt
11208 \chapheadingskip =
15pt plus
4pt minus
2pt
11209 \secheadingskip =
12pt plus
3pt minus
2pt
11210 \subsecheadingskip =
9pt plus
2pt minus
2pt
11212 % Prevent underfull vbox error messages.
11215 % Don't be very finicky about underfull hboxes, either.
11218 % Following George Bush, get rid of widows and orphans.
11219 \widowpenalty=
10000
11222 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're
11223 % using an old version of TeX, don't do anything. We want the amount of
11224 % stretch added to depend on the line length, hence the dependence on
11225 % \hsize. We call this whenever the paper size is set.
11227 \def\setemergencystretch{%
11228 \ifx\emergencystretch\thisisundefined
11229 % Allow us to assign to \emergencystretch anyway.
11230 \def\emergencystretch{\dimen0}%
11232 \emergencystretch =
.15\hsize
11236 % Parameters in order: 1) textheight; 2) textwidth;
11237 % 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
11238 % 7) physical page height; 8) physical page width.
11240 % We also call \setleading{\textleading}, so the caller should define
11241 % \textleading. The caller should also set \parskip.
11243 \def\internalpagesizes#1#2#3#4#5#6#7#8{%
11244 \voffset =
#3\relax
11245 \topskip =
#6\relax
11246 \splittopskip =
\topskip
11249 \advance\vsize by
\topskip
11250 \outervsize =
\vsize
11251 \advance\outervsize by
2\topandbottommargin
11252 \txipageheight =
\vsize
11255 \outerhsize =
\hsize
11256 \advance\outerhsize by
0.5in
11257 \txipagewidth =
\hsize
11259 \normaloffset =
#4\relax
11260 \bindingoffset =
#5\relax
11263 \pdfpageheight #7\relax
11264 \pdfpagewidth #8\relax
11265 % if we don't reset these, they will remain at "1 true in" of
11266 % whatever layout pdftex was dumped with.
11267 \pdfhorigin =
1 true in
11268 \pdfvorigin =
1 true in
11270 \ifx\XeTeXrevision\thisisundefined
11272 \pdfpageheight #7\relax
11273 \pdfpagewidth #8\relax
11274 % XeTeX does not have \pdfhorigin and \pdfvorigin.
11278 \setleading{\textleading}
11280 \parindent =
\defaultparindent
11281 \setemergencystretch
11284 % @letterpaper (the default).
11285 \def\letterpaper{{\globaldefs =
1
11286 \parskip =
3pt plus
2pt minus
1pt
11287 \textleading =
13.2pt
11289 % If page is nothing but text, make it come out even.
11290 \internalpagesizes{607.2pt
}{6in
}% that's 46 lines
11292 {\bindingoffset}{36pt
}%
11296 % Use @smallbook to reset parameters for 7x9.25 trim size.
11297 \def\smallbook{{\globaldefs =
1
11298 \parskip =
2pt plus
1pt
11299 \textleading =
12pt
11301 \internalpagesizes{7.5in
}{5in
}%
11303 {\bindingoffset}{16pt
}%
11306 \lispnarrowing =
0.3in
11309 \contentsrightmargin =
0pt
11310 \defbodyindent =
.5cm
11313 % Use @smallerbook to reset parameters for 6x9 trim size.
11314 % (Just testing, parameters still in flux.)
11315 \def\smallerbook{{\globaldefs =
1
11316 \parskip =
1.5pt plus
1pt
11317 \textleading =
12pt
11319 \internalpagesizes{7.4in
}{4.8in
}%
11324 \lispnarrowing =
0.25in
11327 \contentsrightmargin =
0pt
11328 \defbodyindent =
.4cm
11331 % Use @afourpaper to print on European A4 paper.
11332 \def\afourpaper{{\globaldefs =
1
11333 \parskip =
3pt plus
2pt minus
1pt
11334 \textleading =
13.2pt
11336 % Double-side printing via postscript on Laserjet 4050
11337 % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm.
11338 % To change the settings for a different printer or situation, adjust
11339 % \normaloffset until the front-side and back-side texts align. Then
11340 % do the same for \bindingoffset. You can set these for testing in
11341 % your texinfo source file like this:
11343 % \global\normaloffset = -6mm
11344 % \global\bindingoffset = 10mm
11346 \internalpagesizes{673.2pt
}{160mm
}% that's 51 lines
11347 {\voffset}{\hoffset}%
11348 {\bindingoffset}{44pt
}%
11353 \contentsrightmargin =
0pt
11354 \defbodyindent =
5mm
11357 % Use @afivepaper to print on European A5 paper.
11358 % From romildo@urano.iceb.ufop.br, 2 July 2000.
11359 % He also recommends making @example and @lisp be small.
11360 \def\afivepaper{{\globaldefs =
1
11361 \parskip =
2pt plus
1pt minus
0.1pt
11362 \textleading =
12.5pt
11364 \internalpagesizes{160mm
}{120mm
}%
11365 {\voffset}{\hoffset}%
11366 {\bindingoffset}{8pt
}%
11369 \lispnarrowing =
0.2in
11372 \contentsrightmargin =
0pt
11373 \defbodyindent =
2mm
11374 \tableindent =
12mm
11377 % A specific text layout, 24x15cm overall, intended for A4 paper.
11378 \def\afourlatex{{\globaldefs =
1
11380 \internalpagesizes{237mm
}{150mm
}%
11382 {\bindingoffset}{7mm
}%
11385 % Must explicitly reset to 0 because we call \afourpaper.
11389 % Use @afourwide to print on A4 paper in landscape format.
11390 \def\afourwide{{\globaldefs =
1
11392 \internalpagesizes{241mm
}{165mm
}%
11393 {\voffset}{-
2.95mm
}%
11394 {\bindingoffset}{7mm
}%
11399 % @pagesizes TEXTHEIGHT[,TEXTWIDTH]
11400 % Perhaps we should allow setting the margins, \topskip, \parskip,
11401 % and/or leading, also. Or perhaps we should compute them somehow.
11403 \parseargdef\pagesizes{\pagesizesyyy #1,,
\finish}
11404 \def\pagesizesyyy#1,
#2,
#3\finish{{%
11405 \setbox0 =
\hbox{\ignorespaces #2}\ifdim\wd0 >
0pt
\hsize=
#2\relax \fi
11408 \parskip =
3pt plus
2pt minus
1pt
11409 \setleading{\textleading}%
11412 \advance\dimen0 by
\voffset
11415 \advance\dimen2 by
\normaloffset
11417 \internalpagesizes{#1}{\hsize}%
11418 {\voffset}{\normaloffset}%
11419 {\bindingoffset}{44pt
}%
11420 {\dimen0}{\dimen2}%
11423 % Set default to letter.
11428 \message{and turning on texinfo input format.
}
11430 \def^^L
{\par} % remove \outer, so ^L can appear in an @comment
11432 % DEL is a comment character, in case @c does not suffice.
11435 % Define macros to output various characters with catcode for normal text.
11436 \catcode`\"=
\other \def\normaldoublequote{"
}
11437 \catcode`\$=
\other \def\normaldollar{$
}%$ font-lock fix
11438 \catcode`\+=
\other \def\normalplus{+
}
11439 \catcode`\<=
\other \def\normalless{<
}
11440 \catcode`\>=
\other \def\normalgreater{>
}
11441 \catcode`\^=
\other \def\normalcaret{^
}
11442 \catcode`
\_=
\other \def\normalunderscore{_
}
11443 \catcode`\|=
\other \def\normalverticalbar{|
}
11444 \catcode`\~=
\other \def\normaltilde{~
}
11446 % This macro is used to make a character print one way in \tt
11447 % (where it can probably be output as-is), and another way in other fonts,
11448 % where something hairier probably needs to be done.
11450 % #1 is what to print if we are indeed using \tt; #2 is what to print
11451 % otherwise. Since all the Computer Modern typewriter fonts have zero
11452 % interword stretch (and shrink), and it is reasonable to expect all
11453 % typewriter fonts to have this, we can check that font parameter.
11455 \def\ifusingtt#1#2{\ifdim \fontdimen3\font=
0pt
#1\else #2\fi}
11457 % Same as above, but check for italic font. Actually this also catches
11458 % non-italic slanted fonts since it is impossible to distinguish them from
11459 % italic fonts. But since this is only used by $ and it uses \sl anyway
11460 % this is not a problem.
11461 \def\ifusingit#1#2{\ifdim \fontdimen1\font>
0pt
#1\else #2\fi}
11463 % Set catcodes for Texinfo file
11465 % Active characters for printing the wanted glyph.
11466 % Most of these we simply print from the \tt font, but for some, we can
11467 % use math or other variants that look better in normal text.
11469 \catcode`\"=
\active
11470 \def\activedoublequote{{\tt\char34}}
11471 \let"=
\activedoublequote
11472 \catcode`\~=
\active \def\activetilde{{\tt\char126}} \let~ =
\activetilde
11473 \chardef\hatchar=`\^
11474 \catcode`\^=
\active \def\activehat{{\tt \hatchar}} \let^ =
\activehat
11476 \catcode`
\_=
\active
11477 \def_{\ifusingtt\normalunderscore\_}
11478 \def\_{\leavevmode \kern.07em
\vbox{\hrule width
.3em height
.1ex
}\kern .07em
}
11481 \catcode`\|=
\active \def|
{{\tt\char124}}
11484 \catcode`\<=
\active \def\activeless{{\tt \less}}\let< =
\activeless
11486 \catcode`\>=
\active \def\activegtr{{\tt \gtr}}\let> =
\activegtr
11487 \catcode`\+=
\active \def+
{{\tt \char 43}}
11488 \catcode`\$=
\active \def$
{\ifusingit{{\sl\$
}}\normaldollar}%$ font-lock fix
11489 \catcode`\-=
\active \let-=
\normaldash
11492 % used for headline/footline in the output routine, in case the page
11493 % breaks in the middle of an @tex block.
11494 \def\texinfochars{%
11495 \let< =
\activeless
11497 \let~ =
\activetilde
11499 \markupsetuplqdefault \markupsetuprqdefault
11501 \let\i =
\smartitalic
11502 % in principle, all other definitions in \tex have to be undone too.
11505 % Used sometimes to turn off (effectively) the active characters even after
11507 \def\turnoffactive{%
11508 \normalturnoffactive
11514 % \backslashcurfont outputs one backslash character in current font,
11516 \global\chardef\backslashcurfont=`\\
11517 \global\let\rawbackslashxx=
\backslashcurfont % let existing .??s files work
11519 % \realbackslash is an actual character `\' with catcode other, and
11520 % \doublebackslash is two of them (for the pdf outlines).
11521 {\catcode`\\=
\other @gdef@realbackslash
{\
} @gdef@doublebackslash
{\\
}}
11523 % In Texinfo, backslash is an active character; it prints the backslash
11524 % in fixed width font.
11525 \catcode`\\=
\active % @ for escape char from now on.
11527 % Print a typewriter backslash. For math mode, we can't simply use
11528 % \backslashcurfont: the story here is that in math mode, the \char
11529 % of \backslashcurfont ends up printing the roman \ from the math symbol
11530 % font (because \char in math mode uses the \mathcode, and plain.tex
11531 % sets \mathcode`\\="026E). Hence we use an explicit \mathchar,
11532 % which is the decimal equivalent of "715c (class 7, e.g., use \fam;
11533 % ignored family value; char position "5C). We can't use " for the
11534 % usual hex value because it has already been made active.
11536 @def@ttbackslash
{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi
}}
11537 @let@backslashchar = @ttbackslash
% @backslashchar{} is for user documents.
11539 % \rawbackslash defines an active \ to do \backslashcurfont.
11540 % \otherbackslash defines an active \ to be a literal `\' character with
11541 % catcode other. We switch back and forth between these.
11542 @gdef@rawbackslash
{@let\=@backslashcurfont
}
11543 @gdef@otherbackslash
{@let\=@realbackslash
}
11545 % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
11546 % the literal character `\'.
11548 {@catcode`- = @active
11549 @gdef@normalturnoffactive
{%
11550 @passthroughcharstrue
11552 @let"=@normaldoublequote
11553 @let$=@normaldollar
%$ font-lock fix
11556 @let>=@normalgreater
11558 @let_=@normalunderscore
11559 @let|=@normalverticalbar
11562 @markupsetuplqdefault
11563 @markupsetuprqdefault
11568 % If a .fmt file is being used, characters that might appear in a file
11569 % name cannot be active until we have parsed the command line.
11570 % So turn them off again, and have @fixbackslash turn them back on.
11571 @catcode`+=@other @catcode`@_=@other
11573 % \enablebackslashhack - allow file to begin `\input texinfo'
11575 % If a .fmt file is being used, we don't want the `\input texinfo' to show up.
11576 % That is what \eatinput is for; after that, the `\' should revert to printing
11578 % If the file did not have a `\input texinfo', then it is turned off after
11579 % the first line; otherwise the first `\' in the file would cause an error.
11580 % This is used on the very last line of this file, texinfo.tex.
11581 % We also use @c to call @fixbackslash, in case ends of lines are hidden.
11584 @catcode`@^^M=
13@gdef@enablebackslashhack
{%
11585 @global@let\ = @eatinput
%
11587 @def@c
{@fixbackslash@c
}%
11588 % Definition for the newline at the end of this file.
11589 @def ^^M
{@let^^M@secondlinenl
}%
11590 % Definition for a newline in the main Texinfo file.
11591 @gdef @secondlinenl
{@fixbackslash
}%
11594 {@catcode`@^=
7 @catcode`@^^M=
13%
11595 @gdef@eatinput input texinfo
#1^^M
{@fixbackslash
}}
11597 % Emergency active definition of newline, in case an active newline token
11598 % appears by mistake.
11599 {@catcode`@^=
7 @catcode13=
13%
11600 @gdef@enableemergencynewline
{%
11603 %<warning: active newline>@par%
11607 @gdef@fixbackslash
{%
11608 @ifx\@eatinput @let\ = @ttbackslash @fi
11609 @catcode13=
5 % regular end of line
11610 @enableemergencynewline
11612 % Also turn back on active characters that might appear in the input
11613 % file name, in case not using a pre-dumped format.
11615 @catcode`@_=@active
11617 % If texinfo.cnf is present on the system, read it.
11618 % Useful for site-wide @afourpaper, etc. This macro, @fixbackslash, gets
11619 % called at the beginning of every Texinfo file. Not opening texinfo.cnf
11620 % directly in this file, texinfo.tex, makes it possible to make a format
11621 % file for Texinfo.
11623 @openin
1 texinfo.cnf
11624 @ifeof
1 @else @input texinfo.cnf @fi
11629 % Say @foo, not \foo, in error messages.
11632 % These (along with & and #) are made active for url-breaking, so need
11633 % active definitions as the normal characters.
11635 @def@normalquest
{?
}
11636 @def@normalslash
{/
}
11638 % These look ok in all fonts, so just make them not special.
11639 % @hashchar{} gets its own user-level command, because of #line.
11640 @catcode`@& = @other @def@normalamp
{&
}
11641 @catcode`@# = @other @def@normalhash
{#
}
11642 @catcode`@
% = @other @def@normalpercent{%}
11644 @let @hashchar = @normalhash
11646 @c Finally, make ` and ' active, so that txicodequoteundirected and
11647 @c txicodequotebacktick work right in, e.g., @w
{@code
{`foo'
}}. If we
11648 @c don't make ` and ' active, @code will not get them as active chars.
11649 @c Do this last of all since we use ` in the previous @catcode assignments.
11650 @catcode`@'=@active
11651 @catcode`@`=@active
11652 @markupsetuplqdefault
11653 @markupsetuprqdefault
11655 @c Local variables:
11656 @c eval: (add-hook 'write-file-hooks 'time-stamp)
11657 @c page-delimiter: "^\\\
\message\\|emacs-page"
11658 @c time-stamp-start: "def\\\
\texinfoversion{"
11659 @c time-stamp-format: "
%:y-%02m-%02d.%02H"
11660 @c time-stamp-end: "
}"
11666 arch-tag: e1b36e32-c96e-4135-a41a-
0b2efa2ea115
11668 @enablebackslashhack