code_junkie

How to create automatic a list of items used in a LaTeX-document?

Nov 12th, 2011
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. hint{foocareful}{Be careful with foo!}{foo is a very precious item and can easily be broken. Be careful, especially don't throw foo.}
  2.  
  3. begin{enumerate}
  4. ...
  5. item Be careful with foo! (pageref{foocareful})
  6. ...
  7. end{enumerate}
  8.  
  9. documentclass{article}
  10. usepackage{float}
  11.  
  12. floatstyle{boxed}
  13. newfloat{hintbox}{H}{hnt}
  14. floatname{hintbox}{Hint}
  15.  
  16. newcommandhint[2]{%
  17. begin{hintbox}
  18. #2
  19. caption{#1}
  20. end{hintbox}}
  21.  
  22. begin{document}
  23. section{Hello}
  24.  
  25. hint{Be careful with foo!label{foocareful}}{%
  26. foo is a very precious item and can easily be broken.
  27. Be careful, especially don't throw foo.}
  28.  
  29. hint{Don't worry about bar!label{foocareful}}{%
  30. Unlike foo, bar is pretty easily to get along with.}
  31.  
  32. section{End}
  33.  
  34. listof{hintbox}{List of Hints}
  35.  
  36. end{document}
Add Comment
Please, Sign In to add comment