diff options
Diffstat (limited to 'macros/latex/contrib/stex/source/extensions/hwexam.dtx')
-rw-r--r-- | macros/latex/contrib/stex/source/extensions/hwexam.dtx | 188 |
1 files changed, 17 insertions, 171 deletions
diff --git a/macros/latex/contrib/stex/source/extensions/hwexam.dtx b/macros/latex/contrib/stex/source/extensions/hwexam.dtx index 2cc3a1bd5b..e166fd0397 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{../../lib/bib} +\def\bibfolder#1{../../lib/bib/#1} \input{../../doc/stex-docheader} \begin{document} @@ -18,10 +18,7 @@ \end{document} %</driver> % \fi -%\iffalse\CheckSum{464}\fi -% -% ^^A\changes{v0.9}{2006/09/18}{First Version with Documentation} -% +% % \GetFileInfo{hwexam.sty} % % \MakeShortVerb{\|} @@ -36,177 +33,25 @@ % \maketitle % %\ifinfulldoc\else -% This is the documentation for the \pkg{hwexam} package. -% For a more high-level introduction, -% see \href{\basedocurl/manual.pdf}{the \sTeX Manual} or the -% \href{\basedocurl/stex.pdf}{full \sTeX documentation}. +%\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. +% +% This is the documentation for the \pkg{hwexam} package. For a more high-level +% introduction, see \href{\basedocurl/manual.pdf}{the \sTeX Manual} or the +% \href{\basedocurl/stex.pdf}{full \sTeX documentation}. +% \end{abstract} % +% \tableofcontents +% % \input{../../doc/packages/stex-hwexam} % \fi % % \begin{documentation} % -% The |hwexam| package and class allows individual course assignment sheets and -% compound assignment documents using problem files marked up with the |problem| package. -% \setcounter{tocdepth}{2}\tableofcontents\newpage -% -%\section{Introduction}\label{sec:intro} -% -% The |hwexam| package and class supplies an infrastructure that allows to format -% nice-looking assignment sheets by simply including problems from problem files marked up -% with the |problem| package~\cite{Kohlhase:problem}. It is designed to be -% compatible with |problems.sty|, and inherits some of the functionality. -% -% \section{The User Interface} -% -% \subsection{Package and Class Options}\label{sec:user:options} -% -% The |hwexam| package and class take the options |solutions|, |notes|, |hints|, |gnotes|, -% |pts|, |min|, and |boxed| that are just passed on to the |problems| package (cf. its -% documentation for a description of the intended behavior). -% -% If the \DescribeMacro{showmeta}|showmeta| option is set, then the metadata keys are -% shown (see~\cite{Kohlhase:metakeys} for details and customization options). -% -% The |hwexam| class additionally accepts the options |report|, |book|, |chapter|, |part|, -% and |showignores|, of the |omdoc| package~\cite{Kohlhase:smomdl} on which it is -% based and passes them on to that. For the |extrefs| option -% see~\cite{Kohlhase:sref}. -% -% \subsection{Assignments} -% -% This package supplies the \DescribeEnv{assignment}|assignment| environment that groups -% problems into assignment sheets. It takes an optional KeyVal argument with the keys -% \DescribeMacro{number}|number| (for the assignment number; if none is given, 1 is -% assumed as the default or --- in multi-assignment documents --- the ordinal of the -% |assignment| environment), \DescribeMacro{title}|title| (for the assignment title; this -% is referenced in the title of the assignment sheet), \DescribeMacro{type}|type| (for the -% assignment type; e.g. ``quiz'', or ``homework''), \DescribeMacro{given}|given| (for the -% date the assignment was given), and \DescribeMacro{due}|due| (for the date the -% assignment is due). -% -% \subsection{Typesetting Exams} -% -% Furthermore, the |hwexam| package takes the option -% \DescribeMacro{multiple}|multiple| that allows to combine multiple assignment sheets into -% a compound document (the assignment sheets are treated as section, there is a table of -% contents, etc.). -% -% Finally, there is the option \DescribeMacro{test}|test| that modifies the behavior to -% facilitate formatting tests. Only in |test| mode, the macros |\testspace|, -% |\testnewpage|, and |\testemptypage| have an effect: they generate space for the -% students to solve the given problems. Thus they can be left in the {\LaTeX} source. -% -% \DescribeMacro{\testspace}|\testspace| takes an argument that expands to a dimension, -% and leaves vertical space accordingly. \DescribeMacro{\testnewpage}|\testnewpage| makes -% a new page in |test| mode, and \DescribeMacro{\testemptypage}|\testemptypage| generates -% an empty page with the cautionary message that this page was intentionally left empty. -% -% Finally, the \DescribeEnv{testheading}|\testheading| takes an optional keyword argument -% where the keys \DescribeMacro{duration}|duration| specifies a string that specifies the -% duration of the test, \DescribeMacro{min}|min| specifies the equivalent in number of -% minutes, and \DescribeMacro{reqpts}|reqpts| the points that are required for a perfect -% grade. -% \begin{exfig}[ht] -% \makeatletter -% \@problem{1.1}{4}{10} -% \@problem{2.1}{4}{8} -% \@problem{2.2}{6}{10} -% \@problem{2.3}{6}{10} -% \@problem{3.1}{4}{8} -% \@problem{3.2}{4}{8} -% \@problem{3.3}{2}{4} -% \makeatother -% \begin{verbatim} -% \title{320101 General Computer Science (Fall 2010)} -% \begin{testheading}[duration=one hour,min=60,reqpts=27] -% Good luck to all students! -% \end{testheading} -% \end{verbatim} -% \vspace*{-3ex}\hrule\vspace*{.5ex} formats to\vspace*{1ex} -% \hrule\par\noindent\vspace*{2ex} -% \title{320101 General Computer Science (Fall 2010)} -% \begin{testheading}[duration=one hour,min=60,reqpts=27] -% good luck -% \end{testheading} -% \caption{A generated test heading.}\label{fig:testheading} -% \end{exfig} -% -% \subsection{Including Assignments} -% -% The \DescribeMacro{\inputassignment}|\inputassignment| macro can be used to input -% an assignment from another file. It takes an optional KeyVal argument and a second -% argument which is a path to the file containing the problem (the macro assumes that -% there is only one |assignment| environment in the included file). The keys -% \DescribeMacro{number}|number|, \DescribeMacro{title}|title|, -% \DescribeMacro{type}|type|, \DescribeMacro{given}|given|, and \DescribeMacro{due}|due| -% are just as for the |assignment| environment and (if given) overwrite the ones specified -% in the |assignment| environment in the included file. -% -% \section{Limitations}\label{sec:limitations} -% -% In this section we document known limitations. If you want to help alleviate them, -% please feel free to contact the package author. Some of them are currently discussed in -% the \sTeX GitHub repository~\cite{sTeX:github:on}. -% \begin{enumerate} -% \item none reported yet. -% \end{enumerate} -% % \end{documentation} % %\begin{implementation} -% \section{Implementation: The hwexam Class}\label{sec:impl:cls} -% -% The functionality is spread over the |hwexam| class and package. The class provides -% the |document| environment and pre-loads some convenience packages, whereas the package -% provides the concrete functionality. -% -% \subsection{Class Options}\label{sec:impl:cls:options} -% -% To initialize the |hwexam| class, we declare and process the necessary options by -% passing them to the respective packages and classes they come from. -% -% \begin{macrocode} -%<@@=hwexam> -%<*cls> -\ProvidesExplClass{hwexam}{2022/02/26}{3.0.1}{homework assignments and exams} -\RequirePackage{l3keys2e} -\DeclareOption*{ - \PassOptionsToClass{\CurrentOption}{document-structure} - \PassOptionsToPackage{\CurrentOption}{stex} - \PassOptionsToPackage{\CurrentOption}{hwexam} - \PassOptionsToPackage{\CurrentOption}{tikzinput} -} -\ProcessOptions -% \end{macrocode} -% -% We load |omdoc.cls|, and the desired packages. For the {\latexml} bindings, we make -% sure the right packages are loaded. -% -% \begin{macrocode} -\LoadClass{document-structure} -\RequirePackage{stex} -\RequirePackage{hwexam} -\RequirePackage{tikzinput} -\RequirePackage{graphicx} -\RequirePackage{a4wide} -\RequirePackage{amssymb} -\RequirePackage{amstext} -\RequirePackage{amsmath} -% \end{macrocode} -% Finally, we register another keyword for the |document| environment. We give a default -% assignment type to prevent errors -% \begin{macrocode} -\newcommand\assig@default@type{\hwexam@assignment@kw} -\def\document@hwexamtype{\assig@default@type} -%<@@=document_structure> -\keys_define:nn { document-structure / document }{ - id .str_set_x:N = \c_document_structure_document_id_str, - hwexamtype .tl_set:N = \document@hwexamtype -} -%<@@=hwexam> -%</cls> -% \end{macrocode} % % \section{Implementation: The hwexam Package} % @@ -218,7 +63,7 @@ % % \begin{macrocode} %<*package> -\ProvidesExplPackage{hwexam}{2022/02/26}{3.0.1}{homework assignments and exams} +\ProvidesExplPackage{hwexam}{2022/05/24}{3.1.0}{homework assignments and exams} \RequirePackage{l3keys2e} \newif\iftest\testfalse @@ -283,8 +128,7 @@ % the assignment counter into account. % \begin{macrocode} \newcounter{assignment} -\numberproblemsin{assignment} -\renewcommand\prob@label[1]{\assignment@number.#1} +%\numberproblemsin{assignment} % \end{macrocode} % % We will prepare the keyval support for the |assignment| environment. @@ -422,6 +266,7 @@ \global\setcounter{assignment}{\int_use:N\l_@@_assign_number_int} } \setcounter{problem}{0} + \renewcommand\prob@label[1]{\assignment@number.##1} \def\current@section@level{\document@hwexamtype} %\sref@label@id{\document@hwexamtype \thesection} \begin{@assignment} @@ -433,7 +278,7 @@ % sectioning. % \begin{macrocode} \def\ass@title{ - \protect\document@hwexamtype~\arabic{assignment} + {\protect\document@hwexamtype}~\arabic{assignment} \assignment@title{}{\;(}{)\;} -- \given@due{}{} } \ifmultiple @@ -652,6 +497,7 @@ % \newcommand\discussA{\bierglas} % \end{verbatim} % \end{implementation} +% \ifinfulldoc\else\printbibliography\fi \endinput % \iffalse |