summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-12-14 23:18:10 +0000
committerKarl Berry <karl@freefriends.org>2010-12-14 23:18:10 +0000
commitb8b55a100110782bb066a4471211ecb691e2399e (patch)
treef6776b24799420fa2c2257b26a1ef72eae160ac8 /Master/texmf-dist
parent8c04f4af5028001802addd13c9ad12bf7c1b8e5d (diff)
exercise 1.54 (15dec10)
git-svn-id: svn://tug.org/texlive/trunk@20744 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/exercise/README11
-rw-r--r--Master/texmf-dist/doc/latex/exercise/exercise.pdfbin429558 -> 437195 bytes
-rw-r--r--Master/texmf-dist/source/latex/exercise/exercise.dtx205
-rw-r--r--Master/texmf-dist/tex/latex/exercise/exercise.sty78
4 files changed, 157 insertions, 137 deletions
diff --git a/Master/texmf-dist/doc/latex/exercise/README b/Master/texmf-dist/doc/latex/exercise/README
index 7022185393c..73a8ceee334 100644
--- a/Master/texmf-dist/doc/latex/exercise/README
+++ b/Master/texmf-dist/doc/latex/exercise/README
@@ -2,7 +2,7 @@ Typesetting exercises: the exercise package
===========================================
The package helps to typeset exercises or list of exercises within any
-document.
+document.
Exercises, questions, sub-questions are automatically numbered. It is
possible to put answers in the same document, and display them
@@ -18,7 +18,7 @@ information.
Copyright:
----------
-Copyright (C) 2004 by Paul Pichaureau
+Copyright (C) 2004 by Paul Pichaureau
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -38,9 +38,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Installation:
-------------
-- execute latex on exercise.ins
+- execute latex on exercise.ins
-- execute latex on exercise.dtx
+- execute latex on exercise.dtx
- produce Index and Change History with
@@ -70,10 +70,11 @@ To do:
Change log:
-----------
+- v1.54 2010/12/14 Corrected a bug with infinite loop in Answer
- v1.53 2010/11/27 Exercise selection now works correctly
- v1.52 2010/10/09 New skip added
German support added (thx to Peter Zimmermann)
-- v1.5 2010/10/03 Label and reference now corrects
+- v1.5 2010/10/03 Label and reference now corrects
Dutch support added (thx to Frank Koenders)
- v1.4 2010/08/27 Many bugs corrected
Exercise selection reviewed
diff --git a/Master/texmf-dist/doc/latex/exercise/exercise.pdf b/Master/texmf-dist/doc/latex/exercise/exercise.pdf
index 8778ebbaed5..c3e1f7c2cfc 100644
--- a/Master/texmf-dist/doc/latex/exercise/exercise.pdf
+++ b/Master/texmf-dist/doc/latex/exercise/exercise.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/exercise/exercise.dtx b/Master/texmf-dist/source/latex/exercise/exercise.dtx
index 81d39587011..47d0e8cd5cb 100644
--- a/Master/texmf-dist/source/latex/exercise/exercise.dtx
+++ b/Master/texmf-dist/source/latex/exercise/exercise.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2003-2006 by Paul Pichaureau
+% Copyright (C) 2003-2006 by Paul Pichaureau
%
% This program is free software; you can redistribute it and/or
% modify it under the terms of the GNU General Public License
@@ -21,7 +21,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{exercise}
-%<package> [2010/11/27 v1.53 Exercise package (P.Pichaureau)]
+%<package> [2010/12/14 v1.54 Exercise package (P.Pichaureau)]
%<*driver>
\documentclass{ltxdoc}
\usepackage{exercise}
@@ -44,7 +44,7 @@
{\\\hline\end{tabular}\nobreak\@decl@date\par\nobreak
\vspace{2.3ex}\vskip -\parskip}
\makeatletter
- \EnableCrossrefs \PageIndex
+ \EnableCrossrefs \PageIndex
\makeatother
\begin{document}
\DocInput{exercise.dtx}
@@ -84,7 +84,7 @@
% \DoNotIndex{\setlength,\string,\textbf,\textsc,\emph,\whiledo,\vbox}
% \DoNotIndex{\unvbox,\usefont,\usecounter,\value,\vskip,\setbox,\setcounter}
%
-%\CheckSum{1933}
+%\CheckSum{1948}
%
%
% \GetFileInfo{exercise.sty}
@@ -111,9 +111,9 @@
% This package offers a simple environment to typeset exercises,
% and their questions, sub-questions, indications, answers and so
% on.
-%
+%
% The layout of the exercises is fully customisable. Moreover, the
-% answers of the exercise could be typeset immediately or
+% answers of the exercise could be typeset immediately or
% later in the document.
%\end{abstract}
%
@@ -127,19 +127,19 @@
%\begin{description}
% \item[|noexercise|] hide all the exercises
% of a document.
-%
+%
% \item[|noanswer|] hide all the answers
% of a document. The default behaviour is to show both the exercises
% and the answers.
-%
+%
%
% \item[|exerciseonly|] is a synonym of |noanswer|.
-%
+%
% \item[|answeronly|] is a synonym of |noexercise|.
-%
+%
% \item[|nothing|] hide answers and exercises (synonym of
% |noanswer| and |noexercise|).
-%
+%
% \item[|answerdelayed|] save the answers instead of typeset
% them. The answers can be included later in the document with the
% command |\shipoutAnswer|. More precisely, the answers are stored
@@ -148,7 +148,7 @@
% list. The answers defined later are placed in this emptied
% vertical box. In this way, you can have many group of answers in
% the same document.
-%
+%
% \item[|exercisedelayed|] saves the exercises instead of
% typeset them. The exercises can be included later with the command
% |\shipoutExercise|.
@@ -166,7 +166,7 @@
%
%\subsection{Exercises and answers}
%
-%
+%
%\begin{decl}
% |\begin{Exercise}| \oarg{key val list} ... |\end{Exercise}| \\
% |\begin{Exercise*}| \oarg{key val list} ... |\end{Exercise*}|
@@ -175,7 +175,7 @@
%\DescribeEnv{Exercise}\DescribeEnv{Exercise*}
%The |Exercise| environment is used to typeset just one exercise. We
%use the \textsf{keyval} package to give different informations about
-%an exercise.
+%an exercise.
%
%The |Exercise*| environment typeset an exercise without number, and
% without puting it in the |listofexercices|.
@@ -194,11 +194,11 @@
%|number|=\marg{string}
%\end{decl}
%All these keys define commands that will be available later to typeset
-%the exercise. They are all optional.
+%the exercise. They are all optional.
%\begin{description}
% \item[|label|] The label of the exercise. This label can be
% used later in cross-reference, or to link an answer to this
-% exercise.
+% exercise.
% \item[|title|] The title of the exercise. It will be available
% later with the command |\ExerciseTitle|.
% \item[|difficulty|] The difficulty of the exercise (a number).
@@ -209,11 +209,14 @@
% \item[|name|] In document, exercises can have multiple
% denomination, like problem, exam, or even question. This key
% allows to change the denomination.
-% \item[|counter|] Use the given counter to number this
+% \item[|counter|] Use the given counter to number this
% exercise. Here, \marg{counter} must be a pre-defined counter.
% \item[|number|] Use the given number for the exercise. In
% fact, this number is a string, so you can number the exercise
% with letters.
+% \item[|exam|] To keep track of exams associated with the exercise.
+% \item[|year|] To keep track of the year you have given the
+% exercise.
%\end{description}
%
%As an example, with the default definitions, the following code:
@@ -236,14 +239,14 @@
%you can define a |Problem| environment with the two lines:
%\begin{verbatim}
% \newcounter{Problem}
-% \newenvironment{Problem}{\begin{Exercise}[name={Problem},
+% \newenvironment{Problem}{\begin{Exercise}[name={Problem},
% counter={Problem}]}
% {\end{Exercise}}
%\end{verbatim}
%Anyway, all type of exercise will have the same layout in the document.
%
%\begin{decl}
-% |\begin{Answer}| \oarg{key val list} ... |\end{Answer}|
+% |\begin{Answer}| \oarg{key val list} ... |\end{Answer}|
%\end{decl}
%
%\DescribeEnv{Answer}
@@ -278,7 +281,7 @@
% |\begin{ExerciseList}| \\
% \quad |\Exercise|\oarg{key val list} \\
% \quad |\Answer|\oarg{key val list} \\
-% |\end{ExerciseList}|
+% |\end{ExerciseList}|
%\end{decl}
%
%\DescribeEnv{ExerciseList}
@@ -304,7 +307,7 @@
%\DescribeMacro{\ExePart}
%\DescribeMacro{\ExePart*}
%It is common to split large exercise in parts: it is the purpose of
-%the |\ExePart| command.
+%the |\ExePart| command.
%\index{options>of \texttt{\bslash ExePart}}
%\index{keys>of \texttt{\bslash ExePart}}
%The keys |title|, |name| and |difficulty| are
@@ -363,19 +366,19 @@
%\begin{verbatim}
% \ExerciseSelect[type={short}, difficulty={0,1}]
%\end{verbatim}
-%selects the short exercises of difficulties 0 and 1, whereas
+%selects the short exercises of difficulties 0 and 1, whereas
%\begin{verbatim}
% \ExerciseSelect[label={exe1, exe10, exe11}]
%\end{verbatim}
-%selects the exercises with label |exe1|, |exe10| and |exe11|.
+%selects the exercises with label |exe1|, |exe10| and |exe11|.
%
-%With |\ExerciseStartSelect*|, the exercises which fit the conditions
+%With |\ExerciseStartSelect*|, the exercises which fit the conditions
%are \emph{omited} instead of selected.
%
-%Last, |\ExerciseStopSelect| stops the processus of selection: every
+%Last, |\ExerciseStopSelect| stops the processus of selection: every
%exercise will be displayed later.
%
-%The purpose of these commands is to select exercises within a long list
+%The purpose of these commands is to select exercises within a long list
%stored on an auxiliary file.
%
%\subsection{Extra stuff}
@@ -383,7 +386,7 @@
%\DescribeMacro{\DifficultyMarker}
%The difficulty of an exercise is represented by a certain amount of
%stars. The command |\marker| is used to typeset the difficulty of an
-%exercise.
+%exercise.
%\begin{verbatim}
% \marker<symbol><counter>
%\end{verbatim}
@@ -425,7 +428,7 @@
%|\ExerciseListName|\\
%|\AnswerName|\\
%|\AnswerListName|\\
-%|\ExePartName|%
+%|\ExePartName|%
%\end{decl}
%\DescribeMacro{\ExerciseName}
%\DescribeMacro{\ExerciseListName}
@@ -513,14 +516,14 @@
%\end{verbatim}
%\noindent which displays all the informations in a centered line, using
%a large bold default font.
-%
+%
%\begin{decl}
% |\AnswerHeader| \\
% |\AnswerListHeader|
%\end{decl}
%\DescribeMacro{\AnswerHeader}
%\DescribeMacro{\AnswerListHeader}
-%The same mechanism is implemented for the answers.
+%The same mechanism is implemented for the answers.
%|\AnswerHeader| and |\AnswerListHeader| specifies the way the header
%of answers are typeset. In the definition of these commands, you can
%use freely the informations of the related exercise. For example, this
@@ -550,7 +553,7 @@
%difficulty (|\ExePartdifficulty|) and the number (|\theExePart|) of
%the part are displayed.
%
-%These pieces are collected in the command |\ExePartHeader| or
+%These pieces are collected in the command |\ExePartHeader| or
%\\ |\ExePartListHeader|.
%
%
@@ -586,7 +589,7 @@
%
%\subsection{Lengths}
%
-%\changes{v1.52}{201/11/09}{Added the 'ExerciseSkipBefore'
+%\changes{v1.52}{201/11/09}{Added the 'ExerciseSkipBefore'
%and 'ExerciseListAfter' skip.}
%\begin{decl}
% \begin{tabular}{l}
@@ -594,10 +597,10 @@
% |\ExerciseSkipAfter| \\
%\end{tabular}
%\end{decl}
-%\DescribeMacro{ExerciseSkipBefore}
+%\DescribeMacro{ExerciseSkipBefore}
%\DescribeMacro{ExerciseSkipAfter}
-%Before every |Exercise| environment the vertical skip
-%|ExerciseSkipBefore| is added. The corresponding |ExerciseSkipAfter|
+%Before every |Exercise| environment the vertical skip
+%|ExerciseSkipBefore| is added. The corresponding |ExerciseSkipAfter|
%vertical skip is added after every |Exercise| environment.
%\begin{decl}
% \begin{tabular}{llll}
@@ -607,12 +610,12 @@
% & |\Exelabelsep|
%\end{tabular}
%\end{decl}
-%\DescribeMacro{Exesep}
-%\DescribeMacro{Exetopsep}
-%\DescribeMacro{Exeparsep}
-%\DescribeMacro{Exepartopsep}
-%\DescribeMacro{Exeleftmargin}
-%\DescribeMacro{Exerightmargin}
+%\DescribeMacro{Exesep}
+%\DescribeMacro{Exetopsep}
+%\DescribeMacro{Exeparsep}
+%\DescribeMacro{Exepartopsep}
+%\DescribeMacro{Exeleftmargin}
+%\DescribeMacro{Exerightmargin}
%\DescribeMacro{Exelabelsep}
%These lengths have an effect only inside an |ExerciseList| environment.
%This environment is nothing more than a |list|
@@ -672,13 +675,13 @@
%which is closed at the next |\Question| (the exact mechanism is a
%little bit more complicated).
%
-%Consequently it's dangerous to put questions inside environment.
+%Consequently it's dangerous to put questions inside environment.
%The following code will lead to an error:
%\vspace*{-.5\baselineskip}
%\begin{verbatim}
% \begin{Exercise}
% \begin{multicols}{2}
-% \Question ...
+% \Question ...
% \Question ...
% \end{multicols}
% \end{Exercise}
@@ -711,7 +714,7 @@
%\begin{verbatim}
% \begin{Exercise}
% \begin{multicols}{2}
-% \Question ...
+% \Question ...
% \Question ...
% \EndCurrentQuestion
% \end{multicols}
@@ -763,9 +766,9 @@
% \begin{macrocode}
\RequirePackage{keyval, ifthen}
% \end{macrocode}
-%
+%
%\subsection{Customisation}
-%
+%
%\subsubsection{Internationalisation}
%\changes{v1.11}{2004/09/08}{Corrected a bug preventing the correct
%use of the \textsf{babel} package.}
@@ -775,7 +778,7 @@
\def\AnswerName{Answer of exercise}%
\def\ExerciseListName{Ex.}%
\def\AnswerListName{Answer}%
-\def\ExePartName{Part}%
+\def\ExePartName{Part}%
\def\ArticleOf{of\ }%
\@ifpackageloaded{babel}{
\addto{\captionsfrenchb}{
@@ -889,9 +892,9 @@
% \end{macrocode}
% For internal purposes
% \begin{macrocode}
-\newcounter{savedQuestion}
-\newcounter{savedsubQuestion}
-\newcounter{savedsubsubQuestion}
+\newcounter{savedQuestion}
+\newcounter{savedsubQuestion}
+\newcounter{savedsubsubQuestion}
% \end{macrocode}
% The |\marker| command.
% \begin{macrocode}
@@ -905,8 +908,8 @@
% Presentation of informations in the header of exercises
% \begin{macrocode}
\newcommand{\ExerciseHeaderTitle}{\qquad\ExerciseTitle}
-\newcommand{\ExerciseHeaderConcours}{\ExerciseConcours}
-\newcommand{\ExerciseHeaderAnnee}{\ \ExerciseAnnee}
+\newcommand{\ExerciseHeaderExam}{\ExerciseExam}
+\newcommand{\ExerciseHeaderYear}{\ \ExerciseYear}
\newcommand{\ExerciseHeaderDifficulty}{\theExerciseDifficulty\ }
\newcommand{\ExerciseHeaderOrigin}{%
\ ({\usefont{\encodingdefault}{\rmdefault}{m}{it}\ExerciseOrigin})}
@@ -986,8 +989,8 @@
% The keyval package is used to specify various information about an exercise.
% \begin{macrocode}
\newif\if@ExeTitle \@ExeTitlefalse
-\newif\if@ExeConcours \@ExeConcoursfalse
-\newif\if@ExeAnnee \@ExeAnneefalse
+\newif\if@ExeExam \@ExeExamfalse
+\newif\if@ExeYear \@ExeYearfalse
\newif\if@ExeReName \@ExeReNamefalse
\global\newcount\ExerciseDifficulty \ExerciseDifficulty=0
\newif\if@ExeDifficulty \@ExeDifficultyfalse
@@ -1000,10 +1003,10 @@
%
\define@key{PPExercise}{title}%
{\global\@ExeTitletrue\gdef\ExerciseTitle{#1}}
-\define@key{PPExercise}{concours}%
-{\global\@ExeConcourstrue\gdef\ExerciseConcours{#1}}
-\define@key{PPExercise}{annee}%
-{\global\@ExeAnneetrue\gdef\ExerciseAnnee{#1}}
+\define@key{PPExercise}{exam}%
+{\global\@ExeExamtrue\gdef\ExerciseExam{#1}}
+\define@key{PPExercise}{year}%
+{\global\@ExeYeartrue\gdef\ExerciseYear{#1}}
\define@key{PPExercise}{difficulty}%
{\global\@ExeDifficultytrue\global\ExerciseDifficulty=\number#1}
\define@key{PPExercise}{name}%
@@ -1026,16 +1029,16 @@
%
\def\@InitExe{\@savemathindent\global\@echapqfalse%
\gdef\ExerciseTitle{}%
-\gdef\ExerciseConcours{}%
-\gdef\ExerciseAnnee{}%
+\gdef\ExerciseExam{}%
+\gdef\ExerciseYear{}%
\gdef\@ExerciseName{}%
\gdef\ExerciseOrigin{}%
\gdef\ExerciseType{}%
\gdef\ExerciseTrueLabel{}%
\global\ExerciseDifficulty=0%
\global\@ExeTitlefalse%
-\global\@ExeConcoursfalse%
-\global\@ExeAnneefalse%
+\global\@ExeExamfalse%
+\global\@ExeYearfalse%
\global\@ExeReNamefalse%
\global\@ExeDifficultyfalse%
\global\@ExeOriginfalse%
@@ -1050,8 +1053,8 @@
\def\@getExerciseInfo{%
\if@ExeReName\def\ExerciseName{\@ExerciseName}\fi%
\if@ExeTitle\else\def\ExerciseHeaderTitle{}\fi%
-\if@ExeConcours\else\def\ExerciseHeaderConcours{}\fi%
-\if@ExeAnnee\else\def\ExerciseHeaderAnnee{}\fi%
+\if@ExeExam\else\def\ExerciseHeaderExam{}\fi%
+\if@ExeYear\else\def\ExerciseHeaderYear{}\fi%
\if@ExeOrigin\else\def\ExerciseHeaderOrigin{}\fi%
\if@ExeType\else\def\ExerciseHeaderType{}\fi%
\if@ExeNB\setcounter{Exercise}{\ExerciseLocalNB}
@@ -1098,10 +1101,8 @@
\@QuestionLevel1
\refstepExecounter
\begingroup\@getExerciseInfo\ExerciseHeader
- \if@ExeStared\else%
- \addcontentsline{\ext@exercise}{\toc@exercise}{\ExerciseName\
+ \addcontentsline{\ext@exercise}{\toc@exercise}{\ExerciseName\
\theExercise\ \expandafter{\itshape \ExerciseTitle}\hspace{.66em}}
- \fi%
\endgroup}
%
%
@@ -1129,10 +1130,8 @@
\fi
\@selectExercise
\global\@Answerfalse\@BeginExeBox\refstepExecounter%
- \if@ExeStared\else%
- \addcontentsline{\ext@exercise}{\toc@exercise}{\ExerciseName\
+ \addcontentsline{\ext@exercise}{\toc@exercise}{\ExerciseName\
\theExercise\ \expandafter{\itshape \ExerciseTitle}\hspace{.66em}}
- \fi%
\item\ignorespaces
}
%
@@ -1187,7 +1186,7 @@
%
\def\EndCurrentQuestion{\termineliste{1}}
%
-\def\Question{\@InitQuestion\@ifnextchar[\@@Question{\@@Question[]}}%]
+\def\Question{\@InitQuestion\@ifnextchar[\@@Question{\@@Question[]}}%]
%
\def\@@Question[#1]{\setkeys{PPQuestion}{#1}\@@@Question}
%
@@ -1198,7 +1197,7 @@
\ifnum\@QuestionLevel=1
\advance \@QuestionLevel by 1
\begin{list}{}{\leftmargin \QuestionIndent
- \partopsep0pt \parsep\parskip \topsep \QuestionBefore
+ \partopsep0pt \parsep\parskip \topsep \QuestionBefore
\itemsep \QuestionBefore \labelwidth 2em
\labelsep .33em
\usecounter{Question}}
@@ -1254,7 +1253,7 @@
\def\EndCurrentsubQuestion{\termineliste{2}}
%
\def\subQuestion{\@InitsubQuestion%
-\@ifnextchar[\@@subQuestion{\@@subQuestion[]}}%]
+\@ifnextchar[\@@subQuestion{\@@subQuestion[]}}%]
\def\@@subQuestion[#1]{\setkeys{PPsubQuestion}{#1}\@@@subQuestion}
%
\def\@subQuestionHeader{\item[{\makebox[0cm][r]%
@@ -1266,7 +1265,7 @@
\ifnum\@QuestionLevel=2
\advance \@QuestionLevel by 1
\begin{list}{}{\leftmargin \subQuestionIndent
- \partopsep0pt \parsep\parskip \topsep \subQuestionBefore
+ \partopsep0pt \parsep\parskip \topsep \subQuestionBefore
\itemsep \subQuestionBefore \labelwidth 2em
\labelsep .33em
\usecounter{subQuestion}}
@@ -1318,7 +1317,7 @@
%
\def\EndCurrentsubsubQuestion{\termineliste{3}}
\def\subsubQuestion{\@InitsubsubQuestion%
-\@ifnextchar[\@@subsubQuestion{\@@subsubQuestion[]}}%]
+\@ifnextchar[\@@subsubQuestion{\@@subsubQuestion[]}}%]
\def\@@subsubQuestion[#1]{\setkeys{PPsubsubQuestion}{#1}\@@@subsubQuestion}
%
\def\@subsubQuestionHeader{\item[{\makebox[0cm][r]%
@@ -1330,7 +1329,7 @@
\ifnum\@QuestionLevel=3
\advance \@QuestionLevel by 1
\begin{list}{}{\leftmargin \subsubQuestionIndent
- \partopsep0pt \parsep\parskip \topsep \subsubQuestionBefore
+ \partopsep0pt \parsep\parskip \topsep \subsubQuestionBefore
\itemsep \subsubQuestionBefore \labelwidth 2em
\labelsep .33em
\usecounter{subsubQuestion}}
@@ -1429,7 +1428,6 @@
\def\@getAnswerInfo{%
\if@AnswerRef%
\def\theExercise{\ref{\AnswerRef}}%
-\def\AnswerListHeader{\@AnswerHeaderRef}
\else
\if@AnswerNB
\def\ExerciseTitle{}%
@@ -1478,9 +1476,9 @@
\newcommand{\@@@AnswerCmd}{%
\ifnum\@QuestionLevel=0
\advance \@QuestionLevel by 1
- \begin{list}{}{\partopsep\Exepartopsep \labelsep\Exelabelsep
- \itemsep \Exesep \parsep\Exeparsep
- \topsep\Exetopsep \labelwidth\Exelabelwidth
+ \begin{list}{}{\partopsep\Exepartopsep \labelsep\Exelabelsep
+ \itemsep \Exesep \parsep\Exeparsep
+ \topsep\Exetopsep \labelwidth\Exelabelwidth
\leftmargin\Exeleftmargin
\rightmargin\Exerightmargin }
%% \refstepExecounter
@@ -1506,18 +1504,20 @@
\newif\if@ExerciseSelected \@ExerciseSelectedtrue
\newif\if@ShipThisAnswer \@ShipThisAnswertrue
\newif\if@@ShipThisAnswer \@@ShipThisAnswertrue
-\newif\if@ExeSelectConcours \@ExeSelectConcoursfalse
-\newif\if@ExeSelectAnnee \@ExeSelectAnneefalse
-%% \newif\if@ExeSelectDifficulty \@ExeSelectDifficultyfalse
+\newif\if@ExeSelectExam \@ExeSelectExamfalse
+\newif\if@ExeSelectYear \@ExeSelectYearfalse
+\newif\if@ExeSelectDifficulty \@ExeSelectDifficultyfalse
\newif\if@ExeSelectOrigin \@ExeSelectOriginfalse
\newif\if@ExeSelectClass \@ExeSelectClassfalse
\newif\if@ExeSelectType \@ExeSelectTypefalse
\newif\if@ExeSelectLabel \@ExeSelectLabelfalse
-\define@key{PPExerciseSelect}{concours}%
-{\global\@ExeSelectConcourstrue\gdef\ExerciseSelectConcours{#1}}
-\define@key{PPExerciseSelect}{annee}%
-{\global\@ExeSelectAnneetrue\gdef\ExerciseSelectAnnee{#1}}
+\define@key{PPExerciseSelect}{exam}%
+{\global\@ExeSelectExamtrue\gdef\ExerciseSelectExam{#1}}
+\define@key{PPExerciseSelect}{year}%
+{\global\@ExeSelectYeartrue\gdef\ExerciseSelectYear{#1}}
+\define@key{PPExerciseSelect}{difficulty}%
+{\global\@ExeSelectDifficultytrue\gdef\ExerciseSelectDifficulty{#1}}
\define@key{PPExerciseSelect}{type}%
{\global\@ExeSelectTypetrue\gdef\ExerciseSelectType{#1}}
\define@key{PPExerciseSelect}{origin}%
@@ -1527,9 +1527,10 @@
\define@key{PPExerciseSelect}{label}%
{\global\@ExeSelectLabeltrue\gdef\ExerciseSelectLabel{#1}}
-\newcommand{\ExerciseStopSelect}{
- \@ExeSelectConcoursfalse
- \@ExeSelectAnneefalse
+\newcommand{\ExerciseStopSelect}{
+ \@ExeSelectExamfalse
+ \@ExeSelectYearfalse
+ \@ExeSelectDifficultyfalse
\@ExeSelectTypefalse
\@ExeSelectOriginfalse
\@ExeSelectClassfalse
@@ -1543,9 +1544,9 @@
\def\@selectExercise{%
\global\@ShipThisExercisetrue
\global\@@ShipThisExercisefalse
- \if@ExeSelectConcours
- \@for\@concours:=\ExerciseSelectConcours\do
- {\ifthenelse{\equal{\@concours}{\ExerciseConcours}}{
+ \if@ExeSelectExam
+ \@for\@exam:=\ExerciseSelectExam\do
+ {\ifthenelse{\equal{\@exam}{\ExerciseExam}}{
\global\@@ShipThisExercisetrue
}{}
}
@@ -1553,9 +1554,19 @@
\global\@@ShipThisExercisefalse
\fi
%
- \if@ExeSelectAnnee
- \@for\@annee:=\ExerciseSelectAnnee\do
- { \ifthenelse{\equal{\@annee}{\ExerciseAnnee}}{
+ \if@ExeSelectYear
+ \@for\@year:=\ExerciseSelectYear\do
+ { \ifthenelse{\equal{\@year}{\ExerciseYear}}{
+ \global\@@ShipThisExercisetrue
+ }{}
+ }
+ \if@@ShipThisExercise\else\@ShipThisExercisefalse\fi
+ \global\@@ShipThisExercisefalse
+ \fi
+ %
+ \if@ExeSelectDifficulty
+ \@for\@difficulty:=\ExerciseSelectDifficulty\do
+ { \ifthenelse{\equal{\@difficulty}{\ExerciseDifficulty}}{
\global\@@ShipThisExercisetrue
}{}
}
@@ -1642,7 +1653,7 @@
%
% Tenir compte de l'option fleqn
%
-\@ifundefined{if@fleqn}{\newif\if@fleqn\@fleqnfalse}{}
+\@ifundefined{if@fleqn}{\newif\if@fleqn\@fleqnfalse}{}
%
\newlength{\@savedmathindent}
\newcommand{\@savemathindent}{\relax}
diff --git a/Master/texmf-dist/tex/latex/exercise/exercise.sty b/Master/texmf-dist/tex/latex/exercise/exercise.sty
index 09b0402030b..ada490082a6 100644
--- a/Master/texmf-dist/tex/latex/exercise/exercise.sty
+++ b/Master/texmf-dist/tex/latex/exercise/exercise.sty
@@ -27,7 +27,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{exercise}
- [2010/11/27 v1.53 Exercise package (P.Pichaureau)]
+ [2010/12/14 v1.54 Exercise package (P.Pichaureau)]
%% \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
@@ -176,8 +176,8 @@
\@tempcnta by -1 }}
\def\DifficultyMarker{*}
\newcommand{\ExerciseHeaderTitle}{\qquad\ExerciseTitle}
-\newcommand{\ExerciseHeaderConcours}{\ExerciseConcours}
-\newcommand{\ExerciseHeaderAnnee}{\ \ExerciseAnnee}
+\newcommand{\ExerciseHeaderExam}{\ExerciseExam}
+\newcommand{\ExerciseHeaderYear}{\ \ExerciseYear}
\newcommand{\ExerciseHeaderDifficulty}{\theExerciseDifficulty\ }
\newcommand{\ExerciseHeaderOrigin}{%
\ ({\usefont{\encodingdefault}{\rmdefault}{m}{it}\ExerciseOrigin})}
@@ -233,8 +233,8 @@
\end{list}\advance\@QuestionLevel by -1}%
\ifnum\@QuestionLevel=\colonnesLevel\end{multicols}\colonnesLevel=-10\fi}
\newif\if@ExeTitle \@ExeTitlefalse
-\newif\if@ExeConcours \@ExeConcoursfalse
-\newif\if@ExeAnnee \@ExeAnneefalse
+\newif\if@ExeExam \@ExeExamfalse
+\newif\if@ExeYear \@ExeYearfalse
\newif\if@ExeReName \@ExeReNamefalse
\global\newcount\ExerciseDifficulty \ExerciseDifficulty=0
\newif\if@ExeDifficulty \@ExeDifficultyfalse
@@ -245,10 +245,10 @@
\def\theExerciseDifficulty{\marker{\DifficultyMarker}{\ExerciseDifficulty}}
\define@key{PPExercise}{title}%
{\global\@ExeTitletrue\gdef\ExerciseTitle{#1}}
-\define@key{PPExercise}{concours}%
-{\global\@ExeConcourstrue\gdef\ExerciseConcours{#1}}
-\define@key{PPExercise}{annee}%
-{\global\@ExeAnneetrue\gdef\ExerciseAnnee{#1}}
+\define@key{PPExercise}{exam}%
+{\global\@ExeExamtrue\gdef\ExerciseExam{#1}}
+\define@key{PPExercise}{year}%
+{\global\@ExeYeartrue\gdef\ExerciseYear{#1}}
\define@key{PPExercise}{difficulty}%
{\global\@ExeDifficultytrue\global\ExerciseDifficulty=\number#1}
\define@key{PPExercise}{name}%
@@ -269,16 +269,16 @@
\@ExeStaredfalse
\def\@InitExe{\@savemathindent\global\@echapqfalse%
\gdef\ExerciseTitle{}%
-\gdef\ExerciseConcours{}%
-\gdef\ExerciseAnnee{}%
+\gdef\ExerciseExam{}%
+\gdef\ExerciseYear{}%
\gdef\@ExerciseName{}%
\gdef\ExerciseOrigin{}%
\gdef\ExerciseType{}%
\gdef\ExerciseTrueLabel{}%
\global\ExerciseDifficulty=0%
\global\@ExeTitlefalse%
-\global\@ExeConcoursfalse%
-\global\@ExeAnneefalse%
+\global\@ExeExamfalse%
+\global\@ExeYearfalse%
\global\@ExeReNamefalse%
\global\@ExeDifficultyfalse%
\global\@ExeOriginfalse%
@@ -292,8 +292,8 @@
\def\@getExerciseInfo{%
\if@ExeReName\def\ExerciseName{\@ExerciseName}\fi%
\if@ExeTitle\else\def\ExerciseHeaderTitle{}\fi%
-\if@ExeConcours\else\def\ExerciseHeaderConcours{}\fi%
-\if@ExeAnnee\else\def\ExerciseHeaderAnnee{}\fi%
+\if@ExeExam\else\def\ExerciseHeaderExam{}\fi%
+\if@ExeYear\else\def\ExerciseHeaderYear{}\fi%
\if@ExeOrigin\else\def\ExerciseHeaderOrigin{}\fi%
\if@ExeType\else\def\ExerciseHeaderType{}\fi%
\if@ExeNB\setcounter{Exercise}{\ExerciseLocalNB}
@@ -329,10 +329,8 @@
\@QuestionLevel1
\refstepExecounter
\begingroup\@getExerciseInfo\ExerciseHeader
- \if@ExeStared\else%
\addcontentsline{\ext@exercise}{\toc@exercise}{\ExerciseName\
\theExercise\ \expandafter{\itshape \ExerciseTitle}\hspace{.66em}}
- \fi%
\endgroup}
\def\endExerciseEnv{\termineliste{1}\@EndExeBox%
\vskip\ExerciseSkipAfter}
@@ -352,10 +350,8 @@
\fi
\@selectExercise
\global\@Answerfalse\@BeginExeBox\refstepExecounter%
- \if@ExeStared\else%
\addcontentsline{\ext@exercise}{\toc@exercise}{\ExerciseName\
\theExercise\ \expandafter{\itshape \ExerciseTitle}\hspace{.66em}}
- \fi%
\item\ignorespaces
}
\def\defineExePartInEnv{\def\@ExePartHeader{\ExePartHeader}}
@@ -594,7 +590,6 @@
\def\@getAnswerInfo{%
\if@AnswerRef%
\def\theExercise{\ref{\AnswerRef}}%
-\def\AnswerListHeader{\@AnswerHeaderRef}
\else
\if@AnswerNB
\def\ExerciseTitle{}%
@@ -652,18 +647,20 @@
\newif\if@ExerciseSelected \@ExerciseSelectedtrue
\newif\if@ShipThisAnswer \@ShipThisAnswertrue
\newif\if@@ShipThisAnswer \@@ShipThisAnswertrue
-\newif\if@ExeSelectConcours \@ExeSelectConcoursfalse
-\newif\if@ExeSelectAnnee \@ExeSelectAnneefalse
-%% \newif\if@ExeSelectDifficulty \@ExeSelectDifficultyfalse
+\newif\if@ExeSelectExam \@ExeSelectExamfalse
+\newif\if@ExeSelectYear \@ExeSelectYearfalse
+\newif\if@ExeSelectDifficulty \@ExeSelectDifficultyfalse
\newif\if@ExeSelectOrigin \@ExeSelectOriginfalse
\newif\if@ExeSelectClass \@ExeSelectClassfalse
\newif\if@ExeSelectType \@ExeSelectTypefalse
\newif\if@ExeSelectLabel \@ExeSelectLabelfalse
-\define@key{PPExerciseSelect}{concours}%
-{\global\@ExeSelectConcourstrue\gdef\ExerciseSelectConcours{#1}}
-\define@key{PPExerciseSelect}{annee}%
-{\global\@ExeSelectAnneetrue\gdef\ExerciseSelectAnnee{#1}}
+\define@key{PPExerciseSelect}{exam}%
+{\global\@ExeSelectExamtrue\gdef\ExerciseSelectExam{#1}}
+\define@key{PPExerciseSelect}{year}%
+{\global\@ExeSelectYeartrue\gdef\ExerciseSelectYear{#1}}
+\define@key{PPExerciseSelect}{difficulty}%
+{\global\@ExeSelectDifficultytrue\gdef\ExerciseSelectDifficulty{#1}}
\define@key{PPExerciseSelect}{type}%
{\global\@ExeSelectTypetrue\gdef\ExerciseSelectType{#1}}
\define@key{PPExerciseSelect}{origin}%
@@ -674,8 +671,9 @@
{\global\@ExeSelectLabeltrue\gdef\ExerciseSelectLabel{#1}}
\newcommand{\ExerciseStopSelect}{
- \@ExeSelectConcoursfalse
- \@ExeSelectAnneefalse
+ \@ExeSelectExamfalse
+ \@ExeSelectYearfalse
+ \@ExeSelectDifficultyfalse
\@ExeSelectTypefalse
\@ExeSelectOriginfalse
\@ExeSelectClassfalse
@@ -689,9 +687,9 @@
\def\@selectExercise{%
\global\@ShipThisExercisetrue
\global\@@ShipThisExercisefalse
- \if@ExeSelectConcours
- \@for\@concours:=\ExerciseSelectConcours\do
- {\ifthenelse{\equal{\@concours}{\ExerciseConcours}}{
+ \if@ExeSelectExam
+ \@for\@exam:=\ExerciseSelectExam\do
+ {\ifthenelse{\equal{\@exam}{\ExerciseExam}}{
\global\@@ShipThisExercisetrue
}{}
}
@@ -699,9 +697,19 @@
\global\@@ShipThisExercisefalse
\fi
%
- \if@ExeSelectAnnee
- \@for\@annee:=\ExerciseSelectAnnee\do
- { \ifthenelse{\equal{\@annee}{\ExerciseAnnee}}{
+ \if@ExeSelectYear
+ \@for\@year:=\ExerciseSelectYear\do
+ { \ifthenelse{\equal{\@year}{\ExerciseYear}}{
+ \global\@@ShipThisExercisetrue
+ }{}
+ }
+ \if@@ShipThisExercise\else\@ShipThisExercisefalse\fi
+ \global\@@ShipThisExercisefalse
+ \fi
+ %
+ \if@ExeSelectDifficulty
+ \@for\@difficulty:=\ExerciseSelectDifficulty\do
+ { \ifthenelse{\equal{\@difficulty}{\ExerciseDifficulty}}{
\global\@@ShipThisExercisetrue
}{}
}