I'm writing documents which only contain exercises and I would like to add some hints for some exercises.
What I want is that the hints are specified in the exercise itself but displayed at the end of document.
I've tried to use the \atEndDocument hook but it did not worked.
Here a short example of what I want to write
\documentclass[14pt,a4paper]{extarticle}
\usepackage{pgfpages}
\pgfpagesuselayout{2 on 1}[a4paper,landscape,border shrink=7mm]
\begin{document}
Exercise 1 :
Solve the following equation $x^2+1=2$
\hint{Exercise 1 : Don't forget that two solutions exist}
Exercise 2 :
Derivate the following function $f:x \to \cos(x^2)$
\hint{Exercise 2 : The result is not $-\sin(x^2)$ }
\end{document}
\documentclass{...}, the required\usepackage's,\begin{document}, and\end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – dexteritas Sep 12 '17 at 08:41