Text FormattingCompiling a list of exercise

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
tiagodelpupo
Posts: 2
Joined: Mon Jun 18, 2018 3:10 pm

Compiling a list of exercise

Post by tiagodelpupo »

Hello everyone.

I'm writing a list of exercise, like this:

Exercise 1
Solution 1
Exercise 2
Solution 2
Exercise 3
Solution 3....

It`s a part of a "exercise book". When I compile, I need it to look like this:

Exercise 1
Exercise 2
Exercise 3...
Solution 1
Solution 2
Solution 3...

How can I do this?

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10330
Joined: Mon Mar 10, 2008 9:44 pm

Compiling a list of exercise

Post by Stefan Kottwitz »

I think you could use the xsim package for this list. The manual (xsim pdf) explains how to use it.

It can be set up to print only exercises, only solutions, or both. Commands control how its done. The manual means some reading, but the interface needs to be explained and it's bot good to have many commands and options and to have a detailed explanation. :-)

Stefan
LaTeX.org admin
Post Reply