diff options
author | Karl Berry <karl@freefriends.org> | 2023-12-31 21:25:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-12-31 21:25:36 +0000 |
commit | 3b46dd044717394178574a6a2890ebf47e263432 (patch) | |
tree | e1e7cf7fefb597c84f3cff9cd02bdcaef4c0d00b /Master | |
parent | 51db2d77a03ce63532ebcdbabbb8e74786dd3253 (diff) |
exesheet (31dec23)
git-svn-id: svn://tug.org/texlive/trunk@69252 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/exesheet/exesheet.pdf | bin | 296810 -> 330415 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/exesheet/exesheet.dtx | 438 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/exesheet/exesheet.cls | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/exesheet/exesheet.sty | 179 |
4 files changed, 362 insertions, 257 deletions
diff --git a/Master/texmf-dist/doc/latex/exesheet/exesheet.pdf b/Master/texmf-dist/doc/latex/exesheet/exesheet.pdf Binary files differindex ee19226c2cd..be92d96cc5f 100644 --- a/Master/texmf-dist/doc/latex/exesheet/exesheet.pdf +++ b/Master/texmf-dist/doc/latex/exesheet/exesheet.pdf diff --git a/Master/texmf-dist/source/latex/exesheet/exesheet.dtx b/Master/texmf-dist/source/latex/exesheet/exesheet.dtx index 7f57f4195e5..efc56a4cf9d 100644 --- a/Master/texmf-dist/source/latex/exesheet/exesheet.dtx +++ b/Master/texmf-dist/source/latex/exesheet/exesheet.dtx @@ -23,7 +23,7 @@ %<class>\ProvidesClass{exesheet} %<package>\ProvidesPackage{exesheet} %<*class|package> -[2023/10/28 v2.4 .dtx exesheet file] +[2023/12/30 v2.5 .dtx Typesetting exercise or exam sheets] %</class|package> %<*driver> \documentclass{ltxdoc} @@ -49,7 +49,7 @@ \psset{unit=1cm} \geometry{textwidth=355pt,vmarginratio=1:1,hmarginratio=3:2} % altered by schoodocs, now very close from the default geometry used by ltxdoc. -% The following instruction gives the same margin width +% The following instruction provides the same margin width % as with display=notes without altering the margin ratio \leftnotemarginwidth{0.55} % special setting here \newcommand{\ds}{\displaystyle} @@ -72,6 +72,7 @@ \hypersetup{% colorlinks, linkcolor=blue, + citecolor=red, pdftitle={exesheet}, pdfsubject={LaTeX class and package}, pdfauthor={Antoine Missier} @@ -83,7 +84,7 @@ %</driver> % \fi % -% \CheckSum{1200} +% \CheckSum{1183} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -159,13 +160,19 @@ % - using basic languages (with lower case first letter) instead of aliases % in translations commands} % -% \changes{v2.4}{2013/10/28}{ +% \changes{v2.4}{2023/10/28}{ % - a small mistake in the documentation about the example of the tablenuma environment % is now corrected % - other small changes in the documentation % - lack of percent symbols at end of lines in the exe@check macro causes an unwanted % space in points macro} % +% \changes{v2.5}{2023/12/30}{ +% - gsetlength and gaddtolength unnecessary +% - deprecated commands -> old commands +% - comparison with other packages +% - modifying introduction} +% % \GetFileInfo{exesheet.dtx} % % \maketitle @@ -183,6 +190,7 @@ % and forwards any unknown options to it. % % There are many other packages dedicated to exercise sheets. +% In section \ref{comparison} we provide an overview of some of their functionalities. % Most of them suggest encapsulating each exercise within an environment. % In contrast, \textsf{exesheet} starts each exercise with |\exercise|, % which functions similarly to a subsection (with the same features) @@ -194,19 +202,18 @@ % for enumeration lists, which are % suitable for numbering questions or answers within an exercise. % -% While other packages often offer more or less complex mechanisms -% for managing the placement of answers, -% \textsf{exesheet} doesn't aspire to such complexity. However, -% for all exercises within the sheet, you have the capability to display only questions, -% only answers, or both, all while preserving their placement as they appear +% For all exercises within the sheet, you can display only the questions, +% only the answers, or both, all while preserving their placement as they appear % in the source file. This choice allows for great flexibility: % you can create a correct version for all exercises collectively, % or individual corrections per exercise, % per part (subpart of exercise), per question, per sub-question. % -% Finally \textsf{exesheet} enables to display a detailed marking scheme -% in the margin, with optional explanations or remarks, -% and offering consistency control. +% The ability to hide questions or answers is found in many packages, +% but the main interest of \textsf{exesheet} is to be able to display or not +% a detailed scoring guide, along with correction instructions. +% This is very useful for grading papers with multiple graders. +% Furthermore \textsf{exesheet} can check the consistency of the scale. % % Many settings can be customized, and various options are available % to manage the output document. @@ -240,7 +247,6 @@ % \psframe(-0.25,1.3)(12.75,-0.3) % Try this first command; easy! % -% \bigskip % To bring optional text closer to the exercise number, % you can employ |\unskip| which removes any preceding space. % Take a look at the following example, achieved with @@ -260,8 +266,8 @@ % depending on the language that is loaded (via \textsf{babel} or \textsf{polyglossia}). % You can alter it by modifying |\exercisename|. % A better approach is to use macros from the \textsf{translations} -% package by Clemens Niederberger (which allows dynamic language switching), \eg -% |\DeclareTranslation{swedish}{exesheet-exercise}{\"Ovning}}|. +% package by Clemens Niederberger~\cite{TRAN} (which allows dynamic language switching), +% \eg |\DeclareTranslation{swedish}{exesheet-exercise}{\"Ovning}}|. % % \smallskip % \DescribeMacro{\labelexercise} @@ -282,7 +288,7 @@ % |\renewcommand{\labelexercisestyle}{\rmfamily\color{black}}| % \footnote{In this document, real section and subsection titles have been highlighted by % modifying their color and font (sans serif) using the -% \texttt{\bs allsectionsfont} macro from the \textsf{sectsty} package.}. +% \texttt{\bs allsectionsfont} macro from the \textsf{sectsty} package~\cite{SECT}.}. % % \medskip % \DescribeMacro{\exercise*} @@ -349,7 +355,7 @@ % The term ``\annexname'' is automatically translated into several languages % (depending on the chosen language). % It can be extended to additional languages or altered by redefining |\annexname| -% or by utilizing macros from the \textsf{translations} package. +% or by utilizing macros from the \textsf{translations} package~\cite{TRAN}. % % \smallskip % \DescribeMacro{\annexstyle} @@ -383,7 +389,7 @@ % \bigskip % \DescribeMacro{\exname} \DescribeMacro{\exlabel} \DescribeMacro{\exsepmark} % The abbreviation \textbf{\exname} can be modified by -% redefining |\exname| or with macros from the \textsf{translations} package. +% redefining |\exname| or with macros from the \textsf{translations} package~\cite{TRAN}. % The |\exlabel| macro combines |\exname| with a period then the exercise number % (given by the same \texttt{exercise} counter), % while |\exsepmark| typesets a long dash. @@ -408,7 +414,7 @@ % without indentation, and the vertical spacing between items % is increased compared to standard \LaTeX{} lists. % These formatting adjustments are achieved using the |\setlist| command, -% a feature from the \textsf{enumitem} package by Javier Bezos. +% a feature from the \textsf{enumitem} package by Javier Bezos~\cite{ENUM}. % % \vspace{-\baselineskip} % \noindent\psframe(-0.25,-0.35)(12.75,-3.9) @@ -429,7 +435,7 @@ % |\begin{enumerate}[label=\alph*),font=\itshape\normalfont]| % will yield the labels ``\emph{a)}, \emph{b)}, \emph{c)}\ldots''. % There are many other options available -% (see the \textsf{enumitem} package documentation) +% (see the \textsf{enumitem}~\cite{ENUM} package documentation) % \footnote{Labels can also be modified using a ``shortlabel'' argument, % \eg \texttt{\bs begin\{enumerate\}[A.]}, % or globally through the redefinition of \texttt{\bs labelenumi} @@ -484,8 +490,8 @@ % \end{exenumerate} % % \smallskip -% The \texttt{exenumerate} environment (also based on the \textsf{enumitem} package) -% accepts an optional parameter, +% The \texttt{exenumerate} environment (also based on the +% \textsf{enumitem}~\cite{ENUM} package) accepts an optional parameter, % similar to the \texttt{enumerate} environment. % % \subsection{Items aligned by row: \texttt{tablenum1}, \texttt{tablenuma}, \texttt{tablitem}} @@ -503,10 +509,11 @@ % % \smallskip % Internally we have utilized the -% |\NewTasksEnvironment| macro from the \textsf{tasks} package by Clemens Niederberger. +% |\NewTasksEnvironment| macro from the \textsf{tasks} package by +% Clemens Niederberger~\cite{TASK}. % The usage of the optional argument \meta{opt} is % explained in the documentation of this package. -% For example, similar to the \textsf{enumitem} package, +% For example, similar to the \textsf{enumitem} package~\cite{ENUM}, % |label=\arabic*)| produces an Arabic numbering % followed by a closing parenthesis. % Additionally there are numerous possibilities for arranging items in original ways. @@ -704,6 +711,7 @@ % \textsf{exam} by Philip Hirschhorn, % \textsf{answers} by Mike Piff and Joseph Wright, % \textsf{probsoln} by Nicola Talbot, and more. +% They are briefly presented in section \ref{comparison}. % \end{enumerate} % \end{answers} % @@ -713,14 +721,14 @@ % % \subsection{More about \texttt{answers} environments} % Internally, we have utilized the |\comment| and |\endcomment| macros -% from the \textsf{versions} package by Uwe Lück. +% from the \textsf{versions} package by Uwe Lück~\cite{VERS}. % ^^A Several other packages also enable selective management of code portions. % ^^A Notably, the \textsf{verbatim} package by Rainer Schöpf, % ^^A \textsf{comment} by Victor Eijkhout, % ^^A \textsf{version} by Donald Arseneau and Stephen Bellantoni, % ^^A \textsf{optional} by Donald Arseneau % ^^A and \textsf{codesection} by Matthias Pospiech. -% Moreover, the \textsf{versions} package offers +% Moreover, the \textsf{versions} package~\cite{VERS} offers % the |\excludeversion|\marg{env} and % |\includeversion|\marg{env} macros which allow for the exclusion or inclusion of % any environment \meta{env}. These ``optional'' environments @@ -900,7 +908,8 @@ % With the \texttt{twoside} mode, marginal notes might occasionally % appear on the wrong side of a page. % This is a known \LaTeX{} bug, and the solution involves using -% the \textsf{mparhack} package (which \textsf{exesheet} automatically includes +% the \textsf{mparhack} package by Tom Sgouros and Stefan Ulrich~\cite{MPAR} +% (which \textsf{exesheet} automatically includes % for documents in two-side mode) and \emph{running \LaTeX{} twice}. % If necessary, a warning message will prompt you to perform the re-run. % @@ -1010,7 +1019,7 @@ % The color and style for displaying points in |\totalexe| and |\note*| % can be customized using \texttt{markingcolor} and |\markingstyle|, respectively. % The oval box produced by |\totalexe| is created using the |\ovalbox| command -% from the \textsf{fancybox} package (by Timothy Van Zandt), +% from the \textsf{fancybox} package by Timothy Van Zandt~\cite{FBOX}, % with corner arcs set by |\cornersize{1}|. % The box's length is determined by % |\ptsboxlength|, and not by the box's content, to ensure uniformity across exercises. @@ -1070,7 +1079,7 @@ % are not suitable. % In this case, no adjustments are made to the margin width. Instead, you can define % your own settings using the convenient |\geometry| macro -% from the \textsf{geometry} package (by Hideo Umeki). +% from the \textsf{geometry} package by Hideo Umeki~\cite{GEOM}. % For instance, you can place the following in the preamble: % \centeredline{|\geometry{hmarginratio=2:1,marginparwidth=2.5cm}|.} % @@ -1155,9 +1164,9 @@ % Finally, a message indicates whether all scale controls have been successfully % passed or not. % -% \section{Options} \label{options} +% \section{Options and comparison with other packages} % -% \subsection{Summary of available options} +% \subsection{Summary of available options}\label{options} % % Here we provide a summary table of the available options. Details on their usage % can be found in the respective sections. @@ -1212,15 +1221,16 @@ % Using \texttt{correct=conditional}, it behaves as \texttt{true} % when answers are displayed and \texttt{false} when they're not. % -% \subsection{Alternative (deprecated) commands} +% \subsection{Alternative commands} % % Prior to version 2.0, we used specialized commands to configure % output and display options. % Thanks to a suggestion from Maxime Chupin and Denis Bitouzé, % we have now implemented \emph{key=value} options. % Although the latter is more user-friendly, -% the older commands are still supported for compatibility reasons and are outlined here. -% While these commands will trigger a warning message, they remain functional. +% one may prefer the old commands, so they are still supported, +% but will trigger a warning message. They are presented below. +% % However, the previous options \texttt{nosetlist} and \texttt{notoc} % are no longer supported. % @@ -1229,17 +1239,89 @@ % The command |\questionslonly| is equivalent to setting \texttt{output=questions} % and |\answersonly| means \texttt{output=answers}. % -% \medskip % \DescribeMacro{\displaypts} \DescribeMacro{\displaypoints} -% \DescribeMacro{\displaynotes}\DescribeMacro{\displaynotesright} % The commands |\displaypts| and |\displaypoints| -% are equivalent to setting \texttt{display=pts}; +% are equivalent to setting \texttt{display=pts}. +% +% \medskip +% \DescribeMacro{\displaynotes}\DescribeMacro{\displaynotesright} % |\displaynotes| means \texttt{display=notes}, % and |\displaynotesright| corresponds to -% \texttt{display=notes} and \texttt{marginpos=right}. +% \texttt{display=notes,marginpos=right}. +% These two commands have an optional argument |\displanotes|\marg{ragged} +% where \meta{ragged} is an alignment command to work inside margin notes. +% By default it is |\RaggedLeft| with |\displaynotes| and |RaggedRight| +% \footnote{These commands come from the \textsf{ragged2e} package +% by Martin Schröder~\cite{RAGG}.} +% with |\displaynotesright|. +% +% \subsection{Comparison with other packages}\label{comparison} +% +% In this section, we will provide an overview of the functionalities (as of today \today) +% of various packages or classes found in the 'Exercise' or 'Exam' sections +% of the CTAN archives +% (Comprehensive \TeX\ Archive Network). +% Considering the substantial number of packages in these sections, +% some omissions may have been unintentionally made. +% Those excluded are those with documentation not in English +% or primarily dedicated to producing multiple-choice questions +% or random question generation. Are also excluded those with non-free license. +% We have focused here on typesetting functionalities and not on managing exercise databases +% as there are specialized packages or external softwares for that. +% +% The following table is not a result of tests but presents a summary of information +% obtained from the documentation of these packages. +% +% \begin{multicols}{2} +% \begin{flushleft} +% \begin{enumerate}[label=\Alph*., font=\normalfont, noitemsep] +% \item \textsf{exercise}, Paul Pichaureau~\cite{EXER} +% \item \textsf{exercises}, Roger Jud~\cite{EXES} +% \item \textsf{xsim}, Clemens Niederberger~\cite{XSIM} +% \item \textsf{exframe}, Niklas Beisert~\cite{EXFR} +% \item \textsf{exam}, Philip Hirschhorn~\cite{EXAM}. +% \item \textsf{answers}, Mike Piff and Joseph Wright~\cite{ANSW} +% \item \textsf{probsoln}, Nicola L.C.\@ Talbot~\cite{PROB} +% \item \textsf{exsol}, Walter Daems~\cite{EXSO} +% \item \textsf{exercisepoints}, Henning Kerstan~\cite{EXEP} +% \item \textsf{worksheet}, Benjamin Zöllner~\cite{WORK} +% \item \textsf{exam-n}, Norman Gray, CTAN~\cite{EXAN} +% \item \textsf{eqexam}, D. P. Story~\cite{EQEX} +% \item \textsf{cesenaexam}, Alex Pacini~\cite{CESE} +% \item \textsf{hideanswer}, Yukoh Kusakabe~\cite{HIDE} +% \item \textsf{mathexam}, Jan Hlavacek~\cite{MATH} +% \item \textsf{exesheet}, Antoine Missier +% \end{enumerate} +% \end{flushleft} +% \end{multicols} +% +% \newcommand\X{\textsf{X}} +% \setlength{\extrarowheight}{2pt} +% \noindent\begin{tabular}{|@{\hspace{2pt}}l@{\hspace{4pt}}|% +% *{16}{@{\hspace{2pt}}c@{\hspace{2pt}}|}} +% \hline +% Functionality &A&B&C&D&E&F&G&H&I&J&K&L&M&N&O&P \\ +% \hline +% optional text for exercise titles &\X&&\X&\X&\X&&&&\X&&&&&&&\X \\ +% subparts of exercises &\X&&&\X&\X&&&&&&\X&&\X&&&\X \\ +% annex title &&&&&&&&&&&&&&&&\X \\ +% exercise titles in TOC of PDF files &\X&&&&&&&&&&&&&&&\X \\ +% short labels for exercises &\X&&&&&&&&&&&&&&&\X \\ +% hiding questions or answers* &\X&*&\X&\X&\X&*&\X&\X&&&*&\X&&*&&\X \\ +% different placements for answers &\X&&\X&&&&&&&&&\X&&&&\X \\ +% changing answers placement in output &\X&&\X&\X&&\X&&&&&&\X&&&& \\ +% blank spacing in place of answers &&&&&\X&&&&&&&\X&&&\X&\X \\ +% marking scheme commands &&\X&\X&\X&\X&&&&\X&\X&\X&\X&&&&\X \\ +% various positions of points &&&&&\X&&&&&&&\X&&&&\X \\ +% marking scheme calculation/checking &&\X&\X&\X&\X&&&&\X&&&&&&&\X \\ +% detailed notes for scoring guide &&&&&&&&&&&&&&&&\X \\ +% \hline +% \end{tabular} +% \medskip % % \StopEventually{} % +% \pagebreak % \section{Implementation} % % \subsection{Options and required packages} @@ -1301,6 +1383,10 @@ \ProcessKeyvalOptions* +\PackageInfo{exesheet}{The options `notoc' and `nosetlist' + \MessageBreak are no longer supported\@gobble} + % \@gobble suppresses the line number here + \def\exs@process@dynoptions{ \exs@process@output \exs@process@display @@ -1336,13 +1422,65 @@ % \end{macrocode} % \end{macro} +% +% The following old macros (used before version 2.0) provide an alternative to keyval options. +% They are kept for compatibility reasons. +% \begin{macrocode} +\newcommand{\questionsonly}{ + \PackageWarning{exesheet}{Old command \string\questionsonly\space + is used. \MessageBreak + It can be replaced by the option `output=questions'} + \renewcommand\exesheet@output{questions} + \exs@process@output +} +\newcommand{\answersonly}{ + \PackageWarning{exesheet}{Old command \string\answersonly\space + is used. \MessageBreak + It can be replaced by the option `output=answers'} + \renewcommand\exesheet@output{answers} + \exs@process@output +} +\newcommand{\displaypts}{% + \PackageWarning{exesheet}{Old command \string\displaypts\space + is used. \MessageBreak + It can be replaced by the option `display=pts'} + \renewcommand\exesheet@display{pts} + \exs@process@display +} +\newcommand{\displaypoints}{% + \PackageWarning{exesheet}{Old command \string\displaypoints\space + is used. \MessageBreak + It can be replaced by the option `display=pts'} + \renewcommand\exesheet@display{pts} + \exs@process@display +} +\newcommand*{\displaynotes}[1][\RaggedLeft]{% + \PackageWarning{exesheet}{Old command \string\displaynotes\space + is used. \MessageBreak + It can be replaced by the option `display=notes'} + \renewcommand\exesheet@display{notes} + \exs@process@display + \renewcommand{\noteragged}{#1} +} +\newcommand*{\displaynotesright}[1][\RaggedRight]{% + \PackageWarning{exesheet}{Old command \string\displaynotesright\space + is used. \MessageBreak + It can be replaced by the options `display=notes, margin=right'} + \renewcommand\exesheet@display{notes} + \exs@process@display + \renewcommand\exesheet@margin{right} + \renewcommand{\noteragged}{#1} +} + +% \end{macrocode} +% % Now, we load several packages. % If the \textsf{geometry} package is already loaded, it will not be reloaded % to prevent an option clash. -% The \texttt{shortlabel} option in the \textsf{enumitem} package allows the use +% The \texttt{shortlabel} option in the \textsf{enumitem} package~\cite{ENUM} allows the use % of labels similar to % the \textsf{enumerate} package such as 1., a), A., and so on. -% The \textsf{mparhack} package (by Tom Sgouros and Stefan Ulrich) +% The \textsf{mparhack} package by Tom Sgouros and Stefan Ulrich~\cite{MPAR} % is loaded exclusively for documents in \texttt{twoside} mode. % \begin{macrocode} \RequirePackage{ifthen} @@ -1361,14 +1499,10 @@ % \subsection{Internationalization} % Here we define keywords along with their translations in French, German, Spanish % Italian, Portuguese. We achieve this using macros from the \textsf{translations} package -% by Clemens Niederberger. This package automatically detects the language being used, +% by Clemens Niederberger~\cite{TRAN}. +% This package automatically detects the language being used, % as loaded by \textsf{babel} or \textsf{polyglossia}. % -% Accented characters cannot be utilized here, as they might not be recognized -% if \textsf{exesheet} is loaded before any other package -% (typically when it is loaded as a class). -% As a workaround, we rely on basic \LaTeX{} control sequences to generate them. -% % \begin{macrocode} \DeclareTranslationFallback{exesheet-exercise}{Exercise} \DeclareTranslationFallback{exesheet-subpart}{Part} @@ -1611,7 +1745,7 @@ % \end{macrocode} % \DescribeEnv{tablenum1} \DescribeEnv{tablenuma} -% The |\NewTasks| command is part of the \textsf{tasks} package. +% The |\NewTasks| command is part of the \textsf{tasks} package~\cite{TASK}. % It enables the definition of the environments \texttt{tablenum1}, % \texttt{tablenuma} and \texttt{tablitem}. % Horizontal spacing is adjusted to ensure proper alignment with @@ -1639,6 +1773,10 @@ \fi } % end of macro \exs@process@setlist +\PackageInfo{exesheet}{The environment `tablenum' is deprecated + \MessageBreak and has been replaced by `tablenum1'\@gobble} + % \@gobble suppresses the line number here + % \end{macrocode} % \DescribeEnv{tablitem} % \begin{macrocode} @@ -1750,7 +1888,7 @@ % \end{macro} % % \begin{environment}{questions} -% We utilize the \textsf{versions} package developed by Uwe Lück, +% We utilize the \textsf{versions} package developed by Uwe Lück~\cite{VERS}, % which introduces the macros |\comment| and |\endcomment|. % These macros facilitate conditional displays, a technique also employed % in the \textsf{verbatim} and \textsf{version} packages. @@ -1895,6 +2033,34 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\exs@process@correct} +% The \texttt{correct} option needs the \textsf{schooldocs} package. +% It triggers the |\correct| macro of \textsf{schooldocs} which +% adds the content of |\correctname| in the title of the document. +% Here the option \texttt{conditional} triggers |\correct| only if +% \texttt{output=answers} or \texttt{both}. +% \begin{macrocode} +\def\exs@process@correct{ + \ifthenelse{\equal{\exesheet@correct}{false}}{% do nothing + }{% else + \@ifpackageloaded{schooldocs}{ + \ifthenelse{\equal{\exesheet@correct}{true}}{ + \correct + }{% else + \ifthenelse{\equal{\exesheet@correct}{conditional}}{ + \ifexesheet@answers \correct \fi + }{}} + }{ + \PackageWarningNoLine{exesheet}{The `correct' option requires + \MessageBreak + the `schooldocs' package to be loaded} + }} +} + +% \end{macrocode} +% \end{macro} +% +% % \subsection{Marking scheme options processing} \label{MSoptions} % % The options \texttt{display}, \texttt{marginpos}, \texttt{marginwidth} @@ -2090,7 +2256,7 @@ % When working with a two-sided document, |\marginpar| can be used with an optional parameter % to distinguish left from right contents. % In this context, we employ |\noteraggedleft| and |\noteraggedright| instead of |\noteragged|. -% The \textsf{ragged2e} package by Martin Schröder offers the commands +% The \textsf{ragged2e} package by Martin Schröder~\cite{RAGG} offers the commands % |\RaggedLeft|, |\RaggedRight|, |\Centering|, and |\justifying|. % These commands yield better results compared to the standard % |\raggedleft|, |\raggedright| and |\centering| commands. @@ -2151,9 +2317,6 @@ % \begin{macro}{\exs@process@checkpts} % The scale control option relies on calculations with \emph{lengths}, % which need to have a \emph{global} scope. -% To achieve this, we first define the macros |\gsetlength| and |\gaddtolength|. -% These macros include \% symbols at the end of lines to avoid expanded blank -% spaces. % % For questions, assigned points will be added in |\sum@pts|, % while for exercises, points accumulate in |\sum@exe|. @@ -2171,21 +2334,6 @@ \def\exe@currentlabel{none} \newboolean{scale@valid} -\gdef\gsetlength#1#2{% for obtaining global length values - \begingroup - \setlength\skip@{#2}% local assignment to a scratch register - \global#1=\skip@% global assignment to #1 - \endgroup % \skip@ is restored at the end of the group -} - -\gdef\gaddtolength#1#2{% percent symbol necessary here! - \begingroup - \setlength\skip@{#1}% - \addtolength\skip@{#2}% - \global#1=\skip@% - \endgroup -} - \def\exe@check{% \ifthenelse{\lengthtest{\sum@pts = 0pt}}{% % do not check, no points or first exercise begins @@ -2214,9 +2362,9 @@ in the preamble. \MessageBreak See documentation} }{} - \gsetlength{\sum@exe}{0pt} - \gsetlength{\exe@total}{0pt} - \gsetlength{\sum@pts}{0pt} + \global\sum@exe=0pt + \global\exe@total=0pt + \global\sum@pts=0pt \setboolean{scale@valid}{true} \AtEndDocument{% final checking (global) \ifthenelse{\equal{\exe@currentlabel}{none}}{ @@ -2270,9 +2418,9 @@ \ifexesheet@checkpts% \exe@check% checks the previous exercise \gdef\exe@currentlabel{\exe@label}% for the upcoming exercise - \gsetlength{\sum@pts}{0pt}% - \gsetlength{\exe@total}{#1pt}% - \gaddtolength{\sum@exe}{#1pt}% + \global\sum@pts=0pt% + \global\exe@total=#1pt% + \global\advance\sum@exe by #1pt% \fi% } @@ -2310,7 +2458,7 @@ \mbox{}% \marginpar{\hspace{0pt}\ptsstyle{\ptsmark{#1}}}% \ifexesheet@checkpts% - \gaddtolength{\sum@pts}{#1pt}% + \global\advance\sum@pts by #1pt% \fi% \fi% \ignorespaces @@ -2346,7 +2494,7 @@ % \begin{macro}{\totalsheet} % \begin{macrocode} \newcommand*{\totalsheet}[1]{ - \gsetlength{\sheet@total}{#1pt} + \global\sheet@total=#1pt } % \end{macrocode} @@ -2358,7 +2506,7 @@ % \DescribeMacro{\note*} % \texttt{exesheet@notes} will be ignored. % |\noindent| is required when using |\justifying| from the \textsf{ragged2e} -% package. +% package~\cite{RAGG}. % Within the |\note@marginpar| macro, enclosing |\markingstyle| in double braces % helps prevent unintended formatting within the mandatory argument of |\note|. % A vicious error occurs when using an |\if| \ldots |\fi| structure @@ -2386,7 +2534,8 @@ }% \ifexesheet@checkpts% \ifthenelse{\equal{#1}{}}{}{% - \gaddtolength{\sum@pts}{#1pt}}% + \global\advance\sum@pts by #1pt% + }% \fi% \fi% \ignorespaces @@ -2396,7 +2545,7 @@ \mbox{}% \marginpar{\noindent\hspace{0pt}\markingstyle{#1}}% \ifexesheet@checkpts% - \gaddtolength{\sum@pts}{#1pt}% + \global\advance\sum@pts by #1pt% \fi% \fi% \ignorespaces @@ -2410,90 +2559,59 @@ \newcommand{\totalpoints}{% \ifthenelse{\boolean{exesheet@pts}}{\totalexe}{\points}} -% \end{macrocode} -% \end{macro} -% -% \subsection{The \texttt{correct} option and other (deprecated) commands} -% -% \begin{macro}{\exs@process@correct} -% \begin{macrocode} -\def\exs@process@correct{ - \ifthenelse{\equal{\exesheet@correct}{false}}{% do nothing - }{% else - \@ifpackageloaded{schooldocs}{ - \ifthenelse{\equal{\exesheet@correct}{true}}{ - \correct - }{% else - \ifthenelse{\equal{\exesheet@correct}{conditional}}{ - \ifexesheet@answers \correct \fi - }{}} - }{ - \PackageWarningNoLine{exesheet}{The `correct' option requires - \MessageBreak - the `schooldocs' package to be loaded} - }} -} - -% \end{macrocode} -% \end{macro} -% -% For the time being, the following macros are kept for compatibility reasons. -% \begin{macrocode} -\newcommand{\questionsonly}{ - \PackageWarning{exesheet}{The command \string\questionsonly\space - is deprecated; \MessageBreak - use the package option `output=questions' instead} - \renewcommand\exesheet@output{questions} - \exs@process@output -} -\newcommand{\answersonly}{ - \PackageWarning{exesheet}{The command \string\answersonly\space - is deprecated; \MessageBreak - use the package option `output=answers' instead} - \renewcommand\exesheet@output{answers} - \exs@process@output -} -\newcommand{\displaypts}{% - \PackageWarning{exesheet}{The command \string\displaypts\space - is deprecated; \MessageBreak - use the package option `display=pts' instead} - \renewcommand\exesheet@display{pts} - \exs@process@display -} -\newcommand{\displaypoints}{% - \PackageWarning{exesheet}{The command \string\displaypoints\space - is deprecated; \MessageBreak - use the package option `display=pts' instead} - \renewcommand\exesheet@display{pts} - \exs@process@display -} -\newcommand*{\displaynotes}[1][\RaggedLeft]{% - % \renewcommand{\noteragged}{#1} no effect now! - \PackageWarning{exesheet}{The command \string\displaynotes\space - is deprecated; \MessageBreak - use the package option `display=notes' instead} - \renewcommand\exesheet@display{notes} - \exs@process@display - \renewcommand{\noteragged}{#1} -} -\newcommand*{\displaynotesright}[1][\RaggedRight]{% - % \renewcommand{\noteragged}{#1} no effect now! - \PackageWarning{exesheet}{The command \string\displaynotes\space - is deprecated; \MessageBreak - use the package options `display=notes, margin=right' instead} - \renewcommand\exesheet@display{notes} - \exs@process@display - \renewcommand\exesheet@margin{right} - \renewcommand{\noteragged}{#1} -} - -\PackageInfo{exesheet}{The environment `tablenum' is deprecated - \MessageBreak and has been replaced by `tablenum1'. - \MessageBreak The options `notoc' and `nosetlist' - \MessageBreak are no longer supported\@gobble} - % \@gobble suppresses the line number here %</package> % \end{macrocode} +% \end{macro} % +% \begin{thebibliography}{24} +% % \begin{raggedright} +% \bibitem{GEOM} \emph{The \textsf{geometry} package}, +% Hideo Umeki, CTAN, v5.9 2020/01/02. +% \bibitem{ENUM} \emph{Customizing lists with teh \textsf{enumitem} package}, +% Javier Bezos, CTAN, v3.9 2019/06/20. +% \bibitem{TASK} \emph{\textsf{tasks} -- lists with columns filled horizontally}, +% Clemens Niederberger. CTAN, v1.4a, 2022/01/08. +% \bibitem{VERS} \emph{The \textsf{versions} package -- Omit passages optionally +% under \LaTeX}, Uwe Lück, CTAN, v0.55 2005/04/28. +% \bibitem{FBOX} \emph{Documentation for \texttt{fancybox.sty}: +% Box tips and tricks for \LaTeX}, Timothy Van Zandt, CTAN, v1.4 2010/05/15. +% \bibitem{TRAN} \emph{\textsf{translations} -- Internationalization of \LaTeXe\ Packages}, +% Clemens Niederberger, CTAN, v1.12 2022/02/05. +% \bibitem{RAGG} \emph{The \textsf{ragged2e-}package}, Martin Schröder, +% CTAN, v3.6 2023/06/22. +% \bibitem{MPAR} \emph{\texttt{mparhack.sty}}, Tom Sgouros, Stefan Ulrich, +% CTAN, v1.5 2021/05/02. +% \bibitem{SECT} \emph{The \textsf{sectsty} package}, Rowland McDonnell, +% CTAN, v2.0.2 2002/02/25. +% \bibitem{EXER} \emph{\texttt{exercise.sty} : a package to typeset exercises}, +% Paul Pichaureau, CTAN, v1.6 2014/10/21. +% \bibitem{EXES} \emph{The \textsf{exercises} package}, Roger Jud, +% CTAN, v1.1 2000/05/17. +% \bibitem{XSIM} \emph{\textsf{xsim} -- eXercise Sheets IMproved -- +% the official successor of the \textsf{exsheets} package}, Clemens Niederberger, +% CTAN, v0.21 2022/02/12. +% \bibitem{EXFR} \emph{The \textsf{exframe} package}, Niklas Beisert, +% CTAN, v3.4 202/02/24. +% \bibitem{EXAM} \emph{Using the \textsf{exam} document class}, Philip Hirschhorn, +% CTAN, v2.704 2023/07/09. +% \bibitem{ANSW} \emph{\textsf{answers} Production of solution sheets in \LaTeXe}, +% Mike Piff and Joseph Wright, CTAN, 2.16 2014/08/24. +% \bibitem{PROB} \emph{The \textsf{probsoln v3.05}: creating problem sheets +% optionally with solutions}, Nicola L.C.\@ Talbot, CTAN 2017/07/10. +% \bibitem{EXSO} \emph{The \textsf{ExSol} package}, Walter Daems, +% CTAN, 1.4 2018/10/23. +% \bibitem{EXEP} \emph{The \textsf{exercisepoints} Package}, Henning Kerstan, +% CTAN, v1.2.3 2019/01/03. +% \bibitem{WORK} \emph{\textsf{worksheet}}, Benjamin Zöllner, CTAN, v1.1 2018/08/17. +% \bibitem{EXAN} \emph{\textsf{exam-n}: exam papers}, Norman Gray, CTAN, v1.4.0 2022/10/10. +% \bibitem{EQEX} \emph{The \textsf{eqexam} Package -- part of the Acro\TeX\ eDucation Bundle}, +% D. P. Story, CTAN, 5.2 2021/02/26. +% \bibitem{CESE} \emph{\textsf{cesenaexam} — class file to typeset exams}, Alex Pacini, +% CTAN, v2.0 2017/08/03. +% \bibitem{HIDE} \emph{The \textsf{hideanswer} package: generate documents with +% and without answers by toggling a switch}, Yukoh Kusakabe, CTAN, v1.1 2022/07/09. +% \bibitem{MATH} \emph{The \textsf{mathexam} Package}, Jan Hlavacek, CTAN, v1.00 2007/07/30. +% \end{raggedright} +% \end{thebibliography} % \Finale \endinput diff --git a/Master/texmf-dist/tex/latex/exesheet/exesheet.cls b/Master/texmf-dist/tex/latex/exesheet/exesheet.cls index bf0dbe4c03e..b1c9dd1534d 100644 --- a/Master/texmf-dist/tex/latex/exesheet/exesheet.cls +++ b/Master/texmf-dist/tex/latex/exesheet/exesheet.cls @@ -22,7 +22,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2005/12/01] \ProvidesClass{exesheet} -[2023/10/28 v2.4 .dtx exesheet file] +[2023/12/30 v2.5 .dtx Typesetting exercise or exam sheets] \RequirePackage{kvoptions} \DeclareBoolOption[true]{exetoc} diff --git a/Master/texmf-dist/tex/latex/exesheet/exesheet.sty b/Master/texmf-dist/tex/latex/exesheet/exesheet.sty index 97f74e96bfc..8296808d106 100644 --- a/Master/texmf-dist/tex/latex/exesheet/exesheet.sty +++ b/Master/texmf-dist/tex/latex/exesheet/exesheet.sty @@ -22,7 +22,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2005/12/01] \ProvidesPackage{exesheet} -[2023/10/28 v2.4 .dtx exesheet file] +[2023/12/30 v2.5 .dtx Typesetting exercise or exam sheets] \@ifclassloaded{exesheet}{}{ \RequirePackage{kvoptions} @@ -40,6 +40,10 @@ \ProcessKeyvalOptions* +\PackageInfo{exesheet}{The options `notoc' and `nosetlist' + \MessageBreak are no longer supported\@gobble} + % \@gobble suppresses the line number here + \def\exs@process@dynoptions{ \exs@process@output \exs@process@display @@ -66,6 +70,52 @@ \def\exesheetset#1{\setkeys{exesheet}{#1}\exs@process@dynoptions} +\newcommand{\questionsonly}{ + \PackageWarning{exesheet}{Old command \string\questionsonly\space + is used. \MessageBreak + It can be replaced by the option `output=questions'} + \renewcommand\exesheet@output{questions} + \exs@process@output +} +\newcommand{\answersonly}{ + \PackageWarning{exesheet}{Old command \string\answersonly\space + is used. \MessageBreak + It can be replaced by the option `output=answers'} + \renewcommand\exesheet@output{answers} + \exs@process@output +} +\newcommand{\displaypts}{% + \PackageWarning{exesheet}{Old command \string\displaypts\space + is used. \MessageBreak + It can be replaced by the option `display=pts'} + \renewcommand\exesheet@display{pts} + \exs@process@display +} +\newcommand{\displaypoints}{% + \PackageWarning{exesheet}{Old command \string\displaypoints\space + is used. \MessageBreak + It can be replaced by the option `display=pts'} + \renewcommand\exesheet@display{pts} + \exs@process@display +} +\newcommand*{\displaynotes}[1][\RaggedLeft]{% + \PackageWarning{exesheet}{Old command \string\displaynotes\space + is used. \MessageBreak + It can be replaced by the option `display=notes'} + \renewcommand\exesheet@display{notes} + \exs@process@display + \renewcommand{\noteragged}{#1} +} +\newcommand*{\displaynotesright}[1][\RaggedRight]{% + \PackageWarning{exesheet}{Old command \string\displaynotesright\space + is used. \MessageBreak + It can be replaced by the options `display=notes, margin=right'} + \renewcommand\exesheet@display{notes} + \exs@process@display + \renewcommand\exesheet@margin{right} + \renewcommand{\noteragged}{#1} +} + \RequirePackage{ifthen} \@ifpackageloaded{geometry}{}{\RequirePackage{geometry}} \RequirePackage{xcolor} @@ -278,6 +328,10 @@ \fi } % end of macro \exs@process@setlist +\PackageInfo{exesheet}{The environment `tablenum' is deprecated + \MessageBreak and has been replaced by `tablenum1'\@gobble} + % \@gobble suppresses the line number here + \NewTasksEnvironment[label=\labelitemi, label-align=right, item-indent=2.5em,label-offset=0.5em, @@ -438,6 +492,23 @@ \newcommand\answerspace[1]{ \ifexesheet@answerspace \par\vspace{#1} \fi} +\def\exs@process@correct{ + \ifthenelse{\equal{\exesheet@correct}{false}}{% do nothing + }{% else + \@ifpackageloaded{schooldocs}{ + \ifthenelse{\equal{\exesheet@correct}{true}}{ + \correct + }{% else + \ifthenelse{\equal{\exesheet@correct}{conditional}}{ + \ifexesheet@answers \correct \fi + }{}} + }{ + \PackageWarningNoLine{exesheet}{The `correct' option requires + \MessageBreak + the `schooldocs' package to be loaded} + }} +} + \newboolean{exesheet@pts} \newboolean{exesheet@notes} @@ -634,21 +705,6 @@ \def\exe@currentlabel{none} \newboolean{scale@valid} -\gdef\gsetlength#1#2{% for obtaining global length values - \begingroup - \setlength\skip@{#2}% local assignment to a scratch register - \global#1=\skip@% global assignment to #1 - \endgroup % \skip@ is restored at the end of the group -} - -\gdef\gaddtolength#1#2{% percent symbol necessary here! - \begingroup - \setlength\skip@{#1}% - \addtolength\skip@{#2}% - \global#1=\skip@% - \endgroup -} - \def\exe@check{% \ifthenelse{\lengthtest{\sum@pts = 0pt}}{% % do not check, no points or first exercise begins @@ -677,9 +733,9 @@ in the preamble. \MessageBreak See documentation} }{} - \gsetlength{\sum@exe}{0pt} - \gsetlength{\exe@total}{0pt} - \gsetlength{\sum@pts}{0pt} + \global\sum@exe=0pt + \global\exe@total=0pt + \global\sum@pts=0pt \setboolean{scale@valid}{true} \AtEndDocument{% final checking (global) \ifthenelse{\equal{\exe@currentlabel}{none}}{ @@ -725,9 +781,9 @@ \ifexesheet@checkpts% \exe@check% checks the previous exercise \gdef\exe@currentlabel{\exe@label}% for the upcoming exercise - \gsetlength{\sum@pts}{0pt}% - \gsetlength{\exe@total}{#1pt}% - \gaddtolength{\sum@exe}{#1pt}% + \global\sum@pts=0pt% + \global\exe@total=#1pt% + \global\advance\sum@exe by #1pt% \fi% } @@ -752,7 +808,7 @@ \mbox{}% \marginpar{\hspace{0pt}\ptsstyle{\ptsmark{#1}}}% \ifexesheet@checkpts% - \gaddtolength{\sum@pts}{#1pt}% + \global\advance\sum@pts by #1pt% \fi% \fi% \ignorespaces @@ -776,7 +832,7 @@ } \newcommand*{\totalsheet}[1]{ - \gsetlength{\sheet@total}{#1pt} + \global\sheet@total=#1pt } \definecolor{notecolor}{rgb}{0.0, 0.4, 0.0} % kind of dark green @@ -800,7 +856,8 @@ }% \ifexesheet@checkpts% \ifthenelse{\equal{#1}{}}{}{% - \gaddtolength{\sum@pts}{#1pt}}% + \global\advance\sum@pts by #1pt% + }% \fi% \fi% \ignorespaces @@ -810,7 +867,7 @@ \mbox{}% \marginpar{\noindent\hspace{0pt}\markingstyle{#1}}% \ifexesheet@checkpts% - \gaddtolength{\sum@pts}{#1pt}% + \global\advance\sum@pts by #1pt% \fi% \fi% \ignorespaces @@ -820,76 +877,6 @@ \newcommand{\totalpoints}{% \ifthenelse{\boolean{exesheet@pts}}{\totalexe}{\points}} -\def\exs@process@correct{ - \ifthenelse{\equal{\exesheet@correct}{false}}{% do nothing - }{% else - \@ifpackageloaded{schooldocs}{ - \ifthenelse{\equal{\exesheet@correct}{true}}{ - \correct - }{% else - \ifthenelse{\equal{\exesheet@correct}{conditional}}{ - \ifexesheet@answers \correct \fi - }{}} - }{ - \PackageWarningNoLine{exesheet}{The `correct' option requires - \MessageBreak - the `schooldocs' package to be loaded} - }} -} - -\newcommand{\questionsonly}{ - \PackageWarning{exesheet}{The command \string\questionsonly\space - is deprecated; \MessageBreak - use the package option `output=questions' instead} - \renewcommand\exesheet@output{questions} - \exs@process@output -} -\newcommand{\answersonly}{ - \PackageWarning{exesheet}{The command \string\answersonly\space - is deprecated; \MessageBreak - use the package option `output=answers' instead} - \renewcommand\exesheet@output{answers} - \exs@process@output -} -\newcommand{\displaypts}{% - \PackageWarning{exesheet}{The command \string\displaypts\space - is deprecated; \MessageBreak - use the package option `display=pts' instead} - \renewcommand\exesheet@display{pts} - \exs@process@display -} -\newcommand{\displaypoints}{% - \PackageWarning{exesheet}{The command \string\displaypoints\space - is deprecated; \MessageBreak - use the package option `display=pts' instead} - \renewcommand\exesheet@display{pts} - \exs@process@display -} -\newcommand*{\displaynotes}[1][\RaggedLeft]{% - % \renewcommand{\noteragged}{#1} no effect now! - \PackageWarning{exesheet}{The command \string\displaynotes\space - is deprecated; \MessageBreak - use the package option `display=notes' instead} - \renewcommand\exesheet@display{notes} - \exs@process@display - \renewcommand{\noteragged}{#1} -} -\newcommand*{\displaynotesright}[1][\RaggedRight]{% - % \renewcommand{\noteragged}{#1} no effect now! - \PackageWarning{exesheet}{The command \string\displaynotes\space - is deprecated; \MessageBreak - use the package options `display=notes, margin=right' instead} - \renewcommand\exesheet@display{notes} - \exs@process@display - \renewcommand\exesheet@margin{right} - \renewcommand{\noteragged}{#1} -} - -\PackageInfo{exesheet}{The environment `tablenum' is deprecated - \MessageBreak and has been replaced by `tablenum1'. - \MessageBreak The options `notoc' and `nosetlist' - \MessageBreak are no longer supported\@gobble} - % \@gobble suppresses the line number here \endinput %% %% End of file `exesheet.sty'. |