縦線で並べたアルゴリズム

縦線で並べたアルゴリズム

これをLaTeXで作成するにはどうすればいいでしょうかスキーム。私の質問は、図、アルゴリズム、表など、内部に配置するフレームワークについてです。また、この縦線でどのように分離すればよいでしょうか。

答え1

これは、あなたの望むことですか?

% arara: pdflatex

\documentclass{article}
\usepackage{algpseudocode}

\begin{document} 
\begin{table}
    \begin{tabular}{c|c}    
    \begin{minipage}{5cm}
            \begin{algorithmic}[1]
                \Procedure{Euclid}{$a,b$}
                \State $r\gets a\bmod b$
                \While{$r\not=0$}
                \State $a\gets b$
                \State $b\gets r$
                \State $r\gets a\bmod b$
                \EndWhile
                \State \textbf{return} $b$\Comment{The gcd is b}
                \EndProcedure
            \end{algorithmic}
    \end{minipage}
    &
    \begin{minipage}{5cm}
    \begin{algorithmic}[1]
        \Procedure{Euclid}{$a,b$}
        \State $r\gets a\bmod b$
        \While{$r\not=0$}
        \State $a\gets b$
        \State $b\gets r$
        \State $r\gets a\bmod b$
        \EndWhile
        \State \textbf{return} $b$\Comment{The gcd is b}
        \EndProcedure
    \end{algorithmic}
    \end{minipage}
    \end{tabular}
\end{table}
\end{document}

ここに画像の説明を入力してください

関連情報