Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Latex只写到页面中间_Latex_Pdflatex_Biblatex - Fatal编程技术网

Latex只写到页面中间

Latex只写到页面中间,latex,pdflatex,biblatex,Latex,Pdflatex,Biblatex,我试着在latex中键入一个算法的伪代码,它工作得很好,但只是一直写到中间。剩下的就空着。。这是来源 \documentclass{IEEETran} \usepackage{algpseudocode} \usepackage{algorithm} \begin{document} \begin{algorithm} \caption{GPX operator} \hspace*{\algorithmicindent} \textbf{Input} s1 = $\lbrace V^{1}_{

我试着在latex中键入一个算法的伪代码,它工作得很好,但只是一直写到中间。剩下的就空着。。这是来源

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

这里是我得到的:

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

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

我不理解您的问题。源文本和格式化文本的最后一行都是“随机分配…”。为什么你说“它只写到中间,其余的都是空的”?我是说水平的中间。。。在算法2中,它在输入语句中写入父级,然后转到下一行IEEEtran的默认模式是twocolumn。如果需要,请使用\documentclass[onecolumn]{IEEEtran}编译。。。你的建议很有效。。谢谢你。。我不明白你的问题。源文本和格式化文本的最后一行都是“随机分配…”。为什么你说“它只写到中间,其余的都是空的”?我是说水平的中间。。。在算法2中,它在输入语句中写入父级,然后转到下一行IEEEtran的默认模式是twocolumn。如果需要,请使用\documentclass[onecolumn]{IEEEtran}编译。。。你的建议很有效。。谢谢你。。把它写在答案里