Welcome to pandoc-latex-color’s documentation!
Installation
pandoc-latex-color is a pandoc filter for setting the color to Span, and Div that have speficied classes or latex-color attribute.
Instructions
pandoc-latex-color 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-color using the bash command
$ pipx install pandoc-latex-color
To upgrade to the most recent release, use
$ pipx upgrade pandoc-latex-color
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.
It uses the xcolor LaTeX package to handle correctly colors in spans and divs and the soulutf8 package for highlighing the text.
Getting Help
If you have any difficulties with pandoc-latex-color, 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-color
Explanation
In the metadata block, specific set of classes can be defined to specify the color for span, and div elements.
The metadata block add information using the pandoc-latex-color entry by a list of definitions:
pandoc-latex-color:
- classes: [important]
color: red
bgcolor: blue
The metadata block above is used to set the color to red and the background color to blue for span, and div elements that have the important class.
The specified colors must be a valid X11 color name.
It’s also possible to set a specific LaTeX color or a specific background color using the latex-color or the latex-bgcolor attributes.
Example
Demonstration: Using pandoc-latex-color-sample.txt as input gives output file in pdf.