From: Michael Orlitzky Date: Mon, 24 Feb 2020 23:45:45 +0000 (-0500) Subject: mjo-listing.tex: implement \sagelisting with \newtcbinputlisting. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=7dfe6fdee9d819258393544917c871f6b85a3eb8;p=mjotex.git mjo-listing.tex: implement \sagelisting with \newtcbinputlisting. --- diff --git a/mjo-listing.tex b/mjo-listing.tex index bcfe25f..ccd0d9c 100644 --- a/mjo-listing.tex +++ b/mjo-listing.tex @@ -55,14 +55,15 @@ % % 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,% - enlarge bottom finally by=\baselineskip,% - enlarge top initially by=\baselineskip,% - left=2em,% - listing options={language=sage,style=sage},% - listing file=sage_listings/#1.listing}} - +\newtcbinputlisting{\sagelisting}[2][]{% + colback=codebg,% + coltext=codefg,% + enlarge bottom finally by=\baselineskip,% + enlarge top initially by=\baselineskip,% + left=2em,% + listing only,% + listing options={language=sage,style=sage},% + listing file=sage_listings/#2.listing,% + #1} \fi