Re: [問題] 關於字與字的間距微調
※ 引述《EdwardLee.bbs@bbs.cs.nctu.edu.tw (蒙古大夫 2.0)》之銘言:
: ※ 引述《wyvernlee.bbs@ptt.cc (wyvernlee)》之銘言:
: > 大家好,小弟有一個問題百思不得其解,google 了老半天實在找不大到答案,因此上
: > 網向大家請教。小弟寫了一個小 command 定義如下:
: > \definecolor{lgray}{gray}{.8}
: > \newcommand{\bashcommand}[1]{
: > \begin{flushleft}
: > \hskip 0.5cm
: > \fontfamily{phv}\selectfont
: > %\def {\hspace{1em}} % 定義空白為 0.4em
: > \colorbox{lgray}{#1} \Enter
: > \end{flushleft}
: > }
: 排版程式碼請使用 listings package,無需自行定義。
關於 listings package,我也寫了一小段 code 如下:
\lstnewenvironment{command}[1][]
{\lstset{language=bash,frame=single,#1}
\fontfamily{phv}\selectfont
}
{}
如此一來我就可以用
\begin{command}
ls -al
\end{command}
來表達我要輸入的文字,但是問題就在於 listing package 跟 keystroke package
似乎不能和平共處,因此少了 \Enter 這個符號。
有關 keystroke 的資料可看:
http://dante.ctan.org/CTAN/macros/latex/contrib/keystroke/
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 125.229.4.190
討論串 (同標題文章)
LaTeX 近期熱門文章
PTT數位生活區 即時熱門文章