% \subsubsection{Learning Outcomes}
% \DescribeMacro{\outcome}{Specify a learning outcome, either at the level of a |problem| or an entire document in the preamble.}
%    \begin{macrocode}
%<*classXimera>
\def\theoutcomes{}

\ifdefined\HCode%
  \newcommand{\outcome}[1]{}
\else%
  \newwrite\outcomefile
  \immediate\openout\outcomefile=\jobname.oc

  \newcommand{\outcome}[1]{\edef\theoutcomes{\theoutcomes #1~}%
  \immediate\write\outcomefile{\unexpanded{\outcome}{#1}}}
  \fi%
%</classXimera>
%    \end{macrocode}
% These can appear in either the preamble or in problem environments.
% with pdflatex, we produce the .oc file which includes ALL the
% outcomes; in the tex4ht world, we just produce spans for the
% specific outcomes.
%    \begin{macrocode}
%<*cfgXimera>
\renewcommand{\outcome}[1]{
  \Configure{@HEAD}{\HCode{<meta name="learning-outcome" content="#1"/>\Hnewline}}
}
% Sometimes there are no outcomes at all
\IfFileExists{\jobname.oc}{\input{\jobname.oc}}{}

\renewcommand{\outcome}[1]{%
  \HCode{<span class="learning-outcome">#1</span>}
}
%</cfgXimera>
%    \end{macrocode}
