/[m4]/m4/doc/texinfo.tex
ViewVC logotype

Diff of /m4/doc/texinfo.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1.2.4 by gary, Sun May 1 11:18:08 2005 UTC revision 1.1.1.1.2.5 by gary, Thu Oct 20 10:00:59 2005 UTC
# Line 3  Line 3 
3  % Load plain if necessary, i.e., if running under initex.  % Load plain if necessary, i.e., if running under initex.
4  \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi  \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
5  %  %
6  \def\texinfoversion{2005-03-21.17}  \def\texinfoversion{2005-10-10.17}
7  %  %
8  % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,  % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
9  % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software  % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software
# Line 153  Line 153 
153  \ifx\putwordDefopt\undefined    \gdef\putwordDefopt{User Option}\fi  \ifx\putwordDefopt\undefined    \gdef\putwordDefopt{User Option}\fi
154  \ifx\putwordDeffunc\undefined   \gdef\putwordDeffunc{Function}\fi  \ifx\putwordDeffunc\undefined   \gdef\putwordDeffunc{Function}\fi
155    
156  % In some macros, we cannot use the `\? notation---the left quote is  % Since the category of space is not known, we have to be careful.
 % in some cases the escape char.  
 \chardef\backChar  = `\\  
 \chardef\colonChar = `\:  
 \chardef\commaChar = `\,  
 \chardef\dotChar   = `\.  
 \chardef\exclamChar= `\!  
 \chardef\plusChar  = `\+  
 \chardef\questChar = `\?  
 \chardef\semiChar  = `\;  
 \chardef\underChar = `\_  
   
 \chardef\spaceChar = `\ %  
157  \chardef\spacecat = 10  \chardef\spacecat = 10
158  \def\spaceisspace{\catcode\spaceChar=\spacecat}  \def\spaceisspace{\catcode`\ =\spacecat}
   
 {% for help with debugging.  
  % example usage: \expandafter\show\activebackslash  
  \catcode`\! = 0 \catcode`\\ = \active  
  !global!def!activebackslash{\}  
 }  
159    
160  % Ignore a token.  % Ignore a token.
161  %  %
# Line 310  Line 292 
292      % take effect in \write's, yet the group defined by the \vbox ends      % take effect in \write's, yet the group defined by the \vbox ends
293      % before the \shipout runs.      % before the \shipout runs.
294      %      %
     \escapechar = `\\     % use backslash in output files.  
295      \indexdummies         % don't expand commands in the output.      \indexdummies         % don't expand commands in the output.
     \normalturnoffactive  % \ in index entries must not stay \, e.g., if  
                    % the page break happens to be in the middle of an example.  
296      \shipout\vbox{%      \shipout\vbox{%
297        % Do this early so pdf references go to the beginning of the page.        % Do this early so pdf references go to the beginning of the page.
298        \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi        \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
# Line 364  Line 343 
343        \egroup % \vbox from first cropmarks clause        \egroup % \vbox from first cropmarks clause
344        \fi        \fi
345      }% end of \shipout\vbox      }% end of \shipout\vbox
346    }% end of group with \normalturnoffactive    }% end of group with \indexdummies
347    \advancepageno    \advancepageno
348    \ifnum\outputpenalty>-20000 \else\dosupereject\fi    \ifnum\outputpenalty>-20000 \else\dosupereject\fi
349  }  }
# Line 655  Line 634 
634  \let\/=\allowbreak  \let\/=\allowbreak
635    
636  % @. is an end-of-sentence period.  % @. is an end-of-sentence period.
637  \def\.{.\spacefactor=\endofsentencespacefactor}  \def\.{.\spacefactor=\endofsentencespacefactor\space}
638    
639  % @! is an end-of-sentence bang.  % @! is an end-of-sentence bang.
640  \def\!{!\spacefactor=\endofsentencespacefactor}  \def\!{!\spacefactor=\endofsentencespacefactor\space}
641    
642  % @? is an end-of-sentence query.  % @? is an end-of-sentence query.
643  \def\?{?\spacefactor=\endofsentencespacefactor}  \def\?{?\spacefactor=\endofsentencespacefactor\space}
644    
645  % @frenchspacing on|off  says whether to put extra space after punctuation.  % @frenchspacing on|off  says whether to put extra space after punctuation.
646  %  %
# Line 1054  where each line of input produces a line Line 1033  where each line of input produces a line
1033  % _ active, and distinguish by seeing if the current family is \slfam,  % _ active, and distinguish by seeing if the current family is \slfam,
1034  % which is what @var uses.  % which is what @var uses.
1035  {  {
1036    \catcode\underChar = \active    \catcode`\_ = \active
1037    \gdef\mathunderscore{%    \gdef\mathunderscore{%
1038      \catcode\underChar=\active      \catcode`\_=\active
1039      \def_{\ifnum\fam=\slfam \_\else\sb\fi}%      \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
1040    }    }
1041  }  }
# Line 1200  where each line of input produces a line Line 1179  where each line of input produces a line
1179    \fi    \fi
1180  \fi  \fi
1181    
1182  % PDF uses PostScript string constants for the names of xref targets, to  % PDF uses PostScript string constants for the names of xref targets,
1183  % for display in the outlines, and in other places.  Thus, we have to  % for display in the outlines, and in other places.  Thus, we have to
1184  % double any backslashes.  Otherwise, a name like "\node" will be  % double any backslashes.  Otherwise, a name like "\node" will be
1185  % interpreted as a newline (\n), followed by o, d, e.  Not good.  % interpreted as a newline (\n), followed by o, d, e.  Not good.
1186  % http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html  % http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html
1187  % (and related messages, the final outcome is that it is up to the TeX  % (and related messages, the final outcome is that it is up to the TeX
1188  % user to double the backslashes and otherwise make the string valid, so  % user to double the backslashes and otherwise make the string valid, so
1189  % that's we do).  % that's what we do).
1190    
1191  % double active backslashes.  % double active backslashes.
1192  %  %
1193  {\catcode`\@=0 \catcode`\\=\active  {\catcode`\@=0 \catcode`\\=\active
  @gdef@activebackslash{@catcode`@\=@active @otherbackslash}  
1194   @gdef@activebackslashdouble{%   @gdef@activebackslashdouble{%
1195     @catcode@backChar=@active     @catcode`@\=@active
1196     @let\=@doublebackslash}     @let\=@doublebackslash}
1197  }  }
1198    
# Line 1246  where each line of input produces a line Line 1224  where each line of input produces a line
1224  \def\backslashparens#1{%  \def\backslashparens#1{%
1225    \xdef#1{#1}% redefine it as its expansion; the definition is simply    \xdef#1{#1}% redefine it as its expansion; the definition is simply
1226               % \lastnode when called from \setref -> \pdfmkdest.               % \lastnode when called from \setref -> \pdfmkdest.
1227    \HyPsdSubst{(}{\backslashlparen}{#1}%    \HyPsdSubst{(}{\realbackslash(}{#1}%
1228    \HyPsdSubst{)}{\backslashrparen}{#1}%    \HyPsdSubst{)}{\realbackslash)}{#1}%
 }  
   
 {\catcode\exclamChar = 0 \catcode\backChar = \other  
  !gdef!backslashlparen{\(}%  
  !gdef!backslashrparen{\)}%  
1229  }  }
1230    
1231  \ifpdf  \ifpdf
# Line 1282  where each line of input produces a line Line 1255  where each line of input produces a line
1255      % We have to set dummies so commands such as @code, and characters      % We have to set dummies so commands such as @code, and characters
1256      % such as \, aren't expanded when present in a section title.      % such as \, aren't expanded when present in a section title.
1257      \atdummies      \atdummies
     \turnoffactive  
1258      \activebackslashdouble      \activebackslashdouble
1259      \def\pdfdestname{#1}%      \def\pdfdestname{#1}%
1260      \backslashparens\pdfdestname      \backslashparens\pdfdestname
# Line 1394  where each line of input produces a line Line 1366  where each line of input produces a line
1366        % now, I guess we'll just let the pdf reader have its way.        % now, I guess we'll just let the pdf reader have its way.
1367        \indexnofonts        \indexnofonts
1368        \setupdatafile        \setupdatafile
1369        \activebackslash        \catcode`\\=\active \otherbackslash
1370        \input \jobname.toc        \input \jobname.toc
1371      \endgroup      \endgroup
1372    }    }
# Line 1814  where each line of input produces a line Line 1786  where each line of input produces a line
1786  % Can't use plain's \frenchspacing because it uses the `\x notation, and  % Can't use plain's \frenchspacing because it uses the `\x notation, and
1787  % sometimes \x has an active definition that messes things up.  % sometimes \x has an active definition that messes things up.
1788  %  %
1789    \chardef\colonChar = `\:
1790    \chardef\commaChar = `\,
1791    \chardef\dotChar   = `\.
1792    \chardef\exclamChar= `\!
1793    \chardef\questChar = `\?
1794    \chardef\semiChar  = `\;
1795    %
1796  \catcode`@=11  \catcode`@=11
1797    \def\plainfrenchspacing{%    \def\plainfrenchspacing{%
1798      \sfcode\dotChar  =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m      \sfcode\dotChar  =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
# Line 1924  where each line of input produces a line Line 1903  where each line of input produces a line
1903  \def\keywordfalse{false}  \def\keywordfalse{false}
1904    
1905  \parseargdef\allowcodebreaks{%  \parseargdef\allowcodebreaks{%
1906    \def\arg{#1}%    \def\txiarg{#1}%
1907    \ifx\arg\keywordtrue    \ifx\txiarg\keywordtrue
1908      \allowcodebreakstrue      \allowcodebreakstrue
1909    \else\ifx\arg\keywordfalse    \else\ifx\txiarg\keywordfalse
1910      \allowcodebreaksfalse      \allowcodebreaksfalse
1911    \else    \else
1912      \errhelp = \EMsimple      \errhelp = \EMsimple
1913      \errmessage{Unknown @allowcodebreaks option `\arg'}%      \errmessage{Unknown @allowcodebreaks option `\txiarg'}%
1914    \fi\fi    \fi\fi
1915  }  }
1916    
# Line 1942  where each line of input produces a line Line 1921  where each line of input produces a line
1921  %   `example' (@kbd uses ttsl only inside of @example and friends),  %   `example' (@kbd uses ttsl only inside of @example and friends),
1922  %   or `code' (@kbd uses normal tty font always).  %   or `code' (@kbd uses normal tty font always).
1923  \parseargdef\kbdinputstyle{%  \parseargdef\kbdinputstyle{%
1924    \def\arg{#1}%    \def\txiarg{#1}%
1925    \ifx\arg\worddistinct    \ifx\txiarg\worddistinct
1926      \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%      \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
1927    \else\ifx\arg\wordexample    \else\ifx\txiarg\wordexample
1928      \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%      \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
1929    \else\ifx\arg\wordcode    \else\ifx\txiarg\wordcode
1930      \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%      \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
1931    \else    \else
1932      \errhelp = \EMsimple      \errhelp = \EMsimple
1933      \errmessage{Unknown @kbdinputstyle option `\arg'}%      \errmessage{Unknown @kbdinputstyle option `\txiarg'}%
1934    \fi\fi\fi    \fi\fi\fi
1935  }  }
1936  \def\worddistinct{distinct}  \def\worddistinct{distinct}
# Line 3222  where each line of input produces a line Line 3201  where each line of input produces a line
3201  % we have to laboriously prevent expansion for those that we don't.  % we have to laboriously prevent expansion for those that we don't.
3202  %  %
3203  \def\indexdummies{%  \def\indexdummies{%
3204      \escapechar = `\\     % use backslash in output files.
3205    \def\@{@}% change to @@ when we switch to @ as escape char in index files.    \def\@{@}% change to @@ when we switch to @ as escape char in index files.
3206    \def\ {\realbackslash\space }%    \def\ {\realbackslash\space }%
3207    % Need these in case \tex is in effect and \{ is a \delimiter again.    % Need these in case \tex is in effect and \{ is a \delimiter again.
# Line 3230  where each line of input produces a line Line 3210  where each line of input produces a line
3210    \let\{ = \mylbrace    \let\{ = \mylbrace
3211    \let\} = \myrbrace    \let\} = \myrbrace
3212    %    %
   % \definedummyword defines \#1 as \realbackslash #1\space, thus  
   % effectively preventing its expansion.  This is used only for control  
   % words, not control letters, because the \space would be incorrect  
   % for control characters, but is needed to separate the control word  
   % from whatever follows.  
   %  
   % For control letters, we have \definedummyletter, which omits the  
   % space.  
   %  
   % These can be used both for control words that take an argument and  
   % those that do not.  If it is followed by {arg} in the input, then  
   % that will dutifully get written to the index (or wherever).  
   %  
   \def\definedummyword##1{%  
     \expandafter\def\csname ##1\endcsname{\realbackslash ##1\space}%  
   }%  
   \def\definedummyletter##1{%  
     \expandafter\def\csname ##1\endcsname{\realbackslash ##1}%  
   }%  
   \let\definedummyaccent\definedummyletter  
   %  
3213    % Do the redefinitions.    % Do the redefinitions.
3214    \commondummies    \commondummies
3215  }  }
# Line 3266  where each line of input produces a line Line 3225  where each line of input produces a line
3225    \let\{ = \lbraceatcmd    \let\{ = \lbraceatcmd
3226    \let\} = \rbraceatcmd    \let\} = \rbraceatcmd
3227    %    %
   % (See comments in \indexdummies.)  
   \def\definedummyword##1{%  
     \expandafter\def\csname ##1\endcsname{@##1\space}%  
   }%  
   \def\definedummyletter##1{%  
     \expandafter\def\csname ##1\endcsname{@##1}%  
   }%  
   \let\definedummyaccent\definedummyletter  
   %  
3228    % Do the redefinitions.    % Do the redefinitions.
3229    \commondummies    \commondummies
3230      \otherbackslash
3231  }  }
3232    
3233  % Called from \indexdummies and \atdummies.  \definedummyword and  % Called from \indexdummies and \atdummies.
 % \definedummyletter must be defined first.  
3234  %  %
3235  \def\commondummies{%  \def\commondummies{%
3236    %    %
3237    \normalturnoffactive    % \definedummyword defines \#1 as \string\#1\space, thus effectively
3238      % preventing its expansion.  This is used only for control% words,
3239      % not control letters, because the \space would be incorrect for
3240      % control characters, but is needed to separate the control word
3241      % from whatever follows.
3242      %
3243      % For control letters, we have \definedummyletter, which omits the
3244      % space.
3245      %
3246      % These can be used both for control words that take an argument and
3247      % those that do not.  If it is followed by {arg} in the input, then
3248      % that will dutifully get written to the index (or wherever).
3249      %
3250      \def\definedummyword  ##1{\def##1{\string##1\space}}%
3251      \def\definedummyletter##1{\def##1{\string##1}}%
3252      \let\definedummyaccent\definedummyletter
3253    %    %
3254    \commondummiesnofonts    \commondummiesnofonts
3255    %    %
3256    \definedummyletter{_}%    \definedummyletter\_%
3257    %    %
3258    % Non-English letters.    % Non-English letters.
3259    \definedummyword{AA}%    \definedummyword\AA
3260    \definedummyword{AE}%    \definedummyword\AE
3261    \definedummyword{L}%    \definedummyword\L
3262    \definedummyword{OE}%    \definedummyword\OE
3263    \definedummyword{O}%    \definedummyword\O
3264    \definedummyword{aa}%    \definedummyword\aa
3265    \definedummyword{ae}%    \definedummyword\ae
3266    \definedummyword{l}%    \definedummyword\l
3267    \definedummyword{oe}%    \definedummyword\oe
3268    \definedummyword{o}%    \definedummyword\o
3269    \definedummyword{ss}%    \definedummyword\ss
3270    \definedummyword{exclamdown}%    \definedummyword\exclamdown
3271    \definedummyword{questiondown}%    \definedummyword\questiondown
3272    \definedummyword{ordf}%    \definedummyword\ordf
3273    \definedummyword{ordm}%    \definedummyword\ordm
3274    %    %
3275    % Although these internal commands shouldn't show up, sometimes they do.    % Although these internal commands shouldn't show up, sometimes they do.
3276    \definedummyword{bf}%    \definedummyword\bf
3277    \definedummyword{gtr}%    \definedummyword\gtr
3278    \definedummyword{hat}%    \definedummyword\hat
3279    \definedummyword{less}%    \definedummyword\less
3280    \definedummyword{sf}%    \definedummyword\sf
3281    \definedummyword{sl}%    \definedummyword\sl
3282    \definedummyword{tclose}%    \definedummyword\tclose
3283    \definedummyword{tt}%    \definedummyword\tt
3284    %    %
3285    \definedummyword{LaTeX}%    \definedummyword\LaTeX
3286    \definedummyword{TeX}%    \definedummyword\TeX
3287    %    %
3288    % Assorted special characters.    % Assorted special characters.
3289    \definedummyword{bullet}%    \definedummyword\bullet
3290    \definedummyword{comma}%    \definedummyword\comma
3291    \definedummyword{copyright}%    \definedummyword\copyright
3292    \definedummyword{registeredsymbol}%    \definedummyword\registeredsymbol
3293    \definedummyword{dots}%    \definedummyword\dots
3294    \definedummyword{enddots}%    \definedummyword\enddots
3295    \definedummyword{equiv}%    \definedummyword\equiv
3296    \definedummyword{error}%    \definedummyword\error
3297    \definedummyword{euro}%    \definedummyword\euro
3298    \definedummyword{expansion}%    \definedummyword\expansion
3299    \definedummyword{minus}%    \definedummyword\minus
3300    \definedummyword{pounds}%    \definedummyword\pounds
3301    \definedummyword{point}%    \definedummyword\point
3302    \definedummyword{print}%    \definedummyword\print
3303    \definedummyword{result}%    \definedummyword\result
3304      %
3305      % We want to disable all macros so that they are not expanded by \write.
3306      \macrolist
3307      %
3308      \normalturnoffactive
3309    %    %
3310    % Handle some cases of @value -- where it does not contain any    % Handle some cases of @value -- where it does not contain any
3311    % (non-fully-expandable) commands.    % (non-fully-expandable) commands.
3312    \makevalueexpandable    \makevalueexpandable
   %  
   % Normal spaces, not active ones.  
   \unsepspaces  
   %  
   % No macro expansion.  
   \turnoffmacros  
3313  }  }
3314    
3315  % \commondummiesnofonts: common to \commondummies and \indexnofonts.  % \commondummiesnofonts: common to \commondummies and \indexnofonts.
3316  %  %
3317  % Better have this without active chars.  \def\commondummiesnofonts{%
3318  {    % Control letters and accents.
3319    \catcode`\~=\other    \definedummyletter\!%
3320    \gdef\commondummiesnofonts{%    \definedummyaccent\"%
3321      % Control letters and accents.    \definedummyaccent\'%
3322      \definedummyletter{!}%    \definedummyletter\*%
3323      \definedummyaccent{"}%    \definedummyaccent\,%
3324      \definedummyaccent{'}%    \definedummyletter\.%
3325      \definedummyletter{*}%    \definedummyletter\/%
3326      \definedummyaccent{,}%    \definedummyletter\:%
3327      \definedummyletter{.}%    \definedummyaccent\=%
3328      \definedummyletter{/}%    \definedummyletter\?%
3329      \definedummyletter{:}%    \definedummyaccent\^%
3330      \definedummyaccent{=}%    \definedummyaccent\`%
3331      \definedummyletter{?}%    \definedummyaccent\~%
3332      \definedummyaccent{^}%    \definedummyword\u
3333      \definedummyaccent{`}%    \definedummyword\v
3334      \definedummyaccent{~}%    \definedummyword\H
3335      \definedummyword{u}%    \definedummyword\dotaccent
3336      \definedummyword{v}%    \definedummyword\ringaccent
3337      \definedummyword{H}%    \definedummyword\tieaccent
3338      \definedummyword{dotaccent}%    \definedummyword\ubaraccent
3339      \definedummyword{ringaccent}%    \definedummyword\udotaccent
3340      \definedummyword{tieaccent}%    \definedummyword\dotless
3341      \definedummyword{ubaraccent}%    %
3342      \definedummyword{udotaccent}%    % Texinfo font commands.
3343      \definedummyword{dotless}%    \definedummyword\b
3344      %    \definedummyword\i
3345      % Texinfo font commands.    \definedummyword\r
3346      \definedummyword{b}%    \definedummyword\sc
3347      \definedummyword{i}%    \definedummyword\t
3348      \definedummyword{r}%    %
3349      \definedummyword{sc}%    % Commands that take arguments.
3350      \definedummyword{t}%    \definedummyword\acronym
3351      %    \definedummyword\cite
3352      % Commands that take arguments.    \definedummyword\code
3353      \definedummyword{acronym}%    \definedummyword\command
3354      \definedummyword{cite}%    \definedummyword\dfn
3355      \definedummyword{code}%    \definedummyword\emph
3356      \definedummyword{command}%    \definedummyword\env
3357      \definedummyword{dfn}%    \definedummyword\file
3358      \definedummyword{emph}%    \definedummyword\kbd
3359      \definedummyword{env}%    \definedummyword\key
3360      \definedummyword{file}%    \definedummyword\math
3361      \definedummyword{kbd}%    \definedummyword\option
3362      \definedummyword{key}%    \definedummyword\pxref
3363      \definedummyword{math}%    \definedummyword\ref
3364      \definedummyword{option}%    \definedummyword\samp
3365      \definedummyword{samp}%    \definedummyword\strong
3366      \definedummyword{strong}%    \definedummyword\tie
3367      \definedummyword{tie}%    \definedummyword\uref
3368      \definedummyword{uref}%    \definedummyword\url
3369      \definedummyword{url}%    \definedummyword\var
3370      \definedummyword{var}%    \definedummyword\verb
3371      \definedummyword{verb}%    \definedummyword\w
3372      \definedummyword{w}%    \definedummyword\xref
   }  
3373  }  }
3374    
3375  % \indexnofonts is used when outputting the strings to sort the index  % \indexnofonts is used when outputting the strings to sort the index
# Line 3416  where each line of input produces a line Line 3379  where each line of input produces a line
3379  %  %
3380  \def\indexnofonts{%  \def\indexnofonts{%
3381    % Accent commands should become @asis.    % Accent commands should become @asis.
3382    \def\definedummyaccent##1{%    \def\definedummyaccent##1{\let##1\asis}%
     \expandafter\let\csname ##1\endcsname\asis  
   }%  
3383    % We can just ignore other control letters.    % We can just ignore other control letters.
3384    \def\definedummyletter##1{%    \def\definedummyletter##1{\let##1\empty}%
     \expandafter\def\csname ##1\endcsname{}%  
   }%  
3385    % Hopefully, all control words can become @asis.    % Hopefully, all control words can become @asis.
3386    \let\definedummyword\definedummyaccent    \let\definedummyword\definedummyaccent
3387    %    %
# Line 3476  where each line of input produces a line Line 3435  where each line of input produces a line
3435    \def\print{-|}%    \def\print{-|}%
3436    \def\result{=>}%    \def\result{=>}%
3437    %    %
3438    % Don't write macro names.    % We need to get rid of all macros, leaving only the arguments (if present).
3439    \emptyusermacros    % Of course this is not nearly correct, but it is the best we can do for now.
3440      % makeinfo does not expand macros in the argument to @deffn, which ends up
3441      % writing an index entry, and texindex isn't prepared for an index sort entry
3442      % that starts with \.
3443      %
3444      % Since macro invocations are followed by braces, we can just redefine them
3445      % to take a single TeX argument.  The case of a macro invocation that
3446      % goes to end-of-line is not handled.
3447      %
3448      \macrolist
3449  }  }
3450    
3451  \let\indexbackslash=0  %overridden during \printindex.  \let\indexbackslash=0  %overridden during \printindex.
# Line 3524  where each line of input produces a line Line 3492  where each line of input produces a line
3492    %    %
3493    % Remember, we are within a group.    % Remember, we are within a group.
3494    \indexdummies % Must do this here, since \bf, etc expand at this stage    \indexdummies % Must do this here, since \bf, etc expand at this stage
   \escapechar=`\\  
3495    \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now    \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now
3496        % so it will be output as is; and it will print as backslash.        % so it will be output as is; and it will print as backslash.
3497    %    %
# Line 4584  where each line of input produces a line Line 4551  where each line of input produces a line
4551      \fi      \fi
4552      %      %
4553      \iflinks      \iflinks
4554        {\atdummies \turnoffactive        {\atdummies
4555         \edef\temp{%         \edef\temp{%
4556           \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}%           \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}%
4557         \temp         \temp
# Line 4934  where each line of input produces a line Line 4901  where each line of input produces a line
4901    
4902  \let\afterenvbreak = \aboveenvbreak  \let\afterenvbreak = \aboveenvbreak
4903    
4904  % \nonarrowing is a flag.  If "set", @lisp etc don't narrow margins.  % \nonarrowing is a flag.  If "set", @lisp etc don't narrow margins; it will
4905    % also clear it, so that its embedded environments do the narrowing again.
4906  \let\nonarrowing=\relax  \let\nonarrowing=\relax
4907    
4908  % @cartouche ... @end cartouche: draw rectangle w/rounded corners around  % @cartouche ... @end cartouche: draw rectangle w/rounded corners around
# Line 4971  where each line of input produces a line Line 4939  where each line of input produces a line
4939                                  % each corner char, and rule thickness                                  % each corner char, and rule thickness
4940    \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip    \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
4941    % Flag to tell @lisp, etc., not to narrow margin.    % Flag to tell @lisp, etc., not to narrow margin.
4942    \let\nonarrowing=\comment    \let\nonarrowing = t%
4943    \vbox\bgroup    \vbox\bgroup
4944        \baselineskip=0pt\parskip=0pt\lineskip=0pt        \baselineskip=0pt\parskip=0pt\lineskip=0pt
4945        \carttop        \carttop
# Line 5011  where each line of input produces a line Line 4979  where each line of input produces a line
4979    \parskip = 0pt    \parskip = 0pt
4980    \parindent = 0pt    \parindent = 0pt
4981    \emergencystretch = 0pt % don't try to avoid overfull boxes    \emergencystretch = 0pt % don't try to avoid overfull boxes
   % @cartouche defines \nonarrowing to inhibit narrowing  
   % at next level down.  
4982    \ifx\nonarrowing\relax    \ifx\nonarrowing\relax
4983      \advance \leftskip by \lispnarrowing      \advance \leftskip by \lispnarrowing
4984      \exdentamount=\lispnarrowing      \exdentamount=\lispnarrowing
4985      \else
4986        \let\nonarrowing = \relax
4987    \fi    \fi
4988    \let\exdent=\nofillexdent    \let\exdent=\nofillexdent
4989  }  }
# Line 5115  where each line of input produces a line Line 5083  where each line of input produces a line
5083      \advance\leftskip by \lispnarrowing      \advance\leftskip by \lispnarrowing
5084      \advance\rightskip by \lispnarrowing      \advance\rightskip by \lispnarrowing
5085      \exdentamount = \lispnarrowing      \exdentamount = \lispnarrowing
5086      \else
5087      \let\nonarrowing = \relax      \let\nonarrowing = \relax
5088    \fi    \fi
5089    \parsearg\quotationlabel    \parsearg\quotationlabel
# Line 5207  where each line of input produces a line Line 5176  where each line of input produces a line
5176    }    }
5177  \endgroup  \endgroup
5178  \def\setupverbatim{%  \def\setupverbatim{%
5179      \let\nonarrowing = t%
5180    \nonfillstart    \nonfillstart
   \advance\leftskip by -\defbodyindent  
5181    % Easiest (and conventionally used) font for verbatim    % Easiest (and conventionally used) font for verbatim
5182    \tt    \tt
5183    \def\par{\leavevmode\egroup\box0\endgraf}%    \def\par{\leavevmode\egroup\box0\endgraf}%
# Line 5678  where each line of input produces a line Line 5647  where each line of input produces a line
5647  \newcount\paramno   % Count of parameters  \newcount\paramno   % Count of parameters
5648  \newtoks\macname    % Macro name  \newtoks\macname    % Macro name
5649  \newif\ifrecursive  % Is it recursive?  \newif\ifrecursive  % Is it recursive?
5650  \def\macrolist{}    % List of all defined macros in the form  
5651                      % \do\macro1\do\macro2...  % List of all defined macros in the form
5652    %    \definedummyword\macro1\definedummyword\macro2...
5653    % Currently is also contains all @aliases; the list can be split
5654    % if there is a need.
5655    \def\macrolist{}
5656    
5657    % Add the macro to \macrolist
5658    \def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname}
5659    \def\addtomacrolistxxx#1{%
5660         \toks0 = \expandafter{\macrolist\definedummyword#1}%
5661         \xdef\macrolist{\the\toks0}%
5662    }
5663    
5664  % Utility routines.  % Utility routines.
5665  % This does \let #1 = #2, with \csnames; that is,  % This does \let #1 = #2, with \csnames; that is,
# Line 5777  where each line of input produces a line Line 5757  where each line of input produces a line
5757       \else \errmessage{Macro name \the\macname\space already defined}\fi       \else \errmessage{Macro name \the\macname\space already defined}\fi
5758       \global\cslet{macsave.\the\macname}{\the\macname}%       \global\cslet{macsave.\the\macname}{\the\macname}%
5759       \global\expandafter\let\csname ismacro.\the\macname\endcsname=1%       \global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
5760       % Add the macroname to \macrolist       \addtomacrolist{\the\macname}%
      \toks0 = \expandafter{\macrolist\do}%  
      \xdef\macrolist{\the\toks0  
        \expandafter\noexpand\csname\the\macname\endcsname}%  
5761    \fi    \fi
5762    \begingroup \macrobodyctxt    \begingroup \macrobodyctxt
5763    \ifrecursive \expandafter\parsermacbody    \ifrecursive \expandafter\parsermacbody
# Line 5794  where each line of input produces a line Line 5771  where each line of input produces a line
5771      % Remove the macro name from \macrolist:      % Remove the macro name from \macrolist:
5772      \begingroup      \begingroup
5773        \expandafter\let\csname#1\endcsname \relax        \expandafter\let\csname#1\endcsname \relax
5774        \let\do\unmacrodo        \let\definedummyword\unmacrodo
5775        \xdef\macrolist{\macrolist}%        \xdef\macrolist{\macrolist}%
5776      \endgroup      \endgroup
5777    \else    \else
# Line 5806  where each line of input produces a line Line 5783  where each line of input produces a line
5783  % macro definitions that have been changed to \relax.  % macro definitions that have been changed to \relax.
5784  %  %
5785  \def\unmacrodo#1{%  \def\unmacrodo#1{%
5786    \ifx#1\relax    \ifx #1\relax
5787      % remove this      % remove this
5788    \else    \else
5789      \noexpand\do \noexpand #1%      \noexpand\definedummyword \noexpand#1%
5790    \fi    \fi
5791  }  }
5792    
# Line 5928  where each line of input produces a line Line 5905  where each line of input produces a line
5905      \expandafter\parsearg      \expandafter\parsearg
5906    \fi \next}    \fi \next}
5907    
 % We want to disable all macros during \shipout so that they are not  
 % expanded by \write.  
 \def\turnoffmacros{\begingroup \def\do##1{\let\noexpand##1=\relax}%  
   \edef\next{\macrolist}\expandafter\endgroup\next}  
   
 % For \indexnofonts, we need to get rid of all macros, leaving only the  
 % arguments (if present).  Of course this is not nearly correct, but it  
 % is the best we can do for now.  makeinfo does not expand macros in the  
 % argument to @deffn, which ends up writing an index entry, and texindex  
 % isn't prepared for an index sort entry that starts with \.  
 %  
 % Since macro invocations are followed by braces, we can just redefine them  
 % to take a single TeX argument.  The case of a macro invocation that  
 % goes to end-of-line is not handled.  
 %  
 \def\emptyusermacros{\begingroup  
   \def\do##1{\let\noexpand##1=\noexpand\asis}%  
   \edef\next{\macrolist}\expandafter\endgroup\next}  
   
5908    
5909  % @alias.  % @alias.
5910  % We need some trickery to remove the optional spaces around the equal  % We need some trickery to remove the optional spaces around the equal
# Line 5956  where each line of input produces a line Line 5914  where each line of input produces a line
5914  \def\aliasyyy #1=#2\relax{%  \def\aliasyyy #1=#2\relax{%
5915    {%    {%
5916      \expandafter\let\obeyedspace=\empty      \expandafter\let\obeyedspace=\empty
5917        \addtomacrolist{#1}%
5918      \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}%      \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}%
5919    }%    }%
5920    \next    \next
# Line 6025  where each line of input produces a line Line 5984  where each line of input produces a line
5984    \iflinks    \iflinks
5985      {%      {%
5986        \atdummies  % preserve commands, but don't expand them        \atdummies  % preserve commands, but don't expand them
       \turnoffactive  
5987        \edef\writexrdef##1##2{%        \edef\writexrdef##1##2{%
5988          \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef          \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
5989            ##1}{##2}}% these are parameters of \writexrdef            ##1}{##2}}% these are parameters of \writexrdef
# Line 6110  where each line of input produces a line Line 6068  where each line of input produces a line
6068      % If the user specified the print name (third arg) to the ref,      % If the user specified the print name (third arg) to the ref,
6069      % print it instead of our usual "Figure 1.2".      % print it instead of our usual "Figure 1.2".
6070      \ifdim\wd0 = 0pt      \ifdim\wd0 = 0pt
6071        \refx{#1-snt}%        \refx{#1-snt}{}%
6072      \else      \else
6073        \printedrefname        \printedrefname
6074      \fi      \fi
# Line 6693  where each line of input produces a line Line 6651  where each line of input produces a line
6651        % \floatlabel-lof.  Besides \floatident, we include the short        % \floatlabel-lof.  Besides \floatident, we include the short
6652        % caption if specified, else the full caption if specified, else nothing.        % caption if specified, else the full caption if specified, else nothing.
6653        {%        {%
6654          \atdummies \turnoffactive          \atdummies
6655            %
6656          % since we read the caption text in the macro world, where ^^M          % since we read the caption text in the macro world, where ^^M
6657          % is turned into a normal character, we have to scan it back, so          % is turned into a normal character, we have to scan it back, so
6658          % we don't write the literal three characters "^^M" into the aux file.          % we don't write the literal three characters "^^M" into the aux file.
# Line 6714  where each line of input produces a line Line 6673  where each line of input produces a line
6673    %    %
6674    % place the captured inserts    % place the captured inserts
6675    %    %
6676    % BEWARE: when the floats start float, we have to issue warning whenever an    % BEWARE: when the floats start floating, we have to issue warning
6677    % insert appears inside a float which could possibly float. --kasal, 26may04    % whenever an insert appears inside a float which could possibly
6678      % float. --kasal, 26may04
6679    %    %
6680    \checkinserts    \checkinserts
6681  }  }
# Line 6883  should work if nowhere else does.} Line 6843  should work if nowhere else does.}
6843    \fi    \fi
6844  }  }
6845    
6846  % Parameters in order: 1) textheight; 2) textwidth; 3) voffset;  % Parameters in order: 1) textheight; 2) textwidth;
6847  % 4) hoffset; 5) binding offset; 6) topskip; 7) physical page height; 8)  % 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
6848  % physical page width.  % 7) physical page height; 8) physical page width.
6849  %  %
6850  % We also call \setleading{\textleading}, so the caller should define  % We also call \setleading{\textleading}, so the caller should define
6851  % \textleading.  The caller should also set \parskip.  % \textleading.  The caller should also set \parskip.
# Line 6932  should work if nowhere else does.} Line 6892  should work if nowhere else does.}
6892                      {11in}{8.5in}%                      {11in}{8.5in}%
6893  }}  }}
6894    
6895  % Use @smallbook to reset parameters for 7x9.5 (or so) format.  % Use @smallbook to reset parameters for 7x9.25 trim size.
6896  \def\smallbook{{\globaldefs = 1  \def\smallbook{{\globaldefs = 1
6897    \parskip = 2pt plus 1pt    \parskip = 2pt plus 1pt
6898    \textleading = 12pt    \textleading = 12pt
# Line 6949  should work if nowhere else does.} Line 6909  should work if nowhere else does.}
6909    \defbodyindent = .5cm    \defbodyindent = .5cm
6910  }}  }}
6911    
6912    % Use @smallerbook to reset parameters for 6x9 trim size.
6913    % (Just testing, parameters still in flux.)
6914    \def\smallerbook{{\globaldefs = 1
6915      \parskip = 1.5pt plus 1pt
6916      \textleading = 12pt
6917      %
6918      \internalpagesizes{7.4in}{4.8in}%
6919                        {-.2in}{-.4in}%
6920                        {0pt}{14pt}%
6921                        {9in}{6in}%
6922      %
6923      \lispnarrowing = 0.25in
6924      \tolerance = 700
6925      \hfuzz = 1pt
6926      \contentsrightmargin = 0pt
6927      \defbodyindent = .4cm
6928    }}
6929    
6930  % Use @afourpaper to print on European A4 paper.  % Use @afourpaper to print on European A4 paper.
6931  \def\afourpaper{{\globaldefs = 1  \def\afourpaper{{\globaldefs = 1
6932    \parskip = 3pt plus 2pt minus 1pt    \parskip = 3pt plus 2pt minus 1pt
# Line 7124  should work if nowhere else does.} Line 7102  should work if nowhere else does.}
7102  % \otherifyactive is called near the end of this file.  % \otherifyactive is called near the end of this file.
7103  \def\otherifyactive{\catcode`+=\other \catcode`\_=\other}  \def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
7104    
7105    % Same as @turnoffactive below, but backslash retains it's normal definition.
7106    % (Before 2005-08-15, this macro explicitly assigned @let\=@normalbackslash,
7107    % but it doesn't seem to be necessary. --kasal)
7108    \def\normalturnoffactive{%
7109      \let"=\normaldoublequote
7110      \let~=\normaltilde
7111      \let^=\normalcaret
7112      \let_=\normalunderscore
7113      \let|=\normalverticalbar
7114      \let<=\normalless
7115      \let>=\normalgreater
7116      \let+=\normalplus
7117      \let$=\normaldollar %$ font-lock fix
7118      \unsepspaces
7119    }
7120    
7121    % Used sometimes to turn off (effectively) the active characters even after
7122    % parsing them.
7123    \def\turnoffactive{%
7124      \normalturnoffactive
7125      \otherbackslash
7126    }
7127    
7128  \catcode`\@=0  \catcode`\@=0
7129    
7130  % \backslashcurfont outputs one backslash character in current font,  % \backslashcurfont outputs one backslash character in current font,
# Line 7131  should work if nowhere else does.} Line 7132  should work if nowhere else does.}
7132  \global\chardef\backslashcurfont=`\\  \global\chardef\backslashcurfont=`\\
7133  \global\let\rawbackslashxx=\backslashcurfont  % let existing .??s files work  \global\let\rawbackslashxx=\backslashcurfont  % let existing .??s files work
7134    
 % \rawbackslash defines an active \ to do \backslashcurfont.  
 % \otherbackslash defines an active \ to be a literal `\' character with  
 % catcode other.  
 {\catcode`\\=\active  
  @gdef@rawbackslash{@let\=@backslashcurfont}  
  @gdef@otherbackslash{@let\=@realbackslash}  
 }  
   
7135  % \realbackslash is an actual character `\' with catcode other, and  % \realbackslash is an actual character `\' with catcode other, and
7136  % \doublebackslash is two of them (for the pdf outlines).  % \doublebackslash is two of them (for the pdf outlines).
7137  {\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}}  {\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}}
7138    
7139  % \normalbackslash outputs one backslash in fixed width font.  % In texinfo, backslash is an active character; it prints the backslash
7140  \def\normalbackslash{{\tt\backslashcurfont}}  % in fixed width font.
   
7141  \catcode`\\=\active  \catcode`\\=\active
7142    @def@normalbackslash{{@tt@backslashcurfont}}
7143    % On startup, @fixbackslash assigns:
7144    %  @let \ = @normalbackslash
7145    
7146  % Used sometimes to turn off (effectively) the active characters  % \rawbackslash defines an active \ to do \backslashcurfont.
7147  % even after parsing them.  % \otherbackslash defines an active \ to be a literal `\' character with
7148  @def@turnoffactive{%  % catcode other.
7149    @let"=@normaldoublequote  @gdef@rawbackslash{@let\=@backslashcurfont}
7150    @let\=@realbackslash  @gdef@otherbackslash{@let\=@realbackslash}
   @let~=@normaltilde  
   @let^=@normalcaret  
   @let_=@normalunderscore  
   @let|=@normalverticalbar  
   @let<=@normalless  
   @let>=@normalgreater  
   @let+=@normalplus  
   @let$=@normaldollar %$ font-lock fix  
   @unsepspaces  
 }  
   
 % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of  
 % the literal character `\'.  (Thus, \ is not expandable when this is in  
 % effect.)  
 %  
 @def@normalturnoffactive{@turnoffactive @let\=@normalbackslash}  
7151    
7152  % Make _ and + \other characters, temporarily.  % Make _ and + \other characters, temporarily.
7153  % This is canceled by @fixbackslash.  % This is canceled by @fixbackslash.
# Line 7182  should work if nowhere else does.} Line 7161  should work if nowhere else does.}
7161  @global@let\ = @eatinput  @global@let\ = @eatinput
7162    
7163  % On the other hand, perhaps the file did not have a `\input texinfo'. Then  % On the other hand, perhaps the file did not have a `\input texinfo'. Then
7164  % the first `\{ in the file would cause an error. This macro tries to fix  % the first `\' in the file would cause an error. This macro tries to fix
7165  % that, assuming it is called before the first `\' could plausibly occur.  % that, assuming it is called before the first `\' could plausibly occur.
7166  % Also turn back on active characters that might appear in the input  % Also turn back on active characters that might appear in the input
7167  % file name, in case not using a pre-dumped format.  % file name, in case not using a pre-dumped format.

Legend:
Removed from v.1.1.1.1.2.4  
changed lines
  Added in v.1.1.1.1.2.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26