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 Answer 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, 2021 at 19:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .