mirror of
https://github.com/mirror/make.git
synced 2025-01-06 02:10:35 +08:00
* texinfo.tex (\anchor): New command @anchor.
(\xrefX): Avoid double space when xref to an @anchor or an @unnumbered. * texinfo.tex (\itemzzz): Use kerns and \unhbox when item text fits in the space, so footnotes can work.
This commit is contained in:
parent
6cca2382f0
commit
fefeb0f7bd
39
texinfo.tex
39
texinfo.tex
@ -1793,11 +1793,6 @@ July\or August\or September\or October\or November\or December\fi
|
|||||||
\itemindex{#1}%
|
\itemindex{#1}%
|
||||||
\nobreak % This prevents a break before @itemx.
|
\nobreak % This prevents a break before @itemx.
|
||||||
%
|
%
|
||||||
% Be sure we are not still in the middle of a paragraph.
|
|
||||||
%{\parskip = 0in
|
|
||||||
%\par
|
|
||||||
%}%
|
|
||||||
%
|
|
||||||
% If the item text does not fit in the space we have, put it on a line
|
% If the item text does not fit in the space we have, put it on a line
|
||||||
% by itself, and do not allow a page break either before or after that
|
% by itself, and do not allow a page break either before or after that
|
||||||
% line. We do not start a paragraph here because then if the next
|
% line. We do not start a paragraph here because then if the next
|
||||||
@ -1830,9 +1825,15 @@ July\or August\or September\or October\or November\or December\fi
|
|||||||
% text will be indented by \tableindent, we make the item text be in
|
% text will be indented by \tableindent, we make the item text be in
|
||||||
% a zero-width box.
|
% a zero-width box.
|
||||||
\noindent
|
\noindent
|
||||||
\rlap{\hskip -\tableindent\box0}\ignorespaces%
|
% Do this with kerns and \unhbox so that if there is a footnote in
|
||||||
\endgroup%
|
% the item text, it can migrate to the main vertical list and
|
||||||
\itemxneedsnegativevskiptrue%
|
% eventually be printed.
|
||||||
|
\nobreak\kern-\tableindent
|
||||||
|
\dimen0 = \itemmax \advance\dimen0 by -\wd0
|
||||||
|
\unhbox0
|
||||||
|
\nobreak\kern\dimen0
|
||||||
|
\endgroup
|
||||||
|
\itemxneedsnegativevskiptrue
|
||||||
\fi
|
\fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1843,9 +1844,10 @@ July\or August\or September\or October\or November\or December\fi
|
|||||||
\def\xitem{\errmessage{@xitem while not in a table}}
|
\def\xitem{\errmessage{@xitem while not in a table}}
|
||||||
\def\xitemx{\errmessage{@xitemx while not in a table}}
|
\def\xitemx{\errmessage{@xitemx while not in a table}}
|
||||||
|
|
||||||
%% Contains a kludge to get @end[description] to work
|
% Contains a kludge to get @end[description] to work.
|
||||||
\def\description{\tablez{\dontindex}{1}{}{}{}{}}
|
\def\description{\tablez{\dontindex}{1}{}{}{}{}}
|
||||||
|
|
||||||
|
% @table, @ftable, @vtable.
|
||||||
\def\table{\begingroup\inENV\obeylines\obeyspaces\tablex}
|
\def\table{\begingroup\inENV\obeylines\obeyspaces\tablex}
|
||||||
{\obeylines\obeyspaces%
|
{\obeylines\obeyspaces%
|
||||||
\gdef\tablex #1^^M{%
|
\gdef\tablex #1^^M{%
|
||||||
@ -4623,11 +4625,17 @@ width0pt\relax} \fi
|
|||||||
\def\appendixnoderef{%
|
\def\appendixnoderef{%
|
||||||
\ifx\lastnode\relax\else
|
\ifx\lastnode\relax\else
|
||||||
\expandafter\expandafter\expandafter\setref{\lastnode}%
|
\expandafter\expandafter\expandafter\setref{\lastnode}%
|
||||||
{Yappendixletterandtype}
|
{Yappendixletterandtype}%
|
||||||
\global\let\lastnode=\relax
|
\global\let\lastnode=\relax
|
||||||
\fi
|
\fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
% @anchor{NAME} -- define xref target at arbitrary point.
|
||||||
|
%
|
||||||
|
\def\anchor#1{\setref{#1}{Ynothing}}
|
||||||
|
|
||||||
|
|
||||||
% \setref{NAME}{SNT} defines a cross-reference point NAME, namely
|
% \setref{NAME}{SNT} defines a cross-reference point NAME, namely
|
||||||
% NAME-title, NAME-pg, and NAME-SNT. Called from \foonoderef. We have
|
% NAME-title, NAME-pg, and NAME-SNT. Called from \foonoderef. We have
|
||||||
% to set \indexdummies so commands such as @code in a section title
|
% to set \indexdummies so commands such as @code in a section title
|
||||||
@ -4691,8 +4699,15 @@ width0pt\relax} \fi
|
|||||||
% into the usual \leavevmode...\vrule stuff for purposes of
|
% into the usual \leavevmode...\vrule stuff for purposes of
|
||||||
% printing. So we \turnoffactive for the \refx-snt, back on for the
|
% printing. So we \turnoffactive for the \refx-snt, back on for the
|
||||||
% printing, back off for the \refx-pg.
|
% printing, back off for the \refx-pg.
|
||||||
{\normalturnoffactive \refx{#1-snt}{}}%
|
{\normalturnoffactive
|
||||||
\space [\printednodename],\space
|
% Only output a following space if the -snt ref is nonempty; for
|
||||||
|
% @unnumbered and @anchor, it won't be.
|
||||||
|
\setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
|
||||||
|
\ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
|
||||||
|
}%
|
||||||
|
% `mynode, '
|
||||||
|
[\printednodename],\space
|
||||||
|
% `page 3'.
|
||||||
\turnoffactive \putwordpage\tie\refx{#1-pg}{}%
|
\turnoffactive \putwordpage\tie\refx{#1-pg}{}%
|
||||||
\fi
|
\fi
|
||||||
\endgroup}
|
\endgroup}
|
||||||
|
Loading…
Reference in New Issue
Block a user