Do you speak Markdown? It's not a foreign language, but rather a programming language familiar to Data Scientists and Data Analysts. It may not mean anything to you, but you know it without even realizing it. Let's get to know it...
Markdown is used daily by computer practitioners to write text in notebooks, formatting it neatly, or to share pieces of code in discussions with language-specific syntax highlighting. You may say that if it’s reserved for programmers and geeks, what influence does this language have in our lives…
Well, know that it’s integrated, all things considered, into widely-used messaging apps like WhatsApp, Discord, or more professional ones like Slack.
Getting started with Markdown
Let’s go over the basic principles of this language:
To write in **bold**, simply enclose the word or phrase you want to emphasize between two asterisks (**).
For *italics*, just enclose the text in a single asterisk (*). You can also achieve the same formatting using an underscore (_). The choice is yours for this formatting.
Striking through text becomes increasingly easy by enclosing it with two tildes (~~).
It’s rare to add a block quote in a notebook, but it can help to offset the text and highlight a concept or explanation. For a text block, begin your paragraph with a chevron (>). It’s possible to nest block quotes within each other by adding additional chevrons.
Creating a list like the one above is possible using a hyphen (-) or an asterisk (*) at the beginning of each item. But what about formatting code?
To indicate the presence of code (1-2 words, a maximum of one line), you should enclose it with backticks (ˋmy code is hereˋ). I agree it’s not the most accessible punctuation mark on the keyboard, but we had to choose something.
For longer and more extensive code than a simple ˋprint(‘Hello World!’)ˋ, you should triple the backticks before and after your piece of code, specifying the programming language after the first three backticks (python, HTML, Java, …), and the text will magically be colored.
Markdown can do even more things, such as creating a table (drawing it with vertical bars |), adding hyperlinks, footnotes, and more.
It’s also possible to combine Markdown with HTML for endless creativity, and mathematicians are not left behind because you can integrate LaTeX formulas.
Due to its simplicity, you worry less about the appearance of formatting (text font, character size) since there’s only one text font and size (except for titles). Adding titles and subtitles is achievable with the # (you can add as many as you want to nest your titles within an hierarchy).
Where can you write in Markdown?
To conclude, let’s discuss Markdown editors. The editor of choice for Markdown is the notebook, as already explained.
It allows you to link code cells together, explain results, display progress in the notebook, and make it understandable to any user. However, there are also applications that allow you to take notes in Markdown, such as Bear, Typora, iWriter. You can also find editors directly in your browser, like StackEdit, which I used for the screenshots above.
In this type of editor, you have the Markdown code and the text rendering side by side, which is more convenient for practice or reviewing.
By taking special care of your notebook, you make it more shareable and understandable to everyone.
Markdown evolutions and variants
While Markdown is very useful, it can’t completely replace a word processing software. This language has some limitations in terms of functionality, such as tracking changes in the case of revisions by multiple people, annotating a file with footnotes, creating pagination, and most importantly, exporting your creation to a format readable by everyone.
To address these technical shortcomings, other Markdown-based solutions exist. MultiMarkdown (MMD), developed by Fletcher Penney, is an evolution of Markdown. It allows you to start with a plain text file (.txt), written in slightly enhanced Markdown syntax, and obtain the output format you desire (PDF, doc, docx, odt, …). The primary purpose of MMD is export, but it also provides the functionalities mentioned above.
Lastly, let’s deviate a little from Markdown to discuss tracking changes in a .txt document. Whether it’s written in Markdown, MMD, or HTML, it’s essential to have a record of the changes made without having to open all versions. This is what CriticMarkup accomplishes: it’s a language that allows you to note additions, deletions, comments, highlight a sentence, and more in a plain text file (.txt).
CriticMarkup has the unique feature of being human-readable and understandable, and it doesn’t require any special software (other than a text editor) to open the file. I would recommend referring to the project’s GitHub page for more information on the syntax, which, like Markdown, is quite intuitive.
One last word...
Throughout this article, you have started to become familiar with Markdown and have gained a small glimpse of the software solutions for using this language, from the simplest notepad to specialized editors. Subsequently, you have discovered Markdown’s evolutions that offer more editing and export possibilities; these advancements contribute to promoting open-source software: most of the means mentioned only require a text editor.