乳胶只能写到页面中间

时间:2019-05-31 13:24:38

标签: latex pdflatex biblatex

am尝试在乳胶中键入算法的伪代码,它可以正常工作,但只写到midle为止。其余的保持空..这是源

\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}

这就是我得到的:enter image description here

1 个答案:

答案 0 :(得分:2)

IEEEtran的默认模式是twocolumn。如果需要,请使用\documentclass[onecolumn]{IEEEtran}进行编译。