I want to use gnuplottex to draw graphs in a LaTeX document.
The problem is, gnuplottex doesn't accept any options.

A mwe would be like

\documentclass[a4paper,11pt,titlepage,twoside,openright,toc=listof, toc=bibliography]{scrreprt}  
\usepackage[a4paper, left=4cm, right=2cm, top=2.5cm, bottom=2.5cm]{geometry}



set xrange[0:3.1415]   
set yrange[-1:1]  
set grid 
plot sin(x)



The [shell] option doesn't bother pdflatex, but doesn't help with converting the files either (I have to use pdflatex --shell-escape mwe.tex to compile).

The [subfolder] option is even worse, this produces:

! LaTeX Error: Unknown option `subfolder' for package `gnuplottex'.

See the LaTeX manual or LaTeX Companion for explanation.   Type  H <return>  for immediate help.    ...                                  

l.54 \ProcessOptions\relax


I'm using pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)

Any ideas what might cause this strange behaviour of gnuplottex?

  • oh, also I forgot to mention: \gnuplotloadfile causes an undefined control sequence... :-/ – Knigge46 Apr 27 '15 at 12:29

The shell option tells the package to use code that requires shell escape. This is the default behaviour, so you don't need to explicitly include the option. However, for security reasons you can't enable shell escape for the engine from within a document. You need the --shell-escape option.

I don't think the version of gnuplottex in TeXLive 2009 had the subfolder option. Update your TeX distribution to get rid of this problem.

  • With some trickery I did update my TeX Live distribution (not as simple as I hoped for under Ubuntu 12.04) to TeX 3.1415926 (TeX Live 2012) but that didn't change the error... The MWE throws the same error as before and my normal document throws some more undefined control sequences... That plan failed completely... :-/ – Knigge46 Apr 28 '15 at 7:39
  • @Knigge46 --- you haven't gone far enough! The version of gnuplottex in TeXLive 2012 doesn't have the subfolder option. The version in TL2014 does (I don't know about TL2013). You might get away with just downloading the latest version of gnuplottex from ctan. However, this may cause trouble with other out of date packages. It would be best to install TL2014. – Ian Thompson Apr 28 '15 at 9:51
  • I am just arguing with myself if I should do that just for the sake of keeping my project folder tidy... I actually did download the newest version of gnuplottex and unzipped it to my ~/texmf folder and ran latex on the .ins file. I'm not sure if that installed it correctly, but kpsewhich gnuplottex.sty says /usr/share/texlive/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty... – Knigge46 Apr 28 '15 at 11:35
  • Solved it! (really some time ago, but now I found the source of it!) Loading the newest TeX Live distribution, and then putting gnuplottex in the right folder: ($USER/texmf/tex/latex/gnuplottex) and not directly into the texmf folder did the trick! Thanks for your help @Ian anyway! – Knigge46 May 28 '15 at 12:28

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.