Markdown
2 minute read
Markdown is a lightweight markup language used to create websites and other publications. Based on text, it’s an easy way to format content.
There are multiple “flavors” of Markdown, including:
- CommonMark
- Github-Flavored Markdow (GFM)
- kramdown
- Markown Extra
- MultiMarkdown
- R Markdown
- and more….
Each flavor adds to the basic Markdown capabilities. [MarkdownGuide] provides a reference to the most common Markdown extensions.
In addition, there are multiple Markdown parsers, also called processors, that each vary slightly in the features they support and how they suppot them.
When working with Markdown, take time to learn the flavor and parser that you’re using. Doing so can only help you in the long run.
Here are some useful tools and resources.
Tables
Basics
Tables require at least three lines:
| Name | Description |
|-------|---------------|
| Row 1 | Explanation 1 |
| Row 2 | Explanation 2 |
| Row 3 | Explanation 3 |
Which leads to:
Name | Description |
---|---|
Row 1 | Explanation 1 |
Row 2 | Explanation 2 |
Row 3 | Explanation 3 |
Notes:
-
It’s not strictly necessary (or always practical) to align each column in the source. It’s easier to read (and therefore to maintain), but it’s not necessary.
-
In the separator line, columns must be define using at least three hyphens (
---
).
Column alignment
| Left | Center | Right |
|---------|:-------:|--------:|
| `:---` | `:---:` | `---:` |
| Alpha | Apple | Alpha |
| Beta | Banana | Bravo |
| Gamma | Cherry | Charlie |
Leads to:
Left | Center | Right |
---|---|---|
:--- |
:---: |
---: |
Alpha | Apple | Alpha |
Beta | Banana | Bravo |
Gamma | Cherry | Charlie |
Syntax reference
- Markdown basic syntax reference (Markdown Guide)
- Github Markdown reference: A more complete reference focused on CommonMark/GFM
Converting Markdown
-
GD2md-html is a Chrome extension that converts Google docs to Markdown.
-
Pandoc bills itself as your Swiss Army for converting docs from one format to another.
-
Writage is a Microsoft Word addon that converts DOC files to Markdown. Available for Mac and Windows.