# Gnuplottex fails with 'undefined control sequence' when choosing different font size [duplicate]

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:

\documentclass[dvips]{minimal}

\newcommand{\sz}{\small}

\usepackage[miktex]{gnuplottex}

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


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
8.

(D:\notebooks\data\cmds\test-gnuplottex-fig1.tex
! 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

\newcommand{\sz}{}


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!

-

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

–  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

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}
`