diff options
author | Karl Berry <karl@freefriends.org> | 2014-10-21 22:46:05 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-10-21 22:46:05 +0000 |
commit | 340d35125c33dac1ef0378fac0ea53c43688dddc (patch) | |
tree | 6b7a7fbc14cc3326f5dd841feab8321461f40edc /Master/texmf-dist/tex/latex | |
parent | 97f18bfe9c66155c1ff382e11586679d9ac4d36b (diff) |
exercise (21oct14)
git-svn-id: svn://tug.org/texlive/trunk@35417 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/exercise/exercise.sty | 43 |
1 files changed, 29 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/latex/exercise/exercise.sty b/Master/texmf-dist/tex/latex/exercise/exercise.sty index f09436ca270..7598ca26def 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} - [2012/05/08 v1.58 Exercise package (P.Pichaureau)] + [2014/10/20 v1.6 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 @@ -123,20 +123,33 @@ \def\ExePartName{Teil}% \def\ArticleOf{von\ }% } -\addto\captionsportuges{% +\addto\captionsportugese{% \def\listexercisename{Lista de exerc\'icios}% \def\ExerciseName{Exerc\'icio}% -\def\AnswerName{Soluo do exerc\'icio}% +\def\AnswerName{Solução do exerc\'icio}% \def\ExerciseListName{Ex.}% \def\AnswerListName{Solu\c{c}\~ao}% \def\ExePartName{Parte}% \def\ArticleOf{de\ }% } +\addto{\captionsrussian}{ + \def\listexercisename{Список упражнений}% + \def\ExerciseName{Упражнение}% + \def\AnswerName{Ответ к упражнению}% + \def\ExerciseListName{Упр.}% + \def\AnswerListName{Ответ}% + \def\ExePartName{Часть}% + \def\ArticleOf{из\ }% +} }{} \newlength{\ExerciseSkipBefore} \setlength{\ExerciseSkipBefore}{1\baselineskip} \newlength{\ExerciseSkipAfter} \setlength{\ExerciseSkipAfter}{0\baselineskip} +\newlength{\AnswerSkipBefore} +\setlength{\AnswerSkipBefore}{0\baselineskip} +\newlength{\AnswerSkipAfter} +\setlength{\AnswerSkipAfter}{0\baselineskip} \newlength{\Exesep} \setlength{\Exesep}{1\baselineskip} \newlength{\Exetopsep} @@ -198,6 +211,8 @@ \def\marker#1#2{\@tempcnta#2\whiledo{\@tempcnta>0}{#1\advance \@tempcnta by -1 }} \def\DifficultyMarker{*} +\newcommand{\AtBeginExercise}{} +\newcommand{\AtBeginAnswer}{} \newcommand{\ExerciseHeaderTitle}{\qquad\ExerciseTitle} \newcommand{\ExerciseHeaderExam}{\ExerciseExam} \newcommand{\ExerciseHeaderYear}{\ \ExerciseYear} @@ -354,7 +369,7 @@ \begingroup\@getExerciseInfo\ExerciseHeader \addcontentsline{\ext@exercise}{\toc@exercise}{\ExerciseName\ \theExercise\ \expandafter{\itshape \ExerciseTitle}\hspace{.66em}} - \endgroup} + \endgroup\AtBeginExercise} \def\endExerciseEnv{\termineliste{1}\@EndExeBox% \vskip\ExerciseSkipAfter} \def\ExerciseCmd{\@InitExe\@ifstar{\global\@ExeStaredtrue\@ExeCmd}% @@ -375,16 +390,16 @@ \global\@Answerfalse\@BeginExeBox\refstepExecounter% \addcontentsline{\ext@exercise}{\toc@exercise}{\ExerciseName\ \theExercise\ \expandafter{\itshape \ExerciseTitle}\hspace{.66em}} - \item\ignorespaces + \item\ignorespaces\AtBeginExercise } \def\defineExePartInEnv{\def\@ExePartHeader{\ExePartHeader}} \def\defineExePartInList{\def\@ExePartHeader{\ExePartListHeader}} \def\defineExerciseEnv{% \defineExePartInEnv - \renewenvironment{Exercise}{\global\beginExerciseEnv}% -{\@ExeStaredfalse\endExerciseEnv} + \renewenvironment{Exercise}{\global\@ExeStaredfalse\global\beginExerciseEnv}% +{\endExerciseEnv} \renewenvironment{Exercise*}{\global\@ExeStaredtrue\beginExerciseEnv}% -{\@ExeStaredfalse\endExerciseEnv} +{\endExerciseEnv} } \newenvironment{Exercise}{}{} \newenvironment{Exercise*}{}{} @@ -639,11 +654,11 @@ \def\@@AnswerEnv[#1]{\setkeys{PPAnswer}{#1}% \global\@Answertrue\@selectAnswer\@BeginExeBox\@@@AnswerEnv} \newcommand{\@@@AnswerEnv}{% - \@QuestionLevel1 - \pagebreak[1]\begingroup\@getAnswerInfo\AnswerHeader\endgroup} -\def\endAnswerEnv{\termineliste{1}\@EndExeBox\termineliste{0}} + \pagebreak[1]\vskip\AnswerSkipBefore\@QuestionLevel1 + \begingroup\@getAnswerInfo\AnswerHeader\endgroup\AtBeginAnswer} +\gdef\endAnswerEnv{\termineliste{1}\@EndExeBox\termineliste{0}\vskip\AnswerSkipAfter} \newenvironment{Answer}{}{} -\def\defineAnswerEnv{ +\gdef\defineAnswerEnv{ \gdef\@AnswerHeaderRef{\AnswerHeader} \renewenvironment{Answer}{\beginAnswerEnv}{\endAnswerEnv}} \defineAnswerEnv @@ -662,10 +677,10 @@ \termineliste{1}\@EndExeBox \fi \global\@Answertrue\@selectAnswer\@BeginExeBox% - \item[\bgroup\@getAnswerInfo\AnswerListHeader\egroup]\ignorespaces + \item[\bgroup\@getAnswerInfo\AnswerListHeader\egroup]\AtBeginAnswer\ignorespaces } \def\defineAnswerCmd{\gdef\@AnswerHeaderRef{\AnswerListHeader}% -\gdef\Answer{\AnswerCmd}} +\def\Answer{\AnswerCmd}} \newif\if@ShipThisExercise \@ShipThisExercisetrue \newif\if@@ShipThisExercise \@@ShipThisExercisetrue |