-
Notifications
You must be signed in to change notification settings - Fork 4
/
sagecell-latex.txt
12 lines (10 loc) · 1021 Bytes
/
sagecell-latex.txt
1
2
3
4
5
6
7
8
9
10
11
12
To get "SymPy-style" output for Sage cells in PDF, replace the appropriate preamble lines with the following.
(Note that we are replacing a \newtcblisting for sageoutput with a \newtcolorbox.)
\tcbset{ sagestyle/.style={left=0pt, right=0pt, top=0ex, bottom=0ex, middle=0pt, toptitle=0pt, bottomtitle=0pt,
boxsep=4pt, listing only, fontupper=\small\ttfamily,
breakable, parbox=false,
listing options={language=Python,breaklines=true,breakatwhitespace=true, extendedchars=true, aboveskip=0pt, belowskip=0pt}} }
\newtcblisting{sageinput}{sagestyle, colback=sageblue, enhanced, sharp corners, borderline east={0.5pt}{0pt}{black}, borderline west={0.5pt}{0pt}{black},borderline north={0.5pt}{0pt}{black},before skip=10pt, after skip=0pt,frame hidden,}
\newtcolorbox{sageoutput}{colback=white, enhanced, borderline east={0.5pt}{0pt}{black},
borderline west={0.5pt}{0pt}{black}, borderline south={0.5pt}{0pt}{black},
borderline north={0.5pt}{0pt}{black,dashed}, sharp corners, before skip=0pt, after skip=10pt, frame hidden,}