\usepackage{listings}% http://ctan.org/pkg/listings
\lstset{
basicstyle=\ttfamily,
mathescape
}
\usepackage{color}
\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}
\usepackage[colorinlistoftodos]{todonotes}
\lstset{frame=tb,
language=Python,
aboveskip=3mm,
belowskip=3mm,
showstringspaces=false,
columns=flexible,
basicstyle={\small\ttfamily},
numbers=none,
numberstyle=\tiny\color{gray},
keywordstyle=\color{blue},
commentstyle=\color{dkgreen},
stringstyle=\color{mauve},
breaklines=true,
breakatwhitespace=true,
tabsize=3
}
这将颜色应用于我创建的所有列表,我想创建一个不使用任何颜色的新列表,同时保留其他列表的颜色。
有人可以告诉我该怎么做,或者甚至可以吗?
谢谢
我使用以下\ usepackage {listings}%http://ctan.org/pkg/listings \ lstset {basicstyle = \ ttfamily,mathescape} \ usepackage {color} \为我在乳胶中创建的清单添加了颜色。 ..