Search code examples
latexpdflatexbiblatex

Latex writ only until the middle of the page


am try to type a a pseudo code of an algorithme in latex it work fine but it just writ until the midle . and the rest stay empty .. here is the source

\documentclass{IEEETran}
\usepackage{algpseudocode} 
\usepackage{algorithm}
\begin{document}
\begin{algorithm}
\caption{GPX operator}
\hspace*{\algorithmicindent} \textbf{Input} s1 = $\lbrace V^{1}_{1}; ... ; V^{1}_{k}\rbrace$ and  s2 = $\lbrace V^{2}_{1}; ... ; V^{2}_{k}\rbrace$ - parent solutions. \\
 \hspace*{\algorithmicindent} \textbf{Output} $ s = \lbrace V_{1}; ... ; V_{k}\rbrace$ - offspring solution. \\
\begin{algorithmic}[1]
\For {$l(1\leq l \leq k)$}
\If{($l$ is odd)}
\State A=1

\Else
\State  A=2;
 \EndIf
 \State choose $i$ such that $V^{A}_{i}$  has a maximum cardinality
\State $V_{l}$=$V^{A}_{i}$
\State remove the vertices of  $V_{l}$ from $s1$ and $s2$
\EndFor
\State Assign randomly the vertices of $V - (V_{1} \cup ... \cup V_{k})$
\end{algorithmic}

\end{algorithm}
\end{document}

and here is what i get :enter image description here


Solution

  • Default mode of IEEEtran is twocolumn. Compile with \documentclass[onecolumn]{IEEEtran} if it's what you want.