I encounter a very strange problem when using gnuplottex on my Win 7 32 bit system with MiKTeX 2.9 - gnuplot 4.6.3 & the latest gnuplottex release:




\begin{gnuplot}[terminal=pslatex,terminaloptions={dashed auxfile}]
set xlabel '\sz{Test x}'
plot sin(x)

Here are the last lines of my log file:

Opening gnuplot stream test-gnuplottex-fig1.gnuplot
runsystem(gnuplot test-gnuplottex-fig1.gnuplot)...executed.

Package gnuplottex Info: test-gnuplottex-fig1.gnuplot converted on input line 1

! Undefined control sequence.
\sz ->\small 

l.10 ...9,140){\makebox(0,0){\strut{}\sz{Test x}}}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

) [1] (D:\notebooks\data\cmds\test.aux) )

Was is going wrong here? This is weird, since some days ago it worked and it seems to me that I didn't change something...

If you just use


everything's fine.

The same message was encountered here: Gnuplottex basic example fails with 'undefined control sequence' but it was solved by updating the package.

Every suggestion is greatly appreciated!


the documentclass minimal doesn't know anything about fontsize macros. Use article instead. However, \small has no argument, it is a switch. Use

{\sz Test x}  

And, by the way, the error message comes from LaTeX not Gnuplot

| improve this answer | |

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