LaTeX仅使某些列表使用颜色,而不是全部使用(列表包)[关闭]

问题描述 投票:-1回答:1
我使用以下方法为在乳胶中创建的列表添加了颜色,>>

\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} \为我在乳胶中创建的清单添加了颜色。 ..

colors latex latex-environment
1个回答
2
投票
给\ lstset的所有命令都可以作为特定列表的可选参数。
© www.soinside.com 2019 - 2024. All rights reserved.