FOSSPicks

Text processor

pandoc 3.1

While we're in the realm of text processing, there's one tool above all others that writers turn to when they have to convert documentation in one format to documentation in another. That's pandoc. Pandoc has been around since 2006 and has just celebrated the major milestone release of 3.0, formalizing more than five years of development work. Pandoc is the text equivalent to FFmpeg, capable not just of converting a huge number of input formats to a huge number of output formats, but also transforming the text on its way through its various processors. It can convert between Markdown formats, HTML, LaTeX and DOCX, and output to PDF while transforming tables, definition lists, footnotes, and even mathematical and R notation. We used it extensively when converting magazine articles in XML to ePub.

What makes pandoc isn't so much the input and output formats it supports, but the way you can finely control how the conversion operates, often iterating over finer points in substantial sets of documentation that might otherwise take considerable effort to convert any other way. This power is thanks to what pandoc calls filters, a program module that can modify the text as it passes through. Many are included, and you can easily write your own using JSON or Lua. But the big change for this release is how pandoc runs, because you now have a choice in how you access its functionality, either using a traditional command-line tool, as a server, or via a library. This makes it easier to incorporate into whatever system you use to translate your docs. It can even be used as an interpreter, like Python, so you can quickly check command-processing effects without editing and running a script. This is a great way to get started if you've ever been put off by pandoc's complexity and definitely worth the time investment.

Project Website

https://pandoc.org/

If you have a set of documentation in one format and you need it in another, pandoc can nearly always get the job done.

TV recorder

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Swiss Army Knife

    Pandoc lets you convert files from one markup format to another at the command line.

  • Pandoc Website

    Build a simple web page in Markdown; then convert it to HTML at the command line.

  • Tutorials – Markdown

    Create attractive and structured documents from the comfort of your text editor – and convert them to a huge array of formats.

  • Dillinger: Markdown Editor Done Right
  • KiCad

    KiCad helps you design printed circuit boards with up to 32 layers, checks for optimal placement, and supplies schematics and assembly diagrams in the popular Gerber format for submission to PCB manufacturers.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News