]> gitweb.michael.orlitzky.com - mjotex.git/commitdiff
Add comment/string styles for Sage (python) code listings.
authorMichael Orlitzky <michael@orlitzky.com>
Sun, 4 Dec 2016 17:47:24 +0000 (12:47 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Sun, 4 Dec 2016 17:47:24 +0000 (12:47 -0500)
mjo-listing.tex

index fc9828cb9cd3302fb0dd83416c0c4c1bd904154c..aa24b5cc5cadda0490b34277afc43ccb9f9cbe7a 100644 (file)
 \definecolor{codefg}{rgb}{0.9, 0.9, 0.9}
 \definecolor{codebg}{rgb}{0.16, 0.16, 0.16}
 \definecolor{brilliantlavender}{rgb}{0.96, 0.73, 1.0}
+\definecolor{brilliantgreen}{rgb}{0.7, 0.9, 0.7}
+\definecolor{brown}{rgb}{0.75, 0.4, 0.4}
 
-% Define a style for interactive sage prompt listings.
-\lstdefinelanguage{sage}{ keywords={sage} }
-\lstdefinestyle{sage}{ keywordstyle=\color{brilliantlavender} }
+% General listing settings.
 \lstset{%
   basicstyle=\ttfamily\small,
   columns=fullflexible,
   keepspaces=true
 }
+
+% Define a style for interactive sage prompt listings.
+\lstdefinelanguage{sage}{ keywords={sage} }
+\lstdefinestyle{sage}{
+  commentstyle=\color{brown},
+  keywordstyle=\color{brilliantlavender},
+  stringstyle=\color{brilliantgreen}
+}