Index: ChangeLog =================================================================== RCS file: /sources/texinfo/texinfo/ChangeLog,v retrieving revision 1.712 diff -u -p -r1.712 ChangeLog --- ChangeLog 27 Jun 2007 07:11:19 -0000 1.712 +++ ChangeLog 30 Jun 2007 14:32:26 -0000 @@ -1,3 +1,16 @@ +2007-06-30 Oleg Katsitadze + + * texinfo.tex (\chapmacro): avoid potential breakpoint at + baseline skip between \pdftest and the heading. + (\chapmacro): use marks to define chapter names and numbers for + use in headlines. + (\pagechapter, \pagechapternum, pagechaptername): new macros. + (\onepageout): call \botmark to define \pagechapter. + (\HEADINGS*): use \pagechapter instead of \thischapter in + \oddheadline and \evenheadline. + (\thischapternum, \thischaptername): init to empty. + (\safewhatsit): fixed typo. + 2007-06-27 Oleg Katsitadze * texinfo.tex (\setnonasciicharscatcodenonglobal): new macro. Index: doc/texinfo.tex =================================================================== RCS file: /sources/texinfo/texinfo/doc/texinfo.tex,v retrieving revision 1.242 diff -u -p -r1.242 texinfo.tex --- doc/texinfo.tex 29 Jun 2007 20:04:40 -0000 1.242 +++ doc/texinfo.tex 30 Jun 2007 14:32:31 -0000 @@ -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{2007-06-29.13} +\def\texinfoversion{2007-06-30.17} % % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -294,6 +294,9 @@ \ifodd\pageno \advance\hoffset by \bindingoffset \else \advance\hoffset by -\bindingoffset\fi % + % Define \pagechapter{,num,name}, used by headlines and footlines. + \botmark + % % Do this outside of the \shipout so @code etc. will be expanded in % the headline as they should be, not taken literally (outputting ''code). \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% @@ -2823,7 +2826,7 @@ end \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} -\global\oddheadline={\line{\thischapter\hfil\folio}} +\global\oddheadline={\line{\pagechapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \let\contentsalignmacro = \chappager @@ -2834,8 +2837,8 @@ end \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} -\global\evenheadline={\line{\thischapter\hfil\folio}} -\global\oddheadline={\line{\thischapter\hfil\folio}} +\global\evenheadline={\line{\pagechapter\hfil\folio}} +\global\oddheadline={\line{\pagechapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } \def\HEADINGSon{\HEADINGSdouble} @@ -2846,7 +2849,7 @@ end \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} -\global\oddheadline={\line{\thischapter\hfil\folio}} +\global\oddheadline={\line{\pagechapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } @@ -2854,8 +2857,8 @@ end \def\HEADINGSsinglex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} -\global\evenheadline={\line{\thischapter\hfil\folio}} -\global\oddheadline={\line{\thischapter\hfil\folio}} +\global\evenheadline={\line{\pagechapter\hfil\folio}} +\global\oddheadline={\line{\pagechapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } @@ -4099,7 +4102,7 @@ end % % If \lastskip is nonzero, that means the last item was a % skip. And since a skip is discardable, that means this - % -\skip0 glue we're inserting is preceded by a + % -\whatsitskip glue we're inserting is preceded by a % non-discardable item, therefore it is not a potential % breakpoint, therefore no \nobreak needed. \ifx\lastskipmacro\zeroskipmacro @@ -4575,11 +4578,19 @@ end \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} -% Each @chapter defines this as the name of the chapter. -% page headings and footings can use it. @section does likewise. -% However, they are not reliable, because we don't use marks. +% Each @chapter defines these as number+name, number and name of the +% chapter. However, they are not reliable for use in headlines, +% because they don't use marks; use \pagechapter{,num,name} +% instead. @section does likewise, except there is no \pagesection. \def\thischapter{} +\def\thischapternum{} +\def\thischaptername{} \def\thissection{} +% Page headings and footings should use these, as these are defined +% through marks. +\def\pagechapter{} +\def\pagechapternum{} +\def\pagechaptername{} \newcount\absseclevel % used to calculate proper heading level \newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count @@ -4932,11 +4943,15 @@ end \def\toctype{unnchap}% \gdef\thischapternum{}% \gdef\thischapter{#1}% + \toks0={\gdef\pagechaptername{#1}\gdef\pagechapternum{}\gdef\pagechapter{\pagechaptername}}% + \mark{\the\toks0}% \else\ifx\temptype\Yomitfromtockeyword \setbox0 = \hbox{}% contents like unnumbered, but no toc entry \def\toctype{omit}% \gdef\thischapternum{}% \gdef\thischapter{}% + \toks0={\gdef\pagechaptername{#1}\gdef\pagechapternum{}\gdef\pagechapter{}}% + \mark{\the\toks0}% \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% \def\toctype{app}% @@ -4947,12 +4962,18 @@ end % \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% + \toks0={#1}% + \mark{\gdef\noexpand\pagechaptername{\the\toks0}\gdef\noexpand\pagechapternum{\appendixletter}% + \gdef\noexpand\pagechapter{\putwordAppendix{} \noexpand\pagechapternum: \noexpand\pagechaptername}}% \else \setbox0 = \hbox{#3\enspace}% \def\toctype{numchap}% \xdef\thischapternum{\the\chapno}% \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% + \toks0={#1}% + \mark{\gdef\noexpand\pagechaptername{\the\toks0}\gdef\noexpand\pagechapternum{\the\chapno}% + \gdef\noexpand\pagechapter{\putwordChapter{} \noexpand\pagechapternum: \noexpand\pagechaptername}}% \fi\fi\fi % % Write the toc entry for this chapter. Must come before the @@ -4968,6 +4989,7 @@ end \donoderef{#2}% % % Typeset the actual heading. + \nobreak % Avoid page breaks at the baseline skip. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright \hangindent=\wd0 \centerparametersmaybe \unhbox0 #1\par}%