texlive[60537] Master/texmf-dist: exesheet (18sep21)
commits+karl at tug.org
commits+karl at tug.org
Sat Sep 18 22:14:56 CEST 2021
Revision: 60537
http://tug.org/svn/texlive?view=revision&revision=60537
Author: karl
Date: 2021-09-18 22:14:56 +0200 (Sat, 18 Sep 2021)
Log Message:
-----------
exesheet (18sep21)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/exesheet/exesheet.pdf
trunk/Master/texmf-dist/source/latex/exesheet/exesheet.dtx
trunk/Master/texmf-dist/tex/latex/exesheet/exesheet.cls
trunk/Master/texmf-dist/tex/latex/exesheet/exesheet.sty
Modified: trunk/Master/texmf-dist/doc/latex/exesheet/exesheet.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/exesheet/exesheet.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/exesheet/exesheet.dtx 2021-09-18 14:30:27 UTC (rev 60536)
+++ trunk/Master/texmf-dist/source/latex/exesheet/exesheet.dtx 2021-09-18 20:14:56 UTC (rev 60537)
@@ -23,7 +23,7 @@
%<class>\ProvidesClass{exesheet}
%<package>\ProvidesPackage{exesheet}
%<*class|package>
- [2020/08/30 v1.1 .dtx exesheet file]
+[2021/09/18 v1.2 .dtx exesheet file]
%</class|package>
%
%<*driver>
@@ -49,7 +49,6 @@
\newcommand{\ds}{\displaystyle}
\newcommand{\bs}{\textbackslash}
-\newcommand{\TODO}{\textcolor{green}{TODO}}
\definecolor{darkbrown}{rgb}{0.5,0.1,0.1}
\allsectionsfont{\sffamily\color{darkbrown}}
@@ -68,7 +67,7 @@
\setboolean{marginpoints}{true}
\setboolean{marginfullnotes}{true}
-\DisableCrossrefs
+\DisableCrossrefs
%\CodelineIndex
%\RecordChanges
@@ -77,21 +76,21 @@
%\author{Antoine Missier \\ \texttt{antoine.missier at ac-toulouse.fr}}
\subject{Antoine Missier \\
\texttt{antoine.missier at ac-toulouse.fr}}
-\date{August 30, 2021, \fileversion}
+\date{\filedate, \fileversion}
\hypersetup{%
- colorlinks,
+ colorlinks,
linkcolor=blue,
- pdftitle={exesheet},
- pdfsubject={LaTeX class and package},
+ pdftitle={exesheet},
+ pdfsubject={LaTeX class and package},
pdfauthor={Antoine Missier}
- }
+}
\begin{document}
- \DocInput{exesheet.dtx}
+\DocInput{exesheet.dtx}
\end{document}
%</driver>
% \fi
%
-% \CheckSum{638}
+% \CheckSum{609}
%
% \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
@@ -113,8 +112,9 @@
% \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}
-% \changes{v1.1}{2021/08/30}{macro tablenum replaced by tablenum1, small modifications due
+% \changes{v1.1}{2021/08/30}{Macro tablenum replaced by tablenum1, small modifications due
% to changes in tasks package}
+% \changes{v1.2}{2021/09/18}{Bug correction in macros tablenum1 and tablenuma, using the translations package for internationalization}
%
% \GetFileInfo{exesheet.dtx}
%
@@ -141,18 +141,18 @@
%
% Another specificity of the \textsf{exesheet} package is specific settings
% for enumeration lists, different from \LaTeX\ standard settings,
-% usefull for the numbering of questions or answers inside an exercise.
+% useful for the numbering of questions or answers inside an exercise.
%
% Other packages provide often more or less elaborate mechanisms
% to manage the placement of answers.
% \textsf{exesheet} has no such ambitions:
% for all exercises of the sheet, we can display subject only,
-% answer anly or both, but always at the place they are inserted
+% answer only or both, but always at the place they are inserted
% in the source file. On the other hand this choice may be very flexible:
% we can do a correct version for all exercises together, or a correct version per exercise,
% per part (subpart of exercise), per question, per sub-question.
%
-% Finally the original fonctionality of this package is the display
+% Finally the original functionality of this package is the display
% of a detailed marking scheme,
% with optional explanations, in the margin of exercise answers.
%
@@ -196,11 +196,11 @@
% in a few languages\footnote{Translation
% is currently integrated into the package for the following languages: French,
% German, Spanish, Italian, Portuguese.}
-% when the \textsf{babel} package is loaded.
-% It can be redefined, with |\renewcommand|, which should be placed
-% after |\begin{document}|, or else we can use macros from the \textsf{babel}
-% package (allowing dynamic language change), e.g.\\
-% |\addto\captionssweedish{\def\exercisename{\"Ovning}}| (in the preamble).
+% according to the loaded language (by \textsf{babel} or \textsf{polyglossia}).
+% It can be redefined, with |\renewcommand|,
+% or else we can use macros from the \textsf{translations}
+% package (allowing dynamic language change), e.g. (in the preamble)\\
+% |\DeclareTranslation{Swedish}{exesheet-exercise}{\"Ovning}}|.
%
% \DescribeMacro{\labelexercise}
% This command calls |\exercisename| following by the exercise number.
@@ -228,7 +228,7 @@
%
% \exercise*[(Fermat theorem)]{Problem}
% \psframe(-0.25,1.3)(12.75,-0.7)
-% Proove that there are no positive integers $x, y, z$ such that $x^n+y^n=z^n$
+% Prove that there are no positive integers $x, y, z$ such that $x^n+y^n=z^n$
% for any integer $n$ greater than 2.
%
% \subsection{The \texttt{\bs subpart} command}
@@ -235,7 +235,7 @@
%
% \DescribeMacro{\subpart}
% An exercise may contain several parts that we obtain
-% with the |\subpart|\oarg{opt} command, typeset like a subsubsection.
+% with the |\subpart|\oarg{opt} command, typeset like a sub-subsection.
% \exercise
% \subpart[(preliminary)]
% \psframe(-0.25,1.95)(12.75,-1.9)
@@ -249,11 +249,12 @@
% This numbering type can be redefined with the |\thesubpart| command based on
% the |subpart| counter, for instance |\renewcommand\thesubpart{\arabic{subpart}}|.
%
+% \pagebreak
% \DescribeMacro{\subpartname} \DescribeMacro{\labelsubpart}
% \DescribeMacro{\labelsubpartstyle}
% As for |\exercise|, the |\subpart| command
-% uses |\subpartname| (with automatic translation in a few languages
-% if \textsf{babel} is loaded),
+% uses |\subpartname| (with automatic translation in a few languages
+% according to the selected language),
% |\labelsubpart| and |\labelsubpartstyle|, which are editable.
%
% \DescribeMacro{\subpart*}
@@ -264,7 +265,7 @@
% \subsection{The \texttt{\bs annex} command}
% \DescribeMacro{\annex}
% The |\annex|\oarg{opt} command typesets the title \textbf{ANNEX},
-% in uppercase letters, centred
+% in uppercase letters, centered
% and in the subsection style,
% with an optional parameter, added on the same line.
%
@@ -273,9 +274,9 @@
% \annex[(to return)]
%
% \DescribeMacro{\annexname}
-% The word \emph{\annexname} has automatic translation in a few languages
-% if \textsf{babel} package is loaded.
-% It can be extended to other languages or modified by redifining |\annexname|.
+% The word \emph{\annexname} has automatic translation in a few languages.
+% It can be extended to other languages or modified by redefining |\annexname|
+% or with macros from the \textsf{translations} package.
%
% \DescribeMacro{\annexstyle}
% The annex title style is set by the |\annexstyle| macro,
@@ -309,7 +310,7 @@
% \bigskip
% \DescribeMacro{\exname} \DescribeMacro{\exlabel} \DescribeMacro{\exsepmark}
% The abbreviation \emph{\exname} may be changed by
-% redefining |\exname|.
+% redefining |\exname| or with macros from the \textsf{translations} package.
% The |\exlabel| macro calls |\exname| following by a period then the exercise number,
% and |\exsepmark| typesets a long dash.
% We may change these features by redefining these commands.
@@ -337,10 +338,10 @@
%
% \bigskip
% \DescribeMacro{\pointsname} \DescribeMacro{\pointname}
-% Like before, the words \emph{points} and in the singular \emph{point}
+% Like before, the word \emph{points} and in the singular \emph{point}
% (if \meta{pts} is inferior to 2)
-% get automatic translation (with \textsf{babel}) in a few languages
-% and are modifiables.
+% get automatic translation in a few languages
+% and are modifiable.
%
% \DescribeMacro{\pointsstyle} \DescribeMacro{pointscolor}
% The style used by the |\points| command may be redefined with |\pointsstyle|.
@@ -362,11 +363,11 @@
% may also be changed by the \texttt{\bs labelenumi} and \texttt{\bs labelenumii} commands.}
% from the \textsf{enumitem} package by Javier Bezos.
% Lists with \texttt{itemize} environment are kept in their default configuration\footnote{The
-% \texttt{french} otion of the \textsf{babel} package
+% \texttt{french} option of the \textsf{babel} package
% alters \texttt{itemize} lists behavior and uses long dash
% as labels for each list level.
% This behavior is problematic when mathematics follows the dash
-% symbol because the latter may be confused wih the minus sign.
+% symbol because the latter may be confused with the minus sign.
% Modifications of the \texttt{french} option (which supersedes \texttt{frenchb}
% of \textsf{babel}) are canceled to restore \LaTeX\ default settings.}.
%
@@ -389,7 +390,7 @@
%
% \subsection{List of exercises : the \texttt{exenumerate} environment}
% \DescribeEnv{exenumerate}
-% When an exercise sheet is made of short independant exercises,
+% When an exercise sheet is made of short independent exercises,
% it would be ill-advised to display the complete title \emph{\exercisename} for each.
% In addition to the |\exe| command, previously presented,
% we provide an even lighter solution with the |exenumerate| environment,
@@ -396,7 +397,7 @@
% which is only an enumeration list in which
% spaces between items are further increased compared with those of \texttt{enumerate}.
% Here is an example (the main list is an \texttt{exenumerate} environment but
-% sublists are produced with regular \texttt{enumerate} environments):
+% sub-lists are produced with regular \texttt{enumerate} environments):
%
% \vspace{-\baselineskip}
% \noindent\psframe(-0.25,-0.3)(12.75,-6.75)
@@ -438,9 +439,8 @@
% |\NewTasksEnvironment| macro, from the \textsf{tasks} package by Clemens Niederberger.
% They take an optional argument \meta{opt}
% explained in the documentation of this package,
-% e.g.\ |label=1)| gives a roman numbering
-% following by a closing parenthesis (like in \texttt{enumitem}
-% or \texttt{enumerate} packages.
+% e.g.\ |label=\arabic*)| produces an Arabic numbering
+% following by a closing parenthesis (like in \texttt{enumitem} package).
% There are also many possibilities to place items in an original way,
% for instance, the |\item*| command allows to
% specify the number of columns the item is supposed to span.
@@ -466,8 +466,7 @@
% (except by redefining the environment with |\RenewTasksEnvironment|).
% If the \textsf{exesheet} package is called with option \texttt{nosetlist},
% labels of \texttt{tablenum1} and \texttt{tablenuma} environments
-% are displayed in normal font with indentation, as for
-% \texttt{enumerate}.
+% are displayed in normal font instead of boldface, with indentation.
%
% \subsection{Items aligned by columns: \texttt{colsenum}}
% \DescribeEnv{colsenum}
@@ -549,7 +548,7 @@
% In the case (by default) where questions and answers are displayed both,
% answers are then typeset in the style
% |\correctionstyle|, which uses the color \texttt{correctioncolor}.
-% This color may be choosen with the |\definecolor| macro
+% This color may be chosen with the |\definecolor| macro
% (by default |\definecolor{correctioncolor}{rgb}{0,0.2,0.6}| = kind of dark blue).
% Moreover, in that case,
% the title \textbf{\correctionname} is displayed at the beginning
@@ -570,14 +569,14 @@
% \begin{questions}
% \begin{enumerate}
% \item Is the \textsf{exesheet} package useful ?
-% \item Ins't there any other packages that deal with exercises ?
+% \item Isn't there any other packages that deal with exercises ?
% \end{enumerate}
% \end{questions}
% \begin{answers}
% \begin{enumerate}
% \item Yes, the \textsf{exesheet} package is very useful.
-% \item There are many other packages that deal with exercices, and
-% give the ability to produce separatly questions and solutions, for example
+% \item There are many other packages that deal with exercises, and
+% give the ability to produce separately questions and solutions, for example
% \textsf{exercise} by Paul Pichaureau, \textsf{exercises} by Roger Jud,
% \textsf{exsheets} (superseded by \textsf{xsim}) by Clemens Niederberger,
% \textsf{exframe} by Niklas Beisert,
@@ -591,7 +590,7 @@
% When only answers are displayed, the text color remains black,
% the word \emph{\correctionname} is not displayed and the
% |\points| macro is patched to suppress the display of points.
-% An extended solution for a variable display of points will be disussed
+% An extended solution for a variable display of points will be discussed
% in section \ref{totalpoints} with the |\totalpoints| macro.
%
% \subsection{More about \texttt{answers} environment}
@@ -632,7 +631,7 @@
% The optional \meta{level} parameter is defined as follows:
% 1 for section level titles,
% 2 for subsections (like \emph{\exercisename}),
-% 3 for subsubsections (like \emph{\partname}),
+% 3 for sub-subsections (like \emph{\partname}),
% another number for lower levels
% (then they will not appear in the table of contents).
%
@@ -650,7 +649,7 @@
% It can be more readable (in the source code) when questions and answers are short.
% In the case of displaying both questions and answers,
% the \emph{\correctionname} title will appear on a new line, in bold,
-% as for levels lower than subsubsection in the \texttt{answers} environment
+% as for levels lower than sub-subsection in the \texttt{answers} environment
% (and without entries in the table of contents).
% But this command doesn't work with \texttt{verbatim} inside.
%
@@ -670,7 +669,7 @@
%
% \vspace{-\baselineskip}
% \noindent\psframe(-3.5,-0.25)(12.75,-2)
-% \exe \pts{3} The first exercise with marking sheme.
+% \exe \pts{3} The first exercise with marking scheme.
% \exe \pts{1.5} The second one.
%
% \bigskip
@@ -703,7 +702,7 @@
% \label{totalpoints}
% \DescribeMacro{\totalexe}
% \DescribeMacro{\note}
-% To give a more detailed marking sheme, the \textsf{exesheet} package
+% To give a more detailed marking scheme, the \textsf{exesheet} package
% provides some extended commands:
% |\totalexe|\marg{num} to display the total number of points of an exercise
% and especially |\note|\oarg{pts}\marg{comment},
@@ -711,7 +710,7 @@
% The optional parameter \meta{pts} is the number of points of the question
% and the mandatory parameter \meta{comment} is used to give details about the marking scheme.
% Below the title has been obtained with |\exercise[\totalexe{4}]|
-% and the first comment with \\
+% and the first comment (on next page) with \\
% |\note[1]{0,5 for the anti-derivative\\0,5 for simplification of $\ln$}|.
%
% \exercise[\totalexe{4}] \label{totalexe}
@@ -779,13 +778,13 @@
%
% \DescribeMacro{\note*}
% If we don't want to add comment, we have the
-% |\note*|\marg{pts} command (better thant |\note|\oarg{pts}|{}|),
+% |\note*|\marg{pts} command (better than |\note|\oarg{pts}|{}|),
% used here in answer 3: |\note*{1.5}|.
%
% \DescribeMacro{markingcolor} \DescribeMacro{\markingstyle} \DescribeMacro{\ptsboxlength}
% The display color of the points, in |\totalexe| and |\note|,
% is defined by \texttt{markingcolor}
-% and the style by |\markingstyle|, which are modifiables.
+% and the style by |\markingstyle|, which are modifiable.
% The oval box produced by |\totalexe| is obtained with the |\ovalbox| command
% of the \textsf{fancybox} package by Timothy Van Zandt,
% with corner arcs set by |\cornersize{1}|.
@@ -881,109 +880,107 @@
\DeclareOption{nosetlist}{\setboolean{nosetlist}{true}}
\ProcessOptions \relax
\RequirePackage{xcolor}
-\RequirePackage[shortlabels]{enumitem}
+\RequirePackage[shortlabels]{enumitem}
\RequirePackage{tasks}
\RequirePackage{versions}
%\@ifpackageloaded{doc}{}{\RequirePackage{verbatim}}
\RequirePackage{geometry}
\RequirePackage{fancybox}
+\RequirePackage{translations}
% \end{macrocode}
%
% \subsection{Internationalization}
% Here we define the keywords and their translation in French, German, Spanish
-% Italian, Portuguese, thanks to the |\addto\captions|\meta{language} macro
-% of the \textsf{babel} package.
+% Italian, Portuguese, thanks to macros of the \textsf{translations} package
+% by Clemens Niederberger. It detects the used language
+% loaded by \textsf{babel} or \textsf{polyglossia}.
%
-% Translations are placed in a macro |\exetranslate| because, if
-% \textsf{exesheet} is called before \textsf{babel} (this is necessarily the case for the
-% \textsf{exesheet} class), then these translations should only happen
-% after having loaded the \textsf{babel} package, therefore the |\AtBeginDocument|.
-% On the other hand, if the package is loaded \emph{after} \textsf{babel},
-% |AtBeginDocument{\exetranslate}| doesn't work, curiously.
-% But calling immediately |\exetranslate| works in that case.
-%
% Accented characters cannot be used here because they are not recognized
-% if \textsf{inputenc} is loaded after \textsf{exesheet},
-% despite the |\AtBeginDocument|. So we have used the basic \LaTeX\ commands to produce them.
+% if \textsf{inputenc} is loaded after \textsf{exesheet}.
+% So we have used the basic \LaTeX\ commands to produce them.
%
-% \TODO: give the choice to use \textsf{polyglossia} instead of \textsf{babel};
-% see the \textsf{translations} or \textsf{multilang} packages.
-%
% \begin{macrocode}
-\def\exercisename{Exercise}
-\def\subpartname{Part}
-\def\annexname{Annex}
-\def\exname{Ex}
-\def\pointsname{points}
-\def\pointname{point}
-\def\correctionname{Correction}
-\def\ptsname{pts}
-\def\ptname{pt}
+\DeclareTranslationFallback{exesheet-exercise}{Exercise}
+\DeclareTranslationFallback{exesheet-subpart}{Part}
+\DeclareTranslationFallback{exesheet-annex}{Annex}
+\DeclareTranslationFallback{exesheet-ex}{Ex}
+\DeclareTranslationFallback{exesheet-points}{points}
+\DeclareTranslationFallback{exesheet-point}{point}
+\DeclareTranslationFallback{exesheet-correction}{Correction}
+\DeclareTranslationFallback{exesheet-pts}{pts}
+\DeclareTranslationFallback{exesheet-pt}{pt}
-\newcommand\exetranslate{%
- \@ifpackageloaded{babel}{%
- \addto\captionsfrench{%
- \def\exercisename{Exercice}
- \def\subpartname{Partie}
- \def\annexname{Annexe}
- \def\exname{Ex}
- \def\pointsname{points}
- \def\pointname{point}
- \def\correctionname{Correction}
- \def\ptsname{pts}
- \def\ptname{pt}
- }
- \addto\captionsgerman{%
- \def\exercisename{\"Ubung}
- \def\subpartname{Teil}
- \def\annexname{Anhang}
- \def\exname{\"Ub}
- \def\pointsname{Punkte}
- \def\pointname{Punkt}
- \def\correctionname{Verbesserung}
- \def\ptsname{Pkte}
- \def\ptname{Pkt}
- }
- \addto\captionsspanish{%
- \def\exercisename{Ejercicio}
- \def\subpartname{Parte}
- \def\annexname{Anexo}
- \def\exname{Ej}
- \def\pointsname{puntos}
- \def\pointname{punto}
- \def\correctionname{Correcci\'on}
- \def\ptsname{ptos}
- \def\ptname{pot}
- }
- \addto\captionsitalian{%
- \def\exercisename{Esercizio}
- \def\subpartname{Parte}
- \def\annexname{Ansesso}
- \def\exname{Es}
- \def\pointsname{punti}
- \def\pointname{punto}
- \def\correctionname{Correzione}
- \def\ptsname{pti}
- \def\ptname{pt}
- }
- \addto\captionsportuges{%
- \def\exercisename{Exerc\'icio}
- \def\subpartname{Parte}
- \def\annexname{Anexo}
- \def\exname{Ex}
- \def\pointsname{pontos}
- \def\pointname{ponto}
- \def\correctionname{Corre\c c\~ao}
- \def\ptsname{pts}
- \def\ptname{pt}
- }
- }{}
- }
+\DeclareTranslation{English}{exesheet-exercise}{Exercise}
+\DeclareTranslation{English}{exesheet-subpart}{Part}
+\DeclareTranslation{English}{exesheet-annex}{Annex}
+\DeclareTranslation{English}{exesheet-ex}{Ex}
+\DeclareTranslation{English}{exesheet-points}{points}
+\DeclareTranslation{English}{exesheet-point}{point}
+\DeclareTranslation{English}{exesheet-correction}{Correction}
+\DeclareTranslation{English}{exesheet-pts}{pts}
+\DeclareTranslation{English}{exesheet-pt}{pt}
-\AtBeginDocument{\exetranslate} % if loaded before babel
-\exetranslate % necessary when loaded after babel
+\DeclareTranslation{French}{exesheet-exercise}{Exercice}
+\DeclareTranslation{French}{exesheet-subpart}{Partie}
+\DeclareTranslation{French}{exesheet-annex}{Annexe}
+\DeclareTranslation{French}{exesheet-ex}{Ex}
+\DeclareTranslation{French}{exesheet-points}{points}
+\DeclareTranslation{French}{exesheet-point}{point}
+\DeclareTranslation{French}{exesheet-correction}{Correction}
+\DeclareTranslation{French}{exesheet-pts}{pts}
+\DeclareTranslation{French}{exesheet-pt}{pt}
+\DeclareTranslation{German}{exesheet-exercise}{\"Ubung}
+\DeclareTranslation{German}{exesheet-subpart}{Teil}
+\DeclareTranslation{German}{exesheet-annex}{Anhang}
+\DeclareTranslation{German}{exesheet-ex}{\"Ub}
+\DeclareTranslation{German}{exesheet-points}{Punkte}
+\DeclareTranslation{German}{exesheet-point}{Punkt}
+\DeclareTranslation{German}{exesheet-correction}{Verbesserung}
+\DeclareTranslation{German}{exesheet-pts}{Pkte}
+\DeclareTranslation{German}{exesheet-pt}{Pkt}
+
+\DeclareTranslation{Spanish}{exesheet-exercise}{Ejercicio}
+\DeclareTranslation{Spanish}{exesheet-subpart}{Parte}
+\DeclareTranslation{Spanish}{exesheet-annex}{Anexo}
+\DeclareTranslation{Spanish}{exesheet-ex}{Ej}
+\DeclareTranslation{Spanish}{exesheet-points}{puntos}
+\DeclareTranslation{Spanish}{exesheet-point}{punto}
+\DeclareTranslation{Spanish}{exesheet-correction}{Correcci\'on}
+\DeclareTranslation{Spanish}{exesheet-pts}{ptos}
+\DeclareTranslation{Spanish}{exesheet-pt}{pto}
+
+\DeclareTranslation{Italian}{exesheet-exercise}{Esercizio}
+\DeclareTranslation{Italian}{exesheet-subpart}{Parte}
+\DeclareTranslation{Italian}{exesheet-annex}{Annesso}
+\DeclareTranslation{Italian}{exesheet-ex}{Es}
+\DeclareTranslation{Italian}{exesheet-points}{punti}
+\DeclareTranslation{Italian}{exesheet-point}{punto}
+\DeclareTranslation{Italian}{exesheet-correction}{correzione}
+\DeclareTranslation{Italian}{exesheet-pts}{pti}
+\DeclareTranslation{Italian}{exesheet-pt}{pt}
+
+\DeclareTranslation{Portuges}{exesheet-exercise}{Exerc\'icio}
+\DeclareTranslation{Portuges}{exesheet-subpart}{Parte}
+\DeclareTranslation{Portuges}{exesheet-annex}{Anexo}
+\DeclareTranslation{Portuges}{exesheet-ex}{Ex}
+\DeclareTranslation{Portuges}{exesheet-points}{pontos}
+\DeclareTranslation{Portuges}{exesheet-point}{ponto}
+\DeclareTranslation{Portuges}{exesheet-correction}{Corre\c c\~ao}
+\DeclareTranslation{Portuges}{exesheet-pts}{pts}
+\DeclareTranslation{Portuges}{exesheet-pt}{pt}
+
+\newcommand*\exercisename{\GetTranslation{exesheet-exercise}}
+\newcommand*\subpartname{\GetTranslation{exesheet-subpart}}
+\newcommand*\annexname{\GetTranslation{exesheet-annex}}
+\newcommand*\exname{\GetTranslation{exesheet-ex}}
+\newcommand*\pointsname{\GetTranslation{exesheet-points}}
+\newcommand*\pointname{\GetTranslation{exesheet-point}}
+\newcommand*\correctionname{\GetTranslation{exesheet-correction}}
+\newcommand*\ptsname{\GetTranslation{exesheet-pts}}
+\newcommand*\ptname{\GetTranslation{exesheet-pt}}
+
% \end{macrocode}
%
% \subsection{Colors}
@@ -1033,16 +1030,16 @@
\subsection*{\labelexercisestyle\labelexercise\ #1}
\ifthenelse{\boolean{notoc}}{}{
\addcontentsline{toc}{subsection}{\labelexercise}
- }
}
+}
\newcommand*{\@@exercise}[2][]{%
- \subsection*{\labelexercisestyle #2 #1}
+ \subsection*{\labelexercisestyle #2 #1}
\setcounter{subpart}{0} % resets the parts counter
\ifthenelse{\boolean{notoc}}{}{
\addcontentsline{toc}{subsection}{#2}
- }
}
-\newcommand{\exercise}{\@ifstar{\@@exercise}{\@exercise}}
+}
+\newcommand{\exercise}{\@ifstar{\@@exercise}{\@exercise}}
% \end{macrocode}
% \end{macro}
@@ -1058,14 +1055,14 @@
\subsubsection*{\labelsubpartstyle\labelsubpart\ #1}
\ifthenelse{\boolean{notoc}}{}{
\addcontentsline{toc}{subsubsection}{\labelsubpart}
- }
}
+}
\newcommand*{\@@subpart}[2][]{%
\subsubsection*{\labelsubpartstyle #2 #1}
\ifthenelse{\boolean{notoc}}{}{
\addcontentsline{toc}{subsubsection}{#2}
- }
}
+}
\newcommand{\subpart}{\@ifstar{\@@subpart}{\@subpart}}
% \end{macrocode}
@@ -1077,8 +1074,8 @@
\subsection*{\mbox{}\hfill\annexstyle{\annexname} #1\hfill\mbox{}}
\ifthenelse{\boolean{notoc}}{}{
\addcontentsline{toc}{subsection}{\annexname}
- }
- }
+ }
+}
% \end{macrocode}
% \end{macro}
@@ -1090,7 +1087,7 @@
\newcommand{\@@exe}{\textbf{\exlabel}~}
\newcommand{\exe}{\bigskip\par\noindent\refstepcounter{exercise}
\@ifstar{\@@exe}{\@exe}
- }
+}
% \end{macrocode}
% \end{macro}
@@ -1098,12 +1095,12 @@
% \begin{macrocode}
\newcommand{\pointsstyle}{%
\small\mdseries\sffamily\color{pointscolor}\fbox}
-\newcommand*{\points}[1]{\hfill
+\newcommand*{\points}[1]{\hfill
\pointsstyle{#1~%
\ifthenelse{\lengthtest{#1 cm < 2cm}}{\pointname}{\pointsname}%
- }
}
-
+}
+
% \end{macrocode}
% Percent symbols are necessary to avoid spaces between the
% |\fbox| and its inner text.
@@ -1113,9 +1110,9 @@
% \subsection{Enumerations and lists}
%
% When using \textsf{babel} with the \texttt{french} option\footnote{The \texttt{french} option
-% of \textsf{babel} superseeds the \texttt{frenchb} option.},
+% of \textsf{babel} supersedes the \texttt{frenchb} option.},
% \texttt{itemize} lists are modified with the same dash label for each list level.
-% These modifications are cancelled here to restore default
+% These modifications are canceled here to restore default
% \LaTeX\ \texttt{itemize} lists (labels and spaces).
% As for |\exetranslate|,
% we have create the |\standardfrenchlists| command who must be called into
@@ -1134,8 +1131,8 @@
\@ifundefined{frenchsetup}{
\frenchbsetup{StandardLists=true}}{
\frenchsetup{StandardLists=True}}
- }{}
- }
+ }{}
+}
\ifthenelse{\boolean{nosetlist}}{}{
\AtBeginDocument{% if loaded before babel package
\standardfrenchlists}
@@ -1142,7 +1139,7 @@
\standardfrenchlists % necessary when loaded after babel
\setlist[enumerate]{font=\bfseries}
\setlist[enumerate,1]{topsep=1.5ex plus 1ex minus 1ex,leftmargin=1.5em}
- }
+}
% \end{macrocode}
% \begin{macro}{\exenumerate}
@@ -1154,7 +1151,7 @@
\setlist[enumerate,3]{noitemsep,nolistsep}
\setlist[itemize]{noitemsep,nolistsep}
\begin{enumerate}[#1]
- }{\end{enumerate}}
+ }{\end{enumerate}}
% \end{macrocode}
% \end{macro}
@@ -1167,23 +1164,23 @@
%
% \begin{macrocode}
\ifthenelse{\boolean{nosetlist}}{
- \NewTasksEnvironment[label=1.,
+ \NewTasksEnvironment[label=\arabic*.,
column-sep=1em,
after-item-skip=0.5ex plus 0.5ex minus 0.5ex]{tablenum1}[\item](2)
- \NewTasksEnvironment[label=(a),
+ \NewTasksEnvironment[label=(\alph*),
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)
- }{% by default
- \NewTasksEnvironment[label=1.,label-format=\bfseries,
+}{% by default
+ \NewTasksEnvironment[label=\arabic*.,label-format=\bfseries,
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=(a),label-format=\bfseries,
+ \NewTasksEnvironment[label=(\alph*),label-format=\bfseries,
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)
- }
+}
\PackageWarning{exesheet}{Environment tablenum is deprecated and replaced by tablenum1}
% \end{macrocode}
@@ -1201,9 +1198,9 @@
\setlength{\multicolsep}{2ex}
\raggedcolumns % default is \flushcolumns
\begin{multicols}{#2} % #2 = number of columns
- \begin{enumerate}[#1] % #1 = options of enumerate
- }{
- \end{enumerate}
+ \begin{enumerate}[#1] % #1 = options of enumerate
+ }{
+ \end{enumerate}
\end{multicols}
}
@@ -1210,9 +1207,9 @@
\newenvironment{colsenum*}[2][]{%
\setlength{\multicolsep}{2ex}
\begin{multicols}{#2} % #2 = number of columns
- \begin{enumerate}[#1] % #1 = options of enumerate
- }{
- \end{enumerate}
+ \begin{enumerate}[#1] % #1 = options of enumerate
+ }{
+ \end{enumerate}
\end{multicols}
}
@@ -1223,9 +1220,9 @@
\setlength{\multicolsep}{2ex}
\raggedcolumns
\begin{multicols}{#2}
- \begin{itemize}[#1]
- }{
- \end{itemize}
+ \begin{itemize}[#1]
+ }{
+ \end{itemize}
\end{multicols}
}
@@ -1232,9 +1229,9 @@
\newenvironment{colsitem*}[2][]{%
\setlength{\multicolsep}{2ex}
\begin{multicols}{#2}
- \begin{itemize}[#1]
- }{
- \end{itemize}
+ \begin{itemize}[#1]
+ }{
+ \end{itemize}
\end{multicols}
}
@@ -1279,8 +1276,8 @@
\ifthenelse{\boolean{questions}}{
\setcounter{exe at ini}{\value{exercise}}
\setcounter{subpart at ini}{\value{subpart}}
- }{\comment}}%
- {\ifthenelse{\boolean{questions}}{}{\endcomment}}
+ }{\comment}}%
+{\ifthenelse{\boolean{questions}}{}{\endcomment}}
% \end{macrocode}
% \end{environment}
@@ -1300,12 +1297,12 @@
\ifthenelse{\value{exercise} > \value{exe at ini}}{
\setcounter{@toclevel}{1}
}{\ifthenelse{\equal{\the\@enumdepth}{0}}{
- % we're not in an enumerate environment
- \ifthenelse{\(\value{subpart} > \value{subpart at ini}\)
- \or \(\value{subpart} = 0\)}{
- \setcounter{@toclevel}{2}
- }{\setcounter{@toclevel}{3}}
- }{\setcounter{@toclevel}{4}}}
+ % we're not in an enumerate environment
+ \ifthenelse{\(\value{subpart} > \value{subpart at ini}\)
+ \or \(\value{subpart} = 0\)}{
+ \setcounter{@toclevel}{2}
+ }{\setcounter{@toclevel}{3}}
+ }{\setcounter{@toclevel}{4}}}
}{\setcounter{@toclevel}{#1}}}
\newcommand{\correctionstyle}{\color{correctioncolor}}
@@ -1320,26 +1317,26 @@
\addcontentsline{toc}{section}{\correctionname}}
\setcounter{exercise}{0}
}{\ifthenelse{\value{@toclevel} = 2}{%
- \subsection*{\correctionstyle\correctionname}
- \ifthenelse{\boolean{notoc}}{}{
- \addcontentsline{toc}{subsection}{\correctionname}}
- \setcounter{subpart}{0}
- }{\ifthenelse{\value{@toclevel} = 3}{%
- \subsubsection*{\correctionstyle\correctionname}
+ \subsection*{\correctionstyle\correctionname}
\ifthenelse{\boolean{notoc}}{}{
- \addcontentsline{toc}{subsubsection}{
- \correctionname}}
+ \addcontentsline{toc}{subsection}{\correctionname}}
+ \setcounter{subpart}{0}
+ }{\ifthenelse{\value{@toclevel} = 3}{%
+ \subsubsection*{\correctionstyle\correctionname}
+ \ifthenelse{\boolean{notoc}}{}{
+ \addcontentsline{toc}{subsubsection}{
+ \correctionname}}
}{\par\textbf{\correctionstyle\correctionname}\par
}%
- }%
+ }%
}%
- \correctionstyle%
+ \correctionstyle%
}{}%
}{\comment}
}{\ifthenelse{\boolean{answers}}{}{\endcomment}}
-
+
\newenvironment{answers*}{\ifthenelse{\boolean{answers}}{}{\comment}}%
- {\ifthenelse{\boolean{answers}}{}{\endcomment}}
+{\ifthenelse{\boolean{answers}}{}{\endcomment}}
% \end{macrocode}
% In the \texttt{answers} environment, if we place |\correctionstyle|
@@ -1356,10 +1353,10 @@
\ifx#2\empty\else
\par\correctionstyle\textbf{\correctionname}\par
\fi
- }{}
+ }{}
#2}{}
\egroup
- }
+}
% \end{macrocode}
% \end{macro}
@@ -1392,15 +1389,15 @@
\mbox{}%
\marginpar{\hspace{0pt}%
\ptsstyle{\pointmark{#1}}}%
- }{}%
+ }{}%
\ignorespaces
- }
+}
\newcommand{\displaypts}{%
\reversemarginpar
\geometry{hmarginratio=3:2}
\setboolean{marginpts}{true}
- }
-
+}
+
% \end{macrocode}
%
% \begin{macro}{\totalexe}
@@ -1409,7 +1406,7 @@
% to avoid too much space in the text (or the margin)
% where these macros are inserted.
% \begin{macrocode}
-\newlength{\ptsboxlength}
+\newlength{\ptsboxlength}
\setlength{\ptsboxlength}{3.1em}
\cornersize{1}
\newcommand*{\totalexe}[1]{%
@@ -1416,11 +1413,11 @@
\ifthenelse{\boolean{marginpoints}}{%
\mbox{}%
\marginpar{\markingstyle{\ovalbox{%
- \makebox[\ptsboxlength]{\pointmark{#1}}}%
+ \makebox[\ptsboxlength]{\pointmark{#1}}}%
}}%
- }{}%
+ }{}%
\ignorespaces
- }
+}
% \end{macrocode}
% \end{macro}
@@ -1446,17 +1443,17 @@
\marginpar{%
\ifthenelse{\equal{#1}{}}{}{\markingstyle{#1}\\}%
\ifthenelse{\boolean{marginfullnotes}}{\notestyle #2}{}%
- }%
- }{}%
+ }%
+ }{}%
\ignorespaces
- }
+}
\newcommand{\@@note}[1]{%
\ifthenelse{\boolean{marginpoints}}{%
\mbox{}%
\marginpar{\markingstyle{#1}}%
- }{}%
+ }{}%
\ignorespaces
- }
+}
\newcommand{\note}{\@ifstar{\@@note}{\@note}}
% \end{macrocode}
@@ -1472,7 +1469,7 @@
\reversemarginpar
\geometry{hmarginratio=3:2}
\setboolean{marginpoints}{true}
- }
+}
\newcommand*{\displaynotes}[1][\raggedleft]{%
\reversemarginpar
@@ -1484,8 +1481,8 @@
\setlength{\marginparwidth}{0.8\marginparwidth}
\setboolean{marginpoints}{true}
\setboolean{marginfullnotes}{true}
- }
-
+}
+
\newcommand*{\displaynotesright}[1][\raggedright]{%
\normalmarginpar
\renewcommand{\noteragged}{#1}
@@ -1498,7 +1495,7 @@
\setlength{\marginparwidth}{0.8\marginparwidth}
\setboolean{marginpoints}{true}
\setboolean{marginfullnotes}{true}
- }
+}
% \end{macrocode}
% The formatting of marginal notes can possibly be made more regular
% with the \textsf{ragged2e} package, not loaded by \textsf{exesheet}.
Modified: trunk/Master/texmf-dist/tex/latex/exesheet/exesheet.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/exesheet/exesheet.cls 2021-09-18 14:30:27 UTC (rev 60536)
+++ trunk/Master/texmf-dist/tex/latex/exesheet/exesheet.cls 2021-09-18 20:14:56 UTC (rev 60537)
@@ -22,7 +22,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesClass{exesheet}
- [2020/08/30 v1.1 .dtx exesheet file]
+[2021/09/18 v1.2 .dtx exesheet file]
\DeclareOption{notoc}{\PassOptionsToPackage{notoc}{exesheet}}
\DeclareOption{nosetlist}{\PassOptionsToPackage{nosetlist}{exesheet}}
Modified: trunk/Master/texmf-dist/tex/latex/exesheet/exesheet.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/exesheet/exesheet.sty 2021-09-18 14:30:27 UTC (rev 60536)
+++ trunk/Master/texmf-dist/tex/latex/exesheet/exesheet.sty 2021-09-18 20:14:56 UTC (rev 60537)
@@ -22,7 +22,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{exesheet}
- [2020/08/30 v1.1 .dtx exesheet file]
+[2021/09/18 v1.2 .dtx exesheet file]
\RequirePackage{ifthen}
\newboolean{notoc}
@@ -36,80 +36,88 @@
\RequirePackage{versions}
\RequirePackage{geometry}
\RequirePackage{fancybox}
+\RequirePackage{translations}
-\def\exercisename{Exercise}
-\def\subpartname{Part}
-\def\annexname{Annex}
-\def\exname{Ex}
-\def\pointsname{points}
-\def\pointname{point}
-\def\correctionname{Correction}
-\def\ptsname{pts}
-\def\ptname{pt}
+\DeclareTranslationFallback{exesheet-exercise}{Exercise}
+\DeclareTranslationFallback{exesheet-subpart}{Part}
+\DeclareTranslationFallback{exesheet-annex}{Annex}
+\DeclareTranslationFallback{exesheet-ex}{Ex}
+\DeclareTranslationFallback{exesheet-points}{points}
+\DeclareTranslationFallback{exesheet-point}{point}
+\DeclareTranslationFallback{exesheet-correction}{Correction}
+\DeclareTranslationFallback{exesheet-pts}{pts}
+\DeclareTranslationFallback{exesheet-pt}{pt}
-\newcommand\exetranslate{%
- \@ifpackageloaded{babel}{%
- \addto\captionsfrench{%
- \def\exercisename{Exercice}
- \def\subpartname{Partie}
- \def\annexname{Annexe}
- \def\exname{Ex}
- \def\pointsname{points}
- \def\pointname{point}
- \def\correctionname{Correction}
- \def\ptsname{pts}
- \def\ptname{pt}
- }
- \addto\captionsgerman{%
- \def\exercisename{\"Ubung}
- \def\subpartname{Teil}
- \def\annexname{Anhang}
- \def\exname{\"Ub}
- \def\pointsname{Punkte}
- \def\pointname{Punkt}
- \def\correctionname{Verbesserung}
- \def\ptsname{Pkte}
- \def\ptname{Pkt}
- }
- \addto\captionsspanish{%
- \def\exercisename{Ejercicio}
- \def\subpartname{Parte}
- \def\annexname{Anexo}
- \def\exname{Ej}
- \def\pointsname{puntos}
- \def\pointname{punto}
- \def\correctionname{Correcci\'on}
- \def\ptsname{ptos}
- \def\ptname{pot}
- }
- \addto\captionsitalian{%
- \def\exercisename{Esercizio}
- \def\subpartname{Parte}
- \def\annexname{Ansesso}
- \def\exname{Es}
- \def\pointsname{punti}
- \def\pointname{punto}
- \def\correctionname{Correzione}
- \def\ptsname{pti}
- \def\ptname{pt}
- }
- \addto\captionsportuges{%
- \def\exercisename{Exerc\'icio}
- \def\subpartname{Parte}
- \def\annexname{Anexo}
- \def\exname{Ex}
- \def\pointsname{pontos}
- \def\pointname{ponto}
- \def\correctionname{Corre\c c\~ao}
- \def\ptsname{pts}
- \def\ptname{pt}
- }
- }{}
- }
+\DeclareTranslation{English}{exesheet-exercise}{Exercise}
+\DeclareTranslation{English}{exesheet-subpart}{Part}
+\DeclareTranslation{English}{exesheet-annex}{Annex}
+\DeclareTranslation{English}{exesheet-ex}{Ex}
+\DeclareTranslation{English}{exesheet-points}{points}
+\DeclareTranslation{English}{exesheet-point}{point}
+\DeclareTranslation{English}{exesheet-correction}{Correction}
+\DeclareTranslation{English}{exesheet-pts}{pts}
+\DeclareTranslation{English}{exesheet-pt}{pt}
-\AtBeginDocument{\exetranslate} % if loaded before babel
-\exetranslate % necessary when loaded after babel
+\DeclareTranslation{French}{exesheet-exercise}{Exercice}
+\DeclareTranslation{French}{exesheet-subpart}{Partie}
+\DeclareTranslation{French}{exesheet-annex}{Annexe}
+\DeclareTranslation{French}{exesheet-ex}{Ex}
+\DeclareTranslation{French}{exesheet-points}{points}
+\DeclareTranslation{French}{exesheet-point}{point}
+\DeclareTranslation{French}{exesheet-correction}{Correction}
+\DeclareTranslation{French}{exesheet-pts}{pts}
+\DeclareTranslation{French}{exesheet-pt}{pt}
+\DeclareTranslation{German}{exesheet-exercise}{\"Ubung}
+\DeclareTranslation{German}{exesheet-subpart}{Teil}
+\DeclareTranslation{German}{exesheet-annex}{Anhang}
+\DeclareTranslation{German}{exesheet-ex}{\"Ub}
+\DeclareTranslation{German}{exesheet-points}{Punkte}
+\DeclareTranslation{German}{exesheet-point}{Punkt}
+\DeclareTranslation{German}{exesheet-correction}{Verbesserung}
+\DeclareTranslation{German}{exesheet-pts}{Pkte}
+\DeclareTranslation{German}{exesheet-pt}{Pkt}
+
+\DeclareTranslation{Spanish}{exesheet-exercise}{Ejercicio}
+\DeclareTranslation{Spanish}{exesheet-subpart}{Parte}
+\DeclareTranslation{Spanish}{exesheet-annex}{Anexo}
+\DeclareTranslation{Spanish}{exesheet-ex}{Ej}
+\DeclareTranslation{Spanish}{exesheet-points}{puntos}
+\DeclareTranslation{Spanish}{exesheet-point}{punto}
+\DeclareTranslation{Spanish}{exesheet-correction}{Correcci\'on}
+\DeclareTranslation{Spanish}{exesheet-pts}{ptos}
+\DeclareTranslation{Spanish}{exesheet-pt}{pto}
+
+\DeclareTranslation{Italian}{exesheet-exercise}{Esercizio}
+\DeclareTranslation{Italian}{exesheet-subpart}{Parte}
+\DeclareTranslation{Italian}{exesheet-annex}{Annesso}
+\DeclareTranslation{Italian}{exesheet-ex}{Es}
+\DeclareTranslation{Italian}{exesheet-points}{punti}
+\DeclareTranslation{Italian}{exesheet-point}{punto}
+\DeclareTranslation{Italian}{exesheet-correction}{correzione}
+\DeclareTranslation{Italian}{exesheet-pts}{pti}
+\DeclareTranslation{Italian}{exesheet-pt}{pt}
+
+\DeclareTranslation{Portuges}{exesheet-exercise}{Exerc\'icio}
+\DeclareTranslation{Portuges}{exesheet-subpart}{Parte}
+\DeclareTranslation{Portuges}{exesheet-annex}{Anexo}
+\DeclareTranslation{Portuges}{exesheet-ex}{Ex}
+\DeclareTranslation{Portuges}{exesheet-points}{pontos}
+\DeclareTranslation{Portuges}{exesheet-point}{ponto}
+\DeclareTranslation{Portuges}{exesheet-correction}{Corre\c c\~ao}
+\DeclareTranslation{Portuges}{exesheet-pts}{pts}
+\DeclareTranslation{Portuges}{exesheet-pt}{pt}
+
+\newcommand*\exercisename{\GetTranslation{exesheet-exercise}}
+\newcommand*\subpartname{\GetTranslation{exesheet-subpart}}
+\newcommand*\annexname{\GetTranslation{exesheet-annex}}
+\newcommand*\exname{\GetTranslation{exesheet-ex}}
+\newcommand*\pointsname{\GetTranslation{exesheet-points}}
+\newcommand*\pointname{\GetTranslation{exesheet-point}}
+\newcommand*\correctionname{\GetTranslation{exesheet-correction}}
+\newcommand*\ptsname{\GetTranslation{exesheet-pts}}
+\newcommand*\ptname{\GetTranslation{exesheet-pt}}
+
\definecolor{pointscolor}{named}{red}
\definecolor{ptscolor}{named}{red}
\definecolor{markingcolor}{named}{red}
@@ -125,15 +133,15 @@
\subsection*{\labelexercisestyle\labelexercise\ #1}
\ifthenelse{\boolean{notoc}}{}{
\addcontentsline{toc}{subsection}{\labelexercise}
- }
}
+}
\newcommand*{\@@exercise}[2][]{%
\subsection*{\labelexercisestyle #2 #1}
\setcounter{subpart}{0} % resets the parts counter
\ifthenelse{\boolean{notoc}}{}{
\addcontentsline{toc}{subsection}{#2}
- }
}
+}
\newcommand{\exercise}{\@ifstar{\@@exercise}{\@exercise}}
\newcounter{subpart}[exercise] %
@@ -146,14 +154,14 @@
\subsubsection*{\labelsubpartstyle\labelsubpart\ #1}
\ifthenelse{\boolean{notoc}}{}{
\addcontentsline{toc}{subsubsection}{\labelsubpart}
- }
}
+}
\newcommand*{\@@subpart}[2][]{%
\subsubsection*{\labelsubpartstyle #2 #1}
\ifthenelse{\boolean{notoc}}{}{
\addcontentsline{toc}{subsubsection}{#2}
- }
}
+}
\newcommand{\subpart}{\@ifstar{\@@subpart}{\@subpart}}
\newcommand{\annexstyle}{\MakeUppercase}
@@ -161,8 +169,8 @@
\subsection*{\mbox{}\hfill\annexstyle{\annexname} #1\hfill\mbox{}}
\ifthenelse{\boolean{notoc}}{}{
\addcontentsline{toc}{subsection}{\annexname}
- }
}
+}
\newcommand{\exlabel}{\exname.~\theexercise}
\newcommand{\exsepmark}{---}
@@ -170,7 +178,7 @@
\newcommand{\@@exe}{\textbf{\exlabel}~}
\newcommand{\exe}{\bigskip\par\noindent\refstepcounter{exercise}
\@ifstar{\@@exe}{\@exe}
- }
+}
\newcommand{\pointsstyle}{%
\small\mdseries\sffamily\color{pointscolor}\fbox}
@@ -177,8 +185,8 @@
\newcommand*{\points}[1]{\hfill
\pointsstyle{#1~%
\ifthenelse{\lengthtest{#1 cm < 2cm}}{\pointname}{\pointsname}%
- }
}
+}
\newcommand\standardfrenchlists{%
\@ifpackagewith{babel}{frenchb}{
@@ -187,8 +195,8 @@
\@ifundefined{frenchsetup}{
\frenchbsetup{StandardLists=true}}{
\frenchsetup{StandardLists=True}}
- }{}
- }
+ }{}
+}
\ifthenelse{\boolean{nosetlist}}{}{
\AtBeginDocument{% if loaded before babel package
\standardfrenchlists}
@@ -195,7 +203,7 @@
\standardfrenchlists % necessary when loaded after babel
\setlist[enumerate]{font=\bfseries}
\setlist[enumerate,1]{topsep=1.5ex plus 1ex minus 1ex,leftmargin=1.5em}
- }
+}
\newenvironment{exenumerate}[1][]{%
\setlist[enumerate]{font=\bfseries}
@@ -204,26 +212,26 @@
\setlist[enumerate,3]{noitemsep,nolistsep}
\setlist[itemize]{noitemsep,nolistsep}
\begin{enumerate}[#1]
- }{\end{enumerate}}
+ }{\end{enumerate}}
\ifthenelse{\boolean{nosetlist}}{
- \NewTasksEnvironment[label=1.,
+ \NewTasksEnvironment[label=\arabic*.,
column-sep=1em,
after-item-skip=0.5ex plus 0.5ex minus 0.5ex]{tablenum1}[\item](2)
- \NewTasksEnvironment[label=(a),
+ \NewTasksEnvironment[label=(\alph*),
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)
- }{% by default
- \NewTasksEnvironment[label=1.,label-format=\bfseries,
+}{% by default
+ \NewTasksEnvironment[label=\arabic*.,label-format=\bfseries,
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=(a),label-format=\bfseries,
+ \NewTasksEnvironment[label=(\alph*),label-format=\bfseries,
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)
- }
+}
\PackageWarning{exesheet}{Environment tablenum is deprecated and replaced by tablenum1}
\NewTasksEnvironment[label=\labelitemi,
@@ -235,9 +243,9 @@
\setlength{\multicolsep}{2ex}
\raggedcolumns % default is \flushcolumns
\begin{multicols}{#2} % #2 = number of columns
- \begin{enumerate}[#1] % #1 = options of enumerate
- }{
- \end{enumerate}
+ \begin{enumerate}[#1] % #1 = options of enumerate
+ }{
+ \end{enumerate}
\end{multicols}
}
@@ -244,9 +252,9 @@
\newenvironment{colsenum*}[2][]{%
\setlength{\multicolsep}{2ex}
\begin{multicols}{#2} % #2 = number of columns
- \begin{enumerate}[#1] % #1 = options of enumerate
- }{
- \end{enumerate}
+ \begin{enumerate}[#1] % #1 = options of enumerate
+ }{
+ \end{enumerate}
\end{multicols}
}
@@ -254,9 +262,9 @@
\setlength{\multicolsep}{2ex}
\raggedcolumns
\begin{multicols}{#2}
- \begin{itemize}[#1]
- }{
- \end{itemize}
+ \begin{itemize}[#1]
+ }{
+ \end{itemize}
\end{multicols}
}
@@ -263,9 +271,9 @@
\newenvironment{colsitem*}[2][]{%
\setlength{\multicolsep}{2ex}
\begin{multicols}{#2}
- \begin{itemize}[#1]
- }{
- \end{itemize}
+ \begin{itemize}[#1]
+ }{
+ \end{itemize}
\end{multicols}
}
@@ -285,8 +293,8 @@
\ifthenelse{\boolean{questions}}{
\setcounter{exe at ini}{\value{exercise}}
\setcounter{subpart at ini}{\value{subpart}}
- }{\comment}}%
- {\ifthenelse{\boolean{questions}}{}{\endcomment}}
+ }{\comment}}%
+{\ifthenelse{\boolean{questions}}{}{\endcomment}}
\newcounter{@toclevel}
\newcommand{\set at toclevel}[1][]{
@@ -294,12 +302,12 @@
\ifthenelse{\value{exercise} > \value{exe at ini}}{
\setcounter{@toclevel}{1}
}{\ifthenelse{\equal{\the\@enumdepth}{0}}{
- % we're not in an enumerate environment
- \ifthenelse{\(\value{subpart} > \value{subpart at ini}\)
- \or \(\value{subpart} = 0\)}{
- \setcounter{@toclevel}{2}
- }{\setcounter{@toclevel}{3}}
- }{\setcounter{@toclevel}{4}}}
+ % we're not in an enumerate environment
+ \ifthenelse{\(\value{subpart} > \value{subpart at ini}\)
+ \or \(\value{subpart} = 0\)}{
+ \setcounter{@toclevel}{2}
+ }{\setcounter{@toclevel}{3}}
+ }{\setcounter{@toclevel}{4}}}
}{\setcounter{@toclevel}{#1}}}
\newcommand{\correctionstyle}{\color{correctioncolor}}
@@ -314,26 +322,26 @@
\addcontentsline{toc}{section}{\correctionname}}
\setcounter{exercise}{0}
}{\ifthenelse{\value{@toclevel} = 2}{%
- \subsection*{\correctionstyle\correctionname}
- \ifthenelse{\boolean{notoc}}{}{
- \addcontentsline{toc}{subsection}{\correctionname}}
- \setcounter{subpart}{0}
- }{\ifthenelse{\value{@toclevel} = 3}{%
- \subsubsection*{\correctionstyle\correctionname}
+ \subsection*{\correctionstyle\correctionname}
\ifthenelse{\boolean{notoc}}{}{
- \addcontentsline{toc}{subsubsection}{
- \correctionname}}
+ \addcontentsline{toc}{subsection}{\correctionname}}
+ \setcounter{subpart}{0}
+ }{\ifthenelse{\value{@toclevel} = 3}{%
+ \subsubsection*{\correctionstyle\correctionname}
+ \ifthenelse{\boolean{notoc}}{}{
+ \addcontentsline{toc}{subsubsection}{
+ \correctionname}}
}{\par\textbf{\correctionstyle\correctionname}\par
}%
- }%
+ }%
}%
- \correctionstyle%
+ \correctionstyle%
}{}%
}{\comment}
}{\ifthenelse{\boolean{answers}}{}{\endcomment}}
\newenvironment{answers*}{\ifthenelse{\boolean{answers}}{}{\comment}}%
- {\ifthenelse{\boolean{answers}}{}{\endcomment}}
+{\ifthenelse{\boolean{answers}}{}{\endcomment}}
\newcommand{\question}[2]{%
\ifthenelse{\boolean{questions}}{#1}{}
@@ -343,10 +351,10 @@
\ifx#2\empty\else
\par\correctionstyle\textbf{\correctionname}\par
\fi
- }{}
+ }{}
#2}{}
\egroup
- }
+}
\let\@oldpoints\points
\renewcommand*{\points}[1]{%
@@ -362,14 +370,14 @@
\mbox{}%
\marginpar{\hspace{0pt}%
\ptsstyle{\pointmark{#1}}}%
- }{}%
+ }{}%
\ignorespaces
- }
+}
\newcommand{\displaypts}{%
\reversemarginpar
\geometry{hmarginratio=3:2}
\setboolean{marginpts}{true}
- }
+}
\newlength{\ptsboxlength}
\setlength{\ptsboxlength}{3.1em}
@@ -378,11 +386,11 @@
\ifthenelse{\boolean{marginpoints}}{%
\mbox{}%
\marginpar{\markingstyle{\ovalbox{%
- \makebox[\ptsboxlength]{\pointmark{#1}}}%
+ \makebox[\ptsboxlength]{\pointmark{#1}}}%
}}%
- }{}%
+ }{}%
\ignorespaces
- }
+}
\newboolean{marginpoints}
\newboolean{marginfullnotes}
@@ -398,17 +406,17 @@
\marginpar{%
\ifthenelse{\equal{#1}{}}{}{\markingstyle{#1}\\}%
\ifthenelse{\boolean{marginfullnotes}}{\notestyle #2}{}%
- }%
- }{}%
+ }%
+ }{}%
\ignorespaces
- }
+}
\newcommand{\@@note}[1]{%
\ifthenelse{\boolean{marginpoints}}{%
\mbox{}%
\marginpar{\markingstyle{#1}}%
- }{}%
+ }{}%
\ignorespaces
- }
+}
\newcommand{\note}{\@ifstar{\@@note}{\@note}}
\newcommand{\displaypoints}{%
@@ -415,7 +423,7 @@
\reversemarginpar
\geometry{hmarginratio=3:2}
\setboolean{marginpoints}{true}
- }
+}
\newcommand*{\displaynotes}[1][\raggedleft]{%
\reversemarginpar
@@ -427,7 +435,7 @@
\setlength{\marginparwidth}{0.8\marginparwidth}
\setboolean{marginpoints}{true}
\setboolean{marginfullnotes}{true}
- }
+}
\newcommand*{\displaynotesright}[1][\raggedright]{%
\normalmarginpar
@@ -441,7 +449,7 @@
\setlength{\marginparwidth}{0.8\marginparwidth}
\setboolean{marginpoints}{true}
\setboolean{marginfullnotes}{true}
- }
+}
\newcommand{\totalpoints}{%
\ifthenelse{\boolean{marginpoints}}{\totalexe}{\points}}
\endinput
More information about the tex-live-commits
mailing list.