diff --git a/config/thesis_commands.tex b/config/thesis_commands.tex index e5d0020..4fd888e 100644 --- a/config/thesis_commands.tex +++ b/config/thesis_commands.tex @@ -5,12 +5,32 @@ \includefrom{#1}{#2}% and relative paths \input in the chapter } +\usepackage{titletoc} % Local table of contents +\titlecontents{section} +[0pt] % left margin +{\bfseries} % formatting +{\thecontentslabel\quad} % label format +{} % before code +{\titlerule*[.8pc]{.}\hspace{0.2em}\contentspage} % dots and page + +\titlecontents{subsection} +[2.4em] % left margin +{} % formatting +{\thecontentslabel\quad} % label format +{} % before code +{\titlerule*[.8pc]{.}\hspace{0.2em}\contentspage} % dots and page + \newcommand{\chaptertoc}{% Print the table of contents for the chapter - \vspace*{-1cm}% - \horizontalrule% - \vspace*{-0.5cm}% - \localtableofcontents% - \horizontalrule% + \hypersetup{linkcolor=black}% + \vspace{-1em}% + \horizontalrule% + \vspace{-1.5em}% + \section*{Contents}% Add a section title + \vspace{-0.5em}% + \startcontents% Start referencing the contents + \printcontents{}{1}{}% Print the contents + \horizontalrule% + \vspace{2em}% } % Add chapter label as prefix to all other sub-labels