I am using the gnuplottex package to create plots with gnuplot from inline gnuplot code in my LaTeX documents. I am using pdflatex directly to get PDFs.

I would like to be able to use the \cite command within the gnuplottex instructions. I want to have the citations formatted the same way they are in the rest of my document.

This example illustrates what I would like to do:

plot "data.csv" using 1:2 with lines title "\citet{Papale2006}"

Any ideas how this could be achieved?

Update: I am using the pdf terminal for gnuplottex.

  • 2
    Try with two backslashes instead of a single backslash. – Paul Gaborit Nov 4 '12 at 10:37
  • Thanks, unfortunately this does not help. Also, when using "\citet{ABC}", the single backslash is preserved in the output. It shows up exactly like this in the output .pdf – Nils Blum-Oeste Nov 4 '12 at 13:13
  • My advice works with latex terminal. – Paul Gaborit Nov 4 '12 at 13:53

I solved the issue by using the epslatex terminal mode for gnuplot:


Works nicely with pdflatex and allows to use \citet{ABC} in the gnuplot key.

  • If your are using pdflatex anyway, you can think about switching from epslatex to cairolatex, which should generate pdfs out of the box, without eps as an intermediate step. – John May 27 '16 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.