Wandmalfarbe / pandoc-latex-template

A pandoc LaTeX template to convert markdown files to PDF or LaTeX.
BSD 3-Clause "New" or "Revised" License
6.09k stars 959 forks source link

Possible incompatibility with titlesec #285

Open cunhapaulo opened 2 years ago

cunhapaulo commented 2 years ago

First I´d like to thank you for this marvelous work done with this template.

Second, I´d like to ask if is there any know incompatibility between this template and package titlesec.

Reason: As i started using titlesec in header-includes my sections (marked with ##) got disconfigured.

header-includes         :  |
   \usepackage{tikz,pgfplots,titlesec}

Thanks in advance for your kind attention.

UnkwUsr commented 9 months ago

I had the same problem with my own custom template, and now resolved it by moving \usepackage{hyperref} just before \begin{document}. In my template I have two "bad" expressions that was messing my references: \setcounter{secnumdepth}{-\maxdimen} and \usepackage{titlesec}, so if I'll put any of them after hyperref, my references will mess again (by this I mean like TOC references does not match actually position of corresponding headers in text).

P.S. regarding this project, I've skimmed through its template and seems like as for now content of header-includes gets pasted before \usepackage{hyperref}, so, following my logic, all should work. Is your issue still reproducible?

UPD: this topic turned out to be much bigger than I expected: https://tex.stackexchange.com/questions/1863/which-packages-should-be-loaded-after-hyperref-instead-of-before