Markdown Cheatsheet

Song Jiaming | 29 Oct 2017

Responsive image

This is a summary of useful syntax (supported by this blog) to write Markdown :smile:

1. Headers

#: h1 header, ##: h2 header, …,#####: h5 header, ######: h6 header

2. Emphasis

  • Italics: *asterisk* - asterisk, or _underscore_ - underscore
  • Bold: **asterisks** - asterisks or __underscores__ - underscores
  • Strikethrough: ~~tildes~~ - tildes
  • Highlight or Inline code: `` which highlight text like the aboves did.

3. Lists

  • Ordered list:
    1. First item 1.
    2. Second item 2.
    3. Third item 3.
  • Unordered lists:
    • You can use asterisk *
    • You can use minus -
    • You can use plus +

Sublists

+ Normal lists with
    * `Tap` to create sublist
    - any combination works
  • Normal lists with
    • Tap to create sublist
    • any combination works
  • You can even have links: [Google](http://www.google.com): Google
  • or just normal link: http://www.google.com

5. Images

![Markdown Logo](picture_link.jpg)

Markdown Logo

6. Code and Syntax Highlighting__

  • Inline code (same as highlight):var example = true, use `
  • This is a whole block code: Use ```
    if (isAwesome){
    return true
    }
    
  • This is a whole block code with language specified:
    E.g. Use ```python
    for i in range(10):
    print("hello world")
    

7. Tables

| Right-Aligned | Center   | Left-Aligned |
| ------------: | :------: | :--------    |
| Apple         | Price    | $1600        |
| Pear          | Cost     |   $12        |
| Banana        | Profit   |    $1        |
Right-Aligned Center Left-Aligned
Apple Price $1600
Pear Cost $12
Banana Profit $1

8. Blockquotes or indentation

> First indentation
>> Further indentation

First indentation

Further indentation

9. Math Environment

Inline math: \\(\frac{\pi}{2}\\),

  • This displays as \(\frac{\pi}{2}\)

or: $\frac{x+y}{x^{2}}$,

  • This displays as $\frac{x+y}{x^{2}}$

Alternatively, math can be written on its own line:

$$F(\omega) = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^{\infty} f(t) \, e^{ - i \omega t}dt$$

\\[\int_0^1 f(t) \mathrm{d}t\\]

\\[\sum_j \gamma_j^2/d_j\\]

\[\int_0^1 f(t) \mathrm{d}t\]

\[\sum_j \gamma_j^2/d_j\]

Coloring in math environment

Code $\bbox[lightgreen]{\frac{1}{2}}$
Gives $\bbox[lightgreen]{\frac{1}{2}}$

Some special symbols that can just be copied used as text:

  • arrows: →, ⇒, ⇔, ↔, ↓, ↑
  • equations: ≤, ∈, ≡, ⊕, •
  • logic: ∀, ∃, ∇
  • letters: β, η, λ, Ω, 𝛿

For more ‘copy and paste’ math symbols , vistit http://math.typeit.org/

10. Horizontal Rule

Three or more Hyphens --- , Asterisks ***, Underscores ___

11. Task list

1. [x] This is a complete item
2. [x] This is a complete item
3. [ ] this is a complete item
    - [ ] this is an incomplete item
    - [ ] this is an incomplete item
  1. This is a complete item
  2. This is a complete item
  3. this is a complete item
    • this is an incomplete item
    • this is an incomplete item

12. Emoji

Emoji shows up when :tada: -> :tada: , :+1: -> :+1: , :heart: -> :heart: ,etc



References

  1. Markdown Cheetsheet
  2. Sublime Markdown Cheetsheet