-
I’m working on a Quarto thesis book project and need to place the Table of Contents (TOC) after the preface content, which is written in What is the best approach to achieve this consistent TOC placement for multiple formats? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
Use If the option does not fit your needs, then it's going to be very tricky to achieve what you want and more advanced (if even possible). |
Beta Was this translation helpful? Give feedback.
-
I came up with an easy method to adjust the order of TOC in LaTeX:
# Praface {-}
# Acknowledgements {-}
# Abstract {-}
```{=latex}
\clearpage
{
\hypersetup{linkcolor=blue}
\setcounter{tocdepth}{3}
\tableofcontents
}
``` The generated LaTeX code would be: \bookmarksetup{startatroot}
\chapter*{Praface}\label{praface}
\addcontentsline{toc}{chapter}{Praface}
\markboth{Praface}{Praface}
\bookmarksetup{startatroot}
\chapter*{Acknowledgements}\label{acknowledgements}
\addcontentsline{toc}{chapter}{Acknowledgements}
\markboth{Acknowledgements}{Acknowledgements}
\bookmarksetup{startatroot}
\chapter*{Abstract}\label{abstract}
\addcontentsline{toc}{chapter}{Abstract}
\markboth{Abstract}{Abstract}
\clearpage
{
\hypersetup{linkcolor=blue}
\setcounter{tocdepth}{3}
\tableofcontents
} |
Beta Was this translation helpful? Give feedback.
I came up with an easy method to adjust the order of TOC in LaTeX:
toc: false
in_quarto.yml
for the PDF format.index.qmd
, write the raw LaTeX code for printing TOC after the preface. For example:The generated LaTeX code would be: