Support additional keyword colors when using listings for syntax highlighting.

The support depends on the used language. Some languages like `motorola68k`, `x86masm`, `inform`, `llvm`, `lua`, `metapost`, `mupad`, `ocl`, `python`, `verrilog`, `basic`, `cil`, `fortran` and `hansl` will have additional colors for some keywords.
This commit is contained in:
Wandmalfarbe 2019-07-01 21:38:48 +02:00
parent 21d92b4353
commit 537bf1c794

View File

@ -648,17 +648,18 @@ $endif$
$if(listings)$
%
% listing colors
% general listing colors
%
\definecolor{listing-background}{HTML}{F7F7F7}
\definecolor{listing-rule}{HTML}{B3B2B3}
\definecolor{listing-numbers}{HTML}{B3B2B3}
\definecolor{listing-text-color}{HTML}{000000}
\definecolor{listing-keyword}{HTML}{435489}
\definecolor{listing-keyword-2}{HTML}{1284CA} % additional keywords
\definecolor{listing-keyword-3}{HTML}{9137CB} % additional keywords
\definecolor{listing-identifier}{HTML}{435489}
\definecolor{listing-string}{HTML}{00999A}
\definecolor{listing-comment}{HTML}{8E8E8E}
\definecolor{listing-javadoc-comment}{HTML}{006CA9}
\lstdefinestyle{eisvogel_listing_style}{
language = java,
@ -671,7 +672,7 @@ $else$
framexleftmargin = 2.5em,
$endif$
backgroundcolor = \color{listing-background},
basicstyle = \color{listing-text-color}\small\ttfamily{}\linespread{1.15}, % print whole listing small
basicstyle = \color{listing-text-color}\linespread{1.0}\small\ttfamily{},
breaklines = true,
frame = single,
framesep = 0.19em,
@ -683,12 +684,12 @@ $endif$
belowskip = 0.1em,
abovecaptionskip = 0em,
belowcaptionskip = 1.0em,
keywordstyle = \color{listing-keyword}\bfseries,
classoffset = 0,
keywordstyle = {\color{listing-keyword}\bfseries},
keywordstyle = {[2]\color{listing-keyword-2}\bfseries},
keywordstyle = {[3]\color{listing-keyword-3}\bfseries\itshape},
sensitive = true,
identifierstyle = \color{listing-identifier},
commentstyle = \color{listing-comment},
morecomment = [s][\color{listing-javadoc-comment}]{/**}{*/},
stringstyle = \color{listing-string},
showstringspaces = false,
escapeinside = {/*@}{@*/}, % Allow LaTeX inside these special comments