[OS X TeX] Undesired Rotated Figure in PSTricks

Herb Schulz herbs at wideopenwest.com
Mon May 16 18:40:57 CEST 2005


On 5/16/05 9:57 AM, "Maarten Sneep" <maarten.sneep at xs4all.nl> wrote:

> 
> It is related to the epstopdf script. It tries to be smart when
> deciding the orientation of a pdf when generating it from an eps
> file. A bit too smart for its own good. You can either try to use
> pstopdf (which is Apple's converter), or dig inside the epstopdf
> script and fix it*. Cheating is allowed: adding invisible, unrotated
> text will fool the algorithm, and force the figure to be in the
> orientation you expect (or at least the is what I heard).
> 
> Maarten
> 
> * Although I have version 2.9.1 draft on my machine, and it seems to
> have fixed tissue already:
> #  2004/03/17 v2.9.1draft (Gerben Wierda)
> #    * No autorotate page
> 

Howdy,

I've got the version with Gerben's change and I still have that item
rotated.

I even get it rotated when I convert the file to use a pdftricks that uses
the altpdflatex+pdfcrop method to convert each individual graphic.

I've translated the file into a pdftricks version since I'm more familiar
with that:

%!TEX TS-program = pdflatex
% Graph_Test.tex
\documentclass[11pt]{article}

\usepackage{pdftricks}

%\NoProcess[1-3]

\begin{psinputs}%
\usepackage{multido}
\usepackage{pstricks}
\usepackage{pst-node}
\newcommand{\Salary}[1]{#1}
\end{psinputs}

\begin{document}
\begin{pdfpic}%
\begin{pspicture}(1.5,-2.5)(10.5,3.5)%\showgrid
\psline(2,0)(10,0)
\multido{\iA=2+1}{9}{\psline(\iA,-0.2)(\iA,0.2)\uput{24pt}[-90]{90}(\iA,0.5)
{\Salary{\iA}}}
\end{pspicture}
\end{pdfpic}       

\begin{pdfpic}%
\begin{pspicture}(1.5,-2.5)(10.5,3.5)%\showgrid
\psline(2,0)(10,0)
\multido{\iA=2+1}{9}{\psline(\iA,-0.2)(\iA,0.2)\uput{24pt}[-90]{90}(\iA,0.5)
{\Salary{\iA}}}
\psline(2.5,0.8)(2.5,1.2)
\psline(9,0.8)(9,1.2)
\psline(4,2.3)(4,2.7)
\psline(8,2.3)(8,2.7)
\psline(2.5,1)(9,1)
\psframe[fillstyle=solid,fillcolor=lightgray](3.5,0.5)(5,1.5)
\psline(4,0.5)(4,1.5)
\psline(4,2.5)(8,2.5)
\psframe[fillstyle=solid,fillcolor=lightgray](4.5,2)(6.5,3)
\psline(5.5,2)(5.5,3)
\pcline[linestyle=none](6.5,2.5)(8,2.5)
\bput{0}{Opera}
\pcline[linestyle=none](5,1)(9,1)
\bput{0}{Country}
\end{pspicture}
\end{pdfpic}       

\begin{pdfpic}%
\renewcommand{\Salary}[1]{#10,000}
\begin{pspicture}(1.5,-2.5)(10.5,3.5)%\showgrid
\psline(2,0)(10,0)
\multido{\iA=2+1}{9}{\psline(\iA,-0.2)(\iA,0.2)\uput{24pt}[-90]{90}(\iA,0.5)
{\Salary{\iA}}}
\psline(2.5,0.8)(2.5,1.2)
\psline(9,0.8)(9,1.2)
\psline(4,2.3)(4,2.7)
\psline(8,2.3)(8,2.7)
\psline(2.5,1)(9,1)
\psframe[fillstyle=solid,fillcolor=lightgray](3.5,0.5)(5,1.5)
\psline(4,0.5)(4,1.5)
\psline(4,2.5)(8,2.5)
\psframe[fillstyle=solid,fillcolor=lightgray](4.5,2)(6.5,3)
\psline(5.5,2)(5.5,3)
\pcline[linestyle=none](6.5,2.5)(8,2.5)
\bput{0}{Opera}
\pcline[linestyle=none](5,1)(9,1)
\bput{0}{Country}
\end{pspicture}
\end{pdfpic}
    
\end{document}

and processed it with the version of pdftricks in which I've changed the
processing steps and it still doesn't work. However, if I then drop the
Graph_Test-fig*.tex files produced for each figure onto my DropPdft-fig2Pdf
Dropscript, which should be processing the files in an identical fashion,
the Graph_Test-fig*.pdf files are correct! Uncommenting the \NoProcess line
in the Graph_Test.tex file above and compiling with pdflatex then gives the
correctly oriented figures. I still haven't been able to figure out what the
difference in processing steps does. In my pdftricks package I use a
altpdflatex->pdfcrop sequence, in the Dropscript I use
latex->dvips->ps3pdf13->pdfcrop. If I change the pdftricks file to directly
use the same processing as the Dropscript I still get rotated figures.
Sigh...

I'll look into this further.

Good Luck,

Herb Schulz
(herbs at wideopenwest.com)

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the macostex-archives mailing list