From 5d079ded0801bba437d6048e4ce9ebae3824e492 Mon Sep 17 00:00:00 2001 From: Erwan Normand Date: Tue, 24 Sep 2024 16:32:45 +0200 Subject: [PATCH] Unbold sections in global toc --- 0-front/toc.tex | 13 ++++++++----- README.md | 2 +- config/content.tex | 1 + config/thesis_commands.tex | 18 ++++-------------- 4 files changed, 14 insertions(+), 20 deletions(-) diff --git a/0-front/toc.tex b/0-front/toc.tex index cacb4b1..82ea8e7 100644 --- a/0-front/toc.tex +++ b/0-front/toc.tex @@ -1,6 +1,9 @@ { -\hypersetup{linkcolor=black} -\renewcommand{\contentsname}{Table of Contents} -\pdfbookmark[chapter]{\contentsname}{toc} -\tableofcontents -} \ No newline at end of file + \hypersetup{linkcolor=black} + + \renewcommand{\contentsname}{Table of Contents} + \pdfbookmark[chapter]{\contentsname}{toc} + + \renewcommand{\cftsecfont}{}% Unbold sections in ToC + \tableofcontents +} diff --git a/README.md b/README.md index 2f84350..6d5bbeb 100644 --- a/README.md +++ b/README.md @@ -5,5 +5,5 @@ Compile `main.tex` using either `pdflatex` with `biblatex` or `lualatex` (recomm You may need to install the following packages: ```bash -tlmgr install adjustbox babel babel-english biber biblatex bookmark booktabs caption changes csquotes emptypage enumitem etoc etoolbox fancyhdr fontaxes fontenc footmisc glossaries glossaries-english graphicx hyperref iftex import inconsolata libertinus libertinus-fonts libertinus-otf libertinus-type1 makecell mathtools microtype multirow nextpage pdflscape pdfpages setspace siunitx subfig tabularx textcomp titlesec truncate todonotes ulem upquote xcolor xstring +tlmgr install adjustbox babel babel-english biber biblatex bookmark booktabs caption changes csquotes emptypage enumitem etoolbox fancyhdr fontaxes fontenc footmisc glossaries glossaries-english graphicx hyperref iftex import inconsolata libertinus libertinus-fonts libertinus-otf libertinus-type1 makecell mathtools microtype multirow nextpage pdflscape pdfpages setspace siunitx subfig tabularx textcomp titlesec truncate todonotes tocloft ulem upquote xcolor xstring ``` diff --git a/config/content.tex b/config/content.tex index 75906ec..a8f1794 100644 --- a/config/content.tex +++ b/config/content.tex @@ -17,6 +17,7 @@ % Formatting \usepackage[autostyle]{csquotes} % For quotes \usepackage[dvipsnames]{xcolor} % More colors +\usepackage{tocloft} % Footnotes \usepackage[hang]{footmisc} diff --git a/config/thesis_commands.tex b/config/thesis_commands.tex index 2dbac5a..39e2d17 100644 --- a/config/thesis_commands.tex +++ b/config/thesis_commands.tex @@ -6,29 +6,19 @@ } \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 \hypersetup{linkcolor=black}% + \vspace{-1em}% \horizontalrule% \vspace{-1.5em}% \section*{Contents}% Add a section title \vspace{-0.5em}% + \startcontents% Start referencing the contents + \renewcommand{\cftsecfont}{\bfseries}% Bold sections in local ToC \printcontents{}{1}{}% Print the contents + \horizontalrule% \vspace{2em}% }