texlive[55313] Master/texmf-dist/tex/plain/cweb/cwebbin: *cwebmac.tex

commits+karl at tug.org commits+karl at tug.org
Thu May 28 18:33:16 CEST 2020


Revision: 55313
          http://tug.org/svn/texlive?view=revision&revision=55313
Author:   karl
Date:     2020-05-28 18:33:16 +0200 (Thu, 28 May 2020)
Log Message:
-----------
*cwebmac.tex updates from andreas

Modified Paths:
--------------
    trunk/Master/texmf-dist/tex/plain/cweb/cwebbin/Xcwebmac.tex
    trunk/Master/texmf-dist/tex/plain/cweb/cwebbin/dcwebmac.tex
    trunk/Master/texmf-dist/tex/plain/cweb/cwebbin/fcwebmac.tex
    trunk/Master/texmf-dist/tex/plain/cweb/cwebbin/icwebmac.tex

Added Paths:
-----------
    trunk/Master/texmf-dist/tex/plain/cweb/cwebbin/pdfwebtocfront.tex

Modified: trunk/Master/texmf-dist/tex/plain/cweb/cwebbin/Xcwebmac.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/cweb/cwebbin/Xcwebmac.tex	2020-05-28 14:24:02 UTC (rev 55312)
+++ trunk/Master/texmf-dist/tex/plain/cweb/cwebbin/Xcwebmac.tex	2020-05-28 16:33:16 UTC (rev 55313)
@@ -25,11 +25,11 @@
 % Version 3.64 [p20] --- Andreas Scherer, March 2002
 % Version 3.64 [p21] --- Andreas Scherer, Octobre 2005
 % Version 3.64 [2018] --- Andreas Scherer, Octobre 2018
+% Version 3.64 [2020] --- Andreas Scherer, May 2020
 
-\ifx\undefined\documentclass\input cwebmac.tex
-\else\endinput\fi % LaTeX will use other macros
+\ifx\undefined\botofcontents\input cwebmac.tex\fi
 
-\xdef\fmtversion{\fmtversion[2018]}
+\xdef\fmtversion{\fmtversion[2020]}
 
 \def\Cpp{\CPLUSPLUS/} % for backward compatibility
 
@@ -38,4 +38,4 @@
 \def\C#1{\5\5\quad$\triangleright\,${\cmntfont#1}$\,\triangleleft$}
 \def\SHC#1{\5\5\quad$\diamond\,${\cmntfont#1}}
 
-%\let\K=\leftarrow % "honest" alternative to standard assignment operator
+\let\K=\leftarrow % "honest" alternative to standard assignment operator

Modified: trunk/Master/texmf-dist/tex/plain/cweb/cwebbin/dcwebmac.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/cweb/cwebbin/dcwebmac.tex	2020-05-28 14:24:02 UTC (rev 55312)
+++ trunk/Master/texmf-dist/tex/plain/cweb/cwebbin/dcwebmac.tex	2020-05-28 16:33:16 UTC (rev 55313)
@@ -28,10 +28,9 @@
 % Version 3.64 [p21] --- Andreas Scherer, Octobre 2005
 % Version 3.64 [p22] --- Andreas Scherer, March 2016
 
-\ifx\undefined\documentclass\input Xcwebmac.tex
-\else\endinput\fi % LaTeX will use other macros
+\ifx\undefined\botofcontents\input cwebmac.tex\fi
 
-\input dcwebstrings.tex
+\input dcwebstrings.tex % German translations for some tags and strings
 
 \def\.#1{\leavevmode\hbox{\tentex % typewriter type for strings
   \ifx\Cstringchars\undefined\else\Cstringchars\fi % special string characters

Modified: trunk/Master/texmf-dist/tex/plain/cweb/cwebbin/fcwebmac.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/cweb/cwebbin/fcwebmac.tex	2020-05-28 14:24:02 UTC (rev 55312)
+++ trunk/Master/texmf-dist/tex/plain/cweb/cwebbin/fcwebmac.tex	2020-05-28 16:33:16 UTC (rev 55313)
@@ -30,8 +30,7 @@
 
 % french translations --- Denis Roegel, 18 September 1994
 
-\ifx\undefined\documentclass\input Xcwebmac.tex
-\else\endinput\fi % LaTeX will use other macros
+\ifx\undefined\botofcontents\input cwebmac.tex\fi
 
 \def\.#1{\leavevmode\hbox{\tentex % typewriter type for strings
   \ifx\Cstringchars\undefined\else\Cstringchars\fi % special string characters
@@ -50,8 +49,7 @@
 \def\ATH{{\acrofalse\X\kern-.5em:D\'efinitions du pr\'eprocesseur\X}}
 
 \def\A{\note{Voir aussi la section}} % xref for doubly defined section name
-\def\As{\note{Voir aussi les sections}} % xref for multiply defined 
-                                        % section name
+\def\As{\note{Voir aussi les sections}} % xref for multiply defined section name
 
 \def\ET{ et~} % conjunction between two section numbers
 \def\ETs{ et~} % conjunction between the last two of several section numbers

Modified: trunk/Master/texmf-dist/tex/plain/cweb/cwebbin/icwebmac.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/cweb/cwebbin/icwebmac.tex	2020-05-28 14:24:02 UTC (rev 55312)
+++ trunk/Master/texmf-dist/tex/plain/cweb/cwebbin/icwebmac.tex	2020-05-28 16:33:16 UTC (rev 55313)
@@ -28,8 +28,7 @@
 % Version 3.64 [p21] --- Andreas Scherer, Octobre 2005
 % Version 3.64 [p22] --- Andreas Scherer, March 2016
 
-\ifx\undefined\documentclass\input Xcwebmac.tex
-\else\endinput\fi % LaTeX will use other macros
+\ifx\undefined\botofcontents\input cwebmac.tex\fi
 
 \def\.#1{\leavevmode\hbox{\tentex % typewriter type for strings
   \ifx\Cstringchars\undefined\else\Cstringchars\fi % special string characters

Added: trunk/Master/texmf-dist/tex/plain/cweb/cwebbin/pdfwebtocfront.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/cweb/cwebbin/pdfwebtocfront.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/plain/cweb/cwebbin/pdfwebtocfront.tex	2020-05-28 16:33:16 UTC (rev 55313)
@@ -0,0 +1,79 @@
+% pdfwebtofront.tex
+% Code from knuth.drv in https://github.com/oberdiek/latex-tds
+% 2020/05/21 v1.0 by Andreas Scherer.
+%
+% This file is part of project https://github.com/ascherer/cwebbin
+% and may be distributed under the MIT License or the LaTeX Project
+% Public License.
+%
+% Move table-of-contents page to the front in PDF output.
+% Works with pdftex and xetex in connection with either 'webmac.tex'
+% for Pascal/WEB programs or 'cwebmac.tex' for C/CWEB programs.
+%
+\ifx\detokenize\undefined\endinput\fi
+\def\contentsfile{\jobname.toc} % file that gets table of contents info
+\def\readcontents{\input \contentsfile}
+\newread\testread
+\openin\testread=\contentsfile\relax
+\ifeof\testread % First run
+\else % Second run
+  % Redefine '\con' to be invoked before the first '\N' (starred section).
+  \let\ORGcon\con
+  \def\con{%
+    \def\:{\par\hangindent 2em} % Fix for 'bibtex.web'.
+    % reduce size of PDF pages for more screen space
+    \pdfpagewidth=\pagewidth  \advance\pdfpagewidth by 2cm
+    \pdfpageheight=\pageheight \advance\pdfpageheight by 3cm
+    \ifpdftex \pdfhorigin=1cm \pdfvorigin=1cm
+    \else \advance\pdfpageheight by 1cm \global\pageshift=-1.54cm
+      \global\hoffset=-1.54cm \global\voffset=-1.54cm \fi
+    \begingroup
+      \let\end\relax
+      \ORGcon
+      % let's start with section '1', the 'Introduction'.
+      \ifx\undefined\grouptitle \mark{1} % WEB
+      \else \mark{{{\tensy x}1}0{Introduction}}\fi % CWEB
+      \eject % set '\botmark' on TOC, hence '\topmark' on next page.
+    \endgroup
+    \let\con\end
+  }%
+  % Redefine '\N’ to invoke redefined '\con' before switching back
+  % to original '\N'.
+  \expandafter\let\csname ORGN\expandafter\endcsname
+                  \csname N\endcsname
+  \expandafter\outer\expandafter\def\csname N\endcsname{%
+    \con
+    \expandafter\let\csname N\expandafter\endcsname
+                    \csname ORGN\endcsname
+    \csname N\endcsname
+  }%
+  % Special variant of the above for 'mf.web' and 'tex.web'.  They put
+  % their tables-of-contents on a sparce 'page 2' and start on page '3'.
+  \begingroup
+    \def\num{0}%
+    \edef\x{\jobname}%
+    \edef\y{\detokenize{tex}}%
+    \ifx\x\y \def\num{1}\else
+    \edef\y{\detokenize{mf}}%
+    \ifx\x\y \def\num{1}\else
+    \edef\y{\detokenize{pdftex}}%
+    \ifx\x\y \def\num{1}\else
+    \edef\y{\detokenize{xetex}}%
+    \ifx\x\y \def\num{1}\fi\fi\fi\fi
+  \expandafter\endgroup\ifnum\num=1 %
+    \def\contentspagenumber{2}%
+    \let\ORGpageno\pageno
+    \def\pageno{%
+      \let\pageno\ORGpageno
+      \expandafter\let\csname ORGN\expandafter\endcsname
+                      \csname N\endcsname
+      \expandafter\outer\expandafter\def\csname N\endcsname{%
+        \con
+        \expandafter\let\csname N\expandafter\endcsname
+                        \csname ORGN\endcsname
+        \csname N\endcsname
+      }%
+      \pageno
+    }%
+  \fi
+\fi


Property changes on: trunk/Master/texmf-dist/tex/plain/cweb/cwebbin/pdfwebtocfront.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property


More information about the tex-live-commits mailing list.