From 7bf6cb7522ed05d9e300c4a34b443c0a47ea57ed Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 13 Feb 2024 23:48:03 +0000 Subject: exesheet (14feb24) git-svn-id: svn://tug.org/texlive/trunk@69838 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/exesheet/README.md | 6 +- Master/texmf-dist/doc/latex/exesheet/exesheet.pdf | Bin 334627 -> 342355 bytes .../texmf-dist/source/latex/exesheet/exesheet.dtx | 124 ++++++++++++--------- Master/texmf-dist/tex/latex/exesheet/exesheet.cls | 2 +- Master/texmf-dist/tex/latex/exesheet/exesheet.sty | 51 +++++---- 5 files changed, 109 insertions(+), 74 deletions(-) diff --git a/Master/texmf-dist/doc/latex/exesheet/README.md b/Master/texmf-dist/doc/latex/exesheet/README.md index 1c56562c44d..cd802580ef8 100644 --- a/Master/texmf-dist/doc/latex/exesheet/README.md +++ b/Master/texmf-dist/doc/latex/exesheet/README.md @@ -8,15 +8,15 @@ The primary advantage of exesheet is its ability to display a detailed scoring guide and correction instructions as needed. This feature is especially beneficial for grading papers with multiple graders. -Additionally, the exesheet class loads the schooldocs package -which manages the page layout, the main title, headers and footers. - The exesheet package offers the following features: - macros for organizing exercises and subparts, - specific settings for enumeration lists, - environments for questions and answers, which can be displayed or hidden, - macros for detailed comments and grading instructions in the margins which can be displayed or hidden. +Additionally, the exesheet class loads the schooldocs package +which manages the page layout, the main title, headers and footers. + ## Installation diff --git a/Master/texmf-dist/doc/latex/exesheet/exesheet.pdf b/Master/texmf-dist/doc/latex/exesheet/exesheet.pdf index b18f1858e74..8f1760acc17 100644 Binary files a/Master/texmf-dist/doc/latex/exesheet/exesheet.pdf and b/Master/texmf-dist/doc/latex/exesheet/exesheet.pdf differ diff --git a/Master/texmf-dist/source/latex/exesheet/exesheet.dtx b/Master/texmf-dist/source/latex/exesheet/exesheet.dtx index 02a8f5e68cd..d3c92b9ef35 100644 --- a/Master/texmf-dist/source/latex/exesheet/exesheet.dtx +++ b/Master/texmf-dist/source/latex/exesheet/exesheet.dtx @@ -23,7 +23,7 @@ %\ProvidesClass{exesheet} %\ProvidesPackage{exesheet} %<*class|package> -[2024/02/03 v2.6 .dtx Typesetting exercise or exam sheets] +[2024/02/13 v2.7 .dtx Typesetting exercise or exam sheets] % %<*driver> \documentclass{ltxdoc} @@ -85,7 +85,7 @@ % % \fi % -% \CheckSum{1192} +% \CheckSum{1206} % % \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 @@ -178,6 +178,12 @@ % - error message when using colsenum or colsitem without loading multicol % - changes in the comparison with other packages} % +% \changes{v2.7}{2024/02/13}{ +% - an expl3 update prevents the correction color in tasks environment -> fixed +% - new command enumfont +% - babel-french option 'StandardLists=true' works now if french is passed in documentclass +% - completion of the comparison with other packages} +% % \GetFileInfo{exesheet.dtx} % % \maketitle @@ -318,6 +324,7 @@ % \subpart % Now you are ready to proceed with the current exercise. % +% \bigskip % \pagebreak % The following macros allow customization in the same manner as for |\exercise|. % @@ -545,12 +552,16 @@ % (for \texttt{tablenum1}) and |\labelenuma| (for \texttt{tablenuma}), % using the \texttt{task} counter: % \eg |\renewcommand\labelenuma{\Alph{task}.}| yields the labels -% \textbf{A.}, \textbf{B.}, \ldots +% \textbf{A.}, \textbf{B.}, etc. % % \smallskip +% \DescribeMacro{\enumfont} +% With the default option \texttt{setlist=true}, +% the font of all enumeration labels may be changed by redefining |\enumfont| +% (|\bfseries| by default). % If the \textsf{exesheet} package is invoked with the option \texttt{setlist=false}, % labels within \texttt{tablenum1} and \texttt{tablenuma} environments -% will be presented with indentation and in normal font rather than bold. +% will be presented with indentation, and in normal font rather than bold. % You can change the label formatting globally with the command |\settask|, \eg % |\settask{label-format=\itshape}|. % You can also completely redefine the environments using |\RenewTasksEnvironment|. @@ -562,17 +573,12 @@ % immediately after inserting the |\item| command % within an \texttt{enumerate} environment, % a vertical misplacement may occur. -% ^^A as demonstrated in the following example: -% ^^A \begin{enumerate} -% ^^A \item -% ^^A \begin{tablenuma}(3) \item One \item Two \item Three \end{tablenuma} -% ^^A \end{enumerate} % To achieve proper vertical spacing in such cases, we offer % the starred environments \texttt{tablenuma*} and \texttt{tablitem*}, % with corrected alignment as shown below: % % \noindent\psframe(-0.25,0.05)(12.75,-0.97) -% \psline[linewidth=0.1pt,linecolor=green,linestyle=dashed](0, -0.63)(10.5, -0.63) +% \psline[linewidth=0.1pt,linecolor=green,linestyle=dashed](0, -0.6)(10.5, -0.6) % \begin{enumerate} % \item % \begin{tablenuma*}(3) \item One \item Two \item Three \end{tablenuma*} @@ -1294,39 +1300,40 @@ % \item \textsf{esami}, Grazia Messineo, Salvatore Vassallo~\cite{ESAMI} % \item \textsf{randexam}, Jianrui Lyu~\cite{RAND} % \item \textsf{hideanswer}, Yukoh Kusakabe~\cite{HIDE} -% ^^A\item \textsf{mathexam}, Jan Hlavacek~\cite{MATH} +% \item \textsf{mathexam}, Jan Hlavacek~\cite{MATH} % \item \textsf{exesheet}, Antoine Missier % \end{enumerate} % \end{flushleft} % \end{multicols} % % \newcommand\X{\ding{56}} -% \setlength{\extrarowheight}{2pt} -% \noindent\begin{tabular}{@{\hspace{1.8pt}}l@{\hspace{2pt}}|% -% *{17}{@{\hspace{1.8pt}}c@{\hspace{1.8pt}}|}} +% \setlength{\extrarowheight}{2pt}\noindent +% {\small +% \begin{tabular}{@{\hspace{2pt}}l@{\hspace{5pt}}|% +% *{18}{@{\hspace{1.8pt}}c@{\hspace{2pt}}|}} % \hline -% Functionality &A&B&C&D&E&F&G&H&I&J&K&L&M&N&O&P&Q \\ +% Functionality &A&B&C&D&E&F&G&H&I&J&K&L&M&N&O&P&Q&R \\ % \hline -% Optional text for exercise titles &\X&&\X&\X&\X&&&&\X&&&&\X&&&&\X \\ -% Subparts of exercises &\X&&&\X&\X&&&&\X&&\X&\X&\X&\X&\X&&\X \\ -% Annex title or appendix &&&&&&&&&&&&&&&\X&&\X \\ -% Exercise titles in TOC of PDF files &\X&&&&&&&&&&&&&&&&\X \\ -% Short labels for exercises &\X&&\X&\X&&&&&&&&&&&&&\X \\ -% Hiding questions or answers* &\X&*&\X&\X&*&\X&\X&\X&&&*&\X&&\X&*&*&\X \\ -% Different placements for answers &\X&&&&&&&&&&\X&\X&&&&&\X \\ -% Change answers placement in output &\X&&&\X&&\X&&\X&&&&\X&&&&& \\ -% Blank spacing in place of answers &&\X&\X&&\X&&&&&&&\X&&\X&\X&&\X \\ -% Marking scheme commands &&\X&\X&\X&\X&&&&\X&\X&\X&\X&&\X&\X&&\X \\ -% Various positions of points &&&&\X&\X&&&&&&&\X&&\X&&&\X \\ -% Marking scheme calculation/checking &&\X&\X&\X&\X&&&&\X&&\X&\X&&&\X&&\X \\ -% Detailed notes for scoring guide &&&&&&&&&&&&&&&&&\X \\ +% Optional text for exercise titles &\X&&\X&\X&\X&&&&\X&&&&\X&&&&&\X \\ +% Subparts of exercises &\X&&&\X&\X&&&&\X&&\X&\X&\X&\X&\X&&&\X \\ +% Annex title or appendix &&&&&&&&&&&&&&&\X&&&\X \\ +% Exercise titles in TOC of PDF files &\X&&&&&&&&&&&&&&&&&\X \\ +% Short labels for exercises &\X&&\X&\X&&&&&&&&&&&&&&\X \\ +% Hiding questions or answers* &\X&*&\X&\X&*&\X&\X&\X&&&*&\X&&\X&*&*&&\X \\ +% Different placements for answers &\X&&&&&&&&&&\X&\X&&&&&&\X \\ +% Change answers placement in output &\X&&&\X&&\X&&\X&&&&\X&&&&&& \\ +% Blank spacing in place of answers &&\X&\X&&\X&&&&&&&\X&&\X&\X&&\X&\X \\ +% Marking scheme commands &&\X&\X&\X&\X&&&&\X&\X&\X&\X&&\X&\X&&&\X \\ +% Various positions of points &&&&\X&\X&&&&&&&\X&&\X&&&&\X \\ +% Marking scheme calculation/checking &&\X&\X&\X&\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} @@ -1468,8 +1475,8 @@ \renewcommand{\noteragged}{#1} } \newcommand*{\displaynotesright}[1][\RaggedRight]{% - \PackageWarning{exesheet}{Old command \string\displaynotesright\space - is used. \MessageBreak + \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 @@ -1709,8 +1716,10 @@ % (|\setenumerate| is deprecated). By default, |itemsep=1ex| is set for first-level lists, % and |leftmargin=1.5em| is used to align labels with the start of lines. % \begin{macrocode} +\newcommand\enumfont{\bfseries} + \newenvironment{exenumerate}[1][]{% - \setlist[enumerate]{font=\bfseries} + \setlist[enumerate]{font=\enumfont} \setlist[enumerate,1]{leftmargin=1.5em, itemsep=3ex plus 1ex minus 1ex,topsep=3ex plus 1ex minus 1ex} \setlist[enumerate,3]{noitemsep,nolistsep} @@ -1720,49 +1729,46 @@ % \end{macrocode} % \end{macro} -% When using the \textsf{babel} package with the \texttt{french} option, +% When using the \textsf{babel-french} package, % \texttt{itemize} lists are altered to use the same dash label for each list level. % These modifications are undone here to revert to the default % \LaTeX\ \texttt{itemize} lists, including labels and spaces. -% We have created the |\standardfrenchlists| command, which should be invoked within the -% |\AtBeginDocument| command or immediately, depending on whether +% This setting is done by the |\frenchsetup| command, which should be invoked within +% the |\AtBeginDocument| command or immediately, depending on whether % \textsf{exesheet} is loaded before or after \textsf{babel}. % \begin{macrocode} -\newcommand\standardfrenchlists{% - \@ifpackagewith{babel}{french}{ - \frenchsetup{StandardLists=true} - }{} -} \ifexesheet@setlist - \standardfrenchlists + \@ifundefined{frenchsetup}{}{\frenchsetup{StandardLists=true}} % must be executed here (and not at begin doc) if loaded after babel \fi \newcommand\labelenumone{\arabic{task}.} \newcommand\labelenuma{(\alph{task})} +\newcommand\refenuma{\alph{task}} \def\exs@process@setlist{% must be executed at begin document \ifexesheet@setlist - \standardfrenchlists % executed at begin doc if loaded before babel - \setlist[enumerate]{font=\bfseries} + \@ifundefined{frenchsetup}{}{\frenchsetup{StandardLists=true}} + % executed at begin doc if loaded before babel + \setlist[enumerate]{font=\enumfont} \setlist[enumerate,1]{topsep=1.5ex plus 1ex minus 1ex,leftmargin=1.5em} \fi % \end{macrocode} % \DescribeEnv{tablenum1} \DescribeEnv{tablenuma} -% The |\NewTasks| command is part of the \textsf{tasks} package~\cite{TASK}. +% The |\NewTasksEnvironment| 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 % items in other \texttt{enumerate} (or \texttt{itemize}) environments. % \begin{macrocode} \ifexesheet@setlist - \settasks{label-format=\bfseries} + \settasks{label-format=\enumfont} \NewTasksEnvironment[label=\labelenumone, column-sep=1em,label-align=right, item-indent=1.5em,label-width=1em,label-offset=0.5em, after-item-skip=0.5ex plus 0.5ex minus 0.5ex]{tablenum1}[\item](2) - \NewTasksEnvironment[label=\labelenuma,ref=\alph{task}, + \NewTasksEnvironment[label=\labelenuma,ref=\refenuma, column-sep=1em,label-align=right, item-indent=2.15em,label-width=1.6em,label-offset=0.5em, after-item-skip=0.5ex plus 0.5ex minus 0.5ex]{tablenuma}[\item](2) @@ -1771,7 +1777,7 @@ column-sep=1em,label-align=right, label-width=1em,label-offset=0.5em, after-item-skip=0.5ex plus 0.5ex minus 0.5ex]{tablenum1}[\item](2) - \NewTasksEnvironment[label=\labelenuma,ref=\alph{task}, + \NewTasksEnvironment[label=\labelenuma,ref=\refenuma, column-sep=1em,label-align=right, item-indent=2.15em,label-width=1.6em,label-offset=0.5em, after-item-skip=0.5ex plus 0.5ex minus 0.5ex]{tablenuma}[\item](2) @@ -1986,6 +1992,8 @@ % \end{macrocode} % Then we proceed to define the \texttt{answers} environment. +% It seems that the \textsf{tasks} package resets the color to black, +% therefore the |\color{correctioncolor}| options in |\settasks|. % \begin{macrocode} \newenvironment{answers}[1][]{% #1 is the optional level \ifthenelse{\boolean{exesheet@answers}}{% @@ -1993,9 +2001,21 @@ \set@toclevel[#1] \typeset@correctionname \correctionstyle% + \ifexesheet@setlist + \settasks{ + label-format = \color{correctioncolor}\enumfont, + item-format = \color{correctioncolor} + }% + \else + \settasks{ + label-format = \color{correctioncolor}, + item-format = \color{correctioncolor} + }% + \fi% \ifexesheet@multicol - \renewcommand{\columnseprulecolor}{\color{correctioncolor}} - \fi + \renewcommand{\columnseprulecolor}{% + \color{correctioncolor}} + \fi% }{} }{\comment} }{\ifthenelse{\boolean{exesheet@answers}}{}{\endcomment}} @@ -2378,7 +2398,8 @@ \AtEndDocument{% final checking (global) \ifthenelse{\equal{\exe@currentlabel}{none}}{ \ifthenelse{\lengthtest{\sum@pts = 0pt}}{ - \PackageWarningNoLine{exesheet}{checkpts: No points displayed} + \PackageWarningNoLine{exesheet}{checkpts: + No points displayed} }{ \ifthenelse{\lengthtest{\sheet@total = \sum@pts}}{ \PackageWarningNoLine{exesheet}{Total: @@ -2391,7 +2412,8 @@ }{% last exercise and final checking \exe@check \ifthenelse{\lengthtest{\sum@exe} = 0pt}{ - \PackageWarningNoLine{exesheet}{checkpts: No points displayed} + \PackageWarningNoLine{exesheet}{checkpts: + No points displayed} }{ \ifthenelse{\lengthtest{\sheet@total = \sum@exe}}{ \PackageWarningNoLine{exesheet}{Total: diff --git a/Master/texmf-dist/tex/latex/exesheet/exesheet.cls b/Master/texmf-dist/tex/latex/exesheet/exesheet.cls index 3bf4aea5292..334147724e1 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} -[2024/02/03 v2.6 .dtx Typesetting exercise or exam sheets] +[2024/02/13 v2.7 .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 461a4a4471f..a57a3636bcc 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} -[2024/02/03 v2.6 .dtx Typesetting exercise or exam sheets] +[2024/02/13 v2.7 .dtx Typesetting exercise or exam sheets] \@ifclassloaded{exesheet}{}{ \RequirePackage{kvoptions} @@ -107,8 +107,8 @@ \renewcommand{\noteragged}{#1} } \newcommand*{\displaynotesright}[1][\RaggedRight]{% - \PackageWarning{exesheet}{Old command \string\displaynotesright\space - is used. \MessageBreak + \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 @@ -277,8 +277,10 @@ \par\noindent\textbf{\exlabel}~} \newcommand{\exe}{\@ifstar{\@@exe}{\@exe}} +\newcommand\enumfont{\bfseries} + \newenvironment{exenumerate}[1][]{% - \setlist[enumerate]{font=\bfseries} + \setlist[enumerate]{font=\enumfont} \setlist[enumerate,1]{leftmargin=1.5em, itemsep=3ex plus 1ex minus 1ex,topsep=3ex plus 1ex minus 1ex} \setlist[enumerate,3]{noitemsep,nolistsep} @@ -286,33 +288,30 @@ \begin{enumerate}[#1] }{\end{enumerate}} -\newcommand\standardfrenchlists{% - \@ifpackagewith{babel}{french}{ - \frenchsetup{StandardLists=true} - }{} -} \ifexesheet@setlist - \standardfrenchlists + \@ifundefined{frenchsetup}{}{\frenchsetup{StandardLists=true}} % must be executed here (and not at begin doc) if loaded after babel \fi \newcommand\labelenumone{\arabic{task}.} \newcommand\labelenuma{(\alph{task})} +\newcommand\refenuma{\alph{task}} \def\exs@process@setlist{% must be executed at begin document \ifexesheet@setlist - \standardfrenchlists % executed at begin doc if loaded before babel - \setlist[enumerate]{font=\bfseries} + \@ifundefined{frenchsetup}{}{\frenchsetup{StandardLists=true}} + % executed at begin doc if loaded before babel + \setlist[enumerate]{font=\enumfont} \setlist[enumerate,1]{topsep=1.5ex plus 1ex minus 1ex,leftmargin=1.5em} \fi \ifexesheet@setlist - \settasks{label-format=\bfseries} + \settasks{label-format=\enumfont} \NewTasksEnvironment[label=\labelenumone, column-sep=1em,label-align=right, item-indent=1.5em,label-width=1em,label-offset=0.5em, after-item-skip=0.5ex plus 0.5ex minus 0.5ex]{tablenum1}[\item](2) - \NewTasksEnvironment[label=\labelenuma,ref=\alph{task}, + \NewTasksEnvironment[label=\labelenuma,ref=\refenuma, column-sep=1em,label-align=right, item-indent=2.15em,label-width=1.6em,label-offset=0.5em, after-item-skip=0.5ex plus 0.5ex minus 0.5ex]{tablenuma}[\item](2) @@ -321,7 +320,7 @@ column-sep=1em,label-align=right, label-width=1em,label-offset=0.5em, after-item-skip=0.5ex plus 0.5ex minus 0.5ex]{tablenum1}[\item](2) - \NewTasksEnvironment[label=\labelenuma,ref=\alph{task}, + \NewTasksEnvironment[label=\labelenuma,ref=\refenuma, column-sep=1em,label-align=right, item-indent=2.15em,label-width=1.6em,label-offset=0.5em, after-item-skip=0.5ex plus 0.5ex minus 0.5ex]{tablenuma}[\item](2) @@ -468,9 +467,21 @@ \set@toclevel[#1] \typeset@correctionname \correctionstyle% + \ifexesheet@setlist + \settasks{ + label-format = \color{correctioncolor}\enumfont, + item-format = \color{correctioncolor} + }% + \else + \settasks{ + label-format = \color{correctioncolor}, + item-format = \color{correctioncolor} + }% + \fi% \ifexesheet@multicol - \renewcommand{\columnseprulecolor}{\color{correctioncolor}} - \fi + \renewcommand{\columnseprulecolor}{% + \color{correctioncolor}} + \fi% }{} }{\comment} }{\ifthenelse{\boolean{exesheet@answers}}{}{\endcomment}} @@ -744,7 +755,8 @@ \AtEndDocument{% final checking (global) \ifthenelse{\equal{\exe@currentlabel}{none}}{ \ifthenelse{\lengthtest{\sum@pts = 0pt}}{ - \PackageWarningNoLine{exesheet}{checkpts: No points displayed} + \PackageWarningNoLine{exesheet}{checkpts: + No points displayed} }{ \ifthenelse{\lengthtest{\sheet@total = \sum@pts}}{ \PackageWarningNoLine{exesheet}{Total: @@ -757,7 +769,8 @@ }{% last exercise and final checking \exe@check \ifthenelse{\lengthtest{\sum@exe} = 0pt}{ - \PackageWarningNoLine{exesheet}{checkpts: No points displayed} + \PackageWarningNoLine{exesheet}{checkpts: + No points displayed} }{ \ifthenelse{\lengthtest{\sheet@total = \sum@exe}}{ \PackageWarningNoLine{exesheet}{Total: -- cgit v1.2.3