[OS X TeX] I do like ps4pdf
Ross Moore
ross at ics.mq.edu.au
Sun Feb 6 20:51:53 EST 2005
On 07/02/2005, at 4:57 AM, Herb Schulz wrote:
> #!/bin/sh
> location=$(dirname "$1")
> basefname="${location}/`basename "$1" .tex`"
> # process the figures
> latex "$1"
> dvips -Ppdf -o "${basefname}-pics.ps" "${basefname}.dvi"
> ps2pdf13 "${basefname}-pics.ps" "${basefname}-pics.pdf"
> /bin/rm "${basefname}-pics.ps" "${basefname}.dvi"
> #process the file (once)
> pdflatex --shell-escape "$1"
>
> This will leave the extra file file-pics.pdf, where `file' is the
> original
> base file name without the extension. By the way, all the extra double
> quotes are to take care of possible problems with directories with
> spaces in
> their names, Sigh...
>
> Once the figures are all the way you want them to be just compile the
> document with pdflatex alone and the figures in the file-pics.pdf file
> will
> be properly placed. Very Nice!
>
> As far as I can tell the only time you run into ``trouble'' is if you
> want
> to convert the figures in the file-pics.pdf file back into individual
> .eps
> figures. Then you've got to do something about the `seq' command.
Have a look at the command-line switches -E -S1
for dvips .
-E ==> make encapsulated PostScript (EPS) files
-S 1 ==> 1 per page
and use -o <output-prefix>.eps to get the .eps suffix
on the files that are produced.
However, you have to be careful, in the LaTeX source, with graphics
created using packages that employ \special commands for drawing.
It's often a good idea to enclose these in a \framebox{...},
so that dvips can find the correct bounding-box size.
Or use \fcolorbox{white}{...}
or \fcolorbox[white]{white}{...}
to adjust the frame's color to that of the page (assuming white).
>
> If this can be simplifies further please let me know.
>
> 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>
>
>
>
------------------------------------------------------------------------
Ross Moore ross at maths.mq.edu.au
Mathematics Department office: E7A-419
Macquarie University tel: +61 +2 9850 8955
Sydney, Australia fax: +61 +2 9850 8114
------------------------------------------------------------------------
--------------------- 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