Hi All,
I discover that `@set xref-automatic-section-title' was broken when
quote (') is part of some title.
My texinfo.tex version is 1999-09-25.10.
In the following sample file, "'s" sequence breaks .aux format:
\input texinfo
@setfilename john.info
@set xref-automatic-section-title
@node Top, John, (dir), (dir)
@top Whole familly
@node John, Mary, Top, Top
@chapter John's home, a farme
John's home is also Mary's home @xref{Mary}.
@node Mary, , John, Top
@appendix Mary's home, a farme
Mary's home is also John's home @xref{John}.
@bye
In fact john.aux is:
'xrdef {Top-title}{Whole familly}
'xrdef {Top-pg}{1}
'xrdef {Top-snt}{}
'xrdef {John-title}{John's home, a farme}
'xrdef {John-pg}{2}
'xrdef {John-snt}{Chapter'tie1}
'xrdef {Mary-title}{Mary's home, a farme}
'xrdef {Mary-pg}{3}
'xrdef {Mary-snt}{Appendix'tie'char65{}}
It's clear that macro "'s" must not be a macro.
As \xrdef ``Reenable \ as an escape while reading the second argument'',
I disable (') as an escape sequence.
My .aux file look like:
'xrdef {Top-title}{Whole familly}
'xrdef {Top-pg}{1}
'xrdef {Top-snt}{}
'xrdef {John-title}{John's home, a farme}
'xrdef {John-pg}{2}
'xrdef {John-snt}{Chapter\tie1}
'xrdef {Mary-title}{Mary's home, a farme}
'xrdef {Mary-pg}{3}
'xrdef {Mary-snt}{Appendix\tie\char65{}}
Then, TeX is happy and xref are good ;-)
Now use this texi file:
\input texinfo
@setfilename john.info
@set xref-automatic-section-title
@node Top, John, (dir), (dir)
@top Whole familly
@node John's home, Mary, Top, Top
@chapter John's home, a farme
John's home is also Mary's home @xref{Mary's home}.
@node Mary's home, , John, Top
@appendix Mary's home, a farme
Mary's home is also John's home @xref{John's home}.
@bye
It use (') in node name. I agree, texinfo manual explains ``You cannot
use commas or apostrophes within a node name; these confuse TeX or the
Info formatters''. But it work with makeinfo...
I made it working with TeX.
As (,) could never be part of a node name I use it as the escape
character in .aux file. And it's work !
Patch attached.
Note that I have subscribe to bug-texinfo mailing list, no Cc needed ;-)
--
Edouard G. Parmelan
http://egp.free.fr
--- /home/gnu/texinfo-4.0/doc/texinfo.tex Sat Sep 25 16:31:21 1999
+++ texinfo.tex Fri May 19 12:42:06 2000
@@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{1999-09-25.10}
+\def\texinfoversion{2000-05-19.12}
%
% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
% Free Software Foundation, Inc.
@@ -5291,10 +5291,10 @@
}
% \internalsetq {foo}{page} expands into
-% CHARACTERS 'xrdef {foo}{...expansion of \Ypage...}
-% When the aux file is read, ' is the escape character
+% CHARACTERS ,xrdef {foo}{...expansion of \Ypage...}
+% When the aux file is read, , is the escape character
-\def\internalsetq #1#2{'xrdef {#1}{\csname #2\endcsname}}
+\def\internalsetq #1#2{,xrdef {#1}{\csname #2\endcsname}}
% Things to be expanded by \internalsetq
@@ -5314,15 +5314,17 @@
\fi \fi \fi }
\def\Yappendixletterandtype{%
-\ifnum\secno=0 \putwordAppendix\xreftie'char\the\appendixno{}%
-\else \ifnum \subsecno=0 \putwordSection\xreftie'char\the\appendixno.\the\secno %
+\ifnum\secno=0 \putwordAppendix\xreftie\xrefchar\the\appendixno{}%
+\else \ifnum \subsecno=0 \putwordSection\xreftie\xrefchar\the\appendixno.\the\secno %
\else \ifnum \subsubsecno=0 %
-\putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno %
+\putwordSection\xreftie\xrefchar\the\appendixno.\the\secno.\the\subsecno %
\else %
-\putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno
%
+\putwordSection\xreftie\xrefchar\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno
+ %
\fi \fi \fi }
-\gdef\xreftie{'tie}
+{\catcode`\@=0 \catcode`\\=\other
+@gdef@xreftie{\tie}
+@gdef@xrefchar{\char}}
% 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.
@@ -5362,6 +5364,7 @@
\def\xrdef#1{\begingroup
% Reenable \ as an escape while reading the second argument.
\catcode`\\ = 0
+ \catcode`\, = \other
\afterassignment\endgroup
\expandafter\gdef\csname X#1\endcsname
}
@@ -5431,16 +5434,16 @@
\ifnum \count 1<256 \loop \fi
}%
}%
- % The aux file uses ' as the escape (for now).
+ % The aux file uses , as the escape (for now).
% Turn off \ as an escape so we do not lose on
% entries which were dumped with control sequences in their names.
- % For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^
+ % For example, ,xrdef {$\leq $-fun}{page ...} made by @defun ^^
% Reference to such entries still does not work the way one would wish,
% but at least they do not bomb out when the aux file is read in.
\catcode`\{=1
\catcode`\}=2
\catcode`\%=\other
- \catcode`\'=0
+ \catcode`\,=0
\catcode`\\=\other
%
\openin 1 \jobname.aux