I am using algorithm2e
package to write an algorithm. I have somewhat long input description. I want to organize it in a list. My document is 2 column so I also need the input list to be alighed with my column width. I tried the following but it looks missy.
% This version uses the latex2e styles, not the very ancient 2.09 stuff.
\documentclass[letterpaper,twocolumn,10pt]{article}
\usepackage[]{algorithm2e}
\begin{document}
\begin{algorithm}[]
\SetKwData{Left}{left}\SetKwData{This}{this}\SetKwData{Up}{up}
\SetKwFunction{Union}{Union}\SetKwFunction{FindCompress}{FindCompress}
\SetKwInOut{Input}{input}\SetKwInOut{Output}{output}
\Input{
\begin{itemize}
\item [($a_i,b_i$),($a_{i+1},b_{i+1}$),..etc.] list of tuples for start-end etc etc etc etc etc etc etc etc
\item [($c_i,d_i$),($c_{i+1},d_{i+1}$),..etc.] list of tuples for start-end etc etc etc etc etc etc etc etc
\end{itemize}
}
\Output{A partition of the bitmap}
\BlankLine
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}
\end{document}
This is the output I get:
Best Answer
There are different possibilities; it all depends on what you want. Here are some possibilities.