texinfo.tex
上传用户:xiaozhuqw
上传日期:2009-11-15
资源大小:1338k
文件大小:184k
- % texinfo.tex -- TeX macros to handle Texinfo files.
- %
- % Load plain if necessary, i.e., if running under initex.
- expandafterifxcsname fmtnameendcsnamerelaxinput plainfi
- %
- deftexinfoversion{1999-02-14.16}%
- %
- % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
- % Free Software Foundation, Inc.
- %
- % This texinfo.tex file is free software; you can redistribute it and/or
- % modify it under the terms of the GNU General Public License as
- % published by the Free Software Foundation; either version 2, or (at
- % your option) any later version.
- %
- % This texinfo.tex file is distributed in the hope that it will be
- % useful, but WITHOUT ANY WARRANTY; without even the implied warranty
- % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- % General Public License for more details.
- %
- % You should have received a copy of the GNU General Public License
- % along with this texinfo.tex file; see the file COPYING. If not, write
- % to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- % Boston, MA 02111-1307, USA.
- %
- % In other words, you are welcome to use, share and improve this program.
- % You are forbidden to forbid anyone else to use, share and improve
- % what you give them. Help stamp out software-hoarding!
- %
- % Please try the latest version of texinfo.tex before submitting bug
- % reports; you can get the latest version from:
- % ftp://ftp.gnu.org/pub/gnu/texinfo.tex
- % (and all GNU mirrors, see http://www.gnu.org/order/ftp.html)
- % ftp://tug.org/tex/texinfo.tex
- % ftp://ctan.org/macros/texinfo/texinfo.tex
- % (and all CTAN mirrors, finger ctan@ctan.org for a list).
- % /home/gd/gnu/doc/texinfo.tex on the GNU machines.
- % The texinfo.tex in any given Texinfo distribution could well be out
- % of date, so if that's what you're using, please check.
- % There is a small home page for Texinfo at http://texinfo.org/.
- %
- % Send bug reports to bug-texinfo@gnu.org. Please include including a
- % complete document in each bug report with which we can reproduce the
- % problem. Patches are, of course, greatly appreciated.
- %
- % To process a Texinfo manual with TeX, it's most reliable to use the
- % texi2dvi shell script that comes with the distribution. For a simple
- % manual foo.texi, however, you can get away with this:
- % tex foo.texi
- % texindex foo.??
- % tex foo.texi
- % tex foo.texi
- % dvips foo.dvi -o # or whatever, to process the dvi file; this makes foo.ps.
- % The extra runs of TeX get the cross-reference information correct.
- % Sometimes one run after texindex suffices, and sometimes you need more
- % than two; texi2dvi does it as many times as necessary.
- %
- % It is possible to adapt texinfo.tex for other languages. You can get
- % the existing language-specific files from ftp://ftp.gnu.org/gnu/texinfo/.
- message{Loading texinfo [version texinfoversion]:}
- % If in a .fmt file, print the version number
- % and turn on active characters that we couldn't do earlier because
- % they might have appeared in the input file name.
- everyjob{message{[Texinfo version texinfoversion]}%
- catcode`+=active catcode`_=active}
- % Save some parts of plain tex whose names we will redefine.
- letptexb=b
- letptexbullet=bullet
- letptexc=c
- letptexcomma=,
- letptexdot=.
- letptexdots=dots
- letptexend=end
- letptexequiv=equiv
- letptexexclam=!
- letptexi=i
- letptexlbrace={
- letptexrbrace=}
- letptexstar=*
- letptext=t
- % We never want plain's outer + definition in Texinfo.
- % For @tex, we can use tabalign.
- let+ = relax
- message{Basics,}
- chardefother=12
- % If this character appears in an error message or help string, it
- % starts a new line in the output.
- newlinechar = `^^J
- % Set up fixed words for English if not already set.
- ifxputwordAppendixundefined gdefputwordAppendix{Appendix}fi
- ifxputwordChapterundefined gdefputwordChapter{Chapter}fi
- ifxputwordfileundefined gdefputwordfile{file}fi
- ifxputwordIndexIsEmptyundefined gdefputwordIndexIsEmpty{(Index is empty)}fi
- ifxputwordIndexNonexistentundefined gdefputwordIndexNonexistent{(Index is nonexistent)}fi
- ifxputwordInfoundefined gdefputwordInfo{Info}fi
- ifxputwordMethodonundefined gdefputwordMethodon{Method on}fi
- ifxputwordNoTitleundefined gdefputwordNoTitle{No Title}fi
- ifxputwordofundefined gdefputwordof{of}fi
- ifxputwordonundefined gdefputwordon{on}fi
- ifxputwordpageundefined gdefputwordpage{page}fi
- ifxputwordsectionundefined gdefputwordsection{section}fi
- ifxputwordSectionundefined gdefputwordSection{Section}fi
- ifxputwordseeundefined gdefputwordsee{see}fi
- ifxputwordSeeundefined gdefputwordSee{See}fi
- ifxputwordShortTOCundefined gdefputwordShortTOC{Short Contents}fi
- ifxputwordTOCundefined gdefputwordTOC{Table of Contents}fi
- %
- ifxputwordMJanundefined gdefputwordMJan{January}fi
- ifxputwordMFebundefined gdefputwordMFeb{February}fi
- ifxputwordMMarundefined gdefputwordMMar{March}fi
- ifxputwordMAprundefined gdefputwordMApr{April}fi
- ifxputwordMMayundefined gdefputwordMMay{May}fi
- ifxputwordMJunundefined gdefputwordMJun{June}fi
- ifxputwordMJulundefined gdefputwordMJul{July}fi
- ifxputwordMAugundefined gdefputwordMAug{August}fi
- ifxputwordMSepundefined gdefputwordMSep{September}fi
- ifxputwordMOctundefined gdefputwordMOct{October}fi
- ifxputwordMNovundefined gdefputwordMNov{November}fi
- ifxputwordMDecundefined gdefputwordMDec{December}fi
- %
- ifxputwordDefmacundefined gdefputwordDefmac{Macro}fi
- ifxputwordDefspecundefined gdefputwordDefspec{Special Form}fi
- ifxputwordDefivarundefined gdefputwordDefivar{Instance Variable}fi
- ifxputwordDefvarundefined gdefputwordDefvar{Variable}fi
- ifxputwordDefoptundefined gdefputwordDefopt{User Option}fi
- ifxputwordDeftypevarundefinedgdefputwordDeftypevar{Variable}fi
- ifxputwordDeffuncundefined gdefputwordDeffunc{Function}fi
- ifxputwordDeftypefunundefinedgdefputwordDeftypefun{Function}fi
- % Ignore a token.
- %
- defgobble#1{}
- hyphenation{ap-pen-dix}
- hyphenation{mini-buf-fer mini-buf-fers}
- hyphenation{eshell}
- hyphenation{white-space}
- % Margin to add to right of even pages, to left of odd pages.
- newdimen bindingoffset
- newdimen normaloffset
- newdimenpagewidth newdimenpageheight
- % Sometimes it is convenient to have everything in the transcript file
- % and nothing on the terminal. We don't just call tracingall here,
- % since that produces some useless output on the terminal.
- %
- defgloggingall{begingroup globaldefs = 1 loggingall endgroup}%
- ifxeTeXversionundefined
- defloggingall{tracingcommands2 tracingstats2
- tracingpages1 tracingoutput1 tracinglostchars1
- tracingmacros2 tracingparagraphs1 tracingrestores1
- showboxbreadthmaxdimenshowboxdepthmaxdimen
- }%
- else
- defloggingall{tracingcommands3 tracingstats2
- tracingpages1 tracingoutput1 tracinglostchars1
- tracingmacros2 tracingparagraphs1 tracingrestores1
- tracingscantokens1 tracingassigns1 tracingifs1
- tracinggroups1 tracingnesting2
- showboxbreadthmaxdimenshowboxdepthmaxdimen
- }%
- fi
- % For @cropmarks command.
- % Do @cropmarks to get crop marks.
- %
- newififcropmarks
- letcropmarks = cropmarkstrue
- %
- % Dimensions to add cropmarks at corners.
- % Added by P. A. MacKay, 12 Nov. 1986
- %
- newdimenouterhsize newdimenoutervsize % set by the paper size routines
- newdimencornerlong cornerlong=1pc
- newdimencornerthick cornerthick=.3pt
- newdimentopandbottommargin topandbottommargin=.75in
- % Main output routine.
- chardefPAGE = 255
- output = {onepageout{pagecontentsPAGE}}
- newboxheadlinebox
- newboxfootlinebox
- % onepageout takes a vbox as an argument. Note that pagecontents
- % does insertions, but you have to call it yourself.
- defonepageout#1{%
- ifcropmarks hoffset=0pt else hoffset=normaloffset fi
- %
- ifoddpageno advancehoffset by bindingoffset
- else advancehoffset by -bindingoffsetfi
- %
- % Do this outside of the shipout so @code etc. will be expanded in
- % the headline as they should be, not taken literally (outputting ''code).
- setboxheadlinebox = vbox{lethsize=pagewidth makeheadline}%
- setboxfootlinebox = vbox{lethsize=pagewidth makefootline}%
- %
- {%
- % Have to do this stuff outside the shipout because we want it to
- % take effect in write's, yet the group defined by the vbox ends
- % before the shipout runs.
- %
- escapechar = `\ % use backslash in output files.
- indexdummies % don't expand commands in the output.
- normalturnoffactive % in index entries must not stay , e.g., if
- % the page break happens to be in the middle of an example.
- shipoutvbox{%
- ifcropmarks vbox to outervsizebgroup
- hsize = outerhsize
- vskip-topandbottommargin
- vtop to0pt{%
- line{ewtophfilewtop}%
- nointerlineskip
- line{%
- vbox{moveleftcornerthicknstop}%
- hfill
- vbox{moverightcornerthicknstop}%
- }%
- vss}%
- vskiptopandbottommargin
- linebgroup
- hfil % center the page within the outer (page) hsize.
- ifoddpagenohskipbindingoffsetfi
- vboxbgroup
- fi
- %
- unvboxheadlinebox
- pagebody{#1}%
- ifdimhtfootlinebox > 0pt
- % Only leave this space if the footline is nonempty.
- % (We lessened vsize for it in oddfootingxxx.)
- % The baselineskip=24pt in plain's makefootline has no effect.
- vskip 2baselineskip
- unvboxfootlinebox
- fi
- %
- ifcropmarks
- egroup % end of vboxbgroup
- hfilegroup % end of (centering) linebgroup
- vskiptopandbottommargin plus1fill minus1fill
- boxmaxdepth = cornerthick
- vbox to0pt{vss
- line{%
- vbox{moveleftcornerthicknsbot}%
- hfill
- vbox{moverightcornerthicknsbot}%
- }%
- nointerlineskip
- line{ewbothfilewbot}%
- }%
- egroup % vbox from first cropmarks clause
- fi
- }% end of shipoutvbox
- }% end of group with turnoffactive
- advancepageno
- ifnumoutputpenalty>-20000 elsedosuperejectfi
- }
- newinsertmargin dimenmargin=maxdimen
- defpagebody#1{vbox topageheight{boxmaxdepth=maxdepth #1}}
- {catcode`@ =11
- gdefpagecontents#1{ifvoidtopinselseunvboxtopinsfi
- % marginal hacks, juha@viisa.uucp (Juha Takala)
- ifvoidmarginelse % marginal info is present
- rlap{kernhsizevbox toz@{kern1ptboxmargin vss}}fi
- dimen@=dp#1 unvbox#1
- ifvoidfootinselsevskipskipfootinsfootnoterule unvboxfootinsfi
- ifr@ggedbottom kern-dimen@ vfil fi}
- }
- % Here are the rules for the cropmarks. Note that they are
- % offset so that the space between them is truly outerhsize or outervsize
- % (P. A. MacKay, 12 November, 1986)
- %
- defewtop{vrule heightcornerthick depth0pt widthcornerlong}
- defnstop{vbox
- {hrule heightcornerthick depthcornerlong widthcornerthick}}
- defewbot{vrule height0pt depthcornerthick widthcornerlong}
- defnsbot{vbox
- {hrule heightcornerlong depthcornerthick widthcornerthick}}
- % Parse an argument, then pass it to #1. The argument is the rest of
- % the input line (except we remove a trailing comment). #1 should be a
- % macro which expects an ordinary undelimited TeX argument.
- %
- defparsearg#1{%
- letnext = #1%
- begingroup
- obeylines
- futurelettempparseargx
- }
- % If the next token is an obeyed space (from an @example environment or
- % the like), remove it and recurse. Otherwise, we're done.
- defparseargx{%
- % obeyedspace is defined far below, after the definition of sepspaces.
- ifxobeyedspacetemp
- expandafterparseargdiscardspace
- else
- expandafterparseargline
- fi
- }
- % Remove a single space (as the delimiter token to the macro call).
- {obeyspaces %
- gdefparseargdiscardspace {futurelettempparseargx}}
- {obeylines %
- gdefparseargline#1^^M{%
- endgroup % End of the group started in parsearg.
- %
- % First remove any @c comment, then any @comment.
- % Result of each macro is put in toks0.
- argremovec #1crelax %
- expandafterargremovecomment thetoks0 commentrelax %
- %
- % Call the caller's macro, saved as next in parsearg.
- expandafternextexpandafter{thetoks0}%
- }%
- }
- % Since all c{,omment} does is throw away the argument, we can let TeX
- % do that for us. The relax here is matched by the relax in the call
- % in parseargline; it could be more or less anything, its purpose is
- % just to delimit the argument to the c.
- defargremovec#1c#2relax{toks0 = {#1}}
- defargremovecomment#1comment#2relax{toks0 = {#1}}
- % argremovec{,omment} might leave us with trailing spaces, though; e.g.,
- % @end itemize @c foo
- % will have two active spaces as part of the argument with the
- % `itemize'. Here we remove all active spaces from #1, and assign the
- % result to toks0.
- %
- % This loses if there are any *other* active characters besides spaces
- % in the argument -- _ ^ +, for example -- since they get expanded.
- % Fortunately, Texinfo does not define any such commands. (If it ever
- % does, the catcode of the characters in questionwill have to be changed
- % here.) But this means we cannot call removeactivespaces as part of
- % argremovec{,omment}, since @c uses parsearg, and thus the argument
- % that parsearg gets might well have any character at all in it.
- %
- defremoveactivespaces#1{%
- begingroup
- ignoreactivespaces
- edeftemp{#1}%
- globaltoks0 = expandafter{temp}%
- endgroup
- }
- % Change the active space to expand to nothing.
- %
- begingroup
- obeyspaces
- gdefignoreactivespaces{obeyspaceslet =empty}
- endgroup
- defflushcr{ifxparlisppar defnext##1{}else letnext=relax fi next}
- %% These are used to keep @begin/@end levels from running away
- %% Call inENV within environments (after a begingroup)
- newififENV ENVfalse definENV{ifENVrelaxelseENVtruefi}
- defENVcheck{%
- ifENVerrmessage{Still within an environment; press RETURN to continue}
- endgroupfi} % This is not perfect, but it should reduce lossage
- % @begin foo is the same as @foo, for now.
- newhelpEMsimple{Press RETURN to continue.}
- outerdefbegin{parseargbeginxxx}
- defbeginxxx #1{%
- expandafterifxcsname #1endcsnamerelax
- {errhelp=EMsimple errmessage{Undefined command @begin #1}}else
- csname #1endcsnamefi}
- % @end foo executes the definition of Efoo.
- %
- defend{parseargendxxx}
- defendxxx #1{%
- removeactivespaces{#1}%
- edefendthing{thetoks0}%
- %
- expandafterifxcsname Eendthingendcsnamerelax
- expandafterifxcsname endthingendcsnamerelax
- % There's no foo, i.e., no ``environment'' foo.
- errhelp = EMsimple
- errmessage{Undefined command `@end endthing'}%
- else
- unmatchedenderrorendthing
- fi
- else
- % Everything's ok; the right environment has been started.
- csname Eendthingendcsname
- fi
- }
- % There is an environment #1, but it hasn't been started. Give an error.
- %
- defunmatchedenderror#1{%
- errhelp = EMsimple
- errmessage{This `@end #1' doesn't have a matching `@#1'}%
- }
- % Define the control sequence E#1 to give an unmatched @end error.
- %
- defdefineunmatchedend#1{%
- expandafterdefcsname E#1endcsname{unmatchedenderror{#1}}%
- }
- % Single-spacing is done by various environments (specifically, in
- % nonfillstart and quotations).
- newskipsinglespaceskip singlespaceskip = 12.5pt
- defsinglespace{%
- % Why was this kern here? It messes up equalizing space above and below
- % environments. --karl, 6may93
- %{advance baselineskip by -singlespaceskip
- %kern baselineskip}%
- setleading singlespaceskip
- }
- %% Simple single-character @ commands
- % @@ prints an @
- % Kludge this until the fonts are right (grr).
- def@{{ttchar64}}
- % This is turned off because it was never documented
- % and you can use @w{...} around a quote to suppress ligatures.
- %% Define @` and @' to be the same as ` and '
- %% but suppressing ligatures.
- %def`{{`}}
- %def'{{'}}
- % Used to generate quoted braces.
- defmylbrace {{ttchar123}}
- defmyrbrace {{ttchar125}}
- let{=mylbrace
- let}=myrbrace
- begingroup
- % Definitions to produce actual { & } command in an index.
- catcode`{ = 12 catcode`} = 12
- catcode`[ = 1 catcode`] = 2
- catcode`@ = 0 catcode`\ = 12
- @gdef@lbracecmd[{]%
- @gdef@rbracecmd[}]%
- @endgroup
- % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
- % Others are defined by plain TeX: @` @' @" @^ @~ @= @v @H.
- let, = c
- letdotaccent = .
- defringaccent#1{{accent23 #1}}
- lettieaccent = t
- letubaraccent = b
- letudotaccent = d
- % Other special characters: @questiondown @exclamdown
- % Plain TeX defines: @AA @AE @O @OE @L (and lowercase versions) @ss.
- defquestiondown{?`}
- defexclamdown{!`}
- % Dotless i and dotless j, used for accents.
- defimacro{i}
- defjmacro{j}
- defdotless#1{%
- deftemp{#1}%
- ifxtempimacro ptexi
- elseifxtempjmacro j
- else errmessage{@dotless can be used only with i or j}%
- fifi
- }
- % Be sure we're in horizontal mode when doing a tie, since we make space
- % equivalent to this in @example-like environments. Otherwise, a space
- % at the beginning of a line will start with penalty -- and
- % since penalty is valid in vertical mode, we'd end up putting the
- % penalty on the vertical list instead of in the new paragraph.
- {catcode`@ = 11
- % Avoid using @M directly, because that causes trouble
- % if the definition is written into an index file.
- globallettiepenalty = @M
- gdeftie{leavevmodepenaltytiepenalty }
- }
- % @: forces normal size whitespace following.
- def:{spacefactor=1000 }
- % @* forces a line break.
- def*{hfilbreakhbox{}ignorespaces}
- % @. is an end-of-sentence period.
- def.{.spacefactor=3000 }
- % @! is an end-of-sentence bang.
- def!{!spacefactor=3000 }
- % @? is an end-of-sentence query.
- def?{?spacefactor=3000 }
- % @w prevents a word break. Without the leavevmode, @w at the
- % beginning of a paragraph, when TeX is still in vertical mode, would
- % produce a whole line of output instead of starting the paragraph.
- defw#1{leavevmodehbox{#1}}
- % @group ... @end group forces ... to be all on one page, by enclosing
- % it in a TeX vbox. We use vtop instead of vbox to construct the box
- % to keep its height that of a normal line. According to the rules for
- % topskip (p.114 of the TeXbook), the glue inserted is
- % max (topskip - ht (first item), 0). If that height is large,
- % therefore, no glue is inserted, and the space between the headline and
- % the text is small, which looks bad.
- %
- defgroup{begingroup
- ifnumcatcode13=active else
- errhelp = groupinvalidhelp
- errmessage{@group invalid in context where filling is enabled}%
- fi
- %
- % The vtop we start below produces a box with normal height and large
- % depth; thus, TeX puts baselineskip glue before it, and (when the
- % next line of text is done) lineskip glue after it. (See p.82 of
- % the TeXbook.) Thus, space below is not quite equal to space
- % above. But it's pretty close.
- defEgroup{%
- egroup % End the vtop.
- endgroup % End the group.
- }%
- %
- vtopbgroup
- % We have to put a strut on the last line in case the @group is in
- % the midst of an example, rather than completely enclosing it.
- % Otherwise, the interline space between the last line of the group
- % and the first line afterwards is too small. But we can't put the
- % strut in Egroup, since there it would be on a line by itself.
- % Hence this just inserts a strut at the beginning of each line.
- everypar = {strut}%
- %
- % Since we have a strut on every line, we don't need any of TeX's
- % normal interline spacing.
- offinterlineskip
- %
- % OK, but now we have to do something about blank
- % lines in the input in @example-like environments, which normally
- % just turn into lisppar, which will insert no space now that we've
- % turned off the interline space. Simplest is to make them be an
- % empty paragraph.
- ifxparlisppar
- edefpar{leavevmode par}%
- %
- % Reset ^^M's definition to new definition of par.
- obeylines
- fi
- %
- % Do @comment since we are called inside an environment such as
- % @example, where each end-of-line in the input causes an
- % end-of-line in the output. We don't want the end-of-line after
- % the `@group' to put extra space in the output. Since @group
- % should appear on a line by itself (according to the Texinfo
- % manual), we don't worry about eating any user text.
- comment
- }
- %
- % TeX puts in an escapechar (i.e., `@') at the beginning of the help
- % message, so this ends up printing `@group can only ...'.
- %
- newhelpgroupinvalidhelp{%
- group can only be used in environments such as @example,^^J%
- where each line of input produces a line of output.}
- % @need space-in-mils
- % forces a page break if there is not space-in-mils remaining.
- newdimenmil mil=0.001in
- defneed{parseargneedx}
- % Old definition--didn't work.
- %defneedx #1{par %
- %% This method tries to make TeX break the page naturally
- %% if the depth of the box does not fit.
- %{baselineskip=0pt%
- %vtop to #1mil{vfil}kern -#1milnobreak
- %prevdepth=-1000pt
- %}}
- defneedx#1{%
- % Go into vertical mode, so we don't make a big box in the middle of a
- % paragraph.
- par
- %
- % Don't add any leading before our big empty box, but allow a page
- % break, since the best break might be right here.
- allowbreak
- nointerlineskip
- vtop to #1mil{vfil}%
- %
- % TeX does not even consider page breaks if a penalty added to the
- % main vertical list is 10000 or more. But in order to see if the
- % empty box we just added fits on the page, we must make it consider
- % page breaks. On the other hand, we don't want to actually break the
- % page after the empty box. So we use a penalty of 9999.
- %
- % There is an extremely small chance that TeX will actually break the
- % page at this penalty, if there are no other feasible breakpoints in
- % sight. (If the user is using lots of big @group commands, which
- % almost-but-not-quite fill up a page, TeX will have a hard time doing
- % good page breaking, for example.) However, I could not construct an
- % example where a page broke at this penalty; if it happens in a real
- % document, then we can reconsider our strategy.
- penalty9999
- %
- % Back up by the size of the box, whether we did a page break or not.
- kern -#1mil
- %
- % Do not allow a page break right after this kern.
- nobreak
- }
- % @br forces paragraph break
- letbr = par
- % @dots{} output an ellipsis using the current font.
- % We do .5em per period so that it has the same spacing in a typewriter
- % font as three actual period characters.
- %
- defdots{%
- leavevmode
- hbox to 1.5em{%
- hskip 0pt plus 0.25fil minus 0.25fil
- .hss.hss.%
- hskip 0pt plus 0.5fil minus 0.5fil
- }%
- }
- % @enddots{} is an end-of-sentence ellipsis.
- %
- defenddots{%
- leavevmode
- hbox to 2em{%
- hskip 0pt plus 0.25fil minus 0.25fil
- .hss.hss.hss.%
- hskip 0pt plus 0.5fil minus 0.5fil
- }%
- spacefactor=3000
- }
- % @page forces the start of a new page
- %
- defpage{parvfillsupereject}
- % @exdent text....
- % outputs text on separate line in roman font, starting at standard page margin
- % This records the amount of indent in the innermost environment.
- % That's how much exdent should take out.
- newskipexdentamount
- % This defn is used inside fill environments such as @defun.
- defexdent{parseargexdentyyy}
- defexdentyyy #1{{hfilbreakhbox{kern -exdentamount{rm#1}}hfilbreak}}
- % This defn is used inside nofill environments such as @example.
- defnofillexdent{parseargnofillexdentyyy}
- defnofillexdentyyy #1{{advance leftskip by -exdentamount
- leftline{hskipleftskip{rm#1}}}}
- % @inmargin{TEXT} puts TEXT in the margin next to the current paragraph.
- definmargin#1{%
- strutvadjust{nobreakkern-strutdepth
- vtop to strutdepth{baselineskipstrutdepthvss
- llap{rightskip=inmarginspacing vbox{noindent #1}}null}}}
- newskipinmarginspacing inmarginspacing=1cm
- defstrutdepth{dpstrutbox}
- %hbox{{rm#1}}hfilbreak}}
- % @include file insert text of that file as input.
- % Allow normal characters that we make active in the argument (a file name).
- definclude{begingroup
- catcode`\=12
- catcode`~=12
- catcode`^=12
- catcode`_=12
- catcode`|=12
- catcode`<=12
- catcode`>=12
- catcode`+=12
- parseargincludezzz}
- % Restore active chars for included file.
- defincludezzz#1{endgroupbegingroup
- % Read the included file in a group so nested @include's work.
- defthisfile{#1}%
- inputthisfile
- endgroup}
- defthisfile{}
- % @center line outputs that line, centered
- defcenter{parseargcenterzzz}
- defcenterzzz #1{{advancehsize by -leftskip
- advancehsize by -rightskip
- centerline{#1}}}
- % @sp n outputs n lines of vertical space
- defsp{parseargspxxx}
- defspxxx #1{vskip #1baselineskip}
- % @comment ...line which is ignored...
- % @c is the same as @comment
- % @ignore ... @end ignore is another way to write a comment
- defcomment{begingroup catcode`^^M=other%
- catcode`@=other catcode`{=other catcode`}=other%
- commentxxx}
- {catcode`^^M=other gdefcommentxxx#1^^M{endgroup}}
- letc=comment
- % @paragraphindent NCHARS
- % We'll use ems for NCHARS, close enough.
- % We cannot implement @paragraphindent asis, though.
- %
- defasisword{asis} % no translation, these are keywords
- defnoneword{none}
- %
- defparagraphindent{parseargdoparagraphindent}
- defdoparagraphindent#1{%
- deftemp{#1}%
- ifxtempasisword
- else
- ifxtempnoneword
- defaultparindent = 0pt
- else
- defaultparindent = #1em
- fi
- fi
- parindent = defaultparindent
- }
- % @asis just yields its argument. Used with @table, for example.
- %
- defasis#1{#1}
- % @math means output in math mode.
- % We don't use $'s directly in the definition of math because control
- % sequences like math are expanded when the toc file is written. Then,
- % we read the toc file back, the $'s will be normal characters (as they
- % should be, according to the definition of Texinfo). So we must use a
- % control sequence to switch into and out of math mode.
- %
- % This isn't quite enough for @math to work properly in indices, but it
- % seems unlikely it will ever be needed there.
- %
- letimplicitmath = $
- defmath#1{implicitmath #1implicitmath}
- % @bullet and @minus need the same treatment as @math, just above.
- defbullet{implicitmathptexbulletimplicitmath}
- defminus{implicitmath-implicitmath}
- % @refill is a no-op.
- letrefill=relax
- % If working on a large document in chapters, it is convenient to
- % be able to disable indexing, cross-referencing, and contents, for test runs.
- % This is done with @novalidate (before @setfilename).
- %
- newififlinks linkstrue % by default we want the aux files.
- letnovalidate = linksfalse
- % @setfilename is done at the beginning of every texinfo file.
- % So open here the files we need to have open while reading the input.
- % This makes it possible to make a .fmt file for texinfo.
- defsetfilename{%
- iflinks
- readauxfile
- fi % openindices needs to do some work in any case.
- openindices
- fixbackslash % Turn off hack to swallow `input texinfo'.
- globalletsetfilename=comment % Ignore extra @setfilename cmds.
- %
- % If texinfo.cnf is present on the system, read it.
- % Useful for site-wide @afourpaper, etc.
- % Just to be on the safe side, close the input stream before the input.
- openin 1 texinfo.cnf
- ifeof1 lettemp=relax else deftemp{input texinfo.cnf }fi
- closein1
- temp
- %
- comment % Ignore the actual filename.
- }
- % Called from setfilename.
- %
- defopenindices{%
- newindex{cp}%
- newcodeindex{fn}%
- newcodeindex{vr}%
- newcodeindex{tp}%
- newcodeindex{ky}%
- newcodeindex{pg}%
- }
- % @bye.
- outerdefbye{pagealignmacrotracingstats=1ptexend}
- message{fonts,}
- % Font-change commands.
- % Texinfo sort of supports the sans serif font style, which plain TeX does not.
- % So we set up a sf analogous to plain's rm, etc.
- newfamsffam
- defsf{fam=sffam tensf}
- letli = sf % Sometimes we call it li, not sf.
- % We don't need math for this one.
- defttsl{tenttsl}
- % Use Computer Modern fonts at magstephalf (11pt).
- newcountmainmagstep
- mainmagstep=magstephalf
- % Set the font macro #1 to the font named #2, adding on the
- % specified font prefix (normally `cm').
- % #3 is the font's design size, #4 is a scale factor
- defsetfont#1#2#3#4{font#1=fontprefix#2#3 scaled #4}
- % Use cm as the default font prefix.
- % To specify the font prefix, you must define fontprefix
- % before you read in texinfo.tex.
- ifxfontprefixundefined
- deffontprefix{cm}
- fi
- % Support font families that don't use the same naming scheme as CM.
- defrmshape{r}
- defrmbshape{bx} %where the normal face is bold
- defbfshape{b}
- defbxshape{bx}
- defttshape{tt}
- defttbshape{tt}
- defttslshape{sltt}
- defitshape{ti}
- defitbshape{bxti}
- defslshape{sl}
- defslbshape{bxsl}
- defsfshape{ss}
- defsfbshape{ss}
- defscshape{csc}
- defscbshape{csc}
- ifxbiggerrelax
- letmainmagstep=magstep1
- setfonttextrmrmshape{12}{1000}
- setfonttextttttshape{12}{1000}
- else
- setfonttextrmrmshape{10}{mainmagstep}
- setfonttextttttshape{10}{mainmagstep}
- fi
- % Instead of cmb10, you many want to use cmbx10.
- % cmbx10 is a prettier font on its own, but cmb10
- % looks better when embedded in a line with cmr10.
- setfonttextbfbfshape{10}{mainmagstep}
- setfonttextititshape{10}{mainmagstep}
- setfonttextslslshape{10}{mainmagstep}
- setfonttextsfsfshape{10}{mainmagstep}
- setfonttextscscshape{10}{mainmagstep}
- setfonttextttslttslshape{10}{mainmagstep}
- fonttexti=cmmi10 scaled mainmagstep
- fonttextsy=cmsy10 scaled mainmagstep
- % A few fonts for @defun, etc.
- setfontdefbfbxshape{10}{magstep1} %was 1314
- setfontdefttttshape{10}{magstep1}
- defdf{lettentt=deftt lettenbf = defbf bf}
- % Fonts for indices and small examples (9pt).
- % We actually use the slanted font rather than the italic,
- % because texinfo normally uses the slanted fonts for that.
- % Do not make many font distinctions in general in the index, since they
- % aren't very useful.
- setfontninettttshape{9}{1000}
- setfontninettslttslshape{10}{900}
- setfontindrmrmshape{9}{1000}
- setfontindititshape{9}{1000}
- setfontindslslshape{9}{1000}
- letindtt=ninett
- letindttsl=ninettsl
- letindsf=indrm
- letindbf=indrm
- setfontindscscshape{10}{900}
- fontindi=cmmi9
- fontindsy=cmsy9
- % Fonts for title page:
- setfonttitlermrmbshape{12}{magstep3}
- setfonttitleititbshape{10}{magstep4}
- setfonttitleslslbshape{10}{magstep4}
- setfonttitlettttbshape{12}{magstep3}
- setfonttitlettslttslshape{10}{magstep4}
- setfonttitlesfsfbshape{17}{magstep1}
- lettitlebf=titlerm
- setfonttitlescscbshape{10}{magstep4}
- fonttitlei=cmmi12 scaled magstep3
- fonttitlesy=cmsy10 scaled magstep4
- defauthorrm{secrm}
- % Chapter (and unnumbered) fonts (17.28pt).
- setfontchaprmrmbshape{12}{magstep2}
- setfontchapititbshape{10}{magstep3}
- setfontchapslslbshape{10}{magstep3}
- setfontchapttttbshape{12}{magstep2}
- setfontchapttslttslshape{10}{magstep3}
- setfontchapsfsfbshape{17}{1000}
- letchapbf=chaprm
- setfontchapscscbshape{10}{magstep3}
- fontchapi=cmmi12 scaled magstep2
- fontchapsy=cmsy10 scaled magstep3
- % Section fonts (14.4pt).
- setfontsecrmrmbshape{12}{magstep1}
- setfontsecititbshape{10}{magstep2}
- setfontsecslslbshape{10}{magstep2}
- setfontsecttttbshape{12}{magstep1}
- setfontsecttslttslshape{10}{magstep2}
- setfontsecsfsfbshape{12}{magstep1}
- letsecbfsecrm
- setfontsecscscbshape{10}{magstep2}
- fontseci=cmmi12 scaled magstep1
- fontsecsy=cmsy10 scaled magstep2
- % setfontssecrmbxshape{10}{magstep1} % This size an font looked bad.
- % setfontssecititshape{10}{magstep1} % The letters were too crowded.
- % setfontssecslslshape{10}{magstep1}
- % setfontssecttttshape{10}{magstep1}
- % setfontssecsfsfshape{10}{magstep1}
- %setfontssecrmbfshape{10}{1315} % Note the use of cmb rather than cmbx.
- %setfontssecititshape{10}{1315} % Also, the size is a little larger than
- %setfontssecslslshape{10}{1315} % being scaled magstep1.
- %setfontssecttttshape{10}{1315}
- %setfontssecsfsfshape{10}{1315}
- %letssecbf=ssecrm
- % Subsection fonts (13.15pt).
- setfontssecrmrmbshape{12}{magstephalf}
- setfontssecititbshape{10}{1315}
- setfontssecslslbshape{10}{1315}
- setfontssecttttbshape{12}{magstephalf}
- setfontssecttslttslshape{10}{1315}
- setfontssecsfsfbshape{12}{magstephalf}
- letssecbfssecrm
- setfontssecscscbshape{10}{magstep1}
- fontsseci=cmmi12 scaled magstephalf
- fontssecsy=cmsy10 scaled 1315
- % The smallcaps and symbol fonts should actually be scaled magstep1.5,
- % but that is not a standard magnification.
- % In order for the font changes to affect most math symbols and letters,
- % we have to define the textfont of the standard families. Since
- % texinfo doesn't allow for producing subscripts and superscripts, we
- % don't bother to reset scriptfont and scriptscriptfont (which would
- % also require loading a lot more fonts).
- %
- defresetmathfonts{%
- textfont0 = tenrm textfont1 = teni textfont2 = tensy
- textfontitfam = tenit textfontslfam = tensl textfontbffam = tenbf
- textfontttfam = tentt textfontsffam = tensf
- }
- % The font-changing commands redefine the meanings of tenSTYLE, instead
- % of just STYLE. We do this so that font changes will continue to work
- % in math mode, where it is the current fam that is relevant in most
- % cases, not the current font. Plain TeX does defbf{fam=bffam
- % tenbf}, for example. By redefining tenbf, we obviate the need to
- % redefine bf itself.
- deftextfonts{%
- lettenrm=textrm lettenit=textit lettensl=textsl
- lettenbf=textbf lettentt=texttt letsmallcaps=textsc
- lettensf=textsf letteni=texti lettensy=textsy lettenttsl=textttsl
- resetmathfonts}
- deftitlefonts{%
- lettenrm=titlerm lettenit=titleit lettensl=titlesl
- lettenbf=titlebf lettentt=titlett letsmallcaps=titlesc
- lettensf=titlesf letteni=titlei lettensy=titlesy
- lettenttsl=titlettsl
- resetmathfonts setleading{25pt}}
- deftitlefont#1{{titlefontsrm #1}}
- defchapfonts{%
- lettenrm=chaprm lettenit=chapit lettensl=chapsl
- lettenbf=chapbf lettentt=chaptt letsmallcaps=chapsc
- lettensf=chapsf letteni=chapi lettensy=chapsy lettenttsl=chapttsl
- resetmathfonts setleading{19pt}}
- defsecfonts{%
- lettenrm=secrm lettenit=secit lettensl=secsl
- lettenbf=secbf lettentt=sectt letsmallcaps=secsc
- lettensf=secsf letteni=seci lettensy=secsy lettenttsl=secttsl
- resetmathfonts setleading{16pt}}
- defsubsecfonts{%
- lettenrm=ssecrm lettenit=ssecit lettensl=ssecsl
- lettenbf=ssecbf lettentt=ssectt letsmallcaps=ssecsc
- lettensf=ssecsf letteni=sseci lettensy=ssecsy lettenttsl=ssecttsl
- resetmathfonts setleading{15pt}}
- letsubsubsecfonts = subsecfonts % Maybe make sssec fonts scaled magstephalf?
- defindexfonts{%
- lettenrm=indrm lettenit=indit lettensl=indsl
- lettenbf=indbf lettentt=indtt letsmallcaps=indsc
- lettensf=indsf letteni=indi lettensy=indsy lettenttsl=indttsl
- resetmathfonts setleading{12pt}}
- % Set up the default fonts, so we can use them for creating boxes.
- %
- textfonts
- % Define these so they can be easily changed for other fonts.
- defangleleft{$langle$}
- defangleright{$rangle$}
- % Count depth in font-changes, for error checks
- newcountfontdepth fontdepth=0
- % Fonts for short table of contents.
- setfontshortcontrmrmshape{12}{1000}
- setfontshortcontbfbxshape{12}{1000}
- setfontshortcontslslshape{12}{1000}
- %% Add scribe-like font environments, plus @l for inline lisp (usually sans
- %% serif) and @ii for TeX italic
- % smartitalic{ARG} outputs arg in italics, followed by an italic correction
- % unless the following character is such as not to need one.
- defsmartitalicx{ifxnext,elseifxnext-elseifxnext.else/fififi}
- defsmartslanted#1{{sl #1}futureletnextsmartitalicx}
- defsmartitalic#1{{it #1}futureletnextsmartitalicx}
- leti=smartitalic
- letvar=smartslanted
- letdfn=smartslanted
- letemph=smartitalic
- letcite=smartslanted
- defb#1{{bf #1}}
- letstrong=b
- % We can't just use exhyphenpenalty, because that only has effect at
- % the end of a paragraph. Restore normal hyphenation at the end of the
- % group within which nohyphenation is presumably called.
- %
- defnohyphenation{hyphencharfont = -1 aftergrouprestorehyphenation}
- defrestorehyphenation{hyphencharfont = `- }
- deft#1{%
- {tt rawbackslash frenchspacing #1}%
- null
- }
- letttfont=t
- defsamp#1{`tclose{#1}'null}
- setfontsmallrmrmshape{8}{1000}
- fontsmallsy=cmsy9
- defkey#1{{smallrmtextfont2=smallsy leavevmodehbox{%
- raise0.4pthbox{angleleft}kern-.08emvtop{%
- vbox{hrulekern-0.4pt
- hbox{raise0.4pthbox{vphantom{angleleft}}#1}}%
- kern-0.4pthrule}%
- kern-.06emraise0.4pthbox{angleright}}}}
- % The old definition, with no lozenge:
- %defkey #1{{ttsl nohyphenation uppercase{#1}}null}
- defctrl #1{{tt rawbackslash hat}#1}
- % @file, @option are the same as @samp.
- letfile=samp
- letoption=samp
- % @code is a modification of @t,
- % which makes spaces the same size as normal in the surrounding text.
- deftclose#1{%
- {%
- % Change normal interword space to be same as for the current font.
- spaceskip = fontdimen2font
- %
- % Switch to typewriter.
- tt
- %
- % But ` ' produces the large typewriter interword space.
- def {{spaceskip = 0pt{} }}%
- %
- % Turn off hyphenation.
- nohyphenation
- %
- rawbackslash
- frenchspacing
- #1%
- }%
- null
- }
- % We *must* turn on hyphenation at `-' and `_' in code.
- % Otherwise, it is too hard to avoid overfull hboxes
- % in the Emacs manual, the Library manual, etc.
- % Unfortunately, TeX uses one parameter (hyphenchar) to control
- % both hyphenation at - and hyphenation within words.
- % We must therefore turn them both off (tclose does that)
- % and arrange explicitly to hyphenate at a dash.
- % -- rms.
- {
- catcode`-=active
- catcode`_=active
- %
- globaldefcode{begingroup
- catcode`-=active let-codedash
- catcode`_=active let_codeunder
- codex
- }
- %
- % If we end up with any active - characters when handling the index,
- % just treat them as a normal -.
- globaldefindexbreaks{catcode`-=active let-realdash}
- }
- defrealdash{-}
- defcodedash{-discretionary{}{}{}}
- defcodeunder{ifusingtt{normalunderscorediscretionary{}{}{}}{_}}
- defcodex #1{tclose{#1}endgroup}
- %letexp=tclose %Was temporary
- % @kbd is like @code, except that if the argument is just one @key command,
- % then @kbd has no effect.
- % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
- % `example' (@kbd uses ttsl only inside of @example and friends),
- % or `code' (@kbd uses normal tty font always).
- defkbdinputstyle{parseargkbdinputstylexxx}
- defkbdinputstylexxx#1{%
- defarg{#1}%
- ifxargworddistinct
- gdefkbdexamplefont{ttsl}gdefkbdfont{ttsl}%
- elseifxargwordexample
- gdefkbdexamplefont{ttsl}gdefkbdfont{tt}%
- elseifxargwordcode
- gdefkbdexamplefont{tt}gdefkbdfont{tt}%
- fififi
- }
- defworddistinct{distinct}
- defwordexample{example}
- defwordcode{code}
- % Default is kbdinputdistinct. (Too much of a hassle to call the macro,
- % the catcodes are wrong for parsearg to work.)
- gdefkbdexamplefont{ttsl}gdefkbdfont{ttsl}
- defxkey{key}
- defkbdfoo#1#2#3par{defone{#1}defthree{#3}defthreex{??}%
- ifxonexkeyifxthreexthree key{#2}%
- else{tclose{kbdfontlook}}fi
- else{tclose{kbdfontlook}}fi}
- % For @url, @env, @command quotes seem unnecessary, so use code.
- leturl=code
- letenv=code
- letcommand=code
- % @uref (abbreviation for `urlref') takes an optional (comma-separated)
- % second argument specifying the text to display and an optional third
- % arg as text to display instead of (rather than in addition to) the url
- % itself. First (mandatory) arg is the url. Perhaps eventually put in
- % a hypertex special here.
- %
- defuref#1{douref #1,,,finish}
- defdouref#1,#2,#3,#4finish{%
- setbox0 = hbox{ignorespaces #3}%
- ifdimwd0 > 0pt
- unhbox0 % third arg given, show only that
- else
- setbox0 = hbox{ignorespaces #2}%
- ifdimwd0 > 0pt
- unhbox0 (code{#1})% second arg given, show both it and url
- else
- code{#1}% only url given, so show it
- fi
- fi
- }
- % rms does not like the angle brackets --karl, 17may97.
- % So now @email is just like @uref.
- %defemail#1{angleleft{tt #1}angleright}
- letemail=uref
- % Check if we are currently using a typewriter font. Since all the
- % Computer Modern typewriter fonts have zero interword stretch (and
- % shrink), and it is reasonable to expect all typewriter fonts to have
- % this property, we can check that font parameter.
- %
- defifmonospace{ifdimfontdimen3font=0pt }
- % Typeset a dimension, e.g., `in' or `pt'. The only reason for the
- % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
- %
- defdmn#1{thinspace #1}
- defkbd#1{deflook{#1}expandafterkbdfoolook??par}
- % @l was never documented to mean ``switch to the Lisp font'',
- % and it is not used as such in any manual I can find. We need it for
- % Polish suppressed-l. --karl, 22sep96.
- %defl#1{{li #1}null}
- % Explicit font changes: @r, @sc, undocumented @ii.
- defr#1{{rm #1}} % roman font
- defsc#1{{smallcaps#1}} % smallcaps font
- defii#1{{it #1}} % italic font
- % @acronym downcases the argument and prints in smallcaps.
- defacronym#1{{smallcaps lowercase{#1}}}
- % @pounds{} is a sterling sign.
- defpounds{{it$}}
- message{page headings,}
- newskiptitlepagetopglue titlepagetopglue = 1.5in
- newskiptitlepagebottomglue titlepagebottomglue = 2pc
- % First the title page. Must do @settitle before @titlepage.
- newififseenauthor
- newififfinishedtitlepage
- % Do an implicit @contents or @shortcontents after @end titlepage if the
- % user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage.
- %
- newififsetcontentsaftertitlepage
- letsetcontentsaftertitlepage = setcontentsaftertitlepagetrue
- newififsetshortcontentsaftertitlepage
- letsetshortcontentsaftertitlepage = setshortcontentsaftertitlepagetrue
- defshorttitlepage{parseargshorttitlepagezzz}
- defshorttitlepagezzz #1{begingrouphbox{}vskip 1.5in chaprm centerline{#1}%
- endgrouppagehbox{}page}
- deftitlepage{begingroup parindent=0pt textfonts
- letsubtitlerm=tenrm
- defsubtitlefont{subtitlerm normalbaselineskip = 13pt normalbaselines}%
- %
- defauthorfont{authorrm normalbaselineskip = 16pt normalbaselines}%
- %
- % Leave some space at the very top of the page.
- vgluetitlepagetopglue
- %
- % Now you can print the title using @title.
- deftitle{parseargtitlezzz}%
- deftitlezzz##1{leftline{titlefontsrm ##1}
- % print a rule at the page bottom also.
- finishedtitlepagefalse
- vskip4pt hrule height 4pt width hsize vskip4pt}%
- % No rule at page bottom unless we print one at the top with @title.
- finishedtitlepagetrue
- %
- % Now you can put text using @subtitle.
- defsubtitle{parseargsubtitlezzz}%
- defsubtitlezzz##1{{subtitlefont rightline{##1}}}%
- %
- % @author should come last, but may come many times.
- defauthor{parseargauthorzzz}%
- defauthorzzz##1{ifseenauthorelsevskip 0pt plus 1filllseenauthortruefi
- {authorfont leftline{##1}}}%
- %
- % Most title ``pages'' are actually two pages long, with space
- % at the top of the second. We don't want the ragged left on the second.
- letoldpage = page
- defpage{%
- iffinishedtitlepageelse
- finishtitlepage
- fi
- oldpage
- letpage = oldpage
- hbox{}}%
- % defpage{oldpage hbox{}}
- }
- defEtitlepage{%
- iffinishedtitlepageelse
- finishtitlepage
- fi
- % It is important to do the page break before ending the group,
- % because the headline and footline are only empty inside the group.
- % If we use the new definition of page, we always get a blank page
- % after the title page, which we certainly don't want.
- oldpage
- endgroup
- %
- % If they want short, they certainly want long too.
- ifsetshortcontentsaftertitlepage
- shortcontents
- contents
- globalletshortcontents = relax
- globalletcontents = relax
- fi
- %
- ifsetcontentsaftertitlepage
- contents
- globalletcontents = relax
- globalletshortcontents = relax
- fi
- %
- HEADINGSon
- }
- deffinishtitlepage{%
- vskip4pt hrule height 2pt width hsize
- vskiptitlepagebottomglue
- finishedtitlepagetrue
- }
- %%% Set up page headings and footings.
- letthispage=folio
- newtoksevenheadline % headline on even pages
- newtoksoddheadline % headline on odd pages
- newtoksevenfootline % footline on even pages
- newtoksoddfootline % footline on odd pages
- % Now make Tex use those variables
- headline={{textfontsrm ifoddpageno theoddheadline
- else theevenheadline fi}}
- footline={{textfontsrm ifoddpageno theoddfootline
- else theevenfootline fi}HEADINGShook}
- letHEADINGShook=relax
- % Commands to set those variables.
- % For example, this is what @headings on does
- % @evenheading @thistitle|@thispage|@thischapter
- % @oddheading @thischapter|@thispage|@thistitle
- % @evenfooting @thisfile||
- % @oddfooting ||@thisfile
- defevenheading{parseargevenheadingxxx}
- defoddheading{parseargoddheadingxxx}
- defeveryheading{parseargeveryheadingxxx}
- defevenfooting{parseargevenfootingxxx}
- defoddfooting{parseargoddfootingxxx}
- defeveryfooting{parseargeveryfootingxxx}
- {catcode`@=0 %
- gdefevenheadingxxx #1{evenheadingyyy #1@|@|@|@|finish}
- gdefevenheadingyyy #1@|#2@|#3@|#4finish{%
- globalevenheadline={rlap{centerline{#2}}line{#1hfil#3}}}
- gdefoddheadingxxx #1{oddheadingyyy #1@|@|@|@|finish}
- gdefoddheadingyyy #1@|#2@|#3@|#4finish{%
- globaloddheadline={rlap{centerline{#2}}line{#1hfil#3}}}
- gdefeveryheadingxxx#1{oddheadingxxx{#1}evenheadingxxx{#1}}%
- gdefevenfootingxxx #1{evenfootingyyy #1@|@|@|@|finish}
- gdefevenfootingyyy #1@|#2@|#3@|#4finish{%
- globalevenfootline={rlap{centerline{#2}}line{#1hfil#3}}}
- gdefoddfootingxxx #1{oddfootingyyy #1@|@|@|@|finish}
- gdefoddfootingyyy #1@|#2@|#3@|#4finish{%
- globaloddfootline = {rlap{centerline{#2}}line{#1hfil#3}}%
- %
- % Leave some space for the footline. Hopefully ok to assume
- % @evenfooting will not be used by itself.
- globaladvancepageheight by -baselineskip
- globaladvancevsize by -baselineskip
- }
- gdefeveryfootingxxx#1{oddfootingxxx{#1}evenfootingxxx{#1}}
- %
- }% unbind the catcode of @.
- % @headings double turns headings on for double-sided printing.
- % @headings single turns headings on for single-sided printing.
- % @headings off turns them off.
- % @headings on same as @headings double, retained for compatibility.
- % @headings after turns on double-sided headings after this page.
- % @headings doubleafter turns on double-sided headings after this page.
- % @headings singleafter turns on single-sided headings after this page.
- % By default, they are off at the start of a document,
- % and turned `on' after @end titlepage.
- defheadings #1 {csname HEADINGS#1endcsname}
- defHEADINGSoff{
- globalevenheadline={hfil} globalevenfootline={hfil}
- globaloddheadline={hfil} globaloddfootline={hfil}}
- HEADINGSoff
- % When we turn headings on, set the page number to 1.
- % For double-sided printing, put current file name in lower left corner,
- % chapter name on inside top of right hand pages, document
- % title on inside top of left hand pages, and page numbers on outside top
- % edge of all pages.
- defHEADINGSdouble{
- globalpageno=1
- globalevenfootline={hfil}
- globaloddfootline={hfil}
- globalevenheadline={line{foliohfilthistitle}}
- globaloddheadline={line{thischapterhfilfolio}}
- globalletcontentsalignmacro = chapoddpage
- }
- letcontentsalignmacro = chappager
- % For single-sided printing, chapter title goes across top left of page,
- % page number on top right.
- defHEADINGSsingle{
- globalpageno=1
- globalevenfootline={hfil}
- globaloddfootline={hfil}
- globalevenheadline={line{thischapterhfilfolio}}
- globaloddheadline={line{thischapterhfilfolio}}
- globalletcontentsalignmacro = chappager
- }
- defHEADINGSon{HEADINGSdouble}
- defHEADINGSafter{letHEADINGShook=HEADINGSdoublex}
- letHEADINGSdoubleafter=HEADINGSafter
- defHEADINGSdoublex{%
- globalevenfootline={hfil}
- globaloddfootline={hfil}
- globalevenheadline={line{foliohfilthistitle}}
- globaloddheadline={line{thischapterhfilfolio}}
- globalletcontentsalignmacro = chapoddpage
- }
- defHEADINGSsingleafter{letHEADINGShook=HEADINGSsinglex}
- defHEADINGSsinglex{%
- globalevenfootline={hfil}
- globaloddfootline={hfil}
- globalevenheadline={line{thischapterhfilfolio}}
- globaloddheadline={line{thischapterhfilfolio}}
- globalletcontentsalignmacro = chappager
- }
- % Subroutines used in generating headings
- % Produces Day Month Year style of output.
- deftoday{%
- numberdayspace
- ifcasemonth
- orputwordMJanorputwordMFeborputwordMMarorputwordMApr
- orputwordMMayorputwordMJunorputwordMJulorputwordMAug
- orputwordMSeporputwordMOctorputwordMNovorputwordMDec
- fi
- spacenumberyear}
- % @settitle line... specifies the title of the document, for headings.
- % It generates no output of its own.
- defthistitle{putwordNoTitle}
- defsettitle{parseargsettitlezzz}
- defsettitlezzz #1{gdefthistitle{#1}}
- message{tables,}
- % Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x).
- % default indentation of table text
- newdimentableindent tableindent=.8in
- % default indentation of @itemize and @enumerate text
- newdimenitemindent itemindent=.3in
- % margin between end of table item and start of table text.
- newdimenitemmargin itemmargin=.1in
- % used internally for itemindent minus itemmargin
- newdimenitemmax
- % Note @table, @vtable, and @vtable define @item, @itemx, etc., with
- % these defs.
- % They also define itemindex
- % to index the item name in whatever manner is desired (perhaps none).
- newififitemxneedsnegativevskip
- defitemxpar{parifitemxneedsnegativevskipnobreakvskip-parskipnobreakfi}
- definternalBitem{smallbreak parseargitemzzz}
- definternalBitemx{itemxpar parseargitemzzz}
- definternalBxitem "#1"{defxitemsubtopix{#1} smallbreak parseargxitemzzz}
- definternalBxitemx "#1"{defxitemsubtopix{#1} itemxpar parseargxitemzzz}
- definternalBkitem{smallbreak parseargkitemzzz}
- definternalBkitemx{itemxpar parseargkitemzzz}
- defkitemzzz #1{dosubind {kw}{code{#1}}{for {bf lastfunction}}%
- itemzzz {#1}}
- defxitemzzz #1{dosubind {kw}{code{#1}}{for {bf xitemsubtopic}}%
- itemzzz {#1}}
- defitemzzz #1{begingroup %
- advancehsize by -rightskip
- advancehsize by -tableindent
- setbox0=hbox{itemfont{#1}}%
- itemindex{#1}%
- nobreak % This prevents a break before @itemx.
- %
- % If the item text does not fit in the space we have, put it on a line
- % by itself, and do not allow a page break either before or after that
- % line. We do not start a paragraph here because then if the next
- % command is, e.g., @kindex, the whatsit would get put into the
- % horizontal list on a line by itself, resulting in extra blank space.
- ifdim wd0>itemmax
- %
- % Make this a paragraph so we get the parskip glue and wrapping,
- % but leave it ragged-right.
- begingroup
- advanceleftskip by-tableindent
- advancehsize bytableindent
- advancerightskip by0pt plus1fil
- leavevmodeunhbox0par
- endgroup
- %
- % We're going to be starting a paragraph, but we don't want the
- % parskip glue -- logically it's part of the @item we just started.
- nobreak vskip-parskip
- %
- % Stop a page break at the parskip glue coming up. Unfortunately
- % we can't prevent a possible page break at the following
- % baselineskip glue.
- nobreak
- endgroup
- itemxneedsnegativevskipfalse
- else
- % The item text fits into the space. Start a paragraph, so that the
- % following text (if any) will end up on the same line.
- noindent
- % Do this with kerns and unhbox so that if there is a footnote in
- % the item text, it can migrate to the main vertical list and
- % eventually be printed.
- nobreakkern-tableindent
- dimen0 = itemmax advancedimen0 by itemmargin advancedimen0 by -wd0
- unhbox0
- nobreakkerndimen0
- endgroup
- itemxneedsnegativevskiptrue
- fi
- }
- defitem{errmessage{@item while not in a table}}
- defitemx{errmessage{@itemx while not in a table}}
- defkitem{errmessage{@kitem while not in a table}}
- defkitemx{errmessage{@kitemx while not in a table}}
- defxitem{errmessage{@xitem while not in a table}}
- defxitemx{errmessage{@xitemx while not in a table}}
- % Contains a kludge to get @end[description] to work.
- defdescription{tablez{dontindex}{1}{}{}{}{}}
- % @table, @ftable, @vtable.
- deftable{begingroupinENVobeylinesobeyspacestablex}
- {obeylinesobeyspaces%
- gdeftablex #1^^M{%
- tableydontindex#1 endtabley}}
- defftable{begingroupinENVobeylinesobeyspacesftablex}
- {obeylinesobeyspaces%
- gdefftablex #1^^M{%
- tableyfnitemindex#1 endtabley
- defEftable{endgrafafterenvbreakendgroup}%
- letEtable=relax}}
- defvtable{begingroupinENVobeylinesobeyspacesvtablex}
- {obeylinesobeyspaces%
- gdefvtablex #1^^M{%
- tableyvritemindex#1 endtabley
- defEvtable{endgrafafterenvbreakendgroup}%
- letEtable=relax}}
- defdontindex #1{}
- deffnitemindex #1{doind {fn}{code{#1}}}%
- defvritemindex #1{doind {vr}{code{#1}}}%
- {obeyspaces %
- gdeftabley#1#2 #3 #4 #5 #6 #7endtabley{endgroup%
- tablez{#1}{#2}{#3}{#4}{#5}{#6}}}
- deftablez #1#2#3#4#5#6{%
- aboveenvbreak %
- begingroup %
- defEdescription{Etable}% Necessary kludge.
- letitemindex=#1%
- ifnum 0#3>0 advance leftskip by #3mil fi %
- ifnum 0#4>0 tableindent=#4mil fi %
- ifnum 0#5>0 advance rightskip by #5mil fi %
- defitemfont{#2}%
- itemmax=tableindent %
- advance itemmax by -itemmargin %
- advance leftskip by tableindent %
- exdentamount=tableindent
- parindent = 0pt
- parskip = smallskipamount
- ifdim parskip=0pt parskip=2pt fi%
- defEtable{endgrafafterenvbreakendgroup}%
- letitem = internalBitem %
- letitemx = internalBitemx %
- letkitem = internalBkitem %
- letkitemx = internalBkitemx %
- letxitem = internalBxitem %
- letxitemx = internalBxitemx %
- }
- % This is the counter used by @enumerate, which is really @itemize
- newcount itemno
- defitemize{parseargitemizezzz}
- defitemizezzz #1{%
- begingroup % ended by the @end itemize
- itemizey {#1}{Eitemize}
- }
- defitemizey #1#2{%
- aboveenvbreak %
- itemmax=itemindent %
- advance itemmax by -itemmargin %
- advance leftskip by itemindent %
- exdentamount=itemindent
- parindent = 0pt %
- parskip = smallskipamount %
- ifdim parskip=0pt parskip=2pt fi%
- def#2{endgrafafterenvbreakendgroup}%
- defitemcontents{#1}%
- letitem=itemizeitem}
- % Set sfcode to normal for the chars that usually have another value.
- % These are `.?!:;,'
- deffrenchspacing{sfcode46=1000 sfcode63=1000 sfcode33=1000
- sfcode58=1000 sfcode59=1000 sfcode44=1000 }
- % splitoff TOKENSendmark defines first to be the first token in
- % TOKENS, and rest to be the remainder.
- %
- defsplitoff#1#2endmark{deffirst{#1}defrest{#2}}%
- % Allow an optional argument of an uppercase letter, lowercase letter,
- % or number, to specify the first label in the enumerated list. No
- % argument is the same as `1'.
- %
- defenumerate{parseargenumeratezzz}
- defenumeratezzz #1{enumeratey #1 endenumeratey}
- defenumeratey #1 #2endenumeratey{%
- begingroup % ended by the @end enumerate
- %
- % If we were given no argument, pretend we were given `1'.
- defthearg{#1}%
- ifxtheargempty defthearg{1}fi
- %
- % Detect if the argument is a single token. If so, it might be a
- % letter. Otherwise, the only valid thing it can be is a number.
- % (We will always have one token, because of the test we just made.
- % This is a good thing, since splitoff doesn't work given nothing at
- % all -- the first parameter is undelimited.)
- expandaftersplitofftheargendmark
- ifxrestempty
- % Only one token in the argument. It could still be anything.
- % A ``lowercase letter'' is one whose lccode is nonzero.
- % An ``uppercase letter'' is one whose lccode is both nonzero, and
- % not equal to itself.
- % Otherwise, we assume it's a number.
- %
- % We need the relax at the end of the ifnum lines to stop TeX from
- % continuing to look for a <number>.
- %
- ifnumlccodeexpandafter`thearg=0relax
- numericenumerate % a number (we hope)
- else
- % It's a letter.
- ifnumlccodeexpandafter`thearg=expandafter`theargrelax
- lowercaseenumerate % lowercase letter
- else
- uppercaseenumerate % uppercase letter
- fi
- fi
- else
- % Multiple tokens in the argument. We hope it's a number.
- numericenumerate
- fi
- }
- % An @enumerate whose labels are integers. The starting integer is
- % given in thearg.
- %
- defnumericenumerate{%
- itemno = thearg
- startenumeration{theitemno}%
- }
- % The starting (lowercase) letter is in thearg.
- deflowercaseenumerate{%
- itemno = expandafter`thearg
- startenumeration{%
- % Be sure we're not beyond the end of the alphabet.
- ifnumitemno=0
- errmessage{No more lowercase letters in @enumerate; get a bigger
- alphabet}%
- fi
- charlccodeitemno
- }%
- }
- % The starting (uppercase) letter is in thearg.
- defuppercaseenumerate{%
- itemno = expandafter`thearg
- startenumeration{%
- % Be sure we're not beyond the end of the alphabet.
- ifnumitemno=0
- errmessage{No more uppercase letters in @enumerate; get a bigger
- alphabet}
- fi
- charuccodeitemno
- }%
- }
- % Call itemizey, adding a period to the first argument and supplying the
- % common last two arguments. Also subtract one from the initial value in
- % itemno, since @item increments itemno.
- %
- defstartenumeration#1{%
- advanceitemno by -1
- itemizey{#1.}Eenumerateflushcr
- }
- % @alphaenumerate and @capsenumerate are abbreviations for giving an arg
- % to @enumerate.
- %
- defalphaenumerate{enumerate{a}}
- defcapsenumerate{enumerate{A}}
- defEalphaenumerate{Eenumerate}
- defEcapsenumerate{Eenumerate}
- % Definition of @item while inside @itemize.
- defitemizeitem{%
- advanceitemno by 1
- {letpar=endgraf smallbreak}%
- ifhmode errmessage{In hmode at itemizeitem}fi
- {parskip=0in hskip 0pt
- hbox to 0pt{hss itemcontentshskip itemmargin}%
- vadjust{penalty 1200}}%
- flushcr}
- % @multitable macros
- % Amy Hendrickson, 8/18/94, 3/6/96
- %
- % @multitable ... @end multitable will make as many columns as desired.
- % Contents of each column will wrap at width given in preamble. Width
- % can be specified either with sample text given in a template line,
- % or in percent of hsize, the current width of text on page.
- % Table can continue over pages but will only break between lines.
- % To make preamble:
- %
- % Either define widths of columns in terms of percent of hsize:
- % @multitable @columnfractions .25 .3 .45
- % @item ...
- %
- % Numbers following @columnfractions are the percent of the total
- % current hsize to be used for each column. You may use as many
- % columns as desired.
- % Or use a template:
- % @multitable {Column 1 template} {Column 2 template} {Column 3 template}
- % @item ...
- % using the widest term desired in each column.
- %
- % For those who want to use more than one line's worth of words in
- % the preamble, break the line within one argument and it
- % will parse correctly, i.e.,
- %
- % @multitable {Column 1 template} {Column 2 template} {Column 3
- % template}
- % Not:
- % @multitable {Column 1 template} {Column 2 template}
- % {Column 3 template}
- % Each new table line starts with @item, each subsequent new column
- % starts with @tab. Empty columns may be produced by supplying @tab's
- % with nothing between them for as many times as empty columns are needed,
- % ie, @tab@tab@tab will produce two empty columns.
- % @item, @tab, @multitable or @end multitable do not need to be on their
- % own lines, but it will not hurt if they are.
- % Sample multitable:
- % @multitable {Column 1 template} {Column 2 template} {Column 3 template}
- % @item first col stuff @tab second col stuff @tab third col
- % @item
- % first col stuff
- % @tab
- % second col stuff
- % @tab
- % third col
- % @item first col stuff @tab second col stuff
- % @tab Many paragraphs of text may be used in any column.
- %
- % They will wrap at the width determined by the template.
- % @item@tab@tab This will be in third column.
- % @end multitable
- % Default dimensions may be reset by user.
- % @multitableparskip is vertical space between paragraphs in table.
- % @multitableparindent is paragraph indent in table.
- % @multitablecolmargin is horizontal space to be left between columns.
- % @multitablelinespace is space to leave between table items, baseline
- % to baseline.
- % 0pt means it depends on current normal line spacing.
- %
- newskipmultitableparskip
- newskipmultitableparindent
- newdimenmultitablecolspace
- newskipmultitablelinespace
- multitableparskip=0pt
- multitableparindent=6pt
- multitablecolspace=12pt
- multitablelinespace=0pt
- % Macros used to set up halign preamble:
- %
- letendsetuptablerelax
- defxendsetuptable{endsetuptable}
- letcolumnfractionsrelax
- defxcolumnfractions{columnfractions}
- newififsetpercent
- % #1 is the part of the @columnfraction before the decimal point, which
- % is presumably either 0 or the empty string (but we don't check, we
- % just throw it away). #2 is the decimal part, which we use as the
- % percent of hsize for this column.
- defpickupwholefraction#1.#2 {%
- globaladvancecolcount by 1
- expandafterxdefcsname colthecolcountendcsname{.#2hsize}%
- setuptable
- }
- newcountcolcount
- defsetuptable#1{%
- deffirstarg{#1}%
- ifxfirstargxendsetuptable
- letgo = relax
- else
- ifxfirstargxcolumnfractions
- globalsetpercenttrue
- else
- ifsetpercent
- letgopickupwholefraction
- else
- globaladvancecolcount by 1
- setbox0=hbox{#1unskip }% Add a normal word space as a separator;
- % typically that is always in the input, anyway.
- expandafterxdefcsname colthecolcountendcsname{thewd0}%
- fi
- fi
- ifxgopickupwholefraction
- % Put the argument back for the pickupwholefraction call, so
- % we'll always have a period there to be parsed.
- defgo{pickupwholefraction#1}%
- else
- letgo = setuptable
- fi%
- fi
- go
- }
- % multitable syntax
- deftab{&hskip1sprelax} % 2/2/96
- % tiny skip here makes sure this column space is
- % maintained, even if it is never used.
- % @multitable ... @end multitable definitions:
- %
- defmultitable{parseargdotable}
- defdotable#1{bgroup
- vskipparskip
- letitemcrcr
- tolerance=9500
- hbadness=9500
- setmultitablespacing
- parskip=multitableparskip
- parindent=multitableparindent
- overfullrule=0pt
- globalcolcount=0
- defEmultitable{globalsetpercentfalsecregroupegroup}%
- %
- % To parse everything between @multitable and @item:
- setuptable#1 endsetuptable
- %
- % everycr will reset column counter, colcount, at the end of
- % each line. Every column entry will cause colcount to advance by one.
- % The table preamble
- % looks at the current colcount to find the correct column width.
- everycr{noalign{%
- %
- % filbreak%% keeps underfull box messages off when table breaks over pages.
- % Maybe so, but it also creates really weird page breaks when the table
- % breaks over pages. Wouldn't vfil be better? Wait until the problem
- % manifests itself, so it can be fixed for real --karl.
- globalcolcount=0relax}}%
- %
- % This preamble sets up a generic column definition, which will
- % be used as many times as user calls for columns.
- % vtop will set a single line and will also let text wrap and
- % continue for many paragraphs if desired.
- halignbgroup&globaladvancecolcount by 1relax
- multistrutvtop{hsize=expandaftercsname colthecolcountendcsname
- %
- % In order to keep entries from bumping into each other
- % we will add a leftskip of multitablecolspace to all columns after
- % the first one.
- %
- % If a template has been used, we will add multitablecolspace
- % to the width of each template entry.
- %
- % If the user has set preamble in terms of percent of hsize we will
- % use that dimension as the width of the column, and the leftskip
- % will keep entries from bumping into each other. Table will start at
- % left margin and final column will justify at right margin.
- %
- % Make sure we don't inherit rightskip from the outer environment.
- rightskip=0pt
- ifnumcolcount=1
- % The first column will be indented with the surrounding text.
- advancehsize byleftskip
- else
- ifsetpercent else
- % If user has not set preamble in terms of percent of hsize
- % we will advance hsize by multitablecolspace.
- advancehsize by multitablecolspace
- fi
- % In either case we will make leftskip=multitablecolspace:
- leftskip=multitablecolspace
- fi
- % Ignoring space at the beginning and end avoids an occasional spurious
- % blank line, when TeX decides to break the line at the space before the
- % box from the multistrut, so the strut ends up on a line by itself.
- % For example:
- % @multitable @columnfractions .11 .89
- % @item @code{#}
- % @tab Legal holiday which is valid in major parts of the whole country.
- % Is automatically provided with highlighting sequences respectively marking
- % characters.
- noindentignorespaces##unskipmultistrut}cr
- }
- defsetmultitablespacing{% test to see if user has set multitablelinespace.
- % If so, do nothing. If not, give it an appropriate dimension based on
- % current baselineskip.
- ifdimmultitablelinespace=0pt
- %% strut to put in table in case some entry doesn't have descenders,
- %% to keep lines equally spaced
- letmultistrut = strut
- %% Test to see if parskip is larger than space between lines of
- %% table. If not, do nothing.
- %% If so, set to same dimension as multitablelinespace.
- else
- gdefmultistrut{vrule heightmultitablelinespace depthdp0
- width0ptrelax} fi
- ifdimmultitableparskip>multitablelinespace
- globalmultitableparskip=multitablelinespace
- globaladvancemultitableparskip-7pt %% to keep parskip somewhat smaller
- %% than skip between lines in the table.
- fi%
- ifdimmultitableparskip=0pt
- globalmultitableparskip=multitablelinespace
- globaladvancemultitableparskip-7pt %% to keep parskip somewhat smaller
- %% than skip between lines in the table.
- fi}
- message{conditionals,}
- % Prevent errors for section commands.
- % Used in @ignore and in failing conditionals.
- defignoresections{%
- letchapter=relax
- letunnumbered=relax
- lettop=relax
- letunnumberedsec=relax
- letunnumberedsection=relax
- letunnumberedsubsec=relax
- letunnumberedsubsection=relax
- letunnumberedsubsubsec=relax
- letunnumberedsubsubsection=relax
- letsection=relax
- letsubsec=relax
- letsubsubsec=relax
- letsubsection=relax
- letsubsubsection=relax
- letappendix=relax
- letappendixsec=relax
- letappendixsection=relax
- letappendixsubsec=relax
- letappendixsubsection=relax
- letappendixsubsubsec=relax
- letappendixsubsubsection=relax
- letcontents=relax
- letsmallbook=relax
- lettitlepage=relax
- }
- % Used in nested conditionals, where we have to parse the Texinfo source
- % and so want to turn off most commands, in case they are used
- % incorrectly.
- %
- defignoremorecommands{%
- letdefcodeindex = relax
- letdefcv = relax
- letdeffn = relax
- letdeffnx = relax
- letdefindex = relax
- letdefivar = relax
- letdefmac = relax
- letdefmethod = relax
- letdefop = relax
- letdefopt = relax
- letdefspec = relax
- letdeftp = relax
- letdeftypefn = relax
- letdeftypefun = relax
- letdeftypevar = relax
- letdeftypevr = relax
- letdefun = relax
- letdefvar = relax
- letdefvr = relax
- letref = relax
- letxref = relax
- letprintindex = relax
- letpxref = relax
- letsettitle = relax
- letsetchapternewpage = relax
- letsetchapterstyle = relax
- leteveryheading = relax
- letevenheading = relax
- letoddheading = relax
- leteveryfooting = relax
- letevenfooting = relax
- letoddfooting = relax
- letheadings = relax
- letinclude = relax
- letlowersections = relax
- letdown = relax
- letraisesections = relax
- letup = relax
- letset = relax
- letclear = relax
- letitem = relax
- }
- % Ignore @ignore ... @end ignore.
- %
- defignore{doignore{ignore}}
- % Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text.
- %
- defifinfo{doignore{ifinfo}}
- defifhtml{doignore{ifhtml}}
- defifnottex{doignore{ifnottex}}
- defhtml{doignore{html}}
- defmenu{doignore{menu}}
- defdirentry{doignore{direntry}}
- % @dircategory CATEGORY -- specify a category of the dir file
- % which this file should belong to. Ignore this in TeX.
- letdircategory = comment
- % Ignore text until a line `@end #1'.
- %
- defdoignore#1{begingroup
- % Don't complain about control sequences we have declared outer.
- ignoresections
- %
- % Define a command to swallow text until we reach `@end #1'.
- % This @ is a catcode 12 token (that is the normal catcode of @ in
- % this texinfo.tex file). We change the catcode of @ below to match.
- longdefdoignoretext##1@end #1{enddoignore}%
- %
- % Make sure that spaces turn into tokens that match what doignoretext wants.
- catcode32 = 10
- %
- % Ignore braces, too, so mismatched braces don't cause trouble.
- catcode`{ = 9
- catcode`} = 9
- %
- % We must not have @c interpreted as a control sequence.
- catcode`@ = 12
- %
- % Make the letter c a comment character so that the rest of the line
- % will be ignored. This way, the document can have (for example)
- % @c @end ifinfo
- % and the @end ifinfo will be properly ignored.
- % (We've just changed @ to catcode 12.)
- catcode`c = 14
- %
- % And now expand that command.
- doignoretext
- }
- % What we do to finish off ignored text.
- %
- defenddoignore{endgroupignorespaces}%
- newififwarnedobswarnedobsfalse
- defobstexwarn{%
- ifwarnedobsrelaxelse
- % We need to warn folks that they may have trouble with TeX 3.0.
- % This uses immediatewrite16 rather than message to get newlines.
- immediatewrite16{}
- immediatewrite16{WARNING: for users of Unix TeX 3.0!}
- immediatewrite16{This manual trips a bug in TeX version 3.0 (tex hangs).}
- immediatewrite16{If you are running another version of TeX, relax.}
- immediatewrite16{If you are running Unix TeX 3.0, kill this TeX process.}
- immediatewrite16{ Then upgrade your TeX installation if you can.}
- immediatewrite16{ (See ftp://ftp.gnu.org/pub/gnu/TeX.README.)}
- immediatewrite16{If you are stuck with version 3.0, run the}
- immediatewrite16{ script ``tex3patch'' from the Texinfo distribution}
- immediatewrite16{ to use a workaround.}
- immediatewrite16{}
- globalwarnedobstrue
- fi
- }
- % **In TeX 3.0, setting text in nullfont hangs tex. For a
- % workaround (which requires the file ``dummy.tfm'' to be installed),
- % uncomment the following line:
- %%%%%fontnullfont=dummyletobstexwarn=relax
- % Ignore text, except that we keep track of conditional commands for
- % purposes of nesting, up to an `@end #1' command.
- %
- defnestedignore#1{%
- obstexwarn
- % We must actually expand the ignored text to look for the @end
- % command, so that nested ignore constructs work. Thus, we put the
- % text into a vbox and then do nothing with the result. To minimize
- % the change of memory overflow, we follow the approach outlined on
- % page 401 of the TeXbook: make the current font be a dummy font.
- %
- setbox0 = vboxbgroup
- % Don't complain about control sequences we have declared outer.
- ignoresections
- %
- % Define `@end #1' to end the box, which will in turn undefine the
- % @end command again.
- expandafterdefcsname E#1endcsname{egroupignorespaces}%
- %
- % We are going to be parsing Texinfo commands. Most cause no
- % trouble when they are used incorrectly, but some commands do
- % complicated argument parsing or otherwise get confused, so we
- % undefine them.
- %
- % We can't do anything about stray @-signs, unfortunately;
- % they'll produce `undefined control sequence' errors.
- ignoremorecommands
- %
- % Set the current font to be nullfont, a TeX primitive, and define
- % all the font commands to also use nullfont. We don't use
- % dummy.tfm, as suggested in the TeXbook, because not all sites
- % might have that installed. Therefore, math mode will still
- % produce output, but that should be an extremely small amount of
- % stuff compared to the main input.
- %
- nullfont
- lettenrm = nullfont lettenit = nullfont lettensl = nullfont
- lettenbf = nullfont lettentt = nullfont letsmallcaps = nullfont
- lettensf = nullfont
- % Similarly for index fonts (mostly for their use in
- % smallexample)
- letindrm = nullfont letindit = nullfont letindsl = nullfont
- letindbf = nullfont letindtt = nullfont letindsc = nullfont
- letindsf = nullfont
- %
- % Don't complain when characters are missing from the fonts.
- tracinglostchars = 0
- %
- % Don't bother to do space factor calculations.
- frenchspacing
- %
- % Don't report underfull hboxes.
- hbadness = 10000
- %
- % Do minimal line-breaking.
- pretolerance = 10000
- %
- % Do not execute instructions in @tex
- deftex{doignore{tex}}%
- % Do not execute macro definitions.
- % `c' is a comment character, so the word `macro' will get cut off.
- defmacro{doignore{ma}}%
- }
- % @set VAR sets the variable VAR to an empty value.
- % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
- %
- % Since we want to separate VAR from REST-OF-LINE (which might be
- % empty), we can't just use parsearg; we have to insert a space of our
- % own to delimit the rest of the line, and then take it out again if we
- % didn't need it. Make sure the catcode of space is correct to avoid
- % losing inside @example, for instance.
- %
- defset{begingroupcatcode` =10
- catcode`-=12 catcode`_=12 % Allow - and _ in VAR.
- parseargsetxxx}
- defsetxxx#1{setyyy#1 endsetyyy}
- defsetyyy#1 #2endsetyyy{%
- deftemp{#2}%
- ifxtempempty globalexpandafterletcsname SET#1endcsname = empty
- else setzzz{#1}#2endsetzzz % Remove the trailing space setxxx inserted.
- fi
- endgroup
- }
- % Can't use xdef to pre-expand #2 and save some time, since temp or
- % next or other control sequences that we've defined might get us into
- % an infinite loop. Consider `@set foo @cite{bar}'.
- defsetzzz#1#2 endsetzzz{expandaftergdefcsname SET#1endcsname{#2}}
- % @clear VAR clears (i.e., unsets) the variable VAR.
- %
- defclear{parseargclearxxx}
- defclearxxx#1{globalexpandafterletcsname SET#1endcsname=relax}
- % @value{foo} gets the text saved in variable foo.
- {
- catcode`_ = active
- %
- % We might end up with active _ or - characters in the argument if
- % we're called from @code, as @code{@value{foo-bar_}}. So let any
- % such active characters to their normal equivalents.
- gdefvalue{begingroup
- catcode`-=12 catcode`_=12
- indexbreaks let_normalunderscore
- valuexxx}
- }
- defvaluexxx#1{expandablevalue{#1}endgroup}
- % We have this subroutine so that we can handle at least some @value's
- % properly in indexes (we letvalue to this in indexdummies). Ones
- % whose names contain - or _ still won't work, but we can't do anything
- % about that. The command has to be fully expandable, since the result
- % winds up in the index file. This means that if the variable's value
- % contains other Texinfo commands, it's almost certain it will fail
- % (although perhaps we could fix that with sufficient work to do a
- % one-level expansion on the result, instead of complete).
- %
- defexpandablevalue#1{%
- expandafterifxcsname SET#1endcsnamerelax
- {[No value for ``#1'']}%
- else
- csname SET#1endcsname
- fi
- }
- % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
- % with @set.
- %
- defifset{parseargifsetxxx}
- defifsetxxx #1{%
- expandafterifxcsname SET#1endcsnamerelax
- expandafterifsetfail
- else
- expandafterifsetsucceed
- fi
- }
- defifsetsucceed{conditionalsucceed{ifset}}
- defifsetfail{nestedignore{ifset}}
- defineunmatchedend{ifset}
- % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
- % defined with @set, or has been undefined with @clear.
- %
- defifclear{parseargifclearxxx}
- defifclearxxx #1{%
- expandafterifxcsname SET#1endcsnamerelax
- expandafterifclearsucceed
- else
- expandafterifclearfail
- fi
- }
- defifclearsucceed{conditionalsucceed{ifclear}}
- defifclearfail{nestedignore{ifclear}}
- defineunmatchedend{ifclear}
- % @iftex, @ifnothtml, @ifnotinfo always succeed; we read the text
- % following, through the first @end iftex (etc.). Make `@end iftex'
- % (etc.) valid only after an @iftex.
- %
- defiftex{conditionalsucceed{iftex}}
- defifnothtml{conditionalsucceed{ifnothtml}}
- defifnotinfo{conditionalsucceed{ifnotinfo}}
- defineunmatchedend{iftex}
- defineunmatchedend{ifnothtml}
- defineunmatchedend{ifnotinfo}
- % We can't just want to start a group at @iftex (for example) and end it
- % at @end iftex, since then @set commands inside the conditional have no
- % effect (they'd get reverted at the end of the group). So we must
- % define Eiftex to redefine itself to be its previous value. (We can't
- % just define it to fail again with an ``unmatched end'' error, since
- % the @ifset might be nested.)
- %
- defconditionalsucceed#1{%
- edeftemp{%
- % Remember the current value of E#1.
- letnece{prevE#1} = nece{E#1}%
- %
- % At the `@end #1', redefine E#1 to be its previous value.
- defnece{E#1}{letnece{E#1} = nece{prevE#1}}%
- }%
- temp
- }
- % We need to expand lots of csname's, but we don't want to expand the
- % control sequences after we've constructed them.
- %
- defnece#1{expandafternoexpandcsname#1endcsname}
- % @defininfoenclose.
- letdefinfoenclose=comment
- message{indexing,}
- % Index generation facilities
- % Define newwrite to be identical to plain tex's newwrite
- % except not outer, so it can be used within newindex.
- {catcode`@=11
- gdefnewwrite{alloc@7writechardefsixt@@n}}
- % newindex {foo} defines an index named foo.
- % It automatically defines fooindex such that
- % fooindex ...rest of line... puts an entry in the index foo.
- % It also defines fooindfile to be the number of the output channel for
- % the file that accumulates this index. The file's extension is foo.
- % The name of an index should be no more than 2 characters long
- % for the sake of vms.
- %
- defnewindex#1{%
- iflinks
- expandafternewwrite csname#1indfileendcsname
- openout csname#1indfileendcsname jobname.#1 % Open the file
- fi
- expandafterxdefcsname#1indexendcsname{% % Define @#1index
- noexpanddoindex{#1}}
- }
- % @defindex foo == newindex{foo}
- defdefindex{parseargnewindex}
- % Define @defcodeindex, like @defindex except put all entries in @code.
- defnewcodeindex#1{%
- iflinks
- expandafternewwrite csname#1indfileendcsname
- openout csname#1indfileendcsname jobname.#1
- fi
- expandafterxdefcsname#1indexendcsname{%
- noexpanddocodeindex{#1}}
- }
- defdefcodeindex{parseargnewcodeindex}
- % @synindex foo bar makes index foo feed into index bar.
- % Do this instead of @defindex foo if you don't want it as a separate index.
- % The closeout helps reduce unnecessary open files; the limit on the
- % Acorn RISC OS is a mere 16 files.
- defsynindex#1 #2 {%
- expandafterletexpandaftersynindexfooexpandafter=csname#2indfileendcsname
- expandaftercloseoutcsname#1indfileendcsname
- expandafterletcsname#1indfileendcsname=synindexfoo
- expandafterxdefcsname#1indexendcsname{% define xxxindex
- noexpanddoindex{#2}}%
- }
- % @syncodeindex foo bar similar, but put all entries made for index foo
- % inside @code.
- defsyncodeindex#1 #2 {%
- expandafterletexpandaftersynindexfooexpandafter=csname#2indfileendcsname
- expandaftercloseoutcsname#1indfileendcsname
- expandafterletcsname#1indfileendcsname=synindexfoo
- expandafterxdefcsname#1indexendcsname{% define xxxindex
- noexpanddocodeindex{#2}}%
- }
- % Define doindex, the driver for all fooindex macros.
- % Argument #1 is generated by the calling fooindex macro,
- % and it is "foo", the name of the index.
- % doindex just uses parsearg; it calls doind for the actual work.
- % This is because doind is more useful to call from other macros.
- % There is also dosubind {index}{topic}{subtopic}
- % which makes an entry in a two-level index such as the operation index.
- defdoindex#1{edefindexname{#1}parseargsingleindexer}
- defsingleindexer #1{doind{indexname}{#1}}
- % like the previous two, but they put @code around the argument.
- defdocodeindex#1{edefindexname{#1}parseargsinglecodeindexer}
- defsinglecodeindexer #1{doind{indexname}{code{#1}}}
- defindexdummies{%
- def { }%
- % Take care of the plain tex accent commands.
- def"{realbackslash "}%
- def`{realbackslash `}%
- def'{realbackslash '}%
- def^{realbackslash ^}%
- def~{realbackslash ~}%
- def={realbackslash =}%
- defb{realbackslash b}%
- defc{realbackslash c}%
- defd{realbackslash d}%
- defu{realbackslash u}%
- defv{realbackslash v}%
- defH{realbackslash H}%
- % Take care of the plain tex special European modified letters.
- defoe{realbackslash oe}%
- defae{realbackslash ae}%
- defaa{realbackslash aa}%
- defOE{realbackslash OE}%
- defAE{realbackslash AE}%
- defAA{realbackslash AA}%
- defo{realbackslash o}%
- defO{realbackslash O}%
- defl{realbackslash l}%
- defL{realbackslash L}%
- defss{realbackslash ss}%
- % Take care of texinfo commands likely to appear in an index entry.
- % (Must be a way to avoid doing expansion at all, and thus not have to
- % laboriously list every single command here.)
- def@{@}% will be @@ when we switch to @ as escape char.
- % Need these in case tex is in effect and { is a delimiter again.
- % But can't use lbracecmd and rbracecmd because texindex assumes
- % braces and backslashes are used only as delimiters.
- let{ = mylbrace
- let} = myrbrace
- def_{{realbackslash _}}%
- defw{realbackslash w }%
- defbf{realbackslash bf }%
- %defrm{realbackslash rm }%
- defsl{realbackslash sl }%
- defsf{realbackslash sf}%
- deftt{realbackslash tt}%
- defgtr{realbackslash gtr}%
- defless{realbackslash less}%
- defhat{realbackslash hat}%
- defTeX{realbackslash TeX}%
- defdots{realbackslash dots }%
- defresult{realbackslash result}%
- defequiv{realbackslash equiv}%
- defexpansion{realbackslash expansion}%
- defprint{realbackslash print}%
- deferror{realbackslash error}%
- defpoint{realbackslash point}%
- defcopyright{realbackslash copyright}%
- deftclose##1{realbackslash tclose {##1}}%
- defcode##1{realbackslash code {##1}}%
- defuref##1{realbackslash uref {##1}}%
- defurl##1{realbackslash url {##1}}%
- defenv##1{realbackslash env {##1}}%
- defcommand##1{realbackslash command {##1}}%
- defoption##1{realbackslash option {##1}}%
- defdotless##1{realbackslash dotless {##1}}%
- defsamp##1{realbackslash samp {##1}}%
- def,##1{realbackslash ,{##1}}%
- deft##1{realbackslash t {##1}}%
- defr##1{realbackslash r {##1}}%
- defi##1{realbackslash i {##1}}%
- defb##1{realbackslash b {##1}}%
- defsc##1{realbackslash sc {##1}}%
- defcite##1{realbackslash cite {##1}}%
- defkey##1{realbackslash key {##1}}%
- deffile##1{realbackslash file {##1}}%
- defvar##1{realbackslash var {##1}}%
- defkbd##1{realbackslash kbd {##1}}%
- defdfn##1{realbackslash dfn {##1}}%
- defemph##1{realbackslash emph {##1}}%
- defacronym##1{realbackslash acronym {##1}}%
- %
- % Handle some cases of @value -- where the variable name does not
- % contain - or _, and the value does not contain any
- % (non-fully-expandable) commands.
- letvalue = expandablevalue
- %
- unsepspaces
- % Turn off macro expansion
- turnoffmacros
- }
- % If an index command is used in an @example environment, any spaces
- % therein should become regular spaces in the raw index file, not the
- % expansion of tie (\leavevmode penalty @M ).
- {obeyspaces
- gdefunsepspaces{obeyspaceslet =space}}
- % indexnofonts no-ops all font-change commands.
- % This is used when outputting the strings to sort the index by.
- defindexdummyfont#1{#1}
- defindexdummytex{TeX}
- defindexdummydots{...}
- defindexnofonts{%
- % Just ignore accents.
- let,=indexdummyfont
- let"=indexdummyfont
- let`=indexdummyfont
- let'=indexdummyfont
- let^=indexdummyfont
- let~=indexdummyfont
- let==indexdummyfont
- letb=indexdummyfont
- letc=indexdummyfont
- letd=indexdummyfont
- letu=indexdummyfont
- letv=indexdummyfont
- letH=indexdummyfont
- letdotless=indexdummyfont
- % Take care of the plain tex special European modified letters.
- defoe{oe}%
- defae{ae}%
- defaa{aa}%
- defOE{OE}%
- defAE{AE}%
- defAA{AA}%
- defo{o}%
- defO{O}%
- defl{l}%
- defL{L}%
- defss{ss}%
- letw=indexdummyfont
- lett=indexdummyfont
- letr=indexdummyfont
- leti=indexdummyfont
- letb=indexdummyfont
- letemph=indexdummyfont
- letstrong=indexdummyfont
- letcite=indexdummyfont
- letsc=indexdummyfont
- %Don't no-op tt, since it isn't a user-level command
- % and is used in the definitions of the active chars like <, >, |...
- %lettt=indexdummyfont
- lettclose=indexdummyfont
- letcode=indexdummyfont
- leturl=indexdummyfont
- leturef=indexdummyfont
- letenv=indexdummyfont
- letcommand=indexdummyfont
- letoption=indexdummyfont
- letfile=indexdummyfont
- letsamp=indexdummyfont
- letkbd=indexdummyfont
- letkey=indexdummyfont
- letvar=indexdummyfont
- letTeX=indexdummytex
- letdots=indexdummydots
- def@{@}%
- }
- % To define realbackslash, we must make not be an escape.
- % We must first make another character (@) an escape
- % so we do not become unable to do a definition.
- {catcode`@=0 catcode`\=other
- @gdef@realbackslash{}}
- letindexbackslash=0 %overridden during printindex.
- letSETmarginindex=relax % put index entries in margin (undocumented)?
- % For ifx comparisons.
- defemptymacro{empty}
- % Most index entries go through here, but dosubind is the general case.
- %
- defdoind#1#2{dosubind{#1}{#2}empty}
- % Workhorse for all fooindexes.
- % #1 is name of index, #2 is stuff to put there, #3 is subentry --
- % empty if called from doind, as we usually are. The main exception
- % is with defuns, which call us directly.
- %
- defdosubind#1#2#3{%
- % Put the index entry in the margin if desired.
- ifxSETmarginindexrelaxelse
- insertmargin{hbox{vrule height8pt depth3pt width0pt #2}}%
- fi
- {%
- count255=lastpenalty
- {%
- indexdummies % Must do this here, since bf, etc expand at this stage
- escapechar=`\
- {%
- letfolio = 0% We will expand all macros now EXCEPT folio.
- defrawbackslashxx{indexbackslash}% indexbackslash isn't defined now
- % so it will be output as is; and it will print as backslash.
- %
- defthirdarg{#3}%
- %
- % If third arg is present, precede it with space in sort key.
- ifxthirdargemptymacro
- letsubentry = empty
- else
- defsubentry{ #3}%
- fi
- %
- % First process the index entry with all font commands turned
- % off to get the string to sort by.
- {indexnofonts xdefindexsorttmp{#2subentry}}%
- %
- % Now the real index entry with the fonts.
- toks0 = {#2}%
- %
- % If third (subentry) arg is present, add it to the index
- % string. And include a space.
- ifxthirdargemptymacro else
- toks0 = expandafter{thetoks0 space #3}%
- fi
- %
- % Set up the complete index entry, with both the sort key
- % and the original text, including any font commands. We write
- % three arguments to entry to the .?? file, texindex reduces to
- % two when writing the .??s sorted result.
- edeftemp{%
- writecsname#1indfileendcsname{%
- realbackslash entry{indexsorttmp}{folio}{thetoks0}}%
- }%
- %
- % If a skip is the last thing on the list now, preserve it
- % by backing up by lastskip, doing the write, then inserting
- % the skip again. Otherwise, the whatsit generated by the
- % write will make lastskip zero. The result is that sequences
- % like this:
- % @end defun
- % @tindex whatever
- % @defun ...
- % will have extra space inserted, because the medbreak in the
- % start of the @defun won't see the skip inserted by the @end of
- % the previous defun.
- %
- % But don't do any of this if we're not in vertical mode. We
- % don't want to do a vskip and prematurely end a paragraph.
- %
- % Avoid page breaks due to these extra skips, too.
- %
- iflinks
- ifvmode
- skip0 = lastskip
- ifdimlastskip = 0pt else nobreakvskip-lastskip fi
- fi
- %
- temp % do the write
- %
- %
- ifvmode ifdimskip0 = 0pt else nobreakvskipskip0 fi fi
- fi
- }%
- }%
- penaltycount255
- }%
- }
- % The index entry written in the file actually looks like
- % entry {sortstring}{page}{topic}
- % or
- % entry {sortstring}{page}{topic}{subtopic}
- % The texindex program reads in these files and writes files
- % containing these kinds of lines:
- % initial {c}
- % before the first topic whose initial is c
- % entry {topic}{pagelist}
- % for a topic that is used without subtopics
- % primary {topic}
- % for the beginning of a topic that is used with subtopics
- % secondary {subtopic}{pagelist}
- % for each subtopic.
- % Define the user-accessible indexing commands
- % @findex, @vindex, @kindex, @cindex.
- deffindex {fnindex}
- defkindex {kyindex}
- defcindex {cpindex}
- defvindex {vrindex}
- deftindex {tpindex}
- defpindex {pgindex}
- defcindexsub {begingroupobeylinescindexsub}
- {obeylines %
- gdefcindexsub "#1" #2^^M{endgroup %
- dosubind{cp}{#2}{#1}}}
- % Define the macros used in formatting output of the sorted index material.
- % @printindex causes a particular index (the ??s file) to get printed.
- % It does not print any chapter heading (usually an @unnumbered).
- %
- defprintindex{parseargdoprintindex}
- defdoprintindex#1{begingroup
- dobreak chapheadingskip{10000}%
- %
- indexfonts rm
- tolerance = 9500
- indexbreaks
- %
- % See if the index file exists and is nonempty.
- % Change catcode of @ here so that if the index file contains
- % initial {@}
- % as its first line, TeX doesn't complain about mismatched braces
- % (because it thinks @} is a control sequence).
- catcode`@ = 11
- openin 1 jobname.#1s
- ifeof 1
- % enddoublecolumns gets confused if there is no text in the index,
- % and it loses the chapter title and the aux file entries for the
- % index. The easiest way to prevent this problem is to make sure
- % there is some text.
- putwordIndexNonexistent
- else
- %
- % If the index file exists but is empty, then openin leaves ifeof
- % false. We have to make TeX try to read something from the file, so
- % it can discover if there is anything in it.
- read 1 to temp
- ifeof 1
- putwordIndexIsEmpty
- else
- % Index files are almost Texinfo source, but we use as the escape
- % character. It would be better to use @, but that's too big a change
- % to make right now.
- defindexbackslash{rawbackslashxx}%
- catcode`\ = 0
- escapechar = `\
- begindoublecolumns
- input jobname.#1s
- enddoublecolumns
- fi
- fi
- closein 1
- endgroup}
- % These macros are used by the sorted index file itself.
- % Change them to control the appearance of the index.
- definitial#1{{%
- % Some minor font changes for the special characters.
- lettentt=sectt lettt=sectt letsf=sectt
- %
- % Remove any glue we may have, we'll be inserting our own.
- removelastskip
- %
- % We like breaks before the index initials, so insert a bonus.
- penalty -300
- %
- % Typeset the initial. Making this add up to a whole number of
- % baselineskips increases the chance of the dots lining up from column
- % to column. It still won't often be perfect, because of the stretch
- % we need before each entry, but it's better.
- %
- % No shrink because it confuses balancecolumns.
- vskip 1.67baselineskip plus .5baselineskip
- leftline{secbf #1}%
- vskip .33baselineskip plus .1baselineskip
- %
- % Do our best not to break after the initial.
- nobreak
- }}
- % This typesets a paragraph consisting of #1, dot leaders, and then #2
- % flush to the right margin. It is used for index and table of contents
- % entries. The paragraph is indented by leftskip.
- %
- defentry#1#2{begingroup
- %
- % Start a new paragraph if necessary, so our assignments below can't
- % affect previous text.
- par
- %
- % Do not fill out the last line with white space.
- parfillskip = 0in
- %
- % No extra space above this paragraph.
- parskip = 0in
- %
- % Do not prefer a separate line ending with a hyphen to fewer lines.
- finalhyphendemerits = 0
- %
- % hangindent is only relevant when the entry text and page number