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

codebox hitting headers H4 and H5 #171

Open nguxx opened 4 years ago

nguxx commented 4 years ago

Hi, I get an issue : the codeboxes are colliding with headers if the header is H4 or H5 (but not H3 and above) I uploaded an exemple here (line 8 and 34 of .md's) and this is the .md to check the code. my command is plain with your temple out of the box pandoc GnuPG_tuto.md -o GnuPG_tuto.md.pdf --from markdown --template eisvogel --listings Only on my machine ?

Wandmalfarbe commented 4 years ago

LaTeX has no fourth and fifth level headings, so they are rendered with \paragraph and \subparagraph (as inline paragraphs with no margin). Normally that's not so bad but you notice it with block level content such as boxes and code after a paragraph heading.

You can redefine these paragraphs to look like real headings as discussed here https://github.com/Wandmalfarbe/pandoc-latex-template/issues/162#issuecomment-626931848 That should format everything after with nice margins.