X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=mjo-listing.tex;h=bcfe25f4af5673bfbcd9bf6ab58094fae5343f6a;hb=a331ae0b381e9b3a0fa68d3ef42e7fac42dbb471;hp=f733be6b4c5d8179e317859b6d3e5735d9699ae2;hpb=bcef6c6339823ec1d823af1246cfb26eec0f9b52;p=mjotex.git diff --git a/mjo-listing.tex b/mjo-listing.tex index f733be6..bcfe25f 100644 --- a/mjo-listing.tex +++ b/mjo-listing.tex @@ -10,8 +10,17 @@ % x % \end{tcblisting} % -\usepackage{listings} -\usepackage{tcolorbox} +\ifx\havemjolisting\undefined +\def\havemjolisting{1} + + +\ifx\lstset\undefined + \usepackage{listings} +\fi + +\ifx\tcbuselibrary\undefined + \usepackage{tcolorbox} +\fi % Tell tcolorbox to use ``listings'' within the boxes. \tcbuselibrary{listings} @@ -49,6 +58,11 @@ \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}} + + +\fi