1

This code don't work on texlive-2021 or on Miktex (MiKTeX 21.8), with pdflatex : the auxilliary complation fail.

\documentclass{article}
\usepackage{pstricks}
%\usepackage[cleanup={},pspdf={-dALLOWPSTRANSPARENCY -dNOSAFER}]{auto-pst-pdf}% 
\usepackage{auto-pst-pdf}
\usepackage{hyperref}
\begin{document}

Some text
\begin{pspicture}(0,0)(5,5)
\psline(0,0)(5,5)
\end{pspicture}
Other text

\end{document}


1
1

Just to explicit the answer that can be found following Ulrike Fischer's comment, adding the following in the preamble should work (also I think -dALLOWPSTRANSPARENCY is currently needed in the ps2pdf step, do not comment it out).

\makeatletter
\AtBeginDocument{
    \ifpdf\else
        \@ifpackageloaded{preview}{
            \ifPreview
                \let\Hy@FirstPageHook\relax
                \let\Hy@EveryPageAnchor\relax
            \fi
        }{}
    \fi
}
\makeatother

However, it might not behave well in future versions, and is not enough to make [auto-]pst-pdf work with beamer.

1
  • Thanks, it works with hyperref but unfortunatly not with bookmark Oct 16 '21 at 19:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.