我正在使用 listings 包,对我的代码列表的外观感到满意。但是,我的内联列表中的字体与其余文本相比太小了。我怎样才能仅增加内联列表的字体大小?
这:
There also \lstinline{Send} and \lstinline$Receive$ classes to transfer data
变成这样:
这是我的常用风格:
% common styles
\lstdefinestyle{common} {
tabsize=2,
numberstyle=\tiny,
stepnumber=1,
inputencoding=latin1,
lineskip=-1pt,
rulecolor=,
basicstyle=\ttfamily\footnotesize,
columns=flexible,
upquote=true,
aboveskip={1.3\baselineskip},
showstringspaces=false,
extendedchars=true,
breaklines=false,
prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}},
escapechar=@,
frame=single,
showtabs=false,
showspaces=false,
showstringspaces=false,
identifierstyle=\ttfamily,
keywordstyle=\color[rgb]{1.0,0,0},
keywordstyle=[1]\color[rgb]{0.133,0.545,0.133},
keywordstyle=[2]\color[rgb]{0.5,0.0,0.0},
keywordstyle=[3]\color[rgb]{0.127,0.427,0.514},
keywordstyle=[4]\color[rgb]{0.4,0.4,0.4},
commentstyle=\color[rgb]{0.266,0.537,0.553},
stringstyle=\color[rgb]{0.769,0.114,0.145},
}
答案1
内联逐字很小,因为你这样指定它!将行
basicstyle=\ttfamily\footnotesize,
到
basicstyle=\ttfamily,
或者其他什么,你都会没事的。