Skip to content

✨📖 Pandoc wrapper with some filters and configs

License

Notifications You must be signed in to change notification settings

kotborealis/patchouli

Repository files navigation

Patchouli

CI

Pandoc wrapper with batteries included! 🔋

Dependencies

  • Node 8.0+
  • Docker

Installation

Installation needs root permissions to pull kotborealis/patchouli docker image.

sudo npm i -g @kotborealis/patchouli --unsafe-perm

Usage

Create .md files:

00_intro.md
10_general.md
90_conclusion.md
99_references.md

Patchouli combines all markdown files into a single file.

Build to pdf (build.pdf by default):

patchouli

Specifying output type:

patchouli --type=tex
patchouli --type=pdf
patchouli --type=docx
patchouli --type=revealjs

Place .patchouli.js in the current directory for advanced configuration

module.exports = {
    output: 'desired_output_filename',
    type: 'pdf',
}

Literate JS

Supports a form of 'literate'-js. See example. Use with flag --literate or with such config.

Included filters

  • pandoc-crossref --- pandoc filter for numbering figures, equations, tables and cross-references to them.

Configuration

Patchouli loads configurations and combines from files named .patchouli.js located in home and current directory,

Latex template

See %My settings in docker/resources/default.latex file for reference.

New yaml options

  • figure_H: true --- adds [H] param to figures to keep them in place