4

This looks like the same problem as that one tackled in PSTricks figure turned 90 degrees, only with some twist. The following MWE does not give the rotation:

\documentclass{memoir}

\usepackage{auto-pst-pdf}

\ifpdf\else\usepackage{pstricks}\fi

\begin{document}
\begin{pspicture}(0,0)(1,1)
  \psframe*[linecolor = red](0,0)(9,1)
  \rput{90}{Marienplatz}
\end{pspicture}

I'm compiling the above on Windows Xp with MikTeX 2.9, using the pdfLaTeX engine, and with the parameter -dAutoRotatePages#/None passed on to ps2pdf via my text editor (WinEdt 8) -- even though this is alreaady done by the auto-pst-pdf defaults. The pdfLaTex engine is passed the parameter -shell-escape.

There is no page rotation, but neither is text rotation. Nonetheless, the red box is rotated 90 degrees, which I wasn't expecting nor I want to. What can be wrong about it?

  • I assume, the output is as desired if compiled with latex only? – Christian Hupfer Sep 10 '14 at 17:32
  • The canvas is too small. – kiss my armpit Sep 10 '14 at 17:35
  • I haven't tried because I need the crop facility that auto-pst-pdf "embeds". – Marcos Sep 10 '14 at 17:35
  • @cyanide-basedfood: That's fixed automatically in the auto-pst-pdf processing. Nonetheless, I have changed it to \psframe*(0,0)(2,1) inside a \begin{pspicture}(-9,-9)(9,9) and the problem remains. – Marcos Sep 10 '14 at 17:41
  • @Marcos: with MiKTeX, as far as I know, the switch should be --enable-write18. – Bernard Sep 10 '14 at 17:58
7

Passing -dAutoRotatePages#/None in winedt doesn't help, as auto-pst-pdf calls ps2pdf independently. So you musst tell auto-pst-pdf to add this option. The main problem is the # which you can't use directly in tex options. There are perhaps better ways but this here seems to work:

\documentclass{memoir}

\begingroup
\catcode`\#=11
\gdef\noautorotate{-dAutoRotatePages#/None}
\endgroup

\usepackage[pspdf=\noautorotate]{auto-pst-pdf}

\usepackage{pstricks}
\begin{document}
\begin{pspicture}(0,0)(1,1)
  \psframe*[linecolor = red](0,0)(9,1)
  \rput{90}{Marienplatz}
\end{pspicture}
\end{document}
  • That made it. Furthermore, you nailed the problem I was having with passing that parameter to ps2pdf through the auto-pst-pdf key-value system. – Marcos Sep 10 '14 at 18:27
3

It has been documented in auto-pst-pdf documentation.

\documentclass{memoir}

\usepackage[pspdf={-dAutoRotatePages=/None}]{auto-pst-pdf}

\ifpdf\else\usepackage{pstricks}\fi

\begin{document}
\begin{pspicture}(4,2)
  \psframe*[linecolor = red](4,2)
  \rput{90}(2,1){cyanide-based food}
\end{pspicture}

\end{document}
  • For some reason unknown to me, this one didn't work on my system. It may work on a Windows platform newer than Xp, though. – Marcos Sep 10 '14 at 18:29
  • This answer was posted at 17:52:19. – kiss my armpit Sep 11 '14 at 5:16
  • Will we ever know your real name? :) +1 anyway :) – cmhughes Sep 11 '14 at 7:28
  • @cmhughes: I lost my self-confidence. :-) – kiss my armpit Sep 11 '14 at 7:55

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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