-
Notifications
You must be signed in to change notification settings - Fork 0
/
Markdown.html
376 lines (353 loc) · 20 KB
/
Markdown.html
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>**Markdown** Cheat Sheet</title>
<style>
/* From extension vscode.github */
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
.vscode-dark img[src$=\#gh-light-mode-only],
.vscode-light img[src$=\#gh-dark-mode-only],
.vscode-high-contrast:not(.vscode-high-contrast-light) img[src$=\#gh-light-mode-only],
.vscode-high-contrast-light img[src$=\#gh-dark-mode-only] {
display: none;
}
</style>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex/dist/katex.min.css">
<link href="https://cdn.jsdelivr.net/npm/katex-copytex@latest/dist/katex-copytex.min.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/markdown.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/highlight.css">
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif;
font-size: 22px;
line-height: 1.6;
}
</style>
<style>
.task-list-item {
list-style-type: none;
}
.task-list-item-checkbox {
margin-left: -20px;
vertical-align: middle;
pointer-events: none;
}
</style>
<style>
:root {
--color-note: #0969da;
--color-tip: #1a7f37;
--color-warning: #9a6700;
--color-severe: #bc4c00;
--color-caution: #d1242f;
--color-important: #8250df;
}
</style>
<style>
@media (prefers-color-scheme: dark) {
:root {
--color-note: #2f81f7;
--color-tip: #3fb950;
--color-warning: #d29922;
--color-severe: #db6d28;
--color-caution: #f85149;
--color-important: #a371f7;
}
}
</style>
<style>
.markdown-alert {
padding: 0.5rem 1rem;
margin-bottom: 16px;
color: inherit;
border-left: .25em solid #888;
}
.markdown-alert>:first-child {
margin-top: 0
}
.markdown-alert>:last-child {
margin-bottom: 0
}
.markdown-alert .markdown-alert-title {
display: flex;
font-weight: 500;
align-items: center;
line-height: 1
}
.markdown-alert .markdown-alert-title .octicon {
margin-right: 0.5rem;
display: inline-block;
overflow: visible !important;
vertical-align: text-bottom;
fill: currentColor;
}
.markdown-alert.markdown-alert-note {
border-left-color: var(--color-note);
}
.markdown-alert.markdown-alert-note .markdown-alert-title {
color: var(--color-note);
}
.markdown-alert.markdown-alert-important {
border-left-color: var(--color-important);
}
.markdown-alert.markdown-alert-important .markdown-alert-title {
color: var(--color-important);
}
.markdown-alert.markdown-alert-warning {
border-left-color: var(--color-warning);
}
.markdown-alert.markdown-alert-warning .markdown-alert-title {
color: var(--color-warning);
}
.markdown-alert.markdown-alert-tip {
border-left-color: var(--color-tip);
}
.markdown-alert.markdown-alert-tip .markdown-alert-title {
color: var(--color-tip);
}
.markdown-alert.markdown-alert-caution {
border-left-color: var(--color-caution);
}
.markdown-alert.markdown-alert-caution .markdown-alert-title {
color: var(--color-caution);
}
</style>
</head>
<body class="vscode-body vscode-light">
<h1 id="markdown-cheat-sheet"><strong>Markdown</strong> Cheat Sheet</h1>
<h1 id="index">Index</h1>
<ul>
<li><a href="#general-notes"><strong>General Notes</strong></a></li>
<li><a href="#headings"><strong>Headings</strong></a></li>
<li><a href="#heading-2">Heading 2</a>
<ul>
<li><a href="#heading-3">Heading 3</a></li>
</ul>
</li>
<li><a href="#heading-2-1"><strong>Heading 2</strong></a>
<ul>
<li><a href="#heading-3-1"><s>Heading 3</s></a></li>
</ul>
</li>
<li><a href="#text-formatting"><strong>Text Formatting</strong></a></li>
<li><a href="#lists"><strong>Lists</strong></a></li>
<li><a href="#check-lists"><strong>Check-lists</strong></a></li>
<li><a href="#links--urls"><strong>Links / URL's</strong></a></li>
<li><a href="#image--html"><strong>Image & HTML</strong></a></li>
<li><a href="#code-blocks"><strong>Code Blocks</strong></a></li>
<li><a href="#inline-code-block"><strong>Inline Code Block</strong></a></li>
<li><a href="#tables"><strong>Tables</strong></a></li>
<li><a href="#quotes"><strong>Quotes</strong></a></li>
<li><a href="#detail-pane-collapsible"><strong>Detail pane</strong> (collapsible)</a></li>
<li><a href="#link-to-a-section"><strong>Link to a section</strong></a></li>
<li><a href="#mathematical-symbols"><strong>Mathematical Symbols</strong></a></li>
</ul>
<h2 id="general-notes"><strong>General Notes</strong></h2>
<ul>
<li>In most cases, you can use HTML tags to define the style of markdown text.</li>
<li>Listed here are the basic elements of Markdown. <strong>This is not an exhaustive list</strong>.</li>
</ul>
<h2 id="headings"><strong>Headings</strong></h2>
<!-- Ignore the comments -->
<ul>
<li>Default
<h1 id="heading-1">Heading 1</h1>
<h2 id="heading-2">Heading 2</h2>
<h3 id="heading-3">Heading 3</h3>
<h4 id="heading-4">Heading 4</h4>
<h5 id="heading-5">Heading 5</h5>
<h6 id="heading-6">Heading 6</h6>
</li>
<li>With formatting
<h1 id="heading-1-1"><strong>Heading 1</strong></h1>
<h2 id="heading-2-1"><strong>Heading 2</strong></h2>
<h3 id="heading-3-1"><s>Heading 3</s></h3>
</li>
</ul>
<hr>
<h2 id="text-formatting"><strong>Text Formatting</strong></h2>
<ul>
<li>Non-HTML
<ul>
<li><strong>Bold</strong></li>
<li><em>Italics</em></li>
<li><s>Strike-through</s></li>
</ul>
</li>
<li>HTML
<ul>
<li><strong>Bold</strong></li>
<li><em>Italics</em></li>
<li><u>Underlined</u></li>
</ul>
</li>
</ul>
<hr>
<h2 id="lists"><strong>Lists</strong></h2>
<ul>
<li>Unordered (Item 1)</li>
<li>Unordered (Item 2)</li>
<li>Unordered & nested (ordered)
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
</li>
</ul>
<ol>
<li>Ordered (Item 1)</li>
<li>Ordered (Item 2)</li>
<li>Ordered & nested (ordered)
<ol>
<li>Numbered item 1</li>
<li>Numbered item 2</li>
<li>Numbered item 3</li>
</ol>
</li>
<li>Ordered & nested (unordered)
<ul>
<li>Unordered item 1</li>
<li>Unordered item 2</li>
<li>Unordered item 3</li>
</ul>
</li>
</ol>
<hr>
<h2 id="check-lists"><strong>Check-lists</strong></h2>
<ul class="contains-task-list">
<li class="task-list-item enabled"><input class="task-list-item-checkbox" checked=""type="checkbox"> Checked item 1</li>
<li class="task-list-item enabled"><input class="task-list-item-checkbox"type="checkbox"> Unchecked item 2</li>
</ul>
<hr>
<h2 id="links--urls"><strong>Links / URL's</strong></h2>
<p>Link 1 - <a href="https://duckduckgo.com/">DuckDuckGo</a> <br>
Link 2 - <a href="https://github.com/">GitHub</a></p>
<hr>
<h2 id="image--html"><strong>Image & HTML</strong></h2>
<p><img src="file:////mnt/d/serve/Development/Personal/cheat-sheets/res/05-Markdown-Unsplash.png" alt="Image"> <br>
Photo by <a href="https://unsplash.com/@wilstewart3?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Wil Stewart</a> on <a href="https://unsplash.com/images/nature?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a></p>
<hr>
<h2 id="code-blocks"><strong>Code Blocks</strong></h2>
<ul>
<li>
<p>Bash</p>
<pre><code class="language-bash">pacman -Sy
</code></pre>
</li>
<li>
<p>Python</p>
<pre><code class="language-python"><span class="hljs-built_in">print</span>(<span class="hljs-string">'Hello, world!'</span>)
</code></pre>
</li>
<li>
<p>HTML</p>
<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">html</span>></span>
<span class="hljs-tag"><<span class="hljs-name">head</span>></span>
<span class="hljs-tag"><<span class="hljs-name">title</span>></span> HTML in Markdown <span class="hljs-tag"></<span class="hljs-name">title</span>></span>
<span class="hljs-tag"></<span class="hljs-name">head</span>></span>
<span class="hljs-tag"><<span class="hljs-name">body</span>></span>
<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">id</span>=<span class="hljs-string">'main'</span>></span> Hello, world! <span class="hljs-tag"></<span class="hljs-name">div</span>></span>
<span class="hljs-tag"></<span class="hljs-name">body</span>></span>
<span class="hljs-tag"></<span class="hljs-name">html</span>></span>
</code></pre>
</li>
<li>
<p>Difference</p>
<pre><code class="language-diff"><span class="hljs-addition">+ This line was added</span>
<span class="hljs-deletion">- This line was removed</span>
</code></pre>
</li>
</ul>
<hr>
<h2 id="inline-code-block"><strong>Inline Code Block</strong></h2>
<p><code><hr> Everything within a code block is printed as-is on the screen.</code> <br>
<code><br> Hello, World! <br></code></p>
<hr>
<h2 id="tables"><strong>Tables</strong></h2>
<p><strong>Note:</strong></p>
<ul>
<li><strong>:---</strong> <em>means</em> left-align</li>
<li><strong>:---:</strong> <em>means</em> center-align</li>
<li><strong>---:</strong> <em>means</em> right-align</li>
</ul>
<table>
<thead>
<tr>
<th style="text-align:left">Header 1</th>
<th style="text-align:center">Header 2</th>
<th style="text-align:right">Header 3</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">Item 1.1</td>
<td style="text-align:center">Item 1.2</td>
<td style="text-align:right">Item 1.3</td>
</tr>
<tr>
<td style="text-align:left">Item 2.1</td>
<td style="text-align:center">Item 2.2</td>
<td style="text-align:right">Item 2.3</td>
</tr>
<tr>
<td style="text-align:left">Item 3.1</td>
<td style="text-align:center">Item 3.2</td>
<td style="text-align:right">Item 3.3</td>
</tr>
</tbody>
</table>
<hr>
<h2 id="quotes"><strong>Quotes</strong></h2>
<blockquote>
<p>Quote 1</p>
<blockquote>
<p>Quote 2</p>
<blockquote>
<p>Quote 3</p>
<blockquote>
<p>Quote 4</p>
<blockquote>
<p>Quote 5</p>
<blockquote>
<p>Quote 6</p>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<hr>
<h2 id="detail-pane-collapsible"><strong>Detail pane</strong> (collapsible)</h2>
<details>
<summary>Title</summary>
Line 1 <br>
Line 2 <br>
</details>
<hr>
<h2 id="link-to-a-section"><strong>Link to a section</strong></h2>
<ul>
<li>This allows us to create a hyperlink that links to a particular portion of the same document. <br><details>
<summary>Rules</summary>
- The link must start with a #. <br>
- All the words must be in lowercase. <br>
- Use `-` for all delimiters like spaces, symbols, etc.
</details>
</li>
</ul>
<p><a href="#image--html">Image</a> <br></p>
<h2 id="mathematical-symbols"><strong>Mathematical Symbols</strong></h2>
<p>Note: Enclose general expressions with $</p>
<p>Exponent: <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mi>a</mi><mn>2</mn></msup><mo>+</mo><mn>2</mn><mi>b</mi><mo>=</mo><mn>2</mn></mrow><annotation encoding="application/x-tex">a^2 + 2b = 2</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8974em;vertical-align:-0.0833em;"></span><span class="mord"><span class="mord mathnormal">a</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:0.6944em;"></span><span class="mord">2</span><span class="mord mathnormal">b</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">2</span></span></span></span></p>
<p>Comparison: <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>a</mi><mo><</mo><mn>2</mn></mrow><annotation encoding="application/x-tex">a < 2</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.5782em;vertical-align:-0.0391em;"></span><span class="mord mathnormal">a</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel"><</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">2</span></span></span></span> and <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>b</mi><mo>></mo><mn>2</mn></mrow><annotation encoding="application/x-tex">b > 2</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.7335em;vertical-align:-0.0391em;"></span><span class="mord mathnormal">b</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">></span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">2</span></span></span></span></p>
<p>Comparison: <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>c</mi><mo>≤</mo><mn>2</mn></mrow><annotation encoding="application/x-tex">c \leq 2</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.7719em;vertical-align:-0.136em;"></span><span class="mord mathnormal">c</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">≤</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">2</span></span></span></span> and <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>d</mi><mo>≥</mo><mn>2</mn></mrow><annotation encoding="application/x-tex">d \geq 2</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8304em;vertical-align:-0.136em;"></span><span class="mord mathnormal">d</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">≥</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">2</span></span></span></span></p>
<p>Bar: <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>A</mi><mo>⊕</mo><mi>B</mi><mo>=</mo><mi>A</mi><mover accent="true"><mi>B</mi><mo>ˉ</mo></mover><mo>+</mo><mover accent="true"><mi>A</mi><mo>ˉ</mo></mover><mi>B</mi></mrow><annotation encoding="application/x-tex">A ⊕ B = A \bar B + \bar AB</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.7667em;vertical-align:-0.0833em;"></span><span class="mord mathnormal">A</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">⊕</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:0.6833em;"></span><span class="mord mathnormal" style="margin-right:0.05017em;">B</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.9034em;vertical-align:-0.0833em;"></span><span class="mord mathnormal">A</span><span class="mord accent"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8201em;"><span style="top:-3em;"><span class="pstrut" style="height:3em;"></span><span class="mord mathnormal" style="margin-right:0.05017em;">B</span></span><span style="top:-3.2523em;"><span class="pstrut" style="height:3em;"></span><span class="accent-body" style="left:-0.1667em;"><span class="mord">ˉ</span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:0.8201em;"></span><span class="mord accent"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8201em;"><span style="top:-3em;"><span class="pstrut" style="height:3em;"></span><span class="mord mathnormal">A</span></span><span style="top:-3.2523em;"><span class="pstrut" style="height:3em;"></span><span class="accent-body" style="left:-0.1111em;"><span class="mord">ˉ</span></span></span></span></span></span></span><span class="mord mathnormal" style="margin-right:0.05017em;">B</span></span></span></span></p>
<p>Sub-script: <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>c</mi><mn>1</mn></msub><mo>=</mo><mn>2</mn></mrow><annotation encoding="application/x-tex">c_1=2</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.5806em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal">c</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3011em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">1</span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">2</span></span></span></span> and <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>c</mi><mn>2</mn></msub><mo>≤</mo><mn>1</mn></mrow><annotation encoding="application/x-tex">c_2 \leq 1</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.786em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal">c</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3011em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">≤</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">1</span></span></span></span></p>
<p><a href="#markdown-cheat-sheet">Go back to Topic #1</a></p>
<script async src="https://cdn.jsdelivr.net/npm/katex-copytex@latest/dist/katex-copytex.min.js"></script>
</body>
</html>