作者yuhsoul (.....................)
看板LaTeX
标题[问题] 如何调整程式码列的行距?
时间Wed Aug 31 18:10:37 2011
目前我的论文中的程式码列的行距是照着整个文件的行距设定
如何另外定义程式码列的行距呢?
目前我在preamble已经增加了以下的程式码列的格式设定
行距设定是否也可以直接从里面设定呢?
\usepackage{listings}
\usepackage{color}
\usepackage{textcomp}
\definecolor{listinggray}{gray}{0.9}
\definecolor{lbcolor}{rgb}{0.99,0.99,0.99}
\lstset{
backgroundcolor=\color{lbcolor},
numbers=left,
tabsize=4,
rulecolor=,
language=c,
basicstyle=\scriptsize,
upquote=true,
aboveskip={1.5\baselineskip},
columns=fixed,
showstringspaces=false,
extendedchars=true,
breaklines=true,
prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}},
frame=single,
showtabs=false,
showspaces=false,
showstringspaces=false,
identifierstyle=\ttfamily,
keywordstyle=\color[rgb]{0,0,1},
commentstyle=\color[rgb]{0,0.7,0},
stringstyle=\color[rgb]{1,0.44,0},
directivestyle=\color[rgb]{0.9,0,0},
}
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 114.37.32.166