[OS X TeX] Undesired Rotated Figure in PSTricks

Vince McGarry vmcgarry at austin.rr.com
Mon May 16 08:05:18 CEST 2005


Hi,

I'm having a problem that I think may be related to dvips. Rotations  
are occurring that I can neither explain nor fix. I am enclosing a  
few files with comments. My desire is to get things working again  
with Herb Schulz's version of ps4pdf, however the rotation problem  
seems to even affect the display in TeXShop's pdf viewer when  
compiling with latex-dvips-gs. I seem to remember a discussion about  
this a while back, but can't find it.


Vince McGarry

This is a test file for TeX and Ghostscript. This compiles correctly,  
but the whole document ends up rotated in the previewer. Of course,  
this can be corrected with the rotate menu item. The keyboard  
shortcut for rotating the pdf doesn't seem to work for me.

%---------

\documentclass[11pt]{article}

\usepackage{multido}

     \usepackage{pstricks}
     \usepackage{pst-node}

\begin{document}
\newcommand{\Salary}[1]{#1}
         \begin{pspicture}(1.5,-2.5)(10.5,3.5)
             \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}

         \begin{pspicture}(1.5,-2.5)(10.5,3.5)
             \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}

\renewcommand{\Salary}[1]{#10,000}
         \begin{pspicture}(1.5,-2.5)(10.5,3.5)
             \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{document}

%---------

This is the same file but for ps4pdf. Herb Schulz's script (thanks  
again, Herb---it's worked beautifully) compiles the document twice:  
the first time to create a pdf file with the pictures; the second  
time to create the pdf file. Herb informs me that he tried this with  
pdftricks, as well, with the same result. Some of these are rotated,  
some are not. The log clearly says so! This from the end of the log:

<Graph_Test-pics.pdf, id=1, page=1, 171.72156pt x 257.08044pt>
<use Graph_Test-pics.pdf, page 1>
<Graph_Test-pics.pdf, id=2, page=2, 257.08044pt x 171.72156pt>
<use Graph_Test-pics.pdf, page 2>
<Graph_Test-pics.pdf, id=3, page=3, 171.72156pt x 257.08044pt>
<use Graph_Test-pics.pdf, page 3> [1{/usr/local/teTeX/share/ 
texmf.local/fonts/m
ap/pdftex/updmap/pdftex.map} <./Graph_Test-pics.pdf, page is rotated  
90 degrees
 > <./Graph_Test-pics.pdf>] [2 <./Graph_Test-pics.pdf, page is  
rotated 90 degree
s>] (./Graph_Test.aux) )</usr/local/teTeX/share/texmf.tetex/fonts/ 
type1/bluesky
/cm/cmr10.pfb>
Output written on Graph_Test.pdf (2 pages, 13599 bytes).
Transcript written on Graph_Test.log.

Here's the file.

%---------

\documentclass[11pt]{article}

\usepackage{ps4pdf}
\usepackage{multido}

\PSforPDF{%
     \usepackage{pstricks}
     \usepackage{pst-node}
}

\begin{document}
\newcommand{\Salary}[1]{#1}
\PSforPDF{%
         \begin{pspicture}(1.5,-2.5)(10.5,3.5)
             \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}
}

\PSforPDF{%
         \begin{pspicture}(1.5,-2.5)(10.5,3.5)
             \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}
}

\renewcommand{\Salary}[1]{#10,000}
\PSforPDF{%
         \begin{pspicture}(1.5,-2.5)(10.5,3.5)
             \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{document}

--------------------- 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