Advertisement
obernardovieira

my-own-url-list

Mar 23rd, 2017
441
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 0.82 KB | None | 0 0
  1. \documentclass[11pt,parskip=half,numbers=noenddot,bibliography=totoc,index=totoc,
  2.  listof=leveldown
  3. ]{scrbook}
  4.  
  5. \addtotoclist{loe}
  6. \newcounter{example}[chapter]
  7. \renewcommand{\theexample}{\thechapter.\arabic{example}}
  8. \newcommand{\listofloename}{List of Examples}
  9. \newcommand\listofexamples{\listoftoc{loe}}
  10. \setuptoc{loe}{chapteratlist,leveldown}
  11. \makeatletter
  12. \newcommand\l@example{\l@figure}
  13. \makeatother
  14.  
  15. \usepackage{tcolorbox}
  16. \newcommand{\example}[2] {
  17.  \setlength\parfillskip{0pt plus 1fil}%
  18.   \refstepcounter{example}%
  19.   \addxcontentsline{loe}{section}[\theexample]{\ignorespaces #1}
  20.  \theexample:\ \ignorespaces #1 #2}
  21.  
  22. \begin{document}
  23. \chapter{First}
  24.  
  25.  
  26. \chapter{Second}
  27. \example{Second example.}{Very nice!}
  28. \example{Third example.}{Very nice too!}
  29.  
  30. \chapter{Lists}
  31. \listofexamples
  32. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement