3

I'm trying to get some PSTricks pictures to PDF. I'm using the information provided on http://tug.org/PSTricks/main.cgi?file=pdf/pdfoutput#autopstpdf

Well, never change a running system ... yesterday it worked, but due to HDD problems I had to reinstall my system (Win XP sp3, Miktex 2.9, Texniccenter 2.02). The thing is, the final .pdf is created, Latex->PDF, XeLatex->PFD, ... it doesn't matter. But what I would need is the cropped .pdf from the picture itself, the <'file'-autopp.pdf>.

Perl (5v18) ist installed (although before the reinstallation I didn't have it). I got the "typical" two warnings, which I found quite often in forums, but those guys just needed the final .pdf, I would need the cropped pictures.

Using:

 \documentclass[12pt]{article}

 \usepackage[pdf]{pstricks}
 \usepackage[crop=off]{auto-pst-pdf}
 \usepackage{pst-pdf}

 \begin{document}
 \input{a.pstricks}
 \end{document}

Getting (umformen.log): (... .tex-file is called "umformen")

[...]
    runsystem(echo "-------------------------------------------------")...executed.
    runsystem(echo "auto-pst-pdf: Auxiliary LaTeX compilation")...executed.
    runsystem(echo "-------------------------------------------------")...executed.
    runsystem(del "umformen-autopp.log")...executed.

    runsystem(latex -disable-write18 -jobname="umformen-autopp" -interaction=batchmode  "\let \APPmakepictures \empty \input
      umformen.tex")...executed.

    Package auto-pst-pdf Warning: 
        Creation of umformen-autopp.dvi failed.
    This warning occured on input line 124.

    Package auto-pst-pdf Warning: 
        Could not create umformen-pics.pdf. Auxiliary files not deleted.
    This warning occured on input line 124.
    runsystem(echo "-------------------------------------------------")...executed.
    runsystem(echo "auto-pst-pdf: End auxiliary LaTeX compilation")...executed.
    runsystem(echo "-------------------------------------------------")...executed.
[...]

Because the whole system is reinstalled, I think the error is maybe somewhere else? Anyone any clues?

Greetings, Florian

2 Answers2

2

that cannot work, because a package is not loaded twice. \usepackage[pdf]{pstricks} already loads auto-pst-pdf. Try

 \documentclass[12pt]{article}

 \usepackage{ifpdf}
 \usepackage[crop=off]{auto-pst-pdf}
 \ifpdf\else\usepackage{pstricks}\fi

 \begin{document}
 \input{a.pstricks}
 \end{document}

and also:

 \documentclass[12pt]{article}

 \usepackage{ifpdf}
 \usepackage{auto-pst-pdf}
 \ifpdf\else\usepackage{pstricks}\fi

 \begin{document}
 \input{a.pstricks}
 \end{document}

I tried the first example and an up-to-date MiKTeX 2.9 on a Windows 7.0 with a file a.pstricks:

\begin{pspicture}
\psframe*[linecolor=blue](10,10)
\end{pspicture}

and had no problems (running TeXmaker with enabled --shell-escape)

  • I tried both, both not working, same two warnings and no ..-autopp.pdf – Florian Kogler Apr 10 '14 at 12:04
  • ok, then use the example with \usepackage[cleanup={}]{auto-pst-pdf}. What files were created? –  Apr 10 '14 at 12:44
  • Using this line I get a u.aux, u.log, u.pdf, u.synctex, u*-autopp.log - and of course the two warnings occure – Florian Kogler Apr 10 '14 at 14:56
  • it looks like that you have no write access for that directory where the external file is written. –  Apr 10 '14 at 15:16
  • Using XP, specially just as one user, I didn't think the problem was there. Today I tried from the beginning, and it worked. So I tried to find the error. I'm not completely sure, but I think it's a \begin{picture} instead of \begin{pspicture}, which causes all the troubles. – Florian Kogler Apr 11 '14 at 06:58
  • FYI: The first code-lines Herbert gave me are working as well as my own. The second lines return 4 warnings and the output is just a -autopp.pdf, but uncropped. Thanks, Florian – Florian Kogler Apr 11 '14 at 07:22
  • yes \begin{picture} is valid LaTeX code, but won't work with auto-pst-pdf –  Apr 11 '14 at 13:38
  • +1 I will remove this comment shortly: Why did you make texdoc pst-perspective launch German version rather than English version? – kiss my armpit Apr 13 '14 at 01:19
0

\begin{pspicture} instead of \begin{picture}

I was using the programm "JPicEdt" to actually draw the picture. One can choose the type of picture: "Emulated Latex", "PSTricks", ... Unfortunatly the type was wrong configurated, also in the minimal I made (a.pstricks), which infact wasn't minimal, but one step over minimal, including the error.
Changing the type does change the output file (pspicture -> picture), although the "save"-button stays gray. Maybe somehow the error got in there.

Hoping to help somebody, thanks for helping me!
Florian