side-by-side的algorithm

看板LaTeX (論文排版)作者時間19年前 (2006/12/18 15:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/3 (看更多)
請問有人成功並排兩個algorithm嗎?大概是下面這樣 _________________________________________________ Algorithm 1 foo: aaa Algorithm 2 bar: bbb ------------------------------------------------- 1. for all S[i] do 1. while (RB > 0) do 2. dsfasfsa 2. asfasfsdafsad 3. end for 3. dsafasfasfsafsd 4. end while _________________________________________________ 我試過用minipage及tabular,大概像是下面這樣 \begin{algorithm} \begin{tabular}{cc} % or miniage \begin{minpage} \begin{algorithmic} algorithm 1 \end{algorithmic} \end{minipage} & \begin{minipage} \begin{algorithmic} algorithm 2 \end{algorithmic} \end{minipage} \\ \end{tabular} \end{algorithm} 但是結果確是這樣 _________________________________________________ Algorithm 2 bar: bbb ------------------------------------------------- 1. for all S[i] do 1. while (RB > 0) do 2. dsfasfsa 2. asfasfsdafsad 3. end for 3. dsafasfasfsafsd 4. end while _________________________________________________ 似乎algorithm 1的caption被蓋掉了。 我試著把algorithm環境移進去tabular裏面,發現float似乎不能放在tabular裡 錯誤訊息: ! LaTeX Error: Not in outer par mode. 請問要怎麼才能並排兩個algorithm環境阿? 謝謝 -- ※ Origin: 楓橋驛站<bbs.cs.nthu.edu.tw> ◆ From: samuel.cs.nthu.edu.tw
文章代碼(AID): #15XZor00 (LaTeX)
文章代碼(AID): #15XZor00 (LaTeX)