If you need to convert files from one markup format into another, pandoc is your swiss-army knife. Pandoc can convert between the following formats:

(← = conversion from; → = conversion to; ↔︎ = conversion from and to)

Lightweight markup formats
↔︎ Markdown (including CommonMark and GitHub-flavored Markdown)
↔︎ reStructuredText
→ AsciiDoc
↔︎ Emacs Org-Mode
↔︎ Emacs Muse
↔︎ Textile
← txt2tags
HTML formats
↔︎ (X)HTML 4
↔︎ HTML5
Ebooks
↔︎ EPUB version 2 or 3
↔︎ FictionBook2
Documentation formats
→ GNU TexInfo
↔︎ Haddock markup
Roff formats
↔︎ roff man
→ roff ms
TeX formats
↔︎ LaTeX
→ ConTeXt
XML formats
↔︎ DocBook version 4 or 5
↔︎ JATS
→ TEI Simple
Outline formats
↔︎ OPML
Bibliography formats
← BibTeX
← BibLaTeX
↔︎ CSL JSON
↔︎ CSL YAML
Word processor formats
↔︎ Microsoft Word docx
↔︎ OpenOffice/LibreOffice ODT
→ OpenDocument XML
→ Microsoft PowerPoint
Interactive notebook formats
↔︎ Jupyter notebook (ipynb)
Page layout formats
→ InDesign ICML
Wiki markup formats
↔︎ MediaWiki markup
↔︎ DokuWiki markup
← TikiWiki markup
← TWiki markup
← Vimwiki markup
→ XWiki markup
→ ZimWiki markup
↔︎ Jira wiki markup
Slide show formats
→ LaTeX Beamer
→ Slidy
→ reveal.js
→ Slideous
→ S5
→ DZSlides
Data formats
← CSV tables
Custom formats
→ custom writers can be written in lua.
PDF
→ via pdflatex, lualatex, xelatex, latexmk, tectonic, wkhtmltopdf, weasyprint, prince, context, or pdfroff.

Source: Pandoc – About pandoc

I have been looking for an easy way to generate presentations or slide decks. I am pretty happy with the system I have now, which combines These tools make it possible to create well organized. News and feature lists of Linux and BSD distributions.

Let us know if you liked the post. That’s the only way we can improve.

We at Data In Motion Consulting GmbH are currently working at the preparation of a course, so we came across to the need of making some presentations.

I, personally, as coming from an academic environment, was used to prepare my slides using LaTeX. Its beamer package, in particular, is quite famous for making presentations, as it comes with a lot of different and elegant styles.

The only problem I had with LaTeX is that sometimes the syntax can be quite hard to master, and you could end up spending a lot of time rendering things exactly how you wanted to.

In these two years as a software developer, I became quite familiar with Markdown, instead, which has, on the contrary, a pretty straightforward syntax and allows you to easily document your code and prepare notes. I am quite found of Typora as Markdown editor, as it is very intuitive to use, and provides a lot of cool functionalities.

Among them, one over all grabbed my attention: the possibility to directly convert Markdown into LaTeX!

So I started experimenting a bit, and I wanted to share with you what I found out, in the hope that it could be useful to someone else as well.

First of all, to be able to use some of the Typora exports functionalities, including the LaTeX one, you need Pandoc. This is the tool which does the actual conversion work under the hood. It allows you to convert a wide variety of formats into other ones.

Once you have Pandoc installed, you can simply write your markdown document in Typora, and then export it in LaTeX.

This will result in a .tex file, that you can easily convert to a PDF with tools like pdflatex. However, this does not produce a slide-like document, but rather a standard LaTeX one.

Pandoc Beamer

What I needed, instead, was to be able to convert my markdown document into a .tex file yes, but a .tex file which made use of the beamer package. I went a bit through the Pandoc documentation and I found out that there is actually the possibility to convert markdown to beamer. The only thing that you need to do is to specify the target format when invoking Pandoc from the command line.

And that's it! This takes your markdown input file (test.md), convert it to LaTeX beamer, and produces a PDF output file (out.pdf).

If you want to have more control over the output, Pandoc also offers the possibility to produce the intermediate .tex file first, so you can add customizations of your choice before actually convert it to a PDF. Just use, instead:

2
4
setbeamertemplate{page number inhead/foot}[framenumber]
logo{includegraphics[height=0.8cm]{../Logo_DIMC.png}vspace{220pt}}
usecolortheme[named=capri]{structure}

If you are not familiar with the LaTeX syntax do not worry. Just google what you want to achieve and, as always, there would be someone else who tried that first and found a working solution!

In my example here, I am not doing anything too fancy. I am just setting the slide number to be shown in the presentation, together with a logo image to be displayed in the title slide, and I am changing the shadow of blue for the theme. To compile Pandoc using a custom .tex file, just type:

Pandoc Beamer 2

2
4
#!/bin/sh
pandoc--to=beamer--include-in-header=./mystyle.tex--standalone--output=out.tex test.md

and then, from your command line, just execute (all in the same command):