[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ps2pdf and LaTeX's seminar style

Tom and Rafael,

So far that was the only solution that worked fine for me. pdflatex
still have some problems dealing with eps files so that ps2pdf is the
only alternative I can use. I consider that the way ps2pdf handles the
landscape clause (or better say ignore!) is a bug, and I wonder if this
should not be reported as one to gs guys.  For the moment, I'm using the
following to 'automate' the editing of the ps files (following Rafael):

[user@machine]$ latex file.tex
[user@machine]$ dvips -Ppdf -t landscape file.dvi -o file.ps
[user@machine]$ sed "s/ \@landscape/ << \/PageSize [792 612] \/Orientation 0 >> setpagedevice/" file.ps | ps2pdf - file.pdf 

The above can be embedded into a shell script to handle the file name
parameter. For instance:

[user@machine]$ cat myps2pdf
sed "s/ \@landscape/ << \/PageSize [792 612] \/Orientation 0 >> setpagedevice/" $1.ps | ps2pdf - $1.pdf

so that the whole thing would be called as (someone might try to handle
the file extension in a better way)

[user@machine]$ latex file.tex
[user@machine]$ dvips -Ppdf -t landscape file.dvi -o file.ps
[user@machine]$ myps2pdf file 

I'm using dvips 5.86 and gs 6.01. You might need to "tune up" the
regexps until you get the desired result. Hope this help.


Reply to: