summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/stex/source/extensions/hwexam.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/stex/source/extensions/hwexam.dtx')
-rw-r--r--macros/latex/contrib/stex/source/extensions/hwexam.dtx51
1 files changed, 17 insertions, 34 deletions
diff --git a/macros/latex/contrib/stex/source/extensions/hwexam.dtx b/macros/latex/contrib/stex/source/extensions/hwexam.dtx
index e166fd0397..de3538d53f 100644
--- a/macros/latex/contrib/stex/source/extensions/hwexam.dtx
+++ b/macros/latex/contrib/stex/source/extensions/hwexam.dtx
@@ -10,7 +10,7 @@
% \iffalse
%
%<*driver>
-\def\bibfolder#1{../../lib/bib/#1}
+\def\libfolder#1{../../lib/#1}
\input{../../doc/stex-docheader}
\begin{document}
@@ -32,8 +32,10 @@
% \url{http://kwarc.info/kohlhase}}
% \maketitle
%
-%\ifinfulldoc\else
-%\begin{abstract}
+% \begin{documentation}
+%\ifinfulldoc\else
+%
+%\begin{abstract}{}
% The |hwexam| package and class allows individual course assignment sheets and compound
% assignment documents using problem files marked up with the |problem| package.
%
@@ -43,12 +45,11 @@
% \end{abstract}
%
% \tableofcontents
-%
+% \begin{sfragment}{The User Intterface}
% \input{../../doc/packages/stex-hwexam}
+% \end{sfragment}
% \fi
%
-% \begin{documentation}
-%
% \end{documentation}
%
%\begin{implementation}
@@ -63,13 +64,14 @@
%
% \begin{macrocode}
%<*package>
-\ProvidesExplPackage{hwexam}{2022/05/24}{3.1.0}{homework assignments and exams}
+\ProvidesExplPackage{hwexam}{2022/09/14}{3.2.0}{homework assignments and exams}
\RequirePackage{l3keys2e}
\newif\iftest\testfalse
-\DeclareOption{test}{\testtrue}
+\DeclareOption{test}{\testtrue\PassOptionsToPackage{\CurrentOption}{problem}}
\newif\ifmultiple\multiplefalse
\DeclareOption{multiple}{\multipletrue}
+\DeclareOption{lang}{\PassOptionsToPackage{\CurrentOption}{problem}}
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{problem}}
\ProcessOptions
% \end{macrocode}
@@ -86,9 +88,8 @@
\newcommand\hwexam@assignment@kw{Assignment}
\newcommand\hwexam@given@kw{Given}
\newcommand\hwexam@due@kw{Due}
-\newcommand\hwexam@testemptypage@kw{This~page~was~intentionally~left~
- blank~for~extra~space}
- \def\hwexam@minutes@kw{minutes}
+\newcommand\hwexam@testemptypage@kw{This~page~was~intentionally~left~blank~for~extra~space}
+\newcommand\hwexam@minutes@kw{minutes}
\newcommand\correction@probs@kw{prob.}
\newcommand\correction@pts@kw{total}
\newcommand\correction@reached@kw{reached}
@@ -104,16 +105,16 @@
\ltx@ifpackageloaded{babel}{
\makeatletter
\clist_set:Nx \l_tmpa_clist {\bbl@loaded}
- \clist_if_in:NnT \l_tmpa_clist {ngerman}{
+ \exp_args:NNx \clist_if_in:NnT \l_tmpa_clist {\detokenize{ngerman}}{
\input{hwexam-ngerman.ldf}
}
- \clist_if_in:NnT \l_tmpa_clist {finnish}{
+ \exp_args:NNx \clist_if_in:NnT \l_tmpa_clist {\detokenize{finnish}}{
\input{hwexam-finnish.ldf}
}
- \clist_if_in:NnT \l_tmpa_clist {french}{
+ \exp_args:NNx \clist_if_in:NnT \l_tmpa_clist {\detokenize{french}}{
\input{hwexam-french.ldf}
}
- \clist_if_in:NnT \l_tmpa_clist {russian}{
+ \exp_args:NNx \clist_if_in:NnT \l_tmpa_clist {\detokenize{russian}}{
\input{hwexam-russian.ldf}
}
\makeatother
@@ -265,7 +266,7 @@
}{
\global\setcounter{assignment}{\int_use:N\l_@@_assign_number_int}
}
- \setcounter{problem}{0}
+ \setcounter{sproblem}{0}
\renewcommand\prob@label[1]{\assignment@number.##1}
\def\current@section@level{\document@hwexamtype}
%\sref@label@id{\document@hwexamtype \thesection}
@@ -416,24 +417,6 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\testspace}
-% \begin{macrocode}
-\newcommand\testspace[1]{\iftest\vspace*{#1}\fi}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\testnewpage}
-% \begin{macrocode}
-\newcommand\testnewpage{\iftest\newpage\fi}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\testemptypage}
-% \begin{macrocode}
-\newcommand\testemptypage[1][]{\iftest\begin{center}\hwexam@testemptypage@kw\end{center}\vfill\eject\else\fi}
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{\@problem}
% This macro acts on a problem's record in the |*.aux| file. Here we redefine it (it was
% defined to do nothing in |problem.sty|) to generate the correction table.