Unbold sections in global toc

This commit is contained in:
2024-09-24 16:32:45 +02:00
parent db39568969
commit 5d079ded08
4 changed files with 14 additions and 20 deletions

View File

@@ -1,6 +1,9 @@
{ {
\hypersetup{linkcolor=black} \hypersetup{linkcolor=black}
\renewcommand{\contentsname}{Table of Contents}
\pdfbookmark[chapter]{\contentsname}{toc} \renewcommand{\contentsname}{Table of Contents}
\tableofcontents \pdfbookmark[chapter]{\contentsname}{toc}
}
\renewcommand{\cftsecfont}{}% Unbold sections in ToC
\tableofcontents
}

View File

@@ -5,5 +5,5 @@ Compile `main.tex` using either `pdflatex` with `biblatex` or `lualatex` (recomm
You may need to install the following packages: You may need to install the following packages:
```bash ```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
``` ```

View File

@@ -17,6 +17,7 @@
% Formatting % Formatting
\usepackage[autostyle]{csquotes} % For quotes \usepackage[autostyle]{csquotes} % For quotes
\usepackage[dvipsnames]{xcolor} % More colors \usepackage[dvipsnames]{xcolor} % More colors
\usepackage{tocloft}
% Footnotes % Footnotes
\usepackage[hang]{footmisc} \usepackage[hang]{footmisc}

View File

@@ -6,29 +6,19 @@
} }
\usepackage{titletoc} % Local table of contents \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 \newcommand{\chaptertoc}{% Print the table of contents for the chapter
\hypersetup{linkcolor=black}% \hypersetup{linkcolor=black}%
\vspace{-1em}% \vspace{-1em}%
\horizontalrule% \horizontalrule%
\vspace{-1.5em}% \vspace{-1.5em}%
\section*{Contents}% Add a section title \section*{Contents}% Add a section title
\vspace{-0.5em}% \vspace{-0.5em}%
\startcontents% Start referencing the contents \startcontents% Start referencing the contents
\renewcommand{\cftsecfont}{\bfseries}% Bold sections in local ToC
\printcontents{}{1}{}% Print the contents \printcontents{}{1}{}% Print the contents
\horizontalrule% \horizontalrule%
\vspace{2em}% \vspace{2em}%
} }