<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% \subsubsection{Code listing environments}
% \DescribeEnv{code}{A code answer environment} You cannot use Environ
% with the fancyvrb/listings package if you want nested environments.
%
%    \begin{macrocode}
%&lt;*classXimera&gt;
\DefineVerbatimEnvironment{code}{Verbatim}{numbers=left,frame=lines,label=Code,labelposition=topline}
%&lt;/classXimera&gt;
%    \end{macrocode}
% \DescribeEnv{python}{A python answer environment} You cannot use
% Environ with the fancyvrb/listings package if you want nested
% environments
%    \begin{macrocode}
%&lt;*classXimera&gt;
\DefineVerbatimEnvironment{python}{Verbatim}{numbers=left,frame=lines,label=Python,labelposition=topline}
%&lt;/classXimera&gt;
%    \end{macrocode}
% \DescribeEnv{javascriptCode}{A JavaScript answer environment} Unfortunately the name |javascript| is already used for the actual, executed (!) JavaScript interactive.
% environments
%    \begin{macrocode}
%&lt;*classXimera&gt;
\DefineVerbatimEnvironment{javascriptCode}{Verbatim}{numbers=left,frame=lines,label=JavaScript,labelposition=topline}
%&lt;/classXimera&gt;
%&lt;*cfgXimera&gt;
\renewenvironment{javascriptCode}{\NoFonts}{\EndNoFonts}
\ScriptEnv{javascriptCode}{\stepcounter{identification}\ifvmode \IgnorePar\fi \EndP\HCode{&lt;div class="javascript-code" id="javascript\arabic{identification}"&gt;&lt;script type="text/text"&gt;}\HtmlParOff}{\HtmlParOn\HCode{\Hnewline&lt;/script&gt;&lt;/div&gt;}}
%&lt;/cfgXimera&gt;
%    \end{macrocode}
% On the web, translate verbatim and lstlisting blocks into |&lt;pre&gt;|
% elements.
%    \begin{macrocode}
%&lt;*cfgXimera&gt;
\ConfigureEnv{verbatim}{\HCode{&lt;pre&gt;}}{\HCode{&lt;/pre&gt;}}{}{}
\ConfigureEnv{lstlisting}{\HCode{&lt;pre&gt;}}{\HCode{&lt;/pre&gt;}}{}{}
%&lt;/cfgXimera&gt;
%    \end{macrocode}
</pre></body></html>