I have tried to create a document using the pdfLaTeX engine which includes graphics generated by PSTricks and resorts to the package auto-pst-pdf
. Everything went right until I used the package minted; as soon as this was included, auto-pst-pdf
could not create the -autopp.dvi
file and the ensuing -pics.pdf
file. Everything about the package minted
seems to go right either with or without including auto-pst-pdf
, so it seems to me that the latter has some conflict with the former. Anyone knows what is going on here?
Thanks so much for your attention and assistance.
I am appending an MWE right below as suggested by texlearner:
\documentclass[12pt]{memoir}
\usepackage{pstricks}
\usepackage{auto-pst-pdf}
%\usepackage{minted}
\pagestyle{empty}
\begin{document}
\begin{postscript}
\psset{fillstyle=solid}
\psscalebox{0.75}{%
\begin{pspicture}(-5.25,-5.25)(5.25,5.25)%
\pscircle*[linecolor=cyan]{5}
\psgrid[subgriddiv=0,gridcolor=lightgray,gridlabels=0pt]
\Huge\sffamily\bfseries
\rput(-4.5,4.5){A} \rput(4.5,4.5){B}
\rput(-4.5,-4.5){C}\rput(4.5,-4.5){D}
\rput(0,0){auto-pst-pdf}
\rmfamily
\rput(0,-3.8){PSTricks}
\rput(0,3.8){\LaTeX}
\end{pspicture}}
\end{postscript}
\end{document}
With WinEdt 6.0 and on MikTeX 2.9, as long as the inclusion of minted
is commented, pdflatex
with -shell-escape
generates the corresponding one-page long PDF. As soon as minted
is effectively included, no PDF is created.
Herbert has provided an answer (to be found below) which solves the problem in what minted
is concerned. Nonetheless, I have found a strange behavior when some PSTricks-based packages are included jointly with the base package pstricks
. As an MWE let me suggest the following code:
\documentclass[12pt]{memoir}
\usepackage{ifpdf}
\ifpdf
\usepackage{minted}
\usemintedstyle{friendly}
\newminted{latex}{linenos=true,mathescape}
\else
\usepackage{pstricks,pst-blur,pst-circ,pst-grad,pst-node,
pst-gantt,pst-eucl,pst-3d,pst-solides3d,pst-lens,
pst-coxeterp,pst-coxcoor,pst-rubans,pst-eps,
pst-dbicons,pst-light3d,pst-tree,pst-sigsys,
pst-text,pst-slpe}
\usepackage{pstricks-add,pst-optexp,pst-optic,pst-plot,pst-3dplot}
\fi
\usepackage{auto-pst-pdf}
\newcommand{\pstricksplot}{%
\begin{postscript}
\psset{fillstyle=solid}
\psscalebox{0.75}{%
\begin{pspicture}(-5.25,-5.25)(5.25,5.25)%
\pscircle*[linecolor=cyan]{5}
\psgrid[subgriddiv=0,gridcolor=lightgray,gridlabels=0pt]
\Huge\sffamily\bfseries
\rput(-4.5,4.5){A} \rput(4.5,4.5){B}
\rput(-4.5,-4.5){C}\rput(4.5,-4.5){D}
\rput(0,0){auto-pst-pdf}
\rmfamily
\rput(0,-3.8){PSTricks}
\rput(0,3.8){\LaTeX}
\end{pspicture}}
\end{postscript}
}
\pagestyle{empty}
\begin{document}
\pstricksplot
A few lines with minted:
\begin{latexcode}
\psplot[linecolor=#1,plotstyle=curve,
linewidth=1.25\pslinewidth,linestyle=#2,
plotpoints=10000]{#3}{#4}{1 div x #5\space mul #6\space add}
% Parameter 5 is the resonance frequency $\omega_0=\frac{1}{\sqrt{LC}}\,\cdot$
% Parameter 6 is the time constant $\tau=RC\,.$
\end{latexcode}
The same PSTricks code as above the ``minted'' lines.
\pstricksplot
\end{document}
Now, the strange behavior is related to the inclusion of any of the packages pstricks-add
, pst-optexp
, pst-optic
, pst-plot
, pst-3dplot
. I have included the PSTricks-based packages in two different bunches in order to emphasize this point: if I comment the corresponding line, everything goes fine; but if they are effectively included, the command \pstricksplot
right above the end of the document does not lead to a graphic in the PDF. I use graphics intensively and PSTricks has proved most convenient for my needs, hence my including all those pst- packages.
Thanks so much for your assistance and attention.