Welcome to pandoc-latex-margin’s documentation!
Installation
pandoc-latex-margin is a pandoc filter for changing margin size to CodeBlock
and Div
that have speficied classes or latex-left-margin
and latex-right-margin
attributes.
Instructions
pandoc-latex-margin requires python, a programming language that comes pre-installed on linux and Mac OS X, and which is easily installed on Windows.
Install pandoc-latex-margin using the bash command
$ pipx install pandoc-latex-margin
To upgrade to the most recent release, use
$ pipx upgrade pandoc-latex-margin
pipx
is a script to install and run python applications in isolated environments from the Python Package Index, PyPI. It can be installed using instructions given here.
Getting Help
If you have any difficulties with pandoc-latex-margin, please feel welcome to file an issue on github so that we can help.
Notes
format icon by Picol
license icon by Icooon Mono
download icon by zest
status icon by Just Icon
code style icon by Google Material Design icons
size icon by Iconscout
Usage
To apply the filter, use the following option with pandoc:
$ pandoc --filter pandoc-latex-margin
Explanation
In the metadata block, specific set of classes can be defined to specify the margins for div
and codeblock
elements.
The metadata block add information using the pandoc-latex-margin
entry by a list of definitions:
pandoc-latex-margin:
- classes: [myclass]
left: 1cm
right: 2cm
The metadata block above is used to set the margins:
to
1cm
for left margin ondiv
andcodeblock
elements that have themyclass
class;to
2cm
for right margin ondiv
andcodeblock
elements that have themyclass
class;
The margins specified must be expressed in LaTeX syntax.
It’s also possible to set a specific LaTeX margin using the latex-left-margin
and latex-right-margin
attributes.