Remove hack on how table of contents is generated

This commit is contained in:
Charlotte Van Petegem 2024-02-01 11:43:13 +01:00
parent f6f1663f5a
commit 2ea608dbf4
No known key found for this signature in database
GPG key ID: 019E764B7184435A
3 changed files with 6 additions and 8 deletions

View file

@ -11,7 +11,6 @@
(org-latex-prefer-user-labels . t)
(org-latex-pdf-process . ("latexmk -f -pdf -%latex -shell-escape -interaction=nonstopmode -output-directory=%o %f"))
(org-html-prefer-user-labels . t)
(org-latex-toc-command . "\\frontmatter\n\\addchap{Table of Contents}\n\\label{chap:toc}\n\\listoftoc*{toc}\n\n")
(flycheck-languagetool-language . "en-GB")
(fill-column . 200)))
(org-mode . ((eval . (progn (visual-line-mode)

View file

@ -40,9 +40,11 @@
#+LATEX_HEADER: Prof.\ Dr.\ Bram De Wever
#+LATEX_HEADER: }
#+LATEX_HEADER: \addtokomafont{caption}{\small}
#+LATEX_HEADER: \setuptoc{toc}{numbered}
#+LATEX_HEADER: \addto\captionsenglish{\renewcommand{\contentsname}{Table of Contents}}
#+OPTIONS: ':t
#+OPTIONS: H:4
#+OPTIONS: toc:3
#+OPTIONS: toc:nil
#+OPTIONS: broken-links:mark
#+MACRO: num_commits 16 thousand
#+MACRO: num_prs 3\thinsp{}800
@ -55,10 +57,8 @@
#+cite_export: csl citation-style.csl
#+bibliography: bibliography.bib
#+BEGIN_COMMENT
There should be a `#+LATEX: \frontmatter` here, but I want to still be able to export to HTML, have the TOC show up in itself, change its heading and have the TOC be part of the frontmatter.
Because of this the `\frontmatter` statement needs to be part of the `org-latex-toc-command` (which is set in the =.dir-locals.el=/=build.el= file).
#+END_COMMENT
#+LATEX: \frontmatter
#+TOC: headlines 2
* To-dos
:PROPERTIES:

View file

@ -17,8 +17,7 @@
org-latex-caption-above nil
org-latex-src-block-backend 'minted
org-latex-minted-options '(("linenos" . "true"))
org-latex-prefer-user-labels t
org-latex-toc-command "\\frontmatter\n\\addchap{Table of Contents}\n\\label{chap:toc}\n\\listoftoc*{toc}\n\n")
org-latex-prefer-user-labels t)
(add-to-list
'org-export-smart-quotes-alist