不直接回答你的問題,但我推薦你使用 fancyvrb package。
在該 package 中可以建立具有自定樣式的 verbatim 環境,
包括字體大小、行距等等。
使用手冊:
http://ftp.cvut.cz/tex-archive/macros/latex/contrib/fancyvrb/fancyvrb.pdf
※ 引述《tzu710088 (不會有任何留戀)》之銘言:
: 日前用Latex打一份作業,因為想在每一題下面附上程式output
: 因為想縮小output字級的大小,所以大約編排如下:
: from the output below.....
: \tiny
: \begin{verbatim}
: ...(output)
: \end{vertabin}
: \normalsize
: \item[2.] from the output below.....
: \tiny
: \begin{verbatim}
: ...(output)
: \end{vertabin}
: ...
: 重複了好幾次
: 但是發現當我這樣做時,原本的行距(我用 \linespread{1.25}) 縮小了,
: 變成行跟行都擠在一起
: 如果我不用 tiny & vertabim 行距就不會縮小
: 請問我有辦法縮小 vertabim 內容的大小但是行距不要改變嗎?
: 謝謝!
--
http://apansharing.blogspot.com/
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.128.117.88