- 1 Why Markdown / MultiMarkdown
- 2 Markdown Attribute Reference
- 3 This is a top-level headline
- 4 Multimarkdown Extensions
Why Markdown / MultiMarkdown
Reminder. The purpose of the Markdown is use plain text to write content that will become published documents later. That is, headings, bold, italics, tables … whatever all looks like plain text until exported into PDF, HTML, DOC, RTF or whatever.
Markdown Attribute Reference
Emphasis – Bold and Italic
Bold and Italics markup use asterisks: a single asterisk on either side of text makes it italic and a double asterisk makes it bold:
*italics* - italics
**bold** - bold
*em* or _em_ or ful*some*ly -†fulsomely **strong** or __strong__ †- strong ***em and strong*** or ___em and strong___ †-†em and strong
Headers are created with hashmarks, one for each “level” of the header, 1 being the highest, and going up to 5.
# This is a top-level headline
## This is a second-level headline
This is a top-level headline
This is a second-level headline
You can create horizontal rules by using * * * or – - -
Monospaced or Code Styling.
There are two types of monospacing, inline and block.
If you want to put a block of code inline, just surround it with backticks (`). For example:
This is a `cli command` and shows as preformatted text.
For a block of code, or anything that should be “pre-formatted”, just indent the whole block by at least 4 spaces and it will preserve its line breaks, etc.
> > Second paragraph in the blockquote, nested.
> ## This is an h2 in a blockquote
There are two types of linking in Markdown, inline and reference.
An inline link surrounds the linked text in square brackets, immediately followed by a link in parenthesis:
[the text to link](http://where.it.links.to)
A reference link is a way of storing a url outside of your working text, keeping it more readable. You define the link and give it a title like this:
and then reference it in your text with square brackets instead of parentheses, like this:
[text to link][link1]
The title of the link can be anything, usually something easy to remember and short enough to justify using the title instead of the link inline. The actual reference can be stored anywhere outside of other elements; at the top or bottom of the piece, or even right after the paragraph it’s used in.
Unordered lists are created by preceding each line with a “*”, “+” or “-” (which all create an unordered, bullet list) and there must be a space after the character.
* Bullet point 1
* Bullet point 2
Ordered / Numbered Lists
Ordered List )the HTML term) are created by preceding with a digit and a period . Lists can be indented to create sub-items, and ordered and mixed lists can be nested in each other.
1. ordered sub-item
1. second sub-item
Combining Bullets and Numbered Lists.
Markdown is able to comprehend nested lists of bulleted and numbered lists.
* Unordered list item 1. ordered sub-item 1. second sub-item * continues the unordered list
- Unordered list item
- ordered sub-item
- second sub-item
- continues the unordered list
It doesn’t matter which of the unordered list options you use, just keep it consistent. If it’s a numbered list any digit will specify it, and the list will automatically be rendered in order. You don’t have to worry about inserting an item in the middle with the wrong number, Markdown will fix it.
This is where MultiMarkdown support is needed in your application which is an extension of Markdown.
You can create a table using
| | Spanning Header (Two Cells) || Header 1 | Header 2| Header 2 | ------------ | :-----------: | -----------: | Content 1 | *Spanning Cell* || Content 2 | **Cell Bold** | Cell | New section | More | Data | And more | And more | [Prototype table]
This will look like this:
|Spanning Header (Two Cells)|
|Header 1||Header 2||Header 2|
|Content 1||Spanning Cell|
|Content 2||Cell Bold||Cell|
|And more||And more|
into a table
The requirements are:
- There must be at least one | per line
- The second line must contain only |,-,:,., or spaces
- Cell content must be on one line only
- The first line of the table, and the alignment/divider line, must start at the beginning of the line
- Columns are separated by |
- You can use normal Markdown markup within the table cells.
- It is optional whether you have |ís at the beginning and end of lines.
- Cells can be empty.
- To set alignment, you can use a colon to designate left or right alignment, or a colon at each end to designate center alignment, as above. If no colon is present, the default alignment of your system is selected (left in most cases). If you use a period character (.), then char alignment is used – in the future this will allow columns of decimal formatted numbers to be aligned on the decimal character. Browsers do not currently support this feature, so it is somewhat useless at the moment. It could be used in an XSLT stylesheet for other output formats (e.g. LaTeX).
- To indicate that a cell should span multiple columns, there simply add additional pipes (|) at the end of the cell, as shown in the example. If the cell in question is at the end of the row, then of course that means that pipes are not optional at the end of that rowÖ.
Captions are optional, but if present must be at the beginning of the line immediately preceding or following the table, start with [, and end with ]. If you have a caption before and after the table, only the first match will be used.
If you have a caption, you can also have a label, allowing you to create anchors pointing to the table. If there is no label, then the caption acts as the label
You can create multiple†tags within a table by having a single empty line between rows of the table. This allows your CSS to place horizontal borders to emphasize different sections of the table.†If there is no header for the first column, then cells in that column will be treated as headers, and formatted as such.
To create a footnote, enter something like the following:
Here is some text containing a footnote.[^somesamplefootnote] [^somesamplefootnote]: Here is the text of the footnote itself. [somelink]:http://somelink.com
The footnote itself must be at the start of a line, just like links by reference. If you want a footnote to have multiple paragraphs, lists, etc., then the subsequent paragraphs need an extra tab preceding them. You may have to experiment to get this just right, and please let me know of any issues you find.