Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

preview patch in pgfutil-latex.def breaks with the next latex #923

Closed
u-fischer opened this issue Sep 19, 2020 · 0 comments
Closed

preview patch in pgfutil-latex.def breaks with the next latex #923

u-fischer opened this issue Sep 19, 2020 · 0 comments

Comments

@u-fischer
Copy link
Contributor

u-fischer commented Sep 19, 2020

Brief outline of the bug

pgf patches preview in pgfutil-latex.def. The patch uses everyshi commands which are no longer present in the next latex, which emulates everyshi.

Minimal working example (MWE)

\documentclass{article}
\RequirePackage[active]{preview}
\usepackage{pgf}
\begin{document}
abc
\end{document}

errors with

! Undefined control sequence.
\@outputpage ...istfalse \@parboxrestore \shipout 
                                                  \vbox {\set@typeset@protec...
l.23 \end{document}

Using the preview environment gives similar errors.

Disabling this patch in pgfutil-latex-def avoids the errors:

% Preview hack: preview.sty hacks into \shipout (which is ok), but
% does not honour everyshi.sty (which is not ok). This causes everyshi
% material to get lost.
\AtBeginDocument{
    \@ifpackageloaded{preview}{%
        % Ok, package loaded. Swap definitions of everyshi.sty's shipout
        % and preview.sty's shipout:
        \ifPreview
            \let\shipout\@EveryShipout@Org@Shipout%This is the null version of \shipout, created by preview and saved by everyshi
            \let\@EveryShipout@Org@Shipout\pr@shipout% This is the original shipout
            \let\pr@shipout\@EveryShipout@Shipout%
        \fi
        }{}%
}

But I don't know what the patch tried to do, and have no means to check if a replacement is needed or if it can simply be dropped in a new latex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants