作者wyvernlee (wyvernlee)
看板LaTeX
标题Re: [问题] 关於字与字的间距微调
时间Mon May 5 08:25:09 2008
※ 引述《[email protected] (蒙古大夫 2.0)》之铭言:
: ※ 引述《[email protected] (wyvernlee)》之铭言:
: > 来表达我要输入的文字,但是问题就在於 listing package 跟 keystroke package
: > 似乎不能和平共处,因此少了 \Enter 这个符号。
: > 有关 keystroke 的资料可看:
: > http://dante.ctan.org/CTAN/macros/latex/contrib/keystroke/
: 是怎样不能和平共处呢?能举个完整的小例子吗?
小例子来了:
请看
http://www.adrive.com/public/
e64b6e36caa4bf8835ffaba362cb2cdb25f62cc9f4dde58edd6ce0e325685c63.html
第一行是我之前抱怨间隔比较小的结果,第二行是用 listing 的结果,
第三行是加了 \ 的结果。这三行的 source code 分别如下:
% 第一行 source code
\promptcommand{$\sim$/cadence \$}{tar xfvz IC\_5141usr3\_linux\_1of2.tgz}
% 第二行 source code
\begin{command}
tar xfvz IC_5141usr3_linux_1of2.tgz
\end{command}
% 第三行 source code
\promptcommand{$\sim$/cadence \$}{tar \ xfvz \ IC\_5141usr3\_linux\_1of2.tgz}
% prompt command 定义:
\newcommand{\promptcommand}[2]{
\begin{flushleft}
\hskip 0.5cm
%\thinspace
\fontfamily{phv}\selectfont
%\def\ {\hspace{4em}} % 定义空白为 0.4em
#1\colorbox{lgray}{#2} \Enter
\end{flushleft}
}
% \begin{command} 定义:
\lstnewenvironment{command}[1][]
{\lstset{language=bash,frame=single,#1}
\fontfamily{phv}\selectfont
}
{}
我的问题就在於我无法把最後面那个 \Enter 符号放在 listing 环境中,而用我自已定
义的环境其空白间距又太小,因此目前是无解状态。ORZ...
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 125.229.5.124