%
% The sole argument is the "name" of the listing, which ultimately
% just identifies a file named "sage_listings/<name>.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