texlive[62130] Master/texmf-dist: preview (21feb22)

commits+karl at tug.org commits+karl at tug.org
Mon Feb 21 21:58:16 CET 2022


Revision: 62130
          http://tug.org/svn/texlive?view=revision&revision=62130
Author:   karl
Date:     2022-02-21 21:58:16 +0100 (Mon, 21 Feb 2022)
Log Message:
-----------
preview (21feb22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/preview/preview.pdf
    trunk/Master/texmf-dist/source/latex/preview/preview.dtx
    trunk/Master/texmf-dist/tex/latex/preview/preview.sty

Modified: trunk/Master/texmf-dist/doc/latex/preview/preview.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/preview/preview.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/preview/preview.dtx	2022-02-21 20:58:02 UTC (rev 62129)
+++ trunk/Master/texmf-dist/source/latex/preview/preview.dtx	2022-02-21 20:58:16 UTC (rev 62130)
@@ -3,7 +3,7 @@
 %%    Developed as part of AUCTeX <URL:https://www.gnu.org/software/auctex/>.
 %
 %     Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006,
-%                   2010, 2017-2020 Free Software Foundation
+%                   2010, 2017-2022 Free Software Foundation
 %
 %     This program is free software; you can redistribute it and/or modify
 %     it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
 %     Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 %     Boston, MA 02110-1301  USA
 % \fi
-% \CheckSum{1760}
+% \CheckSum{1794}
 % \GetFileInfo{preview.sty}
 % \date{\filedate}
 % \author{David Kastrup\thanks{\texttt{bug-auctex at gnu.org}}}
@@ -439,7 +439,7 @@
 \NeedsTeXFormat{LaTeX2e} \def\reserved at a #1#2$#3:
 #4${\xdef#1{\reserved at c #2#4 $}} \def\reserved at c #1 #2${#1}
 \begingroup \catcode`\_=12
-\reserved at a\pr at version $Name: release_12_3 $ \ifx\pr at version\@empty
+\reserved at a\pr at version $Name: release_13_1 $ \ifx\pr at version\@empty
 \reserved at a\pr at version CVS-$Revision: 1.126 $ \endgroup \else
   \def\next release_{} \lccode`\_=`.
   \edef\next{\lowercase{\endgroup
@@ -781,14 +781,41 @@
 % pretty much the same as in |everyshi.sty|.  One of its implications
 % is that if someone does a \cmd{\shipout} of a \emph{void} box,
 % things will go horribly wrong.
-% \begin{macro}{\shipout}
+% \begin{macro}{\pr@@shipout}
 %    \begin{macrocode}
-\let\pr at shipout=\shipout
-\def\shipout{\deadcycles\z@\bgroup\setbox\z@\box\voidb at x
+\def\pr@@shipout{\deadcycles\z@\bgroup\setbox\z@\box\voidb at x
   \afterassignment\pr at shipoutegroup\setbox\z@}
 \def\pr at shipoutegroup{\ifvoid\z@ \expandafter\aftergroup\fi \egroup}
 %    \end{macrocode}
 % \end{macro}
+% \begin{macro}{\pr at shipout}
+%   We now need to check which command we are replacing.  Before
+%   things got sophisticated in 2020 or 2021, this had been
+%   \cmd{\shipout} but now it could be \cmd{\tex\_shipout:D}.  \LaTeX\
+%   got a hook mechanism for managing output routines, but it doesn't
+%   really work well for wholesale replacement of the \cmd{\shipout}
+%   command like |preview| does.
+%    \begin{macrocode}
+\ifx\shipout\@undefined
+  \begingroup
+  \catcode`\:=10
+  \catcode`\_=10
+  \ifx\tex_shipout:D\@undefined
+    \PackageError{preview}{Cannot find \protect\shipout\space primitive}%
+    {preview needs to replace the \protect\shipout\space primitive with
+      its own routine to do its work.  Due to packages or formats
+      interfering, it cannot be identified.  Please report this.}
+  \else
+    \global\let\pr at shipout=\tex_shipout:D
+    \global\let\tex_shipout:D=\pr@@shipout
+  \fi
+  \endgroup
+\else
+  \let\pr at shipout=\shipout
+  \let\shipout=\pr@@shipout
+\fi
+%    \end{macrocode}
+% \end{macro}
 % \subsection{Parsing commands}
 % \begin{macro}{\pr at parseit}
 % \begin{macro}{\pr at endparse}

Modified: trunk/Master/texmf-dist/tex/latex/preview/preview.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/preview/preview.sty	2022-02-21 20:58:02 UTC (rev 62129)
+++ trunk/Master/texmf-dist/tex/latex/preview/preview.sty	2022-02-21 20:58:16 UTC (rev 62130)
@@ -26,7 +26,7 @@
 \NeedsTeXFormat{LaTeX2e} \def\reserved at a #1#2$#3:
 #4${\xdef#1{\reserved at c #2#4 $}} \def\reserved at c #1 #2${#1}
 \begingroup \catcode`\_=12
-\reserved at a\pr at version $Name: release_12_3 $ \ifx\pr at version\@empty
+\reserved at a\pr at version $Name: release_13_1 $ \ifx\pr at version\@empty
 \reserved at a\pr at version CVS-$Revision: 1.126 $ \endgroup \else
   \def\next release_{} \lccode`\_=`.
   \edef\next{\lowercase{\endgroup
@@ -291,10 +291,27 @@
    \global\advance\pr at snippet\@ne
    \pr at cleanup
 }
-\let\pr at shipout=\shipout
-\def\shipout{\deadcycles\z@\bgroup\setbox\z@\box\voidb at x
+\def\pr@@shipout{\deadcycles\z@\bgroup\setbox\z@\box\voidb at x
   \afterassignment\pr at shipoutegroup\setbox\z@}
 \def\pr at shipoutegroup{\ifvoid\z@ \expandafter\aftergroup\fi \egroup}
+\ifx\shipout\@undefined
+  \begingroup
+  \catcode`\:=10
+  \catcode`\_=10
+  \ifx\tex_shipout:D\@undefined
+    \PackageError{preview}{Cannot find \protect\shipout\space primitive}%
+    {preview needs to replace the \protect\shipout\space primitive with
+      its own routine to do its work.  Due to packages or formats
+      interfering, it cannot be identified.  Please report this.}
+  \else
+    \global\let\pr at shipout=\tex_shipout:D
+    \global\let\tex_shipout:D=\pr@@shipout
+  \fi
+  \endgroup
+\else
+  \let\pr at shipout=\shipout
+  \let\shipout=\pr@@shipout
+\fi
 \def\pr at parseit#1{\csname pr at parse#1\endcsname}
 \let\pr at endparse=\@percentchar
 \def\next#1{%



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