Marp, the tool that allows us to create presentations in text mode using Markdown

Most of us have had to make a presentation at some point: we have sat before an empty screen of Microsoft Powerpoint, Google Slides or any other similar program and we have started to add the text, and to insert and fit images.

But sometimes that is a waste of time, because it forces us to be copying and pasting content that perhaps we already had perfectly annotated and structuredor in a text document.

Not to mention the feeling of little control we can have trying to lay out the slides with a graphic tool- It is common for the spacing between items to be inconsistent when going from one slide to another.

A cross-platform alternative: Marp

So, for those looking for another way to design presentations, they have a great cross-platform and open source alternative: Marp. Marp allows us write presentations in Markdown format, a markup language (like HTML, but much simpler) that allows us to structure and format a text and, in this case, easily layout our presentation.

What is Markdown, what is it for, and how to use it

Its syntax is based on the most basic 'dialect' of Markdown, known as CommonMark, to which elements of syntax have been added focused on image insertion and element autoscaling, to which is added the option to insert mathematical formulas (in LaTeX format) and emojis.

Finally, to indicate where we want to end a slide and move on to the next, the user will just have to write three scripts in a row.

By default, Marp includes three 'themes' (each with two different color schemes), although a developer can create their own (and some offer them for free download), but we do not need to create a new theme to customize aspects such as background images.

In its older versions, Marp was a stand-alone program with a graphical interface, but the newer versions (known collectively as Marp Next) have been forked in two:

  • Marp for VS Code, a plugin for Microsoft's code editor, with preview panel.

  • Marp CLI, a terminal tool that we can install through NPM.

Living life (almost) without a graphical interface: this is how Linux users who see everything within a console in text mode work

These tools will allow us to convert our texts in Markdown (traditionally with .md format) into files HTML, PDX and PPTX.

For example, the code shown in the image that heads the article includes a header telling Marp to use the 'Lead' color scheme from the 'Gaia' theme, and a certain background image (which can be both on the internet and on our hard drive) using the label "backgroundImage:".

How to export our code to a presentation?

If we are working from Visual Studio Code, just click on the Marp logo that will show the program's interface. In the menu that opens, we will choose the option 'Export ...' and then the chosen format. So:

Screenshot 11

If we are working from a terminal we will have to review the available arguments, but the task can be as simple as writing the following:

marp --pptx