-
Notifications
You must be signed in to change notification settings - Fork 0
/
README-pandoc-HTML5.html
906 lines (904 loc) · 50.8 KB
/
README-pandoc-HTML5.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
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="generator" content="pandoc">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<meta name="author" content="Kolen Cheung">
<title>Yet Another Markdown Cheatsheet</title>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
div.sourceCode { overflow-x: auto; }
table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
margin: 0; padding: 0; vertical-align: baseline; border: none; }
table.sourceCode { width: 100%; line-height: 100%; }
td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
td.sourceCode { padding-left: 5px; }
code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
code > span.dt { color: #902000; } /* DataType */
code > span.dv { color: #40a070; } /* DecVal */
code > span.bn { color: #40a070; } /* BaseN */
code > span.fl { color: #40a070; } /* Float */
code > span.ch { color: #4070a0; } /* Char */
code > span.st { color: #4070a0; } /* String */
code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
code > span.ot { color: #007020; } /* Other */
code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
code > span.fu { color: #06287e; } /* Function */
code > span.er { color: #ff0000; font-weight: bold; } /* Error */
code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
code > span.cn { color: #880000; } /* Constant */
code > span.sc { color: #4070a0; } /* SpecialChar */
code > span.vs { color: #4070a0; } /* VerbatimString */
code > span.ss { color: #bb6688; } /* SpecialString */
code > span.im { } /* Import */
code > span.va { color: #19177c; } /* Variable */
code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code > span.op { color: #666666; } /* Operator */
code > span.bu { } /* BuiltIn */
code > span.ex { } /* Extension */
code > span.pp { color: #bc7a00; } /* Preprocessor */
code > span.at { color: #7d9029; } /* Attribute */
code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
</style>
<script type="text/x-mathjax-config">
MathJax.Ajax.config.path["Contrib"] = "https://cdn.mathjax.org/mathjax/contrib";
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
MathJax.Hub.Insert(MathJax.InputJax.TeX.Definitions.macros,{
cancel: ["Extension","cancel"],
bcancel: ["Extension","cancel"],
xcancel: ["Extension","cancel"],
cancelto: ["Extension","cancel"]
});
});
MathJax.Hub.Config({
tex2jax: {
inlineMath: [['$','$'], ['\\(','\\)']],
processEscapes: true
},
TeX: {
equationNumbers: { autoNumber: "AMS"},
extensions: ["[Contrib]/physics/physics.js","[Contrib]/siunitx/siunitx.js"]
}
});
</script>
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<header>
<h1 class="title">Yet Another Markdown Cheatsheet</h1>
<h1 class="subtitle">Including MarkDown, MultiMarkdown, pandoc, GFM and LaTeX Math Syntax by MathJax</h1>
<h2 class="author">Kolen Cheung</h2>
</header>
<nav id="TOC">
<ul>
<li><a href="#contents"><span class="toc-section-number">1</span> Contents</a></li>
<li><a href="#introduction"><span class="toc-section-number">2</span> Introduction</a><ul>
<li><a href="#organization"><span class="toc-section-number">2.1</span> Organization</a></li>
</ul></li>
<li><a href="#examples"><span class="toc-section-number">3</span> Examples</a><ul>
<li><a href="#header"><span class="toc-section-number">3.1</span> Header</a><ul>
<li><a href="#header-containing-styling-and-a-link"><span class="toc-section-number">3.1.1</span> Header <em>Containing</em> <strong><em>Styling</em></strong> and a <a href="Https://www.wikipedia.org/">Link</a></a></li>
<li><a href="#identifier"><span class="toc-section-number">3.1.2</span> Header Containing Attributes</a></li>
<li><a href="#header-unnumbered">Header Unnumbered</a></li>
<li><a href="#header-unnumbered-2"><span class="toc-section-number">3.1.3</span> Header Unnumbered 2</a></li>
<li><a href="#auto-cross-reference"><span class="toc-section-number">3.1.4</span> Auto Cross Reference</a></li>
<li><a href="#userdefinedreference"><span class="toc-section-number">3.1.5</span> User defined reference</a></li>
<li><a href="#deeper-levels-of-headers"><span class="toc-section-number">3.1.6</span> Deeper Levels of Headers</a><ul>
<li><a href="#header4"><span class="toc-section-number">3.1.6.1</span> Header4</a><ul>
<li><a href="#header5"><span class="toc-section-number">3.1.6.1.1</span> Header5</a><ul>
<li><a href="#header6"><span class="toc-section-number">3.1.6.1.1.1</span> Header6</a></li>
</ul></li>
</ul></li>
</ul></li>
</ul></li>
<li><a href="#backslash-escapes"><span class="toc-section-number">3.2</span> Backslash Escapes</a></li>
<li><a href="#emphasis"><span class="toc-section-number">3.3</span> Emphasis</a><ul>
<li><a href="#criticmarkup"><span class="toc-section-number">3.3.1</span> CriticMarkup</a></li>
</ul></li>
<li><a href="#horizontal-rules"><span class="toc-section-number">3.4</span> Horizontal Rules</a></li>
<li><a href="#break"><span class="toc-section-number">3.5</span> Break</a></li>
<li><a href="#superscript-subscript"><span class="toc-section-number">3.6</span> Superscript & Subscript</a></li>
<li><a href="#smarty-pants"><span class="toc-section-number">3.7</span> Smarty Pants</a></li>
<li><a href="#abbreviations-php-markdown-extra"><span class="toc-section-number">3.8</span> Abbreviations (PHP Markdown Extra)</a></li>
<li><a href="#lists"><span class="toc-section-number">3.9</span> Lists</a><ul>
<li><a href="#compact-vs-loose-lists"><span class="toc-section-number">3.9.1</span> Compact vs Loose Lists</a><ul>
<li><a href="#compact"><span class="toc-section-number">3.9.1.1</span> Compact</a></li>
<li><a href="#loose"><span class="toc-section-number">3.9.1.2</span> Loose</a></li>
</ul></li>
<li><a href="#ordered-lists"><span class="toc-section-number">3.9.2</span> Ordered Lists</a></li>
<li><a href="#unordered-lists"><span class="toc-section-number">3.9.3</span> Unordered Lists</a></li>
<li><a href="#nested-lists"><span class="toc-section-number">3.9.4</span> Nested Lists</a></li>
<li><a href="#cutoff-a-list"><span class="toc-section-number">3.9.5</span> Cutoff a List</a></li>
<li><a href="#list-item-in-a-block"><span class="toc-section-number">3.9.6</span> List Item in a Block</a></li>
<li><a href="#fancy-lists"><span class="toc-section-number">3.9.7</span> Fancy Lists</a></li>
</ul></li>
<li><a href="#definition-lists"><span class="toc-section-number">3.10</span> Definition Lists</a><ul>
<li><a href="#method-1"><span class="toc-section-number">3.10.1</span> Method 1</a></li>
<li><a href="#method-2"><span class="toc-section-number">3.10.2</span> Method 2</a></li>
</ul></li>
<li><a href="#numbered-example-lists"><span class="toc-section-number">3.11</span> Numbered Example Lists</a></li>
<li><a href="#code"><span class="toc-section-number">3.12</span> Code</a><ul>
<li><a href="#fenced-code-blocks"><span class="toc-section-number">3.12.1</span> Fenced Code Blocks</a><ul>
<li><a href="#method-1-1"><span class="toc-section-number">3.12.1.1</span> Method 1</a></li>
<li><a href="#method-2-1"><span class="toc-section-number">3.12.1.2</span> Method 2</a></li>
<li><a href="#method-3"><span class="toc-section-number">3.12.1.3</span> Method 3</a></li>
</ul></li>
</ul></li>
<li><a href="#block-quotes"><span class="toc-section-number">3.13</span> Block-quotes</a><ul>
<li><a href="#block-quotes-quoting-codes"><span class="toc-section-number">3.13.1</span> Block-quotes Quoting Codes</a></li>
</ul></li>
<li><a href="#line-blocks"><span class="toc-section-number">3.14</span> Line Blocks</a></li>
<li><a href="#tables"><span class="toc-section-number">3.15</span> Tables</a><ul>
<li><a href="#method-1-2"><span class="toc-section-number">3.15.1</span> Method 1</a></li>
<li><a href="#method-2-2"><span class="toc-section-number">3.15.2</span> Method 2</a></li>
<li><a href="#method-3-1"><span class="toc-section-number">3.15.3</span> Method 3</a></li>
<li><a href="#method-4"><span class="toc-section-number">3.15.4</span> Method 4</a></li>
<li><a href="#method-5"><span class="toc-section-number">3.15.5</span> Method 5</a></li>
<li><a href="#method-6"><span class="toc-section-number">3.15.6</span> Method 6</a></li>
</ul></li>
<li><a href="#links"><span class="toc-section-number">3.16</span> Links</a><ul>
<li><a href="#reference-links"><span class="toc-section-number">3.16.1</span> Reference Links</a></li>
</ul></li>
<li><a href="#footnotes"><span class="toc-section-number">3.17</span> Footnotes</a><ul>
<li><a href="#reference-footnotes"><span class="toc-section-number">3.17.1</span> Reference Footnotes</a></li>
<li><a href="#glossaries"><span class="toc-section-number">3.17.2</span> Glossaries</a></li>
<li><a href="#citations"><span class="toc-section-number">3.17.3</span> Citations</a><ul>
<li><a href="#multimarkdown"><span class="toc-section-number">3.17.3.1</span> MultiMarkdown</a></li>
<li><a href="#pandoc"><span class="toc-section-number">3.17.3.2</span> Pandoc</a></li>
</ul></li>
</ul></li>
<li><a href="#images"><span class="toc-section-number">3.18</span> Images</a><ul>
<li><a href="#reference-images"><span class="toc-section-number">3.18.1</span> Reference Images</a></li>
<li><a href="#image-with-links-by-nesting-image-and-link"><span class="toc-section-number">3.18.2</span> Image with Links by Nesting Image and Link</a></li>
<li><a href="#block-level-images"><span class="toc-section-number">3.18.3</span> Block Level Images</a></li>
<li><a href="#html"><span class="toc-section-number">3.18.4</span> HTML</a></li>
<li><a href="#latex"><span class="toc-section-number">3.18.5</span> LaTeX</a></li>
</ul></li>
</ul></li>
<li><a href="#other-syntaxes"><span class="toc-section-number">4</span> Other Syntaxes</a><ul>
<li><a href="#metadata"><span class="toc-section-number">4.1</span> Metadata</a><ul>
<li><a href="#multimarkdown-metadata-block"><span class="toc-section-number">4.1.1</span> MultiMarkdown Metadata Block</a></li>
<li><a href="#pandoc-title-block"><span class="toc-section-number">4.1.2</span> Pandoc Title Block</a></li>
<li><a href="#yaml-metadata-block"><span class="toc-section-number">4.1.3</span> YAML Metadata Block</a></li>
</ul></li>
<li><a href="#toc"><span class="toc-section-number">4.2</span> TOC</a><ul>
<li><a href="#pandoc-1"><span class="toc-section-number">4.2.1</span> Pandoc</a></li>
<li><a href="#multimarkdown-1"><span class="toc-section-number">4.2.2</span> MultiMarkdown</a></li>
<li><a href="#kramdown"><span class="toc-section-number">4.2.3</span> Kramdown</a></li>
</ul></li>
<li><a href="#math"><span class="toc-section-number">4.3</span> Math</a><ul>
<li><a href="#markdown"><span class="toc-section-number">4.3.1</span> Markdown</a></li>
<li><a href="#multimarkdown-and-pandoc"><span class="toc-section-number">4.3.2</span> MultiMarkdown and Pandoc</a><ul>
<li><a href="#multimarkdown-2"><span class="toc-section-number">4.3.2.1</span> MultiMarkdown</a></li>
<li><a href="#pandoc-2"><span class="toc-section-number">4.3.2.2</span> Pandoc</a></li>
</ul></li>
<li><a href="#inline-math"><span class="toc-section-number">4.3.3</span> Inline Math</a></li>
<li><a href="#block-math"><span class="toc-section-number">4.3.4</span> Block Math</a></li>
<li><a href="#other-examples"><span class="toc-section-number">4.3.5</span> Other Examples</a></li>
</ul></li>
<li><a href="#file-transclusion"><span class="toc-section-number">4.4</span> File Transclusion</a></li>
</ul></li>
<li><a href="#references"><span class="toc-section-number">5</span> References</a></li>
</ul>
</nav>
<!-- \begin{comment} -->
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_CHTML-full"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.1.0/styles/default.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.1.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<h1 id="contents"><span class="header-section-number">1</span> Contents</h1>
<p>{:.no_toc}</p>
<ul>
<li>Will be replaced with the ToC, excluding the “Contents” header {:toc}</li>
</ul>
<p>{{TOC}}</p>
<!-- \end{comment} -->
<h1 id="introduction"><span class="header-section-number">2</span> Introduction</h1>
<p><a href="#examples">Examples</a> shows explicit examples for different syntaxes. <a href="#other-syntaxes">Other Syntaxes</a> show the syntaxes that can’t be shown explicitly.</p>
<h2 id="organization"><span class="header-section-number">2.1</span> Organization</h2>
<ul>
<li>Header levels (except possibly the last header level): features in groups</li>
<li>Last header level or a list: different syntaxes</li>
<li>TaskPaper-styled tags to indicate in what favor of Markdown such syntax is supported
<ul>
<li><code>@markdown</code>: supported by original markdown, hence understood to be supported by all variants of markdown</li>
<li><code>@ghpages</code>: GitHub-Favored Markdown, built by kramdown with GFM option. i.e. GitHub Pages’ GitHub-Favored Markdown (not exhaustively tested here. See <a href="http://kramdown.gettalong.org/syntax.html#tables">kramdown’s documentation</a> for other possible syntaxes)</li>
<li><code>@mmd</code>: MultiMarkdown </li>
<li><code>@pandoc</code>: pandoc-favored markdown</li>
<li><code>@phpextra</code>: PHP Markdown Extra (inspired some syntax in pandoc and mmd and gfm, not exhaustively tested here)</li>
</ul></li>
<li>TaskPaper Tags
<ul>
<li><code>@...(partial)</code>: partial supports only</li>
<li><code>@...(+...)</code>: when the extension is used</li>
<li><code>@pandoc(--...)</code>: when the command line argument is used</li>
<li><code>@pandoc(parsed)</code>: not verbatim, but parsed</li>
</ul></li>
</ul>
<p>Note:</p>
<ul>
<li>You might see <code><!-- \begin{comment} -->...<!-- \end{comment} --></code>. This is for mmd to tex to pdf use only. Ignore this.</li>
</ul>
<h1 id="examples"><span class="header-section-number">3</span> Examples</h1>
<h2 id="header"><span class="header-section-number">3.1</span> Header</h2>
<p><span class="citation" data-cites="markdown">@markdown</span></p>
<p>See <a href="#emphasis">Emphasis</a> and <a href="#other-syntaxes">Other Syntaxes</a> to see alternative Setext-style header styles <span class="citation" data-cites="markdown">@markdown</span></p>
<h3 id="header-containing-styling-and-a-link"><span class="header-section-number">3.1.1</span> Header <em>Containing</em> <strong><em>Styling</em></strong> and a <a href="Https://www.wikipedia.org/">Link</a></h3>
<p><span class="citation" data-cites="markdown">@markdown</span></p>
<h3 id="identifier" class="class1" key="value1"><span class="header-section-number">3.1.2</span> Header Containing Attributes</h3>
<p><span class="citation" data-cites="pandoc">@pandoc</span> <span class="citation" data-cites="phpextra">@phpextra</span></p>
<h3 id="header-unnumbered" class="unnumbered">Header Unnumbered</h3>
<p><span class="citation" data-cites="pandoc">@pandoc</span></p>
<h3 id="header-unnumbered-2" class="Unnumbered"><span class="header-section-number">3.1.3</span> Header Unnumbered 2</h3>
<p><span class="citation" data-cites="pandoc">@pandoc</span></p>
<h3 id="auto-cross-reference"><span class="header-section-number">3.1.4</span> Auto Cross Reference</h3>
<ul>
<li><a href="#header">Link to Header</a> <span class="citation" data-cites="pandoc">@pandoc</span> <span class="citation" data-cites="ghpages">@ghpages</span> <span class="citation" data-cites="mmd">@mmd</span></li>
<li><a href="#header">Link to Header</a> <span class="citation" data-cites="pandoc">@pandoc</span> <span class="citation" data-cites="mmd">@mmd</span></li>
<li><a href="#header">Header</a> <span class="citation" data-cites="mmd">@mmd</span> @pandoc</li>
<li><a href="#header">Header</a> <span class="citation" data-cites="mmd">@mmd</span> @pandoc</li>
</ul>
<h3 id="userdefinedreference"><span class="header-section-number">3.1.5</span> User defined reference</h3>
<ul>
<li>[userdefinedreference][] <span class="citation" data-cites="mmd">@mmd</span></li>
<li><a href="#userdefinedreference">Link to userdefinedreference</a> <span class="citation" data-cites="mmd">@mmd</span> <span class="citation" data-cites="pandoc">@pandoc</span>(+mmd_header_identifiers)</li>
<li><a href="#identifier">Link to “Header Containing Attributes”</a> <span class="citation" data-cites="pandoc">@pandoc</span></li>
<li><a href="#identifier">another-link</a> <span class="citation" data-cites="pandoc">@pandoc</span></li>
</ul>
<h3 id="deeper-levels-of-headers"><span class="header-section-number">3.1.6</span> Deeper Levels of Headers</h3>
<h4 id="header4"><span class="header-section-number">3.1.6.1</span> Header4</h4>
<h5 id="header5"><span class="header-section-number">3.1.6.1.1</span> Header5</h5>
<h6 id="header6"><span class="header-section-number">3.1.6.1.1.1</span> Header6</h6>
<h2 id="backslash-escapes"><span class="header-section-number">3.2</span> Backslash Escapes</h2>
<p>*testing* <span class="citation" data-cites="markdown">@markdown</span></p>
<h2 id="emphasis"><span class="header-section-number">3.3</span> Emphasis</h2>
<ul>
<li><em>italic</em> or <em>italic</em> <span class="citation" data-cites="markdown">@markdown</span></li>
<li><strong>bold</strong> or <strong>bold</strong> <span class="citation" data-cites="markdown">@markdown</span></li>
<li><strong><em>bold italic</em></strong> or <strong><em>bold italic</em></strong> <span class="citation" data-cites="markdown">@markdown</span></li>
<li><del>strikethrough</del> <span class="citation" data-cites="pandoc">@pandoc</span></li>
<li><span style="font-variant: small-caps;">Small caps</span> <span class="citation" data-cites="pandoc">@pandoc</span> <span class="citation" data-cites="markdown">@markdown</span>(html)</li>
</ul>
<h3 id="criticmarkup"><span class="header-section-number">3.3.1</span> CriticMarkup</h3>
<p><span class="citation" data-cites="mmd">@mmd</span></p>
<p>Visually it looks like emphasis. Functionally it is much more, and called Critic Markup</p>
<ul>
<li>Deletions from the original text: This is {–is –}a test.</li>
<li>Additions: This {++is ++}a test.</li>
<li>Substitutions: This {<sub><sub>isn’t</sub>>is</sub>~} a test.</li>
<li>Highlighting: This is a {==test==}.</li>
<li>Comments: This is a test{>>What is it a test of?<<}.</li>
</ul>
<p>See more at <a href="http://fletcher.github.io/MultiMarkdown-5/criticmarkup.html">CriticMarkup—MultiMarkdown Documentation</a>.</p>
<h2 id="horizontal-rules"><span class="header-section-number">3.4</span> Horizontal Rules</h2>
<p><span class="citation" data-cites="markdown">@markdown</span></p>
<hr />
<p>3 or more hyphens or asterisks</p>
<hr />
<h2 id="break"><span class="header-section-number">3.5</span> Break</h2>
<p><span class="citation" data-cites="markdown">@markdown</span></p>
<p>No break like this</p>
<p>Soft break<br />
like this</p>
<p>Hard break</p>
<p>like this</p>
<h2 id="superscript-subscript"><span class="header-section-number">3.6</span> Superscript & Subscript</h2>
<ul>
<li>x^2 <span class="citation" data-cites="mmd">@mmd</span></li>
<li>d~o <span class="citation" data-cites="mmd">@mmd</span></li>
<li>x<sup>a+b</sup> <span class="citation" data-cites="mmd">@mmd</span> <span class="citation" data-cites="pandoc">@pandoc</span></li>
<li>x<sub>y,z</sub> <span class="citation" data-cites="mmd">@mmd</span> <span class="citation" data-cites="pandoc">@pandoc</span></li>
<li>P<sub>a cat</sub> <span class="citation" data-cites="pandoc">@pandoc</span></li>
</ul>
<h2 id="smarty-pants"><span class="header-section-number">3.7</span> Smarty Pants</h2>
<p><span class="citation" data-cites="markdown">@markdown</span>(+smartypants) <span class="citation" data-cites="pandoc">@pandoc</span>(–smart) <span class="citation" data-cites="ghpages">@ghpages</span></p>
<ul>
<li>“Example 1”</li>
<li>‘Example 2’</li>
<li>en–dash</li>
<li>em—dash</li>
<li>ellipsis…</li>
</ul>
<p><span class="citation" data-cites="mmd">@mmd</span></p>
<ul>
<li>``Example 3’’</li>
</ul>
<h2 id="abbreviations-php-markdown-extra"><span class="header-section-number">3.8</span> Abbreviations (PHP Markdown Extra)</h2>
<p><span class="citation" data-cites="mmd">@mmd</span> <span class="citation" data-cites="phpextra">@phpextra</span> <span class="citation" data-cites="pandoc">@pandoc</span>(+abbreviations)</p>
<p>Testing abbreviations: HTML, W3C (mouseover it to see)</p>
<h2 id="lists"><span class="header-section-number">3.9</span> Lists</h2>
<h3 id="compact-vs-loose-lists"><span class="header-section-number">3.9.1</span> Compact vs Loose Lists</h3>
<p>The following effects are the same for different kind of lists <span class="citation" data-cites="markdown">@markdown</span></p>
<h4 id="compact"><span class="header-section-number">3.9.1.1</span> Compact</h4>
<ul>
<li>test 1</li>
<li>test 2</li>
<li>test 3</li>
</ul>
<h4 id="loose"><span class="header-section-number">3.9.1.2</span> Loose</h4>
<ul>
<li><p>test 1</p></li>
<li><p>test 2</p></li>
<li><p>test 3</p></li>
</ul>
<h3 id="ordered-lists"><span class="header-section-number">3.9.2</span> Ordered Lists</h3>
<p><span class="citation" data-cites="markdown">@markdown</span></p>
<ol type="1">
<li>test</li>
<li>test</li>
<li>test</li>
</ol>
<h3 id="unordered-lists"><span class="header-section-number">3.9.3</span> Unordered Lists</h3>
<p><span class="citation" data-cites="markdown">@markdown</span></p>
<ul>
<li>test</li>
<li>test</li>
<li>test</li>
</ul>
<h3 id="nested-lists"><span class="header-section-number">3.9.4</span> Nested Lists</h3>
<p><span class="citation" data-cites="markdown">@markdown</span></p>
<ul>
<li>test
<ul>
<li>test</li>
</ul></li>
<li>test
<ol type="1">
<li>test</li>
<li>test
<ul>
<li>test
<ol type="1">
<li>test</li>
<li>test</li>
</ol></li>
</ul></li>
<li>test</li>
</ol></li>
<li>test</li>
</ul>
<p>Note about LaTeX output in mmd/pandoc:</p>
<ul>
<li>The Maximum nesting level of lists in LaTeX is 4. The quick hack is to mix itemize and enumerate alternatively to go beyond this.</li>
</ul>
<h3 id="cutoff-a-list"><span class="header-section-number">3.9.5</span> Cutoff a List</h3>
<p><span class="citation" data-cites="markdown">@markdown</span></p>
<ol type="1">
<li>one</li>
<li>two</li>
<li>three</li>
</ol>
<!-- -->
<ol type="1">
<li>uno</li>
<li>dos</li>
<li>tres</li>
</ol>
<!-- -->
<ul>
<li>item one</li>
<li>item two</li>
</ul>
<!-- end of list -->
<pre><code>{ my code block }</code></pre>
<h3 id="list-item-in-a-block"><span class="header-section-number">3.9.6</span> List Item in a Block</h3>
<p><span class="citation" data-cites="markdown">@markdown</span></p>
<ul>
<li><p>First paragraph.</p>
<p>Continued.</p></li>
<li><p>Second paragraph. With a code block, which must be indented eight spaces:</p>
<pre><code>{ code }</code></pre></li>
</ul>
<h3 id="fancy-lists"><span class="header-section-number">3.9.7</span> Fancy Lists</h3>
<p><span class="citation" data-cites="pandoc">@pandoc</span></p>
<ol>
<li>one</li>
<li>two</li>
</ol>
<ol start="9" type="1">
<li>Ninth</li>
<li>Tenth</li>
<li>Eleventh
<ol type="i">
<li><code>i</code></li>
<li><code>ii</code></li>
<li><code>iii</code></li>
</ol></li>
</ol>
<ol start="2" type="1">
<li>Two</li>
<li>Three</li>
</ol>
<ol type="1">
<li>Four</li>
</ol>
<ul>
<li>Five</li>
</ul>
<h2 id="definition-lists"><span class="header-section-number">3.10</span> Definition Lists</h2>
<h3 id="method-1"><span class="header-section-number">3.10.1</span> Method 1</h3>
<p><span class="citation" data-cites="mmd">@mmd</span> <span class="citation" data-cites="phpextra">@phpextra</span> <span class="citation" data-cites="pandoc">@pandoc</span> <span class="citation" data-cites="ghpages">@ghpages</span></p>
<dl>
<dt>Physics</dt>
<dd>The Fundamental of Science
</dd>
<dd>Describe the Nature
</dd>
<dd>Make Prediction
</dd>
</dl>
<h3 id="method-2"><span class="header-section-number">3.10.2</span> Method 2</h3>
<p><span class="citation" data-cites="ghpages">@ghpages</span> <span class="citation" data-cites="pandoc">@pandoc</span> <span class="citation" data-cites="mmd">@mmd</span></p>
<dl>
<dt>Term 1</dt>
<dd><p>Definition 1</p>
</dd>
<dt>Term 2 with <em>inline markup</em></dt>
<dd><p>Definition 2</p>
<pre><code>{ some code, part of Definition 2 }</code></pre>
<p>Third paragraph of definition 2.</p>
</dd>
</dl>
<h2 id="numbered-example-lists"><span class="header-section-number">3.11</span> Numbered Example Lists</h2>
<p><span class="citation" data-cites="pandoc">@pandoc</span></p>
<ol class="example" type="1">
<li>My first example will be numbered (1).</li>
<li>My second example will be numbered (2).</li>
</ol>
<p>Explanation of examples.</p>
<ol start="3" class="example" type="1">
<li><p>My third example will be numbered (3).</p></li>
<li><p>This is a good example.</p></li>
</ol>
<p>As (4) illustrates, …</p>
<h2 id="code"><span class="header-section-number">3.12</span> Code</h2>
<ul>
<li><code>testing</code> <span class="citation" data-cites="markdown">@markdown</span></li>
<li><code class="sourceCode latex">\[\ket{a}\]</code> <span class="citation" data-cites="pandoc">@pandoc</span></li>
</ul>
<h3 id="fenced-code-blocks"><span class="header-section-number">3.12.1</span> Fenced Code Blocks</h3>
<h4 id="method-1-1"><span class="header-section-number">3.12.1.1</span> Method 1</h4>
<p><span class="citation" data-cites="markdown">@markdown</span></p>
<pre><code>test
test
test
# test</code></pre>
<h4 id="method-2-1"><span class="header-section-number">3.12.1.2</span> Method 2</h4>
<p><span class="citation" data-cites="markdown">@markdown</span>(partial:language-not-supported) <span class="citation" data-cites="ghpages">@ghpages</span> <span class="citation" data-cites="pandoc">@pandoc</span> <span class="citation" data-cites="mmd">@mmd</span></p>
<div class="sourceCode"><pre class="sourceCode tex"><code class="sourceCode latex">\nabla \times \mathbf{E} = - \frac{\partial \mathbf{B}}{\partial t}</code></pre></div>
<h4 id="method-3"><span class="header-section-number">3.12.1.3</span> Method 3</h4>
<p><span class="citation" data-cites="pandoc">@pandoc</span></p>
<div class="sourceCode"><pre class="sourceCode markdown"><code class="sourceCode markdown">test
test
<span class="bn"> test</span>
<span class="bn"> # test</span></code></pre></div>
<div class="sourceCode" id="mycode" startFrom="100"><table class="sourceCode markdown numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>100
101
102
103
</pre></td><td class="sourceCode"><pre><code class="sourceCode markdown">test
test
<span class="bn"> test</span>
<span class="bn"> # test</span></code></pre></td></tr></table></div>
<h2 id="block-quotes"><span class="header-section-number">3.13</span> Block-quotes</h2>
<p><span class="citation" data-cites="markdown">@markdown</span></p>
<blockquote>
<h4 id="test"><span class="header-section-number">3.13</span> Test</h4>
<p>test</p>
<blockquote>
<p>test</p>
</blockquote>
</blockquote>
<blockquote>
<blockquote>
<p>test</p>
</blockquote>
<ul>
<li>test</li>
</ul>
</blockquote>
<blockquote>
<ul>
<li>test</li>
</ul>
</blockquote>
<h3 id="block-quotes-quoting-codes"><span class="header-section-number">3.13.1</span> Block-quotes Quoting Codes</h3>
<p><span class="citation" data-cites="markdown">@markdown</span></p>
<blockquote>
<pre><code>\newcommand...</code></pre>
</blockquote>
<h2 id="line-blocks"><span class="header-section-number">3.14</span> Line Blocks</h2>
<p><span class="citation" data-cites="ghpages">@ghpages</span>(partial) <span class="citation" data-cites="pandoc">@pandoc</span></p>
<p>The limerick packs laughs anatomical<br />
In space that is quite economical.<br />
But the good ones I’ve seen<br />
So seldom are clean<br />
And the clean ones so seldom are comical</p>
<p>200 Main St.<br />
Berkeley, CA 94718</p>
<h2 id="tables"><span class="header-section-number">3.15</span> Tables</h2>
<h3 id="method-1-2"><span class="header-section-number">3.15.1</span> Method 1</h3>
<p><span class="citation" data-cites="ghpages">@ghpages</span> <span class="citation" data-cites="pandoc">@pandoc</span> <span class="citation" data-cites="mmd">@mmd</span></p>
<table>
<caption>Notice how pandoc can have optional caption like this</caption>
<thead>
<tr class="header">
<th style="text-align: right;">Right</th>
<th style="text-align: left;">Left</th>
<th>Default</th>
<th style="text-align: center;">Center</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: right;">12</td>
<td style="text-align: left;">12</td>
<td>12</td>
<td style="text-align: center;">12</td>
</tr>
<tr class="even">
<td style="text-align: right;">123</td>
<td style="text-align: left;">123</td>
<td>123</td>
<td style="text-align: center;">123</td>
</tr>
<tr class="odd">
<td style="text-align: right;">1</td>
<td style="text-align: left;">1</td>
<td>1</td>
<td style="text-align: center;">1</td>
</tr>
</tbody>
</table>
<h3 id="method-2-2"><span class="header-section-number">3.15.2</span> Method 2</h3>
<p><span class="citation" data-cites="mmd">@mmd</span></p>
<p>[Table Caption] | | Grouping || | Left align | Right align | Center align | |:———–|————:|:————:| | This | This | This | | column | column | column | | will | will | will | | be | be | be | | left | right | center | | aligned | aligned | aligned |<br />
| And a big grouping is like this |||</p>
<h3 id="method-3-1"><span class="header-section-number">3.15.3</span> Method 3</h3>
<p><span class="citation" data-cites="pandoc">@pandoc</span></p>
<table>
<caption>Demonstration of simple table syntax.</caption>
<thead>
<tr class="header">
<th style="text-align: right;">Right</th>
<th style="text-align: left;">Left</th>
<th style="text-align: center;">Center</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: right;">12</td>
<td style="text-align: left;">12</td>
<td style="text-align: center;">12</td>
<td>12</td>
</tr>
<tr class="even">
<td style="text-align: right;">123</td>
<td style="text-align: left;">123</td>
<td style="text-align: center;">123</td>
<td>123</td>
</tr>
<tr class="odd">
<td style="text-align: right;">1</td>
<td style="text-align: left;">1</td>
<td style="text-align: center;">1</td>
<td>1</td>
</tr>
</tbody>
</table>
<h3 id="method-4"><span class="header-section-number">3.15.4</span> Method 4</h3>
<p><span class="citation" data-cites="pandoc">@pandoc</span></p>
<table style="width:85%;">
<caption>Here’s the caption. It, too, may span multiple lines.</caption>
<colgroup>
<col style="width: 16%" />
<col style="width: 11%" />
<col style="width: 22%" />
<col style="width: 34%" />
</colgroup>
<thead>
<tr class="header">
<th style="text-align: center;">Centered Header</th>
<th>Default Aligned</th>
<th style="text-align: right;">Right Aligned</th>
<th style="text-align: left;">Left Aligned</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: center;">First</td>
<td>row</td>
<td style="text-align: right;">12.0</td>
<td style="text-align: left;">Example of a row that spans multiple lines.</td>
</tr>
<tr class="even">
<td style="text-align: center;">Second</td>
<td>row</td>
<td style="text-align: right;">5.0</td>
<td style="text-align: left;">Here’s another one. Note the blank line between rows.</td>
</tr>
</tbody>
</table>
<h3 id="method-5"><span class="header-section-number">3.15.5</span> Method 5</h3>
<p><span class="citation" data-cites="pandoc">@pandoc</span></p>
<table style="width:74%;">
<caption>Sample grid table.</caption>
<colgroup>
<col style="width: 22%" />
<col style="width: 22%" />
<col style="width: 29%" />
</colgroup>
<thead>
<tr class="header">
<th>Fruit</th>
<th>Price</th>
<th>Advantages</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><p>Bananas</p></td>
<td><p>$1.34</p></td>
<td><ul>
<li>built-in wrapper</li>
<li>bright color</li>
</ul></td>
</tr>
<tr class="even">
<td><p>Oranges</p></td>
<td><p>$2.10</p></td>
<td><ul>
<li>cures scurvy</li>
<li>tasty</li>
</ul></td>
</tr>
</tbody>
</table>
<h3 id="method-6"><span class="header-section-number">3.15.6</span> Method 6</h3>
<p><span class="citation" data-cites="ghpages">@ghpages</span></p>
<!-- \begin{comment} -->
<p>|—————–+————+—————–+—————-| | Default aligned |Left aligned| Center aligned | Right aligned | |—————–|:———–|:—————:|—————:| | First body part |Second cell | Third cell | fourth cell | | Second line |foo | <strong>strong</strong> | blah | | Third line |blah | blah | bar | |—————–+————+—————–+—————-| | Second body | | | | | 2 line | | | | |=================+============+=================+================| | Footer row | | | | |—————–+————+—————–+—————-|</p>
<!-- \end{comment} -->
<p>See <a href="http://kramdown.gettalong.org/syntax.html#tables">Syntax | kramdown</a></p>
<h2 id="links"><span class="header-section-number">3.16</span> Links</h2>
<ul>
<li><a href="https://www.wikipedia.org" class="uri">https://www.wikipedia.org</a> <span class="citation" data-cites="pandoc">@pandoc</span>(+autolink_bare_uris)</li>
<li><a href="https://www.wikipedia.org" class="uri">https://www.wikipedia.org</a> <span class="citation" data-cites="markdown">@markdown</span></li>
<li><a href="https://www.wikipedia.org">Wikipedia.org</a> <span class="citation" data-cites="markdown">@markdown</span></li>
<li><a href="https://www.wikipedia.org" title="a title">Wikipedia.org</a> <span class="citation" data-cites="markdown">@markdown</span></li>
<li><script type="text/javascript">
<!--
h='github.com';a='@';n='support';e=n+a+h;
document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'" clas'+'s="em' + 'ail">'+'Mail to GitHub'+'<\/'+'a'+'>');
// -->
</script><noscript>Mail to GitHub (support at github dot com)</noscript> <span class="citation" data-cites="markdown">@markdown</span></li>
</ul>
<h3 id="reference-links"><span class="header-section-number">3.16.1</span> Reference Links</h3>
<ul>
<li><a href="https://www.google.com">Search here</a> <span class="citation" data-cites="markdown">@markdown</span></li>
<li>A <a href="image.png" class="external" style="border: solid black 1px;" title="Title">link</a> with attributes. <span class="citation" data-cites="mmd">@mmd</span></li>
<li><a href="image.png" class="external" style="border: solid black 1px;" title="Title">Another link to the link above</a>. <span class="citation" data-cites="mmd">@mmd</span></li>
<li>A <a href="/foo/bar.html" title="My title, optional">link1</a> with attributes. <span class="citation" data-cites="markdown">@markdown</span></li>
<li><a href="http://fsf.org" title="The free software foundation">Another link</a>. <span class="citation" data-cites="markdown">@markdown</span></li>
<li><a href="/bar#special" title="A title in single quotes">link3</a>. <span class="citation" data-cites="markdown">@markdown</span></li>
</ul>
<h2 id="footnotes"><span class="header-section-number">3.17</span> Footnotes</h2>
<ul>
<li>Footnotes [^This is a mmd inline footnote] <span class="citation" data-cites="mmd">@mmd</span></li>
<li>Footnotes <a href="#fn1" class="footnoteRef" id="fnref1"><sup>1</sup></a> <span class="citation" data-cites="pandoc">@pandoc</span></li>
</ul>
<h3 id="reference-footnotes"><span class="header-section-number">3.17.1</span> Reference Footnotes</h3>
<ul>
<li>Footnotes<a href="#fn2" class="footnoteRef" id="fnref2"><sup>2</sup></a> <span class="citation" data-cites="markdown">@markdown</span></li>
<li>Long Footnotes <a href="#fn3" class="footnoteRef" id="fnref3"><sup>3</sup></a> <span class="citation" data-cites="pandoc">@pandoc</span> <span class="citation" data-cites="ghpages">@ghpages</span> <span class="citation" data-cites="mmd">@mmd</span></li>
</ul>
<p>This paragraph won’t be part of the note, because it isn’t indented.</p>
<h3 id="glossaries"><span class="header-section-number">3.17.2</span> Glossaries</h3>
<p>A special kind of footnote <a href="#fn4" class="footnoteRef" id="fnref4"><sup>4</sup></a>. <span class="citation" data-cites="mmd">@mmd</span></p>
<p>See more at <a href="http://fletcher.github.io/MultiMarkdown-5/glossary.html">Glossary—MultiMarkdown Documentation</a>.</p>
<h3 id="citations"><span class="header-section-number">3.17.3</span> Citations</h3>
<p>It can looks like footnotes in HTML output.</p>
<h4 id="multimarkdown"><span class="header-section-number">3.17.3.1</span> MultiMarkdown</h4>
<p><span class="citation" data-cites="mmd">@mmd</span></p>
<ul>
<li>This is a statement that should be attributed to its source <a href="John%20Doe.%20*Some%20Big%20Fancy%20Book*.%20Vanity%20Press,%202006.">p. 23</a>.</li>
</ul>
<p><a href="John%20Doe.%20*Another%20Big%20Fancy%20Book*.%20Vanity%20Press,%202016.">Not cited</a></p>
<p>See more at <a href="http://fletcher.github.io/MultiMarkdown-5/citations.html">Citations—MultiMarkdown Documentation</a>.</p>
<h4 id="pandoc"><span class="header-section-number">3.17.3.2</span> Pandoc</h4>
<p><span class="citation" data-cites="pandoc">@pandoc</span></p>
<p>Very powerful but complicated. See more at <a href="http://pandoc.org/README.html#citations">Citations—Pandoc Documentation</a>.</p>
<h2 id="images"><span class="header-section-number">3.18</span> Images</h2>
<ul>
<li><img src="image.png" title="Optional Title" alt="Alt Text" /> <span class="citation" data-cites="markdown">@markdown</span></li>
</ul>
<h3 id="reference-images"><span class="header-section-number">3.18.1</span> Reference Images</h3>
<ul>
<li><img src="image.png" title="Optional Title" alt="Alt Text" /> <span class="citation" data-cites="markdown">@markdown</span></li>
<li><img src="image.png" title="Title of the Image" alt="An Image with Attributes" width="40" height="40" /> <span class="citation" data-cites="mmd">@mmd</span> <span class="citation" data-cites="pandoc">@pandoc</span>(+mmd_link_attributes)</li>
<li><img src="image.png" alt="An Image with Attributes" id="id" class="class" width="30" height="20" /> <span class="citation" data-cites="pandoc">@pandoc</span> <span class="citation" data-cites="phpextra">@phpextra</span>(partial)</li>
<li>a reference <img src="image.png" title="optional title" alt="image" id="id" class="class" key="val" key2="val 2" /> with attributes. <span class="citation" data-cites="pandoc">@pandoc</span> <span class="citation" data-cites="phpextra">@phpextra</span>(partial)</li>
</ul>
<h3 id="image-with-links-by-nesting-image-and-link"><span class="header-section-number">3.18.2</span> Image with Links by Nesting Image and Link</h3>
<ul>
<li><a href="https://www.wikipedia.org/"><img src="image.png" alt="Image Link" /></a> <span class="citation" data-cites="markdown">@markdown</span></li>
</ul>
<h3 id="block-level-images"><span class="header-section-number">3.18.3</span> Block Level Images</h3>
<ul>
<li>Block level: HTML <code>figure</code> element in MultiMarkdown <span class="citation" data-cites="mmd">@mmd</span> <span class="citation" data-cites="pandoc">@pandoc</span></li>
</ul>
<figure>
<img src="image.png" title="Optional Title" alt="Block Level" /><figcaption><strong><em>Block</em></strong> <strong>Level</strong></figcaption>
</figure>
<p><img src="image.png" title="Optional Title" alt="Not Block Level" /><br />
## RAW ##</p>
<h3 id="html"><span class="header-section-number">3.18.4</span> HTML</h3>
<ul>
<li><div>
This should <em>not</em> be markdown (or is it?)
</div>
<span class="citation" data-cites="markdown">@markdown</span></li>
<li><div markdown="1">
This <em>is</em> markdown
</div>
<span class="citation" data-cites="mmd">@mmd</span> <span class="citation" data-cites="pandoc">@pandoc</span>(+markdown_attribute)</li>
</ul>
<p>See more at <a href="http://fletcher.github.io/MultiMarkdown-5/raw.html">Raw—MultiMarkdown Documentation</a>. See test in [Babelmark 2 - Compare markdown implementations](<a href="http://johnmacfarlane.net/babelmark2/?normalize=1&text=%3Cdiv%3EThis+should+*not*+be+markdown+(or+is+it%3F%29+%3C%2Fdiv%3E%0A%3Cdiv+markdown%3D1%3EThis+*is*+markdown%3C%2Fdiv%3E)">http://johnmacfarlane.net/babelmark2/?normalize=1&text=%3Cdiv%3EThis+should+*not*+be+markdown+(or+is+it%3F%29+%3C%2Fdiv%3E%0A%3Cdiv+markdown%3D1%3EThis+*is*+markdown%3C%2Fdiv%3E)</a>.</p>
<h3 id="latex"><span class="header-section-number">3.18.5</span> LaTeX</h3>
<ul>
<li><!-- \newcommand\rawlatex{} -->
<span class="citation" data-cites="mmd">@mmd</span></li>
<li><span class="citation" data-cites="pandoc">@pandoc</span>(parsed)</li>
<li>\begin{…} <span class="citation" data-cites="pandoc">@pandoc</span></li>
</ul>
<h1 id="other-syntaxes"><span class="header-section-number">4</span> Other Syntaxes</h1>
<h2 id="metadata"><span class="header-section-number">4.1</span> Metadata</h2>
<p>Note: mmd accepts capitalized metadata keys but others do not. For maximum compatibility, <code>author(s)</code>, <code>title</code>, etc. should be in lower cases.</p>
<h3 id="multimarkdown-metadata-block"><span class="header-section-number">4.1.1</span> MultiMarkdown Metadata Block</h3>
<p><span class="citation" data-cites="mmd">@mmd</span> <span class="citation" data-cites="pandoc">@pandoc</span>(+mmd_title_block)</p>
<pre><code>title: A Sample MultiMarkdown Document
author: Fletcher T. Penney
date: February 9, 2011
comment: This is a comment intended to demonstrate
metadata that spans multiple lines, yet
is treated as a single value.
CSS: http://example.com/standard.css</code></pre>
<p>See more at <a href="http://fletcher.github.io/MultiMarkdown-5/metadata.html">Metadata—MultiMarkdown Documentation</a>.</p>
<h3 id="pandoc-title-block"><span class="header-section-number">4.1.2</span> Pandoc Title Block</h3>
<p><span class="citation" data-cites="pandoc">@pandoc</span></p>
<pre><code>% title
% author(s) (separated by semicolons)
% date</code></pre>
<h3 id="yaml-metadata-block"><span class="header-section-number">4.1.3</span> YAML Metadata Block</h3>
<p><span class="citation" data-cites="Mmd">@Mmd</span>(partial)</p>
<p><span class="citation" data-cites="pandoc">@pandoc</span> <span class="citation" data-cites="ghpages">@ghpages</span></p>
<pre><code>---
title: A Sample MultiMarkdown Document
author: Fletcher T. Penney
date: February 9, 2011
tags: [nothing, nothingness]
abstract: |
This is the abstract.
It consists of two paragraphs.
---</code></pre>
<h2 id="toc"><span class="header-section-number">4.2</span> TOC</h2>
<h3 id="pandoc-1"><span class="header-section-number">4.2.1</span> Pandoc</h3>
<p><span class="citation" data-cites="pandoc">@pandoc</span></p>
<p>Use <code>--toc</code> as a command argument.</p>
<h3 id="multimarkdown-1"><span class="header-section-number">4.2.2</span> MultiMarkdown</h3>
<p><span class="citation" data-cites="mmd">@mmd</span></p>
<p><code>{{TOC}}</code>, see beginning. It preprocess the headings and generate a ToC on its own, and doesn’t give instruction for LaTeX to generate one. A hack is like this:</p>
<pre><code>---
...
LaTeX Input: mmd-load-toc-setcounter
LaTeX Input: mmd-load-toc
...
---
<!-- \begin{comment} -->
{{TOC}}
<!-- \end{comment} -->
...</code></pre>
<p>See more at <a href="https://github.com/ickc/peg-multimarkdown-latex-support">ickc/peg-multimarkdown-latex-support: Default support files for generating LaTeX documents with MMD 3 through MMD 5</a>.</p>
<h3 id="kramdown"><span class="header-section-number">4.2.3</span> Kramdown</h3>
<p><span class="citation" data-cites="ghpages">@ghpages</span></p>
<pre><code># Contents
{:.no_toc}
* Will be replaced with the ToC, excluding the "Contents" header
{:toc}</code></pre>
<h2 id="math"><span class="header-section-number">4.3</span> Math</h2>
<p>MathJax is assumed. MathJax has many configurable options. See <a href="http://mathjax.readthedocs.org/en/latest/tex.html">MathJax TeX and LaTeX Support — MathJax 2.6 documentation</a>.</p>
<h3 id="markdown"><span class="header-section-number">4.3.1</span> Markdown</h3>
<p><span class="citation" data-cites="markdown">@markdown</span></p>
<p>Add the following at the beginning of the document:</p>
<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html"><span class="kw"><script</span><span class="ot"> type=</span><span class="st">"text/javascript"</span>
<span class="ot"> src=</span><span class="st">"https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_CHTML-full"</span><span class="kw">></span>
<span class="kw"></script></span></code></pre></div>
<p>MathJax.js is used and any codes within math delimiters are treated as raw HTML and to be processed by MathJax.</p>
<p>MathJax delimiter are <code>$$...$$</code>, <code>\\(...\\)</code> and <code>\\[...\\]</code> (because an extra <code>\</code> can be used to escape from MarkDown).</p>
<p>Depending on the markdown parser, extra tricks might be needed to make sure nothing within the math delimiter is treated as markdown (see <a href="http://mathjax.readthedocs.org/en/latest/tex.html#tex-and-latex-in-html-documents">TeX and LaTeX in HTML documents — MathJax 2.6 documentation</a>). <code>$...$</code> can be used with MathJax configuration (see <a href="http://mathjax.readthedocs.org/en/latest/tex.html#tex-and-latex-math-delimiters">TeX and LaTeX math delimiters — MathJax 2.6 documentation</a>).</p>
<h3 id="multimarkdown-and-pandoc"><span class="header-section-number">4.3.2</span> MultiMarkdown and Pandoc</h3>
<p>There are subtleties how math should be used in HTML+MathJax and LaTeX output from single markdown source. See more in <a href="https://github.com/ickc/mathjax-latex-md-mmd-pandoc">Testing LaTeX Environments Usage in MathJax From Markdown Conversion (including mmd and pandoc)</a>.</p>
<h4 id="multimarkdown-2"><span class="header-section-number">4.3.2.1</span> MultiMarkdown</h4>
<p><span class="citation" data-cites="mmd">@mmd</span></p>
<p>Add the following metadata at the beginning of the document:</p>
<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">HTML header: <span class="kw"><script</span><span class="ot"> type=</span><span class="st">"text/javascript"</span>
<span class="ot"> src=</span><span class="st">"https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_CHTML-full"</span><span class="kw">></span>
<span class="kw"></script></span></code></pre></div>
<p>MultiMarkdown math delimiter are <code>$...$</code>, <code>$$...$$</code>, <code>\\(...\\)</code> and <code>\\[...\\]</code>.</p>
<h4 id="pandoc-2"><span class="header-section-number">4.3.2.2</span> Pandoc</h4>
<p><span class="citation" data-cites="pandoc">@pandoc</span>(–mathjax)</p>
<p>For pandoc, add <code>--mathjax</code> in the command-line argument.</p>
<p>Default math delimiter for pandoc is <code>$...$</code>, <code>$$...$$</code>. Other options are configurable. See more in <a href="http://pandoc.org/README.html#non-pandoc-extensions">Pandoc - Pandoc User’s Guide</a>.</p>
<h3 id="inline-math"><span class="header-section-number">4.3.3</span> Inline Math</h3>
<ul>
<li><span class="math inline">\(1+1\)</span></li>
<li><span class="math inline">\(1 + 1\)</span> <span class="citation" data-cites="pandoc">@pandoc</span>(+tex_math_double_backslash)</li>
</ul>
<h3 id="block-math"><span class="header-section-number">4.3.4</span> Block Math</h3>
<ul>
<li><span class="math display">\[R R^T = I\]</span></li>
<li><span class="math display">\[A^T_S = B\]</span></li>
</ul>
<h3 id="other-examples"><span class="header-section-number">4.3.5</span> Other Examples</h3>
<ul>
<li><span class="math display">\[x = {-b \pm \sqrt{b^2-4ac} \over 2a}\]</span></li>
<li><span class="math display">\[
\begin{aligned}
\dot{x} & = \sigma(y-x) \\\
\dot{y} & = \rho x - y - xz \\\
\dot{z} & = -\beta z + xy
\end{aligned}
\]</span></li>
<li><span class="math display">\[\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)\]</span></li>
<li><span class="math display">\[\mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix}
\mathbf{i} & \mathbf{j} & \mathbf{k} \\\
\frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\\
\frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0
\end{vmatrix}\]</span></li>
<li><span class="math display">\[P(E) = {n \choose k} p^k (1-p)^{n-k}\]</span></li>
<li><span class="math display">\[\frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} =
1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}}
{1+\frac{e^{-8\pi}} {1+\ldots} } } }\]</span></li>
<li><span class="math display">\[
\begin{aligned}
\nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\\
\nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\\
\nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\\
\nabla \cdot \vec{\mathbf{B}} & = 0 \end{aligned}
\]</span></li>
<li><span class="math display">\[1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots =
\prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})},
\quad\quad \text{for $|q|<1$}.\]</span></li>
</ul>
<h2 id="file-transclusion"><span class="header-section-number">4.4</span> File Transclusion</h2>
<p><span class="citation" data-cites="mmd">@mmd</span></p>
<p>See more at <a href="http://fletcher.github.io/MultiMarkdown-5/transclusion.html">File Transclusion—MultiMarkdown Documentation</a>.</p>
<h1 id="references"><span class="header-section-number">5</span> References</h1>
<p>Some examples are directly or indirectly copied from the following documentations:</p>
<ol type="1">
<li><a href="http://pandoc.org/README.html">Pandoc - Pandoc User’s Guide</a></li>
<li><a href="http://fletcher.github.io/MultiMarkdown-5/">MultiMarkdown User’s Guide</a></li>
<li><a href="http://kramdown.gettalong.org/syntax.html#tables">Syntax | kramdown</a></li>
</ol>
<section class="footnotes">
<hr />
<ol>
<li id="fn1"><p>This is a pandoc inline footnote<a href="#fnref1">↩</a></p></li>
<li id="fn2"><p>This is a footnote<a href="#fnref2">↩</a></p></li>
<li id="fn3"><p>Here’s one with multiple blocks.</p>
<p>Subsequent paragraphs are indented to show that they belong to the previous footnote.</p>
<pre><code>{ some.code }</code></pre>
<p>The whole paragraph can be indented, or just the first line. In this way, multi-paragraph footnotes work like multi-paragraph list items.<a href="#fnref3">↩</a></p></li>
<li id="fn4"><p>glossary: term (optional sort key) The actual definition belongs on a new line, and can continue on just as other footnotes. Note how it fallbacks gracefully in Markdown.<a href="#fnref4">↩</a></p></li>
</ol>
</section>
</body>
</html>