I have an algorithm defined under figure container. For some reason I am getting a strange error in the conditional expression of the second If block statement.
\begin{figure}
\begin{flushleft}
\textbf{Function}: Function\\
\textbf{Output}: Some function\\
\end{flushleft}
\begin{algorithmic}[1]
\For{ $u \in V$}
\If { $MyFu(u,v) \wedge MyFu(v,u)$ }
%something
\Else
%something else
\EndIf
\\
\If{$v \textless w \vee ( w \textless v \wedge u \textless w \wedge \invneg Func(u,w) )$}
%something
\EndIf
\EndFor
\end{algorithmic}
\caption{My algorithm}
\label{fig:function}
\end{figure}
The errors that I get are the following.
LaTeX Warning: Command \textless invalid in math mode on input line 117.
LaTeX Warning: Command \textless invalid in math mode on input line 117.
LaTeX Warning: Command \textless invalid in math mode on input line 117.
! Undefined control sequence.
<argument> ...\wedge u \textless w \wedge \invneg
Func(u,w) )$
l.117 ...ess w \wedge \invneg Func(u,w) )$}
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.
Can anyone suggest what maybe wrong in the conditional expression of second if statement ? Also, how to remove the warning ? Thanks
\textless
is a symbol for text, use<
instead, plus\textless
may requiretextcomp
package to work in text. But there is no need to use\textless
as a symbol in math\invneg
is an unknown command. Either you load a package where it is defined or you define it (i.e.,\newcommand{\invneg}{...}
)