수직선이 있는 병렬 알고리즘

수직선이 있는 병렬 알고리즘

계획라텍스로 이것을 어떻게 생산할 수 있습니까 ? 내 질문은 그것을 그림, 알고리즘, 표 형식 안에 넣는 프레임워크에 관한 것입니다. 그리고 이 수직선으로 어떻게 구분할 수 있나요?

답변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}

여기에 이미지 설명을 입력하세요

관련 정보