texinfo.tex
上传用户:qaz666999
上传日期:2022-08-06
资源大小:2570k
文件大小:279k
源码类别:

数学计算

开发平台:

Unix_Linux

  1. defquotationlabel#1{%
  2.   deftemp{#1}%
  3.   ifxtempempty else
  4.     {bf #1: }%
  5.   fi
  6. }
  7. % LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
  8. % If we want to allow any <char> as delimiter,
  9. % we need the curly braces so that makeinfo sees the @verb command, eg:
  10. % `@verbx...x' would look like the '@verbx' command.  --janneke@gnu.org
  11. %
  12. % [Knuth]: Donald Ervin Knuth, 1996.  The TeXbook.
  13. %
  14. % [Knuth] p.344; only we need to do the other characters Texinfo sets
  15. % active too.  Otherwise, they get lost as the first character on a
  16. % verbatim line.
  17. defdospecials{%
  18.   do do\do{do}do$do&%
  19.   do#do^do^^Kdo_do^^Ado%do~%
  20.   do<do>do|do@do+do"%
  21. }
  22. %
  23. % [Knuth] p. 380
  24. defuncatcodespecials{%
  25.   defdo##1{catcode`##1=other}dospecials}
  26. %
  27. % [Knuth] pp. 380,381,391
  28. % Disable Spanish ligatures ?` and !` of tt font
  29. begingroup
  30.   catcode``=activegdef`{relaxlq}
  31. endgroup
  32. %
  33. % Setup for the @verb command.
  34. %
  35. % Eight spaces for a tab
  36. begingroup
  37.   catcode`^^I=active
  38.   gdeftabeightspaces{catcode`^^I=activedef^^I{        }}
  39. endgroup
  40. %
  41. defsetupverb{%
  42.   tt  % easiest (and conventionally used) font for verbatim
  43.   defpar{leavevmodeendgraf}%
  44.   catcode``=active
  45.   tabeightspaces
  46.   % Respect line breaks,
  47.   % print special symbols as themselves, and
  48.   % make each space count
  49.   % must do in this order:
  50.   obeylines uncatcodespecials sepspaces
  51. }
  52. % Setup for the @verbatim environment
  53. %
  54. % Real tab expansion
  55. newdimentabw setbox0=hbox{ttspace} tabw=8wd0 % tab amount
  56. %
  57. defstarttabbox{setbox0=hboxbgroup}
  58. % Allow an option to not replace quotes with a regular directed right
  59. % quote/apostrophe (char 0x27), but instead use the undirected quote
  60. % from cmtt (char 0x0d).  The undirected quote is ugly, so don't make it
  61. % the default, but it works for pasting with more pdf viewers (at least
  62. % evince), the lilypond developers report.  xpdf does work with the
  63. % regular 0x27.  
  64. defcodequoteright{%
  65.   expandafterifxcsname SETtxicodequoteundirectedendcsnamerelax
  66.     expandafterifxcsname SETcodequoteundirectedendcsnamerelax
  67.       '%
  68.     else char'15 fi
  69.   else char'15 fi
  70. }
  71. %
  72. % and a similar option for the left quote char vs. a grave accent.
  73. % Modern fonts display ASCII 0x60 as a grave accent, so some people like
  74. % the code environments to do likewise.
  75. defcodequoteleft{%
  76.   expandafterifxcsname SETtxicodequotebacktickendcsnamerelax
  77.     expandafterifxcsname SETcodequotebacktickendcsnamerelax
  78.       `%
  79.     else char'22 fi
  80.   else char'22 fi
  81. }
  82. %
  83. begingroup
  84.   catcode`^^I=active
  85.   gdeftabexpand{%
  86.     catcode`^^I=active
  87.     def^^I{leavevmodeegroup
  88.       dimen0=wd0 % the width so far, or since the previous tab
  89.       dividedimen0 bytabw
  90.       multiplydimen0 bytabw % compute previous multiple of tabw
  91.       advancedimen0 bytabw  % advance to next multiple of tabw
  92.       wd0=dimen0 box0 starttabbox
  93.     }%
  94.   }
  95.   catcode`'=active
  96.   gdefrquoteexpand{catcoderquoteChar=active def'{codequoteright}}%
  97.   %
  98.   catcode``=active
  99.   gdeflquoteexpand{catcodelquoteChar=active def`{codequoteleft}}%
  100.   %
  101.   gdefquoteexpand{rquoteexpand lquoteexpand}%
  102. endgroup
  103. % start the verbatim environment.
  104. defsetupverbatim{%
  105.   letnonarrowing = t%
  106.   nonfillstart
  107.   % Easiest (and conventionally used) font for verbatim
  108.   tt
  109.   defpar{leavevmodeegroupbox0endgraf}%
  110.   catcode``=active
  111.   tabexpand
  112.   quoteexpand
  113.   % Respect line breaks,
  114.   % print special symbols as themselves, and
  115.   % make each space count
  116.   % must do in this order:
  117.   obeylines uncatcodespecials sepspaces
  118.   everypar{starttabbox}%
  119. }
  120. % Do the @verb magic: verbatim text is quoted by unique
  121. % delimiter characters.  Before first delimiter expect a
  122. % right brace, after last delimiter expect closing brace:
  123. %
  124. %    defdoverb'{'<char>#1<char>'}'{#1}
  125. %
  126. % [Knuth] p. 382; only eat outer {}
  127. begingroup
  128.   catcode`[=1catcode`]=2catcode`{=othercatcode`}=other
  129.   gdefdoverb{#1[defnext##1#1}[##1endgroup]next]
  130. endgroup
  131. %
  132. defverb{begingroupsetupverbdoverb}
  133. %
  134. %
  135. % Do the @verbatim magic: define the macro doverbatim so that
  136. % the (first) argument ends when '@end verbatim' is reached, ie:
  137. %
  138. %     defdoverbatim#1@end verbatim{#1}
  139. %
  140. % For Texinfo it's a lot easier than for LaTeX,
  141. % because texinfo's verbatim doesn't stop at 'end{verbatim}':
  142. % we need not redefine '', '{' and '}'.
  143. %
  144. % Inspired by LaTeX's verbatim command set [latex.ltx]
  145. %
  146. begingroup
  147.   catcode` =active
  148.   obeylines %
  149.   % ignore everything up to the first ^^M, that's the newline at the end
  150.   % of the @verbatim input line itself.  Otherwise we get an extra blank
  151.   % line in the output.
  152.   xdefdoverbatim#1^^M#2@end verbatim{#2noexpandendgobble verbatim}%
  153.   % We really want {...end verbatim} in the body of the macro, but
  154.   % without the active space; thus we have to use xdef and gobble.
  155. endgroup
  156. %
  157. envdefverbatim{%
  158.     setupverbatimdoverbatim
  159. }
  160. letEverbatim = afterenvbreak
  161. % @verbatiminclude FILE - insert text of file in verbatim environment.
  162. %
  163. defverbatiminclude{parseargusingfilenamecatcodesdoverbatiminclude}
  164. %
  165. defdoverbatiminclude#1{%
  166.   {%
  167.     makevalueexpandable
  168.     setupverbatim
  169.     input #1
  170.     afterenvbreak
  171.   }%
  172. }
  173. % @copying ... @end copying.
  174. % Save the text away for @insertcopying later.
  175. %
  176. % We save the uninterpreted tokens, rather than creating a box.
  177. % Saving the text in a box would be much easier, but then all the
  178. % typesetting commands (@smallbook, font changes, etc.) have to be done
  179. % beforehand -- and a) we want @copying to be done first in the source
  180. % file; b) letting users define the frontmatter in as flexible order as
  181. % possible is very desirable.
  182. %
  183. defcopying{checkenv{}begingroupscanargctxtdocopying}
  184. defdocopying#1@end copying{endgroupdefcopyingtext{#1}}
  185. %
  186. definsertcopying{%
  187.   begingroup
  188.     parindent = 0pt  % paragraph indentation looks wrong on title page
  189.     scanexpcopyingtext
  190.   endgroup
  191. }
  192. message{defuns,}
  193. % @defun etc.
  194. newskipdefbodyindent defbodyindent=.4in
  195. newskipdefargsindent defargsindent=50pt
  196. newskipdeflastargmargin deflastargmargin=18pt
  197. newcountdefunpenalty
  198. % Start the processing of @deffn:
  199. defstartdefun{%
  200.   ifnumlastpenalty<10000
  201.     medbreak
  202.     defunpenalty=10003 % Will keep this @deffn together with the
  203.                         % following @def command, see below.
  204.   else
  205.     % If there are two @def commands in a row, we'll have a nobreak,
  206.     % which is there to keep the function description together with its
  207.     % header.  But if there's nothing but headers, we need to allow a
  208.     % break somewhere.  Check specifically for penalty 10002, inserted
  209.     % by printdefunline, instead of 10000, since the sectioning
  210.     % commands also insert a nobreak penalty, and we don't want to allow
  211.     % a break between a section heading and a defun.
  212.     %
  213.     % As a minor refinement, we avoid "club" headers by signalling
  214.     % with penalty of 10003 after the very first @deffn in the
  215.     % sequence (see above), and penalty of 10002 after any following
  216.     % @def command.
  217.     ifnumlastpenalty=10002 penalty2000 else defunpenalty=10002 fi
  218.     %
  219.     % Similarly, after a section heading, do not allow a break.
  220.     % But do insert the glue.
  221.     medskip  % preceded by discardable penalty, so not a breakpoint
  222.   fi
  223.   %
  224.   parindent=0in
  225.   advanceleftskip by defbodyindent
  226.   exdentamount=defbodyindent
  227. }
  228. defdodefunx#1{%
  229.   % First, check whether we are in the right environment:
  230.   checkenv#1%
  231.   %
  232.   % As above, allow line break if we have multiple x headers in a row.
  233.   % It's not a great place, though.
  234.   ifnumlastpenalty=10002 penalty3000 else defunpenalty=10002 fi
  235.   %
  236.   % And now, it's time to reuse the body of the original defun:
  237.   expandaftergobbledefun#1%
  238. }
  239. defgobbledefun#1startdefun{}
  240. % printdefunline deffnheader{text}
  241. %
  242. defprintdefunline#1#2{%
  243.   begingroup
  244.     % call deffnheader:
  245.     #1#2 endheader
  246.     % common ending:
  247.     interlinepenalty = 10000
  248.     advancerightskip by 0pt plus 1fil
  249.     endgraf
  250.     nobreakvskip -parskip
  251.     penaltydefunpenalty  % signal to startdefun and dodefunx
  252.     % Some of the @defun-type tags do not enable magic parentheses,
  253.     % rendering the following check redundant.  But we don't optimize.
  254.     checkparencounts
  255.   endgroup
  256. }
  257. defEdefun{endgrafmedbreak}
  258. % makedefun{deffn} creates deffn, deffnx and Edeffn;
  259. % the only thing remaining is to define deffnheader.
  260. %
  261. defmakedefun#1{%
  262.   expandafterletcsname E#1endcsname = Edefun
  263.   edeftemp{noexpanddomakedefun
  264.     makecsname{#1}makecsname{#1x}makecsname{#1header}}%
  265.   temp
  266. }
  267. % domakedefun deffn deffnx deffnheader
  268. %
  269. % Define deffn and deffnx, without parameters.
  270. % deffnheader has to be defined explicitly.
  271. %
  272. defdomakedefun#1#2#3{%
  273.   envdef#1{%
  274.     startdefun
  275.     parseargusingactiveparens{printdefunline#3}%
  276.   }%
  277.   def#2{dodefunx#1}%
  278.   def#3%
  279. }
  280. %%% Untyped functions:
  281. % @deffn category name args
  282. makedefun{deffn}{deffngeneral{}}
  283. % @deffn category class name args
  284. makedefun{defop}#1 {defopon{#1 putwordon}}
  285. % defopon {category on}class name args
  286. defdefopon#1#2 {deffngeneral{putwordon code{#2}}{#1 code{#2}} }
  287. % deffngeneral {subind}category name args
  288. %
  289. defdeffngeneral#1#2 #3 #4endheader{%
  290.   % Remember that dosubind{fn}{foo}{} is equivalent to doind{fn}{foo}.
  291.   dosubind{fn}{code{#3}}{#1}%
  292.   defname{#2}{}{#3}magicampdefunargs{#4unskip}%
  293. }
  294. %%% Typed functions:
  295. % @deftypefn category type name args
  296. makedefun{deftypefn}{deftypefngeneral{}}
  297. % @deftypeop category class type name args
  298. makedefun{deftypeop}#1 {deftypeopon{#1 putwordon}}
  299. % deftypeopon {category on}class type name args
  300. defdeftypeopon#1#2 {deftypefngeneral{putwordon code{#2}}{#1 code{#2}} }
  301. % deftypefngeneral {subind}category type name args
  302. %
  303. defdeftypefngeneral#1#2 #3 #4 #5endheader{%
  304.   dosubind{fn}{code{#4}}{#1}%
  305.   defname{#2}{#3}{#4}defunargs{#5unskip}%
  306. }
  307. %%% Typed variables:
  308. % @deftypevr category type var args
  309. makedefun{deftypevr}{deftypecvgeneral{}}
  310. % @deftypecv category class type var args
  311. makedefun{deftypecv}#1 {deftypecvof{#1 putwordof}}
  312. % deftypecvof {category of}class type var args
  313. defdeftypecvof#1#2 {deftypecvgeneral{putwordof code{#2}}{#1 code{#2}} }
  314. % deftypecvgeneral {subind}category type var args
  315. %
  316. defdeftypecvgeneral#1#2 #3 #4 #5endheader{%
  317.   dosubind{vr}{code{#4}}{#1}%
  318.   defname{#2}{#3}{#4}defunargs{#5unskip}%
  319. }
  320. %%% Untyped variables:
  321. % @defvr category var args
  322. makedefun{defvr}#1 {deftypevrheader{#1} {} }
  323. % @defcv category class var args
  324. makedefun{defcv}#1 {defcvof{#1 putwordof}}
  325. % defcvof {category of}class var args
  326. defdefcvof#1#2 {deftypecvof{#1}#2 {} }
  327. %%% Type:
  328. % @deftp category name args
  329. makedefun{deftp}#1 #2 #3endheader{%
  330.   doind{tp}{code{#2}}%
  331.   defname{#1}{}{#2}defunargs{#3unskip}%
  332. }
  333. % Remaining @defun-like shortcuts:
  334. makedefun{defun}{deffnheader{putwordDeffunc} }
  335. makedefun{defmac}{deffnheader{putwordDefmac} }
  336. makedefun{defspec}{deffnheader{putwordDefspec} }
  337. makedefun{deftypefun}{deftypefnheader{putwordDeffunc} }
  338. makedefun{defvar}{defvrheader{putwordDefvar} }
  339. makedefun{defopt}{defvrheader{putwordDefopt} }
  340. makedefun{deftypevar}{deftypevrheader{putwordDefvar} }
  341. makedefun{defmethod}{defoponputwordMethodon}
  342. makedefun{deftypemethod}{deftypeoponputwordMethodon}
  343. makedefun{defivar}{defcvofputwordInstanceVariableof}
  344. makedefun{deftypeivar}{deftypecvofputwordInstanceVariableof}
  345. % defname, which formats the name of the @def (not the args).
  346. % #1 is the category, such as "Function".
  347. % #2 is the return type, if any.
  348. % #3 is the function name.
  349. %
  350. % We are followed by (but not passed) the arguments, if any.
  351. %
  352. defdefname#1#2#3{%
  353.   % Get the values of leftskip and rightskip as they were outside the @def...
  354.   advanceleftskip by -defbodyindent
  355.   %
  356.   % How we'll format the type name.  Putting it in brackets helps
  357.   % distinguish it from the body text that may end up on the next line
  358.   % just below it.
  359.   deftemp{#1}%
  360.   setbox0=hbox{kerndeflastargmargin ifxtempemptyelse [rmtemp]fi}
  361.   %
  362.   % Figure out line sizes for the paragraph shape.
  363.   % The first line needs space for box0; but if rightskip is nonzero,
  364.   % we need only space for the part of box0 which exceeds it:
  365.   dimen0=hsize  advancedimen0 by -wd0  advancedimen0 by rightskip
  366.   % The continuations:
  367.   dimen2=hsize  advancedimen2 by -defargsindent
  368.   % (plain.tex says that dimen1 should be used only as global.)
  369.   parshape 2 0in dimen0 defargsindent dimen2
  370.   %
  371.   % Put the type name to the right margin.
  372.   noindent
  373.   hbox to 0pt{%
  374.     hfilbox0 kern-hsize
  375.     % hsize has to be shortened this way:
  376.     kernleftskip
  377.     % Intentionally do not respect rightskip, since we need the space.
  378.   }%
  379.   %
  380.   % Allow all lines to be underfull without complaint:
  381.   tolerance=10000 hbadness=10000
  382.   exdentamount=defbodyindent
  383.   {%
  384.     % defun fonts. We use typewriter by default (used to be bold) because:
  385.     % . we're printing identifiers, they should be in tt in principle.
  386.     % . in languages with many accents, such as Czech or French, it's
  387.     %   common to leave accents off identifiers.  The result looks ok in
  388.     %   tt, but exceedingly strange in rm.
  389.     % . we don't want -- and --- to be treated as ligatures.
  390.     % . this still does not fix the ?` and !` ligatures, but so far no
  391.     %   one has made identifiers using them :).
  392.     df tt
  393.     deftemp{#2}% return value type
  394.     ifxtempemptyelse tclose{temp} fi
  395.     #3% output function name
  396.   }%
  397.   {rmenskip}% hskip 0.5 em of tenrm
  398.   %
  399.   boldbrax
  400.   % arguments will be output next, if any.
  401. }
  402. % Print arguments in slanted roman (not ttsl), inconsistently with using
  403. % tt for the name.  This is because literal text is sometimes needed in
  404. % the argument list (groff manual), and ttsl and tt are not very
  405. % distinguishable.  Prevent hyphenation at `-' chars.
  406. %
  407. defdefunargs#1{%
  408.   % use sl by default (not ttsl),
  409.   % tt for the names.
  410.   df sl hyphencharfont=0
  411.   %
  412.   % On the other hand, if an argument has two dashes (for instance), we
  413.   % want a way to get ttsl.  Let's try @var for that.
  414.   letvar=ttslanted
  415.   #1%
  416.   slhyphencharfont=45
  417. }
  418. % We want ()&[] to print specially on the defun line.
  419. %
  420. defactiveparens{%
  421.   catcode`(=active catcode`)=active
  422.   catcode`[=active catcode`]=active
  423.   catcode`&=active
  424. }
  425. % Make control sequences which act like normal parenthesis chars.
  426. letlparen = ( letrparen = )
  427. % Be sure that we always have a definition for `(', etc.  For example,
  428. % if the fn name has parens in it, boldbrax will not be in effect yet,
  429. % so TeX would otherwise complain about undefined control sequence.
  430. {
  431.   activeparens
  432.   globallet(=lparen globallet)=rparen
  433.   globallet[=lbrack globallet]=rbrack
  434.   globallet& = &
  435.   gdefboldbrax{let(=opnrlet)=clnrlet[=lbrblet]=rbrb}
  436.   gdefmagicamp{let&=amprm}
  437. }
  438. newcountparencount
  439. % If we encounter &foo, then turn on ()-hacking afterwards
  440. newififampseen
  441. defamprm#1 {ampseentrue{bf&#1 }}
  442. defparenfont{%
  443.   ifampseen
  444.     % At the first level, print parens in roman,
  445.     % otherwise use the default font.
  446.     ifnum parencount=1 rm fi
  447.   else
  448.     % The sf parens (in boldbrax) actually are a little bolder than
  449.     % the contained text.  This is especially needed for [ and ] .
  450.     sf
  451.   fi
  452. }
  453. definfirstlevel#1{%
  454.   ifampseen
  455.     ifnumparencount=1
  456.       #1%
  457.     fi
  458.   fi
  459. }
  460. defbfafterword#1 {#1 bf}
  461. defopnr{%
  462.   globaladvanceparencount by 1
  463.   {parenfont(}%
  464.   infirstlevel bfafterword
  465. }
  466. defclnr{%
  467.   {parenfont)}%
  468.   infirstlevel sl
  469.   globaladvanceparencount by -1
  470. }
  471. newcountbrackcount
  472. deflbrb{%
  473.   globaladvancebrackcount by 1
  474.   {bf[}%
  475. }
  476. defrbrb{%
  477.   {bf]}%
  478.   globaladvancebrackcount by -1
  479. }
  480. defcheckparencounts{%
  481.   ifnumparencount=0 else badparencount fi
  482.   ifnumbrackcount=0 else badbrackcount fi
  483. }
  484. % these should not use errmessage; the glibc manual, at least, actually
  485. % has such constructs (when documenting function pointers).
  486. defbadparencount{%
  487.   message{Warning: unbalanced parentheses in @def...}%
  488.   globalparencount=0
  489. }
  490. defbadbrackcount{%
  491.   message{Warning: unbalanced square brackets in @def...}%
  492.   globalbrackcount=0
  493. }
  494. message{macros,}
  495. % @macro.
  496. % To do this right we need a feature of e-TeX, scantokens,
  497. % which we arrange to emulate with a temporary file in ordinary TeX.
  498. ifxeTeXversionundefined
  499.   newwritemacscribble
  500.   defscantokens#1{%
  501.     toks0={#1}%
  502.     immediateopenoutmacscribble=jobname.tmp
  503.     immediatewritemacscribble{thetoks0}%
  504.     immediatecloseoutmacscribble
  505.     input jobname.tmp
  506.   }
  507. fi
  508. defscanmacro#1{%
  509.   begingroup
  510.     newlinechar`^^M
  511.     letxeatspaceseatspaces
  512.     % Undo catcode changes of startcontents and doprintindex
  513.     % When called from @insertcopying or (short)caption, we need active
  514.     % backslash to get it printed correctly.  Previously, we had
  515.     % catcode`\=other instead.  We'll see whether a problem appears
  516.     % with macro expansion. --kasal, 19aug04
  517.     catcode`@=0 catcode`\=active escapechar=`@
  518.     % ... and example
  519.     spaceisspace
  520.     %
  521.     % Append endinput to make sure that TeX does not see the ending newline.
  522.     % I've verified that it is necessary both for e-TeX and for ordinary TeX
  523.     % --kasal, 29nov03
  524.     scantokens{#1endinput}%
  525.   endgroup
  526. }
  527. defscanexp#1{%
  528.   edeftemp{noexpandscanmacro{#1}}%
  529.   temp
  530. }
  531. newcountparamno   % Count of parameters
  532. newtoksmacname    % Macro name
  533. newififrecursive  % Is it recursive?
  534. % List of all defined macros in the form
  535. %    definedummywordmacro1definedummywordmacro2...
  536. % Currently is also contains all @aliases; the list can be split
  537. % if there is a need.
  538. defmacrolist{}
  539. % Add the macro to macrolist
  540. defaddtomacrolist#1{expandafter addtomacrolistxxx csname#1endcsname}
  541. defaddtomacrolistxxx#1{%
  542.      toks0 = expandafter{macrolistdefinedummyword#1}%
  543.      xdefmacrolist{thetoks0}%
  544. }
  545. % Utility routines.
  546. % This does let #1 = #2, with csnames; that is,
  547. %   let csname#1endcsname = csname#2endcsname
  548. % (except of course we have to play expansion games).
  549. defcslet#1#2{%
  550.   expandafterlet
  551.   csname#1expandafterendcsname
  552.   csname#2endcsname
  553. }
  554. % Trim leading and trailing spaces off a string.
  555. % Concepts from aro-bend problem 15 (see CTAN).
  556. {catcode`@=11
  557. gdefeatspaces #1{expandaftertrim@expandafter{#1 }}
  558. gdeftrim@ #1{trim@@ @#1 @ #1 @ @@}
  559. gdeftrim@@ #1@ #2@ #3@@{trim@@@empty #2 @}
  560. defunbrace#1{#1}
  561. unbrace{gdeftrim@@@ #1 } #2@{#1}
  562. }
  563. % Trim a single trailing ^^M off a string.
  564. {catcode`^^M=other catcode`Q=3%
  565. gdefeatcr #1{eatcra #1Q^^MQ}%
  566. gdefeatcra#1^^MQ{eatcrb#1Q}%
  567. gdefeatcrb#1Q#2Q{#1}%
  568. }
  569. % Macro bodies are absorbed as an argument in a context where
  570. % all characters are catcode 10, 11 or 12, except  which is active
  571. % (as in normal texinfo). It is necessary to change the definition of .
  572. % Non-ASCII encodings make 8-bit characters active, so un-activate
  573. % them to avoid their expansion.  Must do this non-globally, to
  574. % confine the change to the current group.
  575. % It's necessary to have hard CRs when the macro is executed. This is
  576. % done by  making ^^M (endlinechar) catcode 12 when reading the macro
  577. % body, and then making it the newlinechar in scanmacro.
  578. defscanctxt{%
  579.   catcode`"=other
  580.   catcode`+=other
  581.   catcode`<=other
  582.   catcode`>=other
  583.   catcode`@=other
  584.   catcode`^=other
  585.   catcode`_=other
  586.   catcode`|=other
  587.   catcode`~=other
  588.   ifxdeclaredencodingascii else setnonasciicharscatcodenonglobalother fi
  589. }
  590. defscanargctxt{%
  591.   scanctxt
  592.   catcode`\=other
  593.   catcode`^^M=other
  594. }
  595. defmacrobodyctxt{%
  596.   scanctxt
  597.   catcode`{=other
  598.   catcode`}=other
  599.   catcode`^^M=other
  600.   usembodybackslash
  601. }
  602. defmacroargctxt{%
  603.   scanctxt
  604.   catcode`\=other
  605. }
  606. % mbodybackslash is the definition of  in @macro bodies.
  607. % It maps foo => csname macarg.fooendcsname => #N
  608. % where N is the macro parameter number.
  609. % We define csname macarg.endcsname to be realbackslash, so
  610. % \ in macro replacement text gets you a backslash.
  611. {catcode`@=0 @catcode`@=@active
  612.  @gdef@usembodybackslash{@let=@mbodybackslash}
  613.  @gdef@mbodybackslash#1{@csname macarg.#1@endcsname}
  614. }
  615. expandafterdefcsname macarg.endcsname{realbackslash}
  616. defmacro{recursivefalseparseargmacroxxx}
  617. defrmacro{recursivetrueparseargmacroxxx}
  618. defmacroxxx#1{%
  619.   getargs{#1}%           now macname is the macname and argl the arglist
  620.   ifxarglempty       % no arguments
  621.      paramno=0%
  622.   else
  623.      expandafterparsemargdef argl;%
  624.   fi
  625.   if1csname ismacro.themacnameendcsname
  626.      message{Warning: redefining themacname}%
  627.   else
  628.      expandafterifxcsname themacnameendcsname relax
  629.      else errmessage{Macro name themacnamespace already defined}fi
  630.      globalcslet{macsave.themacname}{themacname}%
  631.      globalexpandafterletcsname ismacro.themacnameendcsname=1%
  632.      addtomacrolist{themacname}%
  633.   fi
  634.   begingroup macrobodyctxt
  635.   ifrecursive expandafterparsermacbody
  636.   else expandafterparsemacbody
  637.   fi}
  638. parseargdefunmacro{%
  639.   if1csname ismacro.#1endcsname
  640.     globalcslet{#1}{macsave.#1}%
  641.     globalexpandafterlet csname ismacro.#1endcsname=0%
  642.     % Remove the macro name from macrolist:
  643.     begingroup
  644.       expandafterletcsname#1endcsname relax
  645.       letdefinedummywordunmacrodo
  646.       xdefmacrolist{macrolist}%
  647.     endgroup
  648.   else
  649.     errmessage{Macro #1 not defined}%
  650.   fi
  651. }
  652. % Called by do from dounmacro on each macro.  The idea is to omit any
  653. % macro definitions that have been changed to relax.
  654. %
  655. defunmacrodo#1{%
  656.   ifx #1relax
  657.     % remove this
  658.   else
  659.     noexpanddefinedummyword noexpand#1%
  660.   fi
  661. }
  662. % This makes use of the obscure feature that if the last token of a
  663. % <parameter list> is #, then the preceding argument is delimited by
  664. % an opening brace, and that opening brace is not consumed.
  665. defgetargs#1{getargsxxx#1{}}
  666. defgetargsxxx#1#{getmacname #1 relaxgetmacargs}
  667. defgetmacname #1 #2relax{macname={#1}}
  668. defgetmacargs#1{defargl{#1}}
  669. % Parse the optional {params} list.  Set up paramno and paramlist
  670. % so defmacro knows what to do.  Define macarg.blah for each blah
  671. % in the params list, to be ##N where N is the position in that list.
  672. % That gets used by mbodybackslash (above).
  673. % We need to get `macro parameter char #' into several definitions.
  674. % The technique used is stolen from LaTeX:  let hash be something
  675. % unexpandable, insert that wherever you need a #, and then redefine
  676. % it to # just before using the token list produced.
  677. %
  678. % The same technique is used to protect eatspaces till just before
  679. % the macro is used.
  680. defparsemargdef#1;{paramno=0defparamlist{}%
  681.         lethashrelaxletxeatspacesrelaxparsemargdefxxx#1,;,}
  682. defparsemargdefxxx#1,{%
  683.   if#1;letnext=relax
  684.   else letnext=parsemargdefxxx
  685.     advanceparamno by 1%
  686.     expandafteredefcsname macarg.eatspaces{#1}endcsname
  687.         {xeatspaces{hashtheparamno}}%
  688.     edefparamlist{paramlisthashtheparamno,}%
  689.   finext}
  690. % These two commands read recursive and nonrecursive macro bodies.
  691. % (They're different since rec and nonrec macros end differently.)
  692. longdefparsemacbody#1@end macro%
  693. {xdeftemp{eatcr{#1}}endgroupdefmacro}%
  694. longdefparsermacbody#1@end rmacro%
  695. {xdeftemp{eatcr{#1}}endgroupdefmacro}%
  696. % This defines the macro itself. There are six cases: recursive and
  697. % nonrecursive macros of zero, one, and many arguments.
  698. % Much magic with expandafter here.
  699. % xdef is used so that macro definitions will survive the file
  700. % they're defined in; @include reads the file inside a group.
  701. defdefmacro{%
  702.   lethash=##% convert placeholders to macro parameter chars
  703.   ifrecursive
  704.     ifcaseparamno
  705.     % 0
  706.       expandafterxdefcsnamethemacnameendcsname{%
  707.         noexpandscanmacro{temp}}%
  708.     or % 1
  709.       expandafterxdefcsnamethemacnameendcsname{%
  710.          bgroupnoexpandmacroargctxt
  711.          noexpandbraceorline
  712.          expandafternoexpandcsnamethemacname xxxendcsname}%
  713.       expandafterxdefcsnamethemacname xxxendcsname##1{%
  714.          egroupnoexpandscanmacro{temp}}%
  715.     else % many
  716.       expandafterxdefcsnamethemacnameendcsname{%
  717.          bgroupnoexpandmacroargctxt
  718.          noexpandcsnamethemacname xxendcsname}%
  719.       expandafterxdefcsnamethemacname xxendcsname##1{%
  720.           expandafternoexpandcsnamethemacname xxxendcsname ##1,}%
  721.       expandafterexpandafter
  722.       expandafterxdef
  723.       expandafterexpandafter
  724.         csnamethemacname xxxendcsname
  725.           paramlist{egroupnoexpandscanmacro{temp}}%
  726.     fi
  727.   else
  728.     ifcaseparamno
  729.     % 0
  730.       expandafterxdefcsnamethemacnameendcsname{%
  731.         noexpandnorecurse{themacname}%
  732.         noexpandscanmacro{temp}egroup}%
  733.     or % 1
  734.       expandafterxdefcsnamethemacnameendcsname{%
  735.          bgroupnoexpandmacroargctxt
  736.          noexpandbraceorline
  737.          expandafternoexpandcsnamethemacname xxxendcsname}%
  738.       expandafterxdefcsnamethemacname xxxendcsname##1{%
  739.         egroup
  740.         noexpandnorecurse{themacname}%
  741.         noexpandscanmacro{temp}egroup}%
  742.     else % many
  743.       expandafterxdefcsnamethemacnameendcsname{%
  744.          bgroupnoexpandmacroargctxt
  745.          expandafternoexpandcsnamethemacname xxendcsname}%
  746.       expandafterxdefcsnamethemacname xxendcsname##1{%
  747.           expandafternoexpandcsnamethemacname xxxendcsname ##1,}%
  748.       expandafterexpandafter
  749.       expandafterxdef
  750.       expandafterexpandafter
  751.       csnamethemacname xxxendcsname
  752.       paramlist{%
  753.           egroup
  754.           noexpandnorecurse{themacname}%
  755.           noexpandscanmacro{temp}egroup}%
  756.     fi
  757.   fi}
  758. defnorecurse#1{bgroupcslet{#1}{macsave.#1}}
  759. % braceorline decides whether the next nonwhitespace character is a
  760. % {.  If so it reads up to the closing }, if not, it reads the whole
  761. % line.  Whatever was read is then fed to the next control sequence
  762. % as an argument (by parsebrace or parsearg)
  763. defbraceorline#1{letmacnamexxx=#1futureletncharbraceorlinexxx}
  764. defbraceorlinexxx{%
  765.   ifxncharbgroupelse
  766.     expandafterparsearg
  767.   fi macnamexxx}
  768. % @alias.
  769. % We need some trickery to remove the optional spaces around the equal
  770. % sign.  Just make them active and then expand them all to nothing.
  771. defalias{parseargusingobeyspacesaliasxxx}
  772. defaliasxxx #1{aliasyyy#1relax}
  773. defaliasyyy #1=#2relax{%
  774.   {%
  775.     expandafterletobeyedspace=empty
  776.     addtomacrolist{#1}%
  777.     xdefnext{globalletmakecsname{#1}=makecsname{#2}}%
  778.   }%
  779.   next
  780. }
  781. message{cross references,}
  782. newwriteauxfile
  783. newififhavexrefs    % True if xref values are known.
  784. newififwarnedxrefs  % True if we warned once that they aren't known.
  785. % @inforef is relatively simple.
  786. definforef #1{inforefzzz #1,,,,**}
  787. definforefzzz #1,#2,#3,#4**{putwordSee{} putwordInfo{} putwordfile{} file{ignorespaces #3{}},
  788.   node samp{ignorespaces#1{}}}
  789. % @node's only job in TeX is to define lastnode, which is used in
  790. % cross-references.  The @node line might or might not have commas, and
  791. % might or might not have spaces before the first comma, like:
  792. % @node foo , bar , ...
  793. % We don't want such trailing spaces in the node name.
  794. %
  795. parseargdefnode{checkenv{}donode #1 ,finishnodeparse}
  796. %
  797. % also remove a trailing comma, in case of something like this:
  798. % @node Help-Cross,  ,  , Cross-refs
  799. defdonode#1 ,#2finishnodeparse{dodonode #1,finishnodeparse}
  800. defdodonode#1,#2finishnodeparse{gdeflastnode{#1}}
  801. letnwnode=node
  802. letlastnode=empty
  803. % Write a cross-reference definition for the current node.  #1 is the
  804. % type (Ynumbered, Yappendix, Ynothing).
  805. %
  806. defdonoderef#1{%
  807.   ifxlastnodeemptyelse
  808.     setref{lastnode}{#1}%
  809.     globalletlastnode=empty
  810.   fi
  811. }
  812. % @anchor{NAME} -- define xref target at arbitrary point.
  813. %
  814. newcountsavesfregister
  815. %
  816. defsavesf{relax ifhmode savesfregister=spacefactor fi}
  817. defrestoresf{relax ifhmode spacefactor=savesfregister fi}
  818. defanchor#1{savesf setref{#1}{Ynothing}restoresf ignorespaces}
  819. % setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
  820. % anchor), which consists of three parts:
  821. % 1) NAME-title - the current sectioning name taken from lastsection,
  822. %                 or the anchor name.
  823. % 2) NAME-snt   - section number and type, passed as the SNT arg, or
  824. %                 empty for anchors.
  825. % 3) NAME-pg    - the page number.
  826. %
  827. % This is called from donoderef, anchor, and dofloat.  In the case of
  828. % floats, there is an additional part, which is not written here:
  829. % 4) NAME-lof   - the text as it should appear in a @listoffloats.
  830. %
  831. defsetref#1#2{%
  832.   pdfmkdest{#1}%
  833.   iflinks
  834.     {%
  835.       atdummies  % preserve commands, but don't expand them
  836.       edefwritexrdef##1##2{%
  837. writeauxfile{@xrdef{#1-% #1 of setref, expanded by the edef
  838.   ##1}{##2}}% these are parameters of writexrdef
  839.       }%
  840.       toks0 = expandafter{lastsection}%
  841.       immediate writexrdef{title}{thetoks0 }%
  842.       immediate writexrdef{snt}{csname #2endcsname}% Ynumbered etc.
  843.       safewhatsit{writexrdef{pg}{folio}}% will be written later, during shipout
  844.     }%
  845.   fi
  846. }
  847. % @xref, @pxref, and @ref generate cross-references.  For xrefX, #1 is
  848. % the node name, #2 the name of the Info cross-reference, #3 the printed
  849. % node name, #4 the name of the Info file, #5 the name of the printed
  850. % manual.  All but the node name can be omitted.
  851. %
  852. defpxref#1{putwordsee{} xrefX[#1,,,,,,,]}
  853. defxref#1{putwordSee{} xrefX[#1,,,,,,,]}
  854. defref#1{xrefX[#1,,,,,,,]}
  855. defxrefX[#1,#2,#3,#4,#5,#6]{begingroup
  856.   unsepspaces
  857.   defprintedmanual{ignorespaces #5}%
  858.   defprintedrefname{ignorespaces #3}%
  859.   setbox1=hbox{printedmanualunskip}%
  860.   setbox0=hbox{printedrefnameunskip}%
  861.   ifdim wd0 = 0pt
  862.     % No printed node name was explicitly given.
  863.     expandafterifxcsname SETxref-automatic-section-titleendcsnamerelax
  864.       % Use the node name inside the square brackets.
  865.       defprintedrefname{ignorespaces #1}%
  866.     else
  867.       % Use the actual chapter/section title appear inside
  868.       % the square brackets.  Use the real section title if we have it.
  869.       ifdim wd1 > 0pt
  870.         % It is in another manual, so we don't have it.
  871.         defprintedrefname{ignorespaces #1}%
  872.       else
  873.         ifhavexrefs
  874.           % We know the real title if we have the xref values.
  875.           defprintedrefname{refx{#1-title}{}}%
  876.         else
  877.           % Otherwise just copy the Info node name.
  878.           defprintedrefname{ignorespaces #1}%
  879.         fi%
  880.       fi
  881.     fi
  882.   fi
  883.   %
  884.   % Make link in pdf output.
  885.   ifpdf
  886.     {indexnofonts
  887.      turnoffactive
  888.      % This expands tokens, so do it after making catcode changes, so _
  889.      % etc. don't get their TeX definitions.
  890.      getfilename{#4}%
  891.      %
  892.      % See comments at activebackslashdouble.
  893.      {activebackslashdouble xdefpdfxrefdest{#1}%
  894.       backslashparenspdfxrefdest}%
  895.      %
  896.      leavevmode
  897.      startlink attr{/Border [0 0 0]}%
  898.      ifnumfilenamelength>0
  899.        goto file{thefilename.pdf} name{pdfxrefdest}%
  900.      else
  901.        goto name{pdfmkpgn{pdfxrefdest}}%
  902.      fi
  903.     }%
  904.     setcolor{linkcolor}%
  905.   fi
  906.   %
  907.   % Float references are printed completely differently: "Figure 1.2"
  908.   % instead of "[somenode], p.3".  We distinguish them by the
  909.   % LABEL-title being set to a magic string.
  910.   {%
  911.     % Have to otherify everything special to allow the csname to
  912.     % include an _ in the xref name, etc.
  913.     indexnofonts
  914.     turnoffactive
  915.     expandafterglobalexpandafterletexpandafterXthisreftitle
  916.       csname XR#1-titleendcsname
  917.   }%
  918.   iffloatXthisreftitle
  919.     % If the user specified the print name (third arg) to the ref,
  920.     % print it instead of our usual "Figure 1.2".
  921.     ifdimwd0 = 0pt
  922.       refx{#1-snt}{}%
  923.     else
  924.       printedrefname
  925.     fi
  926.     %
  927.     % if the user also gave the printed manual name (fifth arg), append
  928.     % "in MANUALNAME".
  929.     ifdim wd1 > 0pt
  930.       space putwordin{} cite{printedmanual}%
  931.     fi
  932.   else
  933.     % node/anchor (non-float) references.
  934.     %
  935.     % If we use unhbox0 and unhbox1 to print the node names, TeX does not
  936.     % insert empty discretionaries after hyphens, which means that it will
  937.     % not find a line break at a hyphen in a node names.  Since some manuals
  938.     % are best written with fairly long node names, containing hyphens, this
  939.     % is a loss.  Therefore, we give the text of the node name again, so it
  940.     % is as if TeX is seeing it for the first time.
  941.     ifdim wd1 > 0pt
  942.       putwordSection{} ``printedrefname'' putwordin{} cite{printedmanual}%
  943.     else
  944.       % _ (for example) has to be the character _ for the purposes of the
  945.       % control sequence corresponding to the node, but it has to expand
  946.       % into the usual leavevmode...vrule stuff for purposes of
  947.       % printing. So we turnoffactive for the refx-snt, back on for the
  948.       % printing, back off for the refx-pg.
  949.       {turnoffactive
  950.        % Only output a following space if the -snt ref is nonempty; for
  951.        % @unnumbered and @anchor, it won't be.
  952.        setbox2 = hbox{ignorespaces refx{#1-snt}{}}%
  953.        ifdim wd2 > 0pt refx{#1-snt}spacefi
  954.       }%
  955.       % output the `[mynode]' via a macro so it can be overridden.
  956.       xrefprintnodenameprintedrefname
  957.       %
  958.       % But we always want a comma and a space:
  959.       ,space
  960.       %
  961.       % output the `page 3'.
  962.       turnoffactive putwordpagetierefx{#1-pg}{}%
  963.     fi
  964.   fi
  965.   endlink
  966. endgroup}
  967. % This macro is called from xrefX for the `[nodename]' part of xref
  968. % output.  It's a separate macro only so it can be changed more easily,
  969. % since square brackets don't work well in some documents.  Particularly
  970. % one that Bob is working on :).
  971. %
  972. defxrefprintnodename#1{[#1]}
  973. % Things referred to by setref.
  974. %
  975. defYnothing{}
  976. defYomitfromtoc{}
  977. defYnumbered{%
  978.   ifnumsecno=0
  979.     putwordChapter@tie thechapno
  980.   else ifnumsubsecno=0
  981.     putwordSection@tie thechapno.thesecno
  982.   else ifnumsubsubsecno=0
  983.     putwordSection@tie thechapno.thesecno.thesubsecno
  984.   else
  985.     putwordSection@tie thechapno.thesecno.thesubsecno.thesubsubsecno
  986.   fififi
  987. }
  988. defYappendix{%
  989.   ifnumsecno=0
  990.      putwordAppendix@tie @chartheappendixno{}%
  991.   else ifnumsubsecno=0
  992.      putwordSection@tie @chartheappendixno.thesecno
  993.   else ifnumsubsubsecno=0
  994.     putwordSection@tie @chartheappendixno.thesecno.thesubsecno
  995.   else
  996.     putwordSection@tie
  997.       @chartheappendixno.thesecno.thesubsecno.thesubsubsecno
  998.   fififi
  999. }
  1000. % Define refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
  1001. % If its value is nonempty, SUFFIX is output afterward.
  1002. %
  1003. defrefx#1#2{%
  1004.   {%
  1005.     indexnofonts
  1006.     otherbackslash
  1007.     expandafterglobalexpandafterletexpandafterthisrefX
  1008.       csname XR#1endcsname
  1009.   }%
  1010.   ifxthisrefXrelax
  1011.     % If not defined, say something at least.
  1012.     angleleft un-de-finedangleright
  1013.     iflinks
  1014.       ifhavexrefs
  1015.         message{linenumber Undefined cross reference `#1'.}%
  1016.       else
  1017.         ifwarnedxrefselse
  1018.           globalwarnedxrefstrue
  1019.           message{Cross reference values unknown; you must run TeX again.}%
  1020.         fi
  1021.       fi
  1022.     fi
  1023.   else
  1024.     % It's defined, so just use it.
  1025.     thisrefX
  1026.   fi
  1027.   #2% Output the suffix in any case.
  1028. }
  1029. % This is the macro invoked by entries in the aux file.  Usually it's
  1030. % just a def (we prepend XR to the control sequence name to avoid
  1031. % collisions).  But if this is a float type, we have more work to do.
  1032. %
  1033. defxrdef#1#2{%
  1034.   {% The node name might contain 8-bit characters, which in our current
  1035.    % implementation are changed to commands like @'e.  Don't let these
  1036.    % mess up the control sequence name.
  1037.     indexnofonts
  1038.     turnoffactive
  1039.     xdefsafexrefname{#1}%
  1040.   }%
  1041.   %
  1042.   expandaftergdefcsname XRsafexrefnameendcsname{#2}% remember this xref
  1043.   %
  1044.   % Was that xref control sequence that we just defined for a float?
  1045.   expandafteriffloatcsname XRsafexrefnameendcsname
  1046.     % it was a float, and we have the (safe) float type in iffloattype.
  1047.     expandafterletexpandafterfloatlist
  1048.       csname floatlistiffloattypeendcsname
  1049.     %
  1050.     % Is this the first time we've seen this float type?
  1051.     expandafterifxfloatlistrelax
  1052.       toks0 = {do}% yes, so just do
  1053.     else
  1054.       % had it before, so preserve previous elements in list.
  1055.       toks0 = expandafter{floatlistdo}%
  1056.     fi
  1057.     %
  1058.     % Remember this xref in the control sequence floatlistFLOATTYPE,
  1059.     % for later use in listoffloats.
  1060.     expandafterxdefcsname floatlistiffloattypeendcsname{thetoks0
  1061.       {safexrefname}}%
  1062.   fi
  1063. }
  1064. % Read the last existing aux file, if any.  No error if none exists.
  1065. %
  1066. deftryauxfile{%
  1067.   openin 1 jobname.aux
  1068.   ifeof 1 else
  1069.     readdatafile{aux}%
  1070.     globalhavexrefstrue
  1071.   fi
  1072.   closein 1
  1073. }
  1074. defsetupdatafile{%
  1075.   catcode`^^@=other
  1076.   catcode`^^A=other
  1077.   catcode`^^B=other
  1078.   catcode`^^C=other
  1079.   catcode`^^D=other
  1080.   catcode`^^E=other
  1081.   catcode`^^F=other
  1082.   catcode`^^G=other
  1083.   catcode`^^H=other
  1084.   catcode`^^K=other
  1085.   catcode`^^L=other
  1086.   catcode`^^N=other
  1087.   catcode`^^P=other
  1088.   catcode`^^Q=other
  1089.   catcode`^^R=other
  1090.   catcode`^^S=other
  1091.   catcode`^^T=other
  1092.   catcode`^^U=other
  1093.   catcode`^^V=other
  1094.   catcode`^^W=other
  1095.   catcode`^^X=other
  1096.   catcode`^^Z=other
  1097.   catcode`^^[=other
  1098.   catcode`^^=other
  1099.   catcode`^^]=other
  1100.   catcode`^^^=other
  1101.   catcode`^^_=other
  1102.   % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc.
  1103.   % in xref tags, i.e., node names.  But since ^^e4 notation isn't
  1104.   % supported in the main text, it doesn't seem desirable.  Furthermore,
  1105.   % that is not enough: for node names that actually contain a ^
  1106.   % character, we would end up writing a line like this: 'xrdef {'hat
  1107.   % b-title}{'hat b} and xrdef does a csname...endcsname on the first
  1108.   % argument, and hat is not an expandable control sequence.  It could
  1109.   % all be worked out, but why?  Either we support ^^ or we don't.
  1110.   %
  1111.   % The other change necessary for this was to define auxhat:
  1112.   % defauxhat{def^{'hat }}% extra space so ok if followed by letter
  1113.   % and then to call auxhat in setq.
  1114.   %
  1115.   catcode`^=other
  1116.   %
  1117.   % Special characters.  Should be turned off anyway, but...
  1118.   catcode`~=other
  1119.   catcode`[=other
  1120.   catcode`]=other
  1121.   catcode`"=other
  1122.   catcode`_=other
  1123.   catcode`|=other
  1124.   catcode`<=other
  1125.   catcode`>=other
  1126.   catcode`$=other
  1127.   catcode`#=other
  1128.   catcode`&=other
  1129.   catcode`%=other
  1130.   catcode`+=other % avoid + for paranoia even though we've turned it off
  1131.   %
  1132.   % This is to support  in node names and titles, since the 
  1133.   % characters end up in a csname.  It's easier than
  1134.   % leaving it active and making its active definition an actual 
  1135.   % character.  What I don't understand is why it works in the *value*
  1136.   % of the xrdef.  Seems like it should be a catcode12 , and that
  1137.   % should not typeset properly.  But it works, so I'm moving on for
  1138.   % now.  --karl, 15jan04.
  1139.   catcode`\=other
  1140.   %
  1141.   % Make the characters 128-255 be printing characters.
  1142.   {%
  1143.     count1=128
  1144.     defloop{%
  1145.       catcodecount1=other
  1146.       advancecount1 by 1
  1147.       ifnum count1<256 loop fi
  1148.     }%
  1149.   }%
  1150.   %
  1151.   % @ is our escape character in .aux files, and we need braces.
  1152.   catcode`{=1
  1153.   catcode`}=2
  1154.   catcode`@=0
  1155. }
  1156. defreaddatafile#1{%
  1157. begingroup
  1158.   setupdatafile
  1159.   inputjobname.#1
  1160. endgroup}
  1161. message{insertions,}
  1162. % including footnotes.
  1163. newcount footnoteno
  1164. % The trailing space in the following definition for supereject is
  1165. % vital for proper filling; pages come out unaligned when you do a
  1166. % pagealignmacro call if that space before the closing brace is
  1167. % removed. (Generally, numeric constants should always be followed by a
  1168. % space to prevent strange expansion errors.)
  1169. defsupereject{parpenalty -20000footnoteno =0 }
  1170. % @footnotestyle is meaningful for info output only.
  1171. letfootnotestyle=comment
  1172. {catcode `@=11
  1173. %
  1174. % Auto-number footnotes.  Otherwise like plain.
  1175. gdeffootnote{%
  1176.   letindent=ptexindent
  1177.   letnoindent=ptexnoindent
  1178.   globaladvancefootnoteno by @ne
  1179.   edefthisfootno{$^{thefootnoteno}$}%
  1180.   %
  1181.   % In case the footnote comes at the end of a sentence, preserve the
  1182.   % extra spacing after we do the footnote number.
  1183.   let@sfempty
  1184.   ifhmodeedef@sf{spacefactorthespacefactor}ptexslashfi
  1185.   %
  1186.   % Remove inadvertent blank space before typesetting the footnote number.
  1187.   unskip
  1188.   thisfootno@sf
  1189.   dofootnote
  1190. }%
  1191. % Don't bother with the trickery in plain.tex to not require the
  1192. % footnote text as a parameter.  Our footnotes don't need to be so general.
  1193. %
  1194. % Oh yes, they do; otherwise, @ifset (and anything else that uses
  1195. % parseargline) fails inside footnotes because the tokens are fixed when
  1196. % the footnote is read.  --karl, 16nov96.
  1197. %
  1198. gdefdofootnote{%
  1199.   insertfootinsbgroup
  1200.   % We want to typeset this text as a normal paragraph, even if the
  1201.   % footnote reference occurs in (for example) a display environment.
  1202.   % So reset some parameters.
  1203.   hsize=pagewidth
  1204.   interlinepenaltyinterfootnotelinepenalty
  1205.   splittopskiphtstrutbox % top baseline for broken footnotes
  1206.   splitmaxdepthdpstrutbox
  1207.   floatingpenalty@MM
  1208.   leftskipz@skip
  1209.   rightskipz@skip
  1210.   spaceskipz@skip
  1211.   xspaceskipz@skip
  1212.   parindentdefaultparindent
  1213.   %
  1214.   smallfonts rm
  1215.   %
  1216.   % Because we use hanging indentation in footnotes, a @noindent appears
  1217.   % to exdent this text, so make it be a no-op.  makeinfo does not use
  1218.   % hanging indentation so @noindent can still be needed within footnote
  1219.   % text after an @example or the like (not that this is good style).
  1220.   letnoindent = relax
  1221.   %
  1222.   % Hang the footnote text off the number.  Use everypar in case the
  1223.   % footnote extends for more than one paragraph.
  1224.   everypar = {hang}%
  1225.   textindent{thisfootno}%
  1226.   %
  1227.   % Don't crash into the line above the footnote text.  Since this
  1228.   % expands into a box, it must come within the paragraph, lest it
  1229.   % provide a place where TeX can split the footnote.
  1230.   footstrut
  1231.   futureletnextfo@t
  1232. }
  1233. }%end catcode `@=11
  1234. % In case a @footnote appears in a vbox, save the footnote text and create
  1235. % the real insert just after the vbox finished.  Otherwise, the insertion
  1236. % would be lost.
  1237. % Similarly, if a @footnote appears inside an alignment, save the footnote
  1238. % text to a box and make the insert when a row of the table is finished.
  1239. % And the same can be done for other insert classes.  --kasal, 16nov03.
  1240. % Replace the insert primitive by a cheating macro.
  1241. % Deeper inside, just make sure that the saved insertions are not spilled
  1242. % out prematurely.
  1243. %
  1244. defstartsavinginserts{%
  1245.   ifx insertptexinsert
  1246.     letinsertsaveinsert
  1247.   else
  1248.     letcheckinsertsrelax
  1249.   fi
  1250. }
  1251. % This insert replacement works for both insertfootins{foo} and
  1252. % insertfootinsbgroup fooegroup, but it doesn't work for insert27{foo}.
  1253. %
  1254. defsaveinsert#1{%
  1255.   edefnext{noexpandsavetobox makeSAVEname#1}%
  1256.   afterassignmentnext
  1257.   % swallow the left brace
  1258.   lettemp =
  1259. }
  1260. defmakeSAVEname#1{makecsname{SAVEexpandaftergobblestring#1}}
  1261. defsavetobox#1{globalsetbox#1 = vboxbgroup unvbox#1}
  1262. defchecksaveins#1{ifvoid#1else placesaveins#1fi}
  1263. defplacesaveins#1{%
  1264.   ptexinsert csnameexpandaftergobblesavestring#1endcsname
  1265.     {box#1}%
  1266. }
  1267. % eat @SAVE -- beware, all of them have catcode other:
  1268. {
  1269.   defdospecials{do Sdo Ado Vdo E} uncatcodespecials  %  ;-)
  1270.   gdefgobblesave @SAVE{}
  1271. }
  1272. % initialization:
  1273. defnewsaveins #1{%
  1274.   edefnext{noexpandnewsaveinsX makeSAVEname#1}%
  1275.   next
  1276. }
  1277. defnewsaveinsX #1{%
  1278.   csname newboxendcsname #1%
  1279.   expandafterdefexpandaftercheckinsertsexpandafter{checkinserts
  1280.     checksaveins #1}%
  1281. }
  1282. % initialize:
  1283. letcheckinsertsempty
  1284. newsaveinsfootins
  1285. newsaveinsmargin
  1286. % @image.  We use the macros from epsf.tex to support this.
  1287. % If epsf.tex is not installed and @image is used, we complain.
  1288. %
  1289. % Check for and read epsf.tex up front.  If we read it only at @image
  1290. % time, we might be inside a group, and then its definitions would get
  1291. % undone and the next image would fail.
  1292. openin 1 = epsf.tex
  1293. ifeof 1 else
  1294.   % Do not bother showing banner with epsf.tex v2.7k (available in
  1295.   % doc/epsf.tex and on ctan).
  1296.   defepsfannounce{toks0 = }%
  1297.   input epsf.tex
  1298. fi
  1299. closein 1
  1300. %
  1301. % We will only complain once about lack of epsf.tex.
  1302. newififwarnednoepsf
  1303. newhelpnoepsfhelp{epsf.tex must be installed for images to
  1304.   work.  It is also included in the Texinfo distribution, or you can get
  1305.   it from ftp://tug.org/tex/epsf.tex.}
  1306. %
  1307. defimage#1{%
  1308.   ifxepsfboxundefined
  1309.     ifwarnednoepsf else
  1310.       errhelp = noepsfhelp
  1311.       errmessage{epsf.tex not found, images will be ignored}%
  1312.       globalwarnednoepsftrue
  1313.     fi
  1314.   else
  1315.     imagexxx #1,,,,,finish
  1316.   fi
  1317. }
  1318. %
  1319. % Arguments to @image:
  1320. % #1 is (mandatory) image filename; we tack on .eps extension.
  1321. % #2 is (optional) width, #3 is (optional) height.
  1322. % #4 is (ignored optional) html alt text.
  1323. % #5 is (ignored optional) extension.
  1324. % #6 is just the usual extra ignored arg for parsing this stuff.
  1325. newififimagevmode
  1326. defimagexxx#1,#2,#3,#4,#5,#6finish{begingroup
  1327.   catcode`^^M = 5     % in case we're inside an example
  1328.   normalturnoffactive  % allow _ et al. in names
  1329.   % If the image is by itself, center it.
  1330.   ifvmode
  1331.     imagevmodetrue
  1332.     nobreakmedskip
  1333.     % Usually we'll have text after the image which will insert
  1334.     % parskip glue, so insert it here too to equalize the space
  1335.     % above and below.
  1336.     nobreakvskipparskip
  1337.     nobreak
  1338.   fi
  1339.   %
  1340.   % Leave vertical mode so that indentation from an enclosing
  1341.   % environment such as @quotation is respected.  On the other hand, if
  1342.   % it's at the top level, we don't want the normal paragraph indentation.
  1343.   noindent
  1344.   %
  1345.   % Output the image.
  1346.   ifpdf
  1347.     dopdfimage{#1}{#2}{#3}%
  1348.   else
  1349.     % epsfbox itself resets epsf?size at each figure.
  1350.     setbox0 = hbox{ignorespaces #2}ifdimwd0 > 0pt epsfxsize=#2relax fi
  1351.     setbox0 = hbox{ignorespaces #3}ifdimwd0 > 0pt epsfysize=#3relax fi
  1352.     epsfbox{#1.eps}%
  1353.   fi
  1354.   %
  1355.   ifimagevmode medskip fi  % space after the standalone image
  1356. endgroup}
  1357. % @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables,
  1358. % etc.  We don't actually implement floating yet, we always include the
  1359. % float "here".  But it seemed the best name for the future.
  1360. %
  1361. envparseargdeffloat{eatcommaspaceeatcommaspacedofloat#1, , ,finish}
  1362. % There may be a space before second and/or third parameter; delete it.
  1363. defeatcommaspace#1, {#1,}
  1364. % #1 is the optional FLOATTYPE, the text label for this float, typically
  1365. % "Figure", "Table", "Example", etc.  Can't contain commas.  If omitted,
  1366. % this float will not be numbered and cannot be referred to.
  1367. %
  1368. % #2 is the optional xref label.  Also must be present for the float to
  1369. % be referable.
  1370. %
  1371. % #3 is the optional positioning argument; for now, it is ignored.  It
  1372. % will somehow specify the positions allowed to float to (here, top, bottom).
  1373. %
  1374. % We keep a separate counter for each FLOATTYPE, which we reset at each
  1375. % chapter-level command.
  1376. letresetallfloatnos=empty
  1377. %
  1378. defdofloat#1,#2,#3,#4finish{%
  1379.   letthiscaption=empty
  1380.   letthisshortcaption=empty
  1381.   %
  1382.   % don't lose footnotes inside @float.
  1383.   %
  1384.   % BEWARE: when the floats start float, we have to issue warning whenever an
  1385.   % insert appears inside a float which could possibly float. --kasal, 26may04
  1386.   %
  1387.   startsavinginserts
  1388.   %
  1389.   % We can't be used inside a paragraph.
  1390.   par
  1391.   %
  1392.   vtopbgroup
  1393.     deffloattype{#1}%
  1394.     deffloatlabel{#2}%
  1395.     deffloatloc{#3}% we do nothing with this yet.
  1396.     %
  1397.     ifxfloattypeempty
  1398.       letsafefloattype=empty
  1399.     else
  1400.       {%
  1401.         % the floattype might have accents or other special characters,
  1402.         % but we need to use it in a control sequence name.
  1403.         indexnofonts
  1404.         turnoffactive
  1405.         xdefsafefloattype{floattype}%
  1406.       }%
  1407.     fi
  1408.     %
  1409.     % If label is given but no type, we handle that as the empty type.
  1410.     ifxfloatlabelempty else
  1411.       % We want each FLOATTYPE to be numbered separately (Figure 1,
  1412.       % Table 1, Figure 2, ...).  (And if no label, no number.)
  1413.       %
  1414.       expandaftergetfloatnocsnamesafefloattype floatnoendcsname
  1415.       globaladvancefloatno by 1
  1416.       %
  1417.       {%
  1418.         % This magic value for lastsection is output by setref as the
  1419.         % XREFLABEL-title value.  xrefX uses it to distinguish float
  1420.         % labels (which have a completely different output format) from
  1421.         % node and anchor labels.  And xrdef uses it to construct the
  1422.         % lists of floats.
  1423.         %
  1424.         edeflastsection{floatmagic=safefloattype}%
  1425.         setref{floatlabel}{Yfloat}%
  1426.       }%
  1427.     fi
  1428.     %
  1429.     % start with parskip glue, I guess.
  1430.     vskipparskip
  1431.     %
  1432.     % Don't suppress indentation if a float happens to start a section.
  1433.     restorefirstparagraphindent
  1434. }
  1435. % we have these possibilities:
  1436. % @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap
  1437. % @float Foo,lbl & no caption:    Foo 1.1
  1438. % @float Foo & @caption{Cap}:     Foo: Cap
  1439. % @float Foo & no caption:        Foo
  1440. % @float ,lbl & Caption{Cap}:     1.1: Cap
  1441. % @float ,lbl & no caption:       1.1
  1442. % @float & @caption{Cap}:         Cap
  1443. % @float & no caption:
  1444. %
  1445. defEfloat{%
  1446.     letfloatident = empty
  1447.     %
  1448.     % In all cases, if we have a float type, it comes first.
  1449.     ifxfloattypeempty else deffloatident{floattype}fi
  1450.     %
  1451.     % If we have an xref label, the number comes next.
  1452.     ifxfloatlabelempty else
  1453.       ifxfloattypeempty else % if also had float type, need tie first.
  1454.         appendtomacrofloatident{tie}%
  1455.       fi
  1456.       % the number.
  1457.       appendtomacrofloatident{chaplevelprefixthefloatno}%
  1458.     fi
  1459.     %
  1460.     % Start the printed caption with what we've constructed in
  1461.     % floatident, but keep it separate; we need floatident again.
  1462.     letcaptionline = floatident
  1463.     %
  1464.     ifxthiscaptionempty else
  1465.       ifxfloatidentempty else
  1466. appendtomacrocaptionline{: }% had ident, so need a colon between
  1467.       fi
  1468.       %
  1469.       % caption text.
  1470.       appendtomacrocaptionline{scanexpthiscaption}%
  1471.     fi
  1472.     %
  1473.     % If we have anything to print, print it, with space before.
  1474.     % Eventually this needs to become an insert.
  1475.     ifxcaptionlineempty else
  1476.       vskip.5parskip
  1477.       captionline
  1478.       %
  1479.       % Space below caption.
  1480.       vskipparskip
  1481.     fi
  1482.     %
  1483.     % If have an xref label, write the list of floats info.  Do this
  1484.     % after the caption, to avoid chance of it being a breakpoint.
  1485.     ifxfloatlabelempty else
  1486.       % Write the text that goes in the lof to the aux file as
  1487.       % floatlabel-lof.  Besides floatident, we include the short
  1488.       % caption if specified, else the full caption if specified, else nothing.
  1489.       {%
  1490.         atdummies
  1491.         %
  1492.         % since we read the caption text in the macro world, where ^^M
  1493.         % is turned into a normal character, we have to scan it back, so
  1494.         % we don't write the literal three characters "^^M" into the aux file.
  1495. scanexp{%
  1496.   xdefnoexpandgtemp{%
  1497.     ifxthisshortcaptionempty
  1498.       thiscaption
  1499.     else
  1500.       thisshortcaption
  1501.     fi
  1502.   }%
  1503. }%
  1504.         immediatewriteauxfile{@xrdef{floatlabel-lof}{floatident
  1505.   ifxgtempempty else : gtemp fi}}%
  1506.       }%
  1507.     fi
  1508.   egroup  % end of vtop
  1509.   %
  1510.   % place the captured inserts
  1511.   %
  1512.   % BEWARE: when the floats start floating, we have to issue warning
  1513.   % whenever an insert appears inside a float which could possibly
  1514.   % float. --kasal, 26may04
  1515.   %
  1516.   checkinserts
  1517. }
  1518. % Append the tokens #2 to the definition of macro #1, not expanding either.
  1519. %
  1520. defappendtomacro#1#2{%
  1521.   expandafterdefexpandafter#1expandafter{#1#2}%
  1522. }
  1523. % @caption, @shortcaption
  1524. %
  1525. defcaption{docaptionthiscaption}
  1526. defshortcaption{docaptionthisshortcaption}
  1527. defdocaption{checkenvfloat bgroupscanargctxtdefcaption}
  1528. defdefcaption#1#2{egroup def#1{#2}}
  1529. % The parameter is the control sequence identifying the counter we are
  1530. % going to use.  Create it if it doesn't exist and assign it to floatno.
  1531. defgetfloatno#1{%
  1532.   ifx#1relax
  1533.       % Haven't seen this figure type before.
  1534.       csname newcountendcsname #1%
  1535.       %
  1536.       % Remember to reset this floatno at the next chap.
  1537.       expandaftergdefexpandafterresetallfloatnos
  1538.         expandafter{resetallfloatnos #1=0 }%
  1539.   fi
  1540.   letfloatno#1%
  1541. }
  1542. % setref calls this to get the XREFLABEL-snt value.  We want an @xref
  1543. % to the FLOATLABEL to expand to "Figure 3.1".  We call setref when we
  1544. % first read the @float command.
  1545. %
  1546. defYfloat{floattype@tie chaplevelprefixthefloatno}%
  1547. % Magic string used for the XREFLABEL-title value, so xrefX can
  1548. % distinguish floats from other xref types.
  1549. deffloatmagic{!!float!!}
  1550. % #1 is the control sequence we are passed; we expand into a conditional
  1551. % which is true if #1 represents a float ref.  That is, the magic
  1552. % lastsection value which we setref above.
  1553. %
  1554. defiffloat#1{expandafterdoiffloat#1==finish}
  1555. %
  1556. % #1 is (maybe) the floatmagic string.  If so, #2 will be the
  1557. % (safe) float type for this float.  We set iffloattype to #2.
  1558. %
  1559. defdoiffloat#1=#2=#3finish{%
  1560.   deftemp{#1}%
  1561.   defiffloattype{#2}%
  1562.   ifxtempfloatmagic
  1563. }
  1564. % @listoffloats FLOATTYPE - print a list of floats like a table of contents.
  1565. %
  1566. parseargdeflistoffloats{%
  1567.   deffloattype{#1}% floattype
  1568.   {%
  1569.     % the floattype might have accents or other special characters,
  1570.     % but we need to use it in a control sequence name.
  1571.     indexnofonts
  1572.     turnoffactive
  1573.     xdefsafefloattype{floattype}%
  1574.   }%
  1575.   %
  1576.   % xrdef saves the floats as a do-list in floatlistSAFEFLOATTYPE.
  1577.   expandafterifxcsname floatlistsafefloattypeendcsname relax
  1578.     ifhavexrefs
  1579.       % if the user said @listoffloats foo but never @float foo.
  1580.       message{linenumber No `safefloattype' floats to list.}%
  1581.     fi
  1582.   else
  1583.     begingroup
  1584.       leftskip=tocindent  % indent these entries like a toc
  1585.       letdo=listoffloatsdo
  1586.       csname floatlistsafefloattypeendcsname
  1587.     endgroup
  1588.   fi
  1589. }
  1590. % This is called on each entry in a list of floats.  We're passed the
  1591. % xref label, in the form LABEL-title, which is how we save it in the
  1592. % aux file.  We strip off the -title and look up XRLABEL-lof, which
  1593. % has the text we're supposed to typeset here.
  1594. %
  1595. % Figures without xref labels will not be included in the list (since
  1596. % they won't appear in the aux file).
  1597. %
  1598. deflistoffloatsdo#1{listoffloatsdoentry#1finish}
  1599. deflistoffloatsdoentry#1-titlefinish{{%
  1600.   % Can't fully expand XR#1-lof because it can contain anything.  Just
  1601.   % pass the control sequence.  On the other hand, XR#1-pg is just the
  1602.   % page number, and we want to fully expand that so we can get a link
  1603.   % in pdf output.
  1604.   toksA = expandafter{csname XR#1-lofendcsname}%
  1605.   %
  1606.   % use the same entry macro we use to generate the TOC and index.
  1607.   edefwriteentry{noexpandentry{thetoksA}{csname XR#1-pgendcsname}}%
  1608.   writeentry
  1609. }}
  1610. message{localization,}
  1611. % @documentlanguage is usually given very early, just after
  1612. % @setfilename.  If done too late, it may not override everything
  1613. % properly.  Single argument is the language (de) or locale (de_DE)
  1614. % abbreviation.  It would be nice if we could set up a hyphenation file.
  1615. %
  1616. {
  1617.   catcode`_ = active
  1618.   globaldefs=1
  1619. parseargdefdocumentlanguage{begingroup
  1620.   let_=normalunderscore  % normal _ character for filenames
  1621.   tex % read txi-??.tex file in plain TeX.
  1622.     % Read the file by the name they passed if it exists.
  1623.     openin 1 txi-#1.tex
  1624.     ifeof 1
  1625.       documentlanguagetrywithoutunderscore{#1_finish}%
  1626.     else
  1627.       input txi-#1.tex
  1628.     fi
  1629.     closein 1
  1630.   endgroup
  1631. endgroup}
  1632. }
  1633. %
  1634. % If they passed de_DE, and txi-de_DE.tex doesn't exist,
  1635. % try txi-de.tex.
  1636. defdocumentlanguagetrywithoutunderscore#1_#2finish{%
  1637.   openin 1 txi-#1.tex
  1638.   ifeof 1
  1639.     errhelp = nolanghelp
  1640.     errmessage{Cannot read language file txi-#1.tex}%
  1641.   else
  1642.     input txi-#1.tex
  1643.   fi
  1644.   closein 1
  1645. }
  1646. %
  1647. newhelpnolanghelp{The given language definition file cannot be found or
  1648. is empty.  Maybe you need to install it?  In the current directory
  1649. should work if nowhere else does.}
  1650. % Set the catcode of characters 128 through 255 to the specified number.
  1651. %
  1652. defsetnonasciicharscatcode#1{%
  1653.    count255=128
  1654.    loopifnumcount255<256
  1655.       globalcatcodecount255=#1relax
  1656.       advancecount255 by 1
  1657.    repeat
  1658. }
  1659. defsetnonasciicharscatcodenonglobal#1{%
  1660.    count255=128
  1661.    loopifnumcount255<256
  1662.       catcodecount255=#1relax
  1663.       advancecount255 by 1
  1664.    repeat
  1665. }
  1666. % @documentencoding sets the definition of non-ASCII characters
  1667. % according to the specified encoding.
  1668. %
  1669. parseargdefdocumentencoding{%
  1670.   % Encoding being declared for the document.
  1671.   defdeclaredencoding{csname #1.encendcsname}%
  1672.   %
  1673.   % Supported encodings: names converted to tokens in order to be able
  1674.   % to compare them with ifx.
  1675.   defascii{csname US-ASCII.encendcsname}%
  1676.   deflatnine{csname ISO-8859-15.encendcsname}%
  1677.   deflatone{csname ISO-8859-1.encendcsname}%
  1678.   deflattwo{csname ISO-8859-2.encendcsname}%
  1679.   defutfeight{csname UTF-8.encendcsname}%
  1680.   %
  1681.   ifx declaredencoding ascii
  1682.      asciichardefs
  1683.   %
  1684.   else ifx declaredencoding lattwo
  1685.      setnonasciicharscatcodeactive
  1686.      lattwochardefs
  1687.   %
  1688.   else ifx declaredencoding latone 
  1689.      setnonasciicharscatcodeactive
  1690.      latonechardefs
  1691.   %
  1692.   else ifx declaredencoding latnine
  1693.      setnonasciicharscatcodeactive
  1694.      latninechardefs
  1695.   %
  1696.   else ifx declaredencoding utfeight
  1697.      setnonasciicharscatcodeactive
  1698.      utfeightchardefs
  1699.   %
  1700.   else 
  1701.     message{Unknown document encoding #1, ignoring.}%
  1702.   %
  1703.   fi % utfeight
  1704.   fi % latnine
  1705.   fi % latone
  1706.   fi % lattwo
  1707.   fi % ascii
  1708. }
  1709. % A message to be logged when using a character that isn't available
  1710. % the default font encoding (OT1).
  1711. defmissingcharmsg#1{message{Character missing in OT1 encoding: #1.}}
  1712. % Take account of c (plain) vs. , (Texinfo) difference.
  1713. defcedilla#1{ifxcptexcc{#1}else,{#1}fi}
  1714. % First, make active non-ASCII characters in order for them to be
  1715. % correctly categorized when TeX reads the replacement text of
  1716. % macros containing the character definitions.
  1717. setnonasciicharscatcodeactive
  1718. %
  1719. % Latin1 (ISO-8859-1) character definitions.
  1720. deflatonechardefs{%
  1721.   gdef^^a0{~} 
  1722.   gdef^^a1{exclamdown}
  1723.   gdef^^a2{missingcharmsg{CENT SIGN}} 
  1724.   gdef^^a3{{pounds}}
  1725.   gdef^^a4{missingcharmsg{CURRENCY SIGN}}
  1726.   gdef^^a5{missingcharmsg{YEN SIGN}}
  1727.   gdef^^a6{missingcharmsg{BROKEN BAR}} 
  1728.   gdef^^a7{S}
  1729.   gdef^^a8{"{}} 
  1730.   gdef^^a9{copyright} 
  1731.   gdef^^aa{ordf}
  1732.   gdef^^ab{missingcharmsg{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}} 
  1733.   gdef^^ac{$lnot$}
  1734.   gdef^^ad{-} 
  1735.   gdef^^ae{registeredsymbol} 
  1736.   gdef^^af{={}}
  1737.   %
  1738.   gdef^^b0{textdegree}
  1739.   gdef^^b1{$pm$}
  1740.   gdef^^b2{$^2$}
  1741.   gdef^^b3{$^3$}
  1742.   gdef^^b4{'{}}
  1743.   gdef^^b5{$mu$}
  1744.   gdef^^b6{P}
  1745.   %
  1746.   gdef^^b7{$^.$}
  1747.   gdef^^b8{cedilla }
  1748.   gdef^^b9{$^1$}
  1749.   gdef^^ba{ordm}
  1750.   %
  1751.   gdef^^bb{missingcharmsg{RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK}}
  1752.   gdef^^bc{$1over4$}
  1753.   gdef^^bd{$1over2$}
  1754.   gdef^^be{$3over4$}
  1755.   gdef^^bf{questiondown}
  1756.   %
  1757.   gdef^^c0{`A}
  1758.   gdef^^c1{'A}
  1759.   gdef^^c2{^A}
  1760.   gdef^^c3{~A}
  1761.   gdef^^c4{"A}
  1762.   gdef^^c5{ringaccent A} 
  1763.   gdef^^c6{AE}
  1764.   gdef^^c7{cedilla C}
  1765.   gdef^^c8{`E}
  1766.   gdef^^c9{'E}
  1767.   gdef^^ca{^E}
  1768.   gdef^^cb{"E}
  1769.   gdef^^cc{`I}
  1770.   gdef^^cd{'I}
  1771.   gdef^^ce{^I}
  1772.   gdef^^cf{"I}
  1773.   %
  1774.   gdef^^d0{missingcharmsg{LATIN CAPITAL LETTER ETH}}
  1775.   gdef^^d1{~N}
  1776.   gdef^^d2{`O}
  1777.   gdef^^d3{'O}
  1778.   gdef^^d4{^O}
  1779.   gdef^^d5{~O}
  1780.   gdef^^d6{"O}
  1781.   gdef^^d7{$times$}
  1782.   gdef^^d8{O}
  1783.   gdef^^d9{`U}
  1784.   gdef^^da{'U}
  1785.   gdef^^db{^U}
  1786.   gdef^^dc{"U}
  1787.   gdef^^dd{'Y}
  1788.   gdef^^de{missingcharmsg{LATIN CAPITAL LETTER THORN}}
  1789.   gdef^^df{ss}
  1790.   %
  1791.   gdef^^e0{`a}
  1792.   gdef^^e1{'a}
  1793.   gdef^^e2{^a}
  1794.   gdef^^e3{~a}
  1795.   gdef^^e4{"a}
  1796.   gdef^^e5{ringaccent a}
  1797.   gdef^^e6{ae}
  1798.   gdef^^e7{cedilla c}
  1799.   gdef^^e8{`e}
  1800.   gdef^^e9{'e}
  1801.   gdef^^ea{^e}
  1802.   gdef^^eb{"e}
  1803.   gdef^^ec{`{dotless i}}
  1804.   gdef^^ed{'{dotless i}}
  1805.   gdef^^ee{^{dotless i}}
  1806.   gdef^^ef{"{dotless i}}
  1807.   %
  1808.   gdef^^f0{missingcharmsg{LATIN SMALL LETTER ETH}}
  1809.   gdef^^f1{~n}
  1810.   gdef^^f2{`o}
  1811.   gdef^^f3{'o}
  1812.   gdef^^f4{^o}
  1813.   gdef^^f5{~o}
  1814.   gdef^^f6{"o}
  1815.   gdef^^f7{$div$}
  1816.   gdef^^f8{o}
  1817.   gdef^^f9{`u}
  1818.   gdef^^fa{'u}
  1819.   gdef^^fb{^u}
  1820.   gdef^^fc{"u}
  1821.   gdef^^fd{'y}
  1822.   gdef^^fe{missingcharmsg{LATIN SMALL LETTER THORN}}
  1823.   gdef^^ff{"y}
  1824. }
  1825. % Latin9 (ISO-8859-15) encoding character definitions.
  1826. deflatninechardefs{%
  1827.   % Encoding is almost identical to Latin1.
  1828.   latonechardefs
  1829.   %
  1830.   gdef^^a4{euro}
  1831.   gdef^^a6{v S}
  1832.   gdef^^a8{v s}
  1833.   gdef^^b4{v Z}
  1834.   gdef^^b8{v z}
  1835.   gdef^^bc{OE}
  1836.   gdef^^bd{oe}
  1837.   gdef^^be{"Y}
  1838. }
  1839. % Latin2 (ISO-8859-2) character definitions.
  1840. deflattwochardefs{%
  1841.   gdef^^a0{~}
  1842.   gdef^^a1{missingcharmsg{LATIN CAPITAL LETTER A WITH OGONEK}}
  1843.   gdef^^a2{u{}}
  1844.   gdef^^a3{L}
  1845.   gdef^^a4{missingcharmsg{CURRENCY SIGN}}
  1846.   gdef^^a5{v L}
  1847.   gdef^^a6{'S}
  1848.   gdef^^a7{S}
  1849.   gdef^^a8{"{}}
  1850.   gdef^^a9{v S}
  1851.   gdef^^aa{cedilla S}
  1852.   gdef^^ab{v T}
  1853.   gdef^^ac{'Z}
  1854.   gdef^^ad{-}
  1855.   gdef^^ae{v Z}
  1856.   gdef^^af{dotaccent Z}
  1857.   %
  1858.   gdef^^b0{textdegree}
  1859.   gdef^^b1{missingcharmsg{LATIN SMALL LETTER A WITH OGONEK}}
  1860.   gdef^^b2{missingcharmsg{OGONEK}}
  1861.   gdef^^b3{l}
  1862.   gdef^^b4{'{}}
  1863.   gdef^^b5{v l}
  1864.   gdef^^b6{'s}
  1865.   gdef^^b7{v{}}
  1866.   gdef^^b8{cedilla }
  1867.   gdef^^b9{v s}
  1868.   gdef^^ba{cedilla s}
  1869.   gdef^^bb{v t}
  1870.   gdef^^bc{'z}
  1871.   gdef^^bd{H{}}
  1872.   gdef^^be{v z}
  1873.   gdef^^bf{dotaccent z}
  1874.   %
  1875.   gdef^^c0{'R}
  1876.   gdef^^c1{'A}
  1877.   gdef^^c2{^A}
  1878.   gdef^^c3{u A}
  1879.   gdef^^c4{"A}
  1880.   gdef^^c5{'L}
  1881.   gdef^^c6{'C}
  1882.   gdef^^c7{cedilla C}
  1883.   gdef^^c8{v C}
  1884.   gdef^^c9{'E}
  1885.   gdef^^ca{missingcharmsg{LATIN CAPITAL LETTER E WITH OGONEK}}
  1886.   gdef^^cb{"E}
  1887.   gdef^^cc{v E}
  1888.   gdef^^cd{'I}
  1889.   gdef^^ce{^I}
  1890.   gdef^^cf{v D}
  1891.   %
  1892.   gdef^^d0{missingcharmsg{LATIN CAPITAL LETTER D WITH STROKE}}
  1893.   gdef^^d1{'N}
  1894.   gdef^^d2{v N}
  1895.   gdef^^d3{'O}
  1896.   gdef^^d4{^O}
  1897.   gdef^^d5{H O}
  1898.   gdef^^d6{"O}
  1899.   gdef^^d7{$times$}
  1900.   gdef^^d8{v R}
  1901.   gdef^^d9{ringaccent U} 
  1902.   gdef^^da{'U}
  1903.   gdef^^db{H U}
  1904.   gdef^^dc{"U}
  1905.   gdef^^dd{'Y}
  1906.   gdef^^de{cedilla T}
  1907.   gdef^^df{ss}
  1908.   %
  1909.   gdef^^e0{'r}
  1910.   gdef^^e1{'a}
  1911.   gdef^^e2{^a}
  1912.   gdef^^e3{u a}
  1913.   gdef^^e4{"a}
  1914.   gdef^^e5{'l}
  1915.   gdef^^e6{'c}
  1916.   gdef^^e7{cedilla c}
  1917.   gdef^^e8{v c}
  1918.   gdef^^e9{'e}
  1919.   gdef^^ea{missingcharmsg{LATIN SMALL LETTER E WITH OGONEK}}
  1920.   gdef^^eb{"e}
  1921.   gdef^^ec{v e}
  1922.   gdef^^ed{'i}
  1923.   gdef^^ee{^i}
  1924.   gdef^^ef{v d}
  1925.   %
  1926.   gdef^^f0{missingcharmsg{LATIN SMALL LETTER D WITH STROKE}}
  1927.   gdef^^f1{'n}
  1928.   gdef^^f2{v n}
  1929.   gdef^^f3{'o}
  1930.   gdef^^f4{^o}
  1931.   gdef^^f5{H o}
  1932.   gdef^^f6{"o}
  1933.   gdef^^f7{$div$}
  1934.   gdef^^f8{v r}
  1935.   gdef^^f9{ringaccent u}
  1936.   gdef^^fa{'u}
  1937.   gdef^^fb{H u}
  1938.   gdef^^fc{"u}
  1939.   gdef^^fd{'y}
  1940.   gdef^^fe{cedilla t}
  1941.   gdef^^ff{dotaccent{}}
  1942. }
  1943. % UTF-8 character definitions.
  1944. % This code to support UTF-8 is based on LaTeX's utf8.def, with some
  1945. % changes for Texinfo conventions.  It is included here under the GPL by
  1946. % permission from Frank Mittelbach and the LaTeX team.
  1947. newcountcountUTFx
  1948. newcountcountUTFy
  1949. newcountcountUTFz
  1950. gdefUTFviiiTwoOctets#1#2{expandafter
  1951.    UTFviiiDefinedcsname u8:#1string #2endcsname}
  1952. %
  1953. gdefUTFviiiThreeOctets#1#2#3{expandafter
  1954.    UTFviiiDefinedcsname u8:#1string #2string #3endcsname}
  1955. %
  1956. gdefUTFviiiFourOctets#1#2#3#4{expandafter
  1957.    UTFviiiDefinedcsname u8:#1string #2string #3string #4endcsname}
  1958. gdefUTFviiiDefined#1{%
  1959.   ifx #1relax
  1960.     message{linenumber Unicode char string #1 not defined for Texinfo}%
  1961.   else
  1962.     expandafter #1%
  1963.   fi
  1964. }
  1965. begingroup
  1966.   catcode`~13
  1967.   catcode`"12
  1968.   defUTFviiiLoop{%
  1969.     globalcatcodecountUTFxactive
  1970.     uccode`~countUTFx
  1971.     uppercaseexpandafter{UTFviiiTmp}%
  1972.     advancecountUTFx by 1
  1973.     ifnumcountUTFx < countUTFy
  1974.       expandafterUTFviiiLoop
  1975.     fi}
  1976.   countUTFx = "C2
  1977.   countUTFy = "E0
  1978.   defUTFviiiTmp{%
  1979.     xdef~{noexpandUTFviiiTwoOctetsstring~}}
  1980.   UTFviiiLoop
  1981.   countUTFx = "E0
  1982.   countUTFy = "F0
  1983.   defUTFviiiTmp{%
  1984.     xdef~{noexpandUTFviiiThreeOctetsstring~}}
  1985.   UTFviiiLoop
  1986.   countUTFx = "F0
  1987.   countUTFy = "F4
  1988.   defUTFviiiTmp{%
  1989.     xdef~{noexpandUTFviiiFourOctetsstring~}}
  1990.   UTFviiiLoop
  1991. endgroup
  1992. begingroup
  1993.   catcode`"=12
  1994.   catcode`<=12
  1995.   catcode`.=12
  1996.   catcode`,=12
  1997.   catcode`;=12
  1998.   catcode`!=12
  1999.   catcode`~=13
  2000.   gdefDeclareUnicodeCharacter#1#2{%
  2001.     countUTFz = "#1relax
  2002.     wlog{spacespace defining Unicode char U+#1 (decimal thecountUTFz)}%
  2003.     begingroup
  2004.       parseXMLCharref
  2005.       defUTFviiiTwoOctets##1##2{%
  2006.         csname u8:##1string ##2endcsname}%
  2007.       defUTFviiiThreeOctets##1##2##3{%
  2008.         csname u8:##1string ##2string ##3endcsname}%
  2009.       defUTFviiiFourOctets##1##2##3##4{%
  2010.         csname u8:##1string ##2string ##3string ##4endcsname}%
  2011.       expandafterexpandafterexpandafterexpandafter
  2012.        expandafterexpandafterexpandafter
  2013.        gdefUTFviiiTmp{#2}%
  2014.     endgroup}
  2015.   gdefparseXMLCharref{%
  2016.     ifnumcountUTFz < "A0relax
  2017.       errhelp = EMsimple
  2018.       errmessage{Cannot define Unicode char value < 00A0}%
  2019.     elseifnumcountUTFz < "800relax
  2020.       parseUTFviiiA,%
  2021.       parseUTFviiiB CUTFviiiTwoOctets.,%
  2022.     elseifnumcountUTFz < "10000relax
  2023.       parseUTFviiiA;%
  2024.       parseUTFviiiA,%
  2025.       parseUTFviiiB EUTFviiiThreeOctets.{,;}%
  2026.     else
  2027.       parseUTFviiiA;%
  2028.       parseUTFviiiA,%
  2029.       parseUTFviiiA!%
  2030.       parseUTFviiiB FUTFviiiFourOctets.{!,;}%
  2031.     fififi
  2032.   }
  2033.   gdefparseUTFviiiA#1{%
  2034.     countUTFx = countUTFz
  2035.     dividecountUTFz by 64
  2036.     countUTFy = countUTFz
  2037.     multiplycountUTFz by 64
  2038.     advancecountUTFx by -countUTFz
  2039.     advancecountUTFx by 128
  2040.     uccode `#1countUTFx
  2041.     countUTFz = countUTFy}
  2042.   gdefparseUTFviiiB#1#2#3#4{%
  2043.     advancecountUTFz by "#10relax
  2044.     uccode `#3countUTFz
  2045.     uppercase{gdefUTFviiiTmp{#2#3#4}}}
  2046. endgroup
  2047. defutfeightchardefs{%
  2048.   DeclareUnicodeCharacter{00A0}{tie}
  2049.   DeclareUnicodeCharacter{00A1}{exclamdown}
  2050.   DeclareUnicodeCharacter{00A3}{pounds}
  2051.   DeclareUnicodeCharacter{00A8}{"{ }}
  2052.   DeclareUnicodeCharacter{00A9}{copyright}
  2053.   DeclareUnicodeCharacter{00AA}{ordf}
  2054.   DeclareUnicodeCharacter{00AB}{guillemetleft}
  2055.   DeclareUnicodeCharacter{00AD}{-}
  2056.   DeclareUnicodeCharacter{00AE}{registeredsymbol}
  2057.   DeclareUnicodeCharacter{00AF}{={ }}
  2058.   DeclareUnicodeCharacter{00B0}{ringaccent{ }}
  2059.   DeclareUnicodeCharacter{00B4}{'{ }}
  2060.   DeclareUnicodeCharacter{00B8}{cedilla{ }}
  2061.   DeclareUnicodeCharacter{00BA}{ordm}
  2062.   DeclareUnicodeCharacter{00BB}{guillemetright}
  2063.   DeclareUnicodeCharacter{00BF}{questiondown}
  2064.   DeclareUnicodeCharacter{00C0}{`A}
  2065.   DeclareUnicodeCharacter{00C1}{'A}
  2066.   DeclareUnicodeCharacter{00C2}{^A}
  2067.   DeclareUnicodeCharacter{00C3}{~A}
  2068.   DeclareUnicodeCharacter{00C4}{"A}
  2069.   DeclareUnicodeCharacter{00C5}{AA}
  2070.   DeclareUnicodeCharacter{00C6}{AE}
  2071.   DeclareUnicodeCharacter{00C7}{cedilla{C}}
  2072.   DeclareUnicodeCharacter{00C8}{`E}
  2073.   DeclareUnicodeCharacter{00C9}{'E}
  2074.   DeclareUnicodeCharacter{00CA}{^E}
  2075.   DeclareUnicodeCharacter{00CB}{"E}
  2076.   DeclareUnicodeCharacter{00CC}{`I}
  2077.   DeclareUnicodeCharacter{00CD}{'I}
  2078.   DeclareUnicodeCharacter{00CE}{^I}
  2079.   DeclareUnicodeCharacter{00CF}{"I}
  2080.   DeclareUnicodeCharacter{00D1}{~N}
  2081.   DeclareUnicodeCharacter{00D2}{`O}
  2082.   DeclareUnicodeCharacter{00D3}{'O}
  2083.   DeclareUnicodeCharacter{00D4}{^O}
  2084.   DeclareUnicodeCharacter{00D5}{~O}
  2085.   DeclareUnicodeCharacter{00D6}{"O}
  2086.   DeclareUnicodeCharacter{00D8}{O}
  2087.   DeclareUnicodeCharacter{00D9}{`U}
  2088.   DeclareUnicodeCharacter{00DA}{'U}
  2089.   DeclareUnicodeCharacter{00DB}{^U}
  2090.   DeclareUnicodeCharacter{00DC}{"U}
  2091.   DeclareUnicodeCharacter{00DD}{'Y}
  2092.   DeclareUnicodeCharacter{00DF}{ss}
  2093.   DeclareUnicodeCharacter{00E0}{`a}
  2094.   DeclareUnicodeCharacter{00E1}{'a}
  2095.   DeclareUnicodeCharacter{00E2}{^a}
  2096.   DeclareUnicodeCharacter{00E3}{~a}
  2097.   DeclareUnicodeCharacter{00E4}{"a}
  2098.   DeclareUnicodeCharacter{00E5}{aa}
  2099.   DeclareUnicodeCharacter{00E6}{ae}
  2100.   DeclareUnicodeCharacter{00E7}{cedilla{c}}
  2101.   DeclareUnicodeCharacter{00E8}{`e}
  2102.   DeclareUnicodeCharacter{00E9}{'e}
  2103.   DeclareUnicodeCharacter{00EA}{^e}
  2104.   DeclareUnicodeCharacter{00EB}{"e}
  2105.   DeclareUnicodeCharacter{00EC}{`{dotless{i}}}
  2106.   DeclareUnicodeCharacter{00ED}{'{dotless{i}}}
  2107.   DeclareUnicodeCharacter{00EE}{^{dotless{i}}}
  2108.   DeclareUnicodeCharacter{00EF}{"{dotless{i}}}
  2109.   DeclareUnicodeCharacter{00F1}{~n}
  2110.   DeclareUnicodeCharacter{00F2}{`o}
  2111.   DeclareUnicodeCharacter{00F3}{'o}
  2112.   DeclareUnicodeCharacter{00F4}{^o}
  2113.   DeclareUnicodeCharacter{00F5}{~o}
  2114.   DeclareUnicodeCharacter{00F6}{"o}
  2115.   DeclareUnicodeCharacter{00F8}{o}
  2116.   DeclareUnicodeCharacter{00F9}{`u}
  2117.   DeclareUnicodeCharacter{00FA}{'u}
  2118.   DeclareUnicodeCharacter{00FB}{^u}
  2119.   DeclareUnicodeCharacter{00FC}{"u}
  2120.   DeclareUnicodeCharacter{00FD}{'y}
  2121.   DeclareUnicodeCharacter{00FF}{"y}
  2122.   DeclareUnicodeCharacter{0100}{=A}
  2123.   DeclareUnicodeCharacter{0101}{=a}
  2124.   DeclareUnicodeCharacter{0102}{u{A}}
  2125.   DeclareUnicodeCharacter{0103}{u{a}}
  2126.   DeclareUnicodeCharacter{0106}{'C}
  2127.   DeclareUnicodeCharacter{0107}{'c}
  2128.   DeclareUnicodeCharacter{0108}{^C}
  2129.   DeclareUnicodeCharacter{0109}{^c}
  2130.   DeclareUnicodeCharacter{010A}{dotaccent{C}}
  2131.   DeclareUnicodeCharacter{010B}{dotaccent{c}}
  2132.   DeclareUnicodeCharacter{010C}{v{C}}
  2133.   DeclareUnicodeCharacter{010D}{v{c}}
  2134.   DeclareUnicodeCharacter{010E}{v{D}}
  2135.   DeclareUnicodeCharacter{0112}{=E}
  2136.   DeclareUnicodeCharacter{0113}{=e}
  2137.   DeclareUnicodeCharacter{0114}{u{E}}
  2138.   DeclareUnicodeCharacter{0115}{u{e}}
  2139.   DeclareUnicodeCharacter{0116}{dotaccent{E}}
  2140.   DeclareUnicodeCharacter{0117}{dotaccent{e}}
  2141.   DeclareUnicodeCharacter{011A}{v{E}}
  2142.   DeclareUnicodeCharacter{011B}{v{e}}
  2143.   DeclareUnicodeCharacter{011C}{^G}
  2144.   DeclareUnicodeCharacter{011D}{^g}
  2145.   DeclareUnicodeCharacter{011E}{u{G}}
  2146.   DeclareUnicodeCharacter{011F}{u{g}}
  2147.   DeclareUnicodeCharacter{0120}{dotaccent{G}}
  2148.   DeclareUnicodeCharacter{0121}{dotaccent{g}}
  2149.   DeclareUnicodeCharacter{0124}{^H}
  2150.   DeclareUnicodeCharacter{0125}{^h}
  2151.   DeclareUnicodeCharacter{0128}{~I}
  2152.   DeclareUnicodeCharacter{0129}{~{dotless{i}}}
  2153.   DeclareUnicodeCharacter{012A}{=I}
  2154.   DeclareUnicodeCharacter{012B}{={dotless{i}}}
  2155.   DeclareUnicodeCharacter{012C}{u{I}}
  2156.   DeclareUnicodeCharacter{012D}{u{dotless{i}}}
  2157.   DeclareUnicodeCharacter{0130}{dotaccent{I}}
  2158.   DeclareUnicodeCharacter{0131}{dotless{i}}
  2159.   DeclareUnicodeCharacter{0132}{IJ}
  2160.   DeclareUnicodeCharacter{0133}{ij}
  2161.   DeclareUnicodeCharacter{0134}{^J}
  2162.   DeclareUnicodeCharacter{0135}{^{dotless{j}}}
  2163.   DeclareUnicodeCharacter{0139}{'L}
  2164.   DeclareUnicodeCharacter{013A}{'l}
  2165.   DeclareUnicodeCharacter{0141}{L}
  2166.   DeclareUnicodeCharacter{0142}{l}
  2167.   DeclareUnicodeCharacter{0143}{'N}
  2168.   DeclareUnicodeCharacter{0144}{'n}
  2169.   DeclareUnicodeCharacter{0147}{v{N}}
  2170.   DeclareUnicodeCharacter{0148}{v{n}}
  2171.   DeclareUnicodeCharacter{014C}{=O}
  2172.   DeclareUnicodeCharacter{014D}{=o}
  2173.   DeclareUnicodeCharacter{014E}{u{O}}
  2174.   DeclareUnicodeCharacter{014F}{u{o}}
  2175.   DeclareUnicodeCharacter{0150}{H{O}}
  2176.   DeclareUnicodeCharacter{0151}{H{o}}
  2177.   DeclareUnicodeCharacter{0152}{OE}
  2178.   DeclareUnicodeCharacter{0153}{oe}
  2179.   DeclareUnicodeCharacter{0154}{'R}
  2180.   DeclareUnicodeCharacter{0155}{'r}
  2181.   DeclareUnicodeCharacter{0158}{v{R}}
  2182.   DeclareUnicodeCharacter{0159}{v{r}}
  2183.   DeclareUnicodeCharacter{015A}{'S}
  2184.   DeclareUnicodeCharacter{015B}{'s}
  2185.   DeclareUnicodeCharacter{015C}{^S}
  2186.   DeclareUnicodeCharacter{015D}{^s}
  2187.   DeclareUnicodeCharacter{015E}{cedilla{S}}
  2188.   DeclareUnicodeCharacter{015F}{cedilla{s}}
  2189.   DeclareUnicodeCharacter{0160}{v{S}}
  2190.   DeclareUnicodeCharacter{0161}{v{s}}
  2191.   DeclareUnicodeCharacter{0162}{cedilla{t}}
  2192.   DeclareUnicodeCharacter{0163}{cedilla{T}}
  2193.   DeclareUnicodeCharacter{0164}{v{T}}
  2194.   DeclareUnicodeCharacter{0168}{~U}
  2195.   DeclareUnicodeCharacter{0169}{~u}
  2196.   DeclareUnicodeCharacter{016A}{=U}
  2197.   DeclareUnicodeCharacter{016B}{=u}
  2198.   DeclareUnicodeCharacter{016C}{u{U}}
  2199.   DeclareUnicodeCharacter{016D}{u{u}}
  2200.   DeclareUnicodeCharacter{016E}{ringaccent{U}}
  2201.   DeclareUnicodeCharacter{016F}{ringaccent{u}}
  2202.   DeclareUnicodeCharacter{0170}{H{U}}
  2203.   DeclareUnicodeCharacter{0171}{H{u}}
  2204.   DeclareUnicodeCharacter{0174}{^W}
  2205.   DeclareUnicodeCharacter{0175}{^w}
  2206.   DeclareUnicodeCharacter{0176}{^Y}
  2207.   DeclareUnicodeCharacter{0177}{^y}
  2208.   DeclareUnicodeCharacter{0178}{"Y}
  2209.   DeclareUnicodeCharacter{0179}{'Z}
  2210.   DeclareUnicodeCharacter{017A}{'z}
  2211.   DeclareUnicodeCharacter{017B}{dotaccent{Z}}
  2212.   DeclareUnicodeCharacter{017C}{dotaccent{z}}
  2213.   DeclareUnicodeCharacter{017D}{v{Z}}
  2214.   DeclareUnicodeCharacter{017E}{v{z}}
  2215.   DeclareUnicodeCharacter{01C4}{Dv{Z}}
  2216.   DeclareUnicodeCharacter{01C5}{Dv{z}}
  2217.   DeclareUnicodeCharacter{01C6}{dv{z}}
  2218.   DeclareUnicodeCharacter{01C7}{LJ}
  2219.   DeclareUnicodeCharacter{01C8}{Lj}
  2220.   DeclareUnicodeCharacter{01C9}{lj}
  2221.   DeclareUnicodeCharacter{01CA}{NJ}
  2222.   DeclareUnicodeCharacter{01CB}{Nj}
  2223.   DeclareUnicodeCharacter{01CC}{nj}
  2224.   DeclareUnicodeCharacter{01CD}{v{A}}
  2225.   DeclareUnicodeCharacter{01CE}{v{a}}
  2226.   DeclareUnicodeCharacter{01CF}{v{I}}
  2227.   DeclareUnicodeCharacter{01D0}{v{dotless{i}}}
  2228.   DeclareUnicodeCharacter{01D1}{v{O}}
  2229.   DeclareUnicodeCharacter{01D2}{v{o}}
  2230.   DeclareUnicodeCharacter{01D3}{v{U}}
  2231.   DeclareUnicodeCharacter{01D4}{v{u}}
  2232.   DeclareUnicodeCharacter{01E2}{={AE}}
  2233.   DeclareUnicodeCharacter{01E3}{={ae}}
  2234.   DeclareUnicodeCharacter{01E6}{v{G}}
  2235.   DeclareUnicodeCharacter{01E7}{v{g}}
  2236.   DeclareUnicodeCharacter{01E8}{v{K}}
  2237.   DeclareUnicodeCharacter{01E9}{v{k}}
  2238.   DeclareUnicodeCharacter{01F0}{v{dotless{j}}}
  2239.   DeclareUnicodeCharacter{01F1}{DZ}
  2240.   DeclareUnicodeCharacter{01F2}{Dz}
  2241.   DeclareUnicodeCharacter{01F3}{dz}
  2242.   DeclareUnicodeCharacter{01F4}{'G}
  2243.   DeclareUnicodeCharacter{01F5}{'g}
  2244.   DeclareUnicodeCharacter{01F8}{`N}
  2245.   DeclareUnicodeCharacter{01F9}{`n}
  2246.   DeclareUnicodeCharacter{01FC}{'{AE}}
  2247.   DeclareUnicodeCharacter{01FD}{'{ae}}
  2248.   DeclareUnicodeCharacter{01FE}{'{O}}
  2249.   DeclareUnicodeCharacter{01FF}{'{o}}
  2250.   DeclareUnicodeCharacter{021E}{v{H}}
  2251.   DeclareUnicodeCharacter{021F}{v{h}}
  2252.   DeclareUnicodeCharacter{0226}{dotaccent{A}}
  2253.   DeclareUnicodeCharacter{0227}{dotaccent{a}}
  2254.   DeclareUnicodeCharacter{0228}{cedilla{E}}
  2255.   DeclareUnicodeCharacter{0229}{cedilla{e}}
  2256.   DeclareUnicodeCharacter{022E}{dotaccent{O}}
  2257.   DeclareUnicodeCharacter{022F}{dotaccent{o}}
  2258.   DeclareUnicodeCharacter{0232}{=Y}
  2259.   DeclareUnicodeCharacter{0233}{=y}
  2260.   DeclareUnicodeCharacter{0237}{dotless{j}}
  2261.   DeclareUnicodeCharacter{1E02}{dotaccent{B}}
  2262.   DeclareUnicodeCharacter{1E03}{dotaccent{b}}
  2263.   DeclareUnicodeCharacter{1E04}{udotaccent{B}}
  2264.   DeclareUnicodeCharacter{1E05}{udotaccent{b}}
  2265.   DeclareUnicodeCharacter{1E06}{ubaraccent{B}}
  2266.   DeclareUnicodeCharacter{1E07}{ubaraccent{b}}
  2267.   DeclareUnicodeCharacter{1E0A}{dotaccent{D}}
  2268.   DeclareUnicodeCharacter{1E0B}{dotaccent{d}}
  2269.   DeclareUnicodeCharacter{1E0C}{udotaccent{D}}
  2270.   DeclareUnicodeCharacter{1E0D}{udotaccent{d}}
  2271.   DeclareUnicodeCharacter{1E0E}{ubaraccent{D}}
  2272.   DeclareUnicodeCharacter{1E0F}{ubaraccent{d}}
  2273.   DeclareUnicodeCharacter{1E1E}{dotaccent{F}}
  2274.   DeclareUnicodeCharacter{1E1F}{dotaccent{f}}
  2275.   DeclareUnicodeCharacter{1E20}{=G}
  2276.   DeclareUnicodeCharacter{1E21}{=g}
  2277.   DeclareUnicodeCharacter{1E22}{dotaccent{H}}
  2278.   DeclareUnicodeCharacter{1E23}{dotaccent{h}}
  2279.   DeclareUnicodeCharacter{1E24}{udotaccent{H}}
  2280.   DeclareUnicodeCharacter{1E25}{udotaccent{h}}
  2281.   DeclareUnicodeCharacter{1E26}{"H}
  2282.   DeclareUnicodeCharacter{1E27}{"h}
  2283.   DeclareUnicodeCharacter{1E30}{'K}
  2284.   DeclareUnicodeCharacter{1E31}{'k}
  2285.   DeclareUnicodeCharacter{1E32}{udotaccent{K}}
  2286.   DeclareUnicodeCharacter{1E33}{udotaccent{k}}
  2287.   DeclareUnicodeCharacter{1E34}{ubaraccent{K}}
  2288.   DeclareUnicodeCharacter{1E35}{ubaraccent{k}}
  2289.   DeclareUnicodeCharacter{1E36}{udotaccent{L}}
  2290.   DeclareUnicodeCharacter{1E37}{udotaccent{l}}
  2291.   DeclareUnicodeCharacter{1E3A}{ubaraccent{L}}
  2292.   DeclareUnicodeCharacter{1E3B}{ubaraccent{l}}
  2293.   DeclareUnicodeCharacter{1E3E}{'M}
  2294.   DeclareUnicodeCharacter{1E3F}{'m}
  2295.   DeclareUnicodeCharacter{1E40}{dotaccent{M}}
  2296.   DeclareUnicodeCharacter{1E41}{dotaccent{m}}
  2297.   DeclareUnicodeCharacter{1E42}{udotaccent{M}}
  2298.   DeclareUnicodeCharacter{1E43}{udotaccent{m}}
  2299.   DeclareUnicodeCharacter{1E44}{dotaccent{N}}
  2300.   DeclareUnicodeCharacter{1E45}{dotaccent{n}}
  2301.   DeclareUnicodeCharacter{1E46}{udotaccent{N}}
  2302.   DeclareUnicodeCharacter{1E47}{udotaccent{n}}
  2303.   DeclareUnicodeCharacter{1E48}{ubaraccent{N}}
  2304.   DeclareUnicodeCharacter{1E49}{ubaraccent{n}}
  2305.   DeclareUnicodeCharacter{1E54}{'P}
  2306.   DeclareUnicodeCharacter{1E55}{'p}
  2307.   DeclareUnicodeCharacter{1E56}{dotaccent{P}}
  2308.   DeclareUnicodeCharacter{1E57}{dotaccent{p}}
  2309.   DeclareUnicodeCharacter{1E58}{dotaccent{R}}
  2310.   DeclareUnicodeCharacter{1E59}{dotaccent{r}}
  2311.   DeclareUnicodeCharacter{1E5A}{udotaccent{R}}
  2312.   DeclareUnicodeCharacter{1E5B}{udotaccent{r}}
  2313.   DeclareUnicodeCharacter{1E5E}{ubaraccent{R}}
  2314.   DeclareUnicodeCharacter{1E5F}{ubaraccent{r}}
  2315.   DeclareUnicodeCharacter{1E60}{dotaccent{S}}
  2316.   DeclareUnicodeCharacter{1E61}{dotaccent{s}}
  2317.   DeclareUnicodeCharacter{1E62}{udotaccent{S}}
  2318.   DeclareUnicodeCharacter{1E63}{udotaccent{s}}
  2319.   DeclareUnicodeCharacter{1E6A}{dotaccent{T}}
  2320.   DeclareUnicodeCharacter{1E6B}{dotaccent{t}}
  2321.   DeclareUnicodeCharacter{1E6C}{udotaccent{T}}
  2322.   DeclareUnicodeCharacter{1E6D}{udotaccent{t}}
  2323.   DeclareUnicodeCharacter{1E6E}{ubaraccent{T}}
  2324.   DeclareUnicodeCharacter{1E6F}{ubaraccent{t}}
  2325.   DeclareUnicodeCharacter{1E7C}{~V}
  2326.   DeclareUnicodeCharacter{1E7D}{~v}
  2327.   DeclareUnicodeCharacter{1E7E}{udotaccent{V}}
  2328.   DeclareUnicodeCharacter{1E7F}{udotaccent{v}}
  2329.   DeclareUnicodeCharacter{1E80}{`W}
  2330.   DeclareUnicodeCharacter{1E81}{`w}
  2331.   DeclareUnicodeCharacter{1E82}{'W}
  2332.   DeclareUnicodeCharacter{1E83}{'w}
  2333.   DeclareUnicodeCharacter{1E84}{"W}
  2334.   DeclareUnicodeCharacter{1E85}{"w}
  2335.   DeclareUnicodeCharacter{1E86}{dotaccent{W}}
  2336.   DeclareUnicodeCharacter{1E87}{dotaccent{w}}
  2337.   DeclareUnicodeCharacter{1E88}{udotaccent{W}}
  2338.   DeclareUnicodeCharacter{1E89}{udotaccent{w}}
  2339.   DeclareUnicodeCharacter{1E8A}{dotaccent{X}}
  2340.   DeclareUnicodeCharacter{1E8B}{dotaccent{x}}
  2341.   DeclareUnicodeCharacter{1E8C}{"X}
  2342.   DeclareUnicodeCharacter{1E8D}{"x}
  2343.   DeclareUnicodeCharacter{1E8E}{dotaccent{Y}}
  2344.   DeclareUnicodeCharacter{1E8F}{dotaccent{y}}
  2345.   DeclareUnicodeCharacter{1E90}{^Z}
  2346.   DeclareUnicodeCharacter{1E91}{^z}
  2347.   DeclareUnicodeCharacter{1E92}{udotaccent{Z}}
  2348.   DeclareUnicodeCharacter{1E93}{udotaccent{z}}
  2349.   DeclareUnicodeCharacter{1E94}{ubaraccent{Z}}
  2350.   DeclareUnicodeCharacter{1E95}{ubaraccent{z}}
  2351.   DeclareUnicodeCharacter{1E96}{ubaraccent{h}}
  2352.   DeclareUnicodeCharacter{1E97}{"t}
  2353.   DeclareUnicodeCharacter{1E98}{ringaccent{w}}
  2354.   DeclareUnicodeCharacter{1E99}{ringaccent{y}}
  2355.   DeclareUnicodeCharacter{1EA0}{udotaccent{A}}
  2356.   DeclareUnicodeCharacter{1EA1}{udotaccent{a}}
  2357.   DeclareUnicodeCharacter{1EB8}{udotaccent{E}}
  2358.   DeclareUnicodeCharacter{1EB9}{udotaccent{e}}
  2359.   DeclareUnicodeCharacter{1EBC}{~E}
  2360.   DeclareUnicodeCharacter{1EBD}{~e}
  2361.   DeclareUnicodeCharacter{1ECA}{udotaccent{I}}
  2362.   DeclareUnicodeCharacter{1ECB}{udotaccent{i}}
  2363.   DeclareUnicodeCharacter{1ECC}{udotaccent{O}}
  2364.   DeclareUnicodeCharacter{1ECD}{udotaccent{o}}
  2365.   DeclareUnicodeCharacter{1EE4}{udotaccent{U}}
  2366.   DeclareUnicodeCharacter{1EE5}{udotaccent{u}}
  2367.   DeclareUnicodeCharacter{1EF2}{`Y}
  2368.   DeclareUnicodeCharacter{1EF3}{`y}
  2369.   DeclareUnicodeCharacter{1EF4}{udotaccent{Y}}
  2370.   DeclareUnicodeCharacter{1EF8}{~Y}
  2371.   DeclareUnicodeCharacter{1EF9}{~y}
  2372.   DeclareUnicodeCharacter{2013}{--}
  2373.   DeclareUnicodeCharacter{2014}{---}
  2374.   DeclareUnicodeCharacter{2018}{quoteleft}
  2375.   DeclareUnicodeCharacter{2019}{quoteright}
  2376.   DeclareUnicodeCharacter{201A}{quotesinglbase}
  2377.   DeclareUnicodeCharacter{201C}{quotedblleft}
  2378.   DeclareUnicodeCharacter{201D}{quotedblright}
  2379.   DeclareUnicodeCharacter{201E}{quotedblbase}
  2380.   DeclareUnicodeCharacter{2022}{bullet}
  2381.   DeclareUnicodeCharacter{2026}{dots}
  2382.   DeclareUnicodeCharacter{2039}{guilsinglleft}
  2383.   DeclareUnicodeCharacter{203A}{guilsinglright}
  2384.   DeclareUnicodeCharacter{20AC}{euro}
  2385.   DeclareUnicodeCharacter{2192}{expansion}
  2386.   DeclareUnicodeCharacter{21D2}{result}
  2387.   DeclareUnicodeCharacter{2212}{minus}
  2388.   DeclareUnicodeCharacter{2217}{point}
  2389.   DeclareUnicodeCharacter{2261}{equiv}
  2390. }% end of utfeightchardefs
  2391. % US-ASCII character definitions.
  2392. defasciichardefs{% nothing need be done
  2393.    relax
  2394. }
  2395. % Make non-ASCII characters printable again for compatibility with
  2396. % existing Texinfo documents that may use them, even without declaring a
  2397. % document encoding.
  2398. %
  2399. setnonasciicharscatcode other
  2400. message{formatting,}
  2401. newdimendefaultparindent defaultparindent = 15pt
  2402. chapheadingskip = 15pt plus 4pt minus 2pt
  2403. secheadingskip = 12pt plus 3pt minus 2pt
  2404. subsecheadingskip = 9pt plus 2pt minus 2pt
  2405. % Prevent underfull vbox error messages.
  2406. vbadness = 10000
  2407. % Don't be so finicky about underfull hboxes, either.
  2408. hbadness = 2000
  2409. % Following George Bush, get rid of widows and orphans.
  2410. widowpenalty=10000
  2411. clubpenalty=10000
  2412. % Use TeX 3.0's emergencystretch to help line breaking, but if we're
  2413. % using an old version of TeX, don't do anything.  We want the amount of
  2414. % stretch added to depend on the line length, hence the dependence on
  2415. % hsize.  We call this whenever the paper size is set.
  2416. %
  2417. defsetemergencystretch{%
  2418.   ifxemergencystretchthisisundefined
  2419.     % Allow us to assign to emergencystretch anyway.
  2420.     defemergencystretch{dimen0}%
  2421.   else
  2422.     emergencystretch = .15hsize
  2423.   fi
  2424. }
  2425. % Parameters in order: 1) textheight; 2) textwidth;
  2426. % 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
  2427. % 7) physical page height; 8) physical page width.
  2428. %
  2429. % We also call setleading{textleading}, so the caller should define
  2430. % textleading.  The caller should also set parskip.
  2431. %
  2432. definternalpagesizes#1#2#3#4#5#6#7#8{%
  2433.   voffset = #3relax
  2434.   topskip = #6relax
  2435.   splittopskip = topskip
  2436.   %
  2437.   vsize = #1relax
  2438.   advancevsize by topskip
  2439.   outervsize = vsize
  2440.   advanceoutervsize by 2topandbottommargin
  2441.   pageheight = vsize
  2442.   %
  2443.   hsize = #2relax
  2444.   outerhsize = hsize
  2445.   advanceouterhsize by 0.5in
  2446.   pagewidth = hsize
  2447.   %
  2448.   normaloffset = #4relax
  2449.   bindingoffset = #5relax
  2450.   %
  2451.   ifpdf
  2452.     pdfpageheight #7relax
  2453.     pdfpagewidth #8relax
  2454.     % if we don't reset these, they will remain at "1 true in" of
  2455.     % whatever layout pdftex was dumped with.
  2456.     pdfhorigin = 1 true in
  2457.     pdfvorigin = 1 true in
  2458.   fi
  2459.   %
  2460.   setleading{textleading}
  2461.   %
  2462.   parindent = defaultparindent
  2463.   setemergencystretch
  2464. }
  2465. % @letterpaper (the default).
  2466. defletterpaper{{globaldefs = 1
  2467.   parskip = 3pt plus 2pt minus 1pt
  2468.   textleading = 13.2pt
  2469.   %
  2470.   % If page is nothing but text, make it come out even.
  2471.   internalpagesizes{607.2pt}{6in}% that's 46 lines
  2472.                     {voffset}{.25in}%
  2473.                     {bindingoffset}{36pt}%
  2474.                     {11in}{8.5in}%
  2475. }}
  2476. % Use @smallbook to reset parameters for 7x9.25 trim size.
  2477. defsmallbook{{globaldefs = 1
  2478.   parskip = 2pt plus 1pt
  2479.   textleading = 12pt
  2480.   %
  2481.   internalpagesizes{7.5in}{5in}%
  2482.                     {-.2in}{0in}%
  2483.                     {bindingoffset}{16pt}%
  2484.                     {9.25in}{7in}%
  2485.   %
  2486.   lispnarrowing = 0.3in
  2487.   tolerance = 700
  2488.   hfuzz = 1pt
  2489.   contentsrightmargin = 0pt
  2490.   defbodyindent = .5cm
  2491. }}
  2492. % Use @smallerbook to reset parameters for 6x9 trim size.
  2493. % (Just testing, parameters still in flux.)
  2494. defsmallerbook{{globaldefs = 1
  2495.   parskip = 1.5pt plus 1pt
  2496.   textleading = 12pt
  2497.   %
  2498.   internalpagesizes{7.4in}{4.8in}%
  2499.                     {-.2in}{-.4in}%
  2500.                     {0pt}{14pt}%
  2501.                     {9in}{6in}%
  2502.   %
  2503.   lispnarrowing = 0.25in
  2504.   tolerance = 700
  2505.   hfuzz = 1pt
  2506.   contentsrightmargin = 0pt
  2507.   defbodyindent = .4cm
  2508. }}
  2509. % Use @afourpaper to print on European A4 paper.
  2510. defafourpaper{{globaldefs = 1
  2511.   parskip = 3pt plus 2pt minus 1pt
  2512.   textleading = 13.2pt
  2513.   %
  2514.   % Double-side printing via postscript on Laserjet 4050
  2515.   % prints double-sided nicely when bindingoffset=10mm and hoffset=-6mm.
  2516.   % To change the settings for a different printer or situation, adjust
  2517.   % normaloffset until the front-side and back-side texts align.  Then
  2518.   % do the same for bindingoffset.  You can set these for testing in
  2519.   % your texinfo source file like this:
  2520.   % @tex
  2521.   % globalnormaloffset = -6mm
  2522.   % globalbindingoffset = 10mm
  2523.   % @end tex
  2524.   internalpagesizes{673.2pt}{160mm}% that's 51 lines
  2525.                     {voffset}{hoffset}%
  2526.                     {bindingoffset}{44pt}%
  2527.                     {297mm}{210mm}%
  2528.   %
  2529.   tolerance = 700
  2530.   hfuzz = 1pt
  2531.   contentsrightmargin = 0pt
  2532.   defbodyindent = 5mm
  2533. }}
  2534. % Use @afivepaper to print on European A5 paper.
  2535. % From romildo@urano.iceb.ufop.br, 2 July 2000.
  2536. % He also recommends making @example and @lisp be small.
  2537. defafivepaper{{globaldefs = 1
  2538.   parskip = 2pt plus 1pt minus 0.1pt
  2539.   textleading = 12.5pt
  2540.   %
  2541.   internalpagesizes{160mm}{120mm}%
  2542.                     {voffset}{hoffset}%
  2543.                     {bindingoffset}{8pt}%
  2544.                     {210mm}{148mm}%
  2545.   %
  2546.   lispnarrowing = 0.2in
  2547.   tolerance = 800
  2548.   hfuzz = 1.2pt
  2549.   contentsrightmargin = 0pt
  2550.   defbodyindent = 2mm
  2551.   tableindent = 12mm
  2552. }}
  2553. % A specific text layout, 24x15cm overall, intended for A4 paper.
  2554. defafourlatex{{globaldefs = 1
  2555.   afourpaper
  2556.   internalpagesizes{237mm}{150mm}%
  2557.                     {voffset}{4.6mm}%
  2558.                     {bindingoffset}{7mm}%
  2559.                     {297mm}{210mm}%
  2560.   %
  2561.   % Must explicitly reset to 0 because we call afourpaper.
  2562.   globaldefs = 0
  2563. }}
  2564. % Use @afourwide to print on A4 paper in landscape format.
  2565. defafourwide{{globaldefs = 1
  2566.   afourpaper
  2567.   internalpagesizes{241mm}{165mm}%
  2568.                     {voffset}{-2.95mm}%
  2569.                     {bindingoffset}{7mm}%
  2570.                     {297mm}{210mm}%
  2571.   globaldefs = 0
  2572. }}
  2573. % @pagesizes TEXTHEIGHT[,TEXTWIDTH]
  2574. % Perhaps we should allow setting the margins, topskip, parskip,
  2575. % and/or leading, also. Or perhaps we should compute them somehow.
  2576. %
  2577. parseargdefpagesizes{pagesizesyyy #1,,finish}
  2578. defpagesizesyyy#1,#2,#3finish{{%
  2579.   setbox0 = hbox{ignorespaces #2}ifdimwd0 > 0pt hsize=#2relax fi
  2580.   globaldefs = 1
  2581.   %
  2582.   parskip = 3pt plus 2pt minus 1pt
  2583.   setleading{textleading}%
  2584.   %
  2585.   dimen0 = #1relax
  2586.   advancedimen0 by voffset
  2587.   %
  2588.   dimen2 = hsize
  2589.   advancedimen2 by normaloffset
  2590.   %
  2591.   internalpagesizes{#1}{hsize}%
  2592.                     {voffset}{normaloffset}%
  2593.                     {bindingoffset}{44pt}%
  2594.                     {dimen0}{dimen2}%
  2595. }}
  2596. % Set default to letter.
  2597. %
  2598. letterpaper
  2599. message{and turning on texinfo input format.}
  2600. % Define macros to output various characters with catcode for normal text.
  2601. catcode`"=other
  2602. catcode`~=other
  2603. catcode`^=other
  2604. catcode`_=other
  2605. catcode`|=other
  2606. catcode`<=other
  2607. catcode`>=other
  2608. catcode`+=other
  2609. catcode`$=other
  2610. defnormaldoublequote{"}
  2611. defnormaltilde{~}
  2612. defnormalcaret{^}
  2613. defnormalunderscore{_}
  2614. defnormalverticalbar{|}
  2615. defnormalless{<}
  2616. defnormalgreater{>}
  2617. defnormalplus{+}
  2618. defnormaldollar{$}%$ font-lock fix
  2619. % This macro is used to make a character print one way in tt
  2620. % (where it can probably be output as-is), and another way in other fonts,
  2621. % where something hairier probably needs to be done.
  2622. %
  2623. % #1 is what to print if we are indeed using tt; #2 is what to print
  2624. % otherwise.  Since all the Computer Modern typewriter fonts have zero
  2625. % interword stretch (and shrink), and it is reasonable to expect all
  2626. % typewriter fonts to have this, we can check that font parameter.
  2627. %
  2628. defifusingtt#1#2{ifdim fontdimen3font=0pt #1else #2fi}
  2629. % Same as above, but check for italic font.  Actually this also catches
  2630. % non-italic slanted fonts since it is impossible to distinguish them from
  2631. % italic fonts.  But since this is only used by $ and it uses sl anyway
  2632. % this is not a problem.
  2633. defifusingit#1#2{ifdim fontdimen1font>0pt #1else #2fi}
  2634. % Turn off all special characters except @
  2635. % (and those which the user can use as if they were ordinary).
  2636. % Most of these we simply print from the tt font, but for some, we can
  2637. % use math or other variants that look better in normal text.
  2638. catcode`"=active
  2639. defactivedoublequote{{ttchar34}}
  2640. let"=activedoublequote
  2641. catcode`~=active
  2642. def~{{ttchar126}}
  2643. chardefhat=`^
  2644. catcode`^=active
  2645. def^{{tt hat}}
  2646. catcode`_=active
  2647. def_{ifusingttnormalunderscore_}
  2648. letrealunder=_
  2649. % Subroutine for the previous macro.
  2650. def_{leavevmode kern.07em vbox{hrule width.3em height.1ex}kern .07em }
  2651. catcode`|=active
  2652. def|{{ttchar124}}
  2653. chardef less=`<
  2654. catcode`<=active
  2655. def<{{tt less}}
  2656. chardef gtr=`>
  2657. catcode`>=active
  2658. def>{{tt gtr}}
  2659. catcode`+=active
  2660. def+{{tt char 43}}
  2661. catcode`$=active
  2662. def${ifusingit{{sl$}}normaldollar}%$ font-lock fix
  2663. % If a .fmt file is being used, characters that might appear in a file
  2664. % name cannot be active until we have parsed the command line.
  2665. % So turn them off again, and have everyjob (or @setfilename) turn them on.
  2666. % otherifyactive is called near the end of this file.
  2667. defotherifyactive{catcode`+=other catcode`_=other}
  2668. % Used sometimes to turn off (effectively) the active characters even after
  2669. % parsing them.
  2670. defturnoffactive{%
  2671.   normalturnoffactive
  2672.   otherbackslash
  2673. }
  2674. catcode`@=0
  2675. % backslashcurfont outputs one backslash character in current font,
  2676. % as in char`\.
  2677. globalchardefbackslashcurfont=`\
  2678. globalletrawbackslashxx=backslashcurfont  % let existing .??s files work
  2679. % realbackslash is an actual character `' with catcode other, and
  2680. % doublebackslash is two of them (for the pdf outlines).
  2681. {catcode`\=other @gdef@realbackslash{} @gdef@doublebackslash{\}}
  2682. % In texinfo, backslash is an active character; it prints the backslash
  2683. % in fixed width font.
  2684. catcode`\=active
  2685. @def@normalbackslash{{@tt@backslashcurfont}}
  2686. % On startup, @fixbackslash assigns:
  2687. %  @let  = @normalbackslash
  2688. % rawbackslash defines an active  to do backslashcurfont.
  2689. % otherbackslash defines an active  to be a literal `' character with
  2690. % catcode other.
  2691. @gdef@rawbackslash{@let=@backslashcurfont}
  2692. @gdef@otherbackslash{@let=@realbackslash}
  2693. % Same as @turnoffactive except outputs  as {ttchar`\} instead of
  2694. % the literal character `'.
  2695. @def@normalturnoffactive{%
  2696.   @let=@normalbackslash
  2697.   @let"=@normaldoublequote
  2698.   @let~=@normaltilde
  2699.   @let^=@normalcaret
  2700.   @let_=@normalunderscore
  2701.   @let|=@normalverticalbar
  2702.   @let<=@normalless
  2703.   @let>=@normalgreater
  2704.   @let+=@normalplus
  2705.   @let$=@normaldollar %$ font-lock fix
  2706.   @unsepspaces
  2707. }
  2708. % Make _ and + other characters, temporarily.
  2709. % This is canceled by @fixbackslash.
  2710. @otherifyactive
  2711. % If a .fmt file is being used, we don't want the `input texinfo' to show up.
  2712. % That is what eatinput is for; after that, the `' should revert to printing
  2713. % a backslash.
  2714. %
  2715. @gdef@eatinput input texinfo{@fixbackslash}
  2716. @global@let = @eatinput
  2717. % On the other hand, perhaps the file did not have a `input texinfo'. Then
  2718. % the first `' in the file would cause an error. This macro tries to fix
  2719. % that, assuming it is called before the first `' could plausibly occur.
  2720. % Also turn back on active characters that might appear in the input
  2721. % file name, in case not using a pre-dumped format.
  2722. %
  2723. @gdef@fixbackslash{%
  2724.   @ifx@eatinput @let = @normalbackslash @fi
  2725.   @catcode`+=@active
  2726.   @catcode`@_=@active
  2727. }
  2728. % Say @foo, not foo, in error messages.
  2729. @escapechar = `@@
  2730. % These look ok in all fonts, so just make them not special.
  2731. @catcode`@& = @other
  2732. @catcode`@# = @other
  2733. @catcode`@% = @other
  2734. @c Local variables:
  2735. @c eval: (add-hook 'write-file-hooks 'time-stamp)
  2736. @c page-delimiter: "^\\message"
  2737. @c time-stamp-start: "def\\texinfoversion{"
  2738. @c time-stamp-format: "%:y-%02m-%02d.%02H"
  2739. @c time-stamp-end: "}"
  2740. @c End:
  2741. @c vim:sw=2:
  2742. @ignore
  2743.    arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115
  2744. @end ignore