cherrytree icon indicating copy to clipboard operation
cherrytree copied to clipboard

Implement `pandoc` support, rather than a bunch of one-off format translators.

Open DiagonalArg opened this issue 5 years ago • 36 comments

Discussion moved over from Issue #858

Pandoc is a "general markup converter," that covers dozens of formats and supports plugs for new formats, to be written in Lua. The subject came up in the above issue, because of its extensive coverage of various markdown flavors, which can be mixed with LaTeX:

From the man page:

Pandoc's enhanced version of Markdown includes syntax for footnotes, tables, flexible ordered lists, definition lists, fenced code blocks, superscripts and subscripts, strikeout, metadata blocks, automatic tables of contents, embedded LaTeX math, citations, and Markdown inside HTML block elements. (These enhancements ... can be disabled using the markdown_strict input or out‐put format.)

Pandoc runs on both Windows and any unix-like system, where it is in most linux repositories and for MacOS, available both as a package on the pandoc site, and in Homebrew. Many projects supply interfaces between their project and pandoc. For example, Sublime and Atom. There are many more, as this is a well known and heavily used tool. It's the swiss army knife of document conversion.

Pandoc is a free and open-source document converter, widely used as a writing tool (especially by scholars) and as a basis for publishing workflows. It was created by John MacFarlane, a philosophy professor at the University of California, Berkeley. (From Wikipedia.)

If a Cherrytree to/from translator for pandoc were developed, then that Lua script could be included with Cherrytree. With pandoc as an optional dependency, it could become the one tool needed for anything from Makdown + LaTeX to rtf & html to pdf & epub, etc. etc. etc.

Right now would be the time to do it, as it would save the work of writing a markdown translator, while at the same time offering a much more advanced markdown dialect including, for free, LaTeX.

DiagonalArg avatar Jun 05 '20 09:06 DiagonalArg