[OS X TeX] wrting algorithm

Akshay Gulati geekpotter at gmail.com
Mon Apr 13 05:12:15 EDT 2009


I am trying to write a algorithm in my paper, and including following  
script (given below) but \SetLine is giving error as undefined sequence


\begin{algorithm}[H]
\SetLine
\KwInput{M,N \in N \\
                   x_j \in [\frac{-1}{2}\frac{1}{2}]}
\KwResult{how to write algorithm with \LaTeX2e }
initialization\;
\While{not at end of this document}{
read current\;
\eIf{understand}{
go to next section\;
current section becomes this one\;
}{
go back to the beginning of current section\;
}
}
\caption{How to write algorithms}
\end{algorithm}

Thanks

Aki



More information about the MacOSX-TeX mailing list