[tex-k] dvips possible-bug/feature-request

Ethan Merritt merritt at u.washington.edu
Mon Apr 23 22:31:56 CEST 2007

On Sunday 22 April 2007 07:59, gual News wrote:
> Hello all,
> I am continuing the discussion about the headers in postscript files
> generated by gnuplot that override the settings in LaTeX documents made via
> hyperref.

It is not fair to say that the pdfmark information in these files "overrides"
the global settings.  Rather you should say that the application program
(dvips or whoever) incorrectly treats the information as global rather than

The _pdfmark Reference Manual_ has this to say about applications that
embed *.eps files containing pdfmarks:

  It is strongly recommended that applications embedding EPS files wrap the embedded
  PostScript between NamespacePush and NamespacePop to insulate the overall PostScript
  document from the consequences of multiply-defined object names.

page 57

> Instead of introducing any modification to dvips, as I initially 
> suggested, maybe the easiest solution would be to introduce a configuration
> option when compiling gnuplot that allowed to suppress such information
> (which is unnecessary if you intend to include the plot in a TeX file,
> instead of using it as a standalone graphics file). For instance, one might
> add the option "--enable-psheaderinfo" to the configure script, which would
> then define the variable "INCLUDEPSHEADERINFO", and apply the attached patch
> to the file "term/post.trm" (if Haralds and Ethan find this solution
> reasonable). Or maybe it would be better to make this an option that might
> be set at run time?

I oppose any compile-time option, as this would be of no use to people
running a pre-built executable.  My inclination would be to give this part
of the file header its own locally-configurable prolog file, just as the
main PostScript prolog and the character encoding prologs have been broken
out into external files.  It would be a little trickier, however, since
specific values such as plot title would have to be slotted into the correct
space within the prolog boilerplate.

Ethan A Merritt

More information about the tex-k mailing list