Repository navigation
Extensible templates, fixes, and improved documentation
Since the last release earlier this year a lot has happened to pandocomatic. Besides a large amount of bug fixes, the template engine has been improved and the manual rewritten!
Futhermore, pandocomatic is compatible with pandoc2.
Comments are welcome.
Highlights
- Template engine
-
Templates can be extended; a template can extend one or more templates. This allows you to setup a modular set of (re)usable template components. For example, in the template definition below, the
my-webpagetemplates builds on theauthortemplate (to mix in my name as author), thetodaytemplate (to mix in today's date) and thewebpagetemplate (with general settings to convert to HTML):templates: author: metadata: author: Huub de Beer today: preprocessors: - preprocessors/today.rb webpage: glob: ['*.md'] pandoc: to: html toc: true css: - assets/style.css postprocessors: - postprocessors/tidy.sh my-webpage: extends: ['author', 'today', 'webpage'] pandoc: to: html5 bibliography: 'assets/my-bibliography.bib' -
Added the
metadatasection to template definitions, allowing you to set common metadata such as an author, keywords, language, and so on (see example above) -
Added the
setupandcleanupsections, which are a list of scripts to be run before the conversion process is started and after it has finished. This can be used to setup or clean up the environment needed for a conversion.
-
- Using templates
- A document can use multiple templates. The document will be converted once for each of these templates
- All template sections can be customized in a document rather than only the
pandocsection.
- Error reporting
- pandocomatic now exits with a status code <> 0 when something went amiss.
- warnings during conversion are printed to STDERR rather than ignored
- Documentation
- There is a full documentation coverage of pandocomatic's code base
- The manual has been rewritten to cover all the new features and improvements.