Markdown provides a very simple but somewhat limited syntax for writing documents.


Paragraphs:

Paragraphs are separated by one or more blank lines. To force a <br/> end a line with two spaces and a line return.

Inline HTML

Any html tag can be used almost anywhere within a markdown page. Mardown syntax is not parsed in between html tags. Span elements can be used anywhere <span>, <cite>, etc. Ampersand is special, if it is used in an html construct such as &copy; ==> copyright symbol it is interpreted as such. If it is not used in an html construct like, "you & me" it is converted to &amp; The less than bracket < is dealt with the same as the ampersand is.

Headers

Headers can be done with the html tags (<H1/>) or they can be done wiki style (## Headline). Up to six levels of header can be used.

Escaping

Any punctuation can be escaped using the ‘' character.

Subscripts & Superscripts

Surround a superscript with ^ and surround a subscript with ~ H~2~0 and 2^10^=1024 become H20 and 210=1024

Blockquotes

Things can be block quoted by prefixing every line in the block with ‘> ‘.

This is a block quoted chunk of text

Markdown allows you to only use the ‘> ‘ on the first line in a paragraph. Also block quotes can be nested such as in email:

Imagine this part of text is an email that somebody sent.

Now imagine that this text is the reply to that email.

Also markdown can be used within a blockquote:

  1. A list element
  2. Another list element

Lists

Unordered lists use asterisks, pluses or hyphens as list markers:

  • element 1
  • element 2

Ordered lists use ‘(1)’, ‘1)’, ‘1.’ ‘i.’, or ‘#.’. Only the first marker in a list is significant. Use a number (such as ‘3.’) to start a list from that number. Otherwise you can use ‘#.’ for the first marker and the rest of them to get the default numbering scheme.

  1. the first element is listed as the third
  2. the second element

Other paragraphs, blockquotes and such can be nested within a list by indenting the constructs so they line up with the first character of text in the list element. Also lists can be nested by lining up the nested list with the first line of text in the list:

  1. element one
  2. element two
  3. element one of a nested unordered list
  4. element three

Code blocks

Preformatted code blocks can be done using the <pre> and <code> tags in html:

this <pre><code>some code</pre></code> becomes:

some code

Or using markdown syntax you can indent a paragraph with 4 spaces:

this is a pre-formatted code block.

Code can be added inline using the backtick character ‘ ` ‘ (usually found on the same key as tilde ‘ ~ ‘).

` This produces ` => this

Horizontal Rules

Three or more asterisks or hyphens or underscores can be used to create a line accross the page.

Emphasis

Emphasis is generated by surrounding text with either asterisks or underscores. Single asterisk/underscore creates italics and double asterisk/undecscores create bold.

Tables

Simple table looks like this:

  Right     Left     Center     Default
-------     ------ ----------   -------
     12     12        12            12
    123     123       123          123
      1     1          1             1

Table:  Demonstration of simple table syntax.

which becomes:

Right Left Center Default
12 12 12 12
123 123 123 123
1 1 1 1

Table: Demonstration of simple table syntax.

As you can see, table alignments depend on whether the title is left, right, center, or not aligned to the dashed line below. The table must be ended with a blank line (i.e. the line between the table and the caption in the above example). The caption is optional and must start with ‘Table:’. Column headers can be omitted if no names are needed, or multiple line headers can be used like this:

-------------------------------------------------------------
 Centered   Default           Right Left
  Header    Aligned         Aligned Aligned
----------- ------- --------------- -------------------------
   First    row                12.0 Example of a row that
                                    spans multiple lines.

  Second    row                 5.0 Here's another one. Note
                                    the blank line between
                                    rows.
-------------------------------------------------------------

Table: Here's the caption. It, too, may span
multiple lines.

becomes:

Centered Header Default Aligned Right Aligned Left Aligned
First row 12.0 Example of a row that spans multiple lines.
Second row 5.0 Here’s another one. Note the blank line between rows.

Table: Here’s the caption. It, too, may span multiple lines.

[archives] [tags]

About this Site |  Pelican |  Twitter Bootstrap |  Tag Cloud |  Lightbox2 | 

Git Logs:  escadrille  blog  music 

Last Updated: 2018-02-28 21:06 Powered by pain and suffering, reading, beer and the sun. Curtis Sand, 2015. Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Curtis Sand and Quizzical Silicon with appropriate and specific direction to the original content. -- © Curtis Sand

" "