summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/exercise
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/tex/latex/exercise
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/tex/latex/exercise')
-rw-r--r--Master/texmf-dist/tex/latex/exercise/exercise.sty78
1 files changed, 43 insertions, 35 deletions
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
}{}
}