I'm trying to specify an algorithm in pseudocode in a LaTeX document, but I'm having trouble with the for-Loop. My statement:
\for{$bin=0 to binCount$}
\item blablabla
\endfor
keeps on generating the error "Undefined Control Sequence". I also tried the usual for-notation (bin=0;bin<binCount;bin++
).
I have not defined any of the variables before, nor do I want to do that; I just want LaTeX to print exactly what I'm writing in an algorithm layout.
Is there a way to "switch off" this sort of code interpretation? What exactly am I doing wrong?
Add'l information: I have stated bot the algortihm and algorithm
environment. Without this for-Loop, it generates the document without any errors. The \item
statement is just a filler.
\state
instead of\item