This note demonstrates some of what Markdown is capable of doing.

You can write regular markdown here and Jekyll will automatically convert it to a nice webpage. I strongly encourage you to take 5 minutes to learn how to write in markdown- it’ll teach you how to transform regular text into bold/italics/headings/tables/etc.

An exhibit of Markdown

Note: Feel free to play with this page. Unlike regular notes, this doesn’t automatically save itself.

Basic formatting

Paragraphs can be written like so. A paragraph is the basic block of Markdown. A paragraph is what text will turn into when there is no reason it should become anything else.

Paragraphs must be separated by a blank line. Basic formatting of italics and bold is supported. This can be nested like so.

Emoji

You can use emoji here: 😄

Headings

There are six levels of headings. They correspond with the six levels of HTML headings. You’ve probably noticed them already in the page. Each level down uses one more hash character.

Headings can contain formatting, even contain inline code

Of course, demonstrating what headings look like messes up the structure of the page.

I don’t recommend using more than three or four levels of headings here, because, when you’re smallest heading isn’t too small, and you’re largest heading isn’t too big, and you want each size up to look noticeably larger and more important, there there are only so many sizes that you can use.

URLs

URLs can be made in a handful of ways:

Images

How about a yummy crepe?

Crepe{.:block_center}

It can also be centered!

<img src=https://s3-media3.fl.yelpcdn.com/bphoto/cQ1Yoa75m2yUFFbY2xwuqw/348s.jpg/>

Horizontal rule

A horizontal rule is a line that goes across the middle of the page.


It’s sometimes handy for breaking things up.

Table

Here’s a useless table:

Number Next number Previous number
Five 😄 $^b$
Ten1 Eleven Nine
https://www.google.com Eight example
Plum $ \lambda^a $ \(O_3 + C_2H_2 \rightarrow\)

In table:

Decision Point Design Decision
Authoritative DNS MX Record <Mail Gateway>

List

Ordered list

  1. Item 1
  2. A second item
  3. Number 3

Note: the fourth item uses the Unicode character for Roman numeral four.

Unordered list

  • An item
  • Another item
  • Yet another item
  • And there’s more…

Block

Quote

Here is a quote. What this is should be self explanatory. Quotes are automatically indented when they are used.

Code

Code blocks are very useful for developers and other people who look at code or other things that are written in plain text. As you can see, it uses a fixed-width font.

You can also make inline code to add code into other things.

Here’s a code chunk:

var foo = function(x) {
  return(x + 5);
}
foo(3)

And here is the same code with syntax highlighting:

var foo = function(x) {
  return(x + 5);
}
foo(3)
void insert(const char* key) {
    if (*key == '\0') {
        finish = true;
    } else {
        int idx = *key - 'A';
        if (!next[idx])
            next[idx] = new Trie();
        next[idx]->insert(key + 1);
    }
}
<html>
  <head> </head>
  <body>
    <p>Hello, World!</p>
  </body>
</html>

Jekyll also offers powerful support for code snippets:

def print_hi(name)
puts "Hi, #{name}"
end
print_hi('Tom')  #=> prints 'Hi, Tom' to STDOUT.
def print_hi(name)
puts "Hi, #{name}"
end
print_hi('Tom')  #=> prints 'Hi, Tom' to STDOUT.

And here is the same code yet again but with line numbers:

1
2
3
4
var foo = function(x) {
  return(x + 5);
}
foo(3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import networkx as nx
from collections import Counter

diagrams = defaultdict(list)
particle_counts = defaultdict(Counter)

for (a, b), neighbors in common_neighbors.items():
    # Build up the graph of connections between the
    # common neighbors of a and b.
    g = nx.Graph()
    for i in neighbors:
        for j in set(nl.point_indices[
            nl.query_point_indices == i]).intersection(neighbors):
            g.add_edge(i, j)
    # Define the identifiers for a CNA diagram:
    if key in diagrams:
        isomorphs = [nx.is_isomorphic(g, h) for h in diagrams[key]]
        if any(isomorphs):
            idx = isomorphs.index(True)
        else:
            diagrams[key].append(g)
            idx = diagrams[key].index(g)
    else:
        diagrams[key].append(g)
        idx = diagrams[key].index(g)
    cna_signature = key + (idx,)
    particle_counts[a].update([cna_signature])
+        'user_exists' => 'SELECT EXISTS(SELECT 1 FROM table ',
+        'get_users' => 'SELECT split_part(username, \'@\', 1) FROM tab',
+        'get_password_hash_for_user' => 'SELEC',
+        'set_password_hash_for_user' => 'UP',

Reload the Nginx:

sudo nginx -s reload

Mathjax

\LaTeX{}

` a * b = c ^ b `

2^{\frac{n-1}{3}}

\[\int_a^b f(x)\,dx.\]

inline equation $ a+b=c $ test.

Video

Local video file (“.webm”)

Video with custom thumbnail:

Audio

HTML5 Audio Formats Test is here

“MP3” file (“.mp3”) :

WebM Audio (“.weba”):

FLAC file (“.flac”) :

  1. Footnote content