Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass[10pt]{memoir}
- usepackage{lipsum}
- usepackage{etoc}
- makeatletter
- newcommandimmaddtocontents[1]{{%
- letprotect@unexpandable@protect%
- immediatewrite@auxout{noexpand@writefile{toc}{#1}}%
- }}
- makeatother
- %Add Rule to Contents, Write Immediately, Will Replace With Image Later
- newcommand{ruleincontents}{%
- immaddtocontents{nobreaksmallskip rule{3in}{1mm}par}
- }%
- begin{document}
- frontmatter
- tableofcontents
- ruleincontents{}
- mainmatter
- chapter{Chapter 1}
- section{Ch1, Sec1}
- lipsum[1]
- section{Ch1, Sec2}
- lipsum[1]
- section{Ch1, Sec3}
- lipsum[1]
- chapter{Chapter 2}
- etocsettocdepth.toc{section}
- etocsettocstyle{section*{Local~contentsname}}{}
- localtableofcontents*
- section{Ch2, Sec1}
- lipsum[1]
- section{Ch2, Sec2}
- lipsum[1]
- section{Ch2, Sec3}
- lipsum[1]
- clearpage
- appendix
- ruleincontents{}
- chapter{Appendixes}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement