Most probably a trivial question for you: I have a counter \thetotalnoexercices that I compute while compiling my book, but I want to refer to it in the introduction ("This book contains ... exercises").
I should write it to the .aux file but the mechanism seems unclear to me (according to my trials!).
Many thanks in advance! Best, O.
Asked
Active
Viewed 23 times
0
cgnieder
- 66,645
Olivier Ramaré
- 121
-
3Maybe https://tex.stackexchange.com/q/34789/35864 can help you. – moewe Jun 20 '20 at 14:36
-
3You can simply set a \label at the last exercise and then use \ref. – Ulrike Fischer Jun 20 '20 at 14:37
-
Many thanks to both of you! I settled for simplicity and used the totcount packages. Ulrike's solution is perfect for simple files, it took me a while to understand it, but my exercises are numbered according to chapter-exerciseno-questionno. And the label mechanism takes care only of one counter (the last one that goes through refstepsounter I think). Thanks! – Olivier Ramaré Jun 20 '20 at 15:27