兩欄文件中的數字將欄留空

兩欄文件中的數字將欄留空

我在處理 revtex4-1 類別的兩列文件中的數字時遇到問題。

在我的 MWE 中,我有兩個數字。

對於單列來說,兩個數字太高,無法將另一個數字放在一起。所以最好的解決方案是將第二個數字放在下一列。

然而,Latex 只是將下一列完全留空,並將第二個數字放在下一頁:

在此輸入影像描述

我該如何解決這個問題?

這是一個 MWE:

\documentclass[reprint,amsmath,amssymb,aps,]{revtex4-1}

\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{algpseudocode}

\begin{document}

\begin{figure}
\begin{algorithmic}
\ForAll{$\tau$}
  \ForAll{$\bm G \in \mathcal G_\text{this}$} 
\vspace{0.4em}
    \ForAll{$i\in\mathcal I$}
      \ForAll{$a\in \mathcal A_\text{this}$}
        \State $XYZ$
        \State $XYZ$
        \State $XYZ$
        \State $XYZ$
        \State $XYZ$
        \State $XYZ$
      \EndFor
    \EndFor
    \ForAll{$i\in \mathcal I$}
      \ForAll{$j \in \mathcal I_\text{this}\;,j\leq i$}
        \State $XYZ$
        \State $XYZ$
        \State $XYZ$
        \State $XYZ$
        \State $XYZ$
        \State $XYZ$
      \EndFor
    \EndFor
    \ForAll{$i\in \mathcal I$}
      \ForAll{$j \in \mathcal I_\text{this}\;,j\leq i$}
        \State $XYZ$
        \State $XYZ$
        \State $XYZ$
        \State $XYZ$
        \State $XYZ$
        \State $XYZ$
      \EndFor
    \EndFor
  \EndFor
\EndFor
\end{algorithmic}
\caption{Pseuocode of blablabla }
\end{figure}

\begin{figure}
\begin{algorithmic}
\ForAll{$\tau$}
  \ForAll{$\bm G \in \mathcal G_\text{this}$} 
\vspace{0.4em}
    \ForAll{$i\in\mathcal I$}
      \ForAll{$a\in \mathcal A_\text{this}$}
        \State $ABC$
        \State $ABC$
        \State $ABC$
        \State $ABC$
        \State $ABC$
        \State $ABC$
      \EndFor
    \EndFor
    \ForAll{$i\in \mathcal I$}
      \ForAll{$j \in \mathcal I_\text{this}\;,j\leq i$}
        \State $ABC$
        \State $ABC$
        \State $ABC$
        \State $ABC$
        \State $ABC$
        \State $ABC$
      \EndFor
    \EndFor
    \ForAll{$i\in \mathcal I$}
      \ForAll{$j \in \mathcal I_\text{this}\;,j\leq i$}
        \State $ABC$
        \State $ABC$
        \State $ABC$
        \State $ABC$
        \State $ABC$
        \State $ABC$
      \EndFor
    \EndFor
  \EndFor
\EndFor
\end{algorithmic}
\caption{Pseuocode of lululu }
\end{figure}

\end{document} 

答案1

或者,您可以將兩個小型頁面放入全角圖形中。

\documentclass[reprint,amsmath,amssymb,aps,]{revtex4-1}

\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{algpseudocode}

\begin{document}

\begin{figure*}
\begin{minipage}[t]{\dimexpr 0.5\textwidth - 0.5\columnsep}
\begin{algorithmic}
\ForAll{$\tau$}
  \ForAll{$\bm G \in \mathcal G_\text{this}$} 
\vspace{0.4em}
    \ForAll{$i\in\mathcal I$}
      \ForAll{$a\in \mathcal A_\text{this}$}
        \State $XYZ$
        \State $XYZ$
        \State $XYZ$
        \State $XYZ$
        \State $XYZ$
        \State $XYZ$
      \EndFor
    \EndFor
    \ForAll{$i\in \mathcal I$}
      \ForAll{$j \in \mathcal I_\text{this}\;,j\leq i$}
        \State $XYZ$
        \State $XYZ$
        \State $XYZ$
        \State $XYZ$
        \State $XYZ$
        \State $XYZ$
      \EndFor
    \EndFor
    \ForAll{$i\in \mathcal I$}
      \ForAll{$j \in \mathcal I_\text{this}\;,j\leq i$}
        \State $XYZ$
        \State $XYZ$
        \State $XYZ$
        \State $XYZ$
        \State $XYZ$
        \State $XYZ$
      \EndFor
    \EndFor
  \EndFor
\EndFor
\end{algorithmic}
\caption{Pseuocode of blablabla }
\end{minipage}\hfill
\begin{minipage}[t]{\dimexpr 0.5\textwidth - 0.5\columnsep}
\begin{algorithmic}
\ForAll{$\tau$}
  \ForAll{$\bm G \in \mathcal G_\text{this}$} 
\vspace{0.4em}
    \ForAll{$i\in\mathcal I$}
      \ForAll{$a\in \mathcal A_\text{this}$}
        \State $ABC$
        \State $ABC$
        \State $ABC$
        \State $ABC$
        \State $ABC$
        \State $ABC$
      \EndFor
    \EndFor
    \ForAll{$i\in \mathcal I$}
      \ForAll{$j \in \mathcal I_\text{this}\;,j\leq i$}
        \State $ABC$
        \State $ABC$
        \State $ABC$
        \State $ABC$
        \State $ABC$
        \State $ABC$
      \EndFor
    \EndFor
    \ForAll{$i\in \mathcal I$}
      \ForAll{$j \in \mathcal I_\text{this}\;,j\leq i$}
        \State $ABC$
        \State $ABC$
        \State $ABC$
        \State $ABC$
        \State $ABC$
        \State $ABC$
      \EndFor
    \EndFor
  \EndFor
\EndFor
\end{algorithmic}
\caption{Pseuocode of lululu }
\end{minipage}
\end{figure*}

\end{document} 

完整頁面

相關內容