Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This question already has an answer here:

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!

share|improve this question

marked as duplicate by egreg, lockstep, Werner, Speravir, Andrew Swann Apr 29 '13 at 8:53

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you. –  Papiro Apr 28 '13 at 11:51
See Why should the minimal class be avoided? –  egreg Apr 28 '13 at 12:05
@egreg: it should only be avoided when a font problem appears. In other cases it is very useful! –  Herbert Apr 28 '13 at 12:26
add comment

1 Answer 1

up vote 5 down vote accepted

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

share|improve this answer
add comment

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