-
Notifications
You must be signed in to change notification settings - Fork 0
/
markdown_tutorial.txt
169 lines (109 loc) · 3.63 KB
/
markdown_tutorial.txt
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
Markdown tutorial
=================
[[Parent]]: markdown_syntax.txt
Here we provide a brief tutorial to the Markdown syntax which is the basis on which Remark syntax has been built. We provide an external link to complete documentation below.
A complete syntax documentation is given in [here][Markdown_Syntax].
[Markdown_Syntax]: http://daringfireball.net/projects/markdown/syntax
Markdown syntax
---------------
### Normal text
[[Example]]:
Once upon a time there was an apple-worm...
It was a very green apple-worm.
Its home was built into a red apple.
### Emphasis
[[Example]]:
It was a _very_ green apple-worm.
It was a __very__ green apple-worm.
It was a ___very___ green apple-worm.
### Headings
[[Example]]:
Level 1
=======
Level 2
-------
### Level 3
#### Level 4
### Unordered lists
[[Example]]:
Things to buy:
* apples
* royal gala for john
* red delicious for jane
* carrots
* milk
### Ordered lists
[[Example]]:
How to cook potatos:
1. Heat water to the boiling point.
5. Put water into a kettle.
3. Put the kettle on the stove.
6. Turn on the heat.
7. Wait until the water boils.
2. Put potatos into the water.
3. Decrease the heat somewhat.
* Be careful not to touch the hot stove!
* About 80% heat is fine.
3. Wait for 30 minutes.
11. Turn off the heat.
10. Pour the water out of the kettle.
### Verbatim content
[[Example]]:
Indented text.
In Remark, the indentation is used invoke the indentation macro, which defaults to the [Verbatim][VerbatimMacro] macro.
[VerbatimMacro]: [[Ref]]: Verbatim_Macro.txt
### Tables
[[Example]]:
First Header | Second Header
------------- | -------------
Content Cell | Content Cell
Content Cell | Content Cell
### Definition lists
[[Example]]:
Apple
: Pomaceous fruit of plants of the genus Malus in
the family Rosaceae.
: A company.
Orange
: The fruit of an evergreen tree of the genus Citrus.
### Punctuation
[[Example]]:
Input | Output | Html
-------------|------------|-------------------------
`'apple'` | 'apple' | `‘apple’`
`"apple"` | "apple" | `“apple”`
`apple...` | apple... | `apple…`
`pages 2--5` | pages 2--5 | `pages 2–5`
`ab --- cd` | ab --- cd | `ab — cd`
### Links in Markdown
[[Example]]:
[Remark syntax][]
[Indirect reference][Remark syntax]
[Indirect reference with tool-tip][IndirectTip]
[Direct reference](remark_syntax.htm)
[Direct reference with tool-tip](remark_syntax.htm "Tool-tip B")
[Remark syntax]: remark_syntax.htm
[IndirectTip]: remark_syntax.htm "Tool-tip A"
### Images in Markdown
[[Example]]:
![Colors in HSV space][Image]
![Colors in HSV space][ImageTip]
![Colors in HSV space]([[Ref: hsv.png]])
![Colors in HSV space](inexistent.png "Tool-tip B")
[Image]: [[Ref: hsv.png]]
[ImageTip]: [[Ref: hsv.png]] "Tool-tip A"
### Links in Remark
While the Markdown linking mechanism is fine (and required) for external links, you will want to use the Remark linking mechanism for links internal to the documentation. This is because it is able to automatically fetch information about the target file, helping to keep the documentation in sync.
[[Example]]:
[[Link: remark_syntax.txt]]
[[FileLink: remark_syntax.txt]]
[[DirectoryLink: remark_syntax.txt]]
When you need to give links specific names, use the following
syntax:
[[Example]]:
[Remark syntax][2]
[2]: [[Ref: remark_syntax.txt]]
Remark linking relies on the [file searching algorithm][file-search], which
is important to make the documentation robust to changes
in the directory structure.
[file-search]: [[Ref: file_searching_algorithm.txt]]