Markdown reStructuredText (reST) mixing Cheatsheet

Adapted from Adam Pritchard retrieved here: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet

This is intended as a quick reference and showcase. Compatible with Sphinx RST integration via Python parser.

If you want to try the rendering of your Markdown code you can ever use Atom and it’s markdown-preview extension (CTRL-SHIFT-M to display) or explore http://strapdownjs.com/ in your own browser.

Headers

# H1
## H2
### H3
#### H4
##### H5
###### H6

Alternatively, for H1 and H2, an underline-ish style:

Alt-H1
======

Alt-H2
------

H1

H2

H3

H4

H5
H6

Alternatively, for H1 and H2, an underline-ish style:

Alt-H1

Alt-H2

Emphasis

Emphasis, aka italics, with *asterisks* or _underscores_.

Strong emphasis, aka bold, with **asterisks** or __underscores__.

Strikethrough uses two tildes. ~~Scratch this.~~

Emphasis, aka italics, with asterisks or underscores.

Strong emphasis, aka bold, with asterisks or underscores.

Strikethrough uses two tildes. Scratch this.

Lists

1. First ordered list item
2. Another item
   * Unordered sub-list.
1. Actual numbers don't matter, just that it's a number
   1. Ordered sub-list
4. And another item.


* Unordered list can use asterisks
- Or minuses
+ Or pluses
  1. First ordered list item
  2. Another item
    • Unordered sub-list.
  3. Actual numbers don’t matter, just that it’s a number
    1. Ordered sub-list
  4. And another item.
  • Unordered list can use asterisks
  • Or minuses
  • Or pluses

Horizontal Rule

Three or more...

---

Hyphens

***

Asterisks

___

Underscores

Three or more…


Hyphens


Asterisks


Underscores

Blockquotes

> Blockquotes are very handy in email to emulate reply text.
> This line is part of the same quote.

Quote break.

> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote.
Blockquotes are very handy in email to emulate reply text. This line is part of the same quote.

Quote break.

This is a very long line that will still be quoted properly when it wraps. Oh boy let’s keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can put Markdown into a blockquote.

Code and Syntax Highlighting

Code blocks are part of the Markdown spec.

`Inline `code` has `back-ticks around` it.`

Inline code has back-ticks around it.

Blocks of code are either fenced by lines with 3 back-ticks, or are indented with four spaces. I recommend only using the fenced code blocks.

s = "Python syntax highlighting"
print s

Inline HTML

You can also use raw HTML in your Markdown, and it’ll mostly work pretty well. But it will only be displayed on the website and not on the PDF.

<dl>
  <dt>Definition list</dt>
  <dd>Is something people use sometimes.</dd>

  <dt>Markdown in HTML</dt>
  <dd>Does *not* work **very** well. Use HTML <em>tags</em>.</dd>
</dl>
Definition list
Is something people use sometimes.
Markdown in HTML
Does *not* work **very** well. Use HTML tags.

But another possibility is to use a translater like this one: https://www.browserling.com/tools/html-to-markdown

Images

This wesite require `sphinx-bootstrap-directives` and `m2r` extensions to support image rendering (notably for pdf). Here's our logo (hover to see the title text):

.. image:: images/A3O-FA.png
  :class: img-responsive
  :align: center
  :alt: mockup

This wesite require sphinx-bootstrap-directives and m2r extensions to support image rendering (notably for pdf). Here’s our logo (hover to see the title text):

At3floFabAcademyLogos

Tables

Tables aren’t part of the core Markdown spec, but they are part of m2r extension. They are an easy way of adding tables from this application: https://www.tablesgenerator.com/markdown_tables

Colons can **not** be used to align columns.

| Tables        | Are           | Cool  |
| ------------- | ------------- | ----- |
| col 3 is      | not cheap     | $1600 |
| col 2 is      | sheep         |   $12 |
| zebra stripes | are neat      |    $1 |

There must be at least 3 dashes separating each header cell.
The outer pipes (|) are optional, and you don't need to make the
raw Markdown line up prettily. You can also use inline Markdown.

Markdown | Less | Pretty
--- | --- | ---
*Still* | `renders` | **nicely**
1 | 2 | 3

Colons can not be used to align columns.

Tables Are Cool
col 3 is not cheap $1600
col 2 is sheep $12
zebra stripes are neat $1

There must be at least 3 dashes separating each header cell. The outer pipes (|) are optional, and you don’t need to make the raw Markdown line up prettily. You can also use inline Markdown.

Markdown Less Pretty
Still renders nicely
1 2 3

YouTube Videos

They can’t be added directly but you can add an image with a link to the video like this:

.. raw:: html

  <div style="position: relative; padding-bottom: 56.25%; height: 5; overflow: hidden; max-width: 100%; height: auto;">
      <iframe src="//www.youtube.com/embed/nNzeGittVXw" frameborder="0" allowfullscreen style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe>
  </div>

Source: `www.youtube.com/embed/nNzeGittVXw <www.youtube.com/embed/nNzeGittVXw>`_

Source: www.youtube.com/embed/nNzeGittVXw