Reputation: 345
As written in the title, I am trying to create a multipage pdf with gnuplots cairolatex terminal.
I am using gnuplot 5.4
in cygwin.
Single page works fine, i.e.
./gnuplot-script
pdflatex plot.tex
However when I plot multiple pages in the gnuplot-script, the output .tex file seems to contain errors .. E.g. the gnuplot-script
set terminal cairolatex standalone
set output "plot.tex"
plot x
plot x**2
outputs a plot.tex
that contains two \documentclass{minimal}
and pdflatex
then complains with
! LaTeX Error: Can be used only in preamble.
...
l.181 \documentclass
{minimal}
I can workaround this by putting each plot into a new file, but it seems a bit strange that simple multipage output is bugged in this terminal?
Am I missing some special command to start a new page in the cairolatex terminal or something? I don't see anything in the documentation for this ..
Upvotes: 0
Views: 206
Reputation: 15118
If you really need to create a TeX-based multipage pdf file directly from gnuplot, I suggest to use the tikz
terminal rather than cairolatex
.
set terminal tikz standalone
set output "plot.tex"
plot x
plot x**2
unset output
!pdflatex plot
Upvotes: 1