?? texinfo.tex
字號:
% texinfo.tex -- TeX macros to handle Texinfo files.%% Load plain if necessary, i.e., if running under initex.\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi%\def\texinfoversion{2009-01-18.17}%% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,% 2007, 2008, 2009 Free Software Foundation, Inc.%% This texinfo.tex file is free software: you can redistribute it and/or% modify it under the terms of the GNU General Public License as% published by the Free Software Foundation, either version 3 of the% License, or (at your option) any later version.%% This texinfo.tex file is distributed in the hope that it will be% useful, but WITHOUT ANY WARRANTY; without even the implied warranty% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU% General Public License for more details.%% You should have received a copy of the GNU General Public License% along with this program. If not, see <http://www.gnu.org/licenses/>.%% As a special exception, when this file is read by TeX when processing% a Texinfo source document, you may use the result without% restriction. (This has been our intent since Texinfo was invented.)%% Please try the latest version of texinfo.tex before submitting bug% reports; you can get the latest version from:% http://www.gnu.org/software/texinfo/ (the Texinfo home page), or% ftp://tug.org/tex/texinfo.tex% (and all CTAN mirrors, see http://www.ctan.org).% The texinfo.tex in any given distribution could well be out% of date, so if that's what you're using, please check.%% Send bug reports to bug-texinfo@gnu.org. Please include including a% complete document in each bug report with which we can reproduce the% problem. Patches are, of course, greatly appreciated.%% To process a Texinfo manual with TeX, it's most reliable to use the% texi2dvi shell script that comes with the distribution. For a simple% manual foo.texi, however, you can get away with this:% tex foo.texi% texindex foo.??% tex foo.texi% tex foo.texi% dvips foo.dvi -o # or whatever; this makes foo.ps.% The extra TeX runs get the cross-reference information correct.% Sometimes one run after texindex suffices, and sometimes you need more% than two; texi2dvi does it as many times as necessary.%% It is possible to adapt texinfo.tex for other languages, to some% extent. You can get the existing language-specific files from the% full Texinfo distribution.%% The GNU Texinfo home page is http://www.gnu.org/software/texinfo.\message{Loading texinfo [version \texinfoversion]:}% If in a .fmt file, print the version number% and turn on active characters that we couldn't do earlier because% they might have appeared in the input file name.\everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active}\chardef\other=12% We never want plain's \outer definition of \+ in Texinfo.% For @tex, we can use \tabalign.\let\+ = \relax% Save some plain tex macros whose names we will redefine.\let\ptexb=\b\let\ptexbullet=\bullet\let\ptexc=\c\let\ptexcomma=\,\let\ptexdot=\.\let\ptexdots=\dots\let\ptexend=\end\let\ptexequiv=\equiv\let\ptexexclam=\!\let\ptexfootnote=\footnote\let\ptexgtr=>\let\ptexhat=^\let\ptexi=\i\let\ptexindent=\indent\let\ptexinsert=\insert\let\ptexlbrace=\{\let\ptexless=<\let\ptexnewwrite\newwrite\let\ptexnoindent=\noindent\let\ptexplus=+\let\ptexrbrace=\}\let\ptexslash=\/\let\ptexstar=\*\let\ptext=\t\let\ptextop=\top{\catcode`\'=\active\global\let\ptexquoteright'}% Math-mode def from plain.tex.\let\ptexraggedright=\raggedright% If this character appears in an error message or help string, it% starts a new line in the output.\newlinechar = `^^J% Use TeX 3.0's \inputlineno to get the line number, for better error% messages, but if we're using an old version of TeX, don't do anything.%\ifx\inputlineno\thisisundefined \let\linenumber = \empty % Pre-3.0.\else \def\linenumber{l.\the\inputlineno:\space}\fi% Set up fixed words for English if not already set.\ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi\ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi\ifx\putwordfile\undefined \gdef\putwordfile{file}\fi\ifx\putwordin\undefined \gdef\putwordin{in}\fi\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi\ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi\ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi\ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi\ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi\ifx\putwordof\undefined \gdef\putwordof{of}\fi\ifx\putwordon\undefined \gdef\putwordon{on}\fi\ifx\putwordpage\undefined \gdef\putwordpage{page}\fi\ifx\putwordsection\undefined \gdef\putwordsection{section}\fi\ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi\ifx\putwordsee\undefined \gdef\putwordsee{see}\fi\ifx\putwordSee\undefined \gdef\putwordSee{See}\fi\ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi\ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi%\ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi\ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi\ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi\ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi\ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi\ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi\ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi\ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi\ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi\ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi\ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi\ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi%\ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi\ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi\ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi\ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi\ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi% Since the category of space is not known, we have to be careful.\chardef\spacecat = 10\def\spaceisspace{\catcode`\ =\spacecat}% sometimes characters are active, so we need control sequences.\chardef\colonChar = `\:\chardef\commaChar = `\,\chardef\dashChar = `\-\chardef\dotChar = `\.\chardef\exclamChar= `\!\chardef\lquoteChar= `\`\chardef\questChar = `\?\chardef\rquoteChar= `\'\chardef\semiChar = `\;\chardef\underChar = `\_% Ignore a token.%\def\gobble#1{}% The following is used inside several \edef's.\def\makecsname#1{\expandafter\noexpand\csname#1\endcsname}% Hyphenation fixes.\hyphenation{ Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script ap-pen-dix bit-map bit-maps data-base data-bases eshell fall-ing half-way long-est man-u-script man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces spell-ing spell-ings stand-alone strong-est time-stamp time-stamps which-ever white-space 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}% @| inserts a changebar to the left of the current line. It should% surround any changed text. This approach does *not* work if the% change spans more than two lines of output. To handle that, we would% have adopt a much more difficult approach (putting marks into the main% vertical list for the beginning and end of each change).%\def\|{% % \vadjust can only be used in horizontal mode. \leavevmode % % Append this vertical mode material after the current line in the output. \vadjust{% % We want to insert a rule with the height and depth of the current % leading; that is exactly what \strutbox is supposed to record. \vskip-\baselineskip % % \vadjust-items are inserted at the left edge of the type. So % the \llap here moves out into the left-hand margin. \llap{% % % For a thicker or thinner bar, change the `1pt'. \vrule height\baselineskip width1pt % % This is the space between the bar and the text. \hskip 12pt }% }%}% Sometimes it is convenient to have everything in the transcript file% and nothing on the terminal. We don't just call \tracingall here,% since that produces some useless output on the terminal. We also make% some effort to order the tracing commands to reduce output in the log% file; cf. trace.sty in LaTeX.%\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%\def\loggingall{% \tracingstats2 \tracingpages1 \tracinglostchars2 % 2 gives us more in etex \tracingparagraphs1 \tracingoutput1 \tracingmacros2 \tracingrestores1 \showboxbreadth\maxdimen \showboxdepth\maxdimen \ifx\eTeXversion\undefined\else % etex gives us more logging \tracingscantokens1 \tracingifs1 \tracinggroups1 \tracingnesting2 \tracingassigns1 \fi \tracingcommands3 % 3 gives us more in etex \errorcontextlines16}%% add check for \lastpenalty to plain's definitions. If the last thing% we did was a \nobreak, we don't want to insert more space.%\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount \removelastskip\penalty-50\smallskip\fi\fi}\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount \removelastskip\penalty-100\medskip\fi\fi}\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount \removelastskip\penalty-200\bigskip\fi\fi}% For @cropmarks command.% Do @cropmarks to get crop marks.%\newif\ifcropmarks\let\cropmarks = \cropmarkstrue%% Dimensions to add cropmarks at corners.% Added by P. A. MacKay, 12 Nov. 1986%\newdimen\outerhsize \newdimen\outervsize % set by the paper size routines\newdimen\cornerlong \cornerlong=1pc\newdimen\cornerthick \cornerthick=.3pt\newdimen\topandbottommargin \topandbottommargin=.75in% Output a mark which sets \thischapter, \thissection and \thiscolor.% We dump everything together because we only have one kind of mark.% This works because we only use \botmark / \topmark, not \firstmark.%% A mark contains a subexpression of the \ifcase ... \fi construct.% \get*marks macros below extract the needed part using \ifcase.%% Another complication is to let the user choose whether \thischapter% (\thissection) refers to the chapter (section) in effect at the top% of a page, or that at the bottom of a page. The solution is% described on page 260 of The TeXbook. It involves outputting two% marks for the sectioning macros, one before the section break, and% one after. I won't pretend I can describe this better than DEK...\def\domark{% \toks0=\expandafter{\lastchapterdefs}% \toks2=\expandafter{\lastsectiondefs}% \toks4=\expandafter{\prevchapterdefs}% \toks6=\expandafter{\prevsectiondefs}% \toks8=\expandafter{\lastcolordefs}% \mark{% \the\toks0 \the\toks2 \noexpand\or \the\toks4 \the\toks6 \noexpand\else \the\toks8 }%}% \topmark doesn't work for the very first chapter (after the title% 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.,% @setcolor (or @url, or @link, etc.) between @contents and the very% first @chapter.\def\gettopheadingmarks{% \ifcase0\topmark\fi \ifx\thischapter\empty \ifcase0\firstmark\fi \fi}\def\getbottomheadingmarks{\ifcase1\botmark\fi}\def\getcolormarks{\ifcase2\topmark\fi}% Avoid "undefined control sequence" errors.\def\lastchapterdefs{}\def\lastsectiondefs{}\def\prevchapterdefs{}\def\prevsectiondefs{}\def\lastcolordefs{}% Main output routine.\chardef\PAGE = 255\output = {\onepageout{\pagecontents\PAGE}}\newbox\headlinebox\newbox\footlinebox% \onepageout takes a vbox as an argument. Note that \pagecontents% does insertions, but you have to call it yourself.\def\onepageout#1{% \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi % \ifodd\pageno \advance\hoffset by \bindingoffset \else \advance\hoffset by -\bindingoffset\fi % % Do this outside of the \shipout so @code etc. will be expanded in % the headline as they should be, not taken literally (outputting ''code). \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% % {% % Have to do this stuff outside the \shipout because we want it to % take effect in \write's, yet the group defined by the \vbox ends % before the \shipout runs. % \indexdummies % don't expand commands in the output. \normalturnoffactive % \ in index entries must not stay \, e.g., if % the page break happens to be in the middle of an example. % We don't want .vr (or whatever) entries like this: % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} % "\acronym" won't work when it's read back in; % it needs to be % {\code {{\tt \backslashcurfont }acronym} \shipout\vbox{% % Do this early so pdf references go to the beginning of the page. \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi % \ifcropmarks \vbox to \outervsize\bgroup \hsize = \outerhsize \vskip-\topandbottommargin \vtop to0pt{% \line{\ewtop\hfil\ewtop}% \nointerlineskip \line{% \vbox{\moveleft\cornerthick\nstop}% \hfill \vbox{\moveright\cornerthick\nstop}% }% \vss}% \vskip\topandbottommargin \line\bgroup \hfil % center the page within the outer (page) hsize. \ifodd\pageno\hskip\bindingoffset\fi \vbox\bgroup \fi % \unvbox\headlinebox \pagebody{#1}% \ifdim\ht\footlinebox > 0pt % Only leave this space if the footline is nonempty. % (We lessened \vsize for it in \oddfootingyyy.) % The \baselineskip=24pt in plain's \makefootline has no effect. \vskip 24pt \unvbox\footlinebox \fi % \ifcropmarks \egroup % end of \vbox\bgroup \hfil\egroup % end of (centering) \line\bgroup \vskip\topandbottommargin plus1fill minus1fill \boxmaxdepth = \cornerthick \vbox to0pt{\vss \line{% \vbox{\moveleft\cornerthick\nsbot}% \hfill \vbox{\moveright\cornerthick\nsbot}% }% \nointerlineskip \line{\ewbot\hfil\ewbot}% }% \egroup % \vbox from first cropmarks clause \fi }% end of \shipout\vbox }% end of group with \indexdummies \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi}\newinsert\margin \dimen\margin=\maxdimen\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}{\catcode`\@ =11\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi% marginal hacks, juha@viisa.uucp (Juha Takala)\ifvoid\margin\else % marginal info is present
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -