summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-12-29 21:59:49 +0000
committerKarl Berry <karl@freefriends.org>2024-12-29 21:59:49 +0000
commit98f8c02a83b229237142c14f7ddb06559c2e0cbb (patch)
tree2ae9086dd79909669f3afb871f81da85ccf5f5e7 /Master
parent262530ff1206ca770dd9d0c406945ddceb5f4c6c (diff)
exesheet
git-svn-id: svn://tug.org/texlive/trunk@73235 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/exesheet/exesheet.pdfbin342355 -> 348338 bytes
-rw-r--r--Master/texmf-dist/source/latex/exesheet/exesheet.dtx171
-rw-r--r--Master/texmf-dist/tex/latex/exesheet/exesheet.cls2
-rw-r--r--Master/texmf-dist/tex/latex/exesheet/exesheet.sty32
4 files changed, 89 insertions, 116 deletions
diff --git a/Master/texmf-dist/doc/latex/exesheet/exesheet.pdf b/Master/texmf-dist/doc/latex/exesheet/exesheet.pdf
index 8f1760acc17..0335f5f8185 100644
--- a/Master/texmf-dist/doc/latex/exesheet/exesheet.pdf
+++ b/Master/texmf-dist/doc/latex/exesheet/exesheet.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/exesheet/exesheet.dtx b/Master/texmf-dist/source/latex/exesheet/exesheet.dtx
index d3c92b9ef35..00a2b3afd88 100644
--- a/Master/texmf-dist/source/latex/exesheet/exesheet.dtx
+++ b/Master/texmf-dist/source/latex/exesheet/exesheet.dtx
@@ -23,16 +23,17 @@
%<class>\ProvidesClass{exesheet}
%<package>\ProvidesPackage{exesheet}
%<*class|package>
-[2024/02/13 v2.7 .dtx Typesetting exercise or exam sheets]
+[2024/12/22 v2.8 Typesetting exercise or exam sheets]
%</class|package>
%<*driver>
-\documentclass{ltxdoc}
-%
-% uncomment the following lines if you want to use the exesheet class instead of ltxdoc
-%\usepackage{doc}
-%\AtBeginDocument{\MakeShortVerb{\|}}
-%\providecommand\marg[1]{{\ttfamily\{}\meta{#1}{\ttfamily\}}}
-%\providecommand\oarg[1]{{\ttfamily[}\meta{#1}{\ttfamily]}}
+\documentclass{article}
+
+% comment the following lines to use the ltxdoc class instead of the doc package
+\usepackage{hypdoc}
+\AtBeginDocument{\MakeShortVerb{\|}}
+\providecommand\marg[1]{{\ttfamily\{}\meta{#1}{\ttfamily\}}}
+\providecommand\oarg[1]{{\ttfamily[}\meta{#1}{\ttfamily]}}
+
\usepackage[exetoc=false,marginwidth=unset,display=notes]{exesheet}
\usepackage{schooldocs}
\usepackage[utf8]{inputenc}
@@ -85,24 +86,6 @@
%</driver>
% \fi
%
-% \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
-% Lower-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
-% Digits \0\1\2\3\4\5\6\7\8\9
-% Exclamation \! Double quote \" Hash (number) \#
-% Dollar \$ Percent \% Ampersand \&
-% Acute accent \' Left paren \( Right paren \)
-% Asterisk \* Plus \+ Comma \,
-% Minus \- Point \. Solidus \/
-% Colon \: Semicolon \; Less than \<
-% Equals \= Greater than \> Question mark \?
-% Commercial at \@ Left bracket \[ Backslash \\
-% Right bracket \] Circumflex \^ Underscore \_
-% Grave accent \` Left brace \{ Vertical bar \|
-% Right brace \} Tilde \~}
-%
% \changes{v0.0}{2010/09/01}{Initial personal version}
% \changes{v0.9}{2020/01/02}{Initial documentation in French}
% \changes{v1.0}{2020/07/22}{Initial public version with documentation in English}
@@ -184,6 +167,11 @@
% - babel-french option 'StandardLists=true' works now if french is passed in documentclass
% - completion of the comparison with other packages}
%
+% \changes{v2.8}{2024/12/22}{
+% - improvements in answers environment
+% - starred environments tablenuma* and tablitem* no longer supported
+% - character table and checksum removed from dtx file (useless)}
+%
% \GetFileInfo{exesheet.dtx}
%
% \maketitle
@@ -259,6 +247,7 @@
% \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
@@ -269,13 +258,13 @@
%
% \bigskip
% \DescribeMacro{\exercisename}
-% The term ``\exercisename'' is automatically translated into various languages
+% The word ``\exercisename'' is automatically translated into various languages
% \footnote{Currently, translation is integrated into the package
% for the following languages: French, German, Spanish, Italian, and Portuguese.}
% 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~\cite{TRAN} (which allows dynamic language switching),
+% A better approach is to use macros from the \mbox{\textsf{translations}}
+% package by Clemens Niederberger~\cite{TRAN} (which allows language switching),
% \eg |\DeclareTranslation{swedish}{exesheet-exercise}{\"Ovning}}|.
%
% \smallskip
@@ -288,7 +277,7 @@
% \smallskip
% \DescribeMacro{\theexercise}
% If you wish to alter only the numbering style, you can redefine
-% the |\theexercise| command based on the |exercise| counter.
+% |\theexercise| which is based on the |exercise| counter.
%
% \smallskip
% \DescribeMacro{\labelexercisestyle}
@@ -442,7 +431,7 @@
% that allows, among others things,
% the typesetting of alternative list labels. For instance, typing
% |\begin{enumerate}[label=\alph*),font=\itshape\normalfont]|
-% will yield the labels ``\emph{a)}, \emph{b)}, \emph{c)}\ldots''.
+% will produce the labels ``\emph{a)}, \emph{b)}, \emph{c)}\ldots''.
% There are many other options available
% (see the \textsf{enumitem}~\cite{ENUM} package documentation)
% \footnote{Labels can also be modified using a ``shortlabel'' argument,
@@ -522,7 +511,7 @@
% 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~\cite{ENUM},
+% For example, similar to the \mbox{\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.
@@ -534,7 +523,7 @@
% Notice that numbering occurs line by line in this context.
%
% \exercise
-% \psframe(-0.25,1.3)(12.75,-2.8)
+% \psframe(-0.25,1.3)(12.75,-2.7)
% Calculate the derivative of the following functions:
% \begin{tablenum1}(3)
% \item $\ds f(x) = \frac{1-x^2}{\mathrm{e}^x +\mathrm{e}^{-x}}$,
@@ -568,26 +557,31 @@
% When \texttt{setlist=true}, place these commands \emph{after} |\begin{document}|.
%
% \medskip
-% \DescribeEnv{tablenuma*} \DescribeEnv{tablitem*}
% When you intend to utilize \texttt{tablenuma} (or \texttt{tablitem})
% immediately after inserting the |\item| command
% within an \texttt{enumerate} environment,
-% a vertical misplacement may occur.
-% 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.6)(10.5, -0.6)
+% a vertical misplacement may occur as shown below:
% \begin{enumerate}
% \item
-% \begin{tablenuma*}(3) \item One \item Two \item Three \end{tablenuma*}
+% \begin{tablenuma}(3) \item $\ds f(x) = \frac{1-x^2}{\mathrm{e}^x +\mathrm{e}^{-x}}$
+% \item $\ds g(x) = \ln \left( \frac{1-x}{1+x^2}\right)$,
+% \item $\ds h(x) = \int_{0}^{1}\mathrm{e}^{xy}\, \mathrm{d}y$.
+% \end{tablenuma}
% \end{enumerate}
+% To adjust the vertical alignment, include
+% |\mbox{}\vspace|\marg{height} just after |\item| and before invoking |\begin{tablenuma}|
+% (or |\begin{tablitem}|), where \meta{height} can be a positive or negative length.
+% Here we used |\vspace{-5.4ex}|.
%
-% \medskip
-% If the vertical alignment is still not perfect, include
-% |\mbox{}\vspace|\marg{height} just after |\item| and before invoking |\begin{tablenuma*}|
-% (or |\begin{tablitem*}|), where \meta{height} can be a positive or negative length.
+% \noindent\psframe(-0.25,0.15)(12.75,-1.05)
+% \psline[linewidth=0.1pt,linecolor=green,linestyle=dashed](0,-0.57)(12,-0.57)
+% \begin{enumerate}
+% \item \mbox{}\vspace{-5.4ex}
+% \begin{tablenuma}(3) \item $\ds f(x) = \frac{1-x^2}{\mathrm{e}^x +\mathrm{e}^{-x}}$
+% \item $\ds g(x) = \ln \left( \frac{1-x}{1+x^2}\right)$,
+% \item $\ds h(x) = \int_{0}^{1}\mathrm{e}^{xy}\, \mathrm{d}y$.
+% \end{tablenuma}
+% \end{enumerate}
%
% \subsection{Items aligned by column: \texttt{colsenum}, \texttt{colsitem}}
% \DescribeEnv{colsenum}
@@ -602,7 +596,7 @@
% Here's an example with |\begin{colsenum}{3}|:
%
% \exercise
-% \psframe(-0.25,1.3)(12.75,-2.65)
+% \psframe(-0.25,1.3)(12.75,-2.7)
% Calculate the derivative of the following functions:
% \begin{colsenum}{3}
% \item $\ds f(x) = \frac{1-x^2}{\mathrm{e}^x +\mathrm{e}^{-x}}$,
@@ -731,21 +725,21 @@
%
% \subsection{More about \texttt{answers} environments}
% Internally, we have utilized the |\comment| and |\endcomment| macros
-% 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.
+% from the \mbox{\textsf{versions}} package by Uwe Lück~\cite{VERS}.
+% Several other packages also enable selective management of code portions.
+% Notably, the \textsf{verbatim} package by Rainer Schöpf,
+% \textsf{comment} by Victor Eijkhout,
+% \textsf{version} by Donald Arseneau and Stephen Bellantoni,
+% \textsf{optional} by Donald Arseneau
+% and \textsf{codesection} by Matthias Pospiech.
% 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
-% can be nested.
-% ^^A \footnote{The \textsf{codesection} package also supports
-% ^^A such nesting, including within the preamble, as well as the \textsf{optional} package,
-% ^^A but the latter manages only short sections of optional code.}.
+% can be nested
+% \footnote{The \textsf{codesection} package also supports
+% such nesting, including within the preamble, as well as the \textsf{optional} package,
+% but the latter manages only short sections of optional code.}.
%
% However the \texttt{questions} and \texttt{answers} environments
% serve a broader purpose beyond merely displaying or hiding text.
@@ -769,15 +763,6 @@
% other numbers for lower levels
% (which won't appear in the table of contents or in the PDF file’s summary).
%
-% Caution should be taken that, if the \texttt{questions} environment is not used
-% beforehand in the same exercise (or part),
-% the \texttt{answers} environment will consider the correction as global
-% for the entire sheet (or exercise) and will reset the \texttt{exercise}
-% (or \texttt{part}) counter.
-% This can be managed properly with the optional argument.
-% For example, use |\begin{answers}[2]| to prevent \texttt{exercise} counter reset,
-% or |\begin{answers}[3]| to prevent \texttt{subpart} counter reset.
-%
% \medskip
% \DescribeMacro{answers*}
% The starred version \texttt{answers*} doesn't display the
@@ -840,7 +825,7 @@
% In the following example, we used
% |\exercise[\points{5}]|:
% \exercise[\points{5}]
-% \psframe(-0.25,1.3)(12.75,-0.4)
+% \psframe(-0.25,1.3)(12.75,-0.35)
% Try to read this document to the end without drinking tea and you get five points.
%
% \bigskip
@@ -965,7 +950,7 @@
% single one by specifying the number of points as an optional argument of the |\note| command:
% |\note|\oarg{num}\marg{comment}.
%
-% The initial comment in the following example is generated (immediately after |\item|) using
+% The first comment in the following example is obtained using (immediately after |\item|)
% |\note[1]{0.5 for the anti-derivative\\0.5 for simplifying}|.
%
% \exercise[\totalexe{4}] \label{totalexe}
@@ -1266,7 +1251,8 @@
%
% \subsection{Comparison with other packages}\label{comparison}
%
-% In this section, we will provide an overview of the functionalities (as of today \today)
+% In this section, we will provide an overview of the functionalities (when version 2.7 of
+% this package was published, at February 13, 2024)
% of various packages or classes found in the `Exercise' or `Exam' sections
% of the CTAN archives
% (Comprehensive \TeX\ Archive Network).
@@ -1751,7 +1737,8 @@
\@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}
+ \setlist[enumerate,1]{topsep=1.5ex plus 1ex minus 1ex,
+ leftmargin=1.5em}
\fi
% \end{macrocode}
@@ -1795,22 +1782,6 @@
label-align=right,
item-indent=2.5em,label-offset=0.5em,
after-item-skip=0.5ex plus 0.5ex minus 0.5ex]{tablitem}[\item](2)
-
-% \end{macrocode}
-% \DescribeEnv{tablenuma*} \DescribeEnv{tablitem*}
-% The starred environments \texttt{tablenuma*} and \texttt{tablitem*}
-% are designed to be employed within an \texttt{enumerate} environment,
-% precisely at the outset of an |\item|, in order to achieve correct horizontal
-% alignment.
-% The length of |-1.667\baselineskip| has been tested with various font families and sizes.
-% The alignment is generally good.
-% \begin{macrocode}
-\newenvironment{tablenuma*}{%
- \mbox{}\vspace{-1.667\baselineskip}\begin{tablenuma}}{
- \end{tablenuma}}
-\newenvironment{tablitem*}{%
- \mbox{}\vspace{-1.667\baselineskip}\begin{tablitem}}{
- \end{tablitem}}
% \end{macrocode}
% \DescribeEnv{colsenum}\DescribeEnv{colsenum*}
@@ -1946,7 +1917,8 @@
\newcounter{@toclevel}
\newcommand{\set@toclevel}[1][]{
\ifthenelse{\equal{#1}{}}{
- \ifthenelse{\value{exercise} > \value{exe@ini}}{
+ \ifthenelse{\(\value{exercise} > \value{exe@ini}\)
+ \and \(\value{exe@ini} > 0 \)}{
\setcounter{@toclevel}{1}
}{% else
\ifthenelse{\equal{\the\@enumdepth}{0}}{
@@ -1971,14 +1943,14 @@
\ifexesheet@exetoc
\addcontentsline{toc}{section}{\correctionname}
\fi
- \setcounter{exercise}{0}
+ \setcounter{exercise}{\value{exe@ini}}
}{% else if
\ifthenelse{\value{@toclevel} = 2}{%
\subsection*{\correctionstyle\correctionname}
\ifexesheet@exetoc
\addcontentsline{toc}{subsection}{\correctionname}
\fi
- \setcounter{subpart}{0}
+ \setcounter{subpart}{\value{subpart@ini}}
}{% else if
\ifthenelse{\value{@toclevel} = 3}{%
\subsubsection*{\correctionstyle\correctionname}
@@ -1997,9 +1969,9 @@
% \begin{macrocode}
\newenvironment{answers}[1][]{% #1 is the optional level
\ifthenelse{\boolean{exesheet@answers}}{%
- \ifthenelse{\boolean{exesheet@questions}}{
- \set@toclevel[#1]
- \typeset@correctionname
+ \ifthenelse{\boolean{exesheet@questions}}{%
+ \set@toclevel[#1]%
+ \typeset@correctionname%
\correctionstyle%
\ifexesheet@setlist
\settasks{
@@ -2016,9 +1988,12 @@
\renewcommand{\columnseprulecolor}{%
\color{correctioncolor}}
\fi%
- }{}
+ }{}%
}{\comment}
-}{\ifthenelse{\boolean{exesheet@answers}}{}{\endcomment}}
+}{\ifthenelse{\boolean{exesheet@answers}}{%
+ \setcounter{exe@ini}{0}
+ \setcounter{subpart@ini}{0}
+ }{\endcomment}}
\newenvironment{answers*}{
\ifthenelse{\boolean{exesheet@answers}}{\correctionstyle}{\comment}
@@ -2096,7 +2071,7 @@
% and \texttt{noteragged} are handled using the following internal commands.
%
% \medskip
-% The \texttt{display} key option determines the value of the two booleans
+% The \texttt{display} key option determines the value of the booleans
% |exesheet@pts| and |exesheet@notes|.
% The |exesheet@pts| boolean controls the display of the content of |\pts|
% and optional arguments of |\note|,
@@ -2477,7 +2452,7 @@
% The test |#1 < 2| doesn't work with decimal numbers without |\lengthtest|,
% but it works with lengths.
% \end{macro}
-% \DescribeMacro{\pts}
+% \begin{macro}{\pts}
% \begin{macrocode}
\definecolor{ptscolor}{named}{red}
\newcommand{\ptsstyle}[1]{%
@@ -2496,7 +2471,7 @@
}
% \end{macrocode}
-%
+% \end{macro}
% \begin{macro}{\totalexe}
% In the subsequent macros that utilize
% |\marginpar|, the presence of percent symbols and |\ignorespaces| is essential
diff --git a/Master/texmf-dist/tex/latex/exesheet/exesheet.cls b/Master/texmf-dist/tex/latex/exesheet/exesheet.cls
index 334147724e1..5d920be2b19 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/13 v2.7 .dtx Typesetting exercise or exam sheets]
+[2024/12/22 v2.8 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 a57a3636bcc..2b7c96feb90 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/13 v2.7 .dtx Typesetting exercise or exam sheets]
+[2024/12/22 v2.8 Typesetting exercise or exam sheets]
\@ifclassloaded{exesheet}{}{
\RequirePackage{kvoptions}
@@ -302,7 +302,8 @@
\@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}
+ \setlist[enumerate,1]{topsep=1.5ex plus 1ex minus 1ex,
+ leftmargin=1.5em}
\fi
\ifexesheet@setlist
@@ -336,13 +337,6 @@
item-indent=2.5em,label-offset=0.5em,
after-item-skip=0.5ex plus 0.5ex minus 0.5ex]{tablitem}[\item](2)
-\newenvironment{tablenuma*}{%
- \mbox{}\vspace{-1.667\baselineskip}\begin{tablenuma}}{
- \end{tablenuma}}
-\newenvironment{tablitem*}{%
- \mbox{}\vspace{-1.667\baselineskip}\begin{tablitem}}{
- \end{tablitem}}
-
\newenvironment{colsenum*}[2][]{%
\ifexesheet@multicol \else
\PackageError{exesheet}{The environments colsenum and colsenum*
@@ -421,7 +415,8 @@
\newcounter{@toclevel}
\newcommand{\set@toclevel}[1][]{
\ifthenelse{\equal{#1}{}}{
- \ifthenelse{\value{exercise} > \value{exe@ini}}{
+ \ifthenelse{\(\value{exercise} > \value{exe@ini}\)
+ \and \(\value{exe@ini} > 0 \)}{
\setcounter{@toclevel}{1}
}{% else
\ifthenelse{\equal{\the\@enumdepth}{0}}{
@@ -442,14 +437,14 @@
\ifexesheet@exetoc
\addcontentsline{toc}{section}{\correctionname}
\fi
- \setcounter{exercise}{0}
+ \setcounter{exercise}{\value{exe@ini}}
}{% else if
\ifthenelse{\value{@toclevel} = 2}{%
\subsection*{\correctionstyle\correctionname}
\ifexesheet@exetoc
\addcontentsline{toc}{subsection}{\correctionname}
\fi
- \setcounter{subpart}{0}
+ \setcounter{subpart}{\value{subpart@ini}}
}{% else if
\ifthenelse{\value{@toclevel} = 3}{%
\subsubsection*{\correctionstyle\correctionname}
@@ -463,9 +458,9 @@
\newenvironment{answers}[1][]{% #1 is the optional level
\ifthenelse{\boolean{exesheet@answers}}{%
- \ifthenelse{\boolean{exesheet@questions}}{
- \set@toclevel[#1]
- \typeset@correctionname
+ \ifthenelse{\boolean{exesheet@questions}}{%
+ \set@toclevel[#1]%
+ \typeset@correctionname%
\correctionstyle%
\ifexesheet@setlist
\settasks{
@@ -482,9 +477,12 @@
\renewcommand{\columnseprulecolor}{%
\color{correctioncolor}}
\fi%
- }{}
+ }{}%
}{\comment}
-}{\ifthenelse{\boolean{exesheet@answers}}{}{\endcomment}}
+}{\ifthenelse{\boolean{exesheet@answers}}{%
+ \setcounter{exe@ini}{0}
+ \setcounter{subpart@ini}{0}
+ }{\endcomment}}
\newenvironment{answers*}{
\ifthenelse{\boolean{exesheet@answers}}{\correctionstyle}{\comment}