[tex-k] header special extension proposal

Hendri Adriaens Hendri at uvt.nl
Fri Aug 19 09:18:01 CEST 2005

> 	perl fixeps.pl < figure.ps > figure.pro
> 	tex test1
> 	dvips -o test1.ps test1

Ok, tried that, see below.

> Both tests also work with xdvi.

It doesn't work with ghostview or yap. The reason is that you insert Thomas'
code inside the picture, while you should add it around it, putting the
picture inside a %%BeginDocument: somefile.ps ... %%EndDocument.

A small piece from test1.ps:
%%Page: 1 1
/myimagedata currentfile << /Filter /SubFileDecode /DecodeParms << /EODCount
0 /EODString (*EOD*) >> >> /ReusableStreamDecode filter

%%Page: 1 1 is inside the ps header/setup section. Ghostscript doesn't like
that as it is not building pages at that moment. It will start doing that
after seeing %%EndSetup. It will also complain about the %%EOF inside the
picture. The solution is to have a scheme like this:

<header from Thomas Greer>
<the entire figure>
<End-Of-Document string defined in Thomas' header>
<footer from Thomas Greer>

Notice that I've chosen another EOD string to hope to have a unique string
that doesn't show up inside the figure data: *HA-EOD-??3.1416926!!* Notice
that wrong digits (on purpose).

Although it is a nice alternative to modifying dvips, the obvious remark
would be that this requires an additional step with an external program that
most users won't know about even where to get it...

Probably, this all sounds very unfriendly, but your input and different
approach is certainly appreciated!

Best regards,

PS: the dvi files from the grahpicx-add package do work with yap.

More information about the tex-k mailing list