<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'> <html xmlns='http://www.w3.org/1999/xhtml'> <head> <title>doc/casl2_spec/texinfo.tex</title> <meta name='robots' content='noindex,nofollow' /> <meta name='generator' content='GLOBAL-6.6.5' /> <meta http-equiv='Content-Style-Type' content='text/css' /> <link rel='stylesheet' type='text/css' href='../style.css' /> </head> <body> <a id='TOP' name='TOP'></a><h2 class='header'><a href='../mains.html'>root</a>/<a href='../files/2921.html'>doc</a>/<a href='../files/2922.html'>casl2_spec</a>/texinfo.tex</h2> <em class='comment'>/* [<][>][^][v][top]<a href='#BOTTOM'>[bottom]</a><a href='../mains.html'>[index]</a><a href='../help.html'>[help]</a> */</em> <hr /> <pre> <a id='L1' name='L1'></a>% texinfo.tex -- TeX macros to handle Texinfo files. <a id='L2' name='L2'></a>% <a id='L3' name='L3'></a>% Load plain if necessary, i.e., if running under initex. <a id='L4' name='L4'></a>\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi <a id='L5' name='L5'></a>% <a id='L6' name='L6'></a>\def\texinfoversion{2013-12-21.11} <a id='L7' name='L7'></a>% <a id='L8' name='L8'></a>% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, <a id='L9' name='L9'></a>% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, <a id='L10' name='L10'></a>% 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. <a id='L11' name='L11'></a>% <a id='L12' name='L12'></a>% This texinfo.tex file is free software: you can redistribute it and/or <a id='L13' name='L13'></a>% modify it under the terms of the GNU General Public License as <a id='L14' name='L14'></a>% published by the Free Software Foundation, either version 3 of the <a id='L15' name='L15'></a>% License, or (at your option) any later version. <a id='L16' name='L16'></a>% <a id='L17' name='L17'></a>% This texinfo.tex file is distributed in the hope that it will be <a id='L18' name='L18'></a>% useful, but WITHOUT ANY WARRANTY; without even the implied warranty <a id='L19' name='L19'></a>% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU <a id='L20' name='L20'></a>% General Public License for more details. <a id='L21' name='L21'></a>% <a id='L22' name='L22'></a>% You should have received a copy of the GNU General Public License <a id='L23' name='L23'></a>% along with this program. If not, see <http://www.gnu.org/licenses/>. <a id='L24' name='L24'></a>% <a id='L25' name='L25'></a>% As a special exception, when this file is read by TeX when processing <a id='L26' name='L26'></a>% a Texinfo source document, you may use the result without <a id='L27' name='L27'></a>% restriction. This Exception is an additional permission under section 7 <a id='L28' name='L28'></a>% of the GNU General Public License, version 3 ("GPLv3"). <a id='L29' name='L29'></a>% <a id='L30' name='L30'></a>% Please try the latest version of texinfo.tex before submitting bug <a id='L31' name='L31'></a>% reports; you can get the latest version from: <a id='L32' name='L32'></a>% http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or <a id='L33' name='L33'></a>% http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or <a id='L34' name='L34'></a>% http://www.gnu.org/software/texinfo/ (the Texinfo home page) <a id='L35' name='L35'></a>% The texinfo.tex in any given distribution could well be out <a id='L36' name='L36'></a>% of date, so if that's what you're using, please check. <a id='L37' name='L37'></a>% <a id='L38' name='L38'></a>% Send bug reports to bug-texinfo@gnu.org. Please include including a <a id='L39' name='L39'></a>% complete document in each bug report with which we can reproduce the <a id='L40' name='L40'></a>% problem. Patches are, of course, greatly appreciated. <a id='L41' name='L41'></a>% <a id='L42' name='L42'></a>% To process a Texinfo manual with TeX, it's most reliable to use the <a id='L43' name='L43'></a>% texi2dvi shell script that comes with the distribution. For a simple <a id='L44' name='L44'></a>% manual foo.texi, however, you can get away with this: <a id='L45' name='L45'></a>% tex foo.texi <a id='L46' name='L46'></a>% texindex foo.?? <a id='L47' name='L47'></a>% tex foo.texi <a id='L48' name='L48'></a>% tex foo.texi <a id='L49' name='L49'></a>% dvips foo.dvi -o # or whatever; this makes foo.ps. <a id='L50' name='L50'></a>% The extra TeX runs get the cross-reference information correct. <a id='L51' name='L51'></a>% Sometimes one run after texindex suffices, and sometimes you need more <a id='L52' name='L52'></a>% than two; texi2dvi does it as many times as necessary. <a id='L53' name='L53'></a>% <a id='L54' name='L54'></a>% It is possible to adapt texinfo.tex for other languages, to some <a id='L55' name='L55'></a>% extent. You can get the existing language-specific files from the <a id='L56' name='L56'></a>% full Texinfo distribution. <a id='L57' name='L57'></a>% <a id='L58' name='L58'></a>% The GNU Texinfo home page is http://www.gnu.org/software/texinfo. <a id='L59' name='L59'></a> <a id='L60' name='L60'></a> <a id='L61' name='L61'></a>\message{Loading texinfo [version \texinfoversion]:} <a id='L62' name='L62'></a> <a id='L63' name='L63'></a>% If in a .fmt file, print the version number <a id='L64' name='L64'></a>% and turn on active characters that we couldn't do earlier because <a id='L65' name='L65'></a>% they might have appeared in the input file name. <a id='L66' name='L66'></a>\everyjob{\message{[Texinfo version \texinfoversion]}% <a id='L67' name='L67'></a> \catcode`+=\active \catcode`\_=\active} <a id='L68' name='L68'></a> <a id='L69' name='L69'></a>% (Aug. 17, 1999 --ak) <a id='L70' name='L70'></a>% Japanese support. (pTeX is a free Japanese TeX by ASCII corp., Japan, <a id='L71' name='L71'></a>% and jTeX is a free Japanese TeX by NTT corp. and T. Sakurai) <a id='L72' name='L72'></a>\newif\ifjaTeX <a id='L73' name='L73'></a>\newif\ifpTeX <a id='L74' name='L74'></a>\newif\ifjTeX <a id='L75' name='L75'></a>\ifx\kanjiskip\undefined\else <a id='L76' name='L76'></a> \pTeXtrue <a id='L77' name='L77'></a> \jaTeXtrue <a id='L78' name='L78'></a>\fi <a id='L79' name='L79'></a>\ifx\jkern\undefined\else <a id='L80' name='L80'></a> \jTeXtrue <a id='L81' name='L81'></a> \jaTeXtrue <a id='L82' name='L82'></a>\fi <a id='L83' name='L83'></a> <a id='L84' name='L84'></a>\ifpTeX <a id='L85' name='L85'></a>\message{ASCII-pTeX,} <a id='L86' name='L86'></a>\fi <a id='L87' name='L87'></a>\ifjTeX <a id='L88' name='L88'></a>\message{NTT-jTeX,} <a id='L89' name='L89'></a>\fi <a id='L90' name='L90'></a>\chardef\other=12 <a id='L91' name='L91'></a> <a id='L92' name='L92'></a>% We never want plain's \outer definition of \+ in Texinfo. <a id='L93' name='L93'></a>% For @tex, we can use \tabalign. <a id='L94' name='L94'></a>\let\+ = \relax <a id='L95' name='L95'></a> <a id='L96' name='L96'></a>% Save some plain tex macros whose names we will redefine. <a id='L97' name='L97'></a>\let\ptexb=\b <a id='L98' name='L98'></a>\let\ptexbullet=\bullet <a id='L99' name='L99'></a>\let\ptexc=\c <a id='L100' name='L100'></a>\let\ptexcomma=\, <a id='L101' name='L101'></a>\let\ptexdot=\. <a id='L102' name='L102'></a>\let\ptexdots=\dots <a id='L103' name='L103'></a>\let\ptexend=\end <a id='L104' name='L104'></a>\let\ptexequiv=\equiv <a id='L105' name='L105'></a>\let\ptexexclam=\! <a id='L106' name='L106'></a>\let\ptexfootnote=\footnote <a id='L107' name='L107'></a>\let\ptexgtr=> <a id='L108' name='L108'></a>\let\ptexhat=^ <a id='L109' name='L109'></a>\let\ptexi=\i <a id='L110' name='L110'></a>\let\ptexindent=\indent <a id='L111' name='L111'></a>\let\ptexinsert=\insert <a id='L112' name='L112'></a>\let\ptexlbrace=\{ <a id='L113' name='L113'></a>\let\ptexless=< <a id='L114' name='L114'></a>\let\ptexnewwrite\newwrite <a id='L115' name='L115'></a>\let\ptexnoindent=\noindent <a id='L116' name='L116'></a>\let\ptexplus=+ <a id='L117' name='L117'></a>\let\ptexraggedright=\raggedright <a id='L118' name='L118'></a>\let\ptexrbrace=\} <a id='L119' name='L119'></a>\let\ptexslash=\/ <a id='L120' name='L120'></a>\let\ptexstar=\* <a id='L121' name='L121'></a>\let\ptext=\t <a id='L122' name='L122'></a>\let\ptextop=\top <a id='L123' name='L123'></a>{\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode <a id='L124' name='L124'></a> <a id='L125' name='L125'></a>% If this character appears in an error message or help string, it <a id='L126' name='L126'></a>% starts a new line in the output. <a id='L127' name='L127'></a>\newlinechar = `^^J <a id='L128' name='L128'></a> <a id='L129' name='L129'></a>% Use TeX 3.0's \inputlineno to get the line number, for better error <a id='L130' name='L130'></a>% messages, but if we're using an old version of TeX, don't do anything. <a id='L131' name='L131'></a>% <a id='L132' name='L132'></a>\ifx\inputlineno\thisisundefined <a id='L133' name='L133'></a> \let\linenumber = \empty % Pre-3.0. <a id='L134' name='L134'></a>\else <a id='L135' name='L135'></a> \def\linenumber{l.\the\inputlineno:\space} <a id='L136' name='L136'></a>\fi <a id='L137' name='L137'></a> <a id='L138' name='L138'></a>% Set up fixed words for English if not already set. <a id='L139' name='L139'></a>\ifx\putwordAppendix\undefined \gdef\putwordAppendix{付録}\fi <a id='L140' name='L140'></a>\ifx\putwordChapter\undefined \gdef\putwordChapter{章}\fi <a id='L141' name='L141'></a>\ifx\putworderror\undefined \gdef\putworderror{エラー}\fi <a id='L142' name='L142'></a>\ifx\putwordfile\undefined \gdef\putwordfile{ファイル}\fi <a id='L143' name='L143'></a>\ifx\putwordin\undefined \gdef\putwordin{in}\fi <a id='L144' name='L144'></a>\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi <a id='L145' name='L145'></a>\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi <a id='L146' name='L146'></a>\ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi <a id='L147' name='L147'></a>\ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi <a id='L148' name='L148'></a>\ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi <a id='L149' name='L149'></a>\ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi <a id='L150' name='L150'></a>\ifx\putwordof\undefined \gdef\putwordof{of}\fi <a id='L151' name='L151'></a>\ifx\putwordon\undefined \gdef\putwordon{on}\fi <a id='L152' name='L152'></a>\ifx\putwordpage\undefined \gdef\putwordpage{ページ}\fi <a id='L153' name='L153'></a>\ifx\putwordsection\undefined \gdef\putwordsection{セクション}\fi <a id='L154' name='L154'></a>\ifx\putwordSection\undefined \gdef\putwordSection{セクション}\fi <a id='L155' name='L155'></a>\ifx\putwordsee\undefined \gdef\putwordsee{See}\fi <a id='L156' name='L156'></a>\ifx\putwordSee\undefined \gdef\putwordSee{See}\fi <a id='L157' name='L157'></a>\ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi <a id='L158' name='L158'></a>\ifx\putwordTOC\undefined \gdef\putwordTOC{目次}\fi <a id='L159' name='L159'></a>% <a id='L160' name='L160'></a>\ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi <a id='L161' name='L161'></a>\ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi <a id='L162' name='L162'></a>\ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi <a id='L163' name='L163'></a>\ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi <a id='L164' name='L164'></a>\ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi <a id='L165' name='L165'></a>\ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi <a id='L166' name='L166'></a>\ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi <a id='L167' name='L167'></a>\ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi <a id='L168' name='L168'></a>\ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi <a id='L169' name='L169'></a>\ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi <a id='L170' name='L170'></a>\ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi <a id='L171' name='L171'></a>\ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi <a id='L172' name='L172'></a>% <a id='L173' name='L173'></a>\ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi <a id='L174' name='L174'></a>\ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi <a id='L175' name='L175'></a>\ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi <a id='L176' name='L176'></a>\ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi <a id='L177' name='L177'></a>\ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi <a id='L178' name='L178'></a> <a id='L179' name='L179'></a>% Since the category of space is not known, we have to be careful. <a id='L180' name='L180'></a>\chardef\spacecat = 10 <a id='L181' name='L181'></a>\def\spaceisspace{\catcode`\ =\spacecat} <a id='L182' name='L182'></a> <a id='L183' name='L183'></a>% sometimes characters are active, so we need control sequences. <a id='L184' name='L184'></a>\chardef\ampChar = `\& <a id='L185' name='L185'></a>\chardef\colonChar = `\: <a id='L186' name='L186'></a>\chardef\commaChar = `\, <a id='L187' name='L187'></a>\chardef\dashChar = `\- <a id='L188' name='L188'></a>\chardef\dotChar = `\. <a id='L189' name='L189'></a>\chardef\exclamChar= `\! <a id='L190' name='L190'></a>\chardef\hashChar = `\# <a id='L191' name='L191'></a>\chardef\lquoteChar= `\` <a id='L192' name='L192'></a>\chardef\questChar = `\? <a id='L193' name='L193'></a>\chardef\rquoteChar= `\' <a id='L194' name='L194'></a>\chardef\semiChar = `\; <a id='L195' name='L195'></a>\chardef\slashChar = `\/ <a id='L196' name='L196'></a>\chardef\underChar = `\_ <a id='L197' name='L197'></a> <a id='L198' name='L198'></a>% Ignore a token. <a id='L199' name='L199'></a>% <a id='L200' name='L200'></a>\def\gobble#1{} <a id='L201' name='L201'></a> <a id='L202' name='L202'></a>% The following is used inside several \edef's. <a id='L203' name='L203'></a>\def\makecsname#1{\expandafter\noexpand\csname#1\endcsname} <a id='L204' name='L204'></a> <a id='L205' name='L205'></a>% Hyphenation fixes. <a id='L206' name='L206'></a>\hyphenation{ <a id='L207' name='L207'></a> Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script <a id='L208' name='L208'></a> ap-pen-dix bit-map bit-maps <a id='L209' name='L209'></a> data-base data-bases eshell fall-ing half-way long-est man-u-script <a id='L210' name='L210'></a> man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm <a id='L211' name='L211'></a> par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces <a id='L212' name='L212'></a> spell-ing spell-ings <a id='L213' name='L213'></a> stand-alone strong-est time-stamp time-stamps which-ever white-space <a id='L214' name='L214'></a> wide-spread wrap-around <a id='L215' name='L215'></a>} <a id='L216' name='L216'></a> <a id='L217' name='L217'></a>% Margin to add to right of even pages, to left of odd pages. <a id='L218' name='L218'></a>\newdimen\bindingoffset <a id='L219' name='L219'></a>\newdimen\normaloffset <a id='L220' name='L220'></a>\newdimen\pagewidth \newdimen\pageheight <a id='L221' name='L221'></a> <a id='L222' name='L222'></a>% For a final copy, take out the rectangles <a id='L223' name='L223'></a>% that mark overfull boxes (in case you have decided <a id='L224' name='L224'></a>% that the text looks ok even though it passes the margin). <a id='L225' name='L225'></a>% <a id='L226' name='L226'></a>\def\finalout{\overfullrule=0pt } <a id='L227' name='L227'></a> <a id='L228' name='L228'></a>% Sometimes it is convenient to have everything in the transcript file <a id='L229' name='L229'></a>% and nothing on the terminal. We don't just call \tracingall here, <a id='L230' name='L230'></a>% since that produces some useless output on the terminal. We also make <a id='L231' name='L231'></a>% some effort to order the tracing commands to reduce output in the log <a id='L232' name='L232'></a>% file; cf. trace.sty in LaTeX. <a id='L233' name='L233'></a>% <a id='L234' name='L234'></a>\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% <a id='L235' name='L235'></a>\def\loggingall{% <a id='L236' name='L236'></a> \tracingstats2 <a id='L237' name='L237'></a> \tracingpages1 <a id='L238' name='L238'></a> \tracinglostchars2 % 2 gives us more in etex <a id='L239' name='L239'></a> \tracingparagraphs1 <a id='L240' name='L240'></a> \tracingoutput1 <a id='L241' name='L241'></a> \tracingmacros2 <a id='L242' name='L242'></a> \tracingrestores1 <a id='L243' name='L243'></a> \showboxbreadth\maxdimen \showboxdepth\maxdimen <a id='L244' name='L244'></a> \ifx\eTeXversion\thisisundefined\else % etex gives us more logging <a id='L245' name='L245'></a> \tracingscantokens1 <a id='L246' name='L246'></a> \tracingifs1 <a id='L247' name='L247'></a> \tracinggroups1 <a id='L248' name='L248'></a> \tracingnesting2 <a id='L249' name='L249'></a> \tracingassigns1 <a id='L250' name='L250'></a> \fi <a id='L251' name='L251'></a> \tracingcommands3 % 3 gives us more in etex <a id='L252' name='L252'></a> \errorcontextlines16 <a id='L253' name='L253'></a>}% <a id='L254' name='L254'></a> <a id='L255' name='L255'></a>% @errormsg{MSG}. Do the index-like expansions on MSG, but if things <a id='L256' name='L256'></a>% aren't perfect, it's not the end of the world, being an error message, <a id='L257' name='L257'></a>% after all. <a id='L258' name='L258'></a>% <a id='L259' name='L259'></a>\def\errormsg{\begingroup \indexnofonts \doerrormsg} <a id='L260' name='L260'></a>\def\doerrormsg#1{\errmessage{#1}} <a id='L261' name='L261'></a> <a id='L262' name='L262'></a>% add check for \lastpenalty to plain's definitions. If the last thing <a id='L263' name='L263'></a>% we did was a \nobreak, we don't want to insert more space. <a id='L264' name='L264'></a>% <a id='L265' name='L265'></a>\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount <a id='L266' name='L266'></a> \removelastskip\penalty-50\smallskip\fi\fi} <a id='L267' name='L267'></a>\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount <a id='L268' name='L268'></a> \removelastskip\penalty-100\medskip\fi\fi} <a id='L269' name='L269'></a>\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount <a id='L270' name='L270'></a> \removelastskip\penalty-200\bigskip\fi\fi} <a id='L271' name='L271'></a> <a id='L272' name='L272'></a>% Do @cropmarks to get crop marks. <a id='L273' name='L273'></a>% <a id='L274' name='L274'></a>\newif\ifcropmarks <a id='L275' name='L275'></a>\let\cropmarks = \cropmarkstrue <a id='L276' name='L276'></a>% <a id='L277' name='L277'></a>% Dimensions to add cropmarks at corners. <a id='L278' name='L278'></a>% Added by P. A. MacKay, 12 Nov. 1986 <a id='L279' name='L279'></a>% <a id='L280' name='L280'></a>\newdimen\outerhsize \newdimen\outervsize % set by the paper size routines <a id='L281' name='L281'></a>\newdimen\cornerlong \cornerlong=1pc <a id='L282' name='L282'></a>\newdimen\cornerthick \cornerthick=.3pt <a id='L283' name='L283'></a>\newdimen\topandbottommargin \topandbottommargin=.75in <a id='L284' name='L284'></a> <a id='L285' name='L285'></a>% Output a mark which sets \thischapter, \thissection and \thiscolor. <a id='L286' name='L286'></a>% We dump everything together because we only have one kind of mark. <a id='L287' name='L287'></a>% This works because we only use \botmark / \topmark, not \firstmark. <a id='L288' name='L288'></a>% <a id='L289' name='L289'></a>% A mark contains a subexpression of the \ifcase ... \fi construct. <a id='L290' name='L290'></a>% \get*marks macros below extract the needed part using \ifcase. <a id='L291' name='L291'></a>% <a id='L292' name='L292'></a>% Another complication is to let the user choose whether \thischapter <a id='L293' name='L293'></a>% (\thissection) refers to the chapter (section) in effect at the top <a id='L294' name='L294'></a>% of a page, or that at the bottom of a page. The solution is <a id='L295' name='L295'></a>% described on page 260 of The TeXbook. It involves outputting two <a id='L296' name='L296'></a>% marks for the sectioning macros, one before the section break, and <a id='L297' name='L297'></a>% one after. I won't pretend I can describe this better than DEK... <a id='L298' name='L298'></a>\def\domark{% <a id='L299' name='L299'></a> \toks0=\expandafter{\lastchapterdefs}% <a id='L300' name='L300'></a> \toks2=\expandafter{\lastsectiondefs}% <a id='L301' name='L301'></a> \toks4=\expandafter{\prevchapterdefs}% <a id='L302' name='L302'></a> \toks6=\expandafter{\prevsectiondefs}% <a id='L303' name='L303'></a> \toks8=\expandafter{\lastcolordefs}% <a id='L304' name='L304'></a> \mark{% <a id='L305' name='L305'></a> \the\toks0 \the\toks2 <a id='L306' name='L306'></a> \noexpand\or \the\toks4 \the\toks6 <a id='L307' name='L307'></a> \noexpand\else \the\toks8 <a id='L308' name='L308'></a> }% <a id='L309' name='L309'></a>} <a id='L310' name='L310'></a>% \topmark doesn't work for the very first chapter (after the title <a id='L311' name='L311'></a>% page or the contents), so we use \firstmark there -- this gets us <a id='L312' name='L312'></a>% the mark with the chapter defs, unless the user sneaks in, e.g., <a id='L313' name='L313'></a>% @setcolor (or @url, or @link, etc.) between @contents and the very <a id='L314' name='L314'></a>% first @chapter. <a id='L315' name='L315'></a>\def\gettopheadingmarks{% <a id='L316' name='L316'></a> \ifcase0\topmark\fi <a id='L317' name='L317'></a> \ifx\thischapter\empty \ifcase0\firstmark\fi \fi <a id='L318' name='L318'></a>} <a id='L319' name='L319'></a>\def\getbottomheadingmarks{\ifcase1\botmark\fi} <a id='L320' name='L320'></a>\def\getcolormarks{\ifcase2\topmark\fi} <a id='L321' name='L321'></a> <a id='L322' name='L322'></a>% Avoid "undefined control sequence" errors. <a id='L323' name='L323'></a>\def\lastchapterdefs{} <a id='L324' name='L324'></a>\def\lastsectiondefs{} <a id='L325' name='L325'></a>\def\prevchapterdefs{} <a id='L326' name='L326'></a>\def\prevsectiondefs{} <a id='L327' name='L327'></a>\def\lastcolordefs{} <a id='L328' name='L328'></a> <a id='L329' name='L329'></a>% Main output routine. <a id='L330' name='L330'></a>\chardef\PAGE = 255 <a id='L331' name='L331'></a>\output = {\onepageout{\pagecontents\PAGE}} <a id='L332' name='L332'></a> <a id='L333' name='L333'></a>\newbox\headlinebox <a id='L334' name='L334'></a>\newbox\footlinebox <a id='L335' name='L335'></a> <a id='L336' name='L336'></a>% \onepageout takes a vbox as an argument. Note that \pagecontents <a id='L337' name='L337'></a>% does insertions, but you have to call it yourself. <a id='L338' name='L338'></a>\def\onepageout#1{% <a id='L339' name='L339'></a> \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi <a id='L340' name='L340'></a> % <a id='L341' name='L341'></a> \ifodd\pageno \advance\hoffset by \bindingoffset <a id='L342' name='L342'></a> \else \advance\hoffset by -\bindingoffset\fi <a id='L343' name='L343'></a> % <a id='L344' name='L344'></a> % Do this outside of the \shipout so @code etc. will be expanded in <a id='L345' name='L345'></a> % the headline as they should be, not taken literally (outputting ''code). <a id='L346' name='L346'></a> \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi <a id='L347' name='L347'></a> \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% <a id='L348' name='L348'></a> \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi <a id='L349' name='L349'></a> \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% <a id='L350' name='L350'></a> % <a id='L351' name='L351'></a> {% <a id='L352' name='L352'></a> % Have to do this stuff outside the \shipout because we want it to <a id='L353' name='L353'></a> % take effect in \write's, yet the group defined by the \vbox ends <a id='L354' name='L354'></a> % before the \shipout runs. <a id='L355' name='L355'></a> % <a id='L356' name='L356'></a> \indexdummies % don't expand commands in the output. <a id='L357' name='L357'></a> \normalturnoffactive % \ in index entries must not stay \, e.g., if <a id='L358' name='L358'></a> % the page break happens to be in the middle of an example. <a id='L359' name='L359'></a> % We don't want .vr (or whatever) entries like this: <a id='L360' name='L360'></a> % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} <a id='L361' name='L361'></a> % "\acronym" won't work when it's read back in; <a id='L362' name='L362'></a> % it needs to be <a id='L363' name='L363'></a> % {\code {{\tt \backslashcurfont }acronym} <a id='L364' name='L364'></a> \shipout\vbox{% <a id='L365' name='L365'></a> % Do this early so pdf references go to the beginning of the page. <a id='L366' name='L366'></a> \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi <a id='L367' name='L367'></a> % <a id='L368' name='L368'></a> \ifcropmarks \vbox to \outervsize\bgroup <a id='L369' name='L369'></a> \hsize = \outerhsize <a id='L370' name='L370'></a> \vskip-\topandbottommargin <a id='L371' name='L371'></a> \vtop to0pt{% <a id='L372' name='L372'></a> \line{\ewtop\hfil\ewtop}% <a id='L373' name='L373'></a> \nointerlineskip <a id='L374' name='L374'></a> \line{% <a id='L375' name='L375'></a> \vbox{\moveleft\cornerthick\nstop}% <a id='L376' name='L376'></a> \hfill <a id='L377' name='L377'></a> \vbox{\moveright\cornerthick\nstop}% <a id='L378' name='L378'></a> }% <a id='L379' name='L379'></a> \vss}% <a id='L380' name='L380'></a> \vskip\topandbottommargin <a id='L381' name='L381'></a> \line\bgroup <a id='L382' name='L382'></a> \hfil % center the page within the outer (page) hsize. <a id='L383' name='L383'></a> \ifodd\pageno\hskip\bindingoffset\fi <a id='L384' name='L384'></a> \vbox\bgroup <a id='L385' name='L385'></a> \fi <a id='L386' name='L386'></a> % <a id='L387' name='L387'></a> \unvbox\headlinebox <a id='L388' name='L388'></a> \pagebody{#1}% <a id='L389' name='L389'></a> \ifdim\ht\footlinebox > 0pt <a id='L390' name='L390'></a> % Only leave this space if the footline is nonempty. <a id='L391' name='L391'></a> % (We lessened \vsize for it in \oddfootingyyy.) <a id='L392' name='L392'></a> % The \baselineskip=24pt in plain's \makefootline has no effect. <a id='L393' name='L393'></a> \vskip 24pt <a id='L394' name='L394'></a> \unvbox\footlinebox <a id='L395' name='L395'></a> \fi <a id='L396' name='L396'></a> % <a id='L397' name='L397'></a> \ifcropmarks <a id='L398' name='L398'></a> \egroup % end of \vbox\bgroup <a id='L399' name='L399'></a> \hfil\egroup % end of (centering) \line\bgroup <a id='L400' name='L400'></a> \vskip\topandbottommargin plus1fill minus1fill <a id='L401' name='L401'></a> \boxmaxdepth = \cornerthick <a id='L402' name='L402'></a> \vbox to0pt{\vss <a id='L403' name='L403'></a> \line{% <a id='L404' name='L404'></a> \vbox{\moveleft\cornerthick\nsbot}% <a id='L405' name='L405'></a> \hfill <a id='L406' name='L406'></a> \vbox{\moveright\cornerthick\nsbot}% <a id='L407' name='L407'></a> }% <a id='L408' name='L408'></a> \nointerlineskip <a id='L409' name='L409'></a> \line{\ewbot\hfil\ewbot}% <a id='L410' name='L410'></a> }% <a id='L411' name='L411'></a> \egroup % \vbox from first cropmarks clause <a id='L412' name='L412'></a> \fi <a id='L413' name='L413'></a> }% end of \shipout\vbox <a id='L414' name='L414'></a> }% end of group with \indexdummies <a id='L415' name='L415'></a> \advancepageno <a id='L416' name='L416'></a> \ifnum\outputpenalty>-20000 \else\dosupereject\fi <a id='L417' name='L417'></a>} <a id='L418' name='L418'></a> <a id='L419' name='L419'></a>\newinsert\margin \dimen\margin=\maxdimen <a id='L420' name='L420'></a> <a id='L421' name='L421'></a>\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} <a id='L422' name='L422'></a>{\catcode`\@ =11 <a id='L423' name='L423'></a>\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi <a id='L424' name='L424'></a>% marginal hacks, juha@viisa.uucp (Juha Takala) <a id='L425' name='L425'></a>\ifvoid\margin\else % marginal info is present <a id='L426' name='L426'></a> \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi <a id='L427' name='L427'></a>\dimen@=\dp#1\relax \unvbox#1\relax <a id='L428' name='L428'></a>\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi <a id='L429' name='L429'></a>\ifr@ggedbottom \kern-\dimen@ \vfil \fi} <a id='L430' name='L430'></a>} <a id='L431' name='L431'></a> <a id='L432' name='L432'></a>% Here are the rules for the cropmarks. Note that they are <a id='L433' name='L433'></a>% offset so that the space between them is truly \outerhsize or \outervsize <a id='L434' name='L434'></a>% (P. A. MacKay, 12 November, 1986) <a id='L435' name='L435'></a>% <a id='L436' name='L436'></a>\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} <a id='L437' name='L437'></a>\def\nstop{\vbox <a id='L438' name='L438'></a> {\hrule height\cornerthick depth\cornerlong width\cornerthick}} <a id='L439' name='L439'></a>\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} <a id='L440' name='L440'></a>\def\nsbot{\vbox <a id='L441' name='L441'></a> {\hrule height\cornerlong depth\cornerthick width\cornerthick}} <a id='L442' name='L442'></a> <a id='L443' name='L443'></a>% Parse an argument, then pass it to #1. The argument is the rest of <a id='L444' name='L444'></a>% the input line (except we remove a trailing comment). #1 should be a <a id='L445' name='L445'></a>% macro which expects an ordinary undelimited TeX argument. <a id='L446' name='L446'></a>% <a id='L447' name='L447'></a>\def\parsearg{\parseargusing{}} <a id='L448' name='L448'></a>\def\parseargusing#1#2{% <a id='L449' name='L449'></a> \def\argtorun{#2}% <a id='L450' name='L450'></a> \begingroup <a id='L451' name='L451'></a> \obeylines <a id='L452' name='L452'></a> \spaceisspace <a id='L453' name='L453'></a> #1% <a id='L454' name='L454'></a> \parseargline\empty% Insert the \empty token, see \finishparsearg below. <a id='L455' name='L455'></a>} <a id='L456' name='L456'></a> <a id='L457' name='L457'></a>{\obeylines % <a id='L458' name='L458'></a> \gdef\parseargline#1^^M{% <a id='L459' name='L459'></a> \endgroup % End of the group started in \parsearg. <a id='L460' name='L460'></a> \argremovecomment #1\comment\ArgTerm% <a id='L461' name='L461'></a> }% <a id='L462' name='L462'></a>} <a id='L463' name='L463'></a> <a id='L464' name='L464'></a>% First remove any @comment, then any @c comment. <a id='L465' name='L465'></a>\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} <a id='L466' name='L466'></a>\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} <a id='L467' name='L467'></a> <a id='L468' name='L468'></a>% Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space. <a id='L469' name='L469'></a>% <a id='L470' name='L470'></a>% \argremovec might leave us with trailing space, e.g., <a id='L471' name='L471'></a>% @end itemize @c foo <a id='L472' name='L472'></a>% This space token undergoes the same procedure and is eventually removed <a id='L473' name='L473'></a>% by \finishparsearg. <a id='L474' name='L474'></a>% <a id='L475' name='L475'></a>\def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M} <a id='L476' name='L476'></a>\def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M} <a id='L477' name='L477'></a>\def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% <a id='L478' name='L478'></a> \def\temp{#3}% <a id='L479' name='L479'></a> \ifx\temp\empty <a id='L480' name='L480'></a> % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp: <a id='L481' name='L481'></a> \let\temp\finishparsearg <a id='L482' name='L482'></a> \else <a id='L483' name='L483'></a> \let\temp\argcheckspaces <a id='L484' name='L484'></a> \fi <a id='L485' name='L485'></a> % Put the space token in: <a id='L486' name='L486'></a> \temp#1 #3\ArgTerm <a id='L487' name='L487'></a>} <a id='L488' name='L488'></a> <a id='L489' name='L489'></a>% If a _delimited_ argument is enclosed in braces, they get stripped; so <a id='L490' name='L490'></a>% to get _exactly_ the rest of the line, we had to prevent such situation. <a id='L491' name='L491'></a>% We prepended an \empty token at the very beginning and we expand it now, <a id='L492' name='L492'></a>% just before passing the control to \argtorun. <a id='L493' name='L493'></a>% (Similarly, we have to think about #3 of \argcheckspacesY above: it is <a id='L494' name='L494'></a>% either the null string, or it ends with \^^M---thus there is no danger <a id='L495' name='L495'></a>% that a pair of braces would be stripped. <a id='L496' name='L496'></a>% <a id='L497' name='L497'></a>% But first, we have to remove the trailing space token. <a id='L498' name='L498'></a>% <a id='L499' name='L499'></a>\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} <a id='L500' name='L500'></a> <a id='L501' name='L501'></a>% \parseargdef\foo{...} <a id='L502' name='L502'></a>% is roughly equivalent to <a id='L503' name='L503'></a>% \def\foo{\parsearg\Xfoo} <a id='L504' name='L504'></a>% \def\Xfoo#1{...} <a id='L505' name='L505'></a>% <a id='L506' name='L506'></a>% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my <a id='L507' name='L507'></a>% favourite TeX trick. --kasal, 16nov03 <a id='L508' name='L508'></a> <a id='L509' name='L509'></a>\def\parseargdef#1{% <a id='L510' name='L510'></a> \expandafter \doparseargdef \csname\string#1\endcsname #1% <a id='L511' name='L511'></a>} <a id='L512' name='L512'></a>\def\doparseargdef#1#2{% <a id='L513' name='L513'></a> \def#2{\parsearg#1}% <a id='L514' name='L514'></a> \def#1##1% <a id='L515' name='L515'></a>} <a id='L516' name='L516'></a> <a id='L517' name='L517'></a>% Several utility definitions with active space: <a id='L518' name='L518'></a>{ <a id='L519' name='L519'></a> \obeyspaces <a id='L520' name='L520'></a> \gdef\obeyedspace{ } <a id='L521' name='L521'></a> <a id='L522' name='L522'></a> % Make each space character in the input produce a normal interword <a id='L523' name='L523'></a> % space in the output. Don't allow a line break at this space, as this <a id='L524' name='L524'></a> % is used only in environments like @example, where each line of input <a id='L525' name='L525'></a> % should produce a line of output anyway. <a id='L526' name='L526'></a> % <a id='L527' name='L527'></a> \gdef\sepspaces{\obeyspaces\let =\tie} <a id='L528' name='L528'></a> <a id='L529' name='L529'></a> % If an index command is used in an @example environment, any spaces <a id='L530' name='L530'></a> % therein should become regular spaces in the raw index file, not the <a id='L531' name='L531'></a> % expansion of \tie (\leavevmode \penalty \@M \ ). <a id='L532' name='L532'></a> \gdef\unsepspaces{\let =\space} <a id='L533' name='L533'></a>} <a id='L534' name='L534'></a> <a id='L535' name='L535'></a> <a id='L536' name='L536'></a>\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} <a id='L537' name='L537'></a> <a id='L538' name='L538'></a>% Define the framework for environments in texinfo.tex. It's used like this: <a id='L539' name='L539'></a>% <a id='L540' name='L540'></a>% \envdef\foo{...} <a id='L541' name='L541'></a>% \def\Efoo{...} <a id='L542' name='L542'></a>% <a id='L543' name='L543'></a>% It's the responsibility of \envdef to insert \begingroup before the <a id='L544' name='L544'></a>% actual body; @end closes the group after calling \Efoo. \envdef also <a id='L545' name='L545'></a>% defines \thisenv, so the current environment is known; @end checks <a id='L546' name='L546'></a>% whether the environment name matches. The \checkenv macro can also be <a id='L547' name='L547'></a>% used to check whether the current environment is the one expected. <a id='L548' name='L548'></a>% <a id='L549' name='L549'></a>% Non-false conditionals (@iftex, @ifset) don't fit into this, so they <a id='L550' name='L550'></a>% are not treated as environments; they don't open a group. (The <a id='L551' name='L551'></a>% implementation of @end takes care not to call \endgroup in this <a id='L552' name='L552'></a>% special case.) <a id='L553' name='L553'></a> <a id='L554' name='L554'></a> <a id='L555' name='L555'></a>% At run-time, environments start with this: <a id='L556' name='L556'></a>\def\startenvironment#1{\begingroup\def\thisenv{#1}} <a id='L557' name='L557'></a>% initialize <a id='L558' name='L558'></a>\let\thisenv\empty <a id='L559' name='L559'></a> <a id='L560' name='L560'></a>% ... but they get defined via ``\envdef\foo{...}'': <a id='L561' name='L561'></a>\long\def\envdef#1#2{\def#1{\startenvironment#1#2}} <a id='L562' name='L562'></a>\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}} <a id='L563' name='L563'></a> <a id='L564' name='L564'></a>% Check whether we're in the right environment: <a id='L565' name='L565'></a>\def\checkenv#1{% <a id='L566' name='L566'></a> \def\temp{#1}% <a id='L567' name='L567'></a> \ifx\thisenv\temp <a id='L568' name='L568'></a> \else <a id='L569' name='L569'></a> \badenverr <a id='L570' name='L570'></a> \fi <a id='L571' name='L571'></a>} <a id='L572' name='L572'></a> <a id='L573' name='L573'></a>% Environment mismatch, #1 expected: <a id='L574' name='L574'></a>\def\badenverr{% <a id='L575' name='L575'></a> \errhelp = \EMsimple <a id='L576' name='L576'></a> \errmessage{This command can appear only \inenvironment\temp, <a id='L577' name='L577'></a> not \inenvironment\thisenv}% <a id='L578' name='L578'></a>} <a id='L579' name='L579'></a>\def\inenvironment#1{% <a id='L580' name='L580'></a> \ifx#1\empty <a id='L581' name='L581'></a> outside of any environment% <a id='L582' name='L582'></a> \else <a id='L583' name='L583'></a> in environment \expandafter\string#1% <a id='L584' name='L584'></a> \fi <a id='L585' name='L585'></a>} <a id='L586' name='L586'></a> <a id='L587' name='L587'></a>% @end foo executes the definition of \Efoo. <a id='L588' name='L588'></a>% But first, it executes a specialized version of \checkenv <a id='L589' name='L589'></a>% <a id='L590' name='L590'></a>\parseargdef\end{% <a id='L591' name='L591'></a> \if 1\csname iscond.#1\endcsname <a id='L592' name='L592'></a> \else <a id='L593' name='L593'></a> % The general wording of \badenverr may not be ideal. <a id='L594' name='L594'></a> \expandafter\checkenv\csname#1\endcsname <a id='L595' name='L595'></a> \csname E#1\endcsname <a id='L596' name='L596'></a> \endgroup <a id='L597' name='L597'></a> \fi <a id='L598' name='L598'></a>} <a id='L599' name='L599'></a> <a id='L600' name='L600'></a>\newhelp\EMsimple{Press RETURN to continue.} <a id='L601' name='L601'></a> <a id='L602' name='L602'></a> <a id='L603' name='L603'></a>% Be sure we're in horizontal mode when doing a tie, since we make space <a id='L604' name='L604'></a>% equivalent to this in @example-like environments. Otherwise, a space <a id='L605' name='L605'></a>% at the beginning of a line will start with \penalty -- and <a id='L606' name='L606'></a>% since \penalty is valid in vertical mode, we'd end up putting the <a id='L607' name='L607'></a>% penalty on the vertical list instead of in the new paragraph. <a id='L608' name='L608'></a>{\catcode`@ = 11 <a id='L609' name='L609'></a> % Avoid using \@M directly, because that causes trouble <a id='L610' name='L610'></a> % if the definition is written into an index file. <a id='L611' name='L611'></a> \global\let\tiepenalty = \@M <a id='L612' name='L612'></a> \gdef\tie{\leavevmode\penalty\tiepenalty\ } <a id='L613' name='L613'></a>} <a id='L614' name='L614'></a> <a id='L615' name='L615'></a>% @: forces normal size whitespace following. <a id='L616' name='L616'></a>\def\:{\spacefactor=1000 } <a id='L617' name='L617'></a> <a id='L618' name='L618'></a>% @* forces a line break. <a id='L619' name='L619'></a>\def\*{\unskip\hfil\break\hbox{}\ignorespaces} <a id='L620' name='L620'></a> <a id='L621' name='L621'></a>% @/ allows a line break. <a id='L622' name='L622'></a>\let\/=\allowbreak <a id='L623' name='L623'></a> <a id='L624' name='L624'></a>% @. is an end-of-sentence period. <a id='L625' name='L625'></a>\def\.{.\spacefactor=\endofsentencespacefactor\space} <a id='L626' name='L626'></a> <a id='L627' name='L627'></a>% @! is an end-of-sentence bang. <a id='L628' name='L628'></a>\def\!{!\spacefactor=\endofsentencespacefactor\space} <a id='L629' name='L629'></a> <a id='L630' name='L630'></a>% @? is an end-of-sentence query. <a id='L631' name='L631'></a>\def\?{?\spacefactor=\endofsentencespacefactor\space} <a id='L632' name='L632'></a> <a id='L633' name='L633'></a>% @frenchspacing on|off says whether to put extra space after punctuation. <a id='L634' name='L634'></a>% <a id='L635' name='L635'></a>\def\onword{on} <a id='L636' name='L636'></a>\def\offword{off} <a id='L637' name='L637'></a>% <a id='L638' name='L638'></a>\parseargdef\frenchspacing{% <a id='L639' name='L639'></a> \def\temp{#1}% <a id='L640' name='L640'></a> \ifx\temp\onword \plainfrenchspacing <a id='L641' name='L641'></a> \else\ifx\temp\offword \plainnonfrenchspacing <a id='L642' name='L642'></a> \else <a id='L643' name='L643'></a> \errhelp = \EMsimple <a id='L644' name='L644'></a> \errmessage{Unknown @frenchspacing option `\temp', must be on|off}% <a id='L645' name='L645'></a> \fi\fi <a id='L646' name='L646'></a>} <a id='L647' name='L647'></a> <a id='L648' name='L648'></a>% @w prevents a word break. Without the \leavevmode, @w at the <a id='L649' name='L649'></a>% beginning of a paragraph, when TeX is still in vertical mode, would <a id='L650' name='L650'></a>% produce a whole line of output instead of starting the paragraph. <a id='L651' name='L651'></a>\def\w#1{\leavevmode\hbox{#1}} <a id='L652' name='L652'></a> <a id='L653' name='L653'></a>% @group ... @end group forces ... to be all on one page, by enclosing <a id='L654' name='L654'></a>% it in a TeX vbox. We use \vtop instead of \vbox to construct the box <a id='L655' name='L655'></a>% to keep its height that of a normal line. According to the rules for <a id='L656' name='L656'></a>% \topskip (p.114 of the TeXbook), the glue inserted is <a id='L657' name='L657'></a>% max (\topskip - \ht (first item), 0). If that height is large, <a id='L658' name='L658'></a>% therefore, no glue is inserted, and the space between the headline and <a id='L659' name='L659'></a>% the text is small, which looks bad. <a id='L660' name='L660'></a>% <a id='L661' name='L661'></a>% Another complication is that the group might be very large. This can <a id='L662' name='L662'></a>% cause the glue on the previous page to be unduly stretched, because it <a id='L663' name='L663'></a>% does not have much material. In this case, it's better to add an <a id='L664' name='L664'></a>% explicit \vfill so that the extra space is at the bottom. The <a id='L665' name='L665'></a>% threshold for doing this is if the group is more than \vfilllimit <a id='L666' name='L666'></a>% percent of a page (\vfilllimit can be changed inside of @tex). <a id='L667' name='L667'></a>% <a id='L668' name='L668'></a>\newbox\groupbox <a id='L669' name='L669'></a>\def\vfilllimit{0.7} <a id='L670' name='L670'></a>% <a id='L671' name='L671'></a>\envdef\group{% <a id='L672' name='L672'></a> \ifnum\catcode`\^^M=\active \else <a id='L673' name='L673'></a> \errhelp = \groupinvalidhelp <a id='L674' name='L674'></a> \errmessage{@group invalid in context where filling is enabled}% <a id='L675' name='L675'></a> \fi <a id='L676' name='L676'></a> \startsavinginserts <a id='L677' name='L677'></a> % <a id='L678' name='L678'></a> \setbox\groupbox = \vtop\bgroup <a id='L679' name='L679'></a> % Do @comment since we are called inside an environment such as <a id='L680' name='L680'></a> % @example, where each end-of-line in the input causes an <a id='L681' name='L681'></a> % end-of-line in the output. We don't want the end-of-line after <a id='L682' name='L682'></a> % the `@group' to put extra space in the output. Since @group <a id='L683' name='L683'></a> % should appear on a line by itself (according to the Texinfo <a id='L684' name='L684'></a> % manual), we don't worry about eating any user text. <a id='L685' name='L685'></a> \comment <a id='L686' name='L686'></a>} <a id='L687' name='L687'></a>% <a id='L688' name='L688'></a>% The \vtop produces a box with normal height and large depth; thus, TeX puts <a id='L689' name='L689'></a>% \baselineskip glue before it, and (when the next line of text is done) <a id='L690' name='L690'></a>% \lineskip glue after it. Thus, space below is not quite equal to space <a id='L691' name='L691'></a>% above. But it's pretty close. <a id='L692' name='L692'></a>\def\Egroup{% <a id='L693' name='L693'></a> % To get correct interline space between the last line of the group <a id='L694' name='L694'></a> % and the first line afterwards, we have to propagate \prevdepth. <a id='L695' name='L695'></a> \endgraf % Not \par, as it may have been set to \lisppar. <a id='L696' name='L696'></a> \global\dimen1 = \prevdepth <a id='L697' name='L697'></a> \egroup % End the \vtop. <a id='L698' name='L698'></a> % \dimen0 is the vertical size of the group's box. <a id='L699' name='L699'></a> \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox <a id='L700' name='L700'></a> % \dimen2 is how much space is left on the page (more or less). <a id='L701' name='L701'></a> \dimen2 = \pageheight \advance\dimen2 by -\pagetotal <a id='L702' name='L702'></a> % if the group doesn't fit on the current page, and it's a big big <a id='L703' name='L703'></a> % group, force a page break. <a id='L704' name='L704'></a> \ifdim \dimen0 > \dimen2 <a id='L705' name='L705'></a> \ifdim \pagetotal < \vfilllimit\pageheight <a id='L706' name='L706'></a> \page <a id='L707' name='L707'></a> \fi <a id='L708' name='L708'></a> \fi <a id='L709' name='L709'></a> \box\groupbox <a id='L710' name='L710'></a> \prevdepth = \dimen1 <a id='L711' name='L711'></a> \checkinserts <a id='L712' name='L712'></a>} <a id='L713' name='L713'></a>% <a id='L714' name='L714'></a>% TeX puts in an \escapechar (i.e., `@') at the beginning of the help <a id='L715' name='L715'></a>% message, so this ends up printing `@group can only ...'. <a id='L716' name='L716'></a>% <a id='L717' name='L717'></a>\newhelp\groupinvalidhelp{% <a id='L718' name='L718'></a>group can only be used in environments such as @example,^^J% <a id='L719' name='L719'></a>where each line of input produces a line of output.} <a id='L720' name='L720'></a> <a id='L721' name='L721'></a>% @need space-in-mils <a id='L722' name='L722'></a>% forces a page break if there is not space-in-mils remaining. <a id='L723' name='L723'></a> <a id='L724' name='L724'></a>\newdimen\mil \mil=0.001in <a id='L725' name='L725'></a> <a id='L726' name='L726'></a>\parseargdef\need{% <a id='L727' name='L727'></a> % Ensure vertical mode, so we don't make a big box in the middle of a <a id='L728' name='L728'></a> % paragraph. <a id='L729' name='L729'></a> \par <a id='L730' name='L730'></a> % <a id='L731' name='L731'></a> % If the @need value is less than one line space, it's useless. <a id='L732' name='L732'></a> \dimen0 = #1\mil <a id='L733' name='L733'></a> \dimen2 = \ht\strutbox <a id='L734' name='L734'></a> \advance\dimen2 by \dp\strutbox <a id='L735' name='L735'></a> \ifdim\dimen0 > \dimen2 <a id='L736' name='L736'></a> % <a id='L737' name='L737'></a> % Do a \strut just to make the height of this box be normal, so the <a id='L738' name='L738'></a> % normal leading is inserted relative to the preceding line. <a id='L739' name='L739'></a> % And a page break here is fine. <a id='L740' name='L740'></a> \vtop to #1\mil{\strut\vfil}% <a id='L741' name='L741'></a> % <a id='L742' name='L742'></a> % TeX does not even consider page breaks if a penalty added to the <a id='L743' name='L743'></a> % main vertical list is 10000 or more. But in order to see if the <a id='L744' name='L744'></a> % empty box we just added fits on the page, we must make it consider <a id='L745' name='L745'></a> % page breaks. On the other hand, we don't want to actually break the <a id='L746' name='L746'></a> % page after the empty box. So we use a penalty of 9999. <a id='L747' name='L747'></a> % <a id='L748' name='L748'></a> % There is an extremely small chance that TeX will actually break the <a id='L749' name='L749'></a> % page at this \penalty, if there are no other feasible breakpoints in <a id='L750' name='L750'></a> % sight. (If the user is using lots of big @group commands, which <a id='L751' name='L751'></a> % almost-but-not-quite fill up a page, TeX will have a hard time doing <a id='L752' name='L752'></a> % good page breaking, for example.) However, I could not construct an <a id='L753' name='L753'></a> % example where a page broke at this \penalty; if it happens in a real <a id='L754' name='L754'></a> % document, then we can reconsider our strategy. <a id='L755' name='L755'></a> \penalty9999 <a id='L756' name='L756'></a> % <a id='L757' name='L757'></a> % Back up by the size of the box, whether we did a page break or not. <a id='L758' name='L758'></a> \kern -#1\mil <a id='L759' name='L759'></a> % <a id='L760' name='L760'></a> % Do not allow a page break right after this kern. <a id='L761' name='L761'></a> \nobreak <a id='L762' name='L762'></a> \fi <a id='L763' name='L763'></a>} <a id='L764' name='L764'></a> <a id='L765' name='L765'></a>% @br forces paragraph break (and is undocumented). <a id='L766' name='L766'></a> <a id='L767' name='L767'></a>\let\br = \par <a id='L768' name='L768'></a> <a id='L769' name='L769'></a>% @page forces the start of a new page. <a id='L770' name='L770'></a>% <a id='L771' name='L771'></a>\def\page{\par\vfill\supereject} <a id='L772' name='L772'></a> <a id='L773' name='L773'></a>% @exdent text.... <a id='L774' name='L774'></a>% outputs text on separate line in roman font, starting at standard page margin <a id='L775' name='L775'></a> <a id='L776' name='L776'></a>% This records the amount of indent in the innermost environment. <a id='L777' name='L777'></a>% That's how much \exdent should take out. <a id='L778' name='L778'></a>\newskip\exdentamount <a id='L779' name='L779'></a> <a id='L780' name='L780'></a>% This defn is used inside fill environments such as @defun. <a id='L781' name='L781'></a>\parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break} <a id='L782' name='L782'></a> <a id='L783' name='L783'></a>% This defn is used inside nofill environments such as @example. <a id='L784' name='L784'></a>\parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount <a id='L785' name='L785'></a> \leftline{\hskip\leftskip{\rm#1}}}} <a id='L786' name='L786'></a> <a id='L787' name='L787'></a>% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current <a id='L788' name='L788'></a>% paragraph. For more general purposes, use the \margin insertion <a id='L789' name='L789'></a>% class. WHICH is `l' or `r'. Not documented, written for gawk manual. <a id='L790' name='L790'></a>% <a id='L791' name='L791'></a>\newskip\inmarginspacing \inmarginspacing=1cm <a id='L792' name='L792'></a>\def\strutdepth{\dp\strutbox} <a id='L793' name='L793'></a>% <a id='L794' name='L794'></a>\def\doinmargin#1#2{\strut\vadjust{% <a id='L795' name='L795'></a> \nobreak <a id='L796' name='L796'></a> \kern-\strutdepth <a id='L797' name='L797'></a> \vtop to \strutdepth{% <a id='L798' name='L798'></a> \baselineskip=\strutdepth <a id='L799' name='L799'></a> \vss <a id='L800' name='L800'></a> % if you have multiple lines of stuff to put here, you'll need to <a id='L801' name='L801'></a> % make the vbox yourself of the appropriate size. <a id='L802' name='L802'></a> \ifx#1l% <a id='L803' name='L803'></a> \llap{\ignorespaces #2\hskip\inmarginspacing}% <a id='L804' name='L804'></a> \else <a id='L805' name='L805'></a> \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% <a id='L806' name='L806'></a> \fi <a id='L807' name='L807'></a> \null <a id='L808' name='L808'></a> }% <a id='L809' name='L809'></a>}} <a id='L810' name='L810'></a>\def\inleftmargin{\doinmargin l} <a id='L811' name='L811'></a>\def\inrightmargin{\doinmargin r} <a id='L812' name='L812'></a>% <a id='L813' name='L813'></a>% @inmargin{TEXT [, RIGHT-TEXT]} <a id='L814' name='L814'></a>% (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; <a id='L815' name='L815'></a>% else use TEXT for both). <a id='L816' name='L816'></a>% <a id='L817' name='L817'></a>\def\inmargin#1{\parseinmargin #1,,\finish} <a id='L818' name='L818'></a>\def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. <a id='L819' name='L819'></a> \setbox0 = \hbox{\ignorespaces #2}% <a id='L820' name='L820'></a> \ifdim\wd0 > 0pt <a id='L821' name='L821'></a> \def\lefttext{#1}% have both texts <a id='L822' name='L822'></a> \def\righttext{#2}% <a id='L823' name='L823'></a> \else <a id='L824' name='L824'></a> \def\lefttext{#1}% have only one text <a id='L825' name='L825'></a> \def\righttext{#1}% <a id='L826' name='L826'></a> \fi <a id='L827' name='L827'></a> % <a id='L828' name='L828'></a> \ifodd\pageno <a id='L829' name='L829'></a> \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin <a id='L830' name='L830'></a> \else <a id='L831' name='L831'></a> \def\temp{\inleftmargin\lefttext}% <a id='L832' name='L832'></a> \fi <a id='L833' name='L833'></a> \temp <a id='L834' name='L834'></a>} <a id='L835' name='L835'></a> <a id='L836' name='L836'></a>% @| inserts a changebar to the left of the current line. It should <a id='L837' name='L837'></a>% surround any changed text. This approach does *not* work if the <a id='L838' name='L838'></a>% change spans more than two lines of output. To handle that, we would <a id='L839' name='L839'></a>% have adopt a much more difficult approach (putting marks into the main <a id='L840' name='L840'></a>% vertical list for the beginning and end of each change). This command <a id='L841' name='L841'></a>% is not documented, not supported, and doesn't work. <a id='L842' name='L842'></a>% <a id='L843' name='L843'></a>\def\|{% <a id='L844' name='L844'></a> % \vadjust can only be used in horizontal mode. <a id='L845' name='L845'></a> \leavevmode <a id='L846' name='L846'></a> % <a id='L847' name='L847'></a> % Append this vertical mode material after the current line in the output. <a id='L848' name='L848'></a> \vadjust{% <a id='L849' name='L849'></a> % We want to insert a rule with the height and depth of the current <a id='L850' name='L850'></a> % leading; that is exactly what \strutbox is supposed to record. <a id='L851' name='L851'></a> \vskip-\baselineskip <a id='L852' name='L852'></a> % <a id='L853' name='L853'></a> % \vadjust-items are inserted at the left edge of the type. So <a id='L854' name='L854'></a> % the \llap here moves out into the left-hand margin. <a id='L855' name='L855'></a> \llap{% <a id='L856' name='L856'></a> % <a id='L857' name='L857'></a> % For a thicker or thinner bar, change the `1pt'. <a id='L858' name='L858'></a> \vrule height\baselineskip width1pt <a id='L859' name='L859'></a> % <a id='L860' name='L860'></a> % This is the space between the bar and the text. <a id='L861' name='L861'></a> \hskip 12pt <a id='L862' name='L862'></a> }% <a id='L863' name='L863'></a> }% <a id='L864' name='L864'></a>} <a id='L865' name='L865'></a> <a id='L866' name='L866'></a>% @include FILE -- \input text of FILE. <a id='L867' name='L867'></a>% <a id='L868' name='L868'></a>\def\include{\parseargusing\filenamecatcodes\includezzz} <a id='L869' name='L869'></a>\def\includezzz#1{% <a id='L870' name='L870'></a> \pushthisfilestack <a id='L871' name='L871'></a> \def\thisfile{#1}% <a id='L872' name='L872'></a> {% <a id='L873' name='L873'></a> \makevalueexpandable % we want to expand any @value in FILE. <a id='L874' name='L874'></a> \turnoffactive % and allow special characters in the expansion <a id='L875' name='L875'></a> \indexnofonts % Allow `@@' and other weird things in file names. <a id='L876' name='L876'></a> \wlog{texinfo.tex: doing @include of #1^^J}% <a id='L877' name='L877'></a> \edef\temp{\noexpand\input #1 }% <a id='L878' name='L878'></a> % <a id='L879' name='L879'></a> % This trickery is to read FILE outside of a group, in case it makes <a id='L880' name='L880'></a> % definitions, etc. <a id='L881' name='L881'></a> \expandafter <a id='L882' name='L882'></a> }\temp <a id='L883' name='L883'></a> \popthisfilestack <a id='L884' name='L884'></a>} <a id='L885' name='L885'></a>\def\filenamecatcodes{% <a id='L886' name='L886'></a> \catcode`\\=\other <a id='L887' name='L887'></a> \catcode`~=\other <a id='L888' name='L888'></a> \catcode`^=\other <a id='L889' name='L889'></a> \catcode`_=\other <a id='L890' name='L890'></a> \catcode`|=\other <a id='L891' name='L891'></a> \catcode`<=\other <a id='L892' name='L892'></a> \catcode`>=\other <a id='L893' name='L893'></a> \catcode`+=\other <a id='L894' name='L894'></a> \catcode`-=\other <a id='L895' name='L895'></a> \catcode`\`=\other <a id='L896' name='L896'></a> \catcode`\'=\other <a id='L897' name='L897'></a>} <a id='L898' name='L898'></a> <a id='L899' name='L899'></a>\def\pushthisfilestack{% <a id='L900' name='L900'></a> \expandafter\pushthisfilestackX\popthisfilestack\StackTerm <a id='L901' name='L901'></a>} <a id='L902' name='L902'></a>\def\pushthisfilestackX{% <a id='L903' name='L903'></a> \expandafter\pushthisfilestackY\thisfile\StackTerm <a id='L904' name='L904'></a>} <a id='L905' name='L905'></a>\def\pushthisfilestackY #1\StackTerm #2\StackTerm {% <a id='L906' name='L906'></a> \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}% <a id='L907' name='L907'></a>} <a id='L908' name='L908'></a> <a id='L909' name='L909'></a>\def\popthisfilestack{\errthisfilestackempty} <a id='L910' name='L910'></a>\def\errthisfilestackempty{\errmessage{Internal error: <a id='L911' name='L911'></a> the stack of filenames is empty.}} <a id='L912' name='L912'></a>% <a id='L913' name='L913'></a>\def\thisfile{} <a id='L914' name='L914'></a> <a id='L915' name='L915'></a>% @center line <a id='L916' name='L916'></a>% outputs that line, centered. <a id='L917' name='L917'></a>% <a id='L918' name='L918'></a>\parseargdef\center{% <a id='L919' name='L919'></a> \ifhmode <a id='L920' name='L920'></a> \let\centersub\centerH <a id='L921' name='L921'></a> \else <a id='L922' name='L922'></a> \let\centersub\centerV <a id='L923' name='L923'></a> \fi <a id='L924' name='L924'></a> \centersub{\hfil \ignorespaces#1\unskip \hfil}% <a id='L925' name='L925'></a> \let\centersub\relax % don't let the definition persist, just in case <a id='L926' name='L926'></a>} <a id='L927' name='L927'></a>\def\centerH#1{{% <a id='L928' name='L928'></a> \hfil\break <a id='L929' name='L929'></a> \advance\hsize by -\leftskip <a id='L930' name='L930'></a> \advance\hsize by -\rightskip <a id='L931' name='L931'></a> \line{#1}% <a id='L932' name='L932'></a> \break <a id='L933' name='L933'></a>}} <a id='L934' name='L934'></a>% <a id='L935' name='L935'></a>\newcount\centerpenalty <a id='L936' name='L936'></a>\def\centerV#1{% <a id='L937' name='L937'></a> % The idea here is the same as in \startdefun, \cartouche, etc.: if <a id='L938' name='L938'></a> % @center is the first thing after a section heading, we need to wipe <a id='L939' name='L939'></a> % out the negative parskip inserted by \sectionheading, but still <a id='L940' name='L940'></a> % prevent a page break here. <a id='L941' name='L941'></a> \centerpenalty = \lastpenalty <a id='L942' name='L942'></a> \ifnum\centerpenalty>10000 \vskip\parskip \fi <a id='L943' name='L943'></a> \ifnum\centerpenalty>9999 \penalty\centerpenalty \fi <a id='L944' name='L944'></a> \line{\kern\leftskip #1\kern\rightskip}% <a id='L945' name='L945'></a>} <a id='L946' name='L946'></a> <a id='L947' name='L947'></a>% @sp n outputs n lines of vertical space <a id='L948' name='L948'></a>% <a id='L949' name='L949'></a>\parseargdef\sp{\vskip #1\baselineskip} <a id='L950' name='L950'></a> <a id='L951' name='L951'></a>% @comment ...line which is ignored... <a id='L952' name='L952'></a>% @c is the same as @comment <a id='L953' name='L953'></a>% @ignore ... @end ignore is another way to write a comment <a id='L954' name='L954'></a>% <a id='L955' name='L955'></a>\def\comment{\begingroup \catcode`\^^M=\other% <a id='L956' name='L956'></a>\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% <a id='L957' name='L957'></a>\commentxxx} <a id='L958' name='L958'></a>{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} <a id='L959' name='L959'></a>% <a id='L960' name='L960'></a>\let\c=\comment <a id='L961' name='L961'></a> <a id='L962' name='L962'></a>% @paragraphindent NCHARS <a id='L963' name='L963'></a>% We'll use ems for NCHARS, close enough. <a id='L964' name='L964'></a>% NCHARS can also be the word `asis' or `none'. <a id='L965' name='L965'></a>% We cannot feasibly implement @paragraphindent asis, though. <a id='L966' name='L966'></a>% <a id='L967' name='L967'></a>\def\asisword{asis} % no translation, these are keywords <a id='L968' name='L968'></a>\def\noneword{none} <a id='L969' name='L969'></a>% <a id='L970' name='L970'></a>\parseargdef\paragraphindent{% <a id='L971' name='L971'></a> \def\temp{#1}% <a id='L972' name='L972'></a> \ifx\temp\asisword <a id='L973' name='L973'></a> \else <a id='L974' name='L974'></a> \ifx\temp\noneword <a id='L975' name='L975'></a> \defaultparindent = 0pt <a id='L976' name='L976'></a> \else <a id='L977' name='L977'></a> \defaultparindent = #1em <a id='L978' name='L978'></a> \fi <a id='L979' name='L979'></a> \fi <a id='L980' name='L980'></a> \parindent = \defaultparindent <a id='L981' name='L981'></a>} <a id='L982' name='L982'></a> <a id='L983' name='L983'></a>% @exampleindent NCHARS <a id='L984' name='L984'></a>% We'll use ems for NCHARS like @paragraphindent. <a id='L985' name='L985'></a>% It seems @exampleindent asis isn't necessary, but <a id='L986' name='L986'></a>% I preserve it to make it similar to @paragraphindent. <a id='L987' name='L987'></a>\parseargdef\exampleindent{% <a id='L988' name='L988'></a> \def\temp{#1}% <a id='L989' name='L989'></a> \ifx\temp\asisword <a id='L990' name='L990'></a> \else <a id='L991' name='L991'></a> \ifx\temp\noneword <a id='L992' name='L992'></a> \lispnarrowing = 0pt <a id='L993' name='L993'></a> \else <a id='L994' name='L994'></a> \lispnarrowing = #1em <a id='L995' name='L995'></a> \fi <a id='L996' name='L996'></a> \fi <a id='L997' name='L997'></a>} <a id='L998' name='L998'></a> <a id='L999' name='L999'></a>% @firstparagraphindent WORD <a id='L1000' name='L1000'></a>% If WORD is `none', then suppress indentation of the first paragraph <a id='L1001' name='L1001'></a>% after a section heading. If WORD is `insert', then do indent at such <a id='L1002' name='L1002'></a>% paragraphs. <a id='L1003' name='L1003'></a>% <a id='L1004' name='L1004'></a>% The paragraph indentation is suppressed or not by calling <a id='L1005' name='L1005'></a>% \suppressfirstparagraphindent, which the sectioning commands do. <a id='L1006' name='L1006'></a>% We switch the definition of this back and forth according to WORD. <a id='L1007' name='L1007'></a>% By default, we suppress indentation. <a id='L1008' name='L1008'></a>% <a id='L1009' name='L1009'></a>\def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent} <a id='L1010' name='L1010'></a>\def\insertword{insert} <a id='L1011' name='L1011'></a>% <a id='L1012' name='L1012'></a>\parseargdef\firstparagraphindent{% <a id='L1013' name='L1013'></a> \def\temp{#1}% <a id='L1014' name='L1014'></a> \ifx\temp\noneword <a id='L1015' name='L1015'></a> \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent <a id='L1016' name='L1016'></a> \else\ifx\temp\insertword <a id='L1017' name='L1017'></a> \let\suppressfirstparagraphindent = \relax <a id='L1018' name='L1018'></a> \else <a id='L1019' name='L1019'></a> \errhelp = \EMsimple <a id='L1020' name='L1020'></a> \errmessage{Unknown @firstparagraphindent option `\temp'}% <a id='L1021' name='L1021'></a> \fi\fi <a id='L1022' name='L1022'></a>} <a id='L1023' name='L1023'></a> <a id='L1024' name='L1024'></a>% Here is how we actually suppress indentation. Redefine \everypar to <a id='L1025' name='L1025'></a>% \kern backwards by \parindent, and then reset itself to empty. <a id='L1026' name='L1026'></a>% <a id='L1027' name='L1027'></a>% We also make \indent itself not actually do anything until the next <a id='L1028' name='L1028'></a>% paragraph. <a id='L1029' name='L1029'></a>% <a id='L1030' name='L1030'></a>\gdef\dosuppressfirstparagraphindent{% <a id='L1031' name='L1031'></a> \gdef\indent{% <a id='L1032' name='L1032'></a> \restorefirstparagraphindent <a id='L1033' name='L1033'></a> \indent <a id='L1034' name='L1034'></a> }% <a id='L1035' name='L1035'></a> \gdef\noindent{% <a id='L1036' name='L1036'></a> \restorefirstparagraphindent <a id='L1037' name='L1037'></a> \noindent <a id='L1038' name='L1038'></a> }% <a id='L1039' name='L1039'></a> \global\everypar = {% <a id='L1040' name='L1040'></a> \kern -\parindent <a id='L1041' name='L1041'></a> \restorefirstparagraphindent <a id='L1042' name='L1042'></a> }% <a id='L1043' name='L1043'></a>} <a id='L1044' name='L1044'></a> <a id='L1045' name='L1045'></a>\gdef\restorefirstparagraphindent{% <a id='L1046' name='L1046'></a> \global \let \indent = \ptexindent <a id='L1047' name='L1047'></a> \global \let \noindent = \ptexnoindent <a id='L1048' name='L1048'></a> \global \everypar = {}% <a id='L1049' name='L1049'></a>} <a id='L1050' name='L1050'></a> <a id='L1051' name='L1051'></a> <a id='L1052' name='L1052'></a>% @refill is a no-op. <a id='L1053' name='L1053'></a>\let\refill=\relax <a id='L1054' name='L1054'></a> <a id='L1055' name='L1055'></a>% If working on a large document in chapters, it is convenient to <a id='L1056' name='L1056'></a>% be able to disable indexing, cross-referencing, and contents, for test runs. <a id='L1057' name='L1057'></a>% This is done with @novalidate (before @setfilename). <a id='L1058' name='L1058'></a>% <a id='L1059' name='L1059'></a>\newif\iflinks \linkstrue % by default we want the aux files. <a id='L1060' name='L1060'></a>\let\novalidate = \linksfalse <a id='L1061' name='L1061'></a> <a id='L1062' name='L1062'></a>% @setfilename is done at the beginning of every texinfo file. <a id='L1063' name='L1063'></a>% So open here the files we need to have open while reading the input. <a id='L1064' name='L1064'></a>% This makes it possible to make a .fmt file for texinfo. <a id='L1065' name='L1065'></a>\def\setfilename{% <a id='L1066' name='L1066'></a> \fixbackslash % Turn off hack to swallow `\input texinfo'. <a id='L1067' name='L1067'></a> \iflinks <a id='L1068' name='L1068'></a> \tryauxfile <a id='L1069' name='L1069'></a> % Open the new aux file. TeX will close it automatically at exit. <a id='L1070' name='L1070'></a> \immediate\openout\auxfile=\jobname.aux <a id='L1071' name='L1071'></a> \fi % \openindices needs to do some work in any case. <a id='L1072' name='L1072'></a> \openindices <a id='L1073' name='L1073'></a> \let\setfilename=\comment % Ignore extra @setfilename cmds. <a id='L1074' name='L1074'></a> % <a id='L1075' name='L1075'></a> % If texinfo.cnf is present on the system, read it. <a id='L1076' name='L1076'></a> % Useful for site-wide @afourpaper, etc. <a id='L1077' name='L1077'></a> \openin 1 texinfo.cnf <a id='L1078' name='L1078'></a> \ifeof 1 \else \input texinfo.cnf \fi <a id='L1079' name='L1079'></a> \closein 1 <a id='L1080' name='L1080'></a> % <a id='L1081' name='L1081'></a> \comment % Ignore the actual filename. <a id='L1082' name='L1082'></a>} <a id='L1083' name='L1083'></a> <a id='L1084' name='L1084'></a>% Called from \setfilename. <a id='L1085' name='L1085'></a>% <a id='L1086' name='L1086'></a>\def\openindices{% <a id='L1087' name='L1087'></a> \newindex{cp}% <a id='L1088' name='L1088'></a> \newcodeindex{fn}% <a id='L1089' name='L1089'></a> \newcodeindex{vr}% <a id='L1090' name='L1090'></a> \newcodeindex{tp}% <a id='L1091' name='L1091'></a> \newcodeindex{ky}% <a id='L1092' name='L1092'></a> \newcodeindex{pg}% <a id='L1093' name='L1093'></a>} <a id='L1094' name='L1094'></a> <a id='L1095' name='L1095'></a>% @bye. <a id='L1096' name='L1096'></a>\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} <a id='L1097' name='L1097'></a> <a id='L1098' name='L1098'></a> <a id='L1099' name='L1099'></a>\message{pdf,} <a id='L1100' name='L1100'></a>% adobe `portable' document format <a id='L1101' name='L1101'></a>\newcount\tempnum <a id='L1102' name='L1102'></a>\newcount\lnkcount <a id='L1103' name='L1103'></a>\newtoks\filename <a id='L1104' name='L1104'></a>\newcount\filenamelength <a id='L1105' name='L1105'></a>\newcount\pgn <a id='L1106' name='L1106'></a>\newtoks\toksA <a id='L1107' name='L1107'></a>\newtoks\toksB <a id='L1108' name='L1108'></a>\newtoks\toksC <a id='L1109' name='L1109'></a>\newtoks\toksD <a id='L1110' name='L1110'></a>\newbox\boxA <a id='L1111' name='L1111'></a>\newcount\countA <a id='L1112' name='L1112'></a>\newif\ifpdf <a id='L1113' name='L1113'></a>\newif\ifpdfmakepagedest <a id='L1114' name='L1114'></a> <a id='L1115' name='L1115'></a>% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 <a id='L1116' name='L1116'></a>% can be set). So we test for \relax and 0 as well as being undefined. <a id='L1117' name='L1117'></a>\ifx\pdfoutput\thisisundefined <a id='L1118' name='L1118'></a>\else <a id='L1119' name='L1119'></a> \ifx\pdfoutput\relax <a id='L1120' name='L1120'></a> \else <a id='L1121' name='L1121'></a> \ifcase\pdfoutput <a id='L1122' name='L1122'></a> \else <a id='L1123' name='L1123'></a> \pdftrue <a id='L1124' name='L1124'></a> \fi <a id='L1125' name='L1125'></a> \fi <a id='L1126' name='L1126'></a>\fi <a id='L1127' name='L1127'></a> <a id='L1128' name='L1128'></a>% PDF uses PostScript string constants for the names of xref targets, <a id='L1129' name='L1129'></a>% for display in the outlines, and in other places. Thus, we have to <a id='L1130' name='L1130'></a>% double any backslashes. Otherwise, a name like "\node" will be <a id='L1131' name='L1131'></a>% interpreted as a newline (\n), followed by o, d, e. Not good. <a id='L1132' name='L1132'></a>% <a id='L1133' name='L1133'></a>% See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and <a id='L1134' name='L1134'></a>% related messages. The final outcome is that it is up to the TeX user <a id='L1135' name='L1135'></a>% to double the backslashes and otherwise make the string valid, so <a id='L1136' name='L1136'></a>% that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to <a id='L1137' name='L1137'></a>% do this reliably, so we use it. <a id='L1138' name='L1138'></a> <a id='L1139' name='L1139'></a>% #1 is a control sequence in which to do the replacements, <a id='L1140' name='L1140'></a>% which we \xdef. <a id='L1141' name='L1141'></a>\def\txiescapepdf#1{% <a id='L1142' name='L1142'></a> \ifx\pdfescapestring\thisisundefined <a id='L1143' name='L1143'></a> % No primitive available; should we give a warning or log? <a id='L1144' name='L1144'></a> % Many times it won't matter. <a id='L1145' name='L1145'></a> \else <a id='L1146' name='L1146'></a> % The expandable \pdfescapestring primitive escapes parentheses, <a id='L1147' name='L1147'></a> % backslashes, and other special chars. <a id='L1148' name='L1148'></a> \xdef#1{\pdfescapestring{#1}}% <a id='L1149' name='L1149'></a> \fi <a id='L1150' name='L1150'></a>} <a id='L1151' name='L1151'></a> <a id='L1152' name='L1152'></a>\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images <a id='L1153' name='L1153'></a>with PDF output, and none of those formats could be found. (.eps cannot <a id='L1154' name='L1154'></a>be supported due to the design of the PDF format; use regular TeX (DVI <a id='L1155' name='L1155'></a>output) for that.)} <a id='L1156' name='L1156'></a> <a id='L1157' name='L1157'></a>\ifpdf <a id='L1158' name='L1158'></a> % <a id='L1159' name='L1159'></a> % Color manipulation macros based on pdfcolor.tex, <a id='L1160' name='L1160'></a> % except using rgb instead of cmyk; the latter is said to render as a <a id='L1161' name='L1161'></a> % very dark gray on-screen and a very dark halftone in print, instead <a id='L1162' name='L1162'></a> % of actual black. <a id='L1163' name='L1163'></a> \def\rgbDarkRed{0.50 0.09 0.12} <a id='L1164' name='L1164'></a> \def\rgbBlack{0 0 0} <a id='L1165' name='L1165'></a> % <a id='L1166' name='L1166'></a> % k sets the color for filling (usual text, etc.); <a id='L1167' name='L1167'></a> % K sets the color for stroking (thin rules, e.g., normal _'s). <a id='L1168' name='L1168'></a> \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}} <a id='L1169' name='L1169'></a> % <a id='L1170' name='L1170'></a> % Set color, and create a mark which defines \thiscolor accordingly, <a id='L1171' name='L1171'></a> % so that \makeheadline knows which color to restore. <a id='L1172' name='L1172'></a> \def\setcolor#1{% <a id='L1173' name='L1173'></a> \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% <a id='L1174' name='L1174'></a> \domark <a id='L1175' name='L1175'></a> \pdfsetcolor{#1}% <a id='L1176' name='L1176'></a> } <a id='L1177' name='L1177'></a> % <a id='L1178' name='L1178'></a> \def\maincolor{\rgbBlack} <a id='L1179' name='L1179'></a> \pdfsetcolor{\maincolor} <a id='L1180' name='L1180'></a> \edef\thiscolor{\maincolor} <a id='L1181' name='L1181'></a> \def\lastcolordefs{} <a id='L1182' name='L1182'></a> % <a id='L1183' name='L1183'></a> \def\makefootline{% <a id='L1184' name='L1184'></a> \baselineskip24pt <a id='L1185' name='L1185'></a> \line{\pdfsetcolor{\maincolor}\the\footline}% <a id='L1186' name='L1186'></a> } <a id='L1187' name='L1187'></a> % <a id='L1188' name='L1188'></a> \def\makeheadline{% <a id='L1189' name='L1189'></a> \vbox to 0pt{% <a id='L1190' name='L1190'></a> \vskip-22.5pt <a id='L1191' name='L1191'></a> \line{% <a id='L1192' name='L1192'></a> \vbox to8.5pt{}% <a id='L1193' name='L1193'></a> % Extract \thiscolor definition from the marks. <a id='L1194' name='L1194'></a> \getcolormarks <a id='L1195' name='L1195'></a> % Typeset the headline with \maincolor, then restore the color. <a id='L1196' name='L1196'></a> \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% <a id='L1197' name='L1197'></a> }% <a id='L1198' name='L1198'></a> \vss <a id='L1199' name='L1199'></a> }% <a id='L1200' name='L1200'></a> \nointerlineskip <a id='L1201' name='L1201'></a> } <a id='L1202' name='L1202'></a> % <a id='L1203' name='L1203'></a> % <a id='L1204' name='L1204'></a> \pdfcatalog{/PageMode /UseOutlines} <a id='L1205' name='L1205'></a> % <a id='L1206' name='L1206'></a> % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). <a id='L1207' name='L1207'></a> \def\dopdfimage#1#2#3{% <a id='L1208' name='L1208'></a> \def\pdfimagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% <a id='L1209' name='L1209'></a> \def\pdfimageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% <a id='L1210' name='L1210'></a> % <a id='L1211' name='L1211'></a> % pdftex (and the PDF format) support .pdf, .png, .jpg (among <a id='L1212' name='L1212'></a> % others). Let's try in that order, PDF first since if <a id='L1213' name='L1213'></a> % someone has a scalable image, presumably better to use that than a <a id='L1214' name='L1214'></a> % bitmap. <a id='L1215' name='L1215'></a> \let\pdfimgext=\empty <a id='L1216' name='L1216'></a> \begingroup <a id='L1217' name='L1217'></a> \openin 1 #1.pdf \ifeof 1 <a id='L1218' name='L1218'></a> \openin 1 #1.PDF \ifeof 1 <a id='L1219' name='L1219'></a> \openin 1 #1.png \ifeof 1 <a id='L1220' name='L1220'></a> \openin 1 #1.jpg \ifeof 1 <a id='L1221' name='L1221'></a> \openin 1 #1.jpeg \ifeof 1 <a id='L1222' name='L1222'></a> \openin 1 #1.JPG \ifeof 1 <a id='L1223' name='L1223'></a> \errhelp = \nopdfimagehelp <a id='L1224' name='L1224'></a> \errmessage{Could not find image file #1 for pdf}% <a id='L1225' name='L1225'></a> \else \gdef\pdfimgext{JPG}% <a id='L1226' name='L1226'></a> \fi <a id='L1227' name='L1227'></a> \else \gdef\pdfimgext{jpeg}% <a id='L1228' name='L1228'></a> \fi <a id='L1229' name='L1229'></a> \else \gdef\pdfimgext{jpg}% <a id='L1230' name='L1230'></a> \fi <a id='L1231' name='L1231'></a> \else \gdef\pdfimgext{png}% <a id='L1232' name='L1232'></a> \fi <a id='L1233' name='L1233'></a> \else \gdef\pdfimgext{PDF}% <a id='L1234' name='L1234'></a> \fi <a id='L1235' name='L1235'></a> \else \gdef\pdfimgext{pdf}% <a id='L1236' name='L1236'></a> \fi <a id='L1237' name='L1237'></a> \closein 1 <a id='L1238' name='L1238'></a> \endgroup <a id='L1239' name='L1239'></a> % <a id='L1240' name='L1240'></a> % without \immediate, ancient pdftex seg faults when the same image is <a id='L1241' name='L1241'></a> % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) <a id='L1242' name='L1242'></a> \ifnum\pdftexversion < 14 <a id='L1243' name='L1243'></a> \immediate\pdfimage <a id='L1244' name='L1244'></a> \else <a id='L1245' name='L1245'></a> \immediate\pdfximage <a id='L1246' name='L1246'></a> \fi <a id='L1247' name='L1247'></a> \ifdim \wd0 >0pt width \pdfimagewidth \fi <a id='L1248' name='L1248'></a> \ifdim \wd2 >0pt height \pdfimageheight \fi <a id='L1249' name='L1249'></a> \ifnum\pdftexversion<13 <a id='L1250' name='L1250'></a> #1.\pdfimgext <a id='L1251' name='L1251'></a> \else <a id='L1252' name='L1252'></a> {#1.\pdfimgext}% <a id='L1253' name='L1253'></a> \fi <a id='L1254' name='L1254'></a> \ifnum\pdftexversion < 14 \else <a id='L1255' name='L1255'></a> \pdfrefximage \pdflastximage <a id='L1256' name='L1256'></a> \fi} <a id='L1257' name='L1257'></a> % <a id='L1258' name='L1258'></a> \def\pdfmkdest#1{{% <a id='L1259' name='L1259'></a> % We have to set dummies so commands such as @code, and characters <a id='L1260' name='L1260'></a> % such as \, aren't expanded when present in a section title. <a id='L1261' name='L1261'></a> \indexnofonts <a id='L1262' name='L1262'></a> \turnoffactive <a id='L1263' name='L1263'></a> \makevalueexpandable <a id='L1264' name='L1264'></a> \def\pdfdestname{#1}% <a id='L1265' name='L1265'></a> \txiescapepdf\pdfdestname <a id='L1266' name='L1266'></a> \safewhatsit{\pdfdest name{\pdfdestname} xyz}% <a id='L1267' name='L1267'></a> }} <a id='L1268' name='L1268'></a> % <a id='L1269' name='L1269'></a> % used to mark target names; must be expandable. <a id='L1270' name='L1270'></a> \def\pdfmkpgn#1{#1} <a id='L1271' name='L1271'></a> % <a id='L1272' name='L1272'></a> % by default, use a color that is dark enough to print on paper as <a id='L1273' name='L1273'></a> % nearly black, but still distinguishable for online viewing. <a id='L1274' name='L1274'></a> \def\urlcolor{\rgbDarkRed} <a id='L1275' name='L1275'></a> \def\linkcolor{\rgbDarkRed} <a id='L1276' name='L1276'></a> \def\endlink{\setcolor{\maincolor}\pdfendlink} <a id='L1277' name='L1277'></a> % <a id='L1278' name='L1278'></a> % Adding outlines to PDF; macros for calculating structure of outlines <a id='L1279' name='L1279'></a> % come from Petr Olsak <a id='L1280' name='L1280'></a> \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% <a id='L1281' name='L1281'></a> \else \csname#1\endcsname \fi} <a id='L1282' name='L1282'></a> \def\advancenumber#1{\tempnum=\expnumber{#1}\relax <a id='L1283' name='L1283'></a> \advance\tempnum by 1 <a id='L1284' name='L1284'></a> \expandafter\xdef\csname#1\endcsname{\the\tempnum}} <a id='L1285' name='L1285'></a> % <a id='L1286' name='L1286'></a> % #1 is the section text, which is what will be displayed in the <a id='L1287' name='L1287'></a> % outline by the pdf viewer. #2 is the pdf expression for the number <a id='L1288' name='L1288'></a> % of subentries (or empty, for subsubsections). #3 is the node text, <a id='L1289' name='L1289'></a> % which might be empty if this toc entry had no corresponding node. <a id='L1290' name='L1290'></a> % #4 is the page number <a id='L1291' name='L1291'></a> % <a id='L1292' name='L1292'></a> \def\dopdfoutline#1#2#3#4{% <a id='L1293' name='L1293'></a> % Generate a link to the node text if that exists; else, use the <a id='L1294' name='L1294'></a> % page number. We could generate a destination for the section <a id='L1295' name='L1295'></a> % text in the case where a section has no node, but it doesn't <a id='L1296' name='L1296'></a> % seem worth the trouble, since most documents are normally structured. <a id='L1297' name='L1297'></a> \edef\pdfoutlinedest{#3}% <a id='L1298' name='L1298'></a> \ifx\pdfoutlinedest\empty <a id='L1299' name='L1299'></a> \def\pdfoutlinedest{#4}% <a id='L1300' name='L1300'></a> \else <a id='L1301' name='L1301'></a> \txiescapepdf\pdfoutlinedest <a id='L1302' name='L1302'></a> \fi <a id='L1303' name='L1303'></a> % <a id='L1304' name='L1304'></a> % Also escape PDF chars in the display string. <a id='L1305' name='L1305'></a> \edef\pdfoutlinetext{#1}% <a id='L1306' name='L1306'></a> \txiescapepdf\pdfoutlinetext <a id='L1307' name='L1307'></a> % <a id='L1308' name='L1308'></a> \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% <a id='L1309' name='L1309'></a> } <a id='L1310' name='L1310'></a> % <a id='L1311' name='L1311'></a> \def\pdfmakeoutlines{% <a id='L1312' name='L1312'></a> \begingroup <a id='L1313' name='L1313'></a> % Read toc silently, to get counts of subentries for \pdfoutline. <a id='L1314' name='L1314'></a> \def\partentry##1##2##3##4{}% ignore parts in the outlines <a id='L1315' name='L1315'></a> \def\numchapentry##1##2##3##4{% <a id='L1316' name='L1316'></a> \def\thischapnum{##2}% <a id='L1317' name='L1317'></a> \def\thissecnum{0}% <a id='L1318' name='L1318'></a> \def\thissubsecnum{0}% <a id='L1319' name='L1319'></a> }% <a id='L1320' name='L1320'></a> \def\numsecentry##1##2##3##4{% <a id='L1321' name='L1321'></a> \advancenumber{chap\thischapnum}% <a id='L1322' name='L1322'></a> \def\thissecnum{##2}% <a id='L1323' name='L1323'></a> \def\thissubsecnum{0}% <a id='L1324' name='L1324'></a> }% <a id='L1325' name='L1325'></a> \def\numsubsecentry##1##2##3##4{% <a id='L1326' name='L1326'></a> \advancenumber{sec\thissecnum}% <a id='L1327' name='L1327'></a> \def\thissubsecnum{##2}% <a id='L1328' name='L1328'></a> }% <a id='L1329' name='L1329'></a> \def\numsubsubsecentry##1##2##3##4{% <a id='L1330' name='L1330'></a> \advancenumber{subsec\thissubsecnum}% <a id='L1331' name='L1331'></a> }% <a id='L1332' name='L1332'></a> \def\thischapnum{0}% <a id='L1333' name='L1333'></a> \def\thissecnum{0}% <a id='L1334' name='L1334'></a> \def\thissubsecnum{0}% <a id='L1335' name='L1335'></a> % <a id='L1336' name='L1336'></a> % use \def rather than \let here because we redefine \chapentry et <a id='L1337' name='L1337'></a> % al. a second time, below. <a id='L1338' name='L1338'></a> \def\appentry{\numchapentry}% <a id='L1339' name='L1339'></a> \def\appsecentry{\numsecentry}% <a id='L1340' name='L1340'></a> \def\appsubsecentry{\numsubsecentry}% <a id='L1341' name='L1341'></a> \def\appsubsubsecentry{\numsubsubsecentry}% <a id='L1342' name='L1342'></a> \def\unnchapentry{\numchapentry}% <a id='L1343' name='L1343'></a> \def\unnsecentry{\numsecentry}% <a id='L1344' name='L1344'></a> \def\unnsubsecentry{\numsubsecentry}% <a id='L1345' name='L1345'></a> \def\unnsubsubsecentry{\numsubsubsecentry}% <a id='L1346' name='L1346'></a> \readdatafile{toc}% <a id='L1347' name='L1347'></a> % <a id='L1348' name='L1348'></a> % Read toc second time, this time actually producing the outlines. <a id='L1349' name='L1349'></a> % The `-' means take the \expnumber as the absolute number of <a id='L1350' name='L1350'></a> % subentries, which we calculated on our first read of the .toc above. <a id='L1351' name='L1351'></a> % <a id='L1352' name='L1352'></a> % We use the node names as the destinations. <a id='L1353' name='L1353'></a> \def\numchapentry##1##2##3##4{% <a id='L1354' name='L1354'></a> \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% <a id='L1355' name='L1355'></a> \def\numsecentry##1##2##3##4{% <a id='L1356' name='L1356'></a> \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% <a id='L1357' name='L1357'></a> \def\numsubsecentry##1##2##3##4{% <a id='L1358' name='L1358'></a> \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}% <a id='L1359' name='L1359'></a> \def\numsubsubsecentry##1##2##3##4{% count is always zero <a id='L1360' name='L1360'></a> \dopdfoutline{##1}{}{##3}{##4}}% <a id='L1361' name='L1361'></a> % <a id='L1362' name='L1362'></a> % PDF outlines are displayed using system fonts, instead of <a id='L1363' name='L1363'></a> % document fonts. Therefore we cannot use special characters, <a id='L1364' name='L1364'></a> % since the encoding is unknown. For example, the eogonek from <a id='L1365' name='L1365'></a> % Latin 2 (0xea) gets translated to a | character. Info from <a id='L1366' name='L1366'></a> % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. <a id='L1367' name='L1367'></a> % <a id='L1368' name='L1368'></a> % TODO this right, we have to translate 8-bit characters to <a id='L1369' name='L1369'></a> % their "best" equivalent, based on the @documentencoding. Too <a id='L1370' name='L1370'></a> % much work for too little return. Just use the ASCII equivalents <a id='L1371' name='L1371'></a> % we use for the index sort strings. <a id='L1372' name='L1372'></a> % <a id='L1373' name='L1373'></a> \indexnofonts <a id='L1374' name='L1374'></a> \setupdatafile <a id='L1375' name='L1375'></a> % We can have normal brace characters in the PDF outlines, unlike <a id='L1376' name='L1376'></a> % Texinfo index files. So set that up. <a id='L1377' name='L1377'></a> \def\{{\lbracecharliteral}% <a id='L1378' name='L1378'></a> \def\}{\rbracecharliteral}% <a id='L1379' name='L1379'></a> \catcode`\\=\active \otherbackslash <a id='L1380' name='L1380'></a> \input \tocreadfilename <a id='L1381' name='L1381'></a> \endgroup <a id='L1382' name='L1382'></a> } <a id='L1383' name='L1383'></a> {\catcode`[=1 \catcode`]=2 <a id='L1384' name='L1384'></a> \catcode`{=\other \catcode`}=\other <a id='L1385' name='L1385'></a> \gdef\lbracecharliteral[{]% <a id='L1386' name='L1386'></a> \gdef\rbracecharliteral[}]% <a id='L1387' name='L1387'></a> ] <a id='L1388' name='L1388'></a> % <a id='L1389' name='L1389'></a> \def\skipspaces#1{\def\PP{#1}\def\D{|}% <a id='L1390' name='L1390'></a> \ifx\PP\D\let\nextsp\relax <a id='L1391' name='L1391'></a> \else\let\nextsp\skipspaces <a id='L1392' name='L1392'></a> \addtokens{\filename}{\PP}% <a id='L1393' name='L1393'></a> \advance\filenamelength by 1 <a id='L1394' name='L1394'></a> \fi <a id='L1395' name='L1395'></a> \nextsp} <a id='L1396' name='L1396'></a> \def\getfilename#1{% <a id='L1397' name='L1397'></a> \filenamelength=0 <a id='L1398' name='L1398'></a> % If we don't expand the argument now, \skipspaces will get <a id='L1399' name='L1399'></a> % snagged on things like "@value{foo}". <a id='L1400' name='L1400'></a> \edef\temp{#1}% <a id='L1401' name='L1401'></a> \expandafter\skipspaces\temp|\relax <a id='L1402' name='L1402'></a> } <a id='L1403' name='L1403'></a> \ifnum\pdftexversion < 14 <a id='L1404' name='L1404'></a> \let \startlink \pdfannotlink <a id='L1405' name='L1405'></a> \else <a id='L1406' name='L1406'></a> \let \startlink \pdfstartlink <a id='L1407' name='L1407'></a> \fi <a id='L1408' name='L1408'></a> % make a live url in pdf output. <a id='L1409' name='L1409'></a> \def\pdfurl#1{% <a id='L1410' name='L1410'></a> \begingroup <a id='L1411' name='L1411'></a> % it seems we really need yet another set of dummies; have not <a id='L1412' name='L1412'></a> % tried to figure out what each command should do in the context <a id='L1413' name='L1413'></a> % of @url. for now, just make @/ a no-op, that's the only one <a id='L1414' name='L1414'></a> % people have actually reported a problem with. <a id='L1415' name='L1415'></a> % <a id='L1416' name='L1416'></a> \normalturnoffactive <a id='L1417' name='L1417'></a> \def\@{@}% <a id='L1418' name='L1418'></a> \let\/=\empty <a id='L1419' name='L1419'></a> \makevalueexpandable <a id='L1420' name='L1420'></a> % do we want to go so far as to use \indexnofonts instead of just <a id='L1421' name='L1421'></a> % special-casing \var here? <a id='L1422' name='L1422'></a> \def\var##1{##1}% <a id='L1423' name='L1423'></a> % <a id='L1424' name='L1424'></a> \leavevmode\setcolor{\urlcolor}% <a id='L1425' name='L1425'></a> \startlink attr{/Border [0 0 0]}% <a id='L1426' name='L1426'></a> user{/Subtype /Link /A << /S /URI /URI (#1) >>}% <a id='L1427' name='L1427'></a> \endgroup} <a id='L1428' name='L1428'></a> \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} <a id='L1429' name='L1429'></a> \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} <a id='L1430' name='L1430'></a> \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} <a id='L1431' name='L1431'></a> \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} <a id='L1432' name='L1432'></a> \def\maketoks{% <a id='L1433' name='L1433'></a> \expandafter\poptoks\the\toksA|ENDTOKS|\relax <a id='L1434' name='L1434'></a> \ifx\first0\adn0 <a id='L1435' name='L1435'></a> \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 <a id='L1436' name='L1436'></a> \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 <a id='L1437' name='L1437'></a> \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 <a id='L1438' name='L1438'></a> \else <a id='L1439' name='L1439'></a> \ifnum0=\countA\else\makelink\fi <a id='L1440' name='L1440'></a> \ifx\first.\let\next=\done\else <a id='L1441' name='L1441'></a> \let\next=\maketoks <a id='L1442' name='L1442'></a> \addtokens{\toksB}{\the\toksD} <a id='L1443' name='L1443'></a> \ifx\first,\addtokens{\toksB}{\space}\fi <a id='L1444' name='L1444'></a> \fi <a id='L1445' name='L1445'></a> \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi <a id='L1446' name='L1446'></a> \next} <a id='L1447' name='L1447'></a> \def\makelink{\addtokens{\toksB}% <a id='L1448' name='L1448'></a> {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} <a id='L1449' name='L1449'></a> \def\pdflink#1{% <a id='L1450' name='L1450'></a> \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} <a id='L1451' name='L1451'></a> \setcolor{\linkcolor}#1\endlink} <a id='L1452' name='L1452'></a> \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} <a id='L1453' name='L1453'></a>\else <a id='L1454' name='L1454'></a> % non-pdf mode <a id='L1455' name='L1455'></a> \let\pdfmkdest = \gobble <a id='L1456' name='L1456'></a> \let\pdfurl = \gobble <a id='L1457' name='L1457'></a> \let\endlink = \relax <a id='L1458' name='L1458'></a> \let\setcolor = \gobble <a id='L1459' name='L1459'></a> \let\pdfsetcolor = \gobble <a id='L1460' name='L1460'></a> \let\pdfmakeoutlines = \relax <a id='L1461' name='L1461'></a>\fi % \ifx\pdfoutput <a id='L1462' name='L1462'></a> <a id='L1463' name='L1463'></a> <a id='L1464' name='L1464'></a>\message{fonts,} <a id='L1465' name='L1465'></a> <a id='L1466' name='L1466'></a>% Change the current font style to #1, remembering it in \curfontstyle. <a id='L1467' name='L1467'></a>% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in <a id='L1468' name='L1468'></a>% italics, not bold italics. <a id='L1469' name='L1469'></a>% <a id='L1470' name='L1470'></a>\def\setfontstyle#1{% <a id='L1471' name='L1471'></a> \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. <a id='L1472' name='L1472'></a> \csname ten#1\endcsname % change the current font <a id='L1473' name='L1473'></a>} <a id='L1474' name='L1474'></a> <a id='L1475' name='L1475'></a>% Select #1 fonts with the current style. <a id='L1476' name='L1476'></a>% <a id='L1477' name='L1477'></a>\def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname} <a id='L1478' name='L1478'></a> <a id='L1479' name='L1479'></a>% Japanese fonts. (--ak) <a id='L1480' name='L1480'></a>\ifjaTeX <a id='L1481' name='L1481'></a>\csname newfam\endcsname\mcfam <a id='L1482' name='L1482'></a>\csname newfam\endcsname\gtfam <a id='L1483' name='L1483'></a>\def\mc{\fam\mcfam \setfontstyle{min}} <a id='L1484' name='L1484'></a>\def\gt{\fam\gtfam \setfontstyle{gt}} <a id='L1485' name='L1485'></a>\def\rm{\mc \fam=0 \setfontstyle{rm}} <a id='L1486' name='L1486'></a>\def\it{\fam=\itfam \setfontstyle{it}} <a id='L1487' name='L1487'></a>\def\sl{\fam=\slfam \setfontstyle{sl}} <a id='L1488' name='L1488'></a>\def\bf{\gt \fam\bffam \setfontstyle{bf}}\def\bfstylename{bf} <a id='L1489' name='L1489'></a>\def\tt{\fam=\ttfam \setfontstyle{tt}} <a id='L1490' name='L1490'></a>\else <a id='L1491' name='L1491'></a>\def\rm{\fam=0 \setfontstyle{rm}} <a id='L1492' name='L1492'></a>\def\it{\fam=\itfam \setfontstyle{it}} <a id='L1493' name='L1493'></a>\def\sl{\fam=\slfam \setfontstyle{sl}} <a id='L1494' name='L1494'></a>\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} <a id='L1495' name='L1495'></a>\def\tt{\fam=\ttfam \setfontstyle{tt}} <a id='L1496' name='L1496'></a>\fi <a id='L1497' name='L1497'></a> <a id='L1498' name='L1498'></a>% Unfortunately, we have to override this for titles and the like, since <a id='L1499' name='L1499'></a>% in those cases "rm" is bold. Sigh. <a id='L1500' name='L1500'></a>\ifjaTeX <a id='L1501' name='L1501'></a>\def\rmisbold{\rm\gt\def\curfontstyle{bf}} <a id='L1502' name='L1502'></a>\else <a id='L1503' name='L1503'></a>\def\rmisbold{\rm\def\curfontstyle{bf}} <a id='L1504' name='L1504'></a>\fi <a id='L1505' name='L1505'></a> <a id='L1506' name='L1506'></a>% Texinfo sort of supports the sans serif font style, which plain TeX does not. <a id='L1507' name='L1507'></a>% So we set up a \sf. <a id='L1508' name='L1508'></a>\newfam\sffam <a id='L1509' name='L1509'></a>\ifjaTeX <a id='L1510' name='L1510'></a>\def\sf{\gt \fam\sffam \setfontstyle{sf}} <a id='L1511' name='L1511'></a>\else <a id='L1512' name='L1512'></a>\def\sf{\fam=\sffam \setfontstyle{sf}} <a id='L1513' name='L1513'></a>\fi <a id='L1514' name='L1514'></a>\let\li = \sf % Sometimes we call it \li, not \sf. <a id='L1515' name='L1515'></a> <a id='L1516' name='L1516'></a>% We don't need math for this font style. <a id='L1517' name='L1517'></a>\def\ttsl{\setfontstyle{ttsl}} <a id='L1518' name='L1518'></a> <a id='L1519' name='L1519'></a> <a id='L1520' name='L1520'></a>% Set the baselineskip to #1, and the lineskip and strut size <a id='L1521' name='L1521'></a>% correspondingly. There is no deep meaning behind these magic numbers <a id='L1522' name='L1522'></a>% used as factors; they just match (closely enough) what Knuth defined. <a id='L1523' name='L1523'></a>% <a id='L1524' name='L1524'></a>\def\lineskipfactor{.08333} <a id='L1525' name='L1525'></a>\def\strutheightpercent{.70833} <a id='L1526' name='L1526'></a>\def\strutdepthpercent {.29167} <a id='L1527' name='L1527'></a>% <a id='L1528' name='L1528'></a>% can get a sort of poor man's double spacing by redefining this. <a id='L1529' name='L1529'></a>\def\baselinefactor{1} <a id='L1530' name='L1530'></a>% <a id='L1531' name='L1531'></a>\newdimen\textleading <a id='L1532' name='L1532'></a>\def\setleading#1{% <a id='L1533' name='L1533'></a> \dimen0 = #1\relax <a id='L1534' name='L1534'></a> \normalbaselineskip = \baselinefactor\dimen0 <a id='L1535' name='L1535'></a> \normallineskip = \lineskipfactor\normalbaselineskip <a id='L1536' name='L1536'></a> \normalbaselines <a id='L1537' name='L1537'></a> \setbox\strutbox =\hbox{% <a id='L1538' name='L1538'></a> \vrule width0pt height\strutheightpercent\baselineskip <a id='L1539' name='L1539'></a> depth \strutdepthpercent \baselineskip <a id='L1540' name='L1540'></a> }% <a id='L1541' name='L1541'></a>} <a id='L1542' name='L1542'></a> <a id='L1543' name='L1543'></a>% PDF CMaps. See also LaTeX's t1.cmap. <a id='L1544' name='L1544'></a>% <a id='L1545' name='L1545'></a>% do nothing with this by default. <a id='L1546' name='L1546'></a>\expandafter\let\csname cmapOT1\endcsname\gobble <a id='L1547' name='L1547'></a>\expandafter\let\csname cmapOT1IT\endcsname\gobble <a id='L1548' name='L1548'></a>\expandafter\let\csname cmapOT1TT\endcsname\gobble <a id='L1549' name='L1549'></a> <a id='L1550' name='L1550'></a>% if we are producing pdf, and we have \pdffontattr, then define cmaps. <a id='L1551' name='L1551'></a>% (\pdffontattr was introduced many years ago, but people still run <a id='L1552' name='L1552'></a>% older pdftex's; it's easy to conditionalize, so we do.) <a id='L1553' name='L1553'></a>\ifpdf \ifx\pdffontattr\thisisundefined \else <a id='L1554' name='L1554'></a> \begingroup <a id='L1555' name='L1555'></a> \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. <a id='L1556' name='L1556'></a> \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap <a id='L1557' name='L1557'></a>%%DocumentNeededResources: ProcSet (CIDInit) <a id='L1558' name='L1558'></a>%%IncludeResource: ProcSet (CIDInit) <a id='L1559' name='L1559'></a>%%BeginResource: CMap (TeX-OT1-0) <a id='L1560' name='L1560'></a>%%Title: (TeX-OT1-0 TeX OT1 0) <a id='L1561' name='L1561'></a>%%Version: 1.000 <a id='L1562' name='L1562'></a>%%EndComments <a id='L1563' name='L1563'></a>/CIDInit /ProcSet findresource begin <a id='L1564' name='L1564'></a>12 dict begin <a id='L1565' name='L1565'></a>begincmap <a id='L1566' name='L1566'></a>/CIDSystemInfo <a id='L1567' name='L1567'></a><< /Registry (TeX) <a id='L1568' name='L1568'></a>/Ordering (OT1) <a id='L1569' name='L1569'></a>/Supplement 0 <a id='L1570' name='L1570'></a>>> def <a id='L1571' name='L1571'></a>/CMapName /TeX-OT1-0 def <a id='L1572' name='L1572'></a>/CMapType 2 def <a id='L1573' name='L1573'></a>1 begincodespacerange <a id='L1574' name='L1574'></a><00> <7F> <a id='L1575' name='L1575'></a>endcodespacerange <a id='L1576' name='L1576'></a>8 beginbfrange <a id='L1577' name='L1577'></a><00> <01> <0393> <a id='L1578' name='L1578'></a><09> <0A> <03A8> <a id='L1579' name='L1579'></a><23> <26> <0023> <a id='L1580' name='L1580'></a><28> <3B> <0028> <a id='L1581' name='L1581'></a><3F> <5B> <003F> <a id='L1582' name='L1582'></a><5D> <5E> <005D> <a id='L1583' name='L1583'></a><61> <7A> <0061> <a id='L1584' name='L1584'></a><7B> <7C> <2013> <a id='L1585' name='L1585'></a>endbfrange <a id='L1586' name='L1586'></a>40 beginbfchar <a id='L1587' name='L1587'></a><02> <0398> <a id='L1588' name='L1588'></a><03> <039B> <a id='L1589' name='L1589'></a><04> <039E> <a id='L1590' name='L1590'></a><05> <03A0> <a id='L1591' name='L1591'></a><06> <03A3> <a id='L1592' name='L1592'></a><07> <03D2> <a id='L1593' name='L1593'></a><08> <03A6> <a id='L1594' name='L1594'></a><0B> <00660066> <a id='L1595' name='L1595'></a><0C> <00660069> <a id='L1596' name='L1596'></a><0D> <0066006C> <a id='L1597' name='L1597'></a><0E> <006600660069> <a id='L1598' name='L1598'></a><0F> <00660066006C> <a id='L1599' name='L1599'></a><10> <0131> <a id='L1600' name='L1600'></a><11> <0237> <a id='L1601' name='L1601'></a><12> <0060> <a id='L1602' name='L1602'></a><13> <00B4> <a id='L1603' name='L1603'></a><14> <02C7> <a id='L1604' name='L1604'></a><15> <02D8> <a id='L1605' name='L1605'></a><16> <00AF> <a id='L1606' name='L1606'></a><17> <02DA> <a id='L1607' name='L1607'></a><18> <00B8> <a id='L1608' name='L1608'></a><19> <00DF> <a id='L1609' name='L1609'></a><1A> <00E6> <a id='L1610' name='L1610'></a><1B> <0153> <a id='L1611' name='L1611'></a><1C> <00F8> <a id='L1612' name='L1612'></a><1D> <00C6> <a id='L1613' name='L1613'></a><1E> <0152> <a id='L1614' name='L1614'></a><1F> <00D8> <a id='L1615' name='L1615'></a><21> <0021> <a id='L1616' name='L1616'></a><22> <201D> <a id='L1617' name='L1617'></a><27> <2019> <a id='L1618' name='L1618'></a><3C> <00A1> <a id='L1619' name='L1619'></a><3D> <003D> <a id='L1620' name='L1620'></a><3E> <00BF> <a id='L1621' name='L1621'></a><5C> <201C> <a id='L1622' name='L1622'></a><5F> <02D9> <a id='L1623' name='L1623'></a><60> <2018> <a id='L1624' name='L1624'></a><7D> <02DD> <a id='L1625' name='L1625'></a><7E> <007E> <a id='L1626' name='L1626'></a><7F> <00A8> <a id='L1627' name='L1627'></a>endbfchar <a id='L1628' name='L1628'></a>endcmap <a id='L1629' name='L1629'></a>CMapName currentdict /CMap defineresource pop <a id='L1630' name='L1630'></a>end <a id='L1631' name='L1631'></a>end <a id='L1632' name='L1632'></a>%%EndResource <a id='L1633' name='L1633'></a>%%EOF <a id='L1634' name='L1634'></a> }\endgroup <a id='L1635' name='L1635'></a> \expandafter\edef\csname cmapOT1\endcsname#1{% <a id='L1636' name='L1636'></a> \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% <a id='L1637' name='L1637'></a> }% <a id='L1638' name='L1638'></a>% <a id='L1639' name='L1639'></a>% \cmapOT1IT <a id='L1640' name='L1640'></a> \begingroup <a id='L1641' name='L1641'></a> \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. <a id='L1642' name='L1642'></a> \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap <a id='L1643' name='L1643'></a>%%DocumentNeededResources: ProcSet (CIDInit) <a id='L1644' name='L1644'></a>%%IncludeResource: ProcSet (CIDInit) <a id='L1645' name='L1645'></a>%%BeginResource: CMap (TeX-OT1IT-0) <a id='L1646' name='L1646'></a>%%Title: (TeX-OT1IT-0 TeX OT1IT 0) <a id='L1647' name='L1647'></a>%%Version: 1.000 <a id='L1648' name='L1648'></a>%%EndComments <a id='L1649' name='L1649'></a>/CIDInit /ProcSet findresource begin <a id='L1650' name='L1650'></a>12 dict begin <a id='L1651' name='L1651'></a>begincmap <a id='L1652' name='L1652'></a>/CIDSystemInfo <a id='L1653' name='L1653'></a><< /Registry (TeX) <a id='L1654' name='L1654'></a>/Ordering (OT1IT) <a id='L1655' name='L1655'></a>/Supplement 0 <a id='L1656' name='L1656'></a>>> def <a id='L1657' name='L1657'></a>/CMapName /TeX-OT1IT-0 def <a id='L1658' name='L1658'></a>/CMapType 2 def <a id='L1659' name='L1659'></a>1 begincodespacerange <a id='L1660' name='L1660'></a><00> <7F> <a id='L1661' name='L1661'></a>endcodespacerange <a id='L1662' name='L1662'></a>8 beginbfrange <a id='L1663' name='L1663'></a><00> <01> <0393> <a id='L1664' name='L1664'></a><09> <0A> <03A8> <a id='L1665' name='L1665'></a><25> <26> <0025> <a id='L1666' name='L1666'></a><28> <3B> <0028> <a id='L1667' name='L1667'></a><3F> <5B> <003F> <a id='L1668' name='L1668'></a><5D> <5E> <005D> <a id='L1669' name='L1669'></a><61> <7A> <0061> <a id='L1670' name='L1670'></a><7B> <7C> <2013> <a id='L1671' name='L1671'></a>endbfrange <a id='L1672' name='L1672'></a>42 beginbfchar <a id='L1673' name='L1673'></a><02> <0398> <a id='L1674' name='L1674'></a><03> <039B> <a id='L1675' name='L1675'></a><04> <039E> <a id='L1676' name='L1676'></a><05> <03A0> <a id='L1677' name='L1677'></a><06> <03A3> <a id='L1678' name='L1678'></a><07> <03D2> <a id='L1679' name='L1679'></a><08> <03A6> <a id='L1680' name='L1680'></a><0B> <00660066> <a id='L1681' name='L1681'></a><0C> <00660069> <a id='L1682' name='L1682'></a><0D> <0066006C> <a id='L1683' name='L1683'></a><0E> <006600660069> <a id='L1684' name='L1684'></a><0F> <00660066006C> <a id='L1685' name='L1685'></a><10> <0131> <a id='L1686' name='L1686'></a><11> <0237> <a id='L1687' name='L1687'></a><12> <0060> <a id='L1688' name='L1688'></a><13> <00B4> <a id='L1689' name='L1689'></a><14> <02C7> <a id='L1690' name='L1690'></a><15> <02D8> <a id='L1691' name='L1691'></a><16> <00AF> <a id='L1692' name='L1692'></a><17> <02DA> <a id='L1693' name='L1693'></a><18> <00B8> <a id='L1694' name='L1694'></a><19> <00DF> <a id='L1695' name='L1695'></a><1A> <00E6> <a id='L1696' name='L1696'></a><1B> <0153> <a id='L1697' name='L1697'></a><1C> <00F8> <a id='L1698' name='L1698'></a><1D> <00C6> <a id='L1699' name='L1699'></a><1E> <0152> <a id='L1700' name='L1700'></a><1F> <00D8> <a id='L1701' name='L1701'></a><21> <0021> <a id='L1702' name='L1702'></a><22> <201D> <a id='L1703' name='L1703'></a><23> <0023> <a id='L1704' name='L1704'></a><24> <00A3> <a id='L1705' name='L1705'></a><27> <2019> <a id='L1706' name='L1706'></a><3C> <00A1> <a id='L1707' name='L1707'></a><3D> <003D> <a id='L1708' name='L1708'></a><3E> <00BF> <a id='L1709' name='L1709'></a><5C> <201C> <a id='L1710' name='L1710'></a><5F> <02D9> <a id='L1711' name='L1711'></a><60> <2018> <a id='L1712' name='L1712'></a><7D> <02DD> <a id='L1713' name='L1713'></a><7E> <007E> <a id='L1714' name='L1714'></a><7F> <00A8> <a id='L1715' name='L1715'></a>endbfchar <a id='L1716' name='L1716'></a>endcmap <a id='L1717' name='L1717'></a>CMapName currentdict /CMap defineresource pop <a id='L1718' name='L1718'></a>end <a id='L1719' name='L1719'></a>end <a id='L1720' name='L1720'></a>%%EndResource <a id='L1721' name='L1721'></a>%%EOF <a id='L1722' name='L1722'></a> }\endgroup <a id='L1723' name='L1723'></a> \expandafter\edef\csname cmapOT1IT\endcsname#1{% <a id='L1724' name='L1724'></a> \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% <a id='L1725' name='L1725'></a> }% <a id='L1726' name='L1726'></a>% <a id='L1727' name='L1727'></a>% \cmapOT1TT <a id='L1728' name='L1728'></a> \begingroup <a id='L1729' name='L1729'></a> \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. <a id='L1730' name='L1730'></a> \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap <a id='L1731' name='L1731'></a>%%DocumentNeededResources: ProcSet (CIDInit) <a id='L1732' name='L1732'></a>%%IncludeResource: ProcSet (CIDInit) <a id='L1733' name='L1733'></a>%%BeginResource: CMap (TeX-OT1TT-0) <a id='L1734' name='L1734'></a>%%Title: (TeX-OT1TT-0 TeX OT1TT 0) <a id='L1735' name='L1735'></a>%%Version: 1.000 <a id='L1736' name='L1736'></a>%%EndComments <a id='L1737' name='L1737'></a>/CIDInit /ProcSet findresource begin <a id='L1738' name='L1738'></a>12 dict begin <a id='L1739' name='L1739'></a>begincmap <a id='L1740' name='L1740'></a>/CIDSystemInfo <a id='L1741' name='L1741'></a><< /Registry (TeX) <a id='L1742' name='L1742'></a>/Ordering (OT1TT) <a id='L1743' name='L1743'></a>/Supplement 0 <a id='L1744' name='L1744'></a>>> def <a id='L1745' name='L1745'></a>/CMapName /TeX-OT1TT-0 def <a id='L1746' name='L1746'></a>/CMapType 2 def <a id='L1747' name='L1747'></a>1 begincodespacerange <a id='L1748' name='L1748'></a><00> <7F> <a id='L1749' name='L1749'></a>endcodespacerange <a id='L1750' name='L1750'></a>5 beginbfrange <a id='L1751' name='L1751'></a><00> <01> <0393> <a id='L1752' name='L1752'></a><09> <0A> <03A8> <a id='L1753' name='L1753'></a><21> <26> <0021> <a id='L1754' name='L1754'></a><28> <5F> <0028> <a id='L1755' name='L1755'></a><61> <7E> <0061> <a id='L1756' name='L1756'></a>endbfrange <a id='L1757' name='L1757'></a>32 beginbfchar <a id='L1758' name='L1758'></a><02> <0398> <a id='L1759' name='L1759'></a><03> <039B> <a id='L1760' name='L1760'></a><04> <039E> <a id='L1761' name='L1761'></a><05> <03A0> <a id='L1762' name='L1762'></a><06> <03A3> <a id='L1763' name='L1763'></a><07> <03D2> <a id='L1764' name='L1764'></a><08> <03A6> <a id='L1765' name='L1765'></a><0B> <2191> <a id='L1766' name='L1766'></a><0C> <2193> <a id='L1767' name='L1767'></a><0D> <0027> <a id='L1768' name='L1768'></a><0E> <00A1> <a id='L1769' name='L1769'></a><0F> <00BF> <a id='L1770' name='L1770'></a><10> <0131> <a id='L1771' name='L1771'></a><11> <0237> <a id='L1772' name='L1772'></a><12> <0060> <a id='L1773' name='L1773'></a><13> <00B4> <a id='L1774' name='L1774'></a><14> <02C7> <a id='L1775' name='L1775'></a><15> <02D8> <a id='L1776' name='L1776'></a><16> <00AF> <a id='L1777' name='L1777'></a><17> <02DA> <a id='L1778' name='L1778'></a><18> <00B8> <a id='L1779' name='L1779'></a><19> <00DF> <a id='L1780' name='L1780'></a><1A> <00E6> <a id='L1781' name='L1781'></a><1B> <0153> <a id='L1782' name='L1782'></a><1C> <00F8> <a id='L1783' name='L1783'></a><1D> <00C6> <a id='L1784' name='L1784'></a><1E> <0152> <a id='L1785' name='L1785'></a><1F> <00D8> <a id='L1786' name='L1786'></a><20> <2423> <a id='L1787' name='L1787'></a><27> <2019> <a id='L1788' name='L1788'></a><60> <2018> <a id='L1789' name='L1789'></a><7F> <00A8> <a id='L1790' name='L1790'></a>endbfchar <a id='L1791' name='L1791'></a>endcmap <a id='L1792' name='L1792'></a>CMapName currentdict /CMap defineresource pop <a id='L1793' name='L1793'></a>end <a id='L1794' name='L1794'></a>end <a id='L1795' name='L1795'></a>%%EndResource <a id='L1796' name='L1796'></a>%%EOF <a id='L1797' name='L1797'></a> }\endgroup <a id='L1798' name='L1798'></a> \expandafter\edef\csname cmapOT1TT\endcsname#1{% <a id='L1799' name='L1799'></a> \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% <a id='L1800' name='L1800'></a> }% <a id='L1801' name='L1801'></a>\fi\fi <a id='L1802' name='L1802'></a> <a id='L1803' name='L1803'></a> <a id='L1804' name='L1804'></a>% Set the font macro #1 to the font named \fontprefix#2. <a id='L1805' name='L1805'></a>% #3 is the font's design size, #4 is a scale factor, #5 is the CMap <a id='L1806' name='L1806'></a>% encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit). <a id='L1807' name='L1807'></a>% Example: <a id='L1808' name='L1808'></a>% #1 = \textrm <a id='L1809' name='L1809'></a>% #2 = \rmshape <a id='L1810' name='L1810'></a>% #3 = 10 <a id='L1811' name='L1811'></a>% #4 = \mainmagstep <a id='L1812' name='L1812'></a>% #5 = OT1 <a id='L1813' name='L1813'></a>% <a id='L1814' name='L1814'></a>\def\setfont#1#2#3#4#5{% <a id='L1815' name='L1815'></a> \font#1=\fontprefix#2#3 scaled #4 <a id='L1816' name='L1816'></a> \csname cmap#5\endcsname#1% <a id='L1817' name='L1817'></a>} <a id='L1818' name='L1818'></a>% This is what gets called when #5 of \setfont is empty. <a id='L1819' name='L1819'></a>\let\cmap\gobble <a id='L1820' name='L1820'></a>% <a id='L1821' name='L1821'></a>% (end of cmaps) <a id='L1822' name='L1822'></a> <a id='L1823' name='L1823'></a>% Use cm as the default font prefix. <a id='L1824' name='L1824'></a>% To specify the font prefix, you must define \fontprefix <a id='L1825' name='L1825'></a>% before you read in texinfo.tex. <a id='L1826' name='L1826'></a>\ifx\fontprefix\thisisundefined <a id='L1827' name='L1827'></a>\def\fontprefix{cm} <a id='L1828' name='L1828'></a>\fi <a id='L1829' name='L1829'></a>% Support font families that don't use the same naming scheme as CM. <a id='L1830' name='L1830'></a>\def\rmshape{r} <a id='L1831' name='L1831'></a>\def\rmbshape{bx} % where the normal face is bold <a id='L1832' name='L1832'></a>\def\bfshape{b} <a id='L1833' name='L1833'></a>\def\bxshape{bx} <a id='L1834' name='L1834'></a>\def\ttshape{tt} <a id='L1835' name='L1835'></a>\def\ttbshape{tt} <a id='L1836' name='L1836'></a>\def\ttslshape{sltt} <a id='L1837' name='L1837'></a>\def\itshape{ti} <a id='L1838' name='L1838'></a>\def\itbshape{bxti} <a id='L1839' name='L1839'></a>\def\slshape{sl} <a id='L1840' name='L1840'></a>\def\slbshape{bxsl} <a id='L1841' name='L1841'></a>\def\sfshape{ss} <a id='L1842' name='L1842'></a>\def\sfbshape{ss} <a id='L1843' name='L1843'></a>\def\scshape{csc} <a id='L1844' name='L1844'></a>\def\scbshape{csc} <a id='L1845' name='L1845'></a> <a id='L1846' name='L1846'></a>% Definitions for a main text size of 11pt. (The default in Texinfo.) <a id='L1847' name='L1847'></a>% <a id='L1848' name='L1848'></a>\def\definetextfontsizexi{% <a id='L1849' name='L1849'></a>% Text fonts (11.2pt, magstep1). <a id='L1850' name='L1850'></a>\def\textnominalsize{11pt} <a id='L1851' name='L1851'></a>\edef\mainmagstep{\magstephalf} <a id='L1852' name='L1852'></a>\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} <a id='L1853' name='L1853'></a>\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} <a id='L1854' name='L1854'></a>\ifpTeX <a id='L1855' name='L1855'></a>\font\textmc=min10 scaled \mainmagstep <a id='L1856' name='L1856'></a>\font\textgt=goth10 scaled \mainmagstep <a id='L1857' name='L1857'></a>\fi <a id='L1858' name='L1858'></a>\ifjTeX <a id='L1859' name='L1859'></a>\jfont\textmc=dm10 scaled \mainmagstep <a id='L1860' name='L1860'></a>\jfont\textgt=dg10 scaled \mainmagstep <a id='L1861' name='L1861'></a>\fi <a id='L1862' name='L1862'></a>\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} <a id='L1863' name='L1863'></a>\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} <a id='L1864' name='L1864'></a>\setfont\textsl\slshape{10}{\mainmagstep}{OT1} <a id='L1865' name='L1865'></a>\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} <a id='L1866' name='L1866'></a>\setfont\textsc\scshape{10}{\mainmagstep}{OT1} <a id='L1867' name='L1867'></a>\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} <a id='L1868' name='L1868'></a>\font\texti=cmmi10 scaled \mainmagstep <a id='L1869' name='L1869'></a>\font\textsy=cmsy10 scaled \mainmagstep <a id='L1870' name='L1870'></a>\def\textecsize{1095} <a id='L1871' name='L1871'></a> <a id='L1872' name='L1872'></a>% A few fonts for @defun names and args. <a id='L1873' name='L1873'></a>\ifpTeX <a id='L1874' name='L1874'></a>\setfont\defbf\bfshape{10}{\magstep1}{OT1} <a id='L1875' name='L1875'></a>\setfont\deftt\ttshape{10}{\magstep1}{OT1TT} <a id='L1876' name='L1876'></a>\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} <a id='L1877' name='L1877'></a>\font\defmc=min10 scaled \magstep1 <a id='L1878' name='L1878'></a>\font\defgt=goth10 scaled \magstep1 <a id='L1879' name='L1879'></a>\def\df{\let\tentt=\deftt \let\tenmin=\defmc <a id='L1880' name='L1880'></a>\let\tengt=\defgt \let\tenbf=\defbf \let\tenttsl=\defttsl \bf} <a id='L1881' name='L1881'></a>\else\ifjTeX <a id='L1882' name='L1882'></a>\setfont\defbf\bfshape{10}{\magstep1}{OT1} <a id='L1883' name='L1883'></a>\setfont\deftt\ttshape{10}{\magstep1}{OT1TT} <a id='L1884' name='L1884'></a>\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} <a id='L1885' name='L1885'></a>\jfont\defmc=dm10 scaled \magstep1 <a id='L1886' name='L1886'></a>\jfont\defgt=dg10 scaled \magstep1 <a id='L1887' name='L1887'></a>\def\df{\let\tentt=\deftt \let\tenmin=\defmc <a id='L1888' name='L1888'></a>\let\tengt=\defgt\let\tenbf=\defbf \let\tenttsl=\defttsl \bf} <a id='L1889' name='L1889'></a>\else <a id='L1890' name='L1890'></a>\setfont\defbf\bfshape{10}{\magstep1}{OT1} <a id='L1891' name='L1891'></a>\setfont\deftt\ttshape{10}{\magstep1}{OT1TT} <a id='L1892' name='L1892'></a>\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} <a id='L1893' name='L1893'></a>\def\df{\let\tentt=\deftt \let\tenbf=\defbf \let\tenttsl=\defttsl \bf} <a id='L1894' name='L1894'></a>\fi\fi <a id='L1895' name='L1895'></a> <a id='L1896' name='L1896'></a>% Fonts for indices, footnotes, small examples (9pt). <a id='L1897' name='L1897'></a>\def\smallnominalsize{9pt} <a id='L1898' name='L1898'></a>\setfont\smallrm\rmshape{9}{1000}{OT1} <a id='L1899' name='L1899'></a>\setfont\smalltt\ttshape{9}{1000}{OT1TT} <a id='L1900' name='L1900'></a>\setfont\smallbf\bfshape{10}{900}{OT1} <a id='L1901' name='L1901'></a>\setfont\smallit\itshape{9}{1000}{OT1IT} <a id='L1902' name='L1902'></a>\setfont\smallsl\slshape{9}{1000}{OT1} <a id='L1903' name='L1903'></a>\setfont\smallsf\sfshape{9}{1000}{OT1} <a id='L1904' name='L1904'></a>\setfont\smallsc\scshape{10}{900}{OT1} <a id='L1905' name='L1905'></a>\setfont\smallttsl\ttslshape{10}{900}{OT1TT} <a id='L1906' name='L1906'></a>\font\smalli=cmmi9 <a id='L1907' name='L1907'></a>\font\smallsy=cmsy9 <a id='L1908' name='L1908'></a>\ifpTeX <a id='L1909' name='L1909'></a>\font\smallmc=min9 <a id='L1910' name='L1910'></a>\font\smallgt=goth9 <a id='L1911' name='L1911'></a>\fi <a id='L1912' name='L1912'></a>\ifjTeX <a id='L1913' name='L1913'></a>\jfont\smallmc=dm9 <a id='L1914' name='L1914'></a>\jfont\smallgt=dg9 <a id='L1915' name='L1915'></a>\fi <a id='L1916' name='L1916'></a>\def\smallecsize{0900} <a id='L1917' name='L1917'></a> <a id='L1918' name='L1918'></a>% Fonts for small examples (8pt). <a id='L1919' name='L1919'></a>\def\smallernominalsize{8pt} <a id='L1920' name='L1920'></a>\setfont\smallerrm\rmshape{8}{1000}{OT1} <a id='L1921' name='L1921'></a>\setfont\smallertt\ttshape{8}{1000}{OT1TT} <a id='L1922' name='L1922'></a>\setfont\smallerbf\bfshape{10}{800}{OT1} <a id='L1923' name='L1923'></a>\setfont\smallerit\itshape{8}{1000}{OT1IT} <a id='L1924' name='L1924'></a>\setfont\smallersl\slshape{8}{1000}{OT1} <a id='L1925' name='L1925'></a>\setfont\smallersf\sfshape{8}{1000}{OT1} <a id='L1926' name='L1926'></a>\setfont\smallersc\scshape{10}{800}{OT1} <a id='L1927' name='L1927'></a>\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} <a id='L1928' name='L1928'></a>\font\smalleri=cmmi8 <a id='L1929' name='L1929'></a>\font\smallersy=cmsy8 <a id='L1930' name='L1930'></a>\ifpTeX <a id='L1931' name='L1931'></a>\font\smallermc=min8 <a id='L1932' name='L1932'></a>\font\smallergt=goth8 <a id='L1933' name='L1933'></a>\fi <a id='L1934' name='L1934'></a>\ifjTeX <a id='L1935' name='L1935'></a>\jfont\smallermc=dm8 <a id='L1936' name='L1936'></a>\jfont\smallergt=dg8 <a id='L1937' name='L1937'></a>\fi <a id='L1938' name='L1938'></a>\def\smallerecsize{0800} <a id='L1939' name='L1939'></a> <a id='L1940' name='L1940'></a>% Fonts for title page (20.4pt): <a id='L1941' name='L1941'></a>\def\titlenominalsize{20pt} <a id='L1942' name='L1942'></a>\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} <a id='L1943' name='L1943'></a>\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} <a id='L1944' name='L1944'></a>\setfont\titlesl\slbshape{10}{\magstep4}{OT1} <a id='L1945' name='L1945'></a>\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} <a id='L1946' name='L1946'></a>\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} <a id='L1947' name='L1947'></a>\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} <a id='L1948' name='L1948'></a>\ifpTeX <a id='L1949' name='L1949'></a>\font\titlemc=min10 scaled \magstep4 <a id='L1950' name='L1950'></a>\font\titlegt=goth10 scaled \magstep4 <a id='L1951' name='L1951'></a>\fi <a id='L1952' name='L1952'></a>\ifjTeX <a id='L1953' name='L1953'></a>\jfont\titlemc=dm10 scaled \magstep4 <a id='L1954' name='L1954'></a>\jfont\titlegt=dg10 scaled \magstep4 <a id='L1955' name='L1955'></a>\fi <a id='L1956' name='L1956'></a>\let\titlebf=\titlerm <a id='L1957' name='L1957'></a>\setfont\titlesc\scbshape{10}{\magstep4}{OT1} <a id='L1958' name='L1958'></a>\font\titlei=cmmi12 scaled \magstep3 <a id='L1959' name='L1959'></a>\font\titlesy=cmsy10 scaled \magstep4 <a id='L1960' name='L1960'></a>\def\titleecsize{2074} <a id='L1961' name='L1961'></a> <a id='L1962' name='L1962'></a>% Chapter (and unnumbered) fonts (17.28pt). <a id='L1963' name='L1963'></a>\def\chapnominalsize{17pt} <a id='L1964' name='L1964'></a>\setfont\chaprm\rmbshape{12}{\magstep2}{OT1} <a id='L1965' name='L1965'></a>\setfont\chapit\itbshape{10}{\magstep3}{OT1IT} <a id='L1966' name='L1966'></a>\setfont\chapsl\slbshape{10}{\magstep3}{OT1} <a id='L1967' name='L1967'></a>\setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} <a id='L1968' name='L1968'></a>\setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} <a id='L1969' name='L1969'></a>\setfont\chapsf\sfbshape{17}{1000}{OT1} <a id='L1970' name='L1970'></a>\ifpTeX <a id='L1971' name='L1971'></a>\font\chapmc=min10 scaled \magstep3 <a id='L1972' name='L1972'></a>\font\chapgt=goth10 scaled \magstep3 <a id='L1973' name='L1973'></a>\fi <a id='L1974' name='L1974'></a>\ifjTeX <a id='L1975' name='L1975'></a>\jfont\chapmc=dm10 scaled \magstep3 <a id='L1976' name='L1976'></a>\jfont\chapgt=dg10 scaled \magstep3 <a id='L1977' name='L1977'></a>\fi <a id='L1978' name='L1978'></a>\let\chapbf=\chaprm <a id='L1979' name='L1979'></a>\setfont\chapsc\scbshape{10}{\magstep3}{OT1} <a id='L1980' name='L1980'></a>\font\chapi=cmmi12 scaled \magstep2 <a id='L1981' name='L1981'></a>\font\chapsy=cmsy10 scaled \magstep3 <a id='L1982' name='L1982'></a>\def\chapecsize{1728} <a id='L1983' name='L1983'></a> <a id='L1984' name='L1984'></a>% Section fonts (14.4pt). <a id='L1985' name='L1985'></a>\def\secnominalsize{14pt} <a id='L1986' name='L1986'></a>\setfont\secrm\rmbshape{12}{\magstep1}{OT1} <a id='L1987' name='L1987'></a>\setfont\secit\itbshape{10}{\magstep2}{OT1IT} <a id='L1988' name='L1988'></a>\setfont\secsl\slbshape{10}{\magstep2}{OT1} <a id='L1989' name='L1989'></a>\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} <a id='L1990' name='L1990'></a>\setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} <a id='L1991' name='L1991'></a>\setfont\secsf\sfbshape{12}{\magstep1}{OT1} <a id='L1992' name='L1992'></a>\ifpTeX <a id='L1993' name='L1993'></a>\font\secmc=min10 scaled \magstep2 <a id='L1994' name='L1994'></a>\font\secgt=goth10 scaled \magstep2 <a id='L1995' name='L1995'></a>\fi <a id='L1996' name='L1996'></a>\ifjTeX <a id='L1997' name='L1997'></a>\jfont\secmc=dm10 scaled \magstep2 <a id='L1998' name='L1998'></a>\jfont\secgt=dg10 scaled \magstep2 <a id='L1999' name='L1999'></a>\fi <a id='L2000' name='L2000'></a>\let\secbf\secrm <a id='L2001' name='L2001'></a>\setfont\secsc\scbshape{10}{\magstep2}{OT1} <a id='L2002' name='L2002'></a>\font\seci=cmmi12 scaled \magstep1 <a id='L2003' name='L2003'></a>\font\secsy=cmsy10 scaled \magstep2 <a id='L2004' name='L2004'></a>\def\sececsize{1440} <a id='L2005' name='L2005'></a> <a id='L2006' name='L2006'></a>% Subsection fonts (13.15pt). <a id='L2007' name='L2007'></a>\def\ssecnominalsize{13pt} <a id='L2008' name='L2008'></a>\setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} <a id='L2009' name='L2009'></a>\setfont\ssecit\itbshape{10}{1315}{OT1IT} <a id='L2010' name='L2010'></a>\setfont\ssecsl\slbshape{10}{1315}{OT1} <a id='L2011' name='L2011'></a>\setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} <a id='L2012' name='L2012'></a>\setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} <a id='L2013' name='L2013'></a>\setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} <a id='L2014' name='L2014'></a>\ifpTeX <a id='L2015' name='L2015'></a>\font\ssecmc=min10 scaled 1315 <a id='L2016' name='L2016'></a>\font\ssecgt=goth10 scaled 1315 <a id='L2017' name='L2017'></a>\fi <a id='L2018' name='L2018'></a>\ifjTeX <a id='L2019' name='L2019'></a>\jfont\ssecmc=dm10 scaled 1315 <a id='L2020' name='L2020'></a>\jfont\ssecgt=dg10 scaled 1315 <a id='L2021' name='L2021'></a>\fi <a id='L2022' name='L2022'></a>\let\ssecbf\ssecrm <a id='L2023' name='L2023'></a>\setfont\ssecsc\scbshape{10}{1315}{OT1} <a id='L2024' name='L2024'></a>\font\sseci=cmmi12 scaled \magstephalf <a id='L2025' name='L2025'></a>\font\ssecsy=cmsy10 scaled 1315 <a id='L2026' name='L2026'></a>\def\ssececsize{1200} <a id='L2027' name='L2027'></a> <a id='L2028' name='L2028'></a>% Reduced fonts for @acro in text (10pt). <a id='L2029' name='L2029'></a>\def\reducednominalsize{10pt} <a id='L2030' name='L2030'></a>\setfont\reducedrm\rmshape{10}{1000}{OT1} <a id='L2031' name='L2031'></a>\setfont\reducedtt\ttshape{10}{1000}{OT1TT} <a id='L2032' name='L2032'></a>\setfont\reducedbf\bfshape{10}{1000}{OT1} <a id='L2033' name='L2033'></a>\setfont\reducedit\itshape{10}{1000}{OT1IT} <a id='L2034' name='L2034'></a>\setfont\reducedsl\slshape{10}{1000}{OT1} <a id='L2035' name='L2035'></a>\setfont\reducedsf\sfshape{10}{1000}{OT1} <a id='L2036' name='L2036'></a>\setfont\reducedsc\scshape{10}{1000}{OT1} <a id='L2037' name='L2037'></a>\setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} <a id='L2038' name='L2038'></a>\font\reducedi=cmmi10 <a id='L2039' name='L2039'></a>\font\reducedsy=cmsy10 <a id='L2040' name='L2040'></a>\ifpTeX <a id='L2041' name='L2041'></a>\font\reducedmc=min10 <a id='L2042' name='L2042'></a>\font\reducedgt=goth10 <a id='L2043' name='L2043'></a>\fi <a id='L2044' name='L2044'></a>\ifjTeX <a id='L2045' name='L2045'></a>\jfont\reducedmc=dm10 <a id='L2046' name='L2046'></a>\jfont\reducedgt=dg10 <a id='L2047' name='L2047'></a>\fi <a id='L2048' name='L2048'></a>\def\reducedecsize{1000} <a id='L2049' name='L2049'></a> <a id='L2050' name='L2050'></a>\textleading = 13.2pt % line spacing for 11pt CM <a id='L2051' name='L2051'></a>\textfonts % reset the current fonts <a id='L2052' name='L2052'></a>\rm <a id='L2053' name='L2053'></a>} % end of 11pt text font size definitions, \definetextfontsizexi <a id='L2054' name='L2054'></a> <a id='L2055' name='L2055'></a> <a id='L2056' name='L2056'></a>% Definitions to make the main text be 10pt Computer Modern, with <a id='L2057' name='L2057'></a>% section, chapter, etc., sizes following suit. This is for the GNU <a id='L2058' name='L2058'></a>% Press printing of the Emacs 22 manual. Maybe other manuals in the <a id='L2059' name='L2059'></a>% future. Used with @smallbook, which sets the leading to 12pt. <a id='L2060' name='L2060'></a>% <a id='L2061' name='L2061'></a>\def\definetextfontsizex{% <a id='L2062' name='L2062'></a>% Text fonts (10pt). <a id='L2063' name='L2063'></a>\def\textnominalsize{10pt} <a id='L2064' name='L2064'></a>\edef\mainmagstep{1000} <a id='L2065' name='L2065'></a>\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} <a id='L2066' name='L2066'></a>\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} <a id='L2067' name='L2067'></a>\ifpTeX <a id='L2068' name='L2068'></a>\font\textmc=min10 scaled \mainmagstep <a id='L2069' name='L2069'></a>\font\textgt=goth10 scaled \mainmagstep <a id='L2070' name='L2070'></a>\fi <a id='L2071' name='L2071'></a>\ifjTeX <a id='L2072' name='L2072'></a>\jfont\textmc=dm10 scaled \mainmagstep <a id='L2073' name='L2073'></a>\jfont\textgt=dg10 scaled \mainmagstep <a id='L2074' name='L2074'></a>\fi <a id='L2075' name='L2075'></a>\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} <a id='L2076' name='L2076'></a>\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} <a id='L2077' name='L2077'></a>\setfont\textsl\slshape{10}{\mainmagstep}{OT1} <a id='L2078' name='L2078'></a>\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} <a id='L2079' name='L2079'></a>\setfont\textsc\scshape{10}{\mainmagstep}{OT1} <a id='L2080' name='L2080'></a>\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} <a id='L2081' name='L2081'></a>\font\texti=cmmi10 scaled \mainmagstep <a id='L2082' name='L2082'></a>\font\textsy=cmsy10 scaled \mainmagstep <a id='L2083' name='L2083'></a>\def\textecsize{1000} <a id='L2084' name='L2084'></a> <a id='L2085' name='L2085'></a>% A few fonts for @defun names and args. <a id='L2086' name='L2086'></a>\ifpTeX <a id='L2087' name='L2087'></a>\setfont\defbf\bfshape{10}{\magstephalf}{OT1} <a id='L2088' name='L2088'></a>\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} <a id='L2089' name='L2089'></a>\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} <a id='L2090' name='L2090'></a>\font\defmc=min10 scaled \magstephalf <a id='L2091' name='L2091'></a>\font\defgt=goth10 scaled \magstephalf <a id='L2092' name='L2092'></a>\def\df{\let\tentt=\deftt \let\tenmin=\defmc <a id='L2093' name='L2093'></a>\let\tengt=\defgt \let\tenbf=\defbf \let\tenttsl=\defttsl \bf} <a id='L2094' name='L2094'></a>\else\ifjTeX <a id='L2095' name='L2095'></a>\setfont\defbf\bfshape{10}{\magstephalf}{OT1} <a id='L2096' name='L2096'></a>\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} <a id='L2097' name='L2097'></a>\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} <a id='L2098' name='L2098'></a>\jfont\defmc=dm10 scaled \magstephalf <a id='L2099' name='L2099'></a>\jfont\defgt=dg10 scaled \magstephalf <a id='L2100' name='L2100'></a>\def\df{\let\tentt=\deftt \let\tenmin=\defmc <a id='L2101' name='L2101'></a>\let\tengt=\defgt \let\tenbf=\defbf \let\tenttsl=\defttsl \bf} <a id='L2102' name='L2102'></a>\else <a id='L2103' name='L2103'></a>\setfont\defbf\bfshape{10}{\magstephalf}{OT1} <a id='L2104' name='L2104'></a>\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} <a id='L2105' name='L2105'></a>\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} <a id='L2106' name='L2106'></a>\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} <a id='L2107' name='L2107'></a>\fi\fi <a id='L2108' name='L2108'></a> <a id='L2109' name='L2109'></a>% Fonts for indices, footnotes, small examples (9pt). <a id='L2110' name='L2110'></a>\def\smallnominalsize{9pt} <a id='L2111' name='L2111'></a>\setfont\smallrm\rmshape{9}{1000}{OT1} <a id='L2112' name='L2112'></a>\setfont\smalltt\ttshape{9}{1000}{OT1TT} <a id='L2113' name='L2113'></a>\setfont\smallbf\bfshape{10}{900}{OT1} <a id='L2114' name='L2114'></a>\setfont\smallit\itshape{9}{1000}{OT1IT} <a id='L2115' name='L2115'></a>\setfont\smallsl\slshape{9}{1000}{OT1} <a id='L2116' name='L2116'></a>\setfont\smallsf\sfshape{9}{1000}{OT1} <a id='L2117' name='L2117'></a>\setfont\smallsc\scshape{10}{900}{OT1} <a id='L2118' name='L2118'></a>\setfont\smallttsl\ttslshape{10}{900}{OT1TT} <a id='L2119' name='L2119'></a>\font\smalli=cmmi9 <a id='L2120' name='L2120'></a>\font\smallsy=cmsy9 <a id='L2121' name='L2121'></a>\ifpTeX <a id='L2122' name='L2122'></a>\font\smallmc=min9 <a id='L2123' name='L2123'></a>\font\smallgt=goth9 <a id='L2124' name='L2124'></a>\fi <a id='L2125' name='L2125'></a>\ifjTeX <a id='L2126' name='L2126'></a>\jfont\smallmc=dm9 <a id='L2127' name='L2127'></a>\jfont\smallgt=dg9 <a id='L2128' name='L2128'></a>\fi <a id='L2129' name='L2129'></a>\def\smallecsize{0900} <a id='L2130' name='L2130'></a> <a id='L2131' name='L2131'></a>% Fonts for small examples (8pt). <a id='L2132' name='L2132'></a>\def\smallernominalsize{8pt} <a id='L2133' name='L2133'></a>\setfont\smallerrm\rmshape{8}{1000}{OT1} <a id='L2134' name='L2134'></a>\setfont\smallertt\ttshape{8}{1000}{OT1TT} <a id='L2135' name='L2135'></a>\setfont\smallerbf\bfshape{10}{800}{OT1} <a id='L2136' name='L2136'></a>\setfont\smallerit\itshape{8}{1000}{OT1IT} <a id='L2137' name='L2137'></a>\setfont\smallersl\slshape{8}{1000}{OT1} <a id='L2138' name='L2138'></a>\setfont\smallersf\sfshape{8}{1000}{OT1} <a id='L2139' name='L2139'></a>\setfont\smallersc\scshape{10}{800}{OT1} <a id='L2140' name='L2140'></a>\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} <a id='L2141' name='L2141'></a>\font\smalleri=cmmi8 <a id='L2142' name='L2142'></a>\font\smallersy=cmsy8 <a id='L2143' name='L2143'></a>\ifpTeX <a id='L2144' name='L2144'></a>\font\smallermc=min8 <a id='L2145' name='L2145'></a>\font\smallergt=goth8 <a id='L2146' name='L2146'></a>\fi <a id='L2147' name='L2147'></a>\ifjTeX <a id='L2148' name='L2148'></a>\jfont\smallermc=dm8 <a id='L2149' name='L2149'></a>\jfont\smallergt=dg8 <a id='L2150' name='L2150'></a>\fi <a id='L2151' name='L2151'></a>\def\smallerecsize{0800} <a id='L2152' name='L2152'></a> <a id='L2153' name='L2153'></a>% Fonts for title page (20.4pt): <a id='L2154' name='L2154'></a>\def\titlenominalsize{20pt} <a id='L2155' name='L2155'></a>\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} <a id='L2156' name='L2156'></a>\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} <a id='L2157' name='L2157'></a>\setfont\titlesl\slbshape{10}{\magstep4}{OT1} <a id='L2158' name='L2158'></a>\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} <a id='L2159' name='L2159'></a>\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} <a id='L2160' name='L2160'></a>\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} <a id='L2161' name='L2161'></a>\ifpTeX <a id='L2162' name='L2162'></a>\font\titlemc=min10 scaled \magstep4 <a id='L2163' name='L2163'></a>\font\titlegt=goth10 scaled \magstep4 <a id='L2164' name='L2164'></a>\fi <a id='L2165' name='L2165'></a>\ifjTeX <a id='L2166' name='L2166'></a>\jfont\titlemc=dm10 scaled \magstep4 <a id='L2167' name='L2167'></a>\jfont\titlegt=dg10 scaled \magstep4 <a id='L2168' name='L2168'></a>\fi <a id='L2169' name='L2169'></a>\let\titlebf=\titlerm <a id='L2170' name='L2170'></a>\setfont\titlesc\scbshape{10}{\magstep4}{OT1} <a id='L2171' name='L2171'></a>\font\titlei=cmmi12 scaled \magstep3 <a id='L2172' name='L2172'></a>\font\titlesy=cmsy10 scaled \magstep4 <a id='L2173' name='L2173'></a>\def\titleecsize{2074} <a id='L2174' name='L2174'></a> <a id='L2175' name='L2175'></a>% Chapter fonts (14.4pt). <a id='L2176' name='L2176'></a>\def\chapnominalsize{14pt} <a id='L2177' name='L2177'></a>\setfont\chaprm\rmbshape{12}{\magstep1}{OT1} <a id='L2178' name='L2178'></a>\setfont\chapit\itbshape{10}{\magstep2}{OT1IT} <a id='L2179' name='L2179'></a>\setfont\chapsl\slbshape{10}{\magstep2}{OT1} <a id='L2180' name='L2180'></a>\setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} <a id='L2181' name='L2181'></a>\setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} <a id='L2182' name='L2182'></a>\setfont\chapsf\sfbshape{12}{\magstep1}{OT1} <a id='L2183' name='L2183'></a>\ifpTeX <a id='L2184' name='L2184'></a>\font\chapmc=min10 scaled \magstep2 <a id='L2185' name='L2185'></a>\font\chapgt=goth10 scaled \magstep2 <a id='L2186' name='L2186'></a>\fi <a id='L2187' name='L2187'></a>\ifjTeX <a id='L2188' name='L2188'></a>\jfont\chapmc=dm10 scaled \magstep2 <a id='L2189' name='L2189'></a>\jfont\chapgt=dg10 scaled \magstep2 <a id='L2190' name='L2190'></a>\fi <a id='L2191' name='L2191'></a>\let\chapbf\chaprm <a id='L2192' name='L2192'></a>\setfont\chapsc\scbshape{10}{\magstep2}{OT1} <a id='L2193' name='L2193'></a>\font\chapi=cmmi12 scaled \magstep1 <a id='L2194' name='L2194'></a>\font\chapsy=cmsy10 scaled \magstep2 <a id='L2195' name='L2195'></a>\def\chapecsize{1440} <a id='L2196' name='L2196'></a> <a id='L2197' name='L2197'></a>% Section fonts (12pt). <a id='L2198' name='L2198'></a>\def\secnominalsize{12pt} <a id='L2199' name='L2199'></a>\setfont\secrm\rmbshape{12}{1000}{OT1} <a id='L2200' name='L2200'></a>\setfont\secit\itbshape{10}{\magstep1}{OT1IT} <a id='L2201' name='L2201'></a>\setfont\secsl\slbshape{10}{\magstep1}{OT1} <a id='L2202' name='L2202'></a>\setfont\sectt\ttbshape{12}{1000}{OT1TT} <a id='L2203' name='L2203'></a>\setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} <a id='L2204' name='L2204'></a>\setfont\secsf\sfbshape{12}{1000}{OT1} <a id='L2205' name='L2205'></a>\ifpTeX <a id='L2206' name='L2206'></a>\font\secmc=min10 scaled \magstep1 <a id='L2207' name='L2207'></a>\font\secgt=goth10 scaled \magstep1 <a id='L2208' name='L2208'></a>\fi <a id='L2209' name='L2209'></a>\ifjTeX <a id='L2210' name='L2210'></a>\jfont\secmc=dm10 scaled \magstep1 <a id='L2211' name='L2211'></a>\jfont\secgt=dg10 scaled \magstep1 <a id='L2212' name='L2212'></a>\fi <a id='L2213' name='L2213'></a>\let\secbf\secrm <a id='L2214' name='L2214'></a>\setfont\secsc\scbshape{10}{\magstep1}{OT1} <a id='L2215' name='L2215'></a>\font\seci=cmmi12 <a id='L2216' name='L2216'></a>\font\secsy=cmsy10 scaled \magstep1 <a id='L2217' name='L2217'></a>\def\sececsize{1200} <a id='L2218' name='L2218'></a> <a id='L2219' name='L2219'></a>% Subsection fonts (10pt). <a id='L2220' name='L2220'></a>\def\ssecnominalsize{10pt} <a id='L2221' name='L2221'></a>\setfont\ssecrm\rmbshape{10}{1000}{OT1} <a id='L2222' name='L2222'></a>\setfont\ssecit\itbshape{10}{1000}{OT1IT} <a id='L2223' name='L2223'></a>\setfont\ssecsl\slbshape{10}{1000}{OT1} <a id='L2224' name='L2224'></a>\setfont\ssectt\ttbshape{10}{1000}{OT1TT} <a id='L2225' name='L2225'></a>\setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} <a id='L2226' name='L2226'></a>\setfont\ssecsf\sfbshape{10}{1000}{OT1} <a id='L2227' name='L2227'></a>\ifpTeX <a id='L2228' name='L2228'></a>\font\ssecmc=min10 <a id='L2229' name='L2229'></a>\font\ssecgt=goth10 <a id='L2230' name='L2230'></a>\fi <a id='L2231' name='L2231'></a>\ifjTeX <a id='L2232' name='L2232'></a>\jfont\ssecmc=dm10 <a id='L2233' name='L2233'></a>\jfont\ssecgt=dg10 <a id='L2234' name='L2234'></a>\fi <a id='L2235' name='L2235'></a>\let\ssecbf\ssecrm <a id='L2236' name='L2236'></a>\setfont\ssecsc\scbshape{10}{1000}{OT1} <a id='L2237' name='L2237'></a>\font\sseci=cmmi10 <a id='L2238' name='L2238'></a>\font\ssecsy=cmsy10 <a id='L2239' name='L2239'></a>\def\ssececsize{1000} <a id='L2240' name='L2240'></a> <a id='L2241' name='L2241'></a>% Reduced fonts for @acro in text (9pt). <a id='L2242' name='L2242'></a>\def\reducednominalsize{9pt} <a id='L2243' name='L2243'></a>\setfont\reducedrm\rmshape{9}{1000}{OT1} <a id='L2244' name='L2244'></a>\setfont\reducedtt\ttshape{9}{1000}{OT1TT} <a id='L2245' name='L2245'></a>\setfont\reducedbf\bfshape{10}{900}{OT1} <a id='L2246' name='L2246'></a>\setfont\reducedit\itshape{9}{1000}{OT1IT} <a id='L2247' name='L2247'></a>\setfont\reducedsl\slshape{9}{1000}{OT1} <a id='L2248' name='L2248'></a>\setfont\reducedsf\sfshape{9}{1000}{OT1} <a id='L2249' name='L2249'></a>\setfont\reducedsc\scshape{10}{900}{OT1} <a id='L2250' name='L2250'></a>\setfont\reducedttsl\ttslshape{10}{900}{OT1TT} <a id='L2251' name='L2251'></a>\font\reducedi=cmmi9 <a id='L2252' name='L2252'></a>\font\reducedsy=cmsy9 <a id='L2253' name='L2253'></a>\ifpTeX <a id='L2254' name='L2254'></a>\font\reducedmc=min9 <a id='L2255' name='L2255'></a>\font\reducedgt=goth9 <a id='L2256' name='L2256'></a>\fi <a id='L2257' name='L2257'></a>\ifjTeX <a id='L2258' name='L2258'></a>\jfont\reducedmc=dm9 <a id='L2259' name='L2259'></a>\jfont\reducedgt=dg9 <a id='L2260' name='L2260'></a>\fi <a id='L2261' name='L2261'></a>\def\reducedecsize{0900} <a id='L2262' name='L2262'></a> <a id='L2263' name='L2263'></a>\divide\parskip by 2 % reduce space between paragraphs <a id='L2264' name='L2264'></a>\textleading = 12pt % line spacing for 10pt CM <a id='L2265' name='L2265'></a>\textfonts % reset the current fonts <a id='L2266' name='L2266'></a>\rm <a id='L2267' name='L2267'></a>} % end of 10pt text font size definitions, \definetextfontsizex <a id='L2268' name='L2268'></a> <a id='L2269' name='L2269'></a> <a id='L2270' name='L2270'></a>% We provide the user-level command <a id='L2271' name='L2271'></a>% @fonttextsize 10 <a id='L2272' name='L2272'></a>% (or 11) to redefine the text font size. pt is assumed. <a id='L2273' name='L2273'></a>% <a id='L2274' name='L2274'></a>\def\xiword{11} <a id='L2275' name='L2275'></a>\def\xword{10} <a id='L2276' name='L2276'></a>\def\xwordpt{10pt} <a id='L2277' name='L2277'></a>% <a id='L2278' name='L2278'></a>\parseargdef\fonttextsize{% <a id='L2279' name='L2279'></a> \def\textsizearg{#1}% <a id='L2280' name='L2280'></a> %\wlog{doing @fonttextsize \textsizearg}% <a id='L2281' name='L2281'></a> % <a id='L2282' name='L2282'></a> % Set \globaldefs so that documents can use this inside @tex, since <a id='L2283' name='L2283'></a> % makeinfo 4.8 does not support it, but we need it nonetheless. <a id='L2284' name='L2284'></a> % <a id='L2285' name='L2285'></a> \begingroup \globaldefs=1 <a id='L2286' name='L2286'></a> \ifx\textsizearg\xword \definetextfontsizex <a id='L2287' name='L2287'></a> \else \ifx\textsizearg\xiword \definetextfontsizexi <a id='L2288' name='L2288'></a> \else <a id='L2289' name='L2289'></a> \errhelp=\EMsimple <a id='L2290' name='L2290'></a> \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} <a id='L2291' name='L2291'></a> \fi\fi <a id='L2292' name='L2292'></a> \endgroup <a id='L2293' name='L2293'></a>} <a id='L2294' name='L2294'></a> <a id='L2295' name='L2295'></a> <a id='L2296' name='L2296'></a>% In order for the font changes to affect most math symbols and letters, <a id='L2297' name='L2297'></a>% we have to define the \textfont of the standard families. Since <a id='L2298' name='L2298'></a>% texinfo doesn't allow for producing subscripts and superscripts except <a id='L2299' name='L2299'></a>% in the main text, we don't bother to reset \scriptfont and <a id='L2300' name='L2300'></a>% \scriptscriptfont (which would also require loading a lot more fonts). <a id='L2301' name='L2301'></a>% <a id='L2302' name='L2302'></a>\ifpTeX <a id='L2303' name='L2303'></a>\def\resetmathfonts{% <a id='L2304' name='L2304'></a> \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy <a id='L2305' name='L2305'></a> \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf <a id='L2306' name='L2306'></a> \textfont\ttfam=\tentt \textfont\sffam=\tensf <a id='L2307' name='L2307'></a> \textfont\mcfam = \tenmin \textfont\gtfam = \tengt <a id='L2308' name='L2308'></a>} <a id='L2309' name='L2309'></a>\else <a id='L2310' name='L2310'></a>\def\resetmathfonts{% <a id='L2311' name='L2311'></a> \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy <a id='L2312' name='L2312'></a> \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf <a id='L2313' name='L2313'></a> \textfont\ttfam=\tentt \textfont\sffam=\tensf <a id='L2314' name='L2314'></a>} <a id='L2315' name='L2315'></a>\fi <a id='L2316' name='L2316'></a> <a id='L2317' name='L2317'></a>% The font-changing commands redefine the meanings of \tenSTYLE, instead <a id='L2318' name='L2318'></a>% of just \STYLE. We do this because \STYLE needs to also set the <a id='L2319' name='L2319'></a>% current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire <a id='L2320' name='L2320'></a>% \tenSTYLE to set the current font. <a id='L2321' name='L2321'></a>% <a id='L2322' name='L2322'></a>% Each font-changing command also sets the names \lsize (one size lower) <a id='L2323' name='L2323'></a>% and \lllsize (three sizes lower). These relative commands are used in <a id='L2324' name='L2324'></a>% the LaTeX logo and acronyms. <a id='L2325' name='L2325'></a>% <a id='L2326' name='L2326'></a>% This all needs generalizing, badly. <a id='L2327' name='L2327'></a>% <a id='L2328' name='L2328'></a>\ifjaTeX <a id='L2329' name='L2329'></a>\def\textfonts{% <a id='L2330' name='L2330'></a> \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl <a id='L2331' name='L2331'></a> \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc <a id='L2332' name='L2332'></a> \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy <a id='L2333' name='L2333'></a> \let\tenttsl=\textttsl <a id='L2334' name='L2334'></a> \let\tenmin=\textmc \let\tengt=\textgt <a id='L2335' name='L2335'></a> \def\curfontsize{text}% <a id='L2336' name='L2336'></a> \def\lsize{reduced}\def\lllsize{smaller}% <a id='L2337' name='L2337'></a> \resetmathfonts \setleading{\textleading}} <a id='L2338' name='L2338'></a>\else <a id='L2339' name='L2339'></a>\def\textfonts{% <a id='L2340' name='L2340'></a> \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl <a id='L2341' name='L2341'></a> \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc <a id='L2342' name='L2342'></a> \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy <a id='L2343' name='L2343'></a> \let\tenttsl=\textttsl <a id='L2344' name='L2344'></a> \def\curfontsize{text}% <a id='L2345' name='L2345'></a> \def\lsize{reduced}\def\lllsize{smaller}% <a id='L2346' name='L2346'></a> \resetmathfonts \setleading{\textleading}} <a id='L2347' name='L2347'></a>\fi <a id='L2348' name='L2348'></a>\ifjaTeX <a id='L2349' name='L2349'></a>\def\titlefonts{% <a id='L2350' name='L2350'></a> \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl <a id='L2351' name='L2351'></a> \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc <a id='L2352' name='L2352'></a> \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy <a id='L2353' name='L2353'></a> \let\tenttsl=\titlettsl <a id='L2354' name='L2354'></a> \let\tenmin=\titlemc \let\tengt=\titlegt <a id='L2355' name='L2355'></a> \def\curfontsize{title}% <a id='L2356' name='L2356'></a> \def\lsize{chap}\def\lllsize{subsec}% <a id='L2357' name='L2357'></a> \resetmathfonts \setleading{27pt}} <a id='L2358' name='L2358'></a>\def\titlefont#1{{\titlefonts\rmisbold #1}} <a id='L2359' name='L2359'></a>\else <a id='L2360' name='L2360'></a>\def\titlefonts{% <a id='L2361' name='L2361'></a> \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl <a id='L2362' name='L2362'></a> \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc <a id='L2363' name='L2363'></a> \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy <a id='L2364' name='L2364'></a> \let\tenttsl=\titlettsl <a id='L2365' name='L2365'></a> \def\curfontsize{title}% <a id='L2366' name='L2366'></a> \def\lsize{chap}\def\lllsize{subsec}% <a id='L2367' name='L2367'></a> \resetmathfonts \setleading{25pt}} <a id='L2368' name='L2368'></a>\def\titlefont#1{{\titlefonts\rmisbold #1}} <a id='L2369' name='L2369'></a>\fi <a id='L2370' name='L2370'></a>\ifjaTeX <a id='L2371' name='L2371'></a>\def\chapfonts{% <a id='L2372' name='L2372'></a> \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl <a id='L2373' name='L2373'></a> \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc <a id='L2374' name='L2374'></a> \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy <a id='L2375' name='L2375'></a> \let\tenttsl=\chapttsl <a id='L2376' name='L2376'></a> \let\tenmin=\chapmc \let\tengt=\chapgt <a id='L2377' name='L2377'></a> \def\curfontsize{chap}% <a id='L2378' name='L2378'></a> \def\lsize{sec}\def\lllsize{text}% <a id='L2379' name='L2379'></a> \resetmathfonts \setleading{19pt}} <a id='L2380' name='L2380'></a>\else <a id='L2381' name='L2381'></a>\def\chapfonts{% <a id='L2382' name='L2382'></a> \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl <a id='L2383' name='L2383'></a> \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc <a id='L2384' name='L2384'></a> \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy <a id='L2385' name='L2385'></a> \let\tenttsl=\chapttsl <a id='L2386' name='L2386'></a> \def\curfontsize{chap}% <a id='L2387' name='L2387'></a> \def\lsize{sec}\def\lllsize{text}% <a id='L2388' name='L2388'></a> \resetmathfonts \setleading{19pt}} <a id='L2389' name='L2389'></a>\fi <a id='L2390' name='L2390'></a>\ifjaTeX <a id='L2391' name='L2391'></a>\def\secfonts{% <a id='L2392' name='L2392'></a> \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl <a id='L2393' name='L2393'></a> \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc <a id='L2394' name='L2394'></a> \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy <a id='L2395' name='L2395'></a> \let\tenttsl=\secttsl <a id='L2396' name='L2396'></a> \let\tenmin=\secmc \let\tengt=\secgt <a id='L2397' name='L2397'></a> \def\curfontsize{sec}% <a id='L2398' name='L2398'></a> \def\lsize{subsec}\def\lllsize{reduced}% <a id='L2399' name='L2399'></a> \resetmathfonts \setleading{16pt}} <a id='L2400' name='L2400'></a>\else <a id='L2401' name='L2401'></a>\def\secfonts{% <a id='L2402' name='L2402'></a> \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl <a id='L2403' name='L2403'></a> \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc <a id='L2404' name='L2404'></a> \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy <a id='L2405' name='L2405'></a> \let\tenttsl=\secttsl <a id='L2406' name='L2406'></a> \def\curfontsize{sec}% <a id='L2407' name='L2407'></a> \def\lsize{subsec}\def\lllsize{reduced}% <a id='L2408' name='L2408'></a> \resetmathfonts \setleading{16pt}} <a id='L2409' name='L2409'></a>\fi <a id='L2410' name='L2410'></a>\ifjaTeX <a id='L2411' name='L2411'></a>\def\subsecfonts{% <a id='L2412' name='L2412'></a> \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl <a id='L2413' name='L2413'></a> \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc <a id='L2414' name='L2414'></a> \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy <a id='L2415' name='L2415'></a> \let\tenttsl=\ssecttsl <a id='L2416' name='L2416'></a> \let\tenmin=\ssecmc \let\tengt=\ssecgt <a id='L2417' name='L2417'></a> \def\curfontsize{ssec}% <a id='L2418' name='L2418'></a> \def\lsize{text}\def\lllsize{small}% <a id='L2419' name='L2419'></a> \resetmathfonts \setleading{15pt}} <a id='L2420' name='L2420'></a>\else <a id='L2421' name='L2421'></a>\def\subsecfonts{% <a id='L2422' name='L2422'></a> \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl <a id='L2423' name='L2423'></a> \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc <a id='L2424' name='L2424'></a> \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy <a id='L2425' name='L2425'></a> \let\tenttsl=\ssecttsl <a id='L2426' name='L2426'></a> \def\curfontsize{ssec}% <a id='L2427' name='L2427'></a> \def\lsize{text}\def\lllsize{small}% <a id='L2428' name='L2428'></a> \resetmathfonts \setleading{15pt}} <a id='L2429' name='L2429'></a>\fi <a id='L2430' name='L2430'></a>\ifjaTeX <a id='L2431' name='L2431'></a>\let\subsubsecfonts = \subsecfonts <a id='L2432' name='L2432'></a>\def\reducedfonts{% <a id='L2433' name='L2433'></a> \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl <a id='L2434' name='L2434'></a> \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc <a id='L2435' name='L2435'></a> \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy <a id='L2436' name='L2436'></a> \let\tenttsl=\reducedttsl <a id='L2437' name='L2437'></a> \let\tenmc=\reducedmc <a id='L2438' name='L2438'></a> \let\tengt=\reducedgt <a id='L2439' name='L2439'></a> \def\curfontsize{reduced}% <a id='L2440' name='L2440'></a> \def\lsize{small}\def\lllsize{smaller}% <a id='L2441' name='L2441'></a> \resetmathfonts \setleading{10.5pt}} <a id='L2442' name='L2442'></a>\else <a id='L2443' name='L2443'></a>\let\subsubsecfonts = \subsecfonts <a id='L2444' name='L2444'></a>\def\reducedfonts{% <a id='L2445' name='L2445'></a> \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl <a id='L2446' name='L2446'></a> \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc <a id='L2447' name='L2447'></a> \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy <a id='L2448' name='L2448'></a> \let\tenttsl=\reducedttsl <a id='L2449' name='L2449'></a> \def\curfontsize{reduced}% <a id='L2450' name='L2450'></a> \def\lsize{small}\def\lllsize{smaller}% <a id='L2451' name='L2451'></a> \resetmathfonts \setleading{10.5pt}} <a id='L2452' name='L2452'></a>\fi <a id='L2453' name='L2453'></a>\ifjaTeX <a id='L2454' name='L2454'></a>\def\smallfonts{% <a id='L2455' name='L2455'></a> \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl <a id='L2456' name='L2456'></a> \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc <a id='L2457' name='L2457'></a> \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy <a id='L2458' name='L2458'></a> \let\tenttsl=\smallttsl <a id='L2459' name='L2459'></a> \let\tenmin=\smallmc \let\tengt=\smallgt <a id='L2460' name='L2460'></a> \def\curfontsize{small}% <a id='L2461' name='L2461'></a> \def\lsize{smaller}\def\lllsize{smaller}% <a id='L2462' name='L2462'></a> \resetmathfonts \setleading{10.5pt}} <a id='L2463' name='L2463'></a>\else <a id='L2464' name='L2464'></a>\def\smallfonts{% <a id='L2465' name='L2465'></a> \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl <a id='L2466' name='L2466'></a> \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc <a id='L2467' name='L2467'></a> \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy <a id='L2468' name='L2468'></a> \let\tenttsl=\smallttsl <a id='L2469' name='L2469'></a> \def\curfontsize{small}% <a id='L2470' name='L2470'></a> \def\lsize{smaller}\def\lllsize{smaller}% <a id='L2471' name='L2471'></a> \resetmathfonts \setleading{10.5pt}} <a id='L2472' name='L2472'></a>\fi <a id='L2473' name='L2473'></a>\ifjaTeX <a id='L2474' name='L2474'></a>\def\smallerfonts{% <a id='L2475' name='L2475'></a> \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl <a id='L2476' name='L2476'></a> \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc <a id='L2477' name='L2477'></a> \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy <a id='L2478' name='L2478'></a> \let\tenttsl=\smallerttsl <a id='L2479' name='L2479'></a> \let\tenmin=\smallermc \let\tengt=\smallergt <a id='L2480' name='L2480'></a> \def\curfontsize{smaller}% <a id='L2481' name='L2481'></a> \def\lsize{smaller}\def\lllsize{smaller}% <a id='L2482' name='L2482'></a> \resetmathfonts \setleading{9.5pt}} <a id='L2483' name='L2483'></a>\else <a id='L2484' name='L2484'></a>\def\smallerfonts{% <a id='L2485' name='L2485'></a> \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl <a id='L2486' name='L2486'></a> \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc <a id='L2487' name='L2487'></a> \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy <a id='L2488' name='L2488'></a> \let\tenttsl=\smallerttsl <a id='L2489' name='L2489'></a> \def\curfontsize{smaller}% <a id='L2490' name='L2490'></a> \def\lsize{smaller}\def\lllsize{smaller}% <a id='L2491' name='L2491'></a> \resetmathfonts \setleading{9.5pt}} <a id='L2492' name='L2492'></a>\fi <a id='L2493' name='L2493'></a> <a id='L2494' name='L2494'></a>% Fonts for short table of contents. <a id='L2495' name='L2495'></a>\setfont\shortcontrm\rmshape{12}{1000}{OT1} <a id='L2496' name='L2496'></a>\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 <a id='L2497' name='L2497'></a>\setfont\shortcontsl\slshape{12}{1000}{OT1} <a id='L2498' name='L2498'></a>\setfont\shortconttt\ttshape{12}{1000}{OT1TT} <a id='L2499' name='L2499'></a>\ifpTeX <a id='L2500' name='L2500'></a>\font\shortcontmc=min10 scaled \magstep1 <a id='L2501' name='L2501'></a>\font\shortcontgt=goth10 scaled \magstep1 <a id='L2502' name='L2502'></a>\fi <a id='L2503' name='L2503'></a>\ifjTeX <a id='L2504' name='L2504'></a>\jfont\shortcontmc=dm10 scaled \magstep1 <a id='L2505' name='L2505'></a>\jfont\shortcontgt=dg10 scaled \magstep1 <a id='L2506' name='L2506'></a>\fi <a id='L2507' name='L2507'></a> <a id='L2508' name='L2508'></a>% Define these just so they can be easily changed for other fonts. <a id='L2509' name='L2509'></a>\def\angleleft{$\langle$} <a id='L2510' name='L2510'></a>\def\angleright{$\rangle$} <a id='L2511' name='L2511'></a> <a id='L2512' name='L2512'></a>% Set the fonts to use with the @small... environments. <a id='L2513' name='L2513'></a>\let\smallexamplefonts = \smallfonts <a id='L2514' name='L2514'></a> <a id='L2515' name='L2515'></a>% About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample <a id='L2516' name='L2516'></a>% can fit this many characters: <a id='L2517' name='L2517'></a>% 8.5x11=86 smallbook=72 a4=90 a5=69 <a id='L2518' name='L2518'></a>% If we use \scriptfonts (8pt), then we can fit this many characters: <a id='L2519' name='L2519'></a>% 8.5x11=90+ smallbook=80 a4=90+ a5=77 <a id='L2520' name='L2520'></a>% For me, subjectively, the few extra characters that fit aren't worth <a id='L2521' name='L2521'></a>% the additional smallness of 8pt. So I'm making the default 9pt. <a id='L2522' name='L2522'></a>% <a id='L2523' name='L2523'></a>% By the way, for comparison, here's what fits with @example (10pt): <a id='L2524' name='L2524'></a>% 8.5x11=71 smallbook=60 a4=75 a5=58 <a id='L2525' name='L2525'></a>% --karl, 24jan03. <a id='L2526' name='L2526'></a> <a id='L2527' name='L2527'></a>% Set up the default fonts, so we can use them for creating boxes. <a id='L2528' name='L2528'></a>% <a id='L2529' name='L2529'></a>\definetextfontsizexi <a id='L2530' name='L2530'></a> <a id='L2531' name='L2531'></a> <a id='L2532' name='L2532'></a>\message{markup,} <a id='L2533' name='L2533'></a> <a id='L2534' name='L2534'></a>% Check if we are currently using a typewriter font. Since all the <a id='L2535' name='L2535'></a>% Computer Modern typewriter fonts have zero interword stretch (and <a id='L2536' name='L2536'></a>% shrink), and it is reasonable to expect all typewriter fonts to have <a id='L2537' name='L2537'></a>% this property, we can check that font parameter. <a id='L2538' name='L2538'></a>% <a id='L2539' name='L2539'></a>\def\ifmonospace{\ifdim\fontdimen3\font=0pt } <a id='L2540' name='L2540'></a> <a id='L2541' name='L2541'></a>% Markup style infrastructure. \defmarkupstylesetup\INITMACRO will <a id='L2542' name='L2542'></a>% define and register \INITMACRO to be called on markup style changes. <a id='L2543' name='L2543'></a>% \INITMACRO can check \currentmarkupstyle for the innermost <a id='L2544' name='L2544'></a>% style and the set of \ifmarkupSTYLE switches for all styles <a id='L2545' name='L2545'></a>% currently in effect. <a id='L2546' name='L2546'></a>\newif\ifmarkupvar <a id='L2547' name='L2547'></a>\newif\ifmarkupsamp <a id='L2548' name='L2548'></a>\newif\ifmarkupkey <a id='L2549' name='L2549'></a>%\newif\ifmarkupfile % @file == @samp. <a id='L2550' name='L2550'></a>%\newif\ifmarkupoption % @option == @samp. <a id='L2551' name='L2551'></a>\newif\ifmarkupcode <a id='L2552' name='L2552'></a>\newif\ifmarkupkbd <a id='L2553' name='L2553'></a>%\newif\ifmarkupenv % @env == @code. <a id='L2554' name='L2554'></a>%\newif\ifmarkupcommand % @command == @code. <a id='L2555' name='L2555'></a>\newif\ifmarkuptex % @tex (and part of @math, for now). <a id='L2556' name='L2556'></a>\newif\ifmarkupexample <a id='L2557' name='L2557'></a>\newif\ifmarkupverb <a id='L2558' name='L2558'></a>\newif\ifmarkupverbatim <a id='L2559' name='L2559'></a> <a id='L2560' name='L2560'></a>\let\currentmarkupstyle\empty <a id='L2561' name='L2561'></a> <a id='L2562' name='L2562'></a>\def\setupmarkupstyle#1{% <a id='L2563' name='L2563'></a> \csname markup#1true\endcsname <a id='L2564' name='L2564'></a> \def\currentmarkupstyle{#1}% <a id='L2565' name='L2565'></a> \markupstylesetup <a id='L2566' name='L2566'></a>} <a id='L2567' name='L2567'></a> <a id='L2568' name='L2568'></a>\let\markupstylesetup\empty <a id='L2569' name='L2569'></a> <a id='L2570' name='L2570'></a>\def\defmarkupstylesetup#1{% <a id='L2571' name='L2571'></a> \expandafter\def\expandafter\markupstylesetup <a id='L2572' name='L2572'></a> \expandafter{\markupstylesetup #1}% <a id='L2573' name='L2573'></a> \def#1% <a id='L2574' name='L2574'></a>} <a id='L2575' name='L2575'></a> <a id='L2576' name='L2576'></a>% Markup style setup for left and right quotes. <a id='L2577' name='L2577'></a>\defmarkupstylesetup\markupsetuplq{% <a id='L2578' name='L2578'></a> \expandafter\let\expandafter \temp <a id='L2579' name='L2579'></a> \csname markupsetuplq\currentmarkupstyle\endcsname <a id='L2580' name='L2580'></a> \ifx\temp\relax \markupsetuplqdefault \else \temp \fi <a id='L2581' name='L2581'></a>} <a id='L2582' name='L2582'></a> <a id='L2583' name='L2583'></a>\defmarkupstylesetup\markupsetuprq{% <a id='L2584' name='L2584'></a> \expandafter\let\expandafter \temp <a id='L2585' name='L2585'></a> \csname markupsetuprq\currentmarkupstyle\endcsname <a id='L2586' name='L2586'></a> \ifx\temp\relax \markupsetuprqdefault \else \temp \fi <a id='L2587' name='L2587'></a>} <a id='L2588' name='L2588'></a> <a id='L2589' name='L2589'></a>{ <a id='L2590' name='L2590'></a>\catcode`\'=\active <a id='L2591' name='L2591'></a>\catcode`\`=\active <a id='L2592' name='L2592'></a> <a id='L2593' name='L2593'></a>\gdef\markupsetuplqdefault{\let`\lq} <a id='L2594' name='L2594'></a>\gdef\markupsetuprqdefault{\let'\rq} <a id='L2595' name='L2595'></a> <a id='L2596' name='L2596'></a>\gdef\markupsetcodequoteleft{\let`\codequoteleft} <a id='L2597' name='L2597'></a>\gdef\markupsetcodequoteright{\let'\codequoteright} <a id='L2598' name='L2598'></a>} <a id='L2599' name='L2599'></a> <a id='L2600' name='L2600'></a>\let\markupsetuplqcode \markupsetcodequoteleft <a id='L2601' name='L2601'></a>\let\markupsetuprqcode \markupsetcodequoteright <a id='L2602' name='L2602'></a>% <a id='L2603' name='L2603'></a>\let\markupsetuplqexample \markupsetcodequoteleft <a id='L2604' name='L2604'></a>\let\markupsetuprqexample \markupsetcodequoteright <a id='L2605' name='L2605'></a>% <a id='L2606' name='L2606'></a>\let\markupsetuplqkbd \markupsetcodequoteleft <a id='L2607' name='L2607'></a>\let\markupsetuprqkbd \markupsetcodequoteright <a id='L2608' name='L2608'></a>% <a id='L2609' name='L2609'></a>\let\markupsetuplqsamp \markupsetcodequoteleft <a id='L2610' name='L2610'></a>\let\markupsetuprqsamp \markupsetcodequoteright <a id='L2611' name='L2611'></a>% <a id='L2612' name='L2612'></a>\let\markupsetuplqverb \markupsetcodequoteleft <a id='L2613' name='L2613'></a>\let\markupsetuprqverb \markupsetcodequoteright <a id='L2614' name='L2614'></a>% <a id='L2615' name='L2615'></a>\let\markupsetuplqverbatim \markupsetcodequoteleft <a id='L2616' name='L2616'></a>\let\markupsetuprqverbatim \markupsetcodequoteright <a id='L2617' name='L2617'></a> <a id='L2618' name='L2618'></a>% Allow an option to not use regular directed right quote/apostrophe <a id='L2619' name='L2619'></a>% (char 0x27), but instead the undirected quote from cmtt (char 0x0d). <a id='L2620' name='L2620'></a>% The undirected quote is ugly, so don't make it the default, but it <a id='L2621' name='L2621'></a>% works for pasting with more pdf viewers (at least evince), the <a id='L2622' name='L2622'></a>% lilypond developers report. xpdf does work with the regular 0x27. <a id='L2623' name='L2623'></a>% <a id='L2624' name='L2624'></a>\def\codequoteright{% <a id='L2625' name='L2625'></a> \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax <a id='L2626' name='L2626'></a> \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax <a id='L2627' name='L2627'></a> '% <a id='L2628' name='L2628'></a> \else \char'15 \fi <a id='L2629' name='L2629'></a> \else \char'15 \fi <a id='L2630' name='L2630'></a>} <a id='L2631' name='L2631'></a>% <a id='L2632' name='L2632'></a>% and a similar option for the left quote char vs. a grave accent. <a id='L2633' name='L2633'></a>% Modern fonts display ASCII 0x60 as a grave accent, so some people like <a id='L2634' name='L2634'></a>% the code environments to do likewise. <a id='L2635' name='L2635'></a>% <a id='L2636' name='L2636'></a>\def\codequoteleft{% <a id='L2637' name='L2637'></a> \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax <a id='L2638' name='L2638'></a> \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax <a id='L2639' name='L2639'></a> % [Knuth] pp. 380,381,391 <a id='L2640' name='L2640'></a> % \relax disables Spanish ligatures ?` and !` of \tt font. <a id='L2641' name='L2641'></a> \relax`% <a id='L2642' name='L2642'></a> \else \char'22 \fi <a id='L2643' name='L2643'></a> \else \char'22 \fi <a id='L2644' name='L2644'></a>} <a id='L2645' name='L2645'></a> <a id='L2646' name='L2646'></a>% Commands to set the quote options. <a id='L2647' name='L2647'></a>% <a id='L2648' name='L2648'></a>\parseargdef\codequoteundirected{% <a id='L2649' name='L2649'></a> \def\temp{#1}% <a id='L2650' name='L2650'></a> \ifx\temp\onword <a id='L2651' name='L2651'></a> \expandafter\let\csname SETtxicodequoteundirected\endcsname <a id='L2652' name='L2652'></a> = t% <a id='L2653' name='L2653'></a> \else\ifx\temp\offword <a id='L2654' name='L2654'></a> \expandafter\let\csname SETtxicodequoteundirected\endcsname <a id='L2655' name='L2655'></a> = \relax <a id='L2656' name='L2656'></a> \else <a id='L2657' name='L2657'></a> \errhelp = \EMsimple <a id='L2658' name='L2658'></a> \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}% <a id='L2659' name='L2659'></a> \fi\fi <a id='L2660' name='L2660'></a>} <a id='L2661' name='L2661'></a>% <a id='L2662' name='L2662'></a>\parseargdef\codequotebacktick{% <a id='L2663' name='L2663'></a> \def\temp{#1}% <a id='L2664' name='L2664'></a> \ifx\temp\onword <a id='L2665' name='L2665'></a> \expandafter\let\csname SETtxicodequotebacktick\endcsname <a id='L2666' name='L2666'></a> = t% <a id='L2667' name='L2667'></a> \else\ifx\temp\offword <a id='L2668' name='L2668'></a> \expandafter\let\csname SETtxicodequotebacktick\endcsname <a id='L2669' name='L2669'></a> = \relax <a id='L2670' name='L2670'></a> \else <a id='L2671' name='L2671'></a> \errhelp = \EMsimple <a id='L2672' name='L2672'></a> \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}% <a id='L2673' name='L2673'></a> \fi\fi <a id='L2674' name='L2674'></a>} <a id='L2675' name='L2675'></a> <a id='L2676' name='L2676'></a>% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. <a id='L2677' name='L2677'></a>\def\noligaturesquoteleft{\relax\lq} <a id='L2678' name='L2678'></a> <a id='L2679' name='L2679'></a>% Count depth in font-changes, for error checks <a id='L2680' name='L2680'></a>\newcount\fontdepth \fontdepth=0 <a id='L2681' name='L2681'></a> <a id='L2682' name='L2682'></a>% Font commands. <a id='L2683' name='L2683'></a> <a id='L2684' name='L2684'></a>% #1 is the font command (\sl or \it), #2 is the text to slant. <a id='L2685' name='L2685'></a>% If we are in a monospaced environment, however, 1) always use \ttsl, <a id='L2686' name='L2686'></a>% and 2) do not add an italic correction. <a id='L2687' name='L2687'></a>\def\dosmartslant#1#2{% <a id='L2688' name='L2688'></a> \ifusingtt <a id='L2689' name='L2689'></a> {{\ttsl #2}\let\next=\relax}% <a id='L2690' name='L2690'></a> {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}% <a id='L2691' name='L2691'></a> \next <a id='L2692' name='L2692'></a>} <a id='L2693' name='L2693'></a>\def\smartslanted{\dosmartslant\sl} <a id='L2694' name='L2694'></a>\def\smartitalic{\dosmartslant\it} <a id='L2695' name='L2695'></a> <a id='L2696' name='L2696'></a>% Output an italic correction unless \next (presumed to be the following <a id='L2697' name='L2697'></a>% character) is such as not to need one. <a id='L2698' name='L2698'></a>\def\smartitaliccorrection{% <a id='L2699' name='L2699'></a> \ifx\next,% <a id='L2700' name='L2700'></a> \else\ifx\next-% <a id='L2701' name='L2701'></a> \else\ifx\next.% <a id='L2702' name='L2702'></a> \else\ptexslash <a id='L2703' name='L2703'></a> \fi\fi\fi <a id='L2704' name='L2704'></a> \aftersmartic <a id='L2705' name='L2705'></a>} <a id='L2706' name='L2706'></a> <a id='L2707' name='L2707'></a>% Unconditional use \ttsl, and no ic. @var is set to this for defuns. <a id='L2708' name='L2708'></a>\def\ttslanted#1{{\ttsl #1}} <a id='L2709' name='L2709'></a> <a id='L2710' name='L2710'></a>% @cite is like \smartslanted except unconditionally use \sl. We never want <a id='L2711' name='L2711'></a>% ttsl for book titles, do we? <a id='L2712' name='L2712'></a>\def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection} <a id='L2713' name='L2713'></a> <a id='L2714' name='L2714'></a>\def\aftersmartic{} <a id='L2715' name='L2715'></a>\def\var#1{% <a id='L2716' name='L2716'></a> \let\saveaftersmartic = \aftersmartic <a id='L2717' name='L2717'></a> \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}% <a id='L2718' name='L2718'></a> \smartslanted{#1}% <a id='L2719' name='L2719'></a>} <a id='L2720' name='L2720'></a> <a id='L2721' name='L2721'></a>\let\i=\smartitalic <a id='L2722' name='L2722'></a>\let\slanted=\smartslanted <a id='L2723' name='L2723'></a>\let\dfn=\smartslanted <a id='L2724' name='L2724'></a>\let\emph=\smartitalic <a id='L2725' name='L2725'></a> <a id='L2726' name='L2726'></a>% Explicit font changes: @r, @sc, undocumented @ii. <a id='L2727' name='L2727'></a>\def\r#1{{\rm #1}} % roman font <a id='L2728' name='L2728'></a>\def\sc#1{{\smallcaps#1}} % smallcaps font <a id='L2729' name='L2729'></a>\def\ii#1{{\it #1}} % italic font <a id='L2730' name='L2730'></a> <a id='L2731' name='L2731'></a>% @b, explicit bold. Also @strong. <a id='L2732' name='L2732'></a>\def\b#1{{\bf #1}} <a id='L2733' name='L2733'></a>\let\strong=\b <a id='L2734' name='L2734'></a> <a id='L2735' name='L2735'></a>% @sansserif, explicit sans. <a id='L2736' name='L2736'></a>\def\sansserif#1{{\sf #1}} <a id='L2737' name='L2737'></a> <a id='L2738' name='L2738'></a>% We can't just use \exhyphenpenalty, because that only has effect at <a id='L2739' name='L2739'></a>% the end of a paragraph. Restore normal hyphenation at the end of the <a id='L2740' name='L2740'></a>% group within which \nohyphenation is presumably called. <a id='L2741' name='L2741'></a>% <a id='L2742' name='L2742'></a>\def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} <a id='L2743' name='L2743'></a>\def\restorehyphenation{\hyphenchar\font = `- } <a id='L2744' name='L2744'></a> <a id='L2745' name='L2745'></a>% Set sfcode to normal for the chars that usually have another value. <a id='L2746' name='L2746'></a>% Can't use plain's \frenchspacing because it uses the `\x notation, and <a id='L2747' name='L2747'></a>% sometimes \x has an active definition that messes things up. <a id='L2748' name='L2748'></a>% <a id='L2749' name='L2749'></a>\catcode`@=11 <a id='L2750' name='L2750'></a> \def\plainfrenchspacing{% <a id='L2751' name='L2751'></a> \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m <a id='L2752' name='L2752'></a> \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m <a id='L2753' name='L2753'></a> \def\endofsentencespacefactor{1000}% for @. and friends <a id='L2754' name='L2754'></a> } <a id='L2755' name='L2755'></a> \def\plainnonfrenchspacing{% <a id='L2756' name='L2756'></a> \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 <a id='L2757' name='L2757'></a> \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 <a id='L2758' name='L2758'></a> \def\endofsentencespacefactor{3000}% for @. and friends <a id='L2759' name='L2759'></a> } <a id='L2760' name='L2760'></a>\catcode`@=\other <a id='L2761' name='L2761'></a>\def\endofsentencespacefactor{3000}% default <a id='L2762' name='L2762'></a> <a id='L2763' name='L2763'></a>% @t, explicit typewriter. <a id='L2764' name='L2764'></a>\def\t#1{% <a id='L2765' name='L2765'></a> {\tt \rawbackslash \plainfrenchspacing #1}% <a id='L2766' name='L2766'></a> \null <a id='L2767' name='L2767'></a>} <a id='L2768' name='L2768'></a> <a id='L2769' name='L2769'></a>% @samp. <a id='L2770' name='L2770'></a>\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} <a id='L2771' name='L2771'></a> <a id='L2772' name='L2772'></a>% @indicateurl is \samp, that is, with quotes. <a id='L2773' name='L2773'></a>\let\indicateurl=\samp <a id='L2774' name='L2774'></a> <a id='L2775' name='L2775'></a>% @code (and similar) prints in typewriter, but with spaces the same <a id='L2776' name='L2776'></a>% size as normal in the surrounding text, without hyphenation, etc. <a id='L2777' name='L2777'></a>% This is a subroutine for that. <a id='L2778' name='L2778'></a>\def\tclose#1{% <a id='L2779' name='L2779'></a> {% <a id='L2780' name='L2780'></a> % Change normal interword space to be same as for the current font. <a id='L2781' name='L2781'></a> \spaceskip = \fontdimen2\font <a id='L2782' name='L2782'></a> % <a id='L2783' name='L2783'></a> % Switch to typewriter. <a id='L2784' name='L2784'></a> \tt <a id='L2785' name='L2785'></a> % <a id='L2786' name='L2786'></a> % But `\ ' produces the large typewriter interword space. <a id='L2787' name='L2787'></a> \def\ {{\spaceskip = 0pt{} }}% <a id='L2788' name='L2788'></a> % <a id='L2789' name='L2789'></a> % Turn off hyphenation. <a id='L2790' name='L2790'></a> \nohyphenation <a id='L2791' name='L2791'></a> % <a id='L2792' name='L2792'></a> \rawbackslash <a id='L2793' name='L2793'></a> \plainfrenchspacing <a id='L2794' name='L2794'></a> #1% <a id='L2795' name='L2795'></a> }% <a id='L2796' name='L2796'></a> \null % reset spacefactor to 1000 <a id='L2797' name='L2797'></a>} <a id='L2798' name='L2798'></a> <a id='L2799' name='L2799'></a>% We *must* turn on hyphenation at `-' and `_' in @code. <a id='L2800' name='L2800'></a>% (But see \codedashfinish below.) <a id='L2801' name='L2801'></a>% Otherwise, it is too hard to avoid overfull hboxes <a id='L2802' name='L2802'></a>% in the Emacs manual, the Library manual, etc. <a id='L2803' name='L2803'></a>% <a id='L2804' name='L2804'></a>% Unfortunately, TeX uses one parameter (\hyphenchar) to control <a id='L2805' name='L2805'></a>% both hyphenation at - and hyphenation within words. <a id='L2806' name='L2806'></a>% We must therefore turn them both off (\tclose does that) <a id='L2807' name='L2807'></a>% and arrange explicitly to hyphenate at a dash. -- rms. <a id='L2808' name='L2808'></a>{ <a id='L2809' name='L2809'></a> \catcode`\-=\active \catcode`\_=\active <a id='L2810' name='L2810'></a> \catcode`\'=\active \catcode`\`=\active <a id='L2811' name='L2811'></a> \global\let'=\rq \global\let`=\lq % default definitions <a id='L2812' name='L2812'></a> % <a id='L2813' name='L2813'></a> \global\def\code{\begingroup <a id='L2814' name='L2814'></a> \setupmarkupstyle{code}% <a id='L2815' name='L2815'></a> % The following should really be moved into \setupmarkupstyle handlers. <a id='L2816' name='L2816'></a> \catcode\dashChar=\active \catcode\underChar=\active <a id='L2817' name='L2817'></a> \ifallowcodebreaks <a id='L2818' name='L2818'></a> \let-\codedash <a id='L2819' name='L2819'></a> \let_\codeunder <a id='L2820' name='L2820'></a> \else <a id='L2821' name='L2821'></a> \let-\normaldash <a id='L2822' name='L2822'></a> \let_\realunder <a id='L2823' name='L2823'></a> \fi <a id='L2824' name='L2824'></a> % Given -foo (with a single dash), we do not want to allow a break <a id='L2825' name='L2825'></a> % after the hyphen. <a id='L2826' name='L2826'></a> \global\let\codedashprev=\codedash <a id='L2827' name='L2827'></a> % <a id='L2828' name='L2828'></a> \codex <a id='L2829' name='L2829'></a> } <a id='L2830' name='L2830'></a> % <a id='L2831' name='L2831'></a> \gdef\codedash{\futurelet\next\codedashfinish} <a id='L2832' name='L2832'></a> \gdef\codedashfinish{% <a id='L2833' name='L2833'></a> \normaldash % always output the dash character itself. <a id='L2834' name='L2834'></a> % <a id='L2835' name='L2835'></a> % Now, output a discretionary to allow a line break, unless <a id='L2836' name='L2836'></a> % (a) the next character is a -, or <a id='L2837' name='L2837'></a> % (b) the preceding character is a -. <a id='L2838' name='L2838'></a> % E.g., given --posix, we do not want to allow a break after either -. <a id='L2839' name='L2839'></a> % Given --foo-bar, we do want to allow a break between the - and the b. <a id='L2840' name='L2840'></a> \ifx\next\codedash \else <a id='L2841' name='L2841'></a> \ifx\codedashprev\codedash <a id='L2842' name='L2842'></a> \else \discretionary{}{}{}\fi <a id='L2843' name='L2843'></a> \fi <a id='L2844' name='L2844'></a> \global\let\codedashprev=\next <a id='L2845' name='L2845'></a> } <a id='L2846' name='L2846'></a>} <a id='L2847' name='L2847'></a>\def\normaldash{-} <a id='L2848' name='L2848'></a>% <a id='L2849' name='L2849'></a>\def\codex #1{\tclose{#1}\endgroup} <a id='L2850' name='L2850'></a> <a id='L2851' name='L2851'></a>\def\codeunder{% <a id='L2852' name='L2852'></a> % this is all so @math{@code{var_name}+1} can work. In math mode, _ <a id='L2853' name='L2853'></a> % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) <a id='L2854' name='L2854'></a> % will therefore expand the active definition of _, which is us <a id='L2855' name='L2855'></a> % (inside @code that is), therefore an endless loop. <a id='L2856' name='L2856'></a> \ifusingtt{\ifmmode <a id='L2857' name='L2857'></a> \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. <a id='L2858' name='L2858'></a> \else\normalunderscore \fi <a id='L2859' name='L2859'></a> \discretionary{}{}{}}% <a id='L2860' name='L2860'></a> {\_}% <a id='L2861' name='L2861'></a>} <a id='L2862' name='L2862'></a> <a id='L2863' name='L2863'></a>% An additional complication: the above will allow breaks after, e.g., <a id='L2864' name='L2864'></a>% each of the four underscores in __typeof__. This is bad. <a id='L2865' name='L2865'></a>% @allowcodebreaks provides a document-level way to turn breaking at - <a id='L2866' name='L2866'></a>% and _ on and off. <a id='L2867' name='L2867'></a>% <a id='L2868' name='L2868'></a>\newif\ifallowcodebreaks \allowcodebreakstrue <a id='L2869' name='L2869'></a> <a id='L2870' name='L2870'></a>\def\keywordtrue{true} <a id='L2871' name='L2871'></a>\def\keywordfalse{false} <a id='L2872' name='L2872'></a> <a id='L2873' name='L2873'></a>\parseargdef\allowcodebreaks{% <a id='L2874' name='L2874'></a> \def\txiarg{#1}% <a id='L2875' name='L2875'></a> \ifx\txiarg\keywordtrue <a id='L2876' name='L2876'></a> \allowcodebreakstrue <a id='L2877' name='L2877'></a> \else\ifx\txiarg\keywordfalse <a id='L2878' name='L2878'></a> \allowcodebreaksfalse <a id='L2879' name='L2879'></a> \else <a id='L2880' name='L2880'></a> \errhelp = \EMsimple <a id='L2881' name='L2881'></a> \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}% <a id='L2882' name='L2882'></a> \fi\fi <a id='L2883' name='L2883'></a>} <a id='L2884' name='L2884'></a> <a id='L2885' name='L2885'></a>% For @command, @env, @file, @option quotes seem unnecessary, <a id='L2886' name='L2886'></a>% so use \code rather than \samp. <a id='L2887' name='L2887'></a>\let\command=\code <a id='L2888' name='L2888'></a>\let\env=\code <a id='L2889' name='L2889'></a>\let\file=\code <a id='L2890' name='L2890'></a>\let\option=\code <a id='L2891' name='L2891'></a> <a id='L2892' name='L2892'></a>% @uref (abbreviation for `urlref') takes an optional (comma-separated) <a id='L2893' name='L2893'></a>% second argument specifying the text to display and an optional third <a id='L2894' name='L2894'></a>% arg as text to display instead of (rather than in addition to) the url <a id='L2895' name='L2895'></a>% itself. First (mandatory) arg is the url. <a id='L2896' name='L2896'></a>% (This \urefnobreak definition isn't used now, leaving it for a while <a id='L2897' name='L2897'></a>% for comparison.) <a id='L2898' name='L2898'></a>\def\urefnobreak#1{\dourefnobreak #1,,,\finish} <a id='L2899' name='L2899'></a>\def\dourefnobreak#1,#2,#3,#4\finish{\begingroup <a id='L2900' name='L2900'></a> \unsepspaces <a id='L2901' name='L2901'></a> \pdfurl{#1}% <a id='L2902' name='L2902'></a> \setbox0 = \hbox{\ignorespaces #3}% <a id='L2903' name='L2903'></a> \ifdim\wd0 > 0pt <a id='L2904' name='L2904'></a> \unhbox0 % third arg given, show only that <a id='L2905' name='L2905'></a> \else <a id='L2906' name='L2906'></a> \setbox0 = \hbox{\ignorespaces #2}% <a id='L2907' name='L2907'></a> \ifdim\wd0 > 0pt <a id='L2908' name='L2908'></a> \ifpdf <a id='L2909' name='L2909'></a> \unhbox0 % PDF: 2nd arg given, show only it <a id='L2910' name='L2910'></a> \else <a id='L2911' name='L2911'></a> \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url <a id='L2912' name='L2912'></a> \fi <a id='L2913' name='L2913'></a> \else <a id='L2914' name='L2914'></a> \code{#1}% only url given, so show it <a id='L2915' name='L2915'></a> \fi <a id='L2916' name='L2916'></a> \fi <a id='L2917' name='L2917'></a> \endlink <a id='L2918' name='L2918'></a>\endgroup} <a id='L2919' name='L2919'></a> <a id='L2920' name='L2920'></a>% This \urefbreak definition is the active one. <a id='L2921' name='L2921'></a>\def\urefbreak{\begingroup \urefcatcodes \dourefbreak} <a id='L2922' name='L2922'></a>\let\uref=\urefbreak <a id='L2923' name='L2923'></a>\def\dourefbreak#1{\urefbreakfinish #1,,,\finish} <a id='L2924' name='L2924'></a>\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example <a id='L2925' name='L2925'></a> \unsepspaces <a id='L2926' name='L2926'></a> \pdfurl{#1}% <a id='L2927' name='L2927'></a> \setbox0 = \hbox{\ignorespaces #3}% <a id='L2928' name='L2928'></a> \ifdim\wd0 > 0pt <a id='L2929' name='L2929'></a> \unhbox0 % third arg given, show only that <a id='L2930' name='L2930'></a> \else <a id='L2931' name='L2931'></a> \setbox0 = \hbox{\ignorespaces #2}% <a id='L2932' name='L2932'></a> \ifdim\wd0 > 0pt <a id='L2933' name='L2933'></a> \ifpdf <a id='L2934' name='L2934'></a> \unhbox0 % PDF: 2nd arg given, show only it <a id='L2935' name='L2935'></a> \else <a id='L2936' name='L2936'></a> \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url <a id='L2937' name='L2937'></a> \fi <a id='L2938' name='L2938'></a> \else <a id='L2939' name='L2939'></a> \urefcode{#1}% only url given, so show it <a id='L2940' name='L2940'></a> \fi <a id='L2941' name='L2941'></a> \fi <a id='L2942' name='L2942'></a> \endlink <a id='L2943' name='L2943'></a>\endgroup} <a id='L2944' name='L2944'></a> <a id='L2945' name='L2945'></a>% Allow line breaks around only a few characters (only). <a id='L2946' name='L2946'></a>\def\urefcatcodes{% <a id='L2947' name='L2947'></a> \catcode\ampChar=\active \catcode\dotChar=\active <a id='L2948' name='L2948'></a> \catcode\hashChar=\active \catcode\questChar=\active <a id='L2949' name='L2949'></a> \catcode\slashChar=\active <a id='L2950' name='L2950'></a>} <a id='L2951' name='L2951'></a>{ <a id='L2952' name='L2952'></a> \urefcatcodes <a id='L2953' name='L2953'></a> % <a id='L2954' name='L2954'></a> \global\def\urefcode{\begingroup <a id='L2955' name='L2955'></a> \setupmarkupstyle{code}% <a id='L2956' name='L2956'></a> \urefcatcodes <a id='L2957' name='L2957'></a> \let&\urefcodeamp <a id='L2958' name='L2958'></a> \let.\urefcodedot <a id='L2959' name='L2959'></a> \let#\urefcodehash <a id='L2960' name='L2960'></a> \let?\urefcodequest <a id='L2961' name='L2961'></a> \let/\urefcodeslash <a id='L2962' name='L2962'></a> \codex <a id='L2963' name='L2963'></a> } <a id='L2964' name='L2964'></a> % <a id='L2965' name='L2965'></a> % By default, they are just regular characters. <a id='L2966' name='L2966'></a> \global\def&{\normalamp} <a id='L2967' name='L2967'></a> \global\def.{\normaldot} <a id='L2968' name='L2968'></a> \global\def#{\normalhash} <a id='L2969' name='L2969'></a> \global\def?{\normalquest} <a id='L2970' name='L2970'></a> \global\def/{\normalslash} <a id='L2971' name='L2971'></a>} <a id='L2972' name='L2972'></a> <a id='L2973' name='L2973'></a>% we put a little stretch before and after the breakable chars, to help <a id='L2974' name='L2974'></a>% line breaking of long url's. The unequal skips make look better in <a id='L2975' name='L2975'></a>% cmtt at least, especially for dots. <a id='L2976' name='L2976'></a>\def\urefprestretch{\urefprebreak \hskip0pt plus.13em } <a id='L2977' name='L2977'></a>\def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em } <a id='L2978' name='L2978'></a>% <a id='L2979' name='L2979'></a>\def\urefcodeamp{\urefprestretch \&\urefpoststretch} <a id='L2980' name='L2980'></a>\def\urefcodedot{\urefprestretch .\urefpoststretch} <a id='L2981' name='L2981'></a>\def\urefcodehash{\urefprestretch \#\urefpoststretch} <a id='L2982' name='L2982'></a>\def\urefcodequest{\urefprestretch ?\urefpoststretch} <a id='L2983' name='L2983'></a>\def\urefcodeslash{\futurelet\next\urefcodeslashfinish} <a id='L2984' name='L2984'></a>{ <a id='L2985' name='L2985'></a> \catcode`\/=\active <a id='L2986' name='L2986'></a> \global\def\urefcodeslashfinish{% <a id='L2987' name='L2987'></a> \urefprestretch \slashChar <a id='L2988' name='L2988'></a> % Allow line break only after the final / in a sequence of <a id='L2989' name='L2989'></a> % slashes, to avoid line break between the slashes in http://. <a id='L2990' name='L2990'></a> \ifx\next/\else \urefpoststretch \fi <a id='L2991' name='L2991'></a> } <a id='L2992' name='L2992'></a>} <a id='L2993' name='L2993'></a> <a id='L2994' name='L2994'></a>% One more complication: by default we'll break after the special <a id='L2995' name='L2995'></a>% characters, but some people like to break before the special chars, so <a id='L2996' name='L2996'></a>% allow that. Also allow no breaking at all, for manual control. <a id='L2997' name='L2997'></a>% <a id='L2998' name='L2998'></a>\parseargdef\urefbreakstyle{% <a id='L2999' name='L2999'></a> \def\txiarg{#1}% <a id='L3000' name='L3000'></a> \ifx\txiarg\wordnone <a id='L3001' name='L3001'></a> \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak} <a id='L3002' name='L3002'></a> \else\ifx\txiarg\wordbefore <a id='L3003' name='L3003'></a> \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak} <a id='L3004' name='L3004'></a> \else\ifx\txiarg\wordafter <a id='L3005' name='L3005'></a> \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak} <a id='L3006' name='L3006'></a> \else <a id='L3007' name='L3007'></a> \errhelp = \EMsimple <a id='L3008' name='L3008'></a> \errmessage{Unknown @urefbreakstyle setting `\txiarg'}% <a id='L3009' name='L3009'></a> \fi\fi\fi <a id='L3010' name='L3010'></a>} <a id='L3011' name='L3011'></a>\def\wordafter{after} <a id='L3012' name='L3012'></a>\def\wordbefore{before} <a id='L3013' name='L3013'></a>\def\wordnone{none} <a id='L3014' name='L3014'></a> <a id='L3015' name='L3015'></a>\urefbreakstyle after <a id='L3016' name='L3016'></a> <a id='L3017' name='L3017'></a>% @url synonym for @uref, since that's how everyone uses it. <a id='L3018' name='L3018'></a>% <a id='L3019' name='L3019'></a>\let\url=\uref <a id='L3020' name='L3020'></a> <a id='L3021' name='L3021'></a>% rms does not like angle brackets --karl, 17may97. <a id='L3022' name='L3022'></a>% So now @email is just like @uref, unless we are pdf. <a id='L3023' name='L3023'></a>% <a id='L3024' name='L3024'></a>%\def\email#1{\angleleft{\tt #1}\angleright} <a id='L3025' name='L3025'></a>\ifpdf <a id='L3026' name='L3026'></a> \def\email#1{\doemail#1,,\finish} <a id='L3027' name='L3027'></a> \def\doemail#1,#2,#3\finish{\begingroup <a id='L3028' name='L3028'></a> \unsepspaces <a id='L3029' name='L3029'></a> \pdfurl{mailto:#1}% <a id='L3030' name='L3030'></a> \setbox0 = \hbox{\ignorespaces #2}% <a id='L3031' name='L3031'></a> \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi <a id='L3032' name='L3032'></a> \endlink <a id='L3033' name='L3033'></a> \endgroup} <a id='L3034' name='L3034'></a>\else <a id='L3035' name='L3035'></a> \let\email=\uref <a id='L3036' name='L3036'></a>\fi <a id='L3037' name='L3037'></a> <a id='L3038' name='L3038'></a>% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), <a id='L3039' name='L3039'></a>% `example' (@kbd uses ttsl only inside of @example and friends), <a id='L3040' name='L3040'></a>% or `code' (@kbd uses normal tty font always). <a id='L3041' name='L3041'></a>\parseargdef\kbdinputstyle{% <a id='L3042' name='L3042'></a> \def\txiarg{#1}% <a id='L3043' name='L3043'></a> \ifx\txiarg\worddistinct <a id='L3044' name='L3044'></a> \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% <a id='L3045' name='L3045'></a> \else\ifx\txiarg\wordexample <a id='L3046' name='L3046'></a> \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% <a id='L3047' name='L3047'></a> \else\ifx\txiarg\wordcode <a id='L3048' name='L3048'></a> \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% <a id='L3049' name='L3049'></a> \else <a id='L3050' name='L3050'></a> \errhelp = \EMsimple <a id='L3051' name='L3051'></a> \errmessage{Unknown @kbdinputstyle setting `\txiarg'}% <a id='L3052' name='L3052'></a> \fi\fi\fi <a id='L3053' name='L3053'></a>} <a id='L3054' name='L3054'></a>\def\worddistinct{distinct} <a id='L3055' name='L3055'></a>\def\wordexample{example} <a id='L3056' name='L3056'></a>\def\wordcode{code} <a id='L3057' name='L3057'></a> <a id='L3058' name='L3058'></a>% Default is `distinct'. <a id='L3059' name='L3059'></a>\kbdinputstyle distinct <a id='L3060' name='L3060'></a> <a id='L3061' name='L3061'></a>% @kbd is like @code, except that if the argument is just one @key command, <a id='L3062' name='L3062'></a>% then @kbd has no effect. <a id='L3063' name='L3063'></a>\def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??\par}} <a id='L3064' name='L3064'></a> <a id='L3065' name='L3065'></a>\def\xkey{\key} <a id='L3066' name='L3066'></a>\def\kbdsub#1#2#3\par{% <a id='L3067' name='L3067'></a> \def\one{#1}\def\three{#3}\def\threex{??}% <a id='L3068' name='L3068'></a> \ifx\one\xkey\ifx\threex\three \key{#2}% <a id='L3069' name='L3069'></a> \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi <a id='L3070' name='L3070'></a> \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi <a id='L3071' name='L3071'></a>} <a id='L3072' name='L3072'></a> <a id='L3073' name='L3073'></a>% definition of @key that produces a lozenge. Doesn't adjust to text size. <a id='L3074' name='L3074'></a>%\setfont\keyrm\rmshape{8}{1000}{OT1} <a id='L3075' name='L3075'></a>%\font\keysy=cmsy9 <a id='L3076' name='L3076'></a>%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% <a id='L3077' name='L3077'></a>% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% <a id='L3078' name='L3078'></a>% \vbox{\hrule\kern-0.4pt <a id='L3079' name='L3079'></a>% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% <a id='L3080' name='L3080'></a>% \kern-0.4pt\hrule}% <a id='L3081' name='L3081'></a>% \kern-.06em\raise0.4pt\hbox{\angleright}}}} <a id='L3082' name='L3082'></a> <a id='L3083' name='L3083'></a>% definition of @key with no lozenge. If the current font is already <a id='L3084' name='L3084'></a>% monospace, don't change it; that way, we respect @kbdinputstyle. But <a id='L3085' name='L3085'></a>% if it isn't monospace, then use \tt. <a id='L3086' name='L3086'></a>% <a id='L3087' name='L3087'></a>\def\key#1{{\setupmarkupstyle{key}% <a id='L3088' name='L3088'></a> \nohyphenation <a id='L3089' name='L3089'></a> \ifmonospace\else\tt\fi <a id='L3090' name='L3090'></a> #1}\null} <a id='L3091' name='L3091'></a> <a id='L3092' name='L3092'></a>% @clicksequence{File @click{} Open ...} <a id='L3093' name='L3093'></a>\def\clicksequence#1{\begingroup #1\endgroup} <a id='L3094' name='L3094'></a> <a id='L3095' name='L3095'></a>% @clickstyle @arrow (by default) <a id='L3096' name='L3096'></a>\parseargdef\clickstyle{\def\click{#1}} <a id='L3097' name='L3097'></a>\def\click{\arrow} <a id='L3098' name='L3098'></a> <a id='L3099' name='L3099'></a>% Typeset a dimension, e.g., `in' or `pt'. The only reason for the <a id='L3100' name='L3100'></a>% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. <a id='L3101' name='L3101'></a>% <a id='L3102' name='L3102'></a>\def\dmn#1{\thinspace #1} <a id='L3103' name='L3103'></a> <a id='L3104' name='L3104'></a>% @l was never documented to mean ``switch to the Lisp font'', <a id='L3105' name='L3105'></a>% and it is not used as such in any manual I can find. We need it for <a id='L3106' name='L3106'></a>% Polish suppressed-l. --karl, 22sep96. <a id='L3107' name='L3107'></a>%\def\l#1{{\li #1}\null} <a id='L3108' name='L3108'></a> <a id='L3109' name='L3109'></a>% @acronym for "FBI", "NATO", and the like. <a id='L3110' name='L3110'></a>% We print this one point size smaller, since it's intended for <a id='L3111' name='L3111'></a>% all-uppercase. <a id='L3112' name='L3112'></a>% <a id='L3113' name='L3113'></a>\def\acronym#1{\doacronym #1,,\finish} <a id='L3114' name='L3114'></a>\def\doacronym#1,#2,#3\finish{% <a id='L3115' name='L3115'></a> {\selectfonts\lsize #1}% <a id='L3116' name='L3116'></a> \def\temp{#2}% <a id='L3117' name='L3117'></a> \ifx\temp\empty \else <a id='L3118' name='L3118'></a> \space ({\unsepspaces \ignorespaces \temp \unskip})% <a id='L3119' name='L3119'></a> \fi <a id='L3120' name='L3120'></a> \null % reset \spacefactor=1000 <a id='L3121' name='L3121'></a>} <a id='L3122' name='L3122'></a> <a id='L3123' name='L3123'></a>% @abbr for "Comput. J." and the like. <a id='L3124' name='L3124'></a>% No font change, but don't do end-of-sentence spacing. <a id='L3125' name='L3125'></a>% <a id='L3126' name='L3126'></a>\def\abbr#1{\doabbr #1,,\finish} <a id='L3127' name='L3127'></a>\def\doabbr#1,#2,#3\finish{% <a id='L3128' name='L3128'></a> {\plainfrenchspacing #1}% <a id='L3129' name='L3129'></a> \def\temp{#2}% <a id='L3130' name='L3130'></a> \ifx\temp\empty \else <a id='L3131' name='L3131'></a> \space ({\unsepspaces \ignorespaces \temp \unskip})% <a id='L3132' name='L3132'></a> \fi <a id='L3133' name='L3133'></a> \null % reset \spacefactor=1000 <a id='L3134' name='L3134'></a>} <a id='L3135' name='L3135'></a> <a id='L3136' name='L3136'></a>% @asis just yields its argument. Used with @table, for example. <a id='L3137' name='L3137'></a>% <a id='L3138' name='L3138'></a>\def\asis#1{#1} <a id='L3139' name='L3139'></a> <a id='L3140' name='L3140'></a>% @math outputs its argument in math mode. <a id='L3141' name='L3141'></a>% <a id='L3142' name='L3142'></a>% One complication: _ usually means subscripts, but it could also mean <a id='L3143' name='L3143'></a>% an actual _ character, as in @math{@var{some_variable} + 1}. So make <a id='L3144' name='L3144'></a>% _ active, and distinguish by seeing if the current family is \slfam, <a id='L3145' name='L3145'></a>% which is what @var uses. <a id='L3146' name='L3146'></a>{ <a id='L3147' name='L3147'></a> \catcode`\_ = \active <a id='L3148' name='L3148'></a> \gdef\mathunderscore{% <a id='L3149' name='L3149'></a> \catcode`\_=\active <a id='L3150' name='L3150'></a> \def_{\ifnum\fam=\slfam \_\else\sb\fi}% <a id='L3151' name='L3151'></a> } <a id='L3152' name='L3152'></a>} <a id='L3153' name='L3153'></a>% Another complication: we want \\ (and @\) to output a math (or tt) \. <a id='L3154' name='L3154'></a>% FYI, plain.tex uses \\ as a temporary control sequence (for no <a id='L3155' name='L3155'></a>% particular reason), but this is not advertised and we don't care. <a id='L3156' name='L3156'></a>% <a id='L3157' name='L3157'></a>% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. <a id='L3158' name='L3158'></a>\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} <a id='L3159' name='L3159'></a>% <a id='L3160' name='L3160'></a>\def\math{% <a id='L3161' name='L3161'></a> \tex <a id='L3162' name='L3162'></a> \mathunderscore <a id='L3163' name='L3163'></a> \let\\ = \mathbackslash <a id='L3164' name='L3164'></a> \mathactive <a id='L3165' name='L3165'></a> % make the texinfo accent commands work in math mode <a id='L3166' name='L3166'></a> \let\"=\ddot <a id='L3167' name='L3167'></a> \let\'=\acute <a id='L3168' name='L3168'></a> \let\==\bar <a id='L3169' name='L3169'></a> \let\^=\hat <a id='L3170' name='L3170'></a> \let\`=\grave <a id='L3171' name='L3171'></a> \let\u=\breve <a id='L3172' name='L3172'></a> \let\v=\check <a id='L3173' name='L3173'></a> \let\~=\tilde <a id='L3174' name='L3174'></a> \let\dotaccent=\dot <a id='L3175' name='L3175'></a> $\finishmath <a id='L3176' name='L3176'></a>} <a id='L3177' name='L3177'></a>\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. <a id='L3178' name='L3178'></a> <a id='L3179' name='L3179'></a>% Some active characters (such as <) are spaced differently in math. <a id='L3180' name='L3180'></a>% We have to reset their definitions in case the @math was an argument <a id='L3181' name='L3181'></a>% to a command which sets the catcodes (such as @item or @section). <a id='L3182' name='L3182'></a>% <a id='L3183' name='L3183'></a>{ <a id='L3184' name='L3184'></a> \catcode`^ = \active <a id='L3185' name='L3185'></a> \catcode`< = \active <a id='L3186' name='L3186'></a> \catcode`> = \active <a id='L3187' name='L3187'></a> \catcode`+ = \active <a id='L3188' name='L3188'></a> \catcode`' = \active <a id='L3189' name='L3189'></a> \gdef\mathactive{% <a id='L3190' name='L3190'></a> \let^ = \ptexhat <a id='L3191' name='L3191'></a> \let< = \ptexless <a id='L3192' name='L3192'></a> \let> = \ptexgtr <a id='L3193' name='L3193'></a> \let+ = \ptexplus <a id='L3194' name='L3194'></a> \let' = \ptexquoteright <a id='L3195' name='L3195'></a> } <a id='L3196' name='L3196'></a>} <a id='L3197' name='L3197'></a> <a id='L3198' name='L3198'></a>% ctrl is no longer a Texinfo command, but leave this definition for fun. <a id='L3199' name='L3199'></a>\def\ctrl #1{{\tt \rawbackslash \hat}#1} <a id='L3200' name='L3200'></a> <a id='L3201' name='L3201'></a>% @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}. <a id='L3202' name='L3202'></a>% Ignore unless FMTNAME == tex; then it is like @iftex and @tex, <a id='L3203' name='L3203'></a>% except specified as a normal braced arg, so no newlines to worry about. <a id='L3204' name='L3204'></a>% <a id='L3205' name='L3205'></a>\def\outfmtnametex{tex} <a id='L3206' name='L3206'></a>% <a id='L3207' name='L3207'></a>\long\def\inlinefmt#1{\doinlinefmt #1,\finish} <a id='L3208' name='L3208'></a>\long\def\doinlinefmt#1,#2,\finish{% <a id='L3209' name='L3209'></a> \def\inlinefmtname{#1}% <a id='L3210' name='L3210'></a> \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi <a id='L3211' name='L3211'></a>} <a id='L3212' name='L3212'></a>% For raw, must switch into @tex before parsing the argument, to avoid <a id='L3213' name='L3213'></a>% setting catcodes prematurely. Doing it this way means that, for <a id='L3214' name='L3214'></a>% example, @inlineraw{html, foo{bar} gets a parse error instead of being <a id='L3215' name='L3215'></a>% ignored. But this isn't important because if people want a literal <a id='L3216' name='L3216'></a>% *right* brace they would have to use a command anyway, so they may as <a id='L3217' name='L3217'></a>% well use a command to get a left brace too. We could re-use the <a id='L3218' name='L3218'></a>% delimiter character idea from \verb, but it seems like overkill. <a id='L3219' name='L3219'></a>% <a id='L3220' name='L3220'></a>\long\def\inlineraw{\tex \doinlineraw} <a id='L3221' name='L3221'></a>\long\def\doinlineraw#1{\doinlinerawtwo #1,\finish} <a id='L3222' name='L3222'></a>\def\doinlinerawtwo#1,#2,\finish{% <a id='L3223' name='L3223'></a> \def\inlinerawname{#1}% <a id='L3224' name='L3224'></a> \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi <a id='L3225' name='L3225'></a> \endgroup % close group opened by \tex. <a id='L3226' name='L3226'></a>} <a id='L3227' name='L3227'></a> <a id='L3228' name='L3228'></a> <a id='L3229' name='L3229'></a>\message{glyphs,} <a id='L3230' name='L3230'></a>% and logos. <a id='L3231' name='L3231'></a> <a id='L3232' name='L3232'></a>% @@ prints an @, as does @atchar{}. <a id='L3233' name='L3233'></a>\def\@{\char64 } <a id='L3234' name='L3234'></a>\let\atchar=\@ <a id='L3235' name='L3235'></a> <a id='L3236' name='L3236'></a>% @{ @} @lbracechar{} @rbracechar{} all generate brace characters. <a id='L3237' name='L3237'></a>% Unless we're in typewriter, use \ecfont because the CM text fonts do <a id='L3238' name='L3238'></a>% not have braces, and we don't want to switch into math. <a id='L3239' name='L3239'></a>\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}} <a id='L3240' name='L3240'></a>\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}} <a id='L3241' name='L3241'></a>\let\{=\mylbrace \let\lbracechar=\{ <a id='L3242' name='L3242'></a>\let\}=\myrbrace \let\rbracechar=\} <a id='L3243' name='L3243'></a>\begingroup <a id='L3244' name='L3244'></a> % Definitions to produce \{ and \} commands for indices, <a id='L3245' name='L3245'></a> % and @{ and @} for the aux/toc files. <a id='L3246' name='L3246'></a> \catcode`\{ = \other \catcode`\} = \other <a id='L3247' name='L3247'></a> \catcode`\[ = 1 \catcode`\] = 2 <a id='L3248' name='L3248'></a> \catcode`\! = 0 \catcode`\\ = \other <a id='L3249' name='L3249'></a> !gdef!lbracecmd[\{]% <a id='L3250' name='L3250'></a> !gdef!rbracecmd[\}]% <a id='L3251' name='L3251'></a> !gdef!lbraceatcmd[@{]% <a id='L3252' name='L3252'></a> !gdef!rbraceatcmd[@}]% <a id='L3253' name='L3253'></a>!endgroup <a id='L3254' name='L3254'></a> <a id='L3255' name='L3255'></a>% @comma{} to avoid , parsing problems. <a id='L3256' name='L3256'></a>\let\comma = , <a id='L3257' name='L3257'></a> <a id='L3258' name='L3258'></a>% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent <a id='L3259' name='L3259'></a>% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. <a id='L3260' name='L3260'></a>\let\, = \ptexc <a id='L3261' name='L3261'></a>\let\dotaccent = \ptexdot <a id='L3262' name='L3262'></a>\def\ringaccent#1{{\accent23 #1}} <a id='L3263' name='L3263'></a>\let\tieaccent = \ptext <a id='L3264' name='L3264'></a>\let\ubaraccent = \ptexb <a id='L3265' name='L3265'></a>\let\udotaccent = \d <a id='L3266' name='L3266'></a> <a id='L3267' name='L3267'></a>% Other special characters: @questiondown @exclamdown @ordf @ordm <a id='L3268' name='L3268'></a>% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. <a id='L3269' name='L3269'></a>\def\questiondown{?`} <a id='L3270' name='L3270'></a>\def\exclamdown{!`} <a id='L3271' name='L3271'></a>\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} <a id='L3272' name='L3272'></a>\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} <a id='L3273' name='L3273'></a> <a id='L3274' name='L3274'></a>% Dotless i and dotless j, used for accents. <a id='L3275' name='L3275'></a>\def\imacro{i} <a id='L3276' name='L3276'></a>\def\jmacro{j} <a id='L3277' name='L3277'></a>\def\dotless#1{% <a id='L3278' name='L3278'></a> \def\temp{#1}% <a id='L3279' name='L3279'></a> \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi <a id='L3280' name='L3280'></a> \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi <a id='L3281' name='L3281'></a> \else \errmessage{@dotless can be used only with i or j}% <a id='L3282' name='L3282'></a> \fi\fi <a id='L3283' name='L3283'></a>} <a id='L3284' name='L3284'></a> <a id='L3285' name='L3285'></a>% The \TeX{} logo, as in plain, but resetting the spacing so that a <a id='L3286' name='L3286'></a>% period following counts as ending a sentence. (Idea found in latex.) <a id='L3287' name='L3287'></a>% <a id='L3288' name='L3288'></a>\edef\TeX{\TeX \spacefactor=1000 } <a id='L3289' name='L3289'></a> <a id='L3290' name='L3290'></a>% @LaTeX{} logo. Not quite the same results as the definition in <a id='L3291' name='L3291'></a>% latex.ltx, since we use a different font for the raised A; it's most <a id='L3292' name='L3292'></a>% convenient for us to use an explicitly smaller font, rather than using <a id='L3293' name='L3293'></a>% the \scriptstyle font (since we don't reset \scriptstyle and <a id='L3294' name='L3294'></a>% \scriptscriptstyle). <a id='L3295' name='L3295'></a>% <a id='L3296' name='L3296'></a>\def\LaTeX{% <a id='L3297' name='L3297'></a> L\kern-.36em <a id='L3298' name='L3298'></a> {\setbox0=\hbox{T}% <a id='L3299' name='L3299'></a> \vbox to \ht0{\hbox{% <a id='L3300' name='L3300'></a> \ifx\textnominalsize\xwordpt <a id='L3301' name='L3301'></a> % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX. <a id='L3302' name='L3302'></a> % Revert to plain's \scriptsize, which is 7pt. <a id='L3303' name='L3303'></a> \count255=\the\fam $\fam\count255 \scriptstyle A$% <a id='L3304' name='L3304'></a> \else <a id='L3305' name='L3305'></a> % For 11pt, we can use our lllsize. <a id='L3306' name='L3306'></a> \selectfonts\lllsize A% <a id='L3307' name='L3307'></a> \fi <a id='L3308' name='L3308'></a> }% <a id='L3309' name='L3309'></a> \vss <a id='L3310' name='L3310'></a> }}% <a id='L3311' name='L3311'></a> \kern-.15em <a id='L3312' name='L3312'></a> \TeX <a id='L3313' name='L3313'></a>} <a id='L3314' name='L3314'></a> <a id='L3315' name='L3315'></a>% Some math mode symbols. <a id='L3316' name='L3316'></a>\def\bullet{$\ptexbullet$} <a id='L3317' name='L3317'></a>\def\geq{\ifmmode \ge\else $\ge$\fi} <a id='L3318' name='L3318'></a>\def\leq{\ifmmode \le\else $\le$\fi} <a id='L3319' name='L3319'></a>\def\minus{\ifmmode -\else $-$\fi} <a id='L3320' name='L3320'></a> <a id='L3321' name='L3321'></a>% @dots{} outputs an ellipsis using the current font. <a id='L3322' name='L3322'></a>% We do .5em per period so that it has the same spacing in the cm <a id='L3323' name='L3323'></a>% typewriter fonts as three actual period characters; on the other hand, <a id='L3324' name='L3324'></a>% in other typewriter fonts three periods are wider than 1.5em. So do <a id='L3325' name='L3325'></a>% whichever is larger. <a id='L3326' name='L3326'></a>% <a id='L3327' name='L3327'></a>\def\dots{% <a id='L3328' name='L3328'></a> \leavevmode <a id='L3329' name='L3329'></a> \setbox0=\hbox{...}% get width of three periods <a id='L3330' name='L3330'></a> \ifdim\wd0 > 1.5em <a id='L3331' name='L3331'></a> \dimen0 = \wd0 <a id='L3332' name='L3332'></a> \else <a id='L3333' name='L3333'></a> \dimen0 = 1.5em <a id='L3334' name='L3334'></a> \fi <a id='L3335' name='L3335'></a> \hbox to \dimen0{% <a id='L3336' name='L3336'></a> \hskip 0pt plus.25fil <a id='L3337' name='L3337'></a> .\hskip 0pt plus1fil <a id='L3338' name='L3338'></a> .\hskip 0pt plus1fil <a id='L3339' name='L3339'></a> .\hskip 0pt plus.5fil <a id='L3340' name='L3340'></a> }% <a id='L3341' name='L3341'></a>} <a id='L3342' name='L3342'></a> <a id='L3343' name='L3343'></a>% @enddots{} is an end-of-sentence ellipsis. <a id='L3344' name='L3344'></a>% <a id='L3345' name='L3345'></a>\def\enddots{% <a id='L3346' name='L3346'></a> \dots <a id='L3347' name='L3347'></a> \spacefactor=\endofsentencespacefactor <a id='L3348' name='L3348'></a>} <a id='L3349' name='L3349'></a> <a id='L3350' name='L3350'></a>% @point{}, @result{}, @expansion{}, @print{}, @equiv{}. <a id='L3351' name='L3351'></a>% <a id='L3352' name='L3352'></a>% Since these characters are used in examples, they should be an even number of <a id='L3353' name='L3353'></a>% \tt widths. Each \tt character is 1en, so two makes it 1em. <a id='L3354' name='L3354'></a>% <a id='L3355' name='L3355'></a>\def\point{$\star$} <a id='L3356' name='L3356'></a>\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}} <a id='L3357' name='L3357'></a>\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} <a id='L3358' name='L3358'></a>\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}} <a id='L3359' name='L3359'></a>\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} <a id='L3360' name='L3360'></a>\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}} <a id='L3361' name='L3361'></a> <a id='L3362' name='L3362'></a>% The @error{} command. <a id='L3363' name='L3363'></a>% Adapted from the TeXbook's \boxit. <a id='L3364' name='L3364'></a>% <a id='L3365' name='L3365'></a>\newbox\errorbox <a id='L3366' name='L3366'></a>% <a id='L3367' name='L3367'></a>{\tentt \global\dimen0 = 3em}% Width of the box. <a id='L3368' name='L3368'></a>\dimen2 = .55pt % Thickness of rules <a id='L3369' name='L3369'></a>% The text. (`r' is open on the right, `e' somewhat less so on the left.) <a id='L3370' name='L3370'></a>\setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt} <a id='L3371' name='L3371'></a>% <a id='L3372' name='L3372'></a>\setbox\errorbox=\hbox to \dimen0{\hfil <a id='L3373' name='L3373'></a> \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. <a id='L3374' name='L3374'></a> \advance\hsize by -2\dimen2 % Rules. <a id='L3375' name='L3375'></a> \vbox{% <a id='L3376' name='L3376'></a> \hrule height\dimen2 <a id='L3377' name='L3377'></a> \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. <a id='L3378' name='L3378'></a> \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. <a id='L3379' name='L3379'></a> \kern3pt\vrule width\dimen2}% Space to right. <a id='L3380' name='L3380'></a> \hrule height\dimen2} <a id='L3381' name='L3381'></a> \hfil} <a id='L3382' name='L3382'></a>% <a id='L3383' name='L3383'></a>\def\error{\leavevmode\lower.7ex\copy\errorbox} <a id='L3384' name='L3384'></a> <a id='L3385' name='L3385'></a>% @pounds{} is a sterling sign, which Knuth put in the CM italic font. <a id='L3386' name='L3386'></a>% <a id='L3387' name='L3387'></a>\def\pounds{{\it\$}} <a id='L3388' name='L3388'></a> <a id='L3389' name='L3389'></a>% @euro{} comes from a separate font, depending on the current style. <a id='L3390' name='L3390'></a>% We use the free feym* fonts from the eurosym package by Henrik <a id='L3391' name='L3391'></a>% Theiling, which support regular, slanted, bold and bold slanted (and <a id='L3392' name='L3392'></a>% "outlined" (blackboard board, sort of) versions, which we don't need). <a id='L3393' name='L3393'></a>% It is available from http://www.ctan.org/tex-archive/fonts/eurosym. <a id='L3394' name='L3394'></a>% <a id='L3395' name='L3395'></a>% Although only regular is the truly official Euro symbol, we ignore <a id='L3396' name='L3396'></a>% that. The Euro is designed to be slightly taller than the regular <a id='L3397' name='L3397'></a>% font height. <a id='L3398' name='L3398'></a>% <a id='L3399' name='L3399'></a>% feymr - regular <a id='L3400' name='L3400'></a>% feymo - slanted <a id='L3401' name='L3401'></a>% feybr - bold <a id='L3402' name='L3402'></a>% feybo - bold slanted <a id='L3403' name='L3403'></a>% <a id='L3404' name='L3404'></a>% There is no good (free) typewriter version, to my knowledge. <a id='L3405' name='L3405'></a>% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. <a id='L3406' name='L3406'></a>% Hmm. <a id='L3407' name='L3407'></a>% <a id='L3408' name='L3408'></a>% Also doesn't work in math. Do we need to do math with euro symbols? <a id='L3409' name='L3409'></a>% Hope not. <a id='L3410' name='L3410'></a>% <a id='L3411' name='L3411'></a>% <a id='L3412' name='L3412'></a>\def\euro{{\eurofont e}} <a id='L3413' name='L3413'></a>\def\eurofont{% <a id='L3414' name='L3414'></a> % We set the font at each command, rather than predefining it in <a id='L3415' name='L3415'></a> % \textfonts and the other font-switching commands, so that <a id='L3416' name='L3416'></a> % installations which never need the symbol don't have to have the <a id='L3417' name='L3417'></a> % font installed. <a id='L3418' name='L3418'></a> % <a id='L3419' name='L3419'></a> % There is only one designed size (nominal 10pt), so we always scale <a id='L3420' name='L3420'></a> % that to the current nominal size. <a id='L3421' name='L3421'></a> % <a id='L3422' name='L3422'></a> % By the way, simply using "at 1em" works for cmr10 and the like, but <a id='L3423' name='L3423'></a> % does not work for cmbx10 and other extended/shrunken fonts. <a id='L3424' name='L3424'></a> % <a id='L3425' name='L3425'></a> \def\eurosize{\csname\curfontsize nominalsize\endcsname}% <a id='L3426' name='L3426'></a> % <a id='L3427' name='L3427'></a> \ifx\curfontstyle\bfstylename <a id='L3428' name='L3428'></a> % bold: <a id='L3429' name='L3429'></a> \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize <a id='L3430' name='L3430'></a> \else <a id='L3431' name='L3431'></a> % regular: <a id='L3432' name='L3432'></a> \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize <a id='L3433' name='L3433'></a> \fi <a id='L3434' name='L3434'></a> \thiseurofont <a id='L3435' name='L3435'></a>} <a id='L3436' name='L3436'></a> <a id='L3437' name='L3437'></a>% Glyphs from the EC fonts. We don't use \let for the aliases, because <a id='L3438' name='L3438'></a>% sometimes we redefine the original macro, and the alias should reflect <a id='L3439' name='L3439'></a>% the redefinition. <a id='L3440' name='L3440'></a>% <a id='L3441' name='L3441'></a>% Use LaTeX names for the Icelandic letters. <a id='L3442' name='L3442'></a>\def\DH{{\ecfont \char"D0}} % Eth <a id='L3443' name='L3443'></a>\def\dh{{\ecfont \char"F0}} % eth <a id='L3444' name='L3444'></a>\def\TH{{\ecfont \char"DE}} % Thorn <a id='L3445' name='L3445'></a>\def\th{{\ecfont \char"FE}} % thorn <a id='L3446' name='L3446'></a>% <a id='L3447' name='L3447'></a>\def\guillemetleft{{\ecfont \char"13}} <a id='L3448' name='L3448'></a>\def\guillemotleft{\guillemetleft} <a id='L3449' name='L3449'></a>\def\guillemetright{{\ecfont \char"14}} <a id='L3450' name='L3450'></a>\def\guillemotright{\guillemetright} <a id='L3451' name='L3451'></a>\def\guilsinglleft{{\ecfont \char"0E}} <a id='L3452' name='L3452'></a>\def\guilsinglright{{\ecfont \char"0F}} <a id='L3453' name='L3453'></a>\def\quotedblbase{{\ecfont \char"12}} <a id='L3454' name='L3454'></a>\def\quotesinglbase{{\ecfont \char"0D}} <a id='L3455' name='L3455'></a>% <a id='L3456' name='L3456'></a>% This positioning is not perfect (see the ogonek LaTeX package), but <a id='L3457' name='L3457'></a>% we have the precomposed glyphs for the most common cases. We put the <a id='L3458' name='L3458'></a>% tests to use those glyphs in the single \ogonek macro so we have fewer <a id='L3459' name='L3459'></a>% dummy definitions to worry about for index entries, etc. <a id='L3460' name='L3460'></a>% <a id='L3461' name='L3461'></a>% ogonek is also used with other letters in Lithuanian (IOU), but using <a id='L3462' name='L3462'></a>% the precomposed glyphs for those is not so easy since they aren't in <a id='L3463' name='L3463'></a>% the same EC font. <a id='L3464' name='L3464'></a>\def\ogonek#1{{% <a id='L3465' name='L3465'></a> \def\temp{#1}% <a id='L3466' name='L3466'></a> \ifx\temp\macrocharA\Aogonek <a id='L3467' name='L3467'></a> \else\ifx\temp\macrochara\aogonek <a id='L3468' name='L3468'></a> \else\ifx\temp\macrocharE\Eogonek <a id='L3469' name='L3469'></a> \else\ifx\temp\macrochare\eogonek <a id='L3470' name='L3470'></a> \else <a id='L3471' name='L3471'></a> \ecfont \setbox0=\hbox{#1}% <a id='L3472' name='L3472'></a> \ifdim\ht0=1ex\accent"0C #1% <a id='L3473' name='L3473'></a> \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}% <a id='L3474' name='L3474'></a> \fi <a id='L3475' name='L3475'></a> \fi\fi\fi\fi <a id='L3476' name='L3476'></a> }% <a id='L3477' name='L3477'></a>} <a id='L3478' name='L3478'></a>\def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A} <a id='L3479' name='L3479'></a>\def\aogonek{{\ecfont \char"A1}}\def\macrochara{a} <a id='L3480' name='L3480'></a>\def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} <a id='L3481' name='L3481'></a>\def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} <a id='L3482' name='L3482'></a>% <a id='L3483' name='L3483'></a>% Use the ec* fonts (cm-super in outline format) for non-CM glyphs. <a id='L3484' name='L3484'></a>\def\ecfont{% <a id='L3485' name='L3485'></a> % We can't distinguish serif/sans and italic/slanted, but this <a id='L3486' name='L3486'></a> % is used for crude hacks anyway (like adding French and German <a id='L3487' name='L3487'></a> % quotes to documents typeset with CM, where we lose kerning), so <a id='L3488' name='L3488'></a> % hopefully nobody will notice/care. <a id='L3489' name='L3489'></a> \edef\ecsize{\csname\curfontsize ecsize\endcsname}% <a id='L3490' name='L3490'></a> \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% <a id='L3491' name='L3491'></a> \ifmonospace <a id='L3492' name='L3492'></a> % typewriter: <a id='L3493' name='L3493'></a> \font\thisecfont = ectt\ecsize \space at \nominalsize <a id='L3494' name='L3494'></a> \else <a id='L3495' name='L3495'></a> \ifx\curfontstyle\bfstylename <a id='L3496' name='L3496'></a> % bold: <a id='L3497' name='L3497'></a> \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize <a id='L3498' name='L3498'></a> \else <a id='L3499' name='L3499'></a> % regular: <a id='L3500' name='L3500'></a> \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize <a id='L3501' name='L3501'></a> \fi <a id='L3502' name='L3502'></a> \fi <a id='L3503' name='L3503'></a> \thisecfont <a id='L3504' name='L3504'></a>} <a id='L3505' name='L3505'></a> <a id='L3506' name='L3506'></a>% @registeredsymbol - R in a circle. The font for the R should really <a id='L3507' name='L3507'></a>% be smaller yet, but lllsize is the best we can do for now. <a id='L3508' name='L3508'></a>% Adapted from the plain.tex definition of \copyright. <a id='L3509' name='L3509'></a>% <a id='L3510' name='L3510'></a>\font\onlytodefineregisteredsymbol=psyr at 7pt <a id='L3511' name='L3511'></a>\def\registeredsymbol{% <a id='L3512' name='L3512'></a>$^{\hbox{\onlytodefineregisteredsymbol\char210\relax}}$% <a id='L3513' name='L3513'></a>} <a id='L3514' name='L3514'></a> <a id='L3515' name='L3515'></a>% @textdegree - the normal degrees sign. <a id='L3516' name='L3516'></a>% <a id='L3517' name='L3517'></a>\def\textdegree{$^\circ$} <a id='L3518' name='L3518'></a> <a id='L3519' name='L3519'></a>% Laurent Siebenmann reports \Orb undefined with: <a id='L3520' name='L3520'></a>% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 <a id='L3521' name='L3521'></a>% so we'll define it if necessary. <a id='L3522' name='L3522'></a>% <a id='L3523' name='L3523'></a>\ifx\Orb\thisisundefined <a id='L3524' name='L3524'></a>\def\Orb{\mathhexbox20D} <a id='L3525' name='L3525'></a>\fi <a id='L3526' name='L3526'></a> <a id='L3527' name='L3527'></a>% Quotes. <a id='L3528' name='L3528'></a>\chardef\quotedblleft="5C <a id='L3529' name='L3529'></a>\chardef\quotedblright=`\" <a id='L3530' name='L3530'></a>\chardef\quoteleft=`\` <a id='L3531' name='L3531'></a>\chardef\quoteright=`\' <a id='L3532' name='L3532'></a> <a id='L3533' name='L3533'></a> <a id='L3534' name='L3534'></a>\message{page headings,} <a id='L3535' name='L3535'></a> <a id='L3536' name='L3536'></a>\newskip\titlepagetopglue \titlepagetopglue = 1.5in <a id='L3537' name='L3537'></a>\newskip\titlepagebottomglue \titlepagebottomglue = 2pc <a id='L3538' name='L3538'></a> <a id='L3539' name='L3539'></a>% First the title page. Must do @settitle before @titlepage. <a id='L3540' name='L3540'></a>\newif\ifseenauthor <a id='L3541' name='L3541'></a>\newif\iffinishedtitlepage <a id='L3542' name='L3542'></a> <a id='L3543' name='L3543'></a>% Do an implicit @contents or @shortcontents after @end titlepage if the <a id='L3544' name='L3544'></a>% user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. <a id='L3545' name='L3545'></a>% <a id='L3546' name='L3546'></a>\newif\ifsetcontentsaftertitlepage <a id='L3547' name='L3547'></a> \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue <a id='L3548' name='L3548'></a>\newif\ifsetshortcontentsaftertitlepage <a id='L3549' name='L3549'></a> \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue <a id='L3550' name='L3550'></a> <a id='L3551' name='L3551'></a>\parseargdef\shorttitlepage{% <a id='L3552' name='L3552'></a> \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}% <a id='L3553' name='L3553'></a> \endgroup\page\hbox{}\page} <a id='L3554' name='L3554'></a> <a id='L3555' name='L3555'></a>\envdef\titlepage{% <a id='L3556' name='L3556'></a> % Open one extra group, as we want to close it in the middle of \Etitlepage. <a id='L3557' name='L3557'></a> \begingroup <a id='L3558' name='L3558'></a> \parindent=0pt \textfonts <a id='L3559' name='L3559'></a> % Leave some space at the very top of the page. <a id='L3560' name='L3560'></a> \vglue\titlepagetopglue <a id='L3561' name='L3561'></a> % No rule at page bottom unless we print one at the top with @title. <a id='L3562' name='L3562'></a> \finishedtitlepagetrue <a id='L3563' name='L3563'></a> % <a id='L3564' name='L3564'></a> % Most title ``pages'' are actually two pages long, with space <a id='L3565' name='L3565'></a> % at the top of the second. We don't want the ragged left on the second. <a id='L3566' name='L3566'></a> \let\oldpage = \page <a id='L3567' name='L3567'></a> \def\page{% <a id='L3568' name='L3568'></a> \iffinishedtitlepage\else <a id='L3569' name='L3569'></a> \finishtitlepage <a id='L3570' name='L3570'></a> \fi <a id='L3571' name='L3571'></a> \let\page = \oldpage <a id='L3572' name='L3572'></a> \page <a id='L3573' name='L3573'></a> \null <a id='L3574' name='L3574'></a> }% <a id='L3575' name='L3575'></a>} <a id='L3576' name='L3576'></a> <a id='L3577' name='L3577'></a>\def\Etitlepage{% <a id='L3578' name='L3578'></a> \iffinishedtitlepage\else <a id='L3579' name='L3579'></a> \finishtitlepage <a id='L3580' name='L3580'></a> \fi <a id='L3581' name='L3581'></a> % It is important to do the page break before ending the group, <a id='L3582' name='L3582'></a> % because the headline and footline are only empty inside the group. <a id='L3583' name='L3583'></a> % If we use the new definition of \page, we always get a blank page <a id='L3584' name='L3584'></a> % after the title page, which we certainly don't want. <a id='L3585' name='L3585'></a> \oldpage <a id='L3586' name='L3586'></a> \endgroup <a id='L3587' name='L3587'></a> % <a id='L3588' name='L3588'></a> % Need this before the \...aftertitlepage checks so that if they are <a id='L3589' name='L3589'></a> % in effect the toc pages will come out with page numbers. <a id='L3590' name='L3590'></a> \HEADINGSon <a id='L3591' name='L3591'></a> % <a id='L3592' name='L3592'></a> % If they want short, they certainly want long too. <a id='L3593' name='L3593'></a> \ifsetshortcontentsaftertitlepage <a id='L3594' name='L3594'></a> \shortcontents <a id='L3595' name='L3595'></a> \contents <a id='L3596' name='L3596'></a> \global\let\shortcontents = \relax <a id='L3597' name='L3597'></a> \global\let\contents = \relax <a id='L3598' name='L3598'></a> \fi <a id='L3599' name='L3599'></a> % <a id='L3600' name='L3600'></a> \ifsetcontentsaftertitlepage <a id='L3601' name='L3601'></a> \contents <a id='L3602' name='L3602'></a> \global\let\contents = \relax <a id='L3603' name='L3603'></a> \global\let\shortcontents = \relax <a id='L3604' name='L3604'></a> \fi <a id='L3605' name='L3605'></a>} <a id='L3606' name='L3606'></a> <a id='L3607' name='L3607'></a>\def\finishtitlepage{% <a id='L3608' name='L3608'></a> \vskip4pt \hrule height 2pt width \hsize <a id='L3609' name='L3609'></a> \vskip\titlepagebottomglue <a id='L3610' name='L3610'></a> \finishedtitlepagetrue <a id='L3611' name='L3611'></a>} <a id='L3612' name='L3612'></a> <a id='L3613' name='L3613'></a>% Settings used for typesetting titles: no hyphenation, no indentation, <a id='L3614' name='L3614'></a>% don't worry much about spacing, ragged right. This should be used <a id='L3615' name='L3615'></a>% inside a \vbox, and fonts need to be set appropriately first. Because <a id='L3616' name='L3616'></a>% it is always used for titles, nothing else, we call \rmisbold. \par <a id='L3617' name='L3617'></a>% should be specified before the end of the \vbox, since a vbox is a group. <a id='L3618' name='L3618'></a>% <a id='L3619' name='L3619'></a>\def\raggedtitlesettings{% <a id='L3620' name='L3620'></a> \rmisbold <a id='L3621' name='L3621'></a> \hyphenpenalty=10000 <a id='L3622' name='L3622'></a> \parindent=0pt <a id='L3623' name='L3623'></a> \tolerance=5000 <a id='L3624' name='L3624'></a> \ptexraggedright <a id='L3625' name='L3625'></a>} <a id='L3626' name='L3626'></a> <a id='L3627' name='L3627'></a>% Macros to be used within @titlepage: <a id='L3628' name='L3628'></a> <a id='L3629' name='L3629'></a>\let\subtitlerm=\tenrm <a id='L3630' name='L3630'></a>\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} <a id='L3631' name='L3631'></a> <a id='L3632' name='L3632'></a>\parseargdef\title{% <a id='L3633' name='L3633'></a> \checkenv\titlepage <a id='L3634' name='L3634'></a> \vbox{\titlefonts \raggedtitlesettings #1\par}% <a id='L3635' name='L3635'></a> % print a rule at the page bottom also. <a id='L3636' name='L3636'></a> \finishedtitlepagefalse <a id='L3637' name='L3637'></a> \vskip4pt \hrule height 4pt width \hsize \vskip4pt <a id='L3638' name='L3638'></a>} <a id='L3639' name='L3639'></a> <a id='L3640' name='L3640'></a>\parseargdef\subtitle{% <a id='L3641' name='L3641'></a> \checkenv\titlepage <a id='L3642' name='L3642'></a> {\subtitlefont \rightline{#1}}% <a id='L3643' name='L3643'></a>} <a id='L3644' name='L3644'></a> <a id='L3645' name='L3645'></a>% @author should come last, but may come many times. <a id='L3646' name='L3646'></a>% It can also be used inside @quotation. <a id='L3647' name='L3647'></a>% <a id='L3648' name='L3648'></a>\parseargdef\author{% <a id='L3649' name='L3649'></a> \def\temp{\quotation}% <a id='L3650' name='L3650'></a> \ifx\thisenv\temp <a id='L3651' name='L3651'></a> \def\quotationauthor{#1}% printed in \Equotation. <a id='L3652' name='L3652'></a> \else <a id='L3653' name='L3653'></a> \checkenv\titlepage <a id='L3654' name='L3654'></a> \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi <a id='L3655' name='L3655'></a> {\secfonts\rmisbold \leftline{#1}}% <a id='L3656' name='L3656'></a> \fi <a id='L3657' name='L3657'></a>} <a id='L3658' name='L3658'></a> <a id='L3659' name='L3659'></a> <a id='L3660' name='L3660'></a>% Set up page headings and footings. <a id='L3661' name='L3661'></a> <a id='L3662' name='L3662'></a>\let\thispage=\folio <a id='L3663' name='L3663'></a> <a id='L3664' name='L3664'></a>\newtoks\evenheadline % headline on even pages <a id='L3665' name='L3665'></a>\newtoks\oddheadline % headline on odd pages <a id='L3666' name='L3666'></a>\newtoks\evenfootline % footline on even pages <a id='L3667' name='L3667'></a>\newtoks\oddfootline % footline on odd pages <a id='L3668' name='L3668'></a> <a id='L3669' name='L3669'></a>% Now make TeX use those variables <a id='L3670' name='L3670'></a>\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline <a id='L3671' name='L3671'></a> \else \the\evenheadline \fi}} <a id='L3672' name='L3672'></a>\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline <a id='L3673' name='L3673'></a> \else \the\evenfootline \fi}\HEADINGShook} <a id='L3674' name='L3674'></a>\let\HEADINGShook=\relax <a id='L3675' name='L3675'></a> <a id='L3676' name='L3676'></a>% Commands to set those variables. <a id='L3677' name='L3677'></a>% For example, this is what @headings on does <a id='L3678' name='L3678'></a>% @evenheading @thistitle|@thispage|@thischapter <a id='L3679' name='L3679'></a>% @oddheading @thischapter|@thispage|@thistitle <a id='L3680' name='L3680'></a>% @evenfooting @thisfile|| <a id='L3681' name='L3681'></a>% @oddfooting ||@thisfile <a id='L3682' name='L3682'></a> <a id='L3683' name='L3683'></a> <a id='L3684' name='L3684'></a>\def\evenheading{\parsearg\evenheadingxxx} <a id='L3685' name='L3685'></a>\def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish} <a id='L3686' name='L3686'></a>\def\evenheadingyyy #1\|#2\|#3\|#4\finish{% <a id='L3687' name='L3687'></a>\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} <a id='L3688' name='L3688'></a> <a id='L3689' name='L3689'></a>\def\oddheading{\parsearg\oddheadingxxx} <a id='L3690' name='L3690'></a>\def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish} <a id='L3691' name='L3691'></a>\def\oddheadingyyy #1\|#2\|#3\|#4\finish{% <a id='L3692' name='L3692'></a>\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} <a id='L3693' name='L3693'></a> <a id='L3694' name='L3694'></a>\parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}% <a id='L3695' name='L3695'></a> <a id='L3696' name='L3696'></a>\def\evenfooting{\parsearg\evenfootingxxx} <a id='L3697' name='L3697'></a>\def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish} <a id='L3698' name='L3698'></a>\def\evenfootingyyy #1\|#2\|#3\|#4\finish{% <a id='L3699' name='L3699'></a>\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} <a id='L3700' name='L3700'></a> <a id='L3701' name='L3701'></a>\def\oddfooting{\parsearg\oddfootingxxx} <a id='L3702' name='L3702'></a>\def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish} <a id='L3703' name='L3703'></a>\def\oddfootingyyy #1\|#2\|#3\|#4\finish{% <a id='L3704' name='L3704'></a> \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% <a id='L3705' name='L3705'></a> % <a id='L3706' name='L3706'></a> % Leave some space for the footline. Hopefully ok to assume <a id='L3707' name='L3707'></a> % @evenfooting will not be used by itself. <a id='L3708' name='L3708'></a> \global\advance\pageheight by -12pt <a id='L3709' name='L3709'></a> \global\advance\vsize by -12pt <a id='L3710' name='L3710'></a>} <a id='L3711' name='L3711'></a> <a id='L3712' name='L3712'></a>\parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} <a id='L3713' name='L3713'></a> <a id='L3714' name='L3714'></a>% @evenheadingmarks top \thischapter <- chapter at the top of a page <a id='L3715' name='L3715'></a>% @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page <a id='L3716' name='L3716'></a>% <a id='L3717' name='L3717'></a>% The same set of arguments for: <a id='L3718' name='L3718'></a>% <a id='L3719' name='L3719'></a>% @oddheadingmarks <a id='L3720' name='L3720'></a>% @evenfootingmarks <a id='L3721' name='L3721'></a>% @oddfootingmarks <a id='L3722' name='L3722'></a>% @everyheadingmarks <a id='L3723' name='L3723'></a>% @everyfootingmarks <a id='L3724' name='L3724'></a> <a id='L3725' name='L3725'></a>\def\evenheadingmarks{\headingmarks{even}{heading}} <a id='L3726' name='L3726'></a>\def\oddheadingmarks{\headingmarks{odd}{heading}} <a id='L3727' name='L3727'></a>\def\evenfootingmarks{\headingmarks{even}{footing}} <a id='L3728' name='L3728'></a>\def\oddfootingmarks{\headingmarks{odd}{footing}} <a id='L3729' name='L3729'></a>\def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1} <a id='L3730' name='L3730'></a> \headingmarks{odd}{heading}{#1} } <a id='L3731' name='L3731'></a>\def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1} <a id='L3732' name='L3732'></a> \headingmarks{odd}{footing}{#1} } <a id='L3733' name='L3733'></a>% #1 = even/odd, #2 = heading/footing, #3 = top/bottom. <a id='L3734' name='L3734'></a>\def\headingmarks#1#2#3 {% <a id='L3735' name='L3735'></a> \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname <a id='L3736' name='L3736'></a> \global\expandafter\let\csname get#1#2marks\endcsname \temp <a id='L3737' name='L3737'></a>} <a id='L3738' name='L3738'></a> <a id='L3739' name='L3739'></a>\everyheadingmarks bottom <a id='L3740' name='L3740'></a>\everyfootingmarks bottom <a id='L3741' name='L3741'></a> <a id='L3742' name='L3742'></a>% @headings double turns headings on for double-sided printing. <a id='L3743' name='L3743'></a>% @headings single turns headings on for single-sided printing. <a id='L3744' name='L3744'></a>% @headings off turns them off. <a id='L3745' name='L3745'></a>% @headings on same as @headings double, retained for compatibility. <a id='L3746' name='L3746'></a>% @headings after turns on double-sided headings after this page. <a id='L3747' name='L3747'></a>% @headings doubleafter turns on double-sided headings after this page. <a id='L3748' name='L3748'></a>% @headings singleafter turns on single-sided headings after this page. <a id='L3749' name='L3749'></a>% By default, they are off at the start of a document, <a id='L3750' name='L3750'></a>% and turned `on' after @end titlepage. <a id='L3751' name='L3751'></a> <a id='L3752' name='L3752'></a>\def\headings #1 {\csname HEADINGS#1\endcsname} <a id='L3753' name='L3753'></a> <a id='L3754' name='L3754'></a>\def\headingsoff{% non-global headings elimination <a id='L3755' name='L3755'></a> \evenheadline={\hfil}\evenfootline={\hfil}% <a id='L3756' name='L3756'></a> \oddheadline={\hfil}\oddfootline={\hfil}% <a id='L3757' name='L3757'></a>} <a id='L3758' name='L3758'></a> <a id='L3759' name='L3759'></a>\def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting <a id='L3760' name='L3760'></a>\HEADINGSoff % it's the default <a id='L3761' name='L3761'></a> <a id='L3762' name='L3762'></a>% When we turn headings on, set the page number to 1. <a id='L3763' name='L3763'></a>% For double-sided printing, put current file name in lower left corner, <a id='L3764' name='L3764'></a>% chapter name on inside top of right hand pages, document <a id='L3765' name='L3765'></a>% title on inside top of left hand pages, and page numbers on outside top <a id='L3766' name='L3766'></a>% edge of all pages. <a id='L3767' name='L3767'></a>\def\HEADINGSdouble{% <a id='L3768' name='L3768'></a>\global\pageno=1 <a id='L3769' name='L3769'></a>\global\evenfootline={\hfil} <a id='L3770' name='L3770'></a>\global\oddfootline={\hfil} <a id='L3771' name='L3771'></a>\global\evenheadline={\line{\folio\hfil\thistitle}} <a id='L3772' name='L3772'></a>\global\oddheadline={\line{\thischapter\hfil\folio}} <a id='L3773' name='L3773'></a>\global\let\contentsalignmacro = \chapoddpage <a id='L3774' name='L3774'></a>} <a id='L3775' name='L3775'></a>\let\contentsalignmacro = \chappager <a id='L3776' name='L3776'></a> <a id='L3777' name='L3777'></a>% For single-sided printing, chapter title goes across top left of page, <a id='L3778' name='L3778'></a>% page number on top right. <a id='L3779' name='L3779'></a>\def\HEADINGSsingle{% <a id='L3780' name='L3780'></a>\global\pageno=1 <a id='L3781' name='L3781'></a>\global\evenfootline={\hfil} <a id='L3782' name='L3782'></a>\global\oddfootline={\hfil} <a id='L3783' name='L3783'></a>\global\evenheadline={\line{\thischapter\hfil\folio}} <a id='L3784' name='L3784'></a>\global\oddheadline={\line{\thischapter\hfil\folio}} <a id='L3785' name='L3785'></a>\global\let\contentsalignmacro = \chappager <a id='L3786' name='L3786'></a>} <a id='L3787' name='L3787'></a>\def\HEADINGSon{\HEADINGSdouble} <a id='L3788' name='L3788'></a> <a id='L3789' name='L3789'></a>\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} <a id='L3790' name='L3790'></a>\let\HEADINGSdoubleafter=\HEADINGSafter <a id='L3791' name='L3791'></a>\def\HEADINGSdoublex{% <a id='L3792' name='L3792'></a>\global\evenfootline={\hfil} <a id='L3793' name='L3793'></a>\global\oddfootline={\hfil} <a id='L3794' name='L3794'></a>\global\evenheadline={\line{\folio\hfil\thistitle}} <a id='L3795' name='L3795'></a>\global\oddheadline={\line{\thischapter\hfil\folio}} <a id='L3796' name='L3796'></a>\global\let\contentsalignmacro = \chapoddpage <a id='L3797' name='L3797'></a>} <a id='L3798' name='L3798'></a> <a id='L3799' name='L3799'></a>\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} <a id='L3800' name='L3800'></a>\def\HEADINGSsinglex{% <a id='L3801' name='L3801'></a>\global\evenfootline={\hfil} <a id='L3802' name='L3802'></a>\global\oddfootline={\hfil} <a id='L3803' name='L3803'></a>\global\evenheadline={\line{\thischapter\hfil\folio}} <a id='L3804' name='L3804'></a>\global\oddheadline={\line{\thischapter\hfil\folio}} <a id='L3805' name='L3805'></a>\global\let\contentsalignmacro = \chappager <a id='L3806' name='L3806'></a>} <a id='L3807' name='L3807'></a> <a id='L3808' name='L3808'></a>% Subroutines used in generating headings <a id='L3809' name='L3809'></a>% This produces Day Month Year style of output. <a id='L3810' name='L3810'></a>% Only define if not already defined, in case a txi-??.tex file has set <a id='L3811' name='L3811'></a>% up a different format (e.g., txi-cs.tex does this). <a id='L3812' name='L3812'></a>\ifx\today\thisisundefined <a id='L3813' name='L3813'></a>\def\today{% <a id='L3814' name='L3814'></a> \number\day\space <a id='L3815' name='L3815'></a> \ifcase\month <a id='L3816' name='L3816'></a> \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr <a id='L3817' name='L3817'></a> \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug <a id='L3818' name='L3818'></a> \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec <a id='L3819' name='L3819'></a> \fi <a id='L3820' name='L3820'></a> \space\number\year} <a id='L3821' name='L3821'></a>\fi <a id='L3822' name='L3822'></a> <a id='L3823' name='L3823'></a>% @settitle line... specifies the title of the document, for headings. <a id='L3824' name='L3824'></a>% It generates no output of its own. <a id='L3825' name='L3825'></a>\def\thistitle{\putwordNoTitle} <a id='L3826' name='L3826'></a>\def\settitle{\parsearg{\gdef\thistitle}} <a id='L3827' name='L3827'></a> <a id='L3828' name='L3828'></a> <a id='L3829' name='L3829'></a>\message{tables,} <a id='L3830' name='L3830'></a>% Tables -- @table, @ftable, @vtable, @item(x). <a id='L3831' name='L3831'></a> <a id='L3832' name='L3832'></a>% default indentation of table text <a id='L3833' name='L3833'></a>\newdimen\tableindent \tableindent=.8in <a id='L3834' name='L3834'></a>% default indentation of @itemize and @enumerate text <a id='L3835' name='L3835'></a>\newdimen\itemindent \itemindent=.3in <a id='L3836' name='L3836'></a>% margin between end of table item and start of table text. <a id='L3837' name='L3837'></a>\newdimen\itemmargin \itemmargin=.1in <a id='L3838' name='L3838'></a> <a id='L3839' name='L3839'></a>% used internally for \itemindent minus \itemmargin <a id='L3840' name='L3840'></a>\newdimen\itemmax <a id='L3841' name='L3841'></a> <a id='L3842' name='L3842'></a>% Note @table, @ftable, and @vtable define @item, @itemx, etc., with <a id='L3843' name='L3843'></a>% these defs. <a id='L3844' name='L3844'></a>% They also define \itemindex <a id='L3845' name='L3845'></a>% to index the item name in whatever manner is desired (perhaps none). <a id='L3846' name='L3846'></a> <a id='L3847' name='L3847'></a>\newif\ifitemxneedsnegativevskip <a id='L3848' name='L3848'></a> <a id='L3849' name='L3849'></a>\def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} <a id='L3850' name='L3850'></a> <a id='L3851' name='L3851'></a>\def\internalBitem{\smallbreak \parsearg\itemzzz} <a id='L3852' name='L3852'></a>\def\internalBitemx{\itemxpar \parsearg\itemzzz} <a id='L3853' name='L3853'></a> <a id='L3854' name='L3854'></a>\def\itemzzz #1{\begingroup % <a id='L3855' name='L3855'></a> \advance\hsize by -\rightskip <a id='L3856' name='L3856'></a> \advance\hsize by -\tableindent <a id='L3857' name='L3857'></a> \setbox0=\hbox{\itemindicate{#1}}% <a id='L3858' name='L3858'></a> \itemindex{#1}% <a id='L3859' name='L3859'></a> \nobreak % This prevents a break before @itemx. <a id='L3860' name='L3860'></a> % <a id='L3861' name='L3861'></a> % If the item text does not fit in the space we have, put it on a line <a id='L3862' name='L3862'></a> % by itself, and do not allow a page break either before or after that <a id='L3863' name='L3863'></a> % line. We do not start a paragraph here because then if the next <a id='L3864' name='L3864'></a> % command is, e.g., @kindex, the whatsit would get put into the <a id='L3865' name='L3865'></a> % horizontal list on a line by itself, resulting in extra blank space. <a id='L3866' name='L3866'></a> \ifdim \wd0>\itemmax <a id='L3867' name='L3867'></a> % <a id='L3868' name='L3868'></a> % Make this a paragraph so we get the \parskip glue and wrapping, <a id='L3869' name='L3869'></a> % but leave it ragged-right. <a id='L3870' name='L3870'></a> \begingroup <a id='L3871' name='L3871'></a> \advance\leftskip by-\tableindent <a id='L3872' name='L3872'></a> \advance\hsize by\tableindent <a id='L3873' name='L3873'></a> \advance\rightskip by0pt plus1fil\relax <a id='L3874' name='L3874'></a> \leavevmode\unhbox0\par <a id='L3875' name='L3875'></a> \endgroup <a id='L3876' name='L3876'></a> % <a id='L3877' name='L3877'></a> % We're going to be starting a paragraph, but we don't want the <a id='L3878' name='L3878'></a> % \parskip glue -- logically it's part of the @item we just started. <a id='L3879' name='L3879'></a> \nobreak \vskip-\parskip <a id='L3880' name='L3880'></a> % <a id='L3881' name='L3881'></a> % Stop a page break at the \parskip glue coming up. However, if <a id='L3882' name='L3882'></a> % what follows is an environment such as @example, there will be no <a id='L3883' name='L3883'></a> % \parskip glue; then the negative vskip we just inserted would <a id='L3884' name='L3884'></a> % cause the example and the item to crash together. So we use this <a id='L3885' name='L3885'></a> % bizarre value of 10001 as a signal to \aboveenvbreak to insert <a id='L3886' name='L3886'></a> % \parskip glue after all. Section titles are handled this way also. <a id='L3887' name='L3887'></a> % <a id='L3888' name='L3888'></a> \penalty 10001 <a id='L3889' name='L3889'></a> \endgroup <a id='L3890' name='L3890'></a> \itemxneedsnegativevskipfalse <a id='L3891' name='L3891'></a> \else <a id='L3892' name='L3892'></a> % The item text fits into the space. Start a paragraph, so that the <a id='L3893' name='L3893'></a> % following text (if any) will end up on the same line. <a id='L3894' name='L3894'></a> \noindent <a id='L3895' name='L3895'></a> % Do this with kerns and \unhbox so that if there is a footnote in <a id='L3896' name='L3896'></a> % the item text, it can migrate to the main vertical list and <a id='L3897' name='L3897'></a> % eventually be printed. <a id='L3898' name='L3898'></a> \nobreak\kern-\tableindent <a id='L3899' name='L3899'></a> \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 <a id='L3900' name='L3900'></a> \unhbox0 <a id='L3901' name='L3901'></a> \nobreak\kern\dimen0 <a id='L3902' name='L3902'></a> \endgroup <a id='L3903' name='L3903'></a> \itemxneedsnegativevskiptrue <a id='L3904' name='L3904'></a> \fi <a id='L3905' name='L3905'></a>} <a id='L3906' name='L3906'></a> <a id='L3907' name='L3907'></a>\def\item{\errmessage{@item while not in a list environment}} <a id='L3908' name='L3908'></a>\def\itemx{\errmessage{@itemx while not in a list environment}} <a id='L3909' name='L3909'></a> <a id='L3910' name='L3910'></a>% @table, @ftable, @vtable. <a id='L3911' name='L3911'></a>\envdef\table{% <a id='L3912' name='L3912'></a> \let\itemindex\gobble <a id='L3913' name='L3913'></a> \tablecheck{table}% <a id='L3914' name='L3914'></a>} <a id='L3915' name='L3915'></a>\envdef\ftable{% <a id='L3916' name='L3916'></a> \def\itemindex ##1{\doind {fn}{\code{##1}}}% <a id='L3917' name='L3917'></a> \tablecheck{ftable}% <a id='L3918' name='L3918'></a>} <a id='L3919' name='L3919'></a>\envdef\vtable{% <a id='L3920' name='L3920'></a> \def\itemindex ##1{\doind {vr}{\code{##1}}}% <a id='L3921' name='L3921'></a> \tablecheck{vtable}% <a id='L3922' name='L3922'></a>} <a id='L3923' name='L3923'></a>\def\tablecheck#1{% <a id='L3924' name='L3924'></a> \ifnum \the\catcode`\^^M=\active <a id='L3925' name='L3925'></a> \endgroup <a id='L3926' name='L3926'></a> \errmessage{This command won't work in this context; perhaps the problem is <a id='L3927' name='L3927'></a> that we are \inenvironment\thisenv}% <a id='L3928' name='L3928'></a> \def\next{\doignore{#1}}% <a id='L3929' name='L3929'></a> \else <a id='L3930' name='L3930'></a> \let\next\tablex <a id='L3931' name='L3931'></a> \fi <a id='L3932' name='L3932'></a> \next <a id='L3933' name='L3933'></a>} <a id='L3934' name='L3934'></a>\def\tablex#1{% <a id='L3935' name='L3935'></a> \def\itemindicate{#1}% <a id='L3936' name='L3936'></a> \parsearg\tabley <a id='L3937' name='L3937'></a>} <a id='L3938' name='L3938'></a>\def\tabley#1{% <a id='L3939' name='L3939'></a> {% <a id='L3940' name='L3940'></a> \makevalueexpandable <a id='L3941' name='L3941'></a> \edef\temp{\noexpand\tablez #1\space\space\space}% <a id='L3942' name='L3942'></a> \expandafter <a id='L3943' name='L3943'></a> }\temp \endtablez <a id='L3944' name='L3944'></a>} <a id='L3945' name='L3945'></a>\def\tablez #1 #2 #3 #4\endtablez{% <a id='L3946' name='L3946'></a> \aboveenvbreak <a id='L3947' name='L3947'></a> \ifnum 0#1>0 \advance \leftskip by #1\mil \fi <a id='L3948' name='L3948'></a> \ifnum 0#2>0 \tableindent=#2\mil \fi <a id='L3949' name='L3949'></a> \ifnum 0#3>0 \advance \rightskip by #3\mil \fi <a id='L3950' name='L3950'></a> \itemmax=\tableindent <a id='L3951' name='L3951'></a> \advance \itemmax by -\itemmargin <a id='L3952' name='L3952'></a> \advance \leftskip by \tableindent <a id='L3953' name='L3953'></a> \exdentamount=\tableindent <a id='L3954' name='L3954'></a> \parindent = 0pt <a id='L3955' name='L3955'></a> \parskip = \smallskipamount <a id='L3956' name='L3956'></a> \ifdim \parskip=0pt \parskip=2pt \fi <a id='L3957' name='L3957'></a> \let\item = \internalBitem <a id='L3958' name='L3958'></a> \let\itemx = \internalBitemx <a id='L3959' name='L3959'></a>} <a id='L3960' name='L3960'></a>\def\Etable{\endgraf\afterenvbreak} <a id='L3961' name='L3961'></a>\let\Eftable\Etable <a id='L3962' name='L3962'></a>\let\Evtable\Etable <a id='L3963' name='L3963'></a>\let\Eitemize\Etable <a id='L3964' name='L3964'></a>\let\Eenumerate\Etable <a id='L3965' name='L3965'></a> <a id='L3966' name='L3966'></a>% This is the counter used by @enumerate, which is really @itemize <a id='L3967' name='L3967'></a> <a id='L3968' name='L3968'></a>\newcount \itemno <a id='L3969' name='L3969'></a> <a id='L3970' name='L3970'></a>\envdef\itemize{\parsearg\doitemize} <a id='L3971' name='L3971'></a> <a id='L3972' name='L3972'></a>\def\doitemize#1{% <a id='L3973' name='L3973'></a> \aboveenvbreak <a id='L3974' name='L3974'></a> \itemmax=\itemindent <a id='L3975' name='L3975'></a> \advance\itemmax by -\itemmargin <a id='L3976' name='L3976'></a> \advance\leftskip by \itemindent <a id='L3977' name='L3977'></a> \exdentamount=\itemindent <a id='L3978' name='L3978'></a> \parindent=0pt <a id='L3979' name='L3979'></a> \parskip=\smallskipamount <a id='L3980' name='L3980'></a> \ifdim\parskip=0pt \parskip=2pt \fi <a id='L3981' name='L3981'></a> % <a id='L3982' name='L3982'></a> % Try typesetting the item mark that if the document erroneously says <a id='L3983' name='L3983'></a> % something like @itemize @samp (intending @table), there's an error <a id='L3984' name='L3984'></a> % right away at the @itemize. It's not the best error message in the <a id='L3985' name='L3985'></a> % world, but it's better than leaving it to the @item. This means if <a id='L3986' name='L3986'></a> % the user wants an empty mark, they have to say @w{} not just @w. <a id='L3987' name='L3987'></a> \def\itemcontents{#1}% <a id='L3988' name='L3988'></a> \setbox0 = \hbox{\itemcontents}% <a id='L3989' name='L3989'></a> % <a id='L3990' name='L3990'></a> % @itemize with no arg is equivalent to @itemize @bullet. <a id='L3991' name='L3991'></a> \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi <a id='L3992' name='L3992'></a> % <a id='L3993' name='L3993'></a> \let\item=\itemizeitem <a id='L3994' name='L3994'></a>} <a id='L3995' name='L3995'></a> <a id='L3996' name='L3996'></a>% Definition of @item while inside @itemize and @enumerate. <a id='L3997' name='L3997'></a>% <a id='L3998' name='L3998'></a>\def\itemizeitem{% <a id='L3999' name='L3999'></a> \advance\itemno by 1 % for enumerations <a id='L4000' name='L4000'></a> {\let\par=\endgraf \smallbreak}% reasonable place to break <a id='L4001' name='L4001'></a> {% <a id='L4002' name='L4002'></a> % If the document has an @itemize directly after a section title, a <a id='L4003' name='L4003'></a> % \nobreak will be last on the list, and \sectionheading will have <a id='L4004' name='L4004'></a> % done a \vskip-\parskip. In that case, we don't want to zero <a id='L4005' name='L4005'></a> % parskip, or the item text will crash with the heading. On the <a id='L4006' name='L4006'></a> % other hand, when there is normal text preceding the item (as there <a id='L4007' name='L4007'></a> % usually is), we do want to zero parskip, or there would be too much <a id='L4008' name='L4008'></a> % space. In that case, we won't have a \nobreak before. At least <a id='L4009' name='L4009'></a> % that's the theory. <a id='L4010' name='L4010'></a> \ifnum\lastpenalty<10000 \parskip=0in \fi <a id='L4011' name='L4011'></a> \noindent <a id='L4012' name='L4012'></a> \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% <a id='L4013' name='L4013'></a> % <a id='L4014' name='L4014'></a> \vadjust{\penalty 1200}}% not good to break after first line of item. <a id='L4015' name='L4015'></a> \flushcr <a id='L4016' name='L4016'></a>} <a id='L4017' name='L4017'></a> <a id='L4018' name='L4018'></a>% \splitoff TOKENS\endmark defines \first to be the first token in <a id='L4019' name='L4019'></a>% TOKENS, and \rest to be the remainder. <a id='L4020' name='L4020'></a>% <a id='L4021' name='L4021'></a>\def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% <a id='L4022' name='L4022'></a> <a id='L4023' name='L4023'></a>% Allow an optional argument of an uppercase letter, lowercase letter, <a id='L4024' name='L4024'></a>% or number, to specify the first label in the enumerated list. No <a id='L4025' name='L4025'></a>% argument is the same as `1'. <a id='L4026' name='L4026'></a>% <a id='L4027' name='L4027'></a>\envparseargdef\enumerate{\enumeratey #1 \endenumeratey} <a id='L4028' name='L4028'></a>\def\enumeratey #1 #2\endenumeratey{% <a id='L4029' name='L4029'></a> % If we were given no argument, pretend we were given `1'. <a id='L4030' name='L4030'></a> \def\thearg{#1}% <a id='L4031' name='L4031'></a> \ifx\thearg\empty \def\thearg{1}\fi <a id='L4032' name='L4032'></a> % <a id='L4033' name='L4033'></a> % Detect if the argument is a single token. If so, it might be a <a id='L4034' name='L4034'></a> % letter. Otherwise, the only valid thing it can be is a number. <a id='L4035' name='L4035'></a> % (We will always have one token, because of the test we just made. <a id='L4036' name='L4036'></a> % This is a good thing, since \splitoff doesn't work given nothing at <a id='L4037' name='L4037'></a> % all -- the first parameter is undelimited.) <a id='L4038' name='L4038'></a> \expandafter\splitoff\thearg\endmark <a id='L4039' name='L4039'></a> \ifx\rest\empty <a id='L4040' name='L4040'></a> % Only one token in the argument. It could still be anything. <a id='L4041' name='L4041'></a> % A ``lowercase letter'' is one whose \lccode is nonzero. <a id='L4042' name='L4042'></a> % An ``uppercase letter'' is one whose \lccode is both nonzero, and <a id='L4043' name='L4043'></a> % not equal to itself. <a id='L4044' name='L4044'></a> % Otherwise, we assume it's a number. <a id='L4045' name='L4045'></a> % <a id='L4046' name='L4046'></a> % We need the \relax at the end of the \ifnum lines to stop TeX from <a id='L4047' name='L4047'></a> % continuing to look for a <number>. <a id='L4048' name='L4048'></a> % <a id='L4049' name='L4049'></a> \ifnum\lccode\expandafter`\thearg=0\relax <a id='L4050' name='L4050'></a> \numericenumerate % a number (we hope) <a id='L4051' name='L4051'></a> \else <a id='L4052' name='L4052'></a> % It's a letter. <a id='L4053' name='L4053'></a> \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax <a id='L4054' name='L4054'></a> \lowercaseenumerate % lowercase letter <a id='L4055' name='L4055'></a> \else <a id='L4056' name='L4056'></a> \uppercaseenumerate % uppercase letter <a id='L4057' name='L4057'></a> \fi <a id='L4058' name='L4058'></a> \fi <a id='L4059' name='L4059'></a> \else <a id='L4060' name='L4060'></a> % Multiple tokens in the argument. We hope it's a number. <a id='L4061' name='L4061'></a> \numericenumerate <a id='L4062' name='L4062'></a> \fi <a id='L4063' name='L4063'></a>} <a id='L4064' name='L4064'></a> <a id='L4065' name='L4065'></a>% An @enumerate whose labels are integers. The starting integer is <a id='L4066' name='L4066'></a>% given in \thearg. <a id='L4067' name='L4067'></a>% <a id='L4068' name='L4068'></a>\def\numericenumerate{% <a id='L4069' name='L4069'></a> \itemno = \thearg <a id='L4070' name='L4070'></a> \startenumeration{\the\itemno}% <a id='L4071' name='L4071'></a>} <a id='L4072' name='L4072'></a> <a id='L4073' name='L4073'></a>% The starting (lowercase) letter is in \thearg. <a id='L4074' name='L4074'></a>\def\lowercaseenumerate{% <a id='L4075' name='L4075'></a> \itemno = \expandafter`\thearg <a id='L4076' name='L4076'></a> \startenumeration{% <a id='L4077' name='L4077'></a> % Be sure we're not beyond the end of the alphabet. <a id='L4078' name='L4078'></a> \ifnum\itemno=0 <a id='L4079' name='L4079'></a> \errmessage{No more lowercase letters in @enumerate; get a bigger <a id='L4080' name='L4080'></a> alphabet}% <a id='L4081' name='L4081'></a> \fi <a id='L4082' name='L4082'></a> \char\lccode\itemno <a id='L4083' name='L4083'></a> }% <a id='L4084' name='L4084'></a>} <a id='L4085' name='L4085'></a> <a id='L4086' name='L4086'></a>% The starting (uppercase) letter is in \thearg. <a id='L4087' name='L4087'></a>\def\uppercaseenumerate{% <a id='L4088' name='L4088'></a> \itemno = \expandafter`\thearg <a id='L4089' name='L4089'></a> \startenumeration{% <a id='L4090' name='L4090'></a> % Be sure we're not beyond the end of the alphabet. <a id='L4091' name='L4091'></a> \ifnum\itemno=0 <a id='L4092' name='L4092'></a> \errmessage{No more uppercase letters in @enumerate; get a bigger <a id='L4093' name='L4093'></a> alphabet} <a id='L4094' name='L4094'></a> \fi <a id='L4095' name='L4095'></a> \char\uccode\itemno <a id='L4096' name='L4096'></a> }% <a id='L4097' name='L4097'></a>} <a id='L4098' name='L4098'></a> <a id='L4099' name='L4099'></a>% Call \doitemize, adding a period to the first argument and supplying the <a id='L4100' name='L4100'></a>% common last two arguments. Also subtract one from the initial value in <a id='L4101' name='L4101'></a>% \itemno, since @item increments \itemno. <a id='L4102' name='L4102'></a>% <a id='L4103' name='L4103'></a>\def\startenumeration#1{% <a id='L4104' name='L4104'></a> \advance\itemno by -1 <a id='L4105' name='L4105'></a> \doitemize{#1.}\flushcr <a id='L4106' name='L4106'></a>} <a id='L4107' name='L4107'></a> <a id='L4108' name='L4108'></a>% @alphaenumerate and @capsenumerate are abbreviations for giving an arg <a id='L4109' name='L4109'></a>% to @enumerate. <a id='L4110' name='L4110'></a>% <a id='L4111' name='L4111'></a>\def\alphaenumerate{\enumerate{a}} <a id='L4112' name='L4112'></a>\def\capsenumerate{\enumerate{A}} <a id='L4113' name='L4113'></a>\def\Ealphaenumerate{\Eenumerate} <a id='L4114' name='L4114'></a>\def\Ecapsenumerate{\Eenumerate} <a id='L4115' name='L4115'></a> <a id='L4116' name='L4116'></a> <a id='L4117' name='L4117'></a>% @multitable macros <a id='L4118' name='L4118'></a>% Amy Hendrickson, 8/18/94, 3/6/96 <a id='L4119' name='L4119'></a>% <a id='L4120' name='L4120'></a>% @multitable ... @end multitable will make as many columns as desired. <a id='L4121' name='L4121'></a>% Contents of each column will wrap at width given in preamble. Width <a id='L4122' name='L4122'></a>% can be specified either with sample text given in a template line, <a id='L4123' name='L4123'></a>% or in percent of \hsize, the current width of text on page. <a id='L4124' name='L4124'></a> <a id='L4125' name='L4125'></a>% Table can continue over pages but will only break between lines. <a id='L4126' name='L4126'></a> <a id='L4127' name='L4127'></a>% To make preamble: <a id='L4128' name='L4128'></a>% <a id='L4129' name='L4129'></a>% Either define widths of columns in terms of percent of \hsize: <a id='L4130' name='L4130'></a>% @multitable @columnfractions .25 .3 .45 <a id='L4131' name='L4131'></a>% @item ... <a id='L4132' name='L4132'></a>% <a id='L4133' name='L4133'></a>% Numbers following @columnfractions are the percent of the total <a id='L4134' name='L4134'></a>% current hsize to be used for each column. You may use as many <a id='L4135' name='L4135'></a>% columns as desired. <a id='L4136' name='L4136'></a> <a id='L4137' name='L4137'></a> <a id='L4138' name='L4138'></a>% Or use a template: <a id='L4139' name='L4139'></a>% @multitable {Column 1 template} {Column 2 template} {Column 3 template} <a id='L4140' name='L4140'></a>% @item ... <a id='L4141' name='L4141'></a>% using the widest term desired in each column. <a id='L4142' name='L4142'></a> <a id='L4143' name='L4143'></a>% Each new table line starts with @item, each subsequent new column <a id='L4144' name='L4144'></a>% starts with @tab. Empty columns may be produced by supplying @tab's <a id='L4145' name='L4145'></a>% with nothing between them for as many times as empty columns are needed, <a id='L4146' name='L4146'></a>% ie, @tab@tab@tab will produce two empty columns. <a id='L4147' name='L4147'></a> <a id='L4148' name='L4148'></a>% @item, @tab do not need to be on their own lines, but it will not hurt <a id='L4149' name='L4149'></a>% if they are. <a id='L4150' name='L4150'></a> <a id='L4151' name='L4151'></a>% Sample multitable: <a id='L4152' name='L4152'></a> <a id='L4153' name='L4153'></a>% @multitable {Column 1 template} {Column 2 template} {Column 3 template} <a id='L4154' name='L4154'></a>% @item first col stuff @tab second col stuff @tab third col <a id='L4155' name='L4155'></a>% @item <a id='L4156' name='L4156'></a>% first col stuff <a id='L4157' name='L4157'></a>% @tab <a id='L4158' name='L4158'></a>% second col stuff <a id='L4159' name='L4159'></a>% @tab <a id='L4160' name='L4160'></a>% third col <a id='L4161' name='L4161'></a>% @item first col stuff @tab second col stuff <a id='L4162' name='L4162'></a>% @tab Many paragraphs of text may be used in any column. <a id='L4163' name='L4163'></a>% <a id='L4164' name='L4164'></a>% They will wrap at the width determined by the template. <a id='L4165' name='L4165'></a>% @item@tab@tab This will be in third column. <a id='L4166' name='L4166'></a>% @end multitable <a id='L4167' name='L4167'></a> <a id='L4168' name='L4168'></a>% Default dimensions may be reset by user. <a id='L4169' name='L4169'></a>% @multitableparskip is vertical space between paragraphs in table. <a id='L4170' name='L4170'></a>% @multitableparindent is paragraph indent in table. <a id='L4171' name='L4171'></a>% @multitablecolmargin is horizontal space to be left between columns. <a id='L4172' name='L4172'></a>% @multitablelinespace is space to leave between table items, baseline <a id='L4173' name='L4173'></a>% to baseline. <a id='L4174' name='L4174'></a>% 0pt means it depends on current normal line spacing. <a id='L4175' name='L4175'></a>% <a id='L4176' name='L4176'></a>\newskip\multitableparskip <a id='L4177' name='L4177'></a>\newskip\multitableparindent <a id='L4178' name='L4178'></a>\newdimen\multitablecolspace <a id='L4179' name='L4179'></a>\newskip\multitablelinespace <a id='L4180' name='L4180'></a>\multitableparskip=0pt <a id='L4181' name='L4181'></a>\multitableparindent=6pt <a id='L4182' name='L4182'></a>\multitablecolspace=12pt <a id='L4183' name='L4183'></a>\multitablelinespace=0pt <a id='L4184' name='L4184'></a> <a id='L4185' name='L4185'></a>% Macros used to set up halign preamble: <a id='L4186' name='L4186'></a>% <a id='L4187' name='L4187'></a>\let\endsetuptable\relax <a id='L4188' name='L4188'></a>\def\xendsetuptable{\endsetuptable} <a id='L4189' name='L4189'></a>\let\columnfractions\relax <a id='L4190' name='L4190'></a>\def\xcolumnfractions{\columnfractions} <a id='L4191' name='L4191'></a>\newif\ifsetpercent <a id='L4192' name='L4192'></a> <a id='L4193' name='L4193'></a>% #1 is the @columnfraction, usually a decimal number like .5, but might <a id='L4194' name='L4194'></a>% be just 1. We just use it, whatever it is. <a id='L4195' name='L4195'></a>% <a id='L4196' name='L4196'></a>\def\pickupwholefraction#1 {% <a id='L4197' name='L4197'></a> \global\advance\colcount by 1 <a id='L4198' name='L4198'></a> \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}% <a id='L4199' name='L4199'></a> \setuptable <a id='L4200' name='L4200'></a>} <a id='L4201' name='L4201'></a> <a id='L4202' name='L4202'></a>\newcount\colcount <a id='L4203' name='L4203'></a>\def\setuptable#1{% <a id='L4204' name='L4204'></a> \def\firstarg{#1}% <a id='L4205' name='L4205'></a> \ifx\firstarg\xendsetuptable <a id='L4206' name='L4206'></a> \let\go = \relax <a id='L4207' name='L4207'></a> \else <a id='L4208' name='L4208'></a> \ifx\firstarg\xcolumnfractions <a id='L4209' name='L4209'></a> \global\setpercenttrue <a id='L4210' name='L4210'></a> \else <a id='L4211' name='L4211'></a> \ifsetpercent <a id='L4212' name='L4212'></a> \let\go\pickupwholefraction <a id='L4213' name='L4213'></a> \else <a id='L4214' name='L4214'></a> \global\advance\colcount by 1 <a id='L4215' name='L4215'></a> \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a <a id='L4216' name='L4216'></a> % separator; typically that is always in the input, anyway. <a id='L4217' name='L4217'></a> \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% <a id='L4218' name='L4218'></a> \fi <a id='L4219' name='L4219'></a> \fi <a id='L4220' name='L4220'></a> \ifx\go\pickupwholefraction <a id='L4221' name='L4221'></a> % Put the argument back for the \pickupwholefraction call, so <a id='L4222' name='L4222'></a> % we'll always have a period there to be parsed. <a id='L4223' name='L4223'></a> \def\go{\pickupwholefraction#1}% <a id='L4224' name='L4224'></a> \else <a id='L4225' name='L4225'></a> \let\go = \setuptable <a id='L4226' name='L4226'></a> \fi% <a id='L4227' name='L4227'></a> \fi <a id='L4228' name='L4228'></a> \go <a id='L4229' name='L4229'></a>} <a id='L4230' name='L4230'></a> <a id='L4231' name='L4231'></a>% multitable-only commands. <a id='L4232' name='L4232'></a>% <a id='L4233' name='L4233'></a>% @headitem starts a heading row, which we typeset in bold. <a id='L4234' name='L4234'></a>% Assignments have to be global since we are inside the implicit group <a id='L4235' name='L4235'></a>% of an alignment entry. \everycr resets \everytab so we don't have to <a id='L4236' name='L4236'></a>% undo it ourselves. <a id='L4237' name='L4237'></a>\def\headitemfont{\b}% for people to use in the template row; not changeable <a id='L4238' name='L4238'></a>\def\headitem{% <a id='L4239' name='L4239'></a> \checkenv\multitable <a id='L4240' name='L4240'></a> \crcr <a id='L4241' name='L4241'></a> \global\everytab={\bf}% can't use \headitemfont since the parsing differs <a id='L4242' name='L4242'></a> \the\everytab % for the first item <a id='L4243' name='L4243'></a>}% <a id='L4244' name='L4244'></a>% <a id='L4245' name='L4245'></a>% A \tab used to include \hskip1sp. But then the space in a template <a id='L4246' name='L4246'></a>% line is not enough. That is bad. So let's go back to just `&' until <a id='L4247' name='L4247'></a>% we again encounter the problem the 1sp was intended to solve. <a id='L4248' name='L4248'></a>% --karl, nathan@acm.org, 20apr99. <a id='L4249' name='L4249'></a>\def\tab{\checkenv\multitable &\the\everytab}% <a id='L4250' name='L4250'></a> <a id='L4251' name='L4251'></a>% @multitable ... @end multitable definitions: <a id='L4252' name='L4252'></a>% <a id='L4253' name='L4253'></a>\newtoks\everytab % insert after every tab. <a id='L4254' name='L4254'></a>% <a id='L4255' name='L4255'></a>\envdef\multitable{% <a id='L4256' name='L4256'></a> \vskip\parskip <a id='L4257' name='L4257'></a> \startsavinginserts <a id='L4258' name='L4258'></a> % <a id='L4259' name='L4259'></a> % @item within a multitable starts a normal row. <a id='L4260' name='L4260'></a> % We use \def instead of \let so that if one of the multitable entries <a id='L4261' name='L4261'></a> % contains an @itemize, we don't choke on the \item (seen as \crcr aka <a id='L4262' name='L4262'></a> % \endtemplate) expanding \doitemize. <a id='L4263' name='L4263'></a> \def\item{\crcr}% <a id='L4264' name='L4264'></a> % <a id='L4265' name='L4265'></a> \tolerance=9500 <a id='L4266' name='L4266'></a> \hbadness=9500 <a id='L4267' name='L4267'></a> \setmultitablespacing <a id='L4268' name='L4268'></a> \parskip=\multitableparskip <a id='L4269' name='L4269'></a> \parindent=\multitableparindent <a id='L4270' name='L4270'></a> \overfullrule=0pt <a id='L4271' name='L4271'></a> \global\colcount=0 <a id='L4272' name='L4272'></a> % <a id='L4273' name='L4273'></a> \everycr = {% <a id='L4274' name='L4274'></a> \noalign{% <a id='L4275' name='L4275'></a> \global\everytab={}% <a id='L4276' name='L4276'></a> \global\colcount=0 % Reset the column counter. <a id='L4277' name='L4277'></a> % Check for saved footnotes, etc. <a id='L4278' name='L4278'></a> \checkinserts <a id='L4279' name='L4279'></a> % Keeps underfull box messages off when table breaks over pages. <a id='L4280' name='L4280'></a> %\filbreak <a id='L4281' name='L4281'></a> % Maybe so, but it also creates really weird page breaks when the <a id='L4282' name='L4282'></a> % table breaks over pages. Wouldn't \vfil be better? Wait until the <a id='L4283' name='L4283'></a> % problem manifests itself, so it can be fixed for real --karl. <a id='L4284' name='L4284'></a> }% <a id='L4285' name='L4285'></a> }% <a id='L4286' name='L4286'></a> % <a id='L4287' name='L4287'></a> \parsearg\domultitable <a id='L4288' name='L4288'></a>} <a id='L4289' name='L4289'></a>\def\domultitable#1{% <a id='L4290' name='L4290'></a> % To parse everything between @multitable and @item: <a id='L4291' name='L4291'></a> \setuptable#1 \endsetuptable <a id='L4292' name='L4292'></a> % <a id='L4293' name='L4293'></a> % This preamble sets up a generic column definition, which will <a id='L4294' name='L4294'></a> % be used as many times as user calls for columns. <a id='L4295' name='L4295'></a> % \vtop will set a single line and will also let text wrap and <a id='L4296' name='L4296'></a> % continue for many paragraphs if desired. <a id='L4297' name='L4297'></a> \halign\bgroup &% <a id='L4298' name='L4298'></a> \global\advance\colcount by 1 <a id='L4299' name='L4299'></a> \multistrut <a id='L4300' name='L4300'></a> \vtop{% <a id='L4301' name='L4301'></a> % Use the current \colcount to find the correct column width: <a id='L4302' name='L4302'></a> \hsize=\expandafter\csname col\the\colcount\endcsname <a id='L4303' name='L4303'></a> % <a id='L4304' name='L4304'></a> % In order to keep entries from bumping into each other <a id='L4305' name='L4305'></a> % we will add a \leftskip of \multitablecolspace to all columns after <a id='L4306' name='L4306'></a> % the first one. <a id='L4307' name='L4307'></a> % <a id='L4308' name='L4308'></a> % If a template has been used, we will add \multitablecolspace <a id='L4309' name='L4309'></a> % to the width of each template entry. <a id='L4310' name='L4310'></a> % <a id='L4311' name='L4311'></a> % If the user has set preamble in terms of percent of \hsize we will <a id='L4312' name='L4312'></a> % use that dimension as the width of the column, and the \leftskip <a id='L4313' name='L4313'></a> % will keep entries from bumping into each other. Table will start at <a id='L4314' name='L4314'></a> % left margin and final column will justify at right margin. <a id='L4315' name='L4315'></a> % <a id='L4316' name='L4316'></a> % Make sure we don't inherit \rightskip from the outer environment. <a id='L4317' name='L4317'></a> \rightskip=0pt <a id='L4318' name='L4318'></a> \ifnum\colcount=1 <a id='L4319' name='L4319'></a> % The first column will be indented with the surrounding text. <a id='L4320' name='L4320'></a> \advance\hsize by\leftskip <a id='L4321' name='L4321'></a> \else <a id='L4322' name='L4322'></a> \ifsetpercent \else <a id='L4323' name='L4323'></a> % If user has not set preamble in terms of percent of \hsize <a id='L4324' name='L4324'></a> % we will advance \hsize by \multitablecolspace. <a id='L4325' name='L4325'></a> \advance\hsize by \multitablecolspace <a id='L4326' name='L4326'></a> \fi <a id='L4327' name='L4327'></a> % In either case we will make \leftskip=\multitablecolspace: <a id='L4328' name='L4328'></a> \leftskip=\multitablecolspace <a id='L4329' name='L4329'></a> \fi <a id='L4330' name='L4330'></a> % Ignoring space at the beginning and end avoids an occasional spurious <a id='L4331' name='L4331'></a> % blank line, when TeX decides to break the line at the space before the <a id='L4332' name='L4332'></a> % box from the multistrut, so the strut ends up on a line by itself. <a id='L4333' name='L4333'></a> % For example: <a id='L4334' name='L4334'></a> % @multitable @columnfractions .11 .89 <a id='L4335' name='L4335'></a> % @item @code{#} <a id='L4336' name='L4336'></a> % @tab Legal holiday which is valid in major parts of the whole country. <a id='L4337' name='L4337'></a> % Is automatically provided with highlighting sequences respectively <a id='L4338' name='L4338'></a> % marking characters. <a id='L4339' name='L4339'></a> \noindent\ignorespaces##\unskip\multistrut <a id='L4340' name='L4340'></a> }\cr <a id='L4341' name='L4341'></a>} <a id='L4342' name='L4342'></a>\def\Emultitable{% <a id='L4343' name='L4343'></a> \crcr <a id='L4344' name='L4344'></a> \egroup % end the \halign <a id='L4345' name='L4345'></a> \global\setpercentfalse <a id='L4346' name='L4346'></a>} <a id='L4347' name='L4347'></a> <a id='L4348' name='L4348'></a>\def\setmultitablespacing{% <a id='L4349' name='L4349'></a> \def\multistrut{\strut}% just use the standard line spacing <a id='L4350' name='L4350'></a> % <a id='L4351' name='L4351'></a> % Compute \multitablelinespace (if not defined by user) for use in <a id='L4352' name='L4352'></a> % \multitableparskip calculation. We used define \multistrut based on <a id='L4353' name='L4353'></a> % this, but (ironically) that caused the spacing to be off. <a id='L4354' name='L4354'></a> % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. <a id='L4355' name='L4355'></a>\ifdim\multitablelinespace=0pt <a id='L4356' name='L4356'></a>\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip <a id='L4357' name='L4357'></a>\global\advance\multitablelinespace by-\ht0 <a id='L4358' name='L4358'></a>\fi <a id='L4359' name='L4359'></a>% Test to see if parskip is larger than space between lines of <a id='L4360' name='L4360'></a>% table. If not, do nothing. <a id='L4361' name='L4361'></a>% If so, set to same dimension as multitablelinespace. <a id='L4362' name='L4362'></a>\ifdim\multitableparskip>\multitablelinespace <a id='L4363' name='L4363'></a>\global\multitableparskip=\multitablelinespace <a id='L4364' name='L4364'></a>\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller <a id='L4365' name='L4365'></a> % than skip between lines in the table. <a id='L4366' name='L4366'></a>\fi% <a id='L4367' name='L4367'></a>\ifdim\multitableparskip=0pt <a id='L4368' name='L4368'></a>\global\multitableparskip=\multitablelinespace <a id='L4369' name='L4369'></a>\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller <a id='L4370' name='L4370'></a> % than skip between lines in the table. <a id='L4371' name='L4371'></a>\fi} <a id='L4372' name='L4372'></a> <a id='L4373' name='L4373'></a> <a id='L4374' name='L4374'></a>\message{conditionals,} <a id='L4375' name='L4375'></a> <a id='L4376' name='L4376'></a>% @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext, <a id='L4377' name='L4377'></a>% @ifnotxml always succeed. They currently do nothing; we don't <a id='L4378' name='L4378'></a>% attempt to check whether the conditionals are properly nested. But we <a id='L4379' name='L4379'></a>% have to remember that they are conditionals, so that @end doesn't <a id='L4380' name='L4380'></a>% attempt to close an environment group. <a id='L4381' name='L4381'></a>% <a id='L4382' name='L4382'></a>\def\makecond#1{% <a id='L4383' name='L4383'></a> \expandafter\let\csname #1\endcsname = \relax <a id='L4384' name='L4384'></a> \expandafter\let\csname iscond.#1\endcsname = 1 <a id='L4385' name='L4385'></a>} <a id='L4386' name='L4386'></a>\makecond{iftex} <a id='L4387' name='L4387'></a>\makecond{ifnotdocbook} <a id='L4388' name='L4388'></a>\makecond{ifnothtml} <a id='L4389' name='L4389'></a>\makecond{ifnotinfo} <a id='L4390' name='L4390'></a>\makecond{ifnotplaintext} <a id='L4391' name='L4391'></a>\makecond{ifnotxml} <a id='L4392' name='L4392'></a> <a id='L4393' name='L4393'></a>% Ignore @ignore, @ifhtml, @ifinfo, and the like. <a id='L4394' name='L4394'></a>% <a id='L4395' name='L4395'></a>\def\direntry{\doignore{direntry}} <a id='L4396' name='L4396'></a>\def\documentdescription{\doignore{documentdescription}} <a id='L4397' name='L4397'></a>\def\docbook{\doignore{docbook}} <a id='L4398' name='L4398'></a>\def\html{\doignore{html}} <a id='L4399' name='L4399'></a>\def\ifdocbook{\doignore{ifdocbook}} <a id='L4400' name='L4400'></a>\def\ifhtml{\doignore{ifhtml}} <a id='L4401' name='L4401'></a>\def\ifinfo{\doignore{ifinfo}} <a id='L4402' name='L4402'></a>\def\ifnottex{\doignore{ifnottex}} <a id='L4403' name='L4403'></a>\def\ifplaintext{\doignore{ifplaintext}} <a id='L4404' name='L4404'></a>\def\ifxml{\doignore{ifxml}} <a id='L4405' name='L4405'></a>\def\ignore{\doignore{ignore}} <a id='L4406' name='L4406'></a>\def\menu{\doignore{menu}} <a id='L4407' name='L4407'></a>\def\xml{\doignore{xml}} <a id='L4408' name='L4408'></a> <a id='L4409' name='L4409'></a>% Ignore text until a line `@end #1', keeping track of nested conditionals. <a id='L4410' name='L4410'></a>% <a id='L4411' name='L4411'></a>% A count to remember the depth of nesting. <a id='L4412' name='L4412'></a>\newcount\doignorecount <a id='L4413' name='L4413'></a> <a id='L4414' name='L4414'></a>\def\doignore#1{\begingroup <a id='L4415' name='L4415'></a> % Scan in ``verbatim'' mode: <a id='L4416' name='L4416'></a> \obeylines <a id='L4417' name='L4417'></a> \catcode`\@ = \other <a id='L4418' name='L4418'></a> \catcode`\{ = \other <a id='L4419' name='L4419'></a> \catcode`\} = \other <a id='L4420' name='L4420'></a> % <a id='L4421' name='L4421'></a> % Make sure that spaces turn into tokens that match what \doignoretext wants. <a id='L4422' name='L4422'></a> \spaceisspace <a id='L4423' name='L4423'></a> % <a id='L4424' name='L4424'></a> % Count number of #1's that we've seen. <a id='L4425' name='L4425'></a> \doignorecount = 0 <a id='L4426' name='L4426'></a> % <a id='L4427' name='L4427'></a> % Swallow text until we reach the matching `@end #1'. <a id='L4428' name='L4428'></a> \dodoignore{#1}% <a id='L4429' name='L4429'></a>} <a id='L4430' name='L4430'></a> <a id='L4431' name='L4431'></a>{ \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source. <a id='L4432' name='L4432'></a> \obeylines % <a id='L4433' name='L4433'></a> % <a id='L4434' name='L4434'></a> \gdef\dodoignore#1{% <a id='L4435' name='L4435'></a> % #1 contains the command name as a string, e.g., `ifinfo'. <a id='L4436' name='L4436'></a> % <a id='L4437' name='L4437'></a> % Define a command to find the next `@end #1'. <a id='L4438' name='L4438'></a> \long\def\doignoretext##1^^M@end #1{% <a id='L4439' name='L4439'></a> \doignoretextyyy##1^^M@#1\_STOP_}% <a id='L4440' name='L4440'></a> % <a id='L4441' name='L4441'></a> % And this command to find another #1 command, at the beginning of a <a id='L4442' name='L4442'></a> % line. (Otherwise, we would consider a line `@c @ifset', for <a id='L4443' name='L4443'></a> % example, to count as an @ifset for nesting.) <a id='L4444' name='L4444'></a> \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}% <a id='L4445' name='L4445'></a> % <a id='L4446' name='L4446'></a> % And now expand that command. <a id='L4447' name='L4447'></a> \doignoretext ^^M% <a id='L4448' name='L4448'></a> }% <a id='L4449' name='L4449'></a>} <a id='L4450' name='L4450'></a> <a id='L4451' name='L4451'></a>\def\doignoreyyy#1{% <a id='L4452' name='L4452'></a> \def\temp{#1}% <a id='L4453' name='L4453'></a> \ifx\temp\empty % Nothing found. <a id='L4454' name='L4454'></a> \let\next\doignoretextzzz <a id='L4455' name='L4455'></a> \else % Found a nested condition, ... <a id='L4456' name='L4456'></a> \advance\doignorecount by 1 <a id='L4457' name='L4457'></a> \let\next\doignoretextyyy % ..., look for another. <a id='L4458' name='L4458'></a> % If we're here, #1 ends with ^^M\ifinfo (for example). <a id='L4459' name='L4459'></a> \fi <a id='L4460' name='L4460'></a> \next #1% the token \_STOP_ is present just after this macro. <a id='L4461' name='L4461'></a>} <a id='L4462' name='L4462'></a> <a id='L4463' name='L4463'></a>% We have to swallow the remaining "\_STOP_". <a id='L4464' name='L4464'></a>% <a id='L4465' name='L4465'></a>\def\doignoretextzzz#1{% <a id='L4466' name='L4466'></a> \ifnum\doignorecount = 0 % We have just found the outermost @end. <a id='L4467' name='L4467'></a> \let\next\enddoignore <a id='L4468' name='L4468'></a> \else % Still inside a nested condition. <a id='L4469' name='L4469'></a> \advance\doignorecount by -1 <a id='L4470' name='L4470'></a> \let\next\doignoretext % Look for the next @end. <a id='L4471' name='L4471'></a> \fi <a id='L4472' name='L4472'></a> \next <a id='L4473' name='L4473'></a>} <a id='L4474' name='L4474'></a> <a id='L4475' name='L4475'></a>% Finish off ignored text. <a id='L4476' name='L4476'></a>{ \obeylines% <a id='L4477' name='L4477'></a> % Ignore anything after the last `@end #1'; this matters in verbatim <a id='L4478' name='L4478'></a> % environments, where otherwise the newline after an ignored conditional <a id='L4479' name='L4479'></a> % would result in a blank line in the output. <a id='L4480' name='L4480'></a> \gdef\enddoignore#1^^M{\endgroup\ignorespaces}% <a id='L4481' name='L4481'></a>} <a id='L4482' name='L4482'></a> <a id='L4483' name='L4483'></a> <a id='L4484' name='L4484'></a>% @set VAR sets the variable VAR to an empty value. <a id='L4485' name='L4485'></a>% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. <a id='L4486' name='L4486'></a>% <a id='L4487' name='L4487'></a>% Since we want to separate VAR from REST-OF-LINE (which might be <a id='L4488' name='L4488'></a>% empty), we can't just use \parsearg; we have to insert a space of our <a id='L4489' name='L4489'></a>% own to delimit the rest of the line, and then take it out again if we <a id='L4490' name='L4490'></a>% didn't need it. <a id='L4491' name='L4491'></a>% We rely on the fact that \parsearg sets \catcode`\ =10. <a id='L4492' name='L4492'></a>% <a id='L4493' name='L4493'></a>\parseargdef\set{\setyyy#1 \endsetyyy} <a id='L4494' name='L4494'></a>\def\setyyy#1 #2\endsetyyy{% <a id='L4495' name='L4495'></a> {% <a id='L4496' name='L4496'></a> \makevalueexpandable <a id='L4497' name='L4497'></a> \def\temp{#2}% <a id='L4498' name='L4498'></a> \edef\next{\gdef\makecsname{SET#1}}% <a id='L4499' name='L4499'></a> \ifx\temp\empty <a id='L4500' name='L4500'></a> \next{}% <a id='L4501' name='L4501'></a> \else <a id='L4502' name='L4502'></a> \setzzz#2\endsetzzz <a id='L4503' name='L4503'></a> \fi <a id='L4504' name='L4504'></a> }% <a id='L4505' name='L4505'></a>} <a id='L4506' name='L4506'></a>% Remove the trailing space \setxxx inserted. <a id='L4507' name='L4507'></a>\def\setzzz#1 \endsetzzz{\next{#1}} <a id='L4508' name='L4508'></a> <a id='L4509' name='L4509'></a>% @clear VAR clears (i.e., unsets) the variable VAR. <a id='L4510' name='L4510'></a>% <a id='L4511' name='L4511'></a>\parseargdef\clear{% <a id='L4512' name='L4512'></a> {% <a id='L4513' name='L4513'></a> \makevalueexpandable <a id='L4514' name='L4514'></a> \global\expandafter\let\csname SET#1\endcsname=\relax <a id='L4515' name='L4515'></a> }% <a id='L4516' name='L4516'></a>} <a id='L4517' name='L4517'></a> <a id='L4518' name='L4518'></a>% @value{foo} gets the text saved in variable foo. <a id='L4519' name='L4519'></a>\def\value{\begingroup\makevalueexpandable\valuexxx} <a id='L4520' name='L4520'></a>\def\valuexxx#1{\expandablevalue{#1}\endgroup} <a id='L4521' name='L4521'></a>{ <a id='L4522' name='L4522'></a> \catcode`\- = \active \catcode`\_ = \active <a id='L4523' name='L4523'></a> % <a id='L4524' name='L4524'></a> \gdef\makevalueexpandable{% <a id='L4525' name='L4525'></a> \let\value = \expandablevalue <a id='L4526' name='L4526'></a> % We don't want these characters active, ... <a id='L4527' name='L4527'></a> \catcode`\-=\other \catcode`\_=\other <a id='L4528' name='L4528'></a> % ..., but we might end up with active ones in the argument if <a id='L4529' name='L4529'></a> % we're called from @code, as @code{@value{foo-bar_}}, though. <a id='L4530' name='L4530'></a> % So \let them to their normal equivalents. <a id='L4531' name='L4531'></a> \let-\normaldash \let_\normalunderscore <a id='L4532' name='L4532'></a> } <a id='L4533' name='L4533'></a>} <a id='L4534' name='L4534'></a> <a id='L4535' name='L4535'></a>% We have this subroutine so that we can handle at least some @value's <a id='L4536' name='L4536'></a>% properly in indexes (we call \makevalueexpandable in \indexdummies). <a id='L4537' name='L4537'></a>% The command has to be fully expandable (if the variable is set), since <a id='L4538' name='L4538'></a>% the result winds up in the index file. This means that if the <a id='L4539' name='L4539'></a>% variable's value contains other Texinfo commands, it's almost certain <a id='L4540' name='L4540'></a>% it will fail (although perhaps we could fix that with sufficient work <a id='L4541' name='L4541'></a>% to do a one-level expansion on the result, instead of complete). <a id='L4542' name='L4542'></a>% <a id='L4543' name='L4543'></a>\def\expandablevalue#1{% <a id='L4544' name='L4544'></a> \expandafter\ifx\csname SET#1\endcsname\relax <a id='L4545' name='L4545'></a> {[No value for ``#1'']}% <a id='L4546' name='L4546'></a> \message{Variable `#1', used in @value, is not set.}% <a id='L4547' name='L4547'></a> \else <a id='L4548' name='L4548'></a> \csname SET#1\endcsname <a id='L4549' name='L4549'></a> \fi <a id='L4550' name='L4550'></a>} <a id='L4551' name='L4551'></a> <a id='L4552' name='L4552'></a>% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined <a id='L4553' name='L4553'></a>% with @set. <a id='L4554' name='L4554'></a>% <a id='L4555' name='L4555'></a>% To get the special treatment we need for `@end ifset,' we call <a id='L4556' name='L4556'></a>% \makecond and then redefine. <a id='L4557' name='L4557'></a>% <a id='L4558' name='L4558'></a>\makecond{ifset} <a id='L4559' name='L4559'></a>\def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} <a id='L4560' name='L4560'></a>\def\doifset#1#2{% <a id='L4561' name='L4561'></a> {% <a id='L4562' name='L4562'></a> \makevalueexpandable <a id='L4563' name='L4563'></a> \let\next=\empty <a id='L4564' name='L4564'></a> \expandafter\ifx\csname SET#2\endcsname\relax <a id='L4565' name='L4565'></a> #1% If not set, redefine \next. <a id='L4566' name='L4566'></a> \fi <a id='L4567' name='L4567'></a> \expandafter <a id='L4568' name='L4568'></a> }\next <a id='L4569' name='L4569'></a>} <a id='L4570' name='L4570'></a>\def\ifsetfail{\doignore{ifset}} <a id='L4571' name='L4571'></a> <a id='L4572' name='L4572'></a>% @ifclear VAR ... @end executes the `...' iff VAR has never been <a id='L4573' name='L4573'></a>% defined with @set, or has been undefined with @clear. <a id='L4574' name='L4574'></a>% <a id='L4575' name='L4575'></a>% The `\else' inside the `\doifset' parameter is a trick to reuse the <a id='L4576' name='L4576'></a>% above code: if the variable is not set, do nothing, if it is set, <a id='L4577' name='L4577'></a>% then redefine \next to \ifclearfail. <a id='L4578' name='L4578'></a>% <a id='L4579' name='L4579'></a>\makecond{ifclear} <a id='L4580' name='L4580'></a>\def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} <a id='L4581' name='L4581'></a>\def\ifclearfail{\doignore{ifclear}} <a id='L4582' name='L4582'></a> <a id='L4583' name='L4583'></a>% @ifcommandisdefined CMD ... @end executes the `...' if CMD (written <a id='L4584' name='L4584'></a>% without the @) is in fact defined. We can only feasibly check at the <a id='L4585' name='L4585'></a>% TeX level, so something like `mathcode' is going to considered <a id='L4586' name='L4586'></a>% defined even though it is not a Texinfo command. <a id='L4587' name='L4587'></a>% <a id='L4588' name='L4588'></a>\makecond{ifcommanddefined} <a id='L4589' name='L4589'></a>\def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}} <a id='L4590' name='L4590'></a>% <a id='L4591' name='L4591'></a>\def\doifcmddefined#1#2{{% <a id='L4592' name='L4592'></a> \makevalueexpandable <a id='L4593' name='L4593'></a> \let\next=\empty <a id='L4594' name='L4594'></a> \expandafter\ifx\csname #2\endcsname\relax <a id='L4595' name='L4595'></a> #1% If not defined, \let\next as above. <a id='L4596' name='L4596'></a> \fi <a id='L4597' name='L4597'></a> \expandafter <a id='L4598' name='L4598'></a> }\next <a id='L4599' name='L4599'></a>} <a id='L4600' name='L4600'></a>\def\ifcmddefinedfail{\doignore{ifcommanddefined}} <a id='L4601' name='L4601'></a> <a id='L4602' name='L4602'></a>% @ifcommandnotdefined CMD ... handled similar to @ifclear above. <a id='L4603' name='L4603'></a>\makecond{ifcommandnotdefined} <a id='L4604' name='L4604'></a>\def\ifcommandnotdefined{% <a id='L4605' name='L4605'></a> \parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}} <a id='L4606' name='L4606'></a>\def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined}} <a id='L4607' name='L4607'></a> <a id='L4608' name='L4608'></a>% Set the `txicommandconditionals' variable, so documents have a way to <a id='L4609' name='L4609'></a>% test if the @ifcommand...defined conditionals are available. <a id='L4610' name='L4610'></a>\set txicommandconditionals <a id='L4611' name='L4611'></a> <a id='L4612' name='L4612'></a>% @dircategory CATEGORY -- specify a category of the dir file <a id='L4613' name='L4613'></a>% which this file should belong to. Ignore this in TeX. <a id='L4614' name='L4614'></a>\let\dircategory=\comment <a id='L4615' name='L4615'></a> <a id='L4616' name='L4616'></a>% @defininfoenclose. <a id='L4617' name='L4617'></a>\let\definfoenclose=\comment <a id='L4618' name='L4618'></a> <a id='L4619' name='L4619'></a> <a id='L4620' name='L4620'></a>\message{indexing,} <a id='L4621' name='L4621'></a>% Index generation facilities <a id='L4622' name='L4622'></a> <a id='L4623' name='L4623'></a>% Define \newwrite to be identical to plain tex's \newwrite <a id='L4624' name='L4624'></a>% except not \outer, so it can be used within macros and \if's. <a id='L4625' name='L4625'></a>\edef\newwrite{\makecsname{ptexnewwrite}} <a id='L4626' name='L4626'></a> <a id='L4627' name='L4627'></a>% \newindex {foo} defines an index named foo. <a id='L4628' name='L4628'></a>% It automatically defines \fooindex such that <a id='L4629' name='L4629'></a>% \fooindex ...rest of line... puts an entry in the index foo. <a id='L4630' name='L4630'></a>% It also defines \fooindfile to be the number of the output channel for <a id='L4631' name='L4631'></a>% the file that accumulates this index. The file's extension is foo. <a id='L4632' name='L4632'></a>% The name of an index should be no more than 2 characters long <a id='L4633' name='L4633'></a>% for the sake of vms. <a id='L4634' name='L4634'></a>% <a id='L4635' name='L4635'></a>\def\newindex#1{% <a id='L4636' name='L4636'></a> \iflinks <a id='L4637' name='L4637'></a> \expandafter\newwrite \csname#1indfile\endcsname <a id='L4638' name='L4638'></a> \openout \csname#1indfile\endcsname \jobname.#1 % Open the file <a id='L4639' name='L4639'></a> \fi <a id='L4640' name='L4640'></a> \expandafter\xdef\csname#1index\endcsname{% % Define @#1index <a id='L4641' name='L4641'></a> \noexpand\doindex{#1}} <a id='L4642' name='L4642'></a>} <a id='L4643' name='L4643'></a> <a id='L4644' name='L4644'></a>% @defindex foo == \newindex{foo} <a id='L4645' name='L4645'></a>% <a id='L4646' name='L4646'></a>\def\defindex{\parsearg\newindex} <a id='L4647' name='L4647'></a> <a id='L4648' name='L4648'></a>% Define @defcodeindex, like @defindex except put all entries in @code. <a id='L4649' name='L4649'></a>% <a id='L4650' name='L4650'></a>\def\defcodeindex{\parsearg\newcodeindex} <a id='L4651' name='L4651'></a>% <a id='L4652' name='L4652'></a>\def\newcodeindex#1{% <a id='L4653' name='L4653'></a> \iflinks <a id='L4654' name='L4654'></a> \expandafter\newwrite \csname#1indfile\endcsname <a id='L4655' name='L4655'></a> \openout \csname#1indfile\endcsname \jobname.#1 <a id='L4656' name='L4656'></a> \fi <a id='L4657' name='L4657'></a> \expandafter\xdef\csname#1index\endcsname{% <a id='L4658' name='L4658'></a> \noexpand\docodeindex{#1}}% <a id='L4659' name='L4659'></a>} <a id='L4660' name='L4660'></a> <a id='L4661' name='L4661'></a> <a id='L4662' name='L4662'></a>% @synindex foo bar makes index foo feed into index bar. <a id='L4663' name='L4663'></a>% Do this instead of @defindex foo if you don't want it as a separate index. <a id='L4664' name='L4664'></a>% <a id='L4665' name='L4665'></a>% @syncodeindex foo bar similar, but put all entries made for index foo <a id='L4666' name='L4666'></a>% inside @code. <a id='L4667' name='L4667'></a>% <a id='L4668' name='L4668'></a>\def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} <a id='L4669' name='L4669'></a>\def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} <a id='L4670' name='L4670'></a> <a id='L4671' name='L4671'></a>% #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), <a id='L4672' name='L4672'></a>% #3 the target index (bar). <a id='L4673' name='L4673'></a>\def\dosynindex#1#2#3{% <a id='L4674' name='L4674'></a> % Only do \closeout if we haven't already done it, else we'll end up <a id='L4675' name='L4675'></a> % closing the target index. <a id='L4676' name='L4676'></a> \expandafter \ifx\csname donesynindex#2\endcsname \relax <a id='L4677' name='L4677'></a> % The \closeout helps reduce unnecessary open files; the limit on the <a id='L4678' name='L4678'></a> % Acorn RISC OS is a mere 16 files. <a id='L4679' name='L4679'></a> \expandafter\closeout\csname#2indfile\endcsname <a id='L4680' name='L4680'></a> \expandafter\let\csname donesynindex#2\endcsname = 1 <a id='L4681' name='L4681'></a> \fi <a id='L4682' name='L4682'></a> % redefine \fooindfile: <a id='L4683' name='L4683'></a> \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname <a id='L4684' name='L4684'></a> \expandafter\let\csname#2indfile\endcsname=\temp <a id='L4685' name='L4685'></a> % redefine \fooindex: <a id='L4686' name='L4686'></a> \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% <a id='L4687' name='L4687'></a>} <a id='L4688' name='L4688'></a> <a id='L4689' name='L4689'></a>% Define \doindex, the driver for all \fooindex macros. <a id='L4690' name='L4690'></a>% Argument #1 is generated by the calling \fooindex macro, <a id='L4691' name='L4691'></a>% and it is "foo", the name of the index. <a id='L4692' name='L4692'></a> <a id='L4693' name='L4693'></a>% \doindex just uses \parsearg; it calls \doind for the actual work. <a id='L4694' name='L4694'></a>% This is because \doind is more useful to call from other macros. <a id='L4695' name='L4695'></a> <a id='L4696' name='L4696'></a>% There is also \dosubind {index}{topic}{subtopic} <a id='L4697' name='L4697'></a>% which makes an entry in a two-level index such as the operation index. <a id='L4698' name='L4698'></a> <a id='L4699' name='L4699'></a>\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} <a id='L4700' name='L4700'></a>\def\singleindexer #1{\doind{\indexname}{#1}} <a id='L4701' name='L4701'></a> <a id='L4702' name='L4702'></a>% like the previous two, but they put @code around the argument. <a id='L4703' name='L4703'></a>\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} <a id='L4704' name='L4704'></a>\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} <a id='L4705' name='L4705'></a> <a id='L4706' name='L4706'></a>% Take care of Texinfo commands that can appear in an index entry. <a id='L4707' name='L4707'></a>% Since there are some commands we want to expand, and others we don't, <a id='L4708' name='L4708'></a>% we have to laboriously prevent expansion for those that we don't. <a id='L4709' name='L4709'></a>% <a id='L4710' name='L4710'></a>\def\indexdummies{% <a id='L4711' name='L4711'></a> \escapechar = `\\ % use backslash in output files. <a id='L4712' name='L4712'></a> \def\@{@}% change to @@ when we switch to @ as escape char in index files. <a id='L4713' name='L4713'></a> \def\ {\realbackslash\space }% <a id='L4714' name='L4714'></a> % <a id='L4715' name='L4715'></a> % Need these unexpandable (because we define \tt as a dummy) <a id='L4716' name='L4716'></a> % definitions when @{ or @} appear in index entry text. Also, more <a id='L4717' name='L4717'></a> % complicated, when \tex is in effect and \{ is a \delimiter again. <a id='L4718' name='L4718'></a> % We can't use \lbracecmd and \rbracecmd because texindex assumes <a id='L4719' name='L4719'></a> % braces and backslashes are used only as delimiters. Perhaps we <a id='L4720' name='L4720'></a> % should define @lbrace and @rbrace commands a la @comma. <a id='L4721' name='L4721'></a> \def\{{{\tt\char123}}% <a id='L4722' name='L4722'></a> \def\}{{\tt\char125}}% <a id='L4723' name='L4723'></a> % <a id='L4724' name='L4724'></a> % I don't entirely understand this, but when an index entry is <a id='L4725' name='L4725'></a> % generated from a macro call, the \endinput which \scanmacro inserts <a id='L4726' name='L4726'></a> % causes processing to be prematurely terminated. This is, <a id='L4727' name='L4727'></a> % apparently, because \indexsorttmp is fully expanded, and \endinput <a id='L4728' name='L4728'></a> % is an expandable command. The redefinition below makes \endinput <a id='L4729' name='L4729'></a> % disappear altogether for that purpose -- although logging shows that <a id='L4730' name='L4730'></a> % processing continues to some further point. On the other hand, it <a id='L4731' name='L4731'></a> % seems \endinput does not hurt in the printed index arg, since that <a id='L4732' name='L4732'></a> % is still getting written without apparent harm. <a id='L4733' name='L4733'></a> % <a id='L4734' name='L4734'></a> % Sample source (mac-idx3.tex, reported by Graham Percival to <a id='L4735' name='L4735'></a> % help-texinfo, 22may06): <a id='L4736' name='L4736'></a> % @macro funindex {WORD} <a id='L4737' name='L4737'></a> % @findex xyz <a id='L4738' name='L4738'></a> % @end macro <a id='L4739' name='L4739'></a> % ... <a id='L4740' name='L4740'></a> % @funindex commtest <a id='L4741' name='L4741'></a> % <a id='L4742' name='L4742'></a> % The above is not enough to reproduce the bug, but it gives the flavor. <a id='L4743' name='L4743'></a> % <a id='L4744' name='L4744'></a> % Sample whatsit resulting: <a id='L4745' name='L4745'></a> % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} <a id='L4746' name='L4746'></a> % <a id='L4747' name='L4747'></a> % So: <a id='L4748' name='L4748'></a> \let\endinput = \empty <a id='L4749' name='L4749'></a> % <a id='L4750' name='L4750'></a> % Do the redefinitions. <a id='L4751' name='L4751'></a> \commondummies <a id='L4752' name='L4752'></a>} <a id='L4753' name='L4753'></a> <a id='L4754' name='L4754'></a>% For the aux and toc files, @ is the escape character. So we want to <a id='L4755' name='L4755'></a>% redefine everything using @ as the escape character (instead of <a id='L4756' name='L4756'></a>% \realbackslash, still used for index files). When everything uses @, <a id='L4757' name='L4757'></a>% this will be simpler. <a id='L4758' name='L4758'></a>% <a id='L4759' name='L4759'></a>\def\atdummies{% <a id='L4760' name='L4760'></a> \def\@{@@}% <a id='L4761' name='L4761'></a> \def\ {@ }% <a id='L4762' name='L4762'></a> \let\{ = \lbraceatcmd <a id='L4763' name='L4763'></a> \let\} = \rbraceatcmd <a id='L4764' name='L4764'></a> % <a id='L4765' name='L4765'></a> % Do the redefinitions. <a id='L4766' name='L4766'></a> \commondummies <a id='L4767' name='L4767'></a> \otherbackslash <a id='L4768' name='L4768'></a>} <a id='L4769' name='L4769'></a> <a id='L4770' name='L4770'></a>% Called from \indexdummies and \atdummies. <a id='L4771' name='L4771'></a>% <a id='L4772' name='L4772'></a>\def\commondummies{% <a id='L4773' name='L4773'></a> % <a id='L4774' name='L4774'></a> % \definedummyword defines \#1 as \string\#1\space, thus effectively <a id='L4775' name='L4775'></a> % preventing its expansion. This is used only for control words, <a id='L4776' name='L4776'></a> % not control letters, because the \space would be incorrect for <a id='L4777' name='L4777'></a> % control characters, but is needed to separate the control word <a id='L4778' name='L4778'></a> % from whatever follows. <a id='L4779' name='L4779'></a> % <a id='L4780' name='L4780'></a> % For control letters, we have \definedummyletter, which omits the <a id='L4781' name='L4781'></a> % space. <a id='L4782' name='L4782'></a> % <a id='L4783' name='L4783'></a> % These can be used both for control words that take an argument and <a id='L4784' name='L4784'></a> % those that do not. If it is followed by {arg} in the input, then <a id='L4785' name='L4785'></a> % that will dutifully get written to the index (or wherever). <a id='L4786' name='L4786'></a> % <a id='L4787' name='L4787'></a> \def\definedummyword ##1{\def##1{\string##1\space}}% <a id='L4788' name='L4788'></a> \def\definedummyletter##1{\def##1{\string##1}}% <a id='L4789' name='L4789'></a> \let\definedummyaccent\definedummyletter <a id='L4790' name='L4790'></a> % <a id='L4791' name='L4791'></a> \commondummiesnofonts <a id='L4792' name='L4792'></a> % <a id='L4793' name='L4793'></a> \definedummyletter\_% <a id='L4794' name='L4794'></a> \definedummyletter\-% <a id='L4795' name='L4795'></a> % <a id='L4796' name='L4796'></a> % Non-English letters. <a id='L4797' name='L4797'></a> \definedummyword\AA <a id='L4798' name='L4798'></a> \definedummyword\AE <a id='L4799' name='L4799'></a> \definedummyword\DH <a id='L4800' name='L4800'></a> \definedummyword\L <a id='L4801' name='L4801'></a> \definedummyword\O <a id='L4802' name='L4802'></a> \definedummyword\OE <a id='L4803' name='L4803'></a> \definedummyword\TH <a id='L4804' name='L4804'></a> \definedummyword\aa <a id='L4805' name='L4805'></a> \definedummyword\ae <a id='L4806' name='L4806'></a> \definedummyword\dh <a id='L4807' name='L4807'></a> \definedummyword\exclamdown <a id='L4808' name='L4808'></a> \definedummyword\l <a id='L4809' name='L4809'></a> \definedummyword\o <a id='L4810' name='L4810'></a> \definedummyword\oe <a id='L4811' name='L4811'></a> \definedummyword\ordf <a id='L4812' name='L4812'></a> \definedummyword\ordm <a id='L4813' name='L4813'></a> \definedummyword\questiondown <a id='L4814' name='L4814'></a> \definedummyword\ss <a id='L4815' name='L4815'></a> \definedummyword\th <a id='L4816' name='L4816'></a> % <a id='L4817' name='L4817'></a> % Although these internal commands shouldn't show up, sometimes they do. <a id='L4818' name='L4818'></a> \definedummyword\bf <a id='L4819' name='L4819'></a> \definedummyword\gtr <a id='L4820' name='L4820'></a> \definedummyword\hat <a id='L4821' name='L4821'></a> \definedummyword\less <a id='L4822' name='L4822'></a> \definedummyword\sf <a id='L4823' name='L4823'></a> \definedummyword\sl <a id='L4824' name='L4824'></a> \definedummyword\tclose <a id='L4825' name='L4825'></a> \definedummyword\tt <a id='L4826' name='L4826'></a> % <a id='L4827' name='L4827'></a> \definedummyword\LaTeX <a id='L4828' name='L4828'></a> \definedummyword\TeX <a id='L4829' name='L4829'></a> % <a id='L4830' name='L4830'></a> % Assorted special characters. <a id='L4831' name='L4831'></a> \definedummyword\arrow <a id='L4832' name='L4832'></a> \definedummyword\bullet <a id='L4833' name='L4833'></a> \definedummyword\comma <a id='L4834' name='L4834'></a> \definedummyword\copyright <a id='L4835' name='L4835'></a> \definedummyword\registeredsymbol <a id='L4836' name='L4836'></a> \definedummyword\dots <a id='L4837' name='L4837'></a> \definedummyword\enddots <a id='L4838' name='L4838'></a> \definedummyword\entrybreak <a id='L4839' name='L4839'></a> \definedummyword\equiv <a id='L4840' name='L4840'></a> \definedummyword\error <a id='L4841' name='L4841'></a> \definedummyword\euro <a id='L4842' name='L4842'></a> \definedummyword\expansion <a id='L4843' name='L4843'></a> \definedummyword\geq <a id='L4844' name='L4844'></a> \definedummyword\guillemetleft <a id='L4845' name='L4845'></a> \definedummyword\guillemetright <a id='L4846' name='L4846'></a> \definedummyword\guilsinglleft <a id='L4847' name='L4847'></a> \definedummyword\guilsinglright <a id='L4848' name='L4848'></a> \definedummyword\lbracechar <a id='L4849' name='L4849'></a> \definedummyword\leq <a id='L4850' name='L4850'></a> \definedummyword\minus <a id='L4851' name='L4851'></a> \definedummyword\ogonek <a id='L4852' name='L4852'></a> \definedummyword\pounds <a id='L4853' name='L4853'></a> \definedummyword\point <a id='L4854' name='L4854'></a> \definedummyword\print <a id='L4855' name='L4855'></a> \definedummyword\quotedblbase <a id='L4856' name='L4856'></a> \definedummyword\quotedblleft <a id='L4857' name='L4857'></a> \definedummyword\quotedblright <a id='L4858' name='L4858'></a> \definedummyword\quoteleft <a id='L4859' name='L4859'></a> \definedummyword\quoteright <a id='L4860' name='L4860'></a> \definedummyword\quotesinglbase <a id='L4861' name='L4861'></a> \definedummyword\rbracechar <a id='L4862' name='L4862'></a> \definedummyword\result <a id='L4863' name='L4863'></a> \definedummyword\textdegree <a id='L4864' name='L4864'></a> % <a id='L4865' name='L4865'></a> % We want to disable all macros so that they are not expanded by \write. <a id='L4866' name='L4866'></a> \macrolist <a id='L4867' name='L4867'></a> % <a id='L4868' name='L4868'></a> \normalturnoffactive <a id='L4869' name='L4869'></a> % <a id='L4870' name='L4870'></a> % Handle some cases of @value -- where it does not contain any <a id='L4871' name='L4871'></a> % (non-fully-expandable) commands. <a id='L4872' name='L4872'></a> \makevalueexpandable <a id='L4873' name='L4873'></a>} <a id='L4874' name='L4874'></a> <a id='L4875' name='L4875'></a>% \commondummiesnofonts: common to \commondummies and \indexnofonts. <a id='L4876' name='L4876'></a>% <a id='L4877' name='L4877'></a>\def\commondummiesnofonts{% <a id='L4878' name='L4878'></a> % Control letters and accents. <a id='L4879' name='L4879'></a> \definedummyletter\!% <a id='L4880' name='L4880'></a> \definedummyaccent\"% <a id='L4881' name='L4881'></a> \definedummyaccent\'% <a id='L4882' name='L4882'></a> \definedummyletter\*% <a id='L4883' name='L4883'></a> \definedummyaccent\,% <a id='L4884' name='L4884'></a> \definedummyletter\.% <a id='L4885' name='L4885'></a> \definedummyletter\/% <a id='L4886' name='L4886'></a> \definedummyletter\:% <a id='L4887' name='L4887'></a> \definedummyaccent\=% <a id='L4888' name='L4888'></a> \definedummyletter\?% <a id='L4889' name='L4889'></a> \definedummyaccent\^% <a id='L4890' name='L4890'></a> \definedummyaccent\`% <a id='L4891' name='L4891'></a> \definedummyaccent\~% <a id='L4892' name='L4892'></a> \definedummyword\u <a id='L4893' name='L4893'></a> \definedummyword\v <a id='L4894' name='L4894'></a> \definedummyword\H <a id='L4895' name='L4895'></a> \definedummyword\dotaccent <a id='L4896' name='L4896'></a> \definedummyword\ogonek <a id='L4897' name='L4897'></a> \definedummyword\ringaccent <a id='L4898' name='L4898'></a> \definedummyword\tieaccent <a id='L4899' name='L4899'></a> \definedummyword\ubaraccent <a id='L4900' name='L4900'></a> \definedummyword\udotaccent <a id='L4901' name='L4901'></a> \definedummyword\dotless <a id='L4902' name='L4902'></a> % <a id='L4903' name='L4903'></a> % Texinfo font commands. <a id='L4904' name='L4904'></a> \definedummyword\b <a id='L4905' name='L4905'></a> \definedummyword\i <a id='L4906' name='L4906'></a> \definedummyword\r <a id='L4907' name='L4907'></a> \definedummyword\sansserif <a id='L4908' name='L4908'></a> \definedummyword\sc <a id='L4909' name='L4909'></a> \definedummyword\slanted <a id='L4910' name='L4910'></a> \definedummyword\t <a id='L4911' name='L4911'></a> % <a id='L4912' name='L4912'></a> % Commands that take arguments. <a id='L4913' name='L4913'></a> \definedummyword\abbr <a id='L4914' name='L4914'></a> \definedummyword\acronym <a id='L4915' name='L4915'></a> \definedummyword\anchor <a id='L4916' name='L4916'></a> \definedummyword\cite <a id='L4917' name='L4917'></a> \definedummyword\code <a id='L4918' name='L4918'></a> \definedummyword\command <a id='L4919' name='L4919'></a> \definedummyword\dfn <a id='L4920' name='L4920'></a> \definedummyword\dmn <a id='L4921' name='L4921'></a> \definedummyword\email <a id='L4922' name='L4922'></a> \definedummyword\emph <a id='L4923' name='L4923'></a> \definedummyword\env <a id='L4924' name='L4924'></a> \definedummyword\file <a id='L4925' name='L4925'></a> \definedummyword\image <a id='L4926' name='L4926'></a> \definedummyword\indicateurl <a id='L4927' name='L4927'></a> \definedummyword\inforef <a id='L4928' name='L4928'></a> \definedummyword\kbd <a id='L4929' name='L4929'></a> \definedummyword\key <a id='L4930' name='L4930'></a> \definedummyword\math <a id='L4931' name='L4931'></a> \definedummyword\option <a id='L4932' name='L4932'></a> \definedummyword\pxref <a id='L4933' name='L4933'></a> \definedummyword\ref <a id='L4934' name='L4934'></a> \definedummyword\samp <a id='L4935' name='L4935'></a> \definedummyword\strong <a id='L4936' name='L4936'></a> \definedummyword\tie <a id='L4937' name='L4937'></a> \definedummyword\uref <a id='L4938' name='L4938'></a> \definedummyword\url <a id='L4939' name='L4939'></a> \definedummyword\var <a id='L4940' name='L4940'></a> \definedummyword\verb <a id='L4941' name='L4941'></a> \definedummyword\w <a id='L4942' name='L4942'></a> \definedummyword\xref <a id='L4943' name='L4943'></a>} <a id='L4944' name='L4944'></a> <a id='L4945' name='L4945'></a>% \indexnofonts is used when outputting the strings to sort the index <a id='L4946' name='L4946'></a>% by, and when constructing control sequence names. It eliminates all <a id='L4947' name='L4947'></a>% control sequences and just writes whatever the best ASCII sort string <a id='L4948' name='L4948'></a>% would be for a given command (usually its argument). <a id='L4949' name='L4949'></a>% <a id='L4950' name='L4950'></a>\def\indexnofonts{% <a id='L4951' name='L4951'></a> % Accent commands should become @asis. <a id='L4952' name='L4952'></a> \def\definedummyaccent##1{\let##1\asis}% <a id='L4953' name='L4953'></a> % We can just ignore other control letters. <a id='L4954' name='L4954'></a> \def\definedummyletter##1{\let##1\empty}% <a id='L4955' name='L4955'></a> % All control words become @asis by default; overrides below. <a id='L4956' name='L4956'></a> \let\definedummyword\definedummyaccent <a id='L4957' name='L4957'></a> % <a id='L4958' name='L4958'></a> \commondummiesnofonts <a id='L4959' name='L4959'></a> % <a id='L4960' name='L4960'></a> % Don't no-op \tt, since it isn't a user-level command <a id='L4961' name='L4961'></a> % and is used in the definitions of the active chars like <, >, |, etc. <a id='L4962' name='L4962'></a> % Likewise with the other plain tex font commands. <a id='L4963' name='L4963'></a> %\let\tt=\asis <a id='L4964' name='L4964'></a> % <a id='L4965' name='L4965'></a> \def\ { }% <a id='L4966' name='L4966'></a> \def\@{@}% <a id='L4967' name='L4967'></a> \def\_{\normalunderscore}% <a id='L4968' name='L4968'></a> \def\-{}% @- shouldn't affect sorting <a id='L4969' name='L4969'></a> % <a id='L4970' name='L4970'></a> % Unfortunately, texindex is not prepared to handle braces in the <a id='L4971' name='L4971'></a> % content at all. So for index sorting, we map @{ and @} to strings <a id='L4972' name='L4972'></a> % starting with |, since that ASCII character is between ASCII { and }. <a id='L4973' name='L4973'></a> \def\{{|a}% <a id='L4974' name='L4974'></a> \def\lbracechar{|a}% <a id='L4975' name='L4975'></a> % <a id='L4976' name='L4976'></a> \def\}{|b}% <a id='L4977' name='L4977'></a> \def\rbracechar{|b}% <a id='L4978' name='L4978'></a> % <a id='L4979' name='L4979'></a> % Non-English letters. <a id='L4980' name='L4980'></a> \def\AA{AA}% <a id='L4981' name='L4981'></a> \def\AE{AE}% <a id='L4982' name='L4982'></a> \def\DH{DZZ}% <a id='L4983' name='L4983'></a> \def\L{L}% <a id='L4984' name='L4984'></a> \def\OE{OE}% <a id='L4985' name='L4985'></a> \def\O{O}% <a id='L4986' name='L4986'></a> \def\TH{ZZZ}% <a id='L4987' name='L4987'></a> \def\aa{aa}% <a id='L4988' name='L4988'></a> \def\ae{ae}% <a id='L4989' name='L4989'></a> \def\dh{dzz}% <a id='L4990' name='L4990'></a> \def\exclamdown{!}% <a id='L4991' name='L4991'></a> \def\l{l}% <a id='L4992' name='L4992'></a> \def\oe{oe}% <a id='L4993' name='L4993'></a> \def\ordf{a}% <a id='L4994' name='L4994'></a> \def\ordm{o}% <a id='L4995' name='L4995'></a> \def\o{o}% <a id='L4996' name='L4996'></a> \def\questiondown{?}% <a id='L4997' name='L4997'></a> \def\ss{ss}% <a id='L4998' name='L4998'></a> \def\th{zzz}% <a id='L4999' name='L4999'></a> % <a id='L5000' name='L5000'></a> \def\LaTeX{LaTeX}% <a id='L5001' name='L5001'></a> \def\TeX{TeX}% <a id='L5002' name='L5002'></a> % <a id='L5003' name='L5003'></a> % Assorted special characters. <a id='L5004' name='L5004'></a> % (The following {} will end up in the sort string, but that's ok.) <a id='L5005' name='L5005'></a> \def\arrow{->}% <a id='L5006' name='L5006'></a> \def\bullet{bullet}% <a id='L5007' name='L5007'></a> \def\comma{,}% <a id='L5008' name='L5008'></a> \def\copyright{copyright}% <a id='L5009' name='L5009'></a> \def\dots{...}% <a id='L5010' name='L5010'></a> \def\enddots{...}% <a id='L5011' name='L5011'></a> \def\equiv{==}% <a id='L5012' name='L5012'></a> \def\error{error}% <a id='L5013' name='L5013'></a> \def\euro{euro}% <a id='L5014' name='L5014'></a> \def\expansion{==>}% <a id='L5015' name='L5015'></a> \def\geq{>=}% <a id='L5016' name='L5016'></a> \def\guillemetleft{<<}% <a id='L5017' name='L5017'></a> \def\guillemetright{>>}% <a id='L5018' name='L5018'></a> \def\guilsinglleft{<}% <a id='L5019' name='L5019'></a> \def\guilsinglright{>}% <a id='L5020' name='L5020'></a> \def\leq{<=}% <a id='L5021' name='L5021'></a> \def\minus{-}% <a id='L5022' name='L5022'></a> \def\point{.}% <a id='L5023' name='L5023'></a> \def\pounds{pounds}% <a id='L5024' name='L5024'></a> \def\print{-|}% <a id='L5025' name='L5025'></a> \def\quotedblbase{"}% <a id='L5026' name='L5026'></a> \def\quotedblleft{"}% <a id='L5027' name='L5027'></a> \def\quotedblright{"}% <a id='L5028' name='L5028'></a> \def\quoteleft{`}% <a id='L5029' name='L5029'></a> \def\quoteright{'}% <a id='L5030' name='L5030'></a> \def\quotesinglbase{,}% <a id='L5031' name='L5031'></a> \def\registeredsymbol{R}% <a id='L5032' name='L5032'></a> \def\result{=>}% <a id='L5033' name='L5033'></a> \def\textdegree{o}% <a id='L5034' name='L5034'></a> % <a id='L5035' name='L5035'></a> \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax <a id='L5036' name='L5036'></a> \else \indexlquoteignore \fi <a id='L5037' name='L5037'></a> % <a id='L5038' name='L5038'></a> % We need to get rid of all macros, leaving only the arguments (if present). <a id='L5039' name='L5039'></a> % Of course this is not nearly correct, but it is the best we can do for now. <a id='L5040' name='L5040'></a> % makeinfo does not expand macros in the argument to @deffn, which ends up <a id='L5041' name='L5041'></a> % writing an index entry, and texindex isn't prepared for an index sort entry <a id='L5042' name='L5042'></a> % that starts with \. <a id='L5043' name='L5043'></a> % <a id='L5044' name='L5044'></a> % Since macro invocations are followed by braces, we can just redefine them <a id='L5045' name='L5045'></a> % to take a single TeX argument. The case of a macro invocation that <a id='L5046' name='L5046'></a> % goes to end-of-line is not handled. <a id='L5047' name='L5047'></a> % <a id='L5048' name='L5048'></a> \macrolist <a id='L5049' name='L5049'></a>} <a id='L5050' name='L5050'></a> <a id='L5051' name='L5051'></a>% Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us <a id='L5052' name='L5052'></a>% ignore left quotes in the sort term. <a id='L5053' name='L5053'></a>{\catcode`\`=\active <a id='L5054' name='L5054'></a> \gdef\indexlquoteignore{\let`=\empty}} <a id='L5055' name='L5055'></a> <a id='L5056' name='L5056'></a>\let\indexbackslash=0 %overridden during \printindex. <a id='L5057' name='L5057'></a>\let\SETmarginindex=\relax % put index entries in margin (undocumented)? <a id='L5058' name='L5058'></a> <a id='L5059' name='L5059'></a>% Most index entries go through here, but \dosubind is the general case. <a id='L5060' name='L5060'></a>% #1 is the index name, #2 is the entry text. <a id='L5061' name='L5061'></a>\def\doind#1#2{\dosubind{#1}{#2}{}} <a id='L5062' name='L5062'></a> <a id='L5063' name='L5063'></a>% Workhorse for all \fooindexes. <a id='L5064' name='L5064'></a>% #1 is name of index, #2 is stuff to put there, #3 is subentry -- <a id='L5065' name='L5065'></a>% empty if called from \doind, as we usually are (the main exception <a id='L5066' name='L5066'></a>% is with most defuns, which call us directly). <a id='L5067' name='L5067'></a>% <a id='L5068' name='L5068'></a>\def\dosubind#1#2#3{% <a id='L5069' name='L5069'></a> \iflinks <a id='L5070' name='L5070'></a> {% <a id='L5071' name='L5071'></a> % Store the main index entry text (including the third arg). <a id='L5072' name='L5072'></a> \toks0 = {#2}% <a id='L5073' name='L5073'></a> % If third arg is present, precede it with a space. <a id='L5074' name='L5074'></a> \def\thirdarg{#3}% <a id='L5075' name='L5075'></a> \ifx\thirdarg\empty \else <a id='L5076' name='L5076'></a> \toks0 = \expandafter{\the\toks0 \space #3}% <a id='L5077' name='L5077'></a> \fi <a id='L5078' name='L5078'></a> % <a id='L5079' name='L5079'></a> \edef\writeto{\csname#1indfile\endcsname}% <a id='L5080' name='L5080'></a> % <a id='L5081' name='L5081'></a> \safewhatsit\dosubindwrite <a id='L5082' name='L5082'></a> }% <a id='L5083' name='L5083'></a> \fi <a id='L5084' name='L5084'></a>} <a id='L5085' name='L5085'></a> <a id='L5086' name='L5086'></a>% Write the entry in \toks0 to the index file: <a id='L5087' name='L5087'></a>% <a id='L5088' name='L5088'></a>\def\dosubindwrite{% <a id='L5089' name='L5089'></a> % Put the index entry in the margin if desired. <a id='L5090' name='L5090'></a> \ifx\SETmarginindex\relax\else <a id='L5091' name='L5091'></a> \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% <a id='L5092' name='L5092'></a> \fi <a id='L5093' name='L5093'></a> % <a id='L5094' name='L5094'></a> % Remember, we are within a group. <a id='L5095' name='L5095'></a> \indexdummies % Must do this here, since \bf, etc expand at this stage <a id='L5096' name='L5096'></a> \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now <a id='L5097' name='L5097'></a> % so it will be output as is; and it will print as backslash. <a id='L5098' name='L5098'></a> % <a id='L5099' name='L5099'></a> % Process the index entry with all font commands turned off, to <a id='L5100' name='L5100'></a> % get the string to sort by. <a id='L5101' name='L5101'></a> {\indexnofonts <a id='L5102' name='L5102'></a> \edef\temp{\the\toks0}% need full expansion <a id='L5103' name='L5103'></a> \xdef\indexsorttmp{\temp}% <a id='L5104' name='L5104'></a> }% <a id='L5105' name='L5105'></a> % <a id='L5106' name='L5106'></a> % Set up the complete index entry, with both the sort key and <a id='L5107' name='L5107'></a> % the original text, including any font commands. We write <a id='L5108' name='L5108'></a> % three arguments to \entry to the .?? file (four in the <a id='L5109' name='L5109'></a> % subentry case), texindex reduces to two when writing the .??s <a id='L5110' name='L5110'></a> % sorted result. <a id='L5111' name='L5111'></a> \edef\temp{% <a id='L5112' name='L5112'></a> \write\writeto{% <a id='L5113' name='L5113'></a> \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}% <a id='L5114' name='L5114'></a> }% <a id='L5115' name='L5115'></a> \temp <a id='L5116' name='L5116'></a>} <a id='L5117' name='L5117'></a> <a id='L5118' name='L5118'></a>% Take care of unwanted page breaks/skips around a whatsit: <a id='L5119' name='L5119'></a>% <a id='L5120' name='L5120'></a>% If a skip is the last thing on the list now, preserve it <a id='L5121' name='L5121'></a>% by backing up by \lastskip, doing the \write, then inserting <a id='L5122' name='L5122'></a>% the skip again. Otherwise, the whatsit generated by the <a id='L5123' name='L5123'></a>% \write or \pdfdest will make \lastskip zero. The result is that <a id='L5124' name='L5124'></a>% sequences like this: <a id='L5125' name='L5125'></a>% @end defun <a id='L5126' name='L5126'></a>% @tindex whatever <a id='L5127' name='L5127'></a>% @defun ... <a id='L5128' name='L5128'></a>% will have extra space inserted, because the \medbreak in the <a id='L5129' name='L5129'></a>% start of the @defun won't see the skip inserted by the @end of <a id='L5130' name='L5130'></a>% the previous defun. <a id='L5131' name='L5131'></a>% <a id='L5132' name='L5132'></a>% But don't do any of this if we're not in vertical mode. We <a id='L5133' name='L5133'></a>% don't want to do a \vskip and prematurely end a paragraph. <a id='L5134' name='L5134'></a>% <a id='L5135' name='L5135'></a>% Avoid page breaks due to these extra skips, too. <a id='L5136' name='L5136'></a>% <a id='L5137' name='L5137'></a>% But wait, there is a catch there: <a id='L5138' name='L5138'></a>% We'll have to check whether \lastskip is zero skip. \ifdim is not <a id='L5139' name='L5139'></a>% sufficient for this purpose, as it ignores stretch and shrink parts <a id='L5140' name='L5140'></a>% of the skip. The only way seems to be to check the textual <a id='L5141' name='L5141'></a>% representation of the skip. <a id='L5142' name='L5142'></a>% <a id='L5143' name='L5143'></a>% The following is almost like \def\zeroskipmacro{0.0pt} except that <a id='L5144' name='L5144'></a>% the ``p'' and ``t'' characters have catcode \other, not 11 (letter). <a id='L5145' name='L5145'></a>% <a id='L5146' name='L5146'></a>\edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} <a id='L5147' name='L5147'></a>% <a id='L5148' name='L5148'></a>\newskip\whatsitskip <a id='L5149' name='L5149'></a>\newcount\whatsitpenalty <a id='L5150' name='L5150'></a>% <a id='L5151' name='L5151'></a>% ..., ready, GO: <a id='L5152' name='L5152'></a>% <a id='L5153' name='L5153'></a>\def\safewhatsit#1{\ifhmode <a id='L5154' name='L5154'></a> #1% <a id='L5155' name='L5155'></a> \else <a id='L5156' name='L5156'></a> % \lastskip and \lastpenalty cannot both be nonzero simultaneously. <a id='L5157' name='L5157'></a> \whatsitskip = \lastskip <a id='L5158' name='L5158'></a> \edef\lastskipmacro{\the\lastskip}% <a id='L5159' name='L5159'></a> \whatsitpenalty = \lastpenalty <a id='L5160' name='L5160'></a> % <a id='L5161' name='L5161'></a> % If \lastskip is nonzero, that means the last item was a <a id='L5162' name='L5162'></a> % skip. And since a skip is discardable, that means this <a id='L5163' name='L5163'></a> % -\whatsitskip glue we're inserting is preceded by a <a id='L5164' name='L5164'></a> % non-discardable item, therefore it is not a potential <a id='L5165' name='L5165'></a> % breakpoint, therefore no \nobreak needed. <a id='L5166' name='L5166'></a> \ifx\lastskipmacro\zeroskipmacro <a id='L5167' name='L5167'></a> \else <a id='L5168' name='L5168'></a> \vskip-\whatsitskip <a id='L5169' name='L5169'></a> \fi <a id='L5170' name='L5170'></a> % <a id='L5171' name='L5171'></a> #1% <a id='L5172' name='L5172'></a> % <a id='L5173' name='L5173'></a> \ifx\lastskipmacro\zeroskipmacro <a id='L5174' name='L5174'></a> % If \lastskip was zero, perhaps the last item was a penalty, and <a id='L5175' name='L5175'></a> % perhaps it was >=10000, e.g., a \nobreak. In that case, we want <a id='L5176' name='L5176'></a> % to re-insert the same penalty (values >10000 are used for various <a id='L5177' name='L5177'></a> % signals); since we just inserted a non-discardable item, any <a id='L5178' name='L5178'></a> % following glue (such as a \parskip) would be a breakpoint. For example: <a id='L5179' name='L5179'></a> % @deffn deffn-whatever <a id='L5180' name='L5180'></a> % @vindex index-whatever <a id='L5181' name='L5181'></a> % Description. <a id='L5182' name='L5182'></a> % would allow a break between the index-whatever whatsit <a id='L5183' name='L5183'></a> % and the "Description." paragraph. <a id='L5184' name='L5184'></a> \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi <a id='L5185' name='L5185'></a> \else <a id='L5186' name='L5186'></a> % On the other hand, if we had a nonzero \lastskip, <a id='L5187' name='L5187'></a> % this make-up glue would be preceded by a non-discardable item <a id='L5188' name='L5188'></a> % (the whatsit from the \write), so we must insert a \nobreak. <a id='L5189' name='L5189'></a> \nobreak\vskip\whatsitskip <a id='L5190' name='L5190'></a> \fi <a id='L5191' name='L5191'></a>\fi} <a id='L5192' name='L5192'></a> <a id='L5193' name='L5193'></a>% The index entry written in the file actually looks like <a id='L5194' name='L5194'></a>% \entry {sortstring}{page}{topic} <a id='L5195' name='L5195'></a>% or <a id='L5196' name='L5196'></a>% \entry {sortstring}{page}{topic}{subtopic} <a id='L5197' name='L5197'></a>% The texindex program reads in these files and writes files <a id='L5198' name='L5198'></a>% containing these kinds of lines: <a id='L5199' name='L5199'></a>% \initial {c} <a id='L5200' name='L5200'></a>% before the first topic whose initial is c <a id='L5201' name='L5201'></a>% \entry {topic}{pagelist} <a id='L5202' name='L5202'></a>% for a topic that is used without subtopics <a id='L5203' name='L5203'></a>% \primary {topic} <a id='L5204' name='L5204'></a>% for the beginning of a topic that is used with subtopics <a id='L5205' name='L5205'></a>% \secondary {subtopic}{pagelist} <a id='L5206' name='L5206'></a>% for each subtopic. <a id='L5207' name='L5207'></a> <a id='L5208' name='L5208'></a>% Define the user-accessible indexing commands <a id='L5209' name='L5209'></a>% @findex, @vindex, @kindex, @cindex. <a id='L5210' name='L5210'></a> <a id='L5211' name='L5211'></a>\def\findex {\fnindex} <a id='L5212' name='L5212'></a>\def\kindex {\kyindex} <a id='L5213' name='L5213'></a>\def\cindex {\cpindex} <a id='L5214' name='L5214'></a>\def\vindex {\vrindex} <a id='L5215' name='L5215'></a>\def\tindex {\tpindex} <a id='L5216' name='L5216'></a>\def\pindex {\pgindex} <a id='L5217' name='L5217'></a> <a id='L5218' name='L5218'></a>\def\cindexsub {\begingroup\obeylines\cindexsub} <a id='L5219' name='L5219'></a>{\obeylines % <a id='L5220' name='L5220'></a>\gdef\cindexsub "#1" #2^^M{\endgroup % <a id='L5221' name='L5221'></a>\dosubind{cp}{#2}{#1}}} <a id='L5222' name='L5222'></a> <a id='L5223' name='L5223'></a>% Define the macros used in formatting output of the sorted index material. <a id='L5224' name='L5224'></a> <a id='L5225' name='L5225'></a>% @printindex causes a particular index (the ??s file) to get printed. <a id='L5226' name='L5226'></a>% It does not print any chapter heading (usually an @unnumbered). <a id='L5227' name='L5227'></a>% <a id='L5228' name='L5228'></a>\parseargdef\printindex{\begingroup <a id='L5229' name='L5229'></a> \dobreak \chapheadingskip{10000}% <a id='L5230' name='L5230'></a> % <a id='L5231' name='L5231'></a> \smallfonts \rm <a id='L5232' name='L5232'></a> \tolerance = 9500 <a id='L5233' name='L5233'></a> \plainfrenchspacing <a id='L5234' name='L5234'></a> \everypar = {}% don't want the \kern\-parindent from indentation suppression. <a id='L5235' name='L5235'></a> % <a id='L5236' name='L5236'></a> % See if the index file exists and is nonempty. <a id='L5237' name='L5237'></a> % Change catcode of @ here so that if the index file contains <a id='L5238' name='L5238'></a> % \initial {@} <a id='L5239' name='L5239'></a> % as its first line, TeX doesn't complain about mismatched braces <a id='L5240' name='L5240'></a> % (because it thinks @} is a control sequence). <a id='L5241' name='L5241'></a> \catcode`\@ = 11 <a id='L5242' name='L5242'></a> \openin 1 \jobname.#1s <a id='L5243' name='L5243'></a> \ifeof 1 <a id='L5244' name='L5244'></a> % \enddoublecolumns gets confused if there is no text in the index, <a id='L5245' name='L5245'></a> % and it loses the chapter title and the aux file entries for the <a id='L5246' name='L5246'></a> % index. The easiest way to prevent this problem is to make sure <a id='L5247' name='L5247'></a> % there is some text. <a id='L5248' name='L5248'></a> \putwordIndexNonexistent <a id='L5249' name='L5249'></a> \else <a id='L5250' name='L5250'></a> % <a id='L5251' name='L5251'></a> % If the index file exists but is empty, then \openin leaves \ifeof <a id='L5252' name='L5252'></a> % false. We have to make TeX try to read something from the file, so <a id='L5253' name='L5253'></a> % it can discover if there is anything in it. <a id='L5254' name='L5254'></a> \read 1 to \temp <a id='L5255' name='L5255'></a> \ifeof 1 <a id='L5256' name='L5256'></a> \putwordIndexIsEmpty <a id='L5257' name='L5257'></a> \else <a id='L5258' name='L5258'></a> % Index files are almost Texinfo source, but we use \ as the escape <a id='L5259' name='L5259'></a> % character. It would be better to use @, but that's too big a change <a id='L5260' name='L5260'></a> % to make right now. <a id='L5261' name='L5261'></a> \def\indexbackslash{\backslashcurfont}% <a id='L5262' name='L5262'></a> \catcode`\\ = 0 <a id='L5263' name='L5263'></a> \escapechar = `\\ <a id='L5264' name='L5264'></a> \begindoublecolumns <a id='L5265' name='L5265'></a> \input \jobname.#1s <a id='L5266' name='L5266'></a> \enddoublecolumns <a id='L5267' name='L5267'></a> \fi <a id='L5268' name='L5268'></a> \fi <a id='L5269' name='L5269'></a> \closein 1 <a id='L5270' name='L5270'></a>\endgroup} <a id='L5271' name='L5271'></a> <a id='L5272' name='L5272'></a>% These macros are used by the sorted index file itself. <a id='L5273' name='L5273'></a>% Change them to control the appearance of the index. <a id='L5274' name='L5274'></a> <a id='L5275' name='L5275'></a>\def\initial#1{{% <a id='L5276' name='L5276'></a> % Some minor font changes for the special characters. <a id='L5277' name='L5277'></a>\ifjaTeX <a id='L5278' name='L5278'></a> \let\tentt=\sectt \let\tt=\sectt \let\sf=\gt\sectt <a id='L5279' name='L5279'></a>\else <a id='L5280' name='L5280'></a> \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt <a id='L5281' name='L5281'></a>\fi <a id='L5282' name='L5282'></a> % <a id='L5283' name='L5283'></a> % Remove any glue we may have, we'll be inserting our own. <a id='L5284' name='L5284'></a> \removelastskip <a id='L5285' name='L5285'></a> % <a id='L5286' name='L5286'></a> % We like breaks before the index initials, so insert a bonus. <a id='L5287' name='L5287'></a> \nobreak <a id='L5288' name='L5288'></a> \vskip 0pt plus 3\baselineskip <a id='L5289' name='L5289'></a> \penalty 0 <a id='L5290' name='L5290'></a> \vskip 0pt plus -3\baselineskip <a id='L5291' name='L5291'></a> % <a id='L5292' name='L5292'></a> % Typeset the initial. Making this add up to a whole number of <a id='L5293' name='L5293'></a> % baselineskips increases the chance of the dots lining up from column <a id='L5294' name='L5294'></a> % to column. It still won't often be perfect, because of the stretch <a id='L5295' name='L5295'></a> % we need before each entry, but it's better. <a id='L5296' name='L5296'></a> % <a id='L5297' name='L5297'></a> % No shrink because it confuses \balancecolumns. <a id='L5298' name='L5298'></a> \vskip 1.67\baselineskip plus .5\baselineskip <a id='L5299' name='L5299'></a> \ifjaTeX <a id='L5300' name='L5300'></a> \leftline{\secgt\secbf #1}% <a id='L5301' name='L5301'></a> \else <a id='L5302' name='L5302'></a> \leftline{\secbf #1}% <a id='L5303' name='L5303'></a> \fi <a id='L5304' name='L5304'></a> % Do our best not to break after the initial. <a id='L5305' name='L5305'></a> \nobreak <a id='L5306' name='L5306'></a> \vskip .33\baselineskip plus .1\baselineskip <a id='L5307' name='L5307'></a>}} <a id='L5308' name='L5308'></a> <a id='L5309' name='L5309'></a>% \entry typesets a paragraph consisting of the text (#1), dot leaders, and <a id='L5310' name='L5310'></a>% then page number (#2) flushed to the right margin. It is used for index <a id='L5311' name='L5311'></a>% and table of contents entries. The paragraph is indented by \leftskip. <a id='L5312' name='L5312'></a>% <a id='L5313' name='L5313'></a>% A straightforward implementation would start like this: <a id='L5314' name='L5314'></a>% \def\entry#1#2{... <a id='L5315' name='L5315'></a>% But this freezes the catcodes in the argument, and can cause problems to <a id='L5316' name='L5316'></a>% @code, which sets - active. This problem was fixed by a kludge--- <a id='L5317' name='L5317'></a>% ``-'' was active throughout whole index, but this isn't really right. <a id='L5318' name='L5318'></a>% The right solution is to prevent \entry from swallowing the whole text. <a id='L5319' name='L5319'></a>% --kasal, 21nov03 <a id='L5320' name='L5320'></a>\def\entry{% <a id='L5321' name='L5321'></a> \begingroup <a id='L5322' name='L5322'></a> % <a id='L5323' name='L5323'></a> % Start a new paragraph if necessary, so our assignments below can't <a id='L5324' name='L5324'></a> % affect previous text. <a id='L5325' name='L5325'></a> \par <a id='L5326' name='L5326'></a> % <a id='L5327' name='L5327'></a> % Do not fill out the last line with white space. <a id='L5328' name='L5328'></a> \parfillskip = 0in <a id='L5329' name='L5329'></a> % <a id='L5330' name='L5330'></a> % No extra space above this paragraph. <a id='L5331' name='L5331'></a> \parskip = 0in <a id='L5332' name='L5332'></a> % <a id='L5333' name='L5333'></a> % Do not prefer a separate line ending with a hyphen to fewer lines. <a id='L5334' name='L5334'></a> \finalhyphendemerits = 0 <a id='L5335' name='L5335'></a> % <a id='L5336' name='L5336'></a> % \hangindent is only relevant when the entry text and page number <a id='L5337' name='L5337'></a> % don't both fit on one line. In that case, bob suggests starting the <a id='L5338' name='L5338'></a> % dots pretty far over on the line. Unfortunately, a large <a id='L5339' name='L5339'></a> % indentation looks wrong when the entry text itself is broken across <a id='L5340' name='L5340'></a> % lines. So we use a small indentation and put up with long leaders. <a id='L5341' name='L5341'></a> % <a id='L5342' name='L5342'></a> % \hangafter is reset to 1 (which is the value we want) at the start <a id='L5343' name='L5343'></a> % of each paragraph, so we need not do anything with that. <a id='L5344' name='L5344'></a> \hangindent = 2em <a id='L5345' name='L5345'></a> % <a id='L5346' name='L5346'></a> % When the entry text needs to be broken, just fill out the first line <a id='L5347' name='L5347'></a> % with blank space. <a id='L5348' name='L5348'></a> \rightskip = 0pt plus1fil <a id='L5349' name='L5349'></a> % <a id='L5350' name='L5350'></a> % A bit of stretch before each entry for the benefit of balancing <a id='L5351' name='L5351'></a> % columns. <a id='L5352' name='L5352'></a> \vskip 0pt plus1pt <a id='L5353' name='L5353'></a> % <a id='L5354' name='L5354'></a> % When reading the text of entry, convert explicit line breaks <a id='L5355' name='L5355'></a> % from @* into spaces. The user might give these in long section <a id='L5356' name='L5356'></a> % titles, for instance. <a id='L5357' name='L5357'></a> \def\*{\unskip\space\ignorespaces}% <a id='L5358' name='L5358'></a> \def\entrybreak{\hfil\break}% <a id='L5359' name='L5359'></a> % <a id='L5360' name='L5360'></a> % Swallow the left brace of the text (first parameter): <a id='L5361' name='L5361'></a> \afterassignment\doentry <a id='L5362' name='L5362'></a> \let\temp = <a id='L5363' name='L5363'></a>} <a id='L5364' name='L5364'></a>\def\entrybreak{\unskip\space\ignorespaces}% <a id='L5365' name='L5365'></a>\def\doentry{% <a id='L5366' name='L5366'></a> \bgroup % Instead of the swallowed brace. <a id='L5367' name='L5367'></a> \noindent <a id='L5368' name='L5368'></a> \aftergroup\finishentry <a id='L5369' name='L5369'></a> % And now comes the text of the entry. <a id='L5370' name='L5370'></a>} <a id='L5371' name='L5371'></a>\def\finishentry#1{% <a id='L5372' name='L5372'></a> % #1 is the page number. <a id='L5373' name='L5373'></a> % <a id='L5374' name='L5374'></a> % The following is kludged to not output a line of dots in the index if <a id='L5375' name='L5375'></a> % there are no page numbers. The next person who breaks this will be <a id='L5376' name='L5376'></a> % cursed by a Unix daemon. <a id='L5377' name='L5377'></a> \setbox\boxA = \hbox{#1}% <a id='L5378' name='L5378'></a> \ifdim\wd\boxA = 0pt <a id='L5379' name='L5379'></a> \ % <a id='L5380' name='L5380'></a> \else <a id='L5381' name='L5381'></a> % <a id='L5382' name='L5382'></a> % If we must, put the page number on a line of its own, and fill out <a id='L5383' name='L5383'></a> % this line with blank space. (The \hfil is overwhelmed with the <a id='L5384' name='L5384'></a> % fill leaders glue in \indexdotfill if the page number does fit.) <a id='L5385' name='L5385'></a> \hfil\penalty50 <a id='L5386' name='L5386'></a> \null\nobreak\indexdotfill % Have leaders before the page number. <a id='L5387' name='L5387'></a> % <a id='L5388' name='L5388'></a> % The `\ ' here is removed by the implicit \unskip that TeX does as <a id='L5389' name='L5389'></a> % part of (the primitive) \par. Without it, a spurious underfull <a id='L5390' name='L5390'></a> % \hbox ensues. <a id='L5391' name='L5391'></a> \ifpdf <a id='L5392' name='L5392'></a> \pdfgettoks#1.% <a id='L5393' name='L5393'></a> \ \the\toksA <a id='L5394' name='L5394'></a> \else <a id='L5395' name='L5395'></a> \ #1% <a id='L5396' name='L5396'></a> \fi <a id='L5397' name='L5397'></a> \fi <a id='L5398' name='L5398'></a> \par <a id='L5399' name='L5399'></a> \endgroup <a id='L5400' name='L5400'></a>} <a id='L5401' name='L5401'></a> <a id='L5402' name='L5402'></a>% Like plain.tex's \dotfill, except uses up at least 1 em. <a id='L5403' name='L5403'></a>\def\indexdotfill{\cleaders <a id='L5404' name='L5404'></a> \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill} <a id='L5405' name='L5405'></a> <a id='L5406' name='L5406'></a>\def\primary #1{\line{#1\hfil}} <a id='L5407' name='L5407'></a> <a id='L5408' name='L5408'></a>\newskip\secondaryindent \secondaryindent=0.5cm <a id='L5409' name='L5409'></a>\def\secondary#1#2{{% <a id='L5410' name='L5410'></a> \parfillskip=0in <a id='L5411' name='L5411'></a> \parskip=0in <a id='L5412' name='L5412'></a> \hangindent=1in <a id='L5413' name='L5413'></a> \hangafter=1 <a id='L5414' name='L5414'></a> \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill <a id='L5415' name='L5415'></a> \ifpdf <a id='L5416' name='L5416'></a> \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. <a id='L5417' name='L5417'></a> \else <a id='L5418' name='L5418'></a> #2 <a id='L5419' name='L5419'></a> \fi <a id='L5420' name='L5420'></a> \par <a id='L5421' name='L5421'></a>}} <a id='L5422' name='L5422'></a> <a id='L5423' name='L5423'></a>% Define two-column mode, which we use to typeset indexes. <a id='L5424' name='L5424'></a>% Adapted from the TeXbook, page 416, which is to say, <a id='L5425' name='L5425'></a>% the manmac.tex format used to print the TeXbook itself. <a id='L5426' name='L5426'></a>\catcode`\@=11 <a id='L5427' name='L5427'></a> <a id='L5428' name='L5428'></a>\newbox\partialpage <a id='L5429' name='L5429'></a>\newdimen\doublecolumnhsize <a id='L5430' name='L5430'></a> <a id='L5431' name='L5431'></a>\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns <a id='L5432' name='L5432'></a> % Grab any single-column material above us. <a id='L5433' name='L5433'></a> \output = {% <a id='L5434' name='L5434'></a> % <a id='L5435' name='L5435'></a> % Here is a possibility not foreseen in manmac: if we accumulate a <a id='L5436' name='L5436'></a> % whole lot of material, we might end up calling this \output <a id='L5437' name='L5437'></a> % routine twice in a row (see the doublecol-lose test, which is <a id='L5438' name='L5438'></a> % essentially a couple of indexes with @setchapternewpage off). In <a id='L5439' name='L5439'></a> % that case we just ship out what is in \partialpage with the normal <a id='L5440' name='L5440'></a> % output routine. Generally, \partialpage will be empty when this <a id='L5441' name='L5441'></a> % runs and this will be a no-op. See the indexspread.tex test case. <a id='L5442' name='L5442'></a> \ifvoid\partialpage \else <a id='L5443' name='L5443'></a> \onepageout{\pagecontents\partialpage}% <a id='L5444' name='L5444'></a> \fi <a id='L5445' name='L5445'></a> % <a id='L5446' name='L5446'></a> \global\setbox\partialpage = \vbox{% <a id='L5447' name='L5447'></a> % Unvbox the main output page. <a id='L5448' name='L5448'></a> \unvbox\PAGE <a id='L5449' name='L5449'></a> \kern-\topskip \kern\baselineskip <a id='L5450' name='L5450'></a> }% <a id='L5451' name='L5451'></a> }% <a id='L5452' name='L5452'></a> \eject % run that output routine to set \partialpage <a id='L5453' name='L5453'></a> % <a id='L5454' name='L5454'></a> % Use the double-column output routine for subsequent pages. <a id='L5455' name='L5455'></a> \output = {\doublecolumnout}% <a id='L5456' name='L5456'></a> % <a id='L5457' name='L5457'></a> % Change the page size parameters. We could do this once outside this <a id='L5458' name='L5458'></a> % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 <a id='L5459' name='L5459'></a> % format, but then we repeat the same computation. Repeating a couple <a id='L5460' name='L5460'></a> % of assignments once per index is clearly meaningless for the <a id='L5461' name='L5461'></a> % execution time, so we may as well do it in one place. <a id='L5462' name='L5462'></a> % <a id='L5463' name='L5463'></a> % First we halve the line length, less a little for the gutter between <a id='L5464' name='L5464'></a> % the columns. We compute the gutter based on the line length, so it <a id='L5465' name='L5465'></a> % changes automatically with the paper format. The magic constant <a id='L5466' name='L5466'></a> % below is chosen so that the gutter has the same value (well, +-<1pt) <a id='L5467' name='L5467'></a> % as it did when we hard-coded it. <a id='L5468' name='L5468'></a> % <a id='L5469' name='L5469'></a> % We put the result in a separate register, \doublecolumhsize, so we <a id='L5470' name='L5470'></a> % can restore it in \pagesofar, after \hsize itself has (potentially) <a id='L5471' name='L5471'></a> % been clobbered. <a id='L5472' name='L5472'></a> % <a id='L5473' name='L5473'></a> \doublecolumnhsize = \hsize <a id='L5474' name='L5474'></a> \advance\doublecolumnhsize by -.04154\hsize <a id='L5475' name='L5475'></a> \divide\doublecolumnhsize by 2 <a id='L5476' name='L5476'></a> \hsize = \doublecolumnhsize <a id='L5477' name='L5477'></a> % <a id='L5478' name='L5478'></a> % Double the \vsize as well. (We don't need a separate register here, <a id='L5479' name='L5479'></a> % since nobody clobbers \vsize.) <a id='L5480' name='L5480'></a> \vsize = 2\vsize <a id='L5481' name='L5481'></a>} <a id='L5482' name='L5482'></a> <a id='L5483' name='L5483'></a>% The double-column output routine for all double-column pages except <a id='L5484' name='L5484'></a>% the last. <a id='L5485' name='L5485'></a>% <a id='L5486' name='L5486'></a>\def\doublecolumnout{% <a id='L5487' name='L5487'></a> \splittopskip=\topskip \splitmaxdepth=\maxdepth <a id='L5488' name='L5488'></a> % Get the available space for the double columns -- the normal <a id='L5489' name='L5489'></a> % (undoubled) page height minus any material left over from the <a id='L5490' name='L5490'></a> % previous page. <a id='L5491' name='L5491'></a> \dimen@ = \vsize <a id='L5492' name='L5492'></a> \divide\dimen@ by 2 <a id='L5493' name='L5493'></a> \advance\dimen@ by -\ht\partialpage <a id='L5494' name='L5494'></a> % <a id='L5495' name='L5495'></a> % box0 will be the left-hand column, box2 the right. <a id='L5496' name='L5496'></a> \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ <a id='L5497' name='L5497'></a> \onepageout\pagesofar <a id='L5498' name='L5498'></a> \unvbox255 <a id='L5499' name='L5499'></a> \penalty\outputpenalty <a id='L5500' name='L5500'></a>} <a id='L5501' name='L5501'></a>% <a id='L5502' name='L5502'></a>% Re-output the contents of the output page -- any previous material, <a id='L5503' name='L5503'></a>% followed by the two boxes we just split, in box0 and box2. <a id='L5504' name='L5504'></a>\def\pagesofar{% <a id='L5505' name='L5505'></a> \unvbox\partialpage <a id='L5506' name='L5506'></a> % <a id='L5507' name='L5507'></a> \hsize = \doublecolumnhsize <a id='L5508' name='L5508'></a> \wd0=\hsize \wd2=\hsize <a id='L5509' name='L5509'></a> \hbox to\pagewidth{\box0\hfil\box2}% <a id='L5510' name='L5510'></a>} <a id='L5511' name='L5511'></a>% <a id='L5512' name='L5512'></a>% All done with double columns. <a id='L5513' name='L5513'></a>\def\enddoublecolumns{% <a id='L5514' name='L5514'></a> % The following penalty ensures that the page builder is exercised <a id='L5515' name='L5515'></a> % _before_ we change the output routine. This is necessary in the <a id='L5516' name='L5516'></a> % following situation: <a id='L5517' name='L5517'></a> % <a id='L5518' name='L5518'></a> % The last section of the index consists only of a single entry. <a id='L5519' name='L5519'></a> % Before this section, \pagetotal is less than \pagegoal, so no <a id='L5520' name='L5520'></a> % break occurs before the last section starts. However, the last <a id='L5521' name='L5521'></a> % section, consisting of \initial and the single \entry, does not <a id='L5522' name='L5522'></a> % fit on the page and has to be broken off. Without the following <a id='L5523' name='L5523'></a> % penalty the page builder will not be exercised until \eject <a id='L5524' name='L5524'></a> % below, and by that time we'll already have changed the output <a id='L5525' name='L5525'></a> % routine to the \balancecolumns version, so the next-to-last <a id='L5526' name='L5526'></a> % double-column page will be processed with \balancecolumns, which <a id='L5527' name='L5527'></a> % is wrong: The two columns will go to the main vertical list, with <a id='L5528' name='L5528'></a> % the broken-off section in the recent contributions. As soon as <a id='L5529' name='L5529'></a> % the output routine finishes, TeX starts reconsidering the page <a id='L5530' name='L5530'></a> % break. The two columns and the broken-off section both fit on the <a id='L5531' name='L5531'></a> % page, because the two columns now take up only half of the page <a id='L5532' name='L5532'></a> % goal. When TeX sees \eject from below which follows the final <a id='L5533' name='L5533'></a> % section, it invokes the new output routine that we've set after <a id='L5534' name='L5534'></a> % \balancecolumns below; \onepageout will try to fit the two columns <a id='L5535' name='L5535'></a> % and the final section into the vbox of \pageheight (see <a id='L5536' name='L5536'></a> % \pagebody), causing an overfull box. <a id='L5537' name='L5537'></a> % <a id='L5538' name='L5538'></a> % Note that glue won't work here, because glue does not exercise the <a id='L5539' name='L5539'></a> % page builder, unlike penalties (see The TeXbook, pp. 280-281). <a id='L5540' name='L5540'></a> \penalty0 <a id='L5541' name='L5541'></a> % <a id='L5542' name='L5542'></a> \output = {% <a id='L5543' name='L5543'></a> % Split the last of the double-column material. Leave it on the <a id='L5544' name='L5544'></a> % current page, no automatic page break. <a id='L5545' name='L5545'></a> \balancecolumns <a id='L5546' name='L5546'></a> % <a id='L5547' name='L5547'></a> % If we end up splitting too much material for the current page, <a id='L5548' name='L5548'></a> % though, there will be another page break right after this \output <a id='L5549' name='L5549'></a> % invocation ends. Having called \balancecolumns once, we do not <a id='L5550' name='L5550'></a> % want to call it again. Therefore, reset \output to its normal <a id='L5551' name='L5551'></a> % definition right away. (We hope \balancecolumns will never be <a id='L5552' name='L5552'></a> % called on to balance too much material, but if it is, this makes <a id='L5553' name='L5553'></a> % the output somewhat more palatable.) <a id='L5554' name='L5554'></a> \global\output = {\onepageout{\pagecontents\PAGE}}% <a id='L5555' name='L5555'></a> }% <a id='L5556' name='L5556'></a> \eject <a id='L5557' name='L5557'></a> \endgroup % started in \begindoublecolumns <a id='L5558' name='L5558'></a> % <a id='L5559' name='L5559'></a> % \pagegoal was set to the doubled \vsize above, since we restarted <a id='L5560' name='L5560'></a> % the current page. We're now back to normal single-column <a id='L5561' name='L5561'></a> % typesetting, so reset \pagegoal to the normal \vsize (after the <a id='L5562' name='L5562'></a> % \endgroup where \vsize got restored). <a id='L5563' name='L5563'></a> \pagegoal = \vsize <a id='L5564' name='L5564'></a>} <a id='L5565' name='L5565'></a>% <a id='L5566' name='L5566'></a>% Called at the end of the double column material. <a id='L5567' name='L5567'></a>\def\balancecolumns{% <a id='L5568' name='L5568'></a> \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. <a id='L5569' name='L5569'></a> \dimen@ = \ht0 <a id='L5570' name='L5570'></a> \advance\dimen@ by \topskip <a id='L5571' name='L5571'></a> \advance\dimen@ by-\baselineskip <a id='L5572' name='L5572'></a> \divide\dimen@ by 2 % target to split to <a id='L5573' name='L5573'></a> %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% <a id='L5574' name='L5574'></a> \splittopskip = \topskip <a id='L5575' name='L5575'></a> % Loop until we get a decent breakpoint. <a id='L5576' name='L5576'></a> {% <a id='L5577' name='L5577'></a> \vbadness = 10000 <a id='L5578' name='L5578'></a> \loop <a id='L5579' name='L5579'></a> \global\setbox3 = \copy0 <a id='L5580' name='L5580'></a> \global\setbox1 = \vsplit3 to \dimen@ <a id='L5581' name='L5581'></a> \ifdim\ht3>\dimen@ <a id='L5582' name='L5582'></a> \global\advance\dimen@ by 1pt <a id='L5583' name='L5583'></a> \repeat <a id='L5584' name='L5584'></a> }% <a id='L5585' name='L5585'></a> %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% <a id='L5586' name='L5586'></a> \setbox0=\vbox to\dimen@{\unvbox1}% <a id='L5587' name='L5587'></a> \setbox2=\vbox to\dimen@{\unvbox3}% <a id='L5588' name='L5588'></a> % <a id='L5589' name='L5589'></a> \pagesofar <a id='L5590' name='L5590'></a>} <a id='L5591' name='L5591'></a>\catcode`\@ = \other <a id='L5592' name='L5592'></a> <a id='L5593' name='L5593'></a> <a id='L5594' name='L5594'></a>\message{sectioning,} <a id='L5595' name='L5595'></a>% Chapters, sections, etc. <a id='L5596' name='L5596'></a> <a id='L5597' name='L5597'></a>% Let's start with @part. <a id='L5598' name='L5598'></a>\outer\parseargdef\part{\partzzz{#1}} <a id='L5599' name='L5599'></a>\def\partzzz#1{% <a id='L5600' name='L5600'></a> \chapoddpage <a id='L5601' name='L5601'></a> \null <a id='L5602' name='L5602'></a> \vskip.3\vsize % move it down on the page a bit <a id='L5603' name='L5603'></a> \begingroup <a id='L5604' name='L5604'></a> \noindent \titlefonts\rmisbold #1\par % the text <a id='L5605' name='L5605'></a> \let\lastnode=\empty % no node to associate with <a id='L5606' name='L5606'></a> \writetocentry{part}{#1}{}% but put it in the toc <a id='L5607' name='L5607'></a> \headingsoff % no headline or footline on the part page <a id='L5608' name='L5608'></a> \chapoddpage <a id='L5609' name='L5609'></a> \endgroup <a id='L5610' name='L5610'></a>} <a id='L5611' name='L5611'></a> <a id='L5612' name='L5612'></a>% \unnumberedno is an oxymoron. But we count the unnumbered <a id='L5613' name='L5613'></a>% sections so that we can refer to them unambiguously in the pdf <a id='L5614' name='L5614'></a>% outlines by their "section number". We avoid collisions with chapter <a id='L5615' name='L5615'></a>% numbers by starting them at 10000. (If a document ever has 10000 <a id='L5616' name='L5616'></a>% chapters, we're in trouble anyway, I'm sure.) <a id='L5617' name='L5617'></a>\newcount\unnumberedno \unnumberedno = 10000 <a id='L5618' name='L5618'></a>\newcount\chapno <a id='L5619' name='L5619'></a>\newcount\secno \secno=0 <a id='L5620' name='L5620'></a>\newcount\subsecno \subsecno=0 <a id='L5621' name='L5621'></a>\newcount\subsubsecno \subsubsecno=0 <a id='L5622' name='L5622'></a> <a id='L5623' name='L5623'></a>% This counter is funny since it counts through charcodes of letters A, B, ... <a id='L5624' name='L5624'></a>\newcount\appendixno \appendixno = `\@ <a id='L5625' name='L5625'></a>% <a id='L5626' name='L5626'></a>% \def\appendixletter{\char\the\appendixno} <a id='L5627' name='L5627'></a>% We do the following ugly conditional instead of the above simple <a id='L5628' name='L5628'></a>% construct for the sake of pdftex, which needs the actual <a id='L5629' name='L5629'></a>% letter in the expansion, not just typeset. <a id='L5630' name='L5630'></a>% <a id='L5631' name='L5631'></a>\def\appendixletter{% <a id='L5632' name='L5632'></a> \ifnum\appendixno=`A A% <a id='L5633' name='L5633'></a> \else\ifnum\appendixno=`B B% <a id='L5634' name='L5634'></a> \else\ifnum\appendixno=`C C% <a id='L5635' name='L5635'></a> \else\ifnum\appendixno=`D D% <a id='L5636' name='L5636'></a> \else\ifnum\appendixno=`E E% <a id='L5637' name='L5637'></a> \else\ifnum\appendixno=`F F% <a id='L5638' name='L5638'></a> \else\ifnum\appendixno=`G G% <a id='L5639' name='L5639'></a> \else\ifnum\appendixno=`H H% <a id='L5640' name='L5640'></a> \else\ifnum\appendixno=`I I% <a id='L5641' name='L5641'></a> \else\ifnum\appendixno=`J J% <a id='L5642' name='L5642'></a> \else\ifnum\appendixno=`K K% <a id='L5643' name='L5643'></a> \else\ifnum\appendixno=`L L% <a id='L5644' name='L5644'></a> \else\ifnum\appendixno=`M M% <a id='L5645' name='L5645'></a> \else\ifnum\appendixno=`N N% <a id='L5646' name='L5646'></a> \else\ifnum\appendixno=`O O% <a id='L5647' name='L5647'></a> \else\ifnum\appendixno=`P P% <a id='L5648' name='L5648'></a> \else\ifnum\appendixno=`Q Q% <a id='L5649' name='L5649'></a> \else\ifnum\appendixno=`R R% <a id='L5650' name='L5650'></a> \else\ifnum\appendixno=`S S% <a id='L5651' name='L5651'></a> \else\ifnum\appendixno=`T T% <a id='L5652' name='L5652'></a> \else\ifnum\appendixno=`U U% <a id='L5653' name='L5653'></a> \else\ifnum\appendixno=`V V% <a id='L5654' name='L5654'></a> \else\ifnum\appendixno=`W W% <a id='L5655' name='L5655'></a> \else\ifnum\appendixno=`X X% <a id='L5656' name='L5656'></a> \else\ifnum\appendixno=`Y Y% <a id='L5657' name='L5657'></a> \else\ifnum\appendixno=`Z Z% <a id='L5658' name='L5658'></a> % The \the is necessary, despite appearances, because \appendixletter is <a id='L5659' name='L5659'></a> % expanded while writing the .toc file. \char\appendixno is not <a id='L5660' name='L5660'></a> % expandable, thus it is written literally, thus all appendixes come out <a id='L5661' name='L5661'></a> % with the same letter (or @) in the toc without it. <a id='L5662' name='L5662'></a> \else\char\the\appendixno <a id='L5663' name='L5663'></a> \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi <a id='L5664' name='L5664'></a> \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} <a id='L5665' name='L5665'></a> <a id='L5666' name='L5666'></a>% Each @chapter defines these (using marks) as the number+name, number <a id='L5667' name='L5667'></a>% and name of the chapter. Page headings and footings can use <a id='L5668' name='L5668'></a>% these. @section does likewise. <a id='L5669' name='L5669'></a>\def\thischapter{} <a id='L5670' name='L5670'></a>\def\thischapternum{} <a id='L5671' name='L5671'></a>\def\thischaptername{} <a id='L5672' name='L5672'></a>\def\thissection{} <a id='L5673' name='L5673'></a>\def\thissectionnum{} <a id='L5674' name='L5674'></a>\def\thissectionname{} <a id='L5675' name='L5675'></a> <a id='L5676' name='L5676'></a>\newcount\absseclevel % used to calculate proper heading level <a id='L5677' name='L5677'></a>\newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count <a id='L5678' name='L5678'></a> <a id='L5679' name='L5679'></a>% @raisesections: treat @section as chapter, @subsection as section, etc. <a id='L5680' name='L5680'></a>\def\raisesections{\global\advance\secbase by -1} <a id='L5681' name='L5681'></a>\let\up=\raisesections % original BFox name <a id='L5682' name='L5682'></a> <a id='L5683' name='L5683'></a>% @lowersections: treat @chapter as section, @section as subsection, etc. <a id='L5684' name='L5684'></a>\def\lowersections{\global\advance\secbase by 1} <a id='L5685' name='L5685'></a>\let\down=\lowersections % original BFox name <a id='L5686' name='L5686'></a> <a id='L5687' name='L5687'></a>% we only have subsub. <a id='L5688' name='L5688'></a>\chardef\maxseclevel = 3 <a id='L5689' name='L5689'></a>% <a id='L5690' name='L5690'></a>% A numbered section within an unnumbered changes to unnumbered too. <a id='L5691' name='L5691'></a>% To achieve this, remember the "biggest" unnum. sec. we are currently in: <a id='L5692' name='L5692'></a>\chardef\unnlevel = \maxseclevel <a id='L5693' name='L5693'></a>% <a id='L5694' name='L5694'></a>% Trace whether the current chapter is an appendix or not: <a id='L5695' name='L5695'></a>% \chapheadtype is "N" or "A", unnumbered chapters are ignored. <a id='L5696' name='L5696'></a>\def\chapheadtype{N} <a id='L5697' name='L5697'></a> <a id='L5698' name='L5698'></a>% Choose a heading macro <a id='L5699' name='L5699'></a>% #1 is heading type <a id='L5700' name='L5700'></a>% #2 is heading level <a id='L5701' name='L5701'></a>% #3 is text for heading <a id='L5702' name='L5702'></a>\def\genhead#1#2#3{% <a id='L5703' name='L5703'></a> % Compute the abs. sec. level: <a id='L5704' name='L5704'></a> \absseclevel=#2 <a id='L5705' name='L5705'></a> \advance\absseclevel by \secbase <a id='L5706' name='L5706'></a> % Make sure \absseclevel doesn't fall outside the range: <a id='L5707' name='L5707'></a> \ifnum \absseclevel < 0 <a id='L5708' name='L5708'></a> \absseclevel = 0 <a id='L5709' name='L5709'></a> \else <a id='L5710' name='L5710'></a> \ifnum \absseclevel > 3 <a id='L5711' name='L5711'></a> \absseclevel = 3 <a id='L5712' name='L5712'></a> \fi <a id='L5713' name='L5713'></a> \fi <a id='L5714' name='L5714'></a> % The heading type: <a id='L5715' name='L5715'></a> \def\headtype{#1}% <a id='L5716' name='L5716'></a> \if \headtype U% <a id='L5717' name='L5717'></a> \ifnum \absseclevel < \unnlevel <a id='L5718' name='L5718'></a> \chardef\unnlevel = \absseclevel <a id='L5719' name='L5719'></a> \fi <a id='L5720' name='L5720'></a> \else <a id='L5721' name='L5721'></a> % Check for appendix sections: <a id='L5722' name='L5722'></a> \ifnum \absseclevel = 0 <a id='L5723' name='L5723'></a> \edef\chapheadtype{\headtype}% <a id='L5724' name='L5724'></a> \else <a id='L5725' name='L5725'></a> \if \headtype A\if \chapheadtype N% <a id='L5726' name='L5726'></a> \errmessage{@appendix... within a non-appendix chapter}% <a id='L5727' name='L5727'></a> \fi\fi <a id='L5728' name='L5728'></a> \fi <a id='L5729' name='L5729'></a> % Check for numbered within unnumbered: <a id='L5730' name='L5730'></a> \ifnum \absseclevel > \unnlevel <a id='L5731' name='L5731'></a> \def\headtype{U}% <a id='L5732' name='L5732'></a> \else <a id='L5733' name='L5733'></a> \chardef\unnlevel = 3 <a id='L5734' name='L5734'></a> \fi <a id='L5735' name='L5735'></a> \fi <a id='L5736' name='L5736'></a> % Now print the heading: <a id='L5737' name='L5737'></a> \if \headtype U% <a id='L5738' name='L5738'></a> \ifcase\absseclevel <a id='L5739' name='L5739'></a> \unnumberedzzz{#3}% <a id='L5740' name='L5740'></a> \or \unnumberedseczzz{#3}% <a id='L5741' name='L5741'></a> \or \unnumberedsubseczzz{#3}% <a id='L5742' name='L5742'></a> \or \unnumberedsubsubseczzz{#3}% <a id='L5743' name='L5743'></a> \fi <a id='L5744' name='L5744'></a> \else <a id='L5745' name='L5745'></a> \if \headtype A% <a id='L5746' name='L5746'></a> \ifcase\absseclevel <a id='L5747' name='L5747'></a> \appendixzzz{#3}% <a id='L5748' name='L5748'></a> \or \appendixsectionzzz{#3}% <a id='L5749' name='L5749'></a> \or \appendixsubseczzz{#3}% <a id='L5750' name='L5750'></a> \or \appendixsubsubseczzz{#3}% <a id='L5751' name='L5751'></a> \fi <a id='L5752' name='L5752'></a> \else <a id='L5753' name='L5753'></a> \ifcase\absseclevel <a id='L5754' name='L5754'></a> \chapterzzz{#3}% <a id='L5755' name='L5755'></a> \or \seczzz{#3}% <a id='L5756' name='L5756'></a> \or \numberedsubseczzz{#3}% <a id='L5757' name='L5757'></a> \or \numberedsubsubseczzz{#3}% <a id='L5758' name='L5758'></a> \fi <a id='L5759' name='L5759'></a> \fi <a id='L5760' name='L5760'></a> \fi <a id='L5761' name='L5761'></a> \suppressfirstparagraphindent <a id='L5762' name='L5762'></a>} <a id='L5763' name='L5763'></a> <a id='L5764' name='L5764'></a>% an interface: <a id='L5765' name='L5765'></a>\def\numhead{\genhead N} <a id='L5766' name='L5766'></a>\def\apphead{\genhead A} <a id='L5767' name='L5767'></a>\def\unnmhead{\genhead U} <a id='L5768' name='L5768'></a> <a id='L5769' name='L5769'></a>% @chapter, @appendix, @unnumbered. Increment top-level counter, reset <a id='L5770' name='L5770'></a>% all lower-level sectioning counters to zero. <a id='L5771' name='L5771'></a>% <a id='L5772' name='L5772'></a>% Also set \chaplevelprefix, which we prepend to @float sequence numbers <a id='L5773' name='L5773'></a>% (e.g., figures), q.v. By default (before any chapter), that is empty. <a id='L5774' name='L5774'></a>\let\chaplevelprefix = \empty <a id='L5775' name='L5775'></a>% <a id='L5776' name='L5776'></a>\outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz <a id='L5777' name='L5777'></a>\def\chapterzzz#1{% <a id='L5778' name='L5778'></a> % section resetting is \global in case the chapter is in a group, such <a id='L5779' name='L5779'></a> % as an @include file. <a id='L5780' name='L5780'></a> \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 <a id='L5781' name='L5781'></a> \global\advance\chapno by 1 <a id='L5782' name='L5782'></a> % <a id='L5783' name='L5783'></a> % Used for \float. <a id='L5784' name='L5784'></a> \gdef\chaplevelprefix{\the\chapno.}% <a id='L5785' name='L5785'></a> \resetallfloatnos <a id='L5786' name='L5786'></a> % <a id='L5787' name='L5787'></a> % \putwordChapter can contain complex things in translations. <a id='L5788' name='L5788'></a> \toks0=\expandafter{\putwordChapter}% <a id='L5789' name='L5789'></a> \message{\the\toks0 \space \the\chapno}% <a id='L5790' name='L5790'></a> % <a id='L5791' name='L5791'></a> % Write the actual heading. <a id='L5792' name='L5792'></a> \chapmacro{#1}{Ynumbered}{\the\chapno}% <a id='L5793' name='L5793'></a> % <a id='L5794' name='L5794'></a> % So @section and the like are numbered underneath this chapter. <a id='L5795' name='L5795'></a> \global\let\section = \numberedsec <a id='L5796' name='L5796'></a> \global\let\subsection = \numberedsubsec <a id='L5797' name='L5797'></a> \global\let\subsubsection = \numberedsubsubsec <a id='L5798' name='L5798'></a>} <a id='L5799' name='L5799'></a> <a id='L5800' name='L5800'></a>\outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz <a id='L5801' name='L5801'></a>% <a id='L5802' name='L5802'></a>\def\appendixzzz#1{% <a id='L5803' name='L5803'></a> \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 <a id='L5804' name='L5804'></a> \global\advance\appendixno by 1 <a id='L5805' name='L5805'></a> \gdef\chaplevelprefix{\appendixletter.}% <a id='L5806' name='L5806'></a> \resetallfloatnos <a id='L5807' name='L5807'></a> % <a id='L5808' name='L5808'></a> % \putwordAppendix can contain complex things in translations. <a id='L5809' name='L5809'></a> \toks0=\expandafter{\putwordAppendix}% <a id='L5810' name='L5810'></a> \message{\the\toks0 \space \appendixletter}% <a id='L5811' name='L5811'></a> % <a id='L5812' name='L5812'></a> \chapmacro{#1}{Yappendix}{\appendixletter}% <a id='L5813' name='L5813'></a> % <a id='L5814' name='L5814'></a> \global\let\section = \appendixsec <a id='L5815' name='L5815'></a> \global\let\subsection = \appendixsubsec <a id='L5816' name='L5816'></a> \global\let\subsubsection = \appendixsubsubsec <a id='L5817' name='L5817'></a>} <a id='L5818' name='L5818'></a> <a id='L5819' name='L5819'></a>% normally unnmhead0 calls unnumberedzzz: <a id='L5820' name='L5820'></a>\outer\parseargdef\unnumbered{\unnmhead0{#1}} <a id='L5821' name='L5821'></a>\def\unnumberedzzz#1{% <a id='L5822' name='L5822'></a> \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 <a id='L5823' name='L5823'></a> \global\advance\unnumberedno by 1 <a id='L5824' name='L5824'></a> % <a id='L5825' name='L5825'></a> % Since an unnumbered has no number, no prefix for figures. <a id='L5826' name='L5826'></a> \global\let\chaplevelprefix = \empty <a id='L5827' name='L5827'></a> \resetallfloatnos <a id='L5828' name='L5828'></a> % <a id='L5829' name='L5829'></a> % This used to be simply \message{#1}, but TeX fully expands the <a id='L5830' name='L5830'></a> % argument to \message. Therefore, if #1 contained @-commands, TeX <a id='L5831' name='L5831'></a> % expanded them. For example, in `@unnumbered The @cite{Book}', TeX <a id='L5832' name='L5832'></a> % expanded @cite (which turns out to cause errors because \cite is meant <a id='L5833' name='L5833'></a> % to be executed, not expanded). <a id='L5834' name='L5834'></a> % <a id='L5835' name='L5835'></a> % Anyway, we don't want the fully-expanded definition of @cite to appear <a id='L5836' name='L5836'></a> % as a result of the \message, we just want `@cite' itself. We use <a id='L5837' name='L5837'></a> % \the<toks register> to achieve this: TeX expands \the<toks> only once, <a id='L5838' name='L5838'></a> % simply yielding the contents of <toks register>. (We also do this for <a id='L5839' name='L5839'></a> % the toc entries.) <a id='L5840' name='L5840'></a> \toks0 = {#1}% <a id='L5841' name='L5841'></a> \message{(\the\toks0)}% <a id='L5842' name='L5842'></a> % <a id='L5843' name='L5843'></a> \chapmacro{#1}{Ynothing}{\the\unnumberedno}% <a id='L5844' name='L5844'></a> % <a id='L5845' name='L5845'></a> \global\let\section = \unnumberedsec <a id='L5846' name='L5846'></a> \global\let\subsection = \unnumberedsubsec <a id='L5847' name='L5847'></a> \global\let\subsubsection = \unnumberedsubsubsec <a id='L5848' name='L5848'></a>} <a id='L5849' name='L5849'></a> <a id='L5850' name='L5850'></a>% @centerchap is like @unnumbered, but the heading is centered. <a id='L5851' name='L5851'></a>\outer\parseargdef\centerchap{% <a id='L5852' name='L5852'></a> % Well, we could do the following in a group, but that would break <a id='L5853' name='L5853'></a> % an assumption that \chapmacro is called at the outermost level. <a id='L5854' name='L5854'></a> % Thus we are safer this way: --kasal, 24feb04 <a id='L5855' name='L5855'></a> \let\centerparametersmaybe = \centerparameters <a id='L5856' name='L5856'></a> \unnmhead0{#1}% <a id='L5857' name='L5857'></a> \let\centerparametersmaybe = \relax <a id='L5858' name='L5858'></a>} <a id='L5859' name='L5859'></a> <a id='L5860' name='L5860'></a>% @top is like @unnumbered. <a id='L5861' name='L5861'></a>\let\top\unnumbered <a id='L5862' name='L5862'></a> <a id='L5863' name='L5863'></a>% Sections. <a id='L5864' name='L5864'></a>% <a id='L5865' name='L5865'></a>\outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz <a id='L5866' name='L5866'></a>\def\seczzz#1{% <a id='L5867' name='L5867'></a> \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 <a id='L5868' name='L5868'></a> \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% <a id='L5869' name='L5869'></a>} <a id='L5870' name='L5870'></a> <a id='L5871' name='L5871'></a>% normally calls appendixsectionzzz: <a id='L5872' name='L5872'></a>\outer\parseargdef\appendixsection{\apphead1{#1}} <a id='L5873' name='L5873'></a>\def\appendixsectionzzz#1{% <a id='L5874' name='L5874'></a> \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 <a id='L5875' name='L5875'></a> \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% <a id='L5876' name='L5876'></a>} <a id='L5877' name='L5877'></a>\let\appendixsec\appendixsection <a id='L5878' name='L5878'></a> <a id='L5879' name='L5879'></a>% normally calls unnumberedseczzz: <a id='L5880' name='L5880'></a>\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} <a id='L5881' name='L5881'></a>\def\unnumberedseczzz#1{% <a id='L5882' name='L5882'></a> \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 <a id='L5883' name='L5883'></a> \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% <a id='L5884' name='L5884'></a>} <a id='L5885' name='L5885'></a> <a id='L5886' name='L5886'></a>% Subsections. <a id='L5887' name='L5887'></a>% <a id='L5888' name='L5888'></a>% normally calls numberedsubseczzz: <a id='L5889' name='L5889'></a>\outer\parseargdef\numberedsubsec{\numhead2{#1}} <a id='L5890' name='L5890'></a>\def\numberedsubseczzz#1{% <a id='L5891' name='L5891'></a> \global\subsubsecno=0 \global\advance\subsecno by 1 <a id='L5892' name='L5892'></a> \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% <a id='L5893' name='L5893'></a>} <a id='L5894' name='L5894'></a> <a id='L5895' name='L5895'></a>% normally calls appendixsubseczzz: <a id='L5896' name='L5896'></a>\outer\parseargdef\appendixsubsec{\apphead2{#1}} <a id='L5897' name='L5897'></a>\def\appendixsubseczzz#1{% <a id='L5898' name='L5898'></a> \global\subsubsecno=0 \global\advance\subsecno by 1 <a id='L5899' name='L5899'></a> \sectionheading{#1}{subsec}{Yappendix}% <a id='L5900' name='L5900'></a> {\appendixletter.\the\secno.\the\subsecno}% <a id='L5901' name='L5901'></a>} <a id='L5902' name='L5902'></a> <a id='L5903' name='L5903'></a>% normally calls unnumberedsubseczzz: <a id='L5904' name='L5904'></a>\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} <a id='L5905' name='L5905'></a>\def\unnumberedsubseczzz#1{% <a id='L5906' name='L5906'></a> \global\subsubsecno=0 \global\advance\subsecno by 1 <a id='L5907' name='L5907'></a> \sectionheading{#1}{subsec}{Ynothing}% <a id='L5908' name='L5908'></a> {\the\unnumberedno.\the\secno.\the\subsecno}% <a id='L5909' name='L5909'></a>} <a id='L5910' name='L5910'></a> <a id='L5911' name='L5911'></a>% Subsubsections. <a id='L5912' name='L5912'></a>% <a id='L5913' name='L5913'></a>% normally numberedsubsubseczzz: <a id='L5914' name='L5914'></a>\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} <a id='L5915' name='L5915'></a>\def\numberedsubsubseczzz#1{% <a id='L5916' name='L5916'></a> \global\advance\subsubsecno by 1 <a id='L5917' name='L5917'></a> \sectionheading{#1}{subsubsec}{Ynumbered}% <a id='L5918' name='L5918'></a> {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% <a id='L5919' name='L5919'></a>} <a id='L5920' name='L5920'></a> <a id='L5921' name='L5921'></a>% normally appendixsubsubseczzz: <a id='L5922' name='L5922'></a>\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} <a id='L5923' name='L5923'></a>\def\appendixsubsubseczzz#1{% <a id='L5924' name='L5924'></a> \global\advance\subsubsecno by 1 <a id='L5925' name='L5925'></a> \sectionheading{#1}{subsubsec}{Yappendix}% <a id='L5926' name='L5926'></a> {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% <a id='L5927' name='L5927'></a>} <a id='L5928' name='L5928'></a> <a id='L5929' name='L5929'></a>% normally unnumberedsubsubseczzz: <a id='L5930' name='L5930'></a>\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} <a id='L5931' name='L5931'></a>\def\unnumberedsubsubseczzz#1{% <a id='L5932' name='L5932'></a> \global\advance\subsubsecno by 1 <a id='L5933' name='L5933'></a> \sectionheading{#1}{subsubsec}{Ynothing}% <a id='L5934' name='L5934'></a> {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}% <a id='L5935' name='L5935'></a>} <a id='L5936' name='L5936'></a> <a id='L5937' name='L5937'></a>% These macros control what the section commands do, according <a id='L5938' name='L5938'></a>% to what kind of chapter we are in (ordinary, appendix, or unnumbered). <a id='L5939' name='L5939'></a>% Define them by default for a numbered chapter. <a id='L5940' name='L5940'></a>\let\section = \numberedsec <a id='L5941' name='L5941'></a>\let\subsection = \numberedsubsec <a id='L5942' name='L5942'></a>\let\subsubsection = \numberedsubsubsec <a id='L5943' name='L5943'></a> <a id='L5944' name='L5944'></a>% Define @majorheading, @heading and @subheading <a id='L5945' name='L5945'></a> <a id='L5946' name='L5946'></a>\def\majorheading{% <a id='L5947' name='L5947'></a> {\advance\chapheadingskip by 10pt \chapbreak }% <a id='L5948' name='L5948'></a> \parsearg\chapheadingzzz <a id='L5949' name='L5949'></a>} <a id='L5950' name='L5950'></a> <a id='L5951' name='L5951'></a>\def\chapheading{\chapbreak \parsearg\chapheadingzzz} <a id='L5952' name='L5952'></a>\def\chapheadingzzz#1{% <a id='L5953' name='L5953'></a> \vbox{\chapfonts \raggedtitlesettings #1\par}% <a id='L5954' name='L5954'></a> \nobreak\bigskip \nobreak <a id='L5955' name='L5955'></a> \suppressfirstparagraphindent <a id='L5956' name='L5956'></a>} <a id='L5957' name='L5957'></a> <a id='L5958' name='L5958'></a>% @heading, @subheading, @subsubheading. <a id='L5959' name='L5959'></a>\parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{} <a id='L5960' name='L5960'></a> \suppressfirstparagraphindent} <a id='L5961' name='L5961'></a>\parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{} <a id='L5962' name='L5962'></a> \suppressfirstparagraphindent} <a id='L5963' name='L5963'></a>\parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{} <a id='L5964' name='L5964'></a> \suppressfirstparagraphindent} <a id='L5965' name='L5965'></a> <a id='L5966' name='L5966'></a>% These macros generate a chapter, section, etc. heading only <a id='L5967' name='L5967'></a>% (including whitespace, linebreaking, etc. around it), <a id='L5968' name='L5968'></a>% given all the information in convenient, parsed form. <a id='L5969' name='L5969'></a> <a id='L5970' name='L5970'></a>% Args are the skip and penalty (usually negative) <a id='L5971' name='L5971'></a>\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} <a id='L5972' name='L5972'></a> <a id='L5973' name='L5973'></a>% Parameter controlling skip before chapter headings (if needed) <a id='L5974' name='L5974'></a>\newskip\chapheadingskip <a id='L5975' name='L5975'></a> <a id='L5976' name='L5976'></a>% Define plain chapter starts, and page on/off switching for it. <a id='L5977' name='L5977'></a>\def\chapbreak{\dobreak \chapheadingskip {-4000}} <a id='L5978' name='L5978'></a>\def\chappager{\par\vfill\supereject} <a id='L5979' name='L5979'></a>% Because \domark is called before \chapoddpage, the filler page will <a id='L5980' name='L5980'></a>% get the headings for the next chapter, which is wrong. But we don't <a id='L5981' name='L5981'></a>% care -- we just disable all headings on the filler page. <a id='L5982' name='L5982'></a>\def\chapoddpage{% <a id='L5983' name='L5983'></a> \chappager <a id='L5984' name='L5984'></a> \ifodd\pageno \else <a id='L5985' name='L5985'></a> \begingroup <a id='L5986' name='L5986'></a> \headingsoff <a id='L5987' name='L5987'></a> \null <a id='L5988' name='L5988'></a> \chappager <a id='L5989' name='L5989'></a> \endgroup <a id='L5990' name='L5990'></a> \fi <a id='L5991' name='L5991'></a>} <a id='L5992' name='L5992'></a> <a id='L5993' name='L5993'></a>\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} <a id='L5994' name='L5994'></a> <a id='L5995' name='L5995'></a>\def\CHAPPAGoff{% <a id='L5996' name='L5996'></a>\global\let\contentsalignmacro = \chappager <a id='L5997' name='L5997'></a>\global\let\pchapsepmacro=\chapbreak <a id='L5998' name='L5998'></a>\global\let\pagealignmacro=\chappager} <a id='L5999' name='L5999'></a> <a id='L6000' name='L6000'></a>\def\CHAPPAGon{% <a id='L6001' name='L6001'></a>\global\let\contentsalignmacro = \chappager <a id='L6002' name='L6002'></a>\global\let\pchapsepmacro=\chappager <a id='L6003' name='L6003'></a>\global\let\pagealignmacro=\chappager <a id='L6004' name='L6004'></a>\global\def\HEADINGSon{\HEADINGSsingle}} <a id='L6005' name='L6005'></a> <a id='L6006' name='L6006'></a>\def\CHAPPAGodd{% <a id='L6007' name='L6007'></a>\global\let\contentsalignmacro = \chapoddpage <a id='L6008' name='L6008'></a>\global\let\pchapsepmacro=\chapoddpage <a id='L6009' name='L6009'></a>\global\let\pagealignmacro=\chapoddpage <a id='L6010' name='L6010'></a>\global\def\HEADINGSon{\HEADINGSdouble}} <a id='L6011' name='L6011'></a> <a id='L6012' name='L6012'></a>\CHAPPAGon <a id='L6013' name='L6013'></a> <a id='L6014' name='L6014'></a>% Chapter opening. <a id='L6015' name='L6015'></a>% <a id='L6016' name='L6016'></a>% #1 is the text, #2 is the section type (Ynumbered, Ynothing, <a id='L6017' name='L6017'></a>% Yappendix, Yomitfromtoc), #3 the chapter number. <a id='L6018' name='L6018'></a>% <a id='L6019' name='L6019'></a>% To test against our argument. <a id='L6020' name='L6020'></a>\def\Ynothingkeyword{Ynothing} <a id='L6021' name='L6021'></a>\def\Yomitfromtockeyword{Yomitfromtoc} <a id='L6022' name='L6022'></a>\def\Yappendixkeyword{Yappendix} <a id='L6023' name='L6023'></a>% <a id='L6024' name='L6024'></a>\def\chapmacro#1#2#3{% <a id='L6025' name='L6025'></a> % Insert the first mark before the heading break (see notes for \domark). <a id='L6026' name='L6026'></a> \let\prevchapterdefs=\lastchapterdefs <a id='L6027' name='L6027'></a> \let\prevsectiondefs=\lastsectiondefs <a id='L6028' name='L6028'></a> \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% <a id='L6029' name='L6029'></a> \gdef\thissection{}}% <a id='L6030' name='L6030'></a> % <a id='L6031' name='L6031'></a> \def\temptype{#2}% <a id='L6032' name='L6032'></a> \ifx\temptype\Ynothingkeyword <a id='L6033' name='L6033'></a> \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% <a id='L6034' name='L6034'></a> \gdef\thischapter{\thischaptername}}% <a id='L6035' name='L6035'></a> \else\ifx\temptype\Yomitfromtockeyword <a id='L6036' name='L6036'></a> \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% <a id='L6037' name='L6037'></a> \gdef\thischapter{}}% <a id='L6038' name='L6038'></a> \else\ifx\temptype\Yappendixkeyword <a id='L6039' name='L6039'></a> \toks0={#1}% <a id='L6040' name='L6040'></a> \xdef\lastchapterdefs{% <a id='L6041' name='L6041'></a> \gdef\noexpand\thischaptername{\the\toks0}% <a id='L6042' name='L6042'></a> \gdef\noexpand\thischapternum{\appendixletter}% <a id='L6043' name='L6043'></a> % \noexpand\putwordAppendix avoids expanding indigestible <a id='L6044' name='L6044'></a> % commands in some of the translations. <a id='L6045' name='L6045'></a> \gdef\noexpand\thischapter{\noexpand\putwordAppendix{} <a id='L6046' name='L6046'></a> \noexpand\thischapternum: <a id='L6047' name='L6047'></a> \noexpand\thischaptername}% <a id='L6048' name='L6048'></a> }% <a id='L6049' name='L6049'></a> \else <a id='L6050' name='L6050'></a> \toks0={#1}% <a id='L6051' name='L6051'></a> \xdef\lastchapterdefs{% <a id='L6052' name='L6052'></a> \gdef\noexpand\thischaptername{\the\toks0}% <a id='L6053' name='L6053'></a> \gdef\noexpand\thischapternum{\the\chapno}% <a id='L6054' name='L6054'></a> % \noexpand\putwordChapter avoids expanding indigestible <a id='L6055' name='L6055'></a> % commands in some of the translations. <a id='L6056' name='L6056'></a> \gdef\noexpand\thischapter{\noexpand\thischapternum <a id='L6057' name='L6057'></a> \noexpand\putwordChapter{}\ <a id='L6058' name='L6058'></a> \noexpand\thischaptername}% <a id='L6059' name='L6059'></a> }% <a id='L6060' name='L6060'></a> \fi\fi\fi <a id='L6061' name='L6061'></a> % <a id='L6062' name='L6062'></a> % Output the mark. Pass it through \safewhatsit, to take care of <a id='L6063' name='L6063'></a> % the preceding space. <a id='L6064' name='L6064'></a> \safewhatsit\domark <a id='L6065' name='L6065'></a> % <a id='L6066' name='L6066'></a> % Insert the chapter heading break. <a id='L6067' name='L6067'></a> \pchapsepmacro <a id='L6068' name='L6068'></a> % <a id='L6069' name='L6069'></a> % Now the second mark, after the heading break. No break points <a id='L6070' name='L6070'></a> % between here and the heading. <a id='L6071' name='L6071'></a> \let\prevchapterdefs=\lastchapterdefs <a id='L6072' name='L6072'></a> \let\prevsectiondefs=\lastsectiondefs <a id='L6073' name='L6073'></a> \domark <a id='L6074' name='L6074'></a> % <a id='L6075' name='L6075'></a> {% <a id='L6076' name='L6076'></a> \chapfonts \rmisbold <a id='L6077' name='L6077'></a> % <a id='L6078' name='L6078'></a> % Have to define \lastsection before calling \donoderef, because the <a id='L6079' name='L6079'></a> % xref code eventually uses it. On the other hand, it has to be called <a id='L6080' name='L6080'></a> % after \pchapsepmacro, or the headline will change too soon. <a id='L6081' name='L6081'></a> \gdef\lastsection{#1}% <a id='L6082' name='L6082'></a> % <a id='L6083' name='L6083'></a> % Only insert the separating space if we have a chapter/appendix <a id='L6084' name='L6084'></a> % number, and don't print the unnumbered ``number''. <a id='L6085' name='L6085'></a> \ifx\temptype\Ynothingkeyword <a id='L6086' name='L6086'></a> \setbox0 = \hbox{}% <a id='L6087' name='L6087'></a> \def\toctype{unnchap}% <a id='L6088' name='L6088'></a> \else\ifx\temptype\Yomitfromtockeyword <a id='L6089' name='L6089'></a> \setbox0 = \hbox{}% contents like unnumbered, but no toc entry <a id='L6090' name='L6090'></a> \def\toctype{omit}% <a id='L6091' name='L6091'></a> \else\ifx\temptype\Yappendixkeyword <a id='L6092' name='L6092'></a> \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% <a id='L6093' name='L6093'></a> \def\toctype{app}% <a id='L6094' name='L6094'></a> \else <a id='L6095' name='L6095'></a> \setbox0 = \hbox{#3\enspace}% <a id='L6096' name='L6096'></a> \def\toctype{numchap}% <a id='L6097' name='L6097'></a> \fi\fi\fi <a id='L6098' name='L6098'></a> % <a id='L6099' name='L6099'></a> % Write the toc entry for this chapter. Must come before the <a id='L6100' name='L6100'></a> % \donoderef, because we include the current node name in the toc <a id='L6101' name='L6101'></a> % entry, and \donoderef resets it to empty. <a id='L6102' name='L6102'></a> \writetocentry{\toctype}{#1}{#3}% <a id='L6103' name='L6103'></a> % <a id='L6104' name='L6104'></a> % For pdftex, we have to write out the node definition (aka, make <a id='L6105' name='L6105'></a> % the pdfdest) after any page break, but before the actual text has <a id='L6106' name='L6106'></a> % been typeset. If the destination for the pdf outline is after the <a id='L6107' name='L6107'></a> % text, then jumping from the outline may wind up with the text not <a id='L6108' name='L6108'></a> % being visible, for instance under high magnification. <a id='L6109' name='L6109'></a> \donoderef{#2}% <a id='L6110' name='L6110'></a> % <a id='L6111' name='L6111'></a> % Typeset the actual heading. <a id='L6112' name='L6112'></a> \nobreak % Avoid page breaks at the interline glue. <a id='L6113' name='L6113'></a> \vbox{\raggedtitlesettings \hangindent=\wd0 \centerparametersmaybe <a id='L6114' name='L6114'></a> \unhbox0 #1\par}% <a id='L6115' name='L6115'></a> }% <a id='L6116' name='L6116'></a> \nobreak\bigskip % no page break after a chapter title <a id='L6117' name='L6117'></a> \nobreak <a id='L6118' name='L6118'></a>} <a id='L6119' name='L6119'></a> <a id='L6120' name='L6120'></a>% @centerchap -- centered and unnumbered. <a id='L6121' name='L6121'></a>\let\centerparametersmaybe = \relax <a id='L6122' name='L6122'></a>\def\centerparameters{% <a id='L6123' name='L6123'></a> \advance\rightskip by 3\rightskip <a id='L6124' name='L6124'></a> \leftskip = \rightskip <a id='L6125' name='L6125'></a> \parfillskip = 0pt <a id='L6126' name='L6126'></a>} <a id='L6127' name='L6127'></a> <a id='L6128' name='L6128'></a> <a id='L6129' name='L6129'></a>% I don't think this chapter style is supported any more, so I'm not <a id='L6130' name='L6130'></a>% updating it with the new noderef stuff. We'll see. --karl, 11aug03. <a id='L6131' name='L6131'></a>% <a id='L6132' name='L6132'></a>\def\setchapterstyle #1 {\csname CHAPF#1\endcsname} <a id='L6133' name='L6133'></a>% <a id='L6134' name='L6134'></a>\def\unnchfopen #1{% <a id='L6135' name='L6135'></a> \chapoddpage <a id='L6136' name='L6136'></a> \vbox{\chapfonts \raggedtitlesettings #1\par}% <a id='L6137' name='L6137'></a> \nobreak\bigskip\nobreak <a id='L6138' name='L6138'></a>} <a id='L6139' name='L6139'></a>\def\chfopen #1#2{\chapoddpage {\chapfonts <a id='L6140' name='L6140'></a>\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% <a id='L6141' name='L6141'></a>\par\penalty 5000 % <a id='L6142' name='L6142'></a>} <a id='L6143' name='L6143'></a>\def\centerchfopen #1{% <a id='L6144' name='L6144'></a> \chapoddpage <a id='L6145' name='L6145'></a> \vbox{\chapfonts \raggedtitlesettings \hfill #1\hfill}% <a id='L6146' name='L6146'></a> \nobreak\bigskip \nobreak <a id='L6147' name='L6147'></a>} <a id='L6148' name='L6148'></a>\def\CHAPFopen{% <a id='L6149' name='L6149'></a> \global\let\chapmacro=\chfopen <a id='L6150' name='L6150'></a> \global\let\centerchapmacro=\centerchfopen} <a id='L6151' name='L6151'></a> <a id='L6152' name='L6152'></a> <a id='L6153' name='L6153'></a>% Section titles. These macros combine the section number parts and <a id='L6154' name='L6154'></a>% call the generic \sectionheading to do the printing. <a id='L6155' name='L6155'></a>% <a id='L6156' name='L6156'></a>\newskip\secheadingskip <a id='L6157' name='L6157'></a>\def\secheadingbreak{\dobreak \secheadingskip{-1000}} <a id='L6158' name='L6158'></a> <a id='L6159' name='L6159'></a>% Subsection titles. <a id='L6160' name='L6160'></a>\newskip\subsecheadingskip <a id='L6161' name='L6161'></a>\def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}} <a id='L6162' name='L6162'></a> <a id='L6163' name='L6163'></a>% Subsubsection titles. <a id='L6164' name='L6164'></a>\def\subsubsecheadingskip{\subsecheadingskip} <a id='L6165' name='L6165'></a>\def\subsubsecheadingbreak{\subsecheadingbreak} <a id='L6166' name='L6166'></a> <a id='L6167' name='L6167'></a> <a id='L6168' name='L6168'></a>% Print any size, any type, section title. <a id='L6169' name='L6169'></a>% <a id='L6170' name='L6170'></a>% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is <a id='L6171' name='L6171'></a>% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the <a id='L6172' name='L6172'></a>% section number. <a id='L6173' name='L6173'></a>% <a id='L6174' name='L6174'></a>\def\seckeyword{sec} <a id='L6175' name='L6175'></a>% <a id='L6176' name='L6176'></a>\def\sectionheading#1#2#3#4{% <a id='L6177' name='L6177'></a> {% <a id='L6178' name='L6178'></a> \checkenv{}% should not be in an environment. <a id='L6179' name='L6179'></a> % <a id='L6180' name='L6180'></a> % Switch to the right set of fonts. <a id='L6181' name='L6181'></a> \csname #2fonts\endcsname \rmisbold <a id='L6182' name='L6182'></a> % <a id='L6183' name='L6183'></a> \def\sectionlevel{#2}% <a id='L6184' name='L6184'></a> \def\temptype{#3}% <a id='L6185' name='L6185'></a> % <a id='L6186' name='L6186'></a> % Insert first mark before the heading break (see notes for \domark). <a id='L6187' name='L6187'></a> \let\prevsectiondefs=\lastsectiondefs <a id='L6188' name='L6188'></a> \ifx\temptype\Ynothingkeyword <a id='L6189' name='L6189'></a> \ifx\sectionlevel\seckeyword <a id='L6190' name='L6190'></a> \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% <a id='L6191' name='L6191'></a> \gdef\thissection{\thissectionname}}% <a id='L6192' name='L6192'></a> \fi <a id='L6193' name='L6193'></a> \else\ifx\temptype\Yomitfromtockeyword <a id='L6194' name='L6194'></a> % Don't redefine \thissection. <a id='L6195' name='L6195'></a> \else\ifx\temptype\Yappendixkeyword <a id='L6196' name='L6196'></a> \ifx\sectionlevel\seckeyword <a id='L6197' name='L6197'></a> \toks0={#1}% <a id='L6198' name='L6198'></a> \xdef\lastsectiondefs{% <a id='L6199' name='L6199'></a> \gdef\noexpand\thissectionname{\the\toks0}% <a id='L6200' name='L6200'></a> \gdef\noexpand\thissectionnum{#4}% <a id='L6201' name='L6201'></a> % \noexpand\putwordSection avoids expanding indigestible <a id='L6202' name='L6202'></a> % commands in some of the translations. <a id='L6203' name='L6203'></a> \gdef\noexpand\thissection{\noexpand\putwordSection{} <a id='L6204' name='L6204'></a> \noexpand\thissectionnum: <a id='L6205' name='L6205'></a> \noexpand\thissectionname}% <a id='L6206' name='L6206'></a> }% <a id='L6207' name='L6207'></a> \fi <a id='L6208' name='L6208'></a> \else <a id='L6209' name='L6209'></a> \ifx\sectionlevel\seckeyword <a id='L6210' name='L6210'></a> \toks0={#1}% <a id='L6211' name='L6211'></a> \xdef\lastsectiondefs{% <a id='L6212' name='L6212'></a> \gdef\noexpand\thissectionname{\the\toks0}% <a id='L6213' name='L6213'></a> \gdef\noexpand\thissectionnum{#4}% <a id='L6214' name='L6214'></a> % \noexpand\putwordSection avoids expanding indigestible <a id='L6215' name='L6215'></a> % commands in some of the translations. <a id='L6216' name='L6216'></a> \gdef\noexpand\thissection{\noexpand\putwordSection{} <a id='L6217' name='L6217'></a> \noexpand\thissectionnum: <a id='L6218' name='L6218'></a> \noexpand\thissectionname}% <a id='L6219' name='L6219'></a> }% <a id='L6220' name='L6220'></a> \fi <a id='L6221' name='L6221'></a> \fi\fi\fi <a id='L6222' name='L6222'></a> % <a id='L6223' name='L6223'></a> % Go into vertical mode. Usually we'll already be there, but we <a id='L6224' name='L6224'></a> % don't want the following whatsit to end up in a preceding paragraph <a id='L6225' name='L6225'></a> % if the document didn't happen to have a blank line. <a id='L6226' name='L6226'></a> \par <a id='L6227' name='L6227'></a> % <a id='L6228' name='L6228'></a> % Output the mark. Pass it through \safewhatsit, to take care of <a id='L6229' name='L6229'></a> % the preceding space. <a id='L6230' name='L6230'></a> \safewhatsit\domark <a id='L6231' name='L6231'></a> % <a id='L6232' name='L6232'></a> % Insert space above the heading. <a id='L6233' name='L6233'></a> \csname #2headingbreak\endcsname <a id='L6234' name='L6234'></a> % <a id='L6235' name='L6235'></a> % Now the second mark, after the heading break. No break points <a id='L6236' name='L6236'></a> % between here and the heading. <a id='L6237' name='L6237'></a> \let\prevsectiondefs=\lastsectiondefs <a id='L6238' name='L6238'></a> \domark <a id='L6239' name='L6239'></a> % <a id='L6240' name='L6240'></a> % Only insert the space after the number if we have a section number. <a id='L6241' name='L6241'></a> \ifx\temptype\Ynothingkeyword <a id='L6242' name='L6242'></a> \setbox0 = \hbox{}% <a id='L6243' name='L6243'></a> \def\toctype{unn}% <a id='L6244' name='L6244'></a> \gdef\lastsection{#1}% <a id='L6245' name='L6245'></a> \else\ifx\temptype\Yomitfromtockeyword <a id='L6246' name='L6246'></a> % for @headings -- no section number, don't include in toc, <a id='L6247' name='L6247'></a> % and don't redefine \lastsection. <a id='L6248' name='L6248'></a> \setbox0 = \hbox{}% <a id='L6249' name='L6249'></a> \def\toctype{omit}% <a id='L6250' name='L6250'></a> \let\sectionlevel=\empty <a id='L6251' name='L6251'></a> \else\ifx\temptype\Yappendixkeyword <a id='L6252' name='L6252'></a> \setbox0 = \hbox{#4\enspace}% <a id='L6253' name='L6253'></a> \def\toctype{app}% <a id='L6254' name='L6254'></a> \gdef\lastsection{#1}% <a id='L6255' name='L6255'></a> \else <a id='L6256' name='L6256'></a> \setbox0 = \hbox{#4\enspace}% <a id='L6257' name='L6257'></a> \def\toctype{num}% <a id='L6258' name='L6258'></a> \gdef\lastsection{#1}% <a id='L6259' name='L6259'></a> \fi\fi\fi <a id='L6260' name='L6260'></a> % <a id='L6261' name='L6261'></a> % Write the toc entry (before \donoderef). See comments in \chapmacro. <a id='L6262' name='L6262'></a> \writetocentry{\toctype\sectionlevel}{#1}{#4}% <a id='L6263' name='L6263'></a> % <a id='L6264' name='L6264'></a> % Write the node reference (= pdf destination for pdftex). <a id='L6265' name='L6265'></a> % Again, see comments in \chapmacro. <a id='L6266' name='L6266'></a> \donoderef{#3}% <a id='L6267' name='L6267'></a> % <a id='L6268' name='L6268'></a> % Interline glue will be inserted when the vbox is completed. <a id='L6269' name='L6269'></a> % That glue will be a valid breakpoint for the page, since it'll be <a id='L6270' name='L6270'></a> % preceded by a whatsit (usually from the \donoderef, or from the <a id='L6271' name='L6271'></a> % \writetocentry if there was no node). We don't want to allow that <a id='L6272' name='L6272'></a> % break, since then the whatsits could end up on page n while the <a id='L6273' name='L6273'></a> % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. <a id='L6274' name='L6274'></a> \nobreak <a id='L6275' name='L6275'></a> % <a id='L6276' name='L6276'></a> % Output the actual section heading. <a id='L6277' name='L6277'></a> \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright <a id='L6278' name='L6278'></a> \hangindent=\wd0 % zero if no section number <a id='L6279' name='L6279'></a> \unhbox0 #1}% <a id='L6280' name='L6280'></a> }% <a id='L6281' name='L6281'></a> % Add extra space after the heading -- half of whatever came above it. <a id='L6282' name='L6282'></a> % Don't allow stretch, though. <a id='L6283' name='L6283'></a> \kern .5 \csname #2headingskip\endcsname <a id='L6284' name='L6284'></a> % <a id='L6285' name='L6285'></a> % Do not let the kern be a potential breakpoint, as it would be if it <a id='L6286' name='L6286'></a> % was followed by glue. <a id='L6287' name='L6287'></a> \nobreak <a id='L6288' name='L6288'></a> % <a id='L6289' name='L6289'></a> % We'll almost certainly start a paragraph next, so don't let that <a id='L6290' name='L6290'></a> % glue accumulate. (Not a breakpoint because it's preceded by a <a id='L6291' name='L6291'></a> % discardable item.) However, when a paragraph is not started next <a id='L6292' name='L6292'></a> % (\startdefun, \cartouche, \center, etc.), this needs to be wiped out <a id='L6293' name='L6293'></a> % or the negative glue will cause weirdly wrong output, typically <a id='L6294' name='L6294'></a> % obscuring the section heading with something else. <a id='L6295' name='L6295'></a> \vskip-\parskip <a id='L6296' name='L6296'></a> % <a id='L6297' name='L6297'></a> % This is so the last item on the main vertical list is a known <a id='L6298' name='L6298'></a> % \penalty > 10000, so \startdefun, etc., can recognize the situation <a id='L6299' name='L6299'></a> % and do the needful. <a id='L6300' name='L6300'></a> \penalty 10001 <a id='L6301' name='L6301'></a>} <a id='L6302' name='L6302'></a> <a id='L6303' name='L6303'></a> <a id='L6304' name='L6304'></a>\message{toc,} <a id='L6305' name='L6305'></a>% Table of contents. <a id='L6306' name='L6306'></a>\newwrite\tocfile <a id='L6307' name='L6307'></a> <a id='L6308' name='L6308'></a>% Write an entry to the toc file, opening it if necessary. <a id='L6309' name='L6309'></a>% Called from @chapter, etc. <a id='L6310' name='L6310'></a>% <a id='L6311' name='L6311'></a>% Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno} <a id='L6312' name='L6312'></a>% We append the current node name (if any) and page number as additional <a id='L6313' name='L6313'></a>% arguments for the \{chap,sec,...}entry macros which will eventually <a id='L6314' name='L6314'></a>% read this. The node name is used in the pdf outlines as the <a id='L6315' name='L6315'></a>% destination to jump to. <a id='L6316' name='L6316'></a>% <a id='L6317' name='L6317'></a>% We open the .toc file for writing here instead of at @setfilename (or <a id='L6318' name='L6318'></a>% any other fixed time) so that @contents can be anywhere in the document. <a id='L6319' name='L6319'></a>% But if #1 is `omit', then we don't do anything. This is used for the <a id='L6320' name='L6320'></a>% table of contents chapter openings themselves. <a id='L6321' name='L6321'></a>% <a id='L6322' name='L6322'></a>\newif\iftocfileopened <a id='L6323' name='L6323'></a>\def\omitkeyword{omit}% <a id='L6324' name='L6324'></a>% <a id='L6325' name='L6325'></a>\def\writetocentry#1#2#3{% <a id='L6326' name='L6326'></a> \edef\writetoctype{#1}% <a id='L6327' name='L6327'></a> \ifx\writetoctype\omitkeyword \else <a id='L6328' name='L6328'></a> \iftocfileopened\else <a id='L6329' name='L6329'></a> \immediate\openout\tocfile = \jobname.toc <a id='L6330' name='L6330'></a> \global\tocfileopenedtrue <a id='L6331' name='L6331'></a> \fi <a id='L6332' name='L6332'></a> % <a id='L6333' name='L6333'></a> \iflinks <a id='L6334' name='L6334'></a> {\atdummies <a id='L6335' name='L6335'></a> \edef\temp{% <a id='L6336' name='L6336'></a> \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% <a id='L6337' name='L6337'></a> \temp <a id='L6338' name='L6338'></a> }% <a id='L6339' name='L6339'></a> \fi <a id='L6340' name='L6340'></a> \fi <a id='L6341' name='L6341'></a> % <a id='L6342' name='L6342'></a> % Tell \shipout to create a pdf destination on each page, if we're <a id='L6343' name='L6343'></a> % writing pdf. These are used in the table of contents. We can't <a id='L6344' name='L6344'></a> % just write one on every page because the title pages are numbered <a id='L6345' name='L6345'></a> % 1 and 2 (the page numbers aren't printed), and so are the first <a id='L6346' name='L6346'></a> % two pages of the document. Thus, we'd have two destinations named <a id='L6347' name='L6347'></a> % `1', and two named `2'. <a id='L6348' name='L6348'></a> \ifpdf \global\pdfmakepagedesttrue \fi <a id='L6349' name='L6349'></a>} <a id='L6350' name='L6350'></a> <a id='L6351' name='L6351'></a> <a id='L6352' name='L6352'></a>% These characters do not print properly in the Computer Modern roman <a id='L6353' name='L6353'></a>% fonts, so we must take special care. This is more or less redundant <a id='L6354' name='L6354'></a>% with the Texinfo input format setup at the end of this file. <a id='L6355' name='L6355'></a>% <a id='L6356' name='L6356'></a>\def\activecatcodes{% <a id='L6357' name='L6357'></a> \catcode`\"=\active <a id='L6358' name='L6358'></a> \catcode`\$=\active <a id='L6359' name='L6359'></a> \catcode`\<=\active <a id='L6360' name='L6360'></a> \catcode`\>=\active <a id='L6361' name='L6361'></a> \catcode`\\=\active <a id='L6362' name='L6362'></a> \catcode`\^=\active <a id='L6363' name='L6363'></a> \catcode`\_=\active <a id='L6364' name='L6364'></a> \catcode`\|=\active <a id='L6365' name='L6365'></a> \catcode`\~=\active <a id='L6366' name='L6366'></a>} <a id='L6367' name='L6367'></a> <a id='L6368' name='L6368'></a> <a id='L6369' name='L6369'></a>% Read the toc file, which is essentially Texinfo input. <a id='L6370' name='L6370'></a>\def\readtocfile{% <a id='L6371' name='L6371'></a> \setupdatafile <a id='L6372' name='L6372'></a> \activecatcodes <a id='L6373' name='L6373'></a> \input \tocreadfilename <a id='L6374' name='L6374'></a>} <a id='L6375' name='L6375'></a> <a id='L6376' name='L6376'></a>\newskip\contentsrightmargin \contentsrightmargin=1in <a id='L6377' name='L6377'></a>\newcount\savepageno <a id='L6378' name='L6378'></a>\newcount\lastnegativepageno \lastnegativepageno = -1 <a id='L6379' name='L6379'></a> <a id='L6380' name='L6380'></a>% Prepare to read what we've written to \tocfile. <a id='L6381' name='L6381'></a>% <a id='L6382' name='L6382'></a>\def\startcontents#1{% <a id='L6383' name='L6383'></a> % If @setchapternewpage on, and @headings double, the contents should <a id='L6384' name='L6384'></a> % start on an odd page, unlike chapters. Thus, we maintain <a id='L6385' name='L6385'></a> % \contentsalignmacro in parallel with \pagealignmacro. <a id='L6386' name='L6386'></a> % From: Torbjorn Granlund <tege@matematik.su.se> <a id='L6387' name='L6387'></a> \contentsalignmacro <a id='L6388' name='L6388'></a> \immediate\closeout\tocfile <a id='L6389' name='L6389'></a> % <a id='L6390' name='L6390'></a> % Don't need to put `Contents' or `Short Contents' in the headline. <a id='L6391' name='L6391'></a> % It is abundantly clear what they are. <a id='L6392' name='L6392'></a> \chapmacro{#1}{Yomitfromtoc}{}% <a id='L6393' name='L6393'></a> % <a id='L6394' name='L6394'></a> \savepageno = \pageno <a id='L6395' name='L6395'></a> \begingroup % Set up to handle contents files properly. <a id='L6396' name='L6396'></a> \raggedbottom % Worry more about breakpoints than the bottom. <a id='L6397' name='L6397'></a> \advance\hsize by -\contentsrightmargin % Don't use the full line length. <a id='L6398' name='L6398'></a> % <a id='L6399' name='L6399'></a> % Roman numerals for page numbers. <a id='L6400' name='L6400'></a> \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi <a id='L6401' name='L6401'></a>} <a id='L6402' name='L6402'></a> <a id='L6403' name='L6403'></a>% redefined for the two-volume lispref. We always output on <a id='L6404' name='L6404'></a>% \jobname.toc even if this is redefined. <a id='L6405' name='L6405'></a>% <a id='L6406' name='L6406'></a>\def\tocreadfilename{\jobname.toc} <a id='L6407' name='L6407'></a> <a id='L6408' name='L6408'></a>% Normal (long) toc. <a id='L6409' name='L6409'></a>% <a id='L6410' name='L6410'></a>\def\contents{% <a id='L6411' name='L6411'></a> \startcontents{\putwordTOC}% <a id='L6412' name='L6412'></a> \openin 1 \tocreadfilename\space <a id='L6413' name='L6413'></a> \ifeof 1 \else <a id='L6414' name='L6414'></a> \readtocfile <a id='L6415' name='L6415'></a> \fi <a id='L6416' name='L6416'></a> \vfill \eject <a id='L6417' name='L6417'></a> \contentsalignmacro % in case @setchapternewpage odd is in effect <a id='L6418' name='L6418'></a> \ifeof 1 \else <a id='L6419' name='L6419'></a> \pdfmakeoutlines <a id='L6420' name='L6420'></a> \fi <a id='L6421' name='L6421'></a> \closein 1 <a id='L6422' name='L6422'></a> \endgroup <a id='L6423' name='L6423'></a> \lastnegativepageno = \pageno <a id='L6424' name='L6424'></a> \global\pageno = \savepageno <a id='L6425' name='L6425'></a>} <a id='L6426' name='L6426'></a> <a id='L6427' name='L6427'></a>% And just the chapters. <a id='L6428' name='L6428'></a>\def\summarycontents{% <a id='L6429' name='L6429'></a> \startcontents{\putwordShortTOC}% <a id='L6430' name='L6430'></a> % <a id='L6431' name='L6431'></a> \let\partentry = \shortpartentry <a id='L6432' name='L6432'></a> \let\numchapentry = \shortchapentry <a id='L6433' name='L6433'></a> \let\appentry = \shortchapentry <a id='L6434' name='L6434'></a> \let\unnchapentry = \shortunnchapentry <a id='L6435' name='L6435'></a> % We want a true roman here for the page numbers. <a id='L6436' name='L6436'></a> \secfonts <a id='L6437' name='L6437'></a> \let\rm=\shortcontrm \let\bf=\shortcontbf <a id='L6438' name='L6438'></a> \let\sl=\shortcontsl \let\tt=\shortconttt <a id='L6439' name='L6439'></a> \rm <a id='L6440' name='L6440'></a> \hyphenpenalty = 10000 <a id='L6441' name='L6441'></a> \advance\baselineskip by 1pt % Open it up a little. <a id='L6442' name='L6442'></a> \def\numsecentry##1##2##3##4{} <a id='L6443' name='L6443'></a> \let\appsecentry = \numsecentry <a id='L6444' name='L6444'></a> \let\unnsecentry = \numsecentry <a id='L6445' name='L6445'></a> \let\numsubsecentry = \numsecentry <a id='L6446' name='L6446'></a> \let\appsubsecentry = \numsecentry <a id='L6447' name='L6447'></a> \let\unnsubsecentry = \numsecentry <a id='L6448' name='L6448'></a> \let\numsubsubsecentry = \numsecentry <a id='L6449' name='L6449'></a> \let\appsubsubsecentry = \numsecentry <a id='L6450' name='L6450'></a> \let\unnsubsubsecentry = \numsecentry <a id='L6451' name='L6451'></a> \openin 1 \tocreadfilename\space <a id='L6452' name='L6452'></a> \ifeof 1 \else <a id='L6453' name='L6453'></a> \readtocfile <a id='L6454' name='L6454'></a> \fi <a id='L6455' name='L6455'></a> \closein 1 <a id='L6456' name='L6456'></a> \vfill \eject <a id='L6457' name='L6457'></a> \contentsalignmacro % in case @setchapternewpage odd is in effect <a id='L6458' name='L6458'></a> \endgroup <a id='L6459' name='L6459'></a> \lastnegativepageno = \pageno <a id='L6460' name='L6460'></a> \global\pageno = \savepageno <a id='L6461' name='L6461'></a>} <a id='L6462' name='L6462'></a>\let\shortcontents = \summarycontents <a id='L6463' name='L6463'></a> <a id='L6464' name='L6464'></a>% Typeset the label for a chapter or appendix for the short contents. <a id='L6465' name='L6465'></a>% The arg is, e.g., `A' for an appendix, or `3' for a chapter. <a id='L6466' name='L6466'></a>% <a id='L6467' name='L6467'></a>\def\shortchaplabel#1{% <a id='L6468' name='L6468'></a> % This space should be enough, since a single number is .5em, and the <a id='L6469' name='L6469'></a> % widest letter (M) is 1em, at least in the Computer Modern fonts. <a id='L6470' name='L6470'></a> % But use \hss just in case. <a id='L6471' name='L6471'></a> % (This space doesn't include the extra space that gets added after <a id='L6472' name='L6472'></a> % the label; that gets put in by \shortchapentry above.) <a id='L6473' name='L6473'></a> % <a id='L6474' name='L6474'></a> % We'd like to right-justify chapter numbers, but that looks strange <a id='L6475' name='L6475'></a> % with appendix letters. And right-justifying numbers and <a id='L6476' name='L6476'></a> % left-justifying letters looks strange when there is less than 10 <a id='L6477' name='L6477'></a> % chapters. Have to read the whole toc once to know how many chapters <a id='L6478' name='L6478'></a> % there are before deciding ... <a id='L6479' name='L6479'></a> \hbox to 1em{#1\hss}% <a id='L6480' name='L6480'></a>} <a id='L6481' name='L6481'></a> <a id='L6482' name='L6482'></a>% These macros generate individual entries in the table of contents. <a id='L6483' name='L6483'></a>% The first argument is the chapter or section name. <a id='L6484' name='L6484'></a>% The last argument is the page number. <a id='L6485' name='L6485'></a>% The arguments in between are the chapter number, section number, ... <a id='L6486' name='L6486'></a> <a id='L6487' name='L6487'></a>% Parts, in the main contents. Replace the part number, which doesn't <a id='L6488' name='L6488'></a>% exist, with an empty box. Let's hope all the numbers have the same width. <a id='L6489' name='L6489'></a>% Also ignore the page number, which is conventionally not printed. <a id='L6490' name='L6490'></a>\def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}} <a id='L6491' name='L6491'></a>\def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}} <a id='L6492' name='L6492'></a>% <a id='L6493' name='L6493'></a>% Parts, in the short toc. <a id='L6494' name='L6494'></a>\def\shortpartentry#1#2#3#4{% <a id='L6495' name='L6495'></a> \penalty-300 <a id='L6496' name='L6496'></a> \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip <a id='L6497' name='L6497'></a> \shortchapentry{{\bf #1}}{\numeralbox}{}{}% <a id='L6498' name='L6498'></a>} <a id='L6499' name='L6499'></a> <a id='L6500' name='L6500'></a>% Chapters, in the main contents. <a id='L6501' name='L6501'></a>\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} <a id='L6502' name='L6502'></a>% <a id='L6503' name='L6503'></a>% Chapters, in the short toc. <a id='L6504' name='L6504'></a>% See comments in \dochapentry re vbox and related settings. <a id='L6505' name='L6505'></a>\def\shortchapentry#1#2#3#4{% <a id='L6506' name='L6506'></a> \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}% <a id='L6507' name='L6507'></a>} <a id='L6508' name='L6508'></a> <a id='L6509' name='L6509'></a>% Appendices, in the main contents. <a id='L6510' name='L6510'></a>% Need the word Appendix, and a fixed-size box. <a id='L6511' name='L6511'></a>% <a id='L6512' name='L6512'></a>\def\appendixbox#1{% <a id='L6513' name='L6513'></a> % We use M since it's probably the widest letter. <a id='L6514' name='L6514'></a> \setbox0 = \hbox{\putwordAppendix{} M}% <a id='L6515' name='L6515'></a> \hbox to \wd0{\putwordAppendix{} #1\hss}} <a id='L6516' name='L6516'></a>% <a id='L6517' name='L6517'></a>\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}} <a id='L6518' name='L6518'></a> <a id='L6519' name='L6519'></a>% Unnumbered chapters. <a id='L6520' name='L6520'></a>\def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} <a id='L6521' name='L6521'></a>\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}} <a id='L6522' name='L6522'></a> <a id='L6523' name='L6523'></a>% Sections. <a id='L6524' name='L6524'></a>\def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}} <a id='L6525' name='L6525'></a>\let\appsecentry=\numsecentry <a id='L6526' name='L6526'></a>\def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}} <a id='L6527' name='L6527'></a> <a id='L6528' name='L6528'></a>% Subsections. <a id='L6529' name='L6529'></a>\def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}} <a id='L6530' name='L6530'></a>\let\appsubsecentry=\numsubsecentry <a id='L6531' name='L6531'></a>\def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} <a id='L6532' name='L6532'></a> <a id='L6533' name='L6533'></a>% And subsubsections. <a id='L6534' name='L6534'></a>\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}} <a id='L6535' name='L6535'></a>\let\appsubsubsecentry=\numsubsubsecentry <a id='L6536' name='L6536'></a>\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}} <a id='L6537' name='L6537'></a> <a id='L6538' name='L6538'></a>% This parameter controls the indentation of the various levels. <a id='L6539' name='L6539'></a>% Same as \defaultparindent. <a id='L6540' name='L6540'></a>\newdimen\tocindent \tocindent = 15pt <a id='L6541' name='L6541'></a> <a id='L6542' name='L6542'></a>% Now for the actual typesetting. In all these, #1 is the text and #2 is the <a id='L6543' name='L6543'></a>% page number. <a id='L6544' name='L6544'></a>% <a id='L6545' name='L6545'></a>% If the toc has to be broken over pages, we want it to be at chapters <a id='L6546' name='L6546'></a>% if at all possible; hence the \penalty. <a id='L6547' name='L6547'></a>\def\dochapentry#1#2{% <a id='L6548' name='L6548'></a> \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip <a id='L6549' name='L6549'></a> \begingroup <a id='L6550' name='L6550'></a> \chapentryfonts <a id='L6551' name='L6551'></a> \tocentry{#1}{\dopageno\bgroup#2\egroup}% <a id='L6552' name='L6552'></a> \endgroup <a id='L6553' name='L6553'></a> \nobreak\vskip .25\baselineskip plus.1\baselineskip <a id='L6554' name='L6554'></a>} <a id='L6555' name='L6555'></a> <a id='L6556' name='L6556'></a>\def\dosecentry#1#2{\begingroup <a id='L6557' name='L6557'></a> \secentryfonts \leftskip=\tocindent <a id='L6558' name='L6558'></a> \tocentry{#1}{\dopageno\bgroup#2\egroup}% <a id='L6559' name='L6559'></a>\endgroup} <a id='L6560' name='L6560'></a> <a id='L6561' name='L6561'></a>\def\dosubsecentry#1#2{\begingroup <a id='L6562' name='L6562'></a> \subsecentryfonts \leftskip=2\tocindent <a id='L6563' name='L6563'></a> \tocentry{#1}{\dopageno\bgroup#2\egroup}% <a id='L6564' name='L6564'></a>\endgroup} <a id='L6565' name='L6565'></a> <a id='L6566' name='L6566'></a>\def\dosubsubsecentry#1#2{\begingroup <a id='L6567' name='L6567'></a> \subsubsecentryfonts \leftskip=3\tocindent <a id='L6568' name='L6568'></a> \tocentry{#1}{\dopageno\bgroup#2\egroup}% <a id='L6569' name='L6569'></a>\endgroup} <a id='L6570' name='L6570'></a> <a id='L6571' name='L6571'></a>% We use the same \entry macro as for the index entries. <a id='L6572' name='L6572'></a>\let\tocentry = \entry <a id='L6573' name='L6573'></a> <a id='L6574' name='L6574'></a>% Space between chapter (or whatever) number and the title. <a id='L6575' name='L6575'></a>\def\labelspace{\hskip1em \relax} <a id='L6576' name='L6576'></a> <a id='L6577' name='L6577'></a>\def\dopageno#1{{\rm #1}} <a id='L6578' name='L6578'></a>\def\doshortpageno#1{{\rm #1}} <a id='L6579' name='L6579'></a> <a id='L6580' name='L6580'></a>\def\chapentryfonts{\secfonts \rm} <a id='L6581' name='L6581'></a>\def\secentryfonts{\textfonts} <a id='L6582' name='L6582'></a>\def\subsecentryfonts{\textfonts} <a id='L6583' name='L6583'></a>\def\subsubsecentryfonts{\textfonts} <a id='L6584' name='L6584'></a> <a id='L6585' name='L6585'></a> <a id='L6586' name='L6586'></a>\message{environments,} <a id='L6587' name='L6587'></a>% @foo ... @end foo. <a id='L6588' name='L6588'></a> <a id='L6589' name='L6589'></a>% @tex ... @end tex escapes into raw TeX temporarily. <a id='L6590' name='L6590'></a>% One exception: @ is still an escape character, so that @end tex works. <a id='L6591' name='L6591'></a>% But \@ or @@ will get a plain @ character. <a id='L6592' name='L6592'></a> <a id='L6593' name='L6593'></a>\envdef\tex{% <a id='L6594' name='L6594'></a> \setupmarkupstyle{tex}% <a id='L6595' name='L6595'></a> \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 <a id='L6596' name='L6596'></a> \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 <a id='L6597' name='L6597'></a> \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie <a id='L6598' name='L6598'></a> \catcode `\%=14 <a id='L6599' name='L6599'></a> \catcode `\+=\other <a id='L6600' name='L6600'></a> \catcode `\"=\other <a id='L6601' name='L6601'></a> \catcode `\|=\other <a id='L6602' name='L6602'></a> \catcode `\<=\other <a id='L6603' name='L6603'></a> \catcode `\>=\other <a id='L6604' name='L6604'></a> \catcode`\`=\other <a id='L6605' name='L6605'></a> \catcode`\'=\other <a id='L6606' name='L6606'></a> \escapechar=`\\ <a id='L6607' name='L6607'></a> % <a id='L6608' name='L6608'></a> % ' is active in math mode (mathcode"8000). So reset it, and all our <a id='L6609' name='L6609'></a> % other math active characters (just in case), to plain's definitions. <a id='L6610' name='L6610'></a> \mathactive <a id='L6611' name='L6611'></a> % <a id='L6612' name='L6612'></a> \let\b=\ptexb <a id='L6613' name='L6613'></a> \let\bullet=\ptexbullet <a id='L6614' name='L6614'></a> \let\c=\ptexc <a id='L6615' name='L6615'></a> \let\,=\ptexcomma <a id='L6616' name='L6616'></a> \let\.=\ptexdot <a id='L6617' name='L6617'></a> \let\dots=\ptexdots <a id='L6618' name='L6618'></a> \let\equiv=\ptexequiv <a id='L6619' name='L6619'></a> \let\!=\ptexexclam <a id='L6620' name='L6620'></a> \let\i=\ptexi <a id='L6621' name='L6621'></a> \let\indent=\ptexindent <a id='L6622' name='L6622'></a> \let\noindent=\ptexnoindent <a id='L6623' name='L6623'></a> \let\{=\ptexlbrace <a id='L6624' name='L6624'></a> \let\+=\tabalign <a id='L6625' name='L6625'></a> \let\}=\ptexrbrace <a id='L6626' name='L6626'></a> \let\/=\ptexslash <a id='L6627' name='L6627'></a> \let\*=\ptexstar <a id='L6628' name='L6628'></a> \let\t=\ptext <a id='L6629' name='L6629'></a> \expandafter \let\csname top\endcsname=\ptextop % outer <a id='L6630' name='L6630'></a> \let\frenchspacing=\plainfrenchspacing <a id='L6631' name='L6631'></a> % <a id='L6632' name='L6632'></a> \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% <a id='L6633' name='L6633'></a> \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% <a id='L6634' name='L6634'></a> \def\@{@}% <a id='L6635' name='L6635'></a>} <a id='L6636' name='L6636'></a>% There is no need to define \Etex. <a id='L6637' name='L6637'></a> <a id='L6638' name='L6638'></a>% Define @lisp ... @end lisp. <a id='L6639' name='L6639'></a>% @lisp environment forms a group so it can rebind things, <a id='L6640' name='L6640'></a>% including the definition of @end lisp (which normally is erroneous). <a id='L6641' name='L6641'></a> <a id='L6642' name='L6642'></a>% Amount to narrow the margins by for @lisp. <a id='L6643' name='L6643'></a>\newskip\lispnarrowing \lispnarrowing=0.4in <a id='L6644' name='L6644'></a> <a id='L6645' name='L6645'></a>% This is the definition that ^^M gets inside @lisp, @example, and other <a id='L6646' name='L6646'></a>% such environments. \null is better than a space, since it doesn't <a id='L6647' name='L6647'></a>% have any width. <a id='L6648' name='L6648'></a>\def\lisppar{\null\endgraf} <a id='L6649' name='L6649'></a> <a id='L6650' name='L6650'></a>% This space is always present above and below environments. <a id='L6651' name='L6651'></a>\newskip\envskipamount \envskipamount = 0pt <a id='L6652' name='L6652'></a> <a id='L6653' name='L6653'></a>% Make spacing and below environment symmetrical. We use \parskip here <a id='L6654' name='L6654'></a>% to help in doing that, since in @example-like environments \parskip <a id='L6655' name='L6655'></a>% is reset to zero; thus the \afterenvbreak inserts no space -- but the <a id='L6656' name='L6656'></a>% start of the next paragraph will insert \parskip. <a id='L6657' name='L6657'></a>% <a id='L6658' name='L6658'></a>\def\aboveenvbreak{{% <a id='L6659' name='L6659'></a> % =10000 instead of <10000 because of a special case in \itemzzz and <a id='L6660' name='L6660'></a> % \sectionheading, q.v. <a id='L6661' name='L6661'></a> \ifnum \lastpenalty=10000 \else <a id='L6662' name='L6662'></a> \advance\envskipamount by \parskip <a id='L6663' name='L6663'></a> \endgraf <a id='L6664' name='L6664'></a> \ifdim\lastskip<\envskipamount <a id='L6665' name='L6665'></a> \removelastskip <a id='L6666' name='L6666'></a> % it's not a good place to break if the last penalty was \nobreak <a id='L6667' name='L6667'></a> % or better ... <a id='L6668' name='L6668'></a> \ifnum\lastpenalty<10000 \penalty-50 \fi <a id='L6669' name='L6669'></a> \vskip\envskipamount <a id='L6670' name='L6670'></a> \fi <a id='L6671' name='L6671'></a> \fi <a id='L6672' name='L6672'></a>}} <a id='L6673' name='L6673'></a> <a id='L6674' name='L6674'></a>\let\afterenvbreak = \aboveenvbreak <a id='L6675' name='L6675'></a> <a id='L6676' name='L6676'></a>% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will <a id='L6677' name='L6677'></a>% also clear it, so that its embedded environments do the narrowing again. <a id='L6678' name='L6678'></a>\let\nonarrowing=\relax <a id='L6679' name='L6679'></a> <a id='L6680' name='L6680'></a>% @cartouche ... @end cartouche: draw rectangle w/rounded corners around <a id='L6681' name='L6681'></a>% environment contents. <a id='L6682' name='L6682'></a>\font\circle=lcircle10 <a id='L6683' name='L6683'></a>\newdimen\circthick <a id='L6684' name='L6684'></a>\newdimen\cartouter\newdimen\cartinner <a id='L6685' name='L6685'></a>\newskip\normbskip\newskip\normpskip\newskip\normlskip <a id='L6686' name='L6686'></a>\circthick=\fontdimen8\circle <a id='L6687' name='L6687'></a>% <a id='L6688' name='L6688'></a>\def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth <a id='L6689' name='L6689'></a>\def\ctr{{\hskip 6pt\circle\char'010}} <a id='L6690' name='L6690'></a>\def\cbl{{\circle\char'012\hskip -6pt}} <a id='L6691' name='L6691'></a>\def\cbr{{\hskip 6pt\circle\char'011}} <a id='L6692' name='L6692'></a>\def\carttop{\hbox to \cartouter{\hskip\lskip <a id='L6693' name='L6693'></a> \ctl\leaders\hrule height\circthick\hfil\ctr <a id='L6694' name='L6694'></a> \hskip\rskip}} <a id='L6695' name='L6695'></a>\def\cartbot{\hbox to \cartouter{\hskip\lskip <a id='L6696' name='L6696'></a> \cbl\leaders\hrule height\circthick\hfil\cbr <a id='L6697' name='L6697'></a> \hskip\rskip}} <a id='L6698' name='L6698'></a>% <a id='L6699' name='L6699'></a>\newskip\lskip\newskip\rskip <a id='L6700' name='L6700'></a> <a id='L6701' name='L6701'></a>\envdef\cartouche{% <a id='L6702' name='L6702'></a> \ifhmode\par\fi % can't be in the midst of a paragraph. <a id='L6703' name='L6703'></a> \startsavinginserts <a id='L6704' name='L6704'></a> \lskip=\leftskip \rskip=\rightskip <a id='L6705' name='L6705'></a> \leftskip=0pt\rightskip=0pt % we want these *outside*. <a id='L6706' name='L6706'></a> \cartinner=\hsize \advance\cartinner by-\lskip <a id='L6707' name='L6707'></a> \advance\cartinner by-\rskip <a id='L6708' name='L6708'></a> \cartouter=\hsize <a id='L6709' name='L6709'></a> \advance\cartouter by 18.4pt % allow for 3pt kerns on either <a id='L6710' name='L6710'></a> % side, and for 6pt waste from <a id='L6711' name='L6711'></a> % each corner char, and rule thickness <a id='L6712' name='L6712'></a> \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip <a id='L6713' name='L6713'></a> % Flag to tell @lisp, etc., not to narrow margin. <a id='L6714' name='L6714'></a> \let\nonarrowing = t% <a id='L6715' name='L6715'></a> % <a id='L6716' name='L6716'></a> % If this cartouche directly follows a sectioning command, we need the <a id='L6717' name='L6717'></a> % \parskip glue (backspaced over by default) or the cartouche can <a id='L6718' name='L6718'></a> % collide with the section heading. <a id='L6719' name='L6719'></a> \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi <a id='L6720' name='L6720'></a> % <a id='L6721' name='L6721'></a> \vbox\bgroup <a id='L6722' name='L6722'></a> \baselineskip=0pt\parskip=0pt\lineskip=0pt <a id='L6723' name='L6723'></a> \carttop <a id='L6724' name='L6724'></a> \hbox\bgroup <a id='L6725' name='L6725'></a> \hskip\lskip <a id='L6726' name='L6726'></a> \vrule\kern3pt <a id='L6727' name='L6727'></a> \vbox\bgroup <a id='L6728' name='L6728'></a> \kern3pt <a id='L6729' name='L6729'></a> \hsize=\cartinner <a id='L6730' name='L6730'></a> \baselineskip=\normbskip <a id='L6731' name='L6731'></a> \lineskip=\normlskip <a id='L6732' name='L6732'></a> \parskip=\normpskip <a id='L6733' name='L6733'></a> \vskip -\parskip <a id='L6734' name='L6734'></a> \comment % For explanation, see the end of def\group. <a id='L6735' name='L6735'></a>} <a id='L6736' name='L6736'></a>\def\Ecartouche{% <a id='L6737' name='L6737'></a> \ifhmode\par\fi <a id='L6738' name='L6738'></a> \kern3pt <a id='L6739' name='L6739'></a> \egroup <a id='L6740' name='L6740'></a> \kern3pt\vrule <a id='L6741' name='L6741'></a> \hskip\rskip <a id='L6742' name='L6742'></a> \egroup <a id='L6743' name='L6743'></a> \cartbot <a id='L6744' name='L6744'></a> \egroup <a id='L6745' name='L6745'></a> \checkinserts <a id='L6746' name='L6746'></a>} <a id='L6747' name='L6747'></a> <a id='L6748' name='L6748'></a> <a id='L6749' name='L6749'></a>% This macro is called at the beginning of all the @example variants, <a id='L6750' name='L6750'></a>% inside a group. <a id='L6751' name='L6751'></a>\newdimen\nonfillparindent <a id='L6752' name='L6752'></a>\def\nonfillstart{% <a id='L6753' name='L6753'></a> \aboveenvbreak <a id='L6754' name='L6754'></a> \ifdim\hfuzz < 12pt \hfuzz = 12pt \fi % Don't be fussy <a id='L6755' name='L6755'></a> \sepspaces % Make spaces be word-separators rather than space tokens. <a id='L6756' name='L6756'></a> \let\par = \lisppar % don't ignore blank lines <a id='L6757' name='L6757'></a> \obeylines % each line of input is a line of output <a id='L6758' name='L6758'></a> \parskip = 0pt <a id='L6759' name='L6759'></a> % Turn off paragraph indentation but redefine \indent to emulate <a id='L6760' name='L6760'></a> % the normal \indent. <a id='L6761' name='L6761'></a> \nonfillparindent=\parindent <a id='L6762' name='L6762'></a> \parindent = 0pt <a id='L6763' name='L6763'></a> \let\indent\nonfillindent <a id='L6764' name='L6764'></a> % <a id='L6765' name='L6765'></a> \emergencystretch = 0pt % don't try to avoid overfull boxes <a id='L6766' name='L6766'></a> \ifx\nonarrowing\relax <a id='L6767' name='L6767'></a> \advance \leftskip by \lispnarrowing <a id='L6768' name='L6768'></a> \exdentamount=\lispnarrowing <a id='L6769' name='L6769'></a> \else <a id='L6770' name='L6770'></a> \let\nonarrowing = \relax <a id='L6771' name='L6771'></a> \fi <a id='L6772' name='L6772'></a> \let\exdent=\nofillexdent <a id='L6773' name='L6773'></a>} <a id='L6774' name='L6774'></a> <a id='L6775' name='L6775'></a>\begingroup <a id='L6776' name='L6776'></a>\obeyspaces <a id='L6777' name='L6777'></a>% We want to swallow spaces (but not other tokens) after the fake <a id='L6778' name='L6778'></a>% @indent in our nonfill-environments, where spaces are normally <a id='L6779' name='L6779'></a>% active and set to @tie, resulting in them not being ignored after <a id='L6780' name='L6780'></a>% @indent. <a id='L6781' name='L6781'></a>\gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}% <a id='L6782' name='L6782'></a>\gdef\nonfillindentcheck{% <a id='L6783' name='L6783'></a>\ifx\temp % <a id='L6784' name='L6784'></a>\expandafter\nonfillindentgobble% <a id='L6785' name='L6785'></a>\else% <a id='L6786' name='L6786'></a>\leavevmode\nonfillindentbox% <a id='L6787' name='L6787'></a>\fi% <a id='L6788' name='L6788'></a>}% <a id='L6789' name='L6789'></a>\endgroup <a id='L6790' name='L6790'></a>\def\nonfillindentgobble#1{\nonfillindent} <a id='L6791' name='L6791'></a>\def\nonfillindentbox{\hbox to \nonfillparindent{\hss}} <a id='L6792' name='L6792'></a> <a id='L6793' name='L6793'></a>% If you want all examples etc. small: @set dispenvsize small. <a id='L6794' name='L6794'></a>% If you want even small examples the full size: @set dispenvsize nosmall. <a id='L6795' name='L6795'></a>% This affects the following displayed environments: <a id='L6796' name='L6796'></a>% @example, @display, @format, @lisp <a id='L6797' name='L6797'></a>% <a id='L6798' name='L6798'></a>\def\smallword{small} <a id='L6799' name='L6799'></a>\def\nosmallword{nosmall} <a id='L6800' name='L6800'></a>\let\SETdispenvsize\relax <a id='L6801' name='L6801'></a>\def\setnormaldispenv{% <a id='L6802' name='L6802'></a> \ifx\SETdispenvsize\smallword <a id='L6803' name='L6803'></a> % end paragraph for sake of leading, in case document has no blank <a id='L6804' name='L6804'></a> % line. This is redundant with what happens in \aboveenvbreak, but <a id='L6805' name='L6805'></a> % we need to do it before changing the fonts, and it's inconvenient <a id='L6806' name='L6806'></a> % to change the fonts afterward. <a id='L6807' name='L6807'></a> \ifnum \lastpenalty=10000 \else \endgraf \fi <a id='L6808' name='L6808'></a> \smallexamplefonts \rm <a id='L6809' name='L6809'></a> \fi <a id='L6810' name='L6810'></a>} <a id='L6811' name='L6811'></a>\def\setsmalldispenv{% <a id='L6812' name='L6812'></a> \ifx\SETdispenvsize\nosmallword <a id='L6813' name='L6813'></a> \else <a id='L6814' name='L6814'></a> \ifnum \lastpenalty=10000 \else \endgraf \fi <a id='L6815' name='L6815'></a> \smallexamplefonts \rm <a id='L6816' name='L6816'></a> \fi <a id='L6817' name='L6817'></a>} <a id='L6818' name='L6818'></a> <a id='L6819' name='L6819'></a>% We often define two environments, @foo and @smallfoo. <a id='L6820' name='L6820'></a>% Let's do it in one command. #1 is the env name, #2 the definition. <a id='L6821' name='L6821'></a>\def\makedispenvdef#1#2{% <a id='L6822' name='L6822'></a> \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}% <a id='L6823' name='L6823'></a> \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}% <a id='L6824' name='L6824'></a> \expandafter\let\csname E#1\endcsname \afterenvbreak <a id='L6825' name='L6825'></a> \expandafter\let\csname Esmall#1\endcsname \afterenvbreak <a id='L6826' name='L6826'></a>} <a id='L6827' name='L6827'></a> <a id='L6828' name='L6828'></a>% Define two environment synonyms (#1 and #2) for an environment. <a id='L6829' name='L6829'></a>\def\maketwodispenvdef#1#2#3{% <a id='L6830' name='L6830'></a> \makedispenvdef{#1}{#3}% <a id='L6831' name='L6831'></a> \makedispenvdef{#2}{#3}% <a id='L6832' name='L6832'></a>} <a id='L6833' name='L6833'></a>% <a id='L6834' name='L6834'></a>% @lisp: indented, narrowed, typewriter font; <a id='L6835' name='L6835'></a>% @example: same as @lisp. <a id='L6836' name='L6836'></a>% <a id='L6837' name='L6837'></a>% @smallexample and @smalllisp: use smaller fonts. <a id='L6838' name='L6838'></a>% Originally contributed by Pavel@xerox. <a id='L6839' name='L6839'></a>% <a id='L6840' name='L6840'></a>\maketwodispenvdef{lisp}{example}{% <a id='L6841' name='L6841'></a> \nonfillstart <a id='L6842' name='L6842'></a> \tt\setupmarkupstyle{example}% <a id='L6843' name='L6843'></a> \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. <a id='L6844' name='L6844'></a> \gobble % eat return <a id='L6845' name='L6845'></a>} <a id='L6846' name='L6846'></a>% @display/@smalldisplay: same as @lisp except keep current font. <a id='L6847' name='L6847'></a>% <a id='L6848' name='L6848'></a>\makedispenvdef{display}{% <a id='L6849' name='L6849'></a> \nonfillstart <a id='L6850' name='L6850'></a> \gobble <a id='L6851' name='L6851'></a>} <a id='L6852' name='L6852'></a> <a id='L6853' name='L6853'></a>% @format/@smallformat: same as @display except don't narrow margins. <a id='L6854' name='L6854'></a>% <a id='L6855' name='L6855'></a>\makedispenvdef{format}{% <a id='L6856' name='L6856'></a> \let\nonarrowing = t% <a id='L6857' name='L6857'></a> \nonfillstart <a id='L6858' name='L6858'></a> \gobble <a id='L6859' name='L6859'></a>} <a id='L6860' name='L6860'></a> <a id='L6861' name='L6861'></a>% @flushleft: same as @format, but doesn't obey \SETdispenvsize. <a id='L6862' name='L6862'></a>\envdef\flushleft{% <a id='L6863' name='L6863'></a> \let\nonarrowing = t% <a id='L6864' name='L6864'></a> \nonfillstart <a id='L6865' name='L6865'></a> \gobble <a id='L6866' name='L6866'></a>} <a id='L6867' name='L6867'></a>\let\Eflushleft = \afterenvbreak <a id='L6868' name='L6868'></a> <a id='L6869' name='L6869'></a>% @flushright. <a id='L6870' name='L6870'></a>% <a id='L6871' name='L6871'></a>\envdef\flushright{% <a id='L6872' name='L6872'></a> \let\nonarrowing = t% <a id='L6873' name='L6873'></a> \nonfillstart <a id='L6874' name='L6874'></a> \advance\leftskip by 0pt plus 1fill\relax <a id='L6875' name='L6875'></a> \gobble <a id='L6876' name='L6876'></a>} <a id='L6877' name='L6877'></a>\let\Eflushright = \afterenvbreak <a id='L6878' name='L6878'></a> <a id='L6879' name='L6879'></a> <a id='L6880' name='L6880'></a>% @raggedright does more-or-less normal line breaking but no right <a id='L6881' name='L6881'></a>% justification. From plain.tex. <a id='L6882' name='L6882'></a>\envdef\raggedright{% <a id='L6883' name='L6883'></a> \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax <a id='L6884' name='L6884'></a>} <a id='L6885' name='L6885'></a>\let\Eraggedright\par <a id='L6886' name='L6886'></a> <a id='L6887' name='L6887'></a>\envdef\raggedleft{% <a id='L6888' name='L6888'></a> \parindent=0pt \leftskip0pt plus2em <a id='L6889' name='L6889'></a> \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt <a id='L6890' name='L6890'></a> \hbadness=10000 % Last line will usually be underfull, so turn off <a id='L6891' name='L6891'></a> % badness reporting. <a id='L6892' name='L6892'></a>} <a id='L6893' name='L6893'></a>\let\Eraggedleft\par <a id='L6894' name='L6894'></a> <a id='L6895' name='L6895'></a>\envdef\raggedcenter{% <a id='L6896' name='L6896'></a> \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em <a id='L6897' name='L6897'></a> \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt <a id='L6898' name='L6898'></a> \hbadness=10000 % Last line will usually be underfull, so turn off <a id='L6899' name='L6899'></a> % badness reporting. <a id='L6900' name='L6900'></a>} <a id='L6901' name='L6901'></a>\let\Eraggedcenter\par <a id='L6902' name='L6902'></a> <a id='L6903' name='L6903'></a> <a id='L6904' name='L6904'></a>% @quotation does normal linebreaking (hence we can't use \nonfillstart) <a id='L6905' name='L6905'></a>% and narrows the margins. We keep \parskip nonzero in general, since <a id='L6906' name='L6906'></a>% we're doing normal filling. So, when using \aboveenvbreak and <a id='L6907' name='L6907'></a>% \afterenvbreak, temporarily make \parskip 0. <a id='L6908' name='L6908'></a>% <a id='L6909' name='L6909'></a>\makedispenvdef{quotation}{\quotationstart} <a id='L6910' name='L6910'></a>% <a id='L6911' name='L6911'></a>\def\quotationstart{% <a id='L6912' name='L6912'></a> \indentedblockstart % same as \indentedblock, but increase right margin too. <a id='L6913' name='L6913'></a> \ifx\nonarrowing\relax <a id='L6914' name='L6914'></a> \advance\rightskip by \lispnarrowing <a id='L6915' name='L6915'></a> \fi <a id='L6916' name='L6916'></a> \parsearg\quotationlabel <a id='L6917' name='L6917'></a>} <a id='L6918' name='L6918'></a> <a id='L6919' name='L6919'></a>% We have retained a nonzero parskip for the environment, since we're <a id='L6920' name='L6920'></a>% doing normal filling. <a id='L6921' name='L6921'></a>% <a id='L6922' name='L6922'></a>\def\Equotation{% <a id='L6923' name='L6923'></a> \par <a id='L6924' name='L6924'></a> \ifx\quotationauthor\thisisundefined\else <a id='L6925' name='L6925'></a> % indent a bit. <a id='L6926' name='L6926'></a> \leftline{\kern 2\leftskip \sl ---\quotationauthor}% <a id='L6927' name='L6927'></a> \fi <a id='L6928' name='L6928'></a> {\parskip=0pt \afterenvbreak}% <a id='L6929' name='L6929'></a>} <a id='L6930' name='L6930'></a>\def\Esmallquotation{\Equotation} <a id='L6931' name='L6931'></a> <a id='L6932' name='L6932'></a>% If we're given an argument, typeset it in bold with a colon after. <a id='L6933' name='L6933'></a>\def\quotationlabel#1{% <a id='L6934' name='L6934'></a> \def\temp{#1}% <a id='L6935' name='L6935'></a> \ifx\temp\empty \else <a id='L6936' name='L6936'></a> {\bf #1: }% <a id='L6937' name='L6937'></a> \fi <a id='L6938' name='L6938'></a>} <a id='L6939' name='L6939'></a> <a id='L6940' name='L6940'></a>% @indentedblock is like @quotation, but indents only on the left and <a id='L6941' name='L6941'></a>% has no optional argument. <a id='L6942' name='L6942'></a>% <a id='L6943' name='L6943'></a>\makedispenvdef{indentedblock}{\indentedblockstart} <a id='L6944' name='L6944'></a>% <a id='L6945' name='L6945'></a>\def\indentedblockstart{% <a id='L6946' name='L6946'></a> {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip <a id='L6947' name='L6947'></a> \parindent=0pt <a id='L6948' name='L6948'></a> % <a id='L6949' name='L6949'></a> % @cartouche defines \nonarrowing to inhibit narrowing at next level down. <a id='L6950' name='L6950'></a> \ifx\nonarrowing\relax <a id='L6951' name='L6951'></a> \advance\leftskip by \lispnarrowing <a id='L6952' name='L6952'></a> \exdentamount = \lispnarrowing <a id='L6953' name='L6953'></a> \else <a id='L6954' name='L6954'></a> \let\nonarrowing = \relax <a id='L6955' name='L6955'></a> \fi <a id='L6956' name='L6956'></a>} <a id='L6957' name='L6957'></a> <a id='L6958' name='L6958'></a>% Keep a nonzero parskip for the environment, since we're doing normal filling. <a id='L6959' name='L6959'></a>% <a id='L6960' name='L6960'></a>\def\Eindentedblock{% <a id='L6961' name='L6961'></a> \par <a id='L6962' name='L6962'></a> {\parskip=0pt \afterenvbreak}% <a id='L6963' name='L6963'></a>} <a id='L6964' name='L6964'></a>\def\Esmallindentedblock{\Eindentedblock} <a id='L6965' name='L6965'></a> <a id='L6966' name='L6966'></a> <a id='L6967' name='L6967'></a>% LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>} <a id='L6968' name='L6968'></a>% If we want to allow any <char> as delimiter, <a id='L6969' name='L6969'></a>% we need the curly braces so that makeinfo sees the @verb command, eg: <a id='L6970' name='L6970'></a>% `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org <a id='L6971' name='L6971'></a>% <a id='L6972' name='L6972'></a>% [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. <a id='L6973' name='L6973'></a>% <a id='L6974' name='L6974'></a>% [Knuth] p.344; only we need to do the other characters Texinfo sets <a id='L6975' name='L6975'></a>% active too. Otherwise, they get lost as the first character on a <a id='L6976' name='L6976'></a>% verbatim line. <a id='L6977' name='L6977'></a>\def\dospecials{% <a id='L6978' name='L6978'></a> \do\ \do\\\do\{\do\}\do\$\do\&% <a id='L6979' name='L6979'></a> \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% <a id='L6980' name='L6980'></a> \do\<\do\>\do\|\do\@\do+\do\"% <a id='L6981' name='L6981'></a> % Don't do the quotes -- if we do, @set txicodequoteundirected and <a id='L6982' name='L6982'></a> % @set txicodequotebacktick will not have effect on @verb and <a id='L6983' name='L6983'></a> % @verbatim, and ?` and !` ligatures won't get disabled. <a id='L6984' name='L6984'></a> %\do\`\do\'% <a id='L6985' name='L6985'></a>} <a id='L6986' name='L6986'></a>% <a id='L6987' name='L6987'></a>% [Knuth] p. 380 <a id='L6988' name='L6988'></a>\def\uncatcodespecials{% <a id='L6989' name='L6989'></a> \def\do##1{\catcode`##1=\other}\dospecials} <a id='L6990' name='L6990'></a>% <a id='L6991' name='L6991'></a>% Setup for the @verb command. <a id='L6992' name='L6992'></a>% <a id='L6993' name='L6993'></a>% Eight spaces for a tab <a id='L6994' name='L6994'></a>\begingroup <a id='L6995' name='L6995'></a> \catcode`\^^I=\active <a id='L6996' name='L6996'></a> \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} <a id='L6997' name='L6997'></a>\endgroup <a id='L6998' name='L6998'></a>% <a id='L6999' name='L6999'></a>\def\setupverb{% <a id='L7000' name='L7000'></a> \tt % easiest (and conventionally used) font for verbatim <a id='L7001' name='L7001'></a> \def\par{\leavevmode\endgraf}% <a id='L7002' name='L7002'></a> \setupmarkupstyle{verb}% <a id='L7003' name='L7003'></a> \tabeightspaces <a id='L7004' name='L7004'></a> % Respect line breaks, <a id='L7005' name='L7005'></a> % print special symbols as themselves, and <a id='L7006' name='L7006'></a> % make each space count <a id='L7007' name='L7007'></a> % must do in this order: <a id='L7008' name='L7008'></a> \obeylines \uncatcodespecials \sepspaces <a id='L7009' name='L7009'></a>} <a id='L7010' name='L7010'></a> <a id='L7011' name='L7011'></a>% Setup for the @verbatim environment <a id='L7012' name='L7012'></a>% <a id='L7013' name='L7013'></a>% Real tab expansion. <a id='L7014' name='L7014'></a>\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount <a id='L7015' name='L7015'></a>% <a id='L7016' name='L7016'></a>% We typeset each line of the verbatim in an \hbox, so we can handle <a id='L7017' name='L7017'></a>% tabs. The \global is in case the verbatim line starts with an accent, <a id='L7018' name='L7018'></a>% or some other command that starts with a begin-group. Otherwise, the <a id='L7019' name='L7019'></a>% entire \verbbox would disappear at the corresponding end-group, before <a id='L7020' name='L7020'></a>% it is typeset. Meanwhile, we can't have nested verbatim commands <a id='L7021' name='L7021'></a>% (can we?), so the \global won't be overwriting itself. <a id='L7022' name='L7022'></a>\newbox\verbbox <a id='L7023' name='L7023'></a>\def\starttabbox{\global\setbox\verbbox=\hbox\bgroup} <a id='L7024' name='L7024'></a>% <a id='L7025' name='L7025'></a>\begingroup <a id='L7026' name='L7026'></a> \catcode`\^^I=\active <a id='L7027' name='L7027'></a> \gdef\tabexpand{% <a id='L7028' name='L7028'></a> \catcode`\^^I=\active <a id='L7029' name='L7029'></a> \def^^I{\leavevmode\egroup <a id='L7030' name='L7030'></a> \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab <a id='L7031' name='L7031'></a> \divide\dimen\verbbox by\tabw <a id='L7032' name='L7032'></a> \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw <a id='L7033' name='L7033'></a> \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw <a id='L7034' name='L7034'></a> \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox <a id='L7035' name='L7035'></a> }% <a id='L7036' name='L7036'></a> } <a id='L7037' name='L7037'></a>\endgroup <a id='L7038' name='L7038'></a> <a id='L7039' name='L7039'></a>% start the verbatim environment. <a id='L7040' name='L7040'></a>\def\setupverbatim{% <a id='L7041' name='L7041'></a> \let\nonarrowing = t% <a id='L7042' name='L7042'></a> \nonfillstart <a id='L7043' name='L7043'></a> \tt % easiest (and conventionally used) font for verbatim <a id='L7044' name='L7044'></a> % The \leavevmode here is for blank lines. Otherwise, we would <a id='L7045' name='L7045'></a> % never \starttabox and the \egroup would end verbatim mode. <a id='L7046' name='L7046'></a> \def\par{\leavevmode\egroup\box\verbbox\endgraf}% <a id='L7047' name='L7047'></a> \tabexpand <a id='L7048' name='L7048'></a> \setupmarkupstyle{verbatim}% <a id='L7049' name='L7049'></a> % Respect line breaks, <a id='L7050' name='L7050'></a> % print special symbols as themselves, and <a id='L7051' name='L7051'></a> % make each space count. <a id='L7052' name='L7052'></a> % Must do in this order: <a id='L7053' name='L7053'></a> \obeylines \uncatcodespecials \sepspaces <a id='L7054' name='L7054'></a> \everypar{\starttabbox}% <a id='L7055' name='L7055'></a>} <a id='L7056' name='L7056'></a> <a id='L7057' name='L7057'></a>% Do the @verb magic: verbatim text is quoted by unique <a id='L7058' name='L7058'></a>% delimiter characters. Before first delimiter expect a <a id='L7059' name='L7059'></a>% right brace, after last delimiter expect closing brace: <a id='L7060' name='L7060'></a>% <a id='L7061' name='L7061'></a>% \def\doverb'{'<char>#1<char>'}'{#1} <a id='L7062' name='L7062'></a>% <a id='L7063' name='L7063'></a>% [Knuth] p. 382; only eat outer {} <a id='L7064' name='L7064'></a>\begingroup <a id='L7065' name='L7065'></a> \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other <a id='L7066' name='L7066'></a> \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] <a id='L7067' name='L7067'></a>\endgroup <a id='L7068' name='L7068'></a>% <a id='L7069' name='L7069'></a>\def\verb{\begingroup\setupverb\doverb} <a id='L7070' name='L7070'></a>% <a id='L7071' name='L7071'></a>% <a id='L7072' name='L7072'></a>% Do the @verbatim magic: define the macro \doverbatim so that <a id='L7073' name='L7073'></a>% the (first) argument ends when '@end verbatim' is reached, ie: <a id='L7074' name='L7074'></a>% <a id='L7075' name='L7075'></a>% \def\doverbatim#1@end verbatim{#1} <a id='L7076' name='L7076'></a>% <a id='L7077' name='L7077'></a>% For Texinfo it's a lot easier than for LaTeX, <a id='L7078' name='L7078'></a>% because texinfo's \verbatim doesn't stop at '\end{verbatim}': <a id='L7079' name='L7079'></a>% we need not redefine '\', '{' and '}'. <a id='L7080' name='L7080'></a>% <a id='L7081' name='L7081'></a>% Inspired by LaTeX's verbatim command set [latex.ltx] <a id='L7082' name='L7082'></a>% <a id='L7083' name='L7083'></a>\begingroup <a id='L7084' name='L7084'></a> \catcode`\ =\active <a id='L7085' name='L7085'></a> \obeylines % <a id='L7086' name='L7086'></a> % ignore everything up to the first ^^M, that's the newline at the end <a id='L7087' name='L7087'></a> % of the @verbatim input line itself. Otherwise we get an extra blank <a id='L7088' name='L7088'></a> % line in the output. <a id='L7089' name='L7089'></a> \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}% <a id='L7090' name='L7090'></a> % We really want {...\end verbatim} in the body of the macro, but <a id='L7091' name='L7091'></a> % without the active space; thus we have to use \xdef and \gobble. <a id='L7092' name='L7092'></a>\endgroup <a id='L7093' name='L7093'></a>% <a id='L7094' name='L7094'></a>\envdef\verbatim{% <a id='L7095' name='L7095'></a> \setupverbatim\doverbatim <a id='L7096' name='L7096'></a>} <a id='L7097' name='L7097'></a>\let\Everbatim = \afterenvbreak <a id='L7098' name='L7098'></a> <a id='L7099' name='L7099'></a> <a id='L7100' name='L7100'></a>% @verbatiminclude FILE - insert text of file in verbatim environment. <a id='L7101' name='L7101'></a>% <a id='L7102' name='L7102'></a>\def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} <a id='L7103' name='L7103'></a>% <a id='L7104' name='L7104'></a>\def\doverbatiminclude#1{% <a id='L7105' name='L7105'></a> {% <a id='L7106' name='L7106'></a> \makevalueexpandable <a id='L7107' name='L7107'></a> \setupverbatim <a id='L7108' name='L7108'></a> \indexnofonts % Allow `@@' and other weird things in file names. <a id='L7109' name='L7109'></a> \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}% <a id='L7110' name='L7110'></a> \input #1 <a id='L7111' name='L7111'></a> \afterenvbreak <a id='L7112' name='L7112'></a> }% <a id='L7113' name='L7113'></a>} <a id='L7114' name='L7114'></a> <a id='L7115' name='L7115'></a>% @copying ... @end copying. <a id='L7116' name='L7116'></a>% Save the text away for @insertcopying later. <a id='L7117' name='L7117'></a>% <a id='L7118' name='L7118'></a>% We save the uninterpreted tokens, rather than creating a box. <a id='L7119' name='L7119'></a>% Saving the text in a box would be much easier, but then all the <a id='L7120' name='L7120'></a>% typesetting commands (@smallbook, font changes, etc.) have to be done <a id='L7121' name='L7121'></a>% beforehand -- and a) we want @copying to be done first in the source <a id='L7122' name='L7122'></a>% file; b) letting users define the frontmatter in as flexible order as <a id='L7123' name='L7123'></a>% possible is very desirable. <a id='L7124' name='L7124'></a>% <a id='L7125' name='L7125'></a>\def\copying{\checkenv{}\begingroup\scanargctxt\docopying} <a id='L7126' name='L7126'></a>\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} <a id='L7127' name='L7127'></a>% <a id='L7128' name='L7128'></a>\def\insertcopying{% <a id='L7129' name='L7129'></a> \begingroup <a id='L7130' name='L7130'></a> \parindent = 0pt % paragraph indentation looks wrong on title page <a id='L7131' name='L7131'></a> \scanexp\copyingtext <a id='L7132' name='L7132'></a> \endgroup <a id='L7133' name='L7133'></a>} <a id='L7134' name='L7134'></a> <a id='L7135' name='L7135'></a> <a id='L7136' name='L7136'></a>\message{defuns,} <a id='L7137' name='L7137'></a>% @defun etc. <a id='L7138' name='L7138'></a> <a id='L7139' name='L7139'></a>\newskip\defbodyindent \defbodyindent=.4in <a id='L7140' name='L7140'></a>\newskip\defargsindent \defargsindent=50pt <a id='L7141' name='L7141'></a>\newskip\deflastargmargin \deflastargmargin=18pt <a id='L7142' name='L7142'></a>\newcount\defunpenalty <a id='L7143' name='L7143'></a> <a id='L7144' name='L7144'></a>% Start the processing of @deffn: <a id='L7145' name='L7145'></a>\def\startdefun{% <a id='L7146' name='L7146'></a> \ifnum\lastpenalty<10000 <a id='L7147' name='L7147'></a> \medbreak <a id='L7148' name='L7148'></a> \defunpenalty=10003 % Will keep this @deffn together with the <a id='L7149' name='L7149'></a> % following @def command, see below. <a id='L7150' name='L7150'></a> \else <a id='L7151' name='L7151'></a> % If there are two @def commands in a row, we'll have a \nobreak, <a id='L7152' name='L7152'></a> % which is there to keep the function description together with its <a id='L7153' name='L7153'></a> % header. But if there's nothing but headers, we need to allow a <a id='L7154' name='L7154'></a> % break somewhere. Check specifically for penalty 10002, inserted <a id='L7155' name='L7155'></a> % by \printdefunline, instead of 10000, since the sectioning <a id='L7156' name='L7156'></a> % commands also insert a nobreak penalty, and we don't want to allow <a id='L7157' name='L7157'></a> % a break between a section heading and a defun. <a id='L7158' name='L7158'></a> % <a id='L7159' name='L7159'></a> % As a further refinement, we avoid "club" headers by signalling <a id='L7160' name='L7160'></a> % with penalty of 10003 after the very first @deffn in the <a id='L7161' name='L7161'></a> % sequence (see above), and penalty of 10002 after any following <a id='L7162' name='L7162'></a> % @def command. <a id='L7163' name='L7163'></a> \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi <a id='L7164' name='L7164'></a> % <a id='L7165' name='L7165'></a> % Similarly, after a section heading, do not allow a break. <a id='L7166' name='L7166'></a> % But do insert the glue. <a id='L7167' name='L7167'></a> \medskip % preceded by discardable penalty, so not a breakpoint <a id='L7168' name='L7168'></a> \fi <a id='L7169' name='L7169'></a> % <a id='L7170' name='L7170'></a> \parindent=0in <a id='L7171' name='L7171'></a> \advance\leftskip by \defbodyindent <a id='L7172' name='L7172'></a> \exdentamount=\defbodyindent <a id='L7173' name='L7173'></a>} <a id='L7174' name='L7174'></a> <a id='L7175' name='L7175'></a>\def\dodefunx#1{% <a id='L7176' name='L7176'></a> % First, check whether we are in the right environment: <a id='L7177' name='L7177'></a> \checkenv#1% <a id='L7178' name='L7178'></a> % <a id='L7179' name='L7179'></a> % As above, allow line break if we have multiple x headers in a row. <a id='L7180' name='L7180'></a> % It's not a great place, though. <a id='L7181' name='L7181'></a> \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi <a id='L7182' name='L7182'></a> % <a id='L7183' name='L7183'></a> % And now, it's time to reuse the body of the original defun: <a id='L7184' name='L7184'></a> \expandafter\gobbledefun#1% <a id='L7185' name='L7185'></a>} <a id='L7186' name='L7186'></a>\def\gobbledefun#1\startdefun{} <a id='L7187' name='L7187'></a> <a id='L7188' name='L7188'></a>% \printdefunline \deffnheader{text} <a id='L7189' name='L7189'></a>% <a id='L7190' name='L7190'></a>\def\printdefunline#1#2{% <a id='L7191' name='L7191'></a> \begingroup <a id='L7192' name='L7192'></a> % call \deffnheader: <a id='L7193' name='L7193'></a> #1#2 \endheader <a id='L7194' name='L7194'></a> % common ending: <a id='L7195' name='L7195'></a> \interlinepenalty = 10000 <a id='L7196' name='L7196'></a> \advance\rightskip by 0pt plus 1fil\relax <a id='L7197' name='L7197'></a> \endgraf <a id='L7198' name='L7198'></a> \nobreak\vskip -\parskip <a id='L7199' name='L7199'></a> \penalty\defunpenalty % signal to \startdefun and \dodefunx <a id='L7200' name='L7200'></a> % Some of the @defun-type tags do not enable magic parentheses, <a id='L7201' name='L7201'></a> % rendering the following check redundant. But we don't optimize. <a id='L7202' name='L7202'></a> \checkparencounts <a id='L7203' name='L7203'></a> \endgroup <a id='L7204' name='L7204'></a>} <a id='L7205' name='L7205'></a> <a id='L7206' name='L7206'></a>\def\Edefun{\endgraf\medbreak} <a id='L7207' name='L7207'></a> <a id='L7208' name='L7208'></a>% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; <a id='L7209' name='L7209'></a>% the only thing remaining is to define \deffnheader. <a id='L7210' name='L7210'></a>% <a id='L7211' name='L7211'></a>\def\makedefun#1{% <a id='L7212' name='L7212'></a> \expandafter\let\csname E#1\endcsname = \Edefun <a id='L7213' name='L7213'></a> \edef\temp{\noexpand\domakedefun <a id='L7214' name='L7214'></a> \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% <a id='L7215' name='L7215'></a> \temp <a id='L7216' name='L7216'></a>} <a id='L7217' name='L7217'></a> <a id='L7218' name='L7218'></a>% \domakedefun \deffn \deffnx \deffnheader <a id='L7219' name='L7219'></a>% <a id='L7220' name='L7220'></a>% Define \deffn and \deffnx, without parameters. <a id='L7221' name='L7221'></a>% \deffnheader has to be defined explicitly. <a id='L7222' name='L7222'></a>% <a id='L7223' name='L7223'></a>\def\domakedefun#1#2#3{% <a id='L7224' name='L7224'></a> \envdef#1{% <a id='L7225' name='L7225'></a> \startdefun <a id='L7226' name='L7226'></a> \doingtypefnfalse % distinguish typed functions from all else <a id='L7227' name='L7227'></a> \parseargusing\activeparens{\printdefunline#3}% <a id='L7228' name='L7228'></a> }% <a id='L7229' name='L7229'></a> \def#2{\dodefunx#1}% <a id='L7230' name='L7230'></a> \def#3% <a id='L7231' name='L7231'></a>} <a id='L7232' name='L7232'></a> <a id='L7233' name='L7233'></a>\newif\ifdoingtypefn % doing typed function? <a id='L7234' name='L7234'></a>\newif\ifrettypeownline % typeset return type on its own line? <a id='L7235' name='L7235'></a> <a id='L7236' name='L7236'></a>% @deftypefnnewline on|off says whether the return type of typed functions <a id='L7237' name='L7237'></a>% are printed on their own line. This affects @deftypefn, @deftypefun, <a id='L7238' name='L7238'></a>% @deftypeop, and @deftypemethod. <a id='L7239' name='L7239'></a>% <a id='L7240' name='L7240'></a>\parseargdef\deftypefnnewline{% <a id='L7241' name='L7241'></a> \def\temp{#1}% <a id='L7242' name='L7242'></a> \ifx\temp\onword <a id='L7243' name='L7243'></a> \expandafter\let\csname SETtxideftypefnnl\endcsname <a id='L7244' name='L7244'></a> = \empty <a id='L7245' name='L7245'></a> \else\ifx\temp\offword <a id='L7246' name='L7246'></a> \expandafter\let\csname SETtxideftypefnnl\endcsname <a id='L7247' name='L7247'></a> = \relax <a id='L7248' name='L7248'></a> \else <a id='L7249' name='L7249'></a> \errhelp = \EMsimple <a id='L7250' name='L7250'></a> \errmessage{Unknown @txideftypefnnl value `\temp', <a id='L7251' name='L7251'></a> must be on|off}% <a id='L7252' name='L7252'></a> \fi\fi <a id='L7253' name='L7253'></a>} <a id='L7254' name='L7254'></a> <a id='L7255' name='L7255'></a>% Untyped functions: <a id='L7256' name='L7256'></a> <a id='L7257' name='L7257'></a>% @deffn category name args <a id='L7258' name='L7258'></a>\makedefun{deffn}{\deffngeneral{}} <a id='L7259' name='L7259'></a> <a id='L7260' name='L7260'></a>% @deffn category class name args <a id='L7261' name='L7261'></a>\makedefun{defop}#1 {\defopon{#1\ \putwordon}} <a id='L7262' name='L7262'></a> <a id='L7263' name='L7263'></a>% \defopon {category on}class name args <a id='L7264' name='L7264'></a>\def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } <a id='L7265' name='L7265'></a> <a id='L7266' name='L7266'></a>% \deffngeneral {subind}category name args <a id='L7267' name='L7267'></a>% <a id='L7268' name='L7268'></a>\def\deffngeneral#1#2 #3 #4\endheader{% <a id='L7269' name='L7269'></a> % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}. <a id='L7270' name='L7270'></a> \dosubind{fn}{\code{#3}}{#1}% <a id='L7271' name='L7271'></a> \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% <a id='L7272' name='L7272'></a>} <a id='L7273' name='L7273'></a> <a id='L7274' name='L7274'></a>% Typed functions: <a id='L7275' name='L7275'></a> <a id='L7276' name='L7276'></a>% @deftypefn category type name args <a id='L7277' name='L7277'></a>\makedefun{deftypefn}{\deftypefngeneral{}} <a id='L7278' name='L7278'></a> <a id='L7279' name='L7279'></a>% @deftypeop category class type name args <a id='L7280' name='L7280'></a>\makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}} <a id='L7281' name='L7281'></a> <a id='L7282' name='L7282'></a>% \deftypeopon {category on}class type name args <a id='L7283' name='L7283'></a>\def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } <a id='L7284' name='L7284'></a> <a id='L7285' name='L7285'></a>% \deftypefngeneral {subind}category type name args <a id='L7286' name='L7286'></a>% <a id='L7287' name='L7287'></a>\def\deftypefngeneral#1#2 #3 #4 #5\endheader{% <a id='L7288' name='L7288'></a> \dosubind{fn}{\code{#4}}{#1}% <a id='L7289' name='L7289'></a> \doingtypefntrue <a id='L7290' name='L7290'></a> \defname{#2}{#3}{#4}\defunargs{#5\unskip}% <a id='L7291' name='L7291'></a>} <a id='L7292' name='L7292'></a> <a id='L7293' name='L7293'></a>% Typed variables: <a id='L7294' name='L7294'></a> <a id='L7295' name='L7295'></a>% @deftypevr category type var args <a id='L7296' name='L7296'></a>\makedefun{deftypevr}{\deftypecvgeneral{}} <a id='L7297' name='L7297'></a> <a id='L7298' name='L7298'></a>% @deftypecv category class type var args <a id='L7299' name='L7299'></a>\makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}} <a id='L7300' name='L7300'></a> <a id='L7301' name='L7301'></a>% \deftypecvof {category of}class type var args <a id='L7302' name='L7302'></a>\def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} } <a id='L7303' name='L7303'></a> <a id='L7304' name='L7304'></a>% \deftypecvgeneral {subind}category type var args <a id='L7305' name='L7305'></a>% <a id='L7306' name='L7306'></a>\def\deftypecvgeneral#1#2 #3 #4 #5\endheader{% <a id='L7307' name='L7307'></a> \dosubind{vr}{\code{#4}}{#1}% <a id='L7308' name='L7308'></a> \defname{#2}{#3}{#4}\defunargs{#5\unskip}% <a id='L7309' name='L7309'></a>} <a id='L7310' name='L7310'></a> <a id='L7311' name='L7311'></a>% Untyped variables: <a id='L7312' name='L7312'></a> <a id='L7313' name='L7313'></a>% @defvr category var args <a id='L7314' name='L7314'></a>\makedefun{defvr}#1 {\deftypevrheader{#1} {} } <a id='L7315' name='L7315'></a> <a id='L7316' name='L7316'></a>% @defcv category class var args <a id='L7317' name='L7317'></a>\makedefun{defcv}#1 {\defcvof{#1\ \putwordof}} <a id='L7318' name='L7318'></a> <a id='L7319' name='L7319'></a>% \defcvof {category of}class var args <a id='L7320' name='L7320'></a>\def\defcvof#1#2 {\deftypecvof{#1}#2 {} } <a id='L7321' name='L7321'></a> <a id='L7322' name='L7322'></a>% Types: <a id='L7323' name='L7323'></a> <a id='L7324' name='L7324'></a>% @deftp category name args <a id='L7325' name='L7325'></a>\makedefun{deftp}#1 #2 #3\endheader{% <a id='L7326' name='L7326'></a> \doind{tp}{\code{#2}}% <a id='L7327' name='L7327'></a> \defname{#1}{}{#2}\defunargs{#3\unskip}% <a id='L7328' name='L7328'></a>} <a id='L7329' name='L7329'></a> <a id='L7330' name='L7330'></a>% Remaining @defun-like shortcuts: <a id='L7331' name='L7331'></a>\makedefun{defun}{\deffnheader{\putwordDeffunc} } <a id='L7332' name='L7332'></a>\makedefun{defmac}{\deffnheader{\putwordDefmac} } <a id='L7333' name='L7333'></a>\makedefun{defspec}{\deffnheader{\putwordDefspec} } <a id='L7334' name='L7334'></a>\makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} } <a id='L7335' name='L7335'></a>\makedefun{defvar}{\defvrheader{\putwordDefvar} } <a id='L7336' name='L7336'></a>\makedefun{defopt}{\defvrheader{\putwordDefopt} } <a id='L7337' name='L7337'></a>\makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} } <a id='L7338' name='L7338'></a>\makedefun{defmethod}{\defopon\putwordMethodon} <a id='L7339' name='L7339'></a>\makedefun{deftypemethod}{\deftypeopon\putwordMethodon} <a id='L7340' name='L7340'></a>\makedefun{defivar}{\defcvof\putwordInstanceVariableof} <a id='L7341' name='L7341'></a>\makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof} <a id='L7342' name='L7342'></a> <a id='L7343' name='L7343'></a>% \defname, which formats the name of the @def (not the args). <a id='L7344' name='L7344'></a>% #1 is the category, such as "Function". <a id='L7345' name='L7345'></a>% #2 is the return type, if any. <a id='L7346' name='L7346'></a>% #3 is the function name. <a id='L7347' name='L7347'></a>% <a id='L7348' name='L7348'></a>% We are followed by (but not passed) the arguments, if any. <a id='L7349' name='L7349'></a>% <a id='L7350' name='L7350'></a>\def\defname#1#2#3{% <a id='L7351' name='L7351'></a> \par <a id='L7352' name='L7352'></a> % Get the values of \leftskip and \rightskip as they were outside the @def... <a id='L7353' name='L7353'></a> \advance\leftskip by -\defbodyindent <a id='L7354' name='L7354'></a> % <a id='L7355' name='L7355'></a> % Determine if we are typesetting the return type of a typed function <a id='L7356' name='L7356'></a> % on a line by itself. <a id='L7357' name='L7357'></a> \rettypeownlinefalse <a id='L7358' name='L7358'></a> \ifdoingtypefn % doing a typed function specifically? <a id='L7359' name='L7359'></a> % then check user option for putting return type on its own line: <a id='L7360' name='L7360'></a> \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else <a id='L7361' name='L7361'></a> \rettypeownlinetrue <a id='L7362' name='L7362'></a> \fi <a id='L7363' name='L7363'></a> \fi <a id='L7364' name='L7364'></a> % <a id='L7365' name='L7365'></a> % How we'll format the category name. Putting it in brackets helps <a id='L7366' name='L7366'></a> % distinguish it from the body text that may end up on the next line <a id='L7367' name='L7367'></a> % just below it. <a id='L7368' name='L7368'></a> \def\temp{#1}% <a id='L7369' name='L7369'></a> \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} <a id='L7370' name='L7370'></a> % <a id='L7371' name='L7371'></a> % Figure out line sizes for the paragraph shape. We'll always have at <a id='L7372' name='L7372'></a> % least two. <a id='L7373' name='L7373'></a> \tempnum = 2 <a id='L7374' name='L7374'></a> % <a id='L7375' name='L7375'></a> % The first line needs space for \box0; but if \rightskip is nonzero, <a id='L7376' name='L7376'></a> % we need only space for the part of \box0 which exceeds it: <a id='L7377' name='L7377'></a> \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip <a id='L7378' name='L7378'></a> % <a id='L7379' name='L7379'></a> % If doing a return type on its own line, we'll have another line. <a id='L7380' name='L7380'></a> \ifrettypeownline <a id='L7381' name='L7381'></a> \advance\tempnum by 1 <a id='L7382' name='L7382'></a> \def\maybeshapeline{0in \hsize}% <a id='L7383' name='L7383'></a> \else <a id='L7384' name='L7384'></a> \def\maybeshapeline{}% <a id='L7385' name='L7385'></a> \fi <a id='L7386' name='L7386'></a> % <a id='L7387' name='L7387'></a> % The continuations: <a id='L7388' name='L7388'></a> \dimen2=\hsize \advance\dimen2 by -\defargsindent <a id='L7389' name='L7389'></a> % <a id='L7390' name='L7390'></a> % The final paragraph shape: <a id='L7391' name='L7391'></a> \parshape \tempnum 0in \dimen0 \maybeshapeline \defargsindent \dimen2 <a id='L7392' name='L7392'></a> % <a id='L7393' name='L7393'></a> % Put the category name at the right margin. <a id='L7394' name='L7394'></a> \noindent <a id='L7395' name='L7395'></a> \hbox to 0pt{% <a id='L7396' name='L7396'></a> \hfil\box0 \kern-\hsize <a id='L7397' name='L7397'></a> % \hsize has to be shortened this way: <a id='L7398' name='L7398'></a> \kern\leftskip <a id='L7399' name='L7399'></a> % Intentionally do not respect \rightskip, since we need the space. <a id='L7400' name='L7400'></a> }% <a id='L7401' name='L7401'></a> % <a id='L7402' name='L7402'></a> % Allow all lines to be underfull without complaint: <a id='L7403' name='L7403'></a> \tolerance=10000 \hbadness=10000 <a id='L7404' name='L7404'></a> \exdentamount=\defbodyindent <a id='L7405' name='L7405'></a> {% <a id='L7406' name='L7406'></a> % defun fonts. We use typewriter by default (used to be bold) because: <a id='L7407' name='L7407'></a> % . we're printing identifiers, they should be in tt in principle. <a id='L7408' name='L7408'></a> % . in languages with many accents, such as Czech or French, it's <a id='L7409' name='L7409'></a> % common to leave accents off identifiers. The result looks ok in <a id='L7410' name='L7410'></a> % tt, but exceedingly strange in rm. <a id='L7411' name='L7411'></a> % . we don't want -- and --- to be treated as ligatures. <a id='L7412' name='L7412'></a> % . this still does not fix the ?` and !` ligatures, but so far no <a id='L7413' name='L7413'></a> % one has made identifiers using them :). <a id='L7414' name='L7414'></a> \df \tt <a id='L7415' name='L7415'></a> \def\temp{#2}% text of the return type <a id='L7416' name='L7416'></a> \ifx\temp\empty\else <a id='L7417' name='L7417'></a> \tclose{\temp}% typeset the return type <a id='L7418' name='L7418'></a> \ifrettypeownline <a id='L7419' name='L7419'></a> % put return type on its own line; prohibit line break following: <a id='L7420' name='L7420'></a> \hfil\vadjust{\nobreak}\break <a id='L7421' name='L7421'></a> \else <a id='L7422' name='L7422'></a> \space % type on same line, so just followed by a space <a id='L7423' name='L7423'></a> \fi <a id='L7424' name='L7424'></a> \fi % no return type <a id='L7425' name='L7425'></a> #3% output function name <a id='L7426' name='L7426'></a> }% <a id='L7427' name='L7427'></a> {\rm\enskip}% hskip 0.5 em of \tenrm <a id='L7428' name='L7428'></a> % <a id='L7429' name='L7429'></a> \boldbrax <a id='L7430' name='L7430'></a> % arguments will be output next, if any. <a id='L7431' name='L7431'></a>} <a id='L7432' name='L7432'></a> <a id='L7433' name='L7433'></a>% Print arguments in slanted roman (not ttsl), inconsistently with using <a id='L7434' name='L7434'></a>% tt for the name. This is because literal text is sometimes needed in <a id='L7435' name='L7435'></a>% the argument list (groff manual), and ttsl and tt are not very <a id='L7436' name='L7436'></a>% distinguishable. Prevent hyphenation at `-' chars. <a id='L7437' name='L7437'></a>% <a id='L7438' name='L7438'></a>\def\defunargs#1{% <a id='L7439' name='L7439'></a> % use sl by default (not ttsl), <a id='L7440' name='L7440'></a> % tt for the names. <a id='L7441' name='L7441'></a> \df \sl \hyphenchar\font=0 <a id='L7442' name='L7442'></a> % <a id='L7443' name='L7443'></a> % On the other hand, if an argument has two dashes (for instance), we <a id='L7444' name='L7444'></a> % want a way to get ttsl. We used to recommend @var for that, so <a id='L7445' name='L7445'></a> % leave the code in, but it's strange for @var to lead to typewriter. <a id='L7446' name='L7446'></a> % Nowadays we recommend @code, since the difference between a ttsl hyphen <a id='L7447' name='L7447'></a> % and a tt hyphen is pretty tiny. @code also disables ?` !`. <a id='L7448' name='L7448'></a> \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% <a id='L7449' name='L7449'></a> #1% <a id='L7450' name='L7450'></a> \sl\hyphenchar\font=45 <a id='L7451' name='L7451'></a>} <a id='L7452' name='L7452'></a> <a id='L7453' name='L7453'></a>% We want ()&[] to print specially on the defun line. <a id='L7454' name='L7454'></a>% <a id='L7455' name='L7455'></a>\def\activeparens{% <a id='L7456' name='L7456'></a> \catcode`\(=\active \catcode`\)=\active <a id='L7457' name='L7457'></a> \catcode`\[=\active \catcode`\]=\active <a id='L7458' name='L7458'></a> \catcode`\&=\active <a id='L7459' name='L7459'></a>} <a id='L7460' name='L7460'></a> <a id='L7461' name='L7461'></a>% Make control sequences which act like normal parenthesis chars. <a id='L7462' name='L7462'></a>\let\lparen = ( \let\rparen = ) <a id='L7463' name='L7463'></a> <a id='L7464' name='L7464'></a>% Be sure that we always have a definition for `(', etc. For example, <a id='L7465' name='L7465'></a>% if the fn name has parens in it, \boldbrax will not be in effect yet, <a id='L7466' name='L7466'></a>% so TeX would otherwise complain about undefined control sequence. <a id='L7467' name='L7467'></a>{ <a id='L7468' name='L7468'></a> \activeparens <a id='L7469' name='L7469'></a> \global\let(=\lparen \global\let)=\rparen <a id='L7470' name='L7470'></a> \global\let[=\lbrack \global\let]=\rbrack <a id='L7471' name='L7471'></a> \global\let& = \& <a id='L7472' name='L7472'></a> <a id='L7473' name='L7473'></a> \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} <a id='L7474' name='L7474'></a> \gdef\magicamp{\let&=\amprm} <a id='L7475' name='L7475'></a>} <a id='L7476' name='L7476'></a> <a id='L7477' name='L7477'></a>\newcount\parencount <a id='L7478' name='L7478'></a> <a id='L7479' name='L7479'></a>% If we encounter &foo, then turn on ()-hacking afterwards <a id='L7480' name='L7480'></a>\newif\ifampseen <a id='L7481' name='L7481'></a>\def\amprm#1 {\ampseentrue{\bf\&#1 }} <a id='L7482' name='L7482'></a> <a id='L7483' name='L7483'></a>\def\parenfont{% <a id='L7484' name='L7484'></a> \ifampseen <a id='L7485' name='L7485'></a> % At the first level, print parens in roman, <a id='L7486' name='L7486'></a> % otherwise use the default font. <a id='L7487' name='L7487'></a> \ifnum \parencount=1 \rm \fi <a id='L7488' name='L7488'></a> \else <a id='L7489' name='L7489'></a> % The \sf parens (in \boldbrax) actually are a little bolder than <a id='L7490' name='L7490'></a> % the contained text. This is especially needed for [ and ] . <a id='L7491' name='L7491'></a> \sf <a id='L7492' name='L7492'></a> \fi <a id='L7493' name='L7493'></a>} <a id='L7494' name='L7494'></a>\def\infirstlevel#1{% <a id='L7495' name='L7495'></a> \ifampseen <a id='L7496' name='L7496'></a> \ifnum\parencount=1 <a id='L7497' name='L7497'></a> #1% <a id='L7498' name='L7498'></a> \fi <a id='L7499' name='L7499'></a> \fi <a id='L7500' name='L7500'></a>} <a id='L7501' name='L7501'></a>\def\bfafterword#1 {#1 \bf} <a id='L7502' name='L7502'></a> <a id='L7503' name='L7503'></a>\def\opnr{% <a id='L7504' name='L7504'></a> \global\advance\parencount by 1 <a id='L7505' name='L7505'></a> {\parenfont(}% <a id='L7506' name='L7506'></a> \infirstlevel \bfafterword <a id='L7507' name='L7507'></a>} <a id='L7508' name='L7508'></a>\def\clnr{% <a id='L7509' name='L7509'></a> {\parenfont)}% <a id='L7510' name='L7510'></a> \infirstlevel \sl <a id='L7511' name='L7511'></a> \global\advance\parencount by -1 <a id='L7512' name='L7512'></a>} <a id='L7513' name='L7513'></a> <a id='L7514' name='L7514'></a>\newcount\brackcount <a id='L7515' name='L7515'></a>\def\lbrb{% <a id='L7516' name='L7516'></a> \global\advance\brackcount by 1 <a id='L7517' name='L7517'></a> {\bf[}% <a id='L7518' name='L7518'></a>} <a id='L7519' name='L7519'></a>\def\rbrb{% <a id='L7520' name='L7520'></a> {\bf]}% <a id='L7521' name='L7521'></a> \global\advance\brackcount by -1 <a id='L7522' name='L7522'></a>} <a id='L7523' name='L7523'></a> <a id='L7524' name='L7524'></a>\def\checkparencounts{% <a id='L7525' name='L7525'></a> \ifnum\parencount=0 \else \badparencount \fi <a id='L7526' name='L7526'></a> \ifnum\brackcount=0 \else \badbrackcount \fi <a id='L7527' name='L7527'></a>} <a id='L7528' name='L7528'></a>% these should not use \errmessage; the glibc manual, at least, actually <a id='L7529' name='L7529'></a>% has such constructs (when documenting function pointers). <a id='L7530' name='L7530'></a>\def\badparencount{% <a id='L7531' name='L7531'></a> \message{Warning: unbalanced parentheses in @def...}% <a id='L7532' name='L7532'></a> \global\parencount=0 <a id='L7533' name='L7533'></a>} <a id='L7534' name='L7534'></a>\def\badbrackcount{% <a id='L7535' name='L7535'></a> \message{Warning: unbalanced square brackets in @def...}% <a id='L7536' name='L7536'></a> \global\brackcount=0 <a id='L7537' name='L7537'></a>} <a id='L7538' name='L7538'></a> <a id='L7539' name='L7539'></a> <a id='L7540' name='L7540'></a>\message{macros,} <a id='L7541' name='L7541'></a>% @macro. <a id='L7542' name='L7542'></a> <a id='L7543' name='L7543'></a>% To do this right we need a feature of e-TeX, \scantokens, <a id='L7544' name='L7544'></a>% which we arrange to emulate with a temporary file in ordinary TeX. <a id='L7545' name='L7545'></a>\ifx\eTeXversion\thisisundefined <a id='L7546' name='L7546'></a> \newwrite\macscribble <a id='L7547' name='L7547'></a> \def\scantokens#1{% <a id='L7548' name='L7548'></a> \toks0={#1}% <a id='L7549' name='L7549'></a> \immediate\openout\macscribble=\jobname.tmp <a id='L7550' name='L7550'></a> \immediate\write\macscribble{\the\toks0}% <a id='L7551' name='L7551'></a> \immediate\closeout\macscribble <a id='L7552' name='L7552'></a> \input \jobname.tmp <a id='L7553' name='L7553'></a> } <a id='L7554' name='L7554'></a>\fi <a id='L7555' name='L7555'></a> <a id='L7556' name='L7556'></a>\def\scanmacro#1{\begingroup <a id='L7557' name='L7557'></a> \newlinechar`\^^M <a id='L7558' name='L7558'></a> \let\xeatspaces\eatspaces <a id='L7559' name='L7559'></a> % <a id='L7560' name='L7560'></a> % Undo catcode changes of \startcontents and \doprintindex <a id='L7561' name='L7561'></a> % When called from @insertcopying or (short)caption, we need active <a id='L7562' name='L7562'></a> % backslash to get it printed correctly. Previously, we had <a id='L7563' name='L7563'></a> % \catcode`\\=\other instead. We'll see whether a problem appears <a id='L7564' name='L7564'></a> % with macro expansion. --kasal, 19aug04 <a id='L7565' name='L7565'></a> \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ <a id='L7566' name='L7566'></a> % <a id='L7567' name='L7567'></a> % ... and for \example: <a id='L7568' name='L7568'></a> \spaceisspace <a id='L7569' name='L7569'></a> % <a id='L7570' name='L7570'></a> % The \empty here causes a following catcode 5 newline to be eaten as <a id='L7571' name='L7571'></a> % part of reading whitespace after a control sequence. It does not <a id='L7572' name='L7572'></a> % eat a catcode 13 newline. There's no good way to handle the two <a id='L7573' name='L7573'></a> % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX <a id='L7574' name='L7574'></a> % would then have different behavior). See the Macro Details node in <a id='L7575' name='L7575'></a> % the manual for the workaround we recommend for macros and <a id='L7576' name='L7576'></a> % line-oriented commands. <a id='L7577' name='L7577'></a> % <a id='L7578' name='L7578'></a> \scantokens{#1\empty}% <a id='L7579' name='L7579'></a>\endgroup} <a id='L7580' name='L7580'></a> <a id='L7581' name='L7581'></a>\def\scanexp#1{% <a id='L7582' name='L7582'></a> \edef\temp{\noexpand\scanmacro{#1}}% <a id='L7583' name='L7583'></a> \temp <a id='L7584' name='L7584'></a>} <a id='L7585' name='L7585'></a> <a id='L7586' name='L7586'></a>\newcount\paramno % Count of parameters <a id='L7587' name='L7587'></a>\newtoks\macname % Macro name <a id='L7588' name='L7588'></a>\newif\ifrecursive % Is it recursive? <a id='L7589' name='L7589'></a> <a id='L7590' name='L7590'></a>% List of all defined macros in the form <a id='L7591' name='L7591'></a>% \definedummyword\macro1\definedummyword\macro2... <a id='L7592' name='L7592'></a>% Currently is also contains all @aliases; the list can be split <a id='L7593' name='L7593'></a>% if there is a need. <a id='L7594' name='L7594'></a>\def\macrolist{} <a id='L7595' name='L7595'></a> <a id='L7596' name='L7596'></a>% Add the macro to \macrolist <a id='L7597' name='L7597'></a>\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} <a id='L7598' name='L7598'></a>\def\addtomacrolistxxx#1{% <a id='L7599' name='L7599'></a> \toks0 = \expandafter{\macrolist\definedummyword#1}% <a id='L7600' name='L7600'></a> \xdef\macrolist{\the\toks0}% <a id='L7601' name='L7601'></a>} <a id='L7602' name='L7602'></a> <a id='L7603' name='L7603'></a>% Utility routines. <a id='L7604' name='L7604'></a>% This does \let #1 = #2, with \csnames; that is, <a id='L7605' name='L7605'></a>% \let \csname#1\endcsname = \csname#2\endcsname <a id='L7606' name='L7606'></a>% (except of course we have to play expansion games). <a id='L7607' name='L7607'></a>% <a id='L7608' name='L7608'></a>\def\cslet#1#2{% <a id='L7609' name='L7609'></a> \expandafter\let <a id='L7610' name='L7610'></a> \csname#1\expandafter\endcsname <a id='L7611' name='L7611'></a> \csname#2\endcsname <a id='L7612' name='L7612'></a>} <a id='L7613' name='L7613'></a> <a id='L7614' name='L7614'></a>% Trim leading and trailing spaces off a string. <a id='L7615' name='L7615'></a>% Concepts from aro-bend problem 15 (see CTAN). <a id='L7616' name='L7616'></a>{\catcode`\@=11 <a id='L7617' name='L7617'></a>\gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} <a id='L7618' name='L7618'></a>\gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} <a id='L7619' name='L7619'></a>\gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} <a id='L7620' name='L7620'></a>\def\unbrace#1{#1} <a id='L7621' name='L7621'></a>\unbrace{\gdef\trim@@@ #1 } #2@{#1} <a id='L7622' name='L7622'></a>} <a id='L7623' name='L7623'></a> <a id='L7624' name='L7624'></a>% Trim a single trailing ^^M off a string. <a id='L7625' name='L7625'></a>{\catcode`\^^M=\other \catcode`\Q=3% <a id='L7626' name='L7626'></a>\gdef\eatcr #1{\eatcra #1Q^^MQ}% <a id='L7627' name='L7627'></a>\gdef\eatcra#1^^MQ{\eatcrb#1Q}% <a id='L7628' name='L7628'></a>\gdef\eatcrb#1Q#2Q{#1}% <a id='L7629' name='L7629'></a>} <a id='L7630' name='L7630'></a> <a id='L7631' name='L7631'></a>% Macro bodies are absorbed as an argument in a context where <a id='L7632' name='L7632'></a>% all characters are catcode 10, 11 or 12, except \ which is active <a id='L7633' name='L7633'></a>% (as in normal texinfo). It is necessary to change the definition of \ <a id='L7634' name='L7634'></a>% to recognize macro arguments; this is the job of \mbodybackslash. <a id='L7635' name='L7635'></a>% <a id='L7636' name='L7636'></a>% Non-ASCII encodings make 8-bit characters active, so un-activate <a id='L7637' name='L7637'></a>% them to avoid their expansion. Must do this non-globally, to <a id='L7638' name='L7638'></a>% confine the change to the current group. <a id='L7639' name='L7639'></a>% <a id='L7640' name='L7640'></a>% It's necessary to have hard CRs when the macro is executed. This is <a id='L7641' name='L7641'></a>% done by making ^^M (\endlinechar) catcode 12 when reading the macro <a id='L7642' name='L7642'></a>% body, and then making it the \newlinechar in \scanmacro. <a id='L7643' name='L7643'></a>% <a id='L7644' name='L7644'></a>\def\scanctxt{% used as subroutine <a id='L7645' name='L7645'></a> \catcode`\"=\other <a id='L7646' name='L7646'></a> \catcode`\+=\other <a id='L7647' name='L7647'></a> \catcode`\<=\other <a id='L7648' name='L7648'></a> \catcode`\>=\other <a id='L7649' name='L7649'></a> \catcode`\@=\other <a id='L7650' name='L7650'></a> \catcode`\^=\other <a id='L7651' name='L7651'></a> \catcode`\_=\other <a id='L7652' name='L7652'></a> \catcode`\|=\other <a id='L7653' name='L7653'></a> \catcode`\~=\other <a id='L7654' name='L7654'></a> \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi <a id='L7655' name='L7655'></a>} <a id='L7656' name='L7656'></a> <a id='L7657' name='L7657'></a>\def\scanargctxt{% used for copying and captions, not macros. <a id='L7658' name='L7658'></a> \scanctxt <a id='L7659' name='L7659'></a> \catcode`\\=\other <a id='L7660' name='L7660'></a> \catcode`\^^M=\other <a id='L7661' name='L7661'></a>} <a id='L7662' name='L7662'></a> <a id='L7663' name='L7663'></a>\def\macrobodyctxt{% used for @macro definitions <a id='L7664' name='L7664'></a> \scanctxt <a id='L7665' name='L7665'></a> \catcode`\{=\other <a id='L7666' name='L7666'></a> \catcode`\}=\other <a id='L7667' name='L7667'></a> \catcode`\^^M=\other <a id='L7668' name='L7668'></a> \usembodybackslash <a id='L7669' name='L7669'></a>} <a id='L7670' name='L7670'></a> <a id='L7671' name='L7671'></a>\def\macroargctxt{% used when scanning invocations <a id='L7672' name='L7672'></a> \scanctxt <a id='L7673' name='L7673'></a> \catcode`\\=0 <a id='L7674' name='L7674'></a>} <a id='L7675' name='L7675'></a>% why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes" <a id='L7676' name='L7676'></a>% for the single characters \ { }. Thus, we end up with the "commands" <a id='L7677' name='L7677'></a>% that would be written @\ @{ @} in a Texinfo document. <a id='L7678' name='L7678'></a>% <a id='L7679' name='L7679'></a>% We already have @{ and @}. For @\, we define it here, and only for <a id='L7680' name='L7680'></a>% this purpose, to produce a typewriter backslash (so, the @\ that we <a id='L7681' name='L7681'></a>% define for @math can't be used with @macro calls): <a id='L7682' name='L7682'></a>% <a id='L7683' name='L7683'></a>\def\\{\normalbackslash}% <a id='L7684' name='L7684'></a>% <a id='L7685' name='L7685'></a>% We would like to do this for \, too, since that is what makeinfo does. <a id='L7686' name='L7686'></a>% But it is not possible, because Texinfo already has a command @, for a <a id='L7687' name='L7687'></a>% cedilla accent. Documents must use @comma{} instead. <a id='L7688' name='L7688'></a>% <a id='L7689' name='L7689'></a>% \anythingelse will almost certainly be an error of some kind. <a id='L7690' name='L7690'></a> <a id='L7691' name='L7691'></a> <a id='L7692' name='L7692'></a>% \mbodybackslash is the definition of \ in @macro bodies. <a id='L7693' name='L7693'></a>% It maps \foo\ => \csname macarg.foo\endcsname => #N <a id='L7694' name='L7694'></a>% where N is the macro parameter number. <a id='L7695' name='L7695'></a>% We define \csname macarg.\endcsname to be \realbackslash, so <a id='L7696' name='L7696'></a>% \\ in macro replacement text gets you a backslash. <a id='L7697' name='L7697'></a>% <a id='L7698' name='L7698'></a>{\catcode`@=0 @catcode`@\=@active <a id='L7699' name='L7699'></a> @gdef@usembodybackslash{@let\=@mbodybackslash} <a id='L7700' name='L7700'></a> @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} <a id='L7701' name='L7701'></a>} <a id='L7702' name='L7702'></a>\expandafter\def\csname macarg.\endcsname{\realbackslash} <a id='L7703' name='L7703'></a> <a id='L7704' name='L7704'></a>\def\margbackslash#1{\char`\#1 } <a id='L7705' name='L7705'></a> <a id='L7706' name='L7706'></a>\def\macro{\recursivefalse\parsearg\macroxxx} <a id='L7707' name='L7707'></a>\def\rmacro{\recursivetrue\parsearg\macroxxx} <a id='L7708' name='L7708'></a> <a id='L7709' name='L7709'></a>\def\macroxxx#1{% <a id='L7710' name='L7710'></a> \getargs{#1}% now \macname is the macname and \argl the arglist <a id='L7711' name='L7711'></a> \ifx\argl\empty % no arguments <a id='L7712' name='L7712'></a> \paramno=0\relax <a id='L7713' name='L7713'></a> \else <a id='L7714' name='L7714'></a> \expandafter\parsemargdef \argl;% <a id='L7715' name='L7715'></a> \if\paramno>256\relax <a id='L7716' name='L7716'></a> \ifx\eTeXversion\thisisundefined <a id='L7717' name='L7717'></a> \errhelp = \EMsimple <a id='L7718' name='L7718'></a> \errmessage{You need eTeX to compile a file with macros with more than 256 arguments} <a id='L7719' name='L7719'></a> \fi <a id='L7720' name='L7720'></a> \fi <a id='L7721' name='L7721'></a> \fi <a id='L7722' name='L7722'></a> \if1\csname ismacro.\the\macname\endcsname <a id='L7723' name='L7723'></a> \message{Warning: redefining \the\macname}% <a id='L7724' name='L7724'></a> \else <a id='L7725' name='L7725'></a> \expandafter\ifx\csname \the\macname\endcsname \relax <a id='L7726' name='L7726'></a> \else \errmessage{Macro name \the\macname\space already defined}\fi <a id='L7727' name='L7727'></a> \global\cslet{macsave.\the\macname}{\the\macname}% <a id='L7728' name='L7728'></a> \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% <a id='L7729' name='L7729'></a> \addtomacrolist{\the\macname}% <a id='L7730' name='L7730'></a> \fi <a id='L7731' name='L7731'></a> \begingroup \macrobodyctxt <a id='L7732' name='L7732'></a> \ifrecursive \expandafter\parsermacbody <a id='L7733' name='L7733'></a> \else \expandafter\parsemacbody <a id='L7734' name='L7734'></a> \fi} <a id='L7735' name='L7735'></a> <a id='L7736' name='L7736'></a>\parseargdef\unmacro{% <a id='L7737' name='L7737'></a> \if1\csname ismacro.#1\endcsname <a id='L7738' name='L7738'></a> \global\cslet{#1}{macsave.#1}% <a id='L7739' name='L7739'></a> \global\expandafter\let \csname ismacro.#1\endcsname=0% <a id='L7740' name='L7740'></a> % Remove the macro name from \macrolist: <a id='L7741' name='L7741'></a> \begingroup <a id='L7742' name='L7742'></a> \expandafter\let\csname#1\endcsname \relax <a id='L7743' name='L7743'></a> \let\definedummyword\unmacrodo <a id='L7744' name='L7744'></a> \xdef\macrolist{\macrolist}% <a id='L7745' name='L7745'></a> \endgroup <a id='L7746' name='L7746'></a> \else <a id='L7747' name='L7747'></a> \errmessage{Macro #1 not defined}% <a id='L7748' name='L7748'></a> \fi <a id='L7749' name='L7749'></a>} <a id='L7750' name='L7750'></a> <a id='L7751' name='L7751'></a>% Called by \do from \dounmacro on each macro. The idea is to omit any <a id='L7752' name='L7752'></a>% macro definitions that have been changed to \relax. <a id='L7753' name='L7753'></a>% <a id='L7754' name='L7754'></a>\def\unmacrodo#1{% <a id='L7755' name='L7755'></a> \ifx #1\relax <a id='L7756' name='L7756'></a> % remove this <a id='L7757' name='L7757'></a> \else <a id='L7758' name='L7758'></a> \noexpand\definedummyword \noexpand#1% <a id='L7759' name='L7759'></a> \fi <a id='L7760' name='L7760'></a>} <a id='L7761' name='L7761'></a> <a id='L7762' name='L7762'></a>% This makes use of the obscure feature that if the last token of a <a id='L7763' name='L7763'></a>% <parameter list> is #, then the preceding argument is delimited by <a id='L7764' name='L7764'></a>% an opening brace, and that opening brace is not consumed. <a id='L7765' name='L7765'></a>\def\getargs#1{\getargsxxx#1{}} <a id='L7766' name='L7766'></a>\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} <a id='L7767' name='L7767'></a>\def\getmacname#1 #2\relax{\macname={#1}} <a id='L7768' name='L7768'></a>\def\getmacargs#1{\def\argl{#1}} <a id='L7769' name='L7769'></a> <a id='L7770' name='L7770'></a>% For macro processing make @ a letter so that we can make Texinfo private macro names. <a id='L7771' name='L7771'></a>\edef\texiatcatcode{\the\catcode`\@} <a id='L7772' name='L7772'></a>\catcode `@=11\relax <a id='L7773' name='L7773'></a> <a id='L7774' name='L7774'></a>% Parse the optional {params} list. Set up \paramno and \paramlist <a id='L7775' name='L7775'></a>% so \defmacro knows what to do. Define \macarg.BLAH for each BLAH <a id='L7776' name='L7776'></a>% in the params list to some hook where the argument si to be expanded. If <a id='L7777' name='L7777'></a>% there are less than 10 arguments that hook is to be replaced by ##N where N <a id='L7778' name='L7778'></a>% is the position in that list, that is to say the macro arguments are to be <a id='L7779' name='L7779'></a>% defined `a la TeX in the macro body. <a id='L7780' name='L7780'></a>% <a id='L7781' name='L7781'></a>% That gets used by \mbodybackslash (above). <a id='L7782' name='L7782'></a>% <a id='L7783' name='L7783'></a>% We need to get `macro parameter char #' into several definitions. <a id='L7784' name='L7784'></a>% The technique used is stolen from LaTeX: let \hash be something <a id='L7785' name='L7785'></a>% unexpandable, insert that wherever you need a #, and then redefine <a id='L7786' name='L7786'></a>% it to # just before using the token list produced. <a id='L7787' name='L7787'></a>% <a id='L7788' name='L7788'></a>% The same technique is used to protect \eatspaces till just before <a id='L7789' name='L7789'></a>% the macro is used. <a id='L7790' name='L7790'></a>% <a id='L7791' name='L7791'></a>% If there are 10 or more arguments, a different technique is used, where the <a id='L7792' name='L7792'></a>% hook remains in the body, and when macro is to be expanded the body is <a id='L7793' name='L7793'></a>% processed again to replace the arguments. <a id='L7794' name='L7794'></a>% <a id='L7795' name='L7795'></a>% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the <a id='L7796' name='L7796'></a>% argument N value and then \edef the body (nothing else will expand because of <a id='L7797' name='L7797'></a>% the catcode regime underwhich the body was input). <a id='L7798' name='L7798'></a>% <a id='L7799' name='L7799'></a>% If you compile with TeX (not eTeX), and you have macros with 10 or more <a id='L7800' name='L7800'></a>% arguments, you need that no macro has more than 256 arguments, otherwise an <a id='L7801' name='L7801'></a>% error is produced. <a id='L7802' name='L7802'></a>\def\parsemargdef#1;{% <a id='L7803' name='L7803'></a> \paramno=0\def\paramlist{}% <a id='L7804' name='L7804'></a> \let\hash\relax <a id='L7805' name='L7805'></a> \let\xeatspaces\relax <a id='L7806' name='L7806'></a> \parsemargdefxxx#1,;,% <a id='L7807' name='L7807'></a> % In case that there are 10 or more arguments we parse again the arguments <a id='L7808' name='L7808'></a> % list to set new definitions for the \macarg.BLAH macros corresponding to <a id='L7809' name='L7809'></a> % each BLAH argument. It was anyhow needed to parse already once this list <a id='L7810' name='L7810'></a> % in order to count the arguments, and as macros with at most 9 arguments <a id='L7811' name='L7811'></a> % are by far more frequent than macro with 10 or more arguments, defining <a id='L7812' name='L7812'></a> % twice the \macarg.BLAH macros does not cost too much processing power. <a id='L7813' name='L7813'></a> \ifnum\paramno<10\relax\else <a id='L7814' name='L7814'></a> \paramno0\relax <a id='L7815' name='L7815'></a> \parsemmanyargdef@@#1,;,% 10 or more arguments <a id='L7816' name='L7816'></a> \fi <a id='L7817' name='L7817'></a>} <a id='L7818' name='L7818'></a>\def\parsemargdefxxx#1,{% <a id='L7819' name='L7819'></a> \if#1;\let\next=\relax <a id='L7820' name='L7820'></a> \else \let\next=\parsemargdefxxx <a id='L7821' name='L7821'></a> \advance\paramno by 1 <a id='L7822' name='L7822'></a> \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname <a id='L7823' name='L7823'></a> {\xeatspaces{\hash\the\paramno}}% <a id='L7824' name='L7824'></a> \edef\paramlist{\paramlist\hash\the\paramno,}% <a id='L7825' name='L7825'></a> \fi\next} <a id='L7826' name='L7826'></a> <a id='L7827' name='L7827'></a>\def\parsemmanyargdef@@#1,{% <a id='L7828' name='L7828'></a> \if#1;\let\next=\relax <a id='L7829' name='L7829'></a> \else <a id='L7830' name='L7830'></a> \let\next=\parsemmanyargdef@@ <a id='L7831' name='L7831'></a> \edef\tempb{\eatspaces{#1}}% <a id='L7832' name='L7832'></a> \expandafter\def\expandafter\tempa <a id='L7833' name='L7833'></a> \expandafter{\csname macarg.\tempb\endcsname}% <a id='L7834' name='L7834'></a> % Note that we need some extra \noexpand\noexpand, this is because we <a id='L7835' name='L7835'></a> % don't want \the to be expanded in the \parsermacbody as it uses an <a id='L7836' name='L7836'></a> % \xdef . <a id='L7837' name='L7837'></a> \expandafter\edef\tempa <a id='L7838' name='L7838'></a> {\noexpand\noexpand\noexpand\the\toks\the\paramno}% <a id='L7839' name='L7839'></a> \advance\paramno by 1\relax <a id='L7840' name='L7840'></a> \fi\next} <a id='L7841' name='L7841'></a> <a id='L7842' name='L7842'></a>% These two commands read recursive and nonrecursive macro bodies. <a id='L7843' name='L7843'></a>% (They're different since rec and nonrec macros end differently.) <a id='L7844' name='L7844'></a>% <a id='L7845' name='L7845'></a> <a id='L7846' name='L7846'></a>\catcode `\@\texiatcatcode <a id='L7847' name='L7847'></a>\long\def\parsemacbody#1@end macro% <a id='L7848' name='L7848'></a>{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% <a id='L7849' name='L7849'></a>\long\def\parsermacbody#1@end rmacro% <a id='L7850' name='L7850'></a>{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% <a id='L7851' name='L7851'></a>\catcode `\@=11\relax <a id='L7852' name='L7852'></a> <a id='L7853' name='L7853'></a>\let\endargs@\relax <a id='L7854' name='L7854'></a>\let\nil@\relax <a id='L7855' name='L7855'></a>\def\nilm@{\nil@}% <a id='L7856' name='L7856'></a>\long\def\nillm@{\nil@}% <a id='L7857' name='L7857'></a> <a id='L7858' name='L7858'></a>% This macro is expanded during the Texinfo macro expansion, not during its <a id='L7859' name='L7859'></a>% definition. It gets all the arguments values and assigns them to macros <a id='L7860' name='L7860'></a>% macarg.ARGNAME <a id='L7861' name='L7861'></a>% <a id='L7862' name='L7862'></a>% #1 is the macro name <a id='L7863' name='L7863'></a>% #2 is the list of argument names <a id='L7864' name='L7864'></a>% #3 is the list of argument values <a id='L7865' name='L7865'></a>\def\getargvals@#1#2#3{% <a id='L7866' name='L7866'></a> \def\macargdeflist@{}% <a id='L7867' name='L7867'></a> \def\saveparamlist@{#2}% Need to keep a copy for parameter expansion. <a id='L7868' name='L7868'></a> \def\paramlist{#2,\nil@}% <a id='L7869' name='L7869'></a> \def\macroname{#1}% <a id='L7870' name='L7870'></a> \begingroup <a id='L7871' name='L7871'></a> \macroargctxt <a id='L7872' name='L7872'></a> \def\argvaluelist{#3,\nil@}% <a id='L7873' name='L7873'></a> \def\@tempa{#3}% <a id='L7874' name='L7874'></a> \ifx\@tempa\empty <a id='L7875' name='L7875'></a> \setemptyargvalues@ <a id='L7876' name='L7876'></a> \else <a id='L7877' name='L7877'></a> \getargvals@@ <a id='L7878' name='L7878'></a> \fi <a id='L7879' name='L7879'></a>} <a id='L7880' name='L7880'></a> <a id='L7881' name='L7881'></a>% <a id='L7882' name='L7882'></a>\def\getargvals@@{% <a id='L7883' name='L7883'></a> \ifx\paramlist\nilm@ <a id='L7884' name='L7884'></a> % Some sanity check needed here that \argvaluelist is also empty. <a id='L7885' name='L7885'></a> \ifx\argvaluelist\nillm@ <a id='L7886' name='L7886'></a> \else <a id='L7887' name='L7887'></a> \errhelp = \EMsimple <a id='L7888' name='L7888'></a> \errmessage{Too many arguments in macro `\macroname'!}% <a id='L7889' name='L7889'></a> \fi <a id='L7890' name='L7890'></a> \let\next\macargexpandinbody@ <a id='L7891' name='L7891'></a> \else <a id='L7892' name='L7892'></a> \ifx\argvaluelist\nillm@ <a id='L7893' name='L7893'></a> % No more arguments values passed to macro. Set remaining named-arg <a id='L7894' name='L7894'></a> % macros to empty. <a id='L7895' name='L7895'></a> \let\next\setemptyargvalues@ <a id='L7896' name='L7896'></a> \else <a id='L7897' name='L7897'></a> % pop current arg name into \@tempb <a id='L7898' name='L7898'></a> \def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}% <a id='L7899' name='L7899'></a> \expandafter\@tempa\expandafter{\paramlist}% <a id='L7900' name='L7900'></a> % pop current argument value into \@tempc <a id='L7901' name='L7901'></a> \def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}% <a id='L7902' name='L7902'></a> \expandafter\@tempa\expandafter{\argvaluelist}% <a id='L7903' name='L7903'></a> % Here \@tempb is the current arg name and \@tempc is the current arg value. <a id='L7904' name='L7904'></a> % First place the new argument macro definition into \@tempd <a id='L7905' name='L7905'></a> \expandafter\macname\expandafter{\@tempc}% <a id='L7906' name='L7906'></a> \expandafter\let\csname macarg.\@tempb\endcsname\relax <a id='L7907' name='L7907'></a> \expandafter\def\expandafter\@tempe\expandafter{% <a id='L7908' name='L7908'></a> \csname macarg.\@tempb\endcsname}% <a id='L7909' name='L7909'></a> \edef\@tempd{\long\def\@tempe{\the\macname}}% <a id='L7910' name='L7910'></a> \push@\@tempd\macargdeflist@ <a id='L7911' name='L7911'></a> \let\next\getargvals@@ <a id='L7912' name='L7912'></a> \fi <a id='L7913' name='L7913'></a> \fi <a id='L7914' name='L7914'></a> \next <a id='L7915' name='L7915'></a>} <a id='L7916' name='L7916'></a> <a id='L7917' name='L7917'></a>\def\push@#1#2{% <a id='L7918' name='L7918'></a> \expandafter\expandafter\expandafter\def <a id='L7919' name='L7919'></a> \expandafter\expandafter\expandafter#2% <a id='L7920' name='L7920'></a> \expandafter\expandafter\expandafter{% <a id='L7921' name='L7921'></a> \expandafter#1#2}% <a id='L7922' name='L7922'></a>} <a id='L7923' name='L7923'></a> <a id='L7924' name='L7924'></a>% Replace arguments by their values in the macro body, and place the result <a id='L7925' name='L7925'></a>% in macro \@tempa <a id='L7926' name='L7926'></a>\def\macvalstoargs@{% <a id='L7927' name='L7927'></a> % To do this we use the property that token registers that are \the'ed <a id='L7928' name='L7928'></a> % within an \edef expand only once. So we are going to place all argument <a id='L7929' name='L7929'></a> % values into respective token registers. <a id='L7930' name='L7930'></a> % <a id='L7931' name='L7931'></a> % First we save the token context, and initialize argument numbering. <a id='L7932' name='L7932'></a> \begingroup <a id='L7933' name='L7933'></a> \paramno0\relax <a id='L7934' name='L7934'></a> % Then, for each argument number #N, we place the corresponding argument <a id='L7935' name='L7935'></a> % value into a new token list register \toks#N <a id='L7936' name='L7936'></a> \expandafter\putargsintokens@\saveparamlist@,;,% <a id='L7937' name='L7937'></a> % Then, we expand the body so that argument are replaced by their <a id='L7938' name='L7938'></a> % values. The trick for values not to be expanded themselves is that they <a id='L7939' name='L7939'></a> % are within tokens and that tokens expand only once in an \edef . <a id='L7940' name='L7940'></a> \edef\@tempc{\csname mac.\macroname .body\endcsname}% <a id='L7941' name='L7941'></a> % Now we restore the token stack pointer to free the token list registers <a id='L7942' name='L7942'></a> % which we have used, but we make sure that expanded body is saved after <a id='L7943' name='L7943'></a> % group. <a id='L7944' name='L7944'></a> \expandafter <a id='L7945' name='L7945'></a> \endgroup <a id='L7946' name='L7946'></a> \expandafter\def\expandafter\@tempa\expandafter{\@tempc}% <a id='L7947' name='L7947'></a> } <a id='L7948' name='L7948'></a> <a id='L7949' name='L7949'></a>\def\macargexpandinbody@{% <a id='L7950' name='L7950'></a> %% Define the named-macro outside of this group and then close this group. <a id='L7951' name='L7951'></a> \expandafter <a id='L7952' name='L7952'></a> \endgroup <a id='L7953' name='L7953'></a> \macargdeflist@ <a id='L7954' name='L7954'></a> % First the replace in body the macro arguments by their values, the result <a id='L7955' name='L7955'></a> % is in \@tempa . <a id='L7956' name='L7956'></a> \macvalstoargs@ <a id='L7957' name='L7957'></a> % Then we point at the \norecurse or \gobble (for recursive) macro value <a id='L7958' name='L7958'></a> % with \@tempb . <a id='L7959' name='L7959'></a> \expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname <a id='L7960' name='L7960'></a> % Depending on whether it is recursive or not, we need some tailing <a id='L7961' name='L7961'></a> % \egroup . <a id='L7962' name='L7962'></a> \ifx\@tempb\gobble <a id='L7963' name='L7963'></a> \let\@tempc\relax <a id='L7964' name='L7964'></a> \else <a id='L7965' name='L7965'></a> \let\@tempc\egroup <a id='L7966' name='L7966'></a> \fi <a id='L7967' name='L7967'></a> % And now we do the real job: <a id='L7968' name='L7968'></a> \edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}% <a id='L7969' name='L7969'></a> \@tempd <a id='L7970' name='L7970'></a>} <a id='L7971' name='L7971'></a> <a id='L7972' name='L7972'></a>\def\putargsintokens@#1,{% <a id='L7973' name='L7973'></a> \if#1;\let\next\relax <a id='L7974' name='L7974'></a> \else <a id='L7975' name='L7975'></a> \let\next\putargsintokens@ <a id='L7976' name='L7976'></a> % First we allocate the new token list register, and give it a temporary <a id='L7977' name='L7977'></a> % alias \@tempb . <a id='L7978' name='L7978'></a> \toksdef\@tempb\the\paramno <a id='L7979' name='L7979'></a> % Then we place the argument value into that token list register. <a id='L7980' name='L7980'></a> \expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname <a id='L7981' name='L7981'></a> \expandafter\@tempb\expandafter{\@tempa}% <a id='L7982' name='L7982'></a> \advance\paramno by 1\relax <a id='L7983' name='L7983'></a> \fi <a id='L7984' name='L7984'></a> \next <a id='L7985' name='L7985'></a>} <a id='L7986' name='L7986'></a> <a id='L7987' name='L7987'></a>% Save the token stack pointer into macro #1 <a id='L7988' name='L7988'></a>\def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}} <a id='L7989' name='L7989'></a>% Restore the token stack pointer from number in macro #1 <a id='L7990' name='L7990'></a>\def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax} <a id='L7991' name='L7991'></a>% newtoks that can be used non \outer . <a id='L7992' name='L7992'></a>\def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi} <a id='L7993' name='L7993'></a> <a id='L7994' name='L7994'></a>% Tailing missing arguments are set to empty <a id='L7995' name='L7995'></a>\def\setemptyargvalues@{% <a id='L7996' name='L7996'></a> \ifx\paramlist\nilm@ <a id='L7997' name='L7997'></a> \let\next\macargexpandinbody@ <a id='L7998' name='L7998'></a> \else <a id='L7999' name='L7999'></a> \expandafter\setemptyargvaluesparser@\paramlist\endargs@ <a id='L8000' name='L8000'></a> \let\next\setemptyargvalues@ <a id='L8001' name='L8001'></a> \fi <a id='L8002' name='L8002'></a> \next <a id='L8003' name='L8003'></a>} <a id='L8004' name='L8004'></a> <a id='L8005' name='L8005'></a>\def\setemptyargvaluesparser@#1,#2\endargs@{% <a id='L8006' name='L8006'></a> \expandafter\def\expandafter\@tempa\expandafter{% <a id='L8007' name='L8007'></a> \expandafter\def\csname macarg.#1\endcsname{}}% <a id='L8008' name='L8008'></a> \push@\@tempa\macargdeflist@ <a id='L8009' name='L8009'></a> \def\paramlist{#2}% <a id='L8010' name='L8010'></a>} <a id='L8011' name='L8011'></a> <a id='L8012' name='L8012'></a>% #1 is the element target macro <a id='L8013' name='L8013'></a>% #2 is the list macro <a id='L8014' name='L8014'></a>% #3,#4\endargs@ is the list value <a id='L8015' name='L8015'></a>\def\pop@#1#2#3,#4\endargs@{% <a id='L8016' name='L8016'></a> \def#1{#3}% <a id='L8017' name='L8017'></a> \def#2{#4}% <a id='L8018' name='L8018'></a>} <a id='L8019' name='L8019'></a>\long\def\longpop@#1#2#3,#4\endargs@{% <a id='L8020' name='L8020'></a> \long\def#1{#3}% <a id='L8021' name='L8021'></a> \long\def#2{#4}% <a id='L8022' name='L8022'></a>} <a id='L8023' name='L8023'></a> <a id='L8024' name='L8024'></a>% This defines a Texinfo @macro. There are eight cases: recursive and <a id='L8025' name='L8025'></a>% nonrecursive macros of zero, one, up to nine, and many arguments. <a id='L8026' name='L8026'></a>% Much magic with \expandafter here. <a id='L8027' name='L8027'></a>% \xdef is used so that macro definitions will survive the file <a id='L8028' name='L8028'></a>% they're defined in; @include reads the file inside a group. <a id='L8029' name='L8029'></a>% <a id='L8030' name='L8030'></a>\def\defmacro{% <a id='L8031' name='L8031'></a> \let\hash=##% convert placeholders to macro parameter chars <a id='L8032' name='L8032'></a> \ifrecursive <a id='L8033' name='L8033'></a> \ifcase\paramno <a id='L8034' name='L8034'></a> % 0 <a id='L8035' name='L8035'></a> \expandafter\xdef\csname\the\macname\endcsname{% <a id='L8036' name='L8036'></a> \noexpand\scanmacro{\temp}}% <a id='L8037' name='L8037'></a> \or % 1 <a id='L8038' name='L8038'></a> \expandafter\xdef\csname\the\macname\endcsname{% <a id='L8039' name='L8039'></a> \bgroup\noexpand\macroargctxt <a id='L8040' name='L8040'></a> \noexpand\braceorline <a id='L8041' name='L8041'></a> \expandafter\noexpand\csname\the\macname xxx\endcsname}% <a id='L8042' name='L8042'></a> \expandafter\xdef\csname\the\macname xxx\endcsname##1{% <a id='L8043' name='L8043'></a> \egroup\noexpand\scanmacro{\temp}}% <a id='L8044' name='L8044'></a> \else <a id='L8045' name='L8045'></a> \ifnum\paramno<10\relax % at most 9 <a id='L8046' name='L8046'></a> \expandafter\xdef\csname\the\macname\endcsname{% <a id='L8047' name='L8047'></a> \bgroup\noexpand\macroargctxt <a id='L8048' name='L8048'></a> \noexpand\csname\the\macname xx\endcsname}% <a id='L8049' name='L8049'></a> \expandafter\xdef\csname\the\macname xx\endcsname##1{% <a id='L8050' name='L8050'></a> \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% <a id='L8051' name='L8051'></a> \expandafter\expandafter <a id='L8052' name='L8052'></a> \expandafter\xdef <a id='L8053' name='L8053'></a> \expandafter\expandafter <a id='L8054' name='L8054'></a> \csname\the\macname xxx\endcsname <a id='L8055' name='L8055'></a> \paramlist{\egroup\noexpand\scanmacro{\temp}}% <a id='L8056' name='L8056'></a> \else % 10 or more <a id='L8057' name='L8057'></a> \expandafter\xdef\csname\the\macname\endcsname{% <a id='L8058' name='L8058'></a> \noexpand\getargvals@{\the\macname}{\argl}% <a id='L8059' name='L8059'></a> }% <a id='L8060' name='L8060'></a> \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp <a id='L8061' name='L8061'></a> \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble <a id='L8062' name='L8062'></a> \fi <a id='L8063' name='L8063'></a> \fi <a id='L8064' name='L8064'></a> \else <a id='L8065' name='L8065'></a> \ifcase\paramno <a id='L8066' name='L8066'></a> % 0 <a id='L8067' name='L8067'></a> \expandafter\xdef\csname\the\macname\endcsname{% <a id='L8068' name='L8068'></a> \noexpand\norecurse{\the\macname}% <a id='L8069' name='L8069'></a> \noexpand\scanmacro{\temp}\egroup}% <a id='L8070' name='L8070'></a> \or % 1 <a id='L8071' name='L8071'></a> \expandafter\xdef\csname\the\macname\endcsname{% <a id='L8072' name='L8072'></a> \bgroup\noexpand\macroargctxt <a id='L8073' name='L8073'></a> \noexpand\braceorline <a id='L8074' name='L8074'></a> \expandafter\noexpand\csname\the\macname xxx\endcsname}% <a id='L8075' name='L8075'></a> \expandafter\xdef\csname\the\macname xxx\endcsname##1{% <a id='L8076' name='L8076'></a> \egroup <a id='L8077' name='L8077'></a> \noexpand\norecurse{\the\macname}% <a id='L8078' name='L8078'></a> \noexpand\scanmacro{\temp}\egroup}% <a id='L8079' name='L8079'></a> \else % at most 9 <a id='L8080' name='L8080'></a> \ifnum\paramno<10\relax <a id='L8081' name='L8081'></a> \expandafter\xdef\csname\the\macname\endcsname{% <a id='L8082' name='L8082'></a> \bgroup\noexpand\macroargctxt <a id='L8083' name='L8083'></a> \expandafter\noexpand\csname\the\macname xx\endcsname}% <a id='L8084' name='L8084'></a> \expandafter\xdef\csname\the\macname xx\endcsname##1{% <a id='L8085' name='L8085'></a> \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% <a id='L8086' name='L8086'></a> \expandafter\expandafter <a id='L8087' name='L8087'></a> \expandafter\xdef <a id='L8088' name='L8088'></a> \expandafter\expandafter <a id='L8089' name='L8089'></a> \csname\the\macname xxx\endcsname <a id='L8090' name='L8090'></a> \paramlist{% <a id='L8091' name='L8091'></a> \egroup <a id='L8092' name='L8092'></a> \noexpand\norecurse{\the\macname}% <a id='L8093' name='L8093'></a> \noexpand\scanmacro{\temp}\egroup}% <a id='L8094' name='L8094'></a> \else % 10 or more: <a id='L8095' name='L8095'></a> \expandafter\xdef\csname\the\macname\endcsname{% <a id='L8096' name='L8096'></a> \noexpand\getargvals@{\the\macname}{\argl}% <a id='L8097' name='L8097'></a> }% <a id='L8098' name='L8098'></a> \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp <a id='L8099' name='L8099'></a> \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse <a id='L8100' name='L8100'></a> \fi <a id='L8101' name='L8101'></a> \fi <a id='L8102' name='L8102'></a> \fi} <a id='L8103' name='L8103'></a> <a id='L8104' name='L8104'></a>\catcode `\@\texiatcatcode\relax <a id='L8105' name='L8105'></a> <a id='L8106' name='L8106'></a>\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} <a id='L8107' name='L8107'></a> <a id='L8108' name='L8108'></a>% \braceorline decides whether the next nonwhitespace character is a <a id='L8109' name='L8109'></a>% {. If so it reads up to the closing }, if not, it reads the whole <a id='L8110' name='L8110'></a>% line. Whatever was read is then fed to the next control sequence <a id='L8111' name='L8111'></a>% as an argument (by \parsebrace or \parsearg). <a id='L8112' name='L8112'></a>% <a id='L8113' name='L8113'></a>\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} <a id='L8114' name='L8114'></a>\def\braceorlinexxx{% <a id='L8115' name='L8115'></a> \ifx\nchar\bgroup\else <a id='L8116' name='L8116'></a> \expandafter\parsearg <a id='L8117' name='L8117'></a> \fi \macnamexxx} <a id='L8118' name='L8118'></a> <a id='L8119' name='L8119'></a> <a id='L8120' name='L8120'></a>% @alias. <a id='L8121' name='L8121'></a>% We need some trickery to remove the optional spaces around the equal <a id='L8122' name='L8122'></a>% sign. Make them active and then expand them all to nothing. <a id='L8123' name='L8123'></a>% <a id='L8124' name='L8124'></a>\def\alias{\parseargusing\obeyspaces\aliasxxx} <a id='L8125' name='L8125'></a>\def\aliasxxx #1{\aliasyyy#1\relax} <a id='L8126' name='L8126'></a>\def\aliasyyy #1=#2\relax{% <a id='L8127' name='L8127'></a> {% <a id='L8128' name='L8128'></a> \expandafter\let\obeyedspace=\empty <a id='L8129' name='L8129'></a> \addtomacrolist{#1}% <a id='L8130' name='L8130'></a> \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% <a id='L8131' name='L8131'></a> }% <a id='L8132' name='L8132'></a> \next <a id='L8133' name='L8133'></a>} <a id='L8134' name='L8134'></a> <a id='L8135' name='L8135'></a> <a id='L8136' name='L8136'></a>\message{cross references,} <a id='L8137' name='L8137'></a> <a id='L8138' name='L8138'></a>\newwrite\auxfile <a id='L8139' name='L8139'></a>\newif\ifhavexrefs % True if xref values are known. <a id='L8140' name='L8140'></a>\newif\ifwarnedxrefs % True if we warned once that they aren't known. <a id='L8141' name='L8141'></a> <a id='L8142' name='L8142'></a>% @inforef is relatively simple. <a id='L8143' name='L8143'></a>\def\inforef #1{\inforefzzz #1,,,,**} <a id='L8144' name='L8144'></a>\def\inforefzzz #1,#2,#3,#4**{% <a id='L8145' name='L8145'></a> \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, <a id='L8146' name='L8146'></a> node \samp{\ignorespaces#1{}}} <a id='L8147' name='L8147'></a> <a id='L8148' name='L8148'></a>% @node's only job in TeX is to define \lastnode, which is used in <a id='L8149' name='L8149'></a>% cross-references. The @node line might or might not have commas, and <a id='L8150' name='L8150'></a>% might or might not have spaces before the first comma, like: <a id='L8151' name='L8151'></a>% @node foo , bar , ... <a id='L8152' name='L8152'></a>% We don't want such trailing spaces in the node name. <a id='L8153' name='L8153'></a>% <a id='L8154' name='L8154'></a>\parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse} <a id='L8155' name='L8155'></a>% <a id='L8156' name='L8156'></a>% also remove a trailing comma, in case of something like this: <a id='L8157' name='L8157'></a>% @node Help-Cross, , , Cross-refs <a id='L8158' name='L8158'></a>\def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} <a id='L8159' name='L8159'></a>\def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}} <a id='L8160' name='L8160'></a> <a id='L8161' name='L8161'></a>\let\nwnode=\node <a id='L8162' name='L8162'></a>\let\lastnode=\empty <a id='L8163' name='L8163'></a> <a id='L8164' name='L8164'></a>% Write a cross-reference definition for the current node. #1 is the <a id='L8165' name='L8165'></a>% type (Ynumbered, Yappendix, Ynothing). <a id='L8166' name='L8166'></a>% <a id='L8167' name='L8167'></a>\def\donoderef#1{% <a id='L8168' name='L8168'></a> \ifx\lastnode\empty\else <a id='L8169' name='L8169'></a> \setref{\lastnode}{#1}% <a id='L8170' name='L8170'></a> \global\let\lastnode=\empty <a id='L8171' name='L8171'></a> \fi <a id='L8172' name='L8172'></a>} <a id='L8173' name='L8173'></a> <a id='L8174' name='L8174'></a>% @anchor{NAME} -- define xref target at arbitrary point. <a id='L8175' name='L8175'></a>% <a id='L8176' name='L8176'></a>\newcount\savesfregister <a id='L8177' name='L8177'></a>% <a id='L8178' name='L8178'></a>\def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} <a id='L8179' name='L8179'></a>\def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} <a id='L8180' name='L8180'></a>\def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} <a id='L8181' name='L8181'></a> <a id='L8182' name='L8182'></a>% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an <a id='L8183' name='L8183'></a>% anchor), which consists of three parts: <a id='L8184' name='L8184'></a>% 1) NAME-title - the current sectioning name taken from \lastsection, <a id='L8185' name='L8185'></a>% or the anchor name. <a id='L8186' name='L8186'></a>% 2) NAME-snt - section number and type, passed as the SNT arg, or <a id='L8187' name='L8187'></a>% empty for anchors. <a id='L8188' name='L8188'></a>% 3) NAME-pg - the page number. <a id='L8189' name='L8189'></a>% <a id='L8190' name='L8190'></a>% This is called from \donoderef, \anchor, and \dofloat. In the case of <a id='L8191' name='L8191'></a>% floats, there is an additional part, which is not written here: <a id='L8192' name='L8192'></a>% 4) NAME-lof - the text as it should appear in a @listoffloats. <a id='L8193' name='L8193'></a>% <a id='L8194' name='L8194'></a>\def\setref#1#2{% <a id='L8195' name='L8195'></a> \pdfmkdest{#1}% <a id='L8196' name='L8196'></a> \iflinks <a id='L8197' name='L8197'></a> {% <a id='L8198' name='L8198'></a> \atdummies % preserve commands, but don't expand them <a id='L8199' name='L8199'></a> \edef\writexrdef##1##2{% <a id='L8200' name='L8200'></a> \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef <a id='L8201' name='L8201'></a> ##1}{##2}}% these are parameters of \writexrdef <a id='L8202' name='L8202'></a> }% <a id='L8203' name='L8203'></a> \toks0 = \expandafter{\lastsection}% <a id='L8204' name='L8204'></a> \immediate \writexrdef{title}{\the\toks0 }% <a id='L8205' name='L8205'></a> \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. <a id='L8206' name='L8206'></a> \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout <a id='L8207' name='L8207'></a> }% <a id='L8208' name='L8208'></a> \fi <a id='L8209' name='L8209'></a>} <a id='L8210' name='L8210'></a> <a id='L8211' name='L8211'></a>% @xrefautosectiontitle on|off says whether @section(ing) names are used <a id='L8212' name='L8212'></a>% automatically in xrefs, if the third arg is not explicitly specified. <a id='L8213' name='L8213'></a>% This was provided as a "secret" @set xref-automatic-section-title <a id='L8214' name='L8214'></a>% variable, now it's official. <a id='L8215' name='L8215'></a>% <a id='L8216' name='L8216'></a>\parseargdef\xrefautomaticsectiontitle{% <a id='L8217' name='L8217'></a> \def\temp{#1}% <a id='L8218' name='L8218'></a> \ifx\temp\onword <a id='L8219' name='L8219'></a> \expandafter\let\csname SETxref-automatic-section-title\endcsname <a id='L8220' name='L8220'></a> = \empty <a id='L8221' name='L8221'></a> \else\ifx\temp\offword <a id='L8222' name='L8222'></a> \expandafter\let\csname SETxref-automatic-section-title\endcsname <a id='L8223' name='L8223'></a> = \relax <a id='L8224' name='L8224'></a> \else <a id='L8225' name='L8225'></a> \errhelp = \EMsimple <a id='L8226' name='L8226'></a> \errmessage{Unknown @xrefautomaticsectiontitle value `\temp', <a id='L8227' name='L8227'></a> must be on|off}% <a id='L8228' name='L8228'></a> \fi\fi <a id='L8229' name='L8229'></a>} <a id='L8230' name='L8230'></a> <a id='L8231' name='L8231'></a>% <a id='L8232' name='L8232'></a>% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is <a id='L8233' name='L8233'></a>% the node name, #2 the name of the Info cross-reference, #3 the printed <a id='L8234' name='L8234'></a>% node name, #4 the name of the Info file, #5 the name of the printed <a id='L8235' name='L8235'></a>% manual. All but the node name can be omitted. <a id='L8236' name='L8236'></a>% <a id='L8237' name='L8237'></a>\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} <a id='L8238' name='L8238'></a>\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} <a id='L8239' name='L8239'></a>\def\ref#1{\xrefX[#1,,,,,,,]} <a id='L8240' name='L8240'></a>% <a id='L8241' name='L8241'></a>\newbox\toprefbox <a id='L8242' name='L8242'></a>\newbox\printedrefnamebox <a id='L8243' name='L8243'></a>\newbox\infofilenamebox <a id='L8244' name='L8244'></a>\newbox\printedmanualbox <a id='L8245' name='L8245'></a>% <a id='L8246' name='L8246'></a>\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup <a id='L8247' name='L8247'></a> \unsepspaces <a id='L8248' name='L8248'></a> % <a id='L8249' name='L8249'></a> % Get args without leading/trailing spaces. <a id='L8250' name='L8250'></a> \def\printedrefname{\ignorespaces #3}% <a id='L8251' name='L8251'></a> \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}% <a id='L8252' name='L8252'></a> % <a id='L8253' name='L8253'></a> \def\infofilename{\ignorespaces #4}% <a id='L8254' name='L8254'></a> \setbox\infofilenamebox = \hbox{\infofilename\unskip}% <a id='L8255' name='L8255'></a> % <a id='L8256' name='L8256'></a> \def\printedmanual{\ignorespaces #5}% <a id='L8257' name='L8257'></a> \setbox\printedmanualbox = \hbox{\printedmanual\unskip}% <a id='L8258' name='L8258'></a> % <a id='L8259' name='L8259'></a> % If the printed reference name (arg #3) was not explicitly given in <a id='L8260' name='L8260'></a> % the @xref, figure out what we want to use. <a id='L8261' name='L8261'></a> \ifdim \wd\printedrefnamebox = 0pt <a id='L8262' name='L8262'></a> % No printed node name was explicitly given. <a id='L8263' name='L8263'></a> \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax <a id='L8264' name='L8264'></a> % Not auto section-title: use node name inside the square brackets. <a id='L8265' name='L8265'></a> \def\printedrefname{\ignorespaces #1}% <a id='L8266' name='L8266'></a> \else <a id='L8267' name='L8267'></a> % Auto section-title: use chapter/section title inside <a id='L8268' name='L8268'></a> % the square brackets if we have it. <a id='L8269' name='L8269'></a> \ifdim \wd\printedmanualbox > 0pt <a id='L8270' name='L8270'></a> % It is in another manual, so we don't have it; use node name. <a id='L8271' name='L8271'></a> \def\printedrefname{\ignorespaces #1}% <a id='L8272' name='L8272'></a> \else <a id='L8273' name='L8273'></a> \ifhavexrefs <a id='L8274' name='L8274'></a> % We (should) know the real title if we have the xref values. <a id='L8275' name='L8275'></a> \def\printedrefname{\refx{#1-title}{}}% <a id='L8276' name='L8276'></a> \else <a id='L8277' name='L8277'></a> % Otherwise just copy the Info node name. <a id='L8278' name='L8278'></a> \def\printedrefname{\ignorespaces #1}% <a id='L8279' name='L8279'></a> \fi% <a id='L8280' name='L8280'></a> \fi <a id='L8281' name='L8281'></a> \fi <a id='L8282' name='L8282'></a> \fi <a id='L8283' name='L8283'></a> % <a id='L8284' name='L8284'></a> % Make link in pdf output. <a id='L8285' name='L8285'></a> \ifpdf <a id='L8286' name='L8286'></a> {\indexnofonts <a id='L8287' name='L8287'></a> \turnoffactive <a id='L8288' name='L8288'></a> \makevalueexpandable <a id='L8289' name='L8289'></a> % This expands tokens, so do it after making catcode changes, so _ <a id='L8290' name='L8290'></a> % etc. don't get their TeX definitions. This ignores all spaces in <a id='L8291' name='L8291'></a> % #4, including (wrongly) those in the middle of the filename. <a id='L8292' name='L8292'></a> \getfilename{#4}% <a id='L8293' name='L8293'></a> % <a id='L8294' name='L8294'></a> % This (wrongly) does not take account of leading or trailing <a id='L8295' name='L8295'></a> % spaces in #1, which should be ignored. <a id='L8296' name='L8296'></a> \edef\pdfxrefdest{#1}% <a id='L8297' name='L8297'></a> \ifx\pdfxrefdest\empty <a id='L8298' name='L8298'></a> \def\pdfxrefdest{Top}% no empty targets <a id='L8299' name='L8299'></a> \else <a id='L8300' name='L8300'></a> \txiescapepdf\pdfxrefdest % escape PDF special chars <a id='L8301' name='L8301'></a> \fi <a id='L8302' name='L8302'></a> % <a id='L8303' name='L8303'></a> \leavevmode <a id='L8304' name='L8304'></a> \startlink attr{/Border [0 0 0]}% <a id='L8305' name='L8305'></a> \ifnum\filenamelength>0 <a id='L8306' name='L8306'></a> goto file{\the\filename.pdf} name{\pdfxrefdest}% <a id='L8307' name='L8307'></a> \else <a id='L8308' name='L8308'></a> goto name{\pdfmkpgn{\pdfxrefdest}}% <a id='L8309' name='L8309'></a> \fi <a id='L8310' name='L8310'></a> }% <a id='L8311' name='L8311'></a> \setcolor{\linkcolor}% <a id='L8312' name='L8312'></a> \fi <a id='L8313' name='L8313'></a> % <a id='L8314' name='L8314'></a> % Float references are printed completely differently: "Figure 1.2" <a id='L8315' name='L8315'></a> % instead of "[somenode], p.3". We distinguish them by the <a id='L8316' name='L8316'></a> % LABEL-title being set to a magic string. <a id='L8317' name='L8317'></a> {% <a id='L8318' name='L8318'></a> % Have to otherify everything special to allow the \csname to <a id='L8319' name='L8319'></a> % include an _ in the xref name, etc. <a id='L8320' name='L8320'></a> \indexnofonts <a id='L8321' name='L8321'></a> \turnoffactive <a id='L8322' name='L8322'></a> \expandafter\global\expandafter\let\expandafter\Xthisreftitle <a id='L8323' name='L8323'></a> \csname XR#1-title\endcsname <a id='L8324' name='L8324'></a> }% <a id='L8325' name='L8325'></a> \iffloat\Xthisreftitle <a id='L8326' name='L8326'></a> % If the user specified the print name (third arg) to the ref, <a id='L8327' name='L8327'></a> % print it instead of our usual "Figure 1.2". <a id='L8328' name='L8328'></a> \ifdim\wd\printedrefnamebox = 0pt <a id='L8329' name='L8329'></a> \refx{#1-snt}{}% <a id='L8330' name='L8330'></a> \else <a id='L8331' name='L8331'></a> \printedrefname <a id='L8332' name='L8332'></a> \fi <a id='L8333' name='L8333'></a> % <a id='L8334' name='L8334'></a> % If the user also gave the printed manual name (fifth arg), append <a id='L8335' name='L8335'></a> % "in MANUALNAME". <a id='L8336' name='L8336'></a> \ifdim \wd\printedmanualbox > 0pt <a id='L8337' name='L8337'></a> \space \putwordin{} \cite{\printedmanual}% <a id='L8338' name='L8338'></a> \fi <a id='L8339' name='L8339'></a> \else <a id='L8340' name='L8340'></a> % node/anchor (non-float) references. <a id='L8341' name='L8341'></a> % <a id='L8342' name='L8342'></a> % If we use \unhbox to print the node names, TeX does not insert <a id='L8343' name='L8343'></a> % empty discretionaries after hyphens, which means that it will not <a id='L8344' name='L8344'></a> % find a line break at a hyphen in a node names. Since some manuals <a id='L8345' name='L8345'></a> % are best written with fairly long node names, containing hyphens, <a id='L8346' name='L8346'></a> % this is a loss. Therefore, we give the text of the node name <a id='L8347' name='L8347'></a> % again, so it is as if TeX is seeing it for the first time. <a id='L8348' name='L8348'></a> % <a id='L8349' name='L8349'></a> \ifdim \wd\printedmanualbox > 0pt <a id='L8350' name='L8350'></a> % Cross-manual reference with a printed manual name. <a id='L8351' name='L8351'></a> % <a id='L8352' name='L8352'></a> \crossmanualxref{\cite{\printedmanual\unskip}}% <a id='L8353' name='L8353'></a> % <a id='L8354' name='L8354'></a> \else\ifdim \wd\infofilenamebox > 0pt <a id='L8355' name='L8355'></a> % Cross-manual reference with only an info filename (arg 4), no <a id='L8356' name='L8356'></a> % printed manual name (arg 5). This is essentially the same as <a id='L8357' name='L8357'></a> % the case above; we output the filename, since we have nothing else. <a id='L8358' name='L8358'></a> % <a id='L8359' name='L8359'></a> \crossmanualxref{\code{\infofilename\unskip}}% <a id='L8360' name='L8360'></a> % <a id='L8361' name='L8361'></a> \else <a id='L8362' name='L8362'></a> % Reference within this manual. <a id='L8363' name='L8363'></a> % <a id='L8364' name='L8364'></a> % _ (for example) has to be the character _ for the purposes of the <a id='L8365' name='L8365'></a> % control sequence corresponding to the node, but it has to expand <a id='L8366' name='L8366'></a> % into the usual \leavevmode...\vrule stuff for purposes of <a id='L8367' name='L8367'></a> % printing. So we \turnoffactive for the \refx-snt, back on for the <a id='L8368' name='L8368'></a> % printing, back off for the \refx-pg. <a id='L8369' name='L8369'></a> {\turnoffactive <a id='L8370' name='L8370'></a> % Only output a following space if the -snt ref is nonempty; for <a id='L8371' name='L8371'></a> % @unnumbered and @anchor, it won't be. <a id='L8372' name='L8372'></a> \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% <a id='L8373' name='L8373'></a> \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi <a id='L8374' name='L8374'></a> }% <a id='L8375' name='L8375'></a> % output the `[mynode]' via the macro below so it can be overridden. <a id='L8376' name='L8376'></a> \xrefprintnodename\printedrefname <a id='L8377' name='L8377'></a> % <a id='L8378' name='L8378'></a> % But we always want a comma and a space: <a id='L8379' name='L8379'></a> ,\space <a id='L8380' name='L8380'></a> % <a id='L8381' name='L8381'></a> % output the `page 3'. <a id='L8382' name='L8382'></a> \turnoffactive \putwordpage\tie\refx{#1-pg}{}% <a id='L8383' name='L8383'></a> \fi\fi <a id='L8384' name='L8384'></a> \fi <a id='L8385' name='L8385'></a> \endlink <a id='L8386' name='L8386'></a>\endgroup} <a id='L8387' name='L8387'></a> <a id='L8388' name='L8388'></a>% Output a cross-manual xref to #1. Used just above (twice). <a id='L8389' name='L8389'></a>% <a id='L8390' name='L8390'></a>% Only include the text "Section ``foo'' in" if the foo is neither <a id='L8391' name='L8391'></a>% missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply <a id='L8392' name='L8392'></a>% "see The Foo Manual", the idea being to refer to the whole manual. <a id='L8393' name='L8393'></a>% <a id='L8394' name='L8394'></a>% But, this being TeX, we can't easily compare our node name against the <a id='L8395' name='L8395'></a>% string "Top" while ignoring the possible spaces before and after in <a id='L8396' name='L8396'></a>% the input. By adding the arbitrary 7sp below, we make it much less <a id='L8397' name='L8397'></a>% likely that a real node name would have the same width as "Top" (e.g., <a id='L8398' name='L8398'></a>% in a monospaced font). Hopefully it will never happen in practice. <a id='L8399' name='L8399'></a>% <a id='L8400' name='L8400'></a>% For the same basic reason, we retypeset the "Top" at every <a id='L8401' name='L8401'></a>% reference, since the current font is indeterminate. <a id='L8402' name='L8402'></a>% <a id='L8403' name='L8403'></a>\def\crossmanualxref#1{% <a id='L8404' name='L8404'></a> \setbox\toprefbox = \hbox{Top\kern7sp}% <a id='L8405' name='L8405'></a> \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}% <a id='L8406' name='L8406'></a> \ifdim \wd2 > 7sp % nonempty? <a id='L8407' name='L8407'></a> \ifdim \wd2 = \wd\toprefbox \else % same as Top? <a id='L8408' name='L8408'></a> \putwordSection{} ``\printedrefname'' \putwordin{}\space <a id='L8409' name='L8409'></a> \fi <a id='L8410' name='L8410'></a> \fi <a id='L8411' name='L8411'></a> #1% <a id='L8412' name='L8412'></a>} <a id='L8413' name='L8413'></a> <a id='L8414' name='L8414'></a>% This macro is called from \xrefX for the `[nodename]' part of xref <a id='L8415' name='L8415'></a>% output. It's a separate macro only so it can be changed more easily, <a id='L8416' name='L8416'></a>% since square brackets don't work well in some documents. Particularly <a id='L8417' name='L8417'></a>% one that Bob is working on :). <a id='L8418' name='L8418'></a>% <a id='L8419' name='L8419'></a>\def\xrefprintnodename#1{[#1]} <a id='L8420' name='L8420'></a> <a id='L8421' name='L8421'></a>% Things referred to by \setref. <a id='L8422' name='L8422'></a>% <a id='L8423' name='L8423'></a>\def\Ynothing{} <a id='L8424' name='L8424'></a>\def\Yomitfromtoc{} <a id='L8425' name='L8425'></a>\def\Ynumbered{% <a id='L8426' name='L8426'></a> \ifnum\secno=0 <a id='L8427' name='L8427'></a> \putwordChapter@tie \the\chapno <a id='L8428' name='L8428'></a> \else \ifnum\subsecno=0 <a id='L8429' name='L8429'></a> \putwordSection@tie \the\chapno.\the\secno <a id='L8430' name='L8430'></a> \else \ifnum\subsubsecno=0 <a id='L8431' name='L8431'></a> \putwordSection@tie \the\chapno.\the\secno.\the\subsecno <a id='L8432' name='L8432'></a> \else <a id='L8433' name='L8433'></a> \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno <a id='L8434' name='L8434'></a> \fi\fi\fi <a id='L8435' name='L8435'></a>} <a id='L8436' name='L8436'></a>\def\Yappendix{% <a id='L8437' name='L8437'></a> \ifnum\secno=0 <a id='L8438' name='L8438'></a> \putwordAppendix@tie @char\the\appendixno{}% <a id='L8439' name='L8439'></a> \else \ifnum\subsecno=0 <a id='L8440' name='L8440'></a> \putwordSection@tie @char\the\appendixno.\the\secno <a id='L8441' name='L8441'></a> \else \ifnum\subsubsecno=0 <a id='L8442' name='L8442'></a> \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno <a id='L8443' name='L8443'></a> \else <a id='L8444' name='L8444'></a> \putwordSection@tie <a id='L8445' name='L8445'></a> @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno <a id='L8446' name='L8446'></a> \fi\fi\fi <a id='L8447' name='L8447'></a>} <a id='L8448' name='L8448'></a> <a id='L8449' name='L8449'></a>% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. <a id='L8450' name='L8450'></a>% If its value is nonempty, SUFFIX is output afterward. <a id='L8451' name='L8451'></a>% <a id='L8452' name='L8452'></a>\def\refx#1#2{% <a id='L8453' name='L8453'></a> {% <a id='L8454' name='L8454'></a> \indexnofonts <a id='L8455' name='L8455'></a> \otherbackslash <a id='L8456' name='L8456'></a> \expandafter\global\expandafter\let\expandafter\thisrefX <a id='L8457' name='L8457'></a> \csname XR#1\endcsname <a id='L8458' name='L8458'></a> }% <a id='L8459' name='L8459'></a> \ifx\thisrefX\relax <a id='L8460' name='L8460'></a> % If not defined, say something at least. <a id='L8461' name='L8461'></a> \angleleft un\-de\-fined\angleright <a id='L8462' name='L8462'></a> \iflinks <a id='L8463' name='L8463'></a> \ifhavexrefs <a id='L8464' name='L8464'></a> {\toks0 = {#1}% avoid expansion of possibly-complex value <a id='L8465' name='L8465'></a> \message{\linenumber Undefined cross reference `\the\toks0'.}}% <a id='L8466' name='L8466'></a> \else <a id='L8467' name='L8467'></a> \ifwarnedxrefs\else <a id='L8468' name='L8468'></a> \global\warnedxrefstrue <a id='L8469' name='L8469'></a> \message{Cross reference values unknown; you must run TeX again.}% <a id='L8470' name='L8470'></a> \fi <a id='L8471' name='L8471'></a> \fi <a id='L8472' name='L8472'></a> \fi <a id='L8473' name='L8473'></a> \else <a id='L8474' name='L8474'></a> % It's defined, so just use it. <a id='L8475' name='L8475'></a> \thisrefX <a id='L8476' name='L8476'></a> \fi <a id='L8477' name='L8477'></a> #2% Output the suffix in any case. <a id='L8478' name='L8478'></a>} <a id='L8479' name='L8479'></a> <a id='L8480' name='L8480'></a>% This is the macro invoked by entries in the aux file. Usually it's <a id='L8481' name='L8481'></a>% just a \def (we prepend XR to the control sequence name to avoid <a id='L8482' name='L8482'></a>% collisions). But if this is a float type, we have more work to do. <a id='L8483' name='L8483'></a>% <a id='L8484' name='L8484'></a>\def\xrdef#1#2{% <a id='L8485' name='L8485'></a> {% The node name might contain 8-bit characters, which in our current <a id='L8486' name='L8486'></a> % implementation are changed to commands like @'e. Don't let these <a id='L8487' name='L8487'></a> % mess up the control sequence name. <a id='L8488' name='L8488'></a> \indexnofonts <a id='L8489' name='L8489'></a> \turnoffactive <a id='L8490' name='L8490'></a> \xdef\safexrefname{#1}% <a id='L8491' name='L8491'></a> }% <a id='L8492' name='L8492'></a> % <a id='L8493' name='L8493'></a> \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref <a id='L8494' name='L8494'></a> % <a id='L8495' name='L8495'></a> % Was that xref control sequence that we just defined for a float? <a id='L8496' name='L8496'></a> \expandafter\iffloat\csname XR\safexrefname\endcsname <a id='L8497' name='L8497'></a> % it was a float, and we have the (safe) float type in \iffloattype. <a id='L8498' name='L8498'></a> \expandafter\let\expandafter\floatlist <a id='L8499' name='L8499'></a> \csname floatlist\iffloattype\endcsname <a id='L8500' name='L8500'></a> % <a id='L8501' name='L8501'></a> % Is this the first time we've seen this float type? <a id='L8502' name='L8502'></a> \expandafter\ifx\floatlist\relax <a id='L8503' name='L8503'></a> \toks0 = {\do}% yes, so just \do <a id='L8504' name='L8504'></a> \else <a id='L8505' name='L8505'></a> % had it before, so preserve previous elements in list. <a id='L8506' name='L8506'></a> \toks0 = \expandafter{\floatlist\do}% <a id='L8507' name='L8507'></a> \fi <a id='L8508' name='L8508'></a> % <a id='L8509' name='L8509'></a> % Remember this xref in the control sequence \floatlistFLOATTYPE, <a id='L8510' name='L8510'></a> % for later use in \listoffloats. <a id='L8511' name='L8511'></a> \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0 <a id='L8512' name='L8512'></a> {\safexrefname}}% <a id='L8513' name='L8513'></a> \fi <a id='L8514' name='L8514'></a>} <a id='L8515' name='L8515'></a> <a id='L8516' name='L8516'></a>% Read the last existing aux file, if any. No error if none exists. <a id='L8517' name='L8517'></a>% <a id='L8518' name='L8518'></a>\def\tryauxfile{% <a id='L8519' name='L8519'></a> \openin 1 \jobname.aux <a id='L8520' name='L8520'></a> \ifeof 1 \else <a id='L8521' name='L8521'></a> \readdatafile{aux}% <a id='L8522' name='L8522'></a> \global\havexrefstrue <a id='L8523' name='L8523'></a> \fi <a id='L8524' name='L8524'></a> \closein 1 <a id='L8525' name='L8525'></a>} <a id='L8526' name='L8526'></a> <a id='L8527' name='L8527'></a>\def\setupdatafile{% <a id='L8528' name='L8528'></a> \catcode`\^^@=\other <a id='L8529' name='L8529'></a> \catcode`\^^A=\other <a id='L8530' name='L8530'></a> \catcode`\^^B=\other <a id='L8531' name='L8531'></a> \catcode`\^^C=\other <a id='L8532' name='L8532'></a> \catcode`\^^D=\other <a id='L8533' name='L8533'></a> \catcode`\^^E=\other <a id='L8534' name='L8534'></a> \catcode`\^^F=\other <a id='L8535' name='L8535'></a> \catcode`\^^G=\other <a id='L8536' name='L8536'></a> \catcode`\^^H=\other <a id='L8537' name='L8537'></a> \catcode`\^^K=\other <a id='L8538' name='L8538'></a> \catcode`\^^L=\other <a id='L8539' name='L8539'></a> \catcode`\^^N=\other <a id='L8540' name='L8540'></a> \catcode`\^^P=\other <a id='L8541' name='L8541'></a> \catcode`\^^Q=\other <a id='L8542' name='L8542'></a> \catcode`\^^R=\other <a id='L8543' name='L8543'></a> \catcode`\^^S=\other <a id='L8544' name='L8544'></a> \catcode`\^^T=\other <a id='L8545' name='L8545'></a> \catcode`\^^U=\other <a id='L8546' name='L8546'></a> \catcode`\^^V=\other <a id='L8547' name='L8547'></a> \catcode`\^^W=\other <a id='L8548' name='L8548'></a> \catcode`\^^X=\other <a id='L8549' name='L8549'></a> \catcode`\^^Z=\other <a id='L8550' name='L8550'></a> \catcode`\^^[=\other <a id='L8551' name='L8551'></a> \catcode`\^^\=\other <a id='L8552' name='L8552'></a> \catcode`\^^]=\other <a id='L8553' name='L8553'></a> \catcode`\^^^=\other <a id='L8554' name='L8554'></a> \catcode`\^^_=\other <a id='L8555' name='L8555'></a> % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. <a id='L8556' name='L8556'></a> % in xref tags, i.e., node names. But since ^^e4 notation isn't <a id='L8557' name='L8557'></a> % supported in the main text, it doesn't seem desirable. Furthermore, <a id='L8558' name='L8558'></a> % that is not enough: for node names that actually contain a ^ <a id='L8559' name='L8559'></a> % character, we would end up writing a line like this: 'xrdef {'hat <a id='L8560' name='L8560'></a> % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first <a id='L8561' name='L8561'></a> % argument, and \hat is not an expandable control sequence. It could <a id='L8562' name='L8562'></a> % all be worked out, but why? Either we support ^^ or we don't. <a id='L8563' name='L8563'></a> % <a id='L8564' name='L8564'></a> % The other change necessary for this was to define \auxhat: <a id='L8565' name='L8565'></a> % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter <a id='L8566' name='L8566'></a> % and then to call \auxhat in \setq. <a id='L8567' name='L8567'></a> % <a id='L8568' name='L8568'></a> \catcode`\^=\other <a id='L8569' name='L8569'></a> % <a id='L8570' name='L8570'></a> % Special characters. Should be turned off anyway, but... <a id='L8571' name='L8571'></a> \catcode`\~=\other <a id='L8572' name='L8572'></a> \catcode`\[=\other <a id='L8573' name='L8573'></a> \catcode`\]=\other <a id='L8574' name='L8574'></a> \catcode`\"=\other <a id='L8575' name='L8575'></a> \catcode`\_=\other <a id='L8576' name='L8576'></a> \catcode`\|=\other <a id='L8577' name='L8577'></a> \catcode`\<=\other <a id='L8578' name='L8578'></a> \catcode`\>=\other <a id='L8579' name='L8579'></a> \catcode`\$=\other <a id='L8580' name='L8580'></a> \catcode`\#=\other <a id='L8581' name='L8581'></a> \catcode`\&=\other <a id='L8582' name='L8582'></a> \catcode`\%=\other <a id='L8583' name='L8583'></a> \catcode`+=\other % avoid \+ for paranoia even though we've turned it off <a id='L8584' name='L8584'></a> % <a id='L8585' name='L8585'></a> % This is to support \ in node names and titles, since the \ <a id='L8586' name='L8586'></a> % characters end up in a \csname. It's easier than <a id='L8587' name='L8587'></a> % leaving it active and making its active definition an actual \ <a id='L8588' name='L8588'></a> % character. What I don't understand is why it works in the *value* <a id='L8589' name='L8589'></a> % of the xrdef. Seems like it should be a catcode12 \, and that <a id='L8590' name='L8590'></a> % should not typeset properly. But it works, so I'm moving on for <a id='L8591' name='L8591'></a> % now. --karl, 15jan04. <a id='L8592' name='L8592'></a> \catcode`\\=\other <a id='L8593' name='L8593'></a> % <a id='L8594' name='L8594'></a> % Make the characters 128-255 be printing characters. <a id='L8595' name='L8595'></a> {% <a id='L8596' name='L8596'></a> \count1=128 <a id='L8597' name='L8597'></a> \def\loop{% <a id='L8598' name='L8598'></a> \catcode\count1=\other <a id='L8599' name='L8599'></a> \advance\count1 by 1 <a id='L8600' name='L8600'></a> \ifnum \count1<256 \loop \fi <a id='L8601' name='L8601'></a> }% <a id='L8602' name='L8602'></a> }% <a id='L8603' name='L8603'></a> % <a id='L8604' name='L8604'></a> % @ is our escape character in .aux files, and we need braces. <a id='L8605' name='L8605'></a> \catcode`\{=1 <a id='L8606' name='L8606'></a> \catcode`\}=2 <a id='L8607' name='L8607'></a> \catcode`\@=0 <a id='L8608' name='L8608'></a>} <a id='L8609' name='L8609'></a> <a id='L8610' name='L8610'></a>\def\readdatafile#1{% <a id='L8611' name='L8611'></a>\begingroup <a id='L8612' name='L8612'></a> \setupdatafile <a id='L8613' name='L8613'></a> \input\jobname.#1 <a id='L8614' name='L8614'></a>\endgroup} <a id='L8615' name='L8615'></a> <a id='L8616' name='L8616'></a> <a id='L8617' name='L8617'></a>\message{insertions,} <a id='L8618' name='L8618'></a>% including footnotes. <a id='L8619' name='L8619'></a> <a id='L8620' name='L8620'></a>\newcount \footnoteno <a id='L8621' name='L8621'></a> <a id='L8622' name='L8622'></a>% The trailing space in the following definition for supereject is <a id='L8623' name='L8623'></a>% vital for proper filling; pages come out unaligned when you do a <a id='L8624' name='L8624'></a>% pagealignmacro call if that space before the closing brace is <a id='L8625' name='L8625'></a>% removed. (Generally, numeric constants should always be followed by a <a id='L8626' name='L8626'></a>% space to prevent strange expansion errors.) <a id='L8627' name='L8627'></a>\def\supereject{\par\penalty -20000\footnoteno =0 } <a id='L8628' name='L8628'></a> <a id='L8629' name='L8629'></a>% @footnotestyle is meaningful for Info output only. <a id='L8630' name='L8630'></a>\let\footnotestyle=\comment <a id='L8631' name='L8631'></a> <a id='L8632' name='L8632'></a>{\catcode `\@=11 <a id='L8633' name='L8633'></a>% <a id='L8634' name='L8634'></a>% Auto-number footnotes. Otherwise like plain. <a id='L8635' name='L8635'></a>\gdef\footnote{% <a id='L8636' name='L8636'></a> \let\indent=\ptexindent <a id='L8637' name='L8637'></a> \let\noindent=\ptexnoindent <a id='L8638' name='L8638'></a> \global\advance\footnoteno by \@ne <a id='L8639' name='L8639'></a> \edef\thisfootno{$^{\the\footnoteno}$}% <a id='L8640' name='L8640'></a> % <a id='L8641' name='L8641'></a> % In case the footnote comes at the end of a sentence, preserve the <a id='L8642' name='L8642'></a> % extra spacing after we do the footnote number. <a id='L8643' name='L8643'></a> \let\@sf\empty <a id='L8644' name='L8644'></a> \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi <a id='L8645' name='L8645'></a> % <a id='L8646' name='L8646'></a> % Remove inadvertent blank space before typesetting the footnote number. <a id='L8647' name='L8647'></a> \unskip <a id='L8648' name='L8648'></a> \thisfootno\@sf <a id='L8649' name='L8649'></a> \dofootnote <a id='L8650' name='L8650'></a>}% <a id='L8651' name='L8651'></a> <a id='L8652' name='L8652'></a>% Don't bother with the trickery in plain.tex to not require the <a id='L8653' name='L8653'></a>% footnote text as a parameter. Our footnotes don't need to be so general. <a id='L8654' name='L8654'></a>% <a id='L8655' name='L8655'></a>% Oh yes, they do; otherwise, @ifset (and anything else that uses <a id='L8656' name='L8656'></a>% \parseargline) fails inside footnotes because the tokens are fixed when <a id='L8657' name='L8657'></a>% the footnote is read. --karl, 16nov96. <a id='L8658' name='L8658'></a>% <a id='L8659' name='L8659'></a>\gdef\dofootnote{% <a id='L8660' name='L8660'></a> \insert\footins\bgroup <a id='L8661' name='L8661'></a> % We want to typeset this text as a normal paragraph, even if the <a id='L8662' name='L8662'></a> % footnote reference occurs in (for example) a display environment. <a id='L8663' name='L8663'></a> % So reset some parameters. <a id='L8664' name='L8664'></a> \hsize=\pagewidth <a id='L8665' name='L8665'></a> \interlinepenalty\interfootnotelinepenalty <a id='L8666' name='L8666'></a> \splittopskip\ht\strutbox % top baseline for broken footnotes <a id='L8667' name='L8667'></a> \splitmaxdepth\dp\strutbox <a id='L8668' name='L8668'></a> \floatingpenalty\@MM <a id='L8669' name='L8669'></a> \leftskip\z@skip <a id='L8670' name='L8670'></a> \rightskip\z@skip <a id='L8671' name='L8671'></a> \spaceskip\z@skip <a id='L8672' name='L8672'></a> \xspaceskip\z@skip <a id='L8673' name='L8673'></a> \parindent\defaultparindent <a id='L8674' name='L8674'></a> % <a id='L8675' name='L8675'></a> \smallfonts \rm <a id='L8676' name='L8676'></a> % <a id='L8677' name='L8677'></a> % Because we use hanging indentation in footnotes, a @noindent appears <a id='L8678' name='L8678'></a> % to exdent this text, so make it be a no-op. makeinfo does not use <a id='L8679' name='L8679'></a> % hanging indentation so @noindent can still be needed within footnote <a id='L8680' name='L8680'></a> % text after an @example or the like (not that this is good style). <a id='L8681' name='L8681'></a> \let\noindent = \relax <a id='L8682' name='L8682'></a> % <a id='L8683' name='L8683'></a> % Hang the footnote text off the number. Use \everypar in case the <a id='L8684' name='L8684'></a> % footnote extends for more than one paragraph. <a id='L8685' name='L8685'></a> \everypar = {\hang}% <a id='L8686' name='L8686'></a> \textindent{\thisfootno}% <a id='L8687' name='L8687'></a> % <a id='L8688' name='L8688'></a> % Don't crash into the line above the footnote text. Since this <a id='L8689' name='L8689'></a> % expands into a box, it must come within the paragraph, lest it <a id='L8690' name='L8690'></a> % provide a place where TeX can split the footnote. <a id='L8691' name='L8691'></a> \footstrut <a id='L8692' name='L8692'></a> % <a id='L8693' name='L8693'></a> % Invoke rest of plain TeX footnote routine. <a id='L8694' name='L8694'></a> \futurelet\next\fo@t <a id='L8695' name='L8695'></a>} <a id='L8696' name='L8696'></a>}%end \catcode `\@=11 <a id='L8697' name='L8697'></a> <a id='L8698' name='L8698'></a>% In case a @footnote appears in a vbox, save the footnote text and create <a id='L8699' name='L8699'></a>% the real \insert just after the vbox finished. Otherwise, the insertion <a id='L8700' name='L8700'></a>% would be lost. <a id='L8701' name='L8701'></a>% Similarly, if a @footnote appears inside an alignment, save the footnote <a id='L8702' name='L8702'></a>% text to a box and make the \insert when a row of the table is finished. <a id='L8703' name='L8703'></a>% And the same can be done for other insert classes. --kasal, 16nov03. <a id='L8704' name='L8704'></a> <a id='L8705' name='L8705'></a>% Replace the \insert primitive by a cheating macro. <a id='L8706' name='L8706'></a>% Deeper inside, just make sure that the saved insertions are not spilled <a id='L8707' name='L8707'></a>% out prematurely. <a id='L8708' name='L8708'></a>% <a id='L8709' name='L8709'></a>\def\startsavinginserts{% <a id='L8710' name='L8710'></a> \ifx \insert\ptexinsert <a id='L8711' name='L8711'></a> \let\insert\saveinsert <a id='L8712' name='L8712'></a> \else <a id='L8713' name='L8713'></a> \let\checkinserts\relax <a id='L8714' name='L8714'></a> \fi <a id='L8715' name='L8715'></a>} <a id='L8716' name='L8716'></a> <a id='L8717' name='L8717'></a>% This \insert replacement works for both \insert\footins{foo} and <a id='L8718' name='L8718'></a>% \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}. <a id='L8719' name='L8719'></a>% <a id='L8720' name='L8720'></a>\def\saveinsert#1{% <a id='L8721' name='L8721'></a> \edef\next{\noexpand\savetobox \makeSAVEname#1}% <a id='L8722' name='L8722'></a> \afterassignment\next <a id='L8723' name='L8723'></a> % swallow the left brace <a id='L8724' name='L8724'></a> \let\temp = <a id='L8725' name='L8725'></a>} <a id='L8726' name='L8726'></a>\def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}} <a id='L8727' name='L8727'></a>\def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1} <a id='L8728' name='L8728'></a> <a id='L8729' name='L8729'></a>\def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi} <a id='L8730' name='L8730'></a> <a id='L8731' name='L8731'></a>\def\placesaveins#1{% <a id='L8732' name='L8732'></a> \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname <a id='L8733' name='L8733'></a> {\box#1}% <a id='L8734' name='L8734'></a>} <a id='L8735' name='L8735'></a> <a id='L8736' name='L8736'></a>% eat @SAVE -- beware, all of them have catcode \other: <a id='L8737' name='L8737'></a>{ <a id='L8738' name='L8738'></a> \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-) <a id='L8739' name='L8739'></a> \gdef\gobblesave @SAVE{} <a id='L8740' name='L8740'></a>} <a id='L8741' name='L8741'></a> <a id='L8742' name='L8742'></a>% initialization: <a id='L8743' name='L8743'></a>\def\newsaveins #1{% <a id='L8744' name='L8744'></a> \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}% <a id='L8745' name='L8745'></a> \next <a id='L8746' name='L8746'></a>} <a id='L8747' name='L8747'></a>\def\newsaveinsX #1{% <a id='L8748' name='L8748'></a> \csname newbox\endcsname #1% <a id='L8749' name='L8749'></a> \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts <a id='L8750' name='L8750'></a> \checksaveins #1}% <a id='L8751' name='L8751'></a>} <a id='L8752' name='L8752'></a> <a id='L8753' name='L8753'></a>% initialize: <a id='L8754' name='L8754'></a>\let\checkinserts\empty <a id='L8755' name='L8755'></a>\newsaveins\footins <a id='L8756' name='L8756'></a>\newsaveins\margin <a id='L8757' name='L8757'></a> <a id='L8758' name='L8758'></a> <a id='L8759' name='L8759'></a>% @image. We use the macros from epsf.tex to support this. <a id='L8760' name='L8760'></a>% If epsf.tex is not installed and @image is used, we complain. <a id='L8761' name='L8761'></a>% <a id='L8762' name='L8762'></a>% Check for and read epsf.tex up front. If we read it only at @image <a id='L8763' name='L8763'></a>% time, we might be inside a group, and then its definitions would get <a id='L8764' name='L8764'></a>% undone and the next image would fail. <a id='L8765' name='L8765'></a>\openin 1 = epsf.tex <a id='L8766' name='L8766'></a>\ifeof 1 \else <a id='L8767' name='L8767'></a> % Do not bother showing banner with epsf.tex v2.7k (available in <a id='L8768' name='L8768'></a> % doc/epsf.tex and on ctan). <a id='L8769' name='L8769'></a> \def\epsfannounce{\toks0 = }% <a id='L8770' name='L8770'></a> \input epsf.tex <a id='L8771' name='L8771'></a>\fi <a id='L8772' name='L8772'></a>\closein 1 <a id='L8773' name='L8773'></a>% <a id='L8774' name='L8774'></a>% We will only complain once about lack of epsf.tex. <a id='L8775' name='L8775'></a>\newif\ifwarnednoepsf <a id='L8776' name='L8776'></a>\newhelp\noepsfhelp{epsf.tex must be installed for images to <a id='L8777' name='L8777'></a> work. It is also included in the Texinfo distribution, or you can get <a id='L8778' name='L8778'></a> it from ftp://tug.org/tex/epsf.tex.} <a id='L8779' name='L8779'></a>% <a id='L8780' name='L8780'></a>\def\image#1{% <a id='L8781' name='L8781'></a> \ifx\epsfbox\thisisundefined <a id='L8782' name='L8782'></a> \ifwarnednoepsf \else <a id='L8783' name='L8783'></a> \errhelp = \noepsfhelp <a id='L8784' name='L8784'></a> \errmessage{epsf.tex not found, images will be ignored}% <a id='L8785' name='L8785'></a> \global\warnednoepsftrue <a id='L8786' name='L8786'></a> \fi <a id='L8787' name='L8787'></a> \else <a id='L8788' name='L8788'></a> \imagexxx #1,,,,,\finish <a id='L8789' name='L8789'></a> \fi <a id='L8790' name='L8790'></a>} <a id='L8791' name='L8791'></a>% <a id='L8792' name='L8792'></a>% Arguments to @image: <a id='L8793' name='L8793'></a>% #1 is (mandatory) image filename; we tack on .eps extension. <a id='L8794' name='L8794'></a>% #2 is (optional) width, #3 is (optional) height. <a id='L8795' name='L8795'></a>% #4 is (ignored optional) html alt text. <a id='L8796' name='L8796'></a>% #5 is (ignored optional) extension. <a id='L8797' name='L8797'></a>% #6 is just the usual extra ignored arg for parsing stuff. <a id='L8798' name='L8798'></a>\newif\ifimagevmode <a id='L8799' name='L8799'></a>\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup <a id='L8800' name='L8800'></a> \catcode`\^^M = 5 % in case we're inside an example <a id='L8801' name='L8801'></a> \normalturnoffactive % allow _ et al. in names <a id='L8802' name='L8802'></a> % If the image is by itself, center it. <a id='L8803' name='L8803'></a> \ifvmode <a id='L8804' name='L8804'></a> \imagevmodetrue <a id='L8805' name='L8805'></a> \else \ifx\centersub\centerV <a id='L8806' name='L8806'></a> % for @center @image, we need a vbox so we can have our vertical space <a id='L8807' name='L8807'></a> \imagevmodetrue <a id='L8808' name='L8808'></a> \vbox\bgroup % vbox has better behavior than vtop herev <a id='L8809' name='L8809'></a> \fi\fi <a id='L8810' name='L8810'></a> % <a id='L8811' name='L8811'></a> \ifimagevmode <a id='L8812' name='L8812'></a> \nobreak\medskip <a id='L8813' name='L8813'></a> % Usually we'll have text after the image which will insert <a id='L8814' name='L8814'></a> % \parskip glue, so insert it here too to equalize the space <a id='L8815' name='L8815'></a> % above and below. <a id='L8816' name='L8816'></a> \nobreak\vskip\parskip <a id='L8817' name='L8817'></a> \nobreak <a id='L8818' name='L8818'></a> \fi <a id='L8819' name='L8819'></a> % <a id='L8820' name='L8820'></a> % Leave vertical mode so that indentation from an enclosing <a id='L8821' name='L8821'></a> % environment such as @quotation is respected. <a id='L8822' name='L8822'></a> % However, if we're at the top level, we don't want the <a id='L8823' name='L8823'></a> % normal paragraph indentation. <a id='L8824' name='L8824'></a> % On the other hand, if we are in the case of @center @image, we don't <a id='L8825' name='L8825'></a> % want to start a paragraph, which will create a hsize-width box and <a id='L8826' name='L8826'></a> % eradicate the centering. <a id='L8827' name='L8827'></a> \ifx\centersub\centerV\else \noindent \fi <a id='L8828' name='L8828'></a> % <a id='L8829' name='L8829'></a> % Output the image. <a id='L8830' name='L8830'></a> \ifpdf <a id='L8831' name='L8831'></a> \dopdfimage{#1}{#2}{#3}% <a id='L8832' name='L8832'></a> \else <a id='L8833' name='L8833'></a> % \epsfbox itself resets \epsf?size at each figure. <a id='L8834' name='L8834'></a> \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi <a id='L8835' name='L8835'></a> \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi <a id='L8836' name='L8836'></a> \epsfbox{#1.eps}% <a id='L8837' name='L8837'></a> \fi <a id='L8838' name='L8838'></a> % <a id='L8839' name='L8839'></a> \ifimagevmode <a id='L8840' name='L8840'></a> \medskip % space after a standalone image <a id='L8841' name='L8841'></a> \fi <a id='L8842' name='L8842'></a> \ifx\centersub\centerV \egroup \fi <a id='L8843' name='L8843'></a>\endgroup} <a id='L8844' name='L8844'></a> <a id='L8845' name='L8845'></a> <a id='L8846' name='L8846'></a>% @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables, <a id='L8847' name='L8847'></a>% etc. We don't actually implement floating yet, we always include the <a id='L8848' name='L8848'></a>% float "here". But it seemed the best name for the future. <a id='L8849' name='L8849'></a>% <a id='L8850' name='L8850'></a>\envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish} <a id='L8851' name='L8851'></a> <a id='L8852' name='L8852'></a>% There may be a space before second and/or third parameter; delete it. <a id='L8853' name='L8853'></a>\def\eatcommaspace#1, {#1,} <a id='L8854' name='L8854'></a> <a id='L8855' name='L8855'></a>% #1 is the optional FLOATTYPE, the text label for this float, typically <a id='L8856' name='L8856'></a>% "Figure", "Table", "Example", etc. Can't contain commas. If omitted, <a id='L8857' name='L8857'></a>% this float will not be numbered and cannot be referred to. <a id='L8858' name='L8858'></a>% <a id='L8859' name='L8859'></a>% #2 is the optional xref label. Also must be present for the float to <a id='L8860' name='L8860'></a>% be referable. <a id='L8861' name='L8861'></a>% <a id='L8862' name='L8862'></a>% #3 is the optional positioning argument; for now, it is ignored. It <a id='L8863' name='L8863'></a>% will somehow specify the positions allowed to float to (here, top, bottom). <a id='L8864' name='L8864'></a>% <a id='L8865' name='L8865'></a>% We keep a separate counter for each FLOATTYPE, which we reset at each <a id='L8866' name='L8866'></a>% chapter-level command. <a id='L8867' name='L8867'></a>\let\resetallfloatnos=\empty <a id='L8868' name='L8868'></a>% <a id='L8869' name='L8869'></a>\def\dofloat#1,#2,#3,#4\finish{% <a id='L8870' name='L8870'></a> \let\thiscaption=\empty <a id='L8871' name='L8871'></a> \let\thisshortcaption=\empty <a id='L8872' name='L8872'></a> % <a id='L8873' name='L8873'></a> % don't lose footnotes inside @float. <a id='L8874' name='L8874'></a> % <a id='L8875' name='L8875'></a> % BEWARE: when the floats start float, we have to issue warning whenever an <a id='L8876' name='L8876'></a> % insert appears inside a float which could possibly float. --kasal, 26may04 <a id='L8877' name='L8877'></a> % <a id='L8878' name='L8878'></a> \startsavinginserts <a id='L8879' name='L8879'></a> % <a id='L8880' name='L8880'></a> % We can't be used inside a paragraph. <a id='L8881' name='L8881'></a> \par <a id='L8882' name='L8882'></a> % <a id='L8883' name='L8883'></a> \vtop\bgroup <a id='L8884' name='L8884'></a> \def\floattype{#1}% <a id='L8885' name='L8885'></a> \def\floatlabel{#2}% <a id='L8886' name='L8886'></a> \def\floatloc{#3}% we do nothing with this yet. <a id='L8887' name='L8887'></a> % <a id='L8888' name='L8888'></a> \ifx\floattype\empty <a id='L8889' name='L8889'></a> \let\safefloattype=\empty <a id='L8890' name='L8890'></a> \else <a id='L8891' name='L8891'></a> {% <a id='L8892' name='L8892'></a> % the floattype might have accents or other special characters, <a id='L8893' name='L8893'></a> % but we need to use it in a control sequence name. <a id='L8894' name='L8894'></a> \indexnofonts <a id='L8895' name='L8895'></a> \turnoffactive <a id='L8896' name='L8896'></a> \xdef\safefloattype{\floattype}% <a id='L8897' name='L8897'></a> }% <a id='L8898' name='L8898'></a> \fi <a id='L8899' name='L8899'></a> % <a id='L8900' name='L8900'></a> % If label is given but no type, we handle that as the empty type. <a id='L8901' name='L8901'></a> \ifx\floatlabel\empty \else <a id='L8902' name='L8902'></a> % We want each FLOATTYPE to be numbered separately (Figure 1, <a id='L8903' name='L8903'></a> % Table 1, Figure 2, ...). (And if no label, no number.) <a id='L8904' name='L8904'></a> % <a id='L8905' name='L8905'></a> \expandafter\getfloatno\csname\safefloattype floatno\endcsname <a id='L8906' name='L8906'></a> \global\advance\floatno by 1 <a id='L8907' name='L8907'></a> % <a id='L8908' name='L8908'></a> {% <a id='L8909' name='L8909'></a> % This magic value for \lastsection is output by \setref as the <a id='L8910' name='L8910'></a> % XREFLABEL-title value. \xrefX uses it to distinguish float <a id='L8911' name='L8911'></a> % labels (which have a completely different output format) from <a id='L8912' name='L8912'></a> % node and anchor labels. And \xrdef uses it to construct the <a id='L8913' name='L8913'></a> % lists of floats. <a id='L8914' name='L8914'></a> % <a id='L8915' name='L8915'></a> \edef\lastsection{\floatmagic=\safefloattype}% <a id='L8916' name='L8916'></a> \setref{\floatlabel}{Yfloat}% <a id='L8917' name='L8917'></a> }% <a id='L8918' name='L8918'></a> \fi <a id='L8919' name='L8919'></a> % <a id='L8920' name='L8920'></a> % start with \parskip glue, I guess. <a id='L8921' name='L8921'></a> \vskip\parskip <a id='L8922' name='L8922'></a> % <a id='L8923' name='L8923'></a> % Don't suppress indentation if a float happens to start a section. <a id='L8924' name='L8924'></a> \restorefirstparagraphindent <a id='L8925' name='L8925'></a>} <a id='L8926' name='L8926'></a> <a id='L8927' name='L8927'></a>% we have these possibilities: <a id='L8928' name='L8928'></a>% @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap <a id='L8929' name='L8929'></a>% @float Foo,lbl & no caption: Foo 1.1 <a id='L8930' name='L8930'></a>% @float Foo & @caption{Cap}: Foo: Cap <a id='L8931' name='L8931'></a>% @float Foo & no caption: Foo <a id='L8932' name='L8932'></a>% @float ,lbl & Caption{Cap}: 1.1: Cap <a id='L8933' name='L8933'></a>% @float ,lbl & no caption: 1.1 <a id='L8934' name='L8934'></a>% @float & @caption{Cap}: Cap <a id='L8935' name='L8935'></a>% @float & no caption: <a id='L8936' name='L8936'></a>% <a id='L8937' name='L8937'></a>\def\Efloat{% <a id='L8938' name='L8938'></a> \let\floatident = \empty <a id='L8939' name='L8939'></a> % <a id='L8940' name='L8940'></a> % In all cases, if we have a float type, it comes first. <a id='L8941' name='L8941'></a> \ifx\floattype\empty \else \def\floatident{\floattype}\fi <a id='L8942' name='L8942'></a> % <a id='L8943' name='L8943'></a> % If we have an xref label, the number comes next. <a id='L8944' name='L8944'></a> \ifx\floatlabel\empty \else <a id='L8945' name='L8945'></a> \ifx\floattype\empty \else % if also had float type, need tie first. <a id='L8946' name='L8946'></a> \appendtomacro\floatident{\tie}% <a id='L8947' name='L8947'></a> \fi <a id='L8948' name='L8948'></a> % the number. <a id='L8949' name='L8949'></a> \appendtomacro\floatident{\chaplevelprefix\the\floatno}% <a id='L8950' name='L8950'></a> \fi <a id='L8951' name='L8951'></a> % <a id='L8952' name='L8952'></a> % Start the printed caption with what we've constructed in <a id='L8953' name='L8953'></a> % \floatident, but keep it separate; we need \floatident again. <a id='L8954' name='L8954'></a> \let\captionline = \floatident <a id='L8955' name='L8955'></a> % <a id='L8956' name='L8956'></a> \ifx\thiscaption\empty \else <a id='L8957' name='L8957'></a> \ifx\floatident\empty \else <a id='L8958' name='L8958'></a> \appendtomacro\captionline{: }% had ident, so need a colon between <a id='L8959' name='L8959'></a> \fi <a id='L8960' name='L8960'></a> % <a id='L8961' name='L8961'></a> % caption text. <a id='L8962' name='L8962'></a> \appendtomacro\captionline{\scanexp\thiscaption}% <a id='L8963' name='L8963'></a> \fi <a id='L8964' name='L8964'></a> % <a id='L8965' name='L8965'></a> % If we have anything to print, print it, with space before. <a id='L8966' name='L8966'></a> % Eventually this needs to become an \insert. <a id='L8967' name='L8967'></a> \ifx\captionline\empty \else <a id='L8968' name='L8968'></a> \vskip.5\parskip <a id='L8969' name='L8969'></a> \captionline <a id='L8970' name='L8970'></a> % <a id='L8971' name='L8971'></a> % Space below caption. <a id='L8972' name='L8972'></a> \vskip\parskip <a id='L8973' name='L8973'></a> \fi <a id='L8974' name='L8974'></a> % <a id='L8975' name='L8975'></a> % If have an xref label, write the list of floats info. Do this <a id='L8976' name='L8976'></a> % after the caption, to avoid chance of it being a breakpoint. <a id='L8977' name='L8977'></a> \ifx\floatlabel\empty \else <a id='L8978' name='L8978'></a> % Write the text that goes in the lof to the aux file as <a id='L8979' name='L8979'></a> % \floatlabel-lof. Besides \floatident, we include the short <a id='L8980' name='L8980'></a> % caption if specified, else the full caption if specified, else nothing. <a id='L8981' name='L8981'></a> {% <a id='L8982' name='L8982'></a> \atdummies <a id='L8983' name='L8983'></a> % <a id='L8984' name='L8984'></a> % since we read the caption text in the macro world, where ^^M <a id='L8985' name='L8985'></a> % is turned into a normal character, we have to scan it back, so <a id='L8986' name='L8986'></a> % we don't write the literal three characters "^^M" into the aux file. <a id='L8987' name='L8987'></a> \scanexp{% <a id='L8988' name='L8988'></a> \xdef\noexpand\gtemp{% <a id='L8989' name='L8989'></a> \ifx\thisshortcaption\empty <a id='L8990' name='L8990'></a> \thiscaption <a id='L8991' name='L8991'></a> \else <a id='L8992' name='L8992'></a> \thisshortcaption <a id='L8993' name='L8993'></a> \fi <a id='L8994' name='L8994'></a> }% <a id='L8995' name='L8995'></a> }% <a id='L8996' name='L8996'></a> \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident <a id='L8997' name='L8997'></a> \ifx\gtemp\empty \else : \gtemp \fi}}% <a id='L8998' name='L8998'></a> }% <a id='L8999' name='L8999'></a> \fi <a id='L9000' name='L9000'></a> \egroup % end of \vtop <a id='L9001' name='L9001'></a> % <a id='L9002' name='L9002'></a> % place the captured inserts <a id='L9003' name='L9003'></a> % <a id='L9004' name='L9004'></a> % BEWARE: when the floats start floating, we have to issue warning <a id='L9005' name='L9005'></a> % whenever an insert appears inside a float which could possibly <a id='L9006' name='L9006'></a> % float. --kasal, 26may04 <a id='L9007' name='L9007'></a> % <a id='L9008' name='L9008'></a> \checkinserts <a id='L9009' name='L9009'></a>} <a id='L9010' name='L9010'></a> <a id='L9011' name='L9011'></a>% Append the tokens #2 to the definition of macro #1, not expanding either. <a id='L9012' name='L9012'></a>% <a id='L9013' name='L9013'></a>\def\appendtomacro#1#2{% <a id='L9014' name='L9014'></a> \expandafter\def\expandafter#1\expandafter{#1#2}% <a id='L9015' name='L9015'></a>} <a id='L9016' name='L9016'></a> <a id='L9017' name='L9017'></a>% @caption, @shortcaption <a id='L9018' name='L9018'></a>% <a id='L9019' name='L9019'></a>\def\caption{\docaption\thiscaption} <a id='L9020' name='L9020'></a>\def\shortcaption{\docaption\thisshortcaption} <a id='L9021' name='L9021'></a>\def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption} <a id='L9022' name='L9022'></a>\def\defcaption#1#2{\egroup \def#1{#2}} <a id='L9023' name='L9023'></a> <a id='L9024' name='L9024'></a>% The parameter is the control sequence identifying the counter we are <a id='L9025' name='L9025'></a>% going to use. Create it if it doesn't exist and assign it to \floatno. <a id='L9026' name='L9026'></a>\def\getfloatno#1{% <a id='L9027' name='L9027'></a> \ifx#1\relax <a id='L9028' name='L9028'></a> % Haven't seen this figure type before. <a id='L9029' name='L9029'></a> \csname newcount\endcsname #1% <a id='L9030' name='L9030'></a> % <a id='L9031' name='L9031'></a> % Remember to reset this floatno at the next chap. <a id='L9032' name='L9032'></a> \expandafter\gdef\expandafter\resetallfloatnos <a id='L9033' name='L9033'></a> \expandafter{\resetallfloatnos #1=0 }% <a id='L9034' name='L9034'></a> \fi <a id='L9035' name='L9035'></a> \let\floatno#1% <a id='L9036' name='L9036'></a>} <a id='L9037' name='L9037'></a> <a id='L9038' name='L9038'></a>% \setref calls this to get the XREFLABEL-snt value. We want an @xref <a id='L9039' name='L9039'></a>% to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we <a id='L9040' name='L9040'></a>% first read the @float command. <a id='L9041' name='L9041'></a>% <a id='L9042' name='L9042'></a>\def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}% <a id='L9043' name='L9043'></a> <a id='L9044' name='L9044'></a>% Magic string used for the XREFLABEL-title value, so \xrefX can <a id='L9045' name='L9045'></a>% distinguish floats from other xref types. <a id='L9046' name='L9046'></a>\def\floatmagic{!!float!!} <a id='L9047' name='L9047'></a> <a id='L9048' name='L9048'></a>% #1 is the control sequence we are passed; we expand into a conditional <a id='L9049' name='L9049'></a>% which is true if #1 represents a float ref. That is, the magic <a id='L9050' name='L9050'></a>% \lastsection value which we \setref above. <a id='L9051' name='L9051'></a>% <a id='L9052' name='L9052'></a>\def\iffloat#1{\expandafter\doiffloat#1==\finish} <a id='L9053' name='L9053'></a>% <a id='L9054' name='L9054'></a>% #1 is (maybe) the \floatmagic string. If so, #2 will be the <a id='L9055' name='L9055'></a>% (safe) float type for this float. We set \iffloattype to #2. <a id='L9056' name='L9056'></a>% <a id='L9057' name='L9057'></a>\def\doiffloat#1=#2=#3\finish{% <a id='L9058' name='L9058'></a> \def\temp{#1}% <a id='L9059' name='L9059'></a> \def\iffloattype{#2}% <a id='L9060' name='L9060'></a> \ifx\temp\floatmagic <a id='L9061' name='L9061'></a>} <a id='L9062' name='L9062'></a> <a id='L9063' name='L9063'></a>% @listoffloats FLOATTYPE - print a list of floats like a table of contents. <a id='L9064' name='L9064'></a>% <a id='L9065' name='L9065'></a>\parseargdef\listoffloats{% <a id='L9066' name='L9066'></a> \def\floattype{#1}% floattype <a id='L9067' name='L9067'></a> {% <a id='L9068' name='L9068'></a> % the floattype might have accents or other special characters, <a id='L9069' name='L9069'></a> % but we need to use it in a control sequence name. <a id='L9070' name='L9070'></a> \indexnofonts <a id='L9071' name='L9071'></a> \turnoffactive <a id='L9072' name='L9072'></a> \xdef\safefloattype{\floattype}% <a id='L9073' name='L9073'></a> }% <a id='L9074' name='L9074'></a> % <a id='L9075' name='L9075'></a> % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE. <a id='L9076' name='L9076'></a> \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax <a id='L9077' name='L9077'></a> \ifhavexrefs <a id='L9078' name='L9078'></a> % if the user said @listoffloats foo but never @float foo. <a id='L9079' name='L9079'></a> \message{\linenumber No `\safefloattype' floats to list.}% <a id='L9080' name='L9080'></a> \fi <a id='L9081' name='L9081'></a> \else <a id='L9082' name='L9082'></a> \begingroup <a id='L9083' name='L9083'></a> \leftskip=\tocindent % indent these entries like a toc <a id='L9084' name='L9084'></a> \let\do=\listoffloatsdo <a id='L9085' name='L9085'></a> \csname floatlist\safefloattype\endcsname <a id='L9086' name='L9086'></a> \endgroup <a id='L9087' name='L9087'></a> \fi <a id='L9088' name='L9088'></a>} <a id='L9089' name='L9089'></a> <a id='L9090' name='L9090'></a>% This is called on each entry in a list of floats. We're passed the <a id='L9091' name='L9091'></a>% xref label, in the form LABEL-title, which is how we save it in the <a id='L9092' name='L9092'></a>% aux file. We strip off the -title and look up \XRLABEL-lof, which <a id='L9093' name='L9093'></a>% has the text we're supposed to typeset here. <a id='L9094' name='L9094'></a>% <a id='L9095' name='L9095'></a>% Figures without xref labels will not be included in the list (since <a id='L9096' name='L9096'></a>% they won't appear in the aux file). <a id='L9097' name='L9097'></a>% <a id='L9098' name='L9098'></a>\def\listoffloatsdo#1{\listoffloatsdoentry#1\finish} <a id='L9099' name='L9099'></a>\def\listoffloatsdoentry#1-title\finish{{% <a id='L9100' name='L9100'></a> % Can't fully expand XR#1-lof because it can contain anything. Just <a id='L9101' name='L9101'></a> % pass the control sequence. On the other hand, XR#1-pg is just the <a id='L9102' name='L9102'></a> % page number, and we want to fully expand that so we can get a link <a id='L9103' name='L9103'></a> % in pdf output. <a id='L9104' name='L9104'></a> \toksA = \expandafter{\csname XR#1-lof\endcsname}% <a id='L9105' name='L9105'></a> % <a id='L9106' name='L9106'></a> % use the same \entry macro we use to generate the TOC and index. <a id='L9107' name='L9107'></a> \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}% <a id='L9108' name='L9108'></a> \writeentry <a id='L9109' name='L9109'></a>}} <a id='L9110' name='L9110'></a> <a id='L9111' name='L9111'></a> <a id='L9112' name='L9112'></a>\message{localization,} <a id='L9113' name='L9113'></a> <a id='L9114' name='L9114'></a>% For single-language documents, @documentlanguage is usually given very <a id='L9115' name='L9115'></a>% early, just after @documentencoding. Single argument is the language <a id='L9116' name='L9116'></a>% (de) or locale (de_DE) abbreviation. <a id='L9117' name='L9117'></a>% <a id='L9118' name='L9118'></a>{ <a id='L9119' name='L9119'></a> \catcode`\_ = \active <a id='L9120' name='L9120'></a> \globaldefs=1 <a id='L9121' name='L9121'></a>\parseargdef\documentlanguage{\begingroup <a id='L9122' name='L9122'></a> \let_=\normalunderscore % normal _ character for filenames <a id='L9123' name='L9123'></a> \tex % read txi-??.tex file in plain TeX. <a id='L9124' name='L9124'></a> % Read the file by the name they passed if it exists. <a id='L9125' name='L9125'></a> \openin 1 txi-#1.tex <a id='L9126' name='L9126'></a> \ifeof 1 <a id='L9127' name='L9127'></a> \documentlanguagetrywithoutunderscore{#1_\finish}% <a id='L9128' name='L9128'></a> \else <a id='L9129' name='L9129'></a> \globaldefs = 1 % everything in the txi-LL files needs to persist <a id='L9130' name='L9130'></a> \input txi-#1.tex <a id='L9131' name='L9131'></a> \fi <a id='L9132' name='L9132'></a> \closein 1 <a id='L9133' name='L9133'></a> \endgroup % end raw TeX <a id='L9134' name='L9134'></a>\endgroup} <a id='L9135' name='L9135'></a>% <a id='L9136' name='L9136'></a>% If they passed de_DE, and txi-de_DE.tex doesn't exist, <a id='L9137' name='L9137'></a>% try txi-de.tex. <a id='L9138' name='L9138'></a>% <a id='L9139' name='L9139'></a>\gdef\documentlanguagetrywithoutunderscore#1_#2\finish{% <a id='L9140' name='L9140'></a> \openin 1 txi-#1.tex <a id='L9141' name='L9141'></a> \ifeof 1 <a id='L9142' name='L9142'></a> \errhelp = \nolanghelp <a id='L9143' name='L9143'></a> \errmessage{Cannot read language file txi-#1.tex}% <a id='L9144' name='L9144'></a> \else <a id='L9145' name='L9145'></a> \globaldefs = 1 % everything in the txi-LL files needs to persist <a id='L9146' name='L9146'></a> \input txi-#1.tex <a id='L9147' name='L9147'></a> \fi <a id='L9148' name='L9148'></a> \closein 1 <a id='L9149' name='L9149'></a>} <a id='L9150' name='L9150'></a>}% end of special _ catcode <a id='L9151' name='L9151'></a>% <a id='L9152' name='L9152'></a>\newhelp\nolanghelp{The given language definition file cannot be found or <a id='L9153' name='L9153'></a>is empty. Maybe you need to install it? Putting it in the current <a id='L9154' name='L9154'></a>directory should work if nowhere else does.} <a id='L9155' name='L9155'></a> <a id='L9156' name='L9156'></a>% This macro is called from txi-??.tex files; the first argument is the <a id='L9157' name='L9157'></a>% \language name to set (without the "\lang@" prefix), the second and <a id='L9158' name='L9158'></a>% third args are \{left,right}hyphenmin. <a id='L9159' name='L9159'></a>% <a id='L9160' name='L9160'></a>% The language names to pass are determined when the format is built. <a id='L9161' name='L9161'></a>% See the etex.log file created at that time, e.g., <a id='L9162' name='L9162'></a>% /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log. <a id='L9163' name='L9163'></a>% <a id='L9164' name='L9164'></a>% With TeX Live 2008, etex now includes hyphenation patterns for all <a id='L9165' name='L9165'></a>% available languages. This means we can support hyphenation in <a id='L9166' name='L9166'></a>% Texinfo, at least to some extent. (This still doesn't solve the <a id='L9167' name='L9167'></a>% accented characters problem.) <a id='L9168' name='L9168'></a>% <a id='L9169' name='L9169'></a>\catcode`@=11 <a id='L9170' name='L9170'></a>\def\txisetlanguage#1#2#3{% <a id='L9171' name='L9171'></a> % do not set the language if the name is undefined in the current TeX. <a id='L9172' name='L9172'></a> \expandafter\ifx\csname lang@#1\endcsname \relax <a id='L9173' name='L9173'></a> \message{no patterns for #1}% <a id='L9174' name='L9174'></a> \else <a id='L9175' name='L9175'></a> \global\language = \csname lang@#1\endcsname <a id='L9176' name='L9176'></a> \fi <a id='L9177' name='L9177'></a> % but there is no harm in adjusting the hyphenmin values regardless. <a id='L9178' name='L9178'></a> \global\lefthyphenmin = #2\relax <a id='L9179' name='L9179'></a> \global\righthyphenmin = #3\relax <a id='L9180' name='L9180'></a>} <a id='L9181' name='L9181'></a> <a id='L9182' name='L9182'></a>% Helpers for encodings. <a id='L9183' name='L9183'></a>% Set the catcode of characters 128 through 255 to the specified number. <a id='L9184' name='L9184'></a>% <a id='L9185' name='L9185'></a>\def\setnonasciicharscatcode#1{% <a id='L9186' name='L9186'></a> \count255=128 <a id='L9187' name='L9187'></a> \loop\ifnum\count255<256 <a id='L9188' name='L9188'></a> \global\catcode\count255=#1\relax <a id='L9189' name='L9189'></a> \advance\count255 by 1 <a id='L9190' name='L9190'></a> \repeat <a id='L9191' name='L9191'></a>} <a id='L9192' name='L9192'></a> <a id='L9193' name='L9193'></a>\def\setnonasciicharscatcodenonglobal#1{% <a id='L9194' name='L9194'></a> \count255=128 <a id='L9195' name='L9195'></a> \loop\ifnum\count255<256 <a id='L9196' name='L9196'></a> \catcode\count255=#1\relax <a id='L9197' name='L9197'></a> \advance\count255 by 1 <a id='L9198' name='L9198'></a> \repeat <a id='L9199' name='L9199'></a>} <a id='L9200' name='L9200'></a> <a id='L9201' name='L9201'></a>% @documentencoding sets the definition of non-ASCII characters <a id='L9202' name='L9202'></a>% according to the specified encoding. <a id='L9203' name='L9203'></a>% <a id='L9204' name='L9204'></a>\parseargdef\documentencoding{% <a id='L9205' name='L9205'></a> % Encoding being declared for the document. <a id='L9206' name='L9206'></a> \def\declaredencoding{\csname #1.enc\endcsname}% <a id='L9207' name='L9207'></a> % <a id='L9208' name='L9208'></a> % Supported encodings: names converted to tokens in order to be able <a id='L9209' name='L9209'></a> % to compare them with \ifx. <a id='L9210' name='L9210'></a> \def\ascii{\csname US-ASCII.enc\endcsname}% <a id='L9211' name='L9211'></a> \def\latnine{\csname ISO-8859-15.enc\endcsname}% <a id='L9212' name='L9212'></a> \def\latone{\csname ISO-8859-1.enc\endcsname}% <a id='L9213' name='L9213'></a> \def\lattwo{\csname ISO-8859-2.enc\endcsname}% <a id='L9214' name='L9214'></a> \def\utfeight{\csname UTF-8.enc\endcsname}% <a id='L9215' name='L9215'></a> % <a id='L9216' name='L9216'></a> \ifx \declaredencoding \ascii <a id='L9217' name='L9217'></a> \asciichardefs <a id='L9218' name='L9218'></a> % <a id='L9219' name='L9219'></a> \else \ifx \declaredencoding \lattwo <a id='L9220' name='L9220'></a> \setnonasciicharscatcode\active <a id='L9221' name='L9221'></a> \lattwochardefs <a id='L9222' name='L9222'></a> % <a id='L9223' name='L9223'></a> \else \ifx \declaredencoding \latone <a id='L9224' name='L9224'></a> \setnonasciicharscatcode\active <a id='L9225' name='L9225'></a> \latonechardefs <a id='L9226' name='L9226'></a> % <a id='L9227' name='L9227'></a> \else \ifx \declaredencoding \latnine <a id='L9228' name='L9228'></a> \setnonasciicharscatcode\active <a id='L9229' name='L9229'></a> \latninechardefs <a id='L9230' name='L9230'></a> % <a id='L9231' name='L9231'></a> \else \ifx \declaredencoding \utfeight <a id='L9232' name='L9232'></a> \setnonasciicharscatcode\active <a id='L9233' name='L9233'></a> \utfeightchardefs <a id='L9234' name='L9234'></a> % <a id='L9235' name='L9235'></a> \else <a id='L9236' name='L9236'></a> \message{Unknown document encoding #1, ignoring.}% <a id='L9237' name='L9237'></a> % <a id='L9238' name='L9238'></a> \fi % utfeight <a id='L9239' name='L9239'></a> \fi % latnine <a id='L9240' name='L9240'></a> \fi % latone <a id='L9241' name='L9241'></a> \fi % lattwo <a id='L9242' name='L9242'></a> \fi % ascii <a id='L9243' name='L9243'></a>} <a id='L9244' name='L9244'></a> <a id='L9245' name='L9245'></a>% A message to be logged when using a character that isn't available <a id='L9246' name='L9246'></a>% the default font encoding (OT1). <a id='L9247' name='L9247'></a>% <a id='L9248' name='L9248'></a>\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} <a id='L9249' name='L9249'></a> <a id='L9250' name='L9250'></a>% Take account of \c (plain) vs. \, (Texinfo) difference. <a id='L9251' name='L9251'></a>\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} <a id='L9252' name='L9252'></a> <a id='L9253' name='L9253'></a>% First, make active non-ASCII characters in order for them to be <a id='L9254' name='L9254'></a>% correctly categorized when TeX reads the replacement text of <a id='L9255' name='L9255'></a>% macros containing the character definitions. <a id='L9256' name='L9256'></a>\setnonasciicharscatcode\active <a id='L9257' name='L9257'></a>% <a id='L9258' name='L9258'></a>% Latin1 (ISO-8859-1) character definitions. <a id='L9259' name='L9259'></a>\def\latonechardefs{% <a id='L9260' name='L9260'></a> \gdef^^a0{\tie} <a id='L9261' name='L9261'></a> \gdef^^a1{\exclamdown} <a id='L9262' name='L9262'></a> \gdef^^a2{\missingcharmsg{CENT SIGN}} <a id='L9263' name='L9263'></a> \gdef^^a3{{\pounds}} <a id='L9264' name='L9264'></a> \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} <a id='L9265' name='L9265'></a> \gdef^^a5{\missingcharmsg{YEN SIGN}} <a id='L9266' name='L9266'></a> \gdef^^a6{\missingcharmsg{BROKEN BAR}} <a id='L9267' name='L9267'></a> \gdef^^a7{\S} <a id='L9268' name='L9268'></a> \gdef^^a8{\"{}} <a id='L9269' name='L9269'></a> \gdef^^a9{\copyright} <a id='L9270' name='L9270'></a> \gdef^^aa{\ordf} <a id='L9271' name='L9271'></a> \gdef^^ab{\guillemetleft} <a id='L9272' name='L9272'></a> \gdef^^ac{$\lnot$} <a id='L9273' name='L9273'></a> \gdef^^ad{\-} <a id='L9274' name='L9274'></a> \gdef^^ae{\registeredsymbol} <a id='L9275' name='L9275'></a> \gdef^^af{\={}} <a id='L9276' name='L9276'></a> % <a id='L9277' name='L9277'></a> \gdef^^b0{\textdegree} <a id='L9278' name='L9278'></a> \gdef^^b1{$\pm$} <a id='L9279' name='L9279'></a> \gdef^^b2{$^2$} <a id='L9280' name='L9280'></a> \gdef^^b3{$^3$} <a id='L9281' name='L9281'></a> \gdef^^b4{\'{}} <a id='L9282' name='L9282'></a> \gdef^^b5{$\mu$} <a id='L9283' name='L9283'></a> \gdef^^b6{\P} <a id='L9284' name='L9284'></a> % <a id='L9285' name='L9285'></a> \gdef^^b7{$^.$} <a id='L9286' name='L9286'></a> \gdef^^b8{\cedilla\ } <a id='L9287' name='L9287'></a> \gdef^^b9{$^1$} <a id='L9288' name='L9288'></a> \gdef^^ba{\ordm} <a id='L9289' name='L9289'></a> % <a id='L9290' name='L9290'></a> \gdef^^bb{\guillemetright} <a id='L9291' name='L9291'></a> \gdef^^bc{$1\over4$} <a id='L9292' name='L9292'></a> \gdef^^bd{$1\over2$} <a id='L9293' name='L9293'></a> \gdef^^be{$3\over4$} <a id='L9294' name='L9294'></a> \gdef^^bf{\questiondown} <a id='L9295' name='L9295'></a> % <a id='L9296' name='L9296'></a> \gdef^^c0{\`A} <a id='L9297' name='L9297'></a> \gdef^^c1{\'A} <a id='L9298' name='L9298'></a> \gdef^^c2{\^A} <a id='L9299' name='L9299'></a> \gdef^^c3{\~A} <a id='L9300' name='L9300'></a> \gdef^^c4{\"A} <a id='L9301' name='L9301'></a> \gdef^^c5{\ringaccent A} <a id='L9302' name='L9302'></a> \gdef^^c6{\AE} <a id='L9303' name='L9303'></a> \gdef^^c7{\cedilla C} <a id='L9304' name='L9304'></a> \gdef^^c8{\`E} <a id='L9305' name='L9305'></a> \gdef^^c9{\'E} <a id='L9306' name='L9306'></a> \gdef^^ca{\^E} <a id='L9307' name='L9307'></a> \gdef^^cb{\"E} <a id='L9308' name='L9308'></a> \gdef^^cc{\`I} <a id='L9309' name='L9309'></a> \gdef^^cd{\'I} <a id='L9310' name='L9310'></a> \gdef^^ce{\^I} <a id='L9311' name='L9311'></a> \gdef^^cf{\"I} <a id='L9312' name='L9312'></a> % <a id='L9313' name='L9313'></a> \gdef^^d0{\DH} <a id='L9314' name='L9314'></a> \gdef^^d1{\~N} <a id='L9315' name='L9315'></a> \gdef^^d2{\`O} <a id='L9316' name='L9316'></a> \gdef^^d3{\'O} <a id='L9317' name='L9317'></a> \gdef^^d4{\^O} <a id='L9318' name='L9318'></a> \gdef^^d5{\~O} <a id='L9319' name='L9319'></a> \gdef^^d6{\"O} <a id='L9320' name='L9320'></a> \gdef^^d7{$\times$} <a id='L9321' name='L9321'></a> \gdef^^d8{\O} <a id='L9322' name='L9322'></a> \gdef^^d9{\`U} <a id='L9323' name='L9323'></a> \gdef^^da{\'U} <a id='L9324' name='L9324'></a> \gdef^^db{\^U} <a id='L9325' name='L9325'></a> \gdef^^dc{\"U} <a id='L9326' name='L9326'></a> \gdef^^dd{\'Y} <a id='L9327' name='L9327'></a> \gdef^^de{\TH} <a id='L9328' name='L9328'></a> \gdef^^df{\ss} <a id='L9329' name='L9329'></a> % <a id='L9330' name='L9330'></a> \gdef^^e0{\`a} <a id='L9331' name='L9331'></a> \gdef^^e1{\'a} <a id='L9332' name='L9332'></a> \gdef^^e2{\^a} <a id='L9333' name='L9333'></a> \gdef^^e3{\~a} <a id='L9334' name='L9334'></a> \gdef^^e4{\"a} <a id='L9335' name='L9335'></a> \gdef^^e5{\ringaccent a} <a id='L9336' name='L9336'></a> \gdef^^e6{\ae} <a id='L9337' name='L9337'></a> \gdef^^e7{\cedilla c} <a id='L9338' name='L9338'></a> \gdef^^e8{\`e} <a id='L9339' name='L9339'></a> \gdef^^e9{\'e} <a id='L9340' name='L9340'></a> \gdef^^ea{\^e} <a id='L9341' name='L9341'></a> \gdef^^eb{\"e} <a id='L9342' name='L9342'></a> \gdef^^ec{\`{\dotless i}} <a id='L9343' name='L9343'></a> \gdef^^ed{\'{\dotless i}} <a id='L9344' name='L9344'></a> \gdef^^ee{\^{\dotless i}} <a id='L9345' name='L9345'></a> \gdef^^ef{\"{\dotless i}} <a id='L9346' name='L9346'></a> % <a id='L9347' name='L9347'></a> \gdef^^f0{\dh} <a id='L9348' name='L9348'></a> \gdef^^f1{\~n} <a id='L9349' name='L9349'></a> \gdef^^f2{\`o} <a id='L9350' name='L9350'></a> \gdef^^f3{\'o} <a id='L9351' name='L9351'></a> \gdef^^f4{\^o} <a id='L9352' name='L9352'></a> \gdef^^f5{\~o} <a id='L9353' name='L9353'></a> \gdef^^f6{\"o} <a id='L9354' name='L9354'></a> \gdef^^f7{$\div$} <a id='L9355' name='L9355'></a> \gdef^^f8{\o} <a id='L9356' name='L9356'></a> \gdef^^f9{\`u} <a id='L9357' name='L9357'></a> \gdef^^fa{\'u} <a id='L9358' name='L9358'></a> \gdef^^fb{\^u} <a id='L9359' name='L9359'></a> \gdef^^fc{\"u} <a id='L9360' name='L9360'></a> \gdef^^fd{\'y} <a id='L9361' name='L9361'></a> \gdef^^fe{\th} <a id='L9362' name='L9362'></a> \gdef^^ff{\"y} <a id='L9363' name='L9363'></a>} <a id='L9364' name='L9364'></a> <a id='L9365' name='L9365'></a>% Latin9 (ISO-8859-15) encoding character definitions. <a id='L9366' name='L9366'></a>\def\latninechardefs{% <a id='L9367' name='L9367'></a> % Encoding is almost identical to Latin1. <a id='L9368' name='L9368'></a> \latonechardefs <a id='L9369' name='L9369'></a> % <a id='L9370' name='L9370'></a> \gdef^^a4{\euro} <a id='L9371' name='L9371'></a> \gdef^^a6{\v S} <a id='L9372' name='L9372'></a> \gdef^^a8{\v s} <a id='L9373' name='L9373'></a> \gdef^^b4{\v Z} <a id='L9374' name='L9374'></a> \gdef^^b8{\v z} <a id='L9375' name='L9375'></a> \gdef^^bc{\OE} <a id='L9376' name='L9376'></a> \gdef^^bd{\oe} <a id='L9377' name='L9377'></a> \gdef^^be{\"Y} <a id='L9378' name='L9378'></a>} <a id='L9379' name='L9379'></a> <a id='L9380' name='L9380'></a>% Latin2 (ISO-8859-2) character definitions. <a id='L9381' name='L9381'></a>\def\lattwochardefs{% <a id='L9382' name='L9382'></a> \gdef^^a0{\tie} <a id='L9383' name='L9383'></a> \gdef^^a1{\ogonek{A}} <a id='L9384' name='L9384'></a> \gdef^^a2{\u{}} <a id='L9385' name='L9385'></a> \gdef^^a3{\L} <a id='L9386' name='L9386'></a> \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} <a id='L9387' name='L9387'></a> \gdef^^a5{\v L} <a id='L9388' name='L9388'></a> \gdef^^a6{\'S} <a id='L9389' name='L9389'></a> \gdef^^a7{\S} <a id='L9390' name='L9390'></a> \gdef^^a8{\"{}} <a id='L9391' name='L9391'></a> \gdef^^a9{\v S} <a id='L9392' name='L9392'></a> \gdef^^aa{\cedilla S} <a id='L9393' name='L9393'></a> \gdef^^ab{\v T} <a id='L9394' name='L9394'></a> \gdef^^ac{\'Z} <a id='L9395' name='L9395'></a> \gdef^^ad{\-} <a id='L9396' name='L9396'></a> \gdef^^ae{\v Z} <a id='L9397' name='L9397'></a> \gdef^^af{\dotaccent Z} <a id='L9398' name='L9398'></a> % <a id='L9399' name='L9399'></a> \gdef^^b0{\textdegree} <a id='L9400' name='L9400'></a> \gdef^^b1{\ogonek{a}} <a id='L9401' name='L9401'></a> \gdef^^b2{\ogonek{ }} <a id='L9402' name='L9402'></a> \gdef^^b3{\l} <a id='L9403' name='L9403'></a> \gdef^^b4{\'{}} <a id='L9404' name='L9404'></a> \gdef^^b5{\v l} <a id='L9405' name='L9405'></a> \gdef^^b6{\'s} <a id='L9406' name='L9406'></a> \gdef^^b7{\v{}} <a id='L9407' name='L9407'></a> \gdef^^b8{\cedilla\ } <a id='L9408' name='L9408'></a> \gdef^^b9{\v s} <a id='L9409' name='L9409'></a> \gdef^^ba{\cedilla s} <a id='L9410' name='L9410'></a> \gdef^^bb{\v t} <a id='L9411' name='L9411'></a> \gdef^^bc{\'z} <a id='L9412' name='L9412'></a> \gdef^^bd{\H{}} <a id='L9413' name='L9413'></a> \gdef^^be{\v z} <a id='L9414' name='L9414'></a> \gdef^^bf{\dotaccent z} <a id='L9415' name='L9415'></a> % <a id='L9416' name='L9416'></a> \gdef^^c0{\'R} <a id='L9417' name='L9417'></a> \gdef^^c1{\'A} <a id='L9418' name='L9418'></a> \gdef^^c2{\^A} <a id='L9419' name='L9419'></a> \gdef^^c3{\u A} <a id='L9420' name='L9420'></a> \gdef^^c4{\"A} <a id='L9421' name='L9421'></a> \gdef^^c5{\'L} <a id='L9422' name='L9422'></a> \gdef^^c6{\'C} <a id='L9423' name='L9423'></a> \gdef^^c7{\cedilla C} <a id='L9424' name='L9424'></a> \gdef^^c8{\v C} <a id='L9425' name='L9425'></a> \gdef^^c9{\'E} <a id='L9426' name='L9426'></a> \gdef^^ca{\ogonek{E}} <a id='L9427' name='L9427'></a> \gdef^^cb{\"E} <a id='L9428' name='L9428'></a> \gdef^^cc{\v E} <a id='L9429' name='L9429'></a> \gdef^^cd{\'I} <a id='L9430' name='L9430'></a> \gdef^^ce{\^I} <a id='L9431' name='L9431'></a> \gdef^^cf{\v D} <a id='L9432' name='L9432'></a> % <a id='L9433' name='L9433'></a> \gdef^^d0{\DH} <a id='L9434' name='L9434'></a> \gdef^^d1{\'N} <a id='L9435' name='L9435'></a> \gdef^^d2{\v N} <a id='L9436' name='L9436'></a> \gdef^^d3{\'O} <a id='L9437' name='L9437'></a> \gdef^^d4{\^O} <a id='L9438' name='L9438'></a> \gdef^^d5{\H O} <a id='L9439' name='L9439'></a> \gdef^^d6{\"O} <a id='L9440' name='L9440'></a> \gdef^^d7{$\times$} <a id='L9441' name='L9441'></a> \gdef^^d8{\v R} <a id='L9442' name='L9442'></a> \gdef^^d9{\ringaccent U} <a id='L9443' name='L9443'></a> \gdef^^da{\'U} <a id='L9444' name='L9444'></a> \gdef^^db{\H U} <a id='L9445' name='L9445'></a> \gdef^^dc{\"U} <a id='L9446' name='L9446'></a> \gdef^^dd{\'Y} <a id='L9447' name='L9447'></a> \gdef^^de{\cedilla T} <a id='L9448' name='L9448'></a> \gdef^^df{\ss} <a id='L9449' name='L9449'></a> % <a id='L9450' name='L9450'></a> \gdef^^e0{\'r} <a id='L9451' name='L9451'></a> \gdef^^e1{\'a} <a id='L9452' name='L9452'></a> \gdef^^e2{\^a} <a id='L9453' name='L9453'></a> \gdef^^e3{\u a} <a id='L9454' name='L9454'></a> \gdef^^e4{\"a} <a id='L9455' name='L9455'></a> \gdef^^e5{\'l} <a id='L9456' name='L9456'></a> \gdef^^e6{\'c} <a id='L9457' name='L9457'></a> \gdef^^e7{\cedilla c} <a id='L9458' name='L9458'></a> \gdef^^e8{\v c} <a id='L9459' name='L9459'></a> \gdef^^e9{\'e} <a id='L9460' name='L9460'></a> \gdef^^ea{\ogonek{e}} <a id='L9461' name='L9461'></a> \gdef^^eb{\"e} <a id='L9462' name='L9462'></a> \gdef^^ec{\v e} <a id='L9463' name='L9463'></a> \gdef^^ed{\'{\dotless{i}}} <a id='L9464' name='L9464'></a> \gdef^^ee{\^{\dotless{i}}} <a id='L9465' name='L9465'></a> \gdef^^ef{\v d} <a id='L9466' name='L9466'></a> % <a id='L9467' name='L9467'></a> \gdef^^f0{\dh} <a id='L9468' name='L9468'></a> \gdef^^f1{\'n} <a id='L9469' name='L9469'></a> \gdef^^f2{\v n} <a id='L9470' name='L9470'></a> \gdef^^f3{\'o} <a id='L9471' name='L9471'></a> \gdef^^f4{\^o} <a id='L9472' name='L9472'></a> \gdef^^f5{\H o} <a id='L9473' name='L9473'></a> \gdef^^f6{\"o} <a id='L9474' name='L9474'></a> \gdef^^f7{$\div$} <a id='L9475' name='L9475'></a> \gdef^^f8{\v r} <a id='L9476' name='L9476'></a> \gdef^^f9{\ringaccent u} <a id='L9477' name='L9477'></a> \gdef^^fa{\'u} <a id='L9478' name='L9478'></a> \gdef^^fb{\H u} <a id='L9479' name='L9479'></a> \gdef^^fc{\"u} <a id='L9480' name='L9480'></a> \gdef^^fd{\'y} <a id='L9481' name='L9481'></a> \gdef^^fe{\cedilla t} <a id='L9482' name='L9482'></a> \gdef^^ff{\dotaccent{}} <a id='L9483' name='L9483'></a>} <a id='L9484' name='L9484'></a> <a id='L9485' name='L9485'></a>% UTF-8 character definitions. <a id='L9486' name='L9486'></a>% <a id='L9487' name='L9487'></a>% This code to support UTF-8 is based on LaTeX's utf8.def, with some <a id='L9488' name='L9488'></a>% changes for Texinfo conventions. It is included here under the GPL by <a id='L9489' name='L9489'></a>% permission from Frank Mittelbach and the LaTeX team. <a id='L9490' name='L9490'></a>% <a id='L9491' name='L9491'></a>\newcount\countUTFx <a id='L9492' name='L9492'></a>\newcount\countUTFy <a id='L9493' name='L9493'></a>\newcount\countUTFz <a id='L9494' name='L9494'></a> <a id='L9495' name='L9495'></a>\gdef\UTFviiiTwoOctets#1#2{\expandafter <a id='L9496' name='L9496'></a> \UTFviiiDefined\csname u8:#1\string #2\endcsname} <a id='L9497' name='L9497'></a>% <a id='L9498' name='L9498'></a>\gdef\UTFviiiThreeOctets#1#2#3{\expandafter <a id='L9499' name='L9499'></a> \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} <a id='L9500' name='L9500'></a>% <a id='L9501' name='L9501'></a>\gdef\UTFviiiFourOctets#1#2#3#4{\expandafter <a id='L9502' name='L9502'></a> \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} <a id='L9503' name='L9503'></a> <a id='L9504' name='L9504'></a>\gdef\UTFviiiDefined#1{% <a id='L9505' name='L9505'></a> \ifx #1\relax <a id='L9506' name='L9506'></a> \message{\linenumber Unicode char \string #1 not defined for Texinfo}% <a id='L9507' name='L9507'></a> \else <a id='L9508' name='L9508'></a> \expandafter #1% <a id='L9509' name='L9509'></a> \fi <a id='L9510' name='L9510'></a>} <a id='L9511' name='L9511'></a> <a id='L9512' name='L9512'></a>\begingroup <a id='L9513' name='L9513'></a> \catcode`\~13 <a id='L9514' name='L9514'></a> \catcode`\"12 <a id='L9515' name='L9515'></a> <a id='L9516' name='L9516'></a> \def\UTFviiiLoop{% <a id='L9517' name='L9517'></a> \global\catcode\countUTFx\active <a id='L9518' name='L9518'></a> \uccode`\~\countUTFx <a id='L9519' name='L9519'></a> \uppercase\expandafter{\UTFviiiTmp}% <a id='L9520' name='L9520'></a> \advance\countUTFx by 1 <a id='L9521' name='L9521'></a> \ifnum\countUTFx < \countUTFy <a id='L9522' name='L9522'></a> \expandafter\UTFviiiLoop <a id='L9523' name='L9523'></a> \fi} <a id='L9524' name='L9524'></a> <a id='L9525' name='L9525'></a> \countUTFx = "C2 <a id='L9526' name='L9526'></a> \countUTFy = "E0 <a id='L9527' name='L9527'></a> \def\UTFviiiTmp{% <a id='L9528' name='L9528'></a> \xdef~{\noexpand\UTFviiiTwoOctets\string~}} <a id='L9529' name='L9529'></a> \UTFviiiLoop <a id='L9530' name='L9530'></a> <a id='L9531' name='L9531'></a> \countUTFx = "E0 <a id='L9532' name='L9532'></a> \countUTFy = "F0 <a id='L9533' name='L9533'></a> \def\UTFviiiTmp{% <a id='L9534' name='L9534'></a> \xdef~{\noexpand\UTFviiiThreeOctets\string~}} <a id='L9535' name='L9535'></a> \UTFviiiLoop <a id='L9536' name='L9536'></a> <a id='L9537' name='L9537'></a> \countUTFx = "F0 <a id='L9538' name='L9538'></a> \countUTFy = "F4 <a id='L9539' name='L9539'></a> \def\UTFviiiTmp{% <a id='L9540' name='L9540'></a> \xdef~{\noexpand\UTFviiiFourOctets\string~}} <a id='L9541' name='L9541'></a> \UTFviiiLoop <a id='L9542' name='L9542'></a>\endgroup <a id='L9543' name='L9543'></a> <a id='L9544' name='L9544'></a>\begingroup <a id='L9545' name='L9545'></a> \catcode`\"=12 <a id='L9546' name='L9546'></a> \catcode`\<=12 <a id='L9547' name='L9547'></a> \catcode`\.=12 <a id='L9548' name='L9548'></a> \catcode`\,=12 <a id='L9549' name='L9549'></a> \catcode`\;=12 <a id='L9550' name='L9550'></a> \catcode`\!=12 <a id='L9551' name='L9551'></a> \catcode`\~=13 <a id='L9552' name='L9552'></a> <a id='L9553' name='L9553'></a> \gdef\DeclareUnicodeCharacter#1#2{% <a id='L9554' name='L9554'></a> \countUTFz = "#1\relax <a id='L9555' name='L9555'></a> %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% <a id='L9556' name='L9556'></a> \begingroup <a id='L9557' name='L9557'></a> \parseXMLCharref <a id='L9558' name='L9558'></a> \def\UTFviiiTwoOctets##1##2{% <a id='L9559' name='L9559'></a> \csname u8:##1\string ##2\endcsname}% <a id='L9560' name='L9560'></a> \def\UTFviiiThreeOctets##1##2##3{% <a id='L9561' name='L9561'></a> \csname u8:##1\string ##2\string ##3\endcsname}% <a id='L9562' name='L9562'></a> \def\UTFviiiFourOctets##1##2##3##4{% <a id='L9563' name='L9563'></a> \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% <a id='L9564' name='L9564'></a> \expandafter\expandafter\expandafter\expandafter <a id='L9565' name='L9565'></a> \expandafter\expandafter\expandafter <a id='L9566' name='L9566'></a> \gdef\UTFviiiTmp{#2}% <a id='L9567' name='L9567'></a> \endgroup} <a id='L9568' name='L9568'></a> <a id='L9569' name='L9569'></a> \gdef\parseXMLCharref{% <a id='L9570' name='L9570'></a> \ifnum\countUTFz < "A0\relax <a id='L9571' name='L9571'></a> \errhelp = \EMsimple <a id='L9572' name='L9572'></a> \errmessage{Cannot define Unicode char value < 00A0}% <a id='L9573' name='L9573'></a> \else\ifnum\countUTFz < "800\relax <a id='L9574' name='L9574'></a> \parseUTFviiiA,% <a id='L9575' name='L9575'></a> \parseUTFviiiB C\UTFviiiTwoOctets.,% <a id='L9576' name='L9576'></a> \else\ifnum\countUTFz < "10000\relax <a id='L9577' name='L9577'></a> \parseUTFviiiA;% <a id='L9578' name='L9578'></a> \parseUTFviiiA,% <a id='L9579' name='L9579'></a> \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% <a id='L9580' name='L9580'></a> \else <a id='L9581' name='L9581'></a> \parseUTFviiiA;% <a id='L9582' name='L9582'></a> \parseUTFviiiA,% <a id='L9583' name='L9583'></a> \parseUTFviiiA!% <a id='L9584' name='L9584'></a> \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% <a id='L9585' name='L9585'></a> \fi\fi\fi <a id='L9586' name='L9586'></a> } <a id='L9587' name='L9587'></a> <a id='L9588' name='L9588'></a> \gdef\parseUTFviiiA#1{% <a id='L9589' name='L9589'></a> \countUTFx = \countUTFz <a id='L9590' name='L9590'></a> \divide\countUTFz by 64 <a id='L9591' name='L9591'></a> \countUTFy = \countUTFz <a id='L9592' name='L9592'></a> \multiply\countUTFz by 64 <a id='L9593' name='L9593'></a> \advance\countUTFx by -\countUTFz <a id='L9594' name='L9594'></a> \advance\countUTFx by 128 <a id='L9595' name='L9595'></a> \uccode `#1\countUTFx <a id='L9596' name='L9596'></a> \countUTFz = \countUTFy} <a id='L9597' name='L9597'></a> <a id='L9598' name='L9598'></a> \gdef\parseUTFviiiB#1#2#3#4{% <a id='L9599' name='L9599'></a> \advance\countUTFz by "#10\relax <a id='L9600' name='L9600'></a> \uccode `#3\countUTFz <a id='L9601' name='L9601'></a> \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} <a id='L9602' name='L9602'></a>\endgroup <a id='L9603' name='L9603'></a> <a id='L9604' name='L9604'></a>\def\utfeightchardefs{% <a id='L9605' name='L9605'></a> \DeclareUnicodeCharacter{00A0}{\tie} <a id='L9606' name='L9606'></a> \DeclareUnicodeCharacter{00A1}{\exclamdown} <a id='L9607' name='L9607'></a> \DeclareUnicodeCharacter{00A3}{\pounds} <a id='L9608' name='L9608'></a> \DeclareUnicodeCharacter{00A8}{\"{ }} <a id='L9609' name='L9609'></a> \DeclareUnicodeCharacter{00A9}{\copyright} <a id='L9610' name='L9610'></a> \DeclareUnicodeCharacter{00AA}{\ordf} <a id='L9611' name='L9611'></a> \DeclareUnicodeCharacter{00AB}{\guillemetleft} <a id='L9612' name='L9612'></a> \DeclareUnicodeCharacter{00AD}{\-} <a id='L9613' name='L9613'></a> \DeclareUnicodeCharacter{00AE}{\registeredsymbol} <a id='L9614' name='L9614'></a> \DeclareUnicodeCharacter{00AF}{\={ }} <a id='L9615' name='L9615'></a> <a id='L9616' name='L9616'></a> \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} <a id='L9617' name='L9617'></a> \DeclareUnicodeCharacter{00B4}{\'{ }} <a id='L9618' name='L9618'></a> \DeclareUnicodeCharacter{00B8}{\cedilla{ }} <a id='L9619' name='L9619'></a> \DeclareUnicodeCharacter{00BA}{\ordm} <a id='L9620' name='L9620'></a> \DeclareUnicodeCharacter{00BB}{\guillemetright} <a id='L9621' name='L9621'></a> \DeclareUnicodeCharacter{00BF}{\questiondown} <a id='L9622' name='L9622'></a> <a id='L9623' name='L9623'></a> \DeclareUnicodeCharacter{00C0}{\`A} <a id='L9624' name='L9624'></a> \DeclareUnicodeCharacter{00C1}{\'A} <a id='L9625' name='L9625'></a> \DeclareUnicodeCharacter{00C2}{\^A} <a id='L9626' name='L9626'></a> \DeclareUnicodeCharacter{00C3}{\~A} <a id='L9627' name='L9627'></a> \DeclareUnicodeCharacter{00C4}{\"A} <a id='L9628' name='L9628'></a> \DeclareUnicodeCharacter{00C5}{\AA} <a id='L9629' name='L9629'></a> \DeclareUnicodeCharacter{00C6}{\AE} <a id='L9630' name='L9630'></a> \DeclareUnicodeCharacter{00C7}{\cedilla{C}} <a id='L9631' name='L9631'></a> \DeclareUnicodeCharacter{00C8}{\`E} <a id='L9632' name='L9632'></a> \DeclareUnicodeCharacter{00C9}{\'E} <a id='L9633' name='L9633'></a> \DeclareUnicodeCharacter{00CA}{\^E} <a id='L9634' name='L9634'></a> \DeclareUnicodeCharacter{00CB}{\"E} <a id='L9635' name='L9635'></a> \DeclareUnicodeCharacter{00CC}{\`I} <a id='L9636' name='L9636'></a> \DeclareUnicodeCharacter{00CD}{\'I} <a id='L9637' name='L9637'></a> \DeclareUnicodeCharacter{00CE}{\^I} <a id='L9638' name='L9638'></a> \DeclareUnicodeCharacter{00CF}{\"I} <a id='L9639' name='L9639'></a> <a id='L9640' name='L9640'></a> \DeclareUnicodeCharacter{00D0}{\DH} <a id='L9641' name='L9641'></a> \DeclareUnicodeCharacter{00D1}{\~N} <a id='L9642' name='L9642'></a> \DeclareUnicodeCharacter{00D2}{\`O} <a id='L9643' name='L9643'></a> \DeclareUnicodeCharacter{00D3}{\'O} <a id='L9644' name='L9644'></a> \DeclareUnicodeCharacter{00D4}{\^O} <a id='L9645' name='L9645'></a> \DeclareUnicodeCharacter{00D5}{\~O} <a id='L9646' name='L9646'></a> \DeclareUnicodeCharacter{00D6}{\"O} <a id='L9647' name='L9647'></a> \DeclareUnicodeCharacter{00D8}{\O} <a id='L9648' name='L9648'></a> \DeclareUnicodeCharacter{00D9}{\`U} <a id='L9649' name='L9649'></a> \DeclareUnicodeCharacter{00DA}{\'U} <a id='L9650' name='L9650'></a> \DeclareUnicodeCharacter{00DB}{\^U} <a id='L9651' name='L9651'></a> \DeclareUnicodeCharacter{00DC}{\"U} <a id='L9652' name='L9652'></a> \DeclareUnicodeCharacter{00DD}{\'Y} <a id='L9653' name='L9653'></a> \DeclareUnicodeCharacter{00DE}{\TH} <a id='L9654' name='L9654'></a> \DeclareUnicodeCharacter{00DF}{\ss} <a id='L9655' name='L9655'></a> <a id='L9656' name='L9656'></a> \DeclareUnicodeCharacter{00E0}{\`a} <a id='L9657' name='L9657'></a> \DeclareUnicodeCharacter{00E1}{\'a} <a id='L9658' name='L9658'></a> \DeclareUnicodeCharacter{00E2}{\^a} <a id='L9659' name='L9659'></a> \DeclareUnicodeCharacter{00E3}{\~a} <a id='L9660' name='L9660'></a> \DeclareUnicodeCharacter{00E4}{\"a} <a id='L9661' name='L9661'></a> \DeclareUnicodeCharacter{00E5}{\aa} <a id='L9662' name='L9662'></a> \DeclareUnicodeCharacter{00E6}{\ae} <a id='L9663' name='L9663'></a> \DeclareUnicodeCharacter{00E7}{\cedilla{c}} <a id='L9664' name='L9664'></a> \DeclareUnicodeCharacter{00E8}{\`e} <a id='L9665' name='L9665'></a> \DeclareUnicodeCharacter{00E9}{\'e} <a id='L9666' name='L9666'></a> \DeclareUnicodeCharacter{00EA}{\^e} <a id='L9667' name='L9667'></a> \DeclareUnicodeCharacter{00EB}{\"e} <a id='L9668' name='L9668'></a> \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} <a id='L9669' name='L9669'></a> \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} <a id='L9670' name='L9670'></a> \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} <a id='L9671' name='L9671'></a> \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} <a id='L9672' name='L9672'></a> <a id='L9673' name='L9673'></a> \DeclareUnicodeCharacter{00F0}{\dh} <a id='L9674' name='L9674'></a> \DeclareUnicodeCharacter{00F1}{\~n} <a id='L9675' name='L9675'></a> \DeclareUnicodeCharacter{00F2}{\`o} <a id='L9676' name='L9676'></a> \DeclareUnicodeCharacter{00F3}{\'o} <a id='L9677' name='L9677'></a> \DeclareUnicodeCharacter{00F4}{\^o} <a id='L9678' name='L9678'></a> \DeclareUnicodeCharacter{00F5}{\~o} <a id='L9679' name='L9679'></a> \DeclareUnicodeCharacter{00F6}{\"o} <a id='L9680' name='L9680'></a> \DeclareUnicodeCharacter{00F8}{\o} <a id='L9681' name='L9681'></a> \DeclareUnicodeCharacter{00F9}{\`u} <a id='L9682' name='L9682'></a> \DeclareUnicodeCharacter{00FA}{\'u} <a id='L9683' name='L9683'></a> \DeclareUnicodeCharacter{00FB}{\^u} <a id='L9684' name='L9684'></a> \DeclareUnicodeCharacter{00FC}{\"u} <a id='L9685' name='L9685'></a> \DeclareUnicodeCharacter{00FD}{\'y} <a id='L9686' name='L9686'></a> \DeclareUnicodeCharacter{00FE}{\th} <a id='L9687' name='L9687'></a> \DeclareUnicodeCharacter{00FF}{\"y} <a id='L9688' name='L9688'></a> <a id='L9689' name='L9689'></a> \DeclareUnicodeCharacter{0100}{\=A} <a id='L9690' name='L9690'></a> \DeclareUnicodeCharacter{0101}{\=a} <a id='L9691' name='L9691'></a> \DeclareUnicodeCharacter{0102}{\u{A}} <a id='L9692' name='L9692'></a> \DeclareUnicodeCharacter{0103}{\u{a}} <a id='L9693' name='L9693'></a> \DeclareUnicodeCharacter{0104}{\ogonek{A}} <a id='L9694' name='L9694'></a> \DeclareUnicodeCharacter{0105}{\ogonek{a}} <a id='L9695' name='L9695'></a> \DeclareUnicodeCharacter{0106}{\'C} <a id='L9696' name='L9696'></a> \DeclareUnicodeCharacter{0107}{\'c} <a id='L9697' name='L9697'></a> \DeclareUnicodeCharacter{0108}{\^C} <a id='L9698' name='L9698'></a> \DeclareUnicodeCharacter{0109}{\^c} <a id='L9699' name='L9699'></a> \DeclareUnicodeCharacter{0118}{\ogonek{E}} <a id='L9700' name='L9700'></a> \DeclareUnicodeCharacter{0119}{\ogonek{e}} <a id='L9701' name='L9701'></a> \DeclareUnicodeCharacter{010A}{\dotaccent{C}} <a id='L9702' name='L9702'></a> \DeclareUnicodeCharacter{010B}{\dotaccent{c}} <a id='L9703' name='L9703'></a> \DeclareUnicodeCharacter{010C}{\v{C}} <a id='L9704' name='L9704'></a> \DeclareUnicodeCharacter{010D}{\v{c}} <a id='L9705' name='L9705'></a> \DeclareUnicodeCharacter{010E}{\v{D}} <a id='L9706' name='L9706'></a> <a id='L9707' name='L9707'></a> \DeclareUnicodeCharacter{0112}{\=E} <a id='L9708' name='L9708'></a> \DeclareUnicodeCharacter{0113}{\=e} <a id='L9709' name='L9709'></a> \DeclareUnicodeCharacter{0114}{\u{E}} <a id='L9710' name='L9710'></a> \DeclareUnicodeCharacter{0115}{\u{e}} <a id='L9711' name='L9711'></a> \DeclareUnicodeCharacter{0116}{\dotaccent{E}} <a id='L9712' name='L9712'></a> \DeclareUnicodeCharacter{0117}{\dotaccent{e}} <a id='L9713' name='L9713'></a> \DeclareUnicodeCharacter{011A}{\v{E}} <a id='L9714' name='L9714'></a> \DeclareUnicodeCharacter{011B}{\v{e}} <a id='L9715' name='L9715'></a> \DeclareUnicodeCharacter{011C}{\^G} <a id='L9716' name='L9716'></a> \DeclareUnicodeCharacter{011D}{\^g} <a id='L9717' name='L9717'></a> \DeclareUnicodeCharacter{011E}{\u{G}} <a id='L9718' name='L9718'></a> \DeclareUnicodeCharacter{011F}{\u{g}} <a id='L9719' name='L9719'></a> <a id='L9720' name='L9720'></a> \DeclareUnicodeCharacter{0120}{\dotaccent{G}} <a id='L9721' name='L9721'></a> \DeclareUnicodeCharacter{0121}{\dotaccent{g}} <a id='L9722' name='L9722'></a> \DeclareUnicodeCharacter{0124}{\^H} <a id='L9723' name='L9723'></a> \DeclareUnicodeCharacter{0125}{\^h} <a id='L9724' name='L9724'></a> \DeclareUnicodeCharacter{0128}{\~I} <a id='L9725' name='L9725'></a> \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} <a id='L9726' name='L9726'></a> \DeclareUnicodeCharacter{012A}{\=I} <a id='L9727' name='L9727'></a> \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} <a id='L9728' name='L9728'></a> \DeclareUnicodeCharacter{012C}{\u{I}} <a id='L9729' name='L9729'></a> \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} <a id='L9730' name='L9730'></a> <a id='L9731' name='L9731'></a> \DeclareUnicodeCharacter{0130}{\dotaccent{I}} <a id='L9732' name='L9732'></a> \DeclareUnicodeCharacter{0131}{\dotless{i}} <a id='L9733' name='L9733'></a> \DeclareUnicodeCharacter{0132}{IJ} <a id='L9734' name='L9734'></a> \DeclareUnicodeCharacter{0133}{ij} <a id='L9735' name='L9735'></a> \DeclareUnicodeCharacter{0134}{\^J} <a id='L9736' name='L9736'></a> \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} <a id='L9737' name='L9737'></a> \DeclareUnicodeCharacter{0139}{\'L} <a id='L9738' name='L9738'></a> \DeclareUnicodeCharacter{013A}{\'l} <a id='L9739' name='L9739'></a> <a id='L9740' name='L9740'></a> \DeclareUnicodeCharacter{0141}{\L} <a id='L9741' name='L9741'></a> \DeclareUnicodeCharacter{0142}{\l} <a id='L9742' name='L9742'></a> \DeclareUnicodeCharacter{0143}{\'N} <a id='L9743' name='L9743'></a> \DeclareUnicodeCharacter{0144}{\'n} <a id='L9744' name='L9744'></a> \DeclareUnicodeCharacter{0147}{\v{N}} <a id='L9745' name='L9745'></a> \DeclareUnicodeCharacter{0148}{\v{n}} <a id='L9746' name='L9746'></a> \DeclareUnicodeCharacter{014C}{\=O} <a id='L9747' name='L9747'></a> \DeclareUnicodeCharacter{014D}{\=o} <a id='L9748' name='L9748'></a> \DeclareUnicodeCharacter{014E}{\u{O}} <a id='L9749' name='L9749'></a> \DeclareUnicodeCharacter{014F}{\u{o}} <a id='L9750' name='L9750'></a> <a id='L9751' name='L9751'></a> \DeclareUnicodeCharacter{0150}{\H{O}} <a id='L9752' name='L9752'></a> \DeclareUnicodeCharacter{0151}{\H{o}} <a id='L9753' name='L9753'></a> \DeclareUnicodeCharacter{0152}{\OE} <a id='L9754' name='L9754'></a> \DeclareUnicodeCharacter{0153}{\oe} <a id='L9755' name='L9755'></a> \DeclareUnicodeCharacter{0154}{\'R} <a id='L9756' name='L9756'></a> \DeclareUnicodeCharacter{0155}{\'r} <a id='L9757' name='L9757'></a> \DeclareUnicodeCharacter{0158}{\v{R}} <a id='L9758' name='L9758'></a> \DeclareUnicodeCharacter{0159}{\v{r}} <a id='L9759' name='L9759'></a> \DeclareUnicodeCharacter{015A}{\'S} <a id='L9760' name='L9760'></a> \DeclareUnicodeCharacter{015B}{\'s} <a id='L9761' name='L9761'></a> \DeclareUnicodeCharacter{015C}{\^S} <a id='L9762' name='L9762'></a> \DeclareUnicodeCharacter{015D}{\^s} <a id='L9763' name='L9763'></a> \DeclareUnicodeCharacter{015E}{\cedilla{S}} <a id='L9764' name='L9764'></a> \DeclareUnicodeCharacter{015F}{\cedilla{s}} <a id='L9765' name='L9765'></a> <a id='L9766' name='L9766'></a> \DeclareUnicodeCharacter{0160}{\v{S}} <a id='L9767' name='L9767'></a> \DeclareUnicodeCharacter{0161}{\v{s}} <a id='L9768' name='L9768'></a> \DeclareUnicodeCharacter{0162}{\cedilla{t}} <a id='L9769' name='L9769'></a> \DeclareUnicodeCharacter{0163}{\cedilla{T}} <a id='L9770' name='L9770'></a> \DeclareUnicodeCharacter{0164}{\v{T}} <a id='L9771' name='L9771'></a> <a id='L9772' name='L9772'></a> \DeclareUnicodeCharacter{0168}{\~U} <a id='L9773' name='L9773'></a> \DeclareUnicodeCharacter{0169}{\~u} <a id='L9774' name='L9774'></a> \DeclareUnicodeCharacter{016A}{\=U} <a id='L9775' name='L9775'></a> \DeclareUnicodeCharacter{016B}{\=u} <a id='L9776' name='L9776'></a> \DeclareUnicodeCharacter{016C}{\u{U}} <a id='L9777' name='L9777'></a> \DeclareUnicodeCharacter{016D}{\u{u}} <a id='L9778' name='L9778'></a> \DeclareUnicodeCharacter{016E}{\ringaccent{U}} <a id='L9779' name='L9779'></a> \DeclareUnicodeCharacter{016F}{\ringaccent{u}} <a id='L9780' name='L9780'></a> <a id='L9781' name='L9781'></a> \DeclareUnicodeCharacter{0170}{\H{U}} <a id='L9782' name='L9782'></a> \DeclareUnicodeCharacter{0171}{\H{u}} <a id='L9783' name='L9783'></a> \DeclareUnicodeCharacter{0174}{\^W} <a id='L9784' name='L9784'></a> \DeclareUnicodeCharacter{0175}{\^w} <a id='L9785' name='L9785'></a> \DeclareUnicodeCharacter{0176}{\^Y} <a id='L9786' name='L9786'></a> \DeclareUnicodeCharacter{0177}{\^y} <a id='L9787' name='L9787'></a> \DeclareUnicodeCharacter{0178}{\"Y} <a id='L9788' name='L9788'></a> \DeclareUnicodeCharacter{0179}{\'Z} <a id='L9789' name='L9789'></a> \DeclareUnicodeCharacter{017A}{\'z} <a id='L9790' name='L9790'></a> \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} <a id='L9791' name='L9791'></a> \DeclareUnicodeCharacter{017C}{\dotaccent{z}} <a id='L9792' name='L9792'></a> \DeclareUnicodeCharacter{017D}{\v{Z}} <a id='L9793' name='L9793'></a> \DeclareUnicodeCharacter{017E}{\v{z}} <a id='L9794' name='L9794'></a> <a id='L9795' name='L9795'></a> \DeclareUnicodeCharacter{01C4}{D\v{Z}} <a id='L9796' name='L9796'></a> \DeclareUnicodeCharacter{01C5}{D\v{z}} <a id='L9797' name='L9797'></a> \DeclareUnicodeCharacter{01C6}{d\v{z}} <a id='L9798' name='L9798'></a> \DeclareUnicodeCharacter{01C7}{LJ} <a id='L9799' name='L9799'></a> \DeclareUnicodeCharacter{01C8}{Lj} <a id='L9800' name='L9800'></a> \DeclareUnicodeCharacter{01C9}{lj} <a id='L9801' name='L9801'></a> \DeclareUnicodeCharacter{01CA}{NJ} <a id='L9802' name='L9802'></a> \DeclareUnicodeCharacter{01CB}{Nj} <a id='L9803' name='L9803'></a> \DeclareUnicodeCharacter{01CC}{nj} <a id='L9804' name='L9804'></a> \DeclareUnicodeCharacter{01CD}{\v{A}} <a id='L9805' name='L9805'></a> \DeclareUnicodeCharacter{01CE}{\v{a}} <a id='L9806' name='L9806'></a> \DeclareUnicodeCharacter{01CF}{\v{I}} <a id='L9807' name='L9807'></a> <a id='L9808' name='L9808'></a> \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} <a id='L9809' name='L9809'></a> \DeclareUnicodeCharacter{01D1}{\v{O}} <a id='L9810' name='L9810'></a> \DeclareUnicodeCharacter{01D2}{\v{o}} <a id='L9811' name='L9811'></a> \DeclareUnicodeCharacter{01D3}{\v{U}} <a id='L9812' name='L9812'></a> \DeclareUnicodeCharacter{01D4}{\v{u}} <a id='L9813' name='L9813'></a> <a id='L9814' name='L9814'></a> \DeclareUnicodeCharacter{01E2}{\={\AE}} <a id='L9815' name='L9815'></a> \DeclareUnicodeCharacter{01E3}{\={\ae}} <a id='L9816' name='L9816'></a> \DeclareUnicodeCharacter{01E6}{\v{G}} <a id='L9817' name='L9817'></a> \DeclareUnicodeCharacter{01E7}{\v{g}} <a id='L9818' name='L9818'></a> \DeclareUnicodeCharacter{01E8}{\v{K}} <a id='L9819' name='L9819'></a> \DeclareUnicodeCharacter{01E9}{\v{k}} <a id='L9820' name='L9820'></a> <a id='L9821' name='L9821'></a> \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} <a id='L9822' name='L9822'></a> \DeclareUnicodeCharacter{01F1}{DZ} <a id='L9823' name='L9823'></a> \DeclareUnicodeCharacter{01F2}{Dz} <a id='L9824' name='L9824'></a> \DeclareUnicodeCharacter{01F3}{dz} <a id='L9825' name='L9825'></a> \DeclareUnicodeCharacter{01F4}{\'G} <a id='L9826' name='L9826'></a> \DeclareUnicodeCharacter{01F5}{\'g} <a id='L9827' name='L9827'></a> \DeclareUnicodeCharacter{01F8}{\`N} <a id='L9828' name='L9828'></a> \DeclareUnicodeCharacter{01F9}{\`n} <a id='L9829' name='L9829'></a> \DeclareUnicodeCharacter{01FC}{\'{\AE}} <a id='L9830' name='L9830'></a> \DeclareUnicodeCharacter{01FD}{\'{\ae}} <a id='L9831' name='L9831'></a> \DeclareUnicodeCharacter{01FE}{\'{\O}} <a id='L9832' name='L9832'></a> \DeclareUnicodeCharacter{01FF}{\'{\o}} <a id='L9833' name='L9833'></a> <a id='L9834' name='L9834'></a> \DeclareUnicodeCharacter{021E}{\v{H}} <a id='L9835' name='L9835'></a> \DeclareUnicodeCharacter{021F}{\v{h}} <a id='L9836' name='L9836'></a> <a id='L9837' name='L9837'></a> \DeclareUnicodeCharacter{0226}{\dotaccent{A}} <a id='L9838' name='L9838'></a> \DeclareUnicodeCharacter{0227}{\dotaccent{a}} <a id='L9839' name='L9839'></a> \DeclareUnicodeCharacter{0228}{\cedilla{E}} <a id='L9840' name='L9840'></a> \DeclareUnicodeCharacter{0229}{\cedilla{e}} <a id='L9841' name='L9841'></a> \DeclareUnicodeCharacter{022E}{\dotaccent{O}} <a id='L9842' name='L9842'></a> \DeclareUnicodeCharacter{022F}{\dotaccent{o}} <a id='L9843' name='L9843'></a> <a id='L9844' name='L9844'></a> \DeclareUnicodeCharacter{0232}{\=Y} <a id='L9845' name='L9845'></a> \DeclareUnicodeCharacter{0233}{\=y} <a id='L9846' name='L9846'></a> \DeclareUnicodeCharacter{0237}{\dotless{j}} <a id='L9847' name='L9847'></a> <a id='L9848' name='L9848'></a> \DeclareUnicodeCharacter{02DB}{\ogonek{ }} <a id='L9849' name='L9849'></a> <a id='L9850' name='L9850'></a> \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} <a id='L9851' name='L9851'></a> \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} <a id='L9852' name='L9852'></a> \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} <a id='L9853' name='L9853'></a> \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} <a id='L9854' name='L9854'></a> \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} <a id='L9855' name='L9855'></a> \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} <a id='L9856' name='L9856'></a> \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} <a id='L9857' name='L9857'></a> \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} <a id='L9858' name='L9858'></a> \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} <a id='L9859' name='L9859'></a> \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} <a id='L9860' name='L9860'></a> \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} <a id='L9861' name='L9861'></a> \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} <a id='L9862' name='L9862'></a> <a id='L9863' name='L9863'></a> \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} <a id='L9864' name='L9864'></a> \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} <a id='L9865' name='L9865'></a> <a id='L9866' name='L9866'></a> \DeclareUnicodeCharacter{1E20}{\=G} <a id='L9867' name='L9867'></a> \DeclareUnicodeCharacter{1E21}{\=g} <a id='L9868' name='L9868'></a> \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} <a id='L9869' name='L9869'></a> \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} <a id='L9870' name='L9870'></a> \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} <a id='L9871' name='L9871'></a> \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} <a id='L9872' name='L9872'></a> \DeclareUnicodeCharacter{1E26}{\"H} <a id='L9873' name='L9873'></a> \DeclareUnicodeCharacter{1E27}{\"h} <a id='L9874' name='L9874'></a> <a id='L9875' name='L9875'></a> \DeclareUnicodeCharacter{1E30}{\'K} <a id='L9876' name='L9876'></a> \DeclareUnicodeCharacter{1E31}{\'k} <a id='L9877' name='L9877'></a> \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} <a id='L9878' name='L9878'></a> \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} <a id='L9879' name='L9879'></a> \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} <a id='L9880' name='L9880'></a> \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} <a id='L9881' name='L9881'></a> \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} <a id='L9882' name='L9882'></a> \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} <a id='L9883' name='L9883'></a> \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} <a id='L9884' name='L9884'></a> \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} <a id='L9885' name='L9885'></a> \DeclareUnicodeCharacter{1E3E}{\'M} <a id='L9886' name='L9886'></a> \DeclareUnicodeCharacter{1E3F}{\'m} <a id='L9887' name='L9887'></a> <a id='L9888' name='L9888'></a> \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} <a id='L9889' name='L9889'></a> \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} <a id='L9890' name='L9890'></a> \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} <a id='L9891' name='L9891'></a> \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} <a id='L9892' name='L9892'></a> \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} <a id='L9893' name='L9893'></a> \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} <a id='L9894' name='L9894'></a> \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} <a id='L9895' name='L9895'></a> \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} <a id='L9896' name='L9896'></a> \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} <a id='L9897' name='L9897'></a> \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} <a id='L9898' name='L9898'></a> <a id='L9899' name='L9899'></a> \DeclareUnicodeCharacter{1E54}{\'P} <a id='L9900' name='L9900'></a> \DeclareUnicodeCharacter{1E55}{\'p} <a id='L9901' name='L9901'></a> \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} <a id='L9902' name='L9902'></a> \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} <a id='L9903' name='L9903'></a> \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} <a id='L9904' name='L9904'></a> \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} <a id='L9905' name='L9905'></a> \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} <a id='L9906' name='L9906'></a> \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} <a id='L9907' name='L9907'></a> \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} <a id='L9908' name='L9908'></a> \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} <a id='L9909' name='L9909'></a> <a id='L9910' name='L9910'></a> \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} <a id='L9911' name='L9911'></a> \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} <a id='L9912' name='L9912'></a> \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} <a id='L9913' name='L9913'></a> \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} <a id='L9914' name='L9914'></a> \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} <a id='L9915' name='L9915'></a> \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} <a id='L9916' name='L9916'></a> \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} <a id='L9917' name='L9917'></a> \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} <a id='L9918' name='L9918'></a> \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} <a id='L9919' name='L9919'></a> \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} <a id='L9920' name='L9920'></a> <a id='L9921' name='L9921'></a> \DeclareUnicodeCharacter{1E7C}{\~V} <a id='L9922' name='L9922'></a> \DeclareUnicodeCharacter{1E7D}{\~v} <a id='L9923' name='L9923'></a> \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} <a id='L9924' name='L9924'></a> \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} <a id='L9925' name='L9925'></a> <a id='L9926' name='L9926'></a> \DeclareUnicodeCharacter{1E80}{\`W} <a id='L9927' name='L9927'></a> \DeclareUnicodeCharacter{1E81}{\`w} <a id='L9928' name='L9928'></a> \DeclareUnicodeCharacter{1E82}{\'W} <a id='L9929' name='L9929'></a> \DeclareUnicodeCharacter{1E83}{\'w} <a id='L9930' name='L9930'></a> \DeclareUnicodeCharacter{1E84}{\"W} <a id='L9931' name='L9931'></a> \DeclareUnicodeCharacter{1E85}{\"w} <a id='L9932' name='L9932'></a> \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} <a id='L9933' name='L9933'></a> \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} <a id='L9934' name='L9934'></a> \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} <a id='L9935' name='L9935'></a> \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} <a id='L9936' name='L9936'></a> \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} <a id='L9937' name='L9937'></a> \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} <a id='L9938' name='L9938'></a> \DeclareUnicodeCharacter{1E8C}{\"X} <a id='L9939' name='L9939'></a> \DeclareUnicodeCharacter{1E8D}{\"x} <a id='L9940' name='L9940'></a> \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} <a id='L9941' name='L9941'></a> \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} <a id='L9942' name='L9942'></a> <a id='L9943' name='L9943'></a> \DeclareUnicodeCharacter{1E90}{\^Z} <a id='L9944' name='L9944'></a> \DeclareUnicodeCharacter{1E91}{\^z} <a id='L9945' name='L9945'></a> \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} <a id='L9946' name='L9946'></a> \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} <a id='L9947' name='L9947'></a> \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} <a id='L9948' name='L9948'></a> \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} <a id='L9949' name='L9949'></a> \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} <a id='L9950' name='L9950'></a> \DeclareUnicodeCharacter{1E97}{\"t} <a id='L9951' name='L9951'></a> \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} <a id='L9952' name='L9952'></a> \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} <a id='L9953' name='L9953'></a> <a id='L9954' name='L9954'></a> \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} <a id='L9955' name='L9955'></a> \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} <a id='L9956' name='L9956'></a> <a id='L9957' name='L9957'></a> \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} <a id='L9958' name='L9958'></a> \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} <a id='L9959' name='L9959'></a> \DeclareUnicodeCharacter{1EBC}{\~E} <a id='L9960' name='L9960'></a> \DeclareUnicodeCharacter{1EBD}{\~e} <a id='L9961' name='L9961'></a> <a id='L9962' name='L9962'></a> \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} <a id='L9963' name='L9963'></a> \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} <a id='L9964' name='L9964'></a> \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} <a id='L9965' name='L9965'></a> \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} <a id='L9966' name='L9966'></a> <a id='L9967' name='L9967'></a> \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} <a id='L9968' name='L9968'></a> \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} <a id='L9969' name='L9969'></a> <a id='L9970' name='L9970'></a> \DeclareUnicodeCharacter{1EF2}{\`Y} <a id='L9971' name='L9971'></a> \DeclareUnicodeCharacter{1EF3}{\`y} <a id='L9972' name='L9972'></a> \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} <a id='L9973' name='L9973'></a> <a id='L9974' name='L9974'></a> \DeclareUnicodeCharacter{1EF8}{\~Y} <a id='L9975' name='L9975'></a> \DeclareUnicodeCharacter{1EF9}{\~y} <a id='L9976' name='L9976'></a> <a id='L9977' name='L9977'></a> \DeclareUnicodeCharacter{2013}{--} <a id='L9978' name='L9978'></a> \DeclareUnicodeCharacter{2014}{---} <a id='L9979' name='L9979'></a> \DeclareUnicodeCharacter{2018}{\quoteleft} <a id='L9980' name='L9980'></a> \DeclareUnicodeCharacter{2019}{\quoteright} <a id='L9981' name='L9981'></a> \DeclareUnicodeCharacter{201A}{\quotesinglbase} <a id='L9982' name='L9982'></a> \DeclareUnicodeCharacter{201C}{\quotedblleft} <a id='L9983' name='L9983'></a> \DeclareUnicodeCharacter{201D}{\quotedblright} <a id='L9984' name='L9984'></a> \DeclareUnicodeCharacter{201E}{\quotedblbase} <a id='L9985' name='L9985'></a> \DeclareUnicodeCharacter{2022}{\bullet} <a id='L9986' name='L9986'></a> \DeclareUnicodeCharacter{2026}{\dots} <a id='L9987' name='L9987'></a> \DeclareUnicodeCharacter{2039}{\guilsinglleft} <a id='L9988' name='L9988'></a> \DeclareUnicodeCharacter{203A}{\guilsinglright} <a id='L9989' name='L9989'></a> \DeclareUnicodeCharacter{20AC}{\euro} <a id='L9990' name='L9990'></a> <a id='L9991' name='L9991'></a> \DeclareUnicodeCharacter{2192}{\expansion} <a id='L9992' name='L9992'></a> \DeclareUnicodeCharacter{21D2}{\result} <a id='L9993' name='L9993'></a> <a id='L9994' name='L9994'></a> \DeclareUnicodeCharacter{2212}{\minus} <a id='L9995' name='L9995'></a> \DeclareUnicodeCharacter{2217}{\point} <a id='L9996' name='L9996'></a> \DeclareUnicodeCharacter{2261}{\equiv} <a id='L9997' name='L9997'></a>}% end of \utfeightchardefs <a id='L9998' name='L9998'></a> <a id='L9999' name='L9999'></a> <a id='L10000' name='L10000'></a>% US-ASCII character definitions. <a id='L10001' name='L10001'></a>\def\asciichardefs{% nothing need be done <a id='L10002' name='L10002'></a> \relax <a id='L10003' name='L10003'></a>} <a id='L10004' name='L10004'></a> <a id='L10005' name='L10005'></a>% Make non-ASCII characters printable again for compatibility with <a id='L10006' name='L10006'></a>% existing Texinfo documents that may use them, even without declaring a <a id='L10007' name='L10007'></a>% document encoding. <a id='L10008' name='L10008'></a>% <a id='L10009' name='L10009'></a>\setnonasciicharscatcode \other <a id='L10010' name='L10010'></a> <a id='L10011' name='L10011'></a> <a id='L10012' name='L10012'></a>\message{formatting,} <a id='L10013' name='L10013'></a> <a id='L10014' name='L10014'></a>\newdimen\defaultparindent \defaultparindent = 15pt <a id='L10015' name='L10015'></a> <a id='L10016' name='L10016'></a>\chapheadingskip = 15pt plus 4pt minus 2pt <a id='L10017' name='L10017'></a>\secheadingskip = 12pt plus 3pt minus 2pt <a id='L10018' name='L10018'></a>\subsecheadingskip = 9pt plus 2pt minus 2pt <a id='L10019' name='L10019'></a> <a id='L10020' name='L10020'></a>% Prevent underfull vbox error messages. <a id='L10021' name='L10021'></a>\vbadness = 10000 <a id='L10022' name='L10022'></a> <a id='L10023' name='L10023'></a>% Don't be very finicky about underfull hboxes, either. <a id='L10024' name='L10024'></a>\hbadness = 6666 <a id='L10025' name='L10025'></a> <a id='L10026' name='L10026'></a>% Following George Bush, get rid of widows and orphans. <a id='L10027' name='L10027'></a>\widowpenalty=10000 <a id='L10028' name='L10028'></a>\clubpenalty=10000 <a id='L10029' name='L10029'></a> <a id='L10030' name='L10030'></a>% Use TeX 3.0's \emergencystretch to help line breaking, but if we're <a id='L10031' name='L10031'></a>% using an old version of TeX, don't do anything. We want the amount of <a id='L10032' name='L10032'></a>% stretch added to depend on the line length, hence the dependence on <a id='L10033' name='L10033'></a>% \hsize. We call this whenever the paper size is set. <a id='L10034' name='L10034'></a>% <a id='L10035' name='L10035'></a>\def\setemergencystretch{% <a id='L10036' name='L10036'></a> \ifx\emergencystretch\thisisundefined <a id='L10037' name='L10037'></a> % Allow us to assign to \emergencystretch anyway. <a id='L10038' name='L10038'></a> \def\emergencystretch{\dimen0}% <a id='L10039' name='L10039'></a> \else <a id='L10040' name='L10040'></a> \emergencystretch = .15\hsize <a id='L10041' name='L10041'></a> \fi <a id='L10042' name='L10042'></a>} <a id='L10043' name='L10043'></a> <a id='L10044' name='L10044'></a>% Parameters in order: 1) textheight; 2) textwidth; <a id='L10045' name='L10045'></a>% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; <a id='L10046' name='L10046'></a>% 7) physical page height; 8) physical page width. <a id='L10047' name='L10047'></a>% <a id='L10048' name='L10048'></a>% We also call \setleading{\textleading}, so the caller should define <a id='L10049' name='L10049'></a>% \textleading. The caller should also set \parskip. <a id='L10050' name='L10050'></a>% <a id='L10051' name='L10051'></a>\def\internalpagesizes#1#2#3#4#5#6#7#8{% <a id='L10052' name='L10052'></a> \voffset = #3\relax <a id='L10053' name='L10053'></a> \topskip = #6\relax <a id='L10054' name='L10054'></a> \splittopskip = \topskip <a id='L10055' name='L10055'></a> % <a id='L10056' name='L10056'></a> \vsize = #1\relax <a id='L10057' name='L10057'></a> \advance\vsize by \topskip <a id='L10058' name='L10058'></a> \outervsize = \vsize <a id='L10059' name='L10059'></a> \advance\outervsize by 2\topandbottommargin <a id='L10060' name='L10060'></a> \pageheight = \vsize <a id='L10061' name='L10061'></a> % <a id='L10062' name='L10062'></a> \hsize = #2\relax <a id='L10063' name='L10063'></a> \outerhsize = \hsize <a id='L10064' name='L10064'></a> \advance\outerhsize by 0.5in <a id='L10065' name='L10065'></a> \pagewidth = \hsize <a id='L10066' name='L10066'></a> % <a id='L10067' name='L10067'></a> \normaloffset = #4\relax <a id='L10068' name='L10068'></a> \bindingoffset = #5\relax <a id='L10069' name='L10069'></a> % <a id='L10070' name='L10070'></a> \ifpdf <a id='L10071' name='L10071'></a> \pdfpageheight #7\relax <a id='L10072' name='L10072'></a> \pdfpagewidth #8\relax <a id='L10073' name='L10073'></a> % if we don't reset these, they will remain at "1 true in" of <a id='L10074' name='L10074'></a> % whatever layout pdftex was dumped with. <a id='L10075' name='L10075'></a> \pdfhorigin = 1 true in <a id='L10076' name='L10076'></a> \pdfvorigin = 1 true in <a id='L10077' name='L10077'></a> \fi <a id='L10078' name='L10078'></a> % <a id='L10079' name='L10079'></a> \setleading{\textleading} <a id='L10080' name='L10080'></a> % <a id='L10081' name='L10081'></a> \parindent = \defaultparindent <a id='L10082' name='L10082'></a> \setemergencystretch <a id='L10083' name='L10083'></a>} <a id='L10084' name='L10084'></a> <a id='L10085' name='L10085'></a>% @letterpaper (the default). <a id='L10086' name='L10086'></a>\def\letterpaper{{\globaldefs = 1 <a id='L10087' name='L10087'></a> \parskip = 3pt plus 2pt minus 1pt <a id='L10088' name='L10088'></a> \textleading = 13.2pt <a id='L10089' name='L10089'></a> % <a id='L10090' name='L10090'></a> % If page is nothing but text, make it come out even. <a id='L10091' name='L10091'></a> \internalpagesizes{607.2pt}{6in}% that's 46 lines <a id='L10092' name='L10092'></a> {\voffset}{.25in}% <a id='L10093' name='L10093'></a> {\bindingoffset}{36pt}% <a id='L10094' name='L10094'></a> {11in}{8.5in}% <a id='L10095' name='L10095'></a>}} <a id='L10096' name='L10096'></a> <a id='L10097' name='L10097'></a>% Use @smallbook to reset parameters for 7x9.25 trim size. <a id='L10098' name='L10098'></a>\def\smallbook{{\globaldefs = 1 <a id='L10099' name='L10099'></a> \parskip = 2pt plus 1pt <a id='L10100' name='L10100'></a> \textleading = 12pt <a id='L10101' name='L10101'></a> % <a id='L10102' name='L10102'></a> \internalpagesizes{7.5in}{5in}% <a id='L10103' name='L10103'></a> {-.2in}{0in}% <a id='L10104' name='L10104'></a> {\bindingoffset}{16pt}% <a id='L10105' name='L10105'></a> {9.25in}{7in}% <a id='L10106' name='L10106'></a> % <a id='L10107' name='L10107'></a> \lispnarrowing = 0.3in <a id='L10108' name='L10108'></a> \tolerance = 700 <a id='L10109' name='L10109'></a> \hfuzz = 1pt <a id='L10110' name='L10110'></a> \contentsrightmargin = 0pt <a id='L10111' name='L10111'></a> \defbodyindent = .5cm <a id='L10112' name='L10112'></a>}} <a id='L10113' name='L10113'></a> <a id='L10114' name='L10114'></a>% Use @smallerbook to reset parameters for 6x9 trim size. <a id='L10115' name='L10115'></a>% (Just testing, parameters still in flux.) <a id='L10116' name='L10116'></a>\def\smallerbook{{\globaldefs = 1 <a id='L10117' name='L10117'></a> \parskip = 1.5pt plus 1pt <a id='L10118' name='L10118'></a> \textleading = 12pt <a id='L10119' name='L10119'></a> % <a id='L10120' name='L10120'></a> \internalpagesizes{7.4in}{4.8in}% <a id='L10121' name='L10121'></a> {-.2in}{-.4in}% <a id='L10122' name='L10122'></a> {0pt}{14pt}% <a id='L10123' name='L10123'></a> {9in}{6in}% <a id='L10124' name='L10124'></a> % <a id='L10125' name='L10125'></a> \lispnarrowing = 0.25in <a id='L10126' name='L10126'></a> \tolerance = 700 <a id='L10127' name='L10127'></a> \hfuzz = 1pt <a id='L10128' name='L10128'></a> \contentsrightmargin = 0pt <a id='L10129' name='L10129'></a> \defbodyindent = .4cm <a id='L10130' name='L10130'></a>}} <a id='L10131' name='L10131'></a> <a id='L10132' name='L10132'></a>% Use @afourpaper to print on European A4 paper. <a id='L10133' name='L10133'></a>\def\afourpaper{{\globaldefs = 1 <a id='L10134' name='L10134'></a> \parskip = 3pt plus 2pt minus 1pt <a id='L10135' name='L10135'></a> \textleading = 13.2pt <a id='L10136' name='L10136'></a> % <a id='L10137' name='L10137'></a> % Double-side printing via postscript on Laserjet 4050 <a id='L10138' name='L10138'></a> % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. <a id='L10139' name='L10139'></a> % To change the settings for a different printer or situation, adjust <a id='L10140' name='L10140'></a> % \normaloffset until the front-side and back-side texts align. Then <a id='L10141' name='L10141'></a> % do the same for \bindingoffset. You can set these for testing in <a id='L10142' name='L10142'></a> % your texinfo source file like this: <a id='L10143' name='L10143'></a> % @tex <a id='L10144' name='L10144'></a> % \global\normaloffset = -6mm <a id='L10145' name='L10145'></a> % \global\bindingoffset = 10mm <a id='L10146' name='L10146'></a> % @end tex <a id='L10147' name='L10147'></a> \internalpagesizes{673.2pt}{160mm}% that's 51 lines <a id='L10148' name='L10148'></a> {\voffset}{\hoffset}% <a id='L10149' name='L10149'></a> {\bindingoffset}{44pt}% <a id='L10150' name='L10150'></a> {297mm}{210mm}% <a id='L10151' name='L10151'></a> % <a id='L10152' name='L10152'></a> \tolerance = 700 <a id='L10153' name='L10153'></a> \hfuzz = 1pt <a id='L10154' name='L10154'></a> \contentsrightmargin = 0pt <a id='L10155' name='L10155'></a> \defbodyindent = 5mm <a id='L10156' name='L10156'></a>}} <a id='L10157' name='L10157'></a> <a id='L10158' name='L10158'></a>% Use @afivepaper to print on European A5 paper. <a id='L10159' name='L10159'></a>% From romildo@urano.iceb.ufop.br, 2 July 2000. <a id='L10160' name='L10160'></a>% He also recommends making @example and @lisp be small. <a id='L10161' name='L10161'></a>\def\afivepaper{{\globaldefs = 1 <a id='L10162' name='L10162'></a> \parskip = 2pt plus 1pt minus 0.1pt <a id='L10163' name='L10163'></a> \textleading = 12.5pt <a id='L10164' name='L10164'></a> % <a id='L10165' name='L10165'></a> \internalpagesizes{160mm}{120mm}% <a id='L10166' name='L10166'></a> {\voffset}{\hoffset}% <a id='L10167' name='L10167'></a> {\bindingoffset}{8pt}% <a id='L10168' name='L10168'></a> {210mm}{148mm}% <a id='L10169' name='L10169'></a> % <a id='L10170' name='L10170'></a> \lispnarrowing = 0.2in <a id='L10171' name='L10171'></a> \tolerance = 800 <a id='L10172' name='L10172'></a> \hfuzz = 1.2pt <a id='L10173' name='L10173'></a> \contentsrightmargin = 0pt <a id='L10174' name='L10174'></a> \defbodyindent = 2mm <a id='L10175' name='L10175'></a> \tableindent = 12mm <a id='L10176' name='L10176'></a>}} <a id='L10177' name='L10177'></a> <a id='L10178' name='L10178'></a>% A specific text layout, 24x15cm overall, intended for A4 paper. <a id='L10179' name='L10179'></a>\def\afourlatex{{\globaldefs = 1 <a id='L10180' name='L10180'></a> \afourpaper <a id='L10181' name='L10181'></a> \internalpagesizes{237mm}{150mm}% <a id='L10182' name='L10182'></a> {\voffset}{4.6mm}% <a id='L10183' name='L10183'></a> {\bindingoffset}{7mm}% <a id='L10184' name='L10184'></a> {297mm}{210mm}% <a id='L10185' name='L10185'></a> % <a id='L10186' name='L10186'></a> % Must explicitly reset to 0 because we call \afourpaper. <a id='L10187' name='L10187'></a> \globaldefs = 0 <a id='L10188' name='L10188'></a>}} <a id='L10189' name='L10189'></a> <a id='L10190' name='L10190'></a>% Use @afourwide to print on A4 paper in landscape format. <a id='L10191' name='L10191'></a>\def\afourwide{{\globaldefs = 1 <a id='L10192' name='L10192'></a> \afourpaper <a id='L10193' name='L10193'></a> \internalpagesizes{241mm}{165mm}% <a id='L10194' name='L10194'></a> {\voffset}{-2.95mm}% <a id='L10195' name='L10195'></a> {\bindingoffset}{7mm}% <a id='L10196' name='L10196'></a> {297mm}{210mm}% <a id='L10197' name='L10197'></a> \globaldefs = 0 <a id='L10198' name='L10198'></a>}} <a id='L10199' name='L10199'></a> <a id='L10200' name='L10200'></a>% @pagesizes TEXTHEIGHT[,TEXTWIDTH] <a id='L10201' name='L10201'></a>% Perhaps we should allow setting the margins, \topskip, \parskip, <a id='L10202' name='L10202'></a>% and/or leading, also. Or perhaps we should compute them somehow. <a id='L10203' name='L10203'></a>% <a id='L10204' name='L10204'></a>\parseargdef\pagesizes{\pagesizesyyy #1,,\finish} <a id='L10205' name='L10205'></a>\def\pagesizesyyy#1,#2,#3\finish{{% <a id='L10206' name='L10206'></a> \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi <a id='L10207' name='L10207'></a> \globaldefs = 1 <a id='L10208' name='L10208'></a> % <a id='L10209' name='L10209'></a> \parskip = 3pt plus 2pt minus 1pt <a id='L10210' name='L10210'></a> \setleading{\textleading}% <a id='L10211' name='L10211'></a> % <a id='L10212' name='L10212'></a> \dimen0 = #1\relax <a id='L10213' name='L10213'></a> \advance\dimen0 by \voffset <a id='L10214' name='L10214'></a> % <a id='L10215' name='L10215'></a> \dimen2 = \hsize <a id='L10216' name='L10216'></a> \advance\dimen2 by \normaloffset <a id='L10217' name='L10217'></a> % <a id='L10218' name='L10218'></a> \internalpagesizes{#1}{\hsize}% <a id='L10219' name='L10219'></a> {\voffset}{\normaloffset}% <a id='L10220' name='L10220'></a> {\bindingoffset}{44pt}% <a id='L10221' name='L10221'></a> {\dimen0}{\dimen2}% <a id='L10222' name='L10222'></a>}} <a id='L10223' name='L10223'></a> <a id='L10224' name='L10224'></a>% Set default to letter. <a id='L10225' name='L10225'></a>% <a id='L10226' name='L10226'></a>\letterpaper <a id='L10227' name='L10227'></a> <a id='L10228' name='L10228'></a> <a id='L10229' name='L10229'></a>\message{and turning on texinfo input format.} <a id='L10230' name='L10230'></a> <a id='L10231' name='L10231'></a>\def^^L{\par} % remove \outer, so ^L can appear in an @comment <a id='L10232' name='L10232'></a> <a id='L10233' name='L10233'></a>% DEL is a comment character, in case @c does not suffice. <a id='L10234' name='L10234'></a>\catcode`\^^? = 14 <a id='L10235' name='L10235'></a> <a id='L10236' name='L10236'></a>% Define macros to output various characters with catcode for normal text. <a id='L10237' name='L10237'></a>\catcode`\"=\other \def\normaldoublequote{"} <a id='L10238' name='L10238'></a>\catcode`\$=\other \def\normaldollar{$}%$ font-lock fix <a id='L10239' name='L10239'></a>\catcode`\+=\other \def\normalplus{+} <a id='L10240' name='L10240'></a>\catcode`\<=\other \def\normalless{<} <a id='L10241' name='L10241'></a>\catcode`\>=\other \def\normalgreater{>} <a id='L10242' name='L10242'></a>\catcode`\^=\other \def\normalcaret{^} <a id='L10243' name='L10243'></a>\catcode`\_=\other \def\normalunderscore{_} <a id='L10244' name='L10244'></a>\catcode`\|=\other \def\normalverticalbar{|} <a id='L10245' name='L10245'></a>\catcode`\~=\other \def\normaltilde{~} <a id='L10246' name='L10246'></a> <a id='L10247' name='L10247'></a>% This macro is used to make a character print one way in \tt <a id='L10248' name='L10248'></a>% (where it can probably be output as-is), and another way in other fonts, <a id='L10249' name='L10249'></a>% where something hairier probably needs to be done. <a id='L10250' name='L10250'></a>% <a id='L10251' name='L10251'></a>% #1 is what to print if we are indeed using \tt; #2 is what to print <a id='L10252' name='L10252'></a>% otherwise. Since all the Computer Modern typewriter fonts have zero <a id='L10253' name='L10253'></a>% interword stretch (and shrink), and it is reasonable to expect all <a id='L10254' name='L10254'></a>% typewriter fonts to have this, we can check that font parameter. <a id='L10255' name='L10255'></a>% <a id='L10256' name='L10256'></a>\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi} <a id='L10257' name='L10257'></a> <a id='L10258' name='L10258'></a>% Same as above, but check for italic font. Actually this also catches <a id='L10259' name='L10259'></a>% non-italic slanted fonts since it is impossible to distinguish them from <a id='L10260' name='L10260'></a>% italic fonts. But since this is only used by $ and it uses \sl anyway <a id='L10261' name='L10261'></a>% this is not a problem. <a id='L10262' name='L10262'></a>\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} <a id='L10263' name='L10263'></a> <a id='L10264' name='L10264'></a>% Turn off all special characters except @ <a id='L10265' name='L10265'></a>% (and those which the user can use as if they were ordinary). <a id='L10266' name='L10266'></a>% Most of these we simply print from the \tt font, but for some, we can <a id='L10267' name='L10267'></a>% use math or other variants that look better in normal text. <a id='L10268' name='L10268'></a> <a id='L10269' name='L10269'></a>\catcode`\"=\active <a id='L10270' name='L10270'></a>\def\activedoublequote{{\tt\char34}} <a id='L10271' name='L10271'></a>\let"=\activedoublequote <a id='L10272' name='L10272'></a>\catcode`\~=\active <a id='L10273' name='L10273'></a>\def~{{\tt\char126}} <a id='L10274' name='L10274'></a>\chardef\hat=`\^ <a id='L10275' name='L10275'></a>\catcode`\^=\active <a id='L10276' name='L10276'></a>\def^{{\tt \hat}} <a id='L10277' name='L10277'></a> <a id='L10278' name='L10278'></a>\catcode`\_=\active <a id='L10279' name='L10279'></a>\def_{\ifusingtt\normalunderscore\_} <a id='L10280' name='L10280'></a>\let\realunder=_ <a id='L10281' name='L10281'></a>% Subroutine for the previous macro. <a id='L10282' name='L10282'></a>\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } <a id='L10283' name='L10283'></a> <a id='L10284' name='L10284'></a>\catcode`\|=\active <a id='L10285' name='L10285'></a>\def|{{\tt\char124}} <a id='L10286' name='L10286'></a>\chardef \less=`\< <a id='L10287' name='L10287'></a>\catcode`\<=\active <a id='L10288' name='L10288'></a>\def<{{\tt \less}} <a id='L10289' name='L10289'></a>\chardef \gtr=`\> <a id='L10290' name='L10290'></a>\catcode`\>=\active <a id='L10291' name='L10291'></a>\def>{{\tt \gtr}} <a id='L10292' name='L10292'></a>\catcode`\+=\active <a id='L10293' name='L10293'></a>\def+{{\tt \char 43}} <a id='L10294' name='L10294'></a>\catcode`\$=\active <a id='L10295' name='L10295'></a>\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix <a id='L10296' name='L10296'></a> <a id='L10297' name='L10297'></a>% If a .fmt file is being used, characters that might appear in a file <a id='L10298' name='L10298'></a>% name cannot be active until we have parsed the command line. <a id='L10299' name='L10299'></a>% So turn them off again, and have \everyjob (or @setfilename) turn them on. <a id='L10300' name='L10300'></a>% \otherifyactive is called near the end of this file. <a id='L10301' name='L10301'></a>\def\otherifyactive{\catcode`+=\other \catcode`\_=\other} <a id='L10302' name='L10302'></a> <a id='L10303' name='L10303'></a>% Used sometimes to turn off (effectively) the active characters even after <a id='L10304' name='L10304'></a>% parsing them. <a id='L10305' name='L10305'></a>\def\turnoffactive{% <a id='L10306' name='L10306'></a> \normalturnoffactive <a id='L10307' name='L10307'></a> \otherbackslash <a id='L10308' name='L10308'></a>} <a id='L10309' name='L10309'></a> <a id='L10310' name='L10310'></a>\catcode`\@=0 <a id='L10311' name='L10311'></a> <a id='L10312' name='L10312'></a>% \backslashcurfont outputs one backslash character in current font, <a id='L10313' name='L10313'></a>% as in \char`\\. <a id='L10314' name='L10314'></a>\global\chardef\backslashcurfont=`\\ <a id='L10315' name='L10315'></a>\global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work <a id='L10316' name='L10316'></a> <a id='L10317' name='L10317'></a>% \realbackslash is an actual character `\' with catcode other, and <a id='L10318' name='L10318'></a>% \doublebackslash is two of them (for the pdf outlines). <a id='L10319' name='L10319'></a>{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} <a id='L10320' name='L10320'></a> <a id='L10321' name='L10321'></a>% In texinfo, backslash is an active character; it prints the backslash <a id='L10322' name='L10322'></a>% in fixed width font. <a id='L10323' name='L10323'></a>\catcode`\\=\active % @ for escape char from now on. <a id='L10324' name='L10324'></a> <a id='L10325' name='L10325'></a>% The story here is that in math mode, the \char of \backslashcurfont <a id='L10326' name='L10326'></a>% ends up printing the roman \ from the math symbol font (because \char <a id='L10327' name='L10327'></a>% in math mode uses the \mathcode, and plain.tex sets <a id='L10328' name='L10328'></a>% \mathcode`\\="026E). It seems better for @backslashchar{} to always <a id='L10329' name='L10329'></a>% print a typewriter backslash, hence we use an explicit \mathchar, <a id='L10330' name='L10330'></a>% which is the decimal equivalent of "715c (class 7, e.g., use \fam; <a id='L10331' name='L10331'></a>% ignored family value; char position "5C). We can't use " for the <a id='L10332' name='L10332'></a>% usual hex value because it has already been made active. <a id='L10333' name='L10333'></a>@def@normalbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}} <a id='L10334' name='L10334'></a>@let@backslashchar = @normalbackslash % @backslashchar{} is for user documents. <a id='L10335' name='L10335'></a> <a id='L10336' name='L10336'></a>% On startup, @fixbackslash assigns: <a id='L10337' name='L10337'></a>% @let \ = @normalbackslash <a id='L10338' name='L10338'></a>% \rawbackslash defines an active \ to do \backslashcurfont. <a id='L10339' name='L10339'></a>% \otherbackslash defines an active \ to be a literal `\' character with <a id='L10340' name='L10340'></a>% catcode other. We switch back and forth between these. <a id='L10341' name='L10341'></a>@gdef@rawbackslash{@let\=@backslashcurfont} <a id='L10342' name='L10342'></a>@gdef@otherbackslash{@let\=@realbackslash} <a id='L10343' name='L10343'></a> <a id='L10344' name='L10344'></a>% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of <a id='L10345' name='L10345'></a>% the literal character `\'. Also revert - to its normal character, in <a id='L10346' name='L10346'></a>% case the active - from code has slipped in. <a id='L10347' name='L10347'></a>% <a id='L10348' name='L10348'></a>{@catcode`- = @active <a id='L10349' name='L10349'></a> @gdef@normalturnoffactive{% <a id='L10350' name='L10350'></a> @let-=@normaldash <a id='L10351' name='L10351'></a> @let"=@normaldoublequote <a id='L10352' name='L10352'></a> @let$=@normaldollar %$ font-lock fix <a id='L10353' name='L10353'></a> @let+=@normalplus <a id='L10354' name='L10354'></a> @let<=@normalless <a id='L10355' name='L10355'></a> @let>=@normalgreater <a id='L10356' name='L10356'></a> @let\=@normalbackslash <a id='L10357' name='L10357'></a> @let^=@normalcaret <a id='L10358' name='L10358'></a> @let_=@normalunderscore <a id='L10359' name='L10359'></a> @let|=@normalverticalbar <a id='L10360' name='L10360'></a> @let~=@normaltilde <a id='L10361' name='L10361'></a> @markupsetuplqdefault <a id='L10362' name='L10362'></a> @markupsetuprqdefault <a id='L10363' name='L10363'></a> @unsepspaces <a id='L10364' name='L10364'></a> } <a id='L10365' name='L10365'></a>} <a id='L10366' name='L10366'></a> <a id='L10367' name='L10367'></a>% Make _ and + \other characters, temporarily. <a id='L10368' name='L10368'></a>% This is canceled by @fixbackslash. <a id='L10369' name='L10369'></a>@otherifyactive <a id='L10370' name='L10370'></a> <a id='L10371' name='L10371'></a>% If a .fmt file is being used, we don't want the `\input texinfo' to show up. <a id='L10372' name='L10372'></a>% That is what \eatinput is for; after that, the `\' should revert to printing <a id='L10373' name='L10373'></a>% a backslash. <a id='L10374' name='L10374'></a>% <a id='L10375' name='L10375'></a>@gdef@eatinput input texinfo{@fixbackslash} <a id='L10376' name='L10376'></a>@global@let\ = @eatinput <a id='L10377' name='L10377'></a> <a id='L10378' name='L10378'></a>% On the other hand, perhaps the file did not have a `\input texinfo'. Then <a id='L10379' name='L10379'></a>% the first `\' in the file would cause an error. This macro tries to fix <a id='L10380' name='L10380'></a>% that, assuming it is called before the first `\' could plausibly occur. <a id='L10381' name='L10381'></a>% Also turn back on active characters that might appear in the input <a id='L10382' name='L10382'></a>% file name, in case not using a pre-dumped format. <a id='L10383' name='L10383'></a>% <a id='L10384' name='L10384'></a>@gdef@fixbackslash{% <a id='L10385' name='L10385'></a> @ifx\@eatinput @let\ = @normalbackslash @fi <a id='L10386' name='L10386'></a> @catcode`+=@active <a id='L10387' name='L10387'></a> @catcode`@_=@active <a id='L10388' name='L10388'></a>} <a id='L10389' name='L10389'></a> <a id='L10390' name='L10390'></a>% Say @foo, not \foo, in error messages. <a id='L10391' name='L10391'></a>@escapechar = `@@ <a id='L10392' name='L10392'></a> <a id='L10393' name='L10393'></a>% These (along with & and #) are made active for url-breaking, so need <a id='L10394' name='L10394'></a>% active definitions as the normal characters. <a id='L10395' name='L10395'></a>@def@normaldot{.} <a id='L10396' name='L10396'></a>@def@normalquest{?} <a id='L10397' name='L10397'></a>@def@normalslash{/} <a id='L10398' name='L10398'></a> <a id='L10399' name='L10399'></a>% These look ok in all fonts, so just make them not special. <a id='L10400' name='L10400'></a>% @hashchar{} gets its own user-level command, because of #line. <a id='L10401' name='L10401'></a>@catcode`@& = @other @def@normalamp{&} <a id='L10402' name='L10402'></a>@catcode`@# = @other @def@normalhash{#} <a id='L10403' name='L10403'></a>@catcode`@% = @other @def@normalpercent{%} <a id='L10404' name='L10404'></a> <a id='L10405' name='L10405'></a>@let @hashchar = @normalhash <a id='L10406' name='L10406'></a> <a id='L10407' name='L10407'></a>@c Finally, make ` and ' active, so that txicodequoteundirected and <a id='L10408' name='L10408'></a>@c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we <a id='L10409' name='L10409'></a>@c don't make ` and ' active, @code will not get them as active chars. <a id='L10410' name='L10410'></a>@c Do this last of all since we use ` in the previous @catcode assignments. <a id='L10411' name='L10411'></a>@catcode`@'=@active <a id='L10412' name='L10412'></a>@catcode`@`=@active <a id='L10413' name='L10413'></a>@markupsetuplqdefault <a id='L10414' name='L10414'></a>@markupsetuprqdefault <a id='L10415' name='L10415'></a> <a id='L10416' name='L10416'></a>@c Local variables: <a id='L10417' name='L10417'></a>@c eval: (add-hook 'write-file-hooks 'time-stamp) <a id='L10418' name='L10418'></a>@c page-delimiter: "^\\\\message" <a id='L10419' name='L10419'></a>@c time-stamp-start: "def\\\\texinfoversion{" <a id='L10420' name='L10420'></a>@c time-stamp-format: "%:y-%02m-%02d.%02H" <a id='L10421' name='L10421'></a>@c time-stamp-end: "}" <a id='L10422' name='L10422'></a>@c End: <a id='L10423' name='L10423'></a> <a id='L10424' name='L10424'></a>@c vim:sw=2: <a id='L10425' name='L10425'></a> <a id='L10426' name='L10426'></a>@ignore <a id='L10427' name='L10427'></a> arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 <a id='L10428' name='L10428'></a>@end ignore </pre> <hr /> <a id='BOTTOM' name='BOTTOM'></a> <em class='comment'>/* [<][>][^][v]<a href='#TOP'>[top]</a>[bottom]<a href='../mains.html'>[index]</a><a href='../help.html'>[help]</a> */</em> </body> </html>