CTAN Comprehensive TeX Archive Network

Direc­tory macros/latex/contrib/exercise

Typesetting exercises: the exercise package

The package helps to typeset exercises or list of exercises within any

Exercises, questions, sub-questions are automatically numbered. It is
possible to put answers in the same document, and display them
immediately, later in the document or not at all.

The layout of exercise is fully customisable. It is then possible to typeset
long problems, short exercises, questionnaires, etc.

Usage of the babel package is detected, but not fully supported by now
(only english and french are implemented). See documentation for more


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
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.


- execute latex on exercise.ins

- execute latex on exercise.dtx

- produce Index and Change History with

   makeindex -s gind.ist -o exercise.ind exercise.idx
   makeindex -s gglo.ist -o exercise.gls exercise.glo

- and then execute latex on exercise.dtx (again !)

- copy exercise.sty and exercise.pdf to the correct places in the texmf
tree. exercise.sty could be put in


exercise.pdf is the documentation of the package: it could take place


- run texhash or the corresponding command of your distribution

To do:

- Add more languages.

Change log:
- v1.6 2014-10-20     Added \AtBeginExercise and \AddBeginAnswer
                      (following a suggestion of Daniel Turner)
                      Portuguese translation fixed.
                      Russian translation added
                      (thx to Andreï V. Kostyrka)
                      Added \AnswerSkipBefore and \AnswerSkipAfter
                      (thx to Alexander Malkis)
                      Bugs corrected.
- v1.58 2012-05-08    Minor modification to avoid pagebreak after
                      exercise and answer heading
                      (thx to Mathias Magdowski)
- v1.57 2011/07/19    Bug correction on exercise selection
                      (thx to Tobias Isenberg)
- v1.56 2011/05/10    Portuguese translation added
                      (thx to José Romildo Malaquias)
- v1.55 2011/03/13    Command \refAnswer added (thx to Ferenc Wettl)
- 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
                      Dutch support added (thx to Frank Koenders)
- v1.4  2010/08/27    Many bugs corrected
                      Exercise selection reviewed
- v1.31 2009/03/28    Italian support added
- v1.3  2009/03/26    Spanish support added
                      List of exercices support
                      Bug corrected
- v1.2  2006/04/22    A basic exercice selection mechanism added.
- v1.11 2004/09/08    Corrected a bug preventing the correct
                      use of the babel package.
- v1.1  2004/09/05    Added the \renewcounter command
- v1    2004/08/19    First release

19 aout 2004
Paul Pichaureau

Down­load the con­tents of this pack­age in one zip archive (325.3k).

ex­er­cise – Type­set ex­er­cises, prob­lems, etc. and their an­swers

The pack­age helps to type­set ex­er­cises or list of ex­er­cises within any doc­u­ment.

Ex­er­cises, ques­tions and sub-ques­tions are au­to­mat­i­cally num­bered. It is pos­si­ble to put an­swers in the same doc­u­ment, and dis­play them im­me­di­atly, later in the doc­u­ment or not to print an­swers at all.

The lay­out of ex­er­cises is fully cus­tomis­able. It is pos­si­ble to type­set long prob­lems, short ex­er­cises, ques­tion­naires, etc.

Usage of the ba­bel pack­age is de­tected, but not fully sup­ported yet (only English and French are im­ple­mented).

Ver­sion1.6 2014-10-20
Li­censesGNU Gen­eral Public Li­cense, ver­sion 2
Main­tainerPaul Pichau­reau
Con­tained inTeX Live as ex­er­cise
MiKTeX as ex­er­cise
Guest Book Sitemap Contact Contact Author