Pandoc

Markdown Formatting

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.

Hugo's Markdown Extensions

Introduction

This article focuses on markdown as supported by Hugo and Pandoc. Here are a few good Markdown references and tutorials:

Hugo’s Markdown

Hugo uses the GoldMark as it’s default Markdown processor. Goldmark supports the CommonMark standard, along with:

Hugo Goldmark also supports:

Pandoc’s Markdown

See Pandoc’s Markdown for details.

Using ASCIIMath and MathJax

This page tests and documents using MathJax, Latex and AsciiMath with Hugo and markdown.

Getting a Markdown Processor to Ignore Markup

MathJax, AsciiMath, and similar processors use special markup characters in the the html file. Often these characters overlap with markdown’s markup, and the markdown processor will mess things up. There are a number of options:

  • Use the \ backslash, which is markdown’s escape character, to escape characters that would be processed by markdown. See Escaping Characters in markdown

  • Create a simple hugo shortcode which does nothing but pass through text verbatim, bypassing the markdown processor. Here’s an example of AsciiMath using the in (for inline) shortcode: