I have the following Latex code, which defines the \fmiso command with the command \def, but it seems that this definition does not work.
What is wrong?
...
\usepackage{epsfig}
\usepackage{subfigure}
\usepackage{calc}
\usepackage{amssymb}
\usepackage{amstext}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{multicol}
\usepackage{pslatex}
\usepackage{apalike}
\usepackage{SCITEPRESS}
\graphicspath{ {images/} }
\subfigtopskip=0pt
\subfigcapskip=0pt
\subfigbottomskip=0pt
\def\fmiso{\mbox{FMI-S$_O$}\xspace}
\def\fmis{\mbox{FMI-S}\xspace}
\begin{document}
...
which is the model implemented in \fmiso
...
Then I am getting the error:
Undefined control sequence... which is the model implemented in \fmiso
What am I doing wrong?
Best Answer
Another case of TeX's error messages being cryptic. I'm getting this full error:
So (at least for me, in this minimal example),
\fmiso
gets expanded just fine. The "undefined control sequence" is always the last one on the line printed, in this case\xspace
.This is a bit clearer if we add another command inside the
\fmiso
definition, which is then shifted to the next line:I could resolve it simply by adding:
Aside: in LaTeX, it's better to use LaTeX to define new commands: