For the document below, I'm getting errors, shown below, when using \vv
in the algorithmic
environment. If I change to \vec
, there is no error. What can I do to continue using \vv
?
\documentclass{article}
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{esvect}
\begin{document}
$\vv{p}$
\begin{algorithmic}
\Procedure{$Eval$}{$rm$,$\vv{p}$}
\EndProcedure
\end{algorithmic}
\end{document}
The errors are:
Undefined control sequence. \Procedure{$Eval$}{$rm$,$\vv{p}$}
Argument of \@firstoftwo has an extra }. \Procedure{$Eval$}{$rm$,$\vv{p}$}
Paragraph ended before \@firstoftwo was complete. \Procedure{$Eval$}{$rm$,$\vv{p}$}
Argument of \mathpalette has an extra }. \Procedure{$Eval$}{$rm$,$\vv{p}$}
Paragraph ended before \mathpalette was complete. \Procedure{$Eval$}{$rm$,$\vv{p}$}
Incomplete \iffalse; all text was ignored after line 9.
Best Answer
The real error message is
The problem is that
\Procedure
has “moving arguments”, so fragile commands such as\vv
have to be protected. Either useor make the command robust at the outset:
In my opinion you should use
to get uniform spacing.