X-Received: by 10.36.182.76 with SMTP id d12mr8681532itj.11.1516361469064; Fri, 19 Jan 2018 03:31:09 -0800 (PST) X-Received: by 10.157.1.22 with SMTP id 22mr391265otu.0.1516361468571; Fri, 19 Jan 2018 03:31:08 -0800 (PST) Path: csiph.com!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!w142no655234ita.0!news-out.google.com!b73ni2227ita.0!nntp.google.com!w142no655228ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.graphics.apps.gnuplot Date: Fri, 19 Jan 2018 03:31:08 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=80.140.229.252; posting-account=ozhQEwoAAAB4UT9sM85ak9U52HDadHns NNTP-Posting-Host: 80.140.229.252 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <66157ac1-2dc6-44ca-a246-840c2e21cd46@googlegroups.com> Subject: Re: gnuplot eps figures overwrite latex hyperref settings From: tanzteufel79@gmail.com Injection-Date: Fri, 19 Jan 2018 11:31:09 +0000 Content-Type: text/plain; charset="UTF-8" Lines: 65 Xref: csiph.com comp.graphics.apps.gnuplot:3863 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