texinfo.tex
上传用户:qaz666999
上传日期:2022-08-06
资源大小:2570k
文件大小:279k
- defquotationlabel#1{%
- deftemp{#1}%
- ifxtempempty else
- {bf #1: }%
- fi
- }
- % LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
- % If we want to allow any <char> as delimiter,
- % we need the curly braces so that makeinfo sees the @verb command, eg:
- % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org
- %
- % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook.
- %
- % [Knuth] p.344; only we need to do the other characters Texinfo sets
- % active too. Otherwise, they get lost as the first character on a
- % verbatim line.
- defdospecials{%
- do do\do{do}do$do&%
- do#do^do^^Kdo_do^^Ado%do~%
- do<do>do|do@do+do"%
- }
- %
- % [Knuth] p. 380
- defuncatcodespecials{%
- defdo##1{catcode`##1=other}dospecials}
- %
- % [Knuth] pp. 380,381,391
- % Disable Spanish ligatures ?` and !` of tt font
- begingroup
- catcode``=activegdef`{relaxlq}
- endgroup
- %
- % Setup for the @verb command.
- %
- % Eight spaces for a tab
- begingroup
- catcode`^^I=active
- gdeftabeightspaces{catcode`^^I=activedef^^I{ }}
- endgroup
- %
- defsetupverb{%
- tt % easiest (and conventionally used) font for verbatim
- defpar{leavevmodeendgraf}%
- catcode``=active
- tabeightspaces
- % Respect line breaks,
- % print special symbols as themselves, and
- % make each space count
- % must do in this order:
- obeylines uncatcodespecials sepspaces
- }
- % Setup for the @verbatim environment
- %
- % Real tab expansion
- newdimentabw setbox0=hbox{ttspace} tabw=8wd0 % tab amount
- %
- defstarttabbox{setbox0=hboxbgroup}
- % Allow an option to not replace quotes with a regular directed right
- % quote/apostrophe (char 0x27), but instead use the undirected quote
- % from cmtt (char 0x0d). The undirected quote is ugly, so don't make it
- % the default, but it works for pasting with more pdf viewers (at least
- % evince), the lilypond developers report. xpdf does work with the
- % regular 0x27.
- %
- defcodequoteright{%
- expandafterifxcsname SETtxicodequoteundirectedendcsnamerelax
- expandafterifxcsname SETcodequoteundirectedendcsnamerelax
- '%
- else char'15 fi
- else char'15 fi
- }
- %
- % and a similar option for the left quote char vs. a grave accent.
- % Modern fonts display ASCII 0x60 as a grave accent, so some people like
- % the code environments to do likewise.
- %
- defcodequoteleft{%
- expandafterifxcsname SETtxicodequotebacktickendcsnamerelax
- expandafterifxcsname SETcodequotebacktickendcsnamerelax
- `%
- else char'22 fi
- else char'22 fi
- }
- %
- begingroup
- catcode`^^I=active
- gdeftabexpand{%
- catcode`^^I=active
- def^^I{leavevmodeegroup
- dimen0=wd0 % the width so far, or since the previous tab
- dividedimen0 bytabw
- multiplydimen0 bytabw % compute previous multiple of tabw
- advancedimen0 bytabw % advance to next multiple of tabw
- wd0=dimen0 box0 starttabbox
- }%
- }
- catcode`'=active
- gdefrquoteexpand{catcoderquoteChar=active def'{codequoteright}}%
- %
- catcode``=active
- gdeflquoteexpand{catcodelquoteChar=active def`{codequoteleft}}%
- %
- gdefquoteexpand{rquoteexpand lquoteexpand}%
- endgroup
- % start the verbatim environment.
- defsetupverbatim{%
- letnonarrowing = t%
- nonfillstart
- % Easiest (and conventionally used) font for verbatim
- tt
- defpar{leavevmodeegroupbox0endgraf}%
- catcode``=active
- tabexpand
- quoteexpand
- % Respect line breaks,
- % print special symbols as themselves, and
- % make each space count
- % must do in this order:
- obeylines uncatcodespecials sepspaces
- everypar{starttabbox}%
- }
- % Do the @verb magic: verbatim text is quoted by unique
- % delimiter characters. Before first delimiter expect a
- % right brace, after last delimiter expect closing brace:
- %
- % defdoverb'{'<char>#1<char>'}'{#1}
- %
- % [Knuth] p. 382; only eat outer {}
- begingroup
- catcode`[=1catcode`]=2catcode`{=othercatcode`}=other
- gdefdoverb{#1[defnext##1#1}[##1endgroup]next]
- endgroup
- %
- defverb{begingroupsetupverbdoverb}
- %
- %
- % Do the @verbatim magic: define the macro doverbatim so that
- % the (first) argument ends when '@end verbatim' is reached, ie:
- %
- % defdoverbatim#1@end verbatim{#1}
- %
- % For Texinfo it's a lot easier than for LaTeX,
- % because texinfo's verbatim doesn't stop at 'end{verbatim}':
- % we need not redefine '', '{' and '}'.
- %
- % Inspired by LaTeX's verbatim command set [latex.ltx]
- %
- begingroup
- catcode` =active
- obeylines %
- % ignore everything up to the first ^^M, that's the newline at the end
- % of the @verbatim input line itself. Otherwise we get an extra blank
- % line in the output.
- xdefdoverbatim#1^^M#2@end verbatim{#2noexpandendgobble verbatim}%
- % We really want {...end verbatim} in the body of the macro, but
- % without the active space; thus we have to use xdef and gobble.
- endgroup
- %
- envdefverbatim{%
- setupverbatimdoverbatim
- }
- letEverbatim = afterenvbreak
- % @verbatiminclude FILE - insert text of file in verbatim environment.
- %
- defverbatiminclude{parseargusingfilenamecatcodesdoverbatiminclude}
- %
- defdoverbatiminclude#1{%
- {%
- makevalueexpandable
- setupverbatim
- input #1
- afterenvbreak
- }%
- }
- % @copying ... @end copying.
- % Save the text away for @insertcopying later.
- %
- % We save the uninterpreted tokens, rather than creating a box.
- % Saving the text in a box would be much easier, but then all the
- % typesetting commands (@smallbook, font changes, etc.) have to be done
- % beforehand -- and a) we want @copying to be done first in the source
- % file; b) letting users define the frontmatter in as flexible order as
- % possible is very desirable.
- %
- defcopying{checkenv{}begingroupscanargctxtdocopying}
- defdocopying#1@end copying{endgroupdefcopyingtext{#1}}
- %
- definsertcopying{%
- begingroup
- parindent = 0pt % paragraph indentation looks wrong on title page
- scanexpcopyingtext
- endgroup
- }
- message{defuns,}
- % @defun etc.
- newskipdefbodyindent defbodyindent=.4in
- newskipdefargsindent defargsindent=50pt
- newskipdeflastargmargin deflastargmargin=18pt
- newcountdefunpenalty
- % Start the processing of @deffn:
- defstartdefun{%
- ifnumlastpenalty<10000
- medbreak
- defunpenalty=10003 % Will keep this @deffn together with the
- % following @def command, see below.
- else
- % If there are two @def commands in a row, we'll have a nobreak,
- % which is there to keep the function description together with its
- % header. But if there's nothing but headers, we need to allow a
- % break somewhere. Check specifically for penalty 10002, inserted
- % by printdefunline, instead of 10000, since the sectioning
- % commands also insert a nobreak penalty, and we don't want to allow
- % a break between a section heading and a defun.
- %
- % As a minor refinement, we avoid "club" headers by signalling
- % with penalty of 10003 after the very first @deffn in the
- % sequence (see above), and penalty of 10002 after any following
- % @def command.
- ifnumlastpenalty=10002 penalty2000 else defunpenalty=10002 fi
- %
- % Similarly, after a section heading, do not allow a break.
- % But do insert the glue.
- medskip % preceded by discardable penalty, so not a breakpoint
- fi
- %
- parindent=0in
- advanceleftskip by defbodyindent
- exdentamount=defbodyindent
- }
- defdodefunx#1{%
- % First, check whether we are in the right environment:
- checkenv#1%
- %
- % As above, allow line break if we have multiple x headers in a row.
- % It's not a great place, though.
- ifnumlastpenalty=10002 penalty3000 else defunpenalty=10002 fi
- %
- % And now, it's time to reuse the body of the original defun:
- expandaftergobbledefun#1%
- }
- defgobbledefun#1startdefun{}
- % printdefunline deffnheader{text}
- %
- defprintdefunline#1#2{%
- begingroup
- % call deffnheader:
- #1#2 endheader
- % common ending:
- interlinepenalty = 10000
- advancerightskip by 0pt plus 1fil
- endgraf
- nobreakvskip -parskip
- penaltydefunpenalty % signal to startdefun and dodefunx
- % Some of the @defun-type tags do not enable magic parentheses,
- % rendering the following check redundant. But we don't optimize.
- checkparencounts
- endgroup
- }
- defEdefun{endgrafmedbreak}
- % makedefun{deffn} creates deffn, deffnx and Edeffn;
- % the only thing remaining is to define deffnheader.
- %
- defmakedefun#1{%
- expandafterletcsname E#1endcsname = Edefun
- edeftemp{noexpanddomakedefun
- makecsname{#1}makecsname{#1x}makecsname{#1header}}%
- temp
- }
- % domakedefun deffn deffnx deffnheader
- %
- % Define deffn and deffnx, without parameters.
- % deffnheader has to be defined explicitly.
- %
- defdomakedefun#1#2#3{%
- envdef#1{%
- startdefun
- parseargusingactiveparens{printdefunline#3}%
- }%
- def#2{dodefunx#1}%
- def#3%
- }
- %%% Untyped functions:
- % @deffn category name args
- makedefun{deffn}{deffngeneral{}}
- % @deffn category class name args
- makedefun{defop}#1 {defopon{#1 putwordon}}
- % defopon {category on}class name args
- defdefopon#1#2 {deffngeneral{putwordon code{#2}}{#1 code{#2}} }
- % deffngeneral {subind}category name args
- %
- defdeffngeneral#1#2 #3 #4endheader{%
- % Remember that dosubind{fn}{foo}{} is equivalent to doind{fn}{foo}.
- dosubind{fn}{code{#3}}{#1}%
- defname{#2}{}{#3}magicampdefunargs{#4unskip}%
- }
- %%% Typed functions:
- % @deftypefn category type name args
- makedefun{deftypefn}{deftypefngeneral{}}
- % @deftypeop category class type name args
- makedefun{deftypeop}#1 {deftypeopon{#1 putwordon}}
- % deftypeopon {category on}class type name args
- defdeftypeopon#1#2 {deftypefngeneral{putwordon code{#2}}{#1 code{#2}} }
- % deftypefngeneral {subind}category type name args
- %
- defdeftypefngeneral#1#2 #3 #4 #5endheader{%
- dosubind{fn}{code{#4}}{#1}%
- defname{#2}{#3}{#4}defunargs{#5unskip}%
- }
- %%% Typed variables:
- % @deftypevr category type var args
- makedefun{deftypevr}{deftypecvgeneral{}}
- % @deftypecv category class type var args
- makedefun{deftypecv}#1 {deftypecvof{#1 putwordof}}
- % deftypecvof {category of}class type var args
- defdeftypecvof#1#2 {deftypecvgeneral{putwordof code{#2}}{#1 code{#2}} }
- % deftypecvgeneral {subind}category type var args
- %
- defdeftypecvgeneral#1#2 #3 #4 #5endheader{%
- dosubind{vr}{code{#4}}{#1}%
- defname{#2}{#3}{#4}defunargs{#5unskip}%
- }
- %%% Untyped variables:
- % @defvr category var args
- makedefun{defvr}#1 {deftypevrheader{#1} {} }
- % @defcv category class var args
- makedefun{defcv}#1 {defcvof{#1 putwordof}}
- % defcvof {category of}class var args
- defdefcvof#1#2 {deftypecvof{#1}#2 {} }
- %%% Type:
- % @deftp category name args
- makedefun{deftp}#1 #2 #3endheader{%
- doind{tp}{code{#2}}%
- defname{#1}{}{#2}defunargs{#3unskip}%
- }
- % Remaining @defun-like shortcuts:
- makedefun{defun}{deffnheader{putwordDeffunc} }
- makedefun{defmac}{deffnheader{putwordDefmac} }
- makedefun{defspec}{deffnheader{putwordDefspec} }
- makedefun{deftypefun}{deftypefnheader{putwordDeffunc} }
- makedefun{defvar}{defvrheader{putwordDefvar} }
- makedefun{defopt}{defvrheader{putwordDefopt} }
- makedefun{deftypevar}{deftypevrheader{putwordDefvar} }
- makedefun{defmethod}{defoponputwordMethodon}
- makedefun{deftypemethod}{deftypeoponputwordMethodon}
- makedefun{defivar}{defcvofputwordInstanceVariableof}
- makedefun{deftypeivar}{deftypecvofputwordInstanceVariableof}
- % defname, which formats the name of the @def (not the args).
- % #1 is the category, such as "Function".
- % #2 is the return type, if any.
- % #3 is the function name.
- %
- % We are followed by (but not passed) the arguments, if any.
- %
- defdefname#1#2#3{%
- % Get the values of leftskip and rightskip as they were outside the @def...
- advanceleftskip by -defbodyindent
- %
- % How we'll format the type name. Putting it in brackets helps
- % distinguish it from the body text that may end up on the next line
- % just below it.
- deftemp{#1}%
- setbox0=hbox{kerndeflastargmargin ifxtempemptyelse [rmtemp]fi}
- %
- % Figure out line sizes for the paragraph shape.
- % The first line needs space for box0; but if rightskip is nonzero,
- % we need only space for the part of box0 which exceeds it:
- dimen0=hsize advancedimen0 by -wd0 advancedimen0 by rightskip
- % The continuations:
- dimen2=hsize advancedimen2 by -defargsindent
- % (plain.tex says that dimen1 should be used only as global.)
- parshape 2 0in dimen0 defargsindent dimen2
- %
- % Put the type name to the right margin.
- noindent
- hbox to 0pt{%
- hfilbox0 kern-hsize
- % hsize has to be shortened this way:
- kernleftskip
- % Intentionally do not respect rightskip, since we need the space.
- }%
- %
- % Allow all lines to be underfull without complaint:
- tolerance=10000 hbadness=10000
- exdentamount=defbodyindent
- {%
- % defun fonts. We use typewriter by default (used to be bold) because:
- % . we're printing identifiers, they should be in tt in principle.
- % . in languages with many accents, such as Czech or French, it's
- % common to leave accents off identifiers. The result looks ok in
- % tt, but exceedingly strange in rm.
- % . we don't want -- and --- to be treated as ligatures.
- % . this still does not fix the ?` and !` ligatures, but so far no
- % one has made identifiers using them :).
- df tt
- deftemp{#2}% return value type
- ifxtempemptyelse tclose{temp} fi
- #3% output function name
- }%
- {rmenskip}% hskip 0.5 em of tenrm
- %
- boldbrax
- % arguments will be output next, if any.
- }
- % Print arguments in slanted roman (not ttsl), inconsistently with using
- % tt for the name. This is because literal text is sometimes needed in
- % the argument list (groff manual), and ttsl and tt are not very
- % distinguishable. Prevent hyphenation at `-' chars.
- %
- defdefunargs#1{%
- % use sl by default (not ttsl),
- % tt for the names.
- df sl hyphencharfont=0
- %
- % On the other hand, if an argument has two dashes (for instance), we
- % want a way to get ttsl. Let's try @var for that.
- letvar=ttslanted
- #1%
- slhyphencharfont=45
- }
- % We want ()&[] to print specially on the defun line.
- %
- defactiveparens{%
- catcode`(=active catcode`)=active
- catcode`[=active catcode`]=active
- catcode`&=active
- }
- % Make control sequences which act like normal parenthesis chars.
- letlparen = ( letrparen = )
- % Be sure that we always have a definition for `(', etc. For example,
- % if the fn name has parens in it, boldbrax will not be in effect yet,
- % so TeX would otherwise complain about undefined control sequence.
- {
- activeparens
- globallet(=lparen globallet)=rparen
- globallet[=lbrack globallet]=rbrack
- globallet& = &
- gdefboldbrax{let(=opnrlet)=clnrlet[=lbrblet]=rbrb}
- gdefmagicamp{let&=amprm}
- }
- newcountparencount
- % If we encounter &foo, then turn on ()-hacking afterwards
- newififampseen
- defamprm#1 {ampseentrue{bf }}
- defparenfont{%
- ifampseen
- % At the first level, print parens in roman,
- % otherwise use the default font.
- ifnum parencount=1 rm fi
- else
- % The sf parens (in boldbrax) actually are a little bolder than
- % the contained text. This is especially needed for [ and ] .
- sf
- fi
- }
- definfirstlevel#1{%
- ifampseen
- ifnumparencount=1
- #1%
- fi
- fi
- }
- defbfafterword#1 {#1 bf}
- defopnr{%
- globaladvanceparencount by 1
- {parenfont(}%
- infirstlevel bfafterword
- }
- defclnr{%
- {parenfont)}%
- infirstlevel sl
- globaladvanceparencount by -1
- }
- newcountbrackcount
- deflbrb{%
- globaladvancebrackcount by 1
- {bf[}%
- }
- defrbrb{%
- {bf]}%
- globaladvancebrackcount by -1
- }
- defcheckparencounts{%
- ifnumparencount=0 else badparencount fi
- ifnumbrackcount=0 else badbrackcount fi
- }
- % these should not use errmessage; the glibc manual, at least, actually
- % has such constructs (when documenting function pointers).
- defbadparencount{%
- message{Warning: unbalanced parentheses in @def...}%
- globalparencount=0
- }
- defbadbrackcount{%
- message{Warning: unbalanced square brackets in @def...}%
- globalbrackcount=0
- }
- message{macros,}
- % @macro.
- % To do this right we need a feature of e-TeX, scantokens,
- % which we arrange to emulate with a temporary file in ordinary TeX.
- ifxeTeXversionundefined
- newwritemacscribble
- defscantokens#1{%
- toks0={#1}%
- immediateopenoutmacscribble=jobname.tmp
- immediatewritemacscribble{thetoks0}%
- immediatecloseoutmacscribble
- input jobname.tmp
- }
- fi
- defscanmacro#1{%
- begingroup
- newlinechar`^^M
- letxeatspaceseatspaces
- % Undo catcode changes of startcontents and doprintindex
- % When called from @insertcopying or (short)caption, we need active
- % backslash to get it printed correctly. Previously, we had
- % catcode`\=other instead. We'll see whether a problem appears
- % with macro expansion. --kasal, 19aug04
- catcode`@=0 catcode`\=active escapechar=`@
- % ... and example
- spaceisspace
- %
- % Append endinput to make sure that TeX does not see the ending newline.
- % I've verified that it is necessary both for e-TeX and for ordinary TeX
- % --kasal, 29nov03
- scantokens{#1endinput}%
- endgroup
- }
- defscanexp#1{%
- edeftemp{noexpandscanmacro{#1}}%
- temp
- }
- newcountparamno % Count of parameters
- newtoksmacname % Macro name
- newififrecursive % Is it recursive?
- % List of all defined macros in the form
- % definedummywordmacro1definedummywordmacro2...
- % Currently is also contains all @aliases; the list can be split
- % if there is a need.
- defmacrolist{}
- % Add the macro to macrolist
- defaddtomacrolist#1{expandafter addtomacrolistxxx csname#1endcsname}
- defaddtomacrolistxxx#1{%
- toks0 = expandafter{macrolistdefinedummyword#1}%
- xdefmacrolist{thetoks0}%
- }
- % Utility routines.
- % This does let #1 = #2, with csnames; that is,
- % let csname#1endcsname = csname#2endcsname
- % (except of course we have to play expansion games).
- %
- defcslet#1#2{%
- expandafterlet
- csname#1expandafterendcsname
- csname#2endcsname
- }
- % Trim leading and trailing spaces off a string.
- % Concepts from aro-bend problem 15 (see CTAN).
- {catcode`@=11
- gdefeatspaces #1{expandaftertrim@expandafter{#1 }}
- gdeftrim@ #1{trim@@ @#1 @ #1 @ @@}
- gdeftrim@@ #1@ #2@ #3@@{trim@@@empty #2 @}
- defunbrace#1{#1}
- unbrace{gdeftrim@@@ #1 } #2@{#1}
- }
- % Trim a single trailing ^^M off a string.
- {catcode`^^M=other catcode`Q=3%
- gdefeatcr #1{eatcra #1Q^^MQ}%
- gdefeatcra#1^^MQ{eatcrb#1Q}%
- gdefeatcrb#1Q#2Q{#1}%
- }
- % Macro bodies are absorbed as an argument in a context where
- % all characters are catcode 10, 11 or 12, except which is active
- % (as in normal texinfo). It is necessary to change the definition of .
- % Non-ASCII encodings make 8-bit characters active, so un-activate
- % them to avoid their expansion. Must do this non-globally, to
- % confine the change to the current group.
- % It's necessary to have hard CRs when the macro is executed. This is
- % done by making ^^M (endlinechar) catcode 12 when reading the macro
- % body, and then making it the newlinechar in scanmacro.
- defscanctxt{%
- catcode`"=other
- catcode`+=other
- catcode`<=other
- catcode`>=other
- catcode`@=other
- catcode`^=other
- catcode`_=other
- catcode`|=other
- catcode`~=other
- ifxdeclaredencodingascii else setnonasciicharscatcodenonglobalother fi
- }
- defscanargctxt{%
- scanctxt
- catcode`\=other
- catcode`^^M=other
- }
- defmacrobodyctxt{%
- scanctxt
- catcode`{=other
- catcode`}=other
- catcode`^^M=other
- usembodybackslash
- }
- defmacroargctxt{%
- scanctxt
- catcode`\=other
- }
- % mbodybackslash is the definition of in @macro bodies.
- % It maps foo => csname macarg.fooendcsname => #N
- % where N is the macro parameter number.
- % We define csname macarg.endcsname to be realbackslash, so
- % \ in macro replacement text gets you a backslash.
- {catcode`@=0 @catcode`@=@active
- @gdef@usembodybackslash{@let=@mbodybackslash}
- @gdef@mbodybackslash#1{@csname macarg.#1@endcsname}
- }
- expandafterdefcsname macarg.endcsname{realbackslash}
- defmacro{recursivefalseparseargmacroxxx}
- defrmacro{recursivetrueparseargmacroxxx}
- defmacroxxx#1{%
- getargs{#1}% now macname is the macname and argl the arglist
- ifxarglempty % no arguments
- paramno=0%
- else
- expandafterparsemargdef argl;%
- fi
- if1csname ismacro.themacnameendcsname
- message{Warning: redefining themacname}%
- else
- expandafterifxcsname themacnameendcsname relax
- else errmessage{Macro name themacnamespace already defined}fi
- globalcslet{macsave.themacname}{themacname}%
- globalexpandafterletcsname ismacro.themacnameendcsname=1%
- addtomacrolist{themacname}%
- fi
- begingroup macrobodyctxt
- ifrecursive expandafterparsermacbody
- else expandafterparsemacbody
- fi}
- parseargdefunmacro{%
- if1csname ismacro.#1endcsname
- globalcslet{#1}{macsave.#1}%
- globalexpandafterlet csname ismacro.#1endcsname=0%
- % Remove the macro name from macrolist:
- begingroup
- expandafterletcsname#1endcsname relax
- letdefinedummywordunmacrodo
- xdefmacrolist{macrolist}%
- endgroup
- else
- errmessage{Macro #1 not defined}%
- fi
- }
- % Called by do from dounmacro on each macro. The idea is to omit any
- % macro definitions that have been changed to relax.
- %
- defunmacrodo#1{%
- ifx #1relax
- % remove this
- else
- noexpanddefinedummyword noexpand#1%
- fi
- }
- % This makes use of the obscure feature that if the last token of a
- % <parameter list> is #, then the preceding argument is delimited by
- % an opening brace, and that opening brace is not consumed.
- defgetargs#1{getargsxxx#1{}}
- defgetargsxxx#1#{getmacname #1 relaxgetmacargs}
- defgetmacname #1 #2relax{macname={#1}}
- defgetmacargs#1{defargl{#1}}
- % Parse the optional {params} list. Set up paramno and paramlist
- % so defmacro knows what to do. Define macarg.blah for each blah
- % in the params list, to be ##N where N is the position in that list.
- % That gets used by mbodybackslash (above).
- % We need to get `macro parameter char #' into several definitions.
- % The technique used is stolen from LaTeX: let hash be something
- % unexpandable, insert that wherever you need a #, and then redefine
- % it to # just before using the token list produced.
- %
- % The same technique is used to protect eatspaces till just before
- % the macro is used.
- defparsemargdef#1;{paramno=0defparamlist{}%
- lethashrelaxletxeatspacesrelaxparsemargdefxxx#1,;,}
- defparsemargdefxxx#1,{%
- if#1;letnext=relax
- else letnext=parsemargdefxxx
- advanceparamno by 1%
- expandafteredefcsname macarg.eatspaces{#1}endcsname
- {xeatspaces{hashtheparamno}}%
- edefparamlist{paramlisthashtheparamno,}%
- finext}
- % These two commands read recursive and nonrecursive macro bodies.
- % (They're different since rec and nonrec macros end differently.)
- longdefparsemacbody#1@end macro%
- {xdeftemp{eatcr{#1}}endgroupdefmacro}%
- longdefparsermacbody#1@end rmacro%
- {xdeftemp{eatcr{#1}}endgroupdefmacro}%
- % This defines the macro itself. There are six cases: recursive and
- % nonrecursive macros of zero, one, and many arguments.
- % Much magic with expandafter here.
- % xdef is used so that macro definitions will survive the file
- % they're defined in; @include reads the file inside a group.
- defdefmacro{%
- lethash=##% convert placeholders to macro parameter chars
- ifrecursive
- ifcaseparamno
- % 0
- expandafterxdefcsnamethemacnameendcsname{%
- noexpandscanmacro{temp}}%
- or % 1
- expandafterxdefcsnamethemacnameendcsname{%
- bgroupnoexpandmacroargctxt
- noexpandbraceorline
- expandafternoexpandcsnamethemacname xxxendcsname}%
- expandafterxdefcsnamethemacname xxxendcsname##1{%
- egroupnoexpandscanmacro{temp}}%
- else % many
- expandafterxdefcsnamethemacnameendcsname{%
- bgroupnoexpandmacroargctxt
- noexpandcsnamethemacname xxendcsname}%
- expandafterxdefcsnamethemacname xxendcsname##1{%
- expandafternoexpandcsnamethemacname xxxendcsname ##1,}%
- expandafterexpandafter
- expandafterxdef
- expandafterexpandafter
- csnamethemacname xxxendcsname
- paramlist{egroupnoexpandscanmacro{temp}}%
- fi
- else
- ifcaseparamno
- % 0
- expandafterxdefcsnamethemacnameendcsname{%
- noexpandnorecurse{themacname}%
- noexpandscanmacro{temp}egroup}%
- or % 1
- expandafterxdefcsnamethemacnameendcsname{%
- bgroupnoexpandmacroargctxt
- noexpandbraceorline
- expandafternoexpandcsnamethemacname xxxendcsname}%
- expandafterxdefcsnamethemacname xxxendcsname##1{%
- egroup
- noexpandnorecurse{themacname}%
- noexpandscanmacro{temp}egroup}%
- else % many
- expandafterxdefcsnamethemacnameendcsname{%
- bgroupnoexpandmacroargctxt
- expandafternoexpandcsnamethemacname xxendcsname}%
- expandafterxdefcsnamethemacname xxendcsname##1{%
- expandafternoexpandcsnamethemacname xxxendcsname ##1,}%
- expandafterexpandafter
- expandafterxdef
- expandafterexpandafter
- csnamethemacname xxxendcsname
- paramlist{%
- egroup
- noexpandnorecurse{themacname}%
- noexpandscanmacro{temp}egroup}%
- fi
- fi}
- defnorecurse#1{bgroupcslet{#1}{macsave.#1}}
- % braceorline decides whether the next nonwhitespace character is a
- % {. If so it reads up to the closing }, if not, it reads the whole
- % line. Whatever was read is then fed to the next control sequence
- % as an argument (by parsebrace or parsearg)
- defbraceorline#1{letmacnamexxx=#1futureletncharbraceorlinexxx}
- defbraceorlinexxx{%
- ifxncharbgroupelse
- expandafterparsearg
- fi macnamexxx}
- % @alias.
- % We need some trickery to remove the optional spaces around the equal
- % sign. Just make them active and then expand them all to nothing.
- defalias{parseargusingobeyspacesaliasxxx}
- defaliasxxx #1{aliasyyy#1relax}
- defaliasyyy #1=#2relax{%
- {%
- expandafterletobeyedspace=empty
- addtomacrolist{#1}%
- xdefnext{globalletmakecsname{#1}=makecsname{#2}}%
- }%
- next
- }
- message{cross references,}
- newwriteauxfile
- newififhavexrefs % True if xref values are known.
- newififwarnedxrefs % True if we warned once that they aren't known.
- % @inforef is relatively simple.
- definforef #1{inforefzzz #1,,,,**}
- definforefzzz #1,#2,#3,#4**{putwordSee{} putwordInfo{} putwordfile{} file{ignorespaces #3{}},
- node samp{ignorespaces#1{}}}
- % @node's only job in TeX is to define lastnode, which is used in
- % cross-references. The @node line might or might not have commas, and
- % might or might not have spaces before the first comma, like:
- % @node foo , bar , ...
- % We don't want such trailing spaces in the node name.
- %
- parseargdefnode{checkenv{}donode #1 ,finishnodeparse}
- %
- % also remove a trailing comma, in case of something like this:
- % @node Help-Cross, , , Cross-refs
- defdonode#1 ,#2finishnodeparse{dodonode #1,finishnodeparse}
- defdodonode#1,#2finishnodeparse{gdeflastnode{#1}}
- letnwnode=node
- letlastnode=empty
- % Write a cross-reference definition for the current node. #1 is the
- % type (Ynumbered, Yappendix, Ynothing).
- %
- defdonoderef#1{%
- ifxlastnodeemptyelse
- setref{lastnode}{#1}%
- globalletlastnode=empty
- fi
- }
- % @anchor{NAME} -- define xref target at arbitrary point.
- %
- newcountsavesfregister
- %
- defsavesf{relax ifhmode savesfregister=spacefactor fi}
- defrestoresf{relax ifhmode spacefactor=savesfregister fi}
- defanchor#1{savesf setref{#1}{Ynothing}restoresf ignorespaces}
- % setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
- % anchor), which consists of three parts:
- % 1) NAME-title - the current sectioning name taken from lastsection,
- % or the anchor name.
- % 2) NAME-snt - section number and type, passed as the SNT arg, or
- % empty for anchors.
- % 3) NAME-pg - the page number.
- %
- % This is called from donoderef, anchor, and dofloat. In the case of
- % floats, there is an additional part, which is not written here:
- % 4) NAME-lof - the text as it should appear in a @listoffloats.
- %
- defsetref#1#2{%
- pdfmkdest{#1}%
- iflinks
- {%
- atdummies % preserve commands, but don't expand them
- edefwritexrdef##1##2{%
- writeauxfile{@xrdef{#1-% #1 of setref, expanded by the edef
- ##1}{##2}}% these are parameters of writexrdef
- }%
- toks0 = expandafter{lastsection}%
- immediate writexrdef{title}{thetoks0 }%
- immediate writexrdef{snt}{csname #2endcsname}% Ynumbered etc.
- safewhatsit{writexrdef{pg}{folio}}% will be written later, during shipout
- }%
- fi
- }
- % @xref, @pxref, and @ref generate cross-references. For xrefX, #1 is
- % the node name, #2 the name of the Info cross-reference, #3 the printed
- % node name, #4 the name of the Info file, #5 the name of the printed
- % manual. All but the node name can be omitted.
- %
- defpxref#1{putwordsee{} xrefX[#1,,,,,,,]}
- defxref#1{putwordSee{} xrefX[#1,,,,,,,]}
- defref#1{xrefX[#1,,,,,,,]}
- defxrefX[#1,#2,#3,#4,#5,#6]{begingroup
- unsepspaces
- defprintedmanual{ignorespaces #5}%
- defprintedrefname{ignorespaces #3}%
- setbox1=hbox{printedmanualunskip}%
- setbox0=hbox{printedrefnameunskip}%
- ifdim wd0 = 0pt
- % No printed node name was explicitly given.
- expandafterifxcsname SETxref-automatic-section-titleendcsnamerelax
- % Use the node name inside the square brackets.
- defprintedrefname{ignorespaces #1}%
- else
- % Use the actual chapter/section title appear inside
- % the square brackets. Use the real section title if we have it.
- ifdim wd1 > 0pt
- % It is in another manual, so we don't have it.
- defprintedrefname{ignorespaces #1}%
- else
- ifhavexrefs
- % We know the real title if we have the xref values.
- defprintedrefname{refx{#1-title}{}}%
- else
- % Otherwise just copy the Info node name.
- defprintedrefname{ignorespaces #1}%
- fi%
- fi
- fi
- fi
- %
- % Make link in pdf output.
- ifpdf
- {indexnofonts
- turnoffactive
- % This expands tokens, so do it after making catcode changes, so _
- % etc. don't get their TeX definitions.
- getfilename{#4}%
- %
- % See comments at activebackslashdouble.
- {activebackslashdouble xdefpdfxrefdest{#1}%
- backslashparenspdfxrefdest}%
- %
- leavevmode
- startlink attr{/Border [0 0 0]}%
- ifnumfilenamelength>0
- goto file{thefilename.pdf} name{pdfxrefdest}%
- else
- goto name{pdfmkpgn{pdfxrefdest}}%
- fi
- }%
- setcolor{linkcolor}%
- fi
- %
- % Float references are printed completely differently: "Figure 1.2"
- % instead of "[somenode], p.3". We distinguish them by the
- % LABEL-title being set to a magic string.
- {%
- % Have to otherify everything special to allow the csname to
- % include an _ in the xref name, etc.
- indexnofonts
- turnoffactive
- expandafterglobalexpandafterletexpandafterXthisreftitle
- csname XR#1-titleendcsname
- }%
- iffloatXthisreftitle
- % If the user specified the print name (third arg) to the ref,
- % print it instead of our usual "Figure 1.2".
- ifdimwd0 = 0pt
- refx{#1-snt}{}%
- else
- printedrefname
- fi
- %
- % if the user also gave the printed manual name (fifth arg), append
- % "in MANUALNAME".
- ifdim wd1 > 0pt
- space putwordin{} cite{printedmanual}%
- fi
- else
- % node/anchor (non-float) references.
- %
- % If we use unhbox0 and unhbox1 to print the node names, TeX does not
- % insert empty discretionaries after hyphens, which means that it will
- % not find a line break at a hyphen in a node names. Since some manuals
- % are best written with fairly long node names, containing hyphens, this
- % is a loss. Therefore, we give the text of the node name again, so it
- % is as if TeX is seeing it for the first time.
- ifdim wd1 > 0pt
- putwordSection{} ``printedrefname'' putwordin{} cite{printedmanual}%
- else
- % _ (for example) has to be the character _ for the purposes of the
- % control sequence corresponding to the node, but it has to expand
- % into the usual leavevmode...vrule stuff for purposes of
- % printing. So we turnoffactive for the refx-snt, back on for the
- % printing, back off for the refx-pg.
- {turnoffactive
- % Only output a following space if the -snt ref is nonempty; for
- % @unnumbered and @anchor, it won't be.
- setbox2 = hbox{ignorespaces refx{#1-snt}{}}%
- ifdim wd2 > 0pt refx{#1-snt}spacefi
- }%
- % output the `[mynode]' via a macro so it can be overridden.
- xrefprintnodenameprintedrefname
- %
- % But we always want a comma and a space:
- ,space
- %
- % output the `page 3'.
- turnoffactive putwordpagetierefx{#1-pg}{}%
- fi
- fi
- endlink
- endgroup}
- % This macro is called from xrefX for the `[nodename]' part of xref
- % output. It's a separate macro only so it can be changed more easily,
- % since square brackets don't work well in some documents. Particularly
- % one that Bob is working on :).
- %
- defxrefprintnodename#1{[#1]}
- % Things referred to by setref.
- %
- defYnothing{}
- defYomitfromtoc{}
- defYnumbered{%
- ifnumsecno=0
- putwordChapter@tie thechapno
- else ifnumsubsecno=0
- putwordSection@tie thechapno.thesecno
- else ifnumsubsubsecno=0
- putwordSection@tie thechapno.thesecno.thesubsecno
- else
- putwordSection@tie thechapno.thesecno.thesubsecno.thesubsubsecno
- fififi
- }
- defYappendix{%
- ifnumsecno=0
- putwordAppendix@tie @chartheappendixno{}%
- else ifnumsubsecno=0
- putwordSection@tie @chartheappendixno.thesecno
- else ifnumsubsubsecno=0
- putwordSection@tie @chartheappendixno.thesecno.thesubsecno
- else
- putwordSection@tie
- @chartheappendixno.thesecno.thesubsecno.thesubsubsecno
- fififi
- }
- % Define refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
- % If its value is nonempty, SUFFIX is output afterward.
- %
- defrefx#1#2{%
- {%
- indexnofonts
- otherbackslash
- expandafterglobalexpandafterletexpandafterthisrefX
- csname XR#1endcsname
- }%
- ifxthisrefXrelax
- % If not defined, say something at least.
- angleleft un-de-finedangleright
- iflinks
- ifhavexrefs
- message{linenumber Undefined cross reference `#1'.}%
- else
- ifwarnedxrefselse
- globalwarnedxrefstrue
- message{Cross reference values unknown; you must run TeX again.}%
- fi
- fi
- fi
- else
- % It's defined, so just use it.
- thisrefX
- fi
- #2% Output the suffix in any case.
- }
- % This is the macro invoked by entries in the aux file. Usually it's
- % just a def (we prepend XR to the control sequence name to avoid
- % collisions). But if this is a float type, we have more work to do.
- %
- defxrdef#1#2{%
- {% The node name might contain 8-bit characters, which in our current
- % implementation are changed to commands like @'e. Don't let these
- % mess up the control sequence name.
- indexnofonts
- turnoffactive
- xdefsafexrefname{#1}%
- }%
- %
- expandaftergdefcsname XRsafexrefnameendcsname{#2}% remember this xref
- %
- % Was that xref control sequence that we just defined for a float?
- expandafteriffloatcsname XRsafexrefnameendcsname
- % it was a float, and we have the (safe) float type in iffloattype.
- expandafterletexpandafterfloatlist
- csname floatlistiffloattypeendcsname
- %
- % Is this the first time we've seen this float type?
- expandafterifxfloatlistrelax
- toks0 = {do}% yes, so just do
- else
- % had it before, so preserve previous elements in list.
- toks0 = expandafter{floatlistdo}%
- fi
- %
- % Remember this xref in the control sequence floatlistFLOATTYPE,
- % for later use in listoffloats.
- expandafterxdefcsname floatlistiffloattypeendcsname{thetoks0
- {safexrefname}}%
- fi
- }
- % Read the last existing aux file, if any. No error if none exists.
- %
- deftryauxfile{%
- openin 1 jobname.aux
- ifeof 1 else
- readdatafile{aux}%
- globalhavexrefstrue
- fi
- closein 1
- }
- defsetupdatafile{%
- catcode`^^@=other
- catcode`^^A=other
- catcode`^^B=other
- catcode`^^C=other
- catcode`^^D=other
- catcode`^^E=other
- catcode`^^F=other
- catcode`^^G=other
- catcode`^^H=other
- catcode`^^K=other
- catcode`^^L=other
- catcode`^^N=other
- catcode`^^P=other
- catcode`^^Q=other
- catcode`^^R=other
- catcode`^^S=other
- catcode`^^T=other
- catcode`^^U=other
- catcode`^^V=other
- catcode`^^W=other
- catcode`^^X=other
- catcode`^^Z=other
- catcode`^^[=other
- catcode`^^=other
- catcode`^^]=other
- catcode`^^^=other
- catcode`^^_=other
- % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc.
- % in xref tags, i.e., node names. But since ^^e4 notation isn't
- % supported in the main text, it doesn't seem desirable. Furthermore,
- % that is not enough: for node names that actually contain a ^
- % character, we would end up writing a line like this: 'xrdef {'hat
- % b-title}{'hat b} and xrdef does a csname...endcsname on the first
- % argument, and hat is not an expandable control sequence. It could
- % all be worked out, but why? Either we support ^^ or we don't.
- %
- % The other change necessary for this was to define auxhat:
- % defauxhat{def^{'hat }}% extra space so ok if followed by letter
- % and then to call auxhat in setq.
- %
- catcode`^=other
- %
- % Special characters. Should be turned off anyway, but...
- catcode`~=other
- catcode`[=other
- catcode`]=other
- catcode`"=other
- catcode`_=other
- catcode`|=other
- catcode`<=other
- catcode`>=other
- catcode`$=other
- catcode`#=other
- catcode`&=other
- catcode`%=other
- catcode`+=other % avoid + for paranoia even though we've turned it off
- %
- % This is to support in node names and titles, since the
- % characters end up in a csname. It's easier than
- % leaving it active and making its active definition an actual
- % character. What I don't understand is why it works in the *value*
- % of the xrdef. Seems like it should be a catcode12 , and that
- % should not typeset properly. But it works, so I'm moving on for
- % now. --karl, 15jan04.
- catcode`\=other
- %
- % Make the characters 128-255 be printing characters.
- {%
- count1=128
- defloop{%
- catcodecount1=other
- advancecount1 by 1
- ifnum count1<256 loop fi
- }%
- }%
- %
- % @ is our escape character in .aux files, and we need braces.
- catcode`{=1
- catcode`}=2
- catcode`@=0
- }
- defreaddatafile#1{%
- begingroup
- setupdatafile
- inputjobname.#1
- endgroup}
- message{insertions,}
- % including footnotes.
- newcount footnoteno
- % The trailing space in the following definition for supereject is
- % vital for proper filling; pages come out unaligned when you do a
- % pagealignmacro call if that space before the closing brace is
- % removed. (Generally, numeric constants should always be followed by a
- % space to prevent strange expansion errors.)
- defsupereject{parpenalty -20000footnoteno =0 }
- % @footnotestyle is meaningful for info output only.
- letfootnotestyle=comment
- {catcode `@=11
- %
- % Auto-number footnotes. Otherwise like plain.
- gdeffootnote{%
- letindent=ptexindent
- letnoindent=ptexnoindent
- globaladvancefootnoteno by @ne
- edefthisfootno{$^{thefootnoteno}$}%
- %
- % In case the footnote comes at the end of a sentence, preserve the
- % extra spacing after we do the footnote number.
- let@sfempty
- ifhmodeedef@sf{spacefactorthespacefactor}ptexslashfi
- %
- % Remove inadvertent blank space before typesetting the footnote number.
- unskip
- thisfootno@sf
- dofootnote
- }%
- % Don't bother with the trickery in plain.tex to not require the
- % footnote text as a parameter. Our footnotes don't need to be so general.
- %
- % Oh yes, they do; otherwise, @ifset (and anything else that uses
- % parseargline) fails inside footnotes because the tokens are fixed when
- % the footnote is read. --karl, 16nov96.
- %
- gdefdofootnote{%
- insertfootinsbgroup
- % We want to typeset this text as a normal paragraph, even if the
- % footnote reference occurs in (for example) a display environment.
- % So reset some parameters.
- hsize=pagewidth
- interlinepenaltyinterfootnotelinepenalty
- splittopskiphtstrutbox % top baseline for broken footnotes
- splitmaxdepthdpstrutbox
- floatingpenalty@MM
- leftskipz@skip
- rightskipz@skip
- spaceskipz@skip
- xspaceskipz@skip
- parindentdefaultparindent
- %
- smallfonts rm
- %
- % Because we use hanging indentation in footnotes, a @noindent appears
- % to exdent this text, so make it be a no-op. makeinfo does not use
- % hanging indentation so @noindent can still be needed within footnote
- % text after an @example or the like (not that this is good style).
- letnoindent = relax
- %
- % Hang the footnote text off the number. Use everypar in case the
- % footnote extends for more than one paragraph.
- everypar = {hang}%
- textindent{thisfootno}%
- %
- % Don't crash into the line above the footnote text. Since this
- % expands into a box, it must come within the paragraph, lest it
- % provide a place where TeX can split the footnote.
- footstrut
- futureletnextfo@t
- }
- }%end catcode `@=11
- % In case a @footnote appears in a vbox, save the footnote text and create
- % the real insert just after the vbox finished. Otherwise, the insertion
- % would be lost.
- % Similarly, if a @footnote appears inside an alignment, save the footnote
- % text to a box and make the insert when a row of the table is finished.
- % And the same can be done for other insert classes. --kasal, 16nov03.
- % Replace the insert primitive by a cheating macro.
- % Deeper inside, just make sure that the saved insertions are not spilled
- % out prematurely.
- %
- defstartsavinginserts{%
- ifx insertptexinsert
- letinsertsaveinsert
- else
- letcheckinsertsrelax
- fi
- }
- % This insert replacement works for both insertfootins{foo} and
- % insertfootinsbgroup fooegroup, but it doesn't work for insert27{foo}.
- %
- defsaveinsert#1{%
- edefnext{noexpandsavetobox makeSAVEname#1}%
- afterassignmentnext
- % swallow the left brace
- lettemp =
- }
- defmakeSAVEname#1{makecsname{SAVEexpandaftergobblestring#1}}
- defsavetobox#1{globalsetbox#1 = vboxbgroup unvbox#1}
- defchecksaveins#1{ifvoid#1else placesaveins#1fi}
- defplacesaveins#1{%
- ptexinsert csnameexpandaftergobblesavestring#1endcsname
- {box#1}%
- }
- % eat @SAVE -- beware, all of them have catcode other:
- {
- defdospecials{do Sdo Ado Vdo E} uncatcodespecials % ;-)
- gdefgobblesave @SAVE{}
- }
- % initialization:
- defnewsaveins #1{%
- edefnext{noexpandnewsaveinsX makeSAVEname#1}%
- next
- }
- defnewsaveinsX #1{%
- csname newboxendcsname #1%
- expandafterdefexpandaftercheckinsertsexpandafter{checkinserts
- checksaveins #1}%
- }
- % initialize:
- letcheckinsertsempty
- newsaveinsfootins
- newsaveinsmargin
- % @image. We use the macros from epsf.tex to support this.
- % If epsf.tex is not installed and @image is used, we complain.
- %
- % Check for and read epsf.tex up front. If we read it only at @image
- % time, we might be inside a group, and then its definitions would get
- % undone and the next image would fail.
- openin 1 = epsf.tex
- ifeof 1 else
- % Do not bother showing banner with epsf.tex v2.7k (available in
- % doc/epsf.tex and on ctan).
- defepsfannounce{toks0 = }%
- input epsf.tex
- fi
- closein 1
- %
- % We will only complain once about lack of epsf.tex.
- newififwarnednoepsf
- newhelpnoepsfhelp{epsf.tex must be installed for images to
- work. It is also included in the Texinfo distribution, or you can get
- it from ftp://tug.org/tex/epsf.tex.}
- %
- defimage#1{%
- ifxepsfboxundefined
- ifwarnednoepsf else
- errhelp = noepsfhelp
- errmessage{epsf.tex not found, images will be ignored}%
- globalwarnednoepsftrue
- fi
- else
- imagexxx #1,,,,,finish
- fi
- }
- %
- % Arguments to @image:
- % #1 is (mandatory) image filename; we tack on .eps extension.
- % #2 is (optional) width, #3 is (optional) height.
- % #4 is (ignored optional) html alt text.
- % #5 is (ignored optional) extension.
- % #6 is just the usual extra ignored arg for parsing this stuff.
- newififimagevmode
- defimagexxx#1,#2,#3,#4,#5,#6finish{begingroup
- catcode`^^M = 5 % in case we're inside an example
- normalturnoffactive % allow _ et al. in names
- % If the image is by itself, center it.
- ifvmode
- imagevmodetrue
- nobreakmedskip
- % Usually we'll have text after the image which will insert
- % parskip glue, so insert it here too to equalize the space
- % above and below.
- nobreakvskipparskip
- nobreak
- fi
- %
- % Leave vertical mode so that indentation from an enclosing
- % environment such as @quotation is respected. On the other hand, if
- % it's at the top level, we don't want the normal paragraph indentation.
- noindent
- %
- % Output the image.
- ifpdf
- dopdfimage{#1}{#2}{#3}%
- else
- % epsfbox itself resets epsf?size at each figure.
- setbox0 = hbox{ignorespaces #2}ifdimwd0 > 0pt epsfxsize=#2relax fi
- setbox0 = hbox{ignorespaces #3}ifdimwd0 > 0pt epsfysize=#3relax fi
- epsfbox{#1.eps}%
- fi
- %
- ifimagevmode medskip fi % space after the standalone image
- endgroup}
- % @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables,
- % etc. We don't actually implement floating yet, we always include the
- % float "here". But it seemed the best name for the future.
- %
- envparseargdeffloat{eatcommaspaceeatcommaspacedofloat#1, , ,finish}
- % There may be a space before second and/or third parameter; delete it.
- defeatcommaspace#1, {#1,}
- % #1 is the optional FLOATTYPE, the text label for this float, typically
- % "Figure", "Table", "Example", etc. Can't contain commas. If omitted,
- % this float will not be numbered and cannot be referred to.
- %
- % #2 is the optional xref label. Also must be present for the float to
- % be referable.
- %
- % #3 is the optional positioning argument; for now, it is ignored. It
- % will somehow specify the positions allowed to float to (here, top, bottom).
- %
- % We keep a separate counter for each FLOATTYPE, which we reset at each
- % chapter-level command.
- letresetallfloatnos=empty
- %
- defdofloat#1,#2,#3,#4finish{%
- letthiscaption=empty
- letthisshortcaption=empty
- %
- % don't lose footnotes inside @float.
- %
- % BEWARE: when the floats start float, we have to issue warning whenever an
- % insert appears inside a float which could possibly float. --kasal, 26may04
- %
- startsavinginserts
- %
- % We can't be used inside a paragraph.
- par
- %
- vtopbgroup
- deffloattype{#1}%
- deffloatlabel{#2}%
- deffloatloc{#3}% we do nothing with this yet.
- %
- ifxfloattypeempty
- letsafefloattype=empty
- else
- {%
- % the floattype might have accents or other special characters,
- % but we need to use it in a control sequence name.
- indexnofonts
- turnoffactive
- xdefsafefloattype{floattype}%
- }%
- fi
- %
- % If label is given but no type, we handle that as the empty type.
- ifxfloatlabelempty else
- % We want each FLOATTYPE to be numbered separately (Figure 1,
- % Table 1, Figure 2, ...). (And if no label, no number.)
- %
- expandaftergetfloatnocsnamesafefloattype floatnoendcsname
- globaladvancefloatno by 1
- %
- {%
- % This magic value for lastsection is output by setref as the
- % XREFLABEL-title value. xrefX uses it to distinguish float
- % labels (which have a completely different output format) from
- % node and anchor labels. And xrdef uses it to construct the
- % lists of floats.
- %
- edeflastsection{floatmagic=safefloattype}%
- setref{floatlabel}{Yfloat}%
- }%
- fi
- %
- % start with parskip glue, I guess.
- vskipparskip
- %
- % Don't suppress indentation if a float happens to start a section.
- restorefirstparagraphindent
- }
- % we have these possibilities:
- % @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap
- % @float Foo,lbl & no caption: Foo 1.1
- % @float Foo & @caption{Cap}: Foo: Cap
- % @float Foo & no caption: Foo
- % @float ,lbl & Caption{Cap}: 1.1: Cap
- % @float ,lbl & no caption: 1.1
- % @float & @caption{Cap}: Cap
- % @float & no caption:
- %
- defEfloat{%
- letfloatident = empty
- %
- % In all cases, if we have a float type, it comes first.
- ifxfloattypeempty else deffloatident{floattype}fi
- %
- % If we have an xref label, the number comes next.
- ifxfloatlabelempty else
- ifxfloattypeempty else % if also had float type, need tie first.
- appendtomacrofloatident{tie}%
- fi
- % the number.
- appendtomacrofloatident{chaplevelprefixthefloatno}%
- fi
- %
- % Start the printed caption with what we've constructed in
- % floatident, but keep it separate; we need floatident again.
- letcaptionline = floatident
- %
- ifxthiscaptionempty else
- ifxfloatidentempty else
- appendtomacrocaptionline{: }% had ident, so need a colon between
- fi
- %
- % caption text.
- appendtomacrocaptionline{scanexpthiscaption}%
- fi
- %
- % If we have anything to print, print it, with space before.
- % Eventually this needs to become an insert.
- ifxcaptionlineempty else
- vskip.5parskip
- captionline
- %
- % Space below caption.
- vskipparskip
- fi
- %
- % If have an xref label, write the list of floats info. Do this
- % after the caption, to avoid chance of it being a breakpoint.
- ifxfloatlabelempty else
- % Write the text that goes in the lof to the aux file as
- % floatlabel-lof. Besides floatident, we include the short
- % caption if specified, else the full caption if specified, else nothing.
- {%
- atdummies
- %
- % since we read the caption text in the macro world, where ^^M
- % is turned into a normal character, we have to scan it back, so
- % we don't write the literal three characters "^^M" into the aux file.
- scanexp{%
- xdefnoexpandgtemp{%
- ifxthisshortcaptionempty
- thiscaption
- else
- thisshortcaption
- fi
- }%
- }%
- immediatewriteauxfile{@xrdef{floatlabel-lof}{floatident
- ifxgtempempty else : gtemp fi}}%
- }%
- fi
- egroup % end of vtop
- %
- % place the captured inserts
- %
- % BEWARE: when the floats start floating, we have to issue warning
- % whenever an insert appears inside a float which could possibly
- % float. --kasal, 26may04
- %
- checkinserts
- }
- % Append the tokens #2 to the definition of macro #1, not expanding either.
- %
- defappendtomacro#1#2{%
- expandafterdefexpandafter#1expandafter{#1#2}%
- }
- % @caption, @shortcaption
- %
- defcaption{docaptionthiscaption}
- defshortcaption{docaptionthisshortcaption}
- defdocaption{checkenvfloat bgroupscanargctxtdefcaption}
- defdefcaption#1#2{egroup def#1{#2}}
- % The parameter is the control sequence identifying the counter we are
- % going to use. Create it if it doesn't exist and assign it to floatno.
- defgetfloatno#1{%
- ifx#1relax
- % Haven't seen this figure type before.
- csname newcountendcsname #1%
- %
- % Remember to reset this floatno at the next chap.
- expandaftergdefexpandafterresetallfloatnos
- expandafter{resetallfloatnos #1=0 }%
- fi
- letfloatno#1%
- }
- % setref calls this to get the XREFLABEL-snt value. We want an @xref
- % to the FLOATLABEL to expand to "Figure 3.1". We call setref when we
- % first read the @float command.
- %
- defYfloat{floattype@tie chaplevelprefixthefloatno}%
- % Magic string used for the XREFLABEL-title value, so xrefX can
- % distinguish floats from other xref types.
- deffloatmagic{!!float!!}
- % #1 is the control sequence we are passed; we expand into a conditional
- % which is true if #1 represents a float ref. That is, the magic
- % lastsection value which we setref above.
- %
- defiffloat#1{expandafterdoiffloat#1==finish}
- %
- % #1 is (maybe) the floatmagic string. If so, #2 will be the
- % (safe) float type for this float. We set iffloattype to #2.
- %
- defdoiffloat#1=#2=#3finish{%
- deftemp{#1}%
- defiffloattype{#2}%
- ifxtempfloatmagic
- }
- % @listoffloats FLOATTYPE - print a list of floats like a table of contents.
- %
- parseargdeflistoffloats{%
- deffloattype{#1}% floattype
- {%
- % the floattype might have accents or other special characters,
- % but we need to use it in a control sequence name.
- indexnofonts
- turnoffactive
- xdefsafefloattype{floattype}%
- }%
- %
- % xrdef saves the floats as a do-list in floatlistSAFEFLOATTYPE.
- expandafterifxcsname floatlistsafefloattypeendcsname relax
- ifhavexrefs
- % if the user said @listoffloats foo but never @float foo.
- message{linenumber No `safefloattype' floats to list.}%
- fi
- else
- begingroup
- leftskip=tocindent % indent these entries like a toc
- letdo=listoffloatsdo
- csname floatlistsafefloattypeendcsname
- endgroup
- fi
- }
- % This is called on each entry in a list of floats. We're passed the
- % xref label, in the form LABEL-title, which is how we save it in the
- % aux file. We strip off the -title and look up XRLABEL-lof, which
- % has the text we're supposed to typeset here.
- %
- % Figures without xref labels will not be included in the list (since
- % they won't appear in the aux file).
- %
- deflistoffloatsdo#1{listoffloatsdoentry#1finish}
- deflistoffloatsdoentry#1-titlefinish{{%
- % Can't fully expand XR#1-lof because it can contain anything. Just
- % pass the control sequence. On the other hand, XR#1-pg is just the
- % page number, and we want to fully expand that so we can get a link
- % in pdf output.
- toksA = expandafter{csname XR#1-lofendcsname}%
- %
- % use the same entry macro we use to generate the TOC and index.
- edefwriteentry{noexpandentry{thetoksA}{csname XR#1-pgendcsname}}%
- writeentry
- }}
- message{localization,}
- % @documentlanguage is usually given very early, just after
- % @setfilename. If done too late, it may not override everything
- % properly. Single argument is the language (de) or locale (de_DE)
- % abbreviation. It would be nice if we could set up a hyphenation file.
- %
- {
- catcode`_ = active
- globaldefs=1
- parseargdefdocumentlanguage{begingroup
- let_=normalunderscore % normal _ character for filenames
- tex % read txi-??.tex file in plain TeX.
- % Read the file by the name they passed if it exists.
- openin 1 txi-#1.tex
- ifeof 1
- documentlanguagetrywithoutunderscore{#1_finish}%
- else
- input txi-#1.tex
- fi
- closein 1
- endgroup
- endgroup}
- }
- %
- % If they passed de_DE, and txi-de_DE.tex doesn't exist,
- % try txi-de.tex.
- %
- defdocumentlanguagetrywithoutunderscore#1_#2finish{%
- openin 1 txi-#1.tex
- ifeof 1
- errhelp = nolanghelp
- errmessage{Cannot read language file txi-#1.tex}%
- else
- input txi-#1.tex
- fi
- closein 1
- }
- %
- newhelpnolanghelp{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.}
- % Set the catcode of characters 128 through 255 to the specified number.
- %
- defsetnonasciicharscatcode#1{%
- count255=128
- loopifnumcount255<256
- globalcatcodecount255=#1relax
- advancecount255 by 1
- repeat
- }
- defsetnonasciicharscatcodenonglobal#1{%
- count255=128
- loopifnumcount255<256
- catcodecount255=#1relax
- advancecount255 by 1
- repeat
- }
- % @documentencoding sets the definition of non-ASCII characters
- % according to the specified encoding.
- %
- parseargdefdocumentencoding{%
- % Encoding being declared for the document.
- defdeclaredencoding{csname #1.encendcsname}%
- %
- % Supported encodings: names converted to tokens in order to be able
- % to compare them with ifx.
- defascii{csname US-ASCII.encendcsname}%
- deflatnine{csname ISO-8859-15.encendcsname}%
- deflatone{csname ISO-8859-1.encendcsname}%
- deflattwo{csname ISO-8859-2.encendcsname}%
- defutfeight{csname UTF-8.encendcsname}%
- %
- ifx declaredencoding ascii
- asciichardefs
- %
- else ifx declaredencoding lattwo
- setnonasciicharscatcodeactive
- lattwochardefs
- %
- else ifx declaredencoding latone
- setnonasciicharscatcodeactive
- latonechardefs
- %
- else ifx declaredencoding latnine
- setnonasciicharscatcodeactive
- latninechardefs
- %
- else ifx declaredencoding utfeight
- setnonasciicharscatcodeactive
- utfeightchardefs
- %
- else
- message{Unknown document encoding #1, ignoring.}%
- %
- fi % utfeight
- fi % latnine
- fi % latone
- fi % lattwo
- fi % ascii
- }
- % A message to be logged when using a character that isn't available
- % the default font encoding (OT1).
- %
- defmissingcharmsg#1{message{Character missing in OT1 encoding: #1.}}
- % Take account of c (plain) vs. , (Texinfo) difference.
- defcedilla#1{ifxcptexcc{#1}else,{#1}fi}
- % First, make active non-ASCII characters in order for them to be
- % correctly categorized when TeX reads the replacement text of
- % macros containing the character definitions.
- setnonasciicharscatcodeactive
- %
- % Latin1 (ISO-8859-1) character definitions.
- deflatonechardefs{%
- gdef^^a0{~}
- gdef^^a1{exclamdown}
- gdef^^a2{missingcharmsg{CENT SIGN}}
- gdef^^a3{{pounds}}
- gdef^^a4{missingcharmsg{CURRENCY SIGN}}
- gdef^^a5{missingcharmsg{YEN SIGN}}
- gdef^^a6{missingcharmsg{BROKEN BAR}}
- gdef^^a7{S}
- gdef^^a8{"{}}
- gdef^^a9{copyright}
- gdef^^aa{ordf}
- gdef^^ab{missingcharmsg{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}}
- gdef^^ac{$lnot$}
- gdef^^ad{-}
- gdef^^ae{registeredsymbol}
- gdef^^af{={}}
- %
- gdef^^b0{textdegree}
- gdef^^b1{$pm$}
- gdef^^b2{$^2$}
- gdef^^b3{$^3$}
- gdef^^b4{'{}}
- gdef^^b5{$mu$}
- gdef^^b6{P}
- %
- gdef^^b7{$^.$}
- gdef^^b8{cedilla }
- gdef^^b9{$^1$}
- gdef^^ba{ordm}
- %
- gdef^^bb{missingcharmsg{RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK}}
- gdef^^bc{$1over4$}
- gdef^^bd{$1over2$}
- gdef^^be{$3over4$}
- gdef^^bf{questiondown}
- %
- gdef^^c0{`A}
- gdef^^c1{'A}
- gdef^^c2{^A}
- gdef^^c3{~A}
- gdef^^c4{"A}
- gdef^^c5{ringaccent A}
- gdef^^c6{AE}
- gdef^^c7{cedilla C}
- gdef^^c8{`E}
- gdef^^c9{'E}
- gdef^^ca{^E}
- gdef^^cb{"E}
- gdef^^cc{`I}
- gdef^^cd{'I}
- gdef^^ce{^I}
- gdef^^cf{"I}
- %
- gdef^^d0{missingcharmsg{LATIN CAPITAL LETTER ETH}}
- gdef^^d1{~N}
- gdef^^d2{`O}
- gdef^^d3{'O}
- gdef^^d4{^O}
- gdef^^d5{~O}
- gdef^^d6{"O}
- gdef^^d7{$times$}
- gdef^^d8{O}
- gdef^^d9{`U}
- gdef^^da{'U}
- gdef^^db{^U}
- gdef^^dc{"U}
- gdef^^dd{'Y}
- gdef^^de{missingcharmsg{LATIN CAPITAL LETTER THORN}}
- gdef^^df{ss}
- %
- gdef^^e0{`a}
- gdef^^e1{'a}
- gdef^^e2{^a}
- gdef^^e3{~a}
- gdef^^e4{"a}
- gdef^^e5{ringaccent a}
- gdef^^e6{ae}
- gdef^^e7{cedilla c}
- gdef^^e8{`e}
- gdef^^e9{'e}
- gdef^^ea{^e}
- gdef^^eb{"e}
- gdef^^ec{`{dotless i}}
- gdef^^ed{'{dotless i}}
- gdef^^ee{^{dotless i}}
- gdef^^ef{"{dotless i}}
- %
- gdef^^f0{missingcharmsg{LATIN SMALL LETTER ETH}}
- gdef^^f1{~n}
- gdef^^f2{`o}
- gdef^^f3{'o}
- gdef^^f4{^o}
- gdef^^f5{~o}
- gdef^^f6{"o}
- gdef^^f7{$div$}
- gdef^^f8{o}
- gdef^^f9{`u}
- gdef^^fa{'u}
- gdef^^fb{^u}
- gdef^^fc{"u}
- gdef^^fd{'y}
- gdef^^fe{missingcharmsg{LATIN SMALL LETTER THORN}}
- gdef^^ff{"y}
- }
- % Latin9 (ISO-8859-15) encoding character definitions.
- deflatninechardefs{%
- % Encoding is almost identical to Latin1.
- latonechardefs
- %
- gdef^^a4{euro}
- gdef^^a6{v S}
- gdef^^a8{v s}
- gdef^^b4{v Z}
- gdef^^b8{v z}
- gdef^^bc{OE}
- gdef^^bd{oe}
- gdef^^be{"Y}
- }
- % Latin2 (ISO-8859-2) character definitions.
- deflattwochardefs{%
- gdef^^a0{~}
- gdef^^a1{missingcharmsg{LATIN CAPITAL LETTER A WITH OGONEK}}
- gdef^^a2{u{}}
- gdef^^a3{L}
- gdef^^a4{missingcharmsg{CURRENCY SIGN}}
- gdef^^a5{v L}
- gdef^^a6{'S}
- gdef^^a7{S}
- gdef^^a8{"{}}
- gdef^^a9{v S}
- gdef^^aa{cedilla S}
- gdef^^ab{v T}
- gdef^^ac{'Z}
- gdef^^ad{-}
- gdef^^ae{v Z}
- gdef^^af{dotaccent Z}
- %
- gdef^^b0{textdegree}
- gdef^^b1{missingcharmsg{LATIN SMALL LETTER A WITH OGONEK}}
- gdef^^b2{missingcharmsg{OGONEK}}
- gdef^^b3{l}
- gdef^^b4{'{}}
- gdef^^b5{v l}
- gdef^^b6{'s}
- gdef^^b7{v{}}
- gdef^^b8{cedilla }
- gdef^^b9{v s}
- gdef^^ba{cedilla s}
- gdef^^bb{v t}
- gdef^^bc{'z}
- gdef^^bd{H{}}
- gdef^^be{v z}
- gdef^^bf{dotaccent z}
- %
- gdef^^c0{'R}
- gdef^^c1{'A}
- gdef^^c2{^A}
- gdef^^c3{u A}
- gdef^^c4{"A}
- gdef^^c5{'L}
- gdef^^c6{'C}
- gdef^^c7{cedilla C}
- gdef^^c8{v C}
- gdef^^c9{'E}
- gdef^^ca{missingcharmsg{LATIN CAPITAL LETTER E WITH OGONEK}}
- gdef^^cb{"E}
- gdef^^cc{v E}
- gdef^^cd{'I}
- gdef^^ce{^I}
- gdef^^cf{v D}
- %
- gdef^^d0{missingcharmsg{LATIN CAPITAL LETTER D WITH STROKE}}
- gdef^^d1{'N}
- gdef^^d2{v N}
- gdef^^d3{'O}
- gdef^^d4{^O}
- gdef^^d5{H O}
- gdef^^d6{"O}
- gdef^^d7{$times$}
- gdef^^d8{v R}
- gdef^^d9{ringaccent U}
- gdef^^da{'U}
- gdef^^db{H U}
- gdef^^dc{"U}
- gdef^^dd{'Y}
- gdef^^de{cedilla T}
- gdef^^df{ss}
- %
- gdef^^e0{'r}
- gdef^^e1{'a}
- gdef^^e2{^a}
- gdef^^e3{u a}
- gdef^^e4{"a}
- gdef^^e5{'l}
- gdef^^e6{'c}
- gdef^^e7{cedilla c}
- gdef^^e8{v c}
- gdef^^e9{'e}
- gdef^^ea{missingcharmsg{LATIN SMALL LETTER E WITH OGONEK}}
- gdef^^eb{"e}
- gdef^^ec{v e}
- gdef^^ed{'i}
- gdef^^ee{^i}
- gdef^^ef{v d}
- %
- gdef^^f0{missingcharmsg{LATIN SMALL LETTER D WITH STROKE}}
- gdef^^f1{'n}
- gdef^^f2{v n}
- gdef^^f3{'o}
- gdef^^f4{^o}
- gdef^^f5{H o}
- gdef^^f6{"o}
- gdef^^f7{$div$}
- gdef^^f8{v r}
- gdef^^f9{ringaccent u}
- gdef^^fa{'u}
- gdef^^fb{H u}
- gdef^^fc{"u}
- gdef^^fd{'y}
- gdef^^fe{cedilla t}
- gdef^^ff{dotaccent{}}
- }
- % UTF-8 character definitions.
- %
- % This code to support UTF-8 is based on LaTeX's utf8.def, with some
- % changes for Texinfo conventions. It is included here under the GPL by
- % permission from Frank Mittelbach and the LaTeX team.
- %
- newcountcountUTFx
- newcountcountUTFy
- newcountcountUTFz
- gdefUTFviiiTwoOctets#1#2{expandafter
- UTFviiiDefinedcsname u8:#1string #2endcsname}
- %
- gdefUTFviiiThreeOctets#1#2#3{expandafter
- UTFviiiDefinedcsname u8:#1string #2string #3endcsname}
- %
- gdefUTFviiiFourOctets#1#2#3#4{expandafter
- UTFviiiDefinedcsname u8:#1string #2string #3string #4endcsname}
- gdefUTFviiiDefined#1{%
- ifx #1relax
- message{linenumber Unicode char string #1 not defined for Texinfo}%
- else
- expandafter #1%
- fi
- }
- begingroup
- catcode`~13
- catcode`"12
- defUTFviiiLoop{%
- globalcatcodecountUTFxactive
- uccode`~countUTFx
- uppercaseexpandafter{UTFviiiTmp}%
- advancecountUTFx by 1
- ifnumcountUTFx < countUTFy
- expandafterUTFviiiLoop
- fi}
- countUTFx = "C2
- countUTFy = "E0
- defUTFviiiTmp{%
- xdef~{noexpandUTFviiiTwoOctetsstring~}}
- UTFviiiLoop
- countUTFx = "E0
- countUTFy = "F0
- defUTFviiiTmp{%
- xdef~{noexpandUTFviiiThreeOctetsstring~}}
- UTFviiiLoop
- countUTFx = "F0
- countUTFy = "F4
- defUTFviiiTmp{%
- xdef~{noexpandUTFviiiFourOctetsstring~}}
- UTFviiiLoop
- endgroup
- begingroup
- catcode`"=12
- catcode`<=12
- catcode`.=12
- catcode`,=12
- catcode`;=12
- catcode`!=12
- catcode`~=13
- gdefDeclareUnicodeCharacter#1#2{%
- countUTFz = "#1relax
- wlog{spacespace defining Unicode char U+#1 (decimal thecountUTFz)}%
- begingroup
- parseXMLCharref
- defUTFviiiTwoOctets##1##2{%
- csname u8:##1string ##2endcsname}%
- defUTFviiiThreeOctets##1##2##3{%
- csname u8:##1string ##2string ##3endcsname}%
- defUTFviiiFourOctets##1##2##3##4{%
- csname u8:##1string ##2string ##3string ##4endcsname}%
- expandafterexpandafterexpandafterexpandafter
- expandafterexpandafterexpandafter
- gdefUTFviiiTmp{#2}%
- endgroup}
- gdefparseXMLCharref{%
- ifnumcountUTFz < "A0relax
- errhelp = EMsimple
- errmessage{Cannot define Unicode char value < 00A0}%
- elseifnumcountUTFz < "800relax
- parseUTFviiiA,%
- parseUTFviiiB CUTFviiiTwoOctets.,%
- elseifnumcountUTFz < "10000relax
- parseUTFviiiA;%
- parseUTFviiiA,%
- parseUTFviiiB EUTFviiiThreeOctets.{,;}%
- else
- parseUTFviiiA;%
- parseUTFviiiA,%
- parseUTFviiiA!%
- parseUTFviiiB FUTFviiiFourOctets.{!,;}%
- fififi
- }
- gdefparseUTFviiiA#1{%
- countUTFx = countUTFz
- dividecountUTFz by 64
- countUTFy = countUTFz
- multiplycountUTFz by 64
- advancecountUTFx by -countUTFz
- advancecountUTFx by 128
- uccode `#1countUTFx
- countUTFz = countUTFy}
- gdefparseUTFviiiB#1#2#3#4{%
- advancecountUTFz by "#10relax
- uccode `#3countUTFz
- uppercase{gdefUTFviiiTmp{#2#3#4}}}
- endgroup
- defutfeightchardefs{%
- DeclareUnicodeCharacter{00A0}{tie}
- DeclareUnicodeCharacter{00A1}{exclamdown}
- DeclareUnicodeCharacter{00A3}{pounds}
- DeclareUnicodeCharacter{00A8}{"{ }}
- DeclareUnicodeCharacter{00A9}{copyright}
- DeclareUnicodeCharacter{00AA}{ordf}
- DeclareUnicodeCharacter{00AB}{guillemetleft}
- DeclareUnicodeCharacter{00AD}{-}
- DeclareUnicodeCharacter{00AE}{registeredsymbol}
- DeclareUnicodeCharacter{00AF}{={ }}
- DeclareUnicodeCharacter{00B0}{ringaccent{ }}
- DeclareUnicodeCharacter{00B4}{'{ }}
- DeclareUnicodeCharacter{00B8}{cedilla{ }}
- DeclareUnicodeCharacter{00BA}{ordm}
- DeclareUnicodeCharacter{00BB}{guillemetright}
- DeclareUnicodeCharacter{00BF}{questiondown}
- DeclareUnicodeCharacter{00C0}{`A}
- DeclareUnicodeCharacter{00C1}{'A}
- DeclareUnicodeCharacter{00C2}{^A}
- DeclareUnicodeCharacter{00C3}{~A}
- DeclareUnicodeCharacter{00C4}{"A}
- DeclareUnicodeCharacter{00C5}{AA}
- DeclareUnicodeCharacter{00C6}{AE}
- DeclareUnicodeCharacter{00C7}{cedilla{C}}
- DeclareUnicodeCharacter{00C8}{`E}
- DeclareUnicodeCharacter{00C9}{'E}
- DeclareUnicodeCharacter{00CA}{^E}
- DeclareUnicodeCharacter{00CB}{"E}
- DeclareUnicodeCharacter{00CC}{`I}
- DeclareUnicodeCharacter{00CD}{'I}
- DeclareUnicodeCharacter{00CE}{^I}
- DeclareUnicodeCharacter{00CF}{"I}
- DeclareUnicodeCharacter{00D1}{~N}
- DeclareUnicodeCharacter{00D2}{`O}
- DeclareUnicodeCharacter{00D3}{'O}
- DeclareUnicodeCharacter{00D4}{^O}
- DeclareUnicodeCharacter{00D5}{~O}
- DeclareUnicodeCharacter{00D6}{"O}
- DeclareUnicodeCharacter{00D8}{O}
- DeclareUnicodeCharacter{00D9}{`U}
- DeclareUnicodeCharacter{00DA}{'U}
- DeclareUnicodeCharacter{00DB}{^U}
- DeclareUnicodeCharacter{00DC}{"U}
- DeclareUnicodeCharacter{00DD}{'Y}
- DeclareUnicodeCharacter{00DF}{ss}
- DeclareUnicodeCharacter{00E0}{`a}
- DeclareUnicodeCharacter{00E1}{'a}
- DeclareUnicodeCharacter{00E2}{^a}
- DeclareUnicodeCharacter{00E3}{~a}
- DeclareUnicodeCharacter{00E4}{"a}
- DeclareUnicodeCharacter{00E5}{aa}
- DeclareUnicodeCharacter{00E6}{ae}
- DeclareUnicodeCharacter{00E7}{cedilla{c}}
- DeclareUnicodeCharacter{00E8}{`e}
- DeclareUnicodeCharacter{00E9}{'e}
- DeclareUnicodeCharacter{00EA}{^e}
- DeclareUnicodeCharacter{00EB}{"e}
- DeclareUnicodeCharacter{00EC}{`{dotless{i}}}
- DeclareUnicodeCharacter{00ED}{'{dotless{i}}}
- DeclareUnicodeCharacter{00EE}{^{dotless{i}}}
- DeclareUnicodeCharacter{00EF}{"{dotless{i}}}
- DeclareUnicodeCharacter{00F1}{~n}
- DeclareUnicodeCharacter{00F2}{`o}
- DeclareUnicodeCharacter{00F3}{'o}
- DeclareUnicodeCharacter{00F4}{^o}
- DeclareUnicodeCharacter{00F5}{~o}
- DeclareUnicodeCharacter{00F6}{"o}
- DeclareUnicodeCharacter{00F8}{o}
- DeclareUnicodeCharacter{00F9}{`u}
- DeclareUnicodeCharacter{00FA}{'u}
- DeclareUnicodeCharacter{00FB}{^u}
- DeclareUnicodeCharacter{00FC}{"u}
- DeclareUnicodeCharacter{00FD}{'y}
- DeclareUnicodeCharacter{00FF}{"y}
- DeclareUnicodeCharacter{0100}{=A}
- DeclareUnicodeCharacter{0101}{=a}
- DeclareUnicodeCharacter{0102}{u{A}}
- DeclareUnicodeCharacter{0103}{u{a}}
- DeclareUnicodeCharacter{0106}{'C}
- DeclareUnicodeCharacter{0107}{'c}
- DeclareUnicodeCharacter{0108}{^C}
- DeclareUnicodeCharacter{0109}{^c}
- DeclareUnicodeCharacter{010A}{dotaccent{C}}
- DeclareUnicodeCharacter{010B}{dotaccent{c}}
- DeclareUnicodeCharacter{010C}{v{C}}
- DeclareUnicodeCharacter{010D}{v{c}}
- DeclareUnicodeCharacter{010E}{v{D}}
- DeclareUnicodeCharacter{0112}{=E}
- DeclareUnicodeCharacter{0113}{=e}
- DeclareUnicodeCharacter{0114}{u{E}}
- DeclareUnicodeCharacter{0115}{u{e}}
- DeclareUnicodeCharacter{0116}{dotaccent{E}}
- DeclareUnicodeCharacter{0117}{dotaccent{e}}
- DeclareUnicodeCharacter{011A}{v{E}}
- DeclareUnicodeCharacter{011B}{v{e}}
- DeclareUnicodeCharacter{011C}{^G}
- DeclareUnicodeCharacter{011D}{^g}
- DeclareUnicodeCharacter{011E}{u{G}}
- DeclareUnicodeCharacter{011F}{u{g}}
- DeclareUnicodeCharacter{0120}{dotaccent{G}}
- DeclareUnicodeCharacter{0121}{dotaccent{g}}
- DeclareUnicodeCharacter{0124}{^H}
- DeclareUnicodeCharacter{0125}{^h}
- DeclareUnicodeCharacter{0128}{~I}
- DeclareUnicodeCharacter{0129}{~{dotless{i}}}
- DeclareUnicodeCharacter{012A}{=I}
- DeclareUnicodeCharacter{012B}{={dotless{i}}}
- DeclareUnicodeCharacter{012C}{u{I}}
- DeclareUnicodeCharacter{012D}{u{dotless{i}}}
- DeclareUnicodeCharacter{0130}{dotaccent{I}}
- DeclareUnicodeCharacter{0131}{dotless{i}}
- DeclareUnicodeCharacter{0132}{IJ}
- DeclareUnicodeCharacter{0133}{ij}
- DeclareUnicodeCharacter{0134}{^J}
- DeclareUnicodeCharacter{0135}{^{dotless{j}}}
- DeclareUnicodeCharacter{0139}{'L}
- DeclareUnicodeCharacter{013A}{'l}
- DeclareUnicodeCharacter{0141}{L}
- DeclareUnicodeCharacter{0142}{l}
- DeclareUnicodeCharacter{0143}{'N}
- DeclareUnicodeCharacter{0144}{'n}
- DeclareUnicodeCharacter{0147}{v{N}}
- DeclareUnicodeCharacter{0148}{v{n}}
- DeclareUnicodeCharacter{014C}{=O}
- DeclareUnicodeCharacter{014D}{=o}
- DeclareUnicodeCharacter{014E}{u{O}}
- DeclareUnicodeCharacter{014F}{u{o}}
- DeclareUnicodeCharacter{0150}{H{O}}
- DeclareUnicodeCharacter{0151}{H{o}}
- DeclareUnicodeCharacter{0152}{OE}
- DeclareUnicodeCharacter{0153}{oe}
- DeclareUnicodeCharacter{0154}{'R}
- DeclareUnicodeCharacter{0155}{'r}
- DeclareUnicodeCharacter{0158}{v{R}}
- DeclareUnicodeCharacter{0159}{v{r}}
- DeclareUnicodeCharacter{015A}{'S}
- DeclareUnicodeCharacter{015B}{'s}
- DeclareUnicodeCharacter{015C}{^S}
- DeclareUnicodeCharacter{015D}{^s}
- DeclareUnicodeCharacter{015E}{cedilla{S}}
- DeclareUnicodeCharacter{015F}{cedilla{s}}
- DeclareUnicodeCharacter{0160}{v{S}}
- DeclareUnicodeCharacter{0161}{v{s}}
- DeclareUnicodeCharacter{0162}{cedilla{t}}
- DeclareUnicodeCharacter{0163}{cedilla{T}}
- DeclareUnicodeCharacter{0164}{v{T}}
- DeclareUnicodeCharacter{0168}{~U}
- DeclareUnicodeCharacter{0169}{~u}
- DeclareUnicodeCharacter{016A}{=U}
- DeclareUnicodeCharacter{016B}{=u}
- DeclareUnicodeCharacter{016C}{u{U}}
- DeclareUnicodeCharacter{016D}{u{u}}
- DeclareUnicodeCharacter{016E}{ringaccent{U}}
- DeclareUnicodeCharacter{016F}{ringaccent{u}}
- DeclareUnicodeCharacter{0170}{H{U}}
- DeclareUnicodeCharacter{0171}{H{u}}
- DeclareUnicodeCharacter{0174}{^W}
- DeclareUnicodeCharacter{0175}{^w}
- DeclareUnicodeCharacter{0176}{^Y}
- DeclareUnicodeCharacter{0177}{^y}
- DeclareUnicodeCharacter{0178}{"Y}
- DeclareUnicodeCharacter{0179}{'Z}
- DeclareUnicodeCharacter{017A}{'z}
- DeclareUnicodeCharacter{017B}{dotaccent{Z}}
- DeclareUnicodeCharacter{017C}{dotaccent{z}}
- DeclareUnicodeCharacter{017D}{v{Z}}
- DeclareUnicodeCharacter{017E}{v{z}}
- DeclareUnicodeCharacter{01C4}{Dv{Z}}
- DeclareUnicodeCharacter{01C5}{Dv{z}}
- DeclareUnicodeCharacter{01C6}{dv{z}}
- DeclareUnicodeCharacter{01C7}{LJ}
- DeclareUnicodeCharacter{01C8}{Lj}
- DeclareUnicodeCharacter{01C9}{lj}
- DeclareUnicodeCharacter{01CA}{NJ}
- DeclareUnicodeCharacter{01CB}{Nj}
- DeclareUnicodeCharacter{01CC}{nj}
- DeclareUnicodeCharacter{01CD}{v{A}}
- DeclareUnicodeCharacter{01CE}{v{a}}
- DeclareUnicodeCharacter{01CF}{v{I}}
- DeclareUnicodeCharacter{01D0}{v{dotless{i}}}
- DeclareUnicodeCharacter{01D1}{v{O}}
- DeclareUnicodeCharacter{01D2}{v{o}}
- DeclareUnicodeCharacter{01D3}{v{U}}
- DeclareUnicodeCharacter{01D4}{v{u}}
- DeclareUnicodeCharacter{01E2}{={AE}}
- DeclareUnicodeCharacter{01E3}{={ae}}
- DeclareUnicodeCharacter{01E6}{v{G}}
- DeclareUnicodeCharacter{01E7}{v{g}}
- DeclareUnicodeCharacter{01E8}{v{K}}
- DeclareUnicodeCharacter{01E9}{v{k}}
- DeclareUnicodeCharacter{01F0}{v{dotless{j}}}
- DeclareUnicodeCharacter{01F1}{DZ}
- DeclareUnicodeCharacter{01F2}{Dz}
- DeclareUnicodeCharacter{01F3}{dz}
- DeclareUnicodeCharacter{01F4}{'G}
- DeclareUnicodeCharacter{01F5}{'g}
- DeclareUnicodeCharacter{01F8}{`N}
- DeclareUnicodeCharacter{01F9}{`n}
- DeclareUnicodeCharacter{01FC}{'{AE}}
- DeclareUnicodeCharacter{01FD}{'{ae}}
- DeclareUnicodeCharacter{01FE}{'{O}}
- DeclareUnicodeCharacter{01FF}{'{o}}
- DeclareUnicodeCharacter{021E}{v{H}}
- DeclareUnicodeCharacter{021F}{v{h}}
- DeclareUnicodeCharacter{0226}{dotaccent{A}}
- DeclareUnicodeCharacter{0227}{dotaccent{a}}
- DeclareUnicodeCharacter{0228}{cedilla{E}}
- DeclareUnicodeCharacter{0229}{cedilla{e}}
- DeclareUnicodeCharacter{022E}{dotaccent{O}}
- DeclareUnicodeCharacter{022F}{dotaccent{o}}
- DeclareUnicodeCharacter{0232}{=Y}
- DeclareUnicodeCharacter{0233}{=y}
- DeclareUnicodeCharacter{0237}{dotless{j}}
- DeclareUnicodeCharacter{1E02}{dotaccent{B}}
- DeclareUnicodeCharacter{1E03}{dotaccent{b}}
- DeclareUnicodeCharacter{1E04}{udotaccent{B}}
- DeclareUnicodeCharacter{1E05}{udotaccent{b}}
- DeclareUnicodeCharacter{1E06}{ubaraccent{B}}
- DeclareUnicodeCharacter{1E07}{ubaraccent{b}}
- DeclareUnicodeCharacter{1E0A}{dotaccent{D}}
- DeclareUnicodeCharacter{1E0B}{dotaccent{d}}
- DeclareUnicodeCharacter{1E0C}{udotaccent{D}}
- DeclareUnicodeCharacter{1E0D}{udotaccent{d}}
- DeclareUnicodeCharacter{1E0E}{ubaraccent{D}}
- DeclareUnicodeCharacter{1E0F}{ubaraccent{d}}
- DeclareUnicodeCharacter{1E1E}{dotaccent{F}}
- DeclareUnicodeCharacter{1E1F}{dotaccent{f}}
- DeclareUnicodeCharacter{1E20}{=G}
- DeclareUnicodeCharacter{1E21}{=g}
- DeclareUnicodeCharacter{1E22}{dotaccent{H}}
- DeclareUnicodeCharacter{1E23}{dotaccent{h}}
- DeclareUnicodeCharacter{1E24}{udotaccent{H}}
- DeclareUnicodeCharacter{1E25}{udotaccent{h}}
- DeclareUnicodeCharacter{1E26}{"H}
- DeclareUnicodeCharacter{1E27}{"h}
- DeclareUnicodeCharacter{1E30}{'K}
- DeclareUnicodeCharacter{1E31}{'k}
- DeclareUnicodeCharacter{1E32}{udotaccent{K}}
- DeclareUnicodeCharacter{1E33}{udotaccent{k}}
- DeclareUnicodeCharacter{1E34}{ubaraccent{K}}
- DeclareUnicodeCharacter{1E35}{ubaraccent{k}}
- DeclareUnicodeCharacter{1E36}{udotaccent{L}}
- DeclareUnicodeCharacter{1E37}{udotaccent{l}}
- DeclareUnicodeCharacter{1E3A}{ubaraccent{L}}
- DeclareUnicodeCharacter{1E3B}{ubaraccent{l}}
- DeclareUnicodeCharacter{1E3E}{'M}
- DeclareUnicodeCharacter{1E3F}{'m}
- DeclareUnicodeCharacter{1E40}{dotaccent{M}}
- DeclareUnicodeCharacter{1E41}{dotaccent{m}}
- DeclareUnicodeCharacter{1E42}{udotaccent{M}}
- DeclareUnicodeCharacter{1E43}{udotaccent{m}}
- DeclareUnicodeCharacter{1E44}{dotaccent{N}}
- DeclareUnicodeCharacter{1E45}{dotaccent{n}}
- DeclareUnicodeCharacter{1E46}{udotaccent{N}}
- DeclareUnicodeCharacter{1E47}{udotaccent{n}}
- DeclareUnicodeCharacter{1E48}{ubaraccent{N}}
- DeclareUnicodeCharacter{1E49}{ubaraccent{n}}
- DeclareUnicodeCharacter{1E54}{'P}
- DeclareUnicodeCharacter{1E55}{'p}
- DeclareUnicodeCharacter{1E56}{dotaccent{P}}
- DeclareUnicodeCharacter{1E57}{dotaccent{p}}
- DeclareUnicodeCharacter{1E58}{dotaccent{R}}
- DeclareUnicodeCharacter{1E59}{dotaccent{r}}
- DeclareUnicodeCharacter{1E5A}{udotaccent{R}}
- DeclareUnicodeCharacter{1E5B}{udotaccent{r}}
- DeclareUnicodeCharacter{1E5E}{ubaraccent{R}}
- DeclareUnicodeCharacter{1E5F}{ubaraccent{r}}
- DeclareUnicodeCharacter{1E60}{dotaccent{S}}
- DeclareUnicodeCharacter{1E61}{dotaccent{s}}
- DeclareUnicodeCharacter{1E62}{udotaccent{S}}
- DeclareUnicodeCharacter{1E63}{udotaccent{s}}
- DeclareUnicodeCharacter{1E6A}{dotaccent{T}}
- DeclareUnicodeCharacter{1E6B}{dotaccent{t}}
- DeclareUnicodeCharacter{1E6C}{udotaccent{T}}
- DeclareUnicodeCharacter{1E6D}{udotaccent{t}}
- DeclareUnicodeCharacter{1E6E}{ubaraccent{T}}
- DeclareUnicodeCharacter{1E6F}{ubaraccent{t}}
- DeclareUnicodeCharacter{1E7C}{~V}
- DeclareUnicodeCharacter{1E7D}{~v}
- DeclareUnicodeCharacter{1E7E}{udotaccent{V}}
- DeclareUnicodeCharacter{1E7F}{udotaccent{v}}
- DeclareUnicodeCharacter{1E80}{`W}
- DeclareUnicodeCharacter{1E81}{`w}
- DeclareUnicodeCharacter{1E82}{'W}
- DeclareUnicodeCharacter{1E83}{'w}
- DeclareUnicodeCharacter{1E84}{"W}
- DeclareUnicodeCharacter{1E85}{"w}
- DeclareUnicodeCharacter{1E86}{dotaccent{W}}
- DeclareUnicodeCharacter{1E87}{dotaccent{w}}
- DeclareUnicodeCharacter{1E88}{udotaccent{W}}
- DeclareUnicodeCharacter{1E89}{udotaccent{w}}
- DeclareUnicodeCharacter{1E8A}{dotaccent{X}}
- DeclareUnicodeCharacter{1E8B}{dotaccent{x}}
- DeclareUnicodeCharacter{1E8C}{"X}
- DeclareUnicodeCharacter{1E8D}{"x}
- DeclareUnicodeCharacter{1E8E}{dotaccent{Y}}
- DeclareUnicodeCharacter{1E8F}{dotaccent{y}}
- DeclareUnicodeCharacter{1E90}{^Z}
- DeclareUnicodeCharacter{1E91}{^z}
- DeclareUnicodeCharacter{1E92}{udotaccent{Z}}
- DeclareUnicodeCharacter{1E93}{udotaccent{z}}
- DeclareUnicodeCharacter{1E94}{ubaraccent{Z}}
- DeclareUnicodeCharacter{1E95}{ubaraccent{z}}
- DeclareUnicodeCharacter{1E96}{ubaraccent{h}}
- DeclareUnicodeCharacter{1E97}{"t}
- DeclareUnicodeCharacter{1E98}{ringaccent{w}}
- DeclareUnicodeCharacter{1E99}{ringaccent{y}}
- DeclareUnicodeCharacter{1EA0}{udotaccent{A}}
- DeclareUnicodeCharacter{1EA1}{udotaccent{a}}
- DeclareUnicodeCharacter{1EB8}{udotaccent{E}}
- DeclareUnicodeCharacter{1EB9}{udotaccent{e}}
- DeclareUnicodeCharacter{1EBC}{~E}
- DeclareUnicodeCharacter{1EBD}{~e}
- DeclareUnicodeCharacter{1ECA}{udotaccent{I}}
- DeclareUnicodeCharacter{1ECB}{udotaccent{i}}
- DeclareUnicodeCharacter{1ECC}{udotaccent{O}}
- DeclareUnicodeCharacter{1ECD}{udotaccent{o}}
- DeclareUnicodeCharacter{1EE4}{udotaccent{U}}
- DeclareUnicodeCharacter{1EE5}{udotaccent{u}}
- DeclareUnicodeCharacter{1EF2}{`Y}
- DeclareUnicodeCharacter{1EF3}{`y}
- DeclareUnicodeCharacter{1EF4}{udotaccent{Y}}
- DeclareUnicodeCharacter{1EF8}{~Y}
- DeclareUnicodeCharacter{1EF9}{~y}
- DeclareUnicodeCharacter{2013}{--}
- DeclareUnicodeCharacter{2014}{---}
- DeclareUnicodeCharacter{2018}{quoteleft}
- DeclareUnicodeCharacter{2019}{quoteright}
- DeclareUnicodeCharacter{201A}{quotesinglbase}
- DeclareUnicodeCharacter{201C}{quotedblleft}
- DeclareUnicodeCharacter{201D}{quotedblright}
- DeclareUnicodeCharacter{201E}{quotedblbase}
- DeclareUnicodeCharacter{2022}{bullet}
- DeclareUnicodeCharacter{2026}{dots}
- DeclareUnicodeCharacter{2039}{guilsinglleft}
- DeclareUnicodeCharacter{203A}{guilsinglright}
- DeclareUnicodeCharacter{20AC}{euro}
- DeclareUnicodeCharacter{2192}{expansion}
- DeclareUnicodeCharacter{21D2}{result}
- DeclareUnicodeCharacter{2212}{minus}
- DeclareUnicodeCharacter{2217}{point}
- DeclareUnicodeCharacter{2261}{equiv}
- }% end of utfeightchardefs
- % US-ASCII character definitions.
- defasciichardefs{% nothing need be done
- relax
- }
- % Make non-ASCII characters printable again for compatibility with
- % existing Texinfo documents that may use them, even without declaring a
- % document encoding.
- %
- setnonasciicharscatcode other
- message{formatting,}
- newdimendefaultparindent defaultparindent = 15pt
- chapheadingskip = 15pt plus 4pt minus 2pt
- secheadingskip = 12pt plus 3pt minus 2pt
- subsecheadingskip = 9pt plus 2pt minus 2pt
- % Prevent underfull vbox error messages.
- vbadness = 10000
- % Don't be so finicky about underfull hboxes, either.
- hbadness = 2000
- % Following George Bush, get rid of widows and orphans.
- widowpenalty=10000
- clubpenalty=10000
- % Use TeX 3.0's emergencystretch to help line breaking, but if we're
- % using an old version of TeX, don't do anything. We want the amount of
- % stretch added to depend on the line length, hence the dependence on
- % hsize. We call this whenever the paper size is set.
- %
- defsetemergencystretch{%
- ifxemergencystretchthisisundefined
- % Allow us to assign to emergencystretch anyway.
- defemergencystretch{dimen0}%
- else
- emergencystretch = .15hsize
- fi
- }
- % Parameters in order: 1) textheight; 2) textwidth;
- % 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
- % 7) physical page height; 8) physical page width.
- %
- % We also call setleading{textleading}, so the caller should define
- % textleading. The caller should also set parskip.
- %
- definternalpagesizes#1#2#3#4#5#6#7#8{%
- voffset = #3relax
- topskip = #6relax
- splittopskip = topskip
- %
- vsize = #1relax
- advancevsize by topskip
- outervsize = vsize
- advanceoutervsize by 2topandbottommargin
- pageheight = vsize
- %
- hsize = #2relax
- outerhsize = hsize
- advanceouterhsize by 0.5in
- pagewidth = hsize
- %
- normaloffset = #4relax
- bindingoffset = #5relax
- %
- ifpdf
- pdfpageheight #7relax
- pdfpagewidth #8relax
- % if we don't reset these, they will remain at "1 true in" of
- % whatever layout pdftex was dumped with.
- pdfhorigin = 1 true in
- pdfvorigin = 1 true in
- fi
- %
- setleading{textleading}
- %
- parindent = defaultparindent
- setemergencystretch
- }
- % @letterpaper (the default).
- defletterpaper{{globaldefs = 1
- parskip = 3pt plus 2pt minus 1pt
- textleading = 13.2pt
- %
- % If page is nothing but text, make it come out even.
- internalpagesizes{607.2pt}{6in}% that's 46 lines
- {voffset}{.25in}%
- {bindingoffset}{36pt}%
- {11in}{8.5in}%
- }}
- % Use @smallbook to reset parameters for 7x9.25 trim size.
- defsmallbook{{globaldefs = 1
- parskip = 2pt plus 1pt
- textleading = 12pt
- %
- internalpagesizes{7.5in}{5in}%
- {-.2in}{0in}%
- {bindingoffset}{16pt}%
- {9.25in}{7in}%
- %
- lispnarrowing = 0.3in
- tolerance = 700
- hfuzz = 1pt
- contentsrightmargin = 0pt
- defbodyindent = .5cm
- }}
- % Use @smallerbook to reset parameters for 6x9 trim size.
- % (Just testing, parameters still in flux.)
- defsmallerbook{{globaldefs = 1
- parskip = 1.5pt plus 1pt
- textleading = 12pt
- %
- internalpagesizes{7.4in}{4.8in}%
- {-.2in}{-.4in}%
- {0pt}{14pt}%
- {9in}{6in}%
- %
- lispnarrowing = 0.25in
- tolerance = 700
- hfuzz = 1pt
- contentsrightmargin = 0pt
- defbodyindent = .4cm
- }}
- % Use @afourpaper to print on European A4 paper.
- defafourpaper{{globaldefs = 1
- parskip = 3pt plus 2pt minus 1pt
- textleading = 13.2pt
- %
- % Double-side printing via postscript on Laserjet 4050
- % prints double-sided nicely when bindingoffset=10mm and hoffset=-6mm.
- % To change the settings for a different printer or situation, adjust
- % normaloffset until the front-side and back-side texts align. Then
- % do the same for bindingoffset. You can set these for testing in
- % your texinfo source file like this:
- % @tex
- % globalnormaloffset = -6mm
- % globalbindingoffset = 10mm
- % @end tex
- internalpagesizes{673.2pt}{160mm}% that's 51 lines
- {voffset}{hoffset}%
- {bindingoffset}{44pt}%
- {297mm}{210mm}%
- %
- tolerance = 700
- hfuzz = 1pt
- contentsrightmargin = 0pt
- defbodyindent = 5mm
- }}
- % Use @afivepaper to print on European A5 paper.
- % From romildo@urano.iceb.ufop.br, 2 July 2000.
- % He also recommends making @example and @lisp be small.
- defafivepaper{{globaldefs = 1
- parskip = 2pt plus 1pt minus 0.1pt
- textleading = 12.5pt
- %
- internalpagesizes{160mm}{120mm}%
- {voffset}{hoffset}%
- {bindingoffset}{8pt}%
- {210mm}{148mm}%
- %
- lispnarrowing = 0.2in
- tolerance = 800
- hfuzz = 1.2pt
- contentsrightmargin = 0pt
- defbodyindent = 2mm
- tableindent = 12mm
- }}
- % A specific text layout, 24x15cm overall, intended for A4 paper.
- defafourlatex{{globaldefs = 1
- afourpaper
- internalpagesizes{237mm}{150mm}%
- {voffset}{4.6mm}%
- {bindingoffset}{7mm}%
- {297mm}{210mm}%
- %
- % Must explicitly reset to 0 because we call afourpaper.
- globaldefs = 0
- }}
- % Use @afourwide to print on A4 paper in landscape format.
- defafourwide{{globaldefs = 1
- afourpaper
- internalpagesizes{241mm}{165mm}%
- {voffset}{-2.95mm}%
- {bindingoffset}{7mm}%
- {297mm}{210mm}%
- globaldefs = 0
- }}
- % @pagesizes TEXTHEIGHT[,TEXTWIDTH]
- % Perhaps we should allow setting the margins, topskip, parskip,
- % and/or leading, also. Or perhaps we should compute them somehow.
- %
- parseargdefpagesizes{pagesizesyyy #1,,finish}
- defpagesizesyyy#1,#2,#3finish{{%
- setbox0 = hbox{ignorespaces #2}ifdimwd0 > 0pt hsize=#2relax fi
- globaldefs = 1
- %
- parskip = 3pt plus 2pt minus 1pt
- setleading{textleading}%
- %
- dimen0 = #1relax
- advancedimen0 by voffset
- %
- dimen2 = hsize
- advancedimen2 by normaloffset
- %
- internalpagesizes{#1}{hsize}%
- {voffset}{normaloffset}%
- {bindingoffset}{44pt}%
- {dimen0}{dimen2}%
- }}
- % Set default to letter.
- %
- letterpaper
- message{and turning on texinfo input format.}
- % Define macros to output various characters with catcode for normal text.
- catcode`"=other
- catcode`~=other
- catcode`^=other
- catcode`_=other
- catcode`|=other
- catcode`<=other
- catcode`>=other
- catcode`+=other
- catcode`$=other
- defnormaldoublequote{"}
- defnormaltilde{~}
- defnormalcaret{^}
- defnormalunderscore{_}
- defnormalverticalbar{|}
- defnormalless{<}
- defnormalgreater{>}
- defnormalplus{+}
- defnormaldollar{$}%$ font-lock fix
- % This macro is used to make a character print one way in tt
- % (where it can probably be output as-is), and another way in other fonts,
- % where something hairier probably needs to be done.
- %
- % #1 is what to print if we are indeed using tt; #2 is what to print
- % otherwise. 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, we can check that font parameter.
- %
- defifusingtt#1#2{ifdim fontdimen3font=0pt #1else #2fi}
- % Same as above, but check for italic font. Actually this also catches
- % non-italic slanted fonts since it is impossible to distinguish them from
- % italic fonts. But since this is only used by $ and it uses sl anyway
- % this is not a problem.
- defifusingit#1#2{ifdim fontdimen1font>0pt #1else #2fi}
- % Turn off all special characters except @
- % (and those which the user can use as if they were ordinary).
- % Most of these we simply print from the tt font, but for some, we can
- % use math or other variants that look better in normal text.
- catcode`"=active
- defactivedoublequote{{ttchar34}}
- let"=activedoublequote
- catcode`~=active
- def~{{ttchar126}}
- chardefhat=`^
- catcode`^=active
- def^{{tt hat}}
- catcode`_=active
- def_{ifusingttnormalunderscore_}
- letrealunder=_
- % Subroutine for the previous macro.
- def_{leavevmode kern.07em vbox{hrule width.3em height.1ex}kern .07em }
- catcode`|=active
- def|{{ttchar124}}
- chardef less=`<
- catcode`<=active
- def<{{tt less}}
- chardef gtr=`>
- catcode`>=active
- def>{{tt gtr}}
- catcode`+=active
- def+{{tt char 43}}
- catcode`$=active
- def${ifusingit{{sl$}}normaldollar}%$ font-lock fix
- % If a .fmt file is being used, characters that might appear in a file
- % name cannot be active until we have parsed the command line.
- % So turn them off again, and have everyjob (or @setfilename) turn them on.
- % otherifyactive is called near the end of this file.
- defotherifyactive{catcode`+=other catcode`_=other}
- % Used sometimes to turn off (effectively) the active characters even after
- % parsing them.
- defturnoffactive{%
- normalturnoffactive
- otherbackslash
- }
- catcode`@=0
- % backslashcurfont outputs one backslash character in current font,
- % as in char`\.
- globalchardefbackslashcurfont=`\
- globalletrawbackslashxx=backslashcurfont % let existing .??s files work
- % realbackslash is an actual character `' with catcode other, and
- % doublebackslash is two of them (for the pdf outlines).
- {catcode`\=other @gdef@realbackslash{} @gdef@doublebackslash{\}}
- % In texinfo, backslash is an active character; it prints the backslash
- % in fixed width font.
- catcode`\=active
- @def@normalbackslash{{@tt@backslashcurfont}}
- % On startup, @fixbackslash assigns:
- % @let = @normalbackslash
- % rawbackslash defines an active to do backslashcurfont.
- % otherbackslash defines an active to be a literal `' character with
- % catcode other.
- @gdef@rawbackslash{@let=@backslashcurfont}
- @gdef@otherbackslash{@let=@realbackslash}
- % Same as @turnoffactive except outputs as {ttchar`\} instead of
- % the literal character `'.
- %
- @def@normalturnoffactive{%
- @let=@normalbackslash
- @let"=@normaldoublequote
- @let~=@normaltilde
- @let^=@normalcaret
- @let_=@normalunderscore
- @let|=@normalverticalbar
- @let<=@normalless
- @let>=@normalgreater
- @let+=@normalplus
- @let$=@normaldollar %$ font-lock fix
- @unsepspaces
- }
- % Make _ and + other characters, temporarily.
- % This is canceled by @fixbackslash.
- @otherifyactive
- % If a .fmt file is being used, we don't want the `input texinfo' to show up.
- % That is what eatinput is for; after that, the `' should revert to printing
- % a backslash.
- %
- @gdef@eatinput input texinfo{@fixbackslash}
- @global@let = @eatinput
- % On the other hand, perhaps the file did not have a `input texinfo'. Then
- % the first `' in the file would cause an error. This macro tries to fix
- % that, assuming it is called before the first `' could plausibly occur.
- % Also turn back on active characters that might appear in the input
- % file name, in case not using a pre-dumped format.
- %
- @gdef@fixbackslash{%
- @ifx@eatinput @let = @normalbackslash @fi
- @catcode`+=@active
- @catcode`@_=@active
- }
- % Say @foo, not foo, in error messages.
- @escapechar = `@@
- % These look ok in all fonts, so just make them not special.
- @catcode`@& = @other
- @catcode`@# = @other
- @catcode`@% = @other
- @c Local variables:
- @c eval: (add-hook 'write-file-hooks 'time-stamp)
- @c page-delimiter: "^\\message"
- @c time-stamp-start: "def\\texinfoversion{"
- @c time-stamp-format: "%:y-%02m-%02d.%02H"
- @c time-stamp-end: "}"
- @c End:
- @c vim:sw=2:
- @ignore
- arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115
- @end ignore