version 1.1.1.1, 2014/07/30 08:16:45
|
version 1.1.1.2, 2021/03/17 01:01:01
|
Line 3
|
Line 3
|
% Load plain if necessary, i.e., if running under initex. |
% Load plain if necessary, i.e., if running under initex. |
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi |
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi |
% |
% |
\def\texinfoversion{2013-09-11.11} | \def\texinfoversion{2015-11-22.14} |
% |
% |
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, |
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, |
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |
% 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. | % 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 |
| % Free Software Foundation, Inc. |
% |
% |
% This texinfo.tex file is free software: you can redistribute it and/or |
% This texinfo.tex file is free software: you can redistribute it and/or |
% modify it under the terms of the GNU General Public License as |
% modify it under the terms of the GNU General Public License as |
Line 96
|
Line 97
|
\let\ptexraggedright=\raggedright |
\let\ptexraggedright=\raggedright |
\let\ptexrbrace=\} |
\let\ptexrbrace=\} |
\let\ptexslash=\/ |
\let\ptexslash=\/ |
|
\let\ptexsp=\sp |
\let\ptexstar=\* |
\let\ptexstar=\* |
|
\let\ptexsup=\sup |
\let\ptext=\t |
\let\ptext=\t |
\let\ptextop=\top |
\let\ptextop=\top |
{\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode |
{\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode |
Line 193
|
Line 196
|
wide-spread wrap-around |
wide-spread wrap-around |
} |
} |
|
|
% Margin to add to right of even pages, to left of odd pages. |
|
\newdimen\bindingoffset |
|
\newdimen\normaloffset |
|
\newdimen\pagewidth \newdimen\pageheight |
|
|
|
% For a final copy, take out the rectangles |
|
% that mark overfull boxes (in case you have decided |
|
% that the text looks ok even though it passes the margin). |
|
% |
|
\def\finalout{\overfullrule=0pt } |
|
|
|
% Sometimes it is convenient to have everything in the transcript file |
% Sometimes it is convenient to have everything in the transcript file |
% and nothing on the terminal. We don't just call \tracingall here, |
% and nothing on the terminal. We don't just call \tracingall here, |
% since that produces some useless output on the terminal. We also make |
% since that produces some useless output on the terminal. We also make |
Line 248
|
Line 240
|
\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount |
\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount |
\removelastskip\penalty-200\bigskip\fi\fi} |
\removelastskip\penalty-200\bigskip\fi\fi} |
|
|
|
% Output routine |
|
% |
|
|
|
% For a final copy, take out the rectangles |
|
% that mark overfull boxes (in case you have decided |
|
% that the text looks ok even though it passes the margin). |
|
% |
|
\def\finalout{\overfullrule=0pt } |
|
|
% Do @cropmarks to get crop marks. |
% Do @cropmarks to get crop marks. |
% |
% |
\newif\ifcropmarks |
\newif\ifcropmarks |
Line 274
|
Line 275
|
% described on page 260 of The TeXbook. It involves outputting two |
% described on page 260 of The TeXbook. It involves outputting two |
% marks for the sectioning macros, one before the section break, and |
% marks for the sectioning macros, one before the section break, and |
% one after. I won't pretend I can describe this better than DEK... |
% one after. I won't pretend I can describe this better than DEK... |
|
% |
\def\domark{% |
\def\domark{% |
\toks0=\expandafter{\lastchapterdefs}% |
\toks0=\expandafter{\lastchapterdefs}% |
\toks2=\expandafter{\lastsectiondefs}% |
\toks2=\expandafter{\lastsectiondefs}% |
Line 286
|
Line 288
|
\noexpand\else \the\toks8 % 2: color marks |
\noexpand\else \the\toks8 % 2: color marks |
}% |
}% |
} |
} |
|
|
|
% \gettopheadingmarks, \getbottomheadingmarks - extract needed part of mark. |
|
% |
% \topmark doesn't work for the very first chapter (after the title |
% \topmark doesn't work for the very first chapter (after the title |
% page or the contents), so we use \firstmark there -- this gets us |
% page or the contents), so we use \firstmark there -- this gets us |
% the mark with the chapter defs, unless the user sneaks in, e.g., |
% the mark with the chapter defs, unless the user sneaks in, e.g., |
Line 301
|
Line 306
|
% Avoid "undefined control sequence" errors. |
% Avoid "undefined control sequence" errors. |
\def\lastchapterdefs{} |
\def\lastchapterdefs{} |
\def\lastsectiondefs{} |
\def\lastsectiondefs{} |
|
\def\lastsection{} |
\def\prevchapterdefs{} |
\def\prevchapterdefs{} |
\def\prevsectiondefs{} |
\def\prevsectiondefs{} |
\def\lastcolordefs{} |
\def\lastcolordefs{} |
|
|
|
% Margin to add to right of even pages, to left of odd pages. |
|
\newdimen\bindingoffset |
|
\newdimen\normaloffset |
|
\newdimen\pagewidth \newdimen\pageheight |
|
|
% Main output routine. |
% Main output routine. |
|
% |
\chardef\PAGE = 255 |
\chardef\PAGE = 255 |
\output = {\onepageout{\pagecontents\PAGE}} |
\output = {\onepageout{\pagecontents\PAGE}} |
|
|
\newbox\headlinebox |
\newbox\headlinebox |
\newbox\footlinebox |
\newbox\footlinebox |
|
|
% \onepageout takes a vbox as an argument. Note that \pagecontents | % \onepageout takes a vbox as an argument. |
% does insertions, but you have to call it yourself. | % \shipout a vbox for a single page, adding an optional header, footer, |
| % cropmarks, and footnote. This also causes index entries for this page |
| % to be written to the auxiliary files. |
| % |
\def\onepageout#1{% |
\def\onepageout#1{% |
\ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi |
\ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi |
% |
% |
\ifodd\pageno \advance\hoffset by \bindingoffset |
\ifodd\pageno \advance\hoffset by \bindingoffset |
\else \advance\hoffset by -\bindingoffset\fi |
\else \advance\hoffset by -\bindingoffset\fi |
% |
% |
|
% Common context changes for both heading and footing. |
% Do this outside of the \shipout so @code etc. will be expanded in |
% Do this outside of the \shipout so @code etc. will be expanded in |
% the headline as they should be, not taken literally (outputting ''code). |
% the headline as they should be, not taken literally (outputting ''code). |
\def\commmonheadfootline{\let\hsize=\pagewidth \texinfochars} |
\def\commmonheadfootline{\let\hsize=\pagewidth \texinfochars} |
% |
% |
\ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi | % Retrieve the information for the headings from the marks in the page, |
\global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}% | % and call Plain TeX's \makeheadline and \makefootline, which use the |
| % values in \headline and \footline. |
% |
% |
|
% This is used to check if we are on the first page of a chapter. |
|
\ifcase0\topmark\fi |
|
\ifx\thischapter\empty |
|
% See comment for \gettopheadingmarks |
|
\ifcase0\firstmark\fi |
|
\let\curchaptername\thischaptername |
|
\ifcase1\firstmark\fi |
|
\let\prevchaptername\thischaptername |
|
\else |
|
\let\curchaptername\thischaptername |
|
\ifcase1\topmark\fi |
|
\let\prevchaptername\thischaptername |
|
\fi |
|
% |
|
\ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi |
\ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi |
\ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi |
|
% |
|
\ifx\curchaptername\prevchaptername |
|
\let\thischapterheading\thischapter |
|
\else |
|
% \thischapterheading is the same as \thischapter except it is blank |
|
% for the first page of a chapter. This is to prevent the chapter name |
|
% being shown twice. |
|
\def\thischapterheading{}% |
|
\fi |
|
% |
|
\global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}% |
\global\setbox\footlinebox = \vbox{\commmonheadfootline \makefootline}% |
\global\setbox\footlinebox = \vbox{\commmonheadfootline \makefootline}% |
% |
% |
{% |
{% |
|
% Set context for writing to auxiliary files like index files. |
% Have to do this stuff outside the \shipout because we want it to |
% Have to do this stuff outside the \shipout because we want it to |
% take effect in \write's, yet the group defined by the \vbox ends |
% take effect in \write's, yet the group defined by the \vbox ends |
% before the \shipout runs. |
% before the \shipout runs. |
Line 339
|
Line 383
|
\normalturnoffactive % \ in index entries must not stay \, e.g., if |
\normalturnoffactive % \ in index entries must not stay \, e.g., if |
% the page break happens to be in the middle of an example. |
% the page break happens to be in the middle of an example. |
% We don't want .vr (or whatever) entries like this: |
% We don't want .vr (or whatever) entries like this: |
% \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} | % \entry{{\indexbackslash }acronym}{32}{\code {\acronym}} |
% "\acronym" won't work when it's read back in; |
% "\acronym" won't work when it's read back in; |
% it needs to be |
% it needs to be |
% {\code {{\tt \backslashcurfont }acronym} | % {\code {{\backslashcurfont }acronym} |
\shipout\vbox{% |
\shipout\vbox{% |
% 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. |
\ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi |
\ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi |
Line 400
|
Line 444
|
|
|
\newinsert\margin \dimen\margin=\maxdimen |
\newinsert\margin \dimen\margin=\maxdimen |
|
|
|
% Main part of page, including any footnotes |
\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} |
\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} |
{\catcode`\@ =11 |
{\catcode`\@ =11 |
\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi |
\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi |
Line 422
|
Line 467
|
\def\nsbot{\vbox |
\def\nsbot{\vbox |
{\hrule height\cornerlong depth\cornerthick width\cornerthick}} |
{\hrule height\cornerlong depth\cornerthick width\cornerthick}} |
|
|
|
|
|
% Argument parsing |
|
|
% Parse an argument, then pass it to #1. The argument is the rest of |
% Parse an argument, then pass it to #1. The argument is the rest of |
% the input line (except we remove a trailing comment). #1 should be a |
% the input line (except we remove a trailing comment). #1 should be a |
% macro which expects an ordinary undelimited TeX argument. |
% macro which expects an ordinary undelimited TeX argument. |
|
% For example, \def\foo{\parsearg\fooxxx}. |
% |
% |
\def\parsearg{\parseargusing{}} |
\def\parsearg{\parseargusing{}} |
\def\parseargusing#1#2{% |
\def\parseargusing#1#2{% |
Line 443
|
Line 492
|
}% |
}% |
} |
} |
|
|
% First remove any @comment, then any @c comment. | % First remove any @comment, then any @c comment. Also remove a @texinfoc |
| % comment (see \scanmacro for details). Pass the result on to \argcheckspaces. |
\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} |
\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} |
\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} | \def\argremovec#1\c#2\ArgTerm{\argremovetexinfoc #1\texinfoc\ArgTerm} |
| \def\argremovetexinfoc#1\texinfoc#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} |
|
|
% Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space. |
% Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space. |
% |
% |
Line 480
|
Line 531
|
% |
% |
\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} |
\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} |
|
|
|
|
|
% \parseargdef - define a command taking an argument on the line |
|
% |
% \parseargdef\foo{...} |
% \parseargdef\foo{...} |
% is roughly equivalent to |
% is roughly equivalent to |
% \def\foo{\parsearg\Xfoo} |
% \def\foo{\parsearg\Xfoo} |
% \def\Xfoo#1{...} |
% \def\Xfoo#1{...} |
% |
|
% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my |
|
% favourite TeX trick. --kasal, 16nov03 |
|
|
|
\def\parseargdef#1{% |
\def\parseargdef#1{% |
\expandafter \doparseargdef \csname\string#1\endcsname #1% |
\expandafter \doparseargdef \csname\string#1\endcsname #1% |
} |
} |
Line 677
|
Line 727
|
\endgraf % Not \par, as it may have been set to \lisppar. |
\endgraf % Not \par, as it may have been set to \lisppar. |
\global\dimen1 = \prevdepth |
\global\dimen1 = \prevdepth |
\egroup % End the \vtop. |
\egroup % End the \vtop. |
|
\addgroupbox |
|
\prevdepth = \dimen1 |
|
\checkinserts |
|
} |
|
|
|
\def\addgroupbox{ |
% \dimen0 is the vertical size of the group's box. |
% \dimen0 is the vertical size of the group's box. |
\dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox |
\dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox |
% \dimen2 is how much space is left on the page (more or less). |
% \dimen2 is how much space is left on the page (more or less). |
Line 689
|
Line 745
|
\fi |
\fi |
\fi |
\fi |
\box\groupbox |
\box\groupbox |
\prevdepth = \dimen1 |
|
\checkinserts |
|
} |
} |
|
|
% |
% |
% TeX puts in an \escapechar (i.e., `@') at the beginning of the help |
% TeX puts in an \escapechar (i.e., `@') at the beginning of the help |
% message, so this ends up printing `@group can only ...'. |
% message, so this ends up printing `@group can only ...'. |
Line 934 where each line of input produces a line of output.}
|
Line 989 where each line of input produces a line of output.}
|
% @c is the same as @comment |
% @c is the same as @comment |
% @ignore ... @end ignore is another way to write a comment |
% @ignore ... @end ignore is another way to write a comment |
% |
% |
\def\comment{\begingroup \catcode`\^^M=\other% | \def\comment{\begingroup \catcode`\^^M=\active% |
| \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other\commentxxx}% |
| |
| {\catcode`\^^M=\active% |
| \gdef\commentxxx#1^^M{\endgroup% |
| \futurelet\nexttoken\commentxxxx}% |
| \gdef\commentxxxx{\ifx\nexttoken\aftermacro\expandafter\comment\fi}% |
| } |
| |
| \def\c{\begingroup \catcode`\^^M=\active% |
\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% |
\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% |
\commentxxx} | \cxxx} |
{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} | {\catcode`\^^M=\active \gdef\cxxx#1^^M{\endgroup}} |
% | % See comment in \scanmacro about why the definitions of @c and @comment differ |
\let\c=\comment | |
|
|
% @paragraphindent NCHARS |
% @paragraphindent NCHARS |
% We'll use ems for NCHARS, close enough. |
% We'll use ems for NCHARS, close enough. |
Line 1010 where each line of input produces a line of output.}
|
Line 1073 where each line of input produces a line of output.}
|
% paragraph. |
% paragraph. |
% |
% |
\gdef\dosuppressfirstparagraphindent{% |
\gdef\dosuppressfirstparagraphindent{% |
\gdef\indent{% | \gdef\indent {\restorefirstparagraphindent \indent}% |
\restorefirstparagraphindent | \gdef\noindent{\restorefirstparagraphindent \noindent}% |
\indent | \global\everypar = {\kern -\parindent \restorefirstparagraphindent}% |
}% | |
\gdef\noindent{% | |
\restorefirstparagraphindent | |
\noindent | |
}% | |
\global\everypar = {% | |
\kern -\parindent | |
\restorefirstparagraphindent | |
}% | |
} |
} |
| % |
\gdef\restorefirstparagraphindent{% |
\gdef\restorefirstparagraphindent{% |
\global \let \indent = \ptexindent | \global\let\indent = \ptexindent |
\global \let \noindent = \ptexnoindent | \global\let\noindent = \ptexnoindent |
\global \everypar = {}% | \global\everypar = {}% |
} |
} |
|
|
|
|
% @refill is a no-op. |
% @refill is a no-op. |
\let\refill=\relax |
\let\refill=\relax |
|
|
% If working on a large document in chapters, it is convenient to | % @setfilename INFO-FILENAME - ignored |
% be able to disable indexing, cross-referencing, and contents, for test runs. | \let\setfilename=\comment |
% This is done with @novalidate (before @setfilename). | |
% | |
\newif\iflinks \linkstrue % by default we want the aux files. | |
\let\novalidate = \linksfalse | |
|
|
% @setfilename is done at the beginning of every texinfo file. |
|
% So open here the files we need to have open while reading the input. |
|
% This makes it possible to make a .fmt file for texinfo. |
|
\def\setfilename{% |
|
\fixbackslash % Turn off hack to swallow `\input texinfo'. |
|
\iflinks |
|
\tryauxfile |
|
% Open the new aux file. TeX will close it automatically at exit. |
|
\immediate\openout\auxfile=\jobname.aux |
|
\fi % \openindices needs to do some work in any case. |
|
\openindices |
|
\let\setfilename=\comment % Ignore extra @setfilename cmds. |
|
% |
|
% If texinfo.cnf is present on the system, read it. |
|
% Useful for site-wide @afourpaper, etc. |
|
\openin 1 texinfo.cnf |
|
\ifeof 1 \else \input texinfo.cnf \fi |
|
\closein 1 |
|
% |
|
\comment % Ignore the actual filename. |
|
} |
|
|
|
% Called from \setfilename. |
|
% |
|
\def\openindices{% |
|
\newindex{cp}% |
|
\newcodeindex{fn}% |
|
\newcodeindex{vr}% |
|
\newcodeindex{tp}% |
|
\newcodeindex{ky}% |
|
\newcodeindex{pg}% |
|
} |
|
|
|
% @bye. |
% @bye. |
\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} |
\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} |
|
|
Line 1090 where each line of input produces a line of output.}
|
Line 1107 where each line of input produces a line of output.}
|
\newtoks\toksC |
\newtoks\toksC |
\newtoks\toksD |
\newtoks\toksD |
\newbox\boxA |
\newbox\boxA |
|
\newbox\boxB |
\newcount\countA |
\newcount\countA |
\newif\ifpdf |
\newif\ifpdf |
\newif\ifpdfmakepagedest |
\newif\ifpdfmakepagedest |
Line 1138 output) for that.)}
|
Line 1156 output) for that.)}
|
|
|
\ifpdf |
\ifpdf |
% |
% |
% Color manipulation macros based on pdfcolor.tex, | % Color manipulation macros using ideas from pdfcolor.tex, |
% except using rgb instead of cmyk; the latter is said to render as a |
% except using rgb instead of cmyk; the latter is said to render as a |
% very dark gray on-screen and a very dark halftone in print, instead |
% very dark gray on-screen and a very dark halftone in print, instead |
% of actual black. | % of actual black. The dark red here is dark enough to print on paper as |
| % nearly black, but still distinguishable for online viewing. We use |
| % black by default, though. |
\def\rgbDarkRed{0.50 0.09 0.12} |
\def\rgbDarkRed{0.50 0.09 0.12} |
\def\rgbBlack{0 0 0} |
\def\rgbBlack{0 0 0} |
% |
% |
Line 1251 output) for that.)}
|
Line 1271 output) for that.)}
|
% used to mark target names; must be expandable. |
% used to mark target names; must be expandable. |
\def\pdfmkpgn#1{#1} |
\def\pdfmkpgn#1{#1} |
% |
% |
% by default, use a color that is dark enough to print on paper as | % by default, use black for everything. |
% nearly black, but still distinguishable for online viewing. | \def\urlcolor{\rgbBlack} |
\def\urlcolor{\rgbDarkRed} | \def\linkcolor{\rgbBlack} |
\def\linkcolor{\rgbDarkRed} | |
\def\endlink{\setcolor{\maincolor}\pdfendlink} |
\def\endlink{\setcolor{\maincolor}\pdfendlink} |
% |
% |
% Adding outlines to PDF; macros for calculating structure of outlines |
% Adding outlines to PDF; macros for calculating structure of outlines |
Line 1825 end
|
Line 1844 end
|
% A few fonts for @defun names and args. |
% A few fonts for @defun names and args. |
\setfont\defbf\bfshape{10}{\magstep1}{OT1} |
\setfont\defbf\bfshape{10}{\magstep1}{OT1} |
\setfont\deftt\ttshape{10}{\magstep1}{OT1TT} |
\setfont\deftt\ttshape{10}{\magstep1}{OT1TT} |
|
\setfont\defsl\slshape{10}{\magstep1}{OT1TT} |
\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} |
\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} |
\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} | \def\df{\let\tentt=\deftt \let\tenbf = \defbf |
| \let\tenttsl=\defttsl \let\tensl=\defsl \bf} |
|
|
% Fonts for indices, footnotes, small examples (9pt). |
% Fonts for indices, footnotes, small examples (9pt). |
\def\smallnominalsize{9pt} |
\def\smallnominalsize{9pt} |
Line 1887 end
|
Line 1908 end
|
% Section fonts (14.4pt). |
% Section fonts (14.4pt). |
\def\secnominalsize{14pt} |
\def\secnominalsize{14pt} |
\setfont\secrm\rmbshape{12}{\magstep1}{OT1} |
\setfont\secrm\rmbshape{12}{\magstep1}{OT1} |
|
\setfont\secrmnotbold\rmshape{12}{\magstep1}{OT1} |
\setfont\secit\itbshape{10}{\magstep2}{OT1IT} |
\setfont\secit\itbshape{10}{\magstep2}{OT1IT} |
\setfont\secsl\slbshape{10}{\magstep2}{OT1} |
\setfont\secsl\slbshape{10}{\magstep2}{OT1} |
\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} |
\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} |
Line 1956 end
|
Line 1978 end
|
% A few fonts for @defun names and args. |
% A few fonts for @defun names and args. |
\setfont\defbf\bfshape{10}{\magstephalf}{OT1} |
\setfont\defbf\bfshape{10}{\magstephalf}{OT1} |
\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} |
\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} |
|
\setfont\defsl\slshape{10}{\magstephalf}{OT1TT} |
\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} |
\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} |
\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} | \def\df{\let\tentt=\deftt \let\tenbf = \defbf |
| \let\tensl=\defsl \let\tenttsl=\defttsl \bf} |
|
|
% Fonts for indices, footnotes, small examples (9pt). |
% Fonts for indices, footnotes, small examples (9pt). |
\def\smallnominalsize{9pt} |
\def\smallnominalsize{9pt} |
Line 2089 end
|
Line 2113 end
|
\endgroup |
\endgroup |
} |
} |
|
|
|
|
% In order for the font changes to affect most math symbols and letters, |
% In order for the font changes to affect most math symbols and letters, |
% we have to define the \textfont of the standard families. Since | % we have to define the \textfont of the standard families. We don't |
% texinfo doesn't allow for producing subscripts and superscripts except | % bother to reset \scriptfont and \scriptscriptfont; awaiting user need. |
% in the main text, we don't bother to reset \scriptfont and | |
% \scriptscriptfont (which would also require loading a lot more fonts). | |
% |
% |
\def\resetmathfonts{% |
\def\resetmathfonts{% |
\textfont0=\tenrm \textfont1=\teni \textfont2=\tensy |
\textfont0=\tenrm \textfont1=\teni \textfont2=\tensy |
Line 2108 end
|
Line 2129 end
|
% \tenSTYLE to set the current font. |
% \tenSTYLE to set the current font. |
% |
% |
% Each font-changing command also sets the names \lsize (one size lower) |
% Each font-changing command also sets the names \lsize (one size lower) |
% and \lllsize (three sizes lower). These relative commands are used in | % and \lllsize (three sizes lower). These relative commands are used |
% the LaTeX logo and acronyms. | % in, e.g., the LaTeX logo and acronyms. |
% |
% |
% This all needs generalizing, badly. |
% This all needs generalizing, badly. |
% |
% |
Line 2145 end
|
Line 2166 end
|
\let\tenttsl=\secttsl |
\let\tenttsl=\secttsl |
\def\curfontsize{sec}% |
\def\curfontsize{sec}% |
\def\lsize{subsec}\def\lllsize{reduced}% |
\def\lsize{subsec}\def\lllsize{reduced}% |
\resetmathfonts \setleading{16pt}} | \resetmathfonts \setleading{17pt}} |
\def\subsecfonts{% |
\def\subsecfonts{% |
\let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl |
\let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl |
\let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc |
\let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc |
Line 2574 end
|
Line 2595 end
|
\let\file=\code |
\let\file=\code |
\let\option=\code |
\let\option=\code |
|
|
% @uref (abbreviation for `urlref') takes an optional (comma-separated) | % @uref (abbreviation for `urlref') aka @url takes an optional |
% second argument specifying the text to display and an optional third | % (comma-separated) second argument specifying the text to display and |
% arg as text to display instead of (rather than in addition to) the url | % an optional third arg as text to display instead of (rather than in |
% itself. First (mandatory) arg is the url. | % addition to) the url itself. First (mandatory) arg is the url. |
% (This \urefnobreak definition isn't used now, leaving it for a while | |
% for comparison.) | |
\def\urefnobreak#1{\dourefnobreak #1,,,\finish} | |
\def\dourefnobreak#1,#2,#3,#4\finish{\begingroup | |
\unsepspaces | |
\pdfurl{#1}% | |
\setbox0 = \hbox{\ignorespaces #3}% | |
\ifdim\wd0 > 0pt | |
\unhbox0 % third arg given, show only that | |
\else | |
\setbox0 = \hbox{\ignorespaces #2}% | |
\ifdim\wd0 > 0pt | |
\ifpdf | |
\unhbox0 % PDF: 2nd arg given, show only it | |
\else | |
\unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url | |
\fi | |
\else | |
\code{#1}% only url given, so show it | |
\fi | |
\fi | |
\endlink | |
\endgroup} | |
|
|
% This \urefbreak definition is the active one. | % TeX-only option to allow changing PDF output to show only the second |
| % arg (if given), and not the url (which is then just the link target). |
| \newif\ifurefurlonlylink |
| |
| % The main macro is \urefbreak, which allows breaking at expected |
| % places within the url. (There used to be another version, which |
| % didn't support automatic breaking.) |
\def\urefbreak{\begingroup \urefcatcodes \dourefbreak} |
\def\urefbreak{\begingroup \urefcatcodes \dourefbreak} |
\let\uref=\urefbreak |
\let\uref=\urefbreak |
|
% |
\def\dourefbreak#1{\urefbreakfinish #1,,,\finish} |
\def\dourefbreak#1{\urefbreakfinish #1,,,\finish} |
\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example |
\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example |
\unsepspaces |
\unsepspaces |
Line 2613 end
|
Line 2618 end
|
\ifdim\wd0 > 0pt |
\ifdim\wd0 > 0pt |
\unhbox0 % third arg given, show only that |
\unhbox0 % third arg given, show only that |
\else |
\else |
\setbox0 = \hbox{\ignorespaces #2}% | \setbox0 = \hbox{\ignorespaces #2}% look for second arg |
\ifdim\wd0 > 0pt |
\ifdim\wd0 > 0pt |
\ifpdf |
\ifpdf |
\unhbox0 % PDF: 2nd arg given, show only it | \ifurefurlonlylink |
| % PDF plus option to not display url, show just arg |
| \unhbox0 |
| \else |
| % PDF, normally display both arg and url for consistency, |
| % visibility, if the pdf is eventually used to print, etc. |
| \unhbox0\ (\urefcode{#1})% |
| \fi |
\else |
\else |
\unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url | \unhbox0\ (\urefcode{#1})% DVI, always show arg and url |
\fi |
\fi |
\else |
\else |
\urefcode{#1}% only url given, so show it |
\urefcode{#1}% only url given, so show it |
Line 2658 end
|
Line 2670 end
|
% we put a little stretch before and after the breakable chars, to help |
% we put a little stretch before and after the breakable chars, to help |
% line breaking of long url's. The unequal skips make look better in |
% line breaking of long url's. The unequal skips make look better in |
% cmtt at least, especially for dots. |
% cmtt at least, especially for dots. |
\def\urefprestretch{\urefprebreak \hskip0pt plus.13em } | \def\urefprestretchamount{.13em} |
\def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em } | \def\urefpoststretchamount{.1em} |
| \def\urefprestretch{\urefprebreak \hskip0pt plus\urefprestretchamount\relax} |
| \def\urefpoststretch{\urefpostbreak \hskip0pt plus\urefprestretchamount\relax} |
% |
% |
\def\urefcodeamp{\urefprestretch \&\urefpoststretch} |
\def\urefcodeamp{\urefprestretch \&\urefpoststretch} |
\def\urefcodedot{\urefprestretch .\urefpoststretch} |
\def\urefcodedot{\urefprestretch .\urefpoststretch} |
Line 2786 end
|
Line 2800 end
|
% |
% |
\def\dmn#1{\thinspace #1} |
\def\dmn#1{\thinspace #1} |
|
|
% @l was never documented to mean ``switch to the Lisp font'', |
|
% and it is not used as such in any manual I can find. We need it for |
|
% Polish suppressed-l. --karl, 22sep96. |
|
%\def\l#1{{\li #1}\null} |
|
|
|
% @acronym for "FBI", "NATO", and the like. |
% @acronym for "FBI", "NATO", and the like. |
% We print this one point size smaller, since it's intended for |
% We print this one point size smaller, since it's intended for |
% all-uppercase. |
% all-uppercase. |
Line 2857 end
|
Line 2866 end
|
\let\v=\check |
\let\v=\check |
\let\~=\tilde |
\let\~=\tilde |
\let\dotaccent=\dot |
\let\dotaccent=\dot |
|
% have to provide another name for sup operator |
|
\let\mathopsup=\sup |
$\finishmath |
$\finishmath |
} |
} |
\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. |
\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. |
Line 2880 end
|
Line 2891 end
|
} |
} |
} |
} |
|
|
% ctrl is no longer a Texinfo command, but leave this definition for fun. | % for @sub and @sup, if in math mode, just do a normal sub/superscript. |
\def\ctrl #1{{\tt \rawbackslash \hat}#1} | % If in text, use math to place as sub/superscript, but switch |
| % into text mode, with smaller fonts. This is a different font than the |
| % one used for real math sub/superscripts (8pt vs. 7pt), but let's not |
| % fix it (significant additions to font machinery) until someone notices. |
| % |
| \def\sub{\ifmmode \expandafter\sb \else \expandafter\finishsub\fi} |
| \def\finishsub#1{$\sb{\hbox{\selectfonts\lllsize #1}}$}% |
| % |
| \def\sup{\ifmmode \expandafter\ptexsp \else \expandafter\finishsup\fi} |
| \def\finishsup#1{$\ptexsp{\hbox{\selectfonts\lllsize #1}}$}% |
|
|
% @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}. |
% @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}. |
% Ignore unless FMTNAME == tex; then it is like @iftex and @tex, |
% Ignore unless FMTNAME == tex; then it is like @iftex and @tex, |
Line 3023 end
|
Line 3043 end
|
\TeX |
\TeX |
} |
} |
|
|
% Some math mode symbols. | % Some math mode symbols. Define \ensuremath to switch into math mode |
\def\bullet{$\ptexbullet$} | % unless we are already there. Expansion tricks may not be needed here, |
\def\geq{\ifmmode \ge\else $\ge$\fi} | % but safer, and can't hurt. |
\def\leq{\ifmmode \le\else $\le$\fi} | \def\ensuremath{\ifmmode \expandafter\asis \else\expandafter\ensuredmath \fi} |
\def\minus{\ifmmode -\else $-$\fi} | \def\ensuredmath#1{$\relax#1$} |
| % |
| \def\bullet{\ensuremath\ptexbullet} |
| \def\geq{\ensuremath\ge} |
| \def\leq{\ensuremath\le} |
| \def\minus{\ensuremath-} |
|
|
% @dots{} outputs an ellipsis using the current font. |
% @dots{} outputs an ellipsis using the current font. |
% We do .5em per period so that it has the same spacing in the cm |
% We do .5em per period so that it has the same spacing in the cm |
Line 3191 end
|
Line 3216 end
|
\def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} |
\def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} |
\def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} |
\def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} |
% |
% |
% Use the ec* fonts (cm-super in outline format) for non-CM glyphs. | % Use the European Computer Modern fonts (cm-super in outline format) |
\def\ecfont{% | % for non-CM glyphs. That is ec* for regular text and tc* for the text |
| % companion symbols (LaTeX TS1 encoding). Both are part of the ec |
| % package and follow the same conventions. |
| % |
| \def\ecfont{\etcfont{e}} |
| \def\tcfont{\etcfont{t}} |
| % |
| \def\etcfont#1{% |
% We can't distinguish serif/sans and italic/slanted, but this |
% We can't distinguish serif/sans and italic/slanted, but this |
% is used for crude hacks anyway (like adding French and German |
% is used for crude hacks anyway (like adding French and German |
% quotes to documents typeset with CM, where we lose kerning), so |
% quotes to documents typeset with CM, where we lose kerning), so |
Line 3201 end
|
Line 3233 end
|
\edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% |
\edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% |
\ifmonospace |
\ifmonospace |
% typewriter: |
% typewriter: |
\font\thisecfont = ectt\ecsize \space at \nominalsize | \font\thisecfont = #1ctt\ecsize \space at \nominalsize |
\else |
\else |
\ifx\curfontstyle\bfstylename |
\ifx\curfontstyle\bfstylename |
% bold: |
% bold: |
\font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize | \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize |
\else |
\else |
% regular: |
% regular: |
\font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize | \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space at \nominalsize |
\fi |
\fi |
\fi |
\fi |
\thisecfont |
\thisecfont |
Line 3378 end
|
Line 3410 end
|
\newtoks\evenfootline % footline on even pages |
\newtoks\evenfootline % footline on even pages |
\newtoks\oddfootline % footline on odd pages |
\newtoks\oddfootline % footline on odd pages |
|
|
% Now make TeX use those variables | % Now make \makeheadline and \makefootline in Plain TeX use those variables |
\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline |
\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline |
\else \the\evenheadline \fi}} |
\else \the\evenheadline \fi}} |
\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline |
\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline |
Line 3434 end
|
Line 3466 end
|
% @everyheadingmarks |
% @everyheadingmarks |
% @everyfootingmarks |
% @everyfootingmarks |
|
|
|
% These define \getoddheadingmarks, \getevenheadingmarks, |
|
% \getoddfootingmarks, and \getevenfootingmarks, each to one of |
|
% \gettopheadingmarks, \getbottomheadingmarks. |
|
% |
\def\evenheadingmarks{\headingmarks{even}{heading}} |
\def\evenheadingmarks{\headingmarks{even}{heading}} |
\def\oddheadingmarks{\headingmarks{odd}{heading}} |
\def\oddheadingmarks{\headingmarks{odd}{heading}} |
\def\evenfootingmarks{\headingmarks{even}{footing}} |
\def\evenfootingmarks{\headingmarks{even}{footing}} |
Line 3481 end
|
Line 3517 end
|
\global\evenfootline={\hfil} |
\global\evenfootline={\hfil} |
\global\oddfootline={\hfil} |
\global\oddfootline={\hfil} |
\global\evenheadline={\line{\folio\hfil\thistitle}} |
\global\evenheadline={\line{\folio\hfil\thistitle}} |
\global\oddheadline={\line{\thischapter\hfil\folio}} | \global\oddheadline={\line{\thischapterheading\hfil\folio}} |
\global\let\contentsalignmacro = \chapoddpage |
\global\let\contentsalignmacro = \chapoddpage |
} |
} |
\let\contentsalignmacro = \chappager |
\let\contentsalignmacro = \chappager |
Line 3492 end
|
Line 3528 end
|
\global\pageno=1 |
\global\pageno=1 |
\global\evenfootline={\hfil} |
\global\evenfootline={\hfil} |
\global\oddfootline={\hfil} |
\global\oddfootline={\hfil} |
\global\evenheadline={\line{\thischapter\hfil\folio}} | \global\evenheadline={\line{\thischapterheading\hfil\folio}} |
\global\oddheadline={\line{\thischapter\hfil\folio}} | \global\oddheadline={\line{\thischapterheading\hfil\folio}} |
\global\let\contentsalignmacro = \chappager |
\global\let\contentsalignmacro = \chappager |
} |
} |
\def\HEADINGSon{\HEADINGSdouble} |
\def\HEADINGSon{\HEADINGSdouble} |
Line 3504 end
|
Line 3540 end
|
\global\evenfootline={\hfil} |
\global\evenfootline={\hfil} |
\global\oddfootline={\hfil} |
\global\oddfootline={\hfil} |
\global\evenheadline={\line{\folio\hfil\thistitle}} |
\global\evenheadline={\line{\folio\hfil\thistitle}} |
\global\oddheadline={\line{\thischapter\hfil\folio}} | \global\oddheadline={\line{\thischapterheading\hfil\folio}} |
\global\let\contentsalignmacro = \chapoddpage |
\global\let\contentsalignmacro = \chapoddpage |
} |
} |
|
|
Line 3512 end
|
Line 3548 end
|
\def\HEADINGSsinglex{% |
\def\HEADINGSsinglex{% |
\global\evenfootline={\hfil} |
\global\evenfootline={\hfil} |
\global\oddfootline={\hfil} |
\global\oddfootline={\hfil} |
\global\evenheadline={\line{\thischapter\hfil\folio}} | \global\evenheadline={\line{\thischapterheading\hfil\folio}} |
\global\oddheadline={\line{\thischapter\hfil\folio}} | \global\oddheadline={\line{\thischapterheading\hfil\folio}} |
\global\let\contentsalignmacro = \chappager |
\global\let\contentsalignmacro = \chappager |
} |
} |
|
|
Line 3691 end
|
Line 3727 end
|
\parskip=\smallskipamount |
\parskip=\smallskipamount |
\ifdim\parskip=0pt \parskip=2pt \fi |
\ifdim\parskip=0pt \parskip=2pt \fi |
% |
% |
% Try typesetting the item mark that if the document erroneously says | % Try typesetting the item mark so that if the document erroneously says |
% something like @itemize @samp (intending @table), there's an error |
% something like @itemize @samp (intending @table), there's an error |
% right away at the @itemize. It's not the best error message in the |
% right away at the @itemize. It's not the best error message in the |
% world, but it's better than leaving it to the @item. This means if |
% world, but it's better than leaving it to the @item. This means if |
Line 3723 end
|
Line 3759 end
|
\noindent |
\noindent |
\hbox to 0pt{\hss \itemcontents \kern\itemmargin}% |
\hbox to 0pt{\hss \itemcontents \kern\itemmargin}% |
% |
% |
\vadjust{\penalty 1200}}% not good to break after first line of item. | \ifinner\else |
| \vadjust{\penalty 1200}% not good to break after first line of item. |
| \fi |
| % We can be in inner vertical mode in a footnote, although an |
| % @itemize looks awful there. |
| }% |
\flushcr |
\flushcr |
} |
} |
|
|
Line 3941 end
|
Line 3982 end
|
} |
} |
|
|
% multitable-only commands. |
% multitable-only commands. |
% | % |
% @headitem starts a heading row, which we typeset in bold. | % @headitem starts a heading row, which we typeset in bold. Assignments |
% Assignments have to be global since we are inside the implicit group | % have to be global since we are inside the implicit group of an |
% of an alignment entry. \everycr resets \everytab so we don't have to | % alignment entry. \everycr below resets \everytab so we don't have to |
% undo it ourselves. |
% undo it ourselves. |
\def\headitemfont{\b}% for people to use in the template row; not changeable |
\def\headitemfont{\b}% for people to use in the template row; not changeable |
\def\headitem{% |
\def\headitem{% |
\checkenv\multitable |
\checkenv\multitable |
\crcr |
\crcr |
|
\gdef\headitemcrhook{\nobreak}% attempt to avoid page break after headings |
\global\everytab={\bf}% can't use \headitemfont since the parsing differs |
\global\everytab={\bf}% can't use \headitemfont since the parsing differs |
\the\everytab % for the first item |
\the\everytab % for the first item |
}% |
}% |
% |
% |
|
% default for tables with no headings. |
|
\let\headitemcrhook=\relax |
|
% |
% A \tab used to include \hskip1sp. But then the space in a template |
% A \tab used to include \hskip1sp. But then the space in a template |
% line is not enough. That is bad. So let's go back to just `&' until |
% line is not enough. That is bad. So let's go back to just `&' until |
% we again encounter the problem the 1sp was intended to solve. |
% we again encounter the problem the 1sp was intended to solve. |
Line 3984 end
|
Line 4029 end
|
% |
% |
\everycr = {% |
\everycr = {% |
\noalign{% |
\noalign{% |
\global\everytab={}% | \global\everytab={}% Reset from possible headitem. |
\global\colcount=0 % Reset the column counter. |
\global\colcount=0 % Reset the column counter. |
% Check for saved footnotes, etc. | % |
| % Check for saved footnotes, etc.: |
\checkinserts |
\checkinserts |
% Keeps underfull box messages off when table breaks over pages. | % |
%\filbreak | % Perhaps a \nobreak, then reset: |
% Maybe so, but it also creates really weird page breaks when the | \headitemcrhook |
% table breaks over pages. Wouldn't \vfil be better? Wait until the | \global\let\headitemcrhook=\relax |
% problem manifests itself, so it can be fixed for real --karl. | |
}% |
}% |
}% |
}% |
% |
% |
Line 4341 end
|
Line 4386 end
|
% except not \outer, so it can be used within macros and \if's. |
% except not \outer, so it can be used within macros and \if's. |
\edef\newwrite{\makecsname{ptexnewwrite}} |
\edef\newwrite{\makecsname{ptexnewwrite}} |
|
|
% \newindex {foo} defines an index named foo. | % \newindex {foo} defines an index named IX. |
% It automatically defines \fooindex such that | % It automatically defines \IXindex such that |
% \fooindex ...rest of line... puts an entry in the index foo. | % \IXindex ...rest of line... puts an entry in the index IX. |
% It also defines \fooindfile to be the number of the output channel for | % It also defines \IXindfile to be the number of the output channel for |
% the file that accumulates this index. The file's extension is foo. | % the file that accumulates this index. The file's extension is IX. |
% The name of an index should be no more than 2 characters long |
% The name of an index should be no more than 2 characters long |
% for the sake of vms. |
% for the sake of vms. |
% |
% |
\def\newindex#1{% |
\def\newindex#1{% |
\iflinks | \expandafter\chardef\csname#1indfile\endcsname=0 |
\expandafter\newwrite \csname#1indfile\endcsname | |
\openout \csname#1indfile\endcsname \jobname.#1 % Open the file | |
\fi | |
\expandafter\xdef\csname#1index\endcsname{% % Define @#1index |
\expandafter\xdef\csname#1index\endcsname{% % Define @#1index |
\noexpand\doindex{#1}} |
\noexpand\doindex{#1}} |
} |
} |
Line 4367 end
|
Line 4409 end
|
\def\defcodeindex{\parsearg\newcodeindex} |
\def\defcodeindex{\parsearg\newcodeindex} |
% |
% |
\def\newcodeindex#1{% |
\def\newcodeindex#1{% |
\iflinks | \expandafter\chardef\csname#1indfile\endcsname=0 |
\expandafter\newwrite \csname#1indfile\endcsname | |
\openout \csname#1indfile\endcsname \jobname.#1 | |
\fi | |
\expandafter\xdef\csname#1index\endcsname{% |
\expandafter\xdef\csname#1index\endcsname{% |
\noexpand\docodeindex{#1}}% |
\noexpand\docodeindex{#1}}% |
} |
} |
|
|
|
% The default indices: |
|
\newindex{cp}% concepts, |
|
\newcodeindex{fn}% functions, |
|
\newcodeindex{vr}% variables, |
|
\newcodeindex{tp}% types, |
|
\newcodeindex{ky}% keys |
|
\newcodeindex{pg}% and programs. |
|
|
|
|
% @synindex foo bar makes index foo feed into index bar. |
% @synindex foo bar makes index foo feed into index bar. |
% Do this instead of @defindex foo if you don't want it as a separate index. |
% Do this instead of @defindex foo if you don't want it as a separate index. |
% |
% |
Line 4403 end
|
Line 4450 end
|
\expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% |
\expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% |
} |
} |
|
|
% Define \doindex, the driver for all \fooindex macros. | % Define \doindex, the driver for all index macros. |
% Argument #1 is generated by the calling \fooindex macro, |
% Argument #1 is generated by the calling \fooindex macro, |
% and it is "foo", the name of the index. | % and it the two-letter name of the index. |
|
|
% \doindex just uses \parsearg; it calls \doind for the actual work. | \def\doindex#1{\edef\indexname{#1}\parsearg\doindexxxx} |
% This is because \doind is more useful to call from other macros. | \def\doindexxxx #1{\doind{\indexname}{#1}} |
|
|
% There is also \dosubind {index}{topic}{subtopic} |
|
% which makes an entry in a two-level index such as the operation index. |
|
|
|
\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} |
|
\def\singleindexer #1{\doind{\indexname}{#1}} |
|
|
|
% like the previous two, but they put @code around the argument. |
% like the previous two, but they put @code around the argument. |
\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} | \def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx} |
\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} | \def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}} |
|
|
% Take care of Texinfo commands that can appear in an index entry. | % Used when writing an index entry out to an index file, to prevent |
% Since there are some commands we want to expand, and others we don't, | % expansion of Texinfo commands that can appear in an index entry. |
% we have to laboriously prevent expansion for those that we don't. | |
% |
% |
\def\indexdummies{% |
\def\indexdummies{% |
\escapechar = `\\ % use backslash in output files. |
\escapechar = `\\ % use backslash in output files. |
Line 4434 end
|
Line 4474 end
|
% complicated, when \tex is in effect and \{ is a \delimiter again. |
% complicated, when \tex is in effect and \{ is a \delimiter again. |
% We can't use \lbracecmd and \rbracecmd because texindex assumes |
% We can't use \lbracecmd and \rbracecmd because texindex assumes |
% braces and backslashes are used only as delimiters. Perhaps we |
% braces and backslashes are used only as delimiters. Perhaps we |
% should define @lbrace and @rbrace commands a la @comma. | % should use @lbracechar and @rbracechar? |
\def\{{{\tt\char123}}% |
\def\{{{\tt\char123}}% |
\def\}{{\tt\char125}}% |
\def\}{{\tt\char125}}% |
% |
% |
% I don't entirely understand this, but when an index entry is |
|
% generated from a macro call, the \endinput which \scanmacro inserts |
|
% causes processing to be prematurely terminated. This is, |
|
% apparently, because \indexsorttmp is fully expanded, and \endinput |
|
% is an expandable command. The redefinition below makes \endinput |
|
% disappear altogether for that purpose -- although logging shows that |
|
% processing continues to some further point. On the other hand, it |
|
% seems \endinput does not hurt in the printed index arg, since that |
|
% is still getting written without apparent harm. |
|
% |
|
% Sample source (mac-idx3.tex, reported by Graham Percival to |
|
% help-texinfo, 22may06): |
|
% @macro funindex {WORD} |
|
% @findex xyz |
|
% @end macro |
|
% ... |
|
% @funindex commtest |
|
% |
|
% The above is not enough to reproduce the bug, but it gives the flavor. |
|
% |
|
% Sample whatsit resulting: |
|
% .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} |
|
% |
|
% So: |
|
\let\endinput = \empty |
|
% |
|
% Do the redefinitions. |
% Do the redefinitions. |
\commondummies |
\commondummies |
} |
} |
Line 4487 end
|
Line 4501 end
|
% Called from \indexdummies and \atdummies. |
% Called from \indexdummies and \atdummies. |
% |
% |
\def\commondummies{% |
\def\commondummies{% |
% |
|
% \definedummyword defines \#1 as \string\#1\space, thus effectively |
% \definedummyword defines \#1 as \string\#1\space, thus effectively |
% preventing its expansion. This is used only for control words, |
% preventing its expansion. This is used only for control words, |
% not control letters, because the \space would be incorrect for |
% not control letters, because the \space would be incorrect for |
Line 4564 end
|
Line 4577 end
|
\definedummyword\guilsinglright |
\definedummyword\guilsinglright |
\definedummyword\lbracechar |
\definedummyword\lbracechar |
\definedummyword\leq |
\definedummyword\leq |
|
\definedummyword\mathopsup |
\definedummyword\minus |
\definedummyword\minus |
\definedummyword\ogonek |
\definedummyword\ogonek |
\definedummyword\pounds |
\definedummyword\pounds |
Line 4577 end
|
Line 4591 end
|
\definedummyword\quotesinglbase |
\definedummyword\quotesinglbase |
\definedummyword\rbracechar |
\definedummyword\rbracechar |
\definedummyword\result |
\definedummyword\result |
|
\definedummyword\sub |
|
\definedummyword\sup |
\definedummyword\textdegree |
\definedummyword\textdegree |
% |
% |
% We want to disable all macros so that they are not expanded by \write. |
% We want to disable all macros so that they are not expanded by \write. |
Line 4590 end
|
Line 4606 end
|
} |
} |
|
|
% \commondummiesnofonts: common to \commondummies and \indexnofonts. |
% \commondummiesnofonts: common to \commondummies and \indexnofonts. |
|
% Define \definedumyletter, \definedummyaccent and \definedummyword before |
|
% using. |
% |
% |
\def\commondummiesnofonts{% |
\def\commondummiesnofonts{% |
% Control letters and accents. |
% Control letters and accents. |
Line 4651 end
|
Line 4669 end
|
\definedummyword\samp |
\definedummyword\samp |
\definedummyword\strong |
\definedummyword\strong |
\definedummyword\tie |
\definedummyword\tie |
|
\definedummyword\U |
\definedummyword\uref |
\definedummyword\uref |
\definedummyword\url |
\definedummyword\url |
\definedummyword\var |
\definedummyword\var |
Line 4659 end
|
Line 4678 end
|
\definedummyword\xref |
\definedummyword\xref |
} |
} |
|
|
|
% For testing: output @{ and @} in index sort strings as \{ and \}. |
|
\newif\ifusebracesinindexes |
|
|
|
\let\indexlbrace\relax |
|
\let\indexrbrace\relax |
|
|
|
{\catcode`\@=0 |
|
\catcode`\\=13 |
|
@gdef@backslashdisappear{@def\{}} |
|
} |
|
|
|
{ |
|
\catcode`\<=13 |
|
\catcode`\-=13 |
|
\catcode`\`=13 |
|
\gdef\indexnonalnumdisappear{% |
|
\expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax\else |
|
% @set txiindexlquoteignore makes us ignore left quotes in the sort term. |
|
% (Introduced for FSFS 2nd ed.) |
|
\let`=\empty |
|
\fi |
|
% |
|
\expandafter\ifx\csname SETtxiindexbackslashignore\endcsname\relax\else |
|
\backslashdisappear |
|
\fi |
|
% |
|
\expandafter\ifx\csname SETtxiindexhyphenignore\endcsname\relax\else |
|
\def-{}% |
|
\fi |
|
\expandafter\ifx\csname SETtxiindexlessthanignore\endcsname\relax\else |
|
\def<{}% |
|
\fi |
|
\expandafter\ifx\csname SETtxiindexatsignignore\endcsname\relax\else |
|
\def\@{}% |
|
\fi |
|
} |
|
|
|
\gdef\indexnonalnumreappear{% |
|
\useindexbackslash |
|
\let-\normaldash |
|
\let<\normalless |
|
\def\@{@}% |
|
} |
|
} |
|
|
|
|
% \indexnofonts is used when outputting the strings to sort the index |
% \indexnofonts is used when outputting the strings to sort the index |
% by, and when constructing control sequence names. It eliminates all |
% by, and when constructing control sequence names. It eliminates all |
% control sequences and just writes whatever the best ASCII sort string |
% control sequences and just writes whatever the best ASCII sort string |
Line 4671 end
|
Line 4736 end
|
\def\definedummyletter##1{\let##1\empty}% |
\def\definedummyletter##1{\let##1\empty}% |
% All control words become @asis by default; overrides below. |
% All control words become @asis by default; overrides below. |
\let\definedummyword\definedummyaccent |
\let\definedummyword\definedummyaccent |
% |
|
\commondummiesnofonts |
\commondummiesnofonts |
% |
% |
% Don't no-op \tt, since it isn't a user-level command |
% Don't no-op \tt, since it isn't a user-level command |
Line 4684 end
|
Line 4748 end
|
\def\_{\normalunderscore}% |
\def\_{\normalunderscore}% |
\def\-{}% @- shouldn't affect sorting |
\def\-{}% @- shouldn't affect sorting |
% |
% |
% Unfortunately, texindex is not prepared to handle braces in the | \def\lbracechar{{\indexlbrace}}% |
% content at all. So for index sorting, we map @{ and @} to strings | \def\rbracechar{{\indexrbrace}}% |
% starting with |, since that ASCII character is between ASCII { and }. | \let\{=\lbracechar |
\def\{{|a}% | \let\}=\rbracechar |
\def\lbracechar{|a}% | |
% |
% |
\def\}{|b}% |
|
\def\rbracechar{|b}% |
|
% |
% |
% Non-English letters. |
% Non-English letters. |
\def\AA{AA}% |
\def\AA{AA}% |
Line 4700 end
|
Line 4761 end
|
\def\L{L}% |
\def\L{L}% |
\def\OE{OE}% |
\def\OE{OE}% |
\def\O{O}% |
\def\O{O}% |
\def\TH{ZZZ}% | \def\TH{TH}% |
\def\aa{aa}% |
\def\aa{aa}% |
\def\ae{ae}% |
\def\ae{ae}% |
\def\dh{dzz}% |
\def\dh{dzz}% |
Line 4712 end
|
Line 4773 end
|
\def\o{o}% |
\def\o{o}% |
\def\questiondown{?}% |
\def\questiondown{?}% |
\def\ss{ss}% |
\def\ss{ss}% |
\def\th{zzz}% | \def\th{th}% |
% |
% |
\def\LaTeX{LaTeX}% |
\def\LaTeX{LaTeX}% |
\def\TeX{TeX}% |
\def\TeX{TeX}% |
Line 4749 end
|
Line 4810 end
|
\def\result{=>}% |
\def\result{=>}% |
\def\textdegree{o}% |
\def\textdegree{o}% |
% |
% |
\expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax |
|
\else \indexlquoteignore \fi |
|
% |
|
% We need to get rid of all macros, leaving only the arguments (if present). |
% 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. |
% 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 |
% makeinfo does not expand macros in the argument to @deffn, which ends up |
Line 4765 end
|
Line 4823 end
|
\macrolist |
\macrolist |
} |
} |
|
|
% Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us |
|
% ignore left quotes in the sort term. |
|
{\catcode`\`=\active |
|
\gdef\indexlquoteignore{\let`=\empty}} |
|
|
|
\let\indexbackslash=0 %overridden during \printindex. |
|
\let\SETmarginindex=\relax % put index entries in margin (undocumented)? |
\let\SETmarginindex=\relax % put index entries in margin (undocumented)? |
|
|
% Most index entries go through here, but \dosubind is the general case. |
% Most index entries go through here, but \dosubind is the general case. |
% #1 is the index name, #2 is the entry text. |
% #1 is the index name, #2 is the entry text. |
\def\doind#1#2{\dosubind{#1}{#2}{}} |
\def\doind#1#2{\dosubind{#1}{#2}{}} |
|
|
% Workhorse for all \fooindexes. | % There is also \dosubind {index}{topic}{subtopic} |
| % which makes an entry in a two-level index such as the operation index. |
| % TODO: Two-level index? Operation index? |
| |
| % Workhorse for all indexes. |
% #1 is name of index, #2 is stuff to put there, #3 is subentry -- |
% #1 is name of index, #2 is stuff to put there, #3 is subentry -- |
% empty if called from \doind, as we usually are (the main exception |
% empty if called from \doind, as we usually are (the main exception |
% is with most defuns, which call us directly). |
% is with most defuns, which call us directly). |
Line 4785 end
|
Line 4842 end
|
\def\dosubind#1#2#3{% |
\def\dosubind#1#2#3{% |
\iflinks |
\iflinks |
{% |
{% |
|
\requireopenindexfile{#1}% |
% Store the main index entry text (including the third arg). |
% Store the main index entry text (including the third arg). |
\toks0 = {#2}% |
\toks0 = {#2}% |
% If third arg is present, precede it with a space. |
% If third arg is present, precede it with a space. |
Line 4800 end
|
Line 4858 end
|
\fi |
\fi |
} |
} |
|
|
% Write the entry in \toks0 to the index file: | % Check if an index file has been opened, and if not, open it. |
| \def\requireopenindexfile#1{% |
| \ifnum\csname #1indfile\endcsname=0 |
| \expandafter\newwrite \csname#1indfile\endcsname |
| \edef\suffix{#1}% |
| % A .fls suffix would conflict with the file extension for the output |
| % of -recorder, so use .f1s instead. |
| \ifx\suffix\indexisfl\def\suffix{f1}\fi |
| % Open the file |
| \immediate\openout\csname#1indfile\endcsname \jobname.\suffix |
| % Using \immediate here prevents an object entering into the current box, |
| % which could confound checks such as those in \safewhatsit for preceding |
| % skips. |
| \fi} |
| \def\indexisfl{fl} |
| |
| % Output \ as {\indexbackslash}, because \ is an escape character in |
| % the index files. |
| \let\indexbackslash=\relax |
| {\catcode`\@=0 \catcode`\\=\active |
| @gdef@useindexbackslash{@def\{{@indexbackslash}}} |
| } |
| |
| % Definition for writing index entry text. |
| \def\sortas#1{\ignorespaces}% |
| |
| % Definition for writing index entry sort key. Should occur at the at |
| % the beginning of the index entry, like |
| % @cindex @sortas{september} \september |
| % The \ignorespaces takes care of following space, but there's no way |
| % to remove space before it. |
| { |
| \catcode`\-=13 |
| \gdef\indexwritesortas{% |
| \begingroup |
| \indexnonalnumreappear |
| \indexwritesortasxxx} |
| \gdef\indexwritesortasxxx#1{% |
| \xdef\indexsortkey{#1}\endgroup} |
| } |
| |
| |
| % Write the entry in \toks0 to the index file. |
% |
% |
\def\dosubindwrite{% |
\def\dosubindwrite{% |
% Put the index entry in the margin if desired. |
% Put the index entry in the margin if desired. |
Line 4810 end
|
Line 4910 end
|
% |
% |
% Remember, we are within a group. |
% Remember, we are within a group. |
\indexdummies % Must do this here, since \bf, etc expand at this stage |
\indexdummies % Must do this here, since \bf, etc expand at this stage |
\def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now | \useindexbackslash % \indexbackslash isn't defined now so it will be output |
% so it will be output as is; and it will print as backslash. | % as is; and it will print as backslash. |
% | % Get the string to sort by, by processing the index entry with all |
% Process the index entry with all font commands turned off, to | % font commands turned off. |
% get the string to sort by. | |
{\indexnofonts |
{\indexnofonts |
\edef\temp{\the\toks0}% need full expansion | \indexnonalnumdisappear |
\xdef\indexsorttmp{\temp}% | \xdef\indexsortkey{}% |
| \let\sortas=\indexwritesortas |
| \edef\temp{\the\toks0}% |
| \setbox\dummybox = \hbox{\temp}% Make sure to execute any \sortas |
| \ifx\indexsortkey\empty |
| \xdef\indexsortkey{\temp}% |
| \ifx\indexsortkey\empty\xdef\indexsortkey{ }\fi |
| \fi |
}% |
}% |
% |
% |
% Set up the complete index entry, with both the sort key and |
% Set up the complete index entry, with both the sort key and |
Line 4827 end
|
Line 4933 end
|
% sorted result. |
% sorted result. |
\edef\temp{% |
\edef\temp{% |
\write\writeto{% |
\write\writeto{% |
\string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}% | \string\entry{\indexsortkey}{\noexpand\folio}{\the\toks0}}% |
}% |
}% |
\temp |
\temp |
} |
} |
|
\newbox\dummybox % used above |
|
|
% Take care of unwanted page breaks/skips around a whatsit: |
% Take care of unwanted page breaks/skips around a whatsit: |
% |
% |
Line 4956 end
|
Line 5063 end
|
% as its first line, TeX doesn't complain about mismatched braces |
% as its first line, TeX doesn't complain about mismatched braces |
% (because it thinks @} is a control sequence). |
% (because it thinks @} is a control sequence). |
\catcode`\@ = 11 |
\catcode`\@ = 11 |
\openin 1 \jobname.#1s | % See comment in \requireopenindexfile. |
| \def\indexname{#1}\ifx\indexname\indexisfl\def\indexname{f1}\fi |
| \openin 1 \jobname.\indexname s |
\ifeof 1 |
\ifeof 1 |
% \enddoublecolumns gets confused if there is no text in the index, |
% \enddoublecolumns gets confused if there is no text in the index, |
% and it loses the chapter title and the aux file entries for the |
% and it loses the chapter title and the aux file entries for the |
Line 4964 end
|
Line 5073 end
|
% there is some text. |
% there is some text. |
\putwordIndexNonexistent |
\putwordIndexNonexistent |
\else |
\else |
|
\catcode`\\ = 0 |
|
\escapechar = `\\ |
% |
% |
% If the index file exists but is empty, then \openin leaves \ifeof |
% If the index file exists but is empty, then \openin leaves \ifeof |
% false. We have to make TeX try to read something from the file, so |
% false. We have to make TeX try to read something from the file, so |
% it can discover if there is anything in it. |
% it can discover if there is anything in it. |
\read 1 to \temp | \read 1 to \thisline |
\ifeof 1 |
\ifeof 1 |
\putwordIndexIsEmpty |
\putwordIndexIsEmpty |
\else |
\else |
% Index files are almost Texinfo source, but we use \ as the escape |
% Index files are almost Texinfo source, but we use \ as the escape |
% character. It would be better to use @, but that's too big a change |
% character. It would be better to use @, but that's too big a change |
% to make right now. |
% to make right now. |
\def\indexbackslash{\backslashcurfont}% | \def\indexbackslash{\ttbackslash}% |
\catcode`\\ = 0 | \let\indexlbrace\{ % Likewise, set these sequences for braces |
\escapechar = `\\ | \let\indexrbrace\} % used in the sort key. |
\begindoublecolumns |
\begindoublecolumns |
\input \jobname.#1s | \let\entryorphanpenalty=\indexorphanpenalty |
| % |
| % Read input from the index file line by line. |
| \loopdo |
| \ifeof1 |
| \let\firsttoken\relax |
| \else |
| \read 1 to \nextline |
| \edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}% |
| \act |
| \fi |
| \thisline |
| % |
| \ifeof1\else |
| \let\thisline\nextline |
| \repeat |
| %% |
\enddoublecolumns |
\enddoublecolumns |
\fi |
\fi |
\fi |
\fi |
\closein 1 |
\closein 1 |
\endgroup} |
\endgroup} |
|
|
|
\def\getfirsttoken#1{\expandafter\getfirsttokenx#1\endfirsttoken} |
|
\long\def\getfirsttokenx#1#2\endfirsttoken{\noexpand#1} |
|
|
|
\def\loopdo#1\repeat{\def\body{#1}\loopdoxxx} |
|
\def\loopdoxxx{\let\next=\relax\body\let\next=\loopdoxxx\fi\next} |
|
|
% These macros are used by the sorted index file itself. |
% These macros are used by the sorted index file itself. |
% Change them to control the appearance of the index. |
% Change them to control the appearance of the index. |
|
|
\def\initial#1{{% | {\catcode`\/=13 \catcode`\-=13 \catcode`\^=13 \catcode`\~=13 \catcode`\_=13 |
% Some minor font changes for the special characters. | \catcode`\|=13 \catcode`\<=13 \catcode`\>=13 \catcode`\+=13 \catcode`\"=13 |
\let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt | \catcode`\$=3 |
| \gdef\initialglyphs{% |
| % Some changes for non-alphabetic characters. Using the glyphs from the |
| % math fonts looks more consistent than the typewriter font used elsewhere |
| % for these characters. |
| \def\indexbackslash{\math{\backslash}}% |
| \let\\=\indexbackslash |
% |
% |
|
% Can't get bold backslash so don't use bold forward slash |
|
\catcode`\/=13 |
|
\def/{{\secrmnotbold \normalslash}}% |
|
\def-{{\normaldash\normaldash}}% en dash `--' |
|
\def^{{\chapbf \normalcaret}}% |
|
\def~{{\chapbf \normaltilde}}% |
|
\def\_{% |
|
\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }% |
|
\def|{$\vert$}% |
|
\def<{$\less$}% |
|
\def>{$\gtr$}% |
|
\def+{$\normalplus$}% |
|
}} |
|
|
|
\def\initial{% |
|
\bgroup |
|
\initialglyphs |
|
\initialx |
|
} |
|
|
|
\def\initialx#1{% |
% Remove any glue we may have, we'll be inserting our own. |
% Remove any glue we may have, we'll be inserting our own. |
\removelastskip |
\removelastskip |
% |
% |
% We like breaks before the index initials, so insert a bonus. |
% We like breaks before the index initials, so insert a bonus. |
|
% The glue before the bonus allows a little bit of space at the |
|
% bottom of a column to reduce an increase in inter-line spacing. |
\nobreak |
\nobreak |
\vskip 0pt plus 3\baselineskip | \vskip 0pt plus 5\baselineskip |
\penalty 0 | \penalty -300 |
\vskip 0pt plus -3\baselineskip | \vskip 0pt plus -5\baselineskip |
% |
% |
% Typeset the initial. Making this add up to a whole number of |
% Typeset the initial. Making this add up to a whole number of |
% baselineskips increases the chance of the dots lining up from column |
% baselineskips increases the chance of the dots lining up from column |
Line 5008 end
|
Line 5170 end
|
% we need before each entry, but it's better. |
% we need before each entry, but it's better. |
% |
% |
% No shrink because it confuses \balancecolumns. |
% No shrink because it confuses \balancecolumns. |
\vskip 1.67\baselineskip plus .5\baselineskip | \vskip 1.67\baselineskip plus 1\baselineskip |
\leftline{\secbf #1}% | \leftline{\secfonts \kern-0.05em \secbf #1}% |
| % \secfonts is inside the argument of \leftline so that the change of |
| % \baselineskip will not affect any glue inserted before the vbox that |
| % \leftline creates. |
% Do our best not to break after the initial. |
% Do our best not to break after the initial. |
\nobreak |
\nobreak |
\vskip .33\baselineskip plus .1\baselineskip |
\vskip .33\baselineskip plus .1\baselineskip |
}} | \egroup % \initialglyphs |
| } |
|
|
|
\newdimen\entryrightmargin |
|
\entryrightmargin=0pt |
|
|
% \entry typesets a paragraph consisting of the text (#1), dot leaders, and |
% \entry typesets a paragraph consisting of the text (#1), dot leaders, and |
% then page number (#2) flushed to the right margin. It is used for index |
% then page number (#2) flushed to the right margin. It is used for index |
% and table of contents entries. The paragraph is indented by \leftskip. |
% and table of contents entries. The paragraph is indented by \leftskip. |
% |
% |
% A straightforward implementation would start like this: |
|
% \def\entry#1#2{... |
|
% But this freezes the catcodes in the argument, and can cause problems to |
|
% @code, which sets - active. This problem was fixed by a kludge--- |
|
% ``-'' was active throughout whole index, but this isn't really right. |
|
% The right solution is to prevent \entry from swallowing the whole text. |
|
% --kasal, 21nov03 |
|
\def\entry{% |
\def\entry{% |
\begingroup |
\begingroup |
% |
% |
Line 5033 end
|
Line 5195 end
|
% affect previous text. |
% affect previous text. |
\par |
\par |
% |
% |
% Do not fill out the last line with white space. |
|
\parfillskip = 0in |
|
% |
|
% No extra space above this paragraph. |
% No extra space above this paragraph. |
\parskip = 0in |
\parskip = 0in |
% |
% |
% Do not prefer a separate line ending with a hyphen to fewer lines. |
|
\finalhyphendemerits = 0 |
|
% |
|
% \hangindent is only relevant when the entry text and page number |
|
% don't both fit on one line. In that case, bob suggests starting the |
|
% dots pretty far over on the line. Unfortunately, a large |
|
% indentation looks wrong when the entry text itself is broken across |
|
% lines. So we use a small indentation and put up with long leaders. |
|
% |
|
% \hangafter is reset to 1 (which is the value we want) at the start |
|
% of each paragraph, so we need not do anything with that. |
|
\hangindent = 2em |
|
% |
|
% When the entry text needs to be broken, just fill out the first line |
|
% with blank space. |
|
\rightskip = 0pt plus1fil |
|
% |
|
% A bit of stretch before each entry for the benefit of balancing |
|
% columns. |
|
\vskip 0pt plus1pt |
|
% |
|
% When reading the text of entry, convert explicit line breaks |
% When reading the text of entry, convert explicit line breaks |
% from @* into spaces. The user might give these in long section |
% from @* into spaces. The user might give these in long section |
% titles, for instance. |
% titles, for instance. |
\def\*{\unskip\space\ignorespaces}% |
\def\*{\unskip\space\ignorespaces}% |
\def\entrybreak{\hfil\break}% | \def\entrybreak{\hfil\break}% An undocumented command |
% |
% |
|
% A bit of stretch before each entry for the benefit of balancing |
|
% columns. |
|
\vskip 0pt plus0.5pt |
|
% |
% Swallow the left brace of the text (first parameter): |
% Swallow the left brace of the text (first parameter): |
\afterassignment\doentry |
\afterassignment\doentry |
\let\temp = |
\let\temp = |
} |
} |
\def\entrybreak{\unskip\space\ignorespaces}% |
\def\entrybreak{\unskip\space\ignorespaces}% |
\def\doentry{% |
\def\doentry{% |
|
% Save the text of the entry |
|
\global\setbox\boxA=\hbox\bgroup |
\bgroup % Instead of the swallowed brace. |
\bgroup % Instead of the swallowed brace. |
\noindent |
\noindent |
\aftergroup\finishentry |
\aftergroup\finishentry |
% And now comes the text of the entry. |
% And now comes the text of the entry. |
|
% Not absorbing as a macro argument reduces the chance of problems |
|
% with catcodes occurring. |
} |
} |
\def\finishentry#1{% | {\catcode`\@=11 |
| \gdef\finishentry#1{% |
| \egroup % end box A |
| \dimen@ = \wd\boxA % Length of text of entry |
| \global\setbox\boxA=\hbox\bgroup\unhbox\boxA |
% #1 is the page number. |
% #1 is the page number. |
% |
% |
% The following is kludged to not output a line of dots in the index if | % Get the width of the page numbers, and only use |
% there are no page numbers. The next person who breaks this will be | % leaders if they are present. |
% cursed by a Unix daemon. | \global\setbox\boxB = \hbox{#1}% |
\setbox\boxA = \hbox{#1}% | \ifdim\wd\boxB = 0pt |
\ifdim\wd\boxA = 0pt | \null\nobreak\hfill\ % |
\ % | |
\else |
\else |
% |
% |
% If we must, put the page number on a line of its own, and fill out |
|
% this line with blank space. (The \hfil is overwhelmed with the |
|
% fill leaders glue in \indexdotfill if the page number does fit.) |
|
\hfil\penalty50 |
|
\null\nobreak\indexdotfill % Have leaders before the page number. |
\null\nobreak\indexdotfill % Have leaders before the page number. |
% |
% |
% The `\ ' here is removed by the implicit \unskip that TeX does as |
|
% part of (the primitive) \par. Without it, a spurious underfull |
|
% \hbox ensues. |
|
\ifpdf |
\ifpdf |
\pdfgettoks#1.% | \pdfgettoks#1.% |
\ \the\toksA | \hskip\skip\thinshrinkable\the\toksA |
\else |
\else |
\ #1% | \hskip\skip\thinshrinkable #1% |
\fi |
\fi |
\fi |
\fi |
\par | \egroup % end \boxA |
| \ifdim\wd\boxB = 0pt |
| \global\setbox\entryindexbox=\box\boxA |
| \else |
| \global\setbox\entryindexbox=\vbox\bgroup\noindent |
| % We want the text of the entries to be aligned to the left, and the |
| % page numbers to be aligned to the right. |
| % |
| \advance\leftskip by 0pt plus 1fil |
| \advance\leftskip by 0pt plus -1fill |
| \rightskip = 0pt plus -1fil |
| \advance\rightskip by 0pt plus 1fill |
| % Cause last line, which could consist of page numbers on their own |
| % if the list of page numbers is long, to be aligned to the right. |
| \parfillskip=0pt plus -1fill |
| % |
| \hangindent=1em |
| % |
| \advance\rightskip by \entryrightmargin |
| % Determine how far we can stretch into the margin. |
| % This allows, e.g., "Appendix H GNU Free Documentation License" to |
| % fit on one line in @letterpaper format. |
| \ifdim\entryrightmargin>2.1em |
| \dimen@i=2.1em |
| \else |
| \dimen@i=0em |
| \fi |
| \advance \parfillskip by 0pt minus 1\dimen@i |
| % |
| \dimen@ii = \hsize |
| \advance\dimen@ii by -1\leftskip |
| \advance\dimen@ii by -1\entryrightmargin |
| \advance\dimen@ii by 1\dimen@i |
| \let\maybestrut=\relax |
| \ifdim\wd\boxA > \dimen@ii % If the entry doesn't fit in one line |
| \let\maybestrut=\strut |
| \ifdim\dimen@ > 0.8\dimen@ii % due to long index text |
| \dimen@ = 0.7\dimen@ % Try to split the text roughly evenly |
| \dimen@ii = \hsize |
| \advance \dimen@ii by -1em |
| \ifnum\dimen@>\dimen@ii |
| % If the entry is too long, use the whole line |
| \dimen@ = \dimen@ii |
| \fi |
| \advance\leftskip by 0pt plus 1fill % ragged right |
| \advance \dimen@ by 1\rightskip |
| \parshape = 2 0pt \dimen@ 1em \dimen@ii |
| % Ideally we'd add a finite glue at the end of the first line only, but |
| % TeX doesn't seem to provide a way to do such a thing. |
| \fi\fi |
| \maybestrut % Add a strut on the first and last lines |
| \unhbox\boxA |
| \maybestrut |
| % |
| % Do not prefer a separate line ending with a hyphen to fewer lines. |
| \finalhyphendemerits = 0 |
| % |
| % Word spacing - no stretch |
| \spaceskip=\fontdimen2\font minus \fontdimen4\font |
| % |
| \linepenalty=1000 % Discourage line breaks. |
| \hyphenpenalty=5000 % Discourage hyphenation. |
| % |
| \par % format the paragraph |
| \egroup % The \vbox |
| \fi |
\endgroup |
\endgroup |
|
% delay text of entry until after penalty |
|
\bgroup\aftergroup\insertindexentrybox |
|
\entryorphanpenalty |
|
}} |
|
|
|
\newskip\thinshrinkable |
|
\skip\thinshrinkable=.15em minus .15em |
|
|
|
\newbox\entryindexbox |
|
\def\insertindexentrybox{% |
|
\lineskip=0pt % This comes into effect when the \vbox has a large |
|
% height due to the paragraph in it having several |
|
% lines. |
|
\box\entryindexbox} |
|
|
|
% Default is no penalty |
|
\let\entryorphanpenalty\egroup |
|
|
|
% Used from \printindex. \firsttoken should be the first token |
|
% after the \entry. If it's not another \entry, we are at the last |
|
% line of a group of index entries, so insert a penalty to discourage |
|
% orphaned index entries. |
|
\long\def\indexorphanpenalty{% |
|
\def\isentry{\entry}% |
|
\ifx\firsttoken\isentry |
|
\else |
|
\unskip\penalty 9000 |
|
% The \unskip here stops breaking before the glue. It relies on the |
|
% \vskip above being there, otherwise there is an error |
|
% "You can't use `\unskip' in vertical mode". There has to be glue |
|
% in the current vertical list that hasn't been added to the |
|
% "current page". See Chapter 24 of the TeXbook. This contradicts |
|
% Section 8.3.7 in "TeX by Topic," though. |
|
\fi |
|
\egroup % now comes the box added with \aftergroup |
} |
} |
|
|
% Like plain.tex's \dotfill, except uses up at least 1 em. |
% Like plain.tex's \dotfill, except uses up at least 1 em. |
|
% The filll stretch here overpowers both the fil and fill stretch to push |
|
% the page number to the right. |
\def\indexdotfill{\cleaders |
\def\indexdotfill{\cleaders |
\hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill} | \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1filll} |
|
|
|
|
\def\primary #1{\line{#1\hfil}} |
\def\primary #1{\line{#1\hfil}} |
|
|
\newskip\secondaryindent \secondaryindent=0.5cm |
\newskip\secondaryindent \secondaryindent=0.5cm |
Line 5136 end
|
Line 5381 end
|
|
|
\newbox\partialpage |
\newbox\partialpage |
\newdimen\doublecolumnhsize |
\newdimen\doublecolumnhsize |
|
\newdimen\doublecolumntopgap |
|
\doublecolumntopgap = 0pt |
|
|
|
\newtoks\savedtopmark % Used in \begindoublecolumns |
|
\newtoks\savedfirstmark |
|
|
\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns |
\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns |
% Grab any single-column material above us. |
% Grab any single-column material above us. |
\output = {% |
\output = {% |
Line 5157 end
|
Line 5407 end
|
\unvbox\PAGE |
\unvbox\PAGE |
\kern-\topskip \kern\baselineskip |
\kern-\topskip \kern\baselineskip |
}% |
}% |
|
% Save \topmark and \firstmark |
|
\global\savedtopmark=\expandafter{\topmark}% |
|
\global\savedfirstmark=\expandafter{\firstmark}% |
}% |
}% |
\eject % run that output routine to set \partialpage |
\eject % run that output routine to set \partialpage |
% |
% |
|
% We recover the two marks that the last output routine saved in order |
|
% to propagate the information in marks added around a chapter heading, |
|
% which could be otherwise be lost by the time the final page is output. |
|
% |
|
\mark{\the\savedtopmark}% Only mark in page passed to following \output. |
|
\output = {% |
|
\setbox0=\box\PAGE % clear box 255 |
|
}abc\eject |
|
% |
|
\mark{\the\savedfirstmark}% |
|
% |
% Use the double-column output routine for subsequent pages. |
% Use the double-column output routine for subsequent pages. |
\output = {\doublecolumnout}% |
\output = {\doublecolumnout}% |
% |
% |
Line 5186 end
|
Line 5450 end
|
% |
% |
% Double the \vsize as well. (We don't need a separate register here, |
% Double the \vsize as well. (We don't need a separate register here, |
% since nobody clobbers \vsize.) |
% since nobody clobbers \vsize.) |
|
\global\doublecolumntopgap = \topskip |
|
\global\advance\doublecolumntopgap by -1\baselineskip |
|
\global\advance\vsize by -1\doublecolumntopgap |
\vsize = 2\vsize |
\vsize = 2\vsize |
|
\topskip=0pt |
} |
} |
|
|
% The double-column output routine for all double-column pages except |
% The double-column output routine for all double-column pages except |
% the last. | % the last, which is done by \balancecolumns. |
% |
% |
\def\doublecolumnout{% |
\def\doublecolumnout{% |
\splittopskip=\topskip \splitmaxdepth=\maxdepth |
\splittopskip=\topskip \splitmaxdepth=\maxdepth |
Line 5215 end
|
Line 5483 end
|
% |
% |
\hsize = \doublecolumnhsize |
\hsize = \doublecolumnhsize |
\wd0=\hsize \wd2=\hsize |
\wd0=\hsize \wd2=\hsize |
\hbox to\pagewidth{\box0\hfil\box2}% | \vbox{% |
| \vskip\doublecolumntopgap |
| \hbox to\pagewidth{\box0\hfil\box2}}% |
} |
} |
% | |
% All done with double columns. | |
| % Finished with with double columns. |
\def\enddoublecolumns{% |
\def\enddoublecolumns{% |
% The following penalty ensures that the page builder is exercised |
% The following penalty ensures that the page builder is exercised |
% _before_ we change the output routine. This is necessary in the |
% _before_ we change the output routine. This is necessary in the |
Line 5272 end
|
Line 5543 end
|
\pagegoal = \vsize |
\pagegoal = \vsize |
} |
} |
% |
% |
% Called at the end of the double column material. | % Only called for the last of the double column material. \doublecolumnout |
| % does the others. |
\def\balancecolumns{% |
\def\balancecolumns{% |
\setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. |
\setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. |
\dimen@ = \ht0 |
\dimen@ = \ht0 |
\advance\dimen@ by \topskip |
\advance\dimen@ by \topskip |
\advance\dimen@ by-\baselineskip |
\advance\dimen@ by-\baselineskip |
\divide\dimen@ by 2 % target to split to | \ifdim\dimen@<14\baselineskip |
%debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% | % Don't split a short final column in two. |
\splittopskip = \topskip | \setbox2=\vbox{}% |
% Loop until we get a decent breakpoint. | \else |
{% | \divide\dimen@ by 2 % target to split to |
\vbadness = 10000 | \dimen@ii = \dimen@ |
\loop | \splittopskip = \topskip |
\global\setbox3 = \copy0 | % Loop until the second column is no higher than the first |
\global\setbox1 = \vsplit3 to \dimen@ | {% |
\ifdim\ht3>\dimen@ | \vbadness = 10000 |
\global\advance\dimen@ by 1pt | \loop |
\repeat | \global\setbox3 = \copy0 |
}% | \global\setbox1 = \vsplit3 to \dimen@ |
%debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% | % Remove glue from bottom of first column to |
\setbox0=\vbox to\dimen@{\unvbox1}% | % make sure it is higher than the second. |
\setbox2=\vbox to\dimen@{\unvbox3}% | \global\setbox1 = \vbox{\unvbox1\unpenalty\unskip}% |
| \ifdim\ht3>\ht1 |
| \global\advance\dimen@ by 1pt |
| \repeat |
| }% |
| \multiply\dimen@ii by 4 |
| \divide\dimen@ii by 5 |
| \ifdim\ht3<\dimen@ii |
| % Column heights are too different, so don't make their bottoms |
| % flush with each other. The glue at the end of the second column |
| % allows a second column to stretch, reducing the difference in |
| % height between the two. |
| \setbox0=\vbox to\dimen@{\unvbox1\vfill}% |
| \setbox2=\vbox to\dimen@{\unvbox3\vskip 0pt plus 0.3\ht0}% |
| \else |
| \setbox0=\vbox to\dimen@{\unvbox1}% |
| \setbox2=\vbox to\dimen@{\unvbox3}% |
| \fi |
| \fi |
% |
% |
\pagesofar |
\pagesofar |
} |
} |
Line 5314 end
|
Line 5604 end
|
\let\lastnode=\empty % no node to associate with |
\let\lastnode=\empty % no node to associate with |
\writetocentry{part}{#1}{}% but put it in the toc |
\writetocentry{part}{#1}{}% but put it in the toc |
\headingsoff % no headline or footline on the part page |
\headingsoff % no headline or footline on the part page |
|
% This outputs a mark at the end of the page that clears \thischapter |
|
% and \thissection, as is done in \startcontents. |
|
\let\pchapsepmacro\relax |
|
\chapmacro{}{Yomitfromtoc}{}% |
\chapoddpage |
\chapoddpage |
\endgroup |
\endgroup |
} |
} |
Line 5558 end
|
Line 5852 end
|
|
|
% @centerchap is like @unnumbered, but the heading is centered. |
% @centerchap is like @unnumbered, but the heading is centered. |
\outer\parseargdef\centerchap{% |
\outer\parseargdef\centerchap{% |
% Well, we could do the following in a group, but that would break |
|
% an assumption that \chapmacro is called at the outermost level. |
|
% Thus we are safer this way: --kasal, 24feb04 |
|
\let\centerparametersmaybe = \centerparameters |
\let\centerparametersmaybe = \centerparameters |
\unnmhead0{#1}% |
\unnmhead0{#1}% |
\let\centerparametersmaybe = \relax |
\let\centerparametersmaybe = \relax |
Line 5684 end
|
Line 5975 end
|
|
|
% Define plain chapter starts, and page on/off switching for it. |
% Define plain chapter starts, and page on/off switching for it. |
\def\chapbreak{\dobreak \chapheadingskip {-4000}} |
\def\chapbreak{\dobreak \chapheadingskip {-4000}} |
|
|
|
% Start a new page |
\def\chappager{\par\vfill\supereject} |
\def\chappager{\par\vfill\supereject} |
|
|
|
% \chapoddpage - start on an odd page for a new chapter |
% Because \domark is called before \chapoddpage, the filler page will |
% Because \domark is called before \chapoddpage, the filler page will |
% get the headings for the next chapter, which is wrong. But we don't |
% get the headings for the next chapter, which is wrong. But we don't |
% care -- we just disable all headings on the filler page. |
% care -- we just disable all headings on the filler page. |
Line 5720 end
|
Line 6015 end
|
|
|
\CHAPPAGon |
\CHAPPAGon |
|
|
% Chapter opening. | % \chapmacro - Chapter opening. |
% |
% |
% #1 is the text, #2 is the section type (Ynumbered, Ynothing, |
% #1 is the text, #2 is the section type (Ynumbered, Ynothing, |
% Yappendix, Yomitfromtoc), #3 the chapter number. |
% Yappendix, Yomitfromtoc), #3 the chapter number. |
|
% Not used for @heading series. |
% |
% |
% To test against our argument. |
% To test against our argument. |
\def\Ynothingkeyword{Ynothing} |
\def\Ynothingkeyword{Ynothing} |
\def\Yomitfromtockeyword{Yomitfromtoc} |
|
\def\Yappendixkeyword{Yappendix} |
\def\Yappendixkeyword{Yappendix} |
|
\def\Yomitfromtockeyword{Yomitfromtoc} |
% |
% |
\def\chapmacro#1#2#3{% |
\def\chapmacro#1#2#3{% |
|
\checkenv{}% chapters, etc., should not start inside an environment. |
|
% |
% Insert the first mark before the heading break (see notes for \domark). |
% Insert the first mark before the heading break (see notes for \domark). |
\let\prevchapterdefs=\lastchapterdefs |
\let\prevchapterdefs=\lastchapterdefs |
\let\prevsectiondefs=\lastsectiondefs |
\let\prevsectiondefs=\lastsectiondefs |
Line 5783 end
|
Line 6081 end
|
% |
% |
{% |
{% |
\chapfonts \rmisbold |
\chapfonts \rmisbold |
|
\let\footnote=\errfootnoteheading % give better error message |
% |
% |
% Have to define \lastsection before calling \donoderef, because the |
% Have to define \lastsection before calling \donoderef, because the |
% xref code eventually uses it. On the other hand, it has to be called |
% xref code eventually uses it. On the other hand, it has to be called |
Line 5876 end
|
Line 6175 end
|
|
|
% Print any size, any type, section title. |
% Print any size, any type, section title. |
% |
% |
% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is | % #1 is the text of the title, |
% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the | % #2 is the section level (sec/subsec/subsubsec), |
% section number. | % #3 is the section type (Ynumbered, Ynothing, Yappendix, Yomitfromtoc), |
| % #4 is the section number. |
% |
% |
\def\seckeyword{sec} |
\def\seckeyword{sec} |
% |
% |
\def\sectionheading#1#2#3#4{% |
\def\sectionheading#1#2#3#4{% |
{% |
{% |
\checkenv{}% should not be in an environment. | \def\sectionlevel{#2}% |
| \def\temptype{#3}% |
% |
% |
|
% It is ok for the @heading series commands to appear inside an |
|
% environment (it's been historically allowed, though the logic is |
|
% dubious), but not the others. |
|
\ifx\temptype\Yomitfromtockeyword\else |
|
\checkenv{}% non-@*heading should not be in an environment. |
|
\fi |
|
\let\footnote=\errfootnoteheading |
|
% |
% Switch to the right set of fonts. |
% Switch to the right set of fonts. |
\csname #2fonts\endcsname \rmisbold |
\csname #2fonts\endcsname \rmisbold |
% |
% |
\def\sectionlevel{#2}% |
|
\def\temptype{#3}% |
|
% |
|
% Insert first mark before the heading break (see notes for \domark). |
% Insert first mark before the heading break (see notes for \domark). |
\let\prevsectiondefs=\lastsectiondefs |
\let\prevsectiondefs=\lastsectiondefs |
\ifx\temptype\Ynothingkeyword |
\ifx\temptype\Ynothingkeyword |
Line 6103 end
|
Line 6409 end
|
\savepageno = \pageno |
\savepageno = \pageno |
\begingroup % Set up to handle contents files properly. |
\begingroup % Set up to handle contents files properly. |
\raggedbottom % Worry more about breakpoints than the bottom. |
\raggedbottom % Worry more about breakpoints than the bottom. |
\advance\hsize by -\contentsrightmargin % Don't use the full line length. | \entryrightmargin=\contentsrightmargin % Don't use the full line length. |
% |
% |
% Roman numerals for page numbers. |
% Roman numerals for page numbers. |
\ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi |
\ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi |
Line 6208 end
|
Line 6514 end
|
|
|
% Chapters, in the main contents. |
% Chapters, in the main contents. |
\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} |
\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} |
% | |
% Chapters, in the short toc. |
% Chapters, in the short toc. |
% See comments in \dochapentry re vbox and related settings. |
% See comments in \dochapentry re vbox and related settings. |
\def\shortchapentry#1#2#3#4{% |
\def\shortchapentry#1#2#3#4{% |
Line 6223 end
|
Line 6529 end
|
\setbox0 = \hbox{\putwordAppendix{} M}% |
\setbox0 = \hbox{\putwordAppendix{} M}% |
\hbox to \wd0{\putwordAppendix{} #1\hss}} |
\hbox to \wd0{\putwordAppendix{} #1\hss}} |
% |
% |
\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}} | \def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\hskip.7em#1}{#4}} |
|
|
% Unnumbered chapters. |
% Unnumbered chapters. |
\def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} |
\def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} |
Line 6256 end
|
Line 6562 end
|
\def\dochapentry#1#2{% |
\def\dochapentry#1#2{% |
\penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip |
\penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip |
\begingroup |
\begingroup |
|
% Move the page numbers slightly to the right |
|
\advance\entryrightmargin by -0.05em |
\chapentryfonts |
\chapentryfonts |
\tocentry{#1}{\dopageno\bgroup#2\egroup}% |
\tocentry{#1}{\dopageno\bgroup#2\egroup}% |
\endgroup |
\endgroup |
Line 6318 end
|
Line 6626 end
|
% other math active characters (just in case), to plain's definitions. |
% other math active characters (just in case), to plain's definitions. |
\mathactive |
\mathactive |
% |
% |
|
% Inverse of the list at the beginning of the file. |
\let\b=\ptexb |
\let\b=\ptexb |
\let\bullet=\ptexbullet |
\let\bullet=\ptexbullet |
\let\c=\ptexc |
\let\c=\ptexc |
Line 6333 end
|
Line 6642 end
|
\let\+=\tabalign |
\let\+=\tabalign |
\let\}=\ptexrbrace |
\let\}=\ptexrbrace |
\let\/=\ptexslash |
\let\/=\ptexslash |
|
\let\sp=\ptexsp |
\let\*=\ptexstar |
\let\*=\ptexstar |
|
%\let\sup=\ptexsup % do not redefine, we want @sup to work in math mode |
\let\t=\ptext |
\let\t=\ptext |
\expandafter \let\csname top\endcsname=\ptextop % we've made it outer |
\expandafter \let\csname top\endcsname=\ptextop % we've made it outer |
\let\frenchspacing=\plainfrenchspacing |
\let\frenchspacing=\plainfrenchspacing |
Line 6372 end
|
Line 6683 end
|
\endgraf |
\endgraf |
\ifdim\lastskip<\envskipamount |
\ifdim\lastskip<\envskipamount |
\removelastskip |
\removelastskip |
|
\ifnum\lastpenalty<10000 |
|
% Penalize breaking before the environment, because preceding text |
|
% often leads into it. |
|
\penalty100 |
|
\fi |
|
\vskip\envskipamount |
|
\fi |
|
\fi |
|
}} |
|
|
|
\def\afterenvbreak{{% |
|
% =10000 instead of <10000 because of a special case in \itemzzz and |
|
% \sectionheading, q.v. |
|
\ifnum \lastpenalty=10000 \else |
|
\advance\envskipamount by \parskip |
|
\endgraf |
|
\ifdim\lastskip<\envskipamount |
|
\removelastskip |
% it's not a good place to break if the last penalty was \nobreak |
% it's not a good place to break if the last penalty was \nobreak |
% or better ... |
% or better ... |
\ifnum\lastpenalty<10000 \penalty-50 \fi |
\ifnum\lastpenalty<10000 \penalty-50 \fi |
Line 6380 end
|
Line 6709 end
|
\fi |
\fi |
}} |
}} |
|
|
\let\afterenvbreak = \aboveenvbreak |
|
|
|
% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will |
% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will |
% also clear it, so that its embedded environments do the narrowing again. |
% also clear it, so that its embedded environments do the narrowing again. |
\let\nonarrowing=\relax |
\let\nonarrowing=\relax |
Line 6419 end
|
Line 6746 end
|
% side, and for 6pt waste from |
% side, and for 6pt waste from |
% each corner char, and rule thickness |
% each corner char, and rule thickness |
\normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip |
\normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip |
% Flag to tell @lisp, etc., not to narrow margin. |
|
\let\nonarrowing = t% |
|
% |
% |
% If this cartouche directly follows a sectioning command, we need the |
% If this cartouche directly follows a sectioning command, we need the |
% \parskip glue (backspaced over by default) or the cartouche can |
% \parskip glue (backspaced over by default) or the cartouche can |
% collide with the section heading. |
% collide with the section heading. |
\ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi |
\ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi |
% |
% |
\vbox\bgroup | \setbox\groupbox=\vbox\bgroup |
\baselineskip=0pt\parskip=0pt\lineskip=0pt |
\baselineskip=0pt\parskip=0pt\lineskip=0pt |
\carttop |
\carttop |
\hbox\bgroup |
\hbox\bgroup |
Line 6451 end
|
Line 6776 end
|
\egroup |
\egroup |
\cartbot |
\cartbot |
\egroup |
\egroup |
|
\addgroupbox |
\checkinserts |
\checkinserts |
} |
} |
|
|
Line 6587 end
|
Line 6913 end
|
|
|
|
|
% @raggedright does more-or-less normal line breaking but no right |
% @raggedright does more-or-less normal line breaking but no right |
% justification. From plain.tex. | % justification. From plain.tex. Don't stretch around special |
| % characters in urls in this environment, since the stretch at the right |
| % should be enough. |
\envdef\raggedright{% |
\envdef\raggedright{% |
\rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax | \rightskip0pt plus2.4em \spaceskip.3333em \xspaceskip.5em\relax |
| \def\urefprestretchamount{0pt}% |
| \def\urefpoststretchamount{0pt}% |
} |
} |
\let\Eraggedright\par |
\let\Eraggedright\par |
|
|
Line 6829 end
|
Line 7159 end
|
% typesetting commands (@smallbook, font changes, etc.) have to be done |
% typesetting commands (@smallbook, font changes, etc.) have to be done |
% beforehand -- and a) we want @copying to be done first in the source |
% beforehand -- and a) we want @copying to be done first in the source |
% file; b) letting users define the frontmatter in as flexible order as |
% file; b) letting users define the frontmatter in as flexible order as |
% possible is very desirable. | % possible is desirable. |
% |
% |
\def\copying{\checkenv{}\begingroup\scanargctxt\docopying} |
\def\copying{\checkenv{}\begingroup\scanargctxt\docopying} |
\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} |
\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} |
Line 6924 end
|
Line 7254 end
|
\temp |
\temp |
} |
} |
|
|
% \domakedefun \deffn \deffnx \deffnheader | % \domakedefun \deffn \deffnx \deffnheader { (defn. of \deffnheader) } |
% |
% |
% Define \deffn and \deffnx, without parameters. |
% Define \deffn and \deffnx, without parameters. |
% \deffnheader has to be defined explicitly. |
% \deffnheader has to be defined explicitly. |
Line 7262 end
|
Line 7592 end
|
} |
} |
\fi |
\fi |
|
|
\def\scanmacro#1{\begingroup | \let\aftermacroxxx\relax |
| \def\aftermacro{\aftermacroxxx} |
| |
| % alias because \c means cedilla in @tex or @math |
| \let\texinfoc=\c |
| |
| % Used at the time of macro expansion. |
| % Argument is macro body with arguments substituted |
| \def\scanmacro#1{% |
\newlinechar`\^^M |
\newlinechar`\^^M |
\let\xeatspaces\eatspaces | \def\xprocessmacroarg{\eatspaces}% |
% |
% |
% Undo catcode changes of \startcontents and \doprintindex | % Process the macro body under the current catcode regime. |
% When called from @insertcopying or (short)caption, we need active | \scantokens{#1\texinfoc}\aftermacro% |
% backslash to get it printed correctly. Previously, we had | |
% \catcode`\\=\other instead. We'll see whether a problem appears | |
% with macro expansion. --kasal, 19aug04 | |
\catcode`\@=0 \catcode`\\=\active \escapechar=`\@ | |
% |
% |
% ... and for \example: | % The \c is to remove the \newlinechar added by \scantokens, and |
\spaceisspace | % can be noticed by \parsearg. |
% | % The \aftermacro allows a \comment at the end of the macro definition |
% The \empty here causes a following catcode 5 newline to be eaten as | % to duplicate itself past the final \newlinechar added by \scantokens: |
% part of reading whitespace after a control sequence. It does not | % this is used in the definition of \group to comment out a newline. We |
% eat a catcode 13 newline. There's no good way to handle the two | % don't do the same for \c to support Texinfo files with macros that ended |
% cases (untried: maybe e-TeX's \everyeof could help, though plain TeX | % with a @c, which should no longer be necessary. |
% would then have different behavior). See the Macro Details node in | % We avoid surrounding the call to \scantokens with \bgroup and \egroup |
% the manual for the workaround we recommend for macros and | % to allow macros to open or close groups themselves. |
% line-oriented commands. | } |
% | |
\scantokens{#1\empty}% | |
\endgroup} | |
|
|
\def\scanexp#1{% |
\def\scanexp#1{% |
|
\bgroup |
|
% Undo catcode changes of \startcontents and \printindex |
|
% When called from @insertcopying or (short)caption, we need active |
|
% backslash to get it printed correctly. |
|
% FIXME: This may not be needed. |
|
%\catcode`\@=0 \catcode`\\=\active \escapechar=`\@ |
\edef\temp{\noexpand\scanmacro{#1}}% |
\edef\temp{\noexpand\scanmacro{#1}}% |
\temp |
\temp |
|
\egroup |
} |
} |
|
|
\newcount\paramno % Count of parameters |
\newcount\paramno % Count of parameters |
Line 7355 end
|
Line 7693 end
|
\catcode`\+=\other |
\catcode`\+=\other |
\catcode`\<=\other |
\catcode`\<=\other |
\catcode`\>=\other |
\catcode`\>=\other |
\catcode`\@=\other |
|
\catcode`\^=\other |
\catcode`\^=\other |
\catcode`\_=\other |
\catcode`\_=\other |
\catcode`\|=\other |
\catcode`\|=\other |
Line 7365 end
|
Line 7702 end
|
|
|
\def\scanargctxt{% used for copying and captions, not macros. |
\def\scanargctxt{% used for copying and captions, not macros. |
\scanctxt |
\scanctxt |
|
\catcode`\@=\other |
\catcode`\\=\other |
\catcode`\\=\other |
\catcode`\^^M=\other |
\catcode`\^^M=\other |
} |
} |
|
|
\def\macrobodyctxt{% used for @macro definitions |
\def\macrobodyctxt{% used for @macro definitions |
\scanctxt |
\scanctxt |
|
\catcode`\ =\other |
|
\catcode`\@=\other |
\catcode`\{=\other |
\catcode`\{=\other |
\catcode`\}=\other |
\catcode`\}=\other |
\catcode`\^^M=\other |
\catcode`\^^M=\other |
\usembodybackslash |
\usembodybackslash |
} |
} |
|
|
\def\macroargctxt{% used when scanning invocations | % Used when scanning braced macro arguments. Note, however, that catcode |
| % changes here are ineffectual if the macro invocation was nested inside |
| % an argument to another Texinfo command. |
| \def\macroargctxt{% |
\scanctxt |
\scanctxt |
\catcode`\\=0 | \catcode`\ =\active |
| \catcode`\^^M=\other |
| \catcode`\\=\active |
} |
} |
% why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes" |
|
% for the single characters \ { }. Thus, we end up with the "commands" |
|
% that would be written @\ @{ @} in a Texinfo document. |
|
% |
|
% We already have @{ and @}. For @\, we define it here, and only for |
|
% this purpose, to produce a typewriter backslash (so, the @\ that we |
|
% define for @math can't be used with @macro calls): |
|
% |
|
\def\\{\normalbackslash}% |
|
% |
|
% We would like to do this for \, too, since that is what makeinfo does. |
|
% But it is not possible, because Texinfo already has a command @, for a |
|
% cedilla accent. Documents must use @comma{} instead. |
|
% |
|
% \anythingelse will almost certainly be an error of some kind. |
|
|
|
|
\def\macrolineargctxt{% used for whole-line arguments without braces |
|
\scanctxt |
|
\catcode`\{=\other |
|
\catcode`\}=\other |
|
} |
|
|
% \mbodybackslash is the definition of \ in @macro bodies. |
% \mbodybackslash is the definition of \ in @macro bodies. |
% It maps \foo\ => \csname macarg.foo\endcsname => #N |
% It maps \foo\ => \csname macarg.foo\endcsname => #N |
Line 7468 end
|
Line 7803 end
|
\fi |
\fi |
} |
} |
|
|
% This makes use of the obscure feature that if the last token of a | % \getargs -- Parse the arguments to a @macro line. Set \macname to |
% <parameter list> is #, then the preceding argument is delimited by | % the name of the macro, and \argl to the braced argument list. |
% an opening brace, and that opening brace is not consumed. | |
\def\getargs#1{\getargsxxx#1{}} |
\def\getargs#1{\getargsxxx#1{}} |
\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} |
\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} |
\def\getmacname#1 #2\relax{\macname={#1}} |
\def\getmacname#1 #2\relax{\macname={#1}} |
\def\getmacargs#1{\def\argl{#1}} |
\def\getmacargs#1{\def\argl{#1}} |
|
% This made use of the feature that if the last token of a |
|
% <parameter list> is #, then the preceding argument is delimited by |
|
% an opening brace, and that opening brace is not consumed. |
|
|
% For macro processing make @ a letter so that we can make Texinfo private macro names. | % Parse the optional {params} list to @macro or @rmacro. |
\edef\texiatcatcode{\the\catcode`\@} | % Set \paramno to the number of arguments, |
\catcode `@=11\relax | % and \paramlist to a parameter text for the macro (e.g. #1,#2,#3 for a |
| % three-param macro.) Define \macarg.BLAH for each BLAH in the params |
% Parse the optional {params} list. Set up \paramno and \paramlist | % list to some hook where the argument is to be expanded. If there are |
% so \defmacro knows what to do. Define \macarg.BLAH for each BLAH | % less than 10 arguments that hook is to be replaced by ##N where N |
% in the params list to some hook where the argument si to be expanded. If | |
% there are less than 10 arguments that hook is to be replaced by ##N where N | |
% is the position in that list, that is to say the macro arguments are to be |
% is the position in that list, that is to say the macro arguments are to be |
% defined `a la TeX in the macro body. |
% defined `a la TeX in the macro body. |
% |
% |
% That gets used by \mbodybackslash (above). |
% That gets used by \mbodybackslash (above). |
% |
% |
% We need to get `macro parameter char #' into several definitions. | % If there are 10 or more arguments, a different technique is used: see |
% The technique used is stolen from LaTeX: let \hash be something | % \parsemmanyargdef. |
% unexpandable, insert that wherever you need a #, and then redefine | |
% it to # just before using the token list produced. | |
% |
% |
% The same technique is used to protect \eatspaces till just before |
|
% the macro is used. |
|
% |
|
% If there are 10 or more arguments, a different technique is used, where the |
|
% hook remains in the body, and when macro is to be expanded the body is |
|
% processed again to replace the arguments. |
|
% |
|
% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the |
|
% argument N value and then \edef the body (nothing else will expand because of |
|
% the catcode regime underwhich the body was input). |
|
% |
|
% If you compile with TeX (not eTeX), and you have macros with 10 or more |
|
% arguments, you need that no macro has more than 256 arguments, otherwise an |
|
% error is produced. |
|
\def\parsemargdef#1;{% |
\def\parsemargdef#1;{% |
\paramno=0\def\paramlist{}% |
\paramno=0\def\paramlist{}% |
\let\hash\relax |
\let\hash\relax |
\let\xeatspaces\relax | % \hash is redefined to `#' later to get it into definitions |
| \let\processmacroarg\relax |
\parsemargdefxxx#1,;,% |
\parsemargdefxxx#1,;,% |
% In case that there are 10 or more arguments we parse again the arguments |
|
% list to set new definitions for the \macarg.BLAH macros corresponding to |
|
% each BLAH argument. It was anyhow needed to parse already once this list |
|
% in order to count the arguments, and as macros with at most 9 arguments |
|
% are by far more frequent than macro with 10 or more arguments, defining |
|
% twice the \macarg.BLAH macros does not cost too much processing power. |
|
\ifnum\paramno<10\relax\else |
\ifnum\paramno<10\relax\else |
\paramno0\relax |
\paramno0\relax |
\parsemmanyargdef@@#1,;,% 10 or more arguments |
\parsemmanyargdef@@#1,;,% 10 or more arguments |
Line 7529 end
|
Line 7843 end
|
\else \let\next=\parsemargdefxxx |
\else \let\next=\parsemargdefxxx |
\advance\paramno by 1 |
\advance\paramno by 1 |
\expandafter\edef\csname macarg.\eatspaces{#1}\endcsname |
\expandafter\edef\csname macarg.\eatspaces{#1}\endcsname |
{\xeatspaces{\hash\the\paramno}}% | {\processmacroarg{\hash\the\paramno}}% |
\edef\paramlist{\paramlist\hash\the\paramno,}% |
\edef\paramlist{\paramlist\hash\the\paramno,}% |
\fi\next} |
\fi\next} |
|
|
|
% \parsemacbody, \parsermacbody |
|
% |
|
% Read recursive and nonrecursive macro bodies. (They're different since |
|
% rec and nonrec macros end differently.) |
|
% |
|
% We are in \macrobodyctxt, and the \xdef causes backslashshes in the macro |
|
% body to be transformed. |
|
% Set \macrobody to the body of the macro, and call \defmacro. |
|
% |
|
{\catcode`\ =\other\long\gdef\parsemacbody#1@end macro{% |
|
\xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}% |
|
{\catcode`\ =\other\long\gdef\parsermacbody#1@end rmacro{% |
|
\xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}% |
|
|
|
% Make @ a letter, so that we can make private-to-Texinfo macro names. |
|
\edef\texiatcatcode{\the\catcode`\@} |
|
\catcode `@=11\relax |
|
|
|
%%%%%%%%%%%%%% Code for > 10 arguments only %%%%%%%%%%%%%%%%%% |
|
|
|
% If there are 10 or more arguments, a different technique is used, where the |
|
% hook remains in the body, and when macro is to be expanded the body is |
|
% processed again to replace the arguments. |
|
% |
|
% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the |
|
% argument N value and then \edef the body (nothing else will expand because of |
|
% the catcode regime under which the body was input). |
|
% |
|
% If you compile with TeX (not eTeX), and you have macros with 10 or more |
|
% arguments, no macro can have more than 256 arguments (else error). |
|
% |
|
% In case that there are 10 or more arguments we parse again the arguments |
|
% list to set new definitions for the \macarg.BLAH macros corresponding to |
|
% each BLAH argument. It was anyhow needed to parse already once this list |
|
% in order to count the arguments, and as macros with at most 9 arguments |
|
% are by far more frequent than macro with 10 or more arguments, defining |
|
% twice the \macarg.BLAH macros does not cost too much processing power. |
\def\parsemmanyargdef@@#1,{% |
\def\parsemmanyargdef@@#1,{% |
\if#1;\let\next=\relax |
\if#1;\let\next=\relax |
\else |
\else |
Line 7548 end
|
Line 7899 end
|
\advance\paramno by 1\relax |
\advance\paramno by 1\relax |
\fi\next} |
\fi\next} |
|
|
% These two commands read recursive and nonrecursive macro bodies. |
|
% (They're different since rec and nonrec macros end differently.) |
|
% |
|
|
|
\catcode `\@\texiatcatcode |
|
\long\def\parsemacbody#1@end macro% |
|
{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% |
|
\long\def\parsermacbody#1@end rmacro% |
|
{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% |
|
\catcode `\@=11\relax |
|
|
|
\let\endargs@\relax |
\let\endargs@\relax |
\let\nil@\relax |
\let\nil@\relax |
\def\nilm@{\nil@}% |
\def\nilm@{\nil@}% |
\long\def\nillm@{\nil@}% |
\long\def\nillm@{\nil@}% |
|
|
% This macro is expanded during the Texinfo macro expansion, not during its |
% This macro is expanded during the Texinfo macro expansion, not during its |
% definition. It gets all the arguments values and assigns them to macros | % definition. It gets all the arguments' values and assigns them to macros |
% macarg.ARGNAME |
% macarg.ARGNAME |
% |
% |
% #1 is the macro name |
% #1 is the macro name |
Line 7586 end
|
Line 7927 end
|
\getargvals@@ |
\getargvals@@ |
\fi |
\fi |
} |
} |
|
|
% |
|
\def\getargvals@@{% |
\def\getargvals@@{% |
\ifx\paramlist\nilm@ |
\ifx\paramlist\nilm@ |
% Some sanity check needed here that \argvaluelist is also empty. |
% Some sanity check needed here that \argvaluelist is also empty. |
Line 7631 end
|
Line 7970 end
|
} |
} |
|
|
% Replace arguments by their values in the macro body, and place the result |
% Replace arguments by their values in the macro body, and place the result |
% in macro \@tempa | % in macro \@tempa. |
| % |
\def\macvalstoargs@{% |
\def\macvalstoargs@{% |
% To do this we use the property that token registers that are \the'ed |
% To do this we use the property that token registers that are \the'ed |
% within an \edef expand only once. So we are going to place all argument |
% within an \edef expand only once. So we are going to place all argument |
Line 7655 end
|
Line 7995 end
|
\expandafter\def\expandafter\@tempa\expandafter{\@tempc}% |
\expandafter\def\expandafter\@tempa\expandafter{\@tempc}% |
} |
} |
|
|
|
% Define the named-macro outside of this group and then close this group. |
|
% |
\def\macargexpandinbody@{% |
\def\macargexpandinbody@{% |
%% Define the named-macro outside of this group and then close this group. |
|
\expandafter |
\expandafter |
\endgroup |
\endgroup |
\macargdeflist@ |
\macargdeflist@ |
Line 7693 end
|
Line 8034 end
|
\next |
\next |
} |
} |
|
|
% Save the token stack pointer into macro #1 | % Trailing missing arguments are set to empty. |
\def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}} | % |
% Restore the token stack pointer from number in macro #1 | |
\def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax} | |
% newtoks that can be used non \outer . | |
\def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi} | |
| |
% Tailing missing arguments are set to empty | |
\def\setemptyargvalues@{% |
\def\setemptyargvalues@{% |
\ifx\paramlist\nilm@ |
\ifx\paramlist\nilm@ |
\let\next\macargexpandinbody@ |
\let\next\macargexpandinbody@ |
Line 7730 end
|
Line 8065 end
|
\long\def#2{#4}% |
\long\def#2{#4}% |
} |
} |
|
|
% This defines a Texinfo @macro. There are eight cases: recursive and | |
% nonrecursive macros of zero, one, up to nine, and many arguments. | %%%%%%%%%%%%%% End of code for > 10 arguments %%%%%%%%%%%%%%%%%% |
% Much magic with \expandafter here. | |
| |
| |
| % Remove following spaces at the expansion stage. |
| % This works because spaces are discarded before each argument when TeX is |
| % getting the arguments for a macro. |
| % This must not be immediately followed by a }. |
| \long\def\gobblespaces#1{#1} |
| |
| % This defines a Texinfo @macro or @rmacro, called by \parsemacbody. |
| % \macrobody has the body of the macro in it, with placeholders for |
| % its parameters, looking like "\processmacroarg{\hash 1}". |
| % \paramno is the number of parameters |
| % \paramlist is a TeX parameter text, e.g. "#1,#2,#3," |
| % There are eight cases: recursive and nonrecursive macros of zero, one, |
| % up to nine, and many arguments. |
% \xdef is used so that macro definitions will survive the file |
% \xdef is used so that macro definitions will survive the file |
% they're defined in; @include reads the file inside a group. | % they're defined in: @include reads the file inside a group. |
% |
% |
\def\defmacro{% |
\def\defmacro{% |
\let\hash=##% convert placeholders to macro parameter chars |
\let\hash=##% convert placeholders to macro parameter chars |
\ifrecursive | \ifnum\paramno=1 |
| \def\processmacroarg{\gobblespaces}% |
| % This removes the pair of braces around the argument. We don't |
| % use \eatspaces, because this can cause ends of lines to be lost |
| % when the argument to \eatspaces is read, leading to line-based |
| % commands like "@itemize" not being read correctly. |
| \else |
| \def\processmacroarg{\xprocessmacroarg}% |
| \let\xprocessmacroarg\relax |
| \fi |
| \ifrecursive %%%%%%%%%%%%%% Recursive %%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
\ifcase\paramno |
\ifcase\paramno |
% 0 |
% 0 |
\expandafter\xdef\csname\the\macname\endcsname{% |
\expandafter\xdef\csname\the\macname\endcsname{% |
\noexpand\scanmacro{\temp}}% | \noexpand\scanmacro{\macrobody}}% |
\or % 1 |
\or % 1 |
\expandafter\xdef\csname\the\macname\endcsname{% |
\expandafter\xdef\csname\the\macname\endcsname{% |
\bgroup\noexpand\macroargctxt | \bgroup |
\noexpand\braceorline |
\noexpand\braceorline |
\expandafter\noexpand\csname\the\macname xxx\endcsname}% | \expandafter\noexpand\csname\the\macname @@@\endcsname}% |
\expandafter\xdef\csname\the\macname xxx\endcsname##1{% | \expandafter\xdef\csname\the\macname @@@\endcsname##1{% |
\egroup\noexpand\scanmacro{\temp}}% | \expandafter\noexpand\csname\the\macname @@@@\endcsname{% |
| \noexpand\gobblespaces##1\empty}% |
| % The \empty is for \gobblespaces in case #1 is empty |
| }% |
| \expandafter\xdef\csname\the\macname @@@@\endcsname##1{% |
| \egroup\noexpand\scanmacro{\macrobody}}% |
\else |
\else |
\ifnum\paramno<10\relax % at most 9 |
\ifnum\paramno<10\relax % at most 9 |
|
% See non-recursive section below for comments |
\expandafter\xdef\csname\the\macname\endcsname{% |
\expandafter\xdef\csname\the\macname\endcsname{% |
\bgroup\noexpand\macroargctxt | \bgroup |
\noexpand\csname\the\macname xx\endcsname}% | \noexpand\expandafter |
\expandafter\xdef\csname\the\macname xx\endcsname##1{% | \noexpand\macroargctxt |
\expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% | \noexpand\expandafter |
| \expandafter\noexpand\csname\the\macname @@\endcsname}% |
| \expandafter\xdef\csname\the\macname @@\endcsname##1{% |
| \noexpand\passargtomacro |
| \expandafter\noexpand\csname\the\macname @@@\endcsname{##1,}}% |
| \expandafter\xdef\csname\the\macname @@@\endcsname##1{% |
| \expandafter\noexpand\csname\the\macname @@@@\endcsname ##1}% |
\expandafter\expandafter |
\expandafter\expandafter |
\expandafter\xdef |
\expandafter\xdef |
\expandafter\expandafter |
\expandafter\expandafter |
\csname\the\macname xxx\endcsname | \csname\the\macname @@@@\endcsname\paramlist{% |
\paramlist{\egroup\noexpand\scanmacro{\temp}}% | \egroup\noexpand\scanmacro{\macrobody}}% |
\else % 10 or more |
\else % 10 or more |
\expandafter\xdef\csname\the\macname\endcsname{% |
\expandafter\xdef\csname\the\macname\endcsname{% |
\noexpand\getargvals@{\the\macname}{\argl}% |
\noexpand\getargvals@{\the\macname}{\argl}% |
}% |
}% |
\global\expandafter\let\csname mac.\the\macname .body\endcsname\temp | \global\expandafter\let\csname mac.\the\macname .body\endcsname\macrobody |
\global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble |
\global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble |
\fi |
\fi |
\fi |
\fi |
\else | \else %%%%%%%%%%%%%%%%%%%%%% Non-recursive %%%%%%%%%%%%%%%%%%%%%%%%%% |
\ifcase\paramno |
\ifcase\paramno |
% 0 |
% 0 |
\expandafter\xdef\csname\the\macname\endcsname{% |
\expandafter\xdef\csname\the\macname\endcsname{% |
\noexpand\norecurse{\the\macname}% | \noexpand\scanmacro{\macrobody}}% |
\noexpand\scanmacro{\temp}\egroup}% | |
\or % 1 |
\or % 1 |
\expandafter\xdef\csname\the\macname\endcsname{% |
\expandafter\xdef\csname\the\macname\endcsname{% |
\bgroup\noexpand\macroargctxt | \bgroup |
\noexpand\braceorline |
\noexpand\braceorline |
\expandafter\noexpand\csname\the\macname xxx\endcsname}% | \expandafter\noexpand\csname\the\macname @@@\endcsname}% |
\expandafter\xdef\csname\the\macname xxx\endcsname##1{% | \expandafter\xdef\csname\the\macname @@@\endcsname##1{% |
| \expandafter\noexpand\csname\the\macname @@@@\endcsname{% |
| \noexpand\gobblespaces##1\empty}% |
| % The \empty is for \gobblespaces in case #1 is empty |
| }% |
| \expandafter\xdef\csname\the\macname @@@@\endcsname##1{% |
\egroup |
\egroup |
\noexpand\norecurse{\the\macname}% | \noexpand\scanmacro{\macrobody}% |
\noexpand\scanmacro{\temp}\egroup}% | }% |
\else % at most 9 |
\else % at most 9 |
\ifnum\paramno<10\relax |
\ifnum\paramno<10\relax |
|
% @MACNAME sets the context for reading the macro argument |
|
% @MACNAME@@ gets the argument, processes backslashes and appends a |
|
% comma. |
|
% @MACNAME@@@ removes braces surrounding the argument list. |
|
% @MACNAME@@@@ scans the macro body with arguments substituted. |
\expandafter\xdef\csname\the\macname\endcsname{% |
\expandafter\xdef\csname\the\macname\endcsname{% |
\bgroup\noexpand\macroargctxt | \bgroup |
\expandafter\noexpand\csname\the\macname xx\endcsname}% | \noexpand\expandafter % This \expandafter skip any spaces after the |
\expandafter\xdef\csname\the\macname xx\endcsname##1{% | \noexpand\macroargctxt % macro before we change the catcode of space. |
\expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% | \noexpand\expandafter |
| \expandafter\noexpand\csname\the\macname @@\endcsname}% |
| \expandafter\xdef\csname\the\macname @@\endcsname##1{% |
| \noexpand\passargtomacro |
| \expandafter\noexpand\csname\the\macname @@@\endcsname{##1,}}% |
| \expandafter\xdef\csname\the\macname @@@\endcsname##1{% |
| \expandafter\noexpand\csname\the\macname @@@@\endcsname ##1}% |
\expandafter\expandafter |
\expandafter\expandafter |
\expandafter\xdef |
\expandafter\xdef |
\expandafter\expandafter |
\expandafter\expandafter |
\csname\the\macname xxx\endcsname | \csname\the\macname @@@@\endcsname\paramlist{% |
\paramlist{% | \egroup\noexpand\scanmacro{\macrobody}}% |
\egroup | |
\noexpand\norecurse{\the\macname}% | |
\noexpand\scanmacro{\temp}\egroup}% | |
\else % 10 or more: |
\else % 10 or more: |
\expandafter\xdef\csname\the\macname\endcsname{% |
\expandafter\xdef\csname\the\macname\endcsname{% |
\noexpand\getargvals@{\the\macname}{\argl}% |
\noexpand\getargvals@{\the\macname}{\argl}% |
}% |
}% |
\global\expandafter\let\csname mac.\the\macname .body\endcsname\temp | \global\expandafter\let\csname mac.\the\macname .body\endcsname\macrobody |
\global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse |
\global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse |
\fi |
\fi |
\fi |
\fi |
\fi} |
\fi} |
|
|
\catcode `\@\texiatcatcode\relax | \catcode `\@\texiatcatcode\relax % end private-to-Texinfo catcodes |
|
|
\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} |
\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} |
|
|
% \braceorline decides whether the next nonwhitespace character is a | |
% {. If so it reads up to the closing }, if not, it reads the whole | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
% line. Whatever was read is then fed to the next control sequence | % |
% as an argument (by \parsebrace or \parsearg). | {\catcode`\@=0 \catcode`\\=13 % We need to manipulate \ so use @ as escape |
| @catcode`@_=11 % private names |
| @catcode`@!=11 % used as argument separator |
| |
| % \passargtomacro#1#2 - |
| % Call #1 with a list of tokens #2, with any doubled backslashes in #2 |
| % compressed to one. |
| % |
| % This implementation works by expansion, and not execution (so we cannot use |
| % \def or similar). This reduces the risk of this failing in contexts where |
| % complete expansion is done with no execution (for example, in writing out to |
| % an auxiliary file for an index entry). |
% |
% |
|
% State is kept in the input stream: the argument passed to |
|
% @look_ahead, @gobble_and_check_finish and @add_segment is |
|
% |
|
% THE_MACRO ARG_RESULT ! {PENDING_BS} NEXT_TOKEN (... rest of input) |
|
% |
|
% where: |
|
% THE_MACRO - name of the macro we want to call |
|
% ARG_RESULT - argument list we build to pass to that macro |
|
% PENDING_BS - either a backslash or nothing |
|
% NEXT_TOKEN - used to look ahead in the input stream to see what's coming next |
|
|
|
@gdef@passargtomacro#1#2{% |
|
@add_segment #1!{}@relax#2\@_finish\% |
|
} |
|
@gdef@_finish{@_finishx} @global@let@_finishx@relax |
|
|
|
% #1 - THE_MACRO ARG_RESULT |
|
% #2 - PENDING_BS |
|
% #3 - NEXT_TOKEN |
|
% #4 used to look ahead |
|
% |
|
% If the next token is not a backslash, process the rest of the argument; |
|
% otherwise, remove the next token. |
|
@gdef@look_ahead#1!#2#3#4{% |
|
@ifx#4\% |
|
@expandafter@gobble_and_check_finish |
|
@else |
|
@expandafter@add_segment |
|
@fi#1!{#2}#4#4% |
|
} |
|
|
|
% #1 - THE_MACRO ARG_RESULT |
|
% #2 - PENDING_BS |
|
% #3 - NEXT_TOKEN |
|
% #4 should be a backslash, which is gobbled. |
|
% #5 looks ahead |
|
% |
|
% Double backslash found. Add a single backslash, and look ahead. |
|
@gdef@gobble_and_check_finish#1!#2#3#4#5{% |
|
@add_segment#1\!{}#5#5% |
|
} |
|
|
|
@gdef@is_fi{@fi} |
|
|
|
% #1 - THE_MACRO ARG_RESULT |
|
% #2 - PENDING_BS |
|
% #3 - NEXT_TOKEN |
|
% #4 is input stream until next backslash |
|
% |
|
% Input stream is either at the start of the argument, or just after a |
|
% backslash sequence, either a lone backslash, or a doubled backslash. |
|
% NEXT_TOKEN contains the first token in the input stream: if it is \finish, |
|
% finish; otherwise, append to ARG_RESULT the segment of the argument up until |
|
% the next backslash. PENDING_BACKSLASH contains a backslash to represent |
|
% a backslash just before the start of the input stream that has not been |
|
% added to ARG_RESULT. |
|
@gdef@add_segment#1!#2#3#4\{% |
|
@ifx#3@_finish |
|
@call_the_macro#1!% |
|
@else |
|
% append the pending backslash to the result, followed by the next segment |
|
@expandafter@is_fi@look_ahead#1#2#4!{\}@fi |
|
% this @fi is discarded by @look_ahead. |
|
% we can't get rid of it with \expandafter because we don't know how |
|
% long #4 is. |
|
} |
|
|
|
% #1 - THE_MACRO |
|
% #2 - ARG_RESULT |
|
% #3 discards the res of the conditional in @add_segment, and @is_fi ends the |
|
% conditional. |
|
@gdef@call_the_macro#1#2!#3@fi{@is_fi #1{#2}} |
|
|
|
} |
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
|
|
% \braceorline MAC is used for a one-argument macro MAC. It checks |
|
% whether the next non-whitespace character is a {. It sets the context |
|
% for reading the argument (slightly different in the two cases). Then, |
|
% to read the argument, in the whole-line case, it then calls the regular |
|
% \parsearg MAC; in the lbrace case, it calls \passargtomacro MAC. |
|
% |
\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} |
\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} |
\def\braceorlinexxx{% |
\def\braceorlinexxx{% |
\ifx\nchar\bgroup\else | \ifx\nchar\bgroup |
\expandafter\parsearg | \macroargctxt |
| \expandafter\passargtomacro |
| \else |
| \macrolineargctxt\expandafter\parsearg |
\fi \macnamexxx} |
\fi \macnamexxx} |
|
|
|
|
Line 7904 end
|
Line 8384 end
|
\pdfmkdest{#1}% |
\pdfmkdest{#1}% |
\iflinks |
\iflinks |
{% |
{% |
|
\requireauxfile |
\atdummies % preserve commands, but don't expand them |
\atdummies % preserve commands, but don't expand them |
\edef\writexrdef##1##2{% |
\edef\writexrdef##1##2{% |
\write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef |
\write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef |
Line 7943 end
|
Line 8424 end
|
% node name, #4 the name of the Info file, #5 the name of the printed |
% node name, #4 the name of the Info file, #5 the name of the printed |
% manual. All but the node name can be omitted. |
% manual. All but the node name can be omitted. |
% |
% |
\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} | \def\pxref{\putwordsee{} \xrefXX} |
\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} | \def\xref{\putwordSee{} \xrefXX} |
\def\ref#1{\xrefX[#1,,,,,,,]} | \def\ref{\xrefXX} |
| |
| \def\xrefXX#1{\def\xrefXXarg{#1}\futurelet\tokenafterxref\xrefXXX} |
| \def\xrefXXX{\expandafter\xrefX\expandafter[\xrefXXarg,,,,,,,]} |
% |
% |
\newbox\toprefbox |
\newbox\toprefbox |
\newbox\printedrefnamebox |
\newbox\printedrefnamebox |
Line 8089 end
|
Line 8573 end
|
% |
% |
% output the `page 3'. |
% output the `page 3'. |
\turnoffactive \putwordpage\tie\refx{#1-pg}{}% |
\turnoffactive \putwordpage\tie\refx{#1-pg}{}% |
|
\ifx,\tokenafterxref |
|
\else\ifx.\tokenafterxref |
|
\else\ifx;\tokenafterxref |
|
\else\ifx)\tokenafterxref |
|
\else,% add a , if xref not followed by punctuation |
|
\fi\fi\fi\fi |
\fi\fi |
\fi\fi |
\fi |
\fi |
\endlink |
\endlink |
Line 8159 end
|
Line 8649 end
|
% If its value is nonempty, SUFFIX is output afterward. |
% If its value is nonempty, SUFFIX is output afterward. |
% |
% |
\def\refx#1#2{% |
\def\refx#1#2{% |
|
\requireauxfile |
{% |
{% |
\indexnofonts |
\indexnofonts |
\otherbackslash |
\otherbackslash |
Line 8222 end
|
Line 8713 end
|
\fi |
\fi |
} |
} |
|
|
|
% If working on a large document in chapters, it is convenient to |
|
% be able to disable indexing, cross-referencing, and contents, for test runs. |
|
% This is done with @novalidate at the beginning of the file. |
|
% |
|
\newif\iflinks \linkstrue % by default we want the aux files. |
|
\let\novalidate = \linksfalse |
|
|
|
% Used when writing to the aux file, or when using data from it. |
|
\def\requireauxfile{% |
|
\iflinks |
|
\tryauxfile |
|
% Open the new aux file. TeX will close it automatically at exit. |
|
\immediate\openout\auxfile=\jobname.aux |
|
\fi |
|
\global\let\requireauxfile=\relax % Only do this once. |
|
} |
|
|
% Read the last existing aux file, if any. No error if none exists. |
% Read the last existing aux file, if any. No error if none exists. |
% |
% |
\def\tryauxfile{% |
\def\tryauxfile{% |
Line 8301 end
|
Line 8809 end
|
\catcode`\\=\other |
\catcode`\\=\other |
% |
% |
% Make the characters 128-255 be printing characters. |
% Make the characters 128-255 be printing characters. |
{% | {\setnonasciicharscatcodenonglobal\other}% |
\count1=128 | |
\def\loop{% | |
\catcode\count1=\other | |
\advance\count1 by 1 | |
\ifnum \count1<256 \loop \fi | |
}% | |
}% | |
% |
% |
% @ is our escape character in .aux files, and we need braces. |
% @ is our escape character in .aux files, and we need braces. |
\catcode`\{=1 |
\catcode`\{=1 |
Line 8342 end
|
Line 8843 end
|
% |
% |
% Auto-number footnotes. Otherwise like plain. |
% Auto-number footnotes. Otherwise like plain. |
\gdef\footnote{% |
\gdef\footnote{% |
\let\indent=\ptexindent |
|
\let\noindent=\ptexnoindent |
|
\global\advance\footnoteno by \@ne |
\global\advance\footnoteno by \@ne |
\edef\thisfootno{$^{\the\footnoteno}$}% |
\edef\thisfootno{$^{\the\footnoteno}$}% |
% |
% |
Line 8367 end
|
Line 8866 end
|
% |
% |
\gdef\dofootnote{% |
\gdef\dofootnote{% |
\insert\footins\bgroup |
\insert\footins\bgroup |
|
% |
|
% Nested footnotes are not supported in TeX, that would take a lot |
|
% more work. (\startsavinginserts does not suffice.) |
|
\let\footnote=\errfootnotenest |
|
% |
% We want to typeset this text as a normal paragraph, even if the |
% We want to typeset this text as a normal paragraph, even if the |
% footnote reference occurs in (for example) a display environment. |
% footnote reference occurs in (for example) a display environment. |
% So reset some parameters. |
% So reset some parameters. |
Line 8404 end
|
Line 8908 end
|
} |
} |
}%end \catcode `\@=11 |
}%end \catcode `\@=11 |
|
|
|
\def\errfootnotenest{% |
|
\errhelp=\EMsimple |
|
\errmessage{Nested footnotes not supported in texinfo.tex, |
|
even though they work in makeinfo; sorry} |
|
} |
|
|
|
\def\errfootnoteheading{% |
|
\errhelp=\EMsimple |
|
\errmessage{Footnotes in chapters, sections, etc., are not supported} |
|
} |
|
|
% In case a @footnote appears in a vbox, save the footnote text and create |
% In case a @footnote appears in a vbox, save the footnote text and create |
% the real \insert just after the vbox finished. Otherwise, the insertion |
% the real \insert just after the vbox finished. Otherwise, the insertion |
% would be lost. |
% would be lost. |
% Similarly, if a @footnote appears inside an alignment, save the footnote |
% Similarly, if a @footnote appears inside an alignment, save the footnote |
% text to a box and make the \insert when a row of the table is finished. |
% text to a box and make the \insert when a row of the table is finished. |
% And the same can be done for other insert classes. --kasal, 16nov03. |
% And the same can be done for other insert classes. --kasal, 16nov03. |
| % |
% Replace the \insert primitive by a cheating macro. |
% Replace the \insert primitive by a cheating macro. |
% Deeper inside, just make sure that the saved insertions are not spilled |
% Deeper inside, just make sure that the saved insertions are not spilled |
% out prematurely. |
% out prematurely. |
Line 8508 end
|
Line 9023 end
|
\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup |
\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup |
\catcode`\^^M = 5 % in case we're inside an example |
\catcode`\^^M = 5 % in case we're inside an example |
\normalturnoffactive % allow _ et al. in names |
\normalturnoffactive % allow _ et al. in names |
|
\def\xprocessmacroarg{\eatspaces}% in case we are being used via a macro |
% If the image is by itself, center it. |
% If the image is by itself, center it. |
\ifvmode |
\ifvmode |
\imagevmodetrue |
\imagevmodetrue |
Line 8688 end
|
Line 9204 end
|
% \floatlabel-lof. Besides \floatident, we include the short |
% \floatlabel-lof. Besides \floatident, we include the short |
% caption if specified, else the full caption if specified, else nothing. |
% caption if specified, else the full caption if specified, else nothing. |
{% |
{% |
|
\requireauxfile |
\atdummies |
\atdummies |
% |
% |
% since we read the caption text in the macro world, where ^^M |
% since we read the caption text in the macro world, where ^^M |
Line 8827 end
|
Line 9344 end
|
{ |
{ |
\catcode`\_ = \active |
\catcode`\_ = \active |
\globaldefs=1 |
\globaldefs=1 |
\parseargdef\documentlanguage{\begingroup | \parseargdef\documentlanguage{% |
\let_=\normalunderscore % normal _ character for filenames | |
\tex % read txi-??.tex file in plain TeX. |
\tex % read txi-??.tex file in plain TeX. |
% Read the file by the name they passed if it exists. |
% Read the file by the name they passed if it exists. |
|
\let_ = \normalunderscore % normal _ character for filename test |
\openin 1 txi-#1.tex |
\openin 1 txi-#1.tex |
\ifeof 1 |
\ifeof 1 |
\documentlanguagetrywithoutunderscore{#1_\finish}% | \documentlanguagetrywithoutunderscore #1_\finish |
\else |
\else |
\globaldefs = 1 % everything in the txi-LL files needs to persist |
\globaldefs = 1 % everything in the txi-LL files needs to persist |
\input txi-#1.tex |
\input txi-#1.tex |
\fi |
\fi |
\closein 1 |
\closein 1 |
\endgroup % end raw TeX |
\endgroup % end raw TeX |
\endgroup} | } |
% |
% |
% If they passed de_DE, and txi-de_DE.tex doesn't exist, |
% If they passed de_DE, and txi-de_DE.tex doesn't exist, |
% try txi-de.tex. |
% try txi-de.tex. |
Line 8910 directory should work if nowhere else does.}
|
Line 9427 directory should work if nowhere else does.}
|
% @documentencoding sets the definition of non-ASCII characters |
% @documentencoding sets the definition of non-ASCII characters |
% according to the specified encoding. |
% according to the specified encoding. |
% |
% |
\parseargdef\documentencoding{% | \def\documentencoding{\parseargusing\filenamecatcodes\documentencodingzzz} |
| \def\documentencodingzzz#1{% |
% Encoding being declared for the document. |
% Encoding being declared for the document. |
\def\declaredencoding{\csname #1.enc\endcsname}% |
\def\declaredencoding{\csname #1.enc\endcsname}% |
% |
% |
Line 8939 directory should work if nowhere else does.}
|
Line 9457 directory should work if nowhere else does.}
|
% |
% |
\else \ifx \declaredencoding \utfeight |
\else \ifx \declaredencoding \utfeight |
\setnonasciicharscatcode\active |
\setnonasciicharscatcode\active |
\utfeightchardefs | % since we already invoked \utfeightchardefs at the top level |
| % (below), do not re-invoke it, then our check for duplicated |
| % definitions triggers. Making non-ascii chars active is enough. |
% |
% |
\else |
\else |
\message{Unknown document encoding #1, ignoring.}% | \message{Ignoring unknown document encoding: #1.}% |
% |
% |
\fi % utfeight |
\fi % utfeight |
\fi % latnine |
\fi % latnine |
Line 8951 directory should work if nowhere else does.}
|
Line 9471 directory should work if nowhere else does.}
|
\fi % ascii |
\fi % ascii |
} |
} |
|
|
|
% emacs-page |
% A message to be logged when using a character that isn't available |
% A message to be logged when using a character that isn't available |
% the default font encoding (OT1). |
% the default font encoding (OT1). |
% |
% |
\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} | \def\missingcharmsg#1{\message{Character missing, sorry: #1.}} |
|
|
% Take account of \c (plain) vs. \, (Texinfo) difference. |
% Take account of \c (plain) vs. \, (Texinfo) difference. |
\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} |
\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} |
Line 8968 directory should work if nowhere else does.}
|
Line 9489 directory should work if nowhere else does.}
|
\def\latonechardefs{% |
\def\latonechardefs{% |
\gdef^^a0{\tie} |
\gdef^^a0{\tie} |
\gdef^^a1{\exclamdown} |
\gdef^^a1{\exclamdown} |
\gdef^^a2{\missingcharmsg{CENT SIGN}} | \gdef^^a2{{\tcfont \char162}} % cent |
\gdef^^a3{{\pounds}} | \gdef^^a3{\pounds} |
\gdef^^a4{\missingcharmsg{CURRENCY SIGN}} | \gdef^^a4{{\tcfont \char164}} % currency |
\gdef^^a5{\missingcharmsg{YEN SIGN}} | \gdef^^a5{{\tcfont \char165}} % yen |
\gdef^^a6{\missingcharmsg{BROKEN BAR}} | \gdef^^a6{{\tcfont \char166}} % broken bar |
\gdef^^a7{\S} |
\gdef^^a7{\S} |
\gdef^^a8{\"{}} |
\gdef^^a8{\"{}} |
\gdef^^a9{\copyright} |
\gdef^^a9{\copyright} |
\gdef^^aa{\ordf} |
\gdef^^aa{\ordf} |
\gdef^^ab{\guillemetleft} |
\gdef^^ab{\guillemetleft} |
\gdef^^ac{$\lnot$} | \gdef^^ac{\ensuremath\lnot} |
\gdef^^ad{\-} |
\gdef^^ad{\-} |
\gdef^^ae{\registeredsymbol} |
\gdef^^ae{\registeredsymbol} |
\gdef^^af{\={}} |
\gdef^^af{\={}} |
Line 8990 directory should work if nowhere else does.}
|
Line 9511 directory should work if nowhere else does.}
|
\gdef^^b4{\'{}} |
\gdef^^b4{\'{}} |
\gdef^^b5{$\mu$} |
\gdef^^b5{$\mu$} |
\gdef^^b6{\P} |
\gdef^^b6{\P} |
% | \gdef^^b7{\ensuremath\cdot} |
\gdef^^b7{$^.$} | |
\gdef^^b8{\cedilla\ } |
\gdef^^b8{\cedilla\ } |
\gdef^^b9{$^1$} |
\gdef^^b9{$^1$} |
\gdef^^ba{\ordm} |
\gdef^^ba{\ordm} |
% |
|
\gdef^^bb{\guillemetright} |
\gdef^^bb{\guillemetright} |
\gdef^^bc{$1\over4$} |
\gdef^^bc{$1\over4$} |
\gdef^^bd{$1\over2$} |
\gdef^^bd{$1\over2$} |
Line 9250 directory should work if nowhere else does.}
|
Line 9769 directory should work if nowhere else does.}
|
\UTFviiiLoop |
\UTFviiiLoop |
\endgroup |
\endgroup |
|
|
|
\def\globallet{\global\let} % save some \expandafter's below |
|
|
|
% @U{xxxx} to produce U+xxxx, if we support it. |
|
\def\U#1{% |
|
\expandafter\ifx\csname uni:#1\endcsname \relax |
|
\errhelp = \EMsimple |
|
\errmessage{Unicode character U+#1 not supported, sorry}% |
|
\else |
|
\csname uni:#1\endcsname |
|
\fi |
|
} |
|
|
\begingroup |
\begingroup |
\catcode`\"=12 |
\catcode`\"=12 |
\catcode`\<=12 |
\catcode`\<=12 |
Line 9258 directory should work if nowhere else does.}
|
Line 9789 directory should work if nowhere else does.}
|
\catcode`\;=12 |
\catcode`\;=12 |
\catcode`\!=12 |
\catcode`\!=12 |
\catcode`\~=13 |
\catcode`\~=13 |
|
|
\gdef\DeclareUnicodeCharacter#1#2{% |
\gdef\DeclareUnicodeCharacter#1#2{% |
\countUTFz = "#1\relax |
\countUTFz = "#1\relax |
%\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% |
%\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% |
Line 9273 directory should work if nowhere else does.}
|
Line 9803 directory should work if nowhere else does.}
|
\expandafter\expandafter\expandafter\expandafter |
\expandafter\expandafter\expandafter\expandafter |
\expandafter\expandafter\expandafter |
\expandafter\expandafter\expandafter |
\gdef\UTFviiiTmp{#2}% |
\gdef\UTFviiiTmp{#2}% |
|
% |
|
\expandafter\ifx\csname uni:#1\endcsname \relax \else |
|
\message{Internal error, already defined: #1}% |
|
\fi |
|
% |
|
% define an additional control sequence for this code point. |
|
\expandafter\globallet\csname uni:#1\endcsname \UTFviiiTmp |
\endgroup} |
\endgroup} |
|
|
\gdef\parseXMLCharref{% |
\gdef\parseXMLCharref{% |
Line 9310 directory should work if nowhere else does.}
|
Line 9847 directory should work if nowhere else does.}
|
\uppercase{\gdef\UTFviiiTmp{#2#3#4}}} |
\uppercase{\gdef\UTFviiiTmp{#2#3#4}}} |
\endgroup |
\endgroup |
|
|
|
% https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_M |
|
% U+0000..U+007F = https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block) |
|
% U+0080..U+00FF = https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block) |
|
% U+0100..U+017F = https://en.wikipedia.org/wiki/Latin_Extended-A |
|
% U+0180..U+024F = https://en.wikipedia.org/wiki/Latin_Extended-B |
|
% |
|
% Many of our renditions are less than wonderful, and all the missing |
|
% characters are available somewhere. Loading the necessary fonts |
|
% awaits user request. We can't truly support Unicode without |
|
% reimplementing everything that's been done in LaTeX for many years, |
|
% plus probably using luatex or xetex, and who knows what else. |
|
% We won't be doing that here in this simple file. But we can try to at |
|
% least make most of the characters not bomb out. |
|
% |
\def\utfeightchardefs{% |
\def\utfeightchardefs{% |
\DeclareUnicodeCharacter{00A0}{\tie} |
\DeclareUnicodeCharacter{00A0}{\tie} |
\DeclareUnicodeCharacter{00A1}{\exclamdown} |
\DeclareUnicodeCharacter{00A1}{\exclamdown} |
|
\DeclareUnicodeCharacter{00A2}{{\tcfont \char162}}% 0242=cent |
\DeclareUnicodeCharacter{00A3}{\pounds} |
\DeclareUnicodeCharacter{00A3}{\pounds} |
|
\DeclareUnicodeCharacter{00A4}{{\tcfont \char164}}% 0244=currency |
|
\DeclareUnicodeCharacter{00A5}{{\tcfont \char165}}% 0245=yen |
|
\DeclareUnicodeCharacter{00A6}{{\tcfont \char166}}% 0246=brokenbar |
|
\DeclareUnicodeCharacter{00A7}{\S} |
\DeclareUnicodeCharacter{00A8}{\"{ }} |
\DeclareUnicodeCharacter{00A8}{\"{ }} |
\DeclareUnicodeCharacter{00A9}{\copyright} |
\DeclareUnicodeCharacter{00A9}{\copyright} |
\DeclareUnicodeCharacter{00AA}{\ordf} |
\DeclareUnicodeCharacter{00AA}{\ordf} |
\DeclareUnicodeCharacter{00AB}{\guillemetleft} |
\DeclareUnicodeCharacter{00AB}{\guillemetleft} |
|
\DeclareUnicodeCharacter{00AC}{\ensuremath\lnot} |
\DeclareUnicodeCharacter{00AD}{\-} |
\DeclareUnicodeCharacter{00AD}{\-} |
\DeclareUnicodeCharacter{00AE}{\registeredsymbol} |
\DeclareUnicodeCharacter{00AE}{\registeredsymbol} |
\DeclareUnicodeCharacter{00AF}{\={ }} |
\DeclareUnicodeCharacter{00AF}{\={ }} |
|
|
\DeclareUnicodeCharacter{00B0}{\ringaccent{ }} |
\DeclareUnicodeCharacter{00B0}{\ringaccent{ }} |
|
\DeclareUnicodeCharacter{00B1}{\ensuremath\pm} |
|
\DeclareUnicodeCharacter{00B2}{$^2$} |
|
\DeclareUnicodeCharacter{00B3}{$^3$} |
\DeclareUnicodeCharacter{00B4}{\'{ }} |
\DeclareUnicodeCharacter{00B4}{\'{ }} |
|
\DeclareUnicodeCharacter{00B5}{$\mu$} |
|
\DeclareUnicodeCharacter{00B6}{\P} |
|
\DeclareUnicodeCharacter{00B7}{\ensuremath\cdot} |
\DeclareUnicodeCharacter{00B8}{\cedilla{ }} |
\DeclareUnicodeCharacter{00B8}{\cedilla{ }} |
|
\DeclareUnicodeCharacter{00B9}{$^1$} |
\DeclareUnicodeCharacter{00BA}{\ordm} |
\DeclareUnicodeCharacter{00BA}{\ordm} |
\DeclareUnicodeCharacter{00BB}{\guillemetright} |
\DeclareUnicodeCharacter{00BB}{\guillemetright} |
|
\DeclareUnicodeCharacter{00BC}{$1\over4$} |
|
\DeclareUnicodeCharacter{00BD}{$1\over2$} |
|
\DeclareUnicodeCharacter{00BE}{$3\over4$} |
\DeclareUnicodeCharacter{00BF}{\questiondown} |
\DeclareUnicodeCharacter{00BF}{\questiondown} |
|
|
\DeclareUnicodeCharacter{00C0}{\`A} |
\DeclareUnicodeCharacter{00C0}{\`A} |
Line 9353 directory should work if nowhere else does.}
|
Line 9920 directory should work if nowhere else does.}
|
\DeclareUnicodeCharacter{00D4}{\^O} |
\DeclareUnicodeCharacter{00D4}{\^O} |
\DeclareUnicodeCharacter{00D5}{\~O} |
\DeclareUnicodeCharacter{00D5}{\~O} |
\DeclareUnicodeCharacter{00D6}{\"O} |
\DeclareUnicodeCharacter{00D6}{\"O} |
|
\DeclareUnicodeCharacter{00D7}{\ensuremath\times} |
\DeclareUnicodeCharacter{00D8}{\O} |
\DeclareUnicodeCharacter{00D8}{\O} |
\DeclareUnicodeCharacter{00D9}{\`U} |
\DeclareUnicodeCharacter{00D9}{\`U} |
\DeclareUnicodeCharacter{00DA}{\'U} |
\DeclareUnicodeCharacter{00DA}{\'U} |
Line 9386 directory should work if nowhere else does.}
|
Line 9954 directory should work if nowhere else does.}
|
\DeclareUnicodeCharacter{00F4}{\^o} |
\DeclareUnicodeCharacter{00F4}{\^o} |
\DeclareUnicodeCharacter{00F5}{\~o} |
\DeclareUnicodeCharacter{00F5}{\~o} |
\DeclareUnicodeCharacter{00F6}{\"o} |
\DeclareUnicodeCharacter{00F6}{\"o} |
|
\DeclareUnicodeCharacter{00F7}{\ensuremath\div} |
\DeclareUnicodeCharacter{00F8}{\o} |
\DeclareUnicodeCharacter{00F8}{\o} |
\DeclareUnicodeCharacter{00F9}{\`u} |
\DeclareUnicodeCharacter{00F9}{\`u} |
\DeclareUnicodeCharacter{00FA}{\'u} |
\DeclareUnicodeCharacter{00FA}{\'u} |
Line 9405 directory should work if nowhere else does.}
|
Line 9974 directory should work if nowhere else does.}
|
\DeclareUnicodeCharacter{0107}{\'c} |
\DeclareUnicodeCharacter{0107}{\'c} |
\DeclareUnicodeCharacter{0108}{\^C} |
\DeclareUnicodeCharacter{0108}{\^C} |
\DeclareUnicodeCharacter{0109}{\^c} |
\DeclareUnicodeCharacter{0109}{\^c} |
\DeclareUnicodeCharacter{0118}{\ogonek{E}} |
|
\DeclareUnicodeCharacter{0119}{\ogonek{e}} |
|
\DeclareUnicodeCharacter{010A}{\dotaccent{C}} |
\DeclareUnicodeCharacter{010A}{\dotaccent{C}} |
\DeclareUnicodeCharacter{010B}{\dotaccent{c}} |
\DeclareUnicodeCharacter{010B}{\dotaccent{c}} |
\DeclareUnicodeCharacter{010C}{\v{C}} |
\DeclareUnicodeCharacter{010C}{\v{C}} |
\DeclareUnicodeCharacter{010D}{\v{c}} |
\DeclareUnicodeCharacter{010D}{\v{c}} |
\DeclareUnicodeCharacter{010E}{\v{D}} |
\DeclareUnicodeCharacter{010E}{\v{D}} |
|
\DeclareUnicodeCharacter{010F}{d'} |
|
|
|
\DeclareUnicodeCharacter{0110}{\DH} |
|
\DeclareUnicodeCharacter{0111}{\dh} |
\DeclareUnicodeCharacter{0112}{\=E} |
\DeclareUnicodeCharacter{0112}{\=E} |
\DeclareUnicodeCharacter{0113}{\=e} |
\DeclareUnicodeCharacter{0113}{\=e} |
\DeclareUnicodeCharacter{0114}{\u{E}} |
\DeclareUnicodeCharacter{0114}{\u{E}} |
\DeclareUnicodeCharacter{0115}{\u{e}} |
\DeclareUnicodeCharacter{0115}{\u{e}} |
\DeclareUnicodeCharacter{0116}{\dotaccent{E}} |
\DeclareUnicodeCharacter{0116}{\dotaccent{E}} |
\DeclareUnicodeCharacter{0117}{\dotaccent{e}} |
\DeclareUnicodeCharacter{0117}{\dotaccent{e}} |
|
\DeclareUnicodeCharacter{0118}{\ogonek{E}} |
|
\DeclareUnicodeCharacter{0119}{\ogonek{e}} |
\DeclareUnicodeCharacter{011A}{\v{E}} |
\DeclareUnicodeCharacter{011A}{\v{E}} |
\DeclareUnicodeCharacter{011B}{\v{e}} |
\DeclareUnicodeCharacter{011B}{\v{e}} |
\DeclareUnicodeCharacter{011C}{\^G} |
\DeclareUnicodeCharacter{011C}{\^G} |
Line 9428 directory should work if nowhere else does.}
|
Line 10000 directory should work if nowhere else does.}
|
|
|
\DeclareUnicodeCharacter{0120}{\dotaccent{G}} |
\DeclareUnicodeCharacter{0120}{\dotaccent{G}} |
\DeclareUnicodeCharacter{0121}{\dotaccent{g}} |
\DeclareUnicodeCharacter{0121}{\dotaccent{g}} |
|
\DeclareUnicodeCharacter{0122}{\cedilla{G}} |
|
\DeclareUnicodeCharacter{0123}{\cedilla{g}} |
\DeclareUnicodeCharacter{0124}{\^H} |
\DeclareUnicodeCharacter{0124}{\^H} |
\DeclareUnicodeCharacter{0125}{\^h} |
\DeclareUnicodeCharacter{0125}{\^h} |
|
\DeclareUnicodeCharacter{0126}{\missingcharmsg{H WITH STROKE}} |
|
\DeclareUnicodeCharacter{0127}{\missingcharmsg{h WITH STROKE}} |
\DeclareUnicodeCharacter{0128}{\~I} |
\DeclareUnicodeCharacter{0128}{\~I} |
\DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} |
\DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} |
\DeclareUnicodeCharacter{012A}{\=I} |
\DeclareUnicodeCharacter{012A}{\=I} |
\DeclareUnicodeCharacter{012B}{\={\dotless{i}}} |
\DeclareUnicodeCharacter{012B}{\={\dotless{i}}} |
\DeclareUnicodeCharacter{012C}{\u{I}} |
\DeclareUnicodeCharacter{012C}{\u{I}} |
\DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} |
\DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} |
|
\DeclareUnicodeCharacter{012E}{\ogonek{I}} |
|
\DeclareUnicodeCharacter{012F}{\ogonek{i}} |
|
|
\DeclareUnicodeCharacter{0130}{\dotaccent{I}} |
\DeclareUnicodeCharacter{0130}{\dotaccent{I}} |
\DeclareUnicodeCharacter{0131}{\dotless{i}} |
\DeclareUnicodeCharacter{0131}{\dotless{i}} |
Line 9443 directory should work if nowhere else does.}
|
Line 10021 directory should work if nowhere else does.}
|
\DeclareUnicodeCharacter{0133}{ij} |
\DeclareUnicodeCharacter{0133}{ij} |
\DeclareUnicodeCharacter{0134}{\^J} |
\DeclareUnicodeCharacter{0134}{\^J} |
\DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} |
\DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} |
|
\DeclareUnicodeCharacter{0136}{\cedilla{K}} |
|
\DeclareUnicodeCharacter{0137}{\cedilla{k}} |
|
\DeclareUnicodeCharacter{0138}{\ensuremath\kappa} |
\DeclareUnicodeCharacter{0139}{\'L} |
\DeclareUnicodeCharacter{0139}{\'L} |
\DeclareUnicodeCharacter{013A}{\'l} |
\DeclareUnicodeCharacter{013A}{\'l} |
|
\DeclareUnicodeCharacter{013B}{\cedilla{L}} |
|
\DeclareUnicodeCharacter{013C}{\cedilla{l}} |
|
\DeclareUnicodeCharacter{013D}{L'}% should kern |
|
\DeclareUnicodeCharacter{013E}{l'}% should kern |
|
\DeclareUnicodeCharacter{013F}{L\U{00B7}} |
|
|
|
\DeclareUnicodeCharacter{0140}{l\U{00B7}} |
\DeclareUnicodeCharacter{0141}{\L} |
\DeclareUnicodeCharacter{0141}{\L} |
\DeclareUnicodeCharacter{0142}{\l} |
\DeclareUnicodeCharacter{0142}{\l} |
\DeclareUnicodeCharacter{0143}{\'N} |
\DeclareUnicodeCharacter{0143}{\'N} |
\DeclareUnicodeCharacter{0144}{\'n} |
\DeclareUnicodeCharacter{0144}{\'n} |
|
\DeclareUnicodeCharacter{0145}{\cedilla{N}} |
|
\DeclareUnicodeCharacter{0146}{\cedilla{n}} |
\DeclareUnicodeCharacter{0147}{\v{N}} |
\DeclareUnicodeCharacter{0147}{\v{N}} |
\DeclareUnicodeCharacter{0148}{\v{n}} |
\DeclareUnicodeCharacter{0148}{\v{n}} |
|
\DeclareUnicodeCharacter{0149}{'n} |
|
\DeclareUnicodeCharacter{014A}{\missingcharmsg{ENG}} |
|
\DeclareUnicodeCharacter{014B}{\missingcharmsg{eng}} |
\DeclareUnicodeCharacter{014C}{\=O} |
\DeclareUnicodeCharacter{014C}{\=O} |
\DeclareUnicodeCharacter{014D}{\=o} |
\DeclareUnicodeCharacter{014D}{\=o} |
\DeclareUnicodeCharacter{014E}{\u{O}} |
\DeclareUnicodeCharacter{014E}{\u{O}} |
Line 9463 directory should work if nowhere else does.}
|
Line 10055 directory should work if nowhere else does.}
|
\DeclareUnicodeCharacter{0153}{\oe} |
\DeclareUnicodeCharacter{0153}{\oe} |
\DeclareUnicodeCharacter{0154}{\'R} |
\DeclareUnicodeCharacter{0154}{\'R} |
\DeclareUnicodeCharacter{0155}{\'r} |
\DeclareUnicodeCharacter{0155}{\'r} |
|
\DeclareUnicodeCharacter{0156}{\cedilla{R}} |
|
\DeclareUnicodeCharacter{0157}{\cedilla{r}} |
\DeclareUnicodeCharacter{0158}{\v{R}} |
\DeclareUnicodeCharacter{0158}{\v{R}} |
\DeclareUnicodeCharacter{0159}{\v{r}} |
\DeclareUnicodeCharacter{0159}{\v{r}} |
\DeclareUnicodeCharacter{015A}{\'S} |
\DeclareUnicodeCharacter{015A}{\'S} |
Line 9474 directory should work if nowhere else does.}
|
Line 10068 directory should work if nowhere else does.}
|
|
|
\DeclareUnicodeCharacter{0160}{\v{S}} |
\DeclareUnicodeCharacter{0160}{\v{S}} |
\DeclareUnicodeCharacter{0161}{\v{s}} |
\DeclareUnicodeCharacter{0161}{\v{s}} |
\DeclareUnicodeCharacter{0162}{\cedilla{t}} | \DeclareUnicodeCharacter{0162}{\cedilla{T}} |
\DeclareUnicodeCharacter{0163}{\cedilla{T}} | \DeclareUnicodeCharacter{0163}{\cedilla{t}} |
\DeclareUnicodeCharacter{0164}{\v{T}} |
\DeclareUnicodeCharacter{0164}{\v{T}} |
| \DeclareUnicodeCharacter{0165}{\v{t}} |
| \DeclareUnicodeCharacter{0166}{\missingcharmsg{H WITH STROKE}} |
| \DeclareUnicodeCharacter{0167}{\missingcharmsg{h WITH STROKE}} |
\DeclareUnicodeCharacter{0168}{\~U} |
\DeclareUnicodeCharacter{0168}{\~U} |
\DeclareUnicodeCharacter{0169}{\~u} |
\DeclareUnicodeCharacter{0169}{\~u} |
\DeclareUnicodeCharacter{016A}{\=U} |
\DeclareUnicodeCharacter{016A}{\=U} |
Line 9489 directory should work if nowhere else does.}
|
Line 10085 directory should work if nowhere else does.}
|
|
|
\DeclareUnicodeCharacter{0170}{\H{U}} |
\DeclareUnicodeCharacter{0170}{\H{U}} |
\DeclareUnicodeCharacter{0171}{\H{u}} |
\DeclareUnicodeCharacter{0171}{\H{u}} |
|
\DeclareUnicodeCharacter{0172}{\ogonek{U}} |
|
\DeclareUnicodeCharacter{0173}{\ogonek{u}} |
\DeclareUnicodeCharacter{0174}{\^W} |
\DeclareUnicodeCharacter{0174}{\^W} |
\DeclareUnicodeCharacter{0175}{\^w} |
\DeclareUnicodeCharacter{0175}{\^w} |
\DeclareUnicodeCharacter{0176}{\^Y} |
\DeclareUnicodeCharacter{0176}{\^Y} |
Line 9500 directory should work if nowhere else does.}
|
Line 10098 directory should work if nowhere else does.}
|
\DeclareUnicodeCharacter{017C}{\dotaccent{z}} |
\DeclareUnicodeCharacter{017C}{\dotaccent{z}} |
\DeclareUnicodeCharacter{017D}{\v{Z}} |
\DeclareUnicodeCharacter{017D}{\v{Z}} |
\DeclareUnicodeCharacter{017E}{\v{z}} |
\DeclareUnicodeCharacter{017E}{\v{z}} |
|
\DeclareUnicodeCharacter{017F}{\missingcharmsg{LONG S}} |
|
|
\DeclareUnicodeCharacter{01C4}{D\v{Z}} |
\DeclareUnicodeCharacter{01C4}{D\v{Z}} |
\DeclareUnicodeCharacter{01C5}{D\v{z}} |
\DeclareUnicodeCharacter{01C5}{D\v{z}} |
Line 9556 directory should work if nowhere else does.}
|
Line 10155 directory should work if nowhere else does.}
|
|
|
\DeclareUnicodeCharacter{02DB}{\ogonek{ }} |
\DeclareUnicodeCharacter{02DB}{\ogonek{ }} |
|
|
|
% Greek letters upper case |
|
\DeclareUnicodeCharacter{0391}{{\it A}} |
|
\DeclareUnicodeCharacter{0392}{{\it B}} |
|
\DeclareUnicodeCharacter{0393}{\ensuremath{\mit\Gamma}} |
|
\DeclareUnicodeCharacter{0394}{\ensuremath{\mit\Delta}} |
|
\DeclareUnicodeCharacter{0395}{{\it E}} |
|
\DeclareUnicodeCharacter{0396}{{\it Z}} |
|
\DeclareUnicodeCharacter{0397}{{\it H}} |
|
\DeclareUnicodeCharacter{0398}{\ensuremath{\mit\Theta}} |
|
\DeclareUnicodeCharacter{0399}{{\it I}} |
|
\DeclareUnicodeCharacter{039A}{{\it K}} |
|
\DeclareUnicodeCharacter{039B}{\ensuremath{\mit\Lambda}} |
|
\DeclareUnicodeCharacter{039C}{{\it M}} |
|
\DeclareUnicodeCharacter{039D}{{\it N}} |
|
\DeclareUnicodeCharacter{039E}{\ensuremath{\mit\Xi}} |
|
\DeclareUnicodeCharacter{039F}{{\it O}} |
|
\DeclareUnicodeCharacter{03A0}{\ensuremath{\mit\Pi}} |
|
\DeclareUnicodeCharacter{03A1}{{\it P}} |
|
%\DeclareUnicodeCharacter{03A2}{} % none - corresponds to final sigma |
|
\DeclareUnicodeCharacter{03A3}{\ensuremath{\mit\Sigma}} |
|
\DeclareUnicodeCharacter{03A4}{{\it T}} |
|
\DeclareUnicodeCharacter{03A5}{\ensuremath{\mit\Upsilon}} |
|
\DeclareUnicodeCharacter{03A6}{\ensuremath{\mit\Phi}} |
|
\DeclareUnicodeCharacter{03A7}{{\it X}} |
|
\DeclareUnicodeCharacter{03A8}{\ensuremath{\mit\Psi}} |
|
\DeclareUnicodeCharacter{03A9}{\ensuremath{\mit\Omega}} |
|
|
|
% Vowels with accents |
|
\DeclareUnicodeCharacter{0390}{\ensuremath{\ddot{\acute\iota}}} |
|
\DeclareUnicodeCharacter{03AC}{\ensuremath{\acute\alpha}} |
|
\DeclareUnicodeCharacter{03AD}{\ensuremath{\acute\epsilon}} |
|
\DeclareUnicodeCharacter{03AE}{\ensuremath{\acute\eta}} |
|
\DeclareUnicodeCharacter{03AF}{\ensuremath{\acute\iota}} |
|
\DeclareUnicodeCharacter{03B0}{\ensuremath{\acute{\ddot\upsilon}}} |
|
|
|
% Standalone accent |
|
\DeclareUnicodeCharacter{0384}{\ensuremath{\acute{\ }}} |
|
|
|
% Greek letters lower case |
|
\DeclareUnicodeCharacter{03B1}{\ensuremath\alpha} |
|
\DeclareUnicodeCharacter{03B2}{\ensuremath\beta} |
|
\DeclareUnicodeCharacter{03B3}{\ensuremath\gamma} |
|
\DeclareUnicodeCharacter{03B4}{\ensuremath\delta} |
|
\DeclareUnicodeCharacter{03B5}{\ensuremath\epsilon} |
|
\DeclareUnicodeCharacter{03B6}{\ensuremath\zeta} |
|
\DeclareUnicodeCharacter{03B7}{\ensuremath\eta} |
|
\DeclareUnicodeCharacter{03B8}{\ensuremath\theta} |
|
\DeclareUnicodeCharacter{03B9}{\ensuremath\iota} |
|
\DeclareUnicodeCharacter{03BA}{\ensuremath\kappa} |
|
\DeclareUnicodeCharacter{03BB}{\ensuremath\lambda} |
|
\DeclareUnicodeCharacter{03BC}{\ensuremath\mu} |
|
\DeclareUnicodeCharacter{03BD}{\ensuremath\nu} |
|
\DeclareUnicodeCharacter{03BE}{\ensuremath\xi} |
|
\DeclareUnicodeCharacter{03BF}{{\it o}} % omicron |
|
\DeclareUnicodeCharacter{03C0}{\ensuremath\pi} |
|
\DeclareUnicodeCharacter{03C1}{\ensuremath\rho} |
|
\DeclareUnicodeCharacter{03C2}{\ensuremath\varsigma} |
|
\DeclareUnicodeCharacter{03C3}{\ensuremath\sigma} |
|
\DeclareUnicodeCharacter{03C4}{\ensuremath\tau} |
|
\DeclareUnicodeCharacter{03C5}{\ensuremath\upsilon} |
|
\DeclareUnicodeCharacter{03C6}{\ensuremath\phi} |
|
\DeclareUnicodeCharacter{03C7}{\ensuremath\chi} |
|
\DeclareUnicodeCharacter{03C8}{\ensuremath\psi} |
|
\DeclareUnicodeCharacter{03C9}{\ensuremath\omega} |
|
|
|
% More Greek vowels with accents |
|
\DeclareUnicodeCharacter{03CA}{\ensuremath{\ddot\iota}} |
|
\DeclareUnicodeCharacter{03CB}{\ensuremath{\ddot\upsilon}} |
|
\DeclareUnicodeCharacter{03CC}{\ensuremath{\acute o}} |
|
\DeclareUnicodeCharacter{03CD}{\ensuremath{\acute\upsilon}} |
|
\DeclareUnicodeCharacter{03CE}{\ensuremath{\acute\omega}} |
|
|
|
% Variant Greek letters |
|
\DeclareUnicodeCharacter{03D1}{\ensuremath\vartheta} |
|
\DeclareUnicodeCharacter{03D6}{\ensuremath\varpi} |
|
\DeclareUnicodeCharacter{03F1}{\ensuremath\varrho} |
|
|
\DeclareUnicodeCharacter{1E02}{\dotaccent{B}} |
\DeclareUnicodeCharacter{1E02}{\dotaccent{B}} |
\DeclareUnicodeCharacter{1E03}{\dotaccent{b}} |
\DeclareUnicodeCharacter{1E03}{\dotaccent{b}} |
\DeclareUnicodeCharacter{1E04}{\udotaccent{B}} |
\DeclareUnicodeCharacter{1E04}{\udotaccent{B}} |
Line 9683 directory should work if nowhere else does.}
|
Line 10359 directory should work if nowhere else does.}
|
\DeclareUnicodeCharacter{1EF8}{\~Y} |
\DeclareUnicodeCharacter{1EF8}{\~Y} |
\DeclareUnicodeCharacter{1EF9}{\~y} |
\DeclareUnicodeCharacter{1EF9}{\~y} |
|
|
|
% Punctuation |
\DeclareUnicodeCharacter{2013}{--} |
\DeclareUnicodeCharacter{2013}{--} |
\DeclareUnicodeCharacter{2014}{---} |
\DeclareUnicodeCharacter{2014}{---} |
\DeclareUnicodeCharacter{2018}{\quoteleft} |
\DeclareUnicodeCharacter{2018}{\quoteleft} |
Line 9691 directory should work if nowhere else does.}
|
Line 10368 directory should work if nowhere else does.}
|
\DeclareUnicodeCharacter{201C}{\quotedblleft} |
\DeclareUnicodeCharacter{201C}{\quotedblleft} |
\DeclareUnicodeCharacter{201D}{\quotedblright} |
\DeclareUnicodeCharacter{201D}{\quotedblright} |
\DeclareUnicodeCharacter{201E}{\quotedblbase} |
\DeclareUnicodeCharacter{201E}{\quotedblbase} |
|
\DeclareUnicodeCharacter{2020}{\ensuremath\dagger} |
|
\DeclareUnicodeCharacter{2021}{\ensuremath\ddagger} |
\DeclareUnicodeCharacter{2022}{\bullet} |
\DeclareUnicodeCharacter{2022}{\bullet} |
|
\DeclareUnicodeCharacter{202F}{\thinspace} |
\DeclareUnicodeCharacter{2026}{\dots} |
\DeclareUnicodeCharacter{2026}{\dots} |
\DeclareUnicodeCharacter{2039}{\guilsinglleft} |
\DeclareUnicodeCharacter{2039}{\guilsinglleft} |
\DeclareUnicodeCharacter{203A}{\guilsinglright} |
\DeclareUnicodeCharacter{203A}{\guilsinglright} |
|
|
\DeclareUnicodeCharacter{20AC}{\euro} |
\DeclareUnicodeCharacter{20AC}{\euro} |
|
|
\DeclareUnicodeCharacter{2192}{\expansion} |
\DeclareUnicodeCharacter{2192}{\expansion} |
\DeclareUnicodeCharacter{21D2}{\result} |
\DeclareUnicodeCharacter{21D2}{\result} |
|
|
|
% Mathematical symbols |
|
\DeclareUnicodeCharacter{2200}{\ensuremath\forall} |
|
\DeclareUnicodeCharacter{2203}{\ensuremath\exists} |
|
\DeclareUnicodeCharacter{2208}{\ensuremath\in} |
\DeclareUnicodeCharacter{2212}{\minus} |
\DeclareUnicodeCharacter{2212}{\minus} |
\DeclareUnicodeCharacter{2217}{\point} | \DeclareUnicodeCharacter{2217}{\ast} |
| \DeclareUnicodeCharacter{221E}{\ensuremath\infty} |
| \DeclareUnicodeCharacter{2225}{\ensuremath\parallel} |
| \DeclareUnicodeCharacter{2227}{\ensuremath\wedge} |
| \DeclareUnicodeCharacter{2229}{\ensuremath\cap} |
\DeclareUnicodeCharacter{2261}{\equiv} |
\DeclareUnicodeCharacter{2261}{\equiv} |
}% end of \utfeightchardefs | \DeclareUnicodeCharacter{2264}{\ensuremath\leq} |
| \DeclareUnicodeCharacter{2265}{\ensuremath\geq} |
| \DeclareUnicodeCharacter{2282}{\ensuremath\subset} |
| \DeclareUnicodeCharacter{2287}{\ensuremath\supseteq} |
|
|
|
\DeclareUnicodeCharacter{2016}{\ensuremath\Vert} |
|
\DeclareUnicodeCharacter{2032}{\ensuremath\prime} |
|
\DeclareUnicodeCharacter{210F}{\ensuremath\hbar} |
|
\DeclareUnicodeCharacter{2111}{\ensuremath\Im} |
|
\DeclareUnicodeCharacter{2113}{\ensuremath\ell} |
|
\DeclareUnicodeCharacter{2118}{\ensuremath\wp} |
|
\DeclareUnicodeCharacter{211C}{\ensuremath\Re} |
|
\DeclareUnicodeCharacter{2127}{\ensuremath\mho} |
|
\DeclareUnicodeCharacter{2135}{\ensuremath\aleph} |
|
\DeclareUnicodeCharacter{2190}{\ensuremath\leftarrow} |
|
\DeclareUnicodeCharacter{2191}{\ensuremath\uparrow} |
|
\DeclareUnicodeCharacter{2193}{\ensuremath\downarrow} |
|
\DeclareUnicodeCharacter{2194}{\ensuremath\leftrightarrow} |
|
\DeclareUnicodeCharacter{2195}{\ensuremath\updownarrow} |
|
\DeclareUnicodeCharacter{2196}{\ensuremath\nwarrow} |
|
\DeclareUnicodeCharacter{2197}{\ensuremath\nearrow} |
|
\DeclareUnicodeCharacter{2198}{\ensuremath\searrow} |
|
\DeclareUnicodeCharacter{2199}{\ensuremath\swarrow} |
|
\DeclareUnicodeCharacter{21A6}{\ensuremath\mapsto} |
|
\DeclareUnicodeCharacter{21A9}{\ensuremath\hookleftarrow} |
|
\DeclareUnicodeCharacter{21AA}{\ensuremath\hookrightarrow} |
|
\DeclareUnicodeCharacter{21BC}{\ensuremath\leftharpoonup} |
|
\DeclareUnicodeCharacter{21BD}{\ensuremath\leftharpoondown} |
|
\DeclareUnicodeCharacter{21BE}{\ensuremath\upharpoonright} |
|
\DeclareUnicodeCharacter{21C0}{\ensuremath\rightharpoonup} |
|
\DeclareUnicodeCharacter{21C1}{\ensuremath\rightharpoondown} |
|
\DeclareUnicodeCharacter{21CC}{\ensuremath\rightleftharpoons} |
|
\DeclareUnicodeCharacter{21D0}{\ensuremath\Leftarrow} |
|
\DeclareUnicodeCharacter{21D1}{\ensuremath\Uparrow} |
|
\DeclareUnicodeCharacter{21D3}{\ensuremath\Downarrow} |
|
\DeclareUnicodeCharacter{21D4}{\ensuremath\Leftrightarrow} |
|
\DeclareUnicodeCharacter{21D5}{\ensuremath\Updownarrow} |
|
\DeclareUnicodeCharacter{21DD}{\ensuremath\leadsto} |
|
\DeclareUnicodeCharacter{2201}{\ensuremath\complement} |
|
\DeclareUnicodeCharacter{2202}{\ensuremath\partial} |
|
\DeclareUnicodeCharacter{2205}{\ensuremath\emptyset} |
|
\DeclareUnicodeCharacter{2207}{\ensuremath\nabla} |
|
\DeclareUnicodeCharacter{2209}{\ensuremath\notin} |
|
\DeclareUnicodeCharacter{220B}{\ensuremath\owns} |
|
\DeclareUnicodeCharacter{220F}{\ensuremath\prod} |
|
\DeclareUnicodeCharacter{2210}{\ensuremath\coprod} |
|
\DeclareUnicodeCharacter{2211}{\ensuremath\sum} |
|
\DeclareUnicodeCharacter{2213}{\ensuremath\mp} |
|
\DeclareUnicodeCharacter{2218}{\ensuremath\circ} |
|
\DeclareUnicodeCharacter{221A}{\ensuremath\surd} |
|
\DeclareUnicodeCharacter{221D}{\ensuremath\propto} |
|
\DeclareUnicodeCharacter{2220}{\ensuremath\angle} |
|
\DeclareUnicodeCharacter{2223}{\ensuremath\mid} |
|
\DeclareUnicodeCharacter{2228}{\ensuremath\vee} |
|
\DeclareUnicodeCharacter{222A}{\ensuremath\cup} |
|
\DeclareUnicodeCharacter{222B}{\ensuremath\smallint} |
|
\DeclareUnicodeCharacter{222E}{\ensuremath\oint} |
|
\DeclareUnicodeCharacter{223C}{\ensuremath\sim} |
|
\DeclareUnicodeCharacter{2240}{\ensuremath\wr} |
|
\DeclareUnicodeCharacter{2243}{\ensuremath\simeq} |
|
\DeclareUnicodeCharacter{2245}{\ensuremath\cong} |
|
\DeclareUnicodeCharacter{2248}{\ensuremath\approx} |
|
\DeclareUnicodeCharacter{224D}{\ensuremath\asymp} |
|
\DeclareUnicodeCharacter{2250}{\ensuremath\doteq} |
|
\DeclareUnicodeCharacter{2260}{\ensuremath\neq} |
|
\DeclareUnicodeCharacter{226A}{\ensuremath\ll} |
|
\DeclareUnicodeCharacter{226B}{\ensuremath\gg} |
|
\DeclareUnicodeCharacter{227A}{\ensuremath\prec} |
|
\DeclareUnicodeCharacter{227B}{\ensuremath\succ} |
|
\DeclareUnicodeCharacter{2283}{\ensuremath\supset} |
|
\DeclareUnicodeCharacter{2286}{\ensuremath\subseteq} |
|
\DeclareUnicodeCharacter{228E}{\ensuremath\uplus} |
|
\DeclareUnicodeCharacter{228F}{\ensuremath\sqsubset} |
|
\DeclareUnicodeCharacter{2290}{\ensuremath\sqsupset} |
|
\DeclareUnicodeCharacter{2291}{\ensuremath\sqsubseteq} |
|
\DeclareUnicodeCharacter{2292}{\ensuremath\sqsupseteq} |
|
\DeclareUnicodeCharacter{2293}{\ensuremath\sqcap} |
|
\DeclareUnicodeCharacter{2294}{\ensuremath\sqcup} |
|
\DeclareUnicodeCharacter{2295}{\ensuremath\oplus} |
|
\DeclareUnicodeCharacter{2296}{\ensuremath\ominus} |
|
\DeclareUnicodeCharacter{2297}{\ensuremath\otimes} |
|
\DeclareUnicodeCharacter{2298}{\ensuremath\oslash} |
|
\DeclareUnicodeCharacter{2299}{\ensuremath\odot} |
|
\DeclareUnicodeCharacter{22A2}{\ensuremath\vdash} |
|
\DeclareUnicodeCharacter{22A3}{\ensuremath\dashv} |
|
\DeclareUnicodeCharacter{22A4}{\ensuremath\ptextop} |
|
\DeclareUnicodeCharacter{22A5}{\ensuremath\bot} |
|
\DeclareUnicodeCharacter{22A8}{\ensuremath\models} |
|
\DeclareUnicodeCharacter{22B4}{\ensuremath\unlhd} |
|
\DeclareUnicodeCharacter{22B5}{\ensuremath\unrhd} |
|
\DeclareUnicodeCharacter{22C0}{\ensuremath\bigwedge} |
|
\DeclareUnicodeCharacter{22C1}{\ensuremath\bigvee} |
|
\DeclareUnicodeCharacter{22C2}{\ensuremath\bigcap} |
|
\DeclareUnicodeCharacter{22C3}{\ensuremath\bigcup} |
|
\DeclareUnicodeCharacter{22C4}{\ensuremath\diamond} |
|
\DeclareUnicodeCharacter{22C5}{\ensuremath\cdot} |
|
\DeclareUnicodeCharacter{22C6}{\ensuremath\star} |
|
\DeclareUnicodeCharacter{22C8}{\ensuremath\bowtie} |
|
\DeclareUnicodeCharacter{2308}{\ensuremath\lceil} |
|
\DeclareUnicodeCharacter{2309}{\ensuremath\rceil} |
|
\DeclareUnicodeCharacter{230A}{\ensuremath\lfloor} |
|
\DeclareUnicodeCharacter{230B}{\ensuremath\rfloor} |
|
\DeclareUnicodeCharacter{2322}{\ensuremath\frown} |
|
\DeclareUnicodeCharacter{2323}{\ensuremath\smile} |
|
|
|
\DeclareUnicodeCharacter{25A1}{\ensuremath\Box} |
|
\DeclareUnicodeCharacter{25B3}{\ensuremath\triangle} |
|
\DeclareUnicodeCharacter{25B7}{\ensuremath\triangleright} |
|
\DeclareUnicodeCharacter{25BD}{\ensuremath\bigtriangledown} |
|
\DeclareUnicodeCharacter{25C1}{\ensuremath\triangleleft} |
|
\DeclareUnicodeCharacter{25C7}{\ensuremath\Diamond} |
|
\DeclareUnicodeCharacter{2660}{\ensuremath\spadesuit} |
|
\DeclareUnicodeCharacter{2661}{\ensuremath\heartsuit} |
|
\DeclareUnicodeCharacter{2662}{\ensuremath\diamondsuit} |
|
\DeclareUnicodeCharacter{2663}{\ensuremath\clubsuit} |
|
\DeclareUnicodeCharacter{266D}{\ensuremath\flat} |
|
\DeclareUnicodeCharacter{266E}{\ensuremath\natural} |
|
\DeclareUnicodeCharacter{266F}{\ensuremath\sharp} |
|
\DeclareUnicodeCharacter{26AA}{\ensuremath\bigcirc} |
|
\DeclareUnicodeCharacter{27B9}{\ensuremath\rangle} |
|
\DeclareUnicodeCharacter{27C2}{\ensuremath\perp} |
|
\DeclareUnicodeCharacter{27E8}{\ensuremath\langle} |
|
\DeclareUnicodeCharacter{27F5}{\ensuremath\longleftarrow} |
|
\DeclareUnicodeCharacter{27F6}{\ensuremath\longrightarrow} |
|
\DeclareUnicodeCharacter{27F7}{\ensuremath\longleftrightarrow} |
|
\DeclareUnicodeCharacter{27FC}{\ensuremath\longmapsto} |
|
\DeclareUnicodeCharacter{29F5}{\ensuremath\setminus} |
|
\DeclareUnicodeCharacter{2A00}{\ensuremath\bigodot} |
|
\DeclareUnicodeCharacter{2A01}{\ensuremath\bigoplus} |
|
\DeclareUnicodeCharacter{2A02}{\ensuremath\bigotimes} |
|
\DeclareUnicodeCharacter{2A04}{\ensuremath\biguplus} |
|
\DeclareUnicodeCharacter{2A06}{\ensuremath\bigsqcup} |
|
\DeclareUnicodeCharacter{2A1D}{\ensuremath\Join} |
|
\DeclareUnicodeCharacter{2A3F}{\ensuremath\amalg} |
|
\DeclareUnicodeCharacter{2AAF}{\ensuremath\preceq} |
|
\DeclareUnicodeCharacter{2AB0}{\ensuremath\succeq} |
|
|
|
\global\mathchardef\checkmark="1370 % actually the square root sign |
|
\DeclareUnicodeCharacter{2713}{\ensuremath\checkmark} |
|
}% end of \utfeightchardefs |
|
|
% US-ASCII character definitions. |
% US-ASCII character definitions. |
\def\asciichardefs{% nothing need be done |
\def\asciichardefs{% nothing need be done |
\relax |
\relax |
} |
} |
|
|
|
% Latin1 (ISO-8859-1) character definitions. |
|
\def\nonasciistringdefs{% |
|
\setnonasciicharscatcode\active |
|
\def\defstringchar##1{\def##1{\string##1}}% |
|
% |
|
\defstringchar^^80\defstringchar^^81\defstringchar^^82\defstringchar^^83% |
|
\defstringchar^^84\defstringchar^^85\defstringchar^^86\defstringchar^^87% |
|
\defstringchar^^88\defstringchar^^89\defstringchar^^8a\defstringchar^^8b% |
|
\defstringchar^^8c\defstringchar^^8d\defstringchar^^8e\defstringchar^^8f% |
|
% |
|
\defstringchar^^90\defstringchar^^91\defstringchar^^92\defstringchar^^93% |
|
\defstringchar^^94\defstringchar^^95\defstringchar^^96\defstringchar^^97% |
|
\defstringchar^^98\defstringchar^^99\defstringchar^^9a\defstringchar^^9b% |
|
\defstringchar^^9c\defstringchar^^9d\defstringchar^^9e\defstringchar^^9f% |
|
% |
|
\defstringchar^^a0\defstringchar^^a1\defstringchar^^a2\defstringchar^^a3% |
|
\defstringchar^^a4\defstringchar^^a5\defstringchar^^a6\defstringchar^^a7% |
|
\defstringchar^^a8\defstringchar^^a9\defstringchar^^aa\defstringchar^^ab% |
|
\defstringchar^^ac\defstringchar^^ad\defstringchar^^ae\defstringchar^^af% |
|
% |
|
\defstringchar^^b0\defstringchar^^b1\defstringchar^^b2\defstringchar^^b3% |
|
\defstringchar^^b4\defstringchar^^b5\defstringchar^^b6\defstringchar^^b7% |
|
\defstringchar^^b8\defstringchar^^b9\defstringchar^^ba\defstringchar^^bb% |
|
\defstringchar^^bc\defstringchar^^bd\defstringchar^^be\defstringchar^^bf% |
|
% |
|
\defstringchar^^c0\defstringchar^^c1\defstringchar^^c2\defstringchar^^c3% |
|
\defstringchar^^c4\defstringchar^^c5\defstringchar^^c6\defstringchar^^c7% |
|
\defstringchar^^c8\defstringchar^^c9\defstringchar^^ca\defstringchar^^cb% |
|
\defstringchar^^cc\defstringchar^^cd\defstringchar^^ce\defstringchar^^cf% |
|
% |
|
\defstringchar^^d0\defstringchar^^d1\defstringchar^^d2\defstringchar^^d3% |
|
\defstringchar^^d4\defstringchar^^d5\defstringchar^^d6\defstringchar^^d7% |
|
\defstringchar^^d8\defstringchar^^d9\defstringchar^^da\defstringchar^^db% |
|
\defstringchar^^dc\defstringchar^^dd\defstringchar^^de\defstringchar^^df% |
|
% |
|
\defstringchar^^e0\defstringchar^^e1\defstringchar^^e2\defstringchar^^e3% |
|
\defstringchar^^e4\defstringchar^^e5\defstringchar^^e6\defstringchar^^e7% |
|
\defstringchar^^e8\defstringchar^^e9\defstringchar^^ea\defstringchar^^eb% |
|
\defstringchar^^ec\defstringchar^^ed\defstringchar^^ee\defstringchar^^ef% |
|
% |
|
\defstringchar^^f0\defstringchar^^f1\defstringchar^^f2\defstringchar^^f3% |
|
\defstringchar^^f4\defstringchar^^f5\defstringchar^^f6\defstringchar^^f7% |
|
\defstringchar^^f8\defstringchar^^f9\defstringchar^^fa\defstringchar^^fb% |
|
\defstringchar^^fc\defstringchar^^fd\defstringchar^^fe\defstringchar^^ff% |
|
} |
|
|
|
|
|
% define all the unicode characters we know about, for the sake of @U. |
|
\utfeightchardefs |
|
|
|
|
% Make non-ASCII characters printable again for compatibility with |
% Make non-ASCII characters printable again for compatibility with |
% existing Texinfo documents that may use them, even without declaring a |
% existing Texinfo documents that may use them, even without declaring a |
% document encoding. |
% document encoding. |
Line 9979 directory should work if nowhere else does.}
|
Line 10857 directory should work if nowhere else does.}
|
\def\activedoublequote{{\tt\char34}} |
\def\activedoublequote{{\tt\char34}} |
\let"=\activedoublequote |
\let"=\activedoublequote |
\catcode`\~=\active \def\activetilde{{\tt\char126}} \let~ = \activetilde |
\catcode`\~=\active \def\activetilde{{\tt\char126}} \let~ = \activetilde |
\chardef\hat=`\^ | \chardef\hatchar=`\^ |
\catcode`\^=\active \def\activehat{{\tt \hat}} \let^ = \activehat | \catcode`\^=\active \def\activehat{{\tt \hatchar}} \let^ = \activehat |
|
|
\catcode`\_=\active |
\catcode`\_=\active |
\def_{\ifusingtt\normalunderscore\_} |
\def_{\ifusingtt\normalunderscore\_} |
Line 9997 directory should work if nowhere else does.}
|
Line 10875 directory should work if nowhere else does.}
|
\catcode`\>=\active \def\activegtr{{\tt \gtr}}\let> = \activegtr |
\catcode`\>=\active \def\activegtr{{\tt \gtr}}\let> = \activegtr |
\catcode`\+=\active \def+{{\tt \char 43}} |
\catcode`\+=\active \def+{{\tt \char 43}} |
\catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix |
\catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix |
|
\catcode`\-=\active \let-=\normaldash |
|
|
|
|
% used for headline/footline in the output routine, in case the page |
% used for headline/footline in the output routine, in case the page |
% breaks in the middle of an @tex block. |
% breaks in the middle of an @tex block. |
\def\texinfochars{% |
\def\texinfochars{% |
Line 10011 directory should work if nowhere else does.}
|
Line 10891 directory should work if nowhere else does.}
|
% in principle, all other definitions in \tex have to be undone too. |
% in principle, all other definitions in \tex have to be undone too. |
} |
} |
|
|
% If a .fmt file is being used, characters that might appear in a file |
|
% name cannot be active until we have parsed the command line. |
|
% So turn them off again, and have \everyjob (or @setfilename) turn them on. |
|
% \otherifyactive is called near the end of this file. |
|
\def\otherifyactive{\catcode`+=\other \catcode`\_=\other} |
|
|
|
% Used sometimes to turn off (effectively) the active characters even after |
% Used sometimes to turn off (effectively) the active characters even after |
% parsing them. |
% parsing them. |
\def\turnoffactive{% |
\def\turnoffactive{% |
Line 10035 directory should work if nowhere else does.}
|
Line 10909 directory should work if nowhere else does.}
|
% \doublebackslash is two of them (for the pdf outlines). |
% \doublebackslash is two of them (for the pdf outlines). |
{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} |
{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} |
|
|
% In texinfo, backslash is an active character; it prints the backslash | % In Texinfo, backslash is an active character; it prints the backslash |
% in fixed width font. |
% in fixed width font. |
\catcode`\\=\active % @ for escape char from now on. |
\catcode`\\=\active % @ for escape char from now on. |
|
|
% The story here is that in math mode, the \char of \backslashcurfont | % Print a typewriter backslash. For math mode, we can't simply use |
% ends up printing the roman \ from the math symbol font (because \char | % \backslashcurfont: the story here is that in math mode, the \char |
% in math mode uses the \mathcode, and plain.tex sets | % of \backslashcurfont ends up printing the roman \ from the math symbol |
% \mathcode`\\="026E). It seems better for @backslashchar{} to always | % font (because \char in math mode uses the \mathcode, and plain.tex |
% print a typewriter backslash, hence we use an explicit \mathchar, | % sets \mathcode`\\="026E). Hence we use an explicit \mathchar, |
% which is the decimal equivalent of "715c (class 7, e.g., use \fam; |
% which is the decimal equivalent of "715c (class 7, e.g., use \fam; |
% ignored family value; char position "5C). We can't use " for the |
% ignored family value; char position "5C). We can't use " for the |
% usual hex value because it has already been made active. |
% usual hex value because it has already been made active. |
@def@normalbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}} |
|
@let@backslashchar = @normalbackslash % @backslashchar{} is for user documents. |
|
|
|
% On startup, @fixbackslash assigns: | @def@ttbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}} |
% @let \ = @normalbackslash | @let@backslashchar = @ttbackslash % @backslashchar{} is for user documents. |
| |
% \rawbackslash defines an active \ to do \backslashcurfont. |
% \rawbackslash defines an active \ to do \backslashcurfont. |
% \otherbackslash defines an active \ to be a literal `\' character with |
% \otherbackslash defines an active \ to be a literal `\' character with |
% catcode other. We switch back and forth between these. |
% catcode other. We switch back and forth between these. |
Line 10059 directory should work if nowhere else does.}
|
Line 10932 directory should work if nowhere else does.}
|
@gdef@otherbackslash{@let\=@realbackslash} |
@gdef@otherbackslash{@let\=@realbackslash} |
|
|
% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of |
% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of |
% the literal character `\'. Also revert - to its normal character, in | % the literal character `\'. |
% case the active - from code has slipped in. | |
% |
% |
{@catcode`- = @active |
{@catcode`- = @active |
@gdef@normalturnoffactive{% |
@gdef@normalturnoffactive{% |
|
@nonasciistringdefs |
@let-=@normaldash |
@let-=@normaldash |
@let"=@normaldoublequote |
@let"=@normaldoublequote |
@let$=@normaldollar %$ font-lock fix |
@let$=@normaldollar %$ font-lock fix |
@let+=@normalplus |
@let+=@normalplus |
@let<=@normalless |
@let<=@normalless |
@let>=@normalgreater |
@let>=@normalgreater |
@let\=@normalbackslash |
|
@let^=@normalcaret |
@let^=@normalcaret |
@let_=@normalunderscore |
@let_=@normalunderscore |
@let|=@normalverticalbar |
@let|=@normalverticalbar |
@let~=@normaltilde |
@let~=@normaltilde |
|
@let\=@ttbackslash |
@markupsetuplqdefault |
@markupsetuplqdefault |
@markupsetuprqdefault |
@markupsetuprqdefault |
@unsepspaces |
@unsepspaces |
} |
} |
} |
} |
|
|
% Make _ and + \other characters, temporarily. | % If a .fmt file is being used, characters that might appear in a file |
% This is canceled by @fixbackslash. | % name cannot be active until we have parsed the command line. |
@otherifyactive | % So turn them off again, and have @fixbackslash turn them back on. |
| @catcode`+=@other @catcode`@_=@other |
|
|
|
% \enablebackslashhack - allow file to begin `\input texinfo' |
|
% |
% If a .fmt file is being used, we don't want the `\input texinfo' to show up. |
% If a .fmt file is being used, we don't want the `\input texinfo' to show up. |
% That is what \eatinput is for; after that, the `\' should revert to printing |
% That is what \eatinput is for; after that, the `\' should revert to printing |
% a backslash. |
% a backslash. |
% | % If the file did not have a `\input texinfo', then it is turned off after |
@gdef@eatinput input texinfo{@fixbackslash} | % the first line; otherwise the first `\' in the file would cause an error. |
@global@let\ = @eatinput | % This is used on the very last line of this file, texinfo.tex. |
| % We also use @c to call @fixbackslash, in case ends of lines are hidden. |
| { |
| @catcode`@^=7 |
| @catcode`@^^M=13@gdef@enablebackslashhack{% |
| @global@let\ = @eatinput% |
| @catcode`@^^M=13% |
| @def@c{@fixbackslash@c}% |
| @def ^^M{@let^^M@secondlinenl}% |
| @gdef @secondlinenl{@let^^M@thirdlinenl}% |
| @gdef @thirdlinenl{@fixbackslash}% |
| }} |
|
|
% On the other hand, perhaps the file did not have a `\input texinfo'. Then | {@catcode`@^=7 @catcode`@^^M=13% |
% the first `\' in the file would cause an error. This macro tries to fix | @gdef@eatinput input texinfo#1^^M{@fixbackslash}} |
% that, assuming it is called before the first `\' could plausibly occur. | |
% Also turn back on active characters that might appear in the input | |
% file name, in case not using a pre-dumped format. | |
% | |
@gdef@fixbackslash{% |
@gdef@fixbackslash{% |
@ifx\@eatinput @let\ = @normalbackslash @fi | @ifx\@eatinput @let\ = @ttbackslash @fi |
| @catcode13=5 % regular end of line |
| @let@c=@texinfoc |
| % Also turn back on active characters that might appear in the input |
| % file name, in case not using a pre-dumped format. |
@catcode`+=@active |
@catcode`+=@active |
@catcode`@_=@active |
@catcode`@_=@active |
|
% |
|
% If texinfo.cnf is present on the system, read it. |
|
% Useful for site-wide @afourpaper, etc. This macro, @fixbackslash, gets |
|
% called at the beginning of every Texinfo file. Not opening texinfo.cnf |
|
% directly in this file, texinfo.tex, makes it possible to make a format |
|
% file for Texinfo. |
|
% |
|
@openin 1 texinfo.cnf |
|
@ifeof 1 @else @input texinfo.cnf @fi |
|
@closein 1 |
} |
} |
|
|
|
|
% Say @foo, not \foo, in error messages. |
% Say @foo, not \foo, in error messages. |
@escapechar = `@@ |
@escapechar = `@@ |
|
|
Line 10132 directory should work if nowhere else does.}
|
Line 11031 directory should work if nowhere else does.}
|
|
|
@c Local variables: |
@c Local variables: |
@c eval: (add-hook 'write-file-hooks 'time-stamp) |
@c eval: (add-hook 'write-file-hooks 'time-stamp) |
@c page-delimiter: "^\\\\message" | @c page-delimiter: "^\\\\message\\|emacs-page" |
@c time-stamp-start: "def\\\\texinfoversion{" |
@c time-stamp-start: "def\\\\texinfoversion{" |
@c time-stamp-format: "%:y-%02m-%02d.%02H" |
@c time-stamp-format: "%:y-%02m-%02d.%02H" |
@c time-stamp-end: "}" |
@c time-stamp-end: "}" |
Line 10143 directory should work if nowhere else does.}
|
Line 11042 directory should work if nowhere else does.}
|
@ignore |
@ignore |
arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 |
arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 |
@end ignore |
@end ignore |
|
@enablebackslashhack |