This is a tricky question.
Say I generate an image in gnuplot using the pslatex terminal:
gnuplot<plot.plt
latex dummy.tex
dvips -E -oimage.eps dummy
where 'plot.plt' contains:
set term pslatex
set output "graph.tex"
plot "..."
and where 'dummy.tex' reads:
\documentclass{article}
\pagestyle{empty}
\begin{document}
\input graph.tex
\end{document}
I then include this 'image.eps' file in a 'main.tex' document and compile it:
latex main
dvips main -o
ps2pdf main.ps
This generates a 'main.pdf' file.
I find it quite strange but I have noticed that when I open 'main.pdf', the document title which will appear in the menu bar of the document viewer I use (evince) will be 'graph.tex' rather than 'main.pdf'.
If I modify the .eps file with a text editor (say, vim), and replace the text 'graph.tex' by something else in the .eps file, then compile the latex file, this will change what appears in the menu bar when I open my 'main.pdf' file.
Here, I would like to know if there is also a way to change the document title which appears in this menu bar using latex, when I do not have figures. Supposedly there should be I believe. How can I do that?
Thank you in advance for your help.
Best Answer
This is caused by the following lines which gnuplot puts in
graph.tex
:I can't find anything in the gnuplot manual that prevents this behaviour, so I suggest editing the file and putting percentage symbols before
/Title
,/Subject
,/Creator
and/Author
. Otherwise your figures are likely to interfere with other methods of inserting metadata into the pdf. Doing this manually is likely to be cumbersome if you have a lot of files, though.EDIT
Gnuplot can issue system commands, so you can use a utility such as
sed
to automatically change the filegraph.tex
.I think this will work on any unix machine.