Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #3863

Re: gnuplot eps figures overwrite latex hyperref settings

Newsgroups comp.graphics.apps.gnuplot
Date 2018-01-19 03:31 -0800
References <erur4s$kik$1@news.lrz-muenchen.de>
Message-ID <66157ac1-2dc6-44ca-a246-840c2e21cd46@googlegroups.com> (permalink)
Subject Re: gnuplot eps figures overwrite latex hyperref settings
From tanzteufel79@gmail.com

Show all headers | View raw


I think I found a solution for the problem.

First of all:

When gnuplot generates an postscript eps file,
it writes a so called prologue into the eps document header
which is usually precompiled into the gnuplot binary. 

The header of a corrupted eps file might look like this: 

SNIP

%!PS-Adobe-2.0 EPSF-2.0
%%Title: history.eps
%%Creator: gnuplot 5.0 patchlevel 5
%%CreationDate: Fri Jan 19 12:15:48 2018
%%DocumentFonts: (atend)
%%BoundingBox: 50 50 410 518
%%EndComments
%%BeginProlog
/gnudict 256 dict def
gnudict begin
%
% The following true/false flags may be edited by hand if desired.
% The unit line width and grayscale image gamma correction may also be changed.
%
/Color true def
/Blacktext false def
/Solid false def
/Dashlength 1 def
/Landscape false def
/Level1 false def
/Level3 false def
/Rounded false def
/ClipToBoundingBox false def
/SuppressPDFMark false def


END SNIP


The last line causes the problem. If one replaces the last line with

/SuppressPDFMark true def

dvipdf stops to overwrite the hyperref pdfinfo settings with the information from the eps file.

One can manually modify the eps file,
but I also found a solution from within the gnuplot script file
which calls sed in order to replace the line in the output eps file 'output_filename':

gnuplot script > system(sprintf("sed -i 's/SuppressPDFMark false/SuppressPDFMark true/g' %s", output_filename));

So far I didn't figure out, how I can make gnuplot load the modified proluge file prologue.ps which usually is delivered with the gnuplot package.

In my distro file is located in

   /usr/share/gnuplot/gnuplot/5.0/PostScript/prologue.ps

If anyone knows a solution for this, then no further efforts have to be spent to solve this annoying bug!

Cheers,

Tim Deutschmann

www.tim-deutschmann.de

Back to comp.graphics.apps.gnuplot | Previous | Next | Find similar


Thread

Re: gnuplot eps figures overwrite latex hyperref settings tanzteufel79@gmail.com - 2018-01-19 03:31 -0800

csiph-web