[OS X TeX] TeXShop 2.07

Jonathan Kew jonathan_kew at sil.org
Wed Jan 11 00:06:22 CET 2006


On 10 Jan 2006, at 10:33 pm, Maarten Sneep wrote:

> On 10 Jan 2006, at 23:17, Peter Dyballa wrote:
>
>> Am 10.01.2006 um 22:58 schrieb Maarten Sneep:
>>
>>> OK. So the solution is to fix the software that created these  
>>> (atend) files. Would the last bounding box in the file be the  
>>> outer-most one (and therefore the bounding box you're looking  
>>> for?) If I understand PS correctly, only the first bounding box  
>>> should make a difference, so replacing the other %%BoundingBox:  
>>> (atend) lines with the final bounding box should do no harm.
>>
>> This is part of the offcial EPSF documentation (5002.EPSF_Spec.pdf):
>>
>> 	The DSC elementary type (atend) may be used to defer bounding box
>> 	data to the end of the EPS file. This means an application may  
>> need to
>> 	parse through the %%Trailer comments to obtain the bounding box  
>> data.
>
> So that should be the last one in the file, and the first (atend)  
> should be replaced. Slightly different script, but not too hard.

Another "gotcha" if you're aiming for a reasonably robust script:  
line-end conventions.

An EPS file might have Unix, DOS, or Mac line-ends; PostScript  
doesn't care. But typical Unix tools like grep probably won't deal  
with this very well. Worse still, the line ends might vary within the  
file, especially if (for example) someone used classic Mac software  
to create an EPS, placing in it another EPS that was created on  
Windows. All sorts of weird and wonderful combinations are possible.

You might be tempted to run something that normalizes the line-ends,  
but that's dangerous too, as there could be binary data within the  
EPS. So a more cautious approach is needed.

JK

------------------------- 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 macostex-archives mailing list