From 049c836f042cd24d586e35b2d214b8ac00e2e215 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 4 Dec 2016 12:47:24 -0500 Subject: [PATCH] Add comment/string styles for Sage (python) code listings. --- mjo-listing.tex | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/mjo-listing.tex b/mjo-listing.tex index fc9828c..aa24b5c 100644 --- a/mjo-listing.tex +++ b/mjo-listing.tex @@ -20,12 +20,20 @@ \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} +} -- 2.43.2