texlive[55611]
commits+ascherer at tug.org
commits+ascherer at tug.org
Sun Jun 21 01:01:35 CEST 2020
Revision: 55611
http://tug.org/svn/texlive?view=revision&revision=55611
Author: ascherer
Date: 2020-06-21 01:01:35 +0200 (Sun, 21 Jun 2020)
Log Message:
-----------
[CWEB] Fix running headers and toc.
Many WEB programs override '\def\rheader'; we must restore the original
definition.
pdfTeX has a looong table-of-contents by itself (with the TL it's
getting worse, also for XeTeX).
Modified Paths:
--------------
trunk/Build/source/texk/web2c/cwebdir/texinputs/pdfwebtocfront.tex
Modified: trunk/Build/source/texk/web2c/cwebdir/texinputs/pdfwebtocfront.tex
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/texinputs/pdfwebtocfront.tex 2020-06-20 22:53:23 UTC (rev 55610)
+++ trunk/Build/source/texk/web2c/cwebdir/texinputs/pdfwebtocfront.tex 2020-06-20 23:01:35 UTC (rev 55611)
@@ -13,6 +13,7 @@
\ifx\detokenize\undefined\endinput\fi
\def\contentsfile{\jobname.toc} % file that gets table of contents info
\newif\iftexmf\texmffalse % special toc treatment for TeX, Metafont, etc.
+\newif\ifpdfxe\pdfxefalse % superspecial toc treatment for pdfTeX, XeTeX.
\newread\testread
\openin\testread=\contentsfile\relax
\ifeof\testread % First run
@@ -36,18 +37,17 @@
% They all define a peculiar version of '\N' in their preamble.
% And they put their tables-of-contents on a sparse 'page 2' and
% start the main body on page '3'.
- \begingroup
- \edef\x{\jobname}%
- \edef\y{\detokenize{tex}}%
- \ifx\x\y \texmftrue\else
- \edef\y{\detokenize{mf}}%
- \ifx\x\y \texmftrue\else
- \edef\y{\detokenize{pdftex}}%
- \ifx\x\y \texmftrue\else
- \edef\y{\detokenize{xetex}}%
- \ifx\x\y \texmftrue\fi\fi\fi\fi
- \expandafter\endgroup\iftexmf %
- \def\contentspagenumber{2}%
+ \edef\x{\jobname}%
+ \edef\y{\detokenize{tex}}%
+ \ifx\x\y \texmftrue\else
+ \edef\y{\detokenize{mf}}%
+ \ifx\x\y \texmftrue\else
+ \edef\y{\detokenize{pdftex}}%
+ \ifx\x\y \texmftrue \pdfxetrue\else
+ \edef\y{\detokenize{xetex}}%
+ \ifx\x\y \texmftrue\fi\fi\fi\fi
+ \iftexmf
+ \ifpdfxe \def\contentspagenumber{1} \else \def\contentspagenumber{2} \fi
\expandafter\let\csname ORGN\expandafter\endcsname
\csname N\endcsname
\expandafter\outer\expandafter\def\csname N\endcsname{%
@@ -60,7 +60,7 @@
% In fact, '\con' will be invoked _inside_ the first '\N' right _after_
% '\MN', but _before_ '\eject'. And '\topofcontents' gets in the twist
% as well.
- \let\ORGtopofcontents\topofcontents
+ \let\ORGtopofcontents\topofcontents \let\ORGrheader\rheader
\def\topofcontents{%
\def\:{\par\hangindent 2em} % Fix for 'bibtex.web'; from '\def\fin'.
\ORGtopofcontents
@@ -80,7 +80,8 @@
\csname ORGvfil\endcsname
\expandafter\let\csname eject\expandafter\endcsname
\csname ORGeject\endcsname
- \vfil
+ \vfil\eject
+ \let\rheader\ORGrheader
}%
\fi
\fi
More information about the tex-live-commits
mailing list.