X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mjotex.git;a=blobdiff_plain;f=mjo-listing.tex;fp=mjo-listing.tex;h=fc9828cb9cd3302fb0dd83416c0c4c1bd904154c;hp=0000000000000000000000000000000000000000;hb=6442db810af2ba37e6ff4f3639543510a79aafa3;hpb=829e670e2ee973909b6fcf36031fcf669cbdb922 diff --git a/mjo-listing.tex b/mjo-listing.tex new file mode 100644 index 0000000..fc9828c --- /dev/null +++ b/mjo-listing.tex @@ -0,0 +1,31 @@ +% +% Code listing support, in particular, for the SageMath interactive +% prompt. You can create a box thingy for displaying code like, +% +% \begin{tcblisting}{listing only, +% colback=codebg, +% coltext=codefg, +% listing options={language=sage,style=sage}} +% sage: x +% x +% \end{tcblisting} +% +\usepackage{listings} +\usepackage{tcolorbox} + +% Tell tcolorbox to use ``listings'' within the boxes. +\tcbuselibrary{listings} + +% Define the colors that we'll use in our listings. +\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} + +% Define a style for interactive sage prompt listings. +\lstdefinelanguage{sage}{ keywords={sage} } +\lstdefinestyle{sage}{ keywordstyle=\color{brilliantlavender} } +\lstset{% + basicstyle=\ttfamily\small, + columns=fullflexible, + keepspaces=true +}