mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2025-01-28 23:50:55 +00:00
* texinfo.tex (\setref): Take additional argument for the -snt
xref. Call \indexdummies. (\donoderef, \appendixnoderef, \unnumbnoderef): Change \setref calls.
This commit is contained in:
parent
44309109fe
commit
6cca2382f0
1 changed files with 44 additions and 37 deletions
81
texinfo.tex
81
texinfo.tex
|
@ -1053,24 +1053,6 @@ where each line of input produces a line of output.}
|
|||
\def\bullet{\implicitmath\ptexbullet\implicitmath}
|
||||
\def\minus{\implicitmath-\implicitmath}
|
||||
|
||||
\def\node{\ENVcheck\parsearg\nodezzz}
|
||||
\def\nodezzz#1{\nodexxx [#1,]}
|
||||
\def\nodexxx[#1,#2]{\gdef\lastnode{#1}}
|
||||
\let\nwnode=\node
|
||||
\let\lastnode=\relax
|
||||
|
||||
\def\donoderef{\ifx\lastnode\relax\else
|
||||
\expandafter\expandafter\expandafter\setref{\lastnode}\fi
|
||||
\global\let\lastnode=\relax}
|
||||
|
||||
\def\unnumbnoderef{\ifx\lastnode\relax\else
|
||||
\expandafter\expandafter\expandafter\unnumbsetref{\lastnode}\fi
|
||||
\global\let\lastnode=\relax}
|
||||
|
||||
\def\appendixnoderef{\ifx\lastnode\relax\else
|
||||
\expandafter\expandafter\expandafter\appendixsetref{\lastnode}\fi
|
||||
\global\let\lastnode=\relax}
|
||||
|
||||
% @refill is a no-op.
|
||||
\let\refill=\relax
|
||||
|
||||
|
@ -4605,6 +4587,7 @@ width0pt\relax} \fi
|
|||
\expandafter\parsearg
|
||||
\fi \next}
|
||||
|
||||
|
||||
\message{cross references,}
|
||||
\newwrite\auxfile
|
||||
|
||||
|
@ -4616,28 +4599,52 @@ width0pt\relax} \fi
|
|||
\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
|
||||
node \samp{\ignorespaces#1{}}}
|
||||
|
||||
% @setref{foo} defines a cross-reference point named foo.
|
||||
% @node's job is to define \lastnode.
|
||||
\def\node{\ENVcheck\parsearg\nodezzz}
|
||||
\def\nodezzz#1{\nodexxx [#1,]}
|
||||
\def\nodexxx[#1,#2]{\gdef\lastnode{#1}}
|
||||
\let\nwnode=\node
|
||||
\let\lastnode=\relax
|
||||
|
||||
\def\setref#1{%
|
||||
\dosetq{#1-title}{Ytitle}%
|
||||
\dosetq{#1-pg}{Ypagenumber}%
|
||||
\dosetq{#1-snt}{Ysectionnumberandtype}}
|
||||
% The sectioning commands (@chapter, etc.) call these.
|
||||
\def\donoderef{%
|
||||
\ifx\lastnode\relax\else
|
||||
\expandafter\expandafter\expandafter\setref{\lastnode}%
|
||||
{Ysectionnumberandtype}%
|
||||
\global\let\lastnode=\relax
|
||||
\fi
|
||||
}
|
||||
\def\unnumbnoderef{%
|
||||
\ifx\lastnode\relax\else
|
||||
\expandafter\expandafter\expandafter\setref{\lastnode}{Ynothing}%
|
||||
\global\let\lastnode=\relax
|
||||
\fi
|
||||
}
|
||||
\def\appendixnoderef{%
|
||||
\ifx\lastnode\relax\else
|
||||
\expandafter\expandafter\expandafter\setref{\lastnode}%
|
||||
{Yappendixletterandtype}
|
||||
\global\let\lastnode=\relax
|
||||
\fi
|
||||
}
|
||||
|
||||
\def\unnumbsetref#1{%
|
||||
\dosetq{#1-title}{Ytitle}%
|
||||
\dosetq{#1-pg}{Ypagenumber}%
|
||||
\dosetq{#1-snt}{Ynothing}}
|
||||
% \setref{NAME}{SNT} defines a cross-reference point NAME, namely
|
||||
% NAME-title, NAME-pg, and NAME-SNT. Called from \foonoderef. We have
|
||||
% to set \indexdummies so commands such as @code in a section title
|
||||
% aren't expanded. It would be nicer not to expand the titles in the
|
||||
% first place, but there's so many layers that that is hard to do.
|
||||
%
|
||||
\def\setref#1#2{{%
|
||||
\indexdummies
|
||||
\dosetq{#1-title}{Ytitle}%
|
||||
\dosetq{#1-pg}{Ypagenumber}%
|
||||
\dosetq{#1-snt}{#2}
|
||||
}}
|
||||
|
||||
\def\appendixsetref#1{%
|
||||
\dosetq{#1-title}{Ytitle}%
|
||||
\dosetq{#1-pg}{Ypagenumber}%
|
||||
\dosetq{#1-snt}{Yappendixletterandtype}}
|
||||
|
||||
% \xref, \pxref, and \ref generate cross-references to specified points.
|
||||
% For \xrefX, #1 is the node name, #2 the name of the Info
|
||||
% cross-reference, #3 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.
|
||||
% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is
|
||||
% the node name, #2 the name of the Info cross-reference, #3 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.
|
||||
%
|
||||
\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
|
||||
\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
|
||||
|
|
Loading…
Reference in a new issue