So I'm not experienced with the algorithm packages in LaTeX. I'm assuming there must be a way to do
if condition1 and condition2 then…
but I can't find it. I've checked what I can find of the documentation. If I compile the below I get an error for undefined command at the \And. It looks like there is something in algorithm, using \AND
, but that doesn't work here and I don't really understand what's going on.
\documentclass{article}
\usepackage[noend]{algpseudocode}
\usepackage[nothing]{algorithm}
\algrenewcommand{\algorithmicrequire}{\textbf{Input:}}
\algrenewcommand{\algorithmicensure}{\textbf{Output:}}
\begin{document}
\begin{figure}
\begin{algorithmic}
\If{$x> y$ \And $ x<z$}
\State{some code here}
\EndIf
\end{algorithmic}
\end{figure}
\end{document}
Is there a way to do what I'm after?
Best Answer
I could not find a
\And
command but we can make one:and add some space...
Thanks: @Werner