X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mjotex.git;a=blobdiff_plain;f=mjo-listing.tex;fp=mjo-listing.tex;h=f733be6b4c5d8179e317859b6d3e5735d9699ae2;hp=5207aa2b83e1721af9ca8378ab72ca8c6a5ae877;hb=bcef6c6339823ec1d823af1246cfb26eec0f9b52;hpb=e157fa83770cf671d8b1ce897964ee5297e0b1eb diff --git a/mjo-listing.tex b/mjo-listing.tex index 5207aa2..f733be6 100644 --- a/mjo-listing.tex +++ b/mjo-listing.tex @@ -38,3 +38,17 @@ keywordstyle=\color{brilliantlavender}, stringstyle=\color{brilliantgreen} } + + +% Input a SageMath example code listing from a file. You generally +% want these to be in separate files so that the build system can test +% them automatically. +% +% The sole argument is the "name" of the listing, which ultimately +% just identifies a file named "sage_listings/.listing". +\newcommand*{\sagelisting}[1]{\tcbinputlisting{listing only,% + colback=codebg,% + coltext=codefg,% + left=2em,% + listing options={language=sage,style=sage},% + listing file=sage_listings/#1.listing}}