How to Create and Run a Presentation from the Linux Command Line

Spread the love

Whenever we think of presentations, the first things that usually come to mind are flashy images or colourful diagrams. But there are times when you just want to quickly convey some information through your presentation, while the overall look and feel takes a back seat.

In Linux, you can quickly create as well as run a presentation through command line. There are multiple ways to achieve this, but in this article, we will focus on the basics of the mdp tool, as well as the features it provides.

Mdp

Mdp is a command-line based markdown presentation tool available for Linux. According to its author, the project started off as a way to learn C programming language and quickly developed into a fully-featured presentation tool.

Download/Install

Run the following commands to download and install mdp on your Debian-based system:

sudo apt-get install git gcc make libncursesw5-dev
git clone https://github.com/visit1985/mdp.git
cd mdp
make
sudo make install

If you’re using any other Linux distribution, head to the project’s GitHub page for instructions on how to download and install mdp on your system.

Usage

Before moving on to a working example, here is some basic information that you should know about mdp:

  • You can switch to the next slide using the Enter, Space, Page Down, j, l, Down Arrow, and Right Arrow keys.
  • To switch to the previous slide, use Backspace, Page Up, h, k, Up Arrow, Left Arrow keys.
  • To quit the presentation, press q
  • To reload, press r
  • To go to the first slide, press Home or g, and to switch to the last slide, press End or G.

As we know that mdp works with markdown files, you will need to create your presentation in .md format, and run it in the following way:

 mdp [your-presentation-name]

For example:

 mdp my-presentation.md

The first slide

Here is how you can enter details like title and author, as well as create underlined, simple, and highlighted text.

%title: Maketecheasier - Mdp
%author: Himanshu
 
-> mdp  A command-line based markdown presentation tool. 
 
This is how it looks:
 
<img class="aligncenter size-full wp-image-112961" title="mdp-first-slide" src="https://www.maketecheasier.com/assets/uploads/2015/02/mdp-first-slide.png" alt="mdp-first-slide">
 
<h3>Multiple slides</h3>
The presentation can be split into multiple slides by using horizontal rules (hr), represented by at least 3 * or - . For example, each of these represents the start of a new slide:
 
<pre class="text">* * *
---
************************
- - -

Multi-level headers and nested lists

Here is how you can insert different levels of headers and nested lists:

-> # multi-level headers and nested lists 
 
This is how it looks:
 
<img class="aligncenter size-full wp-image-112962" title="mdp-multilevel-headers-nested-lists" src="https://www.maketecheasier.com/assets/uploads/2015/02/mdp-multilevel-headers-nested-lists.png" alt="mdp-multilevel-headers-nested-lists">
 
<strong>Note</strong> - A single <br> or ^ in a line indicates mdp to stop the output on that position. This can be used to show bullet points line by line.
 
<h3>Code block formatting</h3>
Code blocks are automatically detected by 4 spaces at the beginning of a line. Here is an example:
 
<pre class="bash">-> # Code block formatting 
    4
    5  int main(void)
    6  {
    7     printf("\nHello World\n");
    8     return 0;
    9  }
 
This example shows inline code: `gcc -Wall helloworld.c -o helloworld`

This is how it looks:

Other important points

  • Backslashes force special markdown characters like *, _, # and > to be printed as normal characters.
  • Quotes are auto-detected by preceding >, while multiple > are interpreted as nested quotes.
  • For more tips, go through the sample.md file that comes along with the mdp source code.

Conclusion

As you’d have observed by now, it’s quick and easy to create a presentation using mdp. Given the fact that it’s open source, you can not only study how it works, but can also extend its feature set. Have you ever used mdp or any other command line presentation tool? How was your experience? Share your thoughts in the comments below.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Sign up for all newsletters.
By signing up, you agree to our Privacy Policy and European users agree to the data transfer policy. We will not share your data and you can unsubscribe at any time. Subscribe


Himanshu Arora

Himanshu Arora is a freelance technical writer by profession but a software programmer and Linux researcher at heart. He covers software tutorials, reviews, tips/tricks, and more. Some of his articles have been featured on IBM developerworks, ComputerWorld, and in Linux Journal.

Comments are closed