[OS X TeX] Rotated Figures Again.

Bruno Voisin bvoisin at mac.com
Mon Aug 15 18:04:00 EDT 2005

Le 15 août 05 à 23:10, Peter Dyballa a écrit :

> Am 15.08.2005 um 21:59 schrieb Herbert Schulz:
>> Is there a way to have altpdftex (called when tex+ghostscript is  
>> invoked) pass that option to ps2pdf13? I'd like to give this  
>> person a solution to his problem.
> Yes, there is! At least in the version I am using. For me altpdf(la) 
> tex is a symlink to simpdftex, version 2.18.
> The argument would be: ``--distiller "pdf2pdf13 -dAutoRotatePages=/ 
> None"´´ -- but: the script then uses the string 'pdf2pdf13 - 
> dAutoRotatePages=/None' as programme name, and so it fails.
> A workaround would be a little script with this contents:
>     #!/bin/sh
>     ps2pdf13 -dAutoRotatePages=/None "$@"
> and passing this script's name as the argument for the --distiller  
> option. Don't forget 'chmod 755 <script>'!

Thanks for the tip. I had been for the last hour or so reading  
<file:///usr/local/share/ghostscript/8.51/doc/Ps2pdf.htm>, then  
trying in TeXShop to add the option --distiller "ps2pdf - 
dAutoRotatePages=/None" to the altpdflatex script, with no luck: I  
was always getting

### ps2pdf -dAutoRotatePages=/None /tmp/altpdflatex.2377-1124141934/ 
testherb.ps /tmp/altpdflatex.2377-1124141934/testherb.pdf
/usr/local/teTeX/bin/powerpc-apple-darwin-current/altpdflatex: line  
538: ps2pdf -dAutoRotatePages=/None: No such file or directory
### FAILED to generate /tmp/altpdflatex.2377-1124141934/testherb.pdf ()

and I was all the more confused since "ps2pdf -dAutoRotatePages=/None  
testherb.ps" does work from the command line.

This is exactly what you're explaining: the argument of the -- 
distiller option of altpdftex is interpreted as a command name, and  
cannot be a composite such as "ps2pdf -dAutoRotatePages=/None".

I had been trying to use in Terminal, in bash:

     export GS_OPTIONS

but that seems to only affect the current Terminal window, not all  
processes. I was considering modifying /usr/local/bin/ps2pdfwr  
permanently, but your solution is much cleverer and much cleaner.

I'm wondering now: if the above lines

     export GS_OPTIONS

were added in ~/.profile, would they affect (after starting a new  
session) all gs processes, including those launched from TeXShop via  
the altpdftex script? I guess not, TexShop defines its own  
environment variables for the subprocesses it launches, as in / 
Applications/TeXShop.app/Contents/Resources/altpdflatexc.bxx, isn't it?

Bruno--------------------- 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 MacOSX-TeX mailing list