Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass[12pt,bothside]{book}
- usepackage[titles]{tocloft}%
- renewcommand{cftchapleader}{~cftdotfill{5}}
- setcounter{secnumdepth}{0}
- setcounter{tocdepth}{3}
- % to center part
- renewcommand{cftpartfont}{hfillLargebfseries}
- renewcommand{cftpartaftersnum}{hfill}
- addtocontents{toc}{cftpagenumbersoff{part}}
- %wrap TOC contents
- usepackage{titletoc}
- titlecontents*{subsubsection}% <section>
- [1.5em]% <left>
- {scriptsize}% <above-code>
- {}% <numbered-entry-format>
- {}% <numberless-entry-format>
- {, thecontentspage}% <filler-page-format>
- [ - ]% <separator>
- [\]% <end>
- begin{document}
- frontmatter
- tableofcontents
- mainmatter
- part{Part 1}
- chapter{Chapter1}
- section{Section 1}
- subsubsection{Subsubsection 1}
- subsubsection{Subsubsection 2}
- part{Part 2}
- chapter{Chapter1}
- section{Section 1}
- subsection{Subection 1}
- subsubsection{Subsubsection 1}
- subsubsection{Subsubsection 2}
- end{document}
- documentclass[12pt,twoside]{book}
- usepackage[titles]{tocloft}%
- renewcommand{cftchapleader}{~cftdotfill{5}}
- setcounter{secnumdepth}{0}
- setcounter{tocdepth}{3}
- % to center part
- renewcommand{cftpartfont}{hfillLargebfseries}
- usepackage{xpatch}
- makeatletter
- patchcmd{l@part}{#1}{#1hfillhskip-rightskipmbox{}}{}{}
- makeatother
- addtocontents{toc}{cftpagenumbersoff{part}}
- %wrap TOC contents
- usepackage{titletoc}
- titlecontents*{subsubsection}% <section>
- [3.8em]% <left>
- {scriptsize}% <above-code>
- {}% <numbered-entry-format>
- {}% <numberless-entry-format>
- {, thecontentspage}% <filler-page-format>
- [ - ]% <separator>
- [\]% <end>
- begin{document}
- showoutput
- frontmatter
- tableofcontents
- mainmatter
- part{Part 1}
- chapter{Chapter1}
- section{Section 1}
- subsubsection{Subsubsection 1}
- subsubsection{Subsubsection 2}
- part{Part 2}
- chapter{Chapter1}
- section{Section 1}
- subsection{Subection 1}
- subsubsection{Subsubsection 1}
- subsubsection{Subsubsection 2}
- end{document}
Add Comment
Please, Sign In to add comment