<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>texinfo.tex</title>
<style type="text/css">
.enscript-comment { font-style: italic; color: rgb(178,34,34); }
.enscript-function-name { font-weight: bold; color: rgb(0,0,255); }
.enscript-variable-name { font-weight: bold; color: rgb(184,134,11); }
.enscript-keyword { font-weight: bold; color: rgb(160,32,240); }
.enscript-reference { font-weight: bold; color: rgb(95,158,160); }
.enscript-string { font-weight: bold; color: rgb(188,143,143); }
.enscript-builtin { font-weight: bold; color: rgb(218,112,214); }
.enscript-type { font-weight: bold; color: rgb(34,139,34); }
.enscript-highlight { text-decoration: underline; color: 0; }
</style>
</head>
<body id="top">
<h1 style="margin:8px;" id="f1">texinfo.tex&nbsp;&nbsp;&nbsp;<span style="font-weight: normal; font-size: 0.5em;">[<a href="texinfo.tex">plain text</a>]</span></h1>
<hr/>
<div></div>
<pre>
<span class="enscript-comment">% texinfo.tex -- TeX macros to handle Texinfo files.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% Load plain if necessary, i.e., if running under initex.
</span><span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\csname</span> fmtname<span class="enscript-keyword">\endcsname</span><span class="enscript-keyword">\relax</span><span class="enscript-keyword">\input</span> plain<span class="enscript-keyword">\fi</span>
<span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\texinfoversion</span>{2007-05-04.09}
<span class="enscript-comment">%
</span><span class="enscript-comment">% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
</span><span class="enscript-comment">% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
</span><span class="enscript-comment">% 2007 Free Software Foundation, Inc.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% This texinfo.tex file is free software; you can redistribute it and/or
</span><span class="enscript-comment">% modify it under the terms of the GNU General Public License as
</span><span class="enscript-comment">% published by the Free Software Foundation; either version 2, or (at
</span><span class="enscript-comment">% your option) any later version.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% This texinfo.tex file is distributed in the hope that it will be
</span><span class="enscript-comment">% useful, but WITHOUT ANY WARRANTY; without even the implied warranty
</span><span class="enscript-comment">% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
</span><span class="enscript-comment">% General Public License for more details.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% You should have received a copy of the GNU General Public License
</span><span class="enscript-comment">% along with this texinfo.tex file; see the file COPYING.  If not, write
</span><span class="enscript-comment">% to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
</span><span class="enscript-comment">% Boston, MA 02110-1301, USA.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% As a special exception, when this file is read by TeX when processing
</span><span class="enscript-comment">% a Texinfo source document, you may use the result without
</span><span class="enscript-comment">% restriction.  (This has been our intent since Texinfo was invented.)
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% Please try the latest version of texinfo.tex before submitting bug
</span><span class="enscript-comment">% reports; you can get the latest version from:
</span><span class="enscript-comment">%   <a href="http://www.gnu.org/software/texinfo/">http://www.gnu.org/software/texinfo/</a> (the Texinfo home page), or
</span><span class="enscript-comment">%   <a href="ftp://tug.org/tex/texinfo.tex">ftp://tug.org/tex/texinfo.tex</a>
</span><span class="enscript-comment">%     (and all CTAN mirrors, see <a href="http://www.ctan.org">http://www.ctan.org</a>).
</span><span class="enscript-comment">% The texinfo.tex in any given distribution could well be out
</span><span class="enscript-comment">% of date, so if that's what you're using, please check.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% Send bug reports to <a href="mailto:bug-texinfo@gnu.org">bug-texinfo@gnu.org</a>.  Please include including a
</span><span class="enscript-comment">% complete document in each bug report with which we can reproduce the
</span><span class="enscript-comment">% problem.  Patches are, of course, greatly appreciated.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% To process a Texinfo manual with TeX, it's most reliable to use the
</span><span class="enscript-comment">% texi2dvi shell script that comes with the distribution.  For a simple
</span><span class="enscript-comment">% manual foo.texi, however, you can get away with this:
</span><span class="enscript-comment">%   tex foo.texi
</span><span class="enscript-comment">%   texindex foo.??
</span><span class="enscript-comment">%   tex foo.texi
</span><span class="enscript-comment">%   tex foo.texi
</span><span class="enscript-comment">%   dvips foo.dvi -o  # or whatever; this makes foo.ps.
</span><span class="enscript-comment">% The extra TeX runs get the cross-reference information correct.
</span><span class="enscript-comment">% Sometimes one run after texindex suffices, and sometimes you need more
</span><span class="enscript-comment">% than two; texi2dvi does it as many times as necessary.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% It is possible to adapt texinfo.tex for other languages, to some
</span><span class="enscript-comment">% extent.  You can get the existing language-specific files from the
</span><span class="enscript-comment">% full Texinfo distribution.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% The GNU Texinfo home page is <a href="http://www.gnu.org/software/texinfo.">http://www.gnu.org/software/texinfo.</a>
</span>

<span class="enscript-keyword">\message</span>{Loading texinfo [version <span class="enscript-keyword">\texinfoversion</span>]:}

<span class="enscript-comment">% If in a .fmt file, print the version number
</span><span class="enscript-comment">% and turn on active characters that we couldn't do earlier because
</span><span class="enscript-comment">% they might have appeared in the input file name.
</span><span class="enscript-keyword">\everyjob</span>{<span class="enscript-keyword">\message</span>{[Texinfo version <span class="enscript-keyword">\texinfoversion</span>]}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\catcode</span>`+=<span class="enscript-keyword">\active</span> <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\_</span>=<span class="enscript-keyword">\active</span>}


<span class="enscript-keyword">\chardef</span><span class="enscript-keyword">\other</span>=12

<span class="enscript-comment">% We never want plain's \outer definition of \+ in Texinfo.
</span><span class="enscript-comment">% For @tex, we can use \tabalign.
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\+</span> = <span class="enscript-keyword">\relax</span>

<span class="enscript-comment">% Save some plain tex macros whose names we will redefine.
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\ptexb</span>=<span class="enscript-keyword">\b</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\ptexbullet</span>=<span class="enscript-keyword">\bullet</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\ptexc</span>=<span class="enscript-keyword">\c</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\ptexcomma</span>=<span class="enscript-keyword">\,</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\ptexdot</span>=<span class="enscript-keyword">\.</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\ptexdots</span>=<span class="enscript-keyword">\dots</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\ptexend</span>=<span class="enscript-keyword">\end</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\ptexequiv</span>=<span class="enscript-keyword">\equiv</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\ptexexclam</span>=<span class="enscript-keyword">\!</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\ptexfootnote</span>=<span class="enscript-keyword">\footnote</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\ptexgtr</span>=&gt;
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\ptexhat</span>=^
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\ptexi</span>=<span class="enscript-keyword">\i</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\ptexindent</span>=<span class="enscript-keyword">\indent</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\ptexinsert</span>=<span class="enscript-keyword">\insert</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\ptexlbrace</span>=<span class="enscript-keyword">\{</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\ptexless</span>=&lt;
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\ptexnewwrite</span><span class="enscript-keyword">\newwrite</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\ptexnoindent</span>=<span class="enscript-keyword">\noindent</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\ptexplus</span>=+
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\ptexrbrace</span>=<span class="enscript-keyword">\}</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\ptexslash</span>=<span class="enscript-keyword">\/</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\ptexstar</span>=<span class="enscript-keyword">\*</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\ptext</span>=<span class="enscript-keyword">\t</span>

<span class="enscript-comment">% If this character appears in an error message or help string, it
</span><span class="enscript-comment">% starts a new line in the output.
</span><span class="enscript-keyword">\newlinechar</span> = `^^J

<span class="enscript-comment">% Use TeX 3.0's \inputlineno to get the line number, for better error
</span><span class="enscript-comment">% messages, but if we're using an old version of TeX, don't do anything.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\inputlineno</span><span class="enscript-keyword">\thisisundefined</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\linenumber</span> = <span class="enscript-keyword">\empty</span> <span class="enscript-comment">% Pre-3.0.
</span><span class="enscript-keyword">\else</span>
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\linenumber</span>{l.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\inputlineno</span>:<span class="enscript-keyword">\space</span>}
<span class="enscript-keyword">\fi</span>

<span class="enscript-comment">% Set up fixed words for English if not already set.
</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordAppendix</span><span class="enscript-keyword">\undefined</span>  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordAppendix</span>{Appendix}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordChapter</span><span class="enscript-keyword">\undefined</span>   <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordChapter</span>{Chapter}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordfile</span><span class="enscript-keyword">\undefined</span>      <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordfile</span>{file}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordin</span><span class="enscript-keyword">\undefined</span>        <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordin</span>{in}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordIndexIsEmpty</span><span class="enscript-keyword">\undefined</span>     <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordIndexIsEmpty</span>{(Index is empty)}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordIndexNonexistent</span><span class="enscript-keyword">\undefined</span> <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordIndexNonexistent</span>{(Index is nonexistent)}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordInfo</span><span class="enscript-keyword">\undefined</span>      <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordInfo</span>{Info}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordInstanceVariableof</span><span class="enscript-keyword">\undefined</span> <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordInstanceVariableof</span>{Instance Variable of}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordMethodon</span><span class="enscript-keyword">\undefined</span>  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordMethodon</span>{Method on}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordNoTitle</span><span class="enscript-keyword">\undefined</span>   <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordNoTitle</span>{No Title}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordof</span><span class="enscript-keyword">\undefined</span>        <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordof</span>{of}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordon</span><span class="enscript-keyword">\undefined</span>        <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordon</span>{on}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordpage</span><span class="enscript-keyword">\undefined</span>      <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordpage</span>{page}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordsection</span><span class="enscript-keyword">\undefined</span>   <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordsection</span>{section}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordSection</span><span class="enscript-keyword">\undefined</span>   <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordSection</span>{Section}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordsee</span><span class="enscript-keyword">\undefined</span>       <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordsee</span>{see}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordSee</span><span class="enscript-keyword">\undefined</span>       <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordSee</span>{See}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordShortTOC</span><span class="enscript-keyword">\undefined</span>  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordShortTOC</span>{Short Contents}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordTOC</span><span class="enscript-keyword">\undefined</span>       <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordTOC</span>{Table of Contents}<span class="enscript-keyword">\fi</span>
<span class="enscript-comment">%
</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordMJan</span><span class="enscript-keyword">\undefined</span> <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordMJan</span>{January}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordMFeb</span><span class="enscript-keyword">\undefined</span> <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordMFeb</span>{February}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordMMar</span><span class="enscript-keyword">\undefined</span> <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordMMar</span>{March}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordMApr</span><span class="enscript-keyword">\undefined</span> <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordMApr</span>{April}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordMMay</span><span class="enscript-keyword">\undefined</span> <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordMMay</span>{May}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordMJun</span><span class="enscript-keyword">\undefined</span> <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordMJun</span>{June}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordMJul</span><span class="enscript-keyword">\undefined</span> <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordMJul</span>{July}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordMAug</span><span class="enscript-keyword">\undefined</span> <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordMAug</span>{August}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordMSep</span><span class="enscript-keyword">\undefined</span> <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordMSep</span>{September}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordMOct</span><span class="enscript-keyword">\undefined</span> <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordMOct</span>{October}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordMNov</span><span class="enscript-keyword">\undefined</span> <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordMNov</span>{November}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordMDec</span><span class="enscript-keyword">\undefined</span> <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordMDec</span>{December}<span class="enscript-keyword">\fi</span>
<span class="enscript-comment">%
</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordDefmac</span><span class="enscript-keyword">\undefined</span>    <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordDefmac</span>{Macro}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordDefspec</span><span class="enscript-keyword">\undefined</span>   <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordDefspec</span>{Special Form}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordDefvar</span><span class="enscript-keyword">\undefined</span>    <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordDefvar</span>{Variable}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordDefopt</span><span class="enscript-keyword">\undefined</span>    <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordDefopt</span>{User Option}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\putwordDeffunc</span><span class="enscript-keyword">\undefined</span>   <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\putwordDeffunc</span>{Function}<span class="enscript-keyword">\fi</span>

<span class="enscript-comment">% Since the category of space is not known, we have to be careful.
</span><span class="enscript-keyword">\chardef</span><span class="enscript-keyword">\spacecat</span> = 10
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\spaceisspace</span>{<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\ </span>=<span class="enscript-keyword">\spacecat</span>}

<span class="enscript-comment">% sometimes characters are active, so we need control sequences.
</span><span class="enscript-keyword">\chardef</span><span class="enscript-keyword">\colonChar</span> = `<span class="enscript-keyword">\:</span>
<span class="enscript-keyword">\chardef</span><span class="enscript-keyword">\commaChar</span> = `<span class="enscript-keyword">\,</span>
<span class="enscript-keyword">\chardef</span><span class="enscript-keyword">\dashChar</span>  = `<span class="enscript-keyword">\-</span>
<span class="enscript-keyword">\chardef</span><span class="enscript-keyword">\dotChar</span>   = `<span class="enscript-keyword">\.</span>
<span class="enscript-keyword">\chardef</span><span class="enscript-keyword">\exclamChar</span>= `<span class="enscript-keyword">\!</span>
<span class="enscript-keyword">\chardef</span><span class="enscript-keyword">\lquoteChar</span>= `<span class="enscript-keyword">\`</span>
<span class="enscript-keyword">\chardef</span><span class="enscript-keyword">\questChar</span> = `<span class="enscript-keyword">\?</span>
<span class="enscript-keyword">\chardef</span><span class="enscript-keyword">\rquoteChar</span>= `<span class="enscript-keyword">\'</span>
<span class="enscript-keyword">\chardef</span><span class="enscript-keyword">\semiChar</span>  = `<span class="enscript-keyword">\;</span>
<span class="enscript-keyword">\chardef</span><span class="enscript-keyword">\underChar</span> = `<span class="enscript-keyword">\_</span>

<span class="enscript-comment">% Ignore a token.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\gobble</span>#1{}

<span class="enscript-comment">% The following is used inside several \edef's.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\makecsname</span>#1{<span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\csname</span>#1<span class="enscript-keyword">\endcsname</span>}

<span class="enscript-comment">% Hyphenation fixes.
</span><span class="enscript-keyword">\hyphenation</span>{
  Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script
  ap-pen-dix bit-map bit-maps
  data-base data-bases eshell fall-ing half-way long-est man-u-script
  man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm
  par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces
  spell-ing spell-ings
  stand-alone strong-est time-stamp time-stamps which-ever white-space
  wide-spread wrap-around
}

<span class="enscript-comment">% Margin to add to right of even pages, to left of odd pages.
</span><span class="enscript-keyword">\newdimen</span><span class="enscript-keyword">\bindingoffset</span>
<span class="enscript-keyword">\newdimen</span><span class="enscript-keyword">\normaloffset</span>
<span class="enscript-keyword">\newdimen</span><span class="enscript-keyword">\pagewidth</span> <span class="enscript-keyword">\newdimen</span><span class="enscript-keyword">\pageheight</span>

<span class="enscript-comment">% For a final copy, take out the rectangles
</span><span class="enscript-comment">% that mark overfull boxes (in case you have decided
</span><span class="enscript-comment">% that the text looks ok even though it passes the margin).
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\finalout</span>{<span class="enscript-keyword">\overfullrule</span>=0pt}

<span class="enscript-comment">% @| inserts a changebar to the left of the current line.  It should
</span><span class="enscript-comment">% surround any changed text.  This approach does *not* work if the
</span><span class="enscript-comment">% change spans more than two lines of output.  To handle that, we would
</span><span class="enscript-comment">% have adopt a much more difficult approach (putting marks into the main
</span><span class="enscript-comment">% vertical list for the beginning and end of each change).
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\|</span>{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% \vadjust can only be used in horizontal mode.
</span>  <span class="enscript-keyword">\leavevmode</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Append this vertical mode material after the current line in the output.
</span>  <span class="enscript-keyword">\vadjust</span>{<span class="enscript-comment">%
</span>    <span class="enscript-comment">% We want to insert a rule with the height and depth of the current
</span>    <span class="enscript-comment">% leading; that is exactly what \strutbox is supposed to record.
</span>    <span class="enscript-keyword">\vskip</span>-<span class="enscript-keyword">\baselineskip</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% \vadjust-items are inserted at the left edge of the type.  So
</span>    <span class="enscript-comment">% the \llap here moves out into the left-hand margin.
</span>    <span class="enscript-keyword">\llap</span>{<span class="enscript-comment">%
</span>      <span class="enscript-comment">%
</span>      <span class="enscript-comment">% For a thicker or thinner bar, change the `1pt'.
</span>      <span class="enscript-keyword">\vrule</span> height<span class="enscript-keyword">\baselineskip</span> width1pt
      <span class="enscript-comment">%
</span>      <span class="enscript-comment">% This is the space between the bar and the text.
</span>      <span class="enscript-keyword">\hskip</span> 12pt
    }<span class="enscript-comment">%
</span>  }<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% Sometimes it is convenient to have everything in the transcript file
</span><span class="enscript-comment">% and nothing on the terminal.  We don't just call \tracingall here,
</span><span class="enscript-comment">% since that produces some useless output on the terminal.  We also make
</span><span class="enscript-comment">% some effort to order the tracing commands to reduce output in the log
</span><span class="enscript-comment">% file; cf. trace.sty in LaTeX.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\gloggingall</span>{<span class="enscript-keyword">\begingroup</span> <span class="enscript-keyword">\globaldefs</span> = 1 <span class="enscript-keyword">\loggingall</span> <span class="enscript-keyword">\endgroup</span>}<span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\loggingall</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\tracingstats</span>2
  <span class="enscript-keyword">\tracingpages</span>1
  <span class="enscript-keyword">\tracinglostchars</span>2  <span class="enscript-comment">% 2 gives us more in etex
</span>  <span class="enscript-keyword">\tracingparagraphs</span>1
  <span class="enscript-keyword">\tracingoutput</span>1
  <span class="enscript-keyword">\tracingmacros</span>2
  <span class="enscript-keyword">\tracingrestores</span>1
  <span class="enscript-keyword">\showboxbreadth</span><span class="enscript-keyword">\maxdimen</span> <span class="enscript-keyword">\showboxdepth</span><span class="enscript-keyword">\maxdimen</span>
  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\eTeXversion</span><span class="enscript-keyword">\undefined</span><span class="enscript-keyword">\else</span> <span class="enscript-comment">% etex gives us more logging
</span>    <span class="enscript-keyword">\tracingscantokens</span>1
    <span class="enscript-keyword">\tracingifs</span>1
    <span class="enscript-keyword">\tracinggroups</span>1
    <span class="enscript-keyword">\tracingnesting</span>2
    <span class="enscript-keyword">\tracingassigns</span>1
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\tracingcommands</span>3  <span class="enscript-comment">% 3 gives us more in etex
</span>  <span class="enscript-keyword">\errorcontextlines</span>16
}<span class="enscript-comment">%
</span>
<span class="enscript-comment">% add check for \lastpenalty to plain's definitions.  If the last thing
</span><span class="enscript-comment">% we did was a \nobreak, we don't want to insert more space.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\smallbreak</span>{<span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\lastpenalty</span>&lt;10000<span class="enscript-keyword">\par</span><span class="enscript-keyword">\ifdim</span><span class="enscript-keyword">\lastskip</span>&lt;<span class="enscript-keyword">\smallskipamount</span>
  <span class="enscript-keyword">\removelastskip</span><span class="enscript-keyword">\penalty</span>-50<span class="enscript-keyword">\smallskip</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\medbreak</span>{<span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\lastpenalty</span>&lt;10000<span class="enscript-keyword">\par</span><span class="enscript-keyword">\ifdim</span><span class="enscript-keyword">\lastskip</span>&lt;<span class="enscript-keyword">\medskipamount</span>
  <span class="enscript-keyword">\removelastskip</span><span class="enscript-keyword">\penalty</span>-100<span class="enscript-keyword">\medskip</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\bigbreak</span>{<span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\lastpenalty</span>&lt;10000<span class="enscript-keyword">\par</span><span class="enscript-keyword">\ifdim</span><span class="enscript-keyword">\lastskip</span>&lt;<span class="enscript-keyword">\bigskipamount</span>
  <span class="enscript-keyword">\removelastskip</span><span class="enscript-keyword">\penalty</span>-200<span class="enscript-keyword">\bigskip</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span>}

<span class="enscript-comment">% For @cropmarks command.
</span><span class="enscript-comment">% Do @cropmarks to get crop marks.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\newif</span><span class="enscript-keyword">\ifcropmarks</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\cropmarks</span> = <span class="enscript-keyword">\cropmarkstrue</span>
<span class="enscript-comment">%
</span><span class="enscript-comment">% Dimensions to add cropmarks at corners.
</span><span class="enscript-comment">% Added by P. A. MacKay, 12 Nov. 1986
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\newdimen</span><span class="enscript-keyword">\outerhsize</span> <span class="enscript-keyword">\newdimen</span><span class="enscript-keyword">\outervsize</span> <span class="enscript-comment">% set by the paper size routines
</span><span class="enscript-keyword">\newdimen</span><span class="enscript-keyword">\cornerlong</span>  <span class="enscript-keyword">\cornerlong</span>=1pc
<span class="enscript-keyword">\newdimen</span><span class="enscript-keyword">\cornerthick</span> <span class="enscript-keyword">\cornerthick</span>=.3pt
<span class="enscript-keyword">\newdimen</span><span class="enscript-keyword">\topandbottommargin</span> <span class="enscript-keyword">\topandbottommargin</span>=.75in

<span class="enscript-comment">% Main output routine.
</span><span class="enscript-keyword">\chardef</span><span class="enscript-keyword">\PAGE</span> = 255
<span class="enscript-keyword">\output</span> = {<span class="enscript-keyword">\onepageout</span>{<span class="enscript-keyword">\pagecontents</span><span class="enscript-keyword">\PAGE</span>}}

<span class="enscript-keyword">\newbox</span><span class="enscript-keyword">\headlinebox</span>
<span class="enscript-keyword">\newbox</span><span class="enscript-keyword">\footlinebox</span>

<span class="enscript-comment">% \onepageout takes a vbox as an argument.  Note that \pagecontents
</span><span class="enscript-comment">% does insertions, but you have to call it yourself.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\onepageout</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifcropmarks</span> <span class="enscript-keyword">\hoffset</span>=0pt <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\hoffset</span>=<span class="enscript-keyword">\normaloffset</span> <span class="enscript-keyword">\fi</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifodd</span><span class="enscript-keyword">\pageno</span>  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\hoffset</span> by <span class="enscript-keyword">\bindingoffset</span>
  <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\hoffset</span> by -<span class="enscript-keyword">\bindingoffset</span><span class="enscript-keyword">\fi</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Do this outside of the \shipout so @code etc. will be expanded in
</span>  <span class="enscript-comment">% the headline as they should be, not taken literally (outputting ''code).
</span>  <span class="enscript-keyword">\setbox</span><span class="enscript-keyword">\headlinebox</span> = <span class="enscript-keyword">\vbox</span>{<span class="enscript-keyword">\let</span><span class="enscript-keyword">\hsize</span>=<span class="enscript-keyword">\pagewidth</span> <span class="enscript-keyword">\makeheadline</span>}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\setbox</span><span class="enscript-keyword">\footlinebox</span> = <span class="enscript-keyword">\vbox</span>{<span class="enscript-keyword">\let</span><span class="enscript-keyword">\hsize</span>=<span class="enscript-keyword">\pagewidth</span> <span class="enscript-keyword">\makefootline</span>}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  {<span class="enscript-comment">%
</span>    <span class="enscript-comment">% Have to do this stuff outside the \shipout because we want it to
</span>    <span class="enscript-comment">% take effect in \write's, yet the group defined by the \vbox ends
</span>    <span class="enscript-comment">% before the \shipout runs.
</span>    <span class="enscript-comment">%
</span>    <span class="enscript-keyword">\indexdummies</span>         <span class="enscript-comment">% don't expand commands in the output.
</span>    <span class="enscript-keyword">\normalturnoffactive</span>  <span class="enscript-comment">% \ in index entries must not stay \, e.g., if
</span>               <span class="enscript-comment">% the page break happens to be in the middle of an example.
</span>               <span class="enscript-comment">% We don't want .vr (or whatever) entries like this:
</span>               <span class="enscript-comment">% \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
</span>               <span class="enscript-comment">% &quot;\acronym&quot; won't work when it's read back in;
</span>               <span class="enscript-comment">% it needs to be 
</span>               <span class="enscript-comment">% {\code {{\tt \backslashcurfont }acronym}
</span>    <span class="enscript-keyword">\shipout</span><span class="enscript-keyword">\vbox</span>{<span class="enscript-comment">%
</span>      <span class="enscript-comment">% Do this early so pdf references go to the beginning of the page.
</span>      <span class="enscript-keyword">\ifpdfmakepagedest</span> <span class="enscript-keyword">\pdfdest</span> name{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\pageno</span>} xyz<span class="enscript-keyword">\fi</span>
      <span class="enscript-comment">%
</span>      <span class="enscript-keyword">\ifcropmarks</span> <span class="enscript-keyword">\vbox</span> to <span class="enscript-keyword">\outervsize</span><span class="enscript-keyword">\bgroup</span>
        <span class="enscript-keyword">\hsize</span> = <span class="enscript-keyword">\outerhsize</span>
        <span class="enscript-keyword">\vskip</span>-<span class="enscript-keyword">\topandbottommargin</span>
        <span class="enscript-keyword">\vtop</span> to0pt{<span class="enscript-comment">%
</span>          <span class="enscript-keyword">\line</span>{<span class="enscript-keyword">\ewtop</span><span class="enscript-keyword">\hfil</span><span class="enscript-keyword">\ewtop</span>}<span class="enscript-comment">%
</span>          <span class="enscript-keyword">\nointerlineskip</span>
          <span class="enscript-keyword">\line</span>{<span class="enscript-comment">%
</span>            <span class="enscript-keyword">\vbox</span>{<span class="enscript-keyword">\moveleft</span><span class="enscript-keyword">\cornerthick</span><span class="enscript-keyword">\nstop</span>}<span class="enscript-comment">%
</span>            <span class="enscript-keyword">\hfill</span>
            <span class="enscript-keyword">\vbox</span>{<span class="enscript-keyword">\moveright</span><span class="enscript-keyword">\cornerthick</span><span class="enscript-keyword">\nstop</span>}<span class="enscript-comment">%
</span>          }<span class="enscript-comment">%
</span>          <span class="enscript-keyword">\vss</span>}<span class="enscript-comment">%
</span>        <span class="enscript-keyword">\vskip</span><span class="enscript-keyword">\topandbottommargin</span>
        <span class="enscript-keyword">\line</span><span class="enscript-keyword">\bgroup</span>
          <span class="enscript-keyword">\hfil</span> <span class="enscript-comment">% center the page within the outer (page) hsize.
</span>          <span class="enscript-keyword">\ifodd</span><span class="enscript-keyword">\pageno</span><span class="enscript-keyword">\hskip</span><span class="enscript-keyword">\bindingoffset</span><span class="enscript-keyword">\fi</span>
          <span class="enscript-keyword">\vbox</span><span class="enscript-keyword">\bgroup</span>
      <span class="enscript-keyword">\fi</span>
      <span class="enscript-comment">%
</span>      <span class="enscript-keyword">\unvbox</span><span class="enscript-keyword">\headlinebox</span>
      <span class="enscript-keyword">\pagebody</span>{#1}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\ifdim</span><span class="enscript-keyword">\ht</span><span class="enscript-keyword">\footlinebox</span> &gt; 0pt
        <span class="enscript-comment">% Only leave this space if the footline is nonempty.
</span>        <span class="enscript-comment">% (We lessened \vsize for it in \oddfootingyyy.)
</span>        <span class="enscript-comment">% The \baselineskip=24pt in plain's \makefootline has no effect.
</span>        <span class="enscript-keyword">\vskip</span> 24pt
        <span class="enscript-keyword">\unvbox</span><span class="enscript-keyword">\footlinebox</span>
      <span class="enscript-keyword">\fi</span>
      <span class="enscript-comment">%
</span>      <span class="enscript-keyword">\ifcropmarks</span>
          <span class="enscript-keyword">\egroup</span> <span class="enscript-comment">% end of \vbox\bgroup
</span>        <span class="enscript-keyword">\hfil</span><span class="enscript-keyword">\egroup</span> <span class="enscript-comment">% end of (centering) \line\bgroup
</span>        <span class="enscript-keyword">\vskip</span><span class="enscript-keyword">\topandbottommargin</span> plus1fill minus1fill
        <span class="enscript-keyword">\boxmaxdepth</span> = <span class="enscript-keyword">\cornerthick</span>
        <span class="enscript-keyword">\vbox</span> to0pt{<span class="enscript-keyword">\vss</span>
          <span class="enscript-keyword">\line</span>{<span class="enscript-comment">%
</span>            <span class="enscript-keyword">\vbox</span>{<span class="enscript-keyword">\moveleft</span><span class="enscript-keyword">\cornerthick</span><span class="enscript-keyword">\nsbot</span>}<span class="enscript-comment">%
</span>            <span class="enscript-keyword">\hfill</span>
            <span class="enscript-keyword">\vbox</span>{<span class="enscript-keyword">\moveright</span><span class="enscript-keyword">\cornerthick</span><span class="enscript-keyword">\nsbot</span>}<span class="enscript-comment">%
</span>          }<span class="enscript-comment">%
</span>          <span class="enscript-keyword">\nointerlineskip</span>
          <span class="enscript-keyword">\line</span>{<span class="enscript-keyword">\ewbot</span><span class="enscript-keyword">\hfil</span><span class="enscript-keyword">\ewbot</span>}<span class="enscript-comment">%
</span>        }<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\egroup</span> <span class="enscript-comment">% \vbox from first cropmarks clause
</span>      <span class="enscript-keyword">\fi</span>
    }<span class="enscript-comment">% end of \shipout\vbox
</span>  }<span class="enscript-comment">% end of group with \indexdummies
</span>  <span class="enscript-keyword">\advancepageno</span>
  <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\outputpenalty</span>&gt;-20000 <span class="enscript-keyword">\else</span><span class="enscript-keyword">\dosupereject</span><span class="enscript-keyword">\fi</span>
}

<span class="enscript-keyword">\newinsert</span><span class="enscript-keyword">\margin</span> <span class="enscript-keyword">\dimen</span><span class="enscript-keyword">\margin</span>=<span class="enscript-keyword">\maxdimen</span>

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\pagebody</span>#1{<span class="enscript-keyword">\vbox</span> to<span class="enscript-keyword">\pageheight</span>{<span class="enscript-keyword">\boxmaxdepth</span>=<span class="enscript-keyword">\maxdepth</span> #1}}
{<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\@</span> =11
<span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\pagecontents</span>#1{<span class="enscript-keyword">\ifvoid</span><span class="enscript-keyword">\topins</span><span class="enscript-keyword">\else</span><span class="enscript-keyword">\unvbox</span><span class="enscript-keyword">\topins</span><span class="enscript-keyword">\fi</span>
<span class="enscript-comment">% marginal hacks, <a href="mailto:juha@viisa.uucp">juha@viisa.uucp</a> (Juha Takala)
</span><span class="enscript-keyword">\ifvoid</span><span class="enscript-keyword">\margin</span><span class="enscript-keyword">\else</span> <span class="enscript-comment">% marginal info is present
</span>  <span class="enscript-keyword">\rlap</span>{<span class="enscript-keyword">\kern</span><span class="enscript-keyword">\hsize</span><span class="enscript-keyword">\vbox</span> to<span class="enscript-keyword">\z</span>@{<span class="enscript-keyword">\kern</span>1pt<span class="enscript-keyword">\box</span><span class="enscript-keyword">\margin</span> <span class="enscript-keyword">\vss</span>}}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\dimen</span>@=<span class="enscript-keyword">\dp</span>#1 <span class="enscript-keyword">\unvbox</span>#1
<span class="enscript-keyword">\ifvoid</span><span class="enscript-keyword">\footins</span><span class="enscript-keyword">\else</span><span class="enscript-keyword">\vskip</span><span class="enscript-keyword">\skip</span><span class="enscript-keyword">\footins</span><span class="enscript-keyword">\footnoterule</span> <span class="enscript-keyword">\unvbox</span><span class="enscript-keyword">\footins</span><span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\ifr</span>@ggedbottom <span class="enscript-keyword">\kern</span>-<span class="enscript-keyword">\dimen</span>@ <span class="enscript-keyword">\vfil</span> <span class="enscript-keyword">\fi</span>}
}

<span class="enscript-comment">% Here are the rules for the cropmarks.  Note that they are
</span><span class="enscript-comment">% offset so that the space between them is truly \outerhsize or \outervsize
</span><span class="enscript-comment">% (P. A. MacKay, 12 November, 1986)
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\ewtop</span>{<span class="enscript-keyword">\vrule</span> height<span class="enscript-keyword">\cornerthick</span> depth0pt width<span class="enscript-keyword">\cornerlong</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\nstop</span>{<span class="enscript-keyword">\vbox</span>
  {<span class="enscript-keyword">\hrule</span> height<span class="enscript-keyword">\cornerthick</span> depth<span class="enscript-keyword">\cornerlong</span> width<span class="enscript-keyword">\cornerthick</span>}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\ewbot</span>{<span class="enscript-keyword">\vrule</span> height0pt depth<span class="enscript-keyword">\cornerthick</span> width<span class="enscript-keyword">\cornerlong</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\nsbot</span>{<span class="enscript-keyword">\vbox</span>
  {<span class="enscript-keyword">\hrule</span> height<span class="enscript-keyword">\cornerlong</span> depth<span class="enscript-keyword">\cornerthick</span> width<span class="enscript-keyword">\cornerthick</span>}}

<span class="enscript-comment">% Parse an argument, then pass it to #1.  The argument is the rest of
</span><span class="enscript-comment">% the input line (except we remove a trailing comment).  #1 should be a
</span><span class="enscript-comment">% macro which expects an ordinary undelimited TeX argument.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\parsearg</span>{<span class="enscript-keyword">\parseargusing</span>{}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\parseargusing</span>#1#2{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\argtorun</span>{#2}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\begingroup</span>
    <span class="enscript-keyword">\obeylines</span>
    <span class="enscript-keyword">\spaceisspace</span>
    #1<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\parseargline</span><span class="enscript-keyword">\empty</span><span class="enscript-comment">% Insert the \empty token, see \finishparsearg below.
</span>}

{<span class="enscript-keyword">\obeylines</span> <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\parseargline</span>#1^^M{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\endgroup</span> <span class="enscript-comment">% End of the group started in \parsearg.
</span>    <span class="enscript-keyword">\argremovecomment</span> #1<span class="enscript-keyword">\comment</span><span class="enscript-keyword">\ArgTerm</span><span class="enscript-comment">%
</span>  }<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% First remove any @comment, then any @c comment.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\argremovecomment</span>#1<span class="enscript-keyword">\comment</span>#2<span class="enscript-keyword">\ArgTerm</span>{<span class="enscript-keyword">\argremovec</span> #1<span class="enscript-keyword">\c</span><span class="enscript-keyword">\ArgTerm</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\argremovec</span>#1<span class="enscript-keyword">\c</span>#2<span class="enscript-keyword">\ArgTerm</span>{<span class="enscript-keyword">\argcheckspaces</span>#1<span class="enscript-keyword">\^</span>^M<span class="enscript-keyword">\ArgTerm</span>}

<span class="enscript-comment">% Each occurence of `\^^M' or `&lt;space&gt;\^^M' is replaced by a single space.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% \argremovec might leave us with trailing space, e.g.,
</span><span class="enscript-comment">%    @end itemize  @c foo
</span><span class="enscript-comment">% This space token undergoes the same procedure and is eventually removed
</span><span class="enscript-comment">% by \finishparsearg.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\argcheckspaces</span>#1<span class="enscript-keyword">\^</span>^M{<span class="enscript-keyword">\argcheckspacesX</span>#1<span class="enscript-keyword">\^</span>^M <span class="enscript-keyword">\^</span>^M}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\argcheckspacesX</span>#1 <span class="enscript-keyword">\^</span>^M{<span class="enscript-keyword">\argcheckspacesY</span>#1<span class="enscript-keyword">\^</span>^M}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\argcheckspacesY</span>#1<span class="enscript-keyword">\^</span>^M#2<span class="enscript-keyword">\^</span>^M#3<span class="enscript-keyword">\ArgTerm</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\temp</span>{#3}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\temp</span><span class="enscript-keyword">\empty</span>
    <span class="enscript-comment">% Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp:
</span>    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\temp</span><span class="enscript-keyword">\finishparsearg</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\temp</span><span class="enscript-keyword">\argcheckspaces</span>
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-comment">% Put the space token in:
</span>  <span class="enscript-keyword">\temp</span>#1 #3<span class="enscript-keyword">\ArgTerm</span>
}

<span class="enscript-comment">% If a _delimited_ argument is enclosed in braces, they get stripped; so
</span><span class="enscript-comment">% to get _exactly_ the rest of the line, we had to prevent such situation.
</span><span class="enscript-comment">% We prepended an \empty token at the very beginning and we expand it now,
</span><span class="enscript-comment">% just before passing the control to \argtorun.
</span><span class="enscript-comment">% (Similarily, we have to think about #3 of \argcheckspacesY above: it is
</span><span class="enscript-comment">% either the null string, or it ends with \^^M---thus there is no danger
</span><span class="enscript-comment">% that a pair of braces would be stripped.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% But first, we have to remove the trailing space token.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\finishparsearg</span>#1 <span class="enscript-keyword">\ArgTerm</span>{<span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\argtorun</span><span class="enscript-keyword">\expandafter</span>{#1}}

<span class="enscript-comment">% \parseargdef\foo{...}
</span><span class="enscript-comment">%	is roughly equivalent to
</span><span class="enscript-comment">% \def\foo{\parsearg\Xfoo}
</span><span class="enscript-comment">% \def\Xfoo#1{...}
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my
</span><span class="enscript-comment">% favourite TeX trick.  --kasal, 16nov03
</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\parseargdef</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\expandafter</span> <span class="enscript-keyword">\doparseargdef</span> <span class="enscript-keyword">\csname</span><span class="enscript-keyword">\string</span>#1<span class="enscript-keyword">\endcsname</span> #1<span class="enscript-comment">%
</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\doparseargdef</span>#1#2{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span>#2{<span class="enscript-keyword">\parsearg</span>#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span>#1##1<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% Several utility definitions with active space:
</span>{
  <span class="enscript-keyword">\obeyspaces</span>
  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\obeyedspace</span>{ }

  <span class="enscript-comment">% Make each space character in the input produce a normal interword
</span>  <span class="enscript-comment">% space in the output.  Don't allow a line break at this space, as this
</span>  <span class="enscript-comment">% is used only in environments like @example, where each line of input
</span>  <span class="enscript-comment">% should produce a line of output anyway.
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\sepspaces</span>{<span class="enscript-keyword">\obeyspaces</span><span class="enscript-keyword">\let</span> =<span class="enscript-keyword">\tie</span>}

  <span class="enscript-comment">% If an index command is used in an @example environment, any spaces
</span>  <span class="enscript-comment">% therein should become regular spaces in the raw index file, not the
</span>  <span class="enscript-comment">% expansion of \tie (\leavevmode \penalty \@M \ ).
</span>  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\unsepspaces</span>{<span class="enscript-keyword">\let</span> =<span class="enscript-keyword">\space</span>}
}


<span class="enscript-keyword">\def</span><span class="enscript-keyword">\flushcr</span>{<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\par</span><span class="enscript-keyword">\lisppar</span> <span class="enscript-keyword">\def</span><span class="enscript-keyword">\next</span>##1{}<span class="enscript-keyword">\else</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\next</span>=<span class="enscript-keyword">\relax</span> <span class="enscript-keyword">\fi</span> <span class="enscript-keyword">\next</span>}

<span class="enscript-comment">% Define the framework for environments in texinfo.tex.  It's used like this:
</span><span class="enscript-comment">%
</span><span class="enscript-comment">%   \envdef\foo{...}
</span><span class="enscript-comment">%   \def\Efoo{...}
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% It's the responsibility of \envdef to insert \begingroup before the
</span><span class="enscript-comment">% actual body; @end closes the group after calling \Efoo.  \envdef also
</span><span class="enscript-comment">% defines \thisenv, so the current environment is known; @end checks
</span><span class="enscript-comment">% whether the environment name matches.  The \checkenv macro can also be
</span><span class="enscript-comment">% used to check whether the current environment is the one expected.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% Non-false conditionals (@iftex, @ifset) don't fit into this, so they
</span><span class="enscript-comment">% are not treated as enviroments; they don't open a group.  (The
</span><span class="enscript-comment">% implementation of @end takes care not to call \endgroup in this
</span><span class="enscript-comment">% special case.)
</span>

<span class="enscript-comment">% At runtime, environments start with this:
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\startenvironment</span>#1{<span class="enscript-keyword">\begingroup</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\thisenv</span>{#1}}
<span class="enscript-comment">% initialize
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\thisenv</span><span class="enscript-keyword">\empty</span>

<span class="enscript-comment">% ... but they get defined via ``\envdef\foo{...}'':
</span><span class="enscript-keyword">\long</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\envdef</span>#1#2{<span class="enscript-keyword">\def</span>#1{<span class="enscript-keyword">\startenvironment</span>#1#2}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\envparseargdef</span>#1#2{<span class="enscript-keyword">\parseargdef</span>#1{<span class="enscript-keyword">\startenvironment</span>#1#2}}

<span class="enscript-comment">% Check whether we're in the right environment:
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\checkenv</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\temp</span>{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\thisenv</span><span class="enscript-keyword">\temp</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\badenverr</span>
  <span class="enscript-keyword">\fi</span>
}

<span class="enscript-comment">% Evironment mismatch, #1 expected:
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\badenverr</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\errhelp</span> = <span class="enscript-keyword">\EMsimple</span>
  <span class="enscript-keyword">\errmessage</span>{This command can appear only <span class="enscript-keyword">\inenvironment</span><span class="enscript-keyword">\temp</span>,
    not <span class="enscript-keyword">\inenvironment</span><span class="enscript-keyword">\thisenv</span>}<span class="enscript-comment">%
</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\inenvironment</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span>#1<span class="enscript-keyword">\empty</span>
    out of any environment<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span>
    in environment <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\string</span>#1<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span>
}

<span class="enscript-comment">% @end foo executes the definition of \Efoo.
</span><span class="enscript-comment">% But first, it executes a specialized version of \checkenv
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\end</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\if</span> 1<span class="enscript-keyword">\csname</span> iscond.#1<span class="enscript-keyword">\endcsname</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-comment">% The general wording of \badenverr may not be ideal, but... --kasal, 06nov03
</span>    <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\checkenv</span><span class="enscript-keyword">\csname</span>#1<span class="enscript-keyword">\endcsname</span>
    <span class="enscript-keyword">\csname</span> E#1<span class="enscript-keyword">\endcsname</span>
    <span class="enscript-keyword">\endgroup</span>
  <span class="enscript-keyword">\fi</span>
}

<span class="enscript-keyword">\newhelp</span><span class="enscript-keyword">\EMsimple</span>{Press RETURN to continue.}


<span class="enscript-comment">%% Simple single-character @ commands
</span>
<span class="enscript-comment">% @@ prints an @
</span><span class="enscript-comment">% Kludge this until the fonts are right (grr).
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\@</span>{{<span class="enscript-keyword">\tt</span><span class="enscript-keyword">\char</span>64}}

<span class="enscript-comment">% This is turned off because it was never documented
</span><span class="enscript-comment">% and you can use @w{...} around a quote to suppress ligatures.
</span><span class="enscript-comment">%% Define @` and @' to be the same as ` and '
</span><span class="enscript-comment">%% but suppressing ligatures.
</span><span class="enscript-comment">%\def\`{{`}}
</span><span class="enscript-comment">%\def\'{{'}}
</span>
<span class="enscript-comment">% Used to generate quoted braces.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\mylbrace</span> {{<span class="enscript-keyword">\tt</span><span class="enscript-keyword">\char</span>123}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\myrbrace</span> {{<span class="enscript-keyword">\tt</span><span class="enscript-keyword">\char</span>125}}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\{</span>=<span class="enscript-keyword">\mylbrace</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\}</span>=<span class="enscript-keyword">\myrbrace</span>
<span class="enscript-keyword">\begingroup</span>
  <span class="enscript-comment">% Definitions to produce \{ and \} commands for indices,
</span>  <span class="enscript-comment">% and @{ and @} for the aux/toc files.
</span>  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\{</span> = <span class="enscript-keyword">\other</span> <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\}</span> = <span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\[</span> = 1 <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\]</span> = 2
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\!</span> = 0 <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\\</span> = <span class="enscript-keyword">\other</span>
  !gdef!lbracecmd[<span class="enscript-keyword">\{</span>]<span class="enscript-comment">%
</span>  !gdef!rbracecmd[<span class="enscript-keyword">\}</span>]<span class="enscript-comment">%
</span>  !gdef!lbraceatcmd[@{]<span class="enscript-comment">%
</span>  !gdef!rbraceatcmd[@}]<span class="enscript-comment">%
</span>!endgroup

<span class="enscript-comment">% @comma{} to avoid , parsing problems.
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\comma</span> = ,

<span class="enscript-comment">% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
</span><span class="enscript-comment">% Others are defined by plain TeX: @` @' @&quot; @^ @~ @= @u @v @H.
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\,</span> = <span class="enscript-keyword">\c</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\dotaccent</span> = <span class="enscript-keyword">\.</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\ringaccent</span>#1{{<span class="enscript-keyword">\accent</span>23 #1}}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\tieaccent</span> = <span class="enscript-keyword">\t</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\ubaraccent</span> = <span class="enscript-keyword">\b</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\udotaccent</span> = <span class="enscript-keyword">\d</span>

<span class="enscript-comment">% Other special characters: @questiondown @exclamdown @ordf @ordm
</span><span class="enscript-comment">% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\questiondown</span>{?`}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\exclamdown</span>{!`}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\ordf</span>{<span class="enscript-keyword">\leavevmode</span><span class="enscript-keyword">\raise</span>1ex<span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\selectfonts</span><span class="enscript-keyword">\lllsize</span> <span class="enscript-keyword">\underbar</span>{a}}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\ordm</span>{<span class="enscript-keyword">\leavevmode</span><span class="enscript-keyword">\raise</span>1ex<span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\selectfonts</span><span class="enscript-keyword">\lllsize</span> <span class="enscript-keyword">\underbar</span>{o}}}

<span class="enscript-comment">% Dotless i and dotless j, used for accents.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\imacro</span>{i}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\jmacro</span>{j}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\dotless</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\temp</span>{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\temp</span><span class="enscript-keyword">\imacro</span> <span class="enscript-keyword">\ptexi</span>
  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\temp</span><span class="enscript-keyword">\jmacro</span> <span class="enscript-keyword">\j</span>
  <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\errmessage</span>{@dotless can be used only with i or j}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span>
}

<span class="enscript-comment">% The \TeX{} logo, as in plain, but resetting the spacing so that a
</span><span class="enscript-comment">% period following counts as ending a sentence.  (Idea found in latex.)
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\edef</span><span class="enscript-keyword">\TeX</span>{<span class="enscript-keyword">\TeX</span> <span class="enscript-keyword">\spacefactor</span>=1000 }

<span class="enscript-comment">% @LaTeX{} logo.  Not quite the same results as the definition in
</span><span class="enscript-comment">% latex.ltx, since we use a different font for the raised A; it's most
</span><span class="enscript-comment">% convenient for us to use an explicitly smaller font, rather than using
</span><span class="enscript-comment">% the \scriptstyle font (since we don't reset \scriptstyle and
</span><span class="enscript-comment">% \scriptscriptstyle).
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\LaTeX</span>{<span class="enscript-comment">%
</span>  L<span class="enscript-keyword">\kern</span>-.36em
  {<span class="enscript-keyword">\setbox</span>0=<span class="enscript-keyword">\hbox</span>{T}<span class="enscript-comment">%
</span>   <span class="enscript-keyword">\vbox</span> to <span class="enscript-keyword">\ht</span>0{<span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\selectfonts</span><span class="enscript-keyword">\lllsize</span> A}<span class="enscript-keyword">\vss</span>}}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\kern</span>-.15em
  <span class="enscript-keyword">\TeX</span>
}

<span class="enscript-comment">% Be sure we're in horizontal mode when doing a tie, since we make space
</span><span class="enscript-comment">% equivalent to this in @example-like environments. Otherwise, a space
</span><span class="enscript-comment">% at the beginning of a line will start with \penalty -- and
</span><span class="enscript-comment">% since \penalty is valid in vertical mode, we'd end up putting the
</span><span class="enscript-comment">% penalty on the vertical list instead of in the new paragraph.
</span>{<span class="enscript-keyword">\catcode</span>`@ = 11
 <span class="enscript-comment">% Avoid using \@M directly, because that causes trouble
</span> <span class="enscript-comment">% if the definition is written into an index file.
</span> <span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\tiepenalty</span> = <span class="enscript-keyword">\@</span>M
 <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\tie</span>{<span class="enscript-keyword">\leavevmode</span><span class="enscript-keyword">\penalty</span><span class="enscript-keyword">\tiepenalty</span><span class="enscript-keyword">\ </span>}
}

<span class="enscript-comment">% @: forces normal size whitespace following.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\:</span>{<span class="enscript-keyword">\spacefactor</span>=1000 }

<span class="enscript-comment">% @* forces a line break.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\*</span>{<span class="enscript-keyword">\hfil</span><span class="enscript-keyword">\break</span><span class="enscript-keyword">\hbox</span>{}<span class="enscript-keyword">\ignorespaces</span>}

<span class="enscript-comment">% @/ allows a line break.
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\/</span>=<span class="enscript-keyword">\allowbreak</span>

<span class="enscript-comment">% @. is an end-of-sentence period.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\.</span>{.<span class="enscript-keyword">\spacefactor</span>=<span class="enscript-keyword">\endofsentencespacefactor</span><span class="enscript-keyword">\space</span>}

<span class="enscript-comment">% @! is an end-of-sentence bang.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\!</span>{!<span class="enscript-keyword">\spacefactor</span>=<span class="enscript-keyword">\endofsentencespacefactor</span><span class="enscript-keyword">\space</span>}

<span class="enscript-comment">% @? is an end-of-sentence query.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\?</span>{?<span class="enscript-keyword">\spacefactor</span>=<span class="enscript-keyword">\endofsentencespacefactor</span><span class="enscript-keyword">\space</span>}

<span class="enscript-comment">% @frenchspacing on|off  says whether to put extra space after punctuation.
</span><span class="enscript-comment">% 
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\onword</span>{on}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\offword</span>{off}
<span class="enscript-comment">%
</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\frenchspacing</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\temp</span>{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\temp</span><span class="enscript-keyword">\onword</span> <span class="enscript-keyword">\plainfrenchspacing</span>
  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\temp</span><span class="enscript-keyword">\offword</span> <span class="enscript-keyword">\plainnonfrenchspacing</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\errhelp</span> = <span class="enscript-keyword">\EMsimple</span>
    <span class="enscript-keyword">\errmessage</span>{Unknown @frenchspacing option `<span class="enscript-keyword">\temp</span>', must be on/off}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span>
}

<span class="enscript-comment">% @w prevents a word break.  Without the \leavevmode, @w at the
</span><span class="enscript-comment">% beginning of a paragraph, when TeX is still in vertical mode, would
</span><span class="enscript-comment">% produce a whole line of output instead of starting the paragraph.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\w</span>#1{<span class="enscript-keyword">\leavevmode</span><span class="enscript-keyword">\hbox</span>{#1}}

<span class="enscript-comment">% @group ... @end group forces ... to be all on one page, by enclosing
</span><span class="enscript-comment">% it in a TeX vbox.  We use \vtop instead of \vbox to construct the box
</span><span class="enscript-comment">% to keep its height that of a normal line.  According to the rules for
</span><span class="enscript-comment">% \topskip (p.114 of the TeXbook), the glue inserted is
</span><span class="enscript-comment">% max (\topskip - \ht (first item), 0).  If that height is large,
</span><span class="enscript-comment">% therefore, no glue is inserted, and the space between the headline and
</span><span class="enscript-comment">% the text is small, which looks bad.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% Another complication is that the group might be very large.  This can
</span><span class="enscript-comment">% cause the glue on the previous page to be unduly stretched, because it
</span><span class="enscript-comment">% does not have much material.  In this case, it's better to add an
</span><span class="enscript-comment">% explicit \vfill so that the extra space is at the bottom.  The
</span><span class="enscript-comment">% threshold for doing this is if the group is more than \vfilllimit
</span><span class="enscript-comment">% percent of a page (\vfilllimit can be changed inside of @tex).
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\newbox</span><span class="enscript-keyword">\groupbox</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\vfilllimit</span>{0.7}
<span class="enscript-comment">%
</span><span class="enscript-keyword">\envdef</span><span class="enscript-keyword">\group</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^M=<span class="enscript-keyword">\active</span> <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\errhelp</span> = <span class="enscript-keyword">\groupinvalidhelp</span>
    <span class="enscript-keyword">\errmessage</span>{@group invalid in context where filling is enabled}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\startsavinginserts</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\setbox</span><span class="enscript-keyword">\groupbox</span> = <span class="enscript-keyword">\vtop</span><span class="enscript-keyword">\bgroup</span>
    <span class="enscript-comment">% Do @comment since we are called inside an environment such as
</span>    <span class="enscript-comment">% @example, where each end-of-line in the input causes an
</span>    <span class="enscript-comment">% end-of-line in the output.  We don't want the end-of-line after
</span>    <span class="enscript-comment">% the `@group' to put extra space in the output.  Since @group
</span>    <span class="enscript-comment">% should appear on a line by itself (according to the Texinfo
</span>    <span class="enscript-comment">% manual), we don't worry about eating any user text.
</span>    <span class="enscript-keyword">\comment</span>
}
<span class="enscript-comment">%
</span><span class="enscript-comment">% The \vtop produces a box with normal height and large depth; thus, TeX puts
</span><span class="enscript-comment">% \baselineskip glue before it, and (when the next line of text is done)
</span><span class="enscript-comment">% \lineskip glue after it.  Thus, space below is not quite equal to space
</span><span class="enscript-comment">% above.  But it's pretty close.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\Egroup</span>{<span class="enscript-comment">%
</span>    <span class="enscript-comment">% To get correct interline space between the last line of the group
</span>    <span class="enscript-comment">% and the first line afterwards, we have to propagate \prevdepth.
</span>    <span class="enscript-keyword">\endgraf</span> <span class="enscript-comment">% Not \par, as it may have been set to \lisppar.
</span>    <span class="enscript-keyword">\global</span><span class="enscript-keyword">\dimen</span>1 = <span class="enscript-keyword">\prevdepth</span>
  <span class="enscript-keyword">\egroup</span>           <span class="enscript-comment">% End the \vtop.
</span>  <span class="enscript-comment">% \dimen0 is the vertical size of the group's box.
</span>  <span class="enscript-keyword">\dimen</span>0 = <span class="enscript-keyword">\ht</span><span class="enscript-keyword">\groupbox</span>  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\dimen</span>0 by <span class="enscript-keyword">\dp</span><span class="enscript-keyword">\groupbox</span>
  <span class="enscript-comment">% \dimen2 is how much space is left on the page (more or less).
</span>  <span class="enscript-keyword">\dimen</span>2 = <span class="enscript-keyword">\pageheight</span>   <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\dimen</span>2 by -<span class="enscript-keyword">\pagetotal</span>
  <span class="enscript-comment">% if the group doesn't fit on the current page, and it's a big big
</span>  <span class="enscript-comment">% group, force a page break.
</span>  <span class="enscript-keyword">\ifdim</span> <span class="enscript-keyword">\dimen</span>0 &gt; <span class="enscript-keyword">\dimen</span>2
    <span class="enscript-keyword">\ifdim</span> <span class="enscript-keyword">\pagetotal</span> &lt; <span class="enscript-keyword">\vfilllimit</span><span class="enscript-keyword">\pageheight</span>
      <span class="enscript-keyword">\page</span>
    <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\box</span><span class="enscript-keyword">\groupbox</span>
  <span class="enscript-keyword">\prevdepth</span> = <span class="enscript-keyword">\dimen</span>1
  <span class="enscript-keyword">\checkinserts</span>
}
<span class="enscript-comment">%
</span><span class="enscript-comment">% TeX puts in an \escapechar (i.e., `@') at the beginning of the help
</span><span class="enscript-comment">% message, so this ends up printing `@group can only ...'.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\newhelp</span><span class="enscript-keyword">\groupinvalidhelp</span>{<span class="enscript-comment">%
</span>group can only be used in environments such as @example,^^J<span class="enscript-comment">%
</span>where each line of input produces a line of output.}

<span class="enscript-comment">% @need space-in-mils
</span><span class="enscript-comment">% forces a page break if there is not space-in-mils remaining.
</span>
<span class="enscript-keyword">\newdimen</span><span class="enscript-keyword">\mil</span>  <span class="enscript-keyword">\mil</span>=0.001in

<span class="enscript-comment">% Old definition--didn't work.
</span><span class="enscript-comment">%\parseargdef\need{\par %
</span><span class="enscript-comment">%% This method tries to make TeX break the page naturally
</span><span class="enscript-comment">%% if the depth of the box does not fit.
</span><span class="enscript-comment">%{\baselineskip=0pt%
</span><span class="enscript-comment">%\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak
</span><span class="enscript-comment">%\prevdepth=-1000pt
</span><span class="enscript-comment">%}}
</span>
<span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\need</span>{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% Ensure vertical mode, so we don't make a big box in the middle of a
</span>  <span class="enscript-comment">% paragraph.
</span>  <span class="enscript-keyword">\par</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% If the @need value is less than one line space, it's useless.
</span>  <span class="enscript-keyword">\dimen</span>0 = #1<span class="enscript-keyword">\mil</span>
  <span class="enscript-keyword">\dimen</span>2 = <span class="enscript-keyword">\ht</span><span class="enscript-keyword">\strutbox</span>
  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\dimen</span>2 by <span class="enscript-keyword">\dp</span><span class="enscript-keyword">\strutbox</span>
  <span class="enscript-keyword">\ifdim</span><span class="enscript-keyword">\dimen</span>0 &gt; <span class="enscript-keyword">\dimen</span>2
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Do a \strut just to make the height of this box be normal, so the
</span>    <span class="enscript-comment">% normal leading is inserted relative to the preceding line.
</span>    <span class="enscript-comment">% And a page break here is fine.
</span>    <span class="enscript-keyword">\vtop</span> to #1<span class="enscript-keyword">\mil</span>{<span class="enscript-keyword">\strut</span><span class="enscript-keyword">\vfil</span>}<span class="enscript-comment">%
</span>    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% TeX does not even consider page breaks if a penalty added to the
</span>    <span class="enscript-comment">% main vertical list is 10000 or more.  But in order to see if the
</span>    <span class="enscript-comment">% empty box we just added fits on the page, we must make it consider
</span>    <span class="enscript-comment">% page breaks.  On the other hand, we don't want to actually break the
</span>    <span class="enscript-comment">% page after the empty box.  So we use a penalty of 9999.
</span>    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% There is an extremely small chance that TeX will actually break the
</span>    <span class="enscript-comment">% page at this \penalty, if there are no other feasible breakpoints in
</span>    <span class="enscript-comment">% sight.  (If the user is using lots of big @group commands, which
</span>    <span class="enscript-comment">% almost-but-not-quite fill up a page, TeX will have a hard time doing
</span>    <span class="enscript-comment">% good page breaking, for example.)  However, I could not construct an
</span>    <span class="enscript-comment">% example where a page broke at this \penalty; if it happens in a real
</span>    <span class="enscript-comment">% document, then we can reconsider our strategy.
</span>    <span class="enscript-keyword">\penalty</span>9999
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Back up by the size of the box, whether we did a page break or not.
</span>    <span class="enscript-keyword">\kern</span> -#1<span class="enscript-keyword">\mil</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Do not allow a page break right after this kern.
</span>    <span class="enscript-keyword">\nobreak</span>
  <span class="enscript-keyword">\fi</span>
}

<span class="enscript-comment">% @br   forces paragraph break (and is undocumented).
</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\br</span> = <span class="enscript-keyword">\par</span>

<span class="enscript-comment">% @page forces the start of a new page.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\page</span>{<span class="enscript-keyword">\par</span><span class="enscript-keyword">\vfill</span><span class="enscript-keyword">\supereject</span>}

<span class="enscript-comment">% @exdent text....
</span><span class="enscript-comment">% outputs text on separate line in roman font, starting at standard page margin
</span>
<span class="enscript-comment">% This records the amount of indent in the innermost environment.
</span><span class="enscript-comment">% That's how much \exdent should take out.
</span><span class="enscript-keyword">\newskip</span><span class="enscript-keyword">\exdentamount</span>

<span class="enscript-comment">% This defn is used inside fill environments such as @defun.
</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\exdent</span>{<span class="enscript-keyword">\hfil</span><span class="enscript-keyword">\break</span><span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\kern</span> -<span class="enscript-keyword">\exdentamount</span>{<span class="enscript-keyword">\rm</span>#1}}<span class="enscript-keyword">\hfil</span><span class="enscript-keyword">\break</span>}

<span class="enscript-comment">% This defn is used inside nofill environments such as @example.
</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\nofillexdent</span>{{<span class="enscript-keyword">\advance</span> <span class="enscript-keyword">\leftskip</span> by -<span class="enscript-keyword">\exdentamount</span>
  <span class="enscript-keyword">\leftline</span>{<span class="enscript-keyword">\hskip</span><span class="enscript-keyword">\leftskip</span>{<span class="enscript-keyword">\rm</span>#1}}}}

<span class="enscript-comment">% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
</span><span class="enscript-comment">% paragraph.  For more general purposes, use the \margin insertion
</span><span class="enscript-comment">% class.  WHICH is `l' or `r'.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\newskip</span><span class="enscript-keyword">\inmarginspacing</span> <span class="enscript-keyword">\inmarginspacing</span>=1cm
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\strutdepth</span>{<span class="enscript-keyword">\dp</span><span class="enscript-keyword">\strutbox</span>}
<span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\doinmargin</span>#1#2{<span class="enscript-keyword">\strut</span><span class="enscript-keyword">\vadjust</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\nobreak</span>
  <span class="enscript-keyword">\kern</span>-<span class="enscript-keyword">\strutdepth</span>
  <span class="enscript-keyword">\vtop</span> to <span class="enscript-keyword">\strutdepth</span>{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\baselineskip</span>=<span class="enscript-keyword">\strutdepth</span>
    <span class="enscript-keyword">\vss</span>
    <span class="enscript-comment">% if you have multiple lines of stuff to put here, you'll need to
</span>    <span class="enscript-comment">% make the vbox yourself of the appropriate size.
</span>    <span class="enscript-keyword">\ifx</span>#1l<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\llap</span>{<span class="enscript-keyword">\ignorespaces</span> #2<span class="enscript-keyword">\hskip</span><span class="enscript-keyword">\inmarginspacing</span>}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\rlap</span>{<span class="enscript-keyword">\hskip</span><span class="enscript-keyword">\hsize</span> <span class="enscript-keyword">\hskip</span><span class="enscript-keyword">\inmarginspacing</span> <span class="enscript-keyword">\ignorespaces</span> #2}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\null</span>
  }<span class="enscript-comment">%
</span>}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\inleftmargin</span>{<span class="enscript-keyword">\doinmargin</span> l}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\inrightmargin</span>{<span class="enscript-keyword">\doinmargin</span> r}
<span class="enscript-comment">%
</span><span class="enscript-comment">% @inmargin{TEXT [, RIGHT-TEXT]}
</span><span class="enscript-comment">% (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right;
</span><span class="enscript-comment">% else use TEXT for both).
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\inmargin</span>#1{<span class="enscript-keyword">\parseinmargin</span> #1,,<span class="enscript-keyword">\finish</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\parseinmargin</span>#1,#2,#3<span class="enscript-keyword">\finish</span>{<span class="enscript-comment">% not perfect, but better than nothing.
</span>  <span class="enscript-keyword">\setbox</span>0 = <span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\ignorespaces</span> #2}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifdim</span><span class="enscript-keyword">\wd</span>0 &gt; 0pt
    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\lefttext</span>{#1}<span class="enscript-comment">%  have both texts
</span>    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\righttext</span>{#2}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\lefttext</span>{#1}<span class="enscript-comment">%  have only one text
</span>    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\righttext</span>{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifodd</span><span class="enscript-keyword">\pageno</span>
    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\temp</span>{<span class="enscript-keyword">\inrightmargin</span><span class="enscript-keyword">\righttext</span>}<span class="enscript-comment">% odd page -&gt; outside is right margin
</span>  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\temp</span>{<span class="enscript-keyword">\inleftmargin</span><span class="enscript-keyword">\lefttext</span>}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\temp</span>
}

<span class="enscript-comment">% @include file    insert text of that file as input.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\include</span>{<span class="enscript-keyword">\parseargusing</span><span class="enscript-keyword">\filenamecatcodes</span><span class="enscript-keyword">\includezzz</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\includezzz</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\pushthisfilestack</span>
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\thisfile</span>{#1}<span class="enscript-comment">%
</span>  {<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\makevalueexpandable</span>
    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\temp</span>{<span class="enscript-keyword">\input</span> #1 }<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\expandafter</span>
  }<span class="enscript-keyword">\temp</span>
  <span class="enscript-keyword">\popthisfilestack</span>
}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\filenamecatcodes</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\\</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`~=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`^=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`_=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`|=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`&lt;=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`&gt;=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`+=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`-=<span class="enscript-keyword">\other</span>
}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\pushthisfilestack</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\pushthisfilestackX</span><span class="enscript-keyword">\popthisfilestack</span><span class="enscript-keyword">\StackTerm</span>
}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\pushthisfilestackX</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\pushthisfilestackY</span><span class="enscript-keyword">\thisfile</span><span class="enscript-keyword">\StackTerm</span>
}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\pushthisfilestackY</span> #1<span class="enscript-keyword">\StackTerm</span> #2<span class="enscript-keyword">\StackTerm</span> {<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\popthisfilestack</span>{<span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\thisfile</span>{#1}<span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\popthisfilestack</span>{#2}}<span class="enscript-comment">%
</span>}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\popthisfilestack</span>{<span class="enscript-keyword">\errthisfilestackempty</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\errthisfilestackempty</span>{<span class="enscript-keyword">\errmessage</span>{Internal error:
  the stack of filenames is empty.}}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\thisfile</span>{}

<span class="enscript-comment">% @center line
</span><span class="enscript-comment">% outputs that line, centered.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\center</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifhmode</span>
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\next</span><span class="enscript-keyword">\centerH</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\next</span><span class="enscript-keyword">\centerV</span>
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\next</span>{<span class="enscript-keyword">\hfil</span> <span class="enscript-keyword">\ignorespaces</span>#1<span class="enscript-keyword">\unskip</span> <span class="enscript-keyword">\hfil</span>}<span class="enscript-comment">%
</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\centerH</span>#1{<span class="enscript-comment">%
</span>  {<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\hfil</span><span class="enscript-keyword">\break</span>
    <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\hsize</span> by -<span class="enscript-keyword">\leftskip</span>
    <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\hsize</span> by -<span class="enscript-keyword">\rightskip</span>
    <span class="enscript-keyword">\line</span>{#1}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\break</span>
  }<span class="enscript-comment">%
</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\centerV</span>#1{<span class="enscript-keyword">\line</span>{<span class="enscript-keyword">\kern</span><span class="enscript-keyword">\leftskip</span> #1<span class="enscript-keyword">\kern</span><span class="enscript-keyword">\rightskip</span>}}

<span class="enscript-comment">% @sp n   outputs n lines of vertical space
</span>
<span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\sp</span>{<span class="enscript-keyword">\vskip</span> #1<span class="enscript-keyword">\baselineskip</span>}

<span class="enscript-comment">% @comment ...line which is ignored...
</span><span class="enscript-comment">% @c is the same as @comment
</span><span class="enscript-comment">% @ignore ... @end ignore  is another way to write a comment
</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\comment</span>{<span class="enscript-keyword">\begingroup</span> <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^M=<span class="enscript-keyword">\other</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\@</span>=<span class="enscript-keyword">\other</span> <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\{</span>=<span class="enscript-keyword">\other</span> <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\}</span>=<span class="enscript-keyword">\other</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\commentxxx</span>}
{<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^M=<span class="enscript-keyword">\other</span> <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\commentxxx</span>#1^^M{<span class="enscript-keyword">\endgroup</span>}}

<span class="enscript-keyword">\let</span><span class="enscript-keyword">\c</span>=<span class="enscript-keyword">\comment</span>

<span class="enscript-comment">% @paragraphindent NCHARS
</span><span class="enscript-comment">% We'll use ems for NCHARS, close enough.
</span><span class="enscript-comment">% NCHARS can also be the word `asis' or `none'.
</span><span class="enscript-comment">% We cannot feasibly implement @paragraphindent asis, though.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\asisword</span>{asis} <span class="enscript-comment">% no translation, these are keywords
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\noneword</span>{none}
<span class="enscript-comment">%
</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\paragraphindent</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\temp</span>{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\temp</span><span class="enscript-keyword">\asisword</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\temp</span><span class="enscript-keyword">\noneword</span>
      <span class="enscript-keyword">\defaultparindent</span> = 0pt
    <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\defaultparindent</span> = #1em
    <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\parindent</span> = <span class="enscript-keyword">\defaultparindent</span>
}

<span class="enscript-comment">% @exampleindent NCHARS
</span><span class="enscript-comment">% We'll use ems for NCHARS like @paragraphindent.
</span><span class="enscript-comment">% It seems @exampleindent asis isn't necessary, but
</span><span class="enscript-comment">% I preserve it to make it similar to @paragraphindent.
</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\exampleindent</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\temp</span>{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\temp</span><span class="enscript-keyword">\asisword</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\temp</span><span class="enscript-keyword">\noneword</span>
      <span class="enscript-keyword">\lispnarrowing</span> = 0pt
    <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\lispnarrowing</span> = #1em
    <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\fi</span>
}

<span class="enscript-comment">% @firstparagraphindent WORD
</span><span class="enscript-comment">% If WORD is `none', then suppress indentation of the first paragraph
</span><span class="enscript-comment">% after a section heading.  If WORD is `insert', then do indent at such
</span><span class="enscript-comment">% paragraphs.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% The paragraph indentation is suppressed or not by calling
</span><span class="enscript-comment">% \suppressfirstparagraphindent, which the sectioning commands do.
</span><span class="enscript-comment">% We switch the definition of this back and forth according to WORD.
</span><span class="enscript-comment">% By default, we suppress indentation.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\suppressfirstparagraphindent</span>{<span class="enscript-keyword">\dosuppressfirstparagraphindent</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\insertword</span>{insert}
<span class="enscript-comment">%
</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\firstparagraphindent</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\temp</span>{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\temp</span><span class="enscript-keyword">\noneword</span>
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\suppressfirstparagraphindent</span> = <span class="enscript-keyword">\dosuppressfirstparagraphindent</span>
  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\temp</span><span class="enscript-keyword">\insertword</span>
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\suppressfirstparagraphindent</span> = <span class="enscript-keyword">\relax</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\errhelp</span> = <span class="enscript-keyword">\EMsimple</span>
    <span class="enscript-keyword">\errmessage</span>{Unknown @firstparagraphindent option `<span class="enscript-keyword">\temp</span>'}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span>
}

<span class="enscript-comment">% Here is how we actually suppress indentation.  Redefine \everypar to
</span><span class="enscript-comment">% \kern backwards by \parindent, and then reset itself to empty.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% We also make \indent itself not actually do anything until the next
</span><span class="enscript-comment">% paragraph.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\dosuppressfirstparagraphindent</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\indent</span>{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\restorefirstparagraphindent</span>
    <span class="enscript-keyword">\indent</span>
  }<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\noindent</span>{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\restorefirstparagraphindent</span>
    <span class="enscript-keyword">\noindent</span>
  }<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\everypar</span> = {<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\kern</span> -<span class="enscript-keyword">\parindent</span>
    <span class="enscript-keyword">\restorefirstparagraphindent</span>
  }<span class="enscript-comment">%
</span>}

<span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\restorefirstparagraphindent</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\global</span> <span class="enscript-keyword">\let</span> <span class="enscript-keyword">\indent</span> = <span class="enscript-keyword">\ptexindent</span>
  <span class="enscript-keyword">\global</span> <span class="enscript-keyword">\let</span> <span class="enscript-keyword">\noindent</span> = <span class="enscript-keyword">\ptexnoindent</span>
  <span class="enscript-keyword">\global</span> <span class="enscript-keyword">\everypar</span> = {}<span class="enscript-comment">%
</span>}


<span class="enscript-comment">% @asis just yields its argument.  Used with @table, for example.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\asis</span>#1{#1}

<span class="enscript-comment">% @math outputs its argument in math mode.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% One complication: _ usually means subscripts, but it could also mean
</span><span class="enscript-comment">% an actual _ character, as in @math{@var{some_variable} + 1}.  So make
</span><span class="enscript-comment">% _ active, and distinguish by seeing if the current family is \slfam,
</span><span class="enscript-comment">% which is what @var uses.
</span>{
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\_</span> = <span class="enscript-keyword">\active</span>
  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\mathunderscore</span>{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\_</span>=<span class="enscript-keyword">\active</span>
    <span class="enscript-keyword">\def</span>_{<span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\fam</span>=<span class="enscript-keyword">\slfam</span> <span class="enscript-keyword">\_</span><span class="enscript-keyword">\else</span><span class="enscript-keyword">\sb</span><span class="enscript-keyword">\fi</span>}<span class="enscript-comment">%
</span>  }
}
<span class="enscript-comment">% Another complication: we want \\ (and @\) to output a \ character.
</span><span class="enscript-comment">% FYI, plain.tex uses \\ as a temporary control sequence (why?), but
</span><span class="enscript-comment">% this is not advertised and we don't care.  Texinfo does not
</span><span class="enscript-comment">% otherwise define @\.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\mathbackslash</span>{<span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\fam</span>=<span class="enscript-keyword">\ttfam</span> <span class="enscript-keyword">\mathchar</span>&quot;075C <span class="enscript-keyword">\else</span><span class="enscript-keyword">\backslash</span> <span class="enscript-keyword">\fi</span>}
<span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\math</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\tex</span>
  <span class="enscript-keyword">\mathunderscore</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\\</span> = <span class="enscript-keyword">\mathbackslash</span>
  <span class="enscript-keyword">\mathactive</span>
  $<span class="enscript-keyword">\finishmath</span>
}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\finishmath</span>#1{#1$<span class="enscript-keyword">\endgroup</span>}  <span class="enscript-comment">% Close the group opened by \tex.
</span>
<span class="enscript-comment">% Some active characters (such as &lt;) are spaced differently in math.
</span><span class="enscript-comment">% We have to reset their definitions in case the @math was an argument
</span><span class="enscript-comment">% to a command which sets the catcodes (such as @item or @section).
</span><span class="enscript-comment">%
</span>{
  <span class="enscript-keyword">\catcode</span>`^ = <span class="enscript-keyword">\active</span>
  <span class="enscript-keyword">\catcode</span>`&lt; = <span class="enscript-keyword">\active</span>
  <span class="enscript-keyword">\catcode</span>`&gt; = <span class="enscript-keyword">\active</span>
  <span class="enscript-keyword">\catcode</span>`+ = <span class="enscript-keyword">\active</span>
  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\mathactive</span>{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\let</span>^ = <span class="enscript-keyword">\ptexhat</span>
    <span class="enscript-keyword">\let</span>&lt; = <span class="enscript-keyword">\ptexless</span>
    <span class="enscript-keyword">\let</span>&gt; = <span class="enscript-keyword">\ptexgtr</span>
    <span class="enscript-keyword">\let</span>+ = <span class="enscript-keyword">\ptexplus</span>
  }
}

<span class="enscript-comment">% @bullet and @minus need the same treatment as @math, just above.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\bullet</span>{<span class="enscript-variable-name">$\ptexbullet$</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\minus</span>{<span class="enscript-variable-name">$-$</span>}

<span class="enscript-comment">% @dots{} outputs an ellipsis using the current font.
</span><span class="enscript-comment">% We do .5em per period so that it has the same spacing in the cm
</span><span class="enscript-comment">% typewriter fonts as three actual period characters; on the other hand,
</span><span class="enscript-comment">% in other typewriter fonts three periods are wider than 1.5em.  So do
</span><span class="enscript-comment">% whichever is larger.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\dots</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\leavevmode</span>
  <span class="enscript-keyword">\setbox</span>0=<span class="enscript-keyword">\hbox</span>{...}<span class="enscript-comment">% get width of three periods
</span>  <span class="enscript-keyword">\ifdim</span><span class="enscript-keyword">\wd</span>0 &gt; 1.5em
    <span class="enscript-keyword">\dimen</span>0 = <span class="enscript-keyword">\wd</span>0
  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\dimen</span>0 = 1.5em
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\hbox</span> to <span class="enscript-keyword">\dimen</span>0{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\hskip</span> 0pt plus.25fil
    .<span class="enscript-keyword">\hskip</span> 0pt plus1fil
    .<span class="enscript-keyword">\hskip</span> 0pt plus1fil
    .<span class="enscript-keyword">\hskip</span> 0pt plus.5fil
  }<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% @enddots{} is an end-of-sentence ellipsis.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\enddots</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\dots</span>
  <span class="enscript-keyword">\spacefactor</span>=<span class="enscript-keyword">\endofsentencespacefactor</span>
}

<span class="enscript-comment">% @comma{} is so commas can be inserted into text without messing up
</span><span class="enscript-comment">% Texinfo's parsing.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\comma</span> = ,

<span class="enscript-comment">% @refill is a no-op.
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\refill</span>=<span class="enscript-keyword">\relax</span>

<span class="enscript-comment">% If working on a large document in chapters, it is convenient to
</span><span class="enscript-comment">% be able to disable indexing, cross-referencing, and contents, for test runs.
</span><span class="enscript-comment">% This is done with @novalidate (before @setfilename).
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\newif</span><span class="enscript-keyword">\iflinks</span> <span class="enscript-keyword">\linkstrue</span> <span class="enscript-comment">% by default we want the aux files.
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\novalidate</span> = <span class="enscript-keyword">\linksfalse</span>

<span class="enscript-comment">% @setfilename is done at the beginning of every texinfo file.
</span><span class="enscript-comment">% So open here the files we need to have open while reading the input.
</span><span class="enscript-comment">% This makes it possible to make a .fmt file for texinfo.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\setfilename</span>{<span class="enscript-comment">%
</span>   <span class="enscript-keyword">\fixbackslash</span>  <span class="enscript-comment">% Turn off hack to swallow `\input texinfo'.
</span>   <span class="enscript-keyword">\iflinks</span>
     <span class="enscript-keyword">\tryauxfile</span>
     <span class="enscript-comment">% Open the new aux file.  TeX will close it automatically at exit.
</span>     <span class="enscript-keyword">\immediate</span><span class="enscript-keyword">\openout</span><span class="enscript-keyword">\auxfile</span>=<span class="enscript-keyword">\jobname</span>.aux
   <span class="enscript-keyword">\fi</span> <span class="enscript-comment">% \openindices needs to do some work in any case.
</span>   <span class="enscript-keyword">\openindices</span>
   <span class="enscript-keyword">\let</span><span class="enscript-keyword">\setfilename</span>=<span class="enscript-keyword">\comment</span> <span class="enscript-comment">% Ignore extra @setfilename cmds.
</span>   <span class="enscript-comment">%
</span>   <span class="enscript-comment">% If texinfo.cnf is present on the system, read it.
</span>   <span class="enscript-comment">% Useful for site-wide @afourpaper, etc.
</span>   <span class="enscript-keyword">\openin</span> 1 texinfo.cnf
   <span class="enscript-keyword">\ifeof</span> 1 <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\input</span> texinfo.cnf <span class="enscript-keyword">\fi</span>
   <span class="enscript-keyword">\closein</span> 1
   <span class="enscript-comment">%
</span>   <span class="enscript-keyword">\comment</span> <span class="enscript-comment">% Ignore the actual filename.
</span>}

<span class="enscript-comment">% Called from \setfilename.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\openindices</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\newindex</span>{cp}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\newcodeindex</span>{fn}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\newcodeindex</span>{vr}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\newcodeindex</span>{tp}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\newcodeindex</span>{ky}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\newcodeindex</span>{pg}<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% @bye.
</span><span class="enscript-keyword">\outer</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\bye</span>{<span class="enscript-keyword">\pagealignmacro</span><span class="enscript-keyword">\tracingstats</span>=1<span class="enscript-keyword">\ptexend</span>}


<span class="enscript-keyword">\message</span>{pdf,}
<span class="enscript-comment">% adobe `portable' document format
</span><span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\tempnum</span>
<span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\lnkcount</span>
<span class="enscript-keyword">\newtoks</span><span class="enscript-keyword">\filename</span>
<span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\filenamelength</span>
<span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\pgn</span>
<span class="enscript-keyword">\newtoks</span><span class="enscript-keyword">\toksA</span>
<span class="enscript-keyword">\newtoks</span><span class="enscript-keyword">\toksB</span>
<span class="enscript-keyword">\newtoks</span><span class="enscript-keyword">\toksC</span>
<span class="enscript-keyword">\newtoks</span><span class="enscript-keyword">\toksD</span>
<span class="enscript-keyword">\newbox</span><span class="enscript-keyword">\boxA</span>
<span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\countA</span>
<span class="enscript-keyword">\newif</span><span class="enscript-keyword">\ifpdf</span>
<span class="enscript-keyword">\newif</span><span class="enscript-keyword">\ifpdfmakepagedest</span>

<span class="enscript-comment">% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
</span><span class="enscript-comment">% can be set).  So we test for \relax and 0 as well as \undefined,
</span><span class="enscript-comment">% borrowed from ifpdf.sty.
</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\pdfoutput</span><span class="enscript-keyword">\undefined</span>
<span class="enscript-keyword">\else</span>
  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\pdfoutput</span><span class="enscript-keyword">\relax</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\ifcase</span><span class="enscript-keyword">\pdfoutput</span>
    <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\pdftrue</span>
    <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\fi</span>

<span class="enscript-comment">% PDF uses PostScript string constants for the names of xref targets,
</span><span class="enscript-comment">% for display in the outlines, and in other places.  Thus, we have to
</span><span class="enscript-comment">% double any backslashes.  Otherwise, a name like &quot;\node&quot; will be
</span><span class="enscript-comment">% interpreted as a newline (\n), followed by o, d, e.  Not good.
</span><span class="enscript-comment">% <a href="http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html">http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html</a>
</span><span class="enscript-comment">% (and related messages, the final outcome is that it is up to the TeX
</span><span class="enscript-comment">% user to double the backslashes and otherwise make the string valid, so
</span><span class="enscript-comment">% that's what we do).
</span>
<span class="enscript-comment">% double active backslashes.
</span><span class="enscript-comment">% 
</span>{<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\@</span>=0 <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\\</span>=<span class="enscript-keyword">\active</span>
 @gdef@activebackslashdouble{<span class="enscript-comment">%
</span>   @catcode`@<span class="enscript-keyword">\=</span>@active
   @let<span class="enscript-keyword">\=</span>@doublebackslash}
}

<span class="enscript-comment">% To handle parens, we must adopt a different approach, since parens are
</span><span class="enscript-comment">% not active characters.  hyperref.dtx (which has the same problem as
</span><span class="enscript-comment">% us) handles it with this amazing macro to replace tokens, with minor
</span><span class="enscript-comment">% changes for Texinfo.  It is included here under the GPL by permission
</span><span class="enscript-comment">% from the author, Heiko Oberdiek.
</span><span class="enscript-comment">% 
</span><span class="enscript-comment">% #1 is the tokens to replace.
</span><span class="enscript-comment">% #2 is the replacement.
</span><span class="enscript-comment">% #3 is the control sequence with the string.
</span><span class="enscript-comment">% 
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\HyPsdSubst</span>#1#2#3{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\HyPsdReplace</span>##1#1##2<span class="enscript-keyword">\END</span>{<span class="enscript-comment">%
</span>    ##1<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\\</span>##2<span class="enscript-keyword">\\</span><span class="enscript-comment">%
</span>    <span class="enscript-keyword">\else</span>
      #2<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\HyReturnAfterFi</span>{<span class="enscript-comment">%
</span>        <span class="enscript-keyword">\HyPsdReplace</span>##2<span class="enscript-keyword">\END</span>
      }<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\fi</span>
  }<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\xdef</span>#3{<span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\HyPsdReplace</span>#3#1<span class="enscript-keyword">\END</span>}<span class="enscript-comment">%
</span>}
<span class="enscript-keyword">\long</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\HyReturnAfterFi</span>#1<span class="enscript-keyword">\fi</span>{<span class="enscript-keyword">\fi</span>#1}

<span class="enscript-comment">% #1 is a control sequence in which to do the replacements.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\backslashparens</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\xdef</span>#1{#1}<span class="enscript-comment">% redefine it as its expansion; the definition is simply
</span>             <span class="enscript-comment">% \lastnode when called from \setref -&gt; \pdfmkdest.
</span>  <span class="enscript-keyword">\HyPsdSubst</span>{(}{<span class="enscript-keyword">\realbackslash</span>(}{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\HyPsdSubst</span>{)}{<span class="enscript-keyword">\realbackslash</span>)}{#1}<span class="enscript-comment">%
</span>}

<span class="enscript-keyword">\newhelp</span><span class="enscript-keyword">\nopdfimagehelp</span>{Texinfo supports .png, .jpg, .jpeg, and .pdf images
with PDF output, and none of those formats could be found.  (.eps cannot
be supported due to the design of the PDF format; use regular TeX (DVI
output) for that.)}

<span class="enscript-keyword">\ifpdf</span>
  <span class="enscript-keyword">\input</span> pdfcolor
  <span class="enscript-keyword">\pdfcatalog</span>{/PageMode /UseOutlines}
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\dopdfimage</span>#1#2#3{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\imagewidth</span>{#2}<span class="enscript-keyword">\setbox</span>0 = <span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\ignorespaces</span> #2}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\imageheight</span>{#3}<span class="enscript-keyword">\setbox</span>2 = <span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\ignorespaces</span> #3}<span class="enscript-comment">%
</span>    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% pdftex (and the PDF format) support .png, .jpg, .pdf (among
</span>    <span class="enscript-comment">% others).  Let's try in that order.
</span>    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\pdfimgext</span>=<span class="enscript-keyword">\empty</span>
    <span class="enscript-keyword">\begingroup</span>
      <span class="enscript-keyword">\openin</span> 1 #1.png <span class="enscript-keyword">\ifeof</span> 1
        <span class="enscript-keyword">\openin</span> 1 #1.jpg <span class="enscript-keyword">\ifeof</span> 1
          <span class="enscript-keyword">\openin</span> 1 #1.jpeg <span class="enscript-keyword">\ifeof</span> 1
            <span class="enscript-keyword">\openin</span> 1 #1.JPG <span class="enscript-keyword">\ifeof</span> 1
              <span class="enscript-keyword">\openin</span> 1 #1.pdf <span class="enscript-keyword">\ifeof</span> 1
                <span class="enscript-keyword">\errhelp</span> = <span class="enscript-keyword">\nopdfimagehelp</span>
                <span class="enscript-keyword">\errmessage</span>{Could not find image file #1 for pdf}<span class="enscript-comment">%
</span>              <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\pdfimgext</span>{pdf}<span class="enscript-comment">%
</span>              <span class="enscript-keyword">\fi</span>
            <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\pdfimgext</span>{JPG}<span class="enscript-comment">%
</span>            <span class="enscript-keyword">\fi</span>
          <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\pdfimgext</span>{jpeg}<span class="enscript-comment">%
</span>          <span class="enscript-keyword">\fi</span>
        <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\pdfimgext</span>{jpg}<span class="enscript-comment">%
</span>        <span class="enscript-keyword">\fi</span>
      <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\pdfimgext</span>{png}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\fi</span>
      <span class="enscript-keyword">\closein</span> 1
    <span class="enscript-keyword">\endgroup</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% without \immediate, pdftex seg faults when the same image is
</span>    <span class="enscript-comment">% included twice.  (Version 3.14159-pre-1.0-unofficial-20010704.)
</span>    <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\pdftexversion</span> &lt; 14
      <span class="enscript-keyword">\immediate</span><span class="enscript-keyword">\pdfimage</span>
    <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\immediate</span><span class="enscript-keyword">\pdfximage</span>
    <span class="enscript-keyword">\fi</span>
      <span class="enscript-keyword">\ifdim</span> <span class="enscript-keyword">\wd</span>0 &gt;0pt width <span class="enscript-keyword">\imagewidth</span> <span class="enscript-keyword">\fi</span>
      <span class="enscript-keyword">\ifdim</span> <span class="enscript-keyword">\wd</span>2 &gt;0pt height <span class="enscript-keyword">\imageheight</span> <span class="enscript-keyword">\fi</span>
      <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\pdftexversion</span>&lt;13
         #1.<span class="enscript-keyword">\pdfimgext</span>
       <span class="enscript-keyword">\else</span>
         {#1.<span class="enscript-keyword">\pdfimgext</span>}<span class="enscript-comment">%
</span>       <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\pdftexversion</span> &lt; 14 <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\pdfrefximage</span> <span class="enscript-keyword">\pdflastximage</span>
    <span class="enscript-keyword">\fi</span>}
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\pdfmkdest</span>#1{{<span class="enscript-comment">%
</span>    <span class="enscript-comment">% We have to set dummies so commands such as @code, and characters
</span>    <span class="enscript-comment">% such as \, aren't expanded when present in a section title.
</span>    <span class="enscript-keyword">\indexnofonts</span>
    <span class="enscript-keyword">\turnoffactive</span>
    <span class="enscript-keyword">\activebackslashdouble</span>
    <span class="enscript-keyword">\makevalueexpandable</span>
    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\pdfdestname</span>{#1}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\backslashparens</span><span class="enscript-keyword">\pdfdestname</span>
    <span class="enscript-keyword">\safewhatsit</span>{<span class="enscript-keyword">\pdfdest</span> name{<span class="enscript-keyword">\pdfdestname</span>} xyz}<span class="enscript-comment">%
</span>  }}
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% used to mark target names; must be expandable.
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\pdfmkpgn</span>#1{#1}
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% by default, use a color that is dark enough to print on paper as
</span>  <span class="enscript-comment">% nearly black, but still distinguishable for online viewing.
</span>  <span class="enscript-comment">% (Defined in pdfcolor.tex.)
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\urlcolor</span> = <span class="enscript-keyword">\BrickRed</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\linkcolor</span> = <span class="enscript-keyword">\BrickRed</span>
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\endlink</span>{<span class="enscript-keyword">\Black</span><span class="enscript-keyword">\pdfendlink</span>}
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Adding outlines to PDF; macros for calculating structure of outlines
</span>  <span class="enscript-comment">% come from Petr Olsak
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\expnumber</span>#1{<span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\csname</span>#1<span class="enscript-keyword">\endcsname</span><span class="enscript-keyword">\relax</span> 0<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\csname</span>#1<span class="enscript-keyword">\endcsname</span> <span class="enscript-keyword">\fi</span>}
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\advancenumber</span>#1{<span class="enscript-keyword">\tempnum</span>=<span class="enscript-keyword">\expnumber</span>{#1}<span class="enscript-keyword">\relax</span>
    <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\tempnum</span> by 1
    <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\csname</span>#1<span class="enscript-keyword">\endcsname</span>{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\tempnum</span>}}
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% #1 is the section text, which is what will be displayed in the
</span>  <span class="enscript-comment">% outline by the pdf viewer.  #2 is the pdf expression for the number
</span>  <span class="enscript-comment">% of subentries (or empty, for subsubsections).  #3 is the node text,
</span>  <span class="enscript-comment">% which might be empty if this toc entry had no corresponding node.
</span>  <span class="enscript-comment">% #4 is the page number
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\dopdfoutline</span>#1#2#3#4{<span class="enscript-comment">%
</span>    <span class="enscript-comment">% Generate a link to the node text if that exists; else, use the
</span>    <span class="enscript-comment">% page number.  We could generate a destination for the section
</span>    <span class="enscript-comment">% text in the case where a section has no node, but it doesn't
</span>    <span class="enscript-comment">% seem worth the trouble, since most documents are normally structured.
</span>    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\pdfoutlinedest</span>{#3}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\pdfoutlinedest</span><span class="enscript-keyword">\empty</span>
      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\pdfoutlinedest</span>{#4}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\else</span>
      <span class="enscript-comment">% Doubled backslashes in the name.
</span>      {<span class="enscript-keyword">\activebackslashdouble</span> <span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\pdfoutlinedest</span>{#3}<span class="enscript-comment">%
</span>       <span class="enscript-keyword">\backslashparens</span><span class="enscript-keyword">\pdfoutlinedest</span>}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\fi</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Also double the backslashes in the display string.
</span>    {<span class="enscript-keyword">\activebackslashdouble</span> <span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\pdfoutlinetext</span>{#1}<span class="enscript-comment">%
</span>     <span class="enscript-keyword">\backslashparens</span><span class="enscript-keyword">\pdfoutlinetext</span>}<span class="enscript-comment">%
</span>    <span class="enscript-comment">%
</span>    <span class="enscript-keyword">\pdfoutline</span> goto name{<span class="enscript-keyword">\pdfmkpgn</span>{<span class="enscript-keyword">\pdfoutlinedest</span>}}#2{<span class="enscript-keyword">\pdfoutlinetext</span>}<span class="enscript-comment">%
</span>  }
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\pdfmakeoutlines</span>{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\begingroup</span>
      <span class="enscript-comment">% Thanh's hack / proper braces in bookmarks
</span>      <span class="enscript-keyword">\edef</span><span class="enscript-keyword">\mylbrace</span>{<span class="enscript-keyword">\iftrue</span> <span class="enscript-keyword">\string</span>{<span class="enscript-keyword">\else</span>}<span class="enscript-keyword">\fi</span>}<span class="enscript-keyword">\let</span><span class="enscript-keyword">\{</span>=<span class="enscript-keyword">\mylbrace</span>
      <span class="enscript-keyword">\edef</span><span class="enscript-keyword">\myrbrace</span>{<span class="enscript-keyword">\iffalse</span>{<span class="enscript-keyword">\else</span><span class="enscript-keyword">\string</span>}<span class="enscript-keyword">\fi</span>}<span class="enscript-keyword">\let</span><span class="enscript-keyword">\}</span>=<span class="enscript-keyword">\myrbrace</span>
      <span class="enscript-comment">%
</span>      <span class="enscript-comment">% Read toc silently, to get counts of subentries for \pdfoutline.
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\numchapentry</span>##1##2##3##4{<span class="enscript-comment">%
</span>	<span class="enscript-keyword">\def</span><span class="enscript-keyword">\thischapnum</span>{##2}<span class="enscript-comment">%
</span>	<span class="enscript-keyword">\def</span><span class="enscript-keyword">\thissecnum</span>{0}<span class="enscript-comment">%
</span>	<span class="enscript-keyword">\def</span><span class="enscript-keyword">\thissubsecnum</span>{0}<span class="enscript-comment">%
</span>      }<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\numsecentry</span>##1##2##3##4{<span class="enscript-comment">%
</span>	<span class="enscript-keyword">\advancenumber</span>{chap<span class="enscript-keyword">\thischapnum</span>}<span class="enscript-comment">%
</span>	<span class="enscript-keyword">\def</span><span class="enscript-keyword">\thissecnum</span>{##2}<span class="enscript-comment">%
</span>	<span class="enscript-keyword">\def</span><span class="enscript-keyword">\thissubsecnum</span>{0}<span class="enscript-comment">%
</span>      }<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\numsubsecentry</span>##1##2##3##4{<span class="enscript-comment">%
</span>	<span class="enscript-keyword">\advancenumber</span>{sec<span class="enscript-keyword">\thissecnum</span>}<span class="enscript-comment">%
</span>	<span class="enscript-keyword">\def</span><span class="enscript-keyword">\thissubsecnum</span>{##2}<span class="enscript-comment">%
</span>      }<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\numsubsubsecentry</span>##1##2##3##4{<span class="enscript-comment">%
</span>	<span class="enscript-keyword">\advancenumber</span>{subsec<span class="enscript-keyword">\thissubsecnum</span>}<span class="enscript-comment">%
</span>      }<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\thischapnum</span>{0}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\thissecnum</span>{0}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\thissubsecnum</span>{0}<span class="enscript-comment">%
</span>      <span class="enscript-comment">%
</span>      <span class="enscript-comment">% use \def rather than \let here because we redefine \chapentry et
</span>      <span class="enscript-comment">% al. a second time, below.
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\appentry</span>{<span class="enscript-keyword">\numchapentry</span>}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\appsecentry</span>{<span class="enscript-keyword">\numsecentry</span>}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\appsubsecentry</span>{<span class="enscript-keyword">\numsubsecentry</span>}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\appsubsubsecentry</span>{<span class="enscript-keyword">\numsubsubsecentry</span>}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\unnchapentry</span>{<span class="enscript-keyword">\numchapentry</span>}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\unnsecentry</span>{<span class="enscript-keyword">\numsecentry</span>}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\unnsubsecentry</span>{<span class="enscript-keyword">\numsubsecentry</span>}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\unnsubsubsecentry</span>{<span class="enscript-keyword">\numsubsubsecentry</span>}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\readdatafile</span>{toc}<span class="enscript-comment">%
</span>      <span class="enscript-comment">%
</span>      <span class="enscript-comment">% Read toc second time, this time actually producing the outlines.
</span>      <span class="enscript-comment">% The `-' means take the \expnumber as the absolute number of
</span>      <span class="enscript-comment">% subentries, which we calculated on our first read of the .toc above.
</span>      <span class="enscript-comment">%
</span>      <span class="enscript-comment">% We use the node names as the destinations.
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\numchapentry</span>##1##2##3##4{<span class="enscript-comment">%
</span>        <span class="enscript-keyword">\dopdfoutline</span>{##1}{count-<span class="enscript-keyword">\expnumber</span>{chap##2}}{##3}{##4}}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\numsecentry</span>##1##2##3##4{<span class="enscript-comment">%
</span>        <span class="enscript-keyword">\dopdfoutline</span>{##1}{count-<span class="enscript-keyword">\expnumber</span>{sec##2}}{##3}{##4}}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\numsubsecentry</span>##1##2##3##4{<span class="enscript-comment">%
</span>        <span class="enscript-keyword">\dopdfoutline</span>{##1}{count-<span class="enscript-keyword">\expnumber</span>{subsec##2}}{##3}{##4}}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\numsubsubsecentry</span>##1##2##3##4{<span class="enscript-comment">% count is always zero
</span>        <span class="enscript-keyword">\dopdfoutline</span>{##1}{}{##3}{##4}}<span class="enscript-comment">%
</span>      <span class="enscript-comment">%
</span>      <span class="enscript-comment">% PDF outlines are displayed using system fonts, instead of
</span>      <span class="enscript-comment">% document fonts.  Therefore we cannot use special characters,
</span>      <span class="enscript-comment">% since the encoding is unknown.  For example, the eogonek from
</span>      <span class="enscript-comment">% Latin 2 (0xea) gets translated to a | character.  Info from
</span>      <span class="enscript-comment">% Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
</span>      <span class="enscript-comment">%
</span>      <span class="enscript-comment">% xx to do this right, we have to translate 8-bit characters to
</span>      <span class="enscript-comment">% their &quot;best&quot; equivalent, based on the @documentencoding.  Right
</span>      <span class="enscript-comment">% now, I guess we'll just let the pdf reader have its way.
</span>      <span class="enscript-keyword">\indexnofonts</span>
      <span class="enscript-keyword">\setupdatafile</span>
      <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\\</span>=<span class="enscript-keyword">\active</span> <span class="enscript-keyword">\otherbackslash</span>
      <span class="enscript-keyword">\input</span> <span class="enscript-keyword">\tocreadfilename</span>
    <span class="enscript-keyword">\endgroup</span>
  }
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\skipspaces</span>#1{<span class="enscript-keyword">\def</span><span class="enscript-keyword">\PP</span>{#1}<span class="enscript-keyword">\def</span><span class="enscript-keyword">\D</span>{|}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\PP</span><span class="enscript-keyword">\D</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\nextsp</span><span class="enscript-keyword">\relax</span>
    <span class="enscript-keyword">\else</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\nextsp</span><span class="enscript-keyword">\skipspaces</span>
      <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\p</span><span class="enscript-keyword">\space</span><span class="enscript-keyword">\else</span><span class="enscript-keyword">\addtokens</span>{<span class="enscript-keyword">\filename</span>}{<span class="enscript-keyword">\PP</span>}<span class="enscript-comment">%
</span>        <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\filenamelength</span> by 1
      <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\nextsp</span>}
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\getfilename</span>#1{<span class="enscript-keyword">\filenamelength</span>=0<span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\skipspaces</span>#1|<span class="enscript-keyword">\relax</span>}
  <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\pdftexversion</span> &lt; 14
    <span class="enscript-keyword">\let</span> <span class="enscript-keyword">\startlink</span> <span class="enscript-keyword">\pdfannotlink</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\let</span> <span class="enscript-keyword">\startlink</span> <span class="enscript-keyword">\pdfstartlink</span>
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-comment">% make a live url in pdf output.
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\pdfurl</span>#1{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\begingroup</span>
      <span class="enscript-comment">% it seems we really need yet another set of dummies; have not
</span>      <span class="enscript-comment">% tried to figure out what each command should do in the context
</span>      <span class="enscript-comment">% of @url.  for now, just make @/ a no-op, that's the only one
</span>      <span class="enscript-comment">% people have actually reported a problem with.
</span>      <span class="enscript-comment">% 
</span>      <span class="enscript-keyword">\normalturnoffactive</span>
      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\@</span>{@}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\let</span><span class="enscript-keyword">\/</span>=<span class="enscript-keyword">\empty</span>
      <span class="enscript-keyword">\makevalueexpandable</span>
      <span class="enscript-keyword">\leavevmode</span><span class="enscript-keyword">\urlcolor</span>
      <span class="enscript-keyword">\startlink</span> attr{/Border [0 0 0]}<span class="enscript-comment">%
</span>        user{/Subtype /Link /A &lt;&lt; /S /URI /URI (#1) &gt;&gt;}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\endgroup</span>}
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\pdfgettoks</span>#1.{<span class="enscript-keyword">\setbox</span><span class="enscript-keyword">\boxA</span>=<span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\toksA</span>={#1.}<span class="enscript-keyword">\toksB</span>={}<span class="enscript-keyword">\maketoks</span>}}
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\addtokens</span>#1#2{<span class="enscript-keyword">\edef</span><span class="enscript-keyword">\addtoks</span>{<span class="enscript-keyword">\noexpand</span>#1={<span class="enscript-keyword">\the</span>#1#2}}<span class="enscript-keyword">\addtoks</span>}
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\adn</span>#1{<span class="enscript-keyword">\addtokens</span>{<span class="enscript-keyword">\toksC</span>}{#1}<span class="enscript-keyword">\global</span><span class="enscript-keyword">\countA</span>=1<span class="enscript-keyword">\let</span><span class="enscript-keyword">\next</span>=<span class="enscript-keyword">\maketoks</span>}
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\poptoks</span>#1#2|ENDTOKS|{<span class="enscript-keyword">\let</span><span class="enscript-keyword">\first</span>=#1<span class="enscript-keyword">\toksD</span>={#1}<span class="enscript-keyword">\toksA</span>={#2}}
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\maketoks</span>{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\poptoks</span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\toksA</span>|ENDTOKS|<span class="enscript-keyword">\relax</span>
    <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\first</span>0<span class="enscript-keyword">\adn</span>0
    <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\first</span>1<span class="enscript-keyword">\adn</span>1 <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\first</span>2<span class="enscript-keyword">\adn</span>2 <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\first</span>3<span class="enscript-keyword">\adn</span>3
    <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\first</span>4<span class="enscript-keyword">\adn</span>4 <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\first</span>5<span class="enscript-keyword">\adn</span>5 <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\first</span>6<span class="enscript-keyword">\adn</span>6
    <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\first</span>7<span class="enscript-keyword">\adn</span>7 <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\first</span>8<span class="enscript-keyword">\adn</span>8 <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\first</span>9<span class="enscript-keyword">\adn</span>9
    <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\ifnum</span>0=<span class="enscript-keyword">\countA</span><span class="enscript-keyword">\else</span><span class="enscript-keyword">\makelink</span><span class="enscript-keyword">\fi</span>
      <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\first</span>.<span class="enscript-keyword">\let</span><span class="enscript-keyword">\next</span>=<span class="enscript-keyword">\done</span><span class="enscript-keyword">\else</span>
        <span class="enscript-keyword">\let</span><span class="enscript-keyword">\next</span>=<span class="enscript-keyword">\maketoks</span>
        <span class="enscript-keyword">\addtokens</span>{<span class="enscript-keyword">\toksB</span>}{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\toksD</span>}
        <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\first</span>,<span class="enscript-keyword">\addtokens</span>{<span class="enscript-keyword">\toksB</span>}{<span class="enscript-keyword">\space</span>}<span class="enscript-keyword">\fi</span>
      <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\next</span>}
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\makelink</span>{<span class="enscript-keyword">\addtokens</span>{<span class="enscript-keyword">\toksB</span>}<span class="enscript-comment">%
</span>    {<span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\pdflink</span>{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\toksC</span>}}<span class="enscript-keyword">\toksC</span>={}<span class="enscript-keyword">\global</span><span class="enscript-keyword">\countA</span>=0}
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\pdflink</span>#1{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\startlink</span> attr{/Border [0 0 0]} goto name{<span class="enscript-keyword">\pdfmkpgn</span>{#1}}
    <span class="enscript-keyword">\linkcolor</span> #1<span class="enscript-keyword">\endlink</span>}
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\done</span>{<span class="enscript-keyword">\edef</span><span class="enscript-keyword">\st</span>{<span class="enscript-keyword">\global</span><span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\toksA</span>={<span class="enscript-keyword">\the</span><span class="enscript-keyword">\toksB</span>}}<span class="enscript-keyword">\st</span>}
<span class="enscript-keyword">\else</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\pdfmkdest</span> = <span class="enscript-keyword">\gobble</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\pdfurl</span> = <span class="enscript-keyword">\gobble</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\endlink</span> = <span class="enscript-keyword">\relax</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\linkcolor</span> = <span class="enscript-keyword">\relax</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\pdfmakeoutlines</span> = <span class="enscript-keyword">\relax</span>
<span class="enscript-keyword">\fi</span>  <span class="enscript-comment">% \ifx\pdfoutput
</span>

<span class="enscript-keyword">\message</span>{fonts,}

<span class="enscript-comment">% Change the current font style to #1, remembering it in \curfontstyle.
</span><span class="enscript-comment">% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in
</span><span class="enscript-comment">% italics, not bold italics.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\setfontstyle</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\curfontstyle</span>{#1}<span class="enscript-comment">% not as a control sequence, because we are \edef'd.
</span>  <span class="enscript-keyword">\csname</span> ten#1<span class="enscript-keyword">\endcsname</span>  <span class="enscript-comment">% change the current font
</span>}

<span class="enscript-comment">% Select #1 fonts with the current style.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\selectfonts</span>#1{<span class="enscript-keyword">\csname</span> #1fonts<span class="enscript-keyword">\endcsname</span> <span class="enscript-keyword">\csname</span><span class="enscript-keyword">\curfontstyle</span><span class="enscript-keyword">\endcsname</span>}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\rm</span>{<span class="enscript-keyword">\fam</span>=0 <span class="enscript-keyword">\setfontstyle</span>{rm}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\it</span>{<span class="enscript-keyword">\fam</span>=<span class="enscript-keyword">\itfam</span> <span class="enscript-keyword">\setfontstyle</span>{it}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\sl</span>{<span class="enscript-keyword">\fam</span>=<span class="enscript-keyword">\slfam</span> <span class="enscript-keyword">\setfontstyle</span>{sl}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\bf</span>{<span class="enscript-keyword">\fam</span>=<span class="enscript-keyword">\bffam</span> <span class="enscript-keyword">\setfontstyle</span>{bf}}<span class="enscript-keyword">\def</span><span class="enscript-keyword">\bfstylename</span>{bf}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\tt</span>{<span class="enscript-keyword">\fam</span>=<span class="enscript-keyword">\ttfam</span> <span class="enscript-keyword">\setfontstyle</span>{tt}}

<span class="enscript-comment">% Texinfo sort of supports the sans serif font style, which plain TeX does not.
</span><span class="enscript-comment">% So we set up a \sf.
</span><span class="enscript-keyword">\newfam</span><span class="enscript-keyword">\sffam</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\sf</span>{<span class="enscript-keyword">\fam</span>=<span class="enscript-keyword">\sffam</span> <span class="enscript-keyword">\setfontstyle</span>{sf}}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\li</span> = <span class="enscript-keyword">\sf</span> <span class="enscript-comment">% Sometimes we call it \li, not \sf.
</span>
<span class="enscript-comment">% We don't need math for this font style.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\ttsl</span>{<span class="enscript-keyword">\setfontstyle</span>{ttsl}}


<span class="enscript-comment">% Default leading.
</span><span class="enscript-keyword">\newdimen</span><span class="enscript-keyword">\textleading</span>  <span class="enscript-keyword">\textleading</span> = 13.2pt

<span class="enscript-comment">% Set the baselineskip to #1, and the lineskip and strut size
</span><span class="enscript-comment">% correspondingly.  There is no deep meaning behind these magic numbers
</span><span class="enscript-comment">% used as factors; they just match (closely enough) what Knuth defined.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\lineskipfactor</span>{.08333}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\strutheightpercent</span>{.70833}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\strutdepthpercent</span> {.29167}
<span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\setleading</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\normalbaselineskip</span> = #1<span class="enscript-keyword">\relax</span>
  <span class="enscript-keyword">\normallineskip</span> = <span class="enscript-keyword">\lineskipfactor</span><span class="enscript-keyword">\normalbaselineskip</span>
  <span class="enscript-keyword">\normalbaselines</span>
  <span class="enscript-keyword">\setbox</span><span class="enscript-keyword">\strutbox</span> =<span class="enscript-keyword">\hbox</span>{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\vrule</span> width0pt height<span class="enscript-keyword">\strutheightpercent</span><span class="enscript-keyword">\baselineskip</span>
                    depth <span class="enscript-keyword">\strutdepthpercent</span> <span class="enscript-keyword">\baselineskip</span>
  }<span class="enscript-comment">%
</span>}

<span class="enscript-comment">%
</span><span class="enscript-comment">% PDF CMaps.  See also LaTeX's t1.cmap.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% \cmapOT1
</span><span class="enscript-keyword">\ifpdf</span>
  <span class="enscript-keyword">\begingroup</span>
    <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^M=<span class="enscript-keyword">\active</span> <span class="enscript-keyword">\def</span>^^M{^^J}<span class="enscript-comment">% Output line endings as the ^^J char.
</span>    <span class="enscript-keyword">\catcode</span>`\%=12 <span class="enscript-keyword">\immediate</span><span class="enscript-keyword">\pdfobj</span> stream {<span class="enscript-comment">%!PS-Adobe-3.0 Resource-CMap
</span><span class="enscript-comment">%%DocumentNeededResources: ProcSet (CIDInit)
</span><span class="enscript-comment">%%IncludeResource: ProcSet (CIDInit)
</span><span class="enscript-comment">%%BeginResource: CMap (TeX-OT1-0)
</span><span class="enscript-comment">%%Title: (TeX-OT1-0 TeX OT1 0)
</span><span class="enscript-comment">%%Version: 1.000
</span><span class="enscript-comment">%%EndComments
</span>/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo
&lt;&lt; /Registry (TeX)
/Ordering (OT1)
/Supplement 0
&gt;&gt; def
/CMapName /TeX-OT1-0 def
/CMapType 2 def
1 begincodespacerange
&lt;00&gt; &lt;7F&gt;
endcodespacerange
8 beginbfrange
&lt;00&gt; &lt;01&gt; &lt;0393&gt;
&lt;09&gt; &lt;0A&gt; &lt;03A8&gt;
&lt;23&gt; &lt;26&gt; &lt;0023&gt;
&lt;28&gt; &lt;3B&gt; &lt;0028&gt;
&lt;3F&gt; &lt;5B&gt; &lt;003F&gt;
&lt;5D&gt; &lt;5E&gt; &lt;005D&gt;
&lt;61&gt; &lt;7A&gt; &lt;0061&gt;
&lt;7B&gt; &lt;7C&gt; &lt;2013&gt;
endbfrange
40 beginbfchar
&lt;02&gt; &lt;0398&gt;
&lt;03&gt; &lt;039B&gt;
&lt;04&gt; &lt;039E&gt;
&lt;05&gt; &lt;03A0&gt;
&lt;06&gt; &lt;03A3&gt;
&lt;07&gt; &lt;03D2&gt;
&lt;08&gt; &lt;03A6&gt;
&lt;0B&gt; &lt;00660066&gt;
&lt;0C&gt; &lt;00660069&gt;
&lt;0D&gt; &lt;0066006C&gt;
&lt;0E&gt; &lt;006600660069&gt;
&lt;0F&gt; &lt;00660066006C&gt;
&lt;10&gt; &lt;0131&gt;
&lt;11&gt; &lt;0237&gt;
&lt;12&gt; &lt;0060&gt;
&lt;13&gt; &lt;00B4&gt;
&lt;14&gt; &lt;02C7&gt;
&lt;15&gt; &lt;02D8&gt;
&lt;16&gt; &lt;00AF&gt;
&lt;17&gt; &lt;02DA&gt;
&lt;18&gt; &lt;00B8&gt;
&lt;19&gt; &lt;00DF&gt;
&lt;1A&gt; &lt;00E6&gt;
&lt;1B&gt; &lt;0153&gt;
&lt;1C&gt; &lt;00F8&gt;
&lt;1D&gt; &lt;00C6&gt;
&lt;1E&gt; &lt;0152&gt;
&lt;1F&gt; &lt;00D8&gt;
&lt;21&gt; &lt;0021&gt;
&lt;22&gt; &lt;201D&gt;
&lt;27&gt; &lt;2019&gt;
&lt;3C&gt; &lt;00A1&gt;
&lt;3D&gt; &lt;003D&gt;
&lt;3E&gt; &lt;00BF&gt;
&lt;5C&gt; &lt;201C&gt;
&lt;5F&gt; &lt;02D9&gt;
&lt;60&gt; &lt;2018&gt;
&lt;7D&gt; &lt;02DD&gt;
&lt;7E&gt; &lt;007E&gt;
&lt;7F&gt; &lt;00A8&gt;
endbfchar
endcmap
CMapName currentdict /CMap defineresource pop
end
end
<span class="enscript-comment">%%EndResource
</span><span class="enscript-comment">%%EOF
</span>    }<span class="enscript-keyword">\endgroup</span>
  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\edef</span><span class="enscript-keyword">\csname</span> cmapOT1<span class="enscript-keyword">\endcsname</span>#1{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\pdffontattr</span>#1{/ToUnicode <span class="enscript-keyword">\the</span><span class="enscript-keyword">\pdflastobj</span><span class="enscript-keyword">\space</span> 0 R}<span class="enscript-comment">%
</span>  }<span class="enscript-comment">%
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% \cmapOT1IT
</span>  <span class="enscript-keyword">\begingroup</span>
    <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^M=<span class="enscript-keyword">\active</span> <span class="enscript-keyword">\def</span>^^M{^^J}<span class="enscript-comment">% Output line endings as the ^^J char.
</span>    <span class="enscript-keyword">\catcode</span>`\%=12 <span class="enscript-keyword">\immediate</span><span class="enscript-keyword">\pdfobj</span> stream {<span class="enscript-comment">%!PS-Adobe-3.0 Resource-CMap
</span><span class="enscript-comment">%%DocumentNeededResources: ProcSet (CIDInit)
</span><span class="enscript-comment">%%IncludeResource: ProcSet (CIDInit)
</span><span class="enscript-comment">%%BeginResource: CMap (TeX-OT1IT-0)
</span><span class="enscript-comment">%%Title: (TeX-OT1IT-0 TeX OT1IT 0)
</span><span class="enscript-comment">%%Version: 1.000
</span><span class="enscript-comment">%%EndComments
</span>/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo
&lt;&lt; /Registry (TeX)
/Ordering (OT1IT)
/Supplement 0
&gt;&gt; def
/CMapName /TeX-OT1IT-0 def
/CMapType 2 def
1 begincodespacerange
&lt;00&gt; &lt;7F&gt;
endcodespacerange
8 beginbfrange
&lt;00&gt; &lt;01&gt; &lt;0393&gt;
&lt;09&gt; &lt;0A&gt; &lt;03A8&gt;
&lt;25&gt; &lt;26&gt; &lt;0025&gt;
&lt;28&gt; &lt;3B&gt; &lt;0028&gt;
&lt;3F&gt; &lt;5B&gt; &lt;003F&gt;
&lt;5D&gt; &lt;5E&gt; &lt;005D&gt;
&lt;61&gt; &lt;7A&gt; &lt;0061&gt;
&lt;7B&gt; &lt;7C&gt; &lt;2013&gt;
endbfrange
42 beginbfchar
&lt;02&gt; &lt;0398&gt;
&lt;03&gt; &lt;039B&gt;
&lt;04&gt; &lt;039E&gt;
&lt;05&gt; &lt;03A0&gt;
&lt;06&gt; &lt;03A3&gt;
&lt;07&gt; &lt;03D2&gt;
&lt;08&gt; &lt;03A6&gt;
&lt;0B&gt; &lt;00660066&gt;
&lt;0C&gt; &lt;00660069&gt;
&lt;0D&gt; &lt;0066006C&gt;
&lt;0E&gt; &lt;006600660069&gt;
&lt;0F&gt; &lt;00660066006C&gt;
&lt;10&gt; &lt;0131&gt;
&lt;11&gt; &lt;0237&gt;
&lt;12&gt; &lt;0060&gt;
&lt;13&gt; &lt;00B4&gt;
&lt;14&gt; &lt;02C7&gt;
&lt;15&gt; &lt;02D8&gt;
&lt;16&gt; &lt;00AF&gt;
&lt;17&gt; &lt;02DA&gt;
&lt;18&gt; &lt;00B8&gt;
&lt;19&gt; &lt;00DF&gt;
&lt;1A&gt; &lt;00E6&gt;
&lt;1B&gt; &lt;0153&gt;
&lt;1C&gt; &lt;00F8&gt;
&lt;1D&gt; &lt;00C6&gt;
&lt;1E&gt; &lt;0152&gt;
&lt;1F&gt; &lt;00D8&gt;
&lt;21&gt; &lt;0021&gt;
&lt;22&gt; &lt;201D&gt;
&lt;23&gt; &lt;0023&gt;
&lt;24&gt; &lt;00A3&gt;
&lt;27&gt; &lt;2019&gt;
&lt;3C&gt; &lt;00A1&gt;
&lt;3D&gt; &lt;003D&gt;
&lt;3E&gt; &lt;00BF&gt;
&lt;5C&gt; &lt;201C&gt;
&lt;5F&gt; &lt;02D9&gt;
&lt;60&gt; &lt;2018&gt;
&lt;7D&gt; &lt;02DD&gt;
&lt;7E&gt; &lt;007E&gt;
&lt;7F&gt; &lt;00A8&gt;
endbfchar
endcmap
CMapName currentdict /CMap defineresource pop
end
end
<span class="enscript-comment">%%EndResource
</span><span class="enscript-comment">%%EOF
</span>    }<span class="enscript-keyword">\endgroup</span>
  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\edef</span><span class="enscript-keyword">\csname</span> cmapOT1IT<span class="enscript-keyword">\endcsname</span>#1{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\pdffontattr</span>#1{/ToUnicode <span class="enscript-keyword">\the</span><span class="enscript-keyword">\pdflastobj</span><span class="enscript-keyword">\space</span> 0 R}<span class="enscript-comment">%
</span>  }<span class="enscript-comment">%
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% \cmapOT1TT
</span>  <span class="enscript-keyword">\begingroup</span>
    <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^M=<span class="enscript-keyword">\active</span> <span class="enscript-keyword">\def</span>^^M{^^J}<span class="enscript-comment">% Output line endings as the ^^J char.
</span>    <span class="enscript-keyword">\catcode</span>`\%=12 <span class="enscript-keyword">\immediate</span><span class="enscript-keyword">\pdfobj</span> stream {<span class="enscript-comment">%!PS-Adobe-3.0 Resource-CMap
</span><span class="enscript-comment">%%DocumentNeededResources: ProcSet (CIDInit)
</span><span class="enscript-comment">%%IncludeResource: ProcSet (CIDInit)
</span><span class="enscript-comment">%%BeginResource: CMap (TeX-OT1TT-0)
</span><span class="enscript-comment">%%Title: (TeX-OT1TT-0 TeX OT1TT 0)
</span><span class="enscript-comment">%%Version: 1.000
</span><span class="enscript-comment">%%EndComments
</span>/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo
&lt;&lt; /Registry (TeX)
/Ordering (OT1TT)
/Supplement 0
&gt;&gt; def
/CMapName /TeX-OT1TT-0 def
/CMapType 2 def
1 begincodespacerange
&lt;00&gt; &lt;7F&gt;
endcodespacerange
5 beginbfrange
&lt;00&gt; &lt;01&gt; &lt;0393&gt;
&lt;09&gt; &lt;0A&gt; &lt;03A8&gt;
&lt;21&gt; &lt;26&gt; &lt;0021&gt;
&lt;28&gt; &lt;5F&gt; &lt;0028&gt;
&lt;61&gt; &lt;7E&gt; &lt;0061&gt;
endbfrange
32 beginbfchar
&lt;02&gt; &lt;0398&gt;
&lt;03&gt; &lt;039B&gt;
&lt;04&gt; &lt;039E&gt;
&lt;05&gt; &lt;03A0&gt;
&lt;06&gt; &lt;03A3&gt;
&lt;07&gt; &lt;03D2&gt;
&lt;08&gt; &lt;03A6&gt;
&lt;0B&gt; &lt;2191&gt;
&lt;0C&gt; &lt;2193&gt;
&lt;0D&gt; &lt;0027&gt;
&lt;0E&gt; &lt;00A1&gt;
&lt;0F&gt; &lt;00BF&gt;
&lt;10&gt; &lt;0131&gt;
&lt;11&gt; &lt;0237&gt;
&lt;12&gt; &lt;0060&gt;
&lt;13&gt; &lt;00B4&gt;
&lt;14&gt; &lt;02C7&gt;
&lt;15&gt; &lt;02D8&gt;
&lt;16&gt; &lt;00AF&gt;
&lt;17&gt; &lt;02DA&gt;
&lt;18&gt; &lt;00B8&gt;
&lt;19&gt; &lt;00DF&gt;
&lt;1A&gt; &lt;00E6&gt;
&lt;1B&gt; &lt;0153&gt;
&lt;1C&gt; &lt;00F8&gt;
&lt;1D&gt; &lt;00C6&gt;
&lt;1E&gt; &lt;0152&gt;
&lt;1F&gt; &lt;00D8&gt;
&lt;20&gt; &lt;2423&gt;
&lt;27&gt; &lt;2019&gt;
&lt;60&gt; &lt;2018&gt;
&lt;7F&gt; &lt;00A8&gt;
endbfchar
endcmap
CMapName currentdict /CMap defineresource pop
end
end
<span class="enscript-comment">%%EndResource
</span><span class="enscript-comment">%%EOF
</span>    }<span class="enscript-keyword">\endgroup</span>
  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\edef</span><span class="enscript-keyword">\csname</span> cmapOT1TT<span class="enscript-keyword">\endcsname</span>#1{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\pdffontattr</span>#1{/ToUnicode <span class="enscript-keyword">\the</span><span class="enscript-keyword">\pdflastobj</span><span class="enscript-keyword">\space</span> 0 R}<span class="enscript-comment">%
</span>  }<span class="enscript-comment">%
</span><span class="enscript-keyword">\else</span>
  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\csname</span> cmapOT1<span class="enscript-keyword">\endcsname</span><span class="enscript-keyword">\gobble</span>
  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\csname</span> cmapOT1IT<span class="enscript-keyword">\endcsname</span><span class="enscript-keyword">\gobble</span>
  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\csname</span> cmapOT1TT<span class="enscript-keyword">\endcsname</span><span class="enscript-keyword">\gobble</span>
<span class="enscript-keyword">\fi</span>


<span class="enscript-comment">% Set the font macro #1 to the font named #2, adding on the
</span><span class="enscript-comment">% specified font prefix (normally `cm').
</span><span class="enscript-comment">% #3 is the font's design size, #4 is a scale factor, #5 is the CMap
</span><span class="enscript-comment">% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass
</span><span class="enscript-comment">% empty to omit).
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\setfont</span>#1#2#3#4#5{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\font</span>#1=<span class="enscript-keyword">\fontprefix</span>#2#3 scaled #4
  <span class="enscript-keyword">\csname</span> cmap#5<span class="enscript-keyword">\endcsname</span>#1<span class="enscript-comment">%
</span>}
<span class="enscript-comment">% This is what gets called when #5 of \setfont is empty.
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\cmap</span><span class="enscript-keyword">\gobble</span>


<span class="enscript-comment">% Use cm as the default font prefix.
</span><span class="enscript-comment">% To specify the font prefix, you must define \fontprefix
</span><span class="enscript-comment">% before you read in texinfo.tex.
</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\fontprefix</span><span class="enscript-keyword">\undefined</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\fontprefix</span>{cm}
<span class="enscript-keyword">\fi</span>
<span class="enscript-comment">% Support font families that don't use the same naming scheme as CM.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\rmshape</span>{r}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\rmbshape</span>{bx}               <span class="enscript-comment">%where the normal face is bold
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\bfshape</span>{b}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\bxshape</span>{bx}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\ttshape</span>{tt}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\ttbshape</span>{tt}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\ttslshape</span>{sltt}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\itshape</span>{ti}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\itbshape</span>{bxti}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\slshape</span>{sl}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\slbshape</span>{bxsl}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\sfshape</span>{ss}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\sfbshape</span>{ss}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\scshape</span>{csc}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\scbshape</span>{csc}

<span class="enscript-comment">% Definitions for a main text size of 11pt.  This is the default in
</span><span class="enscript-comment">% Texinfo.
</span><span class="enscript-comment">% 
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\definetextfontsizexi</span>{<span class="enscript-comment">%
</span><span class="enscript-comment">% Text fonts (11.2pt, magstep1).
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\textnominalsize</span>{11pt}
<span class="enscript-keyword">\edef</span><span class="enscript-keyword">\mainmagstep</span>{<span class="enscript-keyword">\magstephalf</span>}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\textrm</span><span class="enscript-keyword">\rmshape</span>{10}{<span class="enscript-keyword">\mainmagstep</span>}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\texttt</span><span class="enscript-keyword">\ttshape</span>{10}{<span class="enscript-keyword">\mainmagstep</span>}{OT1TT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\textbf</span><span class="enscript-keyword">\bfshape</span>{10}{<span class="enscript-keyword">\mainmagstep</span>}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\textit</span><span class="enscript-keyword">\itshape</span>{10}{<span class="enscript-keyword">\mainmagstep</span>}{OT1IT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\textsl</span><span class="enscript-keyword">\slshape</span>{10}{<span class="enscript-keyword">\mainmagstep</span>}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\textsf</span><span class="enscript-keyword">\sfshape</span>{10}{<span class="enscript-keyword">\mainmagstep</span>}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\textsc</span><span class="enscript-keyword">\scshape</span>{10}{<span class="enscript-keyword">\mainmagstep</span>}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\textttsl</span><span class="enscript-keyword">\ttslshape</span>{10}{<span class="enscript-keyword">\mainmagstep</span>}{OT1TT}
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\texti</span>=cmmi10 scaled <span class="enscript-keyword">\mainmagstep</span>
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\textsy</span>=cmsy10 scaled <span class="enscript-keyword">\mainmagstep</span>

<span class="enscript-comment">% A few fonts for @defun names and args.
</span><span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\defbf</span><span class="enscript-keyword">\bfshape</span>{10}{<span class="enscript-keyword">\magstep</span>1}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\deftt</span><span class="enscript-keyword">\ttshape</span>{10}{<span class="enscript-keyword">\magstep</span>1}{OT1TT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\defttsl</span><span class="enscript-keyword">\ttslshape</span>{10}{<span class="enscript-keyword">\magstep</span>1}{OT1TT}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\df</span>{<span class="enscript-keyword">\let</span><span class="enscript-keyword">\tentt</span>=<span class="enscript-keyword">\deftt</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenbf</span> = <span class="enscript-keyword">\defbf</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenttsl</span>=<span class="enscript-keyword">\defttsl</span> <span class="enscript-keyword">\bf</span>}

<span class="enscript-comment">% Fonts for indices, footnotes, small examples (9pt).
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\smallnominalsize</span>{9pt}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallrm</span><span class="enscript-keyword">\rmshape</span>{9}{1000}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smalltt</span><span class="enscript-keyword">\ttshape</span>{9}{1000}{OT1TT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallbf</span><span class="enscript-keyword">\bfshape</span>{10}{900}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallit</span><span class="enscript-keyword">\itshape</span>{9}{1000}{OT1IT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallsl</span><span class="enscript-keyword">\slshape</span>{9}{1000}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallsf</span><span class="enscript-keyword">\sfshape</span>{9}{1000}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallsc</span><span class="enscript-keyword">\scshape</span>{10}{900}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallttsl</span><span class="enscript-keyword">\ttslshape</span>{10}{900}{OT1TT}
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\smalli</span>=cmmi9
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\smallsy</span>=cmsy9

<span class="enscript-comment">% Fonts for small examples (8pt).
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\smallernominalsize</span>{8pt}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallerrm</span><span class="enscript-keyword">\rmshape</span>{8}{1000}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallertt</span><span class="enscript-keyword">\ttshape</span>{8}{1000}{OT1TT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallerbf</span><span class="enscript-keyword">\bfshape</span>{10}{800}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallerit</span><span class="enscript-keyword">\itshape</span>{8}{1000}{OT1IT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallersl</span><span class="enscript-keyword">\slshape</span>{8}{1000}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallersf</span><span class="enscript-keyword">\sfshape</span>{8}{1000}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallersc</span><span class="enscript-keyword">\scshape</span>{10}{800}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallerttsl</span><span class="enscript-keyword">\ttslshape</span>{10}{800}{OT1TT}
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\smalleri</span>=cmmi8
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\smallersy</span>=cmsy8

<span class="enscript-comment">% Fonts for title page (20.4pt):
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\titlenominalsize</span>{20pt}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\titlerm</span><span class="enscript-keyword">\rmbshape</span>{12}{<span class="enscript-keyword">\magstep</span>3}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\titleit</span><span class="enscript-keyword">\itbshape</span>{10}{<span class="enscript-keyword">\magstep</span>4}{OT1IT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\titlesl</span><span class="enscript-keyword">\slbshape</span>{10}{<span class="enscript-keyword">\magstep</span>4}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\titlett</span><span class="enscript-keyword">\ttbshape</span>{12}{<span class="enscript-keyword">\magstep</span>3}{OT1TT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\titlettsl</span><span class="enscript-keyword">\ttslshape</span>{10}{<span class="enscript-keyword">\magstep</span>4}{OT1TT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\titlesf</span><span class="enscript-keyword">\sfbshape</span>{17}{<span class="enscript-keyword">\magstep</span>1}{OT1}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\titlebf</span>=<span class="enscript-keyword">\titlerm</span>
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\titlesc</span><span class="enscript-keyword">\scbshape</span>{10}{<span class="enscript-keyword">\magstep</span>4}{OT1}
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\titlei</span>=cmmi12 scaled <span class="enscript-keyword">\magstep</span>3
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\titlesy</span>=cmsy10 scaled <span class="enscript-keyword">\magstep</span>4
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\authorrm</span>{<span class="enscript-keyword">\secrm</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\authortt</span>{<span class="enscript-keyword">\sectt</span>}

<span class="enscript-comment">% Chapter (and unnumbered) fonts (17.28pt).
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\chapnominalsize</span>{17pt}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\chaprm</span><span class="enscript-keyword">\rmbshape</span>{12}{<span class="enscript-keyword">\magstep</span>2}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\chapit</span><span class="enscript-keyword">\itbshape</span>{10}{<span class="enscript-keyword">\magstep</span>3}{OT1IT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\chapsl</span><span class="enscript-keyword">\slbshape</span>{10}{<span class="enscript-keyword">\magstep</span>3}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\chaptt</span><span class="enscript-keyword">\ttbshape</span>{12}{<span class="enscript-keyword">\magstep</span>2}{OT1TT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\chapttsl</span><span class="enscript-keyword">\ttslshape</span>{10}{<span class="enscript-keyword">\magstep</span>3}{OT1TT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\chapsf</span><span class="enscript-keyword">\sfbshape</span>{17}{1000}{OT1}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\chapbf</span>=<span class="enscript-keyword">\chaprm</span>
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\chapsc</span><span class="enscript-keyword">\scbshape</span>{10}{<span class="enscript-keyword">\magstep</span>3}{OT1}
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\chapi</span>=cmmi12 scaled <span class="enscript-keyword">\magstep</span>2
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\chapsy</span>=cmsy10 scaled <span class="enscript-keyword">\magstep</span>3

<span class="enscript-comment">% Section fonts (14.4pt).
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\secnominalsize</span>{14pt}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\secrm</span><span class="enscript-keyword">\rmbshape</span>{12}{<span class="enscript-keyword">\magstep</span>1}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\secit</span><span class="enscript-keyword">\itbshape</span>{10}{<span class="enscript-keyword">\magstep</span>2}{OT1IT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\secsl</span><span class="enscript-keyword">\slbshape</span>{10}{<span class="enscript-keyword">\magstep</span>2}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\sectt</span><span class="enscript-keyword">\ttbshape</span>{12}{<span class="enscript-keyword">\magstep</span>1}{OT1TT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\secttsl</span><span class="enscript-keyword">\ttslshape</span>{10}{<span class="enscript-keyword">\magstep</span>2}{OT1TT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\secsf</span><span class="enscript-keyword">\sfbshape</span>{12}{<span class="enscript-keyword">\magstep</span>1}{OT1}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\secbf</span><span class="enscript-keyword">\secrm</span>
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\secsc</span><span class="enscript-keyword">\scbshape</span>{10}{<span class="enscript-keyword">\magstep</span>2}{OT1}
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\seci</span>=cmmi12 scaled <span class="enscript-keyword">\magstep</span>1
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\secsy</span>=cmsy10 scaled <span class="enscript-keyword">\magstep</span>2

<span class="enscript-comment">% Subsection fonts (13.15pt).
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\ssecnominalsize</span>{13pt}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\ssecrm</span><span class="enscript-keyword">\rmbshape</span>{12}{<span class="enscript-keyword">\magstephalf</span>}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\ssecit</span><span class="enscript-keyword">\itbshape</span>{10}{1315}{OT1IT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\ssecsl</span><span class="enscript-keyword">\slbshape</span>{10}{1315}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\ssectt</span><span class="enscript-keyword">\ttbshape</span>{12}{<span class="enscript-keyword">\magstephalf</span>}{OT1TT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\ssecttsl</span><span class="enscript-keyword">\ttslshape</span>{10}{1315}{OT1TT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\ssecsf</span><span class="enscript-keyword">\sfbshape</span>{12}{<span class="enscript-keyword">\magstephalf</span>}{OT1}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\ssecbf</span><span class="enscript-keyword">\ssecrm</span>
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\ssecsc</span><span class="enscript-keyword">\scbshape</span>{10}{1315}{OT1}
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\sseci</span>=cmmi12 scaled <span class="enscript-keyword">\magstephalf</span>
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\ssecsy</span>=cmsy10 scaled 1315

<span class="enscript-comment">% Reduced fonts for @acro in text (10pt).
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\reducednominalsize</span>{10pt}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\reducedrm</span><span class="enscript-keyword">\rmshape</span>{10}{1000}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\reducedtt</span><span class="enscript-keyword">\ttshape</span>{10}{1000}{OT1TT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\reducedbf</span><span class="enscript-keyword">\bfshape</span>{10}{1000}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\reducedit</span><span class="enscript-keyword">\itshape</span>{10}{1000}{OT1IT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\reducedsl</span><span class="enscript-keyword">\slshape</span>{10}{1000}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\reducedsf</span><span class="enscript-keyword">\sfshape</span>{10}{1000}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\reducedsc</span><span class="enscript-keyword">\scshape</span>{10}{1000}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\reducedttsl</span><span class="enscript-keyword">\ttslshape</span>{10}{1000}{OT1TT}
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\reducedi</span>=cmmi10
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\reducedsy</span>=cmsy10

<span class="enscript-comment">% reset the current fonts
</span><span class="enscript-keyword">\textfonts</span>
<span class="enscript-keyword">\rm</span>
} <span class="enscript-comment">% end of 11pt text font size definitions
</span>

<span class="enscript-comment">% Definitions to make the main text be 10pt Computer Modern, with
</span><span class="enscript-comment">% section, chapter, etc., sizes following suit.  This is for the GNU
</span><span class="enscript-comment">% Press printing of the Emacs 22 manual.  Maybe other manuals in the
</span><span class="enscript-comment">% future.  Used with @smallbook, which sets the leading to 12pt.
</span><span class="enscript-comment">% 
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\definetextfontsizex</span>{<span class="enscript-comment">%
</span><span class="enscript-comment">% Text fonts (10pt).
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\textnominalsize</span>{10pt}
<span class="enscript-keyword">\edef</span><span class="enscript-keyword">\mainmagstep</span>{1000}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\textrm</span><span class="enscript-keyword">\rmshape</span>{10}{<span class="enscript-keyword">\mainmagstep</span>}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\texttt</span><span class="enscript-keyword">\ttshape</span>{10}{<span class="enscript-keyword">\mainmagstep</span>}{OT1TT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\textbf</span><span class="enscript-keyword">\bfshape</span>{10}{<span class="enscript-keyword">\mainmagstep</span>}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\textit</span><span class="enscript-keyword">\itshape</span>{10}{<span class="enscript-keyword">\mainmagstep</span>}{OT1IT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\textsl</span><span class="enscript-keyword">\slshape</span>{10}{<span class="enscript-keyword">\mainmagstep</span>}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\textsf</span><span class="enscript-keyword">\sfshape</span>{10}{<span class="enscript-keyword">\mainmagstep</span>}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\textsc</span><span class="enscript-keyword">\scshape</span>{10}{<span class="enscript-keyword">\mainmagstep</span>}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\textttsl</span><span class="enscript-keyword">\ttslshape</span>{10}{<span class="enscript-keyword">\mainmagstep</span>}{OT1TT}
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\texti</span>=cmmi10 scaled <span class="enscript-keyword">\mainmagstep</span>
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\textsy</span>=cmsy10 scaled <span class="enscript-keyword">\mainmagstep</span>

<span class="enscript-comment">% A few fonts for @defun names and args.
</span><span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\defbf</span><span class="enscript-keyword">\bfshape</span>{10}{<span class="enscript-keyword">\magstephalf</span>}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\deftt</span><span class="enscript-keyword">\ttshape</span>{10}{<span class="enscript-keyword">\magstephalf</span>}{OT1TT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\defttsl</span><span class="enscript-keyword">\ttslshape</span>{10}{<span class="enscript-keyword">\magstephalf</span>}{OT1TT}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\df</span>{<span class="enscript-keyword">\let</span><span class="enscript-keyword">\tentt</span>=<span class="enscript-keyword">\deftt</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenbf</span> = <span class="enscript-keyword">\defbf</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenttsl</span>=<span class="enscript-keyword">\defttsl</span> <span class="enscript-keyword">\bf</span>}

<span class="enscript-comment">% Fonts for indices, footnotes, small examples (9pt).
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\smallnominalsize</span>{9pt}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallrm</span><span class="enscript-keyword">\rmshape</span>{9}{1000}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smalltt</span><span class="enscript-keyword">\ttshape</span>{9}{1000}{OT1TT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallbf</span><span class="enscript-keyword">\bfshape</span>{10}{900}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallit</span><span class="enscript-keyword">\itshape</span>{9}{1000}{OT1IT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallsl</span><span class="enscript-keyword">\slshape</span>{9}{1000}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallsf</span><span class="enscript-keyword">\sfshape</span>{9}{1000}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallsc</span><span class="enscript-keyword">\scshape</span>{10}{900}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallttsl</span><span class="enscript-keyword">\ttslshape</span>{10}{900}{OT1TT}
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\smalli</span>=cmmi9
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\smallsy</span>=cmsy9

<span class="enscript-comment">% Fonts for small examples (8pt).
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\smallernominalsize</span>{8pt}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallerrm</span><span class="enscript-keyword">\rmshape</span>{8}{1000}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallertt</span><span class="enscript-keyword">\ttshape</span>{8}{1000}{OT1TT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallerbf</span><span class="enscript-keyword">\bfshape</span>{10}{800}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallerit</span><span class="enscript-keyword">\itshape</span>{8}{1000}{OT1IT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallersl</span><span class="enscript-keyword">\slshape</span>{8}{1000}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallersf</span><span class="enscript-keyword">\sfshape</span>{8}{1000}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallersc</span><span class="enscript-keyword">\scshape</span>{10}{800}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\smallerttsl</span><span class="enscript-keyword">\ttslshape</span>{10}{800}{OT1TT}
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\smalleri</span>=cmmi8
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\smallersy</span>=cmsy8

<span class="enscript-comment">% Fonts for title page (20.4pt):
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\titlenominalsize</span>{20pt}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\titlerm</span><span class="enscript-keyword">\rmbshape</span>{12}{<span class="enscript-keyword">\magstep</span>3}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\titleit</span><span class="enscript-keyword">\itbshape</span>{10}{<span class="enscript-keyword">\magstep</span>4}{OT1IT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\titlesl</span><span class="enscript-keyword">\slbshape</span>{10}{<span class="enscript-keyword">\magstep</span>4}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\titlett</span><span class="enscript-keyword">\ttbshape</span>{12}{<span class="enscript-keyword">\magstep</span>3}{OT1TT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\titlettsl</span><span class="enscript-keyword">\ttslshape</span>{10}{<span class="enscript-keyword">\magstep</span>4}{OT1TT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\titlesf</span><span class="enscript-keyword">\sfbshape</span>{17}{<span class="enscript-keyword">\magstep</span>1}{OT1}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\titlebf</span>=<span class="enscript-keyword">\titlerm</span>
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\titlesc</span><span class="enscript-keyword">\scbshape</span>{10}{<span class="enscript-keyword">\magstep</span>4}{OT1}
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\titlei</span>=cmmi12 scaled <span class="enscript-keyword">\magstep</span>3
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\titlesy</span>=cmsy10 scaled <span class="enscript-keyword">\magstep</span>4
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\authorrm</span>{<span class="enscript-keyword">\secrm</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\authortt</span>{<span class="enscript-keyword">\sectt</span>}

<span class="enscript-comment">% Chapter fonts (14.4pt).
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\chapnominalsize</span>{14pt}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\chaprm</span><span class="enscript-keyword">\rmbshape</span>{12}{<span class="enscript-keyword">\magstep</span>1}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\chapit</span><span class="enscript-keyword">\itbshape</span>{10}{<span class="enscript-keyword">\magstep</span>2}{OT1IT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\chapsl</span><span class="enscript-keyword">\slbshape</span>{10}{<span class="enscript-keyword">\magstep</span>2}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\chaptt</span><span class="enscript-keyword">\ttbshape</span>{12}{<span class="enscript-keyword">\magstep</span>1}{OT1TT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\chapttsl</span><span class="enscript-keyword">\ttslshape</span>{10}{<span class="enscript-keyword">\magstep</span>2}{OT1TT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\chapsf</span><span class="enscript-keyword">\sfbshape</span>{12}{<span class="enscript-keyword">\magstep</span>1}{OT1}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\chapbf</span><span class="enscript-keyword">\chaprm</span>
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\chapsc</span><span class="enscript-keyword">\scbshape</span>{10}{<span class="enscript-keyword">\magstep</span>2}{OT1}
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\chapi</span>=cmmi12 scaled <span class="enscript-keyword">\magstep</span>1
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\chapsy</span>=cmsy10 scaled <span class="enscript-keyword">\magstep</span>2

<span class="enscript-comment">% Section fonts (12pt).
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\secnominalsize</span>{12pt}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\secrm</span><span class="enscript-keyword">\rmbshape</span>{12}{1000}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\secit</span><span class="enscript-keyword">\itbshape</span>{10}{<span class="enscript-keyword">\magstep</span>1}{OT1IT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\secsl</span><span class="enscript-keyword">\slbshape</span>{10}{<span class="enscript-keyword">\magstep</span>1}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\sectt</span><span class="enscript-keyword">\ttbshape</span>{12}{1000}{OT1TT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\secttsl</span><span class="enscript-keyword">\ttslshape</span>{10}{<span class="enscript-keyword">\magstep</span>1}{OT1TT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\secsf</span><span class="enscript-keyword">\sfbshape</span>{12}{1000}{OT1}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\secbf</span><span class="enscript-keyword">\secrm</span>
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\secsc</span><span class="enscript-keyword">\scbshape</span>{10}{<span class="enscript-keyword">\magstep</span>1}{OT1}
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\seci</span>=cmmi12 
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\secsy</span>=cmsy10 scaled <span class="enscript-keyword">\magstep</span>1

<span class="enscript-comment">% Subsection fonts (10pt).
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\ssecnominalsize</span>{10pt}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\ssecrm</span><span class="enscript-keyword">\rmbshape</span>{10}{1000}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\ssecit</span><span class="enscript-keyword">\itbshape</span>{10}{1000}{OT1IT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\ssecsl</span><span class="enscript-keyword">\slbshape</span>{10}{1000}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\ssectt</span><span class="enscript-keyword">\ttbshape</span>{10}{1000}{OT1TT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\ssecttsl</span><span class="enscript-keyword">\ttslshape</span>{10}{1000}{OT1TT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\ssecsf</span><span class="enscript-keyword">\sfbshape</span>{10}{1000}{OT1}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\ssecbf</span><span class="enscript-keyword">\ssecrm</span>
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\ssecsc</span><span class="enscript-keyword">\scbshape</span>{10}{1000}{OT1}
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\sseci</span>=cmmi10
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\ssecsy</span>=cmsy10

<span class="enscript-comment">% Reduced fonts for @acro in text (9pt).
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\reducednominalsize</span>{9pt}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\reducedrm</span><span class="enscript-keyword">\rmshape</span>{9}{1000}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\reducedtt</span><span class="enscript-keyword">\ttshape</span>{9}{1000}{OT1TT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\reducedbf</span><span class="enscript-keyword">\bfshape</span>{10}{900}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\reducedit</span><span class="enscript-keyword">\itshape</span>{9}{1000}{OT1IT}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\reducedsl</span><span class="enscript-keyword">\slshape</span>{9}{1000}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\reducedsf</span><span class="enscript-keyword">\sfshape</span>{9}{1000}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\reducedsc</span><span class="enscript-keyword">\scshape</span>{10}{900}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\reducedttsl</span><span class="enscript-keyword">\ttslshape</span>{10}{900}{OT1TT}
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\reducedi</span>=cmmi9
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\reducedsy</span>=cmsy9

<span class="enscript-comment">% reduce space between paragraphs
</span><span class="enscript-keyword">\divide</span><span class="enscript-keyword">\parskip</span> by 2

<span class="enscript-comment">% reset the current fonts
</span><span class="enscript-keyword">\textfonts</span>
<span class="enscript-keyword">\rm</span>
} <span class="enscript-comment">% end of 10pt text font size definitions
</span>

<span class="enscript-comment">% We provide the user-level command
</span><span class="enscript-comment">%   @fonttextsize 10
</span><span class="enscript-comment">% (or 11) to redefine the text font size.  pt is assumed.
</span><span class="enscript-comment">% 
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\xword</span>{10}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\xiword</span>{11}
<span class="enscript-comment">%
</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\fonttextsize</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\textsizearg</span>{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\wlog</span>{doing @fonttextsize <span class="enscript-keyword">\textsizearg</span>}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Set \globaldefs so that documents can use this inside @tex, since
</span>  <span class="enscript-comment">% makeinfo 4.8 does not support it, but we need it nonetheless.
</span>  <span class="enscript-comment">% 
</span> <span class="enscript-keyword">\begingroup</span> <span class="enscript-keyword">\globaldefs</span>=1
  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\textsizearg</span><span class="enscript-keyword">\xword</span> <span class="enscript-keyword">\definetextfontsizex</span>
  <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\textsizearg</span><span class="enscript-keyword">\xiword</span> <span class="enscript-keyword">\definetextfontsizexi</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\errhelp</span>=<span class="enscript-keyword">\EMsimple</span>
    <span class="enscript-keyword">\errmessage</span>{@fonttextsize only supports `10' or `11', not `<span class="enscript-keyword">\textsizearg</span>'}
  <span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span>
 <span class="enscript-keyword">\endgroup</span>
}


<span class="enscript-comment">% In order for the font changes to affect most math symbols and letters,
</span><span class="enscript-comment">% we have to define the \textfont of the standard families.  Since
</span><span class="enscript-comment">% texinfo doesn't allow for producing subscripts and superscripts except
</span><span class="enscript-comment">% in the main text, we don't bother to reset \scriptfont and
</span><span class="enscript-comment">% \scriptscriptfont (which would also require loading a lot more fonts).
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\resetmathfonts</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\textfont</span>0=<span class="enscript-keyword">\tenrm</span> <span class="enscript-keyword">\textfont</span>1=<span class="enscript-keyword">\teni</span> <span class="enscript-keyword">\textfont</span>2=<span class="enscript-keyword">\tensy</span>
  <span class="enscript-keyword">\textfont</span><span class="enscript-keyword">\itfam</span>=<span class="enscript-keyword">\tenit</span> <span class="enscript-keyword">\textfont</span><span class="enscript-keyword">\slfam</span>=<span class="enscript-keyword">\tensl</span> <span class="enscript-keyword">\textfont</span><span class="enscript-keyword">\bffam</span>=<span class="enscript-keyword">\tenbf</span>
  <span class="enscript-keyword">\textfont</span><span class="enscript-keyword">\ttfam</span>=<span class="enscript-keyword">\tentt</span> <span class="enscript-keyword">\textfont</span><span class="enscript-keyword">\sffam</span>=<span class="enscript-keyword">\tensf</span>
}

<span class="enscript-comment">% The font-changing commands redefine the meanings of \tenSTYLE, instead
</span><span class="enscript-comment">% of just \STYLE.  We do this because \STYLE needs to also set the
</span><span class="enscript-comment">% current \fam for math mode.  Our \STYLE (e.g., \rm) commands hardwire
</span><span class="enscript-comment">% \tenSTYLE to set the current font.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% Each font-changing command also sets the names \lsize (one size lower)
</span><span class="enscript-comment">% and \lllsize (three sizes lower).  These relative commands are used in
</span><span class="enscript-comment">% the LaTeX logo and acronyms.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% This all needs generalizing, badly.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\textfonts</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenrm</span>=<span class="enscript-keyword">\textrm</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenit</span>=<span class="enscript-keyword">\textit</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tensl</span>=<span class="enscript-keyword">\textsl</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenbf</span>=<span class="enscript-keyword">\textbf</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tentt</span>=<span class="enscript-keyword">\texttt</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\smallcaps</span>=<span class="enscript-keyword">\textsc</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tensf</span>=<span class="enscript-keyword">\textsf</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\teni</span>=<span class="enscript-keyword">\texti</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tensy</span>=<span class="enscript-keyword">\textsy</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenttsl</span>=<span class="enscript-keyword">\textttsl</span>
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\curfontsize</span>{text}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\lsize</span>{reduced}<span class="enscript-keyword">\def</span><span class="enscript-keyword">\lllsize</span>{smaller}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\resetmathfonts</span> <span class="enscript-keyword">\setleading</span>{<span class="enscript-keyword">\textleading</span>}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\titlefonts</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenrm</span>=<span class="enscript-keyword">\titlerm</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenit</span>=<span class="enscript-keyword">\titleit</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tensl</span>=<span class="enscript-keyword">\titlesl</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenbf</span>=<span class="enscript-keyword">\titlebf</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tentt</span>=<span class="enscript-keyword">\titlett</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\smallcaps</span>=<span class="enscript-keyword">\titlesc</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tensf</span>=<span class="enscript-keyword">\titlesf</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\teni</span>=<span class="enscript-keyword">\titlei</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tensy</span>=<span class="enscript-keyword">\titlesy</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenttsl</span>=<span class="enscript-keyword">\titlettsl</span>
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\curfontsize</span>{title}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\lsize</span>{chap}<span class="enscript-keyword">\def</span><span class="enscript-keyword">\lllsize</span>{subsec}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\resetmathfonts</span> <span class="enscript-keyword">\setleading</span>{25pt}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\titlefont</span>#1{{<span class="enscript-keyword">\titlefonts</span><span class="enscript-keyword">\rm</span> #1}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\chapfonts</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenrm</span>=<span class="enscript-keyword">\chaprm</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenit</span>=<span class="enscript-keyword">\chapit</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tensl</span>=<span class="enscript-keyword">\chapsl</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenbf</span>=<span class="enscript-keyword">\chapbf</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tentt</span>=<span class="enscript-keyword">\chaptt</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\smallcaps</span>=<span class="enscript-keyword">\chapsc</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tensf</span>=<span class="enscript-keyword">\chapsf</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\teni</span>=<span class="enscript-keyword">\chapi</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tensy</span>=<span class="enscript-keyword">\chapsy</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenttsl</span>=<span class="enscript-keyword">\chapttsl</span>
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\curfontsize</span>{chap}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\lsize</span>{sec}<span class="enscript-keyword">\def</span><span class="enscript-keyword">\lllsize</span>{text}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\resetmathfonts</span> <span class="enscript-keyword">\setleading</span>{19pt}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\secfonts</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenrm</span>=<span class="enscript-keyword">\secrm</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenit</span>=<span class="enscript-keyword">\secit</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tensl</span>=<span class="enscript-keyword">\secsl</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenbf</span>=<span class="enscript-keyword">\secbf</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tentt</span>=<span class="enscript-keyword">\sectt</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\smallcaps</span>=<span class="enscript-keyword">\secsc</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tensf</span>=<span class="enscript-keyword">\secsf</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\teni</span>=<span class="enscript-keyword">\seci</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tensy</span>=<span class="enscript-keyword">\secsy</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenttsl</span>=<span class="enscript-keyword">\secttsl</span>
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\curfontsize</span>{sec}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\lsize</span>{subsec}<span class="enscript-keyword">\def</span><span class="enscript-keyword">\lllsize</span>{reduced}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\resetmathfonts</span> <span class="enscript-keyword">\setleading</span>{16pt}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\subsecfonts</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenrm</span>=<span class="enscript-keyword">\ssecrm</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenit</span>=<span class="enscript-keyword">\ssecit</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tensl</span>=<span class="enscript-keyword">\ssecsl</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenbf</span>=<span class="enscript-keyword">\ssecbf</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tentt</span>=<span class="enscript-keyword">\ssectt</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\smallcaps</span>=<span class="enscript-keyword">\ssecsc</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tensf</span>=<span class="enscript-keyword">\ssecsf</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\teni</span>=<span class="enscript-keyword">\sseci</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tensy</span>=<span class="enscript-keyword">\ssecsy</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenttsl</span>=<span class="enscript-keyword">\ssecttsl</span>
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\curfontsize</span>{ssec}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\lsize</span>{text}<span class="enscript-keyword">\def</span><span class="enscript-keyword">\lllsize</span>{small}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\resetmathfonts</span> <span class="enscript-keyword">\setleading</span>{15pt}}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\subsubsecfonts</span> = <span class="enscript-keyword">\subsecfonts</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\reducedfonts</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenrm</span>=<span class="enscript-keyword">\reducedrm</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenit</span>=<span class="enscript-keyword">\reducedit</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tensl</span>=<span class="enscript-keyword">\reducedsl</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenbf</span>=<span class="enscript-keyword">\reducedbf</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tentt</span>=<span class="enscript-keyword">\reducedtt</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\reducedcaps</span>=<span class="enscript-keyword">\reducedsc</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tensf</span>=<span class="enscript-keyword">\reducedsf</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\teni</span>=<span class="enscript-keyword">\reducedi</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tensy</span>=<span class="enscript-keyword">\reducedsy</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenttsl</span>=<span class="enscript-keyword">\reducedttsl</span>
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\curfontsize</span>{reduced}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\lsize</span>{small}<span class="enscript-keyword">\def</span><span class="enscript-keyword">\lllsize</span>{smaller}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\resetmathfonts</span> <span class="enscript-keyword">\setleading</span>{10.5pt}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\smallfonts</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenrm</span>=<span class="enscript-keyword">\smallrm</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenit</span>=<span class="enscript-keyword">\smallit</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tensl</span>=<span class="enscript-keyword">\smallsl</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenbf</span>=<span class="enscript-keyword">\smallbf</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tentt</span>=<span class="enscript-keyword">\smalltt</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\smallcaps</span>=<span class="enscript-keyword">\smallsc</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tensf</span>=<span class="enscript-keyword">\smallsf</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\teni</span>=<span class="enscript-keyword">\smalli</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tensy</span>=<span class="enscript-keyword">\smallsy</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenttsl</span>=<span class="enscript-keyword">\smallttsl</span>
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\curfontsize</span>{small}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\lsize</span>{smaller}<span class="enscript-keyword">\def</span><span class="enscript-keyword">\lllsize</span>{smaller}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\resetmathfonts</span> <span class="enscript-keyword">\setleading</span>{10.5pt}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\smallerfonts</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenrm</span>=<span class="enscript-keyword">\smallerrm</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenit</span>=<span class="enscript-keyword">\smallerit</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tensl</span>=<span class="enscript-keyword">\smallersl</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenbf</span>=<span class="enscript-keyword">\smallerbf</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tentt</span>=<span class="enscript-keyword">\smallertt</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\smallcaps</span>=<span class="enscript-keyword">\smallersc</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tensf</span>=<span class="enscript-keyword">\smallersf</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\teni</span>=<span class="enscript-keyword">\smalleri</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tensy</span>=<span class="enscript-keyword">\smallersy</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tenttsl</span>=<span class="enscript-keyword">\smallerttsl</span>
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\curfontsize</span>{smaller}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\lsize</span>{smaller}<span class="enscript-keyword">\def</span><span class="enscript-keyword">\lllsize</span>{smaller}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\resetmathfonts</span> <span class="enscript-keyword">\setleading</span>{9.5pt}}

<span class="enscript-comment">% Set the fonts to use with the @small... environments.
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\smallexamplefonts</span> = <span class="enscript-keyword">\smallfonts</span>

<span class="enscript-comment">% About \smallexamplefonts.  If we use \smallfonts (9pt), @smallexample
</span><span class="enscript-comment">% can fit this many characters:
</span><span class="enscript-comment">%   8.5x11=86   smallbook=72  a4=90  a5=69
</span><span class="enscript-comment">% If we use \scriptfonts (8pt), then we can fit this many characters:
</span><span class="enscript-comment">%   8.5x11=90+  smallbook=80  a4=90+  a5=77
</span><span class="enscript-comment">% For me, subjectively, the few extra characters that fit aren't worth
</span><span class="enscript-comment">% the additional smallness of 8pt.  So I'm making the default 9pt.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% By the way, for comparison, here's what fits with @example (10pt):
</span><span class="enscript-comment">%   8.5x11=71  smallbook=60  a4=75  a5=58
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% I wish the USA used A4 paper.
</span><span class="enscript-comment">% --karl, 24jan03.
</span>

<span class="enscript-comment">% Set up the default fonts, so we can use them for creating boxes.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\definetextfontsizexi</span>

<span class="enscript-comment">% Define these so they can be easily changed for other fonts.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\angleleft</span>{<span class="enscript-variable-name">$\langle$</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\angleright</span>{<span class="enscript-variable-name">$\rangle$</span>}

<span class="enscript-comment">% Count depth in font-changes, for error checks
</span><span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\fontdepth</span> <span class="enscript-keyword">\fontdepth</span>=0

<span class="enscript-comment">% Fonts for short table of contents.
</span><span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\shortcontrm</span><span class="enscript-keyword">\rmshape</span>{12}{1000}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\shortcontbf</span><span class="enscript-keyword">\bfshape</span>{10}{<span class="enscript-keyword">\magstep</span>1}{OT1}  <span class="enscript-comment">% no cmb12
</span><span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\shortcontsl</span><span class="enscript-keyword">\slshape</span>{12}{1000}{OT1}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\shortconttt</span><span class="enscript-keyword">\ttshape</span>{12}{1000}{OT1TT}

<span class="enscript-comment">%% Add scribe-like font environments, plus @l for inline lisp (usually sans
</span><span class="enscript-comment">%% serif) and @ii for TeX italic
</span>
<span class="enscript-comment">% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
</span><span class="enscript-comment">% unless the following character is such as not to need one.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\smartitalicx</span>{<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\next</span>,<span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\next</span>-<span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\next</span>.<span class="enscript-keyword">\else</span>
                    <span class="enscript-keyword">\ptexslash</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\smartslanted</span>#1{{<span class="enscript-keyword">\ifusingtt</span><span class="enscript-keyword">\ttsl</span><span class="enscript-keyword">\sl</span> #1}<span class="enscript-keyword">\futurelet</span><span class="enscript-keyword">\next</span><span class="enscript-keyword">\smartitalicx</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\smartitalic</span>#1{{<span class="enscript-keyword">\ifusingtt</span><span class="enscript-keyword">\ttsl</span><span class="enscript-keyword">\it</span> #1}<span class="enscript-keyword">\futurelet</span><span class="enscript-keyword">\next</span><span class="enscript-keyword">\smartitalicx</span>}

<span class="enscript-comment">% like \smartslanted except unconditionally uses \ttsl.
</span><span class="enscript-comment">% @var is set to this for defun arguments.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\ttslanted</span>#1{{<span class="enscript-keyword">\ttsl</span> #1}<span class="enscript-keyword">\futurelet</span><span class="enscript-keyword">\next</span><span class="enscript-keyword">\smartitalicx</span>}

<span class="enscript-comment">% like \smartslanted except unconditionally use \sl.  We never want
</span><span class="enscript-comment">% ttsl for book titles, do we?
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\cite</span>#1{{<span class="enscript-keyword">\sl</span> #1}<span class="enscript-keyword">\futurelet</span><span class="enscript-keyword">\next</span><span class="enscript-keyword">\smartitalicx</span>}

<span class="enscript-keyword">\let</span><span class="enscript-keyword">\i</span>=<span class="enscript-keyword">\smartitalic</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\slanted</span>=<span class="enscript-keyword">\smartslanted</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\var</span>=<span class="enscript-keyword">\smartslanted</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\dfn</span>=<span class="enscript-keyword">\smartslanted</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\emph</span>=<span class="enscript-keyword">\smartitalic</span>

<span class="enscript-comment">% @b, explicit bold.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\b</span>#1{{<span class="enscript-keyword">\bf</span> #1}}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\strong</span>=<span class="enscript-keyword">\b</span>

<span class="enscript-comment">% @sansserif, explicit sans.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\sansserif</span>#1{{<span class="enscript-keyword">\sf</span> #1}}

<span class="enscript-comment">% We can't just use \exhyphenpenalty, because that only has effect at
</span><span class="enscript-comment">% the end of a paragraph.  Restore normal hyphenation at the end of the
</span><span class="enscript-comment">% group within which \nohyphenation is presumably called.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\nohyphenation</span>{<span class="enscript-keyword">\hyphenchar</span><span class="enscript-keyword">\font</span> = -1  <span class="enscript-keyword">\aftergroup</span><span class="enscript-keyword">\restorehyphenation</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\restorehyphenation</span>{<span class="enscript-keyword">\hyphenchar</span><span class="enscript-keyword">\font</span> = `- }

<span class="enscript-comment">% Set sfcode to normal for the chars that usually have another value.
</span><span class="enscript-comment">% Can't use plain's \frenchspacing because it uses the `\x notation, and
</span><span class="enscript-comment">% sometimes \x has an active definition that messes things up.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\catcode</span>`@=11
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\plainfrenchspacing</span>{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\sfcode</span><span class="enscript-keyword">\dotChar</span>  =<span class="enscript-keyword">\@</span>m <span class="enscript-keyword">\sfcode</span><span class="enscript-keyword">\questChar</span>=<span class="enscript-keyword">\@</span>m <span class="enscript-keyword">\sfcode</span><span class="enscript-keyword">\exclamChar</span>=<span class="enscript-keyword">\@</span>m
    <span class="enscript-keyword">\sfcode</span><span class="enscript-keyword">\colonChar</span>=<span class="enscript-keyword">\@</span>m <span class="enscript-keyword">\sfcode</span><span class="enscript-keyword">\semiChar</span> =<span class="enscript-keyword">\@</span>m <span class="enscript-keyword">\sfcode</span><span class="enscript-keyword">\commaChar</span> =<span class="enscript-keyword">\@</span>m
    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\endofsentencespacefactor</span>{1000}<span class="enscript-comment">% for @. and friends
</span>  }
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\plainnonfrenchspacing</span>{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\sfcode</span>`<span class="enscript-keyword">\.</span>3000<span class="enscript-keyword">\sfcode</span>`<span class="enscript-keyword">\?</span>3000<span class="enscript-keyword">\sfcode</span>`<span class="enscript-keyword">\!</span>3000
    <span class="enscript-keyword">\sfcode</span>`<span class="enscript-keyword">\:</span>2000<span class="enscript-keyword">\sfcode</span>`<span class="enscript-keyword">\;</span>1500<span class="enscript-keyword">\sfcode</span>`<span class="enscript-keyword">\,</span>1250
    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\endofsentencespacefactor</span>{3000}<span class="enscript-comment">% for @. and friends
</span>  }
<span class="enscript-keyword">\catcode</span>`@=<span class="enscript-keyword">\other</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\endofsentencespacefactor</span>{3000}<span class="enscript-comment">% default
</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\t</span>#1{<span class="enscript-comment">%
</span>  {<span class="enscript-keyword">\tt</span> <span class="enscript-keyword">\rawbackslash</span> <span class="enscript-keyword">\plainfrenchspacing</span> #1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\null</span>
}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\samp</span>#1{`<span class="enscript-keyword">\tclose</span>{#1}'<span class="enscript-keyword">\null</span>}
<span class="enscript-keyword">\setfont</span><span class="enscript-keyword">\keyrm</span><span class="enscript-keyword">\rmshape</span>{8}{1000}{OT1}
<span class="enscript-keyword">\font</span><span class="enscript-keyword">\keysy</span>=cmsy9
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\key</span>#1{{<span class="enscript-keyword">\keyrm</span><span class="enscript-keyword">\textfont</span>2=<span class="enscript-keyword">\keysy</span> <span class="enscript-keyword">\leavevmode</span><span class="enscript-keyword">\hbox</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\raise</span>0.4pt<span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\angleleft</span>}<span class="enscript-keyword">\kern</span>-.08em<span class="enscript-keyword">\vtop</span>{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\vbox</span>{<span class="enscript-keyword">\hrule</span><span class="enscript-keyword">\kern</span>-0.4pt
     <span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\raise</span>0.4pt<span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\vphantom</span>{<span class="enscript-keyword">\angleleft</span>}}#1}}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\kern</span>-0.4pt<span class="enscript-keyword">\hrule</span>}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\kern</span>-.06em<span class="enscript-keyword">\raise</span>0.4pt<span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\angleright</span>}}}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\key</span> #1{{<span class="enscript-keyword">\nohyphenation</span> <span class="enscript-keyword">\uppercase</span>{#1}}<span class="enscript-keyword">\null</span>}
<span class="enscript-comment">% The old definition, with no lozenge:
</span><span class="enscript-comment">%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\ctrl</span> #1{{<span class="enscript-keyword">\tt</span> <span class="enscript-keyword">\rawbackslash</span> <span class="enscript-keyword">\hat</span>}#1}

<span class="enscript-comment">% @file, @option are the same as @samp.
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\file</span>=<span class="enscript-keyword">\samp</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\option</span>=<span class="enscript-keyword">\samp</span>

<span class="enscript-comment">% @code is a modification of @t,
</span><span class="enscript-comment">% which makes spaces the same size as normal in the surrounding text.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\tclose</span>#1{<span class="enscript-comment">%
</span>  {<span class="enscript-comment">%
</span>    <span class="enscript-comment">% Change normal interword space to be same as for the current font.
</span>    <span class="enscript-keyword">\spaceskip</span> = <span class="enscript-keyword">\fontdimen</span>2<span class="enscript-keyword">\font</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Switch to typewriter.
</span>    <span class="enscript-keyword">\tt</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% But `\ ' produces the large typewriter interword space.
</span>    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\ </span>{{<span class="enscript-keyword">\spaceskip</span> = 0pt{} }}<span class="enscript-comment">%
</span>    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Turn off hyphenation.
</span>    <span class="enscript-keyword">\nohyphenation</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-keyword">\rawbackslash</span>
    <span class="enscript-keyword">\plainfrenchspacing</span>
    #1<span class="enscript-comment">%
</span>  }<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\null</span>
}

<span class="enscript-comment">% We *must* turn on hyphenation at `-' and `_' in @code.
</span><span class="enscript-comment">% Otherwise, it is too hard to avoid overfull hboxes
</span><span class="enscript-comment">% in the Emacs manual, the Library manual, etc.
</span>
<span class="enscript-comment">% Unfortunately, TeX uses one parameter (\hyphenchar) to control
</span><span class="enscript-comment">% both hyphenation at - and hyphenation within words.
</span><span class="enscript-comment">% We must therefore turn them both off (\tclose does that)
</span><span class="enscript-comment">% and arrange explicitly to hyphenate at a dash.
</span><span class="enscript-comment">%  -- rms.
</span>{
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\-</span>=<span class="enscript-keyword">\active</span> <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\_</span>=<span class="enscript-keyword">\active</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\'</span>=<span class="enscript-keyword">\active</span> <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\`</span>=<span class="enscript-keyword">\active</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\code</span>{<span class="enscript-keyword">\begingroup</span>
    <span class="enscript-keyword">\catcode</span><span class="enscript-keyword">\rquoteChar</span>=<span class="enscript-keyword">\active</span> <span class="enscript-keyword">\catcode</span><span class="enscript-keyword">\lquoteChar</span>=<span class="enscript-keyword">\active</span>
    <span class="enscript-keyword">\let</span>'<span class="enscript-keyword">\codequoteright</span> <span class="enscript-keyword">\let</span>`<span class="enscript-keyword">\codequoteleft</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-keyword">\catcode</span><span class="enscript-keyword">\dashChar</span>=<span class="enscript-keyword">\active</span>  <span class="enscript-keyword">\catcode</span><span class="enscript-keyword">\underChar</span>=<span class="enscript-keyword">\active</span>
    <span class="enscript-keyword">\ifallowcodebreaks</span>
     <span class="enscript-keyword">\let</span>-<span class="enscript-keyword">\codedash</span>
     <span class="enscript-keyword">\let</span>_<span class="enscript-keyword">\codeunder</span>
    <span class="enscript-keyword">\else</span>
     <span class="enscript-keyword">\let</span>-<span class="enscript-keyword">\realdash</span>
     <span class="enscript-keyword">\let</span>_<span class="enscript-keyword">\realunder</span>
    <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\codex</span>
  }
}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\realdash</span>{-}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\codedash</span>{-<span class="enscript-keyword">\discretionary</span>{}{}{}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\codeunder</span>{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% this is all so @math{@code{var_name}+1} can work.  In math mode, _
</span>  <span class="enscript-comment">% is &quot;active&quot; (mathcode&quot;8000) and \normalunderscore (or \char95, etc.)
</span>  <span class="enscript-comment">% will therefore expand the active definition of _, which is us
</span>  <span class="enscript-comment">% (inside @code that is), therefore an endless loop.
</span>  <span class="enscript-keyword">\ifusingtt</span>{<span class="enscript-keyword">\ifmmode</span>
               <span class="enscript-keyword">\mathchar</span>&quot;075F <span class="enscript-comment">% class 0=ordinary, family 7=ttfam, pos 0x5F=_.
</span>             <span class="enscript-keyword">\else</span><span class="enscript-keyword">\normalunderscore</span> <span class="enscript-keyword">\fi</span>
             <span class="enscript-keyword">\discretionary</span>{}{}{}}<span class="enscript-comment">%
</span>            {<span class="enscript-keyword">\_</span>}<span class="enscript-comment">%
</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\codex</span> #1{<span class="enscript-keyword">\tclose</span>{#1}<span class="enscript-keyword">\endgroup</span>}

<span class="enscript-comment">% An additional complication: the above will allow breaks after, e.g.,
</span><span class="enscript-comment">% each of the four underscores in __typeof__.  This is undesirable in
</span><span class="enscript-comment">% some manuals, especially if they don't have long identifiers in
</span><span class="enscript-comment">% general.  @allowcodebreaks provides a way to control this.
</span><span class="enscript-comment">% 
</span><span class="enscript-keyword">\newif</span><span class="enscript-keyword">\ifallowcodebreaks</span>  <span class="enscript-keyword">\allowcodebreakstrue</span>

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\keywordtrue</span>{true}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\keywordfalse</span>{false}

<span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\allowcodebreaks</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\txiarg</span>{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\txiarg</span><span class="enscript-keyword">\keywordtrue</span>
    <span class="enscript-keyword">\allowcodebreakstrue</span>
  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\txiarg</span><span class="enscript-keyword">\keywordfalse</span>
    <span class="enscript-keyword">\allowcodebreaksfalse</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\errhelp</span> = <span class="enscript-keyword">\EMsimple</span>
    <span class="enscript-keyword">\errmessage</span>{Unknown @allowcodebreaks option `<span class="enscript-keyword">\txiarg</span>'}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span>
}

<span class="enscript-comment">% @kbd is like @code, except that if the argument is just one @key command,
</span><span class="enscript-comment">% then @kbd has no effect.
</span>
<span class="enscript-comment">% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
</span><span class="enscript-comment">%   `example' (@kbd uses ttsl only inside of @example and friends),
</span><span class="enscript-comment">%   or `code' (@kbd uses normal tty font always).
</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\kbdinputstyle</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\txiarg</span>{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\txiarg</span><span class="enscript-keyword">\worddistinct</span>
    <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\kbdexamplefont</span>{<span class="enscript-keyword">\ttsl</span>}<span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\kbdfont</span>{<span class="enscript-keyword">\ttsl</span>}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\txiarg</span><span class="enscript-keyword">\wordexample</span>
    <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\kbdexamplefont</span>{<span class="enscript-keyword">\ttsl</span>}<span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\kbdfont</span>{<span class="enscript-keyword">\tt</span>}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\txiarg</span><span class="enscript-keyword">\wordcode</span>
    <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\kbdexamplefont</span>{<span class="enscript-keyword">\tt</span>}<span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\kbdfont</span>{<span class="enscript-keyword">\tt</span>}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\errhelp</span> = <span class="enscript-keyword">\EMsimple</span>
    <span class="enscript-keyword">\errmessage</span>{Unknown @kbdinputstyle option `<span class="enscript-keyword">\txiarg</span>'}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span>
}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\worddistinct</span>{distinct}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\wordexample</span>{example}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\wordcode</span>{code}

<span class="enscript-comment">% Default is `distinct.'
</span><span class="enscript-keyword">\kbdinputstyle</span> distinct

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\xkey</span>{<span class="enscript-keyword">\key</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\kbdfoo</span>#1#2#3<span class="enscript-keyword">\par</span>{<span class="enscript-keyword">\def</span><span class="enscript-keyword">\one</span>{#1}<span class="enscript-keyword">\def</span><span class="enscript-keyword">\three</span>{#3}<span class="enscript-keyword">\def</span><span class="enscript-keyword">\threex</span>{??}<span class="enscript-comment">%
</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\one</span><span class="enscript-keyword">\xkey</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\threex</span><span class="enscript-keyword">\three</span> <span class="enscript-keyword">\key</span>{#2}<span class="enscript-comment">%
</span><span class="enscript-keyword">\else</span>{<span class="enscript-keyword">\tclose</span>{<span class="enscript-keyword">\kbdfont</span><span class="enscript-keyword">\look</span>}}<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\else</span>{<span class="enscript-keyword">\tclose</span>{<span class="enscript-keyword">\kbdfont</span><span class="enscript-keyword">\look</span>}}<span class="enscript-keyword">\fi</span>}

<span class="enscript-comment">% For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\indicateurl</span>=<span class="enscript-keyword">\code</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\env</span>=<span class="enscript-keyword">\code</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\command</span>=<span class="enscript-keyword">\code</span>

<span class="enscript-comment">% @uref (abbreviation for `urlref') takes an optional (comma-separated)
</span><span class="enscript-comment">% second argument specifying the text to display and an optional third
</span><span class="enscript-comment">% arg as text to display instead of (rather than in addition to) the url
</span><span class="enscript-comment">% itself.  First (mandatory) arg is the url.  Perhaps eventually put in
</span><span class="enscript-comment">% a hypertex \special here.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\uref</span>#1{<span class="enscript-keyword">\douref</span> #1,,,<span class="enscript-keyword">\finish</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\douref</span>#1,#2,#3,#4<span class="enscript-keyword">\finish</span>{<span class="enscript-keyword">\begingroup</span>
  <span class="enscript-keyword">\unsepspaces</span>
  <span class="enscript-keyword">\pdfurl</span>{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\setbox</span>0 = <span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\ignorespaces</span> #3}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifdim</span><span class="enscript-keyword">\wd</span>0 &gt; 0pt
    <span class="enscript-keyword">\unhbox</span>0 <span class="enscript-comment">% third arg given, show only that
</span>  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\setbox</span>0 = <span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\ignorespaces</span> #2}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\ifdim</span><span class="enscript-keyword">\wd</span>0 &gt; 0pt
      <span class="enscript-keyword">\ifpdf</span>
        <span class="enscript-keyword">\unhbox</span>0             <span class="enscript-comment">% PDF: 2nd arg given, show only it
</span>      <span class="enscript-keyword">\else</span>
        <span class="enscript-keyword">\unhbox</span>0<span class="enscript-keyword">\ </span>(<span class="enscript-keyword">\code</span>{#1})<span class="enscript-comment">% DVI: 2nd arg given, show both it and url
</span>      <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\code</span>{#1}<span class="enscript-comment">% only url given, so show it
</span>    <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\endlink</span>
<span class="enscript-keyword">\endgroup</span>}

<span class="enscript-comment">% @url synonym for @uref, since that's how everyone uses it.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\url</span>=<span class="enscript-keyword">\uref</span>

<span class="enscript-comment">% rms does not like angle brackets --karl, 17may97.
</span><span class="enscript-comment">% So now @email is just like @uref, unless we are pdf.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">%\def\email#1{\angleleft{\tt #1}\angleright}
</span><span class="enscript-keyword">\ifpdf</span>
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\email</span>#1{<span class="enscript-keyword">\doemail</span>#1,,<span class="enscript-keyword">\finish</span>}
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\doemail</span>#1,#2,#3<span class="enscript-keyword">\finish</span>{<span class="enscript-keyword">\begingroup</span>
    <span class="enscript-keyword">\unsepspaces</span>
    <span class="enscript-keyword">\pdfurl</span>{mailto:#1}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\setbox</span>0 = <span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\ignorespaces</span> #2}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\ifdim</span><span class="enscript-keyword">\wd</span>0&gt;0pt<span class="enscript-keyword">\unhbox</span>0<span class="enscript-keyword">\else</span><span class="enscript-keyword">\code</span>{#1}<span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\endlink</span>
  <span class="enscript-keyword">\endgroup</span>}
<span class="enscript-keyword">\else</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\email</span>=<span class="enscript-keyword">\uref</span>
<span class="enscript-keyword">\fi</span>

<span class="enscript-comment">% Check if we are currently using a typewriter font.  Since all the
</span><span class="enscript-comment">% Computer Modern typewriter fonts have zero interword stretch (and
</span><span class="enscript-comment">% shrink), and it is reasonable to expect all typewriter fonts to have
</span><span class="enscript-comment">% this property, we can check that font parameter.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\ifmonospace</span>{<span class="enscript-keyword">\ifdim</span><span class="enscript-keyword">\fontdimen</span>3<span class="enscript-keyword">\font</span>=0pt }

<span class="enscript-comment">% Typeset a dimension, e.g., `in' or `pt'.  The only reason for the
</span><span class="enscript-comment">% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\dmn</span>#1{<span class="enscript-keyword">\thinspace</span> #1}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\kbd</span>#1{<span class="enscript-keyword">\def</span><span class="enscript-keyword">\look</span>{#1}<span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\kbdfoo</span><span class="enscript-keyword">\look</span>??<span class="enscript-keyword">\par</span>}

<span class="enscript-comment">% @l was never documented to mean ``switch to the Lisp font'',
</span><span class="enscript-comment">% and it is not used as such in any manual I can find.  We need it for
</span><span class="enscript-comment">% Polish suppressed-l.  --karl, 22sep96.
</span><span class="enscript-comment">%\def\l#1{{\li #1}\null}
</span>
<span class="enscript-comment">% Explicit font changes: @r, @sc, undocumented @ii.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\r</span>#1{{<span class="enscript-keyword">\rm</span> #1}}              <span class="enscript-comment">% roman font
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\sc</span>#1{{<span class="enscript-keyword">\smallcaps</span>#1}}       <span class="enscript-comment">% smallcaps font
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\ii</span>#1{{<span class="enscript-keyword">\it</span> #1}}             <span class="enscript-comment">% italic font
</span>
<span class="enscript-comment">% @acronym for &quot;FBI&quot;, &quot;NATO&quot;, and the like.
</span><span class="enscript-comment">% We print this one point size smaller, since it's intended for
</span><span class="enscript-comment">% all-uppercase.
</span><span class="enscript-comment">% 
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\acronym</span>#1{<span class="enscript-keyword">\doacronym</span> #1,,<span class="enscript-keyword">\finish</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\doacronym</span>#1,#2,#3<span class="enscript-keyword">\finish</span>{<span class="enscript-comment">%
</span>  {<span class="enscript-keyword">\selectfonts</span><span class="enscript-keyword">\lsize</span> #1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\temp</span>{#2}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\temp</span><span class="enscript-keyword">\empty</span> <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\space</span> ({<span class="enscript-keyword">\unsepspaces</span> <span class="enscript-keyword">\ignorespaces</span> <span class="enscript-keyword">\temp</span> <span class="enscript-keyword">\unskip</span>})<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span>
}

<span class="enscript-comment">% @abbr for &quot;Comput. J.&quot; and the like.
</span><span class="enscript-comment">% No font change, but don't do end-of-sentence spacing.
</span><span class="enscript-comment">% 
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\abbr</span>#1{<span class="enscript-keyword">\doabbr</span> #1,,<span class="enscript-keyword">\finish</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\doabbr</span>#1,#2,#3<span class="enscript-keyword">\finish</span>{<span class="enscript-comment">%
</span>  {<span class="enscript-keyword">\plainfrenchspacing</span> #1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\temp</span>{#2}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\temp</span><span class="enscript-keyword">\empty</span> <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\space</span> ({<span class="enscript-keyword">\unsepspaces</span> <span class="enscript-keyword">\ignorespaces</span> <span class="enscript-keyword">\temp</span> <span class="enscript-keyword">\unskip</span>})<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span>
}

<span class="enscript-comment">% @pounds{} is a sterling sign, which Knuth put in the CM italic font.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\pounds</span>{{<span class="enscript-keyword">\it</span><span class="enscript-keyword">\$</span>}}

<span class="enscript-comment">% @euro{} comes from a separate font, depending on the current style.
</span><span class="enscript-comment">% We use the free feym* fonts from the eurosym package by Henrik
</span><span class="enscript-comment">% Theiling, which support regular, slanted, bold and bold slanted (and
</span><span class="enscript-comment">% &quot;outlined&quot; (blackboard board, sort of) versions, which we don't need).
</span><span class="enscript-comment">% It is available from <a href="http://www.ctan.org/tex-archive/fonts/eurosym.">http://www.ctan.org/tex-archive/fonts/eurosym.</a>
</span><span class="enscript-comment">% 
</span><span class="enscript-comment">% Although only regular is the truly official Euro symbol, we ignore
</span><span class="enscript-comment">% that.  The Euro is designed to be slightly taller than the regular
</span><span class="enscript-comment">% font height.
</span><span class="enscript-comment">% 
</span><span class="enscript-comment">% feymr - regular
</span><span class="enscript-comment">% feymo - slanted
</span><span class="enscript-comment">% feybr - bold
</span><span class="enscript-comment">% feybo - bold slanted
</span><span class="enscript-comment">% 
</span><span class="enscript-comment">% There is no good (free) typewriter version, to my knowledge.
</span><span class="enscript-comment">% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide.
</span><span class="enscript-comment">% Hmm.
</span><span class="enscript-comment">% 
</span><span class="enscript-comment">% Also doesn't work in math.  Do we need to do math with euro symbols?
</span><span class="enscript-comment">% Hope not.
</span><span class="enscript-comment">% 
</span><span class="enscript-comment">% 
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\euro</span>{{<span class="enscript-keyword">\eurofont</span> e}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\eurofont</span>{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% We set the font at each command, rather than predefining it in
</span>  <span class="enscript-comment">% \textfonts and the other font-switching commands, so that
</span>  <span class="enscript-comment">% installations which never need the symbol don't have to have the
</span>  <span class="enscript-comment">% font installed.
</span>  <span class="enscript-comment">% 
</span>  <span class="enscript-comment">% There is only one designed size (nominal 10pt), so we always scale
</span>  <span class="enscript-comment">% that to the current nominal size.
</span>  <span class="enscript-comment">% 
</span>  <span class="enscript-comment">% By the way, simply using &quot;at 1em&quot; works for cmr10 and the like, but
</span>  <span class="enscript-comment">% does not work for cmbx10 and other extended/shrunken fonts.
</span>  <span class="enscript-comment">% 
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\eurosize</span>{<span class="enscript-keyword">\csname</span><span class="enscript-keyword">\curfontsize</span> nominalsize<span class="enscript-keyword">\endcsname</span>}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\curfontstyle</span><span class="enscript-keyword">\bfstylename</span> 
    <span class="enscript-comment">% bold:
</span>    <span class="enscript-keyword">\font</span><span class="enscript-keyword">\thiseurofont</span> = <span class="enscript-keyword">\ifusingit</span>{feybo10}{feybr10} at <span class="enscript-keyword">\eurosize</span>
  <span class="enscript-keyword">\else</span> 
    <span class="enscript-comment">% regular:
</span>    <span class="enscript-keyword">\font</span><span class="enscript-keyword">\thiseurofont</span> = <span class="enscript-keyword">\ifusingit</span>{feymo10}{feymr10} at <span class="enscript-keyword">\eurosize</span>
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\thiseurofont</span>
}

<span class="enscript-comment">% @registeredsymbol - R in a circle.  The font for the R should really
</span><span class="enscript-comment">% be smaller yet, but lllsize is the best we can do for now.
</span><span class="enscript-comment">% Adapted from the plain.tex definition of \copyright.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\registeredsymbol</span>{<span class="enscript-comment">%
</span>  $^{{<span class="enscript-keyword">\ooalign</span>{<span class="enscript-keyword">\hfil</span><span class="enscript-keyword">\raise</span>.07ex<span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\selectfonts</span><span class="enscript-keyword">\lllsize</span> R}<span class="enscript-comment">%
</span>               <span class="enscript-keyword">\hfil</span><span class="enscript-keyword">\crcr</span><span class="enscript-keyword">\Orb</span>}}<span class="enscript-comment">%
</span>    }$<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% @textdegree - the normal degrees sign.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\textdegree</span>{<span class="enscript-variable-name">$^\circ$</span>}

<span class="enscript-comment">% Laurent Siebenmann reports \Orb undefined with:
</span><span class="enscript-comment">%  Textures 1.7.7 (preloaded format=plain 93.10.14)  (68K)  16 APR 2004 02:38
</span><span class="enscript-comment">% so we'll define it if necessary.
</span><span class="enscript-comment">% 
</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\Orb</span><span class="enscript-keyword">\undefined</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\Orb</span>{<span class="enscript-keyword">\mathhexbox</span>20D}
<span class="enscript-keyword">\fi</span>


<span class="enscript-keyword">\message</span>{page headings,}

<span class="enscript-keyword">\newskip</span><span class="enscript-keyword">\titlepagetopglue</span> <span class="enscript-keyword">\titlepagetopglue</span> = 1.5in
<span class="enscript-keyword">\newskip</span><span class="enscript-keyword">\titlepagebottomglue</span> <span class="enscript-keyword">\titlepagebottomglue</span> = 2pc

<span class="enscript-comment">% First the title page.  Must do @settitle before @titlepage.
</span><span class="enscript-keyword">\newif</span><span class="enscript-keyword">\ifseenauthor</span>
<span class="enscript-keyword">\newif</span><span class="enscript-keyword">\iffinishedtitlepage</span>

<span class="enscript-comment">% Do an implicit @contents or @shortcontents after @end titlepage if the
</span><span class="enscript-comment">% user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\newif</span><span class="enscript-keyword">\ifsetcontentsaftertitlepage</span>
 <span class="enscript-keyword">\let</span><span class="enscript-keyword">\setcontentsaftertitlepage</span> = <span class="enscript-keyword">\setcontentsaftertitlepagetrue</span>
<span class="enscript-keyword">\newif</span><span class="enscript-keyword">\ifsetshortcontentsaftertitlepage</span>
 <span class="enscript-keyword">\let</span><span class="enscript-keyword">\setshortcontentsaftertitlepage</span> = <span class="enscript-keyword">\setshortcontentsaftertitlepagetrue</span>

<span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\shorttitlepage</span>{<span class="enscript-keyword">\begingroup</span><span class="enscript-keyword">\hbox</span>{}<span class="enscript-keyword">\vskip</span> 1.5in <span class="enscript-keyword">\chaprm</span> <span class="enscript-keyword">\centerline</span>{#1}<span class="enscript-comment">%
</span>        <span class="enscript-keyword">\endgroup</span><span class="enscript-keyword">\page</span><span class="enscript-keyword">\hbox</span>{}<span class="enscript-keyword">\page</span>}

<span class="enscript-keyword">\envdef</span><span class="enscript-keyword">\titlepage</span>{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% Open one extra group, as we want to close it in the middle of \Etitlepage.
</span>  <span class="enscript-keyword">\begingroup</span>
    <span class="enscript-keyword">\parindent</span>=0pt <span class="enscript-keyword">\textfonts</span>
    <span class="enscript-comment">% Leave some space at the very top of the page.
</span>    <span class="enscript-keyword">\vglue</span><span class="enscript-keyword">\titlepagetopglue</span>
    <span class="enscript-comment">% No rule at page bottom unless we print one at the top with @title.
</span>    <span class="enscript-keyword">\finishedtitlepagetrue</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Most title ``pages'' are actually two pages long, with space
</span>    <span class="enscript-comment">% at the top of the second.  We don't want the ragged left on the second.
</span>    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\oldpage</span> = <span class="enscript-keyword">\page</span>
    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\page</span>{<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\iffinishedtitlepage</span><span class="enscript-keyword">\else</span>
	 <span class="enscript-keyword">\finishtitlepage</span>
      <span class="enscript-keyword">\fi</span>
      <span class="enscript-keyword">\let</span><span class="enscript-keyword">\page</span> = <span class="enscript-keyword">\oldpage</span>
      <span class="enscript-keyword">\page</span>
      <span class="enscript-keyword">\null</span>
    }<span class="enscript-comment">%
</span>}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\Etitlepage</span>{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\iffinishedtitlepage</span><span class="enscript-keyword">\else</span>
	<span class="enscript-keyword">\finishtitlepage</span>
    <span class="enscript-keyword">\fi</span>
    <span class="enscript-comment">% It is important to do the page break before ending the group,
</span>    <span class="enscript-comment">% because the headline and footline are only empty inside the group.
</span>    <span class="enscript-comment">% If we use the new definition of \page, we always get a blank page
</span>    <span class="enscript-comment">% after the title page, which we certainly don't want.
</span>    <span class="enscript-keyword">\oldpage</span>
  <span class="enscript-keyword">\endgroup</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Need this before the \...aftertitlepage checks so that if they are
</span>  <span class="enscript-comment">% in effect the toc pages will come out with page numbers.
</span>  <span class="enscript-keyword">\HEADINGSon</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% If they want short, they certainly want long too.
</span>  <span class="enscript-keyword">\ifsetshortcontentsaftertitlepage</span>
    <span class="enscript-keyword">\shortcontents</span>
    <span class="enscript-keyword">\contents</span>
    <span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\shortcontents</span> = <span class="enscript-keyword">\relax</span>
    <span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\contents</span> = <span class="enscript-keyword">\relax</span>
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifsetcontentsaftertitlepage</span>
    <span class="enscript-keyword">\contents</span>
    <span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\contents</span> = <span class="enscript-keyword">\relax</span>
    <span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\shortcontents</span> = <span class="enscript-keyword">\relax</span>
  <span class="enscript-keyword">\fi</span>
}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\finishtitlepage</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\vskip</span>4pt <span class="enscript-keyword">\hrule</span> height 2pt width <span class="enscript-keyword">\hsize</span>
  <span class="enscript-keyword">\vskip</span><span class="enscript-keyword">\titlepagebottomglue</span>
  <span class="enscript-keyword">\finishedtitlepagetrue</span>
}

<span class="enscript-comment">%%% Macros to be used within @titlepage:
</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\subtitlerm</span>=<span class="enscript-keyword">\tenrm</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\subtitlefont</span>{<span class="enscript-keyword">\subtitlerm</span> <span class="enscript-keyword">\normalbaselineskip</span> = 13pt <span class="enscript-keyword">\normalbaselines</span>}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\authorfont</span>{<span class="enscript-keyword">\authorrm</span> <span class="enscript-keyword">\normalbaselineskip</span> = 16pt <span class="enscript-keyword">\normalbaselines</span>
		<span class="enscript-keyword">\let</span><span class="enscript-keyword">\tt</span>=<span class="enscript-keyword">\authortt</span>}

<span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\title</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\checkenv</span><span class="enscript-keyword">\titlepage</span>
  <span class="enscript-keyword">\leftline</span>{<span class="enscript-keyword">\titlefonts</span><span class="enscript-keyword">\rm</span> #1}
  <span class="enscript-comment">% print a rule at the page bottom also.
</span>  <span class="enscript-keyword">\finishedtitlepagefalse</span>
  <span class="enscript-keyword">\vskip</span>4pt <span class="enscript-keyword">\hrule</span> height 4pt width <span class="enscript-keyword">\hsize</span> <span class="enscript-keyword">\vskip</span>4pt
}

<span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\subtitle</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\checkenv</span><span class="enscript-keyword">\titlepage</span>
  {<span class="enscript-keyword">\subtitlefont</span> <span class="enscript-keyword">\rightline</span>{#1}}<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% @author should come last, but may come many times.
</span><span class="enscript-comment">% It can also be used inside @quotation.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\author</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\temp</span>{<span class="enscript-keyword">\quotation</span>}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\thisenv</span><span class="enscript-keyword">\temp</span>
    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\quotationauthor</span>{#1}<span class="enscript-comment">% printed in \Equotation.
</span>  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\checkenv</span><span class="enscript-keyword">\titlepage</span>
    <span class="enscript-keyword">\ifseenauthor</span><span class="enscript-keyword">\else</span> <span class="enscript-keyword">\vskip</span> 0pt plus 1filll <span class="enscript-keyword">\seenauthortrue</span> <span class="enscript-keyword">\fi</span>
    {<span class="enscript-keyword">\authorfont</span> <span class="enscript-keyword">\leftline</span>{#1}}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span>
}


<span class="enscript-comment">%%% Set up page headings and footings.
</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\thispage</span>=<span class="enscript-keyword">\folio</span>

<span class="enscript-keyword">\newtoks</span><span class="enscript-keyword">\evenheadline</span>    <span class="enscript-comment">% headline on even pages
</span><span class="enscript-keyword">\newtoks</span><span class="enscript-keyword">\oddheadline</span>     <span class="enscript-comment">% headline on odd pages
</span><span class="enscript-keyword">\newtoks</span><span class="enscript-keyword">\evenfootline</span>    <span class="enscript-comment">% footline on even pages
</span><span class="enscript-keyword">\newtoks</span><span class="enscript-keyword">\oddfootline</span>     <span class="enscript-comment">% footline on odd pages
</span>
<span class="enscript-comment">% Now make TeX use those variables
</span><span class="enscript-keyword">\headline</span>={{<span class="enscript-keyword">\textfonts</span><span class="enscript-keyword">\rm</span> <span class="enscript-keyword">\ifodd</span><span class="enscript-keyword">\pageno</span> <span class="enscript-keyword">\the</span><span class="enscript-keyword">\oddheadline</span>
                            <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\the</span><span class="enscript-keyword">\evenheadline</span> <span class="enscript-keyword">\fi</span>}}
<span class="enscript-keyword">\footline</span>={{<span class="enscript-keyword">\textfonts</span><span class="enscript-keyword">\rm</span> <span class="enscript-keyword">\ifodd</span><span class="enscript-keyword">\pageno</span> <span class="enscript-keyword">\the</span><span class="enscript-keyword">\oddfootline</span>
                            <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\the</span><span class="enscript-keyword">\evenfootline</span> <span class="enscript-keyword">\fi</span>}<span class="enscript-keyword">\HEADINGShook</span>}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\HEADINGShook</span>=<span class="enscript-keyword">\relax</span>

<span class="enscript-comment">% Commands to set those variables.
</span><span class="enscript-comment">% For example, this is what  @headings on  does
</span><span class="enscript-comment">% @evenheading @thistitle|@thispage|@thischapter
</span><span class="enscript-comment">% @oddheading @thischapter|@thispage|@thistitle
</span><span class="enscript-comment">% @evenfooting @thisfile||
</span><span class="enscript-comment">% @oddfooting ||@thisfile
</span>

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\evenheading</span>{<span class="enscript-keyword">\parsearg</span><span class="enscript-keyword">\evenheadingxxx</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\evenheadingxxx</span> #1{<span class="enscript-keyword">\evenheadingyyy</span> #1<span class="enscript-keyword">\|</span><span class="enscript-keyword">\|</span><span class="enscript-keyword">\|</span><span class="enscript-keyword">\|</span><span class="enscript-keyword">\finish</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\evenheadingyyy</span> #1<span class="enscript-keyword">\|</span>#2<span class="enscript-keyword">\|</span>#3<span class="enscript-keyword">\|</span>#4<span class="enscript-keyword">\finish</span>{<span class="enscript-comment">%
</span><span class="enscript-keyword">\global</span><span class="enscript-keyword">\evenheadline</span>={<span class="enscript-keyword">\rlap</span>{<span class="enscript-keyword">\centerline</span>{#2}}<span class="enscript-keyword">\line</span>{#1<span class="enscript-keyword">\hfil</span>#3}}}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\oddheading</span>{<span class="enscript-keyword">\parsearg</span><span class="enscript-keyword">\oddheadingxxx</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\oddheadingxxx</span> #1{<span class="enscript-keyword">\oddheadingyyy</span> #1<span class="enscript-keyword">\|</span><span class="enscript-keyword">\|</span><span class="enscript-keyword">\|</span><span class="enscript-keyword">\|</span><span class="enscript-keyword">\finish</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\oddheadingyyy</span> #1<span class="enscript-keyword">\|</span>#2<span class="enscript-keyword">\|</span>#3<span class="enscript-keyword">\|</span>#4<span class="enscript-keyword">\finish</span>{<span class="enscript-comment">%
</span><span class="enscript-keyword">\global</span><span class="enscript-keyword">\oddheadline</span>={<span class="enscript-keyword">\rlap</span>{<span class="enscript-keyword">\centerline</span>{#2}}<span class="enscript-keyword">\line</span>{#1<span class="enscript-keyword">\hfil</span>#3}}}

<span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\everyheading</span>{<span class="enscript-keyword">\oddheadingxxx</span>{#1}<span class="enscript-keyword">\evenheadingxxx</span>{#1}}<span class="enscript-comment">%
</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\evenfooting</span>{<span class="enscript-keyword">\parsearg</span><span class="enscript-keyword">\evenfootingxxx</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\evenfootingxxx</span> #1{<span class="enscript-keyword">\evenfootingyyy</span> #1<span class="enscript-keyword">\|</span><span class="enscript-keyword">\|</span><span class="enscript-keyword">\|</span><span class="enscript-keyword">\|</span><span class="enscript-keyword">\finish</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\evenfootingyyy</span> #1<span class="enscript-keyword">\|</span>#2<span class="enscript-keyword">\|</span>#3<span class="enscript-keyword">\|</span>#4<span class="enscript-keyword">\finish</span>{<span class="enscript-comment">%
</span><span class="enscript-keyword">\global</span><span class="enscript-keyword">\evenfootline</span>={<span class="enscript-keyword">\rlap</span>{<span class="enscript-keyword">\centerline</span>{#2}}<span class="enscript-keyword">\line</span>{#1<span class="enscript-keyword">\hfil</span>#3}}}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\oddfooting</span>{<span class="enscript-keyword">\parsearg</span><span class="enscript-keyword">\oddfootingxxx</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\oddfootingxxx</span> #1{<span class="enscript-keyword">\oddfootingyyy</span> #1<span class="enscript-keyword">\|</span><span class="enscript-keyword">\|</span><span class="enscript-keyword">\|</span><span class="enscript-keyword">\|</span><span class="enscript-keyword">\finish</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\oddfootingyyy</span> #1<span class="enscript-keyword">\|</span>#2<span class="enscript-keyword">\|</span>#3<span class="enscript-keyword">\|</span>#4<span class="enscript-keyword">\finish</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\oddfootline</span> = {<span class="enscript-keyword">\rlap</span>{<span class="enscript-keyword">\centerline</span>{#2}}<span class="enscript-keyword">\line</span>{#1<span class="enscript-keyword">\hfil</span>#3}}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Leave some space for the footline.  Hopefully ok to assume
</span>  <span class="enscript-comment">% @evenfooting will not be used by itself.
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\pageheight</span> by -12pt
  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\vsize</span> by -12pt
}

<span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\everyfooting</span>{<span class="enscript-keyword">\oddfootingxxx</span>{#1}<span class="enscript-keyword">\evenfootingxxx</span>{#1}}


<span class="enscript-comment">% @headings double      turns headings on for double-sided printing.
</span><span class="enscript-comment">% @headings single      turns headings on for single-sided printing.
</span><span class="enscript-comment">% @headings off         turns them off.
</span><span class="enscript-comment">% @headings on          same as @headings double, retained for compatibility.
</span><span class="enscript-comment">% @headings after       turns on double-sided headings after this page.
</span><span class="enscript-comment">% @headings doubleafter turns on double-sided headings after this page.
</span><span class="enscript-comment">% @headings singleafter turns on single-sided headings after this page.
</span><span class="enscript-comment">% By default, they are off at the start of a document,
</span><span class="enscript-comment">% and turned `on' after @end titlepage.
</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\headings</span> #1 {<span class="enscript-keyword">\csname</span> HEADINGS#1<span class="enscript-keyword">\endcsname</span>}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\HEADINGSoff</span>{<span class="enscript-comment">%
</span><span class="enscript-keyword">\global</span><span class="enscript-keyword">\evenheadline</span>={<span class="enscript-keyword">\hfil</span>} <span class="enscript-keyword">\global</span><span class="enscript-keyword">\evenfootline</span>={<span class="enscript-keyword">\hfil</span>}
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\oddheadline</span>={<span class="enscript-keyword">\hfil</span>} <span class="enscript-keyword">\global</span><span class="enscript-keyword">\oddfootline</span>={<span class="enscript-keyword">\hfil</span>}}
<span class="enscript-keyword">\HEADINGSoff</span>
<span class="enscript-comment">% When we turn headings on, set the page number to 1.
</span><span class="enscript-comment">% For double-sided printing, put current file name in lower left corner,
</span><span class="enscript-comment">% chapter name on inside top of right hand pages, document
</span><span class="enscript-comment">% title on inside top of left hand pages, and page numbers on outside top
</span><span class="enscript-comment">% edge of all pages.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\HEADINGSdouble</span>{<span class="enscript-comment">%
</span><span class="enscript-keyword">\global</span><span class="enscript-keyword">\pageno</span>=1
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\evenfootline</span>={<span class="enscript-keyword">\hfil</span>}
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\oddfootline</span>={<span class="enscript-keyword">\hfil</span>}
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\evenheadline</span>={<span class="enscript-keyword">\line</span>{<span class="enscript-keyword">\folio</span><span class="enscript-keyword">\hfil</span><span class="enscript-keyword">\thistitle</span>}}
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\oddheadline</span>={<span class="enscript-keyword">\line</span>{<span class="enscript-keyword">\thischapter</span><span class="enscript-keyword">\hfil</span><span class="enscript-keyword">\folio</span>}}
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\contentsalignmacro</span> = <span class="enscript-keyword">\chapoddpage</span>
}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\contentsalignmacro</span> = <span class="enscript-keyword">\chappager</span>

<span class="enscript-comment">% For single-sided printing, chapter title goes across top left of page,
</span><span class="enscript-comment">% page number on top right.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\HEADINGSsingle</span>{<span class="enscript-comment">%
</span><span class="enscript-keyword">\global</span><span class="enscript-keyword">\pageno</span>=1
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\evenfootline</span>={<span class="enscript-keyword">\hfil</span>}
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\oddfootline</span>={<span class="enscript-keyword">\hfil</span>}
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\evenheadline</span>={<span class="enscript-keyword">\line</span>{<span class="enscript-keyword">\thischapter</span><span class="enscript-keyword">\hfil</span><span class="enscript-keyword">\folio</span>}}
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\oddheadline</span>={<span class="enscript-keyword">\line</span>{<span class="enscript-keyword">\thischapter</span><span class="enscript-keyword">\hfil</span><span class="enscript-keyword">\folio</span>}}
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\contentsalignmacro</span> = <span class="enscript-keyword">\chappager</span>
}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\HEADINGSon</span>{<span class="enscript-keyword">\HEADINGSdouble</span>}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\HEADINGSafter</span>{<span class="enscript-keyword">\let</span><span class="enscript-keyword">\HEADINGShook</span>=<span class="enscript-keyword">\HEADINGSdoublex</span>}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\HEADINGSdoubleafter</span>=<span class="enscript-keyword">\HEADINGSafter</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\HEADINGSdoublex</span>{<span class="enscript-comment">%
</span><span class="enscript-keyword">\global</span><span class="enscript-keyword">\evenfootline</span>={<span class="enscript-keyword">\hfil</span>}
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\oddfootline</span>={<span class="enscript-keyword">\hfil</span>}
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\evenheadline</span>={<span class="enscript-keyword">\line</span>{<span class="enscript-keyword">\folio</span><span class="enscript-keyword">\hfil</span><span class="enscript-keyword">\thistitle</span>}}
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\oddheadline</span>={<span class="enscript-keyword">\line</span>{<span class="enscript-keyword">\thischapter</span><span class="enscript-keyword">\hfil</span><span class="enscript-keyword">\folio</span>}}
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\contentsalignmacro</span> = <span class="enscript-keyword">\chapoddpage</span>
}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\HEADINGSsingleafter</span>{<span class="enscript-keyword">\let</span><span class="enscript-keyword">\HEADINGShook</span>=<span class="enscript-keyword">\HEADINGSsinglex</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\HEADINGSsinglex</span>{<span class="enscript-comment">%
</span><span class="enscript-keyword">\global</span><span class="enscript-keyword">\evenfootline</span>={<span class="enscript-keyword">\hfil</span>}
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\oddfootline</span>={<span class="enscript-keyword">\hfil</span>}
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\evenheadline</span>={<span class="enscript-keyword">\line</span>{<span class="enscript-keyword">\thischapter</span><span class="enscript-keyword">\hfil</span><span class="enscript-keyword">\folio</span>}}
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\oddheadline</span>={<span class="enscript-keyword">\line</span>{<span class="enscript-keyword">\thischapter</span><span class="enscript-keyword">\hfil</span><span class="enscript-keyword">\folio</span>}}
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\contentsalignmacro</span> = <span class="enscript-keyword">\chappager</span>
}

<span class="enscript-comment">% Subroutines used in generating headings
</span><span class="enscript-comment">% This produces Day Month Year style of output.
</span><span class="enscript-comment">% Only define if not already defined, in case a txi-??.tex file has set
</span><span class="enscript-comment">% up a different format (e.g., txi-cs.tex does this).
</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\today</span><span class="enscript-keyword">\undefined</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\today</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\number</span><span class="enscript-keyword">\day</span><span class="enscript-keyword">\space</span>
  <span class="enscript-keyword">\ifcase</span><span class="enscript-keyword">\month</span>
  <span class="enscript-keyword">\or</span><span class="enscript-keyword">\putwordMJan</span><span class="enscript-keyword">\or</span><span class="enscript-keyword">\putwordMFeb</span><span class="enscript-keyword">\or</span><span class="enscript-keyword">\putwordMMar</span><span class="enscript-keyword">\or</span><span class="enscript-keyword">\putwordMApr</span>
  <span class="enscript-keyword">\or</span><span class="enscript-keyword">\putwordMMay</span><span class="enscript-keyword">\or</span><span class="enscript-keyword">\putwordMJun</span><span class="enscript-keyword">\or</span><span class="enscript-keyword">\putwordMJul</span><span class="enscript-keyword">\or</span><span class="enscript-keyword">\putwordMAug</span>
  <span class="enscript-keyword">\or</span><span class="enscript-keyword">\putwordMSep</span><span class="enscript-keyword">\or</span><span class="enscript-keyword">\putwordMOct</span><span class="enscript-keyword">\or</span><span class="enscript-keyword">\putwordMNov</span><span class="enscript-keyword">\or</span><span class="enscript-keyword">\putwordMDec</span>
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\space</span><span class="enscript-keyword">\number</span><span class="enscript-keyword">\year</span>}
<span class="enscript-keyword">\fi</span>

<span class="enscript-comment">% @settitle line...  specifies the title of the document, for headings.
</span><span class="enscript-comment">% It generates no output of its own.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\thistitle</span>{<span class="enscript-keyword">\putwordNoTitle</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\settitle</span>{<span class="enscript-keyword">\parsearg</span>{<span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\thistitle</span>}}


<span class="enscript-keyword">\message</span>{tables,}
<span class="enscript-comment">% Tables -- @table, @ftable, @vtable, @item(x).
</span>
<span class="enscript-comment">% default indentation of table text
</span><span class="enscript-keyword">\newdimen</span><span class="enscript-keyword">\tableindent</span> <span class="enscript-keyword">\tableindent</span>=.8in
<span class="enscript-comment">% default indentation of @itemize and @enumerate text
</span><span class="enscript-keyword">\newdimen</span><span class="enscript-keyword">\itemindent</span>  <span class="enscript-keyword">\itemindent</span>=.3in
<span class="enscript-comment">% margin between end of table item and start of table text.
</span><span class="enscript-keyword">\newdimen</span><span class="enscript-keyword">\itemmargin</span>  <span class="enscript-keyword">\itemmargin</span>=.1in

<span class="enscript-comment">% used internally for \itemindent minus \itemmargin
</span><span class="enscript-keyword">\newdimen</span><span class="enscript-keyword">\itemmax</span>

<span class="enscript-comment">% Note @table, @ftable, and @vtable define @item, @itemx, etc., with
</span><span class="enscript-comment">% these defs.
</span><span class="enscript-comment">% They also define \itemindex
</span><span class="enscript-comment">% to index the item name in whatever manner is desired (perhaps none).
</span>
<span class="enscript-keyword">\newif</span><span class="enscript-keyword">\ifitemxneedsnegativevskip</span>

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\itemxpar</span>{<span class="enscript-keyword">\par</span><span class="enscript-keyword">\ifitemxneedsnegativevskip</span><span class="enscript-keyword">\nobreak</span><span class="enscript-keyword">\vskip</span>-<span class="enscript-keyword">\parskip</span><span class="enscript-keyword">\nobreak</span><span class="enscript-keyword">\fi</span>}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\internalBitem</span>{<span class="enscript-keyword">\smallbreak</span> <span class="enscript-keyword">\parsearg</span><span class="enscript-keyword">\itemzzz</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\internalBitemx</span>{<span class="enscript-keyword">\itemxpar</span> <span class="enscript-keyword">\parsearg</span><span class="enscript-keyword">\itemzzz</span>}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\itemzzz</span> #1{<span class="enscript-keyword">\begingroup</span> <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\hsize</span> by -<span class="enscript-keyword">\rightskip</span>
  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\hsize</span> by -<span class="enscript-keyword">\tableindent</span>
  <span class="enscript-keyword">\setbox</span>0=<span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\itemindicate</span>{#1}}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\itemindex</span>{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\nobreak</span> <span class="enscript-comment">% This prevents a break before @itemx.
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% If the item text does not fit in the space we have, put it on a line
</span>  <span class="enscript-comment">% by itself, and do not allow a page break either before or after that
</span>  <span class="enscript-comment">% line.  We do not start a paragraph here because then if the next
</span>  <span class="enscript-comment">% command is, e.g., @kindex, the whatsit would get put into the
</span>  <span class="enscript-comment">% horizontal list on a line by itself, resulting in extra blank space.
</span>  <span class="enscript-keyword">\ifdim</span> <span class="enscript-keyword">\wd</span>0&gt;<span class="enscript-keyword">\itemmax</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Make this a paragraph so we get the \parskip glue and wrapping,
</span>    <span class="enscript-comment">% but leave it ragged-right.
</span>    <span class="enscript-keyword">\begingroup</span>
      <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\leftskip</span> by-<span class="enscript-keyword">\tableindent</span>
      <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\hsize</span> by<span class="enscript-keyword">\tableindent</span>
      <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\rightskip</span> by0pt plus1fil
      <span class="enscript-keyword">\leavevmode</span><span class="enscript-keyword">\unhbox</span>0<span class="enscript-keyword">\par</span>
    <span class="enscript-keyword">\endgroup</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% We're going to be starting a paragraph, but we don't want the
</span>    <span class="enscript-comment">% \parskip glue -- logically it's part of the @item we just started.
</span>    <span class="enscript-keyword">\nobreak</span> <span class="enscript-keyword">\vskip</span>-<span class="enscript-keyword">\parskip</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Stop a page break at the \parskip glue coming up.  However, if
</span>    <span class="enscript-comment">% what follows is an environment such as @example, there will be no
</span>    <span class="enscript-comment">% \parskip glue; then the negative vskip we just inserted would
</span>    <span class="enscript-comment">% cause the example and the item to crash together.  So we use this
</span>    <span class="enscript-comment">% bizarre value of 10001 as a signal to \aboveenvbreak to insert
</span>    <span class="enscript-comment">% \parskip glue after all.  Section titles are handled this way also.
</span>    <span class="enscript-comment">% 
</span>    <span class="enscript-keyword">\penalty</span> 10001
    <span class="enscript-keyword">\endgroup</span>
    <span class="enscript-keyword">\itemxneedsnegativevskipfalse</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-comment">% The item text fits into the space.  Start a paragraph, so that the
</span>    <span class="enscript-comment">% following text (if any) will end up on the same line.
</span>    <span class="enscript-keyword">\noindent</span>
    <span class="enscript-comment">% Do this with kerns and \unhbox so that if there is a footnote in
</span>    <span class="enscript-comment">% the item text, it can migrate to the main vertical list and
</span>    <span class="enscript-comment">% eventually be printed.
</span>    <span class="enscript-keyword">\nobreak</span><span class="enscript-keyword">\kern</span>-<span class="enscript-keyword">\tableindent</span>
    <span class="enscript-keyword">\dimen</span>0 = <span class="enscript-keyword">\itemmax</span>  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\dimen</span>0 by <span class="enscript-keyword">\itemmargin</span> <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\dimen</span>0 by -<span class="enscript-keyword">\wd</span>0
    <span class="enscript-keyword">\unhbox</span>0
    <span class="enscript-keyword">\nobreak</span><span class="enscript-keyword">\kern</span><span class="enscript-keyword">\dimen</span>0
    <span class="enscript-keyword">\endgroup</span>
    <span class="enscript-keyword">\itemxneedsnegativevskiptrue</span>
  <span class="enscript-keyword">\fi</span>
}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\item</span>{<span class="enscript-keyword">\errmessage</span>{@item while not in a list environment}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\itemx</span>{<span class="enscript-keyword">\errmessage</span>{@itemx while not in a list environment}}

<span class="enscript-comment">% @table, @ftable, @vtable.
</span><span class="enscript-keyword">\envdef</span><span class="enscript-keyword">\table</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\itemindex</span><span class="enscript-keyword">\gobble</span>
  <span class="enscript-keyword">\tablecheck</span>{table}<span class="enscript-comment">%
</span>}
<span class="enscript-keyword">\envdef</span><span class="enscript-keyword">\ftable</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\itemindex</span> ##1{<span class="enscript-keyword">\doind</span> {fn}{<span class="enscript-keyword">\code</span>{##1}}}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\tablecheck</span>{ftable}<span class="enscript-comment">%
</span>}
<span class="enscript-keyword">\envdef</span><span class="enscript-keyword">\vtable</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\itemindex</span> ##1{<span class="enscript-keyword">\doind</span> {vr}{<span class="enscript-keyword">\code</span>{##1}}}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\tablecheck</span>{vtable}<span class="enscript-comment">%
</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\tablecheck</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifnum</span> <span class="enscript-keyword">\the</span><span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^M=<span class="enscript-keyword">\active</span>
    <span class="enscript-keyword">\endgroup</span>
    <span class="enscript-keyword">\errmessage</span>{This command won't work in this context; perhaps the problem is
      that we are <span class="enscript-keyword">\inenvironment</span><span class="enscript-keyword">\thisenv</span>}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\next</span>{<span class="enscript-keyword">\doignore</span>{#1}}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\next</span><span class="enscript-keyword">\tablex</span>
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\next</span>
}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\tablex</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\itemindicate</span>{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\parsearg</span><span class="enscript-keyword">\tabley</span>
}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\tabley</span>#1{<span class="enscript-comment">%
</span>  {<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\makevalueexpandable</span>
    <span class="enscript-keyword">\edef</span><span class="enscript-keyword">\temp</span>{<span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\tablez</span> #1<span class="enscript-keyword">\space</span><span class="enscript-keyword">\space</span><span class="enscript-keyword">\space</span>}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\expandafter</span>
  }<span class="enscript-keyword">\temp</span> <span class="enscript-keyword">\endtablez</span>
}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\tablez</span> #1 #2 #3 #4<span class="enscript-keyword">\endtablez</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\aboveenvbreak</span>
  <span class="enscript-keyword">\ifnum</span> 0#1&gt;0 <span class="enscript-keyword">\advance</span> <span class="enscript-keyword">\leftskip</span> by #1<span class="enscript-keyword">\mil</span> <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\ifnum</span> 0#2&gt;0 <span class="enscript-keyword">\tableindent</span>=#2<span class="enscript-keyword">\mil</span> <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\ifnum</span> 0#3&gt;0 <span class="enscript-keyword">\advance</span> <span class="enscript-keyword">\rightskip</span> by #3<span class="enscript-keyword">\mil</span> <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\itemmax</span>=<span class="enscript-keyword">\tableindent</span>
  <span class="enscript-keyword">\advance</span> <span class="enscript-keyword">\itemmax</span> by -<span class="enscript-keyword">\itemmargin</span>
  <span class="enscript-keyword">\advance</span> <span class="enscript-keyword">\leftskip</span> by <span class="enscript-keyword">\tableindent</span>
  <span class="enscript-keyword">\exdentamount</span>=<span class="enscript-keyword">\tableindent</span>
  <span class="enscript-keyword">\parindent</span> = 0pt
  <span class="enscript-keyword">\parskip</span> = <span class="enscript-keyword">\smallskipamount</span>
  <span class="enscript-keyword">\ifdim</span> <span class="enscript-keyword">\parskip</span>=0pt <span class="enscript-keyword">\parskip</span>=2pt <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\item</span> = <span class="enscript-keyword">\internalBitem</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\itemx</span> = <span class="enscript-keyword">\internalBitemx</span>
}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\Etable</span>{<span class="enscript-keyword">\endgraf</span><span class="enscript-keyword">\afterenvbreak</span>}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\Eftable</span><span class="enscript-keyword">\Etable</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\Evtable</span><span class="enscript-keyword">\Etable</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\Eitemize</span><span class="enscript-keyword">\Etable</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\Eenumerate</span><span class="enscript-keyword">\Etable</span>

<span class="enscript-comment">% This is the counter used by @enumerate, which is really @itemize
</span>
<span class="enscript-keyword">\newcount</span> <span class="enscript-keyword">\itemno</span>

<span class="enscript-keyword">\envdef</span><span class="enscript-keyword">\itemize</span>{<span class="enscript-keyword">\parsearg</span><span class="enscript-keyword">\doitemize</span>}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\doitemize</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\aboveenvbreak</span>
  <span class="enscript-keyword">\itemmax</span>=<span class="enscript-keyword">\itemindent</span>
  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\itemmax</span> by -<span class="enscript-keyword">\itemmargin</span>
  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\leftskip</span> by <span class="enscript-keyword">\itemindent</span>
  <span class="enscript-keyword">\exdentamount</span>=<span class="enscript-keyword">\itemindent</span>
  <span class="enscript-keyword">\parindent</span>=0pt
  <span class="enscript-keyword">\parskip</span>=<span class="enscript-keyword">\smallskipamount</span>
  <span class="enscript-keyword">\ifdim</span><span class="enscript-keyword">\parskip</span>=0pt <span class="enscript-keyword">\parskip</span>=2pt <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\itemcontents</span>{#1}<span class="enscript-comment">%
</span>  <span class="enscript-comment">% @itemize with no arg is equivalent to @itemize @bullet.
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\itemcontents</span><span class="enscript-keyword">\empty</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\itemcontents</span>{<span class="enscript-keyword">\bullet</span>}<span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\item</span>=<span class="enscript-keyword">\itemizeitem</span>
}

<span class="enscript-comment">% Definition of @item while inside @itemize and @enumerate.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\itemizeitem</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\itemno</span> by 1  <span class="enscript-comment">% for enumerations
</span>  {<span class="enscript-keyword">\let</span><span class="enscript-keyword">\par</span>=<span class="enscript-keyword">\endgraf</span> <span class="enscript-keyword">\smallbreak</span>}<span class="enscript-comment">% reasonable place to break
</span>  {<span class="enscript-comment">%
</span>   <span class="enscript-comment">% If the document has an @itemize directly after a section title, a
</span>   <span class="enscript-comment">% \nobreak will be last on the list, and \sectionheading will have
</span>   <span class="enscript-comment">% done a \vskip-\parskip.  In that case, we don't want to zero
</span>   <span class="enscript-comment">% parskip, or the item text will crash with the heading.  On the
</span>   <span class="enscript-comment">% other hand, when there is normal text preceding the item (as there
</span>   <span class="enscript-comment">% usually is), we do want to zero parskip, or there would be too much
</span>   <span class="enscript-comment">% space.  In that case, we won't have a \nobreak before.  At least
</span>   <span class="enscript-comment">% that's the theory.
</span>   <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\lastpenalty</span>&lt;10000 <span class="enscript-keyword">\parskip</span>=0in <span class="enscript-keyword">\fi</span>
   <span class="enscript-keyword">\noindent</span>
   <span class="enscript-keyword">\hbox</span> to 0pt{<span class="enscript-keyword">\hss</span> <span class="enscript-keyword">\itemcontents</span> <span class="enscript-keyword">\kern</span><span class="enscript-keyword">\itemmargin</span>}<span class="enscript-comment">%
</span>   <span class="enscript-keyword">\vadjust</span>{<span class="enscript-keyword">\penalty</span> 1200}}<span class="enscript-comment">% not good to break after first line of item.
</span>  <span class="enscript-keyword">\flushcr</span>
}

<span class="enscript-comment">% \splitoff TOKENS\endmark defines \first to be the first token in
</span><span class="enscript-comment">% TOKENS, and \rest to be the remainder.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\splitoff</span>#1#2<span class="enscript-keyword">\endmark</span>{<span class="enscript-keyword">\def</span><span class="enscript-keyword">\first</span>{#1}<span class="enscript-keyword">\def</span><span class="enscript-keyword">\rest</span>{#2}}<span class="enscript-comment">%
</span>
<span class="enscript-comment">% Allow an optional argument of an uppercase letter, lowercase letter,
</span><span class="enscript-comment">% or number, to specify the first label in the enumerated list.  No
</span><span class="enscript-comment">% argument is the same as `1'.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\envparseargdef</span><span class="enscript-keyword">\enumerate</span>{<span class="enscript-keyword">\enumeratey</span> #1  <span class="enscript-keyword">\endenumeratey</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\enumeratey</span> #1 #2<span class="enscript-keyword">\endenumeratey</span>{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% If we were given no argument, pretend we were given `1'.
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\thearg</span>{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\thearg</span><span class="enscript-keyword">\empty</span> <span class="enscript-keyword">\def</span><span class="enscript-keyword">\thearg</span>{1}<span class="enscript-keyword">\fi</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Detect if the argument is a single token.  If so, it might be a
</span>  <span class="enscript-comment">% letter.  Otherwise, the only valid thing it can be is a number.
</span>  <span class="enscript-comment">% (We will always have one token, because of the test we just made.
</span>  <span class="enscript-comment">% This is a good thing, since \splitoff doesn't work given nothing at
</span>  <span class="enscript-comment">% all -- the first parameter is undelimited.)
</span>  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\splitoff</span><span class="enscript-keyword">\thearg</span><span class="enscript-keyword">\endmark</span>
  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\rest</span><span class="enscript-keyword">\empty</span>
    <span class="enscript-comment">% Only one token in the argument.  It could still be anything.
</span>    <span class="enscript-comment">% A ``lowercase letter'' is one whose \lccode is nonzero.
</span>    <span class="enscript-comment">% An ``uppercase letter'' is one whose \lccode is both nonzero, and
</span>    <span class="enscript-comment">%   not equal to itself.
</span>    <span class="enscript-comment">% Otherwise, we assume it's a number.
</span>    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% We need the \relax at the end of the \ifnum lines to stop TeX from
</span>    <span class="enscript-comment">% continuing to look for a &lt;number&gt;.
</span>    <span class="enscript-comment">%
</span>    <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\lccode</span><span class="enscript-keyword">\expandafter</span>`<span class="enscript-keyword">\thearg</span>=0<span class="enscript-keyword">\relax</span>
      <span class="enscript-keyword">\numericenumerate</span> <span class="enscript-comment">% a number (we hope)
</span>    <span class="enscript-keyword">\else</span>
      <span class="enscript-comment">% It's a letter.
</span>      <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\lccode</span><span class="enscript-keyword">\expandafter</span>`<span class="enscript-keyword">\thearg</span>=<span class="enscript-keyword">\expandafter</span>`<span class="enscript-keyword">\thearg</span><span class="enscript-keyword">\relax</span>
        <span class="enscript-keyword">\lowercaseenumerate</span> <span class="enscript-comment">% lowercase letter
</span>      <span class="enscript-keyword">\else</span>
        <span class="enscript-keyword">\uppercaseenumerate</span> <span class="enscript-comment">% uppercase letter
</span>      <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-comment">% Multiple tokens in the argument.  We hope it's a number.
</span>    <span class="enscript-keyword">\numericenumerate</span>
  <span class="enscript-keyword">\fi</span>
}

<span class="enscript-comment">% An @enumerate whose labels are integers.  The starting integer is
</span><span class="enscript-comment">% given in \thearg.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\numericenumerate</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\itemno</span> = <span class="enscript-keyword">\thearg</span>
  <span class="enscript-keyword">\startenumeration</span>{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\itemno</span>}<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% The starting (lowercase) letter is in \thearg.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\lowercaseenumerate</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\itemno</span> = <span class="enscript-keyword">\expandafter</span>`<span class="enscript-keyword">\thearg</span>
  <span class="enscript-keyword">\startenumeration</span>{<span class="enscript-comment">%
</span>    <span class="enscript-comment">% Be sure we're not beyond the end of the alphabet.
</span>    <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\itemno</span>=0
      <span class="enscript-keyword">\errmessage</span>{No more lowercase letters in @enumerate; get a bigger
                  alphabet}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\char</span><span class="enscript-keyword">\lccode</span><span class="enscript-keyword">\itemno</span>
  }<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% The starting (uppercase) letter is in \thearg.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\uppercaseenumerate</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\itemno</span> = <span class="enscript-keyword">\expandafter</span>`<span class="enscript-keyword">\thearg</span>
  <span class="enscript-keyword">\startenumeration</span>{<span class="enscript-comment">%
</span>    <span class="enscript-comment">% Be sure we're not beyond the end of the alphabet.
</span>    <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\itemno</span>=0
      <span class="enscript-keyword">\errmessage</span>{No more uppercase letters in @enumerate; get a bigger
                  alphabet}
    <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\char</span><span class="enscript-keyword">\uccode</span><span class="enscript-keyword">\itemno</span>
  }<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% Call \doitemize, adding a period to the first argument and supplying the
</span><span class="enscript-comment">% common last two arguments.  Also subtract one from the initial value in
</span><span class="enscript-comment">% \itemno, since @item increments \itemno.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\startenumeration</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\itemno</span> by -1
  <span class="enscript-keyword">\doitemize</span>{#1.}<span class="enscript-keyword">\flushcr</span>
}

<span class="enscript-comment">% @alphaenumerate and @capsenumerate are abbreviations for giving an arg
</span><span class="enscript-comment">% to @enumerate.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\alphaenumerate</span>{<span class="enscript-keyword">\enumerate</span>{a}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\capsenumerate</span>{<span class="enscript-keyword">\enumerate</span>{A}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\Ealphaenumerate</span>{<span class="enscript-keyword">\Eenumerate</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\Ecapsenumerate</span>{<span class="enscript-keyword">\Eenumerate</span>}


<span class="enscript-comment">% @multitable macros
</span><span class="enscript-comment">% Amy Hendrickson, 8/18/94, 3/6/96
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% @multitable ... @end multitable will make as many columns as desired.
</span><span class="enscript-comment">% Contents of each column will wrap at width given in preamble.  Width
</span><span class="enscript-comment">% can be specified either with sample text given in a template line,
</span><span class="enscript-comment">% or in percent of \hsize, the current width of text on page.
</span>
<span class="enscript-comment">% Table can continue over pages but will only break between lines.
</span>
<span class="enscript-comment">% To make preamble:
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% Either define widths of columns in terms of percent of \hsize:
</span><span class="enscript-comment">%   @multitable @columnfractions .25 .3 .45
</span><span class="enscript-comment">%   @item ...
</span><span class="enscript-comment">%
</span><span class="enscript-comment">%   Numbers following @columnfractions are the percent of the total
</span><span class="enscript-comment">%   current hsize to be used for each column. You may use as many
</span><span class="enscript-comment">%   columns as desired.
</span>

<span class="enscript-comment">% Or use a template:
</span><span class="enscript-comment">%   @multitable {Column 1 template} {Column 2 template} {Column 3 template}
</span><span class="enscript-comment">%   @item ...
</span><span class="enscript-comment">%   using the widest term desired in each column.
</span>
<span class="enscript-comment">% Each new table line starts with @item, each subsequent new column
</span><span class="enscript-comment">% starts with @tab. Empty columns may be produced by supplying @tab's
</span><span class="enscript-comment">% with nothing between them for as many times as empty columns are needed,
</span><span class="enscript-comment">% ie, @tab@tab@tab will produce two empty columns.
</span>
<span class="enscript-comment">% @item, @tab do not need to be on their own lines, but it will not hurt
</span><span class="enscript-comment">% if they are.
</span>
<span class="enscript-comment">% Sample multitable:
</span>
<span class="enscript-comment">%   @multitable {Column 1 template} {Column 2 template} {Column 3 template}
</span><span class="enscript-comment">%   @item first col stuff @tab second col stuff @tab third col
</span><span class="enscript-comment">%   @item
</span><span class="enscript-comment">%   first col stuff
</span><span class="enscript-comment">%   @tab
</span><span class="enscript-comment">%   second col stuff
</span><span class="enscript-comment">%   @tab
</span><span class="enscript-comment">%   third col
</span><span class="enscript-comment">%   @item first col stuff @tab second col stuff
</span><span class="enscript-comment">%   @tab Many paragraphs of text may be used in any column.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">%         They will wrap at the width determined by the template.
</span><span class="enscript-comment">%   @item@tab@tab This will be in third column.
</span><span class="enscript-comment">%   @end multitable
</span>
<span class="enscript-comment">% Default dimensions may be reset by user.
</span><span class="enscript-comment">% @multitableparskip is vertical space between paragraphs in table.
</span><span class="enscript-comment">% @multitableparindent is paragraph indent in table.
</span><span class="enscript-comment">% @multitablecolmargin is horizontal space to be left between columns.
</span><span class="enscript-comment">% @multitablelinespace is space to leave between table items, baseline
</span><span class="enscript-comment">%                                                            to baseline.
</span><span class="enscript-comment">%   0pt means it depends on current normal line spacing.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\newskip</span><span class="enscript-keyword">\multitableparskip</span>
<span class="enscript-keyword">\newskip</span><span class="enscript-keyword">\multitableparindent</span>
<span class="enscript-keyword">\newdimen</span><span class="enscript-keyword">\multitablecolspace</span>
<span class="enscript-keyword">\newskip</span><span class="enscript-keyword">\multitablelinespace</span>
<span class="enscript-keyword">\multitableparskip</span>=0pt
<span class="enscript-keyword">\multitableparindent</span>=6pt
<span class="enscript-keyword">\multitablecolspace</span>=12pt
<span class="enscript-keyword">\multitablelinespace</span>=0pt

<span class="enscript-comment">% Macros used to set up halign preamble:
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\endsetuptable</span><span class="enscript-keyword">\relax</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\xendsetuptable</span>{<span class="enscript-keyword">\endsetuptable</span>}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\columnfractions</span><span class="enscript-keyword">\relax</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\xcolumnfractions</span>{<span class="enscript-keyword">\columnfractions</span>}
<span class="enscript-keyword">\newif</span><span class="enscript-keyword">\ifsetpercent</span>

<span class="enscript-comment">% #1 is the @columnfraction, usually a decimal number like .5, but might
</span><span class="enscript-comment">% be just 1.  We just use it, whatever it is.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\pickupwholefraction</span>#1 {<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\colcount</span> by 1
  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\csname</span> col<span class="enscript-keyword">\the</span><span class="enscript-keyword">\colcount</span><span class="enscript-keyword">\endcsname</span>{#1<span class="enscript-keyword">\hsize</span>}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\setuptable</span>
}

<span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\colcount</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\setuptable</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\firstarg</span>{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\firstarg</span><span class="enscript-keyword">\xendsetuptable</span>
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\go</span> = <span class="enscript-keyword">\relax</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\firstarg</span><span class="enscript-keyword">\xcolumnfractions</span>
      <span class="enscript-keyword">\global</span><span class="enscript-keyword">\setpercenttrue</span>
    <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\ifsetpercent</span>
         <span class="enscript-keyword">\let</span><span class="enscript-keyword">\go</span><span class="enscript-keyword">\pickupwholefraction</span>
      <span class="enscript-keyword">\else</span>
         <span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\colcount</span> by 1
         <span class="enscript-keyword">\setbox</span>0=<span class="enscript-keyword">\hbox</span>{#1<span class="enscript-keyword">\unskip</span><span class="enscript-keyword">\space</span>}<span class="enscript-comment">% Add a normal word space as a
</span>                   <span class="enscript-comment">% separator; typically that is always in the input, anyway.
</span>         <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\csname</span> col<span class="enscript-keyword">\the</span><span class="enscript-keyword">\colcount</span><span class="enscript-keyword">\endcsname</span>{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\wd</span>0}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\go</span><span class="enscript-keyword">\pickupwholefraction</span>
      <span class="enscript-comment">% Put the argument back for the \pickupwholefraction call, so
</span>      <span class="enscript-comment">% we'll always have a period there to be parsed.
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\go</span>{<span class="enscript-keyword">\pickupwholefraction</span>#1}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\let</span><span class="enscript-keyword">\go</span> = <span class="enscript-keyword">\setuptable</span>
    <span class="enscript-keyword">\fi</span><span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\go</span>
}

<span class="enscript-comment">% multitable-only commands.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% @headitem starts a heading row, which we typeset in bold.
</span><span class="enscript-comment">% Assignments have to be global since we are inside the implicit group
</span><span class="enscript-comment">% of an alignment entry.  Note that \everycr resets \everytab.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\headitem</span>{<span class="enscript-keyword">\checkenv</span><span class="enscript-keyword">\multitable</span> <span class="enscript-keyword">\crcr</span> <span class="enscript-keyword">\global</span><span class="enscript-keyword">\everytab</span>={<span class="enscript-keyword">\bf</span>}<span class="enscript-keyword">\the</span><span class="enscript-keyword">\everytab</span>}<span class="enscript-comment">%
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% A \tab used to include \hskip1sp.  But then the space in a template
</span><span class="enscript-comment">% line is not enough.  That is bad.  So let's go back to just `&amp;' until
</span><span class="enscript-comment">% we encounter the problem it was intended to solve again.
</span><span class="enscript-comment">%					--karl, <a href="mailto:nathan@acm.org">nathan@acm.org</a>, 20apr99.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\tab</span>{<span class="enscript-keyword">\checkenv</span><span class="enscript-keyword">\multitable</span> &amp;<span class="enscript-keyword">\the</span><span class="enscript-keyword">\everytab</span>}<span class="enscript-comment">%
</span>
<span class="enscript-comment">% @multitable ... @end multitable definitions:
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\newtoks</span><span class="enscript-keyword">\everytab</span>  <span class="enscript-comment">% insert after every tab.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\envdef</span><span class="enscript-keyword">\multitable</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\vskip</span><span class="enscript-keyword">\parskip</span>
  <span class="enscript-keyword">\startsavinginserts</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% @item within a multitable starts a normal row.
</span>  <span class="enscript-comment">% We use \def instead of \let so that if one of the multitable entries
</span>  <span class="enscript-comment">% contains an @itemize, we don't choke on the \item (seen as \crcr aka
</span>  <span class="enscript-comment">% \endtemplate) expanding \doitemize.
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\item</span>{<span class="enscript-keyword">\crcr</span>}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\tolerance</span>=9500
  <span class="enscript-keyword">\hbadness</span>=9500
  <span class="enscript-keyword">\setmultitablespacing</span>
  <span class="enscript-keyword">\parskip</span>=<span class="enscript-keyword">\multitableparskip</span>
  <span class="enscript-keyword">\parindent</span>=<span class="enscript-keyword">\multitableparindent</span>
  <span class="enscript-keyword">\overfullrule</span>=0pt
  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\colcount</span>=0
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\everycr</span> = {<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\noalign</span>{<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\global</span><span class="enscript-keyword">\everytab</span>={}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\global</span><span class="enscript-keyword">\colcount</span>=0 <span class="enscript-comment">% Reset the column counter.
</span>      <span class="enscript-comment">% Check for saved footnotes, etc.
</span>      <span class="enscript-keyword">\checkinserts</span>
      <span class="enscript-comment">% Keeps underfull box messages off when table breaks over pages.
</span>      <span class="enscript-comment">%\filbreak
</span>	<span class="enscript-comment">% Maybe so, but it also creates really weird page breaks when the
</span>	<span class="enscript-comment">% table breaks over pages. Wouldn't \vfil be better?  Wait until the
</span>	<span class="enscript-comment">% problem manifests itself, so it can be fixed for real --karl.
</span>    }<span class="enscript-comment">%
</span>  }<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\parsearg</span><span class="enscript-keyword">\domultitable</span>
}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\domultitable</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% To parse everything between @multitable and @item:
</span>  <span class="enscript-keyword">\setuptable</span>#1 <span class="enscript-keyword">\endsetuptable</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% This preamble sets up a generic column definition, which will
</span>  <span class="enscript-comment">% be used as many times as user calls for columns.
</span>  <span class="enscript-comment">% \vtop will set a single line and will also let text wrap and
</span>  <span class="enscript-comment">% continue for many paragraphs if desired.
</span>  <span class="enscript-keyword">\halign</span><span class="enscript-keyword">\bgroup</span> &amp;<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\colcount</span> by 1
    <span class="enscript-keyword">\multistrut</span>
    <span class="enscript-keyword">\vtop</span>{<span class="enscript-comment">%
</span>      <span class="enscript-comment">% Use the current \colcount to find the correct column width:
</span>      <span class="enscript-keyword">\hsize</span>=<span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\csname</span> col<span class="enscript-keyword">\the</span><span class="enscript-keyword">\colcount</span><span class="enscript-keyword">\endcsname</span>
      <span class="enscript-comment">%
</span>      <span class="enscript-comment">% In order to keep entries from bumping into each other
</span>      <span class="enscript-comment">% we will add a \leftskip of \multitablecolspace to all columns after
</span>      <span class="enscript-comment">% the first one.
</span>      <span class="enscript-comment">%
</span>      <span class="enscript-comment">% If a template has been used, we will add \multitablecolspace
</span>      <span class="enscript-comment">% to the width of each template entry.
</span>      <span class="enscript-comment">%
</span>      <span class="enscript-comment">% If the user has set preamble in terms of percent of \hsize we will
</span>      <span class="enscript-comment">% use that dimension as the width of the column, and the \leftskip
</span>      <span class="enscript-comment">% will keep entries from bumping into each other.  Table will start at
</span>      <span class="enscript-comment">% left margin and final column will justify at right margin.
</span>      <span class="enscript-comment">%
</span>      <span class="enscript-comment">% Make sure we don't inherit \rightskip from the outer environment.
</span>      <span class="enscript-keyword">\rightskip</span>=0pt
      <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\colcount</span>=1
	<span class="enscript-comment">% The first column will be indented with the surrounding text.
</span>	<span class="enscript-keyword">\advance</span><span class="enscript-keyword">\hsize</span> by<span class="enscript-keyword">\leftskip</span>
      <span class="enscript-keyword">\else</span>
	<span class="enscript-keyword">\ifsetpercent</span> <span class="enscript-keyword">\else</span>
	  <span class="enscript-comment">% If user has not set preamble in terms of percent of \hsize
</span>	  <span class="enscript-comment">% we will advance \hsize by \multitablecolspace.
</span>	  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\hsize</span> by <span class="enscript-keyword">\multitablecolspace</span>
	<span class="enscript-keyword">\fi</span>
       <span class="enscript-comment">% In either case we will make \leftskip=\multitablecolspace:
</span>      <span class="enscript-keyword">\leftskip</span>=<span class="enscript-keyword">\multitablecolspace</span>
      <span class="enscript-keyword">\fi</span>
      <span class="enscript-comment">% Ignoring space at the beginning and end avoids an occasional spurious
</span>      <span class="enscript-comment">% blank line, when TeX decides to break the line at the space before the
</span>      <span class="enscript-comment">% box from the multistrut, so the strut ends up on a line by itself.
</span>      <span class="enscript-comment">% For example:
</span>      <span class="enscript-comment">% @multitable @columnfractions .11 .89
</span>      <span class="enscript-comment">% @item @code{#}
</span>      <span class="enscript-comment">% @tab Legal holiday which is valid in major parts of the whole country.
</span>      <span class="enscript-comment">% Is automatically provided with highlighting sequences respectively
</span>      <span class="enscript-comment">% marking characters.
</span>      <span class="enscript-keyword">\noindent</span><span class="enscript-keyword">\ignorespaces</span>##<span class="enscript-keyword">\unskip</span><span class="enscript-keyword">\multistrut</span>
    }<span class="enscript-keyword">\cr</span>
}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\Emultitable</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\crcr</span>
  <span class="enscript-keyword">\egroup</span> <span class="enscript-comment">% end the \halign
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\setpercentfalse</span>
}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\setmultitablespacing</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\multistrut</span>{<span class="enscript-keyword">\strut</span>}<span class="enscript-comment">% just use the standard line spacing
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Compute \multitablelinespace (if not defined by user) for use in
</span>  <span class="enscript-comment">% \multitableparskip calculation.  We used define \multistrut based on
</span>  <span class="enscript-comment">% this, but (ironically) that caused the spacing to be off.
</span>  <span class="enscript-comment">% See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100.
</span><span class="enscript-keyword">\ifdim</span><span class="enscript-keyword">\multitablelinespace</span>=0pt
<span class="enscript-keyword">\setbox</span>0=<span class="enscript-keyword">\vbox</span>{X}<span class="enscript-keyword">\global</span><span class="enscript-keyword">\multitablelinespace</span>=<span class="enscript-keyword">\the</span><span class="enscript-keyword">\baselineskip</span>
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\multitablelinespace</span> by-<span class="enscript-keyword">\ht</span>0
<span class="enscript-keyword">\fi</span>
<span class="enscript-comment">%% Test to see if parskip is larger than space between lines of
</span><span class="enscript-comment">%% table. If not, do nothing.
</span><span class="enscript-comment">%%        If so, set to same dimension as multitablelinespace.
</span><span class="enscript-keyword">\ifdim</span><span class="enscript-keyword">\multitableparskip</span>&gt;<span class="enscript-keyword">\multitablelinespace</span>
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\multitableparskip</span>=<span class="enscript-keyword">\multitablelinespace</span>
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\multitableparskip</span>-7pt <span class="enscript-comment">%% to keep parskip somewhat smaller
</span>                                      <span class="enscript-comment">%% than skip between lines in the table.
</span><span class="enscript-keyword">\fi</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\ifdim</span><span class="enscript-keyword">\multitableparskip</span>=0pt
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\multitableparskip</span>=<span class="enscript-keyword">\multitablelinespace</span>
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\multitableparskip</span>-7pt <span class="enscript-comment">%% to keep parskip somewhat smaller
</span>                                      <span class="enscript-comment">%% than skip between lines in the table.
</span><span class="enscript-keyword">\fi</span>}


<span class="enscript-keyword">\message</span>{conditionals,}

<span class="enscript-comment">% @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext,
</span><span class="enscript-comment">% @ifnotxml always succeed.  They currently do nothing; we don't
</span><span class="enscript-comment">% attempt to check whether the conditionals are properly nested.  But we
</span><span class="enscript-comment">% have to remember that they are conditionals, so that @end doesn't
</span><span class="enscript-comment">% attempt to close an environment group.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\makecond</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\csname</span> #1<span class="enscript-keyword">\endcsname</span> = <span class="enscript-keyword">\relax</span>
  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\csname</span> iscond.#1<span class="enscript-keyword">\endcsname</span> = 1
}
<span class="enscript-keyword">\makecond</span>{iftex}
<span class="enscript-keyword">\makecond</span>{ifnotdocbook}
<span class="enscript-keyword">\makecond</span>{ifnothtml}
<span class="enscript-keyword">\makecond</span>{ifnotinfo}
<span class="enscript-keyword">\makecond</span>{ifnotplaintext}
<span class="enscript-keyword">\makecond</span>{ifnotxml}

<span class="enscript-comment">% Ignore @ignore, @ifhtml, @ifinfo, and the like.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\direntry</span>{<span class="enscript-keyword">\doignore</span>{direntry}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\documentdescription</span>{<span class="enscript-keyword">\doignore</span>{documentdescription}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\docbook</span>{<span class="enscript-keyword">\doignore</span>{docbook}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\html</span>{<span class="enscript-keyword">\doignore</span>{html}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\ifdocbook</span>{<span class="enscript-keyword">\doignore</span>{ifdocbook}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\ifhtml</span>{<span class="enscript-keyword">\doignore</span>{ifhtml}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\ifinfo</span>{<span class="enscript-keyword">\doignore</span>{ifinfo}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\ifnottex</span>{<span class="enscript-keyword">\doignore</span>{ifnottex}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\ifplaintext</span>{<span class="enscript-keyword">\doignore</span>{ifplaintext}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\ifxml</span>{<span class="enscript-keyword">\doignore</span>{ifxml}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\ignore</span>{<span class="enscript-keyword">\doignore</span>{ignore}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\menu</span>{<span class="enscript-keyword">\doignore</span>{menu}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\xml</span>{<span class="enscript-keyword">\doignore</span>{xml}}

<span class="enscript-comment">% Ignore text until a line `@end #1', keeping track of nested conditionals.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% A count to remember the depth of nesting.
</span><span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\doignorecount</span>

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\doignore</span>#1{<span class="enscript-keyword">\begingroup</span>
  <span class="enscript-comment">% Scan in ``verbatim'' mode:
</span>  <span class="enscript-keyword">\obeylines</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\@</span> = <span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\{</span> = <span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\}</span> = <span class="enscript-keyword">\other</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Make sure that spaces turn into tokens that match what \doignoretext wants.
</span>  <span class="enscript-keyword">\spaceisspace</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Count number of #1's that we've seen.
</span>  <span class="enscript-keyword">\doignorecount</span> = 0
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Swallow text until we reach the matching `@end #1'.
</span>  <span class="enscript-keyword">\dodoignore</span>{#1}<span class="enscript-comment">%
</span>}

{ <span class="enscript-keyword">\catcode</span>`_=11 <span class="enscript-comment">% We want to use \_STOP_ which cannot appear in texinfo source.
</span>  <span class="enscript-keyword">\obeylines</span> <span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\dodoignore</span>#1{<span class="enscript-comment">%
</span>    <span class="enscript-comment">% #1 contains the command name as a string, e.g., `ifinfo'.
</span>    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Define a command to find the next `@end #1'.
</span>    <span class="enscript-keyword">\long</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\doignoretext</span>##1^^M@end #1{<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\doignoretextyyy</span>##1^^M@#1<span class="enscript-keyword">\_</span>STOP_}<span class="enscript-comment">%
</span>    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% And this command to find another #1 command, at the beginning of a
</span>    <span class="enscript-comment">% line.  (Otherwise, we would consider a line `@c @ifset', for
</span>    <span class="enscript-comment">% example, to count as an @ifset for nesting.)
</span>    <span class="enscript-keyword">\long</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\doignoretextyyy</span>##1^^M@#1##2<span class="enscript-keyword">\_</span>STOP_{<span class="enscript-keyword">\doignoreyyy</span>{##2}<span class="enscript-keyword">\_</span>STOP_}<span class="enscript-comment">%
</span>    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% And now expand that command.
</span>    <span class="enscript-keyword">\doignoretext</span> ^^M<span class="enscript-comment">%
</span>  }<span class="enscript-comment">%
</span>}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\doignoreyyy</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\temp</span>{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\temp</span><span class="enscript-keyword">\empty</span>			<span class="enscript-comment">% Nothing found.
</span>    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\next</span><span class="enscript-keyword">\doignoretextzzz</span>
  <span class="enscript-keyword">\else</span>					<span class="enscript-comment">% Found a nested condition, ...
</span>    <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\doignorecount</span> by 1
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\next</span><span class="enscript-keyword">\doignoretextyyy</span>		<span class="enscript-comment">% ..., look for another.
</span>    <span class="enscript-comment">% If we're here, #1 ends with ^^M\ifinfo (for example).
</span>  <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\next</span> #1<span class="enscript-comment">% the token \_STOP_ is present just after this macro.
</span>}

<span class="enscript-comment">% We have to swallow the remaining &quot;\_STOP_&quot;.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\doignoretextzzz</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\doignorecount</span> = 0	<span class="enscript-comment">% We have just found the outermost @end.
</span>    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\next</span><span class="enscript-keyword">\enddoignore</span>
  <span class="enscript-keyword">\else</span>				<span class="enscript-comment">% Still inside a nested condition.
</span>    <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\doignorecount</span> by -1
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\next</span><span class="enscript-keyword">\doignoretext</span>      <span class="enscript-comment">% Look for the next @end.
</span>  <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\next</span>
}

<span class="enscript-comment">% Finish off ignored text.
</span>{ <span class="enscript-keyword">\obeylines</span><span class="enscript-comment">%
</span>  <span class="enscript-comment">% Ignore anything after the last `@end #1'; this matters in verbatim
</span>  <span class="enscript-comment">% environments, where otherwise the newline after an ignored conditional
</span>  <span class="enscript-comment">% would result in a blank line in the output.
</span>  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\enddoignore</span>#1^^M{<span class="enscript-keyword">\endgroup</span><span class="enscript-keyword">\ignorespaces</span>}<span class="enscript-comment">%
</span>}


<span class="enscript-comment">% @set VAR sets the variable VAR to an empty value.
</span><span class="enscript-comment">% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% Since we want to separate VAR from REST-OF-LINE (which might be
</span><span class="enscript-comment">% empty), we can't just use \parsearg; we have to insert a space of our
</span><span class="enscript-comment">% own to delimit the rest of the line, and then take it out again if we
</span><span class="enscript-comment">% didn't need it.
</span><span class="enscript-comment">% We rely on the fact that \parsearg sets \catcode`\ =10.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\set</span>{<span class="enscript-keyword">\setyyy</span>#1 <span class="enscript-keyword">\endsetyyy</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\setyyy</span>#1 #2<span class="enscript-keyword">\endsetyyy</span>{<span class="enscript-comment">%
</span>  {<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\makevalueexpandable</span>
    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\temp</span>{#2}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\edef</span><span class="enscript-keyword">\next</span>{<span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\makecsname</span>{SET#1}}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\temp</span><span class="enscript-keyword">\empty</span>
      <span class="enscript-keyword">\next</span>{}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\setzzz</span>#2<span class="enscript-keyword">\endsetzzz</span>
    <span class="enscript-keyword">\fi</span>
  }<span class="enscript-comment">%
</span>}
<span class="enscript-comment">% Remove the trailing space \setxxx inserted.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\setzzz</span>#1 <span class="enscript-keyword">\endsetzzz</span>{<span class="enscript-keyword">\next</span>{#1}}

<span class="enscript-comment">% @clear VAR clears (i.e., unsets) the variable VAR.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\clear</span>{<span class="enscript-comment">%
</span>  {<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\makevalueexpandable</span>
    <span class="enscript-keyword">\global</span><span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\csname</span> SET#1<span class="enscript-keyword">\endcsname</span>=<span class="enscript-keyword">\relax</span>
  }<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% @value{foo} gets the text saved in variable foo.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\value</span>{<span class="enscript-keyword">\begingroup</span><span class="enscript-keyword">\makevalueexpandable</span><span class="enscript-keyword">\valuexxx</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\valuexxx</span>#1{<span class="enscript-keyword">\expandablevalue</span>{#1}<span class="enscript-keyword">\endgroup</span>}
{
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\-</span> = <span class="enscript-keyword">\active</span> <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\_</span> = <span class="enscript-keyword">\active</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\makevalueexpandable</span>{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\value</span> = <span class="enscript-keyword">\expandablevalue</span>
    <span class="enscript-comment">% We don't want these characters active, ...
</span>    <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\-</span>=<span class="enscript-keyword">\other</span> <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\_</span>=<span class="enscript-keyword">\other</span>
    <span class="enscript-comment">% ..., but we might end up with active ones in the argument if
</span>    <span class="enscript-comment">% we're called from @code, as @code{@value{foo-bar_}}, though.
</span>    <span class="enscript-comment">% So \let them to their normal equivalents.
</span>    <span class="enscript-keyword">\let</span>-<span class="enscript-keyword">\realdash</span> <span class="enscript-keyword">\let</span>_<span class="enscript-keyword">\normalunderscore</span>
  }
}

<span class="enscript-comment">% We have this subroutine so that we can handle at least some @value's
</span><span class="enscript-comment">% properly in indexes (we call \makevalueexpandable in \indexdummies).
</span><span class="enscript-comment">% The command has to be fully expandable (if the variable is set), since
</span><span class="enscript-comment">% the result winds up in the index file.  This means that if the
</span><span class="enscript-comment">% variable's value contains other Texinfo commands, it's almost certain
</span><span class="enscript-comment">% it will fail (although perhaps we could fix that with sufficient work
</span><span class="enscript-comment">% to do a one-level expansion on the result, instead of complete).
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\expandablevalue</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\csname</span> SET#1<span class="enscript-keyword">\endcsname</span><span class="enscript-keyword">\relax</span>
    {[No value for ``#1'']}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\message</span>{Variable `#1', used in @value, is not set.}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\csname</span> SET#1<span class="enscript-keyword">\endcsname</span>
  <span class="enscript-keyword">\fi</span>
}

<span class="enscript-comment">% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
</span><span class="enscript-comment">% with @set.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% To get special treatment of `@end ifset,' call \makeond and the redefine.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\makecond</span>{ifset}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\ifset</span>{<span class="enscript-keyword">\parsearg</span>{<span class="enscript-keyword">\doifset</span>{<span class="enscript-keyword">\let</span><span class="enscript-keyword">\next</span>=<span class="enscript-keyword">\ifsetfail</span>}}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\doifset</span>#1#2{<span class="enscript-comment">%
</span>  {<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\makevalueexpandable</span>
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\next</span>=<span class="enscript-keyword">\empty</span>
    <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\csname</span> SET#2<span class="enscript-keyword">\endcsname</span><span class="enscript-keyword">\relax</span>
      #1<span class="enscript-comment">% If not set, redefine \next.
</span>    <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\expandafter</span>
  }<span class="enscript-keyword">\next</span>
}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\ifsetfail</span>{<span class="enscript-keyword">\doignore</span>{ifset}}

<span class="enscript-comment">% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
</span><span class="enscript-comment">% defined with @set, or has been undefined with @clear.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% The `\else' inside the `\doifset' parameter is a trick to reuse the
</span><span class="enscript-comment">% above code: if the variable is not set, do nothing, if it is set,
</span><span class="enscript-comment">% then redefine \next to \ifclearfail.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\makecond</span>{ifclear}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\ifclear</span>{<span class="enscript-keyword">\parsearg</span>{<span class="enscript-keyword">\doifset</span>{<span class="enscript-keyword">\else</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\next</span>=<span class="enscript-keyword">\ifclearfail</span>}}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\ifclearfail</span>{<span class="enscript-keyword">\doignore</span>{ifclear}}

<span class="enscript-comment">% @dircategory CATEGORY  -- specify a category of the dir file
</span><span class="enscript-comment">% which this file should belong to.  Ignore this in TeX.
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\dircategory</span>=<span class="enscript-keyword">\comment</span>

<span class="enscript-comment">% @defininfoenclose.
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\definfoenclose</span>=<span class="enscript-keyword">\comment</span>


<span class="enscript-keyword">\message</span>{indexing,}
<span class="enscript-comment">% Index generation facilities
</span>
<span class="enscript-comment">% Define \newwrite to be identical to plain tex's \newwrite
</span><span class="enscript-comment">% except not \outer, so it can be used within macros and \if's.
</span><span class="enscript-keyword">\edef</span><span class="enscript-keyword">\newwrite</span>{<span class="enscript-keyword">\makecsname</span>{ptexnewwrite}}

<span class="enscript-comment">% \newindex {foo} defines an index named foo.
</span><span class="enscript-comment">% It automatically defines \fooindex such that
</span><span class="enscript-comment">% \fooindex ...rest of line... puts an entry in the index foo.
</span><span class="enscript-comment">% It also defines \fooindfile to be the number of the output channel for
</span><span class="enscript-comment">% the file that accumulates this index.  The file's extension is foo.
</span><span class="enscript-comment">% The name of an index should be no more than 2 characters long
</span><span class="enscript-comment">% for the sake of vms.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\newindex</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\iflinks</span>
    <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\newwrite</span> <span class="enscript-keyword">\csname</span>#1indfile<span class="enscript-keyword">\endcsname</span>
    <span class="enscript-keyword">\openout</span> <span class="enscript-keyword">\csname</span>#1indfile<span class="enscript-keyword">\endcsname</span> <span class="enscript-keyword">\jobname</span>.#1 <span class="enscript-comment">% Open the file
</span>  <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\csname</span>#1index<span class="enscript-keyword">\endcsname</span>{<span class="enscript-comment">%     % Define @#1index
</span>    <span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\doindex</span>{#1}}
}

<span class="enscript-comment">% @defindex foo  ==  \newindex{foo}
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\defindex</span>{<span class="enscript-keyword">\parsearg</span><span class="enscript-keyword">\newindex</span>}

<span class="enscript-comment">% Define @defcodeindex, like @defindex except put all entries in @code.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\defcodeindex</span>{<span class="enscript-keyword">\parsearg</span><span class="enscript-keyword">\newcodeindex</span>}
<span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\newcodeindex</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\iflinks</span>
    <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\newwrite</span> <span class="enscript-keyword">\csname</span>#1indfile<span class="enscript-keyword">\endcsname</span>
    <span class="enscript-keyword">\openout</span> <span class="enscript-keyword">\csname</span>#1indfile<span class="enscript-keyword">\endcsname</span> <span class="enscript-keyword">\jobname</span>.#1
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\csname</span>#1index<span class="enscript-keyword">\endcsname</span>{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\docodeindex</span>{#1}}<span class="enscript-comment">%
</span>}


<span class="enscript-comment">% @synindex foo bar    makes index foo feed into index bar.
</span><span class="enscript-comment">% Do this instead of @defindex foo if you don't want it as a separate index.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% @syncodeindex foo bar   similar, but put all entries made for index foo
</span><span class="enscript-comment">% inside @code.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\synindex</span>#1 #2 {<span class="enscript-keyword">\dosynindex</span><span class="enscript-keyword">\doindex</span>{#1}{#2}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\syncodeindex</span>#1 #2 {<span class="enscript-keyword">\dosynindex</span><span class="enscript-keyword">\docodeindex</span>{#1}{#2}}

<span class="enscript-comment">% #1 is \doindex or \docodeindex, #2 the index getting redefined (foo),
</span><span class="enscript-comment">% #3 the target index (bar).
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\dosynindex</span>#1#2#3{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% Only do \closeout if we haven't already done it, else we'll end up
</span>  <span class="enscript-comment">% closing the target index.
</span>  <span class="enscript-keyword">\expandafter</span> <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\csname</span> donesynindex#2<span class="enscript-keyword">\endcsname</span> <span class="enscript-keyword">\undefined</span>
    <span class="enscript-comment">% The \closeout helps reduce unnecessary open files; the limit on the
</span>    <span class="enscript-comment">% Acorn RISC OS is a mere 16 files.
</span>    <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\closeout</span><span class="enscript-keyword">\csname</span>#2indfile<span class="enscript-keyword">\endcsname</span>
    <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\csname</span><span class="enscript-keyword">\donesynindex</span>#2<span class="enscript-keyword">\endcsname</span> = 1
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-comment">% redefine \fooindfile:
</span>  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\temp</span><span class="enscript-keyword">\expandafter</span>=<span class="enscript-keyword">\csname</span>#3indfile<span class="enscript-keyword">\endcsname</span>
  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\csname</span>#2indfile<span class="enscript-keyword">\endcsname</span>=<span class="enscript-keyword">\temp</span>
  <span class="enscript-comment">% redefine \fooindex:
</span>  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\csname</span>#2index<span class="enscript-keyword">\endcsname</span>{<span class="enscript-keyword">\noexpand</span>#1{#3}}<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% Define \doindex, the driver for all \fooindex macros.
</span><span class="enscript-comment">% Argument #1 is generated by the calling \fooindex macro,
</span><span class="enscript-comment">%  and it is &quot;foo&quot;, the name of the index.
</span>
<span class="enscript-comment">% \doindex just uses \parsearg; it calls \doind for the actual work.
</span><span class="enscript-comment">% This is because \doind is more useful to call from other macros.
</span>
<span class="enscript-comment">% There is also \dosubind {index}{topic}{subtopic}
</span><span class="enscript-comment">% which makes an entry in a two-level index such as the operation index.
</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\doindex</span>#1{<span class="enscript-keyword">\edef</span><span class="enscript-keyword">\indexname</span>{#1}<span class="enscript-keyword">\parsearg</span><span class="enscript-keyword">\singleindexer</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\singleindexer</span> #1{<span class="enscript-keyword">\doind</span>{<span class="enscript-keyword">\indexname</span>}{#1}}

<span class="enscript-comment">% like the previous two, but they put @code around the argument.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\docodeindex</span>#1{<span class="enscript-keyword">\edef</span><span class="enscript-keyword">\indexname</span>{#1}<span class="enscript-keyword">\parsearg</span><span class="enscript-keyword">\singlecodeindexer</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\singlecodeindexer</span> #1{<span class="enscript-keyword">\doind</span>{<span class="enscript-keyword">\indexname</span>}{<span class="enscript-keyword">\code</span>{#1}}}

<span class="enscript-comment">% Take care of Texinfo commands that can appear in an index entry.
</span><span class="enscript-comment">% Since there are some commands we want to expand, and others we don't,
</span><span class="enscript-comment">% we have to laboriously prevent expansion for those that we don't.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\indexdummies</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\escapechar</span> = `<span class="enscript-keyword">\\</span>     <span class="enscript-comment">% use backslash in output files.
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\@</span>{@}<span class="enscript-comment">% change to @@ when we switch to @ as escape char in index files.
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\ </span>{<span class="enscript-keyword">\realbackslash</span><span class="enscript-keyword">\space</span> }<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Need these in case \tex is in effect and \{ is a \delimiter again.
</span>  <span class="enscript-comment">% But can't use \lbracecmd and \rbracecmd because texindex assumes
</span>  <span class="enscript-comment">% braces and backslashes are used only as delimiters.
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\{</span> = <span class="enscript-keyword">\mylbrace</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\}</span> = <span class="enscript-keyword">\myrbrace</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% I don't entirely understand this, but when an index entry is
</span>  <span class="enscript-comment">% generated from a macro call, the \endinput which \scanmacro inserts
</span>  <span class="enscript-comment">% causes processing to be prematurely terminated.  This is,
</span>  <span class="enscript-comment">% apparently, because \indexsorttmp is fully expanded, and \endinput
</span>  <span class="enscript-comment">% is an expandable command.  The redefinition below makes \endinput
</span>  <span class="enscript-comment">% disappear altogether for that purpose -- although logging shows that
</span>  <span class="enscript-comment">% processing continues to some further point.  On the other hand, it
</span>  <span class="enscript-comment">% seems \endinput does not hurt in the printed index arg, since that
</span>  <span class="enscript-comment">% is still getting written without apparent harm.
</span>  <span class="enscript-comment">% 
</span>  <span class="enscript-comment">% Sample source (mac-idx3.tex, reported by Graham Percival to
</span>  <span class="enscript-comment">% help-texinfo, 22may06):
</span>  <span class="enscript-comment">% @macro funindex {WORD}
</span>  <span class="enscript-comment">% @findex xyz
</span>  <span class="enscript-comment">% @end macro
</span>  <span class="enscript-comment">% ...
</span>  <span class="enscript-comment">% @funindex commtest
</span>  <span class="enscript-comment">% 
</span>  <span class="enscript-comment">% The above is not enough to reproduce the bug, but it gives the flavor.
</span>  <span class="enscript-comment">% 
</span>  <span class="enscript-comment">% Sample whatsit resulting:
</span>  <span class="enscript-comment">% .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}}
</span>  <span class="enscript-comment">% 
</span>  <span class="enscript-comment">% So:
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\endinput</span> = <span class="enscript-keyword">\empty</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Do the redefinitions.
</span>  <span class="enscript-keyword">\commondummies</span>
}

<span class="enscript-comment">% For the aux and toc files, @ is the escape character.  So we want to
</span><span class="enscript-comment">% redefine everything using @ as the escape character (instead of
</span><span class="enscript-comment">% \realbackslash, still used for index files).  When everything uses @,
</span><span class="enscript-comment">% this will be simpler.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\atdummies</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\@</span>{@@}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\ </span>{@ }<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\{</span> = <span class="enscript-keyword">\lbraceatcmd</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\}</span> = <span class="enscript-keyword">\rbraceatcmd</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Do the redefinitions.
</span>  <span class="enscript-keyword">\commondummies</span>
  <span class="enscript-keyword">\otherbackslash</span>
}

<span class="enscript-comment">% Called from \indexdummies and \atdummies.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\commondummies</span>{<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% \definedummyword defines \#1 as \string\#1\space, thus effectively
</span>  <span class="enscript-comment">% preventing its expansion.  This is used only for control% words,
</span>  <span class="enscript-comment">% not control letters, because the \space would be incorrect for
</span>  <span class="enscript-comment">% control characters, but is needed to separate the control word
</span>  <span class="enscript-comment">% from whatever follows.
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% For control letters, we have \definedummyletter, which omits the
</span>  <span class="enscript-comment">% space.
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% These can be used both for control words that take an argument and
</span>  <span class="enscript-comment">% those that do not.  If it is followed by {arg} in the input, then
</span>  <span class="enscript-comment">% that will dutifully get written to the index (or wherever).
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\definedummyword</span>  ##1{<span class="enscript-keyword">\def</span>##1{<span class="enscript-keyword">\string</span>##1<span class="enscript-keyword">\space</span>}}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\definedummyletter</span>##1{<span class="enscript-keyword">\def</span>##1{<span class="enscript-keyword">\string</span>##1}}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\definedummyaccent</span><span class="enscript-keyword">\definedummyletter</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\commondummiesnofonts</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\definedummyletter</span><span class="enscript-keyword">\_</span><span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Non-English letters.
</span>  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\AA</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\AE</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\L</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\OE</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\O</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\aa</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\ae</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\l</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\oe</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\o</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\ss</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\exclamdown</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\questiondown</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\ordf</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\ordm</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Although these internal commands shouldn't show up, sometimes they do.
</span>  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\bf</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\gtr</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\hat</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\less</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\sf</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\sl</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\tclose</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\tt</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\LaTeX</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\TeX</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Assorted special characters.
</span>  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\bullet</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\comma</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\copyright</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\registeredsymbol</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\dots</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\enddots</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\equiv</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\error</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\euro</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\expansion</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\minus</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\pounds</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\point</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\print</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\result</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\textdegree</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% We want to disable all macros so that they are not expanded by \write.
</span>  <span class="enscript-keyword">\macrolist</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\normalturnoffactive</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Handle some cases of @value -- where it does not contain any
</span>  <span class="enscript-comment">% (non-fully-expandable) commands.
</span>  <span class="enscript-keyword">\makevalueexpandable</span>
}

<span class="enscript-comment">% \commondummiesnofonts: common to \commondummies and \indexnofonts.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\commondummiesnofonts</span>{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% Control letters and accents.
</span>  <span class="enscript-keyword">\definedummyletter</span><span class="enscript-keyword">\!</span><span class="enscript-comment">%
</span>  <span class="enscript-keyword">\definedummyaccent</span><span class="enscript-keyword">\&quot;</span><span class="enscript-comment">%
</span>  <span class="enscript-keyword">\definedummyaccent</span><span class="enscript-keyword">\'</span><span class="enscript-comment">%
</span>  <span class="enscript-keyword">\definedummyletter</span><span class="enscript-keyword">\*</span><span class="enscript-comment">%
</span>  <span class="enscript-keyword">\definedummyaccent</span><span class="enscript-keyword">\,</span><span class="enscript-comment">%
</span>  <span class="enscript-keyword">\definedummyletter</span><span class="enscript-keyword">\.</span><span class="enscript-comment">%
</span>  <span class="enscript-keyword">\definedummyletter</span><span class="enscript-keyword">\/</span><span class="enscript-comment">%
</span>  <span class="enscript-keyword">\definedummyletter</span><span class="enscript-keyword">\:</span><span class="enscript-comment">%
</span>  <span class="enscript-keyword">\definedummyaccent</span><span class="enscript-keyword">\=</span><span class="enscript-comment">%
</span>  <span class="enscript-keyword">\definedummyletter</span><span class="enscript-keyword">\?</span><span class="enscript-comment">%
</span>  <span class="enscript-keyword">\definedummyaccent</span><span class="enscript-keyword">\^</span><span class="enscript-comment">%
</span>  <span class="enscript-keyword">\definedummyaccent</span><span class="enscript-keyword">\`</span><span class="enscript-comment">%
</span>  <span class="enscript-keyword">\definedummyaccent</span><span class="enscript-keyword">\~</span><span class="enscript-comment">%
</span>  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\u</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\v</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\H</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\dotaccent</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\ringaccent</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\tieaccent</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\ubaraccent</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\udotaccent</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\dotless</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Texinfo font commands.
</span>  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\b</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\i</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\r</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\sc</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\t</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Commands that take arguments.
</span>  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\acronym</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\cite</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\code</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\command</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\dfn</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\emph</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\env</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\file</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\kbd</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\key</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\math</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\option</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\pxref</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\ref</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\samp</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\strong</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\tie</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\uref</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\url</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\var</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\verb</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\w</span>
  <span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\xref</span>
}

<span class="enscript-comment">% \indexnofonts is used when outputting the strings to sort the index
</span><span class="enscript-comment">% by, and when constructing control sequence names.  It eliminates all
</span><span class="enscript-comment">% control sequences and just writes whatever the best ASCII sort string
</span><span class="enscript-comment">% would be for a given command (usually its argument).
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\indexnofonts</span>{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% Accent commands should become @asis.
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\definedummyaccent</span>##1{<span class="enscript-keyword">\let</span>##1<span class="enscript-keyword">\asis</span>}<span class="enscript-comment">%
</span>  <span class="enscript-comment">% We can just ignore other control letters.
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\definedummyletter</span>##1{<span class="enscript-keyword">\let</span>##1<span class="enscript-keyword">\empty</span>}<span class="enscript-comment">%
</span>  <span class="enscript-comment">% Hopefully, all control words can become @asis.
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\definedummyaccent</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\commondummiesnofonts</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Don't no-op \tt, since it isn't a user-level command
</span>  <span class="enscript-comment">% and is used in the definitions of the active chars like &lt;, &gt;, |, etc.
</span>  <span class="enscript-comment">% Likewise with the other plain tex font commands.
</span>  <span class="enscript-comment">%\let\tt=\asis
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\ </span>{ }<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\@</span>{@}<span class="enscript-comment">%
</span>  <span class="enscript-comment">% how to handle braces?
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\_</span>{<span class="enscript-keyword">\normalunderscore</span>}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Non-English letters.
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\AA</span>{AA}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\AE</span>{AE}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\L</span>{L}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\OE</span>{OE}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\O</span>{O}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\aa</span>{aa}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\ae</span>{ae}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\l</span>{l}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\oe</span>{oe}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\o</span>{o}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\ss</span>{ss}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\exclamdown</span>{!}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\questiondown</span>{?}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\ordf</span>{a}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\ordm</span>{o}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\LaTeX</span>{LaTeX}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\TeX</span>{TeX}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Assorted special characters.
</span>  <span class="enscript-comment">% (The following {} will end up in the sort string, but that's ok.)
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\bullet</span>{bullet}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\comma</span>{,}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\copyright</span>{copyright}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\registeredsymbol</span>{R}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\dots</span>{...}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\enddots</span>{...}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\equiv</span>{==}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\error</span>{error}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\euro</span>{euro}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\expansion</span>{==&gt;}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\minus</span>{-}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\pounds</span>{pounds}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\point</span>{.}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\print</span>{-|}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\result</span>{=&gt;}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\textdegree</span>{degrees}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% We need to get rid of all macros, leaving only the arguments (if present).
</span>  <span class="enscript-comment">% Of course this is not nearly correct, but it is the best we can do for now.
</span>  <span class="enscript-comment">% makeinfo does not expand macros in the argument to @deffn, which ends up
</span>  <span class="enscript-comment">% writing an index entry, and texindex isn't prepared for an index sort entry
</span>  <span class="enscript-comment">% that starts with \.
</span>  <span class="enscript-comment">% 
</span>  <span class="enscript-comment">% Since macro invocations are followed by braces, we can just redefine them
</span>  <span class="enscript-comment">% to take a single TeX argument.  The case of a macro invocation that
</span>  <span class="enscript-comment">% goes to end-of-line is not handled.
</span>  <span class="enscript-comment">% 
</span>  <span class="enscript-keyword">\macrolist</span>
}

<span class="enscript-keyword">\let</span><span class="enscript-keyword">\indexbackslash</span>=0  <span class="enscript-comment">%overridden during \printindex.
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\SETmarginindex</span>=<span class="enscript-keyword">\relax</span> <span class="enscript-comment">% put index entries in margin (undocumented)?
</span>
<span class="enscript-comment">% Most index entries go through here, but \dosubind is the general case.
</span><span class="enscript-comment">% #1 is the index name, #2 is the entry text.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\doind</span>#1#2{<span class="enscript-keyword">\dosubind</span>{#1}{#2}{}}

<span class="enscript-comment">% Workhorse for all \fooindexes.
</span><span class="enscript-comment">% #1 is name of index, #2 is stuff to put there, #3 is subentry --
</span><span class="enscript-comment">% empty if called from \doind, as we usually are (the main exception
</span><span class="enscript-comment">% is with most defuns, which call us directly).
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\dosubind</span>#1#2#3{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\iflinks</span>
  {<span class="enscript-comment">%
</span>    <span class="enscript-comment">% Store the main index entry text (including the third arg).
</span>    <span class="enscript-keyword">\toks</span>0 = {#2}<span class="enscript-comment">%
</span>    <span class="enscript-comment">% If third arg is present, precede it with a space.
</span>    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\thirdarg</span>{#3}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\thirdarg</span><span class="enscript-keyword">\empty</span> <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\toks</span>0 = <span class="enscript-keyword">\expandafter</span>{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\toks</span>0 <span class="enscript-keyword">\space</span> #3}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\fi</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-keyword">\edef</span><span class="enscript-keyword">\writeto</span>{<span class="enscript-keyword">\csname</span>#1indfile<span class="enscript-keyword">\endcsname</span>}<span class="enscript-comment">%
</span>    <span class="enscript-comment">%
</span>    <span class="enscript-keyword">\safewhatsit</span><span class="enscript-keyword">\dosubindwrite</span>
  }<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span>
}

<span class="enscript-comment">% Write the entry in \toks0 to the index file:
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\dosubindwrite</span>{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% Put the index entry in the margin if desired.
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\SETmarginindex</span><span class="enscript-keyword">\relax</span><span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\insert</span><span class="enscript-keyword">\margin</span>{<span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\vrule</span> height8pt depth3pt width0pt <span class="enscript-keyword">\the</span><span class="enscript-keyword">\toks</span>0}}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Remember, we are within a group.
</span>  <span class="enscript-keyword">\indexdummies</span> <span class="enscript-comment">% Must do this here, since \bf, etc expand at this stage
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\backslashcurfont</span>{<span class="enscript-keyword">\indexbackslash</span>}<span class="enscript-comment">% \indexbackslash isn't defined now
</span>      <span class="enscript-comment">% so it will be output as is; and it will print as backslash.
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Process the index entry with all font commands turned off, to
</span>  <span class="enscript-comment">% get the string to sort by.
</span>  {<span class="enscript-keyword">\indexnofonts</span>
   <span class="enscript-keyword">\edef</span><span class="enscript-keyword">\temp</span>{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\toks</span>0}<span class="enscript-comment">% need full expansion
</span>   <span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\indexsorttmp</span>{<span class="enscript-keyword">\temp</span>}<span class="enscript-comment">%
</span>  }<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Set up the complete index entry, with both the sort key and
</span>  <span class="enscript-comment">% the original text, including any font commands.  We write
</span>  <span class="enscript-comment">% three arguments to \entry to the .?? file (four in the
</span>  <span class="enscript-comment">% subentry case), texindex reduces to two when writing the .??s
</span>  <span class="enscript-comment">% sorted result.
</span>  <span class="enscript-keyword">\edef</span><span class="enscript-keyword">\temp</span>{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\write</span><span class="enscript-keyword">\writeto</span>{<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\string</span><span class="enscript-keyword">\entry</span>{<span class="enscript-keyword">\indexsorttmp</span>}{<span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\folio</span>}{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\toks</span>0}}<span class="enscript-comment">%
</span>  }<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\temp</span>
}

<span class="enscript-comment">% Take care of unwanted page breaks/skips around a whatsit:
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% If a skip is the last thing on the list now, preserve it
</span><span class="enscript-comment">% by backing up by \lastskip, doing the \write, then inserting
</span><span class="enscript-comment">% the skip again.  Otherwise, the whatsit generated by the
</span><span class="enscript-comment">% \write or \pdfdest will make \lastskip zero.  The result is that
</span><span class="enscript-comment">% sequences like this:
</span><span class="enscript-comment">% @end defun
</span><span class="enscript-comment">% @tindex whatever
</span><span class="enscript-comment">% @defun ...
</span><span class="enscript-comment">% will have extra space inserted, because the \medbreak in the
</span><span class="enscript-comment">% start of the @defun won't see the skip inserted by the @end of
</span><span class="enscript-comment">% the previous defun.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% But don't do any of this if we're not in vertical mode.  We
</span><span class="enscript-comment">% don't want to do a \vskip and prematurely end a paragraph.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% Avoid page breaks due to these extra skips, too.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% But wait, there is a catch there:
</span><span class="enscript-comment">% We'll have to check whether \lastskip is zero skip.  \ifdim is not
</span><span class="enscript-comment">% sufficient for this purpose, as it ignores stretch and shrink parts
</span><span class="enscript-comment">% of the skip.  The only way seems to be to check the textual
</span><span class="enscript-comment">% representation of the skip.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% The following is almost like \def\zeroskipmacro{0.0pt} except that
</span><span class="enscript-comment">% the ``p'' and ``t'' characters have catcode \other, not 11 (letter).
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\edef</span><span class="enscript-keyword">\zeroskipmacro</span>{<span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\csname</span> z@skip<span class="enscript-keyword">\endcsname</span>}
<span class="enscript-comment">%
</span><span class="enscript-keyword">\newskip</span><span class="enscript-keyword">\whatsitskip</span>
<span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\whatsitpenalty</span>
<span class="enscript-comment">%
</span><span class="enscript-comment">% ..., ready, GO:
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\safewhatsit</span>#1{<span class="enscript-comment">%
</span><span class="enscript-keyword">\ifhmode</span>
  #1<span class="enscript-comment">%
</span><span class="enscript-keyword">\else</span>
  <span class="enscript-comment">% \lastskip and \lastpenalty cannot both be nonzero simultaneously.
</span>  <span class="enscript-keyword">\whatsitskip</span> = <span class="enscript-keyword">\lastskip</span>
  <span class="enscript-keyword">\edef</span><span class="enscript-keyword">\lastskipmacro</span>{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\lastskip</span>}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\whatsitpenalty</span> = <span class="enscript-keyword">\lastpenalty</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% If \lastskip is nonzero, that means the last item was a
</span>  <span class="enscript-comment">% skip.  And since a skip is discardable, that means this
</span>  <span class="enscript-comment">% -\skip0 glue we're inserting is preceded by a
</span>  <span class="enscript-comment">% non-discardable item, therefore it is not a potential
</span>  <span class="enscript-comment">% breakpoint, therefore no \nobreak needed.
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\lastskipmacro</span><span class="enscript-keyword">\zeroskipmacro</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\vskip</span>-<span class="enscript-keyword">\whatsitskip</span>
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-comment">%
</span>  #1<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\lastskipmacro</span><span class="enscript-keyword">\zeroskipmacro</span>
    <span class="enscript-comment">% If \lastskip was zero, perhaps the last item was a penalty, and
</span>    <span class="enscript-comment">% perhaps it was &gt;=10000, e.g., a \nobreak.  In that case, we want
</span>    <span class="enscript-comment">% to re-insert the same penalty (values &gt;10000 are used for various
</span>    <span class="enscript-comment">% signals); since we just inserted a non-discardable item, any
</span>    <span class="enscript-comment">% following glue (such as a \parskip) would be a breakpoint.  For example:
</span>    <span class="enscript-comment">% 
</span>    <span class="enscript-comment">%   @deffn deffn-whatever
</span>    <span class="enscript-comment">%   @vindex index-whatever
</span>    <span class="enscript-comment">%   Description.
</span>    <span class="enscript-comment">% would allow a break between the index-whatever whatsit
</span>    <span class="enscript-comment">% and the &quot;Description.&quot; paragraph.
</span>    <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\whatsitpenalty</span>&gt;9999 <span class="enscript-keyword">\penalty</span><span class="enscript-keyword">\whatsitpenalty</span> <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-comment">% On the other hand, if we had a nonzero \lastskip,
</span>    <span class="enscript-comment">% this make-up glue would be preceded by a non-discardable item
</span>    <span class="enscript-comment">% (the whatsit from the \write), so we must insert a \nobreak.
</span>    <span class="enscript-keyword">\nobreak</span><span class="enscript-keyword">\vskip</span><span class="enscript-keyword">\whatsitskip</span>
  <span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\fi</span>
}

<span class="enscript-comment">% The index entry written in the file actually looks like
</span><span class="enscript-comment">%  \entry {sortstring}{page}{topic}
</span><span class="enscript-comment">% or
</span><span class="enscript-comment">%  \entry {sortstring}{page}{topic}{subtopic}
</span><span class="enscript-comment">% The texindex program reads in these files and writes files
</span><span class="enscript-comment">% containing these kinds of lines:
</span><span class="enscript-comment">%  \initial {c}
</span><span class="enscript-comment">%     before the first topic whose initial is c
</span><span class="enscript-comment">%  \entry {topic}{pagelist}
</span><span class="enscript-comment">%     for a topic that is used without subtopics
</span><span class="enscript-comment">%  \primary {topic}
</span><span class="enscript-comment">%     for the beginning of a topic that is used with subtopics
</span><span class="enscript-comment">%  \secondary {subtopic}{pagelist}
</span><span class="enscript-comment">%     for each subtopic.
</span>
<span class="enscript-comment">% Define the user-accessible indexing commands
</span><span class="enscript-comment">% @findex, @vindex, @kindex, @cindex.
</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\findex</span> {<span class="enscript-keyword">\fnindex</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\kindex</span> {<span class="enscript-keyword">\kyindex</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\cindex</span> {<span class="enscript-keyword">\cpindex</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\vindex</span> {<span class="enscript-keyword">\vrindex</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\tindex</span> {<span class="enscript-keyword">\tpindex</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\pindex</span> {<span class="enscript-keyword">\pgindex</span>}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\cindexsub</span> {<span class="enscript-keyword">\begingroup</span><span class="enscript-keyword">\obeylines</span><span class="enscript-keyword">\cindexsub</span>}
{<span class="enscript-keyword">\obeylines</span> <span class="enscript-comment">%
</span><span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\cindexsub</span> &quot;#1&quot; #2^^M{<span class="enscript-keyword">\endgroup</span> <span class="enscript-comment">%
</span><span class="enscript-keyword">\dosubind</span>{cp}{#2}{#1}}}

<span class="enscript-comment">% Define the macros used in formatting output of the sorted index material.
</span>
<span class="enscript-comment">% @printindex causes a particular index (the ??s file) to get printed.
</span><span class="enscript-comment">% It does not print any chapter heading (usually an @unnumbered).
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\printindex</span>{<span class="enscript-keyword">\begingroup</span>
  <span class="enscript-keyword">\dobreak</span> <span class="enscript-keyword">\chapheadingskip</span>{10000}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\smallfonts</span> <span class="enscript-keyword">\rm</span>
  <span class="enscript-keyword">\tolerance</span> = 9500
  <span class="enscript-keyword">\plainfrenchspacing</span>
  <span class="enscript-keyword">\everypar</span> = {}<span class="enscript-comment">% don't want the \kern\-parindent from indentation suppression.
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% See if the index file exists and is nonempty.
</span>  <span class="enscript-comment">% Change catcode of @ here so that if the index file contains
</span>  <span class="enscript-comment">% \initial {@}
</span>  <span class="enscript-comment">% as its first line, TeX doesn't complain about mismatched braces
</span>  <span class="enscript-comment">% (because it thinks @} is a control sequence).
</span>  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\@</span> = 11
  <span class="enscript-keyword">\openin</span> 1 <span class="enscript-keyword">\jobname</span>.#1s
  <span class="enscript-keyword">\ifeof</span> 1
    <span class="enscript-comment">% \enddoublecolumns gets confused if there is no text in the index,
</span>    <span class="enscript-comment">% and it loses the chapter title and the aux file entries for the
</span>    <span class="enscript-comment">% index.  The easiest way to prevent this problem is to make sure
</span>    <span class="enscript-comment">% there is some text.
</span>    <span class="enscript-keyword">\putwordIndexNonexistent</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% If the index file exists but is empty, then \openin leaves \ifeof
</span>    <span class="enscript-comment">% false.  We have to make TeX try to read something from the file, so
</span>    <span class="enscript-comment">% it can discover if there is anything in it.
</span>    <span class="enscript-keyword">\read</span> 1 to <span class="enscript-keyword">\temp</span>
    <span class="enscript-keyword">\ifeof</span> 1
      <span class="enscript-keyword">\putwordIndexIsEmpty</span>
    <span class="enscript-keyword">\else</span>
      <span class="enscript-comment">% Index files are almost Texinfo source, but we use \ as the escape
</span>      <span class="enscript-comment">% character.  It would be better to use @, but that's too big a change
</span>      <span class="enscript-comment">% to make right now.
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\indexbackslash</span>{<span class="enscript-keyword">\backslashcurfont</span>}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\\</span> = 0
      <span class="enscript-keyword">\escapechar</span> = `<span class="enscript-keyword">\\</span>
      <span class="enscript-keyword">\begindoublecolumns</span>
      <span class="enscript-keyword">\input</span> <span class="enscript-keyword">\jobname</span>.#1s
      <span class="enscript-keyword">\enddoublecolumns</span>
    <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\closein</span> 1
<span class="enscript-keyword">\endgroup</span>}

<span class="enscript-comment">% These macros are used by the sorted index file itself.
</span><span class="enscript-comment">% Change them to control the appearance of the index.
</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\initial</span>#1{{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% Some minor font changes for the special characters.
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tentt</span>=<span class="enscript-keyword">\sectt</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tt</span>=<span class="enscript-keyword">\sectt</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\sf</span>=<span class="enscript-keyword">\sectt</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Remove any glue we may have, we'll be inserting our own.
</span>  <span class="enscript-keyword">\removelastskip</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% We like breaks before the index initials, so insert a bonus.
</span>  <span class="enscript-keyword">\nobreak</span>
  <span class="enscript-keyword">\vskip</span> 0pt plus 3<span class="enscript-keyword">\baselineskip</span>
  <span class="enscript-keyword">\penalty</span> 0
  <span class="enscript-keyword">\vskip</span> 0pt plus -3<span class="enscript-keyword">\baselineskip</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Typeset the initial.  Making this add up to a whole number of
</span>  <span class="enscript-comment">% baselineskips increases the chance of the dots lining up from column
</span>  <span class="enscript-comment">% to column.  It still won't often be perfect, because of the stretch
</span>  <span class="enscript-comment">% we need before each entry, but it's better.
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% No shrink because it confuses \balancecolumns.
</span>  <span class="enscript-keyword">\vskip</span> 1.67<span class="enscript-keyword">\baselineskip</span> plus .5<span class="enscript-keyword">\baselineskip</span>
  <span class="enscript-keyword">\leftline</span>{<span class="enscript-keyword">\secbf</span> #1}<span class="enscript-comment">%
</span>  <span class="enscript-comment">% Do our best not to break after the initial.
</span>  <span class="enscript-keyword">\nobreak</span>
  <span class="enscript-keyword">\vskip</span> .33<span class="enscript-keyword">\baselineskip</span> plus .1<span class="enscript-keyword">\baselineskip</span>
}}

<span class="enscript-comment">% \entry typesets a paragraph consisting of the text (#1), dot leaders, and
</span><span class="enscript-comment">% then page number (#2) flushed to the right margin.  It is used for index
</span><span class="enscript-comment">% and table of contents entries.  The paragraph is indented by \leftskip.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% A straightforward implementation would start like this:
</span><span class="enscript-comment">%	\def\entry#1#2{...
</span><span class="enscript-comment">% But this frozes the catcodes in the argument, and can cause problems to
</span><span class="enscript-comment">% @code, which sets - active.  This problem was fixed by a kludge---
</span><span class="enscript-comment">% ``-'' was active throughout whole index, but this isn't really right.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% The right solution is to prevent \entry from swallowing the whole text.
</span><span class="enscript-comment">%                                 --kasal, 21nov03
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\entry</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\begingroup</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Start a new paragraph if necessary, so our assignments below can't
</span>    <span class="enscript-comment">% affect previous text.
</span>    <span class="enscript-keyword">\par</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Do not fill out the last line with white space.
</span>    <span class="enscript-keyword">\parfillskip</span> = 0in
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% No extra space above this paragraph.
</span>    <span class="enscript-keyword">\parskip</span> = 0in
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Do not prefer a separate line ending with a hyphen to fewer lines.
</span>    <span class="enscript-keyword">\finalhyphendemerits</span> = 0
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% \hangindent is only relevant when the entry text and page number
</span>    <span class="enscript-comment">% don't both fit on one line.  In that case, bob suggests starting the
</span>    <span class="enscript-comment">% dots pretty far over on the line.  Unfortunately, a large
</span>    <span class="enscript-comment">% indentation looks wrong when the entry text itself is broken across
</span>    <span class="enscript-comment">% lines.  So we use a small indentation and put up with long leaders.
</span>    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% \hangafter is reset to 1 (which is the value we want) at the start
</span>    <span class="enscript-comment">% of each paragraph, so we need not do anything with that.
</span>    <span class="enscript-keyword">\hangindent</span> = 2em
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% When the entry text needs to be broken, just fill out the first line
</span>    <span class="enscript-comment">% with blank space.
</span>    <span class="enscript-keyword">\rightskip</span> = 0pt plus1fil
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% A bit of stretch before each entry for the benefit of balancing
</span>    <span class="enscript-comment">% columns.
</span>    <span class="enscript-keyword">\vskip</span> 0pt plus1pt
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Swallow the left brace of the text (first parameter):
</span>    <span class="enscript-keyword">\afterassignment</span><span class="enscript-keyword">\doentry</span>
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\temp</span> =
}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\doentry</span>{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\bgroup</span> <span class="enscript-comment">% Instead of the swallowed brace.
</span>      <span class="enscript-keyword">\noindent</span>
      <span class="enscript-keyword">\aftergroup</span><span class="enscript-keyword">\finishentry</span>
      <span class="enscript-comment">% And now comes the text of the entry.
</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\finishentry</span>#1{<span class="enscript-comment">%
</span>    <span class="enscript-comment">% #1 is the page number.
</span>    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% The following is kludged to not output a line of dots in the index if
</span>    <span class="enscript-comment">% there are no page numbers.  The next person who breaks this will be
</span>    <span class="enscript-comment">% cursed by a Unix daemon.
</span>    <span class="enscript-keyword">\setbox</span><span class="enscript-keyword">\boxA</span> = <span class="enscript-keyword">\hbox</span>{#1}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\ifdim</span><span class="enscript-keyword">\wd</span><span class="enscript-keyword">\boxA</span> = 0pt
      <span class="enscript-keyword">\ </span><span class="enscript-comment">%
</span>    <span class="enscript-keyword">\else</span>
      <span class="enscript-comment">%
</span>      <span class="enscript-comment">% If we must, put the page number on a line of its own, and fill out
</span>      <span class="enscript-comment">% this line with blank space.  (The \hfil is overwhelmed with the
</span>      <span class="enscript-comment">% fill leaders glue in \indexdotfill if the page number does fit.)
</span>      <span class="enscript-keyword">\hfil</span><span class="enscript-keyword">\penalty</span>50
      <span class="enscript-keyword">\null</span><span class="enscript-keyword">\nobreak</span><span class="enscript-keyword">\indexdotfill</span> <span class="enscript-comment">% Have leaders before the page number.
</span>      <span class="enscript-comment">%
</span>      <span class="enscript-comment">% The `\ ' here is removed by the implicit \unskip that TeX does as
</span>      <span class="enscript-comment">% part of (the primitive) \par.  Without it, a spurious underfull
</span>      <span class="enscript-comment">% \hbox ensues.
</span>      <span class="enscript-keyword">\ifpdf</span>
	<span class="enscript-keyword">\pdfgettoks</span>#1.<span class="enscript-comment">%
</span>	<span class="enscript-keyword">\ </span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\toksA</span>
      <span class="enscript-keyword">\else</span>
	<span class="enscript-keyword">\ </span>#1<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\par</span>
  <span class="enscript-keyword">\endgroup</span>
}

<span class="enscript-comment">% Like plain.tex's \dotfill, except uses up at least 1 em.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\indexdotfill</span>{<span class="enscript-keyword">\cleaders</span>
  <span class="enscript-keyword">\hbox</span>{<span class="enscript-variable-name">$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$</span>}<span class="enscript-keyword">\hskip</span> 1em plus 1fill}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\primary</span> #1{<span class="enscript-keyword">\line</span>{#1<span class="enscript-keyword">\hfil</span>}}

<span class="enscript-keyword">\newskip</span><span class="enscript-keyword">\secondaryindent</span> <span class="enscript-keyword">\secondaryindent</span>=0.5cm
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\secondary</span>#1#2{{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\parfillskip</span>=0in
  <span class="enscript-keyword">\parskip</span>=0in
  <span class="enscript-keyword">\hangindent</span>=1in
  <span class="enscript-keyword">\hangafter</span>=1
  <span class="enscript-keyword">\noindent</span><span class="enscript-keyword">\hskip</span><span class="enscript-keyword">\secondaryindent</span><span class="enscript-keyword">\hbox</span>{#1}<span class="enscript-keyword">\indexdotfill</span>
  <span class="enscript-keyword">\ifpdf</span>
    <span class="enscript-keyword">\pdfgettoks</span>#2.<span class="enscript-keyword">\ </span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\toksA</span> <span class="enscript-comment">% The page number ends the paragraph.
</span>  <span class="enscript-keyword">\else</span>
    #2
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\par</span>
}}

<span class="enscript-comment">% Define two-column mode, which we use to typeset indexes.
</span><span class="enscript-comment">% Adapted from the TeXbook, page 416, which is to say,
</span><span class="enscript-comment">% the manmac.tex format used to print the TeXbook itself.
</span><span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\@</span>=11

<span class="enscript-keyword">\newbox</span><span class="enscript-keyword">\partialpage</span>
<span class="enscript-keyword">\newdimen</span><span class="enscript-keyword">\doublecolumnhsize</span>

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\begindoublecolumns</span>{<span class="enscript-keyword">\begingroup</span> <span class="enscript-comment">% ended by \enddoublecolumns
</span>  <span class="enscript-comment">% Grab any single-column material above us.
</span>  <span class="enscript-keyword">\output</span> = {<span class="enscript-comment">%
</span>    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Here is a possibility not foreseen in manmac: if we accumulate a
</span>    <span class="enscript-comment">% whole lot of material, we might end up calling this \output
</span>    <span class="enscript-comment">% routine twice in a row (see the doublecol-lose test, which is
</span>    <span class="enscript-comment">% essentially a couple of indexes with @setchapternewpage off).  In
</span>    <span class="enscript-comment">% that case we just ship out what is in \partialpage with the normal
</span>    <span class="enscript-comment">% output routine.  Generally, \partialpage will be empty when this
</span>    <span class="enscript-comment">% runs and this will be a no-op.  See the indexspread.tex test case.
</span>    <span class="enscript-keyword">\ifvoid</span><span class="enscript-keyword">\partialpage</span> <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\onepageout</span>{<span class="enscript-keyword">\pagecontents</span><span class="enscript-keyword">\partialpage</span>}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\fi</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-keyword">\global</span><span class="enscript-keyword">\setbox</span><span class="enscript-keyword">\partialpage</span> = <span class="enscript-keyword">\vbox</span>{<span class="enscript-comment">%
</span>      <span class="enscript-comment">% Unvbox the main output page.
</span>      <span class="enscript-keyword">\unvbox</span><span class="enscript-keyword">\PAGE</span>
      <span class="enscript-keyword">\kern</span>-<span class="enscript-keyword">\topskip</span> <span class="enscript-keyword">\kern</span><span class="enscript-keyword">\baselineskip</span>
    }<span class="enscript-comment">%
</span>  }<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\eject</span> <span class="enscript-comment">% run that output routine to set \partialpage
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Use the double-column output routine for subsequent pages.
</span>  <span class="enscript-keyword">\output</span> = {<span class="enscript-keyword">\doublecolumnout</span>}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Change the page size parameters.  We could do this once outside this
</span>  <span class="enscript-comment">% routine, in each of @smallbook, @afourpaper, and the default 8.5x11
</span>  <span class="enscript-comment">% format, but then we repeat the same computation.  Repeating a couple
</span>  <span class="enscript-comment">% of assignments once per index is clearly meaningless for the
</span>  <span class="enscript-comment">% execution time, so we may as well do it in one place.
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% First we halve the line length, less a little for the gutter between
</span>  <span class="enscript-comment">% the columns.  We compute the gutter based on the line length, so it
</span>  <span class="enscript-comment">% changes automatically with the paper format.  The magic constant
</span>  <span class="enscript-comment">% below is chosen so that the gutter has the same value (well, +-&lt;1pt)
</span>  <span class="enscript-comment">% as it did when we hard-coded it.
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% We put the result in a separate register, \doublecolumhsize, so we
</span>  <span class="enscript-comment">% can restore it in \pagesofar, after \hsize itself has (potentially)
</span>  <span class="enscript-comment">% been clobbered.
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\doublecolumnhsize</span> = <span class="enscript-keyword">\hsize</span>
    <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\doublecolumnhsize</span> by -.04154<span class="enscript-keyword">\hsize</span>
    <span class="enscript-keyword">\divide</span><span class="enscript-keyword">\doublecolumnhsize</span> by 2
  <span class="enscript-keyword">\hsize</span> = <span class="enscript-keyword">\doublecolumnhsize</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Double the \vsize as well.  (We don't need a separate register here,
</span>  <span class="enscript-comment">% since nobody clobbers \vsize.)
</span>  <span class="enscript-keyword">\vsize</span> = 2<span class="enscript-keyword">\vsize</span>
}

<span class="enscript-comment">% The double-column output routine for all double-column pages except
</span><span class="enscript-comment">% the last.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\doublecolumnout</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\splittopskip</span>=<span class="enscript-keyword">\topskip</span> <span class="enscript-keyword">\splitmaxdepth</span>=<span class="enscript-keyword">\maxdepth</span>
  <span class="enscript-comment">% Get the available space for the double columns -- the normal
</span>  <span class="enscript-comment">% (undoubled) page height minus any material left over from the
</span>  <span class="enscript-comment">% previous page.
</span>  <span class="enscript-keyword">\dimen</span>@ = <span class="enscript-keyword">\vsize</span>
  <span class="enscript-keyword">\divide</span><span class="enscript-keyword">\dimen</span>@ by 2
  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\dimen</span>@ by -<span class="enscript-keyword">\ht</span><span class="enscript-keyword">\partialpage</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% box0 will be the left-hand column, box2 the right.
</span>  <span class="enscript-keyword">\setbox</span>0=<span class="enscript-keyword">\vsplit</span>255 to<span class="enscript-keyword">\dimen</span>@ <span class="enscript-keyword">\setbox</span>2=<span class="enscript-keyword">\vsplit</span>255 to<span class="enscript-keyword">\dimen</span>@
  <span class="enscript-keyword">\onepageout</span><span class="enscript-keyword">\pagesofar</span>
  <span class="enscript-keyword">\unvbox</span>255
  <span class="enscript-keyword">\penalty</span><span class="enscript-keyword">\outputpenalty</span>
}
<span class="enscript-comment">%
</span><span class="enscript-comment">% Re-output the contents of the output page -- any previous material,
</span><span class="enscript-comment">% followed by the two boxes we just split, in box0 and box2.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\pagesofar</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\unvbox</span><span class="enscript-keyword">\partialpage</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\hsize</span> = <span class="enscript-keyword">\doublecolumnhsize</span>
  <span class="enscript-keyword">\wd</span>0=<span class="enscript-keyword">\hsize</span> <span class="enscript-keyword">\wd</span>2=<span class="enscript-keyword">\hsize</span>
  <span class="enscript-keyword">\hbox</span> to<span class="enscript-keyword">\pagewidth</span>{<span class="enscript-keyword">\box</span>0<span class="enscript-keyword">\hfil</span><span class="enscript-keyword">\box</span>2}<span class="enscript-comment">%
</span>}
<span class="enscript-comment">%
</span><span class="enscript-comment">% All done with double columns.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\enddoublecolumns</span>{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% The following penalty ensures that the page builder is exercised
</span>  <span class="enscript-comment">% _before_ we change the output routine.  This is necessary in the
</span>  <span class="enscript-comment">% following situation:
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% The last section of the index consists only of a single entry.
</span>  <span class="enscript-comment">% Before this section, \pagetotal is less than \pagegoal, so no
</span>  <span class="enscript-comment">% break occurs before the last section starts.  However, the last
</span>  <span class="enscript-comment">% section, consisting of \initial and the single \entry, does not
</span>  <span class="enscript-comment">% fit on the page and has to be broken off.  Without the following
</span>  <span class="enscript-comment">% penalty the page builder will not be exercised until \eject
</span>  <span class="enscript-comment">% below, and by that time we'll already have changed the output
</span>  <span class="enscript-comment">% routine to the \balancecolumns version, so the next-to-last
</span>  <span class="enscript-comment">% double-column page will be processed with \balancecolumns, which
</span>  <span class="enscript-comment">% is wrong:  The two columns will go to the main vertical list, with
</span>  <span class="enscript-comment">% the broken-off section in the recent contributions.  As soon as
</span>  <span class="enscript-comment">% the output routine finishes, TeX starts reconsidering the page
</span>  <span class="enscript-comment">% break.  The two columns and the broken-off section both fit on the
</span>  <span class="enscript-comment">% page, because the two columns now take up only half of the page
</span>  <span class="enscript-comment">% goal.  When TeX sees \eject from below which follows the final
</span>  <span class="enscript-comment">% section, it invokes the new output routine that we've set after
</span>  <span class="enscript-comment">% \balancecolumns below; \onepageout will try to fit the two columns
</span>  <span class="enscript-comment">% and the final section into the vbox of \pageheight (see
</span>  <span class="enscript-comment">% \pagebody), causing an overfull box.
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Note that glue won't work here, because glue does not exercise the
</span>  <span class="enscript-comment">% page builder, unlike penalties (see The TeXbook, pp. 280-281).
</span>  <span class="enscript-keyword">\penalty</span>0
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\output</span> = {<span class="enscript-comment">%
</span>    <span class="enscript-comment">% Split the last of the double-column material.  Leave it on the
</span>    <span class="enscript-comment">% current page, no automatic page break.
</span>    <span class="enscript-keyword">\balancecolumns</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% If we end up splitting too much material for the current page,
</span>    <span class="enscript-comment">% though, there will be another page break right after this \output
</span>    <span class="enscript-comment">% invocation ends.  Having called \balancecolumns once, we do not
</span>    <span class="enscript-comment">% want to call it again.  Therefore, reset \output to its normal
</span>    <span class="enscript-comment">% definition right away.  (We hope \balancecolumns will never be
</span>    <span class="enscript-comment">% called on to balance too much material, but if it is, this makes
</span>    <span class="enscript-comment">% the output somewhat more palatable.)
</span>    <span class="enscript-keyword">\global</span><span class="enscript-keyword">\output</span> = {<span class="enscript-keyword">\onepageout</span>{<span class="enscript-keyword">\pagecontents</span><span class="enscript-keyword">\PAGE</span>}}<span class="enscript-comment">%
</span>  }<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\eject</span>
  <span class="enscript-keyword">\endgroup</span> <span class="enscript-comment">% started in \begindoublecolumns
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% \pagegoal was set to the doubled \vsize above, since we restarted
</span>  <span class="enscript-comment">% the current page.  We're now back to normal single-column
</span>  <span class="enscript-comment">% typesetting, so reset \pagegoal to the normal \vsize (after the
</span>  <span class="enscript-comment">% \endgroup where \vsize got restored).
</span>  <span class="enscript-keyword">\pagegoal</span> = <span class="enscript-keyword">\vsize</span>
}
<span class="enscript-comment">%
</span><span class="enscript-comment">% Called at the end of the double column material.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\balancecolumns</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\setbox</span>0 = <span class="enscript-keyword">\vbox</span>{<span class="enscript-keyword">\unvbox</span>255}<span class="enscript-comment">% like \box255 but more efficient, see p.120.
</span>  <span class="enscript-keyword">\dimen</span>@ = <span class="enscript-keyword">\ht</span>0
  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\dimen</span>@ by <span class="enscript-keyword">\topskip</span>
  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\dimen</span>@ by-<span class="enscript-keyword">\baselineskip</span>
  <span class="enscript-keyword">\divide</span><span class="enscript-keyword">\dimen</span>@ by 2 <span class="enscript-comment">% target to split to
</span>  <span class="enscript-comment">%debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}%
</span>  <span class="enscript-keyword">\splittopskip</span> = <span class="enscript-keyword">\topskip</span>
  <span class="enscript-comment">% Loop until we get a decent breakpoint.
</span>  {<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\vbadness</span> = 10000
    <span class="enscript-keyword">\loop</span>
      <span class="enscript-keyword">\global</span><span class="enscript-keyword">\setbox</span>3 = <span class="enscript-keyword">\copy</span>0
      <span class="enscript-keyword">\global</span><span class="enscript-keyword">\setbox</span>1 = <span class="enscript-keyword">\vsplit</span>3 to <span class="enscript-keyword">\dimen</span>@
    <span class="enscript-keyword">\ifdim</span><span class="enscript-keyword">\ht</span>3&gt;<span class="enscript-keyword">\dimen</span>@
      <span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\dimen</span>@ by 1pt
    <span class="enscript-keyword">\repeat</span>
  }<span class="enscript-comment">%
</span>  <span class="enscript-comment">%debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}%
</span>  <span class="enscript-keyword">\setbox</span>0=<span class="enscript-keyword">\vbox</span> to<span class="enscript-keyword">\dimen</span>@{<span class="enscript-keyword">\unvbox</span>1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\setbox</span>2=<span class="enscript-keyword">\vbox</span> to<span class="enscript-keyword">\dimen</span>@{<span class="enscript-keyword">\unvbox</span>3}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\pagesofar</span>
}
<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\@</span> = <span class="enscript-keyword">\other</span>


<span class="enscript-keyword">\message</span>{sectioning,}
<span class="enscript-comment">% Chapters, sections, etc.
</span>
<span class="enscript-comment">% \unnumberedno is an oxymoron, of course.  But we count the unnumbered
</span><span class="enscript-comment">% sections so that we can refer to them unambiguously in the pdf
</span><span class="enscript-comment">% outlines by their &quot;section number&quot;.  We avoid collisions with chapter
</span><span class="enscript-comment">% numbers by starting them at 10000.  (If a document ever has 10000
</span><span class="enscript-comment">% chapters, we're in trouble anyway, I'm sure.)
</span><span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\unnumberedno</span> <span class="enscript-keyword">\unnumberedno</span> = 10000
<span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\chapno</span>
<span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\secno</span>        <span class="enscript-keyword">\secno</span>=0
<span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\subsecno</span>     <span class="enscript-keyword">\subsecno</span>=0
<span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\subsubsecno</span>  <span class="enscript-keyword">\subsubsecno</span>=0

<span class="enscript-comment">% This counter is funny since it counts through charcodes of letters A, B, ...
</span><span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\appendixno</span>  <span class="enscript-keyword">\appendixno</span> = `<span class="enscript-keyword">\@</span>
<span class="enscript-comment">%
</span><span class="enscript-comment">% \def\appendixletter{\char\the\appendixno}
</span><span class="enscript-comment">% We do the following ugly conditional instead of the above simple
</span><span class="enscript-comment">% construct for the sake of pdftex, which needs the actual
</span><span class="enscript-comment">% letter in the expansion, not just typeset.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\appendixletter</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\appendixno</span>=`A A<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\appendixno</span>=`B B<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\appendixno</span>=`C C<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\appendixno</span>=`D D<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\appendixno</span>=`E E<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\appendixno</span>=`F F<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\appendixno</span>=`G G<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\appendixno</span>=`H H<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\appendixno</span>=`I I<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\appendixno</span>=`J J<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\appendixno</span>=`K K<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\appendixno</span>=`L L<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\appendixno</span>=`M M<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\appendixno</span>=`N N<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\appendixno</span>=`O O<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\appendixno</span>=`P P<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\appendixno</span>=`Q Q<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\appendixno</span>=`R R<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\appendixno</span>=`S S<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\appendixno</span>=`T T<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\appendixno</span>=`U U<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\appendixno</span>=`V V<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\appendixno</span>=`W W<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\appendixno</span>=`X X<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\appendixno</span>=`Y Y<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\appendixno</span>=`Z Z<span class="enscript-comment">%
</span>  <span class="enscript-comment">% The \the is necessary, despite appearances, because \appendixletter is
</span>  <span class="enscript-comment">% expanded while writing the .toc file.  \char\appendixno is not
</span>  <span class="enscript-comment">% expandable, thus it is written literally, thus all appendixes come out
</span>  <span class="enscript-comment">% with the same letter (or @) in the toc without it.
</span>  <span class="enscript-keyword">\else</span><span class="enscript-keyword">\char</span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\appendixno</span>
  <span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span>}

<span class="enscript-comment">% Each @chapter defines this as the name of the chapter.
</span><span class="enscript-comment">% page headings and footings can use it.  @section does likewise.
</span><span class="enscript-comment">% However, they are not reliable, because we don't use marks.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\thischapter</span>{}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\thissection</span>{}

<span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\absseclevel</span> <span class="enscript-comment">% used to calculate proper heading level
</span><span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\secbase</span><span class="enscript-keyword">\secbase</span>=0 <span class="enscript-comment">% @raisesections/@lowersections modify this count
</span>
<span class="enscript-comment">% @raisesections: treat @section as chapter, @subsection as section, etc.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\raisesections</span>{<span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\secbase</span> by -1}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\up</span>=<span class="enscript-keyword">\raisesections</span> <span class="enscript-comment">% original BFox name
</span>
<span class="enscript-comment">% @lowersections: treat @chapter as section, @section as subsection, etc.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\lowersections</span>{<span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\secbase</span> by 1}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\down</span>=<span class="enscript-keyword">\lowersections</span> <span class="enscript-comment">% original BFox name
</span>
<span class="enscript-comment">% we only have subsub.
</span><span class="enscript-keyword">\chardef</span><span class="enscript-keyword">\maxseclevel</span> = 3
<span class="enscript-comment">%
</span><span class="enscript-comment">% A numbered section within an unnumbered changes to unnumbered too.
</span><span class="enscript-comment">% To achive this, remember the &quot;biggest&quot; unnum. sec. we are currently in:
</span><span class="enscript-keyword">\chardef</span><span class="enscript-keyword">\unmlevel</span> = <span class="enscript-keyword">\maxseclevel</span>
<span class="enscript-comment">%
</span><span class="enscript-comment">% Trace whether the current chapter is an appendix or not:
</span><span class="enscript-comment">% \chapheadtype is &quot;N&quot; or &quot;A&quot;, unnumbered chapters are ignored.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\chapheadtype</span>{N}

<span class="enscript-comment">% Choose a heading macro
</span><span class="enscript-comment">% #1 is heading type
</span><span class="enscript-comment">% #2 is heading level
</span><span class="enscript-comment">% #3 is text for heading
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\genhead</span>#1#2#3{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% Compute the abs. sec. level:
</span>  <span class="enscript-keyword">\absseclevel</span>=#2
  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\absseclevel</span> by <span class="enscript-keyword">\secbase</span>
  <span class="enscript-comment">% Make sure \absseclevel doesn't fall outside the range:
</span>  <span class="enscript-keyword">\ifnum</span> <span class="enscript-keyword">\absseclevel</span> &lt; 0
    <span class="enscript-keyword">\absseclevel</span> = 0
  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\ifnum</span> <span class="enscript-keyword">\absseclevel</span> &gt; 3
      <span class="enscript-keyword">\absseclevel</span> = 3
    <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-comment">% The heading type:
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\headtype</span>{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\if</span> <span class="enscript-keyword">\headtype</span> U<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\ifnum</span> <span class="enscript-keyword">\absseclevel</span> &lt; <span class="enscript-keyword">\unmlevel</span>
      <span class="enscript-keyword">\chardef</span><span class="enscript-keyword">\unmlevel</span> = <span class="enscript-keyword">\absseclevel</span>
    <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-comment">% Check for appendix sections:
</span>    <span class="enscript-keyword">\ifnum</span> <span class="enscript-keyword">\absseclevel</span> = 0
      <span class="enscript-keyword">\edef</span><span class="enscript-keyword">\chapheadtype</span>{<span class="enscript-keyword">\headtype</span>}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\if</span> <span class="enscript-keyword">\headtype</span> A<span class="enscript-keyword">\if</span> <span class="enscript-keyword">\chapheadtype</span> N<span class="enscript-comment">%
</span>	<span class="enscript-keyword">\errmessage</span>{@appendix... within a non-appendix chapter}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\fi</span>
    <span class="enscript-comment">% Check for numbered within unnumbered:
</span>    <span class="enscript-keyword">\ifnum</span> <span class="enscript-keyword">\absseclevel</span> &gt; <span class="enscript-keyword">\unmlevel</span>
      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\headtype</span>{U}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\chardef</span><span class="enscript-keyword">\unmlevel</span> = 3
    <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-comment">% Now print the heading:
</span>  <span class="enscript-keyword">\if</span> <span class="enscript-keyword">\headtype</span> U<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\ifcase</span><span class="enscript-keyword">\absseclevel</span>
	<span class="enscript-keyword">\unnumberedzzz</span>{#3}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\or</span> <span class="enscript-keyword">\unnumberedseczzz</span>{#3}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\or</span> <span class="enscript-keyword">\unnumberedsubseczzz</span>{#3}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\or</span> <span class="enscript-keyword">\unnumberedsubsubseczzz</span>{#3}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\if</span> <span class="enscript-keyword">\headtype</span> A<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\ifcase</span><span class="enscript-keyword">\absseclevel</span>
	  <span class="enscript-keyword">\appendixzzz</span>{#3}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\or</span> <span class="enscript-keyword">\appendixsectionzzz</span>{#3}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\or</span> <span class="enscript-keyword">\appendixsubseczzz</span>{#3}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\or</span> <span class="enscript-keyword">\appendixsubsubseczzz</span>{#3}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\ifcase</span><span class="enscript-keyword">\absseclevel</span>
	  <span class="enscript-keyword">\chapterzzz</span>{#3}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\or</span> <span class="enscript-keyword">\seczzz</span>{#3}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\or</span> <span class="enscript-keyword">\numberedsubseczzz</span>{#3}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\or</span> <span class="enscript-keyword">\numberedsubsubseczzz</span>{#3}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\suppressfirstparagraphindent</span>
}

<span class="enscript-comment">% an interface:
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\numhead</span>{<span class="enscript-keyword">\genhead</span> N}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\apphead</span>{<span class="enscript-keyword">\genhead</span> A}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\unnmhead</span>{<span class="enscript-keyword">\genhead</span> U}

<span class="enscript-comment">% @chapter, @appendix, @unnumbered.  Increment top-level counter, reset
</span><span class="enscript-comment">% all lower-level sectioning counters to zero.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% Also set \chaplevelprefix, which we prepend to @float sequence numbers
</span><span class="enscript-comment">% (e.g., figures), q.v.  By default (before any chapter), that is empty.
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\chaplevelprefix</span> = <span class="enscript-keyword">\empty</span>
<span class="enscript-comment">%
</span><span class="enscript-keyword">\outer</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\chapter</span>{<span class="enscript-keyword">\numhead</span>0{#1}} <span class="enscript-comment">% normally numhead0 calls chapterzzz
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\chapterzzz</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% section resetting is \global in case the chapter is in a group, such
</span>  <span class="enscript-comment">% as an @include file.
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\secno</span>=0 <span class="enscript-keyword">\global</span><span class="enscript-keyword">\subsecno</span>=0 <span class="enscript-keyword">\global</span><span class="enscript-keyword">\subsubsecno</span>=0
    <span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\chapno</span> by 1
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Used for \float.
</span>  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\chaplevelprefix</span>{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\chapno</span>.}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\resetallfloatnos</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\message</span>{<span class="enscript-keyword">\putwordChapter</span><span class="enscript-keyword">\space</span> <span class="enscript-keyword">\the</span><span class="enscript-keyword">\chapno</span>}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Write the actual heading.
</span>  <span class="enscript-keyword">\chapmacro</span>{#1}{Ynumbered}{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\chapno</span>}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% So @section and the like are numbered underneath this chapter.
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\section</span> = <span class="enscript-keyword">\numberedsec</span>
  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\subsection</span> = <span class="enscript-keyword">\numberedsubsec</span>
  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\subsubsection</span> = <span class="enscript-keyword">\numberedsubsubsec</span>
}

<span class="enscript-keyword">\outer</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\appendix</span>{<span class="enscript-keyword">\apphead</span>0{#1}} <span class="enscript-comment">% normally apphead0 calls appendixzzz
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\appendixzzz</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\secno</span>=0 <span class="enscript-keyword">\global</span><span class="enscript-keyword">\subsecno</span>=0 <span class="enscript-keyword">\global</span><span class="enscript-keyword">\subsubsecno</span>=0
    <span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\appendixno</span> by 1
  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\chaplevelprefix</span>{<span class="enscript-keyword">\appendixletter</span>.}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\resetallfloatnos</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\appendixnum</span>{<span class="enscript-keyword">\putwordAppendix</span><span class="enscript-keyword">\space</span> <span class="enscript-keyword">\appendixletter</span>}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\message</span>{<span class="enscript-keyword">\appendixnum</span>}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\chapmacro</span>{#1}{Yappendix}{<span class="enscript-keyword">\appendixletter</span>}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\section</span> = <span class="enscript-keyword">\appendixsec</span>
  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\subsection</span> = <span class="enscript-keyword">\appendixsubsec</span>
  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\subsubsection</span> = <span class="enscript-keyword">\appendixsubsubsec</span>
}

<span class="enscript-keyword">\outer</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\unnumbered</span>{<span class="enscript-keyword">\unnmhead</span>0{#1}} <span class="enscript-comment">% normally unnmhead0 calls unnumberedzzz
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\unnumberedzzz</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\secno</span>=0 <span class="enscript-keyword">\global</span><span class="enscript-keyword">\subsecno</span>=0 <span class="enscript-keyword">\global</span><span class="enscript-keyword">\subsubsecno</span>=0
    <span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\unnumberedno</span> by 1
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Since an unnumbered has no number, no prefix for figures.
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\chaplevelprefix</span> = <span class="enscript-keyword">\empty</span>
  <span class="enscript-keyword">\resetallfloatnos</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% This used to be simply \message{#1}, but TeX fully expands the
</span>  <span class="enscript-comment">% argument to \message.  Therefore, if #1 contained @-commands, TeX
</span>  <span class="enscript-comment">% expanded them.  For example, in `@unnumbered The @cite{Book}', TeX
</span>  <span class="enscript-comment">% expanded @cite (which turns out to cause errors because \cite is meant
</span>  <span class="enscript-comment">% to be executed, not expanded).
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Anyway, we don't want the fully-expanded definition of @cite to appear
</span>  <span class="enscript-comment">% as a result of the \message, we just want `@cite' itself.  We use
</span>  <span class="enscript-comment">% \the&lt;toks register&gt; to achieve this: TeX expands \the&lt;toks&gt; only once,
</span>  <span class="enscript-comment">% simply yielding the contents of &lt;toks register&gt;.  (We also do this for
</span>  <span class="enscript-comment">% the toc entries.)
</span>  <span class="enscript-keyword">\toks</span>0 = {#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\message</span>{(<span class="enscript-keyword">\the</span><span class="enscript-keyword">\toks</span>0)}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\chapmacro</span>{#1}{Ynothing}{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\unnumberedno</span>}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\section</span> = <span class="enscript-keyword">\unnumberedsec</span>
  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\subsection</span> = <span class="enscript-keyword">\unnumberedsubsec</span>
  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\subsubsection</span> = <span class="enscript-keyword">\unnumberedsubsubsec</span>
}

<span class="enscript-comment">% @centerchap is like @unnumbered, but the heading is centered.
</span><span class="enscript-keyword">\outer</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\centerchap</span>{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% Well, we could do the following in a group, but that would break
</span>  <span class="enscript-comment">% an assumption that \chapmacro is called at the outermost level.
</span>  <span class="enscript-comment">% Thus we are safer this way:		--kasal, 24feb04
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\centerparametersmaybe</span> = <span class="enscript-keyword">\centerparameters</span>
  <span class="enscript-keyword">\unnmhead</span>0{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\centerparametersmaybe</span> = <span class="enscript-keyword">\relax</span>
}

<span class="enscript-comment">% @top is like @unnumbered.
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\top</span><span class="enscript-keyword">\unnumbered</span>

<span class="enscript-comment">% Sections.
</span><span class="enscript-keyword">\outer</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\numberedsec</span>{<span class="enscript-keyword">\numhead</span>1{#1}} <span class="enscript-comment">% normally calls seczzz
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\seczzz</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\subsecno</span>=0 <span class="enscript-keyword">\global</span><span class="enscript-keyword">\subsubsecno</span>=0  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\secno</span> by 1
  <span class="enscript-keyword">\sectionheading</span>{#1}{sec}{Ynumbered}{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\chapno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\secno</span>}<span class="enscript-comment">%
</span>}

<span class="enscript-keyword">\outer</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\appendixsection</span>{<span class="enscript-keyword">\apphead</span>1{#1}} <span class="enscript-comment">% normally calls appendixsectionzzz
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\appendixsectionzzz</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\subsecno</span>=0 <span class="enscript-keyword">\global</span><span class="enscript-keyword">\subsubsecno</span>=0  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\secno</span> by 1
  <span class="enscript-keyword">\sectionheading</span>{#1}{sec}{Yappendix}{<span class="enscript-keyword">\appendixletter</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\secno</span>}<span class="enscript-comment">%
</span>}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\appendixsec</span><span class="enscript-keyword">\appendixsection</span>

<span class="enscript-keyword">\outer</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\unnumberedsec</span>{<span class="enscript-keyword">\unnmhead</span>1{#1}} <span class="enscript-comment">% normally calls unnumberedseczzz
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\unnumberedseczzz</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\subsecno</span>=0 <span class="enscript-keyword">\global</span><span class="enscript-keyword">\subsubsecno</span>=0  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\secno</span> by 1
  <span class="enscript-keyword">\sectionheading</span>{#1}{sec}{Ynothing}{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\unnumberedno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\secno</span>}<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% Subsections.
</span><span class="enscript-keyword">\outer</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\numberedsubsec</span>{<span class="enscript-keyword">\numhead</span>2{#1}} <span class="enscript-comment">% normally calls numberedsubseczzz
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\numberedsubseczzz</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\subsubsecno</span>=0  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\subsecno</span> by 1
  <span class="enscript-keyword">\sectionheading</span>{#1}{subsec}{Ynumbered}{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\chapno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\secno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\subsecno</span>}<span class="enscript-comment">%
</span>}

<span class="enscript-keyword">\outer</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\appendixsubsec</span>{<span class="enscript-keyword">\apphead</span>2{#1}} <span class="enscript-comment">% normally calls appendixsubseczzz
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\appendixsubseczzz</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\subsubsecno</span>=0  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\subsecno</span> by 1
  <span class="enscript-keyword">\sectionheading</span>{#1}{subsec}{Yappendix}<span class="enscript-comment">%
</span>                 {<span class="enscript-keyword">\appendixletter</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\secno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\subsecno</span>}<span class="enscript-comment">%
</span>}

<span class="enscript-keyword">\outer</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\unnumberedsubsec</span>{<span class="enscript-keyword">\unnmhead</span>2{#1}} <span class="enscript-comment">%normally calls unnumberedsubseczzz
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\unnumberedsubseczzz</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\subsubsecno</span>=0  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\subsecno</span> by 1
  <span class="enscript-keyword">\sectionheading</span>{#1}{subsec}{Ynothing}<span class="enscript-comment">%
</span>                 {<span class="enscript-keyword">\the</span><span class="enscript-keyword">\unnumberedno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\secno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\subsecno</span>}<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% Subsubsections.
</span><span class="enscript-keyword">\outer</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\numberedsubsubsec</span>{<span class="enscript-keyword">\numhead</span>3{#1}} <span class="enscript-comment">% normally numberedsubsubseczzz
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\numberedsubsubseczzz</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\subsubsecno</span> by 1
  <span class="enscript-keyword">\sectionheading</span>{#1}{subsubsec}{Ynumbered}<span class="enscript-comment">%
</span>                 {<span class="enscript-keyword">\the</span><span class="enscript-keyword">\chapno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\secno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\subsecno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\subsubsecno</span>}<span class="enscript-comment">%
</span>}

<span class="enscript-keyword">\outer</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\appendixsubsubsec</span>{<span class="enscript-keyword">\apphead</span>3{#1}} <span class="enscript-comment">% normally appendixsubsubseczzz
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\appendixsubsubseczzz</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\subsubsecno</span> by 1
  <span class="enscript-keyword">\sectionheading</span>{#1}{subsubsec}{Yappendix}<span class="enscript-comment">%
</span>                 {<span class="enscript-keyword">\appendixletter</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\secno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\subsecno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\subsubsecno</span>}<span class="enscript-comment">%
</span>}

<span class="enscript-keyword">\outer</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\unnumberedsubsubsec</span>{<span class="enscript-keyword">\unnmhead</span>3{#1}} <span class="enscript-comment">%normally unnumberedsubsubseczzz
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\unnumberedsubsubseczzz</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\subsubsecno</span> by 1
  <span class="enscript-keyword">\sectionheading</span>{#1}{subsubsec}{Ynothing}<span class="enscript-comment">%
</span>                 {<span class="enscript-keyword">\the</span><span class="enscript-keyword">\unnumberedno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\secno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\subsecno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\subsubsecno</span>}<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% These macros control what the section commands do, according
</span><span class="enscript-comment">% to what kind of chapter we are in (ordinary, appendix, or unnumbered).
</span><span class="enscript-comment">% Define them by default for a numbered chapter.
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\section</span> = <span class="enscript-keyword">\numberedsec</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\subsection</span> = <span class="enscript-keyword">\numberedsubsec</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\subsubsection</span> = <span class="enscript-keyword">\numberedsubsubsec</span>

<span class="enscript-comment">% Define @majorheading, @heading and @subheading
</span>
<span class="enscript-comment">% NOTE on use of \vbox for chapter headings, section headings, and such:
</span><span class="enscript-comment">%       1) We use \vbox rather than the earlier \line to permit
</span><span class="enscript-comment">%          overlong headings to fold.
</span><span class="enscript-comment">%       2) \hyphenpenalty is set to 10000 because hyphenation in a
</span><span class="enscript-comment">%          heading is obnoxious; this forbids it.
</span><span class="enscript-comment">%       3) Likewise, headings look best if no \parindent is used, and
</span><span class="enscript-comment">%          if justification is not attempted.  Hence \raggedright.
</span>

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\majorheading</span>{<span class="enscript-comment">%
</span>  {<span class="enscript-keyword">\advance</span><span class="enscript-keyword">\chapheadingskip</span> by 10pt <span class="enscript-keyword">\chapbreak</span> }<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\parsearg</span><span class="enscript-keyword">\chapheadingzzz</span>
}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\chapheading</span>{<span class="enscript-keyword">\chapbreak</span> <span class="enscript-keyword">\parsearg</span><span class="enscript-keyword">\chapheadingzzz</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\chapheadingzzz</span>#1{<span class="enscript-comment">%
</span>  {<span class="enscript-keyword">\chapfonts</span> <span class="enscript-keyword">\vbox</span>{<span class="enscript-keyword">\hyphenpenalty</span>=10000<span class="enscript-keyword">\tolerance</span>=5000
                    <span class="enscript-keyword">\parindent</span>=0pt<span class="enscript-keyword">\raggedright</span>
                    <span class="enscript-keyword">\rm</span> #1<span class="enscript-keyword">\hfill</span>}}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\bigskip</span> <span class="enscript-keyword">\par</span><span class="enscript-keyword">\penalty</span> 200<span class="enscript-keyword">\relax</span>
  <span class="enscript-keyword">\suppressfirstparagraphindent</span>
}

<span class="enscript-comment">% @heading, @subheading, @subsubheading.
</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\heading</span>{<span class="enscript-keyword">\sectionheading</span>{#1}{sec}{Yomitfromtoc}{}
  <span class="enscript-keyword">\suppressfirstparagraphindent</span>}
<span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\subheading</span>{<span class="enscript-keyword">\sectionheading</span>{#1}{subsec}{Yomitfromtoc}{}
  <span class="enscript-keyword">\suppressfirstparagraphindent</span>}
<span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\subsubheading</span>{<span class="enscript-keyword">\sectionheading</span>{#1}{subsubsec}{Yomitfromtoc}{}
  <span class="enscript-keyword">\suppressfirstparagraphindent</span>}

<span class="enscript-comment">% These macros generate a chapter, section, etc. heading only
</span><span class="enscript-comment">% (including whitespace, linebreaking, etc. around it),
</span><span class="enscript-comment">% given all the information in convenient, parsed form.
</span>
<span class="enscript-comment">%%% Args are the skip and penalty (usually negative)
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\dobreak</span>#1#2{<span class="enscript-keyword">\par</span><span class="enscript-keyword">\ifdim</span><span class="enscript-keyword">\lastskip</span>&lt;#1<span class="enscript-keyword">\removelastskip</span><span class="enscript-keyword">\penalty</span>#2<span class="enscript-keyword">\vskip</span>#1<span class="enscript-keyword">\fi</span>}

<span class="enscript-comment">%%% Define plain chapter starts, and page on/off switching for it
</span><span class="enscript-comment">% Parameter controlling skip before chapter headings (if needed)
</span>
<span class="enscript-keyword">\newskip</span><span class="enscript-keyword">\chapheadingskip</span>

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\chapbreak</span>{<span class="enscript-keyword">\dobreak</span> <span class="enscript-keyword">\chapheadingskip</span> {-4000}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\chappager</span>{<span class="enscript-keyword">\par</span><span class="enscript-keyword">\vfill</span><span class="enscript-keyword">\supereject</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\chapoddpage</span>{<span class="enscript-keyword">\chappager</span> <span class="enscript-keyword">\ifodd</span><span class="enscript-keyword">\pageno</span> <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\hbox</span> to 0pt{} <span class="enscript-keyword">\chappager</span><span class="enscript-keyword">\fi</span>}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\setchapternewpage</span> #1 {<span class="enscript-keyword">\csname</span> CHAPPAG#1<span class="enscript-keyword">\endcsname</span>}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\CHAPPAGoff</span>{<span class="enscript-comment">%
</span><span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\contentsalignmacro</span> = <span class="enscript-keyword">\chappager</span>
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\pchapsepmacro</span>=<span class="enscript-keyword">\chapbreak</span>
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\pagealignmacro</span>=<span class="enscript-keyword">\chappager</span>}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\CHAPPAGon</span>{<span class="enscript-comment">%
</span><span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\contentsalignmacro</span> = <span class="enscript-keyword">\chappager</span>
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\pchapsepmacro</span>=<span class="enscript-keyword">\chappager</span>
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\pagealignmacro</span>=<span class="enscript-keyword">\chappager</span>
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\HEADINGSon</span>{<span class="enscript-keyword">\HEADINGSsingle</span>}}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\CHAPPAGodd</span>{<span class="enscript-comment">%
</span><span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\contentsalignmacro</span> = <span class="enscript-keyword">\chapoddpage</span>
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\pchapsepmacro</span>=<span class="enscript-keyword">\chapoddpage</span>
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\pagealignmacro</span>=<span class="enscript-keyword">\chapoddpage</span>
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\HEADINGSon</span>{<span class="enscript-keyword">\HEADINGSdouble</span>}}

<span class="enscript-keyword">\CHAPPAGon</span>

<span class="enscript-comment">% Chapter opening.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% #1 is the text, #2 is the section type (Ynumbered, Ynothing,
</span><span class="enscript-comment">% Yappendix, Yomitfromtoc), #3 the chapter number.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% To test against our argument.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\Ynothingkeyword</span>{Ynothing}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\Yomitfromtockeyword</span>{Yomitfromtoc}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\Yappendixkeyword</span>{Yappendix}
<span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\chapmacro</span>#1#2#3{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\pchapsepmacro</span>
  {<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\chapfonts</span> <span class="enscript-keyword">\rm</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Have to define \thissection before calling \donoderef, because the
</span>    <span class="enscript-comment">% xref code eventually uses it.  On the other hand, it has to be called
</span>    <span class="enscript-comment">% after \pchapsepmacro, or the headline will change too soon.
</span>    <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\thissection</span>{#1}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\thischaptername</span>{#1}<span class="enscript-comment">%
</span>    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Only insert the separating space if we have a chapter/appendix
</span>    <span class="enscript-comment">% number, and don't print the unnumbered ``number''.
</span>    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\temptype</span>{#2}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\temptype</span><span class="enscript-keyword">\Ynothingkeyword</span>
      <span class="enscript-keyword">\setbox</span>0 = <span class="enscript-keyword">\hbox</span>{}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\toctype</span>{unnchap}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\thischapternum</span>{}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\thischapter</span>{#1}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\temptype</span><span class="enscript-keyword">\Yomitfromtockeyword</span>
      <span class="enscript-keyword">\setbox</span>0 = <span class="enscript-keyword">\hbox</span>{}<span class="enscript-comment">% contents like unnumbered, but no toc entry
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\toctype</span>{omit}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\thischapternum</span>{}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\thischapter</span>{}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\temptype</span><span class="enscript-keyword">\Yappendixkeyword</span>
      <span class="enscript-keyword">\setbox</span>0 = <span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\putwordAppendix</span>{} #3<span class="enscript-keyword">\enspace</span>}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\toctype</span>{app}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\thischapternum</span>{<span class="enscript-keyword">\appendixletter</span>}<span class="enscript-comment">%
</span>      <span class="enscript-comment">% We don't substitute the actual chapter name into \thischapter
</span>      <span class="enscript-comment">% because we don't want its macros evaluated now.  And we don't
</span>      <span class="enscript-comment">% use \thissection because that changes with each section.
</span>      <span class="enscript-comment">%
</span>      <span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\thischapter</span>{<span class="enscript-keyword">\putwordAppendix</span>{} <span class="enscript-keyword">\appendixletter</span>:
                        <span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\thischaptername</span>}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\setbox</span>0 = <span class="enscript-keyword">\hbox</span>{#3<span class="enscript-keyword">\enspace</span>}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\toctype</span>{numchap}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\thischapternum</span>{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\chapno</span>}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\thischapter</span>{<span class="enscript-keyword">\putwordChapter</span>{} <span class="enscript-keyword">\the</span><span class="enscript-keyword">\chapno</span>:
                        <span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\thischaptername</span>}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Write the toc entry for this chapter.  Must come before the
</span>    <span class="enscript-comment">% \donoderef, because we include the current node name in the toc
</span>    <span class="enscript-comment">% entry, and \donoderef resets it to empty.
</span>    <span class="enscript-keyword">\writetocentry</span>{<span class="enscript-keyword">\toctype</span>}{#1}{#3}<span class="enscript-comment">%
</span>    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% For pdftex, we have to write out the node definition (aka, make
</span>    <span class="enscript-comment">% the pdfdest) after any page break, but before the actual text has
</span>    <span class="enscript-comment">% been typeset.  If the destination for the pdf outline is after the
</span>    <span class="enscript-comment">% text, then jumping from the outline may wind up with the text not
</span>    <span class="enscript-comment">% being visible, for instance under high magnification.
</span>    <span class="enscript-keyword">\donoderef</span>{#2}<span class="enscript-comment">%
</span>    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Typeset the actual heading.
</span>    <span class="enscript-keyword">\vbox</span>{<span class="enscript-keyword">\hyphenpenalty</span>=10000 <span class="enscript-keyword">\tolerance</span>=5000 <span class="enscript-keyword">\parindent</span>=0pt <span class="enscript-keyword">\raggedright</span>
          <span class="enscript-keyword">\hangindent</span>=<span class="enscript-keyword">\wd</span>0 <span class="enscript-keyword">\centerparametersmaybe</span>
          <span class="enscript-keyword">\unhbox</span>0 #1<span class="enscript-keyword">\par</span>}<span class="enscript-comment">%
</span>  }<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\nobreak</span><span class="enscript-keyword">\bigskip</span> <span class="enscript-comment">% no page break after a chapter title
</span>  <span class="enscript-keyword">\nobreak</span>
}

<span class="enscript-comment">% @centerchap -- centered and unnumbered.
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\centerparametersmaybe</span> = <span class="enscript-keyword">\relax</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\centerparameters</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\rightskip</span> by 3<span class="enscript-keyword">\rightskip</span>
  <span class="enscript-keyword">\leftskip</span> = <span class="enscript-keyword">\rightskip</span>
  <span class="enscript-keyword">\parfillskip</span> = 0pt
}


<span class="enscript-comment">% I don't think this chapter style is supported any more, so I'm not
</span><span class="enscript-comment">% updating it with the new noderef stuff.  We'll see.  --karl, 11aug03.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\setchapterstyle</span> #1 {<span class="enscript-keyword">\csname</span> CHAPF#1<span class="enscript-keyword">\endcsname</span>}
<span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\unnchfopen</span> #1{<span class="enscript-comment">%
</span><span class="enscript-keyword">\chapoddpage</span> {<span class="enscript-keyword">\chapfonts</span> <span class="enscript-keyword">\vbox</span>{<span class="enscript-keyword">\hyphenpenalty</span>=10000<span class="enscript-keyword">\tolerance</span>=5000
                       <span class="enscript-keyword">\parindent</span>=0pt<span class="enscript-keyword">\raggedright</span>
                       <span class="enscript-keyword">\rm</span> #1<span class="enscript-keyword">\hfill</span>}}<span class="enscript-keyword">\bigskip</span> <span class="enscript-keyword">\par</span><span class="enscript-keyword">\nobreak</span>
}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\chfopen</span> #1#2{<span class="enscript-keyword">\chapoddpage</span> {<span class="enscript-keyword">\chapfonts</span>
<span class="enscript-keyword">\vbox</span> to 3in{<span class="enscript-keyword">\vfil</span> <span class="enscript-keyword">\hbox</span> to<span class="enscript-keyword">\hsize</span>{<span class="enscript-keyword">\hfil</span> #2} <span class="enscript-keyword">\hbox</span> to<span class="enscript-keyword">\hsize</span>{<span class="enscript-keyword">\hfil</span> #1} <span class="enscript-keyword">\vfil</span>}}<span class="enscript-comment">%
</span><span class="enscript-keyword">\par</span><span class="enscript-keyword">\penalty</span> 5000 <span class="enscript-comment">%
</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\centerchfopen</span> #1{<span class="enscript-comment">%
</span><span class="enscript-keyword">\chapoddpage</span> {<span class="enscript-keyword">\chapfonts</span> <span class="enscript-keyword">\vbox</span>{<span class="enscript-keyword">\hyphenpenalty</span>=10000<span class="enscript-keyword">\tolerance</span>=5000
                       <span class="enscript-keyword">\parindent</span>=0pt
                       <span class="enscript-keyword">\hfill</span> {<span class="enscript-keyword">\rm</span> #1}<span class="enscript-keyword">\hfill</span>}}<span class="enscript-keyword">\bigskip</span> <span class="enscript-keyword">\par</span><span class="enscript-keyword">\nobreak</span>
}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\CHAPFopen</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\chapmacro</span>=<span class="enscript-keyword">\chfopen</span>
  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\centerchapmacro</span>=<span class="enscript-keyword">\centerchfopen</span>}


<span class="enscript-comment">% Section titles.  These macros combine the section number parts and
</span><span class="enscript-comment">% call the generic \sectionheading to do the printing.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\newskip</span><span class="enscript-keyword">\secheadingskip</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\secheadingbreak</span>{<span class="enscript-keyword">\dobreak</span> <span class="enscript-keyword">\secheadingskip</span>{-1000}}

<span class="enscript-comment">% Subsection titles.
</span><span class="enscript-keyword">\newskip</span><span class="enscript-keyword">\subsecheadingskip</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\subsecheadingbreak</span>{<span class="enscript-keyword">\dobreak</span> <span class="enscript-keyword">\subsecheadingskip</span>{-500}}

<span class="enscript-comment">% Subsubsection titles.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\subsubsecheadingskip</span>{<span class="enscript-keyword">\subsecheadingskip</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\subsubsecheadingbreak</span>{<span class="enscript-keyword">\subsecheadingbreak</span>}


<span class="enscript-comment">% Print any size, any type, section title.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is
</span><span class="enscript-comment">% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the
</span><span class="enscript-comment">% section number.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\sectionheading</span>#1#2#3#4{<span class="enscript-comment">%
</span>  {<span class="enscript-comment">%
</span>    <span class="enscript-comment">% Switch to the right set of fonts.
</span>    <span class="enscript-keyword">\csname</span> #2fonts<span class="enscript-keyword">\endcsname</span> <span class="enscript-keyword">\rm</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Insert space above the heading.
</span>    <span class="enscript-keyword">\csname</span> #2headingbreak<span class="enscript-keyword">\endcsname</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Only insert the space after the number if we have a section number.
</span>    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\sectionlevel</span>{#2}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\temptype</span>{#3}<span class="enscript-comment">%
</span>    <span class="enscript-comment">%
</span>    <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\temptype</span><span class="enscript-keyword">\Ynothingkeyword</span>
      <span class="enscript-keyword">\setbox</span>0 = <span class="enscript-keyword">\hbox</span>{}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\toctype</span>{unn}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\thissection</span>{#1}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\temptype</span><span class="enscript-keyword">\Yomitfromtockeyword</span>
      <span class="enscript-comment">% for @headings -- no section number, don't include in toc,
</span>      <span class="enscript-comment">% and don't redefine \thissection.
</span>      <span class="enscript-keyword">\setbox</span>0 = <span class="enscript-keyword">\hbox</span>{}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\toctype</span>{omit}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\let</span><span class="enscript-keyword">\sectionlevel</span>=<span class="enscript-keyword">\empty</span>
    <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\temptype</span><span class="enscript-keyword">\Yappendixkeyword</span>
      <span class="enscript-keyword">\setbox</span>0 = <span class="enscript-keyword">\hbox</span>{#4<span class="enscript-keyword">\enspace</span>}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\toctype</span>{app}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\thissection</span>{#1}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\setbox</span>0 = <span class="enscript-keyword">\hbox</span>{#4<span class="enscript-keyword">\enspace</span>}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\toctype</span>{num}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\thissection</span>{#1}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Write the toc entry (before \donoderef).  See comments in \chapmacro.
</span>    <span class="enscript-keyword">\writetocentry</span>{<span class="enscript-keyword">\toctype</span><span class="enscript-keyword">\sectionlevel</span>}{#1}{#4}<span class="enscript-comment">%
</span>    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Write the node reference (= pdf destination for pdftex).
</span>    <span class="enscript-comment">% Again, see comments in \chapmacro.
</span>    <span class="enscript-keyword">\donoderef</span>{#3}<span class="enscript-comment">%
</span>    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Interline glue will be inserted when the vbox is completed.
</span>    <span class="enscript-comment">% That glue will be a valid breakpoint for the page, since it'll be
</span>    <span class="enscript-comment">% preceded by a whatsit (usually from the \donoderef, or from the
</span>    <span class="enscript-comment">% \writetocentry if there was no node).  We don't want to allow that
</span>    <span class="enscript-comment">% break, since then the whatsits could end up on page n while the
</span>    <span class="enscript-comment">% section is on page n+1, thus toc/etc. are wrong.  Debian bug 276000.
</span>    <span class="enscript-keyword">\nobreak</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Output the actual section heading.
</span>    <span class="enscript-keyword">\vbox</span>{<span class="enscript-keyword">\hyphenpenalty</span>=10000 <span class="enscript-keyword">\tolerance</span>=5000 <span class="enscript-keyword">\parindent</span>=0pt <span class="enscript-keyword">\raggedright</span>
          <span class="enscript-keyword">\hangindent</span>=<span class="enscript-keyword">\wd</span>0  <span class="enscript-comment">% zero if no section number
</span>          <span class="enscript-keyword">\unhbox</span>0 #1}<span class="enscript-comment">%
</span>  }<span class="enscript-comment">%
</span>  <span class="enscript-comment">% Add extra space after the heading -- half of whatever came above it.
</span>  <span class="enscript-comment">% Don't allow stretch, though.
</span>  <span class="enscript-keyword">\kern</span> .5 <span class="enscript-keyword">\csname</span> #2headingskip<span class="enscript-keyword">\endcsname</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Do not let the kern be a potential breakpoint, as it would be if it
</span>  <span class="enscript-comment">% was followed by glue.
</span>  <span class="enscript-keyword">\nobreak</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% We'll almost certainly start a paragraph next, so don't let that
</span>  <span class="enscript-comment">% glue accumulate.  (Not a breakpoint because it's preceded by a
</span>  <span class="enscript-comment">% discardable item.)
</span>  <span class="enscript-keyword">\vskip</span>-<span class="enscript-keyword">\parskip</span>
  <span class="enscript-comment">% 
</span>  <span class="enscript-comment">% This is purely so the last item on the list is a known \penalty &gt;
</span>  <span class="enscript-comment">% 10000.  This is so \startdefun can avoid allowing breakpoints after
</span>  <span class="enscript-comment">% section headings.  Otherwise, it would insert a valid breakpoint between:
</span>  <span class="enscript-comment">% 
</span>  <span class="enscript-comment">%   @section sec-whatever
</span>  <span class="enscript-comment">%   @deffn def-whatever
</span>  <span class="enscript-keyword">\penalty</span> 10001
}


<span class="enscript-keyword">\message</span>{toc,}
<span class="enscript-comment">% Table of contents.
</span><span class="enscript-keyword">\newwrite</span><span class="enscript-keyword">\tocfile</span>

<span class="enscript-comment">% Write an entry to the toc file, opening it if necessary.
</span><span class="enscript-comment">% Called from @chapter, etc.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno}
</span><span class="enscript-comment">% We append the current node name (if any) and page number as additional
</span><span class="enscript-comment">% arguments for the \{chap,sec,...}entry macros which will eventually
</span><span class="enscript-comment">% read this.  The node name is used in the pdf outlines as the
</span><span class="enscript-comment">% destination to jump to.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% We open the .toc file for writing here instead of at @setfilename (or
</span><span class="enscript-comment">% any other fixed time) so that @contents can be anywhere in the document.
</span><span class="enscript-comment">% But if #1 is `omit', then we don't do anything.  This is used for the
</span><span class="enscript-comment">% table of contents chapter openings themselves.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\newif</span><span class="enscript-keyword">\iftocfileopened</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\omitkeyword</span>{omit}<span class="enscript-comment">%
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\writetocentry</span>#1#2#3{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\edef</span><span class="enscript-keyword">\writetoctype</span>{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\writetoctype</span><span class="enscript-keyword">\omitkeyword</span> <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\iftocfileopened</span><span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\immediate</span><span class="enscript-keyword">\openout</span><span class="enscript-keyword">\tocfile</span> = <span class="enscript-keyword">\jobname</span>.toc
      <span class="enscript-keyword">\global</span><span class="enscript-keyword">\tocfileopenedtrue</span>
    <span class="enscript-keyword">\fi</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-keyword">\iflinks</span>
      {<span class="enscript-keyword">\atdummies</span>
       <span class="enscript-keyword">\edef</span><span class="enscript-keyword">\temp</span>{<span class="enscript-comment">%
</span>         <span class="enscript-keyword">\write</span><span class="enscript-keyword">\tocfile</span>{@#1entry{#2}{#3}{<span class="enscript-keyword">\lastnode</span>}{<span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\folio</span>}}}<span class="enscript-comment">%
</span>       <span class="enscript-keyword">\temp</span>
      }<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Tell \shipout to create a pdf destination on each page, if we're
</span>  <span class="enscript-comment">% writing pdf.  These are used in the table of contents.  We can't
</span>  <span class="enscript-comment">% just write one on every page because the title pages are numbered
</span>  <span class="enscript-comment">% 1 and 2 (the page numbers aren't printed), and so are the first
</span>  <span class="enscript-comment">% two pages of the document.  Thus, we'd have two destinations named
</span>  <span class="enscript-comment">% `1', and two named `2'.
</span>  <span class="enscript-keyword">\ifpdf</span> <span class="enscript-keyword">\global</span><span class="enscript-keyword">\pdfmakepagedesttrue</span> <span class="enscript-keyword">\fi</span>
}


<span class="enscript-comment">% These characters do not print properly in the Computer Modern roman
</span><span class="enscript-comment">% fonts, so we must take special care.  This is more or less redundant
</span><span class="enscript-comment">% with the Texinfo input format setup at the end of this file.
</span><span class="enscript-comment">% 
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\activecatcodes</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\&quot;</span>=<span class="enscript-keyword">\active</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\$</span>=<span class="enscript-keyword">\active</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\&lt;</span>=<span class="enscript-keyword">\active</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\&gt;</span>=<span class="enscript-keyword">\active</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\\</span>=<span class="enscript-keyword">\active</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>=<span class="enscript-keyword">\active</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\_</span>=<span class="enscript-keyword">\active</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\|</span>=<span class="enscript-keyword">\active</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\~</span>=<span class="enscript-keyword">\active</span>
}


<span class="enscript-comment">% Read the toc file, which is essentially Texinfo input.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\readtocfile</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\setupdatafile</span>
  <span class="enscript-keyword">\activecatcodes</span>
  <span class="enscript-keyword">\input</span> <span class="enscript-keyword">\tocreadfilename</span>
}

<span class="enscript-keyword">\newskip</span><span class="enscript-keyword">\contentsrightmargin</span> <span class="enscript-keyword">\contentsrightmargin</span>=1in
<span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\savepageno</span>
<span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\lastnegativepageno</span> <span class="enscript-keyword">\lastnegativepageno</span> = -1

<span class="enscript-comment">% Prepare to read what we've written to \tocfile.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\startcontents</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% If @setchapternewpage on, and @headings double, the contents should
</span>  <span class="enscript-comment">% start on an odd page, unlike chapters.  Thus, we maintain
</span>  <span class="enscript-comment">% \contentsalignmacro in parallel with \pagealignmacro.
</span>  <span class="enscript-comment">% From: Torbjorn Granlund &lt;<a href="mailto:tege@matematik.su.se">tege@matematik.su.se</a>&gt;
</span>  <span class="enscript-keyword">\contentsalignmacro</span>
  <span class="enscript-keyword">\immediate</span><span class="enscript-keyword">\closeout</span><span class="enscript-keyword">\tocfile</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Don't need to put `Contents' or `Short Contents' in the headline.
</span>  <span class="enscript-comment">% It is abundantly clear what they are.
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\thischapter</span>{}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\chapmacro</span>{#1}{Yomitfromtoc}{}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\savepageno</span> = <span class="enscript-keyword">\pageno</span>
  <span class="enscript-keyword">\begingroup</span>                  <span class="enscript-comment">% Set up to handle contents files properly.
</span>    <span class="enscript-keyword">\raggedbottom</span>              <span class="enscript-comment">% Worry more about breakpoints than the bottom.
</span>    <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\hsize</span> by -<span class="enscript-keyword">\contentsrightmargin</span> <span class="enscript-comment">% Don't use the full line length.
</span>    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Roman numerals for page numbers.
</span>    <span class="enscript-keyword">\ifnum</span> <span class="enscript-keyword">\pageno</span>&gt;0 <span class="enscript-keyword">\global</span><span class="enscript-keyword">\pageno</span> = <span class="enscript-keyword">\lastnegativepageno</span> <span class="enscript-keyword">\fi</span>
}

<span class="enscript-comment">% redefined for the two-volume lispref.  We always output on
</span><span class="enscript-comment">% \jobname.toc even if this is redefined.
</span><span class="enscript-comment">% 
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\tocreadfilename</span>{<span class="enscript-keyword">\jobname</span>.toc}

<span class="enscript-comment">% Normal (long) toc.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\contents</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\startcontents</span>{<span class="enscript-keyword">\putwordTOC</span>}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\openin</span> 1 <span class="enscript-keyword">\tocreadfilename</span><span class="enscript-keyword">\space</span>
    <span class="enscript-keyword">\ifeof</span> 1 <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\readtocfile</span>
    <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\vfill</span> <span class="enscript-keyword">\eject</span>
    <span class="enscript-keyword">\contentsalignmacro</span> <span class="enscript-comment">% in case @setchapternewpage odd is in effect
</span>    <span class="enscript-keyword">\ifeof</span> 1 <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\pdfmakeoutlines</span>
    <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\closein</span> 1
  <span class="enscript-keyword">\endgroup</span>
  <span class="enscript-keyword">\lastnegativepageno</span> = <span class="enscript-keyword">\pageno</span>
  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\pageno</span> = <span class="enscript-keyword">\savepageno</span>
}

<span class="enscript-comment">% And just the chapters.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\summarycontents</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\startcontents</span>{<span class="enscript-keyword">\putwordShortTOC</span>}<span class="enscript-comment">%
</span>    <span class="enscript-comment">%
</span>    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\numchapentry</span> = <span class="enscript-keyword">\shortchapentry</span>
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\appentry</span> = <span class="enscript-keyword">\shortchapentry</span>
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\unnchapentry</span> = <span class="enscript-keyword">\shortunnchapentry</span>
    <span class="enscript-comment">% We want a true roman here for the page numbers.
</span>    <span class="enscript-keyword">\secfonts</span>
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\rm</span>=<span class="enscript-keyword">\shortcontrm</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\bf</span>=<span class="enscript-keyword">\shortcontbf</span>
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\sl</span>=<span class="enscript-keyword">\shortcontsl</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\tt</span>=<span class="enscript-keyword">\shortconttt</span>
    <span class="enscript-keyword">\rm</span>
    <span class="enscript-keyword">\hyphenpenalty</span> = 10000
    <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\baselineskip</span> by 1pt <span class="enscript-comment">% Open it up a little.
</span>    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\numsecentry</span>##1##2##3##4{}
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\appsecentry</span> = <span class="enscript-keyword">\numsecentry</span>
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\unnsecentry</span> = <span class="enscript-keyword">\numsecentry</span>
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\numsubsecentry</span> = <span class="enscript-keyword">\numsecentry</span>
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\appsubsecentry</span> = <span class="enscript-keyword">\numsecentry</span>
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\unnsubsecentry</span> = <span class="enscript-keyword">\numsecentry</span>
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\numsubsubsecentry</span> = <span class="enscript-keyword">\numsecentry</span>
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\appsubsubsecentry</span> = <span class="enscript-keyword">\numsecentry</span>
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\unnsubsubsecentry</span> = <span class="enscript-keyword">\numsecentry</span>
    <span class="enscript-keyword">\openin</span> 1 <span class="enscript-keyword">\tocreadfilename</span><span class="enscript-keyword">\space</span>
    <span class="enscript-keyword">\ifeof</span> 1 <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\readtocfile</span>
    <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\closein</span> 1
    <span class="enscript-keyword">\vfill</span> <span class="enscript-keyword">\eject</span>
    <span class="enscript-keyword">\contentsalignmacro</span> <span class="enscript-comment">% in case @setchapternewpage odd is in effect
</span>  <span class="enscript-keyword">\endgroup</span>
  <span class="enscript-keyword">\lastnegativepageno</span> = <span class="enscript-keyword">\pageno</span>
  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\pageno</span> = <span class="enscript-keyword">\savepageno</span>
}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\shortcontents</span> = <span class="enscript-keyword">\summarycontents</span>

<span class="enscript-comment">% Typeset the label for a chapter or appendix for the short contents.
</span><span class="enscript-comment">% The arg is, e.g., `A' for an appendix, or `3' for a chapter.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\shortchaplabel</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% This space should be enough, since a single number is .5em, and the
</span>  <span class="enscript-comment">% widest letter (M) is 1em, at least in the Computer Modern fonts.
</span>  <span class="enscript-comment">% But use \hss just in case.
</span>  <span class="enscript-comment">% (This space doesn't include the extra space that gets added after
</span>  <span class="enscript-comment">% the label; that gets put in by \shortchapentry above.)
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% We'd like to right-justify chapter numbers, but that looks strange
</span>  <span class="enscript-comment">% with appendix letters.  And right-justifying numbers and
</span>  <span class="enscript-comment">% left-justifying letters looks strange when there is less than 10
</span>  <span class="enscript-comment">% chapters.  Have to read the whole toc once to know how many chapters
</span>  <span class="enscript-comment">% there are before deciding ...
</span>  <span class="enscript-keyword">\hbox</span> to 1em{#1<span class="enscript-keyword">\hss</span>}<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% These macros generate individual entries in the table of contents.
</span><span class="enscript-comment">% The first argument is the chapter or section name.
</span><span class="enscript-comment">% The last argument is the page number.
</span><span class="enscript-comment">% The arguments in between are the chapter number, section number, ...
</span>
<span class="enscript-comment">% Chapters, in the main contents.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\numchapentry</span>#1#2#3#4{<span class="enscript-keyword">\dochapentry</span>{#2<span class="enscript-keyword">\labelspace</span>#1}{#4}}
<span class="enscript-comment">%
</span><span class="enscript-comment">% Chapters, in the short toc.
</span><span class="enscript-comment">% See comments in \dochapentry re vbox and related settings.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\shortchapentry</span>#1#2#3#4{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\tocentry</span>{<span class="enscript-keyword">\shortchaplabel</span>{#2}<span class="enscript-keyword">\labelspace</span> #1}{<span class="enscript-keyword">\doshortpageno</span><span class="enscript-keyword">\bgroup</span>#4<span class="enscript-keyword">\egroup</span>}<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% Appendices, in the main contents.
</span><span class="enscript-comment">% Need the word Appendix, and a fixed-size box.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\appendixbox</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% We use M since it's probably the widest letter.
</span>  <span class="enscript-keyword">\setbox</span>0 = <span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\putwordAppendix</span>{} M}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\hbox</span> to <span class="enscript-keyword">\wd</span>0{<span class="enscript-keyword">\putwordAppendix</span>{} #1<span class="enscript-keyword">\hss</span>}}
<span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\appentry</span>#1#2#3#4{<span class="enscript-keyword">\dochapentry</span>{<span class="enscript-keyword">\appendixbox</span>{#2}<span class="enscript-keyword">\labelspace</span>#1}{#4}}

<span class="enscript-comment">% Unnumbered chapters.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\unnchapentry</span>#1#2#3#4{<span class="enscript-keyword">\dochapentry</span>{#1}{#4}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\shortunnchapentry</span>#1#2#3#4{<span class="enscript-keyword">\tocentry</span>{#1}{<span class="enscript-keyword">\doshortpageno</span><span class="enscript-keyword">\bgroup</span>#4<span class="enscript-keyword">\egroup</span>}}

<span class="enscript-comment">% Sections.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\numsecentry</span>#1#2#3#4{<span class="enscript-keyword">\dosecentry</span>{#2<span class="enscript-keyword">\labelspace</span>#1}{#4}}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\appsecentry</span>=<span class="enscript-keyword">\numsecentry</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\unnsecentry</span>#1#2#3#4{<span class="enscript-keyword">\dosecentry</span>{#1}{#4}}

<span class="enscript-comment">% Subsections.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\numsubsecentry</span>#1#2#3#4{<span class="enscript-keyword">\dosubsecentry</span>{#2<span class="enscript-keyword">\labelspace</span>#1}{#4}}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\appsubsecentry</span>=<span class="enscript-keyword">\numsubsecentry</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\unnsubsecentry</span>#1#2#3#4{<span class="enscript-keyword">\dosubsecentry</span>{#1}{#4}}

<span class="enscript-comment">% And subsubsections.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\numsubsubsecentry</span>#1#2#3#4{<span class="enscript-keyword">\dosubsubsecentry</span>{#2<span class="enscript-keyword">\labelspace</span>#1}{#4}}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\appsubsubsecentry</span>=<span class="enscript-keyword">\numsubsubsecentry</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\unnsubsubsecentry</span>#1#2#3#4{<span class="enscript-keyword">\dosubsubsecentry</span>{#1}{#4}}

<span class="enscript-comment">% This parameter controls the indentation of the various levels.
</span><span class="enscript-comment">% Same as \defaultparindent.
</span><span class="enscript-keyword">\newdimen</span><span class="enscript-keyword">\tocindent</span> <span class="enscript-keyword">\tocindent</span> = 15pt

<span class="enscript-comment">% Now for the actual typesetting. In all these, #1 is the text and #2 is the
</span><span class="enscript-comment">% page number.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% If the toc has to be broken over pages, we want it to be at chapters
</span><span class="enscript-comment">% if at all possible; hence the \penalty.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\dochapentry</span>#1#2{<span class="enscript-comment">%
</span>   <span class="enscript-keyword">\penalty</span>-300 <span class="enscript-keyword">\vskip</span>1<span class="enscript-keyword">\baselineskip</span> plus.33<span class="enscript-keyword">\baselineskip</span> minus.25<span class="enscript-keyword">\baselineskip</span>
   <span class="enscript-keyword">\begingroup</span>
     <span class="enscript-keyword">\chapentryfonts</span>
     <span class="enscript-keyword">\tocentry</span>{#1}{<span class="enscript-keyword">\dopageno</span><span class="enscript-keyword">\bgroup</span>#2<span class="enscript-keyword">\egroup</span>}<span class="enscript-comment">%
</span>   <span class="enscript-keyword">\endgroup</span>
   <span class="enscript-keyword">\nobreak</span><span class="enscript-keyword">\vskip</span> .25<span class="enscript-keyword">\baselineskip</span> plus.1<span class="enscript-keyword">\baselineskip</span>
}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\dosecentry</span>#1#2{<span class="enscript-keyword">\begingroup</span>
  <span class="enscript-keyword">\secentryfonts</span> <span class="enscript-keyword">\leftskip</span>=<span class="enscript-keyword">\tocindent</span>
  <span class="enscript-keyword">\tocentry</span>{#1}{<span class="enscript-keyword">\dopageno</span><span class="enscript-keyword">\bgroup</span>#2<span class="enscript-keyword">\egroup</span>}<span class="enscript-comment">%
</span><span class="enscript-keyword">\endgroup</span>}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\dosubsecentry</span>#1#2{<span class="enscript-keyword">\begingroup</span>
  <span class="enscript-keyword">\subsecentryfonts</span> <span class="enscript-keyword">\leftskip</span>=2<span class="enscript-keyword">\tocindent</span>
  <span class="enscript-keyword">\tocentry</span>{#1}{<span class="enscript-keyword">\dopageno</span><span class="enscript-keyword">\bgroup</span>#2<span class="enscript-keyword">\egroup</span>}<span class="enscript-comment">%
</span><span class="enscript-keyword">\endgroup</span>}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\dosubsubsecentry</span>#1#2{<span class="enscript-keyword">\begingroup</span>
  <span class="enscript-keyword">\subsubsecentryfonts</span> <span class="enscript-keyword">\leftskip</span>=3<span class="enscript-keyword">\tocindent</span>
  <span class="enscript-keyword">\tocentry</span>{#1}{<span class="enscript-keyword">\dopageno</span><span class="enscript-keyword">\bgroup</span>#2<span class="enscript-keyword">\egroup</span>}<span class="enscript-comment">%
</span><span class="enscript-keyword">\endgroup</span>}

<span class="enscript-comment">% We use the same \entry macro as for the index entries.
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\tocentry</span> = <span class="enscript-keyword">\entry</span>

<span class="enscript-comment">% Space between chapter (or whatever) number and the title.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\labelspace</span>{<span class="enscript-keyword">\hskip</span>1em <span class="enscript-keyword">\relax</span>}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\dopageno</span>#1{{<span class="enscript-keyword">\rm</span> #1}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\doshortpageno</span>#1{{<span class="enscript-keyword">\rm</span> #1}}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\chapentryfonts</span>{<span class="enscript-keyword">\secfonts</span> <span class="enscript-keyword">\rm</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\secentryfonts</span>{<span class="enscript-keyword">\textfonts</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\subsecentryfonts</span>{<span class="enscript-keyword">\textfonts</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\subsubsecentryfonts</span>{<span class="enscript-keyword">\textfonts</span>}


<span class="enscript-keyword">\message</span>{environments,}
<span class="enscript-comment">% @foo ... @end foo.
</span>
<span class="enscript-comment">% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% Since these characters are used in examples, it should be an even number of
</span><span class="enscript-comment">% \tt widths. Each \tt character is 1en, so two makes it 1em.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\point</span>{<span class="enscript-variable-name">$\star$</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\result</span>{<span class="enscript-keyword">\leavevmode</span><span class="enscript-keyword">\raise</span>.15ex<span class="enscript-keyword">\hbox</span> to 1em{<span class="enscript-keyword">\hfil</span><span class="enscript-variable-name">$\Rightarrow$</span><span class="enscript-keyword">\hfil</span>}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\expansion</span>{<span class="enscript-keyword">\leavevmode</span><span class="enscript-keyword">\raise</span>.1ex<span class="enscript-keyword">\hbox</span> to 1em{<span class="enscript-keyword">\hfil</span><span class="enscript-variable-name">$\mapsto$</span><span class="enscript-keyword">\hfil</span>}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\print</span>{<span class="enscript-keyword">\leavevmode</span><span class="enscript-keyword">\lower</span>.1ex<span class="enscript-keyword">\hbox</span> to 1em{<span class="enscript-keyword">\hfil</span><span class="enscript-variable-name">$\dashv$</span><span class="enscript-keyword">\hfil</span>}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\equiv</span>{<span class="enscript-keyword">\leavevmode</span><span class="enscript-keyword">\lower</span>.1ex<span class="enscript-keyword">\hbox</span> to 1em{<span class="enscript-keyword">\hfil</span><span class="enscript-variable-name">$\ptexequiv$</span><span class="enscript-keyword">\hfil</span>}}

<span class="enscript-comment">% The @error{} command.
</span><span class="enscript-comment">% Adapted from the TeXbook's \boxit.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\newbox</span><span class="enscript-keyword">\errorbox</span>
<span class="enscript-comment">%
</span>{<span class="enscript-keyword">\tentt</span> <span class="enscript-keyword">\global</span><span class="enscript-keyword">\dimen</span>0 = 3em}<span class="enscript-comment">% Width of the box.
</span><span class="enscript-keyword">\dimen</span>2 = .55pt <span class="enscript-comment">% Thickness of rules
</span><span class="enscript-comment">% The text. (`r' is open on the right, `e' somewhat less so on the left.)
</span><span class="enscript-keyword">\setbox</span>0 = <span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\kern</span>-.75pt <span class="enscript-keyword">\reducedsf</span> error<span class="enscript-keyword">\kern</span>-1.5pt}
<span class="enscript-comment">%
</span><span class="enscript-keyword">\setbox</span><span class="enscript-keyword">\errorbox</span>=<span class="enscript-keyword">\hbox</span> to <span class="enscript-keyword">\dimen</span>0{<span class="enscript-keyword">\hfil</span>
   <span class="enscript-keyword">\hsize</span> = <span class="enscript-keyword">\dimen</span>0 <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\hsize</span> by -5.8pt <span class="enscript-comment">% Space to left+right.
</span>   <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\hsize</span> by -2<span class="enscript-keyword">\dimen</span>2 <span class="enscript-comment">% Rules.
</span>   <span class="enscript-keyword">\vbox</span>{<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\hrule</span> height<span class="enscript-keyword">\dimen</span>2
      <span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\vrule</span> width<span class="enscript-keyword">\dimen</span>2 <span class="enscript-keyword">\kern</span>3pt          <span class="enscript-comment">% Space to left of text.
</span>         <span class="enscript-keyword">\vtop</span>{<span class="enscript-keyword">\kern</span>2.4pt <span class="enscript-keyword">\box</span>0 <span class="enscript-keyword">\kern</span>2.4pt}<span class="enscript-comment">% Space above/below.
</span>         <span class="enscript-keyword">\kern</span>3pt<span class="enscript-keyword">\vrule</span> width<span class="enscript-keyword">\dimen</span>2}<span class="enscript-comment">% Space to right.
</span>      <span class="enscript-keyword">\hrule</span> height<span class="enscript-keyword">\dimen</span>2}
    <span class="enscript-keyword">\hfil</span>}
<span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\error</span>{<span class="enscript-keyword">\leavevmode</span><span class="enscript-keyword">\lower</span>.7ex<span class="enscript-keyword">\copy</span><span class="enscript-keyword">\errorbox</span>}

<span class="enscript-comment">% @tex ... @end tex    escapes into raw Tex temporarily.
</span><span class="enscript-comment">% One exception: @ is still an escape character, so that @end tex works.
</span><span class="enscript-comment">% But \@ or @@ will get a plain tex @ character.
</span>
<span class="enscript-keyword">\envdef</span><span class="enscript-keyword">\tex</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\catcode</span> `<span class="enscript-keyword">\\</span>=0 <span class="enscript-keyword">\catcode</span> `<span class="enscript-keyword">\{</span>=1 <span class="enscript-keyword">\catcode</span> `<span class="enscript-keyword">\}</span>=2
  <span class="enscript-keyword">\catcode</span> `<span class="enscript-keyword">\$</span>=3 <span class="enscript-keyword">\catcode</span> `<span class="enscript-keyword">\&amp;</span>=4 <span class="enscript-keyword">\catcode</span> `<span class="enscript-keyword">\#</span>=6
  <span class="enscript-keyword">\catcode</span> `<span class="enscript-keyword">\^</span>=7 <span class="enscript-keyword">\catcode</span> `<span class="enscript-keyword">\_</span>=8 <span class="enscript-keyword">\catcode</span> `<span class="enscript-keyword">\~</span>=<span class="enscript-keyword">\active</span> <span class="enscript-keyword">\let</span>~=<span class="enscript-keyword">\tie</span>
  <span class="enscript-keyword">\catcode</span> `\%=14
  <span class="enscript-keyword">\catcode</span> `<span class="enscript-keyword">\+</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span> `<span class="enscript-keyword">\&quot;</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span> `<span class="enscript-keyword">\|</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span> `<span class="enscript-keyword">\&lt;</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span> `<span class="enscript-keyword">\&gt;</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\escapechar</span>=`<span class="enscript-keyword">\\</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\b</span>=<span class="enscript-keyword">\ptexb</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\bullet</span>=<span class="enscript-keyword">\ptexbullet</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\c</span>=<span class="enscript-keyword">\ptexc</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\,</span>=<span class="enscript-keyword">\ptexcomma</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\.</span>=<span class="enscript-keyword">\ptexdot</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\dots</span>=<span class="enscript-keyword">\ptexdots</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\equiv</span>=<span class="enscript-keyword">\ptexequiv</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\!</span>=<span class="enscript-keyword">\ptexexclam</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\i</span>=<span class="enscript-keyword">\ptexi</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\indent</span>=<span class="enscript-keyword">\ptexindent</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\noindent</span>=<span class="enscript-keyword">\ptexnoindent</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\{</span>=<span class="enscript-keyword">\ptexlbrace</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\+</span>=<span class="enscript-keyword">\tabalign</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\}</span>=<span class="enscript-keyword">\ptexrbrace</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\/</span>=<span class="enscript-keyword">\ptexslash</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\*</span>=<span class="enscript-keyword">\ptexstar</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\t</span>=<span class="enscript-keyword">\ptext</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\frenchspacing</span>=<span class="enscript-keyword">\plainfrenchspacing</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\endldots</span>{<span class="enscript-keyword">\mathinner</span>{<span class="enscript-keyword">\ldots</span><span class="enscript-keyword">\ldots</span><span class="enscript-keyword">\ldots</span><span class="enscript-keyword">\ldots</span>}}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\enddots</span>{<span class="enscript-keyword">\relax</span><span class="enscript-keyword">\ifmmode</span><span class="enscript-keyword">\endldots</span><span class="enscript-keyword">\else</span><span class="enscript-variable-name">$\mathsurround=0pt \endldots\,$</span><span class="enscript-keyword">\fi</span>}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\@</span>{@}<span class="enscript-comment">%
</span>}
<span class="enscript-comment">% There is no need to define \Etex.
</span>
<span class="enscript-comment">% Define @lisp ... @end lisp.
</span><span class="enscript-comment">% @lisp environment forms a group so it can rebind things,
</span><span class="enscript-comment">% including the definition of @end lisp (which normally is erroneous).
</span>
<span class="enscript-comment">% Amount to narrow the margins by for @lisp.
</span><span class="enscript-keyword">\newskip</span><span class="enscript-keyword">\lispnarrowing</span> <span class="enscript-keyword">\lispnarrowing</span>=0.4in

<span class="enscript-comment">% This is the definition that ^^M gets inside @lisp, @example, and other
</span><span class="enscript-comment">% such environments.  \null is better than a space, since it doesn't
</span><span class="enscript-comment">% have any width.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\lisppar</span>{<span class="enscript-keyword">\null</span><span class="enscript-keyword">\endgraf</span>}

<span class="enscript-comment">% This space is always present above and below environments.
</span><span class="enscript-keyword">\newskip</span><span class="enscript-keyword">\envskipamount</span> <span class="enscript-keyword">\envskipamount</span> = 0pt

<span class="enscript-comment">% Make spacing and below environment symmetrical.  We use \parskip here
</span><span class="enscript-comment">% to help in doing that, since in @example-like environments \parskip
</span><span class="enscript-comment">% is reset to zero; thus the \afterenvbreak inserts no space -- but the
</span><span class="enscript-comment">% start of the next paragraph will insert \parskip.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\aboveenvbreak</span>{{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% =10000 instead of &lt;10000 because of a special case in \itemzzz and
</span>  <span class="enscript-comment">% \sectionheading, q.v.
</span>  <span class="enscript-keyword">\ifnum</span> <span class="enscript-keyword">\lastpenalty</span>=10000 <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\envskipamount</span> by <span class="enscript-keyword">\parskip</span>
    <span class="enscript-keyword">\endgraf</span>
    <span class="enscript-keyword">\ifdim</span><span class="enscript-keyword">\lastskip</span>&lt;<span class="enscript-keyword">\envskipamount</span>
      <span class="enscript-keyword">\removelastskip</span>
      <span class="enscript-comment">% it's not a good place to break if the last penalty was \nobreak
</span>      <span class="enscript-comment">% or better ...
</span>      <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\lastpenalty</span>&lt;10000 <span class="enscript-keyword">\penalty</span>-50 <span class="enscript-keyword">\fi</span>
      <span class="enscript-keyword">\vskip</span><span class="enscript-keyword">\envskipamount</span>
    <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\fi</span>
}}

<span class="enscript-keyword">\let</span><span class="enscript-keyword">\afterenvbreak</span> = <span class="enscript-keyword">\aboveenvbreak</span>

<span class="enscript-comment">% \nonarrowing is a flag.  If &quot;set&quot;, @lisp etc don't narrow margins; it will
</span><span class="enscript-comment">% also clear it, so that its embedded environments do the narrowing again.
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\nonarrowing</span>=<span class="enscript-keyword">\relax</span>

<span class="enscript-comment">% @cartouche ... @end cartouche: draw rectangle w/rounded corners around
</span><span class="enscript-comment">% environment contents.
</span><span class="enscript-keyword">\font</span><span class="enscript-keyword">\circle</span>=lcircle10
<span class="enscript-keyword">\newdimen</span><span class="enscript-keyword">\circthick</span>
<span class="enscript-keyword">\newdimen</span><span class="enscript-keyword">\cartouter</span><span class="enscript-keyword">\newdimen</span><span class="enscript-keyword">\cartinner</span>
<span class="enscript-keyword">\newskip</span><span class="enscript-keyword">\normbskip</span><span class="enscript-keyword">\newskip</span><span class="enscript-keyword">\normpskip</span><span class="enscript-keyword">\newskip</span><span class="enscript-keyword">\normlskip</span>
<span class="enscript-keyword">\circthick</span>=<span class="enscript-keyword">\fontdimen</span>8<span class="enscript-keyword">\circle</span>
<span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\ctl</span>{{<span class="enscript-keyword">\circle</span><span class="enscript-keyword">\char</span>'013<span class="enscript-keyword">\hskip</span> -6pt}}<span class="enscript-comment">% 6pt from pl file: 1/2charwidth
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\ctr</span>{{<span class="enscript-keyword">\hskip</span> 6pt<span class="enscript-keyword">\circle</span><span class="enscript-keyword">\char</span>'010}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\cbl</span>{{<span class="enscript-keyword">\circle</span><span class="enscript-keyword">\char</span>'012<span class="enscript-keyword">\hskip</span> -6pt}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\cbr</span>{{<span class="enscript-keyword">\hskip</span> 6pt<span class="enscript-keyword">\circle</span><span class="enscript-keyword">\char</span>'011}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\carttop</span>{<span class="enscript-keyword">\hbox</span> to <span class="enscript-keyword">\cartouter</span>{<span class="enscript-keyword">\hskip</span><span class="enscript-keyword">\lskip</span>
        <span class="enscript-keyword">\ctl</span><span class="enscript-keyword">\leaders</span><span class="enscript-keyword">\hrule</span> height<span class="enscript-keyword">\circthick</span><span class="enscript-keyword">\hfil</span><span class="enscript-keyword">\ctr</span>
        <span class="enscript-keyword">\hskip</span><span class="enscript-keyword">\rskip</span>}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\cartbot</span>{<span class="enscript-keyword">\hbox</span> to <span class="enscript-keyword">\cartouter</span>{<span class="enscript-keyword">\hskip</span><span class="enscript-keyword">\lskip</span>
        <span class="enscript-keyword">\cbl</span><span class="enscript-keyword">\leaders</span><span class="enscript-keyword">\hrule</span> height<span class="enscript-keyword">\circthick</span><span class="enscript-keyword">\hfil</span><span class="enscript-keyword">\cbr</span>
        <span class="enscript-keyword">\hskip</span><span class="enscript-keyword">\rskip</span>}}
<span class="enscript-comment">%
</span><span class="enscript-keyword">\newskip</span><span class="enscript-keyword">\lskip</span><span class="enscript-keyword">\newskip</span><span class="enscript-keyword">\rskip</span>

<span class="enscript-keyword">\envdef</span><span class="enscript-keyword">\cartouche</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifhmode</span><span class="enscript-keyword">\par</span><span class="enscript-keyword">\fi</span>  <span class="enscript-comment">% can't be in the midst of a paragraph.
</span>  <span class="enscript-keyword">\startsavinginserts</span>
  <span class="enscript-keyword">\lskip</span>=<span class="enscript-keyword">\leftskip</span> <span class="enscript-keyword">\rskip</span>=<span class="enscript-keyword">\rightskip</span>
  <span class="enscript-keyword">\leftskip</span>=0pt<span class="enscript-keyword">\rightskip</span>=0pt <span class="enscript-comment">% we want these *outside*.
</span>  <span class="enscript-keyword">\cartinner</span>=<span class="enscript-keyword">\hsize</span> <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\cartinner</span> by-<span class="enscript-keyword">\lskip</span>
  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\cartinner</span> by-<span class="enscript-keyword">\rskip</span>
  <span class="enscript-keyword">\cartouter</span>=<span class="enscript-keyword">\hsize</span>
  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\cartouter</span> by 18.4pt	<span class="enscript-comment">% allow for 3pt kerns on either
</span>				<span class="enscript-comment">% side, and for 6pt waste from
</span>				<span class="enscript-comment">% each corner char, and rule thickness
</span>  <span class="enscript-keyword">\normbskip</span>=<span class="enscript-keyword">\baselineskip</span> <span class="enscript-keyword">\normpskip</span>=<span class="enscript-keyword">\parskip</span> <span class="enscript-keyword">\normlskip</span>=<span class="enscript-keyword">\lineskip</span>
  <span class="enscript-comment">% Flag to tell @lisp, etc., not to narrow margin.
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\nonarrowing</span> = t<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\vbox</span><span class="enscript-keyword">\bgroup</span>
      <span class="enscript-keyword">\baselineskip</span>=0pt<span class="enscript-keyword">\parskip</span>=0pt<span class="enscript-keyword">\lineskip</span>=0pt
      <span class="enscript-keyword">\carttop</span>
      <span class="enscript-keyword">\hbox</span><span class="enscript-keyword">\bgroup</span>
	  <span class="enscript-keyword">\hskip</span><span class="enscript-keyword">\lskip</span>
	  <span class="enscript-keyword">\vrule</span><span class="enscript-keyword">\kern</span>3pt
	  <span class="enscript-keyword">\vbox</span><span class="enscript-keyword">\bgroup</span>
	      <span class="enscript-keyword">\kern</span>3pt
	      <span class="enscript-keyword">\hsize</span>=<span class="enscript-keyword">\cartinner</span>
	      <span class="enscript-keyword">\baselineskip</span>=<span class="enscript-keyword">\normbskip</span>
	      <span class="enscript-keyword">\lineskip</span>=<span class="enscript-keyword">\normlskip</span>
	      <span class="enscript-keyword">\parskip</span>=<span class="enscript-keyword">\normpskip</span>
	      <span class="enscript-keyword">\vskip</span> -<span class="enscript-keyword">\parskip</span>
	      <span class="enscript-keyword">\comment</span> <span class="enscript-comment">% For explanation, see the end of \def\group.
</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\Ecartouche</span>{<span class="enscript-comment">%
</span>              <span class="enscript-keyword">\ifhmode</span><span class="enscript-keyword">\par</span><span class="enscript-keyword">\fi</span>
	      <span class="enscript-keyword">\kern</span>3pt
	  <span class="enscript-keyword">\egroup</span>
	  <span class="enscript-keyword">\kern</span>3pt<span class="enscript-keyword">\vrule</span>
	  <span class="enscript-keyword">\hskip</span><span class="enscript-keyword">\rskip</span>
      <span class="enscript-keyword">\egroup</span>
      <span class="enscript-keyword">\cartbot</span>
  <span class="enscript-keyword">\egroup</span>
  <span class="enscript-keyword">\checkinserts</span>
}


<span class="enscript-comment">% This macro is called at the beginning of all the @example variants,
</span><span class="enscript-comment">% inside a group.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\nonfillstart</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\aboveenvbreak</span>
  <span class="enscript-keyword">\hfuzz</span> = 12pt <span class="enscript-comment">% Don't be fussy
</span>  <span class="enscript-keyword">\sepspaces</span> <span class="enscript-comment">% Make spaces be word-separators rather than space tokens.
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\par</span> = <span class="enscript-keyword">\lisppar</span> <span class="enscript-comment">% don't ignore blank lines
</span>  <span class="enscript-keyword">\obeylines</span> <span class="enscript-comment">% each line of input is a line of output
</span>  <span class="enscript-keyword">\parskip</span> = 0pt
  <span class="enscript-keyword">\parindent</span> = 0pt
  <span class="enscript-keyword">\emergencystretch</span> = 0pt <span class="enscript-comment">% don't try to avoid overfull boxes
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\nonarrowing</span><span class="enscript-keyword">\relax</span>
    <span class="enscript-keyword">\advance</span> <span class="enscript-keyword">\leftskip</span> by <span class="enscript-keyword">\lispnarrowing</span>
    <span class="enscript-keyword">\exdentamount</span>=<span class="enscript-keyword">\lispnarrowing</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\nonarrowing</span> = <span class="enscript-keyword">\relax</span>
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\exdent</span>=<span class="enscript-keyword">\nofillexdent</span>
}

<span class="enscript-comment">% If you want all examples etc. small: @set dispenvsize small.
</span><span class="enscript-comment">% If you want even small examples the full size: @set dispenvsize nosmall.
</span><span class="enscript-comment">% This affects the following displayed environments:
</span><span class="enscript-comment">%    @example, @display, @format, @lisp
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\smallword</span>{small}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\nosmallword</span>{nosmall}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\SETdispenvsize</span><span class="enscript-keyword">\relax</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\setnormaldispenv</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\SETdispenvsize</span><span class="enscript-keyword">\smallword</span>
    <span class="enscript-comment">% end paragraph for sake of leading, in case document has no blank
</span>    <span class="enscript-comment">% line.  This is redundant with what happens in \aboveenvbreak, but
</span>    <span class="enscript-comment">% we need to do it before changing the fonts, and it's inconvenient
</span>    <span class="enscript-comment">% to change the fonts afterward.
</span>    <span class="enscript-keyword">\ifnum</span> <span class="enscript-keyword">\lastpenalty</span>=10000 <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\endgraf</span> <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\smallexamplefonts</span> <span class="enscript-keyword">\rm</span>
  <span class="enscript-keyword">\fi</span>
}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\setsmalldispenv</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\SETdispenvsize</span><span class="enscript-keyword">\nosmallword</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\ifnum</span> <span class="enscript-keyword">\lastpenalty</span>=10000 <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\endgraf</span> <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\smallexamplefonts</span> <span class="enscript-keyword">\rm</span>
  <span class="enscript-keyword">\fi</span>
}

<span class="enscript-comment">% We often define two environments, @foo and @smallfoo.
</span><span class="enscript-comment">% Let's do it by one command:
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\makedispenv</span> #1#2{
  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\envdef</span><span class="enscript-keyword">\csname</span>#1<span class="enscript-keyword">\endcsname</span> {<span class="enscript-keyword">\setnormaldispenv</span> #2}
  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\envdef</span><span class="enscript-keyword">\csname</span> small#1<span class="enscript-keyword">\endcsname</span> {<span class="enscript-keyword">\setsmalldispenv</span> #2}
  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\csname</span> E#1<span class="enscript-keyword">\endcsname</span> <span class="enscript-keyword">\afterenvbreak</span>
  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\csname</span> Esmall#1<span class="enscript-keyword">\endcsname</span> <span class="enscript-keyword">\afterenvbreak</span>
}

<span class="enscript-comment">% Define two synonyms:
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\maketwodispenvs</span> #1#2#3{
  <span class="enscript-keyword">\makedispenv</span>{#1}{#3}
  <span class="enscript-keyword">\makedispenv</span>{#2}{#3}
}

<span class="enscript-comment">% @lisp: indented, narrowed, typewriter font; @example: same as @lisp.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% @smallexample and @smalllisp: use smaller fonts.
</span><span class="enscript-comment">% Originally contributed by Pavel@xerox.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\maketwodispenvs</span> {lisp}{example}{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\nonfillstart</span>
  <span class="enscript-keyword">\tt</span><span class="enscript-keyword">\quoteexpand</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\kbdfont</span> = <span class="enscript-keyword">\kbdexamplefont</span> <span class="enscript-comment">% Allow @kbd to do something special.
</span>  <span class="enscript-keyword">\gobble</span>       <span class="enscript-comment">% eat return
</span>}
<span class="enscript-comment">% @display/@smalldisplay: same as @lisp except keep current font.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\makedispenv</span> {display}{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\nonfillstart</span>
  <span class="enscript-keyword">\gobble</span>
}

<span class="enscript-comment">% @format/@smallformat: same as @display except don't narrow margins.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\makedispenv</span>{format}{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\nonarrowing</span> = t<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\nonfillstart</span>
  <span class="enscript-keyword">\gobble</span>
}

<span class="enscript-comment">% @flushleft: same as @format, but doesn't obey \SETdispenvsize.
</span><span class="enscript-keyword">\envdef</span><span class="enscript-keyword">\flushleft</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\nonarrowing</span> = t<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\nonfillstart</span>
  <span class="enscript-keyword">\gobble</span>
}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\Eflushleft</span> = <span class="enscript-keyword">\afterenvbreak</span>

<span class="enscript-comment">% @flushright.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\envdef</span><span class="enscript-keyword">\flushright</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\nonarrowing</span> = t<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\nonfillstart</span>
  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\leftskip</span> by 0pt plus 1fill
  <span class="enscript-keyword">\gobble</span>
}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\Eflushright</span> = <span class="enscript-keyword">\afterenvbreak</span>


<span class="enscript-comment">% @quotation does normal linebreaking (hence we can't use \nonfillstart)
</span><span class="enscript-comment">% and narrows the margins.  We keep \parskip nonzero in general, since
</span><span class="enscript-comment">% we're doing normal filling.  So, when using \aboveenvbreak and
</span><span class="enscript-comment">% \afterenvbreak, temporarily make \parskip 0.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\envdef</span><span class="enscript-keyword">\quotation</span>{<span class="enscript-comment">%
</span>  {<span class="enscript-keyword">\parskip</span>=0pt <span class="enscript-keyword">\aboveenvbreak</span>}<span class="enscript-comment">% because \aboveenvbreak inserts \parskip
</span>  <span class="enscript-keyword">\parindent</span>=0pt
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% @cartouche defines \nonarrowing to inhibit narrowing at next level down.
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\nonarrowing</span><span class="enscript-keyword">\relax</span>
    <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\leftskip</span> by <span class="enscript-keyword">\lispnarrowing</span>
    <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\rightskip</span> by <span class="enscript-keyword">\lispnarrowing</span>
    <span class="enscript-keyword">\exdentamount</span> = <span class="enscript-keyword">\lispnarrowing</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\nonarrowing</span> = <span class="enscript-keyword">\relax</span>
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\parsearg</span><span class="enscript-keyword">\quotationlabel</span>
}

<span class="enscript-comment">% We have retained a nonzero parskip for the environment, since we're
</span><span class="enscript-comment">% doing normal filling.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\Equotation</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\par</span>
  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\quotationauthor</span><span class="enscript-keyword">\undefined</span><span class="enscript-keyword">\else</span>
    <span class="enscript-comment">% indent a bit.
</span>    <span class="enscript-keyword">\leftline</span>{<span class="enscript-keyword">\kern</span> 2<span class="enscript-keyword">\leftskip</span> <span class="enscript-keyword">\sl</span> ---<span class="enscript-keyword">\quotationauthor</span>}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span>
  {<span class="enscript-keyword">\parskip</span>=0pt <span class="enscript-keyword">\afterenvbreak</span>}<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% If we're given an argument, typeset it in bold with a colon after.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\quotationlabel</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\temp</span>{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\temp</span><span class="enscript-keyword">\empty</span> <span class="enscript-keyword">\else</span>
    {<span class="enscript-keyword">\bf</span> #1: }<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span>
}


<span class="enscript-comment">% LaTeX-like @verbatim...@end verbatim and @verb{&lt;char&gt;...&lt;char&gt;}
</span><span class="enscript-comment">% If we want to allow any &lt;char&gt; as delimiter,
</span><span class="enscript-comment">% we need the curly braces so that makeinfo sees the @verb command, eg:
</span><span class="enscript-comment">% `@verbx...x' would look like the '@verbx' command.  <a href="mailto:--janneke@gnu.org">--janneke@gnu.org</a>
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% [Knuth]: Donald Ervin Knuth, 1996.  The TeXbook.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% [Knuth] p.344; only we need to do the other characters Texinfo sets
</span><span class="enscript-comment">% active too.  Otherwise, they get lost as the first character on a
</span><span class="enscript-comment">% verbatim line.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\dospecials</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\do</span><span class="enscript-keyword">\ </span><span class="enscript-keyword">\do</span><span class="enscript-keyword">\\</span><span class="enscript-keyword">\do</span><span class="enscript-keyword">\{</span><span class="enscript-keyword">\do</span><span class="enscript-keyword">\}</span><span class="enscript-keyword">\do</span><span class="enscript-keyword">\$</span><span class="enscript-keyword">\do</span><span class="enscript-keyword">\&amp;</span><span class="enscript-comment">%
</span>  <span class="enscript-keyword">\do</span><span class="enscript-keyword">\#</span><span class="enscript-keyword">\do</span><span class="enscript-keyword">\^</span><span class="enscript-keyword">\do</span><span class="enscript-keyword">\^</span>^K<span class="enscript-keyword">\do</span><span class="enscript-keyword">\_</span><span class="enscript-keyword">\do</span><span class="enscript-keyword">\^</span>^A<span class="enscript-keyword">\do</span>\%<span class="enscript-keyword">\do</span><span class="enscript-keyword">\~</span><span class="enscript-comment">%
</span>  <span class="enscript-keyword">\do</span><span class="enscript-keyword">\&lt;</span><span class="enscript-keyword">\do</span><span class="enscript-keyword">\&gt;</span><span class="enscript-keyword">\do</span><span class="enscript-keyword">\|</span><span class="enscript-keyword">\do</span><span class="enscript-keyword">\@</span><span class="enscript-keyword">\do</span>+<span class="enscript-keyword">\do</span><span class="enscript-keyword">\&quot;</span><span class="enscript-comment">%
</span>}
<span class="enscript-comment">%
</span><span class="enscript-comment">% [Knuth] p. 380
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\uncatcodespecials</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\do</span>##1{<span class="enscript-keyword">\catcode</span>`##1=<span class="enscript-keyword">\other</span>}<span class="enscript-keyword">\dospecials</span>}
<span class="enscript-comment">%
</span><span class="enscript-comment">% [Knuth] pp. 380,381,391
</span><span class="enscript-comment">% Disable Spanish ligatures ?` and !` of \tt font
</span><span class="enscript-keyword">\begingroup</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\`</span>=<span class="enscript-keyword">\active</span><span class="enscript-keyword">\gdef</span>`{<span class="enscript-keyword">\relax</span><span class="enscript-keyword">\lq</span>}
<span class="enscript-keyword">\endgroup</span>
<span class="enscript-comment">%
</span><span class="enscript-comment">% Setup for the @verb command.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% Eight spaces for a tab
</span><span class="enscript-keyword">\begingroup</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^I=<span class="enscript-keyword">\active</span>
  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\tabeightspaces</span>{<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^I=<span class="enscript-keyword">\active</span><span class="enscript-keyword">\def</span>^^I{<span class="enscript-keyword">\ </span><span class="enscript-keyword">\ </span><span class="enscript-keyword">\ </span><span class="enscript-keyword">\ </span><span class="enscript-keyword">\ </span><span class="enscript-keyword">\ </span><span class="enscript-keyword">\ </span><span class="enscript-keyword">\ </span>}}
<span class="enscript-keyword">\endgroup</span>
<span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\setupverb</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\tt</span>  <span class="enscript-comment">% easiest (and conventionally used) font for verbatim
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\par</span>{<span class="enscript-keyword">\leavevmode</span><span class="enscript-keyword">\endgraf</span>}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\`</span>=<span class="enscript-keyword">\active</span>
  <span class="enscript-keyword">\tabeightspaces</span>
  <span class="enscript-comment">% Respect line breaks,
</span>  <span class="enscript-comment">% print special symbols as themselves, and
</span>  <span class="enscript-comment">% make each space count
</span>  <span class="enscript-comment">% must do in this order:
</span>  <span class="enscript-keyword">\obeylines</span> <span class="enscript-keyword">\uncatcodespecials</span> <span class="enscript-keyword">\sepspaces</span>
}

<span class="enscript-comment">% Setup for the @verbatim environment
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% Real tab expansion
</span><span class="enscript-keyword">\newdimen</span><span class="enscript-keyword">\tabw</span> <span class="enscript-keyword">\setbox</span>0=<span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\tt</span><span class="enscript-keyword">\space</span>} <span class="enscript-keyword">\tabw</span>=8<span class="enscript-keyword">\wd</span>0 <span class="enscript-comment">% tab amount
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\starttabbox</span>{<span class="enscript-keyword">\setbox</span>0=<span class="enscript-keyword">\hbox</span><span class="enscript-keyword">\bgroup</span>}

<span class="enscript-comment">% Allow an option to not replace quotes with a regular directed right
</span><span class="enscript-comment">% quote/apostrophe (char 0x27), but instead use the undirected quote
</span><span class="enscript-comment">% from cmtt (char 0x0d).  The undirected quote is ugly, so don't make it
</span><span class="enscript-comment">% the default, but it works for pasting with more pdf viewers (at least
</span><span class="enscript-comment">% evince), the lilypond developers report.  xpdf does work with the
</span><span class="enscript-comment">% regular 0x27.  
</span><span class="enscript-comment">% 
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\codequoteright</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\csname</span> SETcodequoteundirected<span class="enscript-keyword">\endcsname</span><span class="enscript-keyword">\relax</span>
    '<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\char</span>'15
  <span class="enscript-keyword">\fi</span>
}
<span class="enscript-comment">%
</span><span class="enscript-comment">% and a similar option for the left quote char vs. a grave accent.
</span><span class="enscript-comment">% Modern fonts display ASCII 0x60 as a grave accent, so some people like
</span><span class="enscript-comment">% the code environments to do likewise.
</span><span class="enscript-comment">% 
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\codequoteleft</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\csname</span> SETcodequotebacktick<span class="enscript-keyword">\endcsname</span><span class="enscript-keyword">\relax</span>
    `<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\char</span>'22
  <span class="enscript-keyword">\fi</span>
}
<span class="enscript-comment">%
</span><span class="enscript-keyword">\begingroup</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^I=<span class="enscript-keyword">\active</span>
  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\tabexpand</span>{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^I=<span class="enscript-keyword">\active</span>
    <span class="enscript-keyword">\def</span>^^I{<span class="enscript-keyword">\leavevmode</span><span class="enscript-keyword">\egroup</span>
      <span class="enscript-keyword">\dimen</span>0=<span class="enscript-keyword">\wd</span>0 <span class="enscript-comment">% the width so far, or since the previous tab
</span>      <span class="enscript-keyword">\divide</span><span class="enscript-keyword">\dimen</span>0 by<span class="enscript-keyword">\tabw</span>
      <span class="enscript-keyword">\multiply</span><span class="enscript-keyword">\dimen</span>0 by<span class="enscript-keyword">\tabw</span> <span class="enscript-comment">% compute previous multiple of \tabw
</span>      <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\dimen</span>0 by<span class="enscript-keyword">\tabw</span>  <span class="enscript-comment">% advance to next multiple of \tabw
</span>      <span class="enscript-keyword">\wd</span>0=<span class="enscript-keyword">\dimen</span>0 <span class="enscript-keyword">\box</span>0 <span class="enscript-keyword">\starttabbox</span>
    }<span class="enscript-comment">%
</span>  }
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\'</span>=<span class="enscript-keyword">\active</span>
  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\rquoteexpand</span>{<span class="enscript-keyword">\catcode</span><span class="enscript-keyword">\rquoteChar</span>=<span class="enscript-keyword">\active</span> <span class="enscript-keyword">\def</span>'{<span class="enscript-keyword">\codequoteright</span>}}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\`</span>=<span class="enscript-keyword">\active</span>
  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\lquoteexpand</span>{<span class="enscript-keyword">\catcode</span><span class="enscript-keyword">\lquoteChar</span>=<span class="enscript-keyword">\active</span> <span class="enscript-keyword">\def</span>`{<span class="enscript-keyword">\codequoteleft</span>}}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\quoteexpand</span>{<span class="enscript-keyword">\rquoteexpand</span> <span class="enscript-keyword">\lquoteexpand</span>}<span class="enscript-comment">%
</span><span class="enscript-keyword">\endgroup</span>

<span class="enscript-comment">% start the verbatim environment.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\setupverbatim</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\nonarrowing</span> = t<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\nonfillstart</span>
  <span class="enscript-comment">% Easiest (and conventionally used) font for verbatim
</span>  <span class="enscript-keyword">\tt</span>
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\par</span>{<span class="enscript-keyword">\leavevmode</span><span class="enscript-keyword">\egroup</span><span class="enscript-keyword">\box</span>0<span class="enscript-keyword">\endgraf</span>}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\`</span>=<span class="enscript-keyword">\active</span>
  <span class="enscript-keyword">\tabexpand</span>
  <span class="enscript-keyword">\quoteexpand</span>
  <span class="enscript-comment">% Respect line breaks,
</span>  <span class="enscript-comment">% print special symbols as themselves, and
</span>  <span class="enscript-comment">% make each space count
</span>  <span class="enscript-comment">% must do in this order:
</span>  <span class="enscript-keyword">\obeylines</span> <span class="enscript-keyword">\uncatcodespecials</span> <span class="enscript-keyword">\sepspaces</span>
  <span class="enscript-keyword">\everypar</span>{<span class="enscript-keyword">\starttabbox</span>}<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% Do the @verb magic: verbatim text is quoted by unique
</span><span class="enscript-comment">% delimiter characters.  Before first delimiter expect a
</span><span class="enscript-comment">% right brace, after last delimiter expect closing brace:
</span><span class="enscript-comment">%
</span><span class="enscript-comment">%    \def\doverb'{'&lt;char&gt;#1&lt;char&gt;'}'{#1}
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% [Knuth] p. 382; only eat outer {}
</span><span class="enscript-keyword">\begingroup</span>
  <span class="enscript-keyword">\catcode</span>`[=1<span class="enscript-keyword">\catcode</span>`]=2<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\{</span>=<span class="enscript-keyword">\other</span><span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\}</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\doverb</span>{#1[<span class="enscript-keyword">\def</span><span class="enscript-keyword">\next</span>##1#1}[##1<span class="enscript-keyword">\endgroup</span>]<span class="enscript-keyword">\next</span>]
<span class="enscript-keyword">\endgroup</span>
<span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\verb</span>{<span class="enscript-keyword">\begingroup</span><span class="enscript-keyword">\setupverb</span><span class="enscript-keyword">\doverb</span>}
<span class="enscript-comment">%
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% Do the @verbatim magic: define the macro \doverbatim so that
</span><span class="enscript-comment">% the (first) argument ends when '@end verbatim' is reached, ie:
</span><span class="enscript-comment">%
</span><span class="enscript-comment">%     \def\doverbatim#1@end verbatim{#1}
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% For Texinfo it's a lot easier than for LaTeX,
</span><span class="enscript-comment">% because texinfo's \verbatim doesn't stop at '\end{verbatim}':
</span><span class="enscript-comment">% we need not redefine '\', '{' and '}'.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% Inspired by LaTeX's verbatim command set [latex.ltx]
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\begingroup</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\ </span>=<span class="enscript-keyword">\active</span>
  <span class="enscript-keyword">\obeylines</span> <span class="enscript-comment">%
</span>  <span class="enscript-comment">% ignore everything up to the first ^^M, that's the newline at the end
</span>  <span class="enscript-comment">% of the @verbatim input line itself.  Otherwise we get an extra blank
</span>  <span class="enscript-comment">% line in the output.
</span>  <span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\doverbatim</span>#1^^M#2@end verbatim{#2<span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\end</span><span class="enscript-keyword">\gobble</span> verbatim}<span class="enscript-comment">%
</span>  <span class="enscript-comment">% We really want {...\end verbatim} in the body of the macro, but
</span>  <span class="enscript-comment">% without the active space; thus we have to use \xdef and \gobble.
</span><span class="enscript-keyword">\endgroup</span>
<span class="enscript-comment">%
</span><span class="enscript-keyword">\envdef</span><span class="enscript-keyword">\verbatim</span>{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\setupverbatim</span><span class="enscript-keyword">\doverbatim</span>
}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\Everbatim</span> = <span class="enscript-keyword">\afterenvbreak</span>


<span class="enscript-comment">% @verbatiminclude FILE - insert text of file in verbatim environment.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\verbatiminclude</span>{<span class="enscript-keyword">\parseargusing</span><span class="enscript-keyword">\filenamecatcodes</span><span class="enscript-keyword">\doverbatiminclude</span>}
<span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\doverbatiminclude</span>#1{<span class="enscript-comment">%
</span>  {<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\makevalueexpandable</span>
    <span class="enscript-keyword">\setupverbatim</span>
    <span class="enscript-keyword">\input</span> #1
    <span class="enscript-keyword">\afterenvbreak</span>
  }<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% @copying ... @end copying.
</span><span class="enscript-comment">% Save the text away for @insertcopying later.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% We save the uninterpreted tokens, rather than creating a box.
</span><span class="enscript-comment">% Saving the text in a box would be much easier, but then all the
</span><span class="enscript-comment">% typesetting commands (@smallbook, font changes, etc.) have to be done
</span><span class="enscript-comment">% beforehand -- and a) we want @copying to be done first in the source
</span><span class="enscript-comment">% file; b) letting users define the frontmatter in as flexible order as
</span><span class="enscript-comment">% possible is very desirable.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\copying</span>{<span class="enscript-keyword">\checkenv</span>{}<span class="enscript-keyword">\begingroup</span><span class="enscript-keyword">\scanargctxt</span><span class="enscript-keyword">\docopying</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\docopying</span>#1@end copying{<span class="enscript-keyword">\endgroup</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\copyingtext</span>{#1}}
<span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\insertcopying</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\begingroup</span>
    <span class="enscript-keyword">\parindent</span> = 0pt  <span class="enscript-comment">% paragraph indentation looks wrong on title page
</span>    <span class="enscript-keyword">\scanexp</span><span class="enscript-keyword">\copyingtext</span>
  <span class="enscript-keyword">\endgroup</span>
}


<span class="enscript-keyword">\message</span>{defuns,}
<span class="enscript-comment">% @defun etc.
</span>
<span class="enscript-keyword">\newskip</span><span class="enscript-keyword">\defbodyindent</span> <span class="enscript-keyword">\defbodyindent</span>=.4in
<span class="enscript-keyword">\newskip</span><span class="enscript-keyword">\defargsindent</span> <span class="enscript-keyword">\defargsindent</span>=50pt
<span class="enscript-keyword">\newskip</span><span class="enscript-keyword">\deflastargmargin</span> <span class="enscript-keyword">\deflastargmargin</span>=18pt
<span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\defunpenalty</span>

<span class="enscript-comment">% Start the processing of @deffn:
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\startdefun</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\lastpenalty</span>&lt;10000
    <span class="enscript-keyword">\medbreak</span>
    <span class="enscript-keyword">\defunpenalty</span>=10003 <span class="enscript-comment">% Will keep this @deffn together with the
</span>                        <span class="enscript-comment">% following @def command, see below.
</span>  <span class="enscript-keyword">\else</span>
    <span class="enscript-comment">% If there are two @def commands in a row, we'll have a \nobreak,
</span>    <span class="enscript-comment">% which is there to keep the function description together with its
</span>    <span class="enscript-comment">% header.  But if there's nothing but headers, we need to allow a
</span>    <span class="enscript-comment">% break somewhere.  Check specifically for penalty 10002, inserted
</span>    <span class="enscript-comment">% by \printdefunline, instead of 10000, since the sectioning
</span>    <span class="enscript-comment">% commands also insert a nobreak penalty, and we don't want to allow
</span>    <span class="enscript-comment">% a break between a section heading and a defun.
</span>    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% As a minor refinement, we avoid &quot;club&quot; headers by signalling
</span>    <span class="enscript-comment">% with penalty of 10003 after the very first @deffn in the
</span>    <span class="enscript-comment">% sequence (see above), and penalty of 10002 after any following
</span>    <span class="enscript-comment">% @def command.
</span>    <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\lastpenalty</span>=10002 <span class="enscript-keyword">\penalty</span>2000 <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\defunpenalty</span>=10002 <span class="enscript-keyword">\fi</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Similarly, after a section heading, do not allow a break.
</span>    <span class="enscript-comment">% But do insert the glue.
</span>    <span class="enscript-keyword">\medskip</span>  <span class="enscript-comment">% preceded by discardable penalty, so not a breakpoint
</span>  <span class="enscript-keyword">\fi</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\parindent</span>=0in
  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\leftskip</span> by <span class="enscript-keyword">\defbodyindent</span>
  <span class="enscript-keyword">\exdentamount</span>=<span class="enscript-keyword">\defbodyindent</span>
}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\dodefunx</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% First, check whether we are in the right environment:
</span>  <span class="enscript-keyword">\checkenv</span>#1<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% As above, allow line break if we have multiple x headers in a row.
</span>  <span class="enscript-comment">% It's not a great place, though.
</span>  <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\lastpenalty</span>=10002 <span class="enscript-keyword">\penalty</span>3000 <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\defunpenalty</span>=10002 <span class="enscript-keyword">\fi</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% And now, it's time to reuse the body of the original defun:
</span>  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\gobbledefun</span>#1<span class="enscript-comment">%
</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\gobbledefun</span>#1<span class="enscript-keyword">\startdefun</span>{}

<span class="enscript-comment">% \printdefunline \deffnheader{text}
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\printdefunline</span>#1#2{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\begingroup</span>
    <span class="enscript-comment">% call \deffnheader:
</span>    #1#2 <span class="enscript-keyword">\endheader</span>
    <span class="enscript-comment">% common ending:
</span>    <span class="enscript-keyword">\interlinepenalty</span> = 10000
    <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\rightskip</span> by 0pt plus 1fil
    <span class="enscript-keyword">\endgraf</span>
    <span class="enscript-keyword">\nobreak</span><span class="enscript-keyword">\vskip</span> -<span class="enscript-keyword">\parskip</span>
    <span class="enscript-keyword">\penalty</span><span class="enscript-keyword">\defunpenalty</span>  <span class="enscript-comment">% signal to \startdefun and \dodefunx
</span>    <span class="enscript-comment">% Some of the @defun-type tags do not enable magic parentheses,
</span>    <span class="enscript-comment">% rendering the following check redundant.  But we don't optimize.
</span>    <span class="enscript-keyword">\checkparencounts</span>
  <span class="enscript-keyword">\endgroup</span>
}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\Edefun</span>{<span class="enscript-keyword">\endgraf</span><span class="enscript-keyword">\medbreak</span>}

<span class="enscript-comment">% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn;
</span><span class="enscript-comment">% the only thing remainnig is to define \deffnheader.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\makedefun</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\csname</span> E#1<span class="enscript-keyword">\endcsname</span> = <span class="enscript-keyword">\Edefun</span>
  <span class="enscript-keyword">\edef</span><span class="enscript-keyword">\temp</span>{<span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\domakedefun</span>
    <span class="enscript-keyword">\makecsname</span>{#1}<span class="enscript-keyword">\makecsname</span>{#1x}<span class="enscript-keyword">\makecsname</span>{#1header}}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\temp</span>
}

<span class="enscript-comment">% \domakedefun \deffn \deffnx \deffnheader
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% Define \deffn and \deffnx, without parameters.
</span><span class="enscript-comment">% \deffnheader has to be defined explicitly.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\domakedefun</span>#1#2#3{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\envdef</span>#1{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\startdefun</span>
    <span class="enscript-keyword">\parseargusing</span><span class="enscript-keyword">\activeparens</span>{<span class="enscript-keyword">\printdefunline</span>#3}<span class="enscript-comment">%
</span>  }<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span>#2{<span class="enscript-keyword">\dodefunx</span>#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span>#3<span class="enscript-comment">%
</span>}

<span class="enscript-comment">%%% Untyped functions:
</span>
<span class="enscript-comment">% @deffn category name args
</span><span class="enscript-keyword">\makedefun</span>{deffn}{<span class="enscript-keyword">\deffngeneral</span>{}}

<span class="enscript-comment">% @deffn category class name args
</span><span class="enscript-keyword">\makedefun</span>{defop}#1 {<span class="enscript-keyword">\defopon</span>{#1<span class="enscript-keyword">\ </span><span class="enscript-keyword">\putwordon</span>}}

<span class="enscript-comment">% \defopon {category on}class name args
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\defopon</span>#1#2 {<span class="enscript-keyword">\deffngeneral</span>{<span class="enscript-keyword">\putwordon</span><span class="enscript-keyword">\ </span><span class="enscript-keyword">\code</span>{#2}}{#1<span class="enscript-keyword">\ </span><span class="enscript-keyword">\code</span>{#2}} }

<span class="enscript-comment">% \deffngeneral {subind}category name args
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\deffngeneral</span>#1#2 #3 #4<span class="enscript-keyword">\endheader</span>{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}.
</span>  <span class="enscript-keyword">\dosubind</span>{fn}{<span class="enscript-keyword">\code</span>{#3}}{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\defname</span>{#2}{}{#3}<span class="enscript-keyword">\magicamp</span><span class="enscript-keyword">\defunargs</span>{#4<span class="enscript-keyword">\unskip</span>}<span class="enscript-comment">%
</span>}

<span class="enscript-comment">%%% Typed functions:
</span>
<span class="enscript-comment">% @deftypefn category type name args
</span><span class="enscript-keyword">\makedefun</span>{deftypefn}{<span class="enscript-keyword">\deftypefngeneral</span>{}}

<span class="enscript-comment">% @deftypeop category class type name args
</span><span class="enscript-keyword">\makedefun</span>{deftypeop}#1 {<span class="enscript-keyword">\deftypeopon</span>{#1<span class="enscript-keyword">\ </span><span class="enscript-keyword">\putwordon</span>}}

<span class="enscript-comment">% \deftypeopon {category on}class type name args
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\deftypeopon</span>#1#2 {<span class="enscript-keyword">\deftypefngeneral</span>{<span class="enscript-keyword">\putwordon</span><span class="enscript-keyword">\ </span><span class="enscript-keyword">\code</span>{#2}}{#1<span class="enscript-keyword">\ </span><span class="enscript-keyword">\code</span>{#2}} }

<span class="enscript-comment">% \deftypefngeneral {subind}category type name args
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\deftypefngeneral</span>#1#2 #3 #4 #5<span class="enscript-keyword">\endheader</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\dosubind</span>{fn}{<span class="enscript-keyword">\code</span>{#4}}{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\defname</span>{#2}{#3}{#4}<span class="enscript-keyword">\defunargs</span>{#5<span class="enscript-keyword">\unskip</span>}<span class="enscript-comment">%
</span>}

<span class="enscript-comment">%%% Typed variables:
</span>
<span class="enscript-comment">% @deftypevr category type var args
</span><span class="enscript-keyword">\makedefun</span>{deftypevr}{<span class="enscript-keyword">\deftypecvgeneral</span>{}}

<span class="enscript-comment">% @deftypecv category class type var args
</span><span class="enscript-keyword">\makedefun</span>{deftypecv}#1 {<span class="enscript-keyword">\deftypecvof</span>{#1<span class="enscript-keyword">\ </span><span class="enscript-keyword">\putwordof</span>}}

<span class="enscript-comment">% \deftypecvof {category of}class type var args
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\deftypecvof</span>#1#2 {<span class="enscript-keyword">\deftypecvgeneral</span>{<span class="enscript-keyword">\putwordof</span><span class="enscript-keyword">\ </span><span class="enscript-keyword">\code</span>{#2}}{#1<span class="enscript-keyword">\ </span><span class="enscript-keyword">\code</span>{#2}} }

<span class="enscript-comment">% \deftypecvgeneral {subind}category type var args
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\deftypecvgeneral</span>#1#2 #3 #4 #5<span class="enscript-keyword">\endheader</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\dosubind</span>{vr}{<span class="enscript-keyword">\code</span>{#4}}{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\defname</span>{#2}{#3}{#4}<span class="enscript-keyword">\defunargs</span>{#5<span class="enscript-keyword">\unskip</span>}<span class="enscript-comment">%
</span>}

<span class="enscript-comment">%%% Untyped variables:
</span>
<span class="enscript-comment">% @defvr category var args
</span><span class="enscript-keyword">\makedefun</span>{defvr}#1 {<span class="enscript-keyword">\deftypevrheader</span>{#1} {} }

<span class="enscript-comment">% @defcv category class var args
</span><span class="enscript-keyword">\makedefun</span>{defcv}#1 {<span class="enscript-keyword">\defcvof</span>{#1<span class="enscript-keyword">\ </span><span class="enscript-keyword">\putwordof</span>}}

<span class="enscript-comment">% \defcvof {category of}class var args
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\defcvof</span>#1#2 {<span class="enscript-keyword">\deftypecvof</span>{#1}#2 {} }

<span class="enscript-comment">%%% Type:
</span><span class="enscript-comment">% @deftp category name args
</span><span class="enscript-keyword">\makedefun</span>{deftp}#1 #2 #3<span class="enscript-keyword">\endheader</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\doind</span>{tp}{<span class="enscript-keyword">\code</span>{#2}}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\defname</span>{#1}{}{#2}<span class="enscript-keyword">\defunargs</span>{#3<span class="enscript-keyword">\unskip</span>}<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% Remaining @defun-like shortcuts:
</span><span class="enscript-keyword">\makedefun</span>{defun}{<span class="enscript-keyword">\deffnheader</span>{<span class="enscript-keyword">\putwordDeffunc</span>} }
<span class="enscript-keyword">\makedefun</span>{defmac}{<span class="enscript-keyword">\deffnheader</span>{<span class="enscript-keyword">\putwordDefmac</span>} }
<span class="enscript-keyword">\makedefun</span>{defspec}{<span class="enscript-keyword">\deffnheader</span>{<span class="enscript-keyword">\putwordDefspec</span>} }
<span class="enscript-keyword">\makedefun</span>{deftypefun}{<span class="enscript-keyword">\deftypefnheader</span>{<span class="enscript-keyword">\putwordDeffunc</span>} }
<span class="enscript-keyword">\makedefun</span>{defvar}{<span class="enscript-keyword">\defvrheader</span>{<span class="enscript-keyword">\putwordDefvar</span>} }
<span class="enscript-keyword">\makedefun</span>{defopt}{<span class="enscript-keyword">\defvrheader</span>{<span class="enscript-keyword">\putwordDefopt</span>} }
<span class="enscript-keyword">\makedefun</span>{deftypevar}{<span class="enscript-keyword">\deftypevrheader</span>{<span class="enscript-keyword">\putwordDefvar</span>} }
<span class="enscript-keyword">\makedefun</span>{defmethod}{<span class="enscript-keyword">\defopon</span><span class="enscript-keyword">\putwordMethodon</span>}
<span class="enscript-keyword">\makedefun</span>{deftypemethod}{<span class="enscript-keyword">\deftypeopon</span><span class="enscript-keyword">\putwordMethodon</span>}
<span class="enscript-keyword">\makedefun</span>{defivar}{<span class="enscript-keyword">\defcvof</span><span class="enscript-keyword">\putwordInstanceVariableof</span>}
<span class="enscript-keyword">\makedefun</span>{deftypeivar}{<span class="enscript-keyword">\deftypecvof</span><span class="enscript-keyword">\putwordInstanceVariableof</span>}

<span class="enscript-comment">% \defname, which formats the name of the @def (not the args).
</span><span class="enscript-comment">% #1 is the category, such as &quot;Function&quot;.
</span><span class="enscript-comment">% #2 is the return type, if any.
</span><span class="enscript-comment">% #3 is the function name.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% We are followed by (but not passed) the arguments, if any.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\defname</span>#1#2#3{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% Get the values of \leftskip and \rightskip as they were outside the @def...
</span>  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\leftskip</span> by -<span class="enscript-keyword">\defbodyindent</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% How we'll format the type name.  Putting it in brackets helps
</span>  <span class="enscript-comment">% distinguish it from the body text that may end up on the next line
</span>  <span class="enscript-comment">% just below it.
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\temp</span>{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\setbox</span>0=<span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\kern</span><span class="enscript-keyword">\deflastargmargin</span> <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\temp</span><span class="enscript-keyword">\empty</span><span class="enscript-keyword">\else</span> [<span class="enscript-keyword">\rm</span><span class="enscript-keyword">\temp</span>]<span class="enscript-keyword">\fi</span>}
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Figure out line sizes for the paragraph shape.
</span>  <span class="enscript-comment">% The first line needs space for \box0; but if \rightskip is nonzero,
</span>  <span class="enscript-comment">% we need only space for the part of \box0 which exceeds it:
</span>  <span class="enscript-keyword">\dimen</span>0=<span class="enscript-keyword">\hsize</span>  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\dimen</span>0 by -<span class="enscript-keyword">\wd</span>0  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\dimen</span>0 by <span class="enscript-keyword">\rightskip</span>
  <span class="enscript-comment">% The continuations:
</span>  <span class="enscript-keyword">\dimen</span>2=<span class="enscript-keyword">\hsize</span>  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\dimen</span>2 by -<span class="enscript-keyword">\defargsindent</span>
  <span class="enscript-comment">% (plain.tex says that \dimen1 should be used only as global.)
</span>  <span class="enscript-keyword">\parshape</span> 2 0in <span class="enscript-keyword">\dimen</span>0 <span class="enscript-keyword">\defargsindent</span> <span class="enscript-keyword">\dimen</span>2
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Put the type name to the right margin.
</span>  <span class="enscript-keyword">\noindent</span>
  <span class="enscript-keyword">\hbox</span> to 0pt{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\hfil</span><span class="enscript-keyword">\box</span>0 <span class="enscript-keyword">\kern</span>-<span class="enscript-keyword">\hsize</span>
    <span class="enscript-comment">% \hsize has to be shortened this way:
</span>    <span class="enscript-keyword">\kern</span><span class="enscript-keyword">\leftskip</span>
    <span class="enscript-comment">% Intentionally do not respect \rightskip, since we need the space.
</span>  }<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Allow all lines to be underfull without complaint:
</span>  <span class="enscript-keyword">\tolerance</span>=10000 <span class="enscript-keyword">\hbadness</span>=10000
  <span class="enscript-keyword">\exdentamount</span>=<span class="enscript-keyword">\defbodyindent</span>
  {<span class="enscript-comment">%
</span>    <span class="enscript-comment">% defun fonts. We use typewriter by default (used to be bold) because:
</span>    <span class="enscript-comment">% . we're printing identifiers, they should be in tt in principle.
</span>    <span class="enscript-comment">% . in languages with many accents, such as Czech or French, it's
</span>    <span class="enscript-comment">%   common to leave accents off identifiers.  The result looks ok in
</span>    <span class="enscript-comment">%   tt, but exceedingly strange in rm.
</span>    <span class="enscript-comment">% . we don't want -- and --- to be treated as ligatures.
</span>    <span class="enscript-comment">% . this still does not fix the ?` and !` ligatures, but so far no
</span>    <span class="enscript-comment">%   one has made identifiers using them :).
</span>    <span class="enscript-keyword">\df</span> <span class="enscript-keyword">\tt</span>
    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\temp</span>{#2}<span class="enscript-comment">% return value type
</span>    <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\temp</span><span class="enscript-keyword">\empty</span><span class="enscript-keyword">\else</span> <span class="enscript-keyword">\tclose</span>{<span class="enscript-keyword">\temp</span>} <span class="enscript-keyword">\fi</span>
    #3<span class="enscript-comment">% output function name
</span>  }<span class="enscript-comment">%
</span>  {<span class="enscript-keyword">\rm</span><span class="enscript-keyword">\enskip</span>}<span class="enscript-comment">% hskip 0.5 em of \tenrm
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\boldbrax</span>
  <span class="enscript-comment">% arguments will be output next, if any.
</span>}

<span class="enscript-comment">% Print arguments in slanted roman (not ttsl), inconsistently with using
</span><span class="enscript-comment">% tt for the name.  This is because literal text is sometimes needed in
</span><span class="enscript-comment">% the argument list (groff manual), and ttsl and tt are not very
</span><span class="enscript-comment">% distinguishable.  Prevent hyphenation at `-' chars.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\defunargs</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% use sl by default (not ttsl),
</span>  <span class="enscript-comment">% tt for the names.
</span>  <span class="enscript-keyword">\df</span> <span class="enscript-keyword">\sl</span> <span class="enscript-keyword">\hyphenchar</span><span class="enscript-keyword">\font</span>=0
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% On the other hand, if an argument has two dashes (for instance), we
</span>  <span class="enscript-comment">% want a way to get ttsl.  Let's try @var for that.
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\var</span>=<span class="enscript-keyword">\ttslanted</span>
  #1<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\sl</span><span class="enscript-keyword">\hyphenchar</span><span class="enscript-keyword">\font</span>=45
}

<span class="enscript-comment">% We want ()&amp;[] to print specially on the defun line.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\activeparens</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\(</span>=<span class="enscript-keyword">\active</span> <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\)</span>=<span class="enscript-keyword">\active</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\[</span>=<span class="enscript-keyword">\active</span> <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\]</span>=<span class="enscript-keyword">\active</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\&amp;</span>=<span class="enscript-keyword">\active</span>
}

<span class="enscript-comment">% Make control sequences which act like normal parenthesis chars.
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\lparen</span> = ( <span class="enscript-keyword">\let</span><span class="enscript-keyword">\rparen</span> = )

<span class="enscript-comment">% Be sure that we always have a definition for `(', etc.  For example,
</span><span class="enscript-comment">% if the fn name has parens in it, \boldbrax will not be in effect yet,
</span><span class="enscript-comment">% so TeX would otherwise complain about undefined control sequence.
</span>{
  <span class="enscript-keyword">\activeparens</span>
  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span>(=<span class="enscript-keyword">\lparen</span> <span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span>)=<span class="enscript-keyword">\rparen</span>
  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span>[=<span class="enscript-keyword">\lbrack</span> <span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span>]=<span class="enscript-keyword">\rbrack</span>
  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span>&amp; = <span class="enscript-keyword">\&amp;</span>

  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\boldbrax</span>{<span class="enscript-keyword">\let</span>(=<span class="enscript-keyword">\opnr</span><span class="enscript-keyword">\let</span>)=<span class="enscript-keyword">\clnr</span><span class="enscript-keyword">\let</span>[=<span class="enscript-keyword">\lbrb</span><span class="enscript-keyword">\let</span>]=<span class="enscript-keyword">\rbrb</span>}
  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\magicamp</span>{<span class="enscript-keyword">\let</span>&amp;=<span class="enscript-keyword">\amprm</span>}
}

<span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\parencount</span>

<span class="enscript-comment">% If we encounter &amp;foo, then turn on ()-hacking afterwards
</span><span class="enscript-keyword">\newif</span><span class="enscript-keyword">\ifampseen</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\amprm</span>#1 {<span class="enscript-keyword">\ampseentrue</span>{<span class="enscript-keyword">\bf</span><span class="enscript-keyword">\&amp;</span>#1 }}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\parenfont</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifampseen</span>
    <span class="enscript-comment">% At the first level, print parens in roman,
</span>    <span class="enscript-comment">% otherwise use the default font.
</span>    <span class="enscript-keyword">\ifnum</span> <span class="enscript-keyword">\parencount</span>=1 <span class="enscript-keyword">\rm</span> <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-comment">% The \sf parens (in \boldbrax) actually are a little bolder than
</span>    <span class="enscript-comment">% the contained text.  This is especially needed for [ and ] .
</span>    <span class="enscript-keyword">\sf</span>
  <span class="enscript-keyword">\fi</span>
}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\infirstlevel</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifampseen</span>
    <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\parencount</span>=1
      #1<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\fi</span>
}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\bfafterword</span>#1 {#1 <span class="enscript-keyword">\bf</span>}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\opnr</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\parencount</span> by 1
  {<span class="enscript-keyword">\parenfont</span>(}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\infirstlevel</span> <span class="enscript-keyword">\bfafterword</span>
}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\clnr</span>{<span class="enscript-comment">%
</span>  {<span class="enscript-keyword">\parenfont</span>)}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\infirstlevel</span> <span class="enscript-keyword">\sl</span>
  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\parencount</span> by -1
}

<span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\brackcount</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\lbrb</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\brackcount</span> by 1
  {<span class="enscript-keyword">\bf</span>[}<span class="enscript-comment">%
</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\rbrb</span>{<span class="enscript-comment">%
</span>  {<span class="enscript-keyword">\bf</span>]}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\brackcount</span> by -1
}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\checkparencounts</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\parencount</span>=0 <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\badparencount</span> <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\brackcount</span>=0 <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\badbrackcount</span> <span class="enscript-keyword">\fi</span>
}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\badparencount</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\errmessage</span>{Unbalanced parentheses in @def}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\parencount</span>=0
}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\badbrackcount</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\errmessage</span>{Unbalanced square braces in @def}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\brackcount</span>=0
}


<span class="enscript-keyword">\message</span>{macros,}
<span class="enscript-comment">% @macro.
</span>
<span class="enscript-comment">% To do this right we need a feature of e-TeX, \scantokens,
</span><span class="enscript-comment">% which we arrange to emulate with a temporary file in ordinary TeX.
</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\eTeXversion</span><span class="enscript-keyword">\undefined</span>
  <span class="enscript-keyword">\newwrite</span><span class="enscript-keyword">\macscribble</span>
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\scantokens</span>#1{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\toks</span>0={#1}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\immediate</span><span class="enscript-keyword">\openout</span><span class="enscript-keyword">\macscribble</span>=<span class="enscript-keyword">\jobname</span>.tmp
    <span class="enscript-keyword">\immediate</span><span class="enscript-keyword">\write</span><span class="enscript-keyword">\macscribble</span>{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\toks</span>0}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\immediate</span><span class="enscript-keyword">\closeout</span><span class="enscript-keyword">\macscribble</span>
    <span class="enscript-keyword">\input</span> <span class="enscript-keyword">\jobname</span>.tmp
  }
<span class="enscript-keyword">\fi</span>

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\scanmacro</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\begingroup</span>
    <span class="enscript-keyword">\newlinechar</span>`<span class="enscript-keyword">\^</span>^M
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\xeatspaces</span><span class="enscript-keyword">\eatspaces</span>
    <span class="enscript-comment">% Undo catcode changes of \startcontents and \doprintindex
</span>    <span class="enscript-comment">% When called from @insertcopying or (short)caption, we need active
</span>    <span class="enscript-comment">% backslash to get it printed correctly.  Previously, we had
</span>    <span class="enscript-comment">% \catcode`\\=\other instead.  We'll see whether a problem appears
</span>    <span class="enscript-comment">% with macro expansion.				--kasal, 19aug04
</span>    <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\@</span>=0 <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\\</span>=<span class="enscript-keyword">\active</span> <span class="enscript-keyword">\escapechar</span>=`<span class="enscript-keyword">\@</span>
    <span class="enscript-comment">% ... and \example
</span>    <span class="enscript-keyword">\spaceisspace</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Append \endinput to make sure that TeX does not see the ending newline.
</span>    <span class="enscript-comment">% I've verified that it is necessary both for e-TeX and for ordinary TeX
</span>    <span class="enscript-comment">%							--kasal, 29nov03
</span>    <span class="enscript-keyword">\scantokens</span>{#1<span class="enscript-keyword">\endinput</span>}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\endgroup</span>
}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\scanexp</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\edef</span><span class="enscript-keyword">\temp</span>{<span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\scanmacro</span>{#1}}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\temp</span>
}

<span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\paramno</span>   <span class="enscript-comment">% Count of parameters
</span><span class="enscript-keyword">\newtoks</span><span class="enscript-keyword">\macname</span>    <span class="enscript-comment">% Macro name
</span><span class="enscript-keyword">\newif</span><span class="enscript-keyword">\ifrecursive</span>  <span class="enscript-comment">% Is it recursive?
</span>
<span class="enscript-comment">% List of all defined macros in the form
</span><span class="enscript-comment">%    \definedummyword\macro1\definedummyword\macro2...
</span><span class="enscript-comment">% Currently is also contains all @aliases; the list can be split
</span><span class="enscript-comment">% if there is a need.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\macrolist</span>{}

<span class="enscript-comment">% Add the macro to \macrolist
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\addtomacrolist</span>#1{<span class="enscript-keyword">\expandafter</span> <span class="enscript-keyword">\addtomacrolistxxx</span> <span class="enscript-keyword">\csname</span>#1<span class="enscript-keyword">\endcsname</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\addtomacrolistxxx</span>#1{<span class="enscript-comment">%
</span>     <span class="enscript-keyword">\toks</span>0 = <span class="enscript-keyword">\expandafter</span>{<span class="enscript-keyword">\macrolist</span><span class="enscript-keyword">\definedummyword</span>#1}<span class="enscript-comment">%
</span>     <span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\macrolist</span>{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\toks</span>0}<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% Utility routines.
</span><span class="enscript-comment">% This does \let #1 = #2, with \csnames; that is,
</span><span class="enscript-comment">%   \let \csname#1\endcsname = \csname#2\endcsname
</span><span class="enscript-comment">% (except of course we have to play expansion games).
</span><span class="enscript-comment">% 
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\cslet</span>#1#2{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\let</span>
  <span class="enscript-keyword">\csname</span>#1<span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\endcsname</span>
  <span class="enscript-keyword">\csname</span>#2<span class="enscript-keyword">\endcsname</span>
}

<span class="enscript-comment">% Trim leading and trailing spaces off a string.
</span><span class="enscript-comment">% Concepts from aro-bend problem 15 (see CTAN).
</span>{<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\@</span>=11
<span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\eatspaces</span> #1{<span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\trim</span>@<span class="enscript-keyword">\expandafter</span>{#1 }}
<span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\trim</span>@ #1{<span class="enscript-keyword">\trim</span>@@ @#1 @ #1 @ @@}
<span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\trim</span>@@ #1@ #2@ #3@@{<span class="enscript-keyword">\trim</span>@@@<span class="enscript-keyword">\empty</span> #2 @}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\unbrace</span>#1{#1}
<span class="enscript-keyword">\unbrace</span>{<span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\trim</span>@@@ #1 } #2@{#1}
}

<span class="enscript-comment">% Trim a single trailing ^^M off a string.
</span>{<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^M=<span class="enscript-keyword">\other</span> <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\Q</span>=3<span class="enscript-comment">%
</span><span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\eatcr</span> #1{<span class="enscript-keyword">\eatcra</span> #1Q^^MQ}<span class="enscript-comment">%
</span><span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\eatcra</span>#1^^MQ{<span class="enscript-keyword">\eatcrb</span>#1Q}<span class="enscript-comment">%
</span><span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\eatcrb</span>#1Q#2Q{#1}<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% Macro bodies are absorbed as an argument in a context where
</span><span class="enscript-comment">% all characters are catcode 10, 11 or 12, except \ which is active
</span><span class="enscript-comment">% (as in normal texinfo). It is necessary to change the definition of \.
</span>
<span class="enscript-comment">% It's necessary to have hard CRs when the macro is executed. This is
</span><span class="enscript-comment">% done by  making ^^M (\endlinechar) catcode 12 when reading the macro
</span><span class="enscript-comment">% body, and then making it the \newlinechar in \scanmacro.
</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\scanctxt</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\&quot;</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\+</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\&lt;</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\&gt;</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\@</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\_</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\|</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\~</span>=<span class="enscript-keyword">\other</span>
}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\scanargctxt</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\scanctxt</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\\</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^M=<span class="enscript-keyword">\other</span>
}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\macrobodyctxt</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\scanctxt</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\{</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\}</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^M=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\usembodybackslash</span>
}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\macroargctxt</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\scanctxt</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\\</span>=<span class="enscript-keyword">\other</span>
}

<span class="enscript-comment">% \mbodybackslash is the definition of \ in @macro bodies.
</span><span class="enscript-comment">% It maps \foo\ =&gt; \csname macarg.foo\endcsname =&gt; #N
</span><span class="enscript-comment">% where N is the macro parameter number.
</span><span class="enscript-comment">% We define \csname macarg.\endcsname to be \realbackslash, so
</span><span class="enscript-comment">% \\ in macro replacement text gets you a backslash.
</span>
{<span class="enscript-keyword">\catcode</span>`@=0 @catcode`@<span class="enscript-keyword">\=</span>@active
 @gdef@usembodybackslash{@let<span class="enscript-keyword">\=</span>@mbodybackslash}
 @gdef@mbodybackslash#1<span class="enscript-keyword">\{</span>@csname macarg.#1@endcsname}
}
<span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\csname</span> macarg.<span class="enscript-keyword">\endcsname</span>{<span class="enscript-keyword">\realbackslash</span>}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\macro</span>{<span class="enscript-keyword">\recursivefalse</span><span class="enscript-keyword">\parsearg</span><span class="enscript-keyword">\macroxxx</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\rmacro</span>{<span class="enscript-keyword">\recursivetrue</span><span class="enscript-keyword">\parsearg</span><span class="enscript-keyword">\macroxxx</span>}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\macroxxx</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\getargs</span>{#1}<span class="enscript-comment">%           now \macname is the macname and \argl the arglist
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\argl</span><span class="enscript-keyword">\empty</span>       <span class="enscript-comment">% no arguments
</span>     <span class="enscript-keyword">\paramno</span>=0<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span>
     <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\parsemargdef</span> <span class="enscript-keyword">\argl</span>;<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\if</span>1<span class="enscript-keyword">\csname</span> ismacro.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span><span class="enscript-keyword">\endcsname</span>
     <span class="enscript-keyword">\message</span>{Warning: redefining <span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span>}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span>
     <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\csname</span> <span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span><span class="enscript-keyword">\endcsname</span> <span class="enscript-keyword">\relax</span>
     <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\errmessage</span>{Macro name <span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span><span class="enscript-keyword">\space</span> already defined}<span class="enscript-keyword">\fi</span>
     <span class="enscript-keyword">\global</span><span class="enscript-keyword">\cslet</span>{macsave.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span>}{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span>}<span class="enscript-comment">%
</span>     <span class="enscript-keyword">\global</span><span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\csname</span> ismacro.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span><span class="enscript-keyword">\endcsname</span>=1<span class="enscript-comment">%
</span>     <span class="enscript-keyword">\addtomacrolist</span>{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span>}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\begingroup</span> <span class="enscript-keyword">\macrobodyctxt</span>
  <span class="enscript-keyword">\ifrecursive</span> <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\parsermacbody</span>
  <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\parsemacbody</span>
  <span class="enscript-keyword">\fi</span>}

<span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\unmacro</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\if</span>1<span class="enscript-keyword">\csname</span> ismacro.#1<span class="enscript-keyword">\endcsname</span>
    <span class="enscript-keyword">\global</span><span class="enscript-keyword">\cslet</span>{#1}{macsave.#1}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\global</span><span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\let</span> <span class="enscript-keyword">\csname</span> ismacro.#1<span class="enscript-keyword">\endcsname</span>=0<span class="enscript-comment">%
</span>    <span class="enscript-comment">% Remove the macro name from \macrolist:
</span>    <span class="enscript-keyword">\begingroup</span>
      <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\csname</span>#1<span class="enscript-keyword">\endcsname</span> <span class="enscript-keyword">\relax</span>
      <span class="enscript-keyword">\let</span><span class="enscript-keyword">\definedummyword</span><span class="enscript-keyword">\unmacrodo</span>
      <span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\macrolist</span>{<span class="enscript-keyword">\macrolist</span>}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\endgroup</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\errmessage</span>{Macro #1 not defined}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span>
}

<span class="enscript-comment">% Called by \do from \dounmacro on each macro.  The idea is to omit any
</span><span class="enscript-comment">% macro definitions that have been changed to \relax.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\unmacrodo</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span> #1<span class="enscript-keyword">\relax</span>
    <span class="enscript-comment">% remove this
</span>  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\definedummyword</span> <span class="enscript-keyword">\noexpand</span>#1<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span>
}

<span class="enscript-comment">% This makes use of the obscure feature that if the last token of a
</span><span class="enscript-comment">% &lt;parameter list&gt; is #, then the preceding argument is delimited by
</span><span class="enscript-comment">% an opening brace, and that opening brace is not consumed.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\getargs</span>#1{<span class="enscript-keyword">\getargsxxx</span>#1{}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\getargsxxx</span>#1#{<span class="enscript-keyword">\getmacname</span> #1 <span class="enscript-keyword">\relax</span><span class="enscript-keyword">\getmacargs</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\getmacname</span> #1 #2<span class="enscript-keyword">\relax</span>{<span class="enscript-keyword">\macname</span>={#1}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\getmacargs</span>#1{<span class="enscript-keyword">\def</span><span class="enscript-keyword">\argl</span>{#1}}

<span class="enscript-comment">% Parse the optional {params} list.  Set up \paramno and \paramlist
</span><span class="enscript-comment">% so \defmacro knows what to do.  Define \macarg.blah for each blah
</span><span class="enscript-comment">% in the params list, to be ##N where N is the position in that list.
</span><span class="enscript-comment">% That gets used by \mbodybackslash (above).
</span>
<span class="enscript-comment">% We need to get `macro parameter char #' into several definitions.
</span><span class="enscript-comment">% The technique used is stolen from LaTeX:  let \hash be something
</span><span class="enscript-comment">% unexpandable, insert that wherever you need a #, and then redefine
</span><span class="enscript-comment">% it to # just before using the token list produced.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% The same technique is used to protect \eatspaces till just before
</span><span class="enscript-comment">% the macro is used.
</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\parsemargdef</span>#1;{<span class="enscript-keyword">\paramno</span>=0<span class="enscript-keyword">\def</span><span class="enscript-keyword">\paramlist</span>{}<span class="enscript-comment">%
</span>        <span class="enscript-keyword">\let</span><span class="enscript-keyword">\hash</span><span class="enscript-keyword">\relax</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\xeatspaces</span><span class="enscript-keyword">\relax</span><span class="enscript-keyword">\parsemargdefxxx</span>#1,;,}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\parsemargdefxxx</span>#1,{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\if</span>#1;<span class="enscript-keyword">\let</span><span class="enscript-keyword">\next</span>=<span class="enscript-keyword">\relax</span>
  <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\let</span><span class="enscript-keyword">\next</span>=<span class="enscript-keyword">\parsemargdefxxx</span>
    <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\paramno</span> by 1<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\edef</span><span class="enscript-keyword">\csname</span> macarg.<span class="enscript-keyword">\eatspaces</span>{#1}<span class="enscript-keyword">\endcsname</span>
        {<span class="enscript-keyword">\xeatspaces</span>{<span class="enscript-keyword">\hash</span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\paramno</span>}}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\edef</span><span class="enscript-keyword">\paramlist</span>{<span class="enscript-keyword">\paramlist</span><span class="enscript-keyword">\hash</span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\paramno</span>,}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span><span class="enscript-keyword">\next</span>}

<span class="enscript-comment">% These two commands read recursive and nonrecursive macro bodies.
</span><span class="enscript-comment">% (They're different since rec and nonrec macros end differently.)
</span>
<span class="enscript-keyword">\long</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\parsemacbody</span>#1@end macro<span class="enscript-comment">%
</span>{<span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\temp</span>{<span class="enscript-keyword">\eatcr</span>{#1}}<span class="enscript-keyword">\endgroup</span><span class="enscript-keyword">\defmacro</span>}<span class="enscript-comment">%
</span><span class="enscript-keyword">\long</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\parsermacbody</span>#1@end rmacro<span class="enscript-comment">%
</span>{<span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\temp</span>{<span class="enscript-keyword">\eatcr</span>{#1}}<span class="enscript-keyword">\endgroup</span><span class="enscript-keyword">\defmacro</span>}<span class="enscript-comment">%
</span>
<span class="enscript-comment">% This defines the macro itself. There are six cases: recursive and
</span><span class="enscript-comment">% nonrecursive macros of zero, one, and many arguments.
</span><span class="enscript-comment">% Much magic with \expandafter here.
</span><span class="enscript-comment">% \xdef is used so that macro definitions will survive the file
</span><span class="enscript-comment">% they're defined in; @include reads the file inside a group.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\defmacro</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\hash</span>=##<span class="enscript-comment">% convert placeholders to macro parameter chars
</span>  <span class="enscript-keyword">\ifrecursive</span>
    <span class="enscript-keyword">\ifcase</span><span class="enscript-keyword">\paramno</span>
    <span class="enscript-comment">% 0
</span>      <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\csname</span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span><span class="enscript-keyword">\endcsname</span>{<span class="enscript-comment">%
</span>        <span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\scanmacro</span>{<span class="enscript-keyword">\temp</span>}}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\or</span> <span class="enscript-comment">% 1
</span>      <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\csname</span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span><span class="enscript-keyword">\endcsname</span>{<span class="enscript-comment">%
</span>         <span class="enscript-keyword">\bgroup</span><span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\macroargctxt</span>
         <span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\braceorline</span>
         <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\csname</span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span> xxx<span class="enscript-keyword">\endcsname</span>}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\csname</span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span> xxx<span class="enscript-keyword">\endcsname</span>##1{<span class="enscript-comment">%
</span>         <span class="enscript-keyword">\egroup</span><span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\scanmacro</span>{<span class="enscript-keyword">\temp</span>}}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\else</span> <span class="enscript-comment">% many
</span>      <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\csname</span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span><span class="enscript-keyword">\endcsname</span>{<span class="enscript-comment">%
</span>         <span class="enscript-keyword">\bgroup</span><span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\macroargctxt</span>
         <span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\csname</span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span> xx<span class="enscript-keyword">\endcsname</span>}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\csname</span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span> xx<span class="enscript-keyword">\endcsname</span>##1{<span class="enscript-comment">%
</span>          <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\csname</span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span> xxx<span class="enscript-keyword">\endcsname</span> ##1,}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\expandafter</span>
      <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\xdef</span>
      <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\expandafter</span>
        <span class="enscript-keyword">\csname</span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span> xxx<span class="enscript-keyword">\endcsname</span>
          <span class="enscript-keyword">\paramlist</span>{<span class="enscript-keyword">\egroup</span><span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\scanmacro</span>{<span class="enscript-keyword">\temp</span>}}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\ifcase</span><span class="enscript-keyword">\paramno</span>
    <span class="enscript-comment">% 0
</span>      <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\csname</span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span><span class="enscript-keyword">\endcsname</span>{<span class="enscript-comment">%
</span>        <span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\norecurse</span>{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span>}<span class="enscript-comment">%
</span>        <span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\scanmacro</span>{<span class="enscript-keyword">\temp</span>}<span class="enscript-keyword">\egroup</span>}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\or</span> <span class="enscript-comment">% 1
</span>      <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\csname</span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span><span class="enscript-keyword">\endcsname</span>{<span class="enscript-comment">%
</span>         <span class="enscript-keyword">\bgroup</span><span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\macroargctxt</span>
         <span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\braceorline</span>
         <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\csname</span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span> xxx<span class="enscript-keyword">\endcsname</span>}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\csname</span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span> xxx<span class="enscript-keyword">\endcsname</span>##1{<span class="enscript-comment">%
</span>        <span class="enscript-keyword">\egroup</span>
        <span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\norecurse</span>{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span>}<span class="enscript-comment">%
</span>        <span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\scanmacro</span>{<span class="enscript-keyword">\temp</span>}<span class="enscript-keyword">\egroup</span>}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\else</span> <span class="enscript-comment">% many
</span>      <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\csname</span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span><span class="enscript-keyword">\endcsname</span>{<span class="enscript-comment">%
</span>         <span class="enscript-keyword">\bgroup</span><span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\macroargctxt</span>
         <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\csname</span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span> xx<span class="enscript-keyword">\endcsname</span>}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\csname</span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span> xx<span class="enscript-keyword">\endcsname</span>##1{<span class="enscript-comment">%
</span>          <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\csname</span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span> xxx<span class="enscript-keyword">\endcsname</span> ##1,}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\expandafter</span>
      <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\xdef</span>
      <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\expandafter</span>
      <span class="enscript-keyword">\csname</span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span> xxx<span class="enscript-keyword">\endcsname</span>
      <span class="enscript-keyword">\paramlist</span>{<span class="enscript-comment">%
</span>          <span class="enscript-keyword">\egroup</span>
          <span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\norecurse</span>{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\macname</span>}<span class="enscript-comment">%
</span>          <span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\scanmacro</span>{<span class="enscript-keyword">\temp</span>}<span class="enscript-keyword">\egroup</span>}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\fi</span>}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\norecurse</span>#1{<span class="enscript-keyword">\bgroup</span><span class="enscript-keyword">\cslet</span>{#1}{macsave.#1}}

<span class="enscript-comment">% \braceorline decides whether the next nonwhitespace character is a
</span><span class="enscript-comment">% {.  If so it reads up to the closing }, if not, it reads the whole
</span><span class="enscript-comment">% line.  Whatever was read is then fed to the next control sequence
</span><span class="enscript-comment">% as an argument (by \parsebrace or \parsearg)
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\braceorline</span>#1{<span class="enscript-keyword">\let</span><span class="enscript-keyword">\macnamexxx</span>=#1<span class="enscript-keyword">\futurelet</span><span class="enscript-keyword">\nchar</span><span class="enscript-keyword">\braceorlinexxx</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\braceorlinexxx</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\nchar</span><span class="enscript-keyword">\bgroup</span><span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\parsearg</span>
  <span class="enscript-keyword">\fi</span> <span class="enscript-keyword">\macnamexxx</span>}


<span class="enscript-comment">% @alias.
</span><span class="enscript-comment">% We need some trickery to remove the optional spaces around the equal
</span><span class="enscript-comment">% sign.  Just make them active and then expand them all to nothing.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\alias</span>{<span class="enscript-keyword">\parseargusing</span><span class="enscript-keyword">\obeyspaces</span><span class="enscript-keyword">\aliasxxx</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\aliasxxx</span> #1{<span class="enscript-keyword">\aliasyyy</span>#1<span class="enscript-keyword">\relax</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\aliasyyy</span> #1=#2<span class="enscript-keyword">\relax</span>{<span class="enscript-comment">%
</span>  {<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\obeyedspace</span>=<span class="enscript-keyword">\empty</span>
    <span class="enscript-keyword">\addtomacrolist</span>{#1}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\next</span>{<span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\makecsname</span>{#1}=<span class="enscript-keyword">\makecsname</span>{#2}}<span class="enscript-comment">%
</span>  }<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\next</span>
}


<span class="enscript-keyword">\message</span>{cross references,}

<span class="enscript-keyword">\newwrite</span><span class="enscript-keyword">\auxfile</span>
<span class="enscript-keyword">\newif</span><span class="enscript-keyword">\ifhavexrefs</span>    <span class="enscript-comment">% True if xref values are known.
</span><span class="enscript-keyword">\newif</span><span class="enscript-keyword">\ifwarnedxrefs</span>  <span class="enscript-comment">% True if we warned once that they aren't known.
</span>
<span class="enscript-comment">% @inforef is relatively simple.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\inforef</span> #1{<span class="enscript-keyword">\inforefzzz</span> #1,,,,**}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\inforefzzz</span> #1,#2,#3,#4**{<span class="enscript-keyword">\putwordSee</span>{} <span class="enscript-keyword">\putwordInfo</span>{} <span class="enscript-keyword">\putwordfile</span>{} <span class="enscript-keyword">\file</span>{<span class="enscript-keyword">\ignorespaces</span> #3{}},
  node <span class="enscript-keyword">\samp</span>{<span class="enscript-keyword">\ignorespaces</span>#1{}}}

<span class="enscript-comment">% @node's only job in TeX is to define \lastnode, which is used in
</span><span class="enscript-comment">% cross-references.  The @node line might or might not have commas, and
</span><span class="enscript-comment">% might or might not have spaces before the first comma, like:
</span><span class="enscript-comment">% @node foo , bar , ...
</span><span class="enscript-comment">% We don't want such trailing spaces in the node name.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\node</span>{<span class="enscript-keyword">\checkenv</span>{}<span class="enscript-keyword">\donode</span> #1 ,<span class="enscript-keyword">\finishnodeparse</span>}
<span class="enscript-comment">%
</span><span class="enscript-comment">% also remove a trailing comma, in case of something like this:
</span><span class="enscript-comment">% @node Help-Cross,  ,  , Cross-refs
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\donode</span>#1 ,#2<span class="enscript-keyword">\finishnodeparse</span>{<span class="enscript-keyword">\dodonode</span> #1,<span class="enscript-keyword">\finishnodeparse</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\dodonode</span>#1,#2<span class="enscript-keyword">\finishnodeparse</span>{<span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\lastnode</span>{#1}}

<span class="enscript-keyword">\let</span><span class="enscript-keyword">\nwnode</span>=<span class="enscript-keyword">\node</span>
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\lastnode</span>=<span class="enscript-keyword">\empty</span>

<span class="enscript-comment">% Write a cross-reference definition for the current node.  #1 is the
</span><span class="enscript-comment">% type (Ynumbered, Yappendix, Ynothing).
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\donoderef</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\lastnode</span><span class="enscript-keyword">\empty</span><span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\setref</span>{<span class="enscript-keyword">\lastnode</span>}{#1}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\lastnode</span>=<span class="enscript-keyword">\empty</span>
  <span class="enscript-keyword">\fi</span>
}

<span class="enscript-comment">% @anchor{NAME} -- define xref target at arbitrary point.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\savesfregister</span>
<span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\savesf</span>{<span class="enscript-keyword">\relax</span> <span class="enscript-keyword">\ifhmode</span> <span class="enscript-keyword">\savesfregister</span>=<span class="enscript-keyword">\spacefactor</span> <span class="enscript-keyword">\fi</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\restoresf</span>{<span class="enscript-keyword">\relax</span> <span class="enscript-keyword">\ifhmode</span> <span class="enscript-keyword">\spacefactor</span>=<span class="enscript-keyword">\savesfregister</span> <span class="enscript-keyword">\fi</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\anchor</span>#1{<span class="enscript-keyword">\savesf</span> <span class="enscript-keyword">\setref</span>{#1}{Ynothing}<span class="enscript-keyword">\restoresf</span> <span class="enscript-keyword">\ignorespaces</span>}

<span class="enscript-comment">% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
</span><span class="enscript-comment">% anchor), which consists of three parts:
</span><span class="enscript-comment">% 1) NAME-title - the current sectioning name taken from \thissection,
</span><span class="enscript-comment">%                 or the anchor name.
</span><span class="enscript-comment">% 2) NAME-snt   - section number and type, passed as the SNT arg, or
</span><span class="enscript-comment">%                 empty for anchors.
</span><span class="enscript-comment">% 3) NAME-pg    - the page number.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% This is called from \donoderef, \anchor, and \dofloat.  In the case of
</span><span class="enscript-comment">% floats, there is an additional part, which is not written here:
</span><span class="enscript-comment">% 4) NAME-lof   - the text as it should appear in a @listoffloats.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\setref</span>#1#2{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\pdfmkdest</span>{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\iflinks</span>
    {<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\atdummies</span>  <span class="enscript-comment">% preserve commands, but don't expand them
</span>      <span class="enscript-keyword">\edef</span><span class="enscript-keyword">\writexrdef</span>##1##2{<span class="enscript-comment">%
</span>	<span class="enscript-keyword">\write</span><span class="enscript-keyword">\auxfile</span>{@xrdef{#1-<span class="enscript-comment">% #1 of \setref, expanded by the \edef
</span>	  ##1}{##2}}<span class="enscript-comment">% these are parameters of \writexrdef
</span>      }<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\toks</span>0 = <span class="enscript-keyword">\expandafter</span>{<span class="enscript-keyword">\thissection</span>}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\immediate</span> <span class="enscript-keyword">\writexrdef</span>{title}{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\toks</span>0 }<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\immediate</span> <span class="enscript-keyword">\writexrdef</span>{snt}{<span class="enscript-keyword">\csname</span> #2<span class="enscript-keyword">\endcsname</span>}<span class="enscript-comment">% \Ynumbered etc.
</span>      <span class="enscript-keyword">\safewhatsit</span>{<span class="enscript-keyword">\writexrdef</span>{pg}{<span class="enscript-keyword">\folio</span>}}<span class="enscript-comment">% will be written later, during \shipout
</span>    }<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span>
}

<span class="enscript-comment">% @xref, @pxref, and @ref generate cross-references.  For \xrefX, #1 is
</span><span class="enscript-comment">% the node name, #2 the name of the Info cross-reference, #3 the printed
</span><span class="enscript-comment">% node name, #4 the name of the Info file, #5 the name of the printed
</span><span class="enscript-comment">% manual.  All but the node name can be omitted.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\pxref</span>#1{<span class="enscript-keyword">\putwordsee</span>{} <span class="enscript-keyword">\xrefX</span>[#1,,,,,,,]}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\xref</span>#1{<span class="enscript-keyword">\putwordSee</span>{} <span class="enscript-keyword">\xrefX</span>[#1,,,,,,,]}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\ref</span>#1{<span class="enscript-keyword">\xrefX</span>[#1,,,,,,,]}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\xrefX</span>[#1,#2,#3,#4,#5,#6]{<span class="enscript-keyword">\begingroup</span>
  <span class="enscript-keyword">\unsepspaces</span>
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\printedmanual</span>{<span class="enscript-keyword">\ignorespaces</span> #5}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\printedrefname</span>{<span class="enscript-keyword">\ignorespaces</span> #3}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\setbox</span>1=<span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\printedmanual</span><span class="enscript-keyword">\unskip</span>}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\setbox</span>0=<span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\printedrefname</span><span class="enscript-keyword">\unskip</span>}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifdim</span> <span class="enscript-keyword">\wd</span>0 = 0pt
    <span class="enscript-comment">% No printed node name was explicitly given.
</span>    <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\csname</span> SETxref-automatic-section-title<span class="enscript-keyword">\endcsname</span><span class="enscript-keyword">\relax</span>
      <span class="enscript-comment">% Use the node name inside the square brackets.
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\printedrefname</span>{<span class="enscript-keyword">\ignorespaces</span> #1}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\else</span>
      <span class="enscript-comment">% Use the actual chapter/section title appear inside
</span>      <span class="enscript-comment">% the square brackets.  Use the real section title if we have it.
</span>      <span class="enscript-keyword">\ifdim</span> <span class="enscript-keyword">\wd</span>1 &gt; 0pt
        <span class="enscript-comment">% It is in another manual, so we don't have it.
</span>        <span class="enscript-keyword">\def</span><span class="enscript-keyword">\printedrefname</span>{<span class="enscript-keyword">\ignorespaces</span> #1}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\else</span>
        <span class="enscript-keyword">\ifhavexrefs</span>
          <span class="enscript-comment">% We know the real title if we have the xref values.
</span>          <span class="enscript-keyword">\def</span><span class="enscript-keyword">\printedrefname</span>{<span class="enscript-keyword">\refx</span>{#1-title}{}}<span class="enscript-comment">%
</span>        <span class="enscript-keyword">\else</span>
          <span class="enscript-comment">% Otherwise just copy the Info node name.
</span>          <span class="enscript-keyword">\def</span><span class="enscript-keyword">\printedrefname</span>{<span class="enscript-keyword">\ignorespaces</span> #1}<span class="enscript-comment">%
</span>        <span class="enscript-keyword">\fi</span><span class="enscript-comment">%
</span>      <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Make link in pdf output.
</span>  <span class="enscript-keyword">\ifpdf</span>
    <span class="enscript-keyword">\leavevmode</span>
    <span class="enscript-keyword">\getfilename</span>{#4}<span class="enscript-comment">%
</span>    {<span class="enscript-keyword">\indexnofonts</span>
     <span class="enscript-keyword">\turnoffactive</span>
     <span class="enscript-comment">% See comments at \activebackslashdouble.
</span>     {<span class="enscript-keyword">\activebackslashdouble</span> <span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\pdfxrefdest</span>{#1}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\backslashparens</span><span class="enscript-keyword">\pdfxrefdest</span>}<span class="enscript-comment">%
</span>     <span class="enscript-comment">%
</span>     <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\filenamelength</span>&gt;0
       <span class="enscript-keyword">\startlink</span> attr{/Border [0 0 0]}<span class="enscript-comment">%
</span>         goto file{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\filename</span>.pdf} name{<span class="enscript-keyword">\pdfxrefdest</span>}<span class="enscript-comment">%
</span>     <span class="enscript-keyword">\else</span>
       <span class="enscript-keyword">\startlink</span> attr{/Border [0 0 0]}<span class="enscript-comment">%
</span>         goto name{<span class="enscript-keyword">\pdfmkpgn</span>{<span class="enscript-keyword">\pdfxrefdest</span>}}<span class="enscript-comment">%
</span>     <span class="enscript-keyword">\fi</span>
    }<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\linkcolor</span>
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Float references are printed completely differently: &quot;Figure 1.2&quot;
</span>  <span class="enscript-comment">% instead of &quot;[somenode], p.3&quot;.  We distinguish them by the
</span>  <span class="enscript-comment">% LABEL-title being set to a magic string.
</span>  {<span class="enscript-comment">%
</span>    <span class="enscript-comment">% Have to otherify everything special to allow the \csname to
</span>    <span class="enscript-comment">% include an _ in the xref name, etc.
</span>    <span class="enscript-keyword">\indexnofonts</span>
    <span class="enscript-keyword">\turnoffactive</span>
    <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\global</span><span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\Xthisreftitle</span>
      <span class="enscript-keyword">\csname</span> XR#1-title<span class="enscript-keyword">\endcsname</span>
  }<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\iffloat</span><span class="enscript-keyword">\Xthisreftitle</span>
    <span class="enscript-comment">% If the user specified the print name (third arg) to the ref,
</span>    <span class="enscript-comment">% print it instead of our usual &quot;Figure 1.2&quot;.
</span>    <span class="enscript-keyword">\ifdim</span><span class="enscript-keyword">\wd</span>0 = 0pt
      <span class="enscript-keyword">\refx</span>{#1-snt}{}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\printedrefname</span>
    <span class="enscript-keyword">\fi</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% if the user also gave the printed manual name (fifth arg), append
</span>    <span class="enscript-comment">% &quot;in MANUALNAME&quot;.
</span>    <span class="enscript-keyword">\ifdim</span> <span class="enscript-keyword">\wd</span>1 &gt; 0pt
      <span class="enscript-keyword">\space</span> <span class="enscript-keyword">\putwordin</span>{} <span class="enscript-keyword">\cite</span>{<span class="enscript-keyword">\printedmanual</span>}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-comment">% node/anchor (non-float) references.
</span>    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% If we use \unhbox0 and \unhbox1 to print the node names, TeX does not
</span>    <span class="enscript-comment">% insert empty discretionaries after hyphens, which means that it will
</span>    <span class="enscript-comment">% not find a line break at a hyphen in a node names.  Since some manuals
</span>    <span class="enscript-comment">% are best written with fairly long node names, containing hyphens, this
</span>    <span class="enscript-comment">% is a loss.  Therefore, we give the text of the node name again, so it
</span>    <span class="enscript-comment">% is as if TeX is seeing it for the first time.
</span>    <span class="enscript-keyword">\ifdim</span> <span class="enscript-keyword">\wd</span>1 &gt; 0pt
      <span class="enscript-keyword">\putwordsection</span>{} ``<span class="enscript-keyword">\printedrefname</span>'' <span class="enscript-keyword">\putwordin</span>{} <span class="enscript-keyword">\cite</span>{<span class="enscript-keyword">\printedmanual</span>}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\else</span>
      <span class="enscript-comment">% _ (for example) has to be the character _ for the purposes of the
</span>      <span class="enscript-comment">% control sequence corresponding to the node, but it has to expand
</span>      <span class="enscript-comment">% into the usual \leavevmode...\vrule stuff for purposes of
</span>      <span class="enscript-comment">% printing. So we \turnoffactive for the \refx-snt, back on for the
</span>      <span class="enscript-comment">% printing, back off for the \refx-pg.
</span>      {<span class="enscript-keyword">\turnoffactive</span>
       <span class="enscript-comment">% Only output a following space if the -snt ref is nonempty; for
</span>       <span class="enscript-comment">% @unnumbered and @anchor, it won't be.
</span>       <span class="enscript-keyword">\setbox</span>2 = <span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\ignorespaces</span> <span class="enscript-keyword">\refx</span>{#1-snt}{}}<span class="enscript-comment">%
</span>       <span class="enscript-keyword">\ifdim</span> <span class="enscript-keyword">\wd</span>2 &gt; 0pt <span class="enscript-keyword">\refx</span>{#1-snt}<span class="enscript-keyword">\space</span><span class="enscript-keyword">\fi</span>
      }<span class="enscript-comment">%
</span>      <span class="enscript-comment">% output the `[mynode]' via a macro so it can be overridden.
</span>      <span class="enscript-keyword">\xrefprintnodename</span><span class="enscript-keyword">\printedrefname</span>
      <span class="enscript-comment">%
</span>      <span class="enscript-comment">% But we always want a comma and a space:
</span>      ,<span class="enscript-keyword">\space</span>
      <span class="enscript-comment">%
</span>      <span class="enscript-comment">% output the `page 3'.
</span>      <span class="enscript-keyword">\turnoffactive</span> <span class="enscript-keyword">\putwordpage</span><span class="enscript-keyword">\tie</span><span class="enscript-keyword">\refx</span>{#1-pg}{}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\endlink</span>
<span class="enscript-keyword">\endgroup</span>}

<span class="enscript-comment">% This macro is called from \xrefX for the `[nodename]' part of xref
</span><span class="enscript-comment">% output.  It's a separate macro only so it can be changed more easily,
</span><span class="enscript-comment">% since square brackets don't work well in some documents.  Particularly
</span><span class="enscript-comment">% one that Bob is working on :).
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\xrefprintnodename</span>#1{[#1]}

<span class="enscript-comment">% Things referred to by \setref.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\Ynothing</span>{}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\Yomitfromtoc</span>{}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\Ynumbered</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\secno</span>=0
    <span class="enscript-keyword">\putwordChapter</span>@tie <span class="enscript-keyword">\the</span><span class="enscript-keyword">\chapno</span>
  <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\subsecno</span>=0
    <span class="enscript-keyword">\putwordSection</span>@tie <span class="enscript-keyword">\the</span><span class="enscript-keyword">\chapno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\secno</span>
  <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\subsubsecno</span>=0
    <span class="enscript-keyword">\putwordSection</span>@tie <span class="enscript-keyword">\the</span><span class="enscript-keyword">\chapno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\secno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\subsecno</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\putwordSection</span>@tie <span class="enscript-keyword">\the</span><span class="enscript-keyword">\chapno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\secno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\subsecno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\subsubsecno</span>
  <span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span>
}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\Yappendix</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\secno</span>=0
     <span class="enscript-keyword">\putwordAppendix</span>@tie @char<span class="enscript-keyword">\the</span><span class="enscript-keyword">\appendixno</span>{}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\subsecno</span>=0
     <span class="enscript-keyword">\putwordSection</span>@tie @char<span class="enscript-keyword">\the</span><span class="enscript-keyword">\appendixno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\secno</span>
  <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\subsubsecno</span>=0
    <span class="enscript-keyword">\putwordSection</span>@tie @char<span class="enscript-keyword">\the</span><span class="enscript-keyword">\appendixno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\secno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\subsecno</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\putwordSection</span>@tie
      @char<span class="enscript-keyword">\the</span><span class="enscript-keyword">\appendixno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\secno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\subsecno</span>.<span class="enscript-keyword">\the</span><span class="enscript-keyword">\subsubsecno</span>
  <span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span>
}

<span class="enscript-comment">% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
</span><span class="enscript-comment">% If its value is nonempty, SUFFIX is output afterward.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\refx</span>#1#2{<span class="enscript-comment">%
</span>  {<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\indexnofonts</span>
    <span class="enscript-keyword">\otherbackslash</span>
    <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\global</span><span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\thisrefX</span>
      <span class="enscript-keyword">\csname</span> XR#1<span class="enscript-keyword">\endcsname</span>
  }<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\thisrefX</span><span class="enscript-keyword">\relax</span>
    <span class="enscript-comment">% If not defined, say something at least.
</span>    <span class="enscript-keyword">\angleleft</span> un<span class="enscript-keyword">\-</span>de<span class="enscript-keyword">\-</span>fined<span class="enscript-keyword">\angleright</span>
    <span class="enscript-keyword">\iflinks</span>
      <span class="enscript-keyword">\ifhavexrefs</span>
        <span class="enscript-keyword">\message</span>{<span class="enscript-keyword">\linenumber</span> Undefined cross reference `#1'.}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\else</span>
        <span class="enscript-keyword">\ifwarnedxrefs</span><span class="enscript-keyword">\else</span>
          <span class="enscript-keyword">\global</span><span class="enscript-keyword">\warnedxrefstrue</span>
          <span class="enscript-keyword">\message</span>{Cross reference values unknown; you must run TeX again.}<span class="enscript-comment">%
</span>        <span class="enscript-keyword">\fi</span>
      <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-comment">% It's defined, so just use it.
</span>    <span class="enscript-keyword">\thisrefX</span>
  <span class="enscript-keyword">\fi</span>
  #2<span class="enscript-comment">% Output the suffix in any case.
</span>}

<span class="enscript-comment">% This is the macro invoked by entries in the aux file.  Usually it's
</span><span class="enscript-comment">% just a \def (we prepend XR to the control sequence name to avoid
</span><span class="enscript-comment">% collisions).  But if this is a float type, we have more work to do.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\xrdef</span>#1#2{<span class="enscript-comment">%
</span>  {<span class="enscript-comment">% The node name might contain 8-bit characters, which in our current
</span>   <span class="enscript-comment">% implementation are changed to commands like @'e.  Don't let these
</span>   <span class="enscript-comment">% mess up the control sequence name.
</span>    <span class="enscript-keyword">\indexnofonts</span>
    <span class="enscript-keyword">\turnoffactive</span>
    <span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\safexrefname</span>{#1}<span class="enscript-comment">%
</span>  }<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\csname</span> XR<span class="enscript-keyword">\safexrefname</span><span class="enscript-keyword">\endcsname</span>{#2}<span class="enscript-comment">% remember this xref
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Was that xref control sequence that we just defined for a float?
</span>  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\iffloat</span><span class="enscript-keyword">\csname</span> XR<span class="enscript-keyword">\safexrefname</span><span class="enscript-keyword">\endcsname</span>
    <span class="enscript-comment">% it was a float, and we have the (safe) float type in \iffloattype.
</span>    <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\floatlist</span>
      <span class="enscript-keyword">\csname</span> floatlist<span class="enscript-keyword">\iffloattype</span><span class="enscript-keyword">\endcsname</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Is this the first time we've seen this float type?
</span>    <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\floatlist</span><span class="enscript-keyword">\relax</span>
      <span class="enscript-keyword">\toks</span>0 = {<span class="enscript-keyword">\do</span>}<span class="enscript-comment">% yes, so just \do
</span>    <span class="enscript-keyword">\else</span>
      <span class="enscript-comment">% had it before, so preserve previous elements in list.
</span>      <span class="enscript-keyword">\toks</span>0 = <span class="enscript-keyword">\expandafter</span>{<span class="enscript-keyword">\floatlist</span><span class="enscript-keyword">\do</span>}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\fi</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Remember this xref in the control sequence \floatlistFLOATTYPE,
</span>    <span class="enscript-comment">% for later use in \listoffloats.
</span>    <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\csname</span> floatlist<span class="enscript-keyword">\iffloattype</span><span class="enscript-keyword">\endcsname</span>{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\toks</span>0
      {<span class="enscript-keyword">\safexrefname</span>}}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span>
}

<span class="enscript-comment">% Read the last existing aux file, if any.  No error if none exists.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\tryauxfile</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\openin</span> 1 <span class="enscript-keyword">\jobname</span>.aux
  <span class="enscript-keyword">\ifeof</span> 1 <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\readdatafile</span>{aux}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\global</span><span class="enscript-keyword">\havexrefstrue</span>
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\closein</span> 1
}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\setupdatafile</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^@=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^A=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^B=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^C=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^D=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^E=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^F=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^G=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^H=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^K=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^L=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^N=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^P=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^Q=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^R=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^S=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^T=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^U=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^V=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^W=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^X=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^Z=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^[=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^<span class="enscript-keyword">\=</span><span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^]=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^^=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^_=<span class="enscript-keyword">\other</span>
  <span class="enscript-comment">% It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc.
</span>  <span class="enscript-comment">% in xref tags, i.e., node names.  But since ^^e4 notation isn't
</span>  <span class="enscript-comment">% supported in the main text, it doesn't seem desirable.  Furthermore,
</span>  <span class="enscript-comment">% that is not enough: for node names that actually contain a ^
</span>  <span class="enscript-comment">% character, we would end up writing a line like this: 'xrdef {'hat
</span>  <span class="enscript-comment">% b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first
</span>  <span class="enscript-comment">% argument, and \hat is not an expandable control sequence.  It could
</span>  <span class="enscript-comment">% all be worked out, but why?  Either we support ^^ or we don't.
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% The other change necessary for this was to define \auxhat:
</span>  <span class="enscript-comment">% \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter
</span>  <span class="enscript-comment">% and then to call \auxhat in \setq.
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Special characters.  Should be turned off anyway, but...
</span>  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\~</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\[</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\]</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\&quot;</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\_</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\|</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\&lt;</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\&gt;</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\$</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\#</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\&amp;</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`\%=<span class="enscript-keyword">\other</span>
  <span class="enscript-keyword">\catcode</span>`+=<span class="enscript-keyword">\other</span> <span class="enscript-comment">% avoid \+ for paranoia even though we've turned it off
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% This is to support \ in node names and titles, since the \
</span>  <span class="enscript-comment">% characters end up in a \csname.  It's easier than
</span>  <span class="enscript-comment">% leaving it active and making its active definition an actual \
</span>  <span class="enscript-comment">% character.  What I don't understand is why it works in the *value*
</span>  <span class="enscript-comment">% of the xrdef.  Seems like it should be a catcode12 \, and that
</span>  <span class="enscript-comment">% should not typeset properly.  But it works, so I'm moving on for
</span>  <span class="enscript-comment">% now.  --karl, 15jan04.
</span>  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\\</span>=<span class="enscript-keyword">\other</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Make the characters 128-255 be printing characters.
</span>  {<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\count</span>1=128
    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\loop</span>{<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\catcode</span><span class="enscript-keyword">\count</span>1=<span class="enscript-keyword">\other</span>
      <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\count</span>1 by 1
      <span class="enscript-keyword">\ifnum</span> <span class="enscript-keyword">\count</span>1&lt;256 <span class="enscript-keyword">\loop</span> <span class="enscript-keyword">\fi</span>
    }<span class="enscript-comment">%
</span>  }<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% @ is our escape character in .aux files, and we need braces.
</span>  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\{</span>=1
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\}</span>=2
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\@</span>=0
}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\readdatafile</span>#1{<span class="enscript-comment">%
</span><span class="enscript-keyword">\begingroup</span>
  <span class="enscript-keyword">\setupdatafile</span>
  <span class="enscript-keyword">\input</span><span class="enscript-keyword">\jobname</span>.#1
<span class="enscript-keyword">\endgroup</span>}


<span class="enscript-keyword">\message</span>{insertions,}
<span class="enscript-comment">% including footnotes.
</span>
<span class="enscript-keyword">\newcount</span> <span class="enscript-keyword">\footnoteno</span>

<span class="enscript-comment">% The trailing space in the following definition for supereject is
</span><span class="enscript-comment">% vital for proper filling; pages come out unaligned when you do a
</span><span class="enscript-comment">% pagealignmacro call if that space before the closing brace is
</span><span class="enscript-comment">% removed. (Generally, numeric constants should always be followed by a
</span><span class="enscript-comment">% space to prevent strange expansion errors.)
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\supereject</span>{<span class="enscript-keyword">\par</span><span class="enscript-keyword">\penalty</span> -20000<span class="enscript-keyword">\footnoteno</span> =0 }

<span class="enscript-comment">% @footnotestyle is meaningful for info output only.
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\footnotestyle</span>=<span class="enscript-keyword">\comment</span>

{<span class="enscript-keyword">\catcode</span> `<span class="enscript-keyword">\@</span>=11
<span class="enscript-comment">%
</span><span class="enscript-comment">% Auto-number footnotes.  Otherwise like plain.
</span><span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\footnote</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\indent</span>=<span class="enscript-keyword">\ptexindent</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\noindent</span>=<span class="enscript-keyword">\ptexnoindent</span>
  <span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\footnoteno</span> by <span class="enscript-keyword">\@</span>ne
  <span class="enscript-keyword">\edef</span><span class="enscript-keyword">\thisfootno</span>{<span class="enscript-variable-name">$^{\the\footnoteno}$</span>}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% In case the footnote comes at the end of a sentence, preserve the
</span>  <span class="enscript-comment">% extra spacing after we do the footnote number.
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\@</span>sf<span class="enscript-keyword">\empty</span>
  <span class="enscript-keyword">\ifhmode</span><span class="enscript-keyword">\edef</span><span class="enscript-keyword">\@</span>sf{<span class="enscript-keyword">\spacefactor</span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\spacefactor</span>}<span class="enscript-keyword">\ptexslash</span><span class="enscript-keyword">\fi</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Remove inadvertent blank space before typesetting the footnote number.
</span>  <span class="enscript-keyword">\unskip</span>
  <span class="enscript-keyword">\thisfootno</span><span class="enscript-keyword">\@</span>sf
  <span class="enscript-keyword">\dofootnote</span>
}<span class="enscript-comment">%
</span>
<span class="enscript-comment">% Don't bother with the trickery in plain.tex to not require the
</span><span class="enscript-comment">% footnote text as a parameter.  Our footnotes don't need to be so general.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% Oh yes, they do; otherwise, @ifset (and anything else that uses
</span><span class="enscript-comment">% \parseargline) fails inside footnotes because the tokens are fixed when
</span><span class="enscript-comment">% the footnote is read.  --karl, 16nov96.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\dofootnote</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\insert</span><span class="enscript-keyword">\footins</span><span class="enscript-keyword">\bgroup</span>
  <span class="enscript-comment">% We want to typeset this text as a normal paragraph, even if the
</span>  <span class="enscript-comment">% footnote reference occurs in (for example) a display environment.
</span>  <span class="enscript-comment">% So reset some parameters.
</span>  <span class="enscript-keyword">\hsize</span>=<span class="enscript-keyword">\pagewidth</span>
  <span class="enscript-keyword">\interlinepenalty</span><span class="enscript-keyword">\interfootnotelinepenalty</span>
  <span class="enscript-keyword">\splittopskip</span><span class="enscript-keyword">\ht</span><span class="enscript-keyword">\strutbox</span> <span class="enscript-comment">% top baseline for broken footnotes
</span>  <span class="enscript-keyword">\splitmaxdepth</span><span class="enscript-keyword">\dp</span><span class="enscript-keyword">\strutbox</span>
  <span class="enscript-keyword">\floatingpenalty</span><span class="enscript-keyword">\@</span>MM
  <span class="enscript-keyword">\leftskip</span><span class="enscript-keyword">\z</span>@skip
  <span class="enscript-keyword">\rightskip</span><span class="enscript-keyword">\z</span>@skip
  <span class="enscript-keyword">\spaceskip</span><span class="enscript-keyword">\z</span>@skip
  <span class="enscript-keyword">\xspaceskip</span><span class="enscript-keyword">\z</span>@skip
  <span class="enscript-keyword">\parindent</span><span class="enscript-keyword">\defaultparindent</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\smallfonts</span> <span class="enscript-keyword">\rm</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Because we use hanging indentation in footnotes, a @noindent appears
</span>  <span class="enscript-comment">% to exdent this text, so make it be a no-op.  makeinfo does not use
</span>  <span class="enscript-comment">% hanging indentation so @noindent can still be needed within footnote
</span>  <span class="enscript-comment">% text after an @example or the like (not that this is good style).
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\noindent</span> = <span class="enscript-keyword">\relax</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Hang the footnote text off the number.  Use \everypar in case the
</span>  <span class="enscript-comment">% footnote extends for more than one paragraph.
</span>  <span class="enscript-keyword">\everypar</span> = {<span class="enscript-keyword">\hang</span>}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\textindent</span>{<span class="enscript-keyword">\thisfootno</span>}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Don't crash into the line above the footnote text.  Since this
</span>  <span class="enscript-comment">% expands into a box, it must come within the paragraph, lest it
</span>  <span class="enscript-comment">% provide a place where TeX can split the footnote.
</span>  <span class="enscript-keyword">\footstrut</span>
  <span class="enscript-keyword">\futurelet</span><span class="enscript-keyword">\next</span><span class="enscript-keyword">\fo</span>@t
}
}<span class="enscript-comment">%end \catcode `\@=11
</span>
<span class="enscript-comment">% In case a @footnote appears in a vbox, save the footnote text and create
</span><span class="enscript-comment">% the real \insert just after the vbox finished.  Otherwise, the insertion
</span><span class="enscript-comment">% would be lost.
</span><span class="enscript-comment">% Similarily, if a @footnote appears inside an alignment, save the footnote
</span><span class="enscript-comment">% text to a box and make the \insert when a row of the table is finished.
</span><span class="enscript-comment">% And the same can be done for other insert classes.  --kasal, 16nov03.
</span>
<span class="enscript-comment">% Replace the \insert primitive by a cheating macro.
</span><span class="enscript-comment">% Deeper inside, just make sure that the saved insertions are not spilled
</span><span class="enscript-comment">% out prematurely.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\startsavinginserts</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span> <span class="enscript-keyword">\insert</span><span class="enscript-keyword">\ptexinsert</span>
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\insert</span><span class="enscript-keyword">\saveinsert</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\checkinserts</span><span class="enscript-keyword">\relax</span>
  <span class="enscript-keyword">\fi</span>
}

<span class="enscript-comment">% This \insert replacement works for both \insert\footins{foo} and
</span><span class="enscript-comment">% \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\saveinsert</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\edef</span><span class="enscript-keyword">\next</span>{<span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\savetobox</span> <span class="enscript-keyword">\makeSAVEname</span>#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\afterassignment</span><span class="enscript-keyword">\next</span>
  <span class="enscript-comment">% swallow the left brace
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\temp</span> =
}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\makeSAVEname</span>#1{<span class="enscript-keyword">\makecsname</span>{SAVE<span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\gobble</span><span class="enscript-keyword">\string</span>#1}}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\savetobox</span>#1{<span class="enscript-keyword">\global</span><span class="enscript-keyword">\setbox</span>#1 = <span class="enscript-keyword">\vbox</span><span class="enscript-keyword">\bgroup</span> <span class="enscript-keyword">\unvbox</span>#1}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\checksaveins</span>#1{<span class="enscript-keyword">\ifvoid</span>#1<span class="enscript-keyword">\else</span> <span class="enscript-keyword">\placesaveins</span>#1<span class="enscript-keyword">\fi</span>}

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\placesaveins</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ptexinsert</span> <span class="enscript-keyword">\csname</span><span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\gobblesave</span><span class="enscript-keyword">\string</span>#1<span class="enscript-keyword">\endcsname</span>
    {<span class="enscript-keyword">\box</span>#1}<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% eat @SAVE -- beware, all of them have catcode \other:
</span>{
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\dospecials</span>{<span class="enscript-keyword">\do</span> S<span class="enscript-keyword">\do</span> A<span class="enscript-keyword">\do</span> V<span class="enscript-keyword">\do</span> E} <span class="enscript-keyword">\uncatcodespecials</span>  <span class="enscript-comment">%  ;-)
</span>  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\gobblesave</span> @SAVE{}
}

<span class="enscript-comment">% initialization:
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\newsaveins</span> #1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\edef</span><span class="enscript-keyword">\next</span>{<span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\newsaveinsX</span> <span class="enscript-keyword">\makeSAVEname</span>#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\next</span>
}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\newsaveinsX</span> #1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\csname</span> newbox<span class="enscript-keyword">\endcsname</span> #1<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\checkinserts</span><span class="enscript-keyword">\expandafter</span>{<span class="enscript-keyword">\checkinserts</span>
    <span class="enscript-keyword">\checksaveins</span> #1}<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% initialize:
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\checkinserts</span><span class="enscript-keyword">\empty</span>
<span class="enscript-keyword">\newsaveins</span><span class="enscript-keyword">\footins</span>
<span class="enscript-keyword">\newsaveins</span><span class="enscript-keyword">\margin</span>


<span class="enscript-comment">% @image.  We use the macros from epsf.tex to support this.
</span><span class="enscript-comment">% If epsf.tex is not installed and @image is used, we complain.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% Check for and read epsf.tex up front.  If we read it only at @image
</span><span class="enscript-comment">% time, we might be inside a group, and then its definitions would get
</span><span class="enscript-comment">% undone and the next image would fail.
</span><span class="enscript-keyword">\openin</span> 1 = epsf.tex
<span class="enscript-keyword">\ifeof</span> 1 <span class="enscript-keyword">\else</span>
  <span class="enscript-comment">% Do not bother showing banner with epsf.tex v2.7k (available in
</span>  <span class="enscript-comment">% doc/epsf.tex and on ctan).
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\epsfannounce</span>{<span class="enscript-keyword">\toks</span>0 = }<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\input</span> epsf.tex
<span class="enscript-keyword">\fi</span>
<span class="enscript-keyword">\closein</span> 1
<span class="enscript-comment">%
</span><span class="enscript-comment">% We will only complain once about lack of epsf.tex.
</span><span class="enscript-keyword">\newif</span><span class="enscript-keyword">\ifwarnednoepsf</span>
<span class="enscript-keyword">\newhelp</span><span class="enscript-keyword">\noepsfhelp</span>{epsf.tex must be installed for images to
  work.  It is also included in the Texinfo distribution, or you can get
  it from <a href="ftp://tug.org/tex/epsf.tex.">ftp://tug.org/tex/epsf.tex.</a>}
<span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\image</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\epsfbox</span><span class="enscript-keyword">\undefined</span>
    <span class="enscript-keyword">\ifwarnednoepsf</span> <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\errhelp</span> = <span class="enscript-keyword">\noepsfhelp</span>
      <span class="enscript-keyword">\errmessage</span>{epsf.tex not found, images will be ignored}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\global</span><span class="enscript-keyword">\warnednoepsftrue</span>
    <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\imagexxx</span> #1,,,,,<span class="enscript-keyword">\finish</span>
  <span class="enscript-keyword">\fi</span>
}
<span class="enscript-comment">%
</span><span class="enscript-comment">% Arguments to @image:
</span><span class="enscript-comment">% #1 is (mandatory) image filename; we tack on .eps extension.
</span><span class="enscript-comment">% #2 is (optional) width, #3 is (optional) height.
</span><span class="enscript-comment">% #4 is (ignored optional) html alt text.
</span><span class="enscript-comment">% #5 is (ignored optional) extension.
</span><span class="enscript-comment">% #6 is just the usual extra ignored arg for parsing this stuff.
</span><span class="enscript-keyword">\newif</span><span class="enscript-keyword">\ifimagevmode</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\imagexxx</span>#1,#2,#3,#4,#5,#6<span class="enscript-keyword">\finish</span>{<span class="enscript-keyword">\begingroup</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>^M = 5     <span class="enscript-comment">% in case we're inside an example
</span>  <span class="enscript-keyword">\normalturnoffactive</span>  <span class="enscript-comment">% allow _ et al. in names
</span>  <span class="enscript-comment">% If the image is by itself, center it.
</span>  <span class="enscript-keyword">\ifvmode</span>
    <span class="enscript-keyword">\imagevmodetrue</span>
    <span class="enscript-keyword">\nobreak</span><span class="enscript-keyword">\bigskip</span>
    <span class="enscript-comment">% Usually we'll have text after the image which will insert
</span>    <span class="enscript-comment">% \parskip glue, so insert it here too to equalize the space
</span>    <span class="enscript-comment">% above and below.
</span>    <span class="enscript-keyword">\nobreak</span><span class="enscript-keyword">\vskip</span><span class="enscript-keyword">\parskip</span>
    <span class="enscript-keyword">\nobreak</span>
    <span class="enscript-keyword">\line</span><span class="enscript-keyword">\bgroup</span>
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Output the image.
</span>  <span class="enscript-keyword">\ifpdf</span>
    <span class="enscript-keyword">\dopdfimage</span>{#1}{#2}{#3}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span>
    <span class="enscript-comment">% \epsfbox itself resets \epsf?size at each figure.
</span>    <span class="enscript-keyword">\setbox</span>0 = <span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\ignorespaces</span> #2}<span class="enscript-keyword">\ifdim</span><span class="enscript-keyword">\wd</span>0 &gt; 0pt <span class="enscript-keyword">\epsfxsize</span>=#2<span class="enscript-keyword">\relax</span> <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\setbox</span>0 = <span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\ignorespaces</span> #3}<span class="enscript-keyword">\ifdim</span><span class="enscript-keyword">\wd</span>0 &gt; 0pt <span class="enscript-keyword">\epsfysize</span>=#3<span class="enscript-keyword">\relax</span> <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\epsfbox</span>{#1.eps}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifimagevmode</span> <span class="enscript-keyword">\egroup</span> <span class="enscript-keyword">\bigbreak</span> <span class="enscript-keyword">\fi</span>  <span class="enscript-comment">% space after the image
</span><span class="enscript-keyword">\endgroup</span>}


<span class="enscript-comment">% @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables,
</span><span class="enscript-comment">% etc.  We don't actually implement floating yet, we always include the
</span><span class="enscript-comment">% float &quot;here&quot;.  But it seemed the best name for the future.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\envparseargdef</span><span class="enscript-keyword">\float</span>{<span class="enscript-keyword">\eatcommaspace</span><span class="enscript-keyword">\eatcommaspace</span><span class="enscript-keyword">\dofloat</span>#1, , ,<span class="enscript-keyword">\finish</span>}

<span class="enscript-comment">% There may be a space before second and/or third parameter; delete it.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\eatcommaspace</span>#1, {#1,}

<span class="enscript-comment">% #1 is the optional FLOATTYPE, the text label for this float, typically
</span><span class="enscript-comment">% &quot;Figure&quot;, &quot;Table&quot;, &quot;Example&quot;, etc.  Can't contain commas.  If omitted,
</span><span class="enscript-comment">% this float will not be numbered and cannot be referred to.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% #2 is the optional xref label.  Also must be present for the float to
</span><span class="enscript-comment">% be referable.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% #3 is the optional positioning argument; for now, it is ignored.  It
</span><span class="enscript-comment">% will somehow specify the positions allowed to float to (here, top, bottom).
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% We keep a separate counter for each FLOATTYPE, which we reset at each
</span><span class="enscript-comment">% chapter-level command.
</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\resetallfloatnos</span>=<span class="enscript-keyword">\empty</span>
<span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\dofloat</span>#1,#2,#3,#4<span class="enscript-keyword">\finish</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\thiscaption</span>=<span class="enscript-keyword">\empty</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\thisshortcaption</span>=<span class="enscript-keyword">\empty</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% don't lose footnotes inside @float.
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% BEWARE: when the floats start float, we have to issue warning whenever an
</span>  <span class="enscript-comment">% insert appears inside a float which could possibly float. --kasal, 26may04
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\startsavinginserts</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% We can't be used inside a paragraph.
</span>  <span class="enscript-keyword">\par</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\vtop</span><span class="enscript-keyword">\bgroup</span>
    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\floattype</span>{#1}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\floatlabel</span>{#2}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\floatloc</span>{#3}<span class="enscript-comment">% we do nothing with this yet.
</span>    <span class="enscript-comment">%
</span>    <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\floattype</span><span class="enscript-keyword">\empty</span>
      <span class="enscript-keyword">\let</span><span class="enscript-keyword">\safefloattype</span>=<span class="enscript-keyword">\empty</span>
    <span class="enscript-keyword">\else</span>
      {<span class="enscript-comment">%
</span>        <span class="enscript-comment">% the floattype might have accents or other special characters,
</span>        <span class="enscript-comment">% but we need to use it in a control sequence name.
</span>        <span class="enscript-keyword">\indexnofonts</span>
        <span class="enscript-keyword">\turnoffactive</span>
        <span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\safefloattype</span>{<span class="enscript-keyword">\floattype</span>}<span class="enscript-comment">%
</span>      }<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\fi</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% If label is given but no type, we handle that as the empty type.
</span>    <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\floatlabel</span><span class="enscript-keyword">\empty</span> <span class="enscript-keyword">\else</span>
      <span class="enscript-comment">% We want each FLOATTYPE to be numbered separately (Figure 1,
</span>      <span class="enscript-comment">% Table 1, Figure 2, ...).  (And if no label, no number.)
</span>      <span class="enscript-comment">%
</span>      <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\getfloatno</span><span class="enscript-keyword">\csname</span><span class="enscript-keyword">\safefloattype</span> floatno<span class="enscript-keyword">\endcsname</span>
      <span class="enscript-keyword">\global</span><span class="enscript-keyword">\advance</span><span class="enscript-keyword">\floatno</span> by 1
      <span class="enscript-comment">%
</span>      {<span class="enscript-comment">%
</span>        <span class="enscript-comment">% This magic value for \thissection is output by \setref as the
</span>        <span class="enscript-comment">% XREFLABEL-title value.  \xrefX uses it to distinguish float
</span>        <span class="enscript-comment">% labels (which have a completely different output format) from
</span>        <span class="enscript-comment">% node and anchor labels.  And \xrdef uses it to construct the
</span>        <span class="enscript-comment">% lists of floats.
</span>        <span class="enscript-comment">%
</span>        <span class="enscript-keyword">\edef</span><span class="enscript-keyword">\thissection</span>{<span class="enscript-keyword">\floatmagic</span>=<span class="enscript-keyword">\safefloattype</span>}<span class="enscript-comment">%
</span>        <span class="enscript-keyword">\setref</span>{<span class="enscript-keyword">\floatlabel</span>}{Yfloat}<span class="enscript-comment">%
</span>      }<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\fi</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% start with \parskip glue, I guess.
</span>    <span class="enscript-keyword">\vskip</span><span class="enscript-keyword">\parskip</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Don't suppress indentation if a float happens to start a section.
</span>    <span class="enscript-keyword">\restorefirstparagraphindent</span>
}

<span class="enscript-comment">% we have these possibilities:
</span><span class="enscript-comment">% @float Foo,lbl &amp; @caption{Cap}: Foo 1.1: Cap
</span><span class="enscript-comment">% @float Foo,lbl &amp; no caption:    Foo 1.1
</span><span class="enscript-comment">% @float Foo &amp; @caption{Cap}:     Foo: Cap
</span><span class="enscript-comment">% @float Foo &amp; no caption:        Foo
</span><span class="enscript-comment">% @float ,lbl &amp; Caption{Cap}:     1.1: Cap
</span><span class="enscript-comment">% @float ,lbl &amp; no caption:       1.1
</span><span class="enscript-comment">% @float &amp; @caption{Cap}:         Cap
</span><span class="enscript-comment">% @float &amp; no caption:
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\Efloat</span>{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\floatident</span> = <span class="enscript-keyword">\empty</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% In all cases, if we have a float type, it comes first.
</span>    <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\floattype</span><span class="enscript-keyword">\empty</span> <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\def</span><span class="enscript-keyword">\floatident</span>{<span class="enscript-keyword">\floattype</span>}<span class="enscript-keyword">\fi</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% If we have an xref label, the number comes next.
</span>    <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\floatlabel</span><span class="enscript-keyword">\empty</span> <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\floattype</span><span class="enscript-keyword">\empty</span> <span class="enscript-keyword">\else</span> <span class="enscript-comment">% if also had float type, need tie first.
</span>        <span class="enscript-keyword">\appendtomacro</span><span class="enscript-keyword">\floatident</span>{<span class="enscript-keyword">\tie</span>}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\fi</span>
      <span class="enscript-comment">% the number.
</span>      <span class="enscript-keyword">\appendtomacro</span><span class="enscript-keyword">\floatident</span>{<span class="enscript-keyword">\chaplevelprefix</span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\floatno</span>}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\fi</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% Start the printed caption with what we've constructed in
</span>    <span class="enscript-comment">% \floatident, but keep it separate; we need \floatident again.
</span>    <span class="enscript-keyword">\let</span><span class="enscript-keyword">\captionline</span> = <span class="enscript-keyword">\floatident</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\thiscaption</span><span class="enscript-keyword">\empty</span> <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\floatident</span><span class="enscript-keyword">\empty</span> <span class="enscript-keyword">\else</span>
	<span class="enscript-keyword">\appendtomacro</span><span class="enscript-keyword">\captionline</span>{: }<span class="enscript-comment">% had ident, so need a colon between
</span>      <span class="enscript-keyword">\fi</span>
      <span class="enscript-comment">%
</span>      <span class="enscript-comment">% caption text.
</span>      <span class="enscript-keyword">\appendtomacro</span><span class="enscript-keyword">\captionline</span>{<span class="enscript-keyword">\scanexp</span><span class="enscript-keyword">\thiscaption</span>}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\fi</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% If we have anything to print, print it, with space before.
</span>    <span class="enscript-comment">% Eventually this needs to become an \insert.
</span>    <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\captionline</span><span class="enscript-keyword">\empty</span> <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\vskip</span>.5<span class="enscript-keyword">\parskip</span>
      <span class="enscript-keyword">\captionline</span>
      <span class="enscript-comment">%
</span>      <span class="enscript-comment">% Space below caption.
</span>      <span class="enscript-keyword">\vskip</span><span class="enscript-keyword">\parskip</span>
    <span class="enscript-keyword">\fi</span>
    <span class="enscript-comment">%
</span>    <span class="enscript-comment">% If have an xref label, write the list of floats info.  Do this
</span>    <span class="enscript-comment">% after the caption, to avoid chance of it being a breakpoint.
</span>    <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\floatlabel</span><span class="enscript-keyword">\empty</span> <span class="enscript-keyword">\else</span>
      <span class="enscript-comment">% Write the text that goes in the lof to the aux file as
</span>      <span class="enscript-comment">% \floatlabel-lof.  Besides \floatident, we include the short
</span>      <span class="enscript-comment">% caption if specified, else the full caption if specified, else nothing.
</span>      {<span class="enscript-comment">%
</span>        <span class="enscript-keyword">\atdummies</span>
        <span class="enscript-comment">%
</span>        <span class="enscript-comment">% since we read the caption text in the macro world, where ^^M
</span>        <span class="enscript-comment">% is turned into a normal character, we have to scan it back, so
</span>        <span class="enscript-comment">% we don't write the literal three characters &quot;^^M&quot; into the aux file.
</span>	<span class="enscript-keyword">\scanexp</span>{<span class="enscript-comment">%
</span>	  <span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\gtemp</span>{<span class="enscript-comment">%
</span>	    <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\thisshortcaption</span><span class="enscript-keyword">\empty</span>
	      <span class="enscript-keyword">\thiscaption</span>
	    <span class="enscript-keyword">\else</span>
	      <span class="enscript-keyword">\thisshortcaption</span>
	    <span class="enscript-keyword">\fi</span>
	  }<span class="enscript-comment">%
</span>	}<span class="enscript-comment">%
</span>        <span class="enscript-keyword">\immediate</span><span class="enscript-keyword">\write</span><span class="enscript-keyword">\auxfile</span>{@xrdef{<span class="enscript-keyword">\floatlabel</span>-lof}{<span class="enscript-keyword">\floatident</span>
	  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\gtemp</span><span class="enscript-keyword">\empty</span> <span class="enscript-keyword">\else</span> : <span class="enscript-keyword">\gtemp</span> <span class="enscript-keyword">\fi</span>}}<span class="enscript-comment">%
</span>      }<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\egroup</span>  <span class="enscript-comment">% end of \vtop
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% place the captured inserts
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% BEWARE: when the floats start floating, we have to issue warning
</span>  <span class="enscript-comment">% whenever an insert appears inside a float which could possibly
</span>  <span class="enscript-comment">% float. --kasal, 26may04
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\checkinserts</span>
}

<span class="enscript-comment">% Append the tokens #2 to the definition of macro #1, not expanding either.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\appendtomacro</span>#1#2{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\expandafter</span>#1<span class="enscript-keyword">\expandafter</span>{#1#2}<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% @caption, @shortcaption
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\caption</span>{<span class="enscript-keyword">\docaption</span><span class="enscript-keyword">\thiscaption</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\shortcaption</span>{<span class="enscript-keyword">\docaption</span><span class="enscript-keyword">\thisshortcaption</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\docaption</span>{<span class="enscript-keyword">\checkenv</span><span class="enscript-keyword">\float</span> <span class="enscript-keyword">\bgroup</span><span class="enscript-keyword">\scanargctxt</span><span class="enscript-keyword">\defcaption</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\defcaption</span>#1#2{<span class="enscript-keyword">\egroup</span> <span class="enscript-keyword">\def</span>#1{#2}}

<span class="enscript-comment">% The parameter is the control sequence identifying the counter we are
</span><span class="enscript-comment">% going to use.  Create it if it doesn't exist and assign it to \floatno.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\getfloatno</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span>#1<span class="enscript-keyword">\relax</span>
      <span class="enscript-comment">% Haven't seen this figure type before.
</span>      <span class="enscript-keyword">\csname</span> newcount<span class="enscript-keyword">\endcsname</span> #1<span class="enscript-comment">%
</span>      <span class="enscript-comment">%
</span>      <span class="enscript-comment">% Remember to reset this floatno at the next chap.
</span>      <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\resetallfloatnos</span>
        <span class="enscript-keyword">\expandafter</span>{<span class="enscript-keyword">\resetallfloatnos</span> #1=0 }<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\let</span><span class="enscript-keyword">\floatno</span>#1<span class="enscript-comment">%
</span>}

<span class="enscript-comment">% \setref calls this to get the XREFLABEL-snt value.  We want an @xref
</span><span class="enscript-comment">% to the FLOATLABEL to expand to &quot;Figure 3.1&quot;.  We call \setref when we
</span><span class="enscript-comment">% first read the @float command.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\Yfloat</span>{<span class="enscript-keyword">\floattype</span>@tie <span class="enscript-keyword">\chaplevelprefix</span><span class="enscript-keyword">\the</span><span class="enscript-keyword">\floatno</span>}<span class="enscript-comment">%
</span>
<span class="enscript-comment">% Magic string used for the XREFLABEL-title value, so \xrefX can
</span><span class="enscript-comment">% distinguish floats from other xref types.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\floatmagic</span>{!!float!!}

<span class="enscript-comment">% #1 is the control sequence we are passed; we expand into a conditional
</span><span class="enscript-comment">% which is true if #1 represents a float ref.  That is, the magic
</span><span class="enscript-comment">% \thissection value which we \setref above.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\iffloat</span>#1{<span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\doiffloat</span>#1==<span class="enscript-keyword">\finish</span>}
<span class="enscript-comment">%
</span><span class="enscript-comment">% #1 is (maybe) the \floatmagic string.  If so, #2 will be the
</span><span class="enscript-comment">% (safe) float type for this float.  We set \iffloattype to #2.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\doiffloat</span>#1=#2=#3<span class="enscript-keyword">\finish</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\temp</span>{#1}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\iffloattype</span>{#2}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\temp</span><span class="enscript-keyword">\floatmagic</span>
}

<span class="enscript-comment">% @listoffloats FLOATTYPE - print a list of floats like a table of contents.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\listoffloats</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\floattype</span>{#1}<span class="enscript-comment">% floattype
</span>  {<span class="enscript-comment">%
</span>    <span class="enscript-comment">% the floattype might have accents or other special characters,
</span>    <span class="enscript-comment">% but we need to use it in a control sequence name.
</span>    <span class="enscript-keyword">\indexnofonts</span>
    <span class="enscript-keyword">\turnoffactive</span>
    <span class="enscript-keyword">\xdef</span><span class="enscript-keyword">\safefloattype</span>{<span class="enscript-keyword">\floattype</span>}<span class="enscript-comment">%
</span>  }<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE.
</span>  <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\csname</span> floatlist<span class="enscript-keyword">\safefloattype</span><span class="enscript-keyword">\endcsname</span> <span class="enscript-keyword">\relax</span>
    <span class="enscript-keyword">\ifhavexrefs</span>
      <span class="enscript-comment">% if the user said @listoffloats foo but never @float foo.
</span>      <span class="enscript-keyword">\message</span>{<span class="enscript-keyword">\linenumber</span> No `<span class="enscript-keyword">\safefloattype</span>' floats to list.}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\begingroup</span>
      <span class="enscript-keyword">\leftskip</span>=<span class="enscript-keyword">\tocindent</span>  <span class="enscript-comment">% indent these entries like a toc
</span>      <span class="enscript-keyword">\let</span><span class="enscript-keyword">\do</span>=<span class="enscript-keyword">\listoffloatsdo</span>
      <span class="enscript-keyword">\csname</span> floatlist<span class="enscript-keyword">\safefloattype</span><span class="enscript-keyword">\endcsname</span>
    <span class="enscript-keyword">\endgroup</span>
  <span class="enscript-keyword">\fi</span>
}

<span class="enscript-comment">% This is called on each entry in a list of floats.  We're passed the
</span><span class="enscript-comment">% xref label, in the form LABEL-title, which is how we save it in the
</span><span class="enscript-comment">% aux file.  We strip off the -title and look up \XRLABEL-lof, which
</span><span class="enscript-comment">% has the text we're supposed to typeset here.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% Figures without xref labels will not be included in the list (since
</span><span class="enscript-comment">% they won't appear in the aux file).
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\listoffloatsdo</span>#1{<span class="enscript-keyword">\listoffloatsdoentry</span>#1<span class="enscript-keyword">\finish</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\listoffloatsdoentry</span>#1-title<span class="enscript-keyword">\finish</span>{{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% Can't fully expand XR#1-lof because it can contain anything.  Just
</span>  <span class="enscript-comment">% pass the control sequence.  On the other hand, XR#1-pg is just the
</span>  <span class="enscript-comment">% page number, and we want to fully expand that so we can get a link
</span>  <span class="enscript-comment">% in pdf output.
</span>  <span class="enscript-keyword">\toksA</span> = <span class="enscript-keyword">\expandafter</span>{<span class="enscript-keyword">\csname</span> XR#1-lof<span class="enscript-keyword">\endcsname</span>}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% use the same \entry macro we use to generate the TOC and index.
</span>  <span class="enscript-keyword">\edef</span><span class="enscript-keyword">\writeentry</span>{<span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\entry</span>{<span class="enscript-keyword">\the</span><span class="enscript-keyword">\toksA</span>}{<span class="enscript-keyword">\csname</span> XR#1-pg<span class="enscript-keyword">\endcsname</span>}}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\writeentry</span>
}}


<span class="enscript-keyword">\message</span>{localization,}

<span class="enscript-comment">% @documentlanguage is usually given very early, just after
</span><span class="enscript-comment">% @setfilename.  If done too late, it may not override everything
</span><span class="enscript-comment">% properly.  Single argument is the language abbreviation.
</span><span class="enscript-comment">% It would be nice if we could set up a hyphenation file here.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\documentlanguage</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\tex</span> <span class="enscript-comment">% read txi-??.tex file in plain TeX.
</span>    <span class="enscript-comment">% Read the file if it exists.
</span>    <span class="enscript-keyword">\openin</span> 1 txi-#1.tex
    <span class="enscript-keyword">\ifeof</span> 1
      <span class="enscript-keyword">\errhelp</span> = <span class="enscript-keyword">\nolanghelp</span>
      <span class="enscript-keyword">\errmessage</span>{Cannot read language file txi-#1.tex}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\input</span> txi-#1.tex
    <span class="enscript-keyword">\fi</span>
    <span class="enscript-keyword">\closein</span> 1
  <span class="enscript-keyword">\endgroup</span>
}
<span class="enscript-keyword">\newhelp</span><span class="enscript-keyword">\nolanghelp</span>{The given language definition file cannot be found or
is empty.  Maybe you need to install it?  In the current directory
should work if nowhere else does.}

<span class="enscript-comment">% Set the catcode of characters 128 through 255 to the specified number.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\setnonasciicharscatcode</span>#1{<span class="enscript-comment">%
</span>   <span class="enscript-keyword">\count</span>255=128
   <span class="enscript-keyword">\loop</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\count</span>255&lt;256
      <span class="enscript-keyword">\global</span><span class="enscript-keyword">\catcode</span><span class="enscript-keyword">\count</span>255=#1
      <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\count</span>255 by 1
   <span class="enscript-keyword">\repeat</span>
}

<span class="enscript-comment">% @documentencoding sets the definition of non-ASCII characters
</span><span class="enscript-comment">% according to the specified encoding.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\documentencoding</span>{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% Encoding being declared for the document.
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\declaredencoding</span>{<span class="enscript-keyword">\csname</span> #1.enc<span class="enscript-keyword">\endcsname</span>}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Supported encodings: names converted to tokens in order to be able
</span>  <span class="enscript-comment">% to compare them with \ifx.
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\ascii</span>{<span class="enscript-keyword">\csname</span> US-ASCII.enc<span class="enscript-keyword">\endcsname</span>}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\latnine</span>{<span class="enscript-keyword">\csname</span> ISO-8859-15.enc<span class="enscript-keyword">\endcsname</span>}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\latone</span>{<span class="enscript-keyword">\csname</span> ISO-8859-1.enc<span class="enscript-keyword">\endcsname</span>}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\lattwo</span>{<span class="enscript-keyword">\csname</span> ISO-8859-2.enc<span class="enscript-keyword">\endcsname</span>}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\utfeight</span>{<span class="enscript-keyword">\csname</span> UTF-8.enc<span class="enscript-keyword">\endcsname</span>}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span> <span class="enscript-keyword">\declaredencoding</span> <span class="enscript-keyword">\ascii</span>
     <span class="enscript-keyword">\asciichardefs</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\ifx</span> <span class="enscript-keyword">\declaredencoding</span> <span class="enscript-keyword">\lattwo</span>
     <span class="enscript-keyword">\setnonasciicharscatcode</span><span class="enscript-keyword">\active</span>
     <span class="enscript-keyword">\lattwochardefs</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\ifx</span> <span class="enscript-keyword">\declaredencoding</span> <span class="enscript-keyword">\latone</span> 
     <span class="enscript-keyword">\setnonasciicharscatcode</span><span class="enscript-keyword">\active</span>
     <span class="enscript-keyword">\latonechardefs</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\ifx</span> <span class="enscript-keyword">\declaredencoding</span> <span class="enscript-keyword">\latnine</span>
     <span class="enscript-keyword">\setnonasciicharscatcode</span><span class="enscript-keyword">\active</span>
     <span class="enscript-keyword">\latninechardefs</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span> <span class="enscript-keyword">\ifx</span> <span class="enscript-keyword">\declaredencoding</span> <span class="enscript-keyword">\utfeight</span>
     <span class="enscript-keyword">\setnonasciicharscatcode</span><span class="enscript-keyword">\active</span>
     <span class="enscript-keyword">\utfeightchardefs</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span> 
    <span class="enscript-keyword">\message</span>{Unknown document encoding #1, ignoring.}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span> <span class="enscript-comment">% utfeight
</span>  <span class="enscript-keyword">\fi</span> <span class="enscript-comment">% latnine
</span>  <span class="enscript-keyword">\fi</span> <span class="enscript-comment">% latone
</span>  <span class="enscript-keyword">\fi</span> <span class="enscript-comment">% lattwo
</span>  <span class="enscript-keyword">\fi</span> <span class="enscript-comment">% ascii
</span>}

<span class="enscript-comment">% A message to be logged when using a character that isn't available
</span><span class="enscript-comment">% the default font encoding (OT1).
</span><span class="enscript-comment">% 
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\missingcharmsg</span>#1{<span class="enscript-keyword">\message</span>{Character missing in OT1 encoding: #1.}}

<span class="enscript-comment">% Take account of \c (plain) vs. \, (Texinfo) difference.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\cedilla</span>#1{<span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\c</span><span class="enscript-keyword">\ptexc</span><span class="enscript-keyword">\c</span>{#1}<span class="enscript-keyword">\else</span><span class="enscript-keyword">\,</span>{#1}<span class="enscript-keyword">\fi</span>}

<span class="enscript-comment">% First, make active non-ASCII characters in order for them to be
</span><span class="enscript-comment">% correctly categorized when TeX reads the replacement text of
</span><span class="enscript-comment">% macros containing the character definitions.
</span><span class="enscript-keyword">\setnonasciicharscatcode</span><span class="enscript-keyword">\active</span>
<span class="enscript-comment">%
</span><span class="enscript-comment">% Latin1 (ISO-8859-1) character definitions.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\latonechardefs</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\gdef</span>^^a0{~} 
  <span class="enscript-keyword">\gdef</span>^^a1{<span class="enscript-keyword">\exclamdown</span>}
  <span class="enscript-keyword">\gdef</span>^^a2{<span class="enscript-keyword">\missingcharmsg</span>{CENT SIGN}} 
  <span class="enscript-keyword">\gdef</span>^^a3{{<span class="enscript-keyword">\pounds</span>}}
  <span class="enscript-keyword">\gdef</span>^^a4{<span class="enscript-keyword">\missingcharmsg</span>{CURRENCY SIGN}}
  <span class="enscript-keyword">\gdef</span>^^a5{<span class="enscript-keyword">\missingcharmsg</span>{YEN SIGN}}
  <span class="enscript-keyword">\gdef</span>^^a6{<span class="enscript-keyword">\missingcharmsg</span>{BROKEN BAR}} 
  <span class="enscript-keyword">\gdef</span>^^a7{<span class="enscript-keyword">\S</span>}
  <span class="enscript-keyword">\gdef</span>^^a8{<span class="enscript-keyword">\&quot;</span>{}} 
  <span class="enscript-keyword">\gdef</span>^^a9{<span class="enscript-keyword">\copyright</span>} 
  <span class="enscript-keyword">\gdef</span>^^aa{<span class="enscript-keyword">\ordf</span>}
  <span class="enscript-keyword">\gdef</span>^^ab{<span class="enscript-keyword">\missingcharmsg</span>{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}} 
  <span class="enscript-keyword">\gdef</span>^^ac{<span class="enscript-variable-name">$\lnot$</span>}
  <span class="enscript-keyword">\gdef</span>^^ad{<span class="enscript-keyword">\-</span>} 
  <span class="enscript-keyword">\gdef</span>^^ae{<span class="enscript-keyword">\registeredsymbol</span>} 
  <span class="enscript-keyword">\gdef</span>^^af{<span class="enscript-keyword">\=</span>{}}
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\gdef</span>^^b0{<span class="enscript-keyword">\textdegree</span>}
  <span class="enscript-keyword">\gdef</span>^^b1{<span class="enscript-variable-name">$\pm$</span>}
  <span class="enscript-keyword">\gdef</span>^^b2{<span class="enscript-variable-name">$^2$</span>}
  <span class="enscript-keyword">\gdef</span>^^b3{<span class="enscript-variable-name">$^3$</span>}
  <span class="enscript-keyword">\gdef</span>^^b4{<span class="enscript-keyword">\'</span>{}}
  <span class="enscript-keyword">\gdef</span>^^b5{<span class="enscript-variable-name">$\mu$</span>}
  <span class="enscript-keyword">\gdef</span>^^b6{<span class="enscript-keyword">\P</span>}
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\gdef</span>^^b7{<span class="enscript-variable-name">$^.$</span>}
  <span class="enscript-keyword">\gdef</span>^^b8{<span class="enscript-keyword">\cedilla</span><span class="enscript-keyword">\ </span>}
  <span class="enscript-keyword">\gdef</span>^^b9{<span class="enscript-variable-name">$^1$</span>}
  <span class="enscript-keyword">\gdef</span>^^ba{<span class="enscript-keyword">\ordm</span>}
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\gdef</span>^^bb{<span class="enscript-keyword">\missingcharmsg</span>{RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK}}
  <span class="enscript-keyword">\gdef</span>^^bc{<span class="enscript-variable-name">$1\over4$</span>}
  <span class="enscript-keyword">\gdef</span>^^bd{<span class="enscript-variable-name">$1\over2$</span>}
  <span class="enscript-keyword">\gdef</span>^^be{<span class="enscript-variable-name">$3\over4$</span>}
  <span class="enscript-keyword">\gdef</span>^^bf{<span class="enscript-keyword">\questiondown</span>}
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\gdef</span>^^c0{<span class="enscript-keyword">\`</span>A}
  <span class="enscript-keyword">\gdef</span>^^c1{<span class="enscript-keyword">\'</span>A}
  <span class="enscript-keyword">\gdef</span>^^c2{<span class="enscript-keyword">\^</span>A}
  <span class="enscript-keyword">\gdef</span>^^c3{<span class="enscript-keyword">\~</span>A}
  <span class="enscript-keyword">\gdef</span>^^c4{<span class="enscript-keyword">\&quot;</span>A}
  <span class="enscript-keyword">\gdef</span>^^c5{<span class="enscript-keyword">\ringaccent</span> A} 
  <span class="enscript-keyword">\gdef</span>^^c6{<span class="enscript-keyword">\AE</span>}
  <span class="enscript-keyword">\gdef</span>^^c7{<span class="enscript-keyword">\cedilla</span> C}
  <span class="enscript-keyword">\gdef</span>^^c8{<span class="enscript-keyword">\`</span>E}
  <span class="enscript-keyword">\gdef</span>^^c9{<span class="enscript-keyword">\'</span>E}
  <span class="enscript-keyword">\gdef</span>^^ca{<span class="enscript-keyword">\^</span>E}
  <span class="enscript-keyword">\gdef</span>^^cb{<span class="enscript-keyword">\&quot;</span>E}
  <span class="enscript-keyword">\gdef</span>^^cc{<span class="enscript-keyword">\`</span>I}
  <span class="enscript-keyword">\gdef</span>^^cd{<span class="enscript-keyword">\'</span>I}
  <span class="enscript-keyword">\gdef</span>^^ce{<span class="enscript-keyword">\^</span>I}
  <span class="enscript-keyword">\gdef</span>^^cf{<span class="enscript-keyword">\&quot;</span>I}
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\gdef</span>^^d0{<span class="enscript-keyword">\missingcharmsg</span>{LATIN CAPITAL LETTER ETH}}
  <span class="enscript-keyword">\gdef</span>^^d1{<span class="enscript-keyword">\~</span>N}
  <span class="enscript-keyword">\gdef</span>^^d2{<span class="enscript-keyword">\`</span>O}
  <span class="enscript-keyword">\gdef</span>^^d3{<span class="enscript-keyword">\'</span>O}
  <span class="enscript-keyword">\gdef</span>^^d4{<span class="enscript-keyword">\^</span>O}
  <span class="enscript-keyword">\gdef</span>^^d5{<span class="enscript-keyword">\~</span>O}
  <span class="enscript-keyword">\gdef</span>^^d6{<span class="enscript-keyword">\&quot;</span>O}
  <span class="enscript-keyword">\gdef</span>^^d7{<span class="enscript-variable-name">$\times$</span>}
  <span class="enscript-keyword">\gdef</span>^^d8{<span class="enscript-keyword">\O</span>}
  <span class="enscript-keyword">\gdef</span>^^d9{<span class="enscript-keyword">\`</span>U}
  <span class="enscript-keyword">\gdef</span>^^da{<span class="enscript-keyword">\'</span>U}
  <span class="enscript-keyword">\gdef</span>^^db{<span class="enscript-keyword">\^</span>U}
  <span class="enscript-keyword">\gdef</span>^^dc{<span class="enscript-keyword">\&quot;</span>U}
  <span class="enscript-keyword">\gdef</span>^^dd{<span class="enscript-keyword">\'</span>Y}
  <span class="enscript-keyword">\gdef</span>^^de{<span class="enscript-keyword">\missingcharmsg</span>{LATIN CAPITAL LETTER THORN}}
  <span class="enscript-keyword">\gdef</span>^^df{<span class="enscript-keyword">\ss</span>}
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\gdef</span>^^e0{<span class="enscript-keyword">\`</span>a}
  <span class="enscript-keyword">\gdef</span>^^e1{<span class="enscript-keyword">\'</span>a}
  <span class="enscript-keyword">\gdef</span>^^e2{<span class="enscript-keyword">\^</span>a}
  <span class="enscript-keyword">\gdef</span>^^e3{<span class="enscript-keyword">\~</span>a}
  <span class="enscript-keyword">\gdef</span>^^e4{<span class="enscript-keyword">\&quot;</span>a}
  <span class="enscript-keyword">\gdef</span>^^e5{<span class="enscript-keyword">\ringaccent</span> a}
  <span class="enscript-keyword">\gdef</span>^^e6{<span class="enscript-keyword">\ae</span>}
  <span class="enscript-keyword">\gdef</span>^^e7{<span class="enscript-keyword">\cedilla</span> c}
  <span class="enscript-keyword">\gdef</span>^^e8{<span class="enscript-keyword">\`</span>e}
  <span class="enscript-keyword">\gdef</span>^^e9{<span class="enscript-keyword">\'</span>e}
  <span class="enscript-keyword">\gdef</span>^^ea{<span class="enscript-keyword">\^</span>e}
  <span class="enscript-keyword">\gdef</span>^^eb{<span class="enscript-keyword">\&quot;</span>e}
  <span class="enscript-keyword">\gdef</span>^^ec{<span class="enscript-keyword">\`</span>{<span class="enscript-keyword">\dotless</span> i}}
  <span class="enscript-keyword">\gdef</span>^^ed{<span class="enscript-keyword">\'</span>{<span class="enscript-keyword">\dotless</span> i}}
  <span class="enscript-keyword">\gdef</span>^^ee{<span class="enscript-keyword">\^</span>{<span class="enscript-keyword">\dotless</span> i}}
  <span class="enscript-keyword">\gdef</span>^^ef{<span class="enscript-keyword">\&quot;</span>{<span class="enscript-keyword">\dotless</span> i}}
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\gdef</span>^^f0{<span class="enscript-keyword">\missingcharmsg</span>{LATIN SMALL LETTER ETH}}
  <span class="enscript-keyword">\gdef</span>^^f1{<span class="enscript-keyword">\~</span>n}
  <span class="enscript-keyword">\gdef</span>^^f2{<span class="enscript-keyword">\`</span>o}
  <span class="enscript-keyword">\gdef</span>^^f3{<span class="enscript-keyword">\'</span>o}
  <span class="enscript-keyword">\gdef</span>^^f4{<span class="enscript-keyword">\^</span>o}
  <span class="enscript-keyword">\gdef</span>^^f5{<span class="enscript-keyword">\~</span>o}
  <span class="enscript-keyword">\gdef</span>^^f6{<span class="enscript-keyword">\&quot;</span>o}
  <span class="enscript-keyword">\gdef</span>^^f7{<span class="enscript-variable-name">$\div$</span>}
  <span class="enscript-keyword">\gdef</span>^^f8{<span class="enscript-keyword">\o</span>}
  <span class="enscript-keyword">\gdef</span>^^f9{<span class="enscript-keyword">\`</span>u}
  <span class="enscript-keyword">\gdef</span>^^fa{<span class="enscript-keyword">\'</span>u}
  <span class="enscript-keyword">\gdef</span>^^fb{<span class="enscript-keyword">\^</span>u}
  <span class="enscript-keyword">\gdef</span>^^fc{<span class="enscript-keyword">\&quot;</span>u}
  <span class="enscript-keyword">\gdef</span>^^fd{<span class="enscript-keyword">\'</span>y}
  <span class="enscript-keyword">\gdef</span>^^fe{<span class="enscript-keyword">\missingcharmsg</span>{LATIN SMALL LETTER THORN}}
  <span class="enscript-keyword">\gdef</span>^^ff{<span class="enscript-keyword">\&quot;</span>y}
}

<span class="enscript-comment">% Latin9 (ISO-8859-15) encoding character definitions.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\latninechardefs</span>{<span class="enscript-comment">%
</span>  <span class="enscript-comment">% Encoding is almost identical to Latin1.
</span>  <span class="enscript-keyword">\latonechardefs</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\gdef</span>^^a4{<span class="enscript-keyword">\euro</span>}
  <span class="enscript-keyword">\gdef</span>^^a6{<span class="enscript-keyword">\v</span> S}
  <span class="enscript-keyword">\gdef</span>^^a8{<span class="enscript-keyword">\v</span> s}
  <span class="enscript-keyword">\gdef</span>^^b4{<span class="enscript-keyword">\v</span> Z}
  <span class="enscript-keyword">\gdef</span>^^b8{<span class="enscript-keyword">\v</span> z}
  <span class="enscript-keyword">\gdef</span>^^bc{<span class="enscript-keyword">\OE</span>}
  <span class="enscript-keyword">\gdef</span>^^bd{<span class="enscript-keyword">\oe</span>}
  <span class="enscript-keyword">\gdef</span>^^be{<span class="enscript-keyword">\&quot;</span>Y}
}

<span class="enscript-comment">% Latin2 (ISO-8859-2) character definitions.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\lattwochardefs</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\gdef</span>^^a0{~}
  <span class="enscript-keyword">\gdef</span>^^a1{<span class="enscript-keyword">\missingcharmsg</span>{LATIN CAPITAL LETTER A WITH OGONEK}}
  <span class="enscript-keyword">\gdef</span>^^a2{<span class="enscript-keyword">\u</span>{}}
  <span class="enscript-keyword">\gdef</span>^^a3{<span class="enscript-keyword">\L</span>}
  <span class="enscript-keyword">\gdef</span>^^a4{<span class="enscript-keyword">\missingcharmsg</span>{CURRENCY SIGN}}
  <span class="enscript-keyword">\gdef</span>^^a5{<span class="enscript-keyword">\v</span> L}
  <span class="enscript-keyword">\gdef</span>^^a6{<span class="enscript-keyword">\'</span>S}
  <span class="enscript-keyword">\gdef</span>^^a7{<span class="enscript-keyword">\S</span>}
  <span class="enscript-keyword">\gdef</span>^^a8{<span class="enscript-keyword">\&quot;</span>{}}
  <span class="enscript-keyword">\gdef</span>^^a9{<span class="enscript-keyword">\v</span> S}
  <span class="enscript-keyword">\gdef</span>^^aa{<span class="enscript-keyword">\cedilla</span> S}
  <span class="enscript-keyword">\gdef</span>^^ab{<span class="enscript-keyword">\v</span> T}
  <span class="enscript-keyword">\gdef</span>^^ac{<span class="enscript-keyword">\'</span>Z}
  <span class="enscript-keyword">\gdef</span>^^ad{<span class="enscript-keyword">\-</span>}
  <span class="enscript-keyword">\gdef</span>^^ae{<span class="enscript-keyword">\v</span> Z}
  <span class="enscript-keyword">\gdef</span>^^af{<span class="enscript-keyword">\dotaccent</span> Z}
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\gdef</span>^^b0{<span class="enscript-keyword">\textdegree</span>}
  <span class="enscript-keyword">\gdef</span>^^b1{<span class="enscript-keyword">\missingcharmsg</span>{LATIN SMALL LETTER A WITH OGONEK}}
  <span class="enscript-keyword">\gdef</span>^^b2{<span class="enscript-keyword">\missingcharmsg</span>{OGONEK}}
  <span class="enscript-keyword">\gdef</span>^^b3{<span class="enscript-keyword">\l</span>}
  <span class="enscript-keyword">\gdef</span>^^b4{<span class="enscript-keyword">\'</span>{}}
  <span class="enscript-keyword">\gdef</span>^^b5{<span class="enscript-keyword">\v</span> l}
  <span class="enscript-keyword">\gdef</span>^^b6{<span class="enscript-keyword">\'</span>s}
  <span class="enscript-keyword">\gdef</span>^^b7{<span class="enscript-keyword">\v</span>{}}
  <span class="enscript-keyword">\gdef</span>^^b8{<span class="enscript-keyword">\cedilla</span><span class="enscript-keyword">\ </span>}
  <span class="enscript-keyword">\gdef</span>^^b9{<span class="enscript-keyword">\v</span> s}
  <span class="enscript-keyword">\gdef</span>^^ba{<span class="enscript-keyword">\cedilla</span> s}
  <span class="enscript-keyword">\gdef</span>^^bb{<span class="enscript-keyword">\v</span> t}
  <span class="enscript-keyword">\gdef</span>^^bc{<span class="enscript-keyword">\'</span>z}
  <span class="enscript-keyword">\gdef</span>^^bd{<span class="enscript-keyword">\H</span>{}}
  <span class="enscript-keyword">\gdef</span>^^be{<span class="enscript-keyword">\v</span> z}
  <span class="enscript-keyword">\gdef</span>^^bf{<span class="enscript-keyword">\dotaccent</span> z}
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\gdef</span>^^c0{<span class="enscript-keyword">\'</span>R}
  <span class="enscript-keyword">\gdef</span>^^c1{<span class="enscript-keyword">\'</span>A}
  <span class="enscript-keyword">\gdef</span>^^c2{<span class="enscript-keyword">\^</span>A}
  <span class="enscript-keyword">\gdef</span>^^c3{<span class="enscript-keyword">\u</span> A}
  <span class="enscript-keyword">\gdef</span>^^c4{<span class="enscript-keyword">\&quot;</span>A}
  <span class="enscript-keyword">\gdef</span>^^c5{<span class="enscript-keyword">\'</span>L}
  <span class="enscript-keyword">\gdef</span>^^c6{<span class="enscript-keyword">\'</span>C}
  <span class="enscript-keyword">\gdef</span>^^c7{<span class="enscript-keyword">\cedilla</span> C}
  <span class="enscript-keyword">\gdef</span>^^c8{<span class="enscript-keyword">\v</span> C}
  <span class="enscript-keyword">\gdef</span>^^c9{<span class="enscript-keyword">\'</span>E}
  <span class="enscript-keyword">\gdef</span>^^ca{<span class="enscript-keyword">\missingcharmsg</span>{LATIN CAPITAL LETTER E WITH OGONEK}}
  <span class="enscript-keyword">\gdef</span>^^cb{<span class="enscript-keyword">\&quot;</span>E}
  <span class="enscript-keyword">\gdef</span>^^cc{<span class="enscript-keyword">\v</span> E}
  <span class="enscript-keyword">\gdef</span>^^cd{<span class="enscript-keyword">\'</span>I}
  <span class="enscript-keyword">\gdef</span>^^ce{<span class="enscript-keyword">\^</span>I}
  <span class="enscript-keyword">\gdef</span>^^cf{<span class="enscript-keyword">\v</span> D}
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\gdef</span>^^d0{<span class="enscript-keyword">\missingcharmsg</span>{LATIN CAPITAL LETTER D WITH STROKE}}
  <span class="enscript-keyword">\gdef</span>^^d1{<span class="enscript-keyword">\'</span>N}
  <span class="enscript-keyword">\gdef</span>^^d2{<span class="enscript-keyword">\v</span> N}
  <span class="enscript-keyword">\gdef</span>^^d3{<span class="enscript-keyword">\'</span>O}
  <span class="enscript-keyword">\gdef</span>^^d4{<span class="enscript-keyword">\^</span>O}
  <span class="enscript-keyword">\gdef</span>^^d5{<span class="enscript-keyword">\H</span> O}
  <span class="enscript-keyword">\gdef</span>^^d6{<span class="enscript-keyword">\&quot;</span>O}
  <span class="enscript-keyword">\gdef</span>^^d7{<span class="enscript-variable-name">$\times$</span>}
  <span class="enscript-keyword">\gdef</span>^^d8{<span class="enscript-keyword">\v</span> R}
  <span class="enscript-keyword">\gdef</span>^^d9{<span class="enscript-keyword">\ringaccent</span> U} 
  <span class="enscript-keyword">\gdef</span>^^da{<span class="enscript-keyword">\'</span>U}
  <span class="enscript-keyword">\gdef</span>^^db{<span class="enscript-keyword">\H</span> U}
  <span class="enscript-keyword">\gdef</span>^^dc{<span class="enscript-keyword">\&quot;</span>U}
  <span class="enscript-keyword">\gdef</span>^^dd{<span class="enscript-keyword">\'</span>Y}
  <span class="enscript-keyword">\gdef</span>^^de{<span class="enscript-keyword">\cedilla</span> T}
  <span class="enscript-keyword">\gdef</span>^^df{<span class="enscript-keyword">\ss</span>}
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\gdef</span>^^e0{<span class="enscript-keyword">\'</span>r}
  <span class="enscript-keyword">\gdef</span>^^e1{<span class="enscript-keyword">\'</span>a}
  <span class="enscript-keyword">\gdef</span>^^e2{<span class="enscript-keyword">\^</span>a}
  <span class="enscript-keyword">\gdef</span>^^e3{<span class="enscript-keyword">\u</span> a}
  <span class="enscript-keyword">\gdef</span>^^e4{<span class="enscript-keyword">\&quot;</span>a}
  <span class="enscript-keyword">\gdef</span>^^e5{<span class="enscript-keyword">\'</span>l}
  <span class="enscript-keyword">\gdef</span>^^e6{<span class="enscript-keyword">\'</span>c}
  <span class="enscript-keyword">\gdef</span>^^e7{<span class="enscript-keyword">\cedilla</span> c}
  <span class="enscript-keyword">\gdef</span>^^e8{<span class="enscript-keyword">\v</span> c}
  <span class="enscript-keyword">\gdef</span>^^e9{<span class="enscript-keyword">\'</span>e}
  <span class="enscript-keyword">\gdef</span>^^ea{<span class="enscript-keyword">\missingcharmsg</span>{LATIN SMALL LETTER E WITH OGONEK}}
  <span class="enscript-keyword">\gdef</span>^^eb{<span class="enscript-keyword">\&quot;</span>e}
  <span class="enscript-keyword">\gdef</span>^^ec{<span class="enscript-keyword">\v</span> e}
  <span class="enscript-keyword">\gdef</span>^^ed{<span class="enscript-keyword">\'</span><span class="enscript-keyword">\i</span>}
  <span class="enscript-keyword">\gdef</span>^^ee{<span class="enscript-keyword">\^</span><span class="enscript-keyword">\i</span>}
  <span class="enscript-keyword">\gdef</span>^^ef{<span class="enscript-keyword">\v</span> d}
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\gdef</span>^^f0{<span class="enscript-keyword">\missingcharmsg</span>{LATIN SMALL LETTER D WITH STROKE}}
  <span class="enscript-keyword">\gdef</span>^^f1{<span class="enscript-keyword">\'</span>n}
  <span class="enscript-keyword">\gdef</span>^^f2{<span class="enscript-keyword">\v</span> n}
  <span class="enscript-keyword">\gdef</span>^^f3{<span class="enscript-keyword">\'</span>o}
  <span class="enscript-keyword">\gdef</span>^^f4{<span class="enscript-keyword">\^</span>o}
  <span class="enscript-keyword">\gdef</span>^^f5{<span class="enscript-keyword">\H</span> o}
  <span class="enscript-keyword">\gdef</span>^^f6{<span class="enscript-keyword">\&quot;</span>o}
  <span class="enscript-keyword">\gdef</span>^^f7{<span class="enscript-variable-name">$\div$</span>}
  <span class="enscript-keyword">\gdef</span>^^f8{<span class="enscript-keyword">\v</span> r}
  <span class="enscript-keyword">\gdef</span>^^f9{<span class="enscript-keyword">\ringaccent</span> u}
  <span class="enscript-keyword">\gdef</span>^^fa{<span class="enscript-keyword">\'</span>u}
  <span class="enscript-keyword">\gdef</span>^^fb{<span class="enscript-keyword">\H</span> u}
  <span class="enscript-keyword">\gdef</span>^^fc{<span class="enscript-keyword">\&quot;</span>u}
  <span class="enscript-keyword">\gdef</span>^^fd{<span class="enscript-keyword">\'</span>y}
  <span class="enscript-keyword">\gdef</span>^^fe{<span class="enscript-keyword">\cedilla</span> t}
  <span class="enscript-keyword">\gdef</span>^^ff{<span class="enscript-keyword">\dotaccent</span>{}}
}

<span class="enscript-comment">% UTF-8 character definitions.
</span><span class="enscript-comment">% 
</span><span class="enscript-comment">% This code to support UTF-8 is based on LaTeX's utf8.def, with some
</span><span class="enscript-comment">% changes for Texinfo conventions.  It is included here under the GPL by
</span><span class="enscript-comment">% permission from Frank Mittelbach and the LaTeX team.
</span><span class="enscript-comment">% 
</span><span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\countUTFx</span>
<span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\countUTFy</span>
<span class="enscript-keyword">\newcount</span><span class="enscript-keyword">\countUTFz</span>

<span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\UTFviiiTwoOctets</span>#1#2{<span class="enscript-keyword">\expandafter</span>
   <span class="enscript-keyword">\UTFviiiDefined</span><span class="enscript-keyword">\csname</span> u8:#1<span class="enscript-keyword">\string</span> #2<span class="enscript-keyword">\endcsname</span>}
<span class="enscript-comment">%
</span><span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\UTFviiiThreeOctets</span>#1#2#3{<span class="enscript-keyword">\expandafter</span>
   <span class="enscript-keyword">\UTFviiiDefined</span><span class="enscript-keyword">\csname</span> u8:#1<span class="enscript-keyword">\string</span> #2<span class="enscript-keyword">\string</span> #3<span class="enscript-keyword">\endcsname</span>}
<span class="enscript-comment">%
</span><span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\UTFviiiFourOctets</span>#1#2#3#4{<span class="enscript-keyword">\expandafter</span>
   <span class="enscript-keyword">\UTFviiiDefined</span><span class="enscript-keyword">\csname</span> u8:#1<span class="enscript-keyword">\string</span> #2<span class="enscript-keyword">\string</span> #3<span class="enscript-keyword">\string</span> #4<span class="enscript-keyword">\endcsname</span>}

<span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\UTFviiiDefined</span>#1{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span> #1<span class="enscript-keyword">\relax</span>
    <span class="enscript-keyword">\message</span>{<span class="enscript-keyword">\linenumber</span> Unicode char <span class="enscript-keyword">\string</span> #1 not defined for Texinfo}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\expandafter</span> #1<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\fi</span>
}

<span class="enscript-keyword">\begingroup</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\~</span>13
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\&quot;</span>12

  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\UTFviiiLoop</span>{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\global</span><span class="enscript-keyword">\catcode</span><span class="enscript-keyword">\countUTFx</span><span class="enscript-keyword">\active</span>
    <span class="enscript-keyword">\uccode</span>`<span class="enscript-keyword">\~</span><span class="enscript-keyword">\countUTFx</span>
    <span class="enscript-keyword">\uppercase</span><span class="enscript-keyword">\expandafter</span>{<span class="enscript-keyword">\UTFviiiTmp</span>}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\countUTFx</span> by 1
    <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\countUTFx</span> &lt; <span class="enscript-keyword">\countUTFy</span>
      <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\UTFviiiLoop</span>
    <span class="enscript-keyword">\fi</span>}

  <span class="enscript-keyword">\countUTFx</span> = &quot;C2
  <span class="enscript-keyword">\countUTFy</span> = &quot;E0
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\UTFviiiTmp</span>{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\xdef</span>~{<span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\UTFviiiTwoOctets</span><span class="enscript-keyword">\string</span>~}}
  <span class="enscript-keyword">\UTFviiiLoop</span>

  <span class="enscript-keyword">\countUTFx</span> = &quot;E0
  <span class="enscript-keyword">\countUTFy</span> = &quot;F0
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\UTFviiiTmp</span>{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\xdef</span>~{<span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\UTFviiiThreeOctets</span><span class="enscript-keyword">\string</span>~}}
  <span class="enscript-keyword">\UTFviiiLoop</span>

  <span class="enscript-keyword">\countUTFx</span> = &quot;F0
  <span class="enscript-keyword">\countUTFy</span> = &quot;F4
  <span class="enscript-keyword">\def</span><span class="enscript-keyword">\UTFviiiTmp</span>{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\xdef</span>~{<span class="enscript-keyword">\noexpand</span><span class="enscript-keyword">\UTFviiiFourOctets</span><span class="enscript-keyword">\string</span>~}}
  <span class="enscript-keyword">\UTFviiiLoop</span>
<span class="enscript-keyword">\endgroup</span>

<span class="enscript-keyword">\begingroup</span>
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\&quot;</span>=12
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\&lt;</span>=12
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\.</span>=12
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\,</span>=12
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\;</span>=12
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\!</span>=12
  <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\~</span>=13

  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\DeclareUnicodeCharacter</span>#1#2{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\countUTFz</span> = &quot;#1<span class="enscript-keyword">\relax</span>
    <span class="enscript-keyword">\wlog</span>{<span class="enscript-keyword">\space</span><span class="enscript-keyword">\space</span> defining Unicode char U+#1 (decimal <span class="enscript-keyword">\the</span><span class="enscript-keyword">\countUTFz</span>)}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\begingroup</span>
      <span class="enscript-keyword">\parseXMLCharref</span>
      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\UTFviiiTwoOctets</span>##1##2{<span class="enscript-comment">%
</span>        <span class="enscript-keyword">\csname</span> u8:##1<span class="enscript-keyword">\string</span> ##2<span class="enscript-keyword">\endcsname</span>}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\UTFviiiThreeOctets</span>##1##2##3{<span class="enscript-comment">%
</span>        <span class="enscript-keyword">\csname</span> u8:##1<span class="enscript-keyword">\string</span> ##2<span class="enscript-keyword">\string</span> ##3<span class="enscript-keyword">\endcsname</span>}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\def</span><span class="enscript-keyword">\UTFviiiFourOctets</span>##1##2##3##4{<span class="enscript-comment">%
</span>        <span class="enscript-keyword">\csname</span> u8:##1<span class="enscript-keyword">\string</span> ##2<span class="enscript-keyword">\string</span> ##3<span class="enscript-keyword">\string</span> ##4<span class="enscript-keyword">\endcsname</span>}<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\expandafter</span>
       <span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\expandafter</span><span class="enscript-keyword">\expandafter</span>
       <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\UTFviiiTmp</span>{#2}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\endgroup</span>}

  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\parseXMLCharref</span>{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\countUTFz</span> &lt; &quot;A0<span class="enscript-keyword">\relax</span>
      <span class="enscript-keyword">\errhelp</span> = <span class="enscript-keyword">\EMsimple</span>
      <span class="enscript-keyword">\errmessage</span>{Cannot define Unicode char value &lt; 00A0}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\countUTFz</span> &lt; &quot;800<span class="enscript-keyword">\relax</span>
      <span class="enscript-keyword">\parseUTFviiiA</span>,<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\parseUTFviiiB</span> C<span class="enscript-keyword">\UTFviiiTwoOctets</span>.,<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\else</span><span class="enscript-keyword">\ifnum</span><span class="enscript-keyword">\countUTFz</span> &lt; &quot;10000<span class="enscript-keyword">\relax</span>
      <span class="enscript-keyword">\parseUTFviiiA</span>;<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\parseUTFviiiA</span>,<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\parseUTFviiiB</span> E<span class="enscript-keyword">\UTFviiiThreeOctets</span>.{,;}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\else</span>
      <span class="enscript-keyword">\parseUTFviiiA</span>;<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\parseUTFviiiA</span>,<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\parseUTFviiiA</span>!<span class="enscript-comment">%
</span>      <span class="enscript-keyword">\parseUTFviiiB</span> F<span class="enscript-keyword">\UTFviiiFourOctets</span>.{!,;}<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span><span class="enscript-keyword">\fi</span>
  }

  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\parseUTFviiiA</span>#1{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\countUTFx</span> = <span class="enscript-keyword">\countUTFz</span>
    <span class="enscript-keyword">\divide</span><span class="enscript-keyword">\countUTFz</span> by 64
    <span class="enscript-keyword">\countUTFy</span> = <span class="enscript-keyword">\countUTFz</span>
    <span class="enscript-keyword">\multiply</span><span class="enscript-keyword">\countUTFz</span> by 64
    <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\countUTFx</span> by -<span class="enscript-keyword">\countUTFz</span>
    <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\countUTFx</span> by 128
    <span class="enscript-keyword">\uccode</span> `#1<span class="enscript-keyword">\countUTFx</span>
    <span class="enscript-keyword">\countUTFz</span> = <span class="enscript-keyword">\countUTFy</span>}

  <span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\parseUTFviiiB</span>#1#2#3#4{<span class="enscript-comment">%
</span>    <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\countUTFz</span> by &quot;#10<span class="enscript-keyword">\relax</span>
    <span class="enscript-keyword">\uccode</span> `#3<span class="enscript-keyword">\countUTFz</span>
    <span class="enscript-keyword">\uppercase</span>{<span class="enscript-keyword">\gdef</span><span class="enscript-keyword">\UTFviiiTmp</span>{#2#3#4}}}
<span class="enscript-keyword">\endgroup</span>

<span class="enscript-keyword">\def</span><span class="enscript-keyword">\utfeightchardefs</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00A0}{<span class="enscript-keyword">\tie</span>}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00A1}{<span class="enscript-keyword">\exclamdown</span>}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00A3}{<span class="enscript-keyword">\pounds</span>}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00A8}{<span class="enscript-keyword">\&quot;</span>{ }}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00A9}{<span class="enscript-keyword">\copyright</span>}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00AA}{<span class="enscript-keyword">\ordf</span>}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00AD}{<span class="enscript-keyword">\-</span>}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00AE}{<span class="enscript-keyword">\registeredsymbol</span>}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00AF}{<span class="enscript-keyword">\=</span>{ }}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00B0}{<span class="enscript-keyword">\ringaccent</span>{ }}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00B4}{<span class="enscript-keyword">\'</span>{ }}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00B8}{<span class="enscript-keyword">\cedilla</span>{ }}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00BA}{<span class="enscript-keyword">\ordm</span>}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00BF}{<span class="enscript-keyword">\questiondown</span>}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00C0}{<span class="enscript-keyword">\`</span>A}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00C1}{<span class="enscript-keyword">\'</span>A}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00C2}{<span class="enscript-keyword">\^</span>A}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00C3}{<span class="enscript-keyword">\~</span>A}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00C4}{<span class="enscript-keyword">\&quot;</span>A}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00C5}{<span class="enscript-keyword">\AA</span>}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00C6}{<span class="enscript-keyword">\AE</span>}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00C7}{<span class="enscript-keyword">\cedilla</span>{C}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00C8}{<span class="enscript-keyword">\`</span>E}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00C9}{<span class="enscript-keyword">\'</span>E}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00CA}{<span class="enscript-keyword">\^</span>E}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00CB}{<span class="enscript-keyword">\&quot;</span>E}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00CC}{<span class="enscript-keyword">\`</span>I}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00CD}{<span class="enscript-keyword">\'</span>I}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00CE}{<span class="enscript-keyword">\^</span>I}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00CF}{<span class="enscript-keyword">\&quot;</span>I}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00D1}{<span class="enscript-keyword">\~</span>N}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00D2}{<span class="enscript-keyword">\`</span>O}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00D3}{<span class="enscript-keyword">\'</span>O}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00D4}{<span class="enscript-keyword">\^</span>O}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00D5}{<span class="enscript-keyword">\~</span>O}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00D6}{<span class="enscript-keyword">\&quot;</span>O}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00D8}{<span class="enscript-keyword">\O</span>}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00D9}{<span class="enscript-keyword">\`</span>U}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00DA}{<span class="enscript-keyword">\'</span>U}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00DB}{<span class="enscript-keyword">\^</span>U}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00DC}{<span class="enscript-keyword">\&quot;</span>U}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00DD}{<span class="enscript-keyword">\'</span>Y}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00DF}{<span class="enscript-keyword">\ss</span>}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00E0}{<span class="enscript-keyword">\`</span>a}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00E1}{<span class="enscript-keyword">\'</span>a}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00E2}{<span class="enscript-keyword">\^</span>a}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00E3}{<span class="enscript-keyword">\~</span>a}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00E4}{<span class="enscript-keyword">\&quot;</span>a}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00E5}{<span class="enscript-keyword">\aa</span>}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00E6}{<span class="enscript-keyword">\ae</span>}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00E7}{<span class="enscript-keyword">\cedilla</span>{c}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00E8}{<span class="enscript-keyword">\`</span>e}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00E9}{<span class="enscript-keyword">\'</span>e}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00EA}{<span class="enscript-keyword">\^</span>e}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00EB}{<span class="enscript-keyword">\&quot;</span>e}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00EC}{<span class="enscript-keyword">\`</span>{<span class="enscript-keyword">\dotless</span>{i}}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00ED}{<span class="enscript-keyword">\'</span>{<span class="enscript-keyword">\dotless</span>{i}}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00EE}{<span class="enscript-keyword">\^</span>{<span class="enscript-keyword">\dotless</span>{i}}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00EF}{<span class="enscript-keyword">\&quot;</span>{<span class="enscript-keyword">\dotless</span>{i}}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00F1}{<span class="enscript-keyword">\~</span>n}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00F2}{<span class="enscript-keyword">\`</span>o}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00F3}{<span class="enscript-keyword">\'</span>o}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00F4}{<span class="enscript-keyword">\^</span>o}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00F5}{<span class="enscript-keyword">\~</span>o}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00F6}{<span class="enscript-keyword">\&quot;</span>o}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00F8}{<span class="enscript-keyword">\o</span>}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00F9}{<span class="enscript-keyword">\`</span>u}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00FA}{<span class="enscript-keyword">\'</span>u}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00FB}{<span class="enscript-keyword">\^</span>u}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00FC}{<span class="enscript-keyword">\&quot;</span>u}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00FD}{<span class="enscript-keyword">\'</span>y}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{00FF}{<span class="enscript-keyword">\&quot;</span>y}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0100}{<span class="enscript-keyword">\=</span>A}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0101}{<span class="enscript-keyword">\=</span>a}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0102}{<span class="enscript-keyword">\u</span>{A}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0103}{<span class="enscript-keyword">\u</span>{a}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0106}{<span class="enscript-keyword">\'</span>C}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0107}{<span class="enscript-keyword">\'</span>c}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0108}{<span class="enscript-keyword">\^</span>C}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0109}{<span class="enscript-keyword">\^</span>c}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{010A}{<span class="enscript-keyword">\dotaccent</span>{C}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{010B}{<span class="enscript-keyword">\dotaccent</span>{c}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{010C}{<span class="enscript-keyword">\v</span>{C}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{010D}{<span class="enscript-keyword">\v</span>{c}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{010E}{<span class="enscript-keyword">\v</span>{D}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0112}{<span class="enscript-keyword">\=</span>E}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0113}{<span class="enscript-keyword">\=</span>e}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0114}{<span class="enscript-keyword">\u</span>{E}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0115}{<span class="enscript-keyword">\u</span>{e}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0116}{<span class="enscript-keyword">\dotaccent</span>{E}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0117}{<span class="enscript-keyword">\dotaccent</span>{e}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{011A}{<span class="enscript-keyword">\v</span>{E}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{011B}{<span class="enscript-keyword">\v</span>{e}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{011C}{<span class="enscript-keyword">\^</span>G}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{011D}{<span class="enscript-keyword">\^</span>g}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{011E}{<span class="enscript-keyword">\u</span>{G}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{011F}{<span class="enscript-keyword">\u</span>{g}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0120}{<span class="enscript-keyword">\dotaccent</span>{G}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0121}{<span class="enscript-keyword">\dotaccent</span>{g}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0124}{<span class="enscript-keyword">\^</span>H}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0125}{<span class="enscript-keyword">\^</span>h}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0128}{<span class="enscript-keyword">\~</span>I}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0129}{<span class="enscript-keyword">\~</span>{<span class="enscript-keyword">\dotless</span>{i}}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{012A}{<span class="enscript-keyword">\=</span>I}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{012B}{<span class="enscript-keyword">\=</span>{<span class="enscript-keyword">\dotless</span>{i}}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{012C}{<span class="enscript-keyword">\u</span>{I}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{012D}{<span class="enscript-keyword">\u</span>{<span class="enscript-keyword">\dotless</span>{i}}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0130}{<span class="enscript-keyword">\dotaccent</span>{I}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0131}{<span class="enscript-keyword">\dotless</span>{i}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0132}{IJ}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0133}{ij}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0134}{<span class="enscript-keyword">\^</span>J}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0135}{<span class="enscript-keyword">\^</span>{<span class="enscript-keyword">\dotless</span>{j}}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0139}{<span class="enscript-keyword">\'</span>L}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{013A}{<span class="enscript-keyword">\'</span>l}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0141}{<span class="enscript-keyword">\L</span>}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0142}{<span class="enscript-keyword">\l</span>}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0143}{<span class="enscript-keyword">\'</span>N}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0144}{<span class="enscript-keyword">\'</span>n}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0147}{<span class="enscript-keyword">\v</span>{N}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0148}{<span class="enscript-keyword">\v</span>{n}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{014C}{<span class="enscript-keyword">\=</span>O}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{014D}{<span class="enscript-keyword">\=</span>o}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{014E}{<span class="enscript-keyword">\u</span>{O}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{014F}{<span class="enscript-keyword">\u</span>{o}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0150}{<span class="enscript-keyword">\H</span>{O}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0151}{<span class="enscript-keyword">\H</span>{o}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0152}{<span class="enscript-keyword">\OE</span>}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0153}{<span class="enscript-keyword">\oe</span>}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0154}{<span class="enscript-keyword">\'</span>R}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0155}{<span class="enscript-keyword">\'</span>r}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0158}{<span class="enscript-keyword">\v</span>{R}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0159}{<span class="enscript-keyword">\v</span>{r}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{015A}{<span class="enscript-keyword">\'</span>S}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{015B}{<span class="enscript-keyword">\'</span>s}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{015C}{<span class="enscript-keyword">\^</span>S}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{015D}{<span class="enscript-keyword">\^</span>s}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{015E}{<span class="enscript-keyword">\cedilla</span>{S}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{015F}{<span class="enscript-keyword">\cedilla</span>{s}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0160}{<span class="enscript-keyword">\v</span>{S}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0161}{<span class="enscript-keyword">\v</span>{s}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0162}{<span class="enscript-keyword">\cedilla</span>{t}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0163}{<span class="enscript-keyword">\cedilla</span>{T}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0164}{<span class="enscript-keyword">\v</span>{T}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0168}{<span class="enscript-keyword">\~</span>U}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0169}{<span class="enscript-keyword">\~</span>u}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{016A}{<span class="enscript-keyword">\=</span>U}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{016B}{<span class="enscript-keyword">\=</span>u}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{016C}{<span class="enscript-keyword">\u</span>{U}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{016D}{<span class="enscript-keyword">\u</span>{u}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{016E}{<span class="enscript-keyword">\ringaccent</span>{U}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{016F}{<span class="enscript-keyword">\ringaccent</span>{u}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0170}{<span class="enscript-keyword">\H</span>{U}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0171}{<span class="enscript-keyword">\H</span>{u}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0174}{<span class="enscript-keyword">\^</span>W}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0175}{<span class="enscript-keyword">\^</span>w}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0176}{<span class="enscript-keyword">\^</span>Y}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0177}{<span class="enscript-keyword">\^</span>y}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0178}{<span class="enscript-keyword">\&quot;</span>Y}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0179}{<span class="enscript-keyword">\'</span>Z}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{017A}{<span class="enscript-keyword">\'</span>z}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{017B}{<span class="enscript-keyword">\dotaccent</span>{Z}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{017C}{<span class="enscript-keyword">\dotaccent</span>{z}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{017D}{<span class="enscript-keyword">\v</span>{Z}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{017E}{<span class="enscript-keyword">\v</span>{z}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01C4}{D<span class="enscript-keyword">\v</span>{Z}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01C5}{D<span class="enscript-keyword">\v</span>{z}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01C6}{d<span class="enscript-keyword">\v</span>{z}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01C7}{LJ}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01C8}{Lj}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01C9}{lj}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01CA}{NJ}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01CB}{Nj}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01CC}{nj}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01CD}{<span class="enscript-keyword">\v</span>{A}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01CE}{<span class="enscript-keyword">\v</span>{a}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01CF}{<span class="enscript-keyword">\v</span>{I}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01D0}{<span class="enscript-keyword">\v</span>{<span class="enscript-keyword">\dotless</span>{i}}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01D1}{<span class="enscript-keyword">\v</span>{O}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01D2}{<span class="enscript-keyword">\v</span>{o}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01D3}{<span class="enscript-keyword">\v</span>{U}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01D4}{<span class="enscript-keyword">\v</span>{u}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01E2}{<span class="enscript-keyword">\=</span>{<span class="enscript-keyword">\AE</span>}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01E3}{<span class="enscript-keyword">\=</span>{<span class="enscript-keyword">\ae</span>}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01E6}{<span class="enscript-keyword">\v</span>{G}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01E7}{<span class="enscript-keyword">\v</span>{g}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01E8}{<span class="enscript-keyword">\v</span>{K}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01E9}{<span class="enscript-keyword">\v</span>{k}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01F0}{<span class="enscript-keyword">\v</span>{<span class="enscript-keyword">\dotless</span>{j}}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01F1}{DZ}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01F2}{Dz}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01F3}{dz}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01F4}{<span class="enscript-keyword">\'</span>G}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01F5}{<span class="enscript-keyword">\'</span>g}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01F8}{<span class="enscript-keyword">\`</span>N}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01F9}{<span class="enscript-keyword">\`</span>n}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01FC}{<span class="enscript-keyword">\'</span>{<span class="enscript-keyword">\AE</span>}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01FD}{<span class="enscript-keyword">\'</span>{<span class="enscript-keyword">\ae</span>}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01FE}{<span class="enscript-keyword">\'</span>{<span class="enscript-keyword">\O</span>}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{01FF}{<span class="enscript-keyword">\'</span>{<span class="enscript-keyword">\o</span>}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{021E}{<span class="enscript-keyword">\v</span>{H}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{021F}{<span class="enscript-keyword">\v</span>{h}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0226}{<span class="enscript-keyword">\dotaccent</span>{A}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0227}{<span class="enscript-keyword">\dotaccent</span>{a}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0228}{<span class="enscript-keyword">\cedilla</span>{E}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0229}{<span class="enscript-keyword">\cedilla</span>{e}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{022E}{<span class="enscript-keyword">\dotaccent</span>{O}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{022F}{<span class="enscript-keyword">\dotaccent</span>{o}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0232}{<span class="enscript-keyword">\=</span>Y}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0233}{<span class="enscript-keyword">\=</span>y}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{0237}{<span class="enscript-keyword">\dotless</span>{j}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E02}{<span class="enscript-keyword">\dotaccent</span>{B}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E03}{<span class="enscript-keyword">\dotaccent</span>{b}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E04}{<span class="enscript-keyword">\udotaccent</span>{B}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E05}{<span class="enscript-keyword">\udotaccent</span>{b}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E06}{<span class="enscript-keyword">\ubaraccent</span>{B}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E07}{<span class="enscript-keyword">\ubaraccent</span>{b}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E0A}{<span class="enscript-keyword">\dotaccent</span>{D}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E0B}{<span class="enscript-keyword">\dotaccent</span>{d}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E0C}{<span class="enscript-keyword">\udotaccent</span>{D}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E0D}{<span class="enscript-keyword">\udotaccent</span>{d}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E0E}{<span class="enscript-keyword">\ubaraccent</span>{D}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E0F}{<span class="enscript-keyword">\ubaraccent</span>{d}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E1E}{<span class="enscript-keyword">\dotaccent</span>{F}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E1F}{<span class="enscript-keyword">\dotaccent</span>{f}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E20}{<span class="enscript-keyword">\=</span>G}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E21}{<span class="enscript-keyword">\=</span>g}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E22}{<span class="enscript-keyword">\dotaccent</span>{H}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E23}{<span class="enscript-keyword">\dotaccent</span>{h}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E24}{<span class="enscript-keyword">\udotaccent</span>{H}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E25}{<span class="enscript-keyword">\udotaccent</span>{h}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E26}{<span class="enscript-keyword">\&quot;</span>H}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E27}{<span class="enscript-keyword">\&quot;</span>h}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E30}{<span class="enscript-keyword">\'</span>K}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E31}{<span class="enscript-keyword">\'</span>k}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E32}{<span class="enscript-keyword">\udotaccent</span>{K}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E33}{<span class="enscript-keyword">\udotaccent</span>{k}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E34}{<span class="enscript-keyword">\ubaraccent</span>{K}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E35}{<span class="enscript-keyword">\ubaraccent</span>{k}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E36}{<span class="enscript-keyword">\udotaccent</span>{L}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E37}{<span class="enscript-keyword">\udotaccent</span>{l}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E3A}{<span class="enscript-keyword">\ubaraccent</span>{L}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E3B}{<span class="enscript-keyword">\ubaraccent</span>{l}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E3E}{<span class="enscript-keyword">\'</span>M}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E3F}{<span class="enscript-keyword">\'</span>m}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E40}{<span class="enscript-keyword">\dotaccent</span>{M}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E41}{<span class="enscript-keyword">\dotaccent</span>{m}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E42}{<span class="enscript-keyword">\udotaccent</span>{M}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E43}{<span class="enscript-keyword">\udotaccent</span>{m}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E44}{<span class="enscript-keyword">\dotaccent</span>{N}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E45}{<span class="enscript-keyword">\dotaccent</span>{n}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E46}{<span class="enscript-keyword">\udotaccent</span>{N}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E47}{<span class="enscript-keyword">\udotaccent</span>{n}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E48}{<span class="enscript-keyword">\ubaraccent</span>{N}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E49}{<span class="enscript-keyword">\ubaraccent</span>{n}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E54}{<span class="enscript-keyword">\'</span>P}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E55}{<span class="enscript-keyword">\'</span>p}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E56}{<span class="enscript-keyword">\dotaccent</span>{P}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E57}{<span class="enscript-keyword">\dotaccent</span>{p}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E58}{<span class="enscript-keyword">\dotaccent</span>{R}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E59}{<span class="enscript-keyword">\dotaccent</span>{r}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E5A}{<span class="enscript-keyword">\udotaccent</span>{R}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E5B}{<span class="enscript-keyword">\udotaccent</span>{r}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E5E}{<span class="enscript-keyword">\ubaraccent</span>{R}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E5F}{<span class="enscript-keyword">\ubaraccent</span>{r}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E60}{<span class="enscript-keyword">\dotaccent</span>{S}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E61}{<span class="enscript-keyword">\dotaccent</span>{s}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E62}{<span class="enscript-keyword">\udotaccent</span>{S}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E63}{<span class="enscript-keyword">\udotaccent</span>{s}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E6A}{<span class="enscript-keyword">\dotaccent</span>{T}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E6B}{<span class="enscript-keyword">\dotaccent</span>{t}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E6C}{<span class="enscript-keyword">\udotaccent</span>{T}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E6D}{<span class="enscript-keyword">\udotaccent</span>{t}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E6E}{<span class="enscript-keyword">\ubaraccent</span>{T}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E6F}{<span class="enscript-keyword">\ubaraccent</span>{t}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E7C}{<span class="enscript-keyword">\~</span>V}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E7D}{<span class="enscript-keyword">\~</span>v}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E7E}{<span class="enscript-keyword">\udotaccent</span>{V}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E7F}{<span class="enscript-keyword">\udotaccent</span>{v}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E80}{<span class="enscript-keyword">\`</span>W}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E81}{<span class="enscript-keyword">\`</span>w}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E82}{<span class="enscript-keyword">\'</span>W}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E83}{<span class="enscript-keyword">\'</span>w}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E84}{<span class="enscript-keyword">\&quot;</span>W}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E85}{<span class="enscript-keyword">\&quot;</span>w}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E86}{<span class="enscript-keyword">\dotaccent</span>{W}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E87}{<span class="enscript-keyword">\dotaccent</span>{w}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E88}{<span class="enscript-keyword">\udotaccent</span>{W}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E89}{<span class="enscript-keyword">\udotaccent</span>{w}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E8A}{<span class="enscript-keyword">\dotaccent</span>{X}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E8B}{<span class="enscript-keyword">\dotaccent</span>{x}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E8C}{<span class="enscript-keyword">\&quot;</span>X}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E8D}{<span class="enscript-keyword">\&quot;</span>x}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E8E}{<span class="enscript-keyword">\dotaccent</span>{Y}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E8F}{<span class="enscript-keyword">\dotaccent</span>{y}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E90}{<span class="enscript-keyword">\^</span>Z}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E91}{<span class="enscript-keyword">\^</span>z}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E92}{<span class="enscript-keyword">\udotaccent</span>{Z}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E93}{<span class="enscript-keyword">\udotaccent</span>{z}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E94}{<span class="enscript-keyword">\ubaraccent</span>{Z}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E95}{<span class="enscript-keyword">\ubaraccent</span>{z}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E96}{<span class="enscript-keyword">\ubaraccent</span>{h}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E97}{<span class="enscript-keyword">\&quot;</span>t}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E98}{<span class="enscript-keyword">\ringaccent</span>{w}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1E99}{<span class="enscript-keyword">\ringaccent</span>{y}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1EA0}{<span class="enscript-keyword">\udotaccent</span>{A}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1EA1}{<span class="enscript-keyword">\udotaccent</span>{a}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1EB8}{<span class="enscript-keyword">\udotaccent</span>{E}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1EB9}{<span class="enscript-keyword">\udotaccent</span>{e}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1EBC}{<span class="enscript-keyword">\~</span>E}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1EBD}{<span class="enscript-keyword">\~</span>e}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1ECA}{<span class="enscript-keyword">\udotaccent</span>{I}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1ECB}{<span class="enscript-keyword">\udotaccent</span>{i}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1ECC}{<span class="enscript-keyword">\udotaccent</span>{O}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1ECD}{<span class="enscript-keyword">\udotaccent</span>{o}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1EE4}{<span class="enscript-keyword">\udotaccent</span>{U}}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1EE5}{<span class="enscript-keyword">\udotaccent</span>{u}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1EF2}{<span class="enscript-keyword">\`</span>Y}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1EF3}{<span class="enscript-keyword">\`</span>y}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1EF4}{<span class="enscript-keyword">\udotaccent</span>{Y}}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1EF8}{<span class="enscript-keyword">\~</span>Y}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{1EF9}{<span class="enscript-keyword">\~</span>y}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{2013}{--}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{2014}{---}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{2022}{<span class="enscript-keyword">\bullet</span>}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{2026}{<span class="enscript-keyword">\dots</span>}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{20AC}{<span class="enscript-keyword">\euro</span>}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{2192}{<span class="enscript-keyword">\expansion</span>}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{21D2}{<span class="enscript-keyword">\result</span>}

  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{2212}{<span class="enscript-keyword">\minus</span>}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{2217}{<span class="enscript-keyword">\point</span>}
  <span class="enscript-keyword">\DeclareUnicodeCharacter</span>{2261}{<span class="enscript-keyword">\equiv</span>}
}<span class="enscript-comment">% end of \utfeightchardefs
</span>

<span class="enscript-comment">% US-ASCII character definitions.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\asciichardefs</span>{<span class="enscript-comment">% nothing need be done
</span>   <span class="enscript-keyword">\relax</span>
}

<span class="enscript-comment">% Make non-ASCII characters printable again for compatibility with
</span><span class="enscript-comment">% existing Texinfo documents that may use them, even without declaring a
</span><span class="enscript-comment">% document encoding.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\setnonasciicharscatcode</span> <span class="enscript-keyword">\other</span>


<span class="enscript-keyword">\message</span>{formatting,}

<span class="enscript-keyword">\newdimen</span><span class="enscript-keyword">\defaultparindent</span> <span class="enscript-keyword">\defaultparindent</span> = 15pt

<span class="enscript-keyword">\chapheadingskip</span> = 15pt plus 4pt minus 2pt
<span class="enscript-keyword">\secheadingskip</span> = 12pt plus 3pt minus 2pt
<span class="enscript-keyword">\subsecheadingskip</span> = 9pt plus 2pt minus 2pt

<span class="enscript-comment">% Prevent underfull vbox error messages.
</span><span class="enscript-keyword">\vbadness</span> = 10000

<span class="enscript-comment">% Don't be so finicky about underfull hboxes, either.
</span><span class="enscript-keyword">\hbadness</span> = 2000

<span class="enscript-comment">% Following George Bush, just get rid of widows and orphans.
</span><span class="enscript-keyword">\widowpenalty</span>=10000
<span class="enscript-keyword">\clubpenalty</span>=10000

<span class="enscript-comment">% Use TeX 3.0's \emergencystretch to help line breaking, but if we're
</span><span class="enscript-comment">% using an old version of TeX, don't do anything.  We want the amount of
</span><span class="enscript-comment">% stretch added to depend on the line length, hence the dependence on
</span><span class="enscript-comment">% \hsize.  We call this whenever the paper size is set.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\setemergencystretch</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifx</span><span class="enscript-keyword">\emergencystretch</span><span class="enscript-keyword">\thisisundefined</span>
    <span class="enscript-comment">% Allow us to assign to \emergencystretch anyway.
</span>    <span class="enscript-keyword">\def</span><span class="enscript-keyword">\emergencystretch</span>{<span class="enscript-keyword">\dimen</span>0}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\else</span>
    <span class="enscript-keyword">\emergencystretch</span> = .15<span class="enscript-keyword">\hsize</span>
  <span class="enscript-keyword">\fi</span>
}

<span class="enscript-comment">% Parameters in order: 1) textheight; 2) textwidth;
</span><span class="enscript-comment">% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
</span><span class="enscript-comment">% 7) physical page height; 8) physical page width.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% We also call \setleading{\textleading}, so the caller should define
</span><span class="enscript-comment">% \textleading.  The caller should also set \parskip.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\internalpagesizes</span>#1#2#3#4#5#6#7#8{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\voffset</span> = #3<span class="enscript-keyword">\relax</span>
  <span class="enscript-keyword">\topskip</span> = #6<span class="enscript-keyword">\relax</span>
  <span class="enscript-keyword">\splittopskip</span> = <span class="enscript-keyword">\topskip</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\vsize</span> = #1<span class="enscript-keyword">\relax</span>
  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\vsize</span> by <span class="enscript-keyword">\topskip</span>
  <span class="enscript-keyword">\outervsize</span> = <span class="enscript-keyword">\vsize</span>
  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\outervsize</span> by 2<span class="enscript-keyword">\topandbottommargin</span>
  <span class="enscript-keyword">\pageheight</span> = <span class="enscript-keyword">\vsize</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\hsize</span> = #2<span class="enscript-keyword">\relax</span>
  <span class="enscript-keyword">\outerhsize</span> = <span class="enscript-keyword">\hsize</span>
  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\outerhsize</span> by 0.5in
  <span class="enscript-keyword">\pagewidth</span> = <span class="enscript-keyword">\hsize</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\normaloffset</span> = #4<span class="enscript-keyword">\relax</span>
  <span class="enscript-keyword">\bindingoffset</span> = #5<span class="enscript-keyword">\relax</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\ifpdf</span>
    <span class="enscript-keyword">\pdfpageheight</span> #7<span class="enscript-keyword">\relax</span>
    <span class="enscript-keyword">\pdfpagewidth</span> #8<span class="enscript-keyword">\relax</span>
  <span class="enscript-keyword">\fi</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\setleading</span>{<span class="enscript-keyword">\textleading</span>}
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\parindent</span> = <span class="enscript-keyword">\defaultparindent</span>
  <span class="enscript-keyword">\setemergencystretch</span>
}

<span class="enscript-comment">% @letterpaper (the default).
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\letterpaper</span>{{<span class="enscript-keyword">\globaldefs</span> = 1
  <span class="enscript-keyword">\parskip</span> = 3pt plus 2pt minus 1pt
  <span class="enscript-keyword">\textleading</span> = 13.2pt
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% If page is nothing but text, make it come out even.
</span>  <span class="enscript-keyword">\internalpagesizes</span>{46<span class="enscript-keyword">\baselineskip</span>}{6in}<span class="enscript-comment">%
</span>                    {<span class="enscript-keyword">\voffset</span>}{.25in}<span class="enscript-comment">%
</span>                    {<span class="enscript-keyword">\bindingoffset</span>}{36pt}<span class="enscript-comment">%
</span>                    {11in}{8.5in}<span class="enscript-comment">%
</span>}}

<span class="enscript-comment">% Use @smallbook to reset parameters for 7x9.25 trim size.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\smallbook</span>{{<span class="enscript-keyword">\globaldefs</span> = 1
  <span class="enscript-keyword">\parskip</span> = 2pt plus 1pt
  <span class="enscript-keyword">\textleading</span> = 12pt
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\internalpagesizes</span>{7.5in}{5in}<span class="enscript-comment">%
</span>                    {-.2in}{0in}<span class="enscript-comment">%
</span>                    {<span class="enscript-keyword">\bindingoffset</span>}{16pt}<span class="enscript-comment">%
</span>                    {9.25in}{7in}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\lispnarrowing</span> = 0.3in
  <span class="enscript-keyword">\tolerance</span> = 700
  <span class="enscript-keyword">\hfuzz</span> = 1pt
  <span class="enscript-keyword">\contentsrightmargin</span> = 0pt
  <span class="enscript-keyword">\defbodyindent</span> = .5cm
}}

<span class="enscript-comment">% Use @smallerbook to reset parameters for 6x9 trim size.
</span><span class="enscript-comment">% (Just testing, parameters still in flux.)
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\smallerbook</span>{{<span class="enscript-keyword">\globaldefs</span> = 1
  <span class="enscript-keyword">\parskip</span> = 1.5pt plus 1pt
  <span class="enscript-keyword">\textleading</span> = 12pt
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\internalpagesizes</span>{7.4in}{4.8in}<span class="enscript-comment">%
</span>                    {-.2in}{-.4in}<span class="enscript-comment">%
</span>                    {0pt}{14pt}<span class="enscript-comment">%
</span>                    {9in}{6in}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\lispnarrowing</span> = 0.25in
  <span class="enscript-keyword">\tolerance</span> = 700
  <span class="enscript-keyword">\hfuzz</span> = 1pt
  <span class="enscript-keyword">\contentsrightmargin</span> = 0pt
  <span class="enscript-keyword">\defbodyindent</span> = .4cm
}}

<span class="enscript-comment">% Use @afourpaper to print on European A4 paper.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\afourpaper</span>{{<span class="enscript-keyword">\globaldefs</span> = 1
  <span class="enscript-keyword">\parskip</span> = 3pt plus 2pt minus 1pt
  <span class="enscript-keyword">\textleading</span> = 13.2pt
  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Double-side printing via postscript on Laserjet 4050
</span>  <span class="enscript-comment">% prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm.
</span>  <span class="enscript-comment">% To change the settings for a different printer or situation, adjust
</span>  <span class="enscript-comment">% \normaloffset until the front-side and back-side texts align.  Then
</span>  <span class="enscript-comment">% do the same for \bindingoffset.  You can set these for testing in
</span>  <span class="enscript-comment">% your texinfo source file like this:
</span>  <span class="enscript-comment">% @tex
</span>  <span class="enscript-comment">% \global\normaloffset = -6mm
</span>  <span class="enscript-comment">% \global\bindingoffset = 10mm
</span>  <span class="enscript-comment">% @end tex
</span>  <span class="enscript-keyword">\internalpagesizes</span>{51<span class="enscript-keyword">\baselineskip</span>}{160mm}
                    {<span class="enscript-keyword">\voffset</span>}{<span class="enscript-keyword">\hoffset</span>}<span class="enscript-comment">%
</span>                    {<span class="enscript-keyword">\bindingoffset</span>}{44pt}<span class="enscript-comment">%
</span>                    {297mm}{210mm}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\tolerance</span> = 700
  <span class="enscript-keyword">\hfuzz</span> = 1pt
  <span class="enscript-keyword">\contentsrightmargin</span> = 0pt
  <span class="enscript-keyword">\defbodyindent</span> = 5mm
}}

<span class="enscript-comment">% Use @afivepaper to print on European A5 paper.
</span><span class="enscript-comment">% From <a href="mailto:romildo@urano.iceb.ufop.br">romildo@urano.iceb.ufop.br</a>, 2 July 2000.
</span><span class="enscript-comment">% He also recommends making @example and @lisp be small.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\afivepaper</span>{{<span class="enscript-keyword">\globaldefs</span> = 1
  <span class="enscript-keyword">\parskip</span> = 2pt plus 1pt minus 0.1pt
  <span class="enscript-keyword">\textleading</span> = 12.5pt
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\internalpagesizes</span>{160mm}{120mm}<span class="enscript-comment">%
</span>                    {<span class="enscript-keyword">\voffset</span>}{<span class="enscript-keyword">\hoffset</span>}<span class="enscript-comment">%
</span>                    {<span class="enscript-keyword">\bindingoffset</span>}{8pt}<span class="enscript-comment">%
</span>                    {210mm}{148mm}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\lispnarrowing</span> = 0.2in
  <span class="enscript-keyword">\tolerance</span> = 800
  <span class="enscript-keyword">\hfuzz</span> = 1.2pt
  <span class="enscript-keyword">\contentsrightmargin</span> = 0pt
  <span class="enscript-keyword">\defbodyindent</span> = 2mm
  <span class="enscript-keyword">\tableindent</span> = 12mm
}}

<span class="enscript-comment">% A specific text layout, 24x15cm overall, intended for A4 paper.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\afourlatex</span>{{<span class="enscript-keyword">\globaldefs</span> = 1
  <span class="enscript-keyword">\afourpaper</span>
  <span class="enscript-keyword">\internalpagesizes</span>{237mm}{150mm}<span class="enscript-comment">%
</span>                    {<span class="enscript-keyword">\voffset</span>}{4.6mm}<span class="enscript-comment">%
</span>                    {<span class="enscript-keyword">\bindingoffset</span>}{7mm}<span class="enscript-comment">%
</span>                    {297mm}{210mm}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-comment">% Must explicitly reset to 0 because we call \afourpaper.
</span>  <span class="enscript-keyword">\globaldefs</span> = 0
}}

<span class="enscript-comment">% Use @afourwide to print on A4 paper in landscape format.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\afourwide</span>{{<span class="enscript-keyword">\globaldefs</span> = 1
  <span class="enscript-keyword">\afourpaper</span>
  <span class="enscript-keyword">\internalpagesizes</span>{241mm}{165mm}<span class="enscript-comment">%
</span>                    {<span class="enscript-keyword">\voffset</span>}{-2.95mm}<span class="enscript-comment">%
</span>                    {<span class="enscript-keyword">\bindingoffset</span>}{7mm}<span class="enscript-comment">%
</span>                    {297mm}{210mm}<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\globaldefs</span> = 0
}}

<span class="enscript-comment">% @pagesizes TEXTHEIGHT[,TEXTWIDTH]
</span><span class="enscript-comment">% Perhaps we should allow setting the margins, \topskip, \parskip,
</span><span class="enscript-comment">% and/or leading, also. Or perhaps we should compute them somehow.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\parseargdef</span><span class="enscript-keyword">\pagesizes</span>{<span class="enscript-keyword">\pagesizesyyy</span> #1,,<span class="enscript-keyword">\finish</span>}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\pagesizesyyy</span>#1,#2,#3<span class="enscript-keyword">\finish</span>{{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\setbox</span>0 = <span class="enscript-keyword">\hbox</span>{<span class="enscript-keyword">\ignorespaces</span> #2}<span class="enscript-keyword">\ifdim</span><span class="enscript-keyword">\wd</span>0 &gt; 0pt <span class="enscript-keyword">\hsize</span>=#2<span class="enscript-keyword">\relax</span> <span class="enscript-keyword">\fi</span>
  <span class="enscript-keyword">\globaldefs</span> = 1
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\parskip</span> = 3pt plus 2pt minus 1pt
  <span class="enscript-keyword">\setleading</span>{<span class="enscript-keyword">\textleading</span>}<span class="enscript-comment">%
</span>  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\dimen</span>0 = #1
  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\dimen</span>0 by <span class="enscript-keyword">\voffset</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\dimen</span>2 = <span class="enscript-keyword">\hsize</span>
  <span class="enscript-keyword">\advance</span><span class="enscript-keyword">\dimen</span>2 by <span class="enscript-keyword">\normaloffset</span>
  <span class="enscript-comment">%
</span>  <span class="enscript-keyword">\internalpagesizes</span>{#1}{<span class="enscript-keyword">\hsize</span>}<span class="enscript-comment">%
</span>                    {<span class="enscript-keyword">\voffset</span>}{<span class="enscript-keyword">\normaloffset</span>}<span class="enscript-comment">%
</span>                    {<span class="enscript-keyword">\bindingoffset</span>}{44pt}<span class="enscript-comment">%
</span>                    {<span class="enscript-keyword">\dimen</span>0}{<span class="enscript-keyword">\dimen</span>2}<span class="enscript-comment">%
</span>}}

<span class="enscript-comment">% Set default to letter.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\letterpaper</span>


<span class="enscript-keyword">\message</span>{and turning on texinfo input format.}

<span class="enscript-comment">% Define macros to output various characters with catcode for normal text.
</span><span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\&quot;</span>=<span class="enscript-keyword">\other</span>
<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\~</span>=<span class="enscript-keyword">\other</span>
<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>=<span class="enscript-keyword">\other</span>
<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\_</span>=<span class="enscript-keyword">\other</span>
<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\|</span>=<span class="enscript-keyword">\other</span>
<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\&lt;</span>=<span class="enscript-keyword">\other</span>
<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\&gt;</span>=<span class="enscript-keyword">\other</span>
<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\+</span>=<span class="enscript-keyword">\other</span>
<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\$</span>=<span class="enscript-keyword">\other</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\normaldoublequote</span>{&quot;}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\normaltilde</span>{~}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\normalcaret</span>{^}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\normalunderscore</span>{_}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\normalverticalbar</span>{|}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\normalless</span>{&lt;}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\normalgreater</span>{&gt;}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\normalplus</span>{+}
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\normaldollar</span>{<span class="enscript-variable-name">$}%$</span> font-lock fix

<span class="enscript-comment">% This macro is used to make a character print one way in \tt
</span><span class="enscript-comment">% (where it can probably be output as-is), and another way in other fonts,
</span><span class="enscript-comment">% where something hairier probably needs to be done.
</span><span class="enscript-comment">%
</span><span class="enscript-comment">% #1 is what to print if we are indeed using \tt; #2 is what to print
</span><span class="enscript-comment">% otherwise.  Since all the Computer Modern typewriter fonts have zero
</span><span class="enscript-comment">% interword stretch (and shrink), and it is reasonable to expect all
</span><span class="enscript-comment">% typewriter fonts to have this, we can check that font parameter.
</span><span class="enscript-comment">%
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\ifusingtt</span>#1#2{<span class="enscript-keyword">\ifdim</span> <span class="enscript-keyword">\fontdimen</span>3<span class="enscript-keyword">\font</span>=0pt #1<span class="enscript-keyword">\else</span> #2<span class="enscript-keyword">\fi</span>}

<span class="enscript-comment">% Same as above, but check for italic font.  Actually this also catches
</span><span class="enscript-comment">% non-italic slanted fonts since it is impossible to distinguish them from
</span><span class="enscript-comment">% italic fonts.  But since this is only used by $ and it uses \sl anyway
</span><span class="enscript-comment">% this is not a problem.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\ifusingit</span>#1#2{<span class="enscript-keyword">\ifdim</span> <span class="enscript-keyword">\fontdimen</span>1<span class="enscript-keyword">\font</span>&gt;0pt #1<span class="enscript-keyword">\else</span> #2<span class="enscript-keyword">\fi</span>}

<span class="enscript-comment">% Turn off all special characters except @
</span><span class="enscript-comment">% (and those which the user can use as if they were ordinary).
</span><span class="enscript-comment">% Most of these we simply print from the \tt font, but for some, we can
</span><span class="enscript-comment">% use math or other variants that look better in normal text.
</span>
<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\&quot;</span>=<span class="enscript-keyword">\active</span>
<span class="enscript-keyword">\def</span><span class="enscript-keyword">\activedoublequote</span>{{<span class="enscript-keyword">\tt</span><span class="enscript-keyword">\char</span>34}}
<span class="enscript-keyword">\let</span>&quot;=<span class="enscript-keyword">\activedoublequote</span>
<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\~</span>=<span class="enscript-keyword">\active</span>
<span class="enscript-keyword">\def</span>~{{<span class="enscript-keyword">\tt</span><span class="enscript-keyword">\char</span>126}}
<span class="enscript-keyword">\chardef</span><span class="enscript-keyword">\hat</span>=`<span class="enscript-keyword">\^</span>
<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\^</span>=<span class="enscript-keyword">\active</span>
<span class="enscript-keyword">\def</span>^{{<span class="enscript-keyword">\tt</span> <span class="enscript-keyword">\hat</span>}}

<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\_</span>=<span class="enscript-keyword">\active</span>
<span class="enscript-keyword">\def</span>_{<span class="enscript-keyword">\ifusingtt</span><span class="enscript-keyword">\normalunderscore</span><span class="enscript-keyword">\_</span>}
<span class="enscript-keyword">\let</span><span class="enscript-keyword">\realunder</span>=_
<span class="enscript-comment">% Subroutine for the previous macro.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\_</span>{<span class="enscript-keyword">\leavevmode</span> <span class="enscript-keyword">\kern</span>.07em <span class="enscript-keyword">\vbox</span>{<span class="enscript-keyword">\hrule</span> width.3em height.1ex}<span class="enscript-keyword">\kern</span> .07em }

<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\|</span>=<span class="enscript-keyword">\active</span>
<span class="enscript-keyword">\def</span>|{{<span class="enscript-keyword">\tt</span><span class="enscript-keyword">\char</span>124}}
<span class="enscript-keyword">\chardef</span> <span class="enscript-keyword">\less</span>=`<span class="enscript-keyword">\&lt;</span>
<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\&lt;</span>=<span class="enscript-keyword">\active</span>
<span class="enscript-keyword">\def</span>&lt;{{<span class="enscript-keyword">\tt</span> <span class="enscript-keyword">\less</span>}}
<span class="enscript-keyword">\chardef</span> <span class="enscript-keyword">\gtr</span>=`<span class="enscript-keyword">\&gt;</span>
<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\&gt;</span>=<span class="enscript-keyword">\active</span>
<span class="enscript-keyword">\def</span>&gt;{{<span class="enscript-keyword">\tt</span> <span class="enscript-keyword">\gtr</span>}}
<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\+</span>=<span class="enscript-keyword">\active</span>
<span class="enscript-keyword">\def</span>+{{<span class="enscript-keyword">\tt</span> <span class="enscript-keyword">\char</span> 43}}
<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\$</span>=<span class="enscript-keyword">\active</span>
<span class="enscript-keyword">\def</span><span class="enscript-variable-name">${\ifusingit{{\sl\$</span>}}<span class="enscript-keyword">\normaldollar</span>}<span class="enscript-comment">%$ font-lock fix
</span>
<span class="enscript-comment">% If a .fmt file is being used, characters that might appear in a file
</span><span class="enscript-comment">% name cannot be active until we have parsed the command line.
</span><span class="enscript-comment">% So turn them off again, and have \everyjob (or @setfilename) turn them on.
</span><span class="enscript-comment">% \otherifyactive is called near the end of this file.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\otherifyactive</span>{<span class="enscript-keyword">\catcode</span>`+=<span class="enscript-keyword">\other</span> <span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\_</span>=<span class="enscript-keyword">\other</span>}

<span class="enscript-comment">% Used sometimes to turn off (effectively) the active characters even after
</span><span class="enscript-comment">% parsing them.
</span><span class="enscript-keyword">\def</span><span class="enscript-keyword">\turnoffactive</span>{<span class="enscript-comment">%
</span>  <span class="enscript-keyword">\normalturnoffactive</span>
  <span class="enscript-keyword">\otherbackslash</span>
}

<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\@</span>=0

<span class="enscript-comment">% \backslashcurfont outputs one backslash character in current font,
</span><span class="enscript-comment">% as in \char`\\.
</span><span class="enscript-keyword">\global</span><span class="enscript-keyword">\chardef</span><span class="enscript-keyword">\backslashcurfont</span>=`<span class="enscript-keyword">\\</span>
<span class="enscript-keyword">\global</span><span class="enscript-keyword">\let</span><span class="enscript-keyword">\rawbackslashxx</span>=<span class="enscript-keyword">\backslashcurfont</span>  <span class="enscript-comment">% let existing .??s files work
</span>
<span class="enscript-comment">% \realbackslash is an actual character `\' with catcode other, and
</span><span class="enscript-comment">% \doublebackslash is two of them (for the pdf outlines).
</span>{<span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\\</span>=<span class="enscript-keyword">\other</span> @gdef@realbackslash{<span class="enscript-keyword">\}</span> @gdef@doublebackslash{<span class="enscript-keyword">\\</span>}}

<span class="enscript-comment">% In texinfo, backslash is an active character; it prints the backslash
</span><span class="enscript-comment">% in fixed width font.
</span><span class="enscript-keyword">\catcode</span>`<span class="enscript-keyword">\\</span>=<span class="enscript-keyword">\active</span>
@def@normalbackslash{{@tt@backslashcurfont}}
<span class="enscript-comment">% On startup, @fixbackslash assigns:
</span><span class="enscript-comment">%  @let \ = @normalbackslash
</span>
<span class="enscript-comment">% \rawbackslash defines an active \ to do \backslashcurfont.
</span><span class="enscript-comment">% \otherbackslash defines an active \ to be a literal `\' character with
</span><span class="enscript-comment">% catcode other.
</span>@gdef@rawbackslash{@let<span class="enscript-keyword">\=</span>@backslashcurfont}
@gdef@otherbackslash{@let<span class="enscript-keyword">\=</span>@realbackslash}

<span class="enscript-comment">% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
</span><span class="enscript-comment">% the literal character `\'.
</span><span class="enscript-comment">% 
</span>@def@normalturnoffactive{<span class="enscript-comment">%
</span>  @let<span class="enscript-keyword">\=</span>@normalbackslash
  @let&quot;=@normaldoublequote
  @let~=@normaltilde
  @let^=@normalcaret
  @let_=@normalunderscore
  @let|=@normalverticalbar
  @let&lt;=@normalless
  @let&gt;=@normalgreater
  @let+=@normalplus
  @let<span class="enscript-variable-name">$=@normaldollar %$</span> font-lock fix
  @unsepspaces
}

<span class="enscript-comment">% Make _ and + \other characters, temporarily.
</span><span class="enscript-comment">% This is canceled by @fixbackslash.
</span>@otherifyactive

<span class="enscript-comment">% If a .fmt file is being used, we don't want the `\input texinfo' to show up.
</span><span class="enscript-comment">% That is what \eatinput is for; after that, the `\' should revert to printing
</span><span class="enscript-comment">% a backslash.
</span><span class="enscript-comment">%
</span>@gdef@eatinput input texinfo{@fixbackslash}
@global@let<span class="enscript-keyword">\ </span>= @eatinput

<span class="enscript-comment">% On the other hand, perhaps the file did not have a `\input texinfo'. Then
</span><span class="enscript-comment">% the first `\' in the file would cause an error. This macro tries to fix
</span><span class="enscript-comment">% that, assuming it is called before the first `\' could plausibly occur.
</span><span class="enscript-comment">% Also turn back on active characters that might appear in the input
</span><span class="enscript-comment">% file name, in case not using a pre-dumped format.
</span><span class="enscript-comment">%
</span>@gdef@fixbackslash{<span class="enscript-comment">%
</span>  @ifx<span class="enscript-keyword">\@</span>eatinput @let<span class="enscript-keyword">\ </span>= @normalbackslash @fi
  @catcode`+=@active
  @catcode`@_=@active
}

<span class="enscript-comment">% Say @foo, not \foo, in error messages.
</span>@escapechar = `@@

<span class="enscript-comment">% These look ok in all fonts, so just make them not special.
</span>@catcode`@&amp; = @other
@catcode`@# = @other
@catcode`@<span class="enscript-comment">% = @other
</span>

@c Local variables:
@c eval: (add-hook 'write-file-hooks 'time-stamp)
@c page-delimiter: &quot;^<span class="enscript-keyword">\\</span><span class="enscript-keyword">\\</span>message&quot;
@c time-stamp-start: &quot;def<span class="enscript-keyword">\\</span><span class="enscript-keyword">\\</span>texinfoversion{&quot;
@c time-stamp-format: &quot;<span class="enscript-comment">%:y-%02m-%02d.%02H&quot;
</span>@c time-stamp-end: &quot;}&quot;
@c End:

@c vim:sw=2:

@ignore
   arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115
@end ignore
</pre>
<hr />
</body></html>