# Introduction

## Many Flavours of Markdown

There are many variants of Markdown formats, and each processor may support a range of extensions, and interpret the Markdown specifications in somwhat different ways. The main formats include:

## Markdown Processors

There are also many different Markdown processors, each with their own quirks. See the section [Other Markdown Processors and Formats] for details.

I selected Pandoc as my markdown converter, because it supports tables and a number of advanced features, as well as the generation of pdf files via Latex, and a number of other file formats as well. I wanted to use a single processor as much as possible to avoid issues with differences in markdown syntax and features supported by different processors.

# Markdown Formatting Cheat Sheet

See Pandoc Documentation for the detailed users guide for Pandoc Markdown formats and processing.

## Paragraphs

• A paragraph is one or more lines of text followed by one or more blank lines.
• Newlines are treated as spaces
• For a hard line break, put either two or more spaces or a backslash at the end of a line.

• Pandoc requires a blank line before a header. (Markdown does not)

+———————+———————+ | Markdown | Result | +=====================+=====================+ | | | | | | | | | |A level-one header | A level-one header | |================== | ================== | | | | +———————+———————+ | | | | | | | | |


+———————+———————+

+————————————+———————————-+ | Markdown | Result | +====================================+==================================+ | # A level-one header # | # A level-one header # | +————————————+———————————-+ | ## A level-two header ## | ## A level-two header ## | +————————————+———————————-+ | ### A level-three header ### | ### A level-three header ### | +————————————+———————————-+ | #### A level-four header #### | #### A level-four header #### | +————————————+———————————-+ | ##### A level-five header ##### | ##### A level-five header ##### | +————————————+———————————-+ | ###### A level-six header ###### | ###### A level-six header ###### | +————————————+———————————-+ | Regular Body Test | Regular Body Text | +————————————+———————————-+

Headers can be assigned attributes using this syntax at the end of the line containing the header text: {#identifier .class .class key=value key=value}

Indentifers can be used to provide links from one section of a document to another. For example, we defined an identifer: # Markdown Formatting Cheat Sheet # {#formatting-cheatsheet} so:

+—————————————————————————————+————————————————————————————-+ | Markdown | Result | +=======================================================================================+=====================================================================================+ | See the section [Markdown Formatting Cheat Sheet](#formatting-cheatsheet) | See the section Markdown Formatting Cheat Sheet | +—————————————————————————————+————————————————————————————-+ | See the section [Markdown Formatting Cheat Sheet] | See the section [Markdown Formatting Cheat Sheet] | +—————————————————————————————+————————————————————————————-+ | [See the section Markdown Formatting Cheat Sheet][Markdown Formatting Cheat Sheet] | [See the section Markdown Formatting Cheat Sheet][Markdown Formatting Cheat Sheet] | +—————————————————————————————+————————————————————————————-+

Table: Using Identifiers to link to sections within a document

The latter rows work becuase Pandoc behaves as if reference links have been defined for each header. See the section on [Links] for details of reference links

## In Line Formatting

MarkdownResult
_emphasis_ or *emphasis*emphasis or emphasis
__strong emphasis__ or **strong emphasis**strong emphasis or strong emphasis
~~strikeout~~strikeout
H~2~O - subscriptH~2~O - subscript
2^10^ - superscript2^10^ - superscript
verbatim text, not formattedverbatim text, not formatted
Regular Body TextRegular body text

Table: Basic Text Formatting

• Pandoc does not treat a _ surrounded by alphanumeric characters as an emphasis marker. If you want to emphasise part of a work use * instead

• A \ will cause the following character to be treated literally

• A backslash-escaped space is parsed as a nonbreaking space

• If a verbatim text includes a backtick, use double backticks:

• The verbatim rule is that “a verbatim span starts with a string of consecutive backticks (optionally followed by a space) and ends with a string of the same number of backticks (optionally preceded by a space).”

# Other Markdown Processors and Formats

There are many flavours of Markdown, each with its own characteristics. My requirements included the ability to support tables, and the ability to generate PDF files as well as html.

Major Markdown processors, and the variants of Markdown they support include:

1. Here is the footnote. ↩︎

2. Here’s one with multiple blocks.

Subsequent paragraphs are indented to show that they belong to the previous footnote.

The whole paragraph can be indented, or just the first line. In this way, multi-paragraph footnotes work like multi-paragraph list items. ↩︎