% \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} %<*classXimera> \DefineVerbatimEnvironment{code}{Verbatim}{numbers=left,frame=lines,label=Code,labelposition=topline} % % \end{macrocode} % \DescribeEnv{python}{A python answer environment} You cannot use % Environ with the fancyvrb/listings package if you want nested % environments % \begin{macrocode} %<*classXimera> \DefineVerbatimEnvironment{python}{Verbatim}{numbers=left,frame=lines,label=Python,labelposition=topline} % % \end{macrocode} % \DescribeEnv{javascriptCode}{A JavaScript answer environment} Unfortunately the name |javascript| is already used for the actual, executed (!) JavaScript interactive. % environments % \begin{macrocode} %<*classXimera> \DefineVerbatimEnvironment{javascriptCode}{Verbatim}{numbers=left,frame=lines,label=JavaScript,labelposition=topline} % %<*cfgXimera> \renewenvironment{javascriptCode}{\NoFonts}{\EndNoFonts} \ScriptEnv{javascriptCode}{\stepcounter{identification}\ifvmode \IgnorePar\fi \EndP\HCode{
}} % % \end{macrocode} % On the web, translate verbatim and lstlisting blocks into |
|
% elements.
%    \begin{macrocode}
%<*cfgXimera>
\ConfigureEnv{verbatim}{\HCode{
}}{\HCode{
}}{}{} \ConfigureEnv{lstlisting}{\HCode{
}}{\HCode{
}}{}{} % % \end{macrocode}