Markdown

Markdown is a markup language.

Its advantage over HTML is that it allows to format text while keeping the text readable as plain text. It is more easibly readible and writable compered to other markup languages.

On the other hand, it is more human-oriented than computer-oriented so it cannot be parsed as easily as other more structured languages.

Markdown Specification

Markdown has not a strong specification, and it leads to some ambiguities.

Markdown extensions

Markdown extensions:

  • CommonMark
  • John Gruber’s Markdown
  • Pandoc Markdown
  • Quarto Markdown
  • MyST markdown

CommonMark

CommonMark is a markup language based Markdown that formalize its specification. You can read more in the CommonMark official website.

MyST markdown

Markedly Structured Text (MyST) markdown is an extension of CommonMark.

MyST markdown official website

John Gruber’s Markdown

John Gruber’s Markdown is an extension of Markdown aimed to document generation and publishing.

John Gruber’s Markdown website

Pandoc Markdown

Pandoc Markdown is a slightly modified version of John Gruber’s Markdown.

Pandoc can convert to other document formats John Gruber’s Markdown and other Markdown extensions. You can read more on this external link.

Quarto Markdown

Quarto Markdown is an extension on Pandoc Markdown. It is the one used in Quarto publishing system.

Quarto Markdown reference

Markdown Tools

Markdown Editors

Markdown editors featured on this post:

  • Marktext
  • Obsidian
  • Typora
  • Visual Studio Code
  • Notepad++
  • Project Jupyter

Marktext

Marktext is FOSS.

Marktext code repository

Obsidian

Obsidian is one of the most popular markdown editors. It has preview or WYSIWYG capabilities.

Obsidian is proprietary software.

Obisidian official website

Typora

Typora is a desktop application.

StackEdit

StackEdit is an online editor for Markup language.

Visual Studio Code

Visual Studio Code contains extension for markdown file edition.

One of the most popular extensions for this purpose is markdownlint.

markdownlint at Visual Studio Marketplace

Project Jupyter

You can use the Project Jupyter software to generate markdown.

You can export it to PDF from the GUI.

Markdown parser

Markdown parser:

  • Goldmark
  • markdown-it-py

Goldmark

Goldmark is a FOSS markdown parser based compliant with CommonMark extension.

Goldmark code repository

markdown-it-py

markdown-it-py is a Markdown parser for Python.

It is used by the MyST-parser extension of Sphinx.

Markdown document converter

There are tools to convert Markdown documents to other formats like DOCX, PDF or EPUB.

  • Pandoc
  • Quarto

Pandoc with Markdown

Pandoc is able to work with Markdown.

Example:

# Markdown + LaTex to PDF Test using Pandoc

## The actual test

This is a **test** of a *Markdown* file that includes LaTeX formulas and that can be generated as a PDF file.

This is an inline LaTex formula, $E=mc^2$, as you may see.

This is a new line LateX formula:

$\frac{-b \pm \sqrt{b^2 -4ac}}{2a}$

I hope that it works fine.

## Reading this test a PDF

You can run convert a Markdown file containing this code into PDF by typing this on a shell:

```shell
pandoc test.md -o test.pdf
```

You need to have Pandoc installed in your system.

Quarto

Quarto includes tools for document conversion.

Quarto official website

Markdown documentation generator

Examples are:

  • Sphynx

Markdown static document generator

A Markdown static document generator (SDG) generates a website from Markdown code.

Examples are:

  • MkDocs
  • Hugo

You can have a look at generic markup-to-doc tools, also called static document generator.

Markdown Syntax

Referring to a section within the same document

There are basically two ways:

  1. Title
  2. Other sections

Referring to a title within the same document

Markdown creates an anchorage to a title within the document.

[click on this link](#my-multi-word-header)

### My Multi Word Header

Referring to a section different to a title within the same document

You need to use HTML in this case.

[click on this link](#reference)

<a id="reference">Text</a>

The use of attribute “name” instead of “id” comes from older HTML versions, but its use is now deprecated.

You might also be interested in…

External References

Leave a Reply

Your email address will not be published. Required fields are marked *