title: How to create automatic a list of items used in a LaTeX-document?
body: <p>I want to add items in a LaTeX-document. Say for example, that I want add hints to the document. I create a command, so I can call something similar to this:</p>
  
  <pre><code>\hint{foocareful}{Be careful with foo!}{foo is a very precious item and can easily be broken. Be careful, especially don't throw foo.}
  </code></pre>
  
  <p>This will be formatted in special way, to make it easy for the reader to recognize it as a hint. It gets a label, that can be referenced in the example with 'foocareful'.</p>
  
  <p>In the appendix I want to add a list of all hints with references to them. Something like:</p>
  
  <pre><code>\begin{enumerate}
     ...
     \item Be careful with foo! (\pageref{foocareful})
     ...
  \end{enumerate}
  </code></pre>
  
  <p>But naturally I don't want to maintain this list by hand. How can I create automatically such a list?</p>