3

I use the LaTeX package titletoc to produce table of contents in some chapters or sections for Org-Mode LaTeX / PDF export with

#+TOC: headlines 1 local

But in the PDF file there is for example the following text before the table of content:

section.1 section.2 section.3 subsection.3.1 subsubsection.3.1.1 subsubsection.3.1.2 subsubsection.3.1.3 subsubsection.3.1.4 subsubsection.3.1.5 subsection.3.2

I have no idea about that. Perhaps somebody can give me a hint.

1
  • 2
    Did you turn off the normal TOC as the manual indicates? Also, did you customize org-latex-default-packages-alist to load titletoc before hyperref?
    – NickD
    Nov 9, 2018 at 22:44

1 Answer 1

2

Like NickD wrote you have to load titletoc before hyperref.

My problem was that hyperref is loaded automatically through the variable org-lates-default-packages-alist and I defined my packages on a per file basis. So hyperref will always be loaded before the packages defined in the Org-Mode file. I have it now in my init.el.

Turning off the normal TOC has no effect or rather makes no problem if turned on.

1
  • 1
    You can accept your own answer to mark the question closed.
    – NickD
    Aug 8, 2019 at 2:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.