diff options
author | Karl Berry <karl@freefriends.org> | 2023-09-06 20:15:28 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-09-06 20:15:28 +0000 |
commit | a07688a9ea2f4df2f15254d462000070ec2e09d2 (patch) | |
tree | 68fc59b7243739e30c704f931c695785ff4dfea5 /Master/texmf-dist/tex/latex | |
parent | 0c232887be2a49f8f428fff65955a18d4d77d538 (diff) |
exesheet (6sep23)
git-svn-id: svn://tug.org/texlive/trunk@68192 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/exesheet/exesheet.cls | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/exesheet/exesheet.sty | 32 |
2 files changed, 21 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/exesheet/exesheet.cls b/Master/texmf-dist/tex/latex/exesheet/exesheet.cls index 52953d202a3..cb2a84efe0e 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/08/25 v2.1 .dtx exesheet file] +[2023/09/05 v2.2 .dtx exesheet file] \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 ff5790c7c0b..35f668ef633 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/08/25 v2.1 .dtx exesheet file] +[2023/09/05 v2.2 .dtx exesheet file] \@ifclassloaded{exesheet}{}{ \RequirePackage{kvoptions} @@ -44,7 +44,7 @@ \exs@process@output \exs@process@display \exs@process@noteragged -} +} % answerspace do not need a special process macro \AtEndOfPackage{\exs@process@dynoptions} \AtBeginDocument{ @@ -163,7 +163,7 @@ \newcommand{\labelexercisestyle}{} \newcommand*{\@exercise}[1][]{% \ifexesheet@checkpts \exe@check{\labelexercise} \fi - % curiously, the \execheck must be performed before \refstepcounter ! + % curiously, \exe@check must be performed before \refstepcounter \refstepcounter{exercise} \subsection*{\labelexercisestyle\labelexercise\enskip #1} \ifexesheet@exetoc @@ -231,10 +231,14 @@ }{} } \ifexesheet@setlist - \standardfrenchlists % necessary when exesheet is loaded after babel + \standardfrenchlists + % must be executed here when exesheet is loaded after babel \DisableKeyvalOption[action=warning,package=exesheet]{exesheet}{setlist} \fi +\newcommand\labelenumone{\arabic{task}.} +\newcommand\labelenuma{(\alph{task})} + \def\exs@process@setlist{% must be executed at begin document \ifexesheet@setlist \standardfrenchlists % if exesheet is loaded before babel @@ -243,19 +247,21 @@ \fi \ifexesheet@setlist - \NewTasksEnvironment[label=\arabic*.,label-format=\bfseries, + \settasks{label-format=\bfseries} + \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=(\alph*),label-format=\bfseries, + \NewTasksEnvironment[label=\labelenuma, 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) \else - \NewTasksEnvironment[label=\arabic*., - column-sep=1em, + \NewTasksEnvironment[label=\labelenumone, + 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=(\alph*), + \NewTasksEnvironment[label=\labelenuma, 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) @@ -264,7 +270,7 @@ \NewTasksEnvironment[label=\labelitemi, label-align=right, - item-indent=2.3333em,label-offset=0.5em, + item-indent=2.5em,label-offset=0.5em, after-item-skip=0.5ex plus 0.5ex minus 0.5ex]{tablitem}[\item](2) \newenvironment{tablenuma*}{% @@ -323,10 +329,12 @@ \ifthenelse{\equal{\exesheet@output}{answers}}{ \setboolean{exesheet@questions}{false} \setboolean{exesheet@answers}{true} + \exesheet@answerspacefalse }{% else if \ifthenelse{\equal{\exesheet@output}{both}}{ \setboolean{exesheet@questions}{true} \setboolean{exesheet@answers}{true} + \exesheet@answerspacefalse }{% else \PackageWarning{exesheet}{Value `\exesheet@output' is not supported by `output' option} @@ -400,14 +408,14 @@ }{\ifthenelse{\boolean{exesheet@answers}}{}{\endcomment}} \newenvironment{answers*}{ - \ifthenelse{\boolean{exesheet@answers}}{}{\comment} + \ifthenelse{\boolean{exesheet@answers}}{\correctionstyle}{\comment} }{\ifthenelse{\boolean{exesheet@answers}}{}{\endcomment}} \newcommand{\question}[1]{\ifexesheet@questions #1\fi} \newcommand{\answer}[1]{% \ifexesheet@answers% - \ifexesheet@questions \correctionstyle #1\else #1\fi + \ifexesheet@questions {\correctionstyle #1}\else #1\fi \fi } |