I would like to adjust column width in algorithm below:
\usepackage{amsmath,amssymb}
\usepackage[norelsize, linesnumbered, ruled, lined, commentsnumbered]{algorithm2e}
\begin{document}
%\begin{minipage}[t]{0.5\linewidth}
\begin{algorithm*}
\DontPrintSemicolon
\KwIn{This is a input lines.}
\KwOut{$n$ shadow images $S_1,S_2,\dots, S_n$. }
\For{$(i=0;i< M;i++)$}{
\For{$(j=0;j<\frac{N}{d};j++)$}{
Assign $a_0,a_1,\dots,a_{k-1}$ as follows:\;
}
}
\caption{This is a long caption of the algorithm. So I need to break this long line into small multiple lines.} \label{Alg:1}
\end{algorithm*}
%\end{minipage}
\end{document}
Unfortunately whenever I am going to use minipage, occurs error. I can I fix this?
algorithm*
seems to be a floating environment, so it can't go in aminipage
the same way afigure
can't. Try moving theminipage
inside thealgorithm*