diff --git a/my-listings.sty b/my-listings.sty index 4ff24104637432695622e08c803a65f411f76e54..5a26026552f7a92a7d9a89bb7666567f9f8b027e 100644 --- a/my-listings.sty +++ b/my-listings.sty @@ -1,10 +1,18 @@ %% personal config for listings -%% C. Garion, 2012-2015 +%% C. Garion, 2012-2017 %% \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesPackage{my-listings}[2015/11/16 v0.1 +\ProvidesPackage{my-listings}[2017/01/16 v0.2 LaTeX package for listings configuration] +% options +\def\@colorlst{} +\DeclareOption{colors}{ + \def\@colorlst{true} +} + +\ProcessOptions\relax + % LuaLaTeX \RequirePackage{ifluatex} @@ -179,4 +187,12 @@ commentstyle=\color{lstgreen}, identifierstyle=\color{lstblue} } -} \ No newline at end of file +} + +\ifx@colorlst\@empty +\relax +\else +\lstusecolors +\fi + +\endinput \ No newline at end of file