I was using algorithmic
and algorithm
to write algorithm:
\usepackage[noend]{algorithmic}
\usepackage{algorithm}
\renewcommand{\algorithmicrequire}{\textbf{Input: }}
\renewcommand{\algorithmicensure}{\textbf{Output: }}
and now I need to use algorithmicx
instead of algorithmic
, in order to use \algstore{myalg}
. Since my algorithm is too long to fit in one page.
\usepackage{algorithm}
\usepackage{algorithmicx}
\algnewcommand\algorithmicinput{\textbf{Input:}}
\algnewcommand\algorithmicoutput{\textbf{Output:}}
After I compiled the Tex
file, I got the following error:
! Undefined control sequence.
l.219 \REQUIRE
SO how to resolve the issue?
thanks
Best Answer
Consider using
\Require
instead of\REQUIRE
. LaTeX is case-sensitive. Here's a small example with\Require
which I made for my next LaTeX book, as a demo showing several features.For completeness, in the LaTeX-Community forum the question was posted in this thread: "How to continue displaying an algorithm if it is too long".