A few weeks ago I had to submit the contents of a GitHub repository to my teacher for grading. I wanted to use my readme.md-file while my teacher asked for a Word or a PDF document. Then I discovered this amazing program which converts Markdown to any desirable format!
Almost every programmer knows Markdown, right? The Markdown syntax is widely used on GitHub and in readme-files. Markdown was developed by John Gruber and Aaron Swartz as a tool to convert plain text files in the syntactic language with the same name to HTML.
The complete Markdown syntax and more information is available on John Gruber’s website.
As you’ve seen / will see, writing texts with Markdown is pretty easy and structured. It’s quite easy to convert this text into another format than HTML. For that purpose, I’ve found pandoc. Pandoc packages are available for almost every operating system. I recommend adding it to your path if the installer didn’t do that automatically.
It’s quite simple to start using Pandoc. They have some great documentation available on their website and basically all you have to type is the following:
pandoc -o thefileyouwant.ext thefileyouhave.otherext
The output is very clean and structured and the list of supported formats is endless. This way you can write everything in Markdown and convert your text to the desired format afterwards. I hope you’ll enjoy using pandoc as much as I do!