[OS X TeX] TeXShop 2.07

Gerben Wierda Gerben.Wierda at rna.nl
Tue Jan 10 16:39:14 EST 2006


On 10 Jan 2006, at 21:11, Maarten Sneep wrote:

> On 10 Jan 2006, at 3:14, Richard Koch wrote:
>
>> 	2) Peter Dyballa convinced me to call the ghostscript command ps2pdf
>> 	rather than the teTeX script epstopdf when opening an eps file
>> 	and converting it to pdf. (If the user selected Apple's distiller  
>> in the
>> 	TeXShop distiller preference, then as before /usr/bin/pstopdf is  
>> used.)
>> 	This fixes a problem much discussed in the last few days converting
>> 	a particular eps file to pdf.
>
> Please revert back to epstopdf. ps2pdf completely ignores the  
> bounding box, which is far more irritating than not being able to  
> convert some particular eps file. These files can either be  
> converted by hand, or with a shell script:
>
> From a later mail by Peter:
>
>> # The only thing I have not allowed for is the case of
>> # "%%BoundingBox: (atend)", which is more complicated.
>>
>> When the EPS file has in its header
>>
>> 	%%BoundingBox: (atend)
>>
>> which is accompanied by a
>>
>> 	%%BoundingBox: 17 49 541 702
>>
>> in the footer.
>
> If that is the problem, the following script should fix the broken  
> eps file (please try it on a copy first). It should do no harm on  
> other eps files.
>
> #!/bin/bash
> # usage: atend-fixer infile outfile
> epsfile="$1"
> tmpepsfile="$2"
>
> # obtain the good bounding box line
> bboxline=`grep '^%%BoundingBox' "$epsfile" | grep -v '(attend)'`
>
> # replace the broken line with the good bounding box line.
> sed "s/^%%BoundingBox: (atend)/$bboxline/" < "$epsfile" >  
> "$tmpepsfile"
>
> # end of script.

Won't work or I would have put it in epstopdf (which I seem to be the  
maintainer of these days). Reason: there can be stuff included which  
has its own bbox and if that happens your grep finds multiple  
lines.The same is true for the atend line.

It is the recursion that is the problem.

G
------------------------- 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 Archive: http://tug.org/pipermail/macostex-archives/




More information about the MacOSX-TeX mailing list