[問題] 縮排問題

看板LaTeX (論文排版)作者 (boring)時間18年前 (2007/04/26 05:19), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
我想要在figure中寫一段演算法 ---------------------------------- %這是水平線 for(int i=0:n) i++; end ---------------------------------- %這是水平線 figure 1: A simple algorithm 我的tex如下 \documentclass{article} \begin{document} \begin{figure} for(int i=0:n)\\ ~~i++\\ end\\ \caption{A simple algorithm} \end{figure} \end{document} 但i++好像那裡好像不能插入空白,但如果把~~放在for前面,它就真的會有兩個空白 請問要怎麼修改呢?還有要怎麼弄出水平線呢? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 203.70.105.251
文章代碼(AID): #16ByNXCL (LaTeX)
討論串 (同標題文章)
文章代碼(AID): #16ByNXCL (LaTeX)