Melroch @ Random

2 February, 2008

Markdown Extra guide

Filed under: Editing — Tags: , — melroch @ 12:56

N.B. Where id appears in this document it should be replaced with a unique identifier string!

Inline elements

Links

There are two ways to make a link:

This is an [inline](http://melroch.se "Optional title") link.

This is an inline link.

This is a [definition][id] link.

Then on its own line anywhere in the text:

[id]: http://melroch.se "Optional title"

This is a definition link.

If you leave the ID empty you can use the linked text as ID:

This is [another][] definition link

[another]: http://melroch.se "Same thing!"

This is another definition link

Automatic links:

<http://melroch.se>

http://melroch.se

<foo@bar.baz>

foo@bar.baz

Images

Images can also be linked in two ways:

![alt text](http://blog.melroch.se/some/path/melrochrandom.png "Optional title")

alt text

![alt text][id]

[id]: http://blog.melroch.se/some/path/melrochrandom.png "Optional title"

alt text

or:

![alt text][]

[alt text]: http://blog.melroch.se/some/path/melrochrandom.png "Optional title"

alt text

Footnotes ( Extra only)

Put a footnote reference somewhere in the document:

There is an orange fruit[^id] in the fridge.

and then the identifier followed by the footnote text in its own paragraph anywhere in the document:

[^id]: Not an orange, but some other fruit of that color.

And the footnotes will be placed in order at the end of the output:

There is an orange fruit1 in the fridge.

N.B. you can only have one reference to each footnote.

Abbreviations ( Extra only)

If you write put a declaration of the form

*[abbr]: definition

anywhere in your text every occurrence of abbr will be wrapped in <abbr> tags and given a title attribute consisting of definition:

<abbr title="definition">abbr</abbr>

E.g.

There is a sharon fruit in the fridge

*[sharon fruit]: an orange colored fruit

There is a sharon fruit in the fridge

Emphasis

<em> tag (usually rendered as italics):

*One asterisk* or _underscore_ before and after the emphasized span.

asterisk or underscore

<strong> tag (usually rendered as bold):

**Two asterisks** or __underscores__ before and after the strong span.

asterisks or underscores

N.B This differs from the common usage in email where _single underscores_ mark underline or ‘italics’ (c.f. how underline was commonly used as handwriting equivalent of italics) and *single asterisks* marks ‘bold’. Even though the traditional handwriting equivalent of bold was double underline I consider this a misfeature of !

Inline code

Enclose in backticks:

Entities like to `&ouml;` make HTML unreadable!

Entities like to &ouml; make HTML unreadable!

Block elements

Paragraph

One or more lines of text, separated by one or more blank lines.

<br /> tag

End a line inside a paragraph with two or more spaces.

Inline HTML

You can use any HTML inside

  • Indent opening tag by no more than three spaces.
  • Inside a list, indent to the same level as the list.

Code blocks

Indent 4 spaces or 1 tab

inside HTML blocks ( Extra only)

<div ="1">
 This text *will* be processed by 
 </div>

This text will be processed by

Blockquotes

Right angles in the left margin, like in email:

> Vides ut alta stet
 > nive candidum Soracte

Vides ut alta stet nive candidum Soracte

Horizontal rules:

At least three astersiks or dashs or underscores with an optional space between with blank lines before and after:

***

---

___

----------------------------

* * * 

- - - 

_ _ _ 







Headers

In this section all headers which illustrate output rather than belong to the structure of this document are shown in blockquotes. The blockquote indicators are of course not part of the output of the header markup!

There are two styles of H1 and H2:

# Header 1 #

or

Header 1
 ========


## Header 2 ##

or

Header 2
 --------

Header 1

or

Header 1

Header 2

or

Header 2

Lower level headers

### Header 3 ###

#### Header 4 ####

##### Header 5 #####

##### Header 6 #####

Header 3

Header 4

Header 5
Header 6

Closing hashes are optional

## Header 2 ##

and

## Header 2

give the same thing.

Header 2

Header ID attribute ( Extra only)

# Header 1 {#header1}

or

Header 2 {#header2}
 --------

Header 1

or

Header 2

Link back to header ( Extra only)

[Link back to header 1](#header1)

Link back to header 1

Lists

Unordered lists

Asterisks, plus signs or dashes:

* Tic    + Tic    - Tic
 * Tac    + Tac    - Tac
 * Toe    + Toe    - Toe
  • Tic
  • Tac
  • Toe

Ordered lists

Ordered or unordered digits followed by a period

1. Tic    1. Tic
 2. Tac    1. Tac
 3. Toe    1. Toe
  1. Tic
  2. Tac
  3. Toe

Definition lists

Term
:   Definition
Term
Definition

Multiple definitions:

Orange
 :   A city in France
 :   A fruit
Orange
A city in France
A fruit

Multiple terms:

Orange
Naranja
Apelsin

The same fruit in three languages

Orange Naranja Apelsin
The same fruit in three languages

Tables ( Extra only)

Header A   | Header B 
 -----------|-----------
 Content 1a | Content 1b
 Content 2a | Content 2b

or:

| Header A   | Header B   | 
 | -----------|------------| 
 | Content 1a | Content 1b | 
 | Content 2a | Content 2b | 
Header A Header B
Content 1a Content 1b
Content 2a Content 2b

Text alignment within columns

Uses the HTML ALIGN attribute

| Unspecified | Left | Center | Right |
 |-------------|:-----|:------:|------:|
 | Number      | 10   | 20     | 30    |
Unspecified Left Center Right
Number 10 20 30

Literal characters

LITERAL CHARACTERS Use backslash escape to insert the following characters literally:

To get Type  
\ \\ backslash
` \` backtick
* \* asterisk
_ \_ underscore
{} \{\} curly braces
[] \[\] square brackets
() \(\) parentheses
# \# hash mark
+ \+ plus sign
- \- minus sign (hyphen)
. \. dot
! \! exclamation mark
: \: colon ( Extra only)
| \| pipe ( Extra only)

\\ \`    \*  \_  \{\} \[\] \(\) \#   \+  \-  \.  \!  \:  \| 

\ ` * _ {} [] () # + - . ! : |


  1. Not an orange, but some other fruit of that color. 

Tags: , ,

Related posts

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

Powered by WordPress

Register Login