-
Notifications
You must be signed in to change notification settings - Fork 25
A Short Introduction To Markdown Syntax
agalamatis edited this page Sep 5, 2014
·
1 revision
If you really want to dig down into the details I recommend the [verbose syntax description on the Markdown homepage](http://daringfireball.net/projects/markdown/syntax)
What follows is a short intro to Markdown. However, as Markdown was designed to be really easy to learn and to write in, that should cover 95% of what you need to know. To get to know Markdown Syntax I recommend you just copy the Markdown source below and just paste it into my [online preview](http://henkelmann.eu/projects/actuarius/dingus). Markdown source is just plain text, the formatting is based on what is commonly used in plain text emails. Just compare the source with the output and read what it says and you should be a Markdown expert in 10 minutes.
#Headings are surrounded by Hashes# Markdown paragraphs are just consecutive lines of text separated by whitespace. You can use a number of inline formattings, emphasis is surrounded by asterisks or underscores, strong text by double asterisks or double underscores. ##The number of hashes determine the heading level## You can use “forbidden” HTML characters like &, >, <, " and ’, they are escaped automatically. If you need additional HTML formatting you can just embed it into the Markdown source. You can include links [easily](http://example.com “with a title”) or [without a title](http://foo.example.com). If you use links often, [define them once][someid] and reference them by any id. Just add the link definition anywhere, it will be removed from the output: [someid]: http://example.com “You can add a title” You can add a horizontal ruler easily: ******************************************* ##Trailing hashes in a heading are optional If necessary you can even include
whole HTML blocks. Note however that Markdown code is not
evaluated inside HTML blocks, so if you want emphasis, you
have to add it yourself
You can embed verbatim code examples by indenting them by
four spaces or a tab:
//This is verbatim code. Markdown syntax is not
//processed here. However, HTML special chars are
//escaped: < & > " ’
def foo() = Hello World
If you want verbatim code inline in your text
you can surround it with `def backticks():String`
or ``def doubleBackticks() = “To add ` to your code”``
whole HTML blocks. Note however that Markdown code is not
evaluated inside HTML blocks, so if you want emphasis, you
have to add it yourself
- Unordered
- List items
- are started
- by asterisks
//Actuarius now supports fenced code blocks!
System.out.println("Hello World!");