<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% \subsection{SageMath support}
% Load Sage\TeX\ if it exists.
%    \begin{macrocode}
%&lt;*classXimera&gt;
\IfFileExists{sagetex.sty}{\RequirePackage{sagetex}}{}
%&lt;/classXimera&gt;
%    \end{macrocode}

% \DescribeEnv{sageCell}{Create an interactive SageMath widget.}
%    \begin{macrocode}
%&lt;*classXimera&gt;
\DefineVerbatimEnvironment{sageCell}{Verbatim}{numbers=left,frame=lines,label=SAGE,labelposition=topline}
%&lt;/classXimera&gt;
%    \end{macrocode}
%    \begin{macrocode}
%&lt;*htXimera&gt;
\renewenvironment{sageCell}{\NoFonts}{\EndNoFonts}
\ScriptEnv{sageCell}{\ifvmode \IgnorePar\fi \EndP\HCode{&lt;div class="sage"&gt;&lt;script type="text/x-sage"&gt;}\HtmlParOff}{\HtmlParOn\HCode{\Hnewline&lt;/script&gt;&lt;/div&gt;}}
%&lt;/htXimera&gt;
%    \end{macrocode}

% \DescribeEnv{sageOutput}{Execute SageMath code and output the result.}
%    \begin{macrocode}
%&lt;*classXimera&gt;
\DefineVerbatimEnvironment{sageOutput}{Verbatim}{numbers=left,frame=lines,label=SAGE-Output,labelposition=topline}
%&lt;/classXimera&gt;
%    \end{macrocode}

%    \begin{macrocode}
%&lt;*htXimera&gt;
\renewenvironment{sageOutput}{\NoFonts}{\EndNoFonts}
\ScriptEnv{sageOutput}{\ifvmode \IgnorePar\fi \EndP\HCode{&lt;div class="sageOutput"&gt;&lt;script type="text/x-sage"&gt;}}{\HCode{\Hnewline&lt;/script&gt;&lt;/div&gt;}}
%&lt;/htXimera&gt;
%    \end{macrocode}

% \DescribeEnv{sageSilent}{Execute SageMath code without outputing the result.}
%    \begin{macrocode}
%&lt;*htXimera&gt;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewenvironment{sagesilent}{\NoFonts}{\EndNoFonts}
\ScriptEnv{sagesilent}{\ifvmode \IgnorePar\fi \EndP\HCode{&lt;script type="text/sagemath"&gt;}\HtmlParOff}{\HtmlParOn\HCode{&lt;/script&gt;&lt;/div&gt;}}
%&lt;/htXimera&gt;
%    \end{macrocode}
</pre></body></html>