-
Notifications
You must be signed in to change notification settings - Fork 41
/
GitHub-Template-Preview.html
481 lines (467 loc) · 31.3 KB
/
GitHub-Template-Preview.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
<!DOCTYPE html>
<!--
==============================================================================
"GitHub HTML5 Pandoc Template" v2.2 — by Tristano Ajmone
==============================================================================
Copyright © Tristano Ajmone, 2017-2020, MIT License (MIT). Project's home:
- https://github.com/tajmone/pandoc-goodies
The CSS in this template reuses source code taken from the following projects:
- GitHub Markdown CSS: Copyright © Sindre Sorhus, MIT License (MIT):
https://github.com/sindresorhus/github-markdown-css
- Primer CSS: Copyright © 2016-2017 GitHub Inc., MIT License (MIT):
http://primercss.io/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The MIT License
Copyright (c) Tristano Ajmone, 2017-2020 (github.com/tajmone/pandoc-goodies)
Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com)
Copyright (c) 2017 GitHub Inc.
"GitHub Pandoc HTML5 Template" is Copyright (c) Tristano Ajmone, 2017-2020,
released under the MIT License (MIT); it contains readaptations of substantial
portions of the following third party softwares:
(1) "GitHub Markdown CSS", Copyright (c) Sindre Sorhus, MIT License (MIT).
(2) "Primer CSS", Copyright (c) 2016 GitHub Inc., MIT License (MIT).
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
==============================================================================-->
<html lang="en">
<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="Tristano Ajmone ([email protected])" />
<meta name="dcterms.date" content="2020-08-12" />
<title>GitHub Pandoc HTML5 Template — Preview</title>
<style type="text/css">
@charset "UTF-8";.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;color:#24292e;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;line-height:1.5;word-wrap:break-word;box-sizing:border-box;min-width:200px;max-width:980px;margin:0 auto;padding:45px}.markdown-body a{color:#0366d6;background-color:transparent;text-decoration:none;-webkit-text-decoration-skip:objects}.markdown-body a:active,.markdown-body a:hover{outline-width:0}.markdown-body a:hover{text-decoration:underline}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body strong{font-weight:600}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:24px;margin-bottom:16px;font-weight:600;line-height:1.25}.markdown-body h1{font-size:2em;margin:.67em 0;padding-bottom:.3em;border-bottom:1px solid #eaecef}.markdown-body h2{padding-bottom:.3em;font-size:1.5em;border-bottom:1px solid #eaecef}.markdown-body h3{font-size:1.25em}.markdown-body h4{font-size:1em}.markdown-body h5{font-size:.875em}.markdown-body h6{font-size:.85em;color:#6a737d}.markdown-body img{border-style:none}.markdown-body svg:not(:root){overflow:hidden}.markdown-body hr{box-sizing:content-box;height:.25em;margin:24px 0;padding:0;overflow:hidden;background-color:#e1e4e8;border:0}.markdown-body hr::before{display:table;content:""}.markdown-body hr::after{display:table;clear:both;content:""}.markdown-body input{margin:0;overflow:visible;font:inherit;font-family:inherit;font-size:inherit;line-height:inherit}.markdown-body [type=checkbox]{box-sizing:border-box;padding:0}.markdown-body *{box-sizing:border-box}.markdown-body blockquote{margin:0}.markdown-body ol,.markdown-body ul{padding-left:2em}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ol ol,.markdown-body ol ul,.markdown-body ul ol,.markdown-body ul ul{margin-top:0;margin-bottom:0}.markdown-body ol ol ol,.markdown-body ol ul ol,.markdown-body ul ol ol,.markdown-body ul ul ol{list-style-type:lower-alpha}.markdown-body li>p{margin-top:16px}.markdown-body li+li{margin-top:.25em}.markdown-body dd{margin-left:0}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:600}.markdown-body dl dd{padding:0 16px;margin-bottom:16px}.markdown-body code{font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace}.markdown-body pre{font:12px SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;word-wrap:normal}.markdown-body blockquote,.markdown-body dl,.markdown-body ol,.markdown-body p,.markdown-body pre,.markdown-body table,.markdown-body ul{margin-top:0;margin-bottom:16px}.markdown-body blockquote{padding:0 1em;color:#6a737d;border-left:.25em solid #dfe2e5}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body table{display:block;width:100%;overflow:auto;border-spacing:0;border-collapse:collapse}.markdown-body table th{font-weight:600}.markdown-body table td,.markdown-body table th{padding:6px 13px;border:1px solid #dfe2e5}.markdown-body table tr{background-color:#fff;border-top:1px solid #c6cbd1}.markdown-body table tr:nth-child(2n){background-color:#f6f8fa}.markdown-body img{max-width:100%;box-sizing:content-box;background-color:#fff}.markdown-body code{padding:.2em 0;margin:0;font-size:85%;background-color:rgba(27,31,35,.05);border-radius:3px}.markdown-body code::after,.markdown-body code::before{letter-spacing:-.2em;content:" "}.markdown-body pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:0 0;border:0}.markdown-body .highlight{margin-bottom:16px}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:#f6f8fa;border-radius:3px}.markdown-body pre code{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body pre code::after,.markdown-body pre code::before{content:normal}.markdown-body .full-commit .btn-outline:not(:disabled):hover{color:#005cc5;border-color:#005cc5}.markdown-body kbd{box-shadow:inset 0 -1px 0 #959da5;display:inline-block;padding:3px 5px;font:11px/10px SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#444d56;vertical-align:middle;background-color:#fcfcfc;border:1px solid #c6cbd1;border-bottom-color:#959da5;border-radius:3px;box-shadow:inset 0 -1px 0 #959da5}.markdown-body :checked+.radio-label{position:relative;z-index:1;border-color:#0366d6}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item+.task-list-item{margin-top:3px}.markdown-body .task-list-item input{margin:0 .2em .25em -1.6em;vertical-align:middle}.markdown-body::before{display:table;content:""}.markdown-body::after{display:table;clear:both;content:""}.markdown-body>:first-child{margin-top:0!important}.markdown-body>:last-child{margin-bottom:0!important}.Alert,.Error,.Note,.Success,.Warning{padding:11px;margin-bottom:24px;border-style:solid;border-width:1px;border-radius:4px}.Alert p,.Error p,.Note p,.Success p,.Warning p{margin-top:0}.Alert p:last-child,.Error p:last-child,.Note p:last-child,.Success p:last-child,.Warning p:last-child{margin-bottom:0}.Alert{color:#246;background-color:#e2eef9;border-color:#bac6d3}.Warning{color:#4c4a42;background-color:#fff9ea;border-color:#dfd8c2}.Error{color:#911;background-color:#fcdede;border-color:#d2b2b2}.Success{color:#22662c;background-color:#e2f9e5;border-color:#bad3be}.Note{color:#2f363d;background-color:#f6f8fa;border-color:#d5d8da}.Alert h1,.Alert h2,.Alert h3,.Alert h4,.Alert h5,.Alert h6{color:#246;margin-bottom:0}.Warning h1,.Warning h2,.Warning h3,.Warning h4,.Warning h5,.Warning h6{color:#4c4a42;margin-bottom:0}.Error h1,.Error h2,.Error h3,.Error h4,.Error h5,.Error h6{color:#911;margin-bottom:0}.Success h1,.Success h2,.Success h3,.Success h4,.Success h5,.Success h6{color:#22662c;margin-bottom:0}.Note h1,.Note h2,.Note h3,.Note h4,.Note h5,.Note h6{color:#2f363d;margin-bottom:0}.Alert h1:first-child,.Alert h2:first-child,.Alert h3:first-child,.Alert h4:first-child,.Alert h5:first-child,.Alert h6:first-child,.Error h1:first-child,.Error h2:first-child,.Error h3:first-child,.Error h4:first-child,.Error h5:first-child,.Error h6:first-child,.Note h1:first-child,.Note h2:first-child,.Note h3:first-child,.Note h4:first-child,.Note h5:first-child,.Note h6:first-child,.Success h1:first-child,.Success h2:first-child,.Success h3:first-child,.Success h4:first-child,.Success h5:first-child,.Success h6:first-child,.Warning h1:first-child,.Warning h2:first-child,.Warning h3:first-child,.Warning h4:first-child,.Warning h5:first-child,.Warning h6:first-child{margin-top:0}h1.title,p.subtitle{text-align:center}h1.title.followed-by-subtitle{margin-bottom:0}p.subtitle{font-size:1.5em;font-weight:600;line-height:1.25;margin-top:0;margin-bottom:16px;padding-bottom:.3em}div.line-block{white-space:pre-line}
</style>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span.al { color: #ff0000; } /* Alert */
code span.an { color: #008000; } /* Annotation */
code span.at { } /* Attribute */
code span.bu { } /* BuiltIn */
code span.cf { color: #0000ff; } /* ControlFlow */
code span.ch { color: #008080; } /* Char */
code span.cn { } /* Constant */
code span.co { color: #008000; } /* Comment */
code span.cv { color: #008000; } /* CommentVar */
code span.do { color: #008000; } /* Documentation */
code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.im { } /* Import */
code span.in { color: #008000; } /* Information */
code span.kw { color: #0000ff; } /* Keyword */
code span.op { } /* Operator */
code span.ot { color: #ff4000; } /* Other */
code span.pp { color: #ff4000; } /* Preprocessor */
code span.sc { color: #008080; } /* SpecialChar */
code span.ss { color: #008080; } /* SpecialString */
code span.st { color: #008080; } /* String */
code span.va { } /* Variable */
code span.vs { color: #008080; } /* VerbatimString */
code span.wa { color: #008000; font-weight: bold; } /* Warning */
</style>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<article class="markdown-body">
<header>
<h1 class="title followed-by-subtitle">GitHub Pandoc HTML5 Template</h1>
<p class="subtitle">v2.2 (2020-08-12) MIT License</p>
<div class="summary">
<p>This is a preview of “<em>GitHub Pandoc HTML5 Template</em>” <strong>v2.2</strong>, © Tristano Ajmone 2017, MIT License (MIT).</p>
<p>You can download it freely from the “<strong>Pandoc-Goodies</strong>” project:</p>
<ul>
<li><a href="https://github.com/tajmone/pandoc-goodies" class="uri">https://github.com/tajmone/pandoc-goodies</a></li>
</ul>
<div class="Warning">
<p><strong>DISCLAIMER</strong> — This theme <em>is not</em> officialy endorsed by GitHub Inc.: it’s just a personal project by the author. The presence of the word “GitHub” in the template’s name only indicates that it mimicks the look and feel of how documents are previewed on <a href="https://github.com/" title="Visit GitHub.com">GitHub.com</a>, and <em>does not</em> imply any type of endorsement by, or affiliation to GitHub Inc. or any of its products — it’s “GitHub” as in “GitHubbish”, or GitHub-style.</p>
<p>GITHUB® in an exclusive trademark registered in the United States by <a href="https://github.com/about" title="About GitHub, Inc.">GitHub, Inc.</a></p>
</div>
</div>
</header>
<hr>
<nav id="TOC">
<h1 class="toc-title">Contents</h1>
<ul>
<li><a href="#features">Features</a>
<ul>
<li><a href="#requirements">Requirements</a></li>
</ul></li>
<li><a href="#standard-typography">Standard Typography</a>
<ul>
<li><a href="#lists">Lists</a>
<ul>
<li><a href="#ordered-lists">Ordered Lists</a></li>
<li><a href="#bullet-lists">Bullet Lists</a></li>
<li><a href="#task-lists">Task Lists</a></li>
</ul></li>
<li><a href="#definition-lists">Definition lists</a></li>
<li><a href="#tables">Tables</a></li>
<li><a href="#source-code-blocks">Source Code Blocks</a></li>
</ul></li>
<li><a href="#pandoc-markdown">Pandoc Markdown</a>
<ul>
<li><a href="#line-blocks">Line Blocks</a></li>
</ul></li>
<li><a href="#gfm-features">GFM Features</a>
<ul>
<li><a href="#inline-text-elements">Inline text elements</a></li>
</ul></li>
<li><a href="#githubs-primer-css-features">GitHub’s Primer-CSS Features</a>
<ul>
<li><a href="#alerts">Alerts</a>
<ul>
<li><a href="#creating-alerts-via-fenced-divs">Creating Alerts Via Fenced-Divs</a></li>
<li><a href="#creating-alerts-via-pp-macros">Creating Alerts Via PP Macros</a></li>
</ul></li>
</ul></li>
<li><a href="#template-variables">Template Variables</a>
<ul>
<li><a href="#the-summary-variable">The <code>$summary$</code> Variable</a></li>
<li><a href="#the-charset-variable">The <code>$charset$</code> Variable</a></li>
</ul></li>
</ul>
</nav>
<hr>
<h1 id="features">Features</h1>
<p>This is a fully stand-alone pandoc HTML5 template (embedded CSS stylesheet). It’s ideal for creating single-file documentation for projects, even on <a href="https://pages.github.com/" title="More info on GitHub Pages">GitHub Pages</a>.</p>
<p>The template mimicks the look and feel of <a href="https://github.com/">GitHub</a> documents previews — no 100% accuracy, just the GitHubbish feel. GitHub’s styling has changed over the course of time; this template picks and chooses from older and newer versions of GitHub’s styles and color schemes, according to the author preferences.</p>
<p><strong>CSS Styling</strong> — This template supports styling for:</p>
<ul>
<li>all standard markdown elements</li>
<li><a href="#pandoc-markdown">pandoc-flavoured markdown</a></li>
<li><a href="#gfm-features">GitHub flavored markdown elements</a></li>
<li>some of <a href="#githubs-primer-css-features">GitHub’s Primer-CSS advanced styles</a></li>
<li>PP Macros from the “<strong><a href="https://github.com/tajmone/pandoc-goodies/tree/master/pp" title="Go to the Pandoc-Goodies PP-Macros Library">Pandoc-Goodies PP-Macros Library</a></strong>” project</li>
</ul>
<p><strong>Template Variables</strong> — This template supports all the standard pandoc template variables, plus some <a href="#template-variables">custom variables</a> for additional features (eg: <code>introduction</code> to show some text before the TOC, and <code>$toc-title$</code>).</p>
<h2 id="requirements">Requirements</h2>
<p>Minimum pandoc version required: v2.0</p>
<p>The template was originally adapted from the default html5 template that shipped with <mark><strong>pandoc v1.19.2.1</strong></mark> and then adapted to work with <mark><strong>pandoc v2.0.2</strong></mark> (introducing backward-compatibility breaking changes).</p>
<h1 id="standard-typography">Standard Typography</h1>
<p>Lorem markdownum stagna <em>de spatiantes</em> mirabatur <strong>arboribus at nunc</strong>, somnus sanguine quosque <del>genusque addenda socia</del>.<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a> <mark>Plus ipsisque latent</mark>, genus, medio aut rima haberet.</p>
<p>Quem palluerat, vulgaris pignora: <kbd>Crtl</kbd>+<kbd>Z</kbd>.<a href="#fn2" class="footnote-ref" id="fnref2" role="doc-noteref"><sup>2</sup></a></p>
<h1>
H1 Heading
</h1>
<h2>
H2 Heading
</h2>
<h3>
H3 Heading
</h3>
<h4>
H4 Heading
</h4>
<h5>
H5 Heading
</h5>
<h6>
H6 Heading
</h6>
<blockquote>
<p>Et vult Ulixe nec mater moras veluti spatio omnia sub quemque ripas ubi. Nil non, sub nec, ubi ferant deus pacis Turni, parentum.</p>
<blockquote>
<p>Ut nobis Ampycides esset indigenae eiecit domini successibus Aiaci tecta nunc terris, Argolica videres est neque. Aeacides caloris, magna canes.<a href="#fn3" class="footnote-ref" id="fnref3" role="doc-noteref"><sup>3</sup></a></p>
</blockquote>
</blockquote>
<h2 id="lists">Lists</h2>
<h3 id="ordered-lists">Ordered Lists</h3>
<ol type="1">
<li>Nec et tormenta tacitae decet aethere</li>
<li>Nullamque corpus
<ol type="1">
<li>Sic nunc naides dubiis</li>
<li>Virgo forti ardent</li>
<li>Dic pro captantur exitus quo viris infera</li>
</ol></li>
<li>Adit Symplegadas inque</li>
</ol>
<h3 id="bullet-lists">Bullet Lists</h3>
<ul>
<li>Dic pro captantur exitus quo viris infera</li>
<li>Humanam tenderet
<ul>
<li>Est esset devoveas</li>
<li>Adit Symplegadas inque</li>
</ul></li>
<li>Lelex ad ira</li>
<li>Inpositus cum genus extulit nec inseris ille</li>
</ul>
<h3 id="task-lists">Task Lists</h3>
<ul class="task-list">
<li><input type="checkbox" disabled="" checked="" />
Nec et tormenta tacitae decet aethere</li>
<li><input type="checkbox" disabled="" />
Nullamque corpus<ul class="task-list">
<li><input type="checkbox" disabled="" checked="" />
Sic nunc naides dubiis</li>
<li><input type="checkbox" disabled="" />
Virgo forti ardent</li>
</ul></li>
</ul>
<h2 id="definition-lists">Definition lists</h2>
<dl>
<dt>Term 1</dt>
<dd><p>Definition 1</p>
</dd>
<dt>Term 2 with <mark>inline markup</mark></dt>
<dd><p>Definition 2</p>
<p>Hora sequantur <em>nimium exiguis et</em> in fit coniuge aures, adfuit.</p>
<p>Ut sentesflumen, mea ira, et ubi manus silicem.</p>
</dd>
</dl>
<h2 id="tables">Tables</h2>
<table>
<thead>
<tr class="header">
<th>Header 1</th>
<th>Header 2</th>
<th>Header 3</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Cell</td>
<td><em>Cell</em></td>
<td><strong>Cell</strong></td>
</tr>
<tr class="even">
<td><code>Cell</code></td>
<td>Cell</td>
<td>Cell</td>
</tr>
<tr class="odd">
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
</tr>
</tbody>
</table>
<h2 id="source-code-blocks">Source Code Blocks</h2>
<div class="sourceCode" id="cb1"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true"></a><span class="co">#!/usr/bin/env python</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true"></a><span class="co">"""</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true"></a><span class="co">Print the Fibonacci Sequence to output.</span></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true"></a><span class="co">By Alex E. Rodriguez; public domain:</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true"></a><span class="co">https://github.com/arodriguez23434/arodriguez_2016_fibonacci</span></span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true"></a><span class="co">"""</span></span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true"></a><span class="kw">def</span> fibo(<span class="bu">int</span>):</span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true"></a> <span class="co">#Indices 0 & 1 are pre-set; Addition begins at index 2</span></span>
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true"></a> fibo_list <span class="op">=</span> [<span class="dv">0</span>,<span class="dv">1</span>]<span class="op">;</span></span>
<span id="cb1-10"><a href="#cb1-10" aria-hidden="true"></a> <span class="cf">for</span> i <span class="kw">in</span> <span class="bu">range</span>(<span class="dv">2</span>,<span class="bu">int</span>):</span>
<span id="cb1-11"><a href="#cb1-11" aria-hidden="true"></a> <span class="co">#Add previous sum to previous largest integer: (a+b)=sum -> (b+sum)=new_sum -> ... then append to list</span></span>
<span id="cb1-12"><a href="#cb1-12" aria-hidden="true"></a> fibo_list.append(fibo_list[i<span class="op">-</span><span class="dv">2</span>]<span class="op">+</span>fibo_list[i<span class="op">-</span><span class="dv">1</span>])<span class="op">;</span></span>
<span id="cb1-13"><a href="#cb1-13" aria-hidden="true"></a> <span class="cf">return</span> fibo_list<span class="op">;</span></span>
<span id="cb1-14"><a href="#cb1-14" aria-hidden="true"></a></span>
<span id="cb1-15"><a href="#cb1-15" aria-hidden="true"></a><span class="bu">print</span>(fibo(<span class="dv">100</span>))<span class="op">;</span> <span class="co">#Print list</span></span></code></pre></div>
<div class="Alert">
<p><strong>HIGHLIGHT-STYLE</strong> — Source code is highlighted using either pandoc’s default style (<code>pygments</code>) or the style set at invocation by the <code>--highlight-style=STYLE|FILE</code> option. This document uses the <code>haddock</code> built-in style.</p>
<p>The template’s embedded CSS doesn’t define the syntax coloring style, leaving you the freedom to use your own style definition files or pandoc’s built-in styles.</p>
</div>
<h1 id="pandoc-markdown">Pandoc Markdown</h1>
<h2 id="line-blocks">Line Blocks</h2>
<div class="line-block">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</div>
<p><br />
</p>
<div class="Note">
<p><strong>NOTE</strong> — Pandoc v2.x no longer adds inline CSS to Line blocks, it assigns them the “<code>line-block</code>” class instead, leaving it up to the end-user to define it in the CSS stylesheet. This templates covers Line blocks style definitions.</p>
</div>
<h1 id="gfm-features">GFM Features</h1>
<h2 id="inline-text-elements">Inline text elements</h2>
<p>You can use the <code><mark></code> tag to <mark>highlight text</mark>.</p>
<p><del>This line of text is meant to be treated as deleted text.</del></p>
<p>Keystroke can be rendered with <code><key></code> tag: <kbd>Shift</kbd>+<kbd>U</kbd>; or by using the <code>!kbd</code> PP macro from the <a href="https://github.com/tajmone/pandoc-goodies/tree/master/pp#inline-formatting" title="More info about the Inline Formatting macros set">Inline Formatting macros set</a>, eg: <code>!kbd(Ctrl)(Alt)(Canc)</code> to output <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>Canc</kbd>.</p>
<h1 id="githubs-primer-css-features">GitHub’s Primer-CSS Features</h1>
<h2 id="alerts">Alerts</h2>
<p>Alerts (aka <em>flash messages</em>) are borrowed/inspired from <strong>Primer CSS</strong>, the library that handles all the styling of GitHub’s portal:</p>
<ul>
<li><a href="http://primercss.io/archive/alerts/" class="uri">http://primercss.io/archive/alerts/</a></li>
</ul>
<div class="Alert">
<p><strong>Alert</strong> — I’m the “Alert” alert!</p>
</div>
<div class="Warning">
<p><strong>Warning</strong> — I’m the “Warning” alert!</p>
</div>
<div class="Error">
<p><strong>Error</strong> — I’m the “Error” alert!</p>
</div>
<div class="Success">
<p><strong>Success</strong> — I’m the “Success” alert!</p>
</div>
<div class="Note">
<p><strong>Note</strong> — I’m the “Note” alert!</p>
</div>
<h3 id="creating-alerts-via-fenced-divs">Creating Alerts Via Fenced-Divs</h3>
<p>This templates emulates Primer’s Alerts via custom <code><div></code> classes (case-sensitive):</p>
<ul>
<li><code>.Alert</code> (blue)</li>
<li><code>.Warning</code> (yellow)</li>
<li><code>.Error</code> (red)</li>
<li><code>.Success</code> (green)</li>
<li><code>.Note</code> (grey)</li>
</ul>
<p>You can use the above class-names with pandoc’s new <a href="http://pandoc.org/MANUAL.html#extension-fenced_divs" title="More info about pandoc fenced-divs syntax">fenced-divs</a> syntax to display alerts in your documents:</p>
<pre><code>::::: Warning :::::::::::::::::::::::::::::::::::::::::
**BEWARE** --- The grey `.Note` alert is a our own
addition, it's not part of Primer-CSS' original Alerts!
:::::::::::::::::::::::::::::::::::::::::::::::::::::::
</code></pre>
<p>… result:</p>
<div class="Warning">
<p><strong>BEWARE</strong> — The grey <code>.Note</code> alert is a our own addition, it’s not part of Primer-CSS’ original Alerts!</p>
</div>
<h3 id="creating-alerts-via-pp-macros">Creating Alerts Via PP Macros</h3>
<p>Alternatively, you can create alerts using the PP macros from the <a href="https://github.com/tajmone/pandoc-goodies/tree/master/pp#github-alerts" title="More info about the Alerts macros set">GitHub Alerts macros set</a>:</p>
<ul>
<li><code>!GFMAlert( CONTENTS )</code> — <strong>Alert</strong> (blue)</li>
<li><code>!GFMError( CONTENTS )</code> — <strong>Warning</strong> (red)</li>
<li><code>!GFMWarn( CONTENTS )</code> — <strong>Error</strong> (yellow)</li>
<li><code>!GFMSuccess( CONTENTS )</code> — <strong>Success</strong> (green)</li>
<li><code>!GFMAlertNote( CONTENTS )</code> — <strong>Note</strong> (grey)</li>
</ul>
<p>Example:</p>
<pre><code>!GFMAlert
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**ALERT** --- I'm an alert created using a PP macro from the
"GitHub Alerts" macros set.
I can contain __markdown__ formatting and <mark>my contents
may span over multiple paragraphs</mark>.
Any kind of markdown element and block may be placed inside
`GFMAlert` macros:
- Apples
- Bananas
- Oranges
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</code></pre>
<p>… result:</p>
<div class="Alert">
<p><strong>ALERT</strong> — I’m an alert created using a PP macro from the “GitHub Alerts” macros set.</p>
<p>I can contain <strong>markdown</strong> formatting and <mark>my contents may span over multiple paragraphs</mark>.</p>
<p>Any kind of markdown element and block may be placed inside <code>GFMAlert</code> macros:</p>
<ul>
<li>Apples</li>
<li>Bananas</li>
<li>Oranges</li>
</ul>
</div>
<p>These are the different type of alerts available, along with the custom pp-macros used generate them:</p>
<div class="Alert">
<p><strong>Alert</strong> — Created with the <code>!GFMAlert()</code> PP macro.</p>
</div>
<div class="Warning">
<p><strong>Warning</strong> — Created with the <code>!GFMWarn()</code> PP macro.</p>
</div>
<div class="Error">
<p><strong>Error</strong> — Created with the <code>!GFMError()</code> PP macro.</p>
</div>
<div class="Success">
<p><strong>Success</strong> — Created with the <code>!GFMSuccess()</code> PP macro.</p>
</div>
<div class="Note">
<p><strong>Note</strong> — Created with the <code>!GFMAlertNote()</code> PP macro.</p>
</div>
<h1 id="template-variables">Template Variables</h1>
<p>Beside supporting all the standard pandoc template variables (pandoc v2.0.2), some extra variables were added to the template to allow finer customization.</p>
<table>
<colgroup>
<col style="width: 16%" />
<col style="width: 70%" />
<col style="width: 13%" />
</colgroup>
<thead>
<tr class="header">
<th>VAR NAME</th>
<th>DESCRIPTION</th>
<th>DEFAULT</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><code>$summary$</code></td>
<td>A block of text that will be displayed right before the TOC.<br /> Wrapped in <code><div class="summary"></code>.</td>
<td>empty</td>
</tr>
<tr class="even">
<td><code>$toc-title$</code></td>
<td>Title for Table of Contents.</td>
<td><code>Contents</code></td>
</tr>
<tr class="odd">
<td><code>$charset$</code></td>
<td>Override document encoding.</td>
<td><code>utf-8</code></td>
</tr>
</tbody>
</table>
<h2 id="the-summary-variable">The <code>$summary$</code> Variable</h2>
<p>The <code>$summary$</code> text belongs to the <code><header></code> block, so it won’t be displayed unless <em>title</em> was definied. It will be placed after <em>authors</em> and <em>date</em>, and right before <em>Table of Contentes</em>. It will parsed as markdown, so it offers an easy way to add introductiory text directly in the document’s YAML header.</p>
<p>You can see an example of the <code>$summary$</code> var at work right in this page.</p>
<h2 id="the-charset-variable">The <code>$charset$</code> Variable</h2>
<p>I’ve added the <code>$charset$</code> variable because I was having trouble using the template inside the WebBrowser Control in a Windows application I created (a markdown file previewer that uses pandoc and this template to quickly render an html preview via WebBrowser Control). The programming language I used would only allow injecting HTML into the WebBrowser Control as UCS-2 enconded Unicode strings, even if pandoc’s output was captured as UTF-8 — ie., while I/O operations allow using different encondings, all internal string operations are restricted to UCS-2.</p>
<p>The problem was fixed by setting <code>$charset$</code> to <code>windows-1251</code> when invoking pandoc from my Windows application (command line option <code>-V charset=windows-1251</code>), as the actual document presented to the WebBrowser Control would no longer be in UTF-8 but in UCS-2 due to internal conversion.</p>
<p>Therefore I thought that there might be other scenarios which might require overriding the default charset encoding of the template because of encoding conversions occuring in a toolchain, protocol transmissions, or whatever. Even though UTF-8 is now the standard enconding for most source and output files when it comes to markdown and HTML, having this optional template variable allows handling edge cases.</p>
<section class="footnotes" role="doc-endnotes">
<hr />
<ol>
<li id="fn1" role="doc-endnote"><p>Nec opus caecoque frondibus fervet.<a href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn2" role="doc-endnote"><p>Hora sequantur <em>nimium exiguis et</em> in fit coniuge aures, adfuit.<a href="#fnref2" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn3" role="doc-endnote"><p>Turni, parentum. Ut nobis Ampycides esset indigenae eiecit domini successibus Aiaci tecta nunc terris, Argolica videres est neque. Aeacides caloris, magna canes.<a href="#fnref3" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>
</article>
</body>
</html>