Guest User

Untitled

a guest
Mar 22nd, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. documentclass{scrartcl}
  2. usepackage{titletoc}
  3.  
  4. begin{document}
  5.  
  6. startcontents
  7. printcontents{ }{1}{}
  8.  
  9. section{A Regular Section}
  10. subsection{First subsection}
  11. subsubsection{Subsubsection one one}
  12. subsubsection{Subsubsection one two}
  13.  
  14. appendix
  15.  
  16. section{A Long Appendix}
  17. stopcontents
  18.  
  19. startcontents[sections]
  20. printcontents[sections]{ }{2}{}
  21.  
  22. subsection{First subsection in Appendix}
  23. subsubsection{Subsubsection one one in Appendix}
  24. subsubsection{Subsubsection one two in Appendix}
  25.  
  26. subsection{Second subsection in Appendix}
  27. subsubsection{Subsubsection two one in Appendix}
  28. subsubsection{Subsubsection two two in Appendix}
  29. stopcontents[sections]
  30.  
  31. resumecontents
  32. section{A short appendix}
  33. subsection{First subsection in short appendix}
  34. subsubsection{First subsubsection in short appendix}
  35.  
  36. end{document}
  37.  
  38. startcontents
  39. renewcommandcontentsname{Table of Contents}% if a change of the default "Contents" name is required
  40. printcontents{ }{1}{section*{contentsname}}
  41.  
  42. startcontents[sections]
  43. renewcommandcontentsname{Table of my Long Appendix}
  44. printcontents[sections]{ }{2}{subsection*{hspace*{1.2em}contentsname}}
  45.  
  46. documentclass{scrartcl}
  47. usepackage{etoc}
  48.  
  49. begin{document}
  50.  
  51. tableofcontents
  52.  
  53. section{A Regular Section}
  54. subsection{First subsection}
  55. subsubsection{Subsubsection one one}
  56. subsubsection{Subsubsection one two}
  57.  
  58. appendix
  59.  
  60. etocsettocdepth.toc{section}% will be obeyed by main TOC
  61.  
  62. section{A Long Appendix (with its own TOC)}
  63.  
  64. etocignoretoctocdepth % of course, if we want to see something in local TOC...
  65. etocsettocstyle{subsection*{contentsname}}{}
  66. localtableofcontents
  67.  
  68. subsection{First subsection in Appendix}
  69. subsubsection{Subsubsection one one in Appendix}
  70. subsubsection{Subsubsection one two in Appendix}
  71.  
  72. subsection{Second subsection in Appendix}
  73. subsubsection{Subsubsection two one in Appendix}
  74. subsubsection{Subsubsection two two in Appendix}
  75.  
  76. etocsettocdepth.toc{subsubsection}% will be obeyed by main TOC
  77. section{A short appendix}
  78. subsection{First subsection in short appendix}
  79. subsubsection{First subsubsection in short appendix}
  80.  
  81. end{document}
Add Comment
Please, Sign In to add comment