我有一个 lstlisting 设置,如下所示。我想将列表的字体大小更改为。我知道我可以使用basicstyle=\tiny
或类似 来实现这一点,但这样会丢失basicstyle=\color{white}\ttfamily
。我尝试过basicstyle=\tiny\color{white}\ttfamily
和的组合basicstyle=\color{white}\tiny\ttfamily
,但没有效果。如何获得微小的白色文本?
\lstset{
backgroundcolor=\color{lbcolor},
tabsize=4,
language=C++,
captionpos=b,
frame=l,
framesep=4.5mm,
framexleftmargin=1.5mm,
numbers=left,
numberstyle=\tiny\color{white},
numbersep=5pt,
breaklines=true,
morekeywords={constexpr},
showstringspaces=false,
emph={int,char,double,float,unsigned,void,bool},
emphstyle={\color{type}},
basicstyle=\footnotesize,
identifierstyle=\color{idColor}\ttfamily,
basicstyle=\color{white}\ttfamily,
keywordstyle=\color{keyword}\ttfamily,
stringstyle=\color{stringColor}\ttfamily,
commentstyle=\color{comment}\ttfamily,
otherkeywords={1, 2, 3, 4, 5, 6, 7, 8, 9, 0},
morekeywords=[2]{1, 2, 3, 4, 5, 6, 7, 8, 9, 0},
keywordstyle=[2]{\color{numberColor}},
}