A pandoc filter to shift the level of all headers in a latex/pdf output
The filter is written in Python with panflute which I recommend if you want to create your own pandoc filters.
sudo pip install pandoc-latex-levelup
or
docker run -d daamien/pandoc-latex-levelup
pandoc --filter pandoc-latex-levelup ./pandoc_latex_levelup.sample.md \
--toc -N -o ./pandoc_latex_levelup.sample.pdf
The filter is designed to work without any parameter, but you can use the two options below:
levelup: {
enable: True,
unnumbered_h1: False,
}
-
enable
is a killswitch. Set it to False and the filter will be disabled. This is useful when you use the filter in a script and you want ot toggle it off for certain md files (default: True) -
unnumbered_h1
remove numbering from level1 headers (default: True)
See pandoc-latex-levelup.sample.md
and pandoc-latex-levelup.sample.pdf
If you have any difficulties with this software, please file an issue here :
https://github.com/daamien/pandoc-latex-levelup/issues
This software is available under the BSD 3-Clause Licence.
see LICENSE