GeneralPicking exercises from a list

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
auntyyye
Posts: 1
Joined: Tue Jul 18, 2023 2:42 pm

Picking exercises from a list

Post by auntyyye »

Hello,

I thought I found a solution with the exercise package, but it is not exactly adapted to what I want to do, and maybe someone here can help me.
I would like to work with a file "exercises.tex", in which i have a list of exercises in "Exercise" environment, with a "type" corresponding to the level, chapter, etc. and a label.
Then, I want to use this file to make one document in which I print all exercises, which will be organized with sections, subsections corresponding to a certain level, and a certain chapter.
I also need it to print several exercise sheets for oral exams, which will contain 3 column with just a few exercises that i will handpick with labels.

The problem with the exercise package is that i need to do :

Code: Select all

\ExerciseSelect[type = {..}] or  \ExerciseSelect[type = {..}]
\input{exercises}
\ExercisesStopSelect
which means that i have to input exercises.tex several times in my document, which i don't think is optimal. It also causes an orange error, as i define each exercise several times with one same label.
Ideally, i would like to just input all my exercises at the beginning, and have a function similar to \ExerciseSelect which picks the adequate exercises to restate them. I also looked up thm-restate but it does not fit this situation ; it would be perfect if i could restate by referring to the label of the exercise, and not by creating a new function for each exercise to restate them. I hope my problem is clear :D

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply