📄 texinfo.tex
字号:
% command is, e.g., @kindex, the whatsit would get put into the % horizontal list on a line by itself, resulting in extra blank space. \ifdim \wd0>\itemmax % % Make this a paragraph so we get the \parskip glue and wrapping, % but leave it ragged-right. \begingroup \advance\leftskip by-\tableindent \advance\hsize by\tableindent \advance\rightskip by0pt plus1fil \leavevmode\unhbox0\par \endgroup % % We're going to be starting a paragraph, but we don't want the % \parskip glue -- logically it's part of the @item we just started. \nobreak \vskip-\parskip % % Stop a page break at the \parskip glue coming up. Unfortunately % we can't prevent a possible page break at the following % \baselineskip glue. \nobreak \endgroup \itemxneedsnegativevskipfalse \else % The item text fits into the space. Start a paragraph, so that the % following text (if any) will end up on the same line. Since that % text will be indented by \tableindent, we make the item text be in % a zero-width box. \noindent \rlap{\hskip -\tableindent\box0}\ignorespaces% \endgroup% \itemxneedsnegativevskiptrue% \fi}\def\item{\errmessage{@item while not in a table}}\def\itemx{\errmessage{@itemx while not in a table}}\def\kitem{\errmessage{@kitem while not in a table}}\def\kitemx{\errmessage{@kitemx while not in a table}}\def\xitem{\errmessage{@xitem while not in a table}}\def\xitemx{\errmessage{@xitemx while not in a table}}%% Contains a kludge to get @end[description] to work\def\description{\tablez{\dontindex}{1}{}{}{}{}}\def\table{\begingroup\inENV\obeylines\obeyspaces\tablex}{\obeylines\obeyspaces%\gdef\tablex #1^^M{%\tabley\dontindex#1 \endtabley}}\def\ftable{\begingroup\inENV\obeylines\obeyspaces\ftablex}{\obeylines\obeyspaces%\gdef\ftablex #1^^M{%\tabley\fnitemindex#1 \endtabley\def\Eftable{\endgraf\afterenvbreak\endgroup}%\let\Etable=\relax}}\def\vtable{\begingroup\inENV\obeylines\obeyspaces\vtablex}{\obeylines\obeyspaces%\gdef\vtablex #1^^M{%\tabley\vritemindex#1 \endtabley\def\Evtable{\endgraf\afterenvbreak\endgroup}%\let\Etable=\relax}}\def\dontindex #1{}\def\fnitemindex #1{\doind {fn}{\code{#1}}}%\def\vritemindex #1{\doind {vr}{\code{#1}}}%{\obeyspaces %\gdef\tabley#1#2 #3 #4 #5 #6 #7\endtabley{\endgroup%\tablez{#1}{#2}{#3}{#4}{#5}{#6}}}\def\tablez #1#2#3#4#5#6{%\aboveenvbreak %\begingroup %\def\Edescription{\Etable}% Necessary kludge.\let\itemindex=#1%\ifnum 0#3>0 \advance \leftskip by #3\mil \fi %\ifnum 0#4>0 \tableindent=#4\mil \fi %\ifnum 0#5>0 \advance \rightskip by #5\mil \fi %\def\itemfont{#2}%\itemmax=\tableindent %\advance \itemmax by -\itemmargin %\advance \leftskip by \tableindent %\exdentamount=\tableindent\parindent = 0pt\parskip = \smallskipamount\ifdim \parskip=0pt \parskip=2pt \fi%\def\Etable{\endgraf\afterenvbreak\endgroup}%\let\item = \internalBitem %\let\itemx = \internalBitemx %\let\kitem = \internalBkitem %\let\kitemx = \internalBkitemx %\let\xitem = \internalBxitem %\let\xitemx = \internalBxitemx %}% This is the counter used by @enumerate, which is really @itemize\newcount \itemno\def\itemize{\parsearg\itemizezzz}\def\itemizezzz #1{% \begingroup % ended by the @end itemsize \itemizey {#1}{\Eitemize}}\def\itemizey #1#2{%\aboveenvbreak %\itemmax=\itemindent %\advance \itemmax by -\itemmargin %\advance \leftskip by \itemindent %\exdentamount=\itemindent\parindent = 0pt %\parskip = \smallskipamount %\ifdim \parskip=0pt \parskip=2pt \fi%\def#2{\endgraf\afterenvbreak\endgroup}%\def\itemcontents{#1}%\let\item=\itemizeitem}% Set sfcode to normal for the chars that usually have another value.% These are `.?!:;,'\def\frenchspacing{\sfcode46=1000 \sfcode63=1000 \sfcode33=1000 \sfcode58=1000 \sfcode59=1000 \sfcode44=1000 }% \splitoff TOKENS\endmark defines \first to be the first token in% TOKENS, and \rest to be the remainder.%\def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}%% Allow an optional argument of an uppercase letter, lowercase letter,% or number, to specify the first label in the enumerated list. No% argument is the same as `1'.%\def\enumerate{\parsearg\enumeratezzz}\def\enumeratezzz #1{\enumeratey #1 \endenumeratey}\def\enumeratey #1 #2\endenumeratey{% \begingroup % ended by the @end enumerate % % If we were given no argument, pretend we were given `1'. \def\thearg{#1}% \ifx\thearg\empty \def\thearg{1}\fi % % Detect if the argument is a single token. If so, it might be a % letter. Otherwise, the only valid thing it can be is a number. % (We will always have one token, because of the test we just made. % This is a good thing, since \splitoff doesn't work given nothing at % all -- the first parameter is undelimited.) \expandafter\splitoff\thearg\endmark \ifx\rest\empty % Only one token in the argument. It could still be anything. % A ``lowercase letter'' is one whose \lccode is nonzero. % An ``uppercase letter'' is one whose \lccode is both nonzero, and % not equal to itself. % Otherwise, we assume it's a number. % % We need the \relax at the end of the \ifnum lines to stop TeX from % continuing to look for a <number>. % \ifnum\lccode\expandafter`\thearg=0\relax \numericenumerate % a number (we hope) \else % It's a letter. \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax \lowercaseenumerate % lowercase letter \else \uppercaseenumerate % uppercase letter \fi \fi \else % Multiple tokens in the argument. We hope it's a number. \numericenumerate \fi}% An @enumerate whose labels are integers. The starting integer is% given in \thearg.%\def\numericenumerate{% \itemno = \thearg \startenumeration{\the\itemno}%}% The starting (lowercase) letter is in \thearg.\def\lowercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more lowercase letters in @enumerate; get a bigger alphabet}% \fi \char\lccode\itemno }%}% The starting (uppercase) letter is in \thearg.\def\uppercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more uppercase letters in @enumerate; get a bigger alphabet} \fi \char\uccode\itemno }%}% Call itemizey, adding a period to the first argument and supplying the% common last two arguments. Also subtract one from the initial value in% \itemno, since @item increments \itemno.%\def\startenumeration#1{% \advance\itemno by -1 \itemizey{#1.}\Eenumerate\flushcr}% @alphaenumerate and @capsenumerate are abbreviations for giving an arg% to @enumerate.%\def\alphaenumerate{\enumerate{a}}\def\capsenumerate{\enumerate{A}}\def\Ealphaenumerate{\Eenumerate}\def\Ecapsenumerate{\Eenumerate}% Definition of @item while inside @itemize.\def\itemizeitem{%\advance\itemno by 1{\let\par=\endgraf \smallbreak}%\ifhmode \errmessage{\in hmode at itemizeitem}\fi{\parskip=0in \hskip 0pt\hbox to 0pt{\hss \itemcontents\hskip \itemmargin}%\vadjust{\penalty 1200}}%\flushcr}% @multitable macros% Amy Hendrickson, 8/18/94, 3/6/96%% @multitable ... @end multitable will make as many columns as desired.% Contents of each column will wrap at width given in preamble. Width% can be specified either with sample text given in a template line,% or in percent of \hsize, the current width of text on page.% Table can continue over pages but will only break between lines.% To make preamble:%% Either define widths of columns in terms of percent of \hsize: % @multitable @columnfractions .25 .3 .45% @item ...%% Numbers following @columnfractions are the percent of the total% current hsize to be used for each column. You may use as many% columns as desired.% Or use a template:% @multitable {Column 1 template} {Column 2 template} {Column 3 template}% @item ...% using the widest term desired in each column.%% For those who want to use more than one line's worth of words in% the preamble, break the line within one argument and it% will parse correctly, i.e.,%% @multitable {Column 1 template} {Column 2 template} {Column 3 % template}% Not:% @multitable {Column 1 template} {Column 2 template} % {Column 3 template}% Each new table line starts with @item, each subsequent new column % starts with @tab. Empty columns may be produced by supplying @tab's% with nothing between them for as many times as empty columns are needed,% ie, @tab@tab@tab will produce two empty columns.% @item, @tab, @multicolumn or @endmulticolumn do not need to be on their% own lines, but it will not hurt if they are.% Sample multitable:% @multitable {Column 1 template} {Column 2 template} {Column 3 template}% @item first col stuff @tab second col stuff @tab third col% @item % first col stuff % @tab % second col stuff % @tab % third col % @item first col stuff @tab second col stuff % @tab Many paragraphs of text may be used in any column.% % They will wrap at the width determined by the template.% @item@tab@tab This will be in third column.% @end multitable% Default dimensions may be reset by user.% @multitableparskip is vertical space between paragraphs in table.% @multitableparindent is paragraph indent in table.% @multitablecolmargin is horizontal space to be left between columns.% @multitablelinespace is space to leave between table items, baseline% to baseline.% 0pt means it depends on current normal line spacing.%%%%% Dimensions \newskip\multitableparskip\newskip\multitableparindent\newdimen\multitablecolspace\newskip\multitablelinespace\multitableparskip=0pt\multitableparindent=6pt\multitablecolspace=12pt\multitablelinespace=0pt%%%%% Macros used to set up halign preamble:\let\endsetuptable\relax\def\xendsetuptable{\endsetuptable}\let\columnfractions\relax\def\xcolumnfractions{\columnfractions}\newif\ifsetpercent%% 2/1/96, to allow fractions to be given with more than one digit.\def\pickupwholefraction#1 {\global\advance\colcount by1 %\expandafter\xdef\csname col\the\colcount\endcsname{.#1\hsize}%\setuptable}\newcount\colcount\def\setuptable#1{\def\firstarg{#1}%\ifx\firstarg\xendsetuptable\let\go\relax%\else \ifx\firstarg\xcolumnfractions\global\setpercenttrue% \else \ifsetpercent \let\go\pickupwholefraction % In this case arg of setuptable % is the decimal point before the % number given in percent of hsize. % We don't need this so we don't use it. \else \global\advance\colcount by1 \setbox0=\hbox{#1}% \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% \fi% \fi%\ifx\go\pickupwholefraction\else\let\go\setuptable\fi%\fi\go}%%%%% multitable syntax\def\tab{&\hskip1sp\relax} % 2/2/96 % tiny skip here makes sure this column space is % maintained, even if it is never used.%%%%% @multitable ... @end multitable definitions:\def\multitable{\parsearg\dotable}\def\dotable#1{\bgroup\let\item\cr\tolerance=9500\hbadness=9500\setmultitablespacing\parskip=\multitableparskip\parindent=\multitableparindent\overfullrule=0pt\global\colcount=0\relax%\def\Emultitable{\global\setpercentfalse\global\everycr{}\cr\egroup\egroup}% % To parse everything between @multitable and @item :\setuptable#1 \endsetuptable % Need to reset this to 0 after \setuptable.\global\colcount=0\relax% % % This preamble sets up a generic column definition, which will % be used as many times as user calls for columns. % \vtop will set a single line and will also let text wrap and % continue for many paragraphs if desired.\halign\bgroup&\global\advance\colcount by 1\relax%\multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname % In order to keep entries from bumping into each other % we will add a \leftskip of \multitablecolspace to all columns after % the first one. % If a template
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -