The following does not work:
\documentclass{minimal}
\usepackage{doi}
\usepackage[pdf]{pstricks}
\begin{document}
hello world
\begin{pspicture}(1,1)
\psline(0,0)(1,1)
\end{pspicture}
\end{document}
However, loading the doi package after pstricks does:
\documentclass{minimal}
\usepackage[pdf]{pstricks}
\usepackage{doi}
\begin{document}
hello world
\begin{pspicture}(1,1)
\psline(0,0)(1,1)
\end{pspicture}
\end{document}
Why? Particularly, are there any caveats that I should be aware of? Thanks in advance.
pdflatex -shell-escapeon your MWE, everything works fine. But if I runpdflatex -shell-escapeon a file without the packageifpdfand without\ifpdf...\fiwrapper, then I get postscript errors. If I'm usingpdflatexwhy should it matter whether I wrap the call to the package in\ifpdf...\fior not? – A.Ellett Sep 16 '13 at 14:07hyperrefwhen runninglatexto ceate the image. – Sep 16 '13 at 15:58doipackage only when usingpdflatex? I asked my question with the goal of using both thedoiandpstrickspackages simultaneously (and thus understanding the apparent conflict between them). – nimble agar Sep 17 '13 at 02:07[pdf]does! It loads the packageauto-pst-pdfwhich itself runs in the backgroundlatexto create a PDF image which then is used when runningpdflatex, instead of thepspictureenvironment – Sep 17 '13 at 08:14