pandoc-xhtml.tex
offers a way to compile Markdown documents with ConTeXt.
pandoc-xhtml.tex
is an environment, which is what ConTeXt needs to compile XML sources directly.
With the proper environment, ConTeXt deals with XML natively. It doesn't need any intermediate format. Not even a ConTeXt source file cotaining the text to be typeset.
pandoc
can generate ConTeXt documents from Markdown sources. But this way you'll miss:
-
Main document language information.
-
Markup for language in text portions.
-
Any
<div>
or<span>
elements markup.
Generating the PDF document from XML sources with ConTeXt avoids loosing relevant information (such as language, which result in wrong hyphenation) or special layout for block or inline elements.
Going this way, the Markdown source document may fulfill the promise:
One source to generate them all.
This project is still work in progress. It is forked from https://github.com/ousia/from-pandoc-to-context, which provides a great basis but lacks a few features I need for my work.
The following features were added to the original version:
- Separate Table of Contents, Figures and Tables (TOC, TOF and TOT)
- Tables
- Images
- Unnumbered headings
- (Fixes wherever applicable)
The environment file from this project (pandoc-xhtml.tex
) is licensed to the public under the GNU General Public License; either version 2, or (at your option) any later version.
This work was based on the extraordinary achievements of John MacFarlane (Pandoc) and Hans Hagen (ConTeXt) as well of course as Pablo Rodríguez (the base implementation of pandoc-xhtml).