Skip to content

The Panodc manual is sparse and even plain wrong about header-includes #6757

@stroobandt

Description

@stroobandt
pandoc 2.5
Compiled with pandoc-types 1.17.5.4, texmath 0.11.2.2, skylighting 0.7.7

Recently, I experienced the Pandoc manual to be severely lacking and especially confusing on the subject of header-includes.

First of all, I was profoundly surprised to see that LaTeX macros defined in header-includes: (without any further {=latex} specification) also affect MathJaX in HTML output. When reading the manual, one would think LaTeX header-includes would only affect latex output. In all, this is a useful feature, but is not as such documented.

Inserting header-includes: inside a YAML metadata block inside the input document is easy enough. However, in my eternal quest to separate format from content, I wanted to achieve exactly the same using a makefile and an external file. I was hoping -H FILE would do that, as is suggested in the manual. That did not work. The Pandoc manual happens to be plain wrong about this!

After spending more time than intended trying out many more things, I was lucky to eventually run into Boilerplating Pandoc for Academic Writing. This article explains how easy it is to load header-includes from an external file by letting it precede the input file.

I also wrote my findings in this [TeX StackExchange answer(https://tex.stackexchange.com/a/566707/26348).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions