-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathindex.html
More file actions
1283 lines (1276 loc) · 65 KB
/
Copy pathindex.html
File metadata and controls
1283 lines (1276 loc) · 65 KB
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
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc-markdown-css-theme" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<meta name="author" content="@jez" />
<meta name="dcterms.date" content="2021-06-25" />
<title>Kitchen Sink code</title>
<link rel="stylesheet" href="../css/theme.css" />
<link rel="stylesheet" href="../css/skylighting-solarized-theme.css" />
<script defer="" src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.js"></script>
<script>document.addEventListener("DOMContentLoaded", function () {
var mathElements = document.getElementsByClassName("math");
var macros = [];
for (var i = 0; i < mathElements.length; i++) {
var texText = mathElements[i].firstChild;
if (mathElements[i].tagName == "SPAN") {
katex.render(texText.data, mathElements[i], {
displayMode: mathElements[i].classList.contains('display'),
throwOnError: false,
macros: macros,
fleqn: false
});
}}});
</script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.css" />
</head>
<body>
<header>
<h1 class="title">Kitchen Sink <code>code</code></h1>
<blockquote class="metadata">
<p class="subtitle">“Everything but the kitchen sink.”</p>
<p class="author">
<a href="https://github.com/jez"><span class="citation" data-cites="jez">@jez</span></a>
</p>
<p class="date before-toc"><time datetime="2021-06-25">2021-06-25</time></p>
</blockquote>
</header>
<nav id="TOC" role="doc-toc">
<a href="..">← Return home</a><br>
<strong>Contents</strong><label for="contents">⊕</label>
<input type="checkbox" id="contents">
<ul>
<li><a href="#prose" id="toc-prose">Prose</a></li>
<li><a href="#math" id="toc-math">Math</a></li>
<li><a href="#headings" id="toc-headings">Headings</a>
<ul>
<li><a href="#smaller-heading" id="toc-smaller-heading">Smaller heading</a>
<ul>
<li><a href="#even-smaller-heading-code" id="toc-even-smaller-heading-code">Even smaller heading <code>code</code></a></li>
<li><a href="#really-long-heading-that-takes-up-nearly-the-full-main-width-of-the-page." id="toc-really-long-heading-that-takes-up-nearly-the-full-main-width-of-the-page.">Really long heading that takes up nearly the full main width of the page.</a></li>
</ul></li>
</ul></li>
<li><a href="#level-1-heading-code" id="toc-level-1-heading-code">Level 1 heading <code>code</code></a>
<ul>
<li><a href="#level-2-heading-code" id="toc-level-2-heading-code">Level 2 heading <code>code</code></a></li>
<li><a href="#another-level-2-heading" id="toc-another-level-2-heading">Another level 2 heading</a></li>
</ul></li>
<li><a href="#lists" id="toc-lists">Lists</a>
<ul>
<li><a href="#list-after-heading" id="toc-list-after-heading">List after heading</a></li>
<li><a href="#paragraph-list-after-heading" id="toc-paragraph-list-after-heading">Paragraph list after heading</a></li>
</ul></li>
<li><a href="#code-blocks" id="toc-code-blocks">Code blocks</a></li>
<li><a href="#block-quotes" id="toc-block-quotes">Block quotes</a></li>
<li><a href="#colored-notes" id="toc-colored-notes">Colored notes</a></li>
<li><a href="#side-notes" id="toc-side-notes">Side notes</a>
<ul>
<li><a href="#block-margin-notes" id="toc-block-margin-notes">Block margin notes</a></li>
</ul></li>
<li><a href="#images" id="toc-images">Images</a></li>
<li><a href="#tables" id="toc-tables">Tables</a></li>
</ul>
</nav>
<main>
<p>This project provides CSS files and a template for using Pandoc to generate standalone HTML files. It supports most features Pandoc Markdown has to offer, and some extras. The default look can be tweaked via CSS variables, and it does not need JavaScript, even for side notes.</p>
<h1 id="prose">Prose</h1>
<p>This is some body text between headings. This project provides CSS files and a template for using Pandoc to generate standalone HTML files. It supports most features Pandoc Markdown has to offer, and some extras. The default look can be tweaked via CSS variables, and it does not need JavaScript, even for side notes.</p>
<p>This is some <strong>body text between headings</strong>. This project provides CSS files and a template for using Pandoc to generate <em>standalone HTML files</em>. It supports most features <strong>Pandoc Markdown</strong> has to offer, and some extras. The default look can be <em>tweaked via CSS variables</em>, and it does not ~need JavaScript, even for side notes.</p>
<p>This project <span class="smallcaps">provides CSS files</span> and a template for using Pandoc to generate standalone HTML files. It supports most features <span class="smallcaps"><strong>Pandoc Markdown</strong></span> has to offer, and some <span class="smallcaps"><em>extras</em></span>. The default look can be <u>tweaked via CSS</u> variables, and it does not need JavaScript, <del>even for side notes</del>.</p>
<p>This is some <a href="#">body text</a> between headings. This project <code>provides CSS files</code> and a template for using <a href="#"><code>pandoc</code></a> to generate standalone HTML files. It supports most features Pandoc Markdown has to offer, and some extras. The <strong><a href="#">default</a></strong> look can be tweaked via <strong><em>CSS variables</em></strong>, and it does not need JavaScript, even for side notes.</p>
<p>“Hanging punctuation” is really nice.<br />
Unfortunately it’s only supported in Safari on iOS and macOS.<br />
“Does it work after line breaks,” or just at the block start?</p>
<hr />
<p>Horizontal rules, too!</p>
<hr />
<h1 id="math">Math</h1>
<p>There’s inline math: <span class="math inline">a^2 + b^2 = c^2</span>, and block math:</p>
<p><span class="math display">60 \, \frac{\textrm{seconds}}{\textrm{minute}} \cdot 60 \, \frac{\textrm{minutes}}{\textrm{hour}} = 3,600 \, \frac{\textrm{seconds}}{\textrm{hour}}</span></p>
<p><span class="math display">\frac{
\Delta \, \Gamma, e : \forall (u :: \kappa). \tau \qquad \Delta \vdash c :: \kappa
}{
\Delta \, \Gamma \vdash e[c] : [c/u]\tau
}</span></p>
<figure class="wide">
<p><span class="math display">\frac{
\Delta \, \Gamma, e : \forall (u :: \kappa). \tau \qquad \Delta \vdash c :: \kappa
}{
\Delta \, \Gamma \vdash e[c] : [c/u]\tau
}</span></p>
<figcaption>
Typing rule for ∀ types
</figcaption>
</figure>
<figure class="wide extra-wide">
<p><span class="math display">\frac{
\Delta, u :: \kappa \vdash c :: \kappa’
}{
\Delta \vdash \lambda(u :: \kappa). \, c :: \kappa \to \kappa’
}\;(\texttt{lambda-kind}) \quad \frac{
\Delta, u :: \kappa \vdash c :: *
}{
\Delta \vdash \forall(u :: \kappa). \, c :: *
}\;(\texttt{forall-kind})</span></p>
<figcaption>
Kind rules for two type constructors in System F<sub>ω</sub>. This text is long enough that it wraps on some screens.
</figcaption>
</figure>
<figure class="wide extra-wide left-align-caption">
<p><span class="math display">\frac{
\Delta, u :: \kappa \vdash c :: \kappa’
}{
\Delta \vdash \lambda(u :: \kappa). \, c :: \kappa \to \kappa’
}\;(\texttt{lambda-kind}) \quad \frac{
\Delta, u :: \kappa \vdash c :: *
}{
\Delta \vdash \forall(u :: \kappa). \, c :: *
}\;(\texttt{forall-kind})</span></p>
<figcaption>
This caption will be forcibly left-aligned.
</figcaption>
</figure>
<figure class="wide full-width">
<p><span class="math display">\frac{
\Delta, u :: \kappa_1 \vdash c_2 :: \kappa_2 \qquad \Delta \vdash c_1
:: \kappa_1
}{
\Delta \vdash (\lambda(u :: \kappa_1). \, c_2)(c_1) \equiv [c_1/u]c_2 :: \kappa_2
} \quad \frac{
\Delta, u :: \kappa_1 \vdash c_2 :: \kappa_2 \qquad \Delta \vdash c_1
:: \kappa_1
}{
\Delta \vdash (\lambda(u :: \kappa_1). \, c_2)(c_1) \equiv [c_1/u]c_2 :: \kappa_2
} \quad \frac{
\Delta, u :: \kappa_1 \vdash c_2 :: \kappa_2 \qquad \Delta \vdash c_1
:: \kappa_1
}{
\Delta \vdash (\lambda(u :: \kappa_1). \, c_2)(c_1) \equiv [c_1/u]c_2 :: \kappa_2
} \\ \quad \\ \frac{
\Delta \, \Gamma, e : \forall (u :: \kappa). \tau \qquad \Delta \vdash c :: \kappa
}{
\Delta \, \Gamma \vdash e[c] : [c/u]\tau
} \quad \frac{
\quad
}{
(\Lambda u. \, e)[\tau] \mapsto [\tau / u]e
}</span></p>
<figcaption>
Assorted rules from statics and dynamics of System<sub>ω</sub>
</figcaption>
</figure>
<h1 id="headings">Headings</h1>
<p>This is some body text between headings. This project provides CSS files and a template for using Pandoc to generate standalone HTML files. It supports most features Pandoc Markdown has to offer, and some extras. The default look can be tweaked via CSS variables, and it does not need JavaScript, even for side notes.</p>
<h2 id="smaller-heading">Smaller heading</h2>
<p>This is some body text between headings. This project provides CSS files and a template for using Pandoc to generate standalone HTML files. It supports most features Pandoc Markdown has to offer, and some extras. The default look can be tweaked via CSS variables, and it does not need JavaScript, even for side notes.</p>
<h3 id="even-smaller-heading-code">Even smaller heading <code>code</code></h3>
<p>This is some body text between headings. This project provides CSS files and a template for using Pandoc to generate standalone HTML files. It supports most features Pandoc Markdown has to offer, and some extras. The default look can be tweaked via CSS variables, and it does not need JavaScript, even for side notes.</p>
<h3 id="really-long-heading-that-takes-up-nearly-the-full-main-width-of-the-page.">Really long heading that takes up nearly the full main width of the page.</h3>
<p>This heading can make the side nav bar overflow the container.</p>
<h4 id="there-is-no-level-4-heading">There is no level 4 heading</h4>
<h1 id="level-1-heading-code">Level 1 heading <code>code</code></h1>
<h2 id="level-2-heading-code">Level 2 heading <code>code</code></h2>
<p>This is some body text between headings. This project provides CSS files and a template for using Pandoc to generate standalone HTML files. It supports most features Pandoc Markdown has to offer, and some extras. The default look can be tweaked via CSS variables, and it does not need JavaScript, even for side notes.</p>
<h2 id="another-level-2-heading">Another level 2 heading</h2>
<p>This is some body text between headings. This project provides CSS files and a template for using Pandoc to generate standalone HTML files. It supports most features Pandoc Markdown has to offer, and some extras. The default look can be tweaked via CSS variables, and it does not need JavaScript, even for side notes.</p>
<h1 id="lists">Lists</h1>
<p>This is some body text between lists. It takes up the full width of the line, but only just barely.</p>
<ul>
<li>Level 1
<ul>
<li>Level 2
<ul>
<li>Level 3
<ul>
<li>Level 4
<ul>
<li>Level 5
<ul>
<li>Level 6</li>
</ul></li>
</ul></li>
</ul></li>
</ul></li>
</ul></li>
</ul>
<p>This is some body text between lists. It takes up the full width of the line, but only just barely.</p>
<ol type="1">
<li>Level 1
<ol type="1">
<li>Level 2
<ol type="1">
<li>Level 3
<ol type="1">
<li>Level 4
<ol type="1">
<li>Level 5
<ol type="1">
<li>Level 6</li>
</ol></li>
</ol></li>
</ol></li>
</ol></li>
</ol></li>
</ol>
<p>This is some body text between lists. It takes up the full width of the line, but only just barely.</p>
<ul>
<li>Prose</li>
<li>Headings</li>
<li>Lists</li>
<li>Code blocks</li>
</ul>
<p>This is some body text between lists. It takes up the full width of the line, but only just barely.</p>
<ol type="1">
<li>This list</li>
<li>has ten</li>
<li>items which</li>
<li>causes it</li>
<li>to push</li>
<li>the numbers</li>
<li>further left</li>
<li>which extends</li>
<li>the numbers</li>
<li>into the</li>
<li>page margin.</li>
</ol>
<p>This is some body text between lists. This project provides CSS files and a template for using Pandoc to generate standalone HTML files. It supports most features Pandoc Markdown has to offer, and some extras.</p>
<ul>
<li>Line starts with a short bullet point
<ul>
<li>Next line starts with a longer bullet point that wraps around at larger screen sizes because there’s so much text.</li>
</ul></li>
<li>Line starts with a short bullet point
<ul>
<li>Next line starts with a longer bullet point that wraps around at larger screen sizes because there’s so much text.</li>
</ul></li>
</ul>
<p>This is some body text between lists. This project provides CSS files and a template for using Pandoc to generate standalone HTML files. It supports most features Pandoc Markdown has to offer, and some extras.</p>
<ol type="1">
<li>Line starts with a short bullet point
<ol type="1">
<li>First line<br> Next line</li>
</ol></li>
<li>Notice how the line numbers are <strong>tabular numbers</strong>, not proportional.
<ul>
<li>First line, <strong>switch to bullet</strong><br />
Next line</li>
</ul></li>
</ol>
<p>This is some body text between lists. This project provides CSS files and a template for using Pandoc to generate standalone HTML files. It supports most features Pandoc Markdown has to offer, and some extras.</p>
<ul class="task-list">
<li><label><input type="checkbox" />Line starts with a short bullet point</label>
<ul class="task-list">
<li><label><input type="checkbox" />First line<br />
Next line</label></li>
</ul></li>
<li><label><input type="checkbox" checked="" />Line starts with a short bullet point</label>
<ul class="task-list">
<li><label><input type="checkbox" checked="" />First line, <strong>checklists are different by browser, even on same OS</strong><br />
Next line</label></li>
</ul></li>
</ul>
<p>This is some body text between lists. This project provides CSS files and a template for using Pandoc to generate standalone HTML files.</p>
<ul>
<li>List item before <strong>should line up</strong> with check box after</li>
</ul>
<!-- force break -->
<ul class="task-list">
<li><label><input type="checkbox" />First is unchecked<br />
Next line</label></li>
<li><label><input type="checkbox" checked="" />Last is checked<br />
</label></li>
</ul>
<!-- force break -->
<ol type="1">
<li>List item after <strong>should line up</strong> with check box before</li>
</ol>
<p>This is some body text between lists. This project provides CSS files and a template for using Pandoc to generate standalone HTML files.</p>
<ul>
<li><p><strong>Common list structure</strong></p>
<p>Is to have a bold title of the list, with some body text on the same bullet point (multiple paragraphs). The text in the “body” wraps onto multiple lines.</p></li>
<li><p><strong>Pandoc implementation</strong></p>
<p>For this technique, the top-level list items have to be separated by new lines. That’s what gets Pandoc to put paragraph tags in the list item bodies.</p></li>
</ul>
<p>This is some body text between lists. This project provides CSS files and a template for using Pandoc to generate standalone HTML files.</p>
<ul>
<li>First item, first list</li>
<li>Second item, first list</li>
</ul>
<!-- comment to force list break -->
<ul>
<li>First item, second list</li>
<li>Second item, second list</li>
</ul>
<p><a href="#">→ Looks like a list</a><br />
<a href="#">→ Not actually a list</a></p>
<h2 id="list-after-heading">List after heading</h2>
<ul>
<li>First list item</li>
<li>Middle list item</li>
<li>Last list item</li>
</ul>
<h2 id="paragraph-list-after-heading">Paragraph list after heading</h2>
<ul>
<li><p>First list item</p></li>
<li><p>Middle list item</p></li>
<li><p>Last list item</p></li>
</ul>
<h1 id="code-blocks">Code blocks</h1>
<p>Ah yes, who could forget about the code blocks.</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode numberSource ruby numberLines hl-7 hl-8 hl-9 hl-10"><code class="sourceCode ruby"><span id="cb1-1"><a href="#cb1-1"></a><span class="co"># typed: true</span></span>
<span id="cb1-2"><a href="#cb1-2"></a><span class="fu">require</span> <span class="vs">'sorbet-runtime'</span></span>
<span id="cb1-3"><a href="#cb1-3"></a></span>
<span id="cb1-4"><a href="#cb1-4"></a><span class="cf">class</span> <span class="cn">A</span></span>
<span id="cb1-5"><a href="#cb1-5"></a> <span class="fu">extend</span> <span class="cn">T</span><span class="op">::</span><span class="dt">Sig</span></span>
<span id="cb1-6"><a href="#cb1-6"></a></span>
<span id="cb1-7"><a href="#cb1-7"></a> sig <span class="op">{</span>void<span class="op">}</span></span>
<span id="cb1-8"><a href="#cb1-8"></a> <span class="cf">def</span> <span class="dv">self</span><span class="at">.main</span></span>
<span id="cb1-9"><a href="#cb1-9"></a> <span class="fu">puts</span> <span class="st">"Hello, world!"</span></span>
<span id="cb1-10"><a href="#cb1-10"></a> <span class="cf">end</span></span>
<span id="cb1-11"><a href="#cb1-11"></a><span class="cf">end</span></span></code></pre></div>
<p>Here is a short paragraph between code blocks.</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode numberSource ruby numberLines"><code class="sourceCode ruby"><span id="cb2-1"><a href="#cb2-1"></a><span class="co"># This is a really long line that causes the text to wrap onto multiple lines in a code block that uses syntax highlighting AND line numbers.</span></span></code></pre></div>
<div class="sourceCode" id="cb3"><pre class="sourceCode ruby"><code class="sourceCode ruby"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="fu">puts</span> <span class="vs">'It should also work without line numbers.'</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="co"># This is a really long line that causes the text to wrap onto multiple lines in a code block that uses syntax highlighting BUT NOT line numbers.</span></span></code></pre></div>
<p>Check out the subtle line numbers. This is <code>some inline code</code> with text after it.</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode numberSource numberLines hl-1"><code class="sourceCode"><span id="cb4-1"><a href="#cb4-1"></a>This code does not have a language associated with it. This is the point at which the code would wrap a long line.</span>
<span id="cb4-2"><a href="#cb4-2"></a></span>
<span id="cb4-3"><a href="#cb4-3"></a>Some more lines to make Paper give us line numbers.</span>
<span id="cb4-4"><a href="#cb4-4"></a>Some more lines to make Paper give us line numbers.</span>
<span id="cb4-5"><a href="#cb4-5"></a>Some more lines to make Paper give us line numbers.</span>
<span id="cb4-6"><a href="#cb4-6"></a>Some more lines to make Paper give us line numbers.</span></code></pre></div>
<pre><code>This code does not have a language associated with it. This is the point at which the code would wrap a long line.
┌┐
└┘</code></pre>
<pre class="tight-code"><code>This is tight code in action.
This is tight code in action.
┌┐
└┘
This is tight code in action.
This is tight code in action.</code></pre>
<figure>
<div class="sourceCode" id="cb7"><pre class="sourceCode ruby"><code class="sourceCode ruby"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a>source <span class="vs">'https://rubygems.org'</span></span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a>gem <span class="vs">'sorbet'</span></span>
<span id="cb7-4"><a href="#cb7-4" aria-hidden="true" tabindex="-1"></a>gem <span class="vs">'sorbet-runtime'</span></span></code></pre></div>
<figcaption>
<code>Gemfile</code>
</figcaption>
</figure>
<p>This is a paragraph before the <code>.wide > .sourceCode</code> block that follows.</p>
<figure class="wide left-align-caption">
<div class="sourceCode" id="cb8"><pre class="sourceCode numberSource numberLines hl-3"><code class="sourceCode"><span id="cb8-1"><a href="#cb8-1"></a>This code block has an absolutely large amount of text in it for who knows what reason. Who is the kind of heathen who would willfully write code with lines this long?</span>
<span id="cb8-2"><a href="#cb8-2"></a></span>
<span id="cb8-3"><a href="#cb8-3"></a>Scroll → all the way to the left to double check that this line highlight works.</span>
<span id="cb8-4"><a href="#cb8-4"></a></span>
<span id="cb8-5"><a href="#cb8-5"></a>← A current limitation is that `.wide` + `.numberLines` causes the line numbers to</span>
<span id="cb8-6"><a href="#cb8-6"></a>be hidden.</span></code></pre></div>
<figcaption>
This is the code block’s caption. Like many of the other captions on the page, it has a lot of text in it so that it’s forced to wrap eventually.
</figcaption>
</figure>
<p>This is the text after the fig caption. <strong>How is the gap</strong> between the figcaption and this text?</p>
<div class="wide">
<pre><code>F
Plain code block, no div.sourceCode, but it's wide so the text might wrap around a bit further than code is normally expected to.
L</code></pre>
</div>
<div class="sourceCode" id="cb10"><pre class="sourceCode diff"><code class="sourceCode diff"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a>❯ diff -u old.txt new.txt</span>
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a><span class="kw">--- old.txt 2022-02-27 22:15:29.475037186 -0800</span></span>
<span id="cb10-3"><a href="#cb10-3" aria-hidden="true" tabindex="-1"></a><span class="dt">+++ new.txt 2022-02-27 22:15:48.423040037 -0800</span></span>
<span id="cb10-4"><a href="#cb10-4" aria-hidden="true" tabindex="-1"></a><span class="dt">@@ -1,3 +1,3 @@</span></span>
<span id="cb10-5"><a href="#cb10-5" aria-hidden="true" tabindex="-1"></a><span class="st">-This is some text that we're going to diff.</span></span>
<span id="cb10-6"><a href="#cb10-6" aria-hidden="true" tabindex="-1"></a><span class="st">-This is another line of text.</span></span>
<span id="cb10-7"><a href="#cb10-7" aria-hidden="true" tabindex="-1"></a><span class="va">+This is some text that we're going to run diff on.</span></span>
<span id="cb10-8"><a href="#cb10-8" aria-hidden="true" tabindex="-1"></a> This is the last line of text in the file.</span>
<span id="cb10-9"><a href="#cb10-9" aria-hidden="true" tabindex="-1"></a><span class="va">+Just kidding, this is the actual last line of the file.</span></span></code></pre></div>
<pre class="hl-2"><code>This code block has no syntax highlighting and therefore,
line highlights cannot be used,
because the line-by-line spans will not get inserted by pandoc.</code></pre>
<pre class="plaintext hl-2"><code>Because pandoc does not recognize languages like plain or plaintext,
you can't even use that trick to get the spans to get inserted.
Thus if you want no syntax highlighting and line highlights,
the only option is to turn on line numbers with `.numberLines`</code></pre>
<div class="sourceCode" id="cb13"><pre class="sourceCode ruby hl-2"><code class="sourceCode ruby"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="cf">def</span> example</span>
<span id="cb13-2"><a href="#cb13-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">puts</span>(<span class="st">"this line is highlighted, even without .numberLines"</span>)</span>
<span id="cb13-3"><a href="#cb13-3" aria-hidden="true" tabindex="-1"></a><span class="cf">end</span></span></code></pre></div>
<h1 id="block-quotes">Block quotes</h1>
<blockquote>
<p>Block quote, right under heading.</p>
<p>Block quote, right under heading.</p>
</blockquote>
<p>A paragraph after the block quote separates it from the second block quote on the page.</p>
<blockquote>
<p>This block quote uses <strong>bold text</strong> and <em>italic text</em> in line one.<br />
It also uses <span class="smallcaps">small caps</span> and <span class="smallcaps"><strong>bold small caps</strong></span> in line two.<br />
It also uses <u>underlined text</u> and <a href="#">linked text</a> and <code>inline code text</code> in line three.</p>
<p>“Here’s an example” of hanging-punctuation,<br />
Followed by normal text again</p>
<p>— Someone famous</p>
</blockquote>
<p>The fun thing about markdown versus Dropbox Paper is that you can have lists in block quotes:</p>
<blockquote>
<ul>
<li>This is a list in a block quote.</li>
<li>This is a list in a block quote.</li>
</ul>
<!-- -->
<ul>
<li>This is a list in a block quote.</li>
<li>This is a list in a block quote.</li>
</ul>
</blockquote>
<h1 id="colored-notes">Colored notes</h1>
<p>There are inline highlights, with various colors:</p>
<ul>
<li>This is some <mark class="red">Red</mark> text.</li>
<li><mark class="yellow">Yellow</mark></li>
<li><mark class="green">Green</mark></li>
<li><mark class="blue">Blue</mark></li>
<li><mark class="purple">Purple</mark></li>
</ul>
<p>If you want you can also use HTML that’s a little more semantic:<br />
<mark class="yellow">the HTML mark tag</mark>.</p>
<p>There are also single-element, colored tables, which get treated as colored notes.</p>
<div class="note red">
<table>
<tbody>
<tr>
<td>🛑 Look before you leap!</td>
</tr>
</tbody>
</table>
</div>
<div class="note yellow">
<table>
<tbody>
<tr>
<td>⚠️ This is a warning!</td>
</tr>
</tbody>
</table>
</div>
<p>Hopefully this could just fall out if tables work well?</p>
<div class="note green">
<table>
<colgroup>
<col style="width: 100%" />
</colgroup>
<tbody>
<tr>
<td>✅ Success! The deed is now done.<br><br>Feel free to retry whatever it is you were trying to do.</td>
</tr>
</tbody>
</table>
</div>
<div class="note blue">
<table>
<tbody>
<tr>
<td>ℹ️ Consecutive notes are like consecutive tables.</td>
</tr>
</tbody>
</table>
</div>
<div class="note purple">
<table>
<tbody>
<tr>
<td>🔮 Can you see into the future?</td>
</tr>
</tbody>
</table>
</div>
<p>Might make sense to do these in terms of like divs but for now they’re tables.</p>
<h1 id="side-notes">Side notes</h1>
<p>Markdown footnotes become side notes.<span class="sidenote-wrapper"><label for="sn-0" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-0" class="margin-toggle"/><span class="sidenote">Is the beginning aligned?<br />
Is the beginning aligned?<br />
<br />
</span></span> Versus sup.<strong><sup>1</sup></strong> It would be neat to associate a range of text with a footnote, rather than a single point. The <strong>second side note baseline</strong> will not line up. If we wrap this third line all the way around, we can see how it behaves for longer lines as well. First: 1<sup>st</sup></p>
<p>Markdown footnotes become side notes.<span class="sidenote-wrapper"><label for="sn-1" class="margin-toggle">⊕</label><input type="checkbox" id="sn-1" class="margin-toggle"/><span class="marginnote">This is a margin note without a number. It spans just a few lines. Maybe it gets to three?<br />
<br />
</span></span> After the note. It would be neat to associate a range of text with a footnote, rather than a single point. This is longer text to give the paragraph some heft to it, so that the side note doesn’t feel overpowering.</p>
<p>Markdown footnotes become side notes.<span class="sidenote-wrapper"><label for="sn-2" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-2" class="margin-toggle"/><span class="sidenote">There’s <code>code</code> in this side note!<br />
<br />
</span></span> After the note. It would be neat to associate a range of text with a footnote, rather than a single point. The <strong>second side note baseline</strong> will not line up. If we wrap this third line all the way around, we can see how it behaves for longer lines as well.</p>
<p>Markdown footnotes become side notes.<span class="sidenote-wrapper"><label for="sn-3" class="margin-toggle">⊕</label><input type="checkbox" id="sn-3" class="margin-toggle"/><span class="marginnote">In this margin note, we’ve got quite a bit of text. It spans multiple so many lines that even in the Pandoc markdown source it spans multiple lines.<br />
<br />
It can have line breaks too. This should be a test of what happens when the margin note is more lines than the paragraph it’s commenting on.<br />
<br />
</span></span> After the note. This paragraph is not short, but the margin note next to us is much longer, which pushes the subsequent notes further away from their anchor. But also, footnotes.<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a></p>
<blockquote>
<p>Without doing anything else,<span class="sidenote-wrapper"><label for="sn-4" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-4" class="margin-toggle"/><span class="sidenote">This side note attaches to a <code>blockquote</code>. Why would that be any different? Not sure. We reset the <code>font-style</code> and that’s it.<br />
<br />
</span></span> side notes that attach to text inside a block quote would magically become italic, because they’d inherit the styles of the surrounding block quote. Luckily, we have a test for this case, and that does not to happen because we fixed it.</p>
</blockquote>
<p>Some text after the paragraph, to make sure that the inline and block sections don’t overlap with each other. Some text after the paragraph, to make sure that the inline and block sections don’t overlap with each other. Some text after the paragraph, to make sure that the inline and block sections don’t overlap with each other. Some text after the paragraph, to make sure that the inline and block sections don’t overlap with each other.</p>
<h2 id="block-margin-notes">Block margin notes</h2>
<div class="sidenote-wrapper">
<input type="checkbox" id="sn-5" class="margin-toggle"/>
<div class="marginnote">
<p>Should align with start of associated paragraph, despite being anchored to the end of the paragraph.</p>
</div>
</div>
<p>Markdown footnotes become side notes. After the note. It would be neat to associate a range of text with a footnote, rather than a single point. This is longer text to give the paragraph some heft to it, so that the side note doesn’t feel overpowering.<label for="sn-5" class="margin-toggle">⊕</label> Let’s make this paragraph even longer, so that it’s clear that the next two notes are fully independent of this note’s size.</p>
<div class="sidenote-wrapper">
<input type="checkbox" id="sn-6" class="margin-toggle"/>
<div class="marginnote">
<p>This block margin note is a bit longer, so that it wraps when shown in the margins. This block margin note is a bit longer, so that it wraps when shown in the margins.</p>
<p>It contains multiple paragraphs, where we want the paragraph break to be smaller than the gap between unrelated margin notes.</p>
</div>
</div>
<div class="sidenote-wrapper">
<input type="checkbox" id="sn-7" class="margin-toggle"/>
<div class="marginnote">
<p>The second block margin note in the same paragraph should get pushed down. The second block margin note in the same paragraph should get pushed down. The second block margin note in the same paragraph should get pushed down.</p>
</div>
</div>
<p>Markdown footnotes become side notes. After the note. It would be neat to associate a range of text with a footnote, rather than a single point. This is longer text to give the paragraph some heft to it, so that the side note doesn’t feel<label for="sn-6" class="margin-toggle">⊕</label> overpowering.<label for="sn-7" class="margin-toggle">⊕</label></p>
<div class="sidenote-wrapper">
<input type="checkbox" id="sn-8" class="margin-toggle"/>
<div class="marginnote">
<p>The first margin note in the following paragraph should also get pushed down.</p>
</div>
</div>
<p>Markdown footnotes become side notes.<label for="sn-8" class="margin-toggle">⊕</label></p>
<p>Spacer paragraph, so that the code block example resets back to normal. Spacer paragraph, so that the code block example resets back to normal. Spacer paragraph, so that the code block example resets back to normal. Spacer paragraph, so that the code block example resets back to normal. Spacer paragraph, so that the code block example resets back to normal.</p>
<p>Spacer paragraph, so that the code block example resets back to normal. Spacer paragraph, so that the code block example resets back to normal. Spacer paragraph, so that the code block example resets back to normal. Spacer paragraph, so that the code block example resets back to normal. Spacer paragraph, so that the code block example resets back to normal.</p>
<p>Spacer paragraph, so that the code block example resets back to normal. Spacer paragraph, so that the code block example resets back to normal. Spacer paragraph, so that the code block example resets back to normal. Spacer paragraph, so that the code block example resets back to normal. Spacer paragraph, so that the code block example resets back to normal.</p>
<div class="sidenote-wrapper">
<input type="checkbox" id="sn-9" class="margin-toggle"/>
<div class="sidenote">
<p>A block-based side note</p>
</div>
</div>
<p>The side note numbers should continue as normal.<label for="sn-9" class="margin-toggle sidenote-number"></label></p>
<div class="sidenote-wrapper">
<input type="checkbox" id="sn-10" class="margin-toggle"/>
<div class="sidenote">
<ul>
<li>There’s a list in here</li>
<li>With some elements</li>
</ul>
</div>
</div>
<div class="sidenote-wrapper">
<input type="checkbox" id="sn-11" class="margin-toggle"/>
<div class="sidenote">
<div class="sourceCode" id="cb14"><pre class="sourceCode ruby"><code class="sourceCode ruby"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="cf">def</span> hello; <span class="cf">end</span></span></code></pre></div>
</div>
</div>
<p>The side note numbers should continue as normal.<label for="sn-10" class="margin-toggle sidenote-number"></label> Even with multiple.<label for="sn-11" class="margin-toggle sidenote-number"></label></p>
<p>The side note numbers should continue as normal.</p>
<p>The side note numbers should work even if they get to double digits.<span class="sidenote-wrapper"><label for="sn-12" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-12" class="margin-toggle"/><span class="sidenote">Back to inline side note, should continue numbering.<br />
<br />
</span></span> <span class="sidenote-wrapper"><label for="sn-13" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-13" class="margin-toggle"/><span class="sidenote">Bump<br />
<br />
</span></span> <span class="sidenote-wrapper"><label for="sn-14" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-14" class="margin-toggle"/><span class="sidenote">Bump<br />
<br />
</span></span> <span class="sidenote-wrapper"><label for="sn-15" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-15" class="margin-toggle"/><span class="sidenote">Bump<br />
<br />
</span></span> <span class="sidenote-wrapper"><label for="sn-16" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-16" class="margin-toggle"/><span class="sidenote">Bump<br />
<br />
</span></span></p>
<p>Lots of spacer paragraphs.</p>
<p>Lots of spacer paragraphs.</p>
<p>Lots of spacer paragraphs.</p>
<p>Lots of spacer paragraphs.</p>
<div class="sidenote-wrapper">
<input type="checkbox" id="sn-17" class="margin-toggle"/>
<div class="marginnote">
<p>You can use code blocks. They must be four-space indented for pandoc to recognize them.</p>
<div class="sourceCode" id="cb15"><pre class="sourceCode ruby"><code class="sourceCode ruby"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="cf">def</span> main</span>
<span id="cb15-2"><a href="#cb15-2" aria-hidden="true" tabindex="-1"></a> <span class="co"># This is not marked .wide, so long lines will wrap instead of overflowing.</span></span>
<span id="cb15-3"><a href="#cb15-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">puts</span> <span class="st">"Hello, world!"</span></span>
<span id="cb15-4"><a href="#cb15-4" aria-hidden="true" tabindex="-1"></a><span class="cf">end</span></span></code></pre></div>
<div class="sourceCode" id="cb16"><pre class="sourceCode numberSource ruby numberLines hl-2"><code class="sourceCode ruby"><span id="cb16-1"><a href="#cb16-1"></a><span class="cf">def</span> main</span>
<span id="cb16-2"><a href="#cb16-2"></a> <span class="co"># This is not marked .wide, so long lines will wrap instead of overflowing.</span></span>
<span id="cb16-3"><a href="#cb16-3"></a> <span class="fu">puts</span> <span class="st">"Hello, world!"</span></span>
<span id="cb16-4"><a href="#cb16-4"></a><span class="cf">end</span></span></code></pre></div>
<div class="wide">
<div class="sourceCode" id="cb17"><pre class="sourceCode ruby"><code class="sourceCode ruby"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a><span class="cf">def</span> main</span>
<span id="cb17-2"><a href="#cb17-2" aria-hidden="true" tabindex="-1"></a> <span class="co"># This one is .wide, meaning that long lines overflow horizontally.</span></span>
<span id="cb17-3"><a href="#cb17-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">puts</span> <span class="st">"Hello, world!"</span></span>
<span id="cb17-4"><a href="#cb17-4" aria-hidden="true" tabindex="-1"></a><span class="cf">end</span></span></code></pre></div>
</div>
<div class="wide">
<div class="sourceCode" id="cb18"><pre class="sourceCode numberSource ruby numberLines hl-2"><code class="sourceCode ruby"><span id="cb18-1"><a href="#cb18-1"></a><span class="cf">def</span> main</span>
<span id="cb18-2"><a href="#cb18-2"></a> <span class="co"># This one is .wide, meaning that long lines overflow horizontally.</span></span>
<span id="cb18-3"><a href="#cb18-3"></a> <span class="co"># (The .wide .numberLines bug still applies.)</span></span>
<span id="cb18-4"><a href="#cb18-4"></a> <span class="fu">puts</span> <span class="st">"Hello, world!"</span></span>
<span id="cb18-5"><a href="#cb18-5"></a><span class="cf">end</span></span></code></pre></div>
</div>
</div>
</div>
<p>A paragraph accompanied by a block margin note with a syntax-highlighted code block. Be careful when using this. You probably want to make sure that the code block is marked <code>.wide</code> so that the content overflows the edges. This is longer text to give the paragraph some heft to it, so that the side note doesn’t feel overpowering.<label for="sn-17" class="margin-toggle">⊕</label></p>
<!--
Also, I have to put a double blank line before the code block to avoid
confusing my markdown syntax highlighter.
-->
<p>A paragraph accompanied by a block margin note with a syntax-highlighted code block. Be careful when using this. You probably want to make sure that the code block is marked <code>.wide</code> so that the content overflows the edges. This is longer text to give the paragraph some heft to it, so that the side note doesn’t feel overpowering.</p>
<p>A paragraph accompanied by a block margin note with a syntax-highlighted code block. Be careful when using this. You probably want to make sure that the code block is marked <code>.wide</code> so that the content overflows the edges. This is longer text to give the paragraph some heft to it, so that the side note doesn’t feel overpowering.</p>
<p>A paragraph accompanied by a block margin note with a syntax-highlighted code block. Be careful when using this. You probably want to make sure that the code block is marked <code>.wide</code> so that the content overflows the edges. This is longer text to give the paragraph some heft to it, so that the side note doesn’t feel overpowering.</p>
<p>A paragraph accompanied by a block margin note with a syntax-highlighted code block. Be careful when using this. You probably want to make sure that the code block is marked <code>.wide</code> so that the content overflows the edges. This is longer text to give the paragraph some heft to it, so that the side note doesn’t feel overpowering.</p>
<p>A paragraph accompanied by a block margin note with a syntax-highlighted code block. Be careful when using this. You probably want to make sure that the code block is marked <code>.wide</code> so that the content overflows the edges. This is longer text to give the paragraph some heft to it, so that the side note doesn’t feel overpowering.</p>
<ul>
<li><p>This is a list with multiple paragraphs in it. This is a list with multiple paragraphs in it. This is a list with multiple paragraphs in it. This is a list with multiple paragraphs in it. This is a list with multiple paragraphs in it. This is a list with multiple paragraphs in it.</p>
<div class="sidenote-wrapper">
<input type="checkbox" id="sn-18" class="margin-toggle"/>
<div class="sidenote">
<p>Align to second paragraph.</p>
</div>
</div>
<p>This is a list with multiple paragraphs in it. This is a list with multiple paragraphs in it. This is a list with multiple paragraphs in it. This is a list with multiple paragraphs in it. This is a list with multiple paragraphs in it. This is a list with multiple paragraphs in it.<label for="sn-18" class="margin-toggle sidenote-number"></label></p></li>
<li><div class="sidenote-wrapper">
<input type="checkbox" id="sn-19" class="margin-toggle"/>
<div class="sidenote">
<p>Align to third paragraph.</p>
</div>
</div>
<p>This is a list with multiple paragraphs in it. This is a list with multiple paragraphs in it. This is a list with multiple paragraphs in it. This is a list with multiple paragraphs in it. This is a list with multiple paragraphs in it. This is a list with multiple paragraphs in it.<label for="sn-19" class="margin-toggle sidenote-number"></label></p></li>
</ul>
<div class="sidenote-wrapper">
<input type="checkbox" id="sn-20" class="margin-toggle"/>
<div class="sidenote">
<p>Row 1, column 2. Aligned to start of table.</p>
</div>
</div>
<div class="sidenote-wrapper">
<input type="checkbox" id="sn-21" class="margin-toggle"/>
<div class="sidenote">
<p>Row 2, column 1</p>
</div>
</div>
<table>
<thead>
<tr>
<th><strong>Column 1</strong></th>
<th><strong>Column 2</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>This is <code>some</code> text.</td>
<td>This is some text.<label for="sn-20" class="margin-toggle sidenote-number"></label></td>
</tr>
<tr>
<td>This is some text.<label for="sn-21" class="margin-toggle sidenote-number"></label></td>
<td>This is some text.</td>
</tr>
</tbody>
</table>
<p>An image in an inline margin note.<span class="sidenote-wrapper"><label for="sn-22" class="margin-toggle">⊕</label><input type="checkbox" id="sn-22" class="margin-toggle"/><span class="marginnote"><img src="../img/sugarloaf-hill-forest-green.jpg" alt="Only alt text here, not caption" /><br />
<br />
</span></span> Markdown footnotes become side notes. After the note. It would be neat to associate a range of text with a footnote, rather than a single point. This is longer text to give the paragraph some heft to it, so that the side note doesn’t feel overpowering.</p>
<p>Markdown footnotes become side notes. After the note. It would be neat to associate a range of text with a footnote, rather than a single point. This is longer text to give the paragraph some heft to it, so that the side note doesn’t feel overpowering.</p>
<div class="sidenote-wrapper">
<input type="checkbox" id="sn-23" class="margin-toggle"/>
<div class="marginnote">
<p><img src="../img/sugarloaf-hill-forest-green.jpg" alt="Only alt text here, not caption" /></p>
</div>
</div>
<p>Markdown footnotes become side notes. After the note. It would be neat to associate a range of text with a footnote, rather than a single point. This is longer text to give the paragraph some heft to it, so that the side note doesn’t feel overpowering. <strong>This paragraph ends with a block image.</strong><label for="sn-23" class="margin-toggle">⊕</label></p>
<p>The image that comes before it pushes this image down. It still has no caption, but that’s a limitation of Pandoc markdown. There’s an extra big gap, but that’s because we generate <code><br><br></code> at the end of every inline margin note. <code>pandoc-sidenote</code> could be changed to stop doing that if we want?</p>
<p>The image that comes before it pushes this image down. It still has no caption, but that’s a limitation of Pandoc markdown. There’s an extra big gap, but that’s because we generate <code><br><br></code> at the end of every inline margin note. <code>pandoc-sidenote</code> could be changed to stop doing that if we want?</p>
<p>The image that comes before it pushes this image down. It still has no caption, but that’s a limitation of Pandoc markdown. There’s an extra big gap, but that’s because we generate <code><br><br></code> at the end of every inline margin note. <code>pandoc-sidenote</code> could be changed to stop doing that if we want?</p>
<div class="sidenote-wrapper">
<input type="checkbox" id="sn-24" class="margin-toggle"/>
<div class="marginnote">
<p><img src="../img/sugarloaf-hill-forest-green.jpg" alt="Only alt text here, not caption" /></p>
<p><em>Faking a caption with italics.</em></p>
</div>
</div>
<p>This time, there’s enough room for the block image to hoist to the top of the associated paragraph. This time, there’s enough room for the block image to hoist to the top of the associated paragraph. This time, there’s enough room for the block image to hoist to the top of the associated paragraph.<label for="sn-24" class="margin-toggle">⊕</label></p>
<p>This time, there’s enough room for the block image to hoist to the top of the associated paragraph. This time, there’s enough room for the block image to hoist to the top of the associated paragraph. This time, there’s enough room for the block image to hoist to the top of the associated paragraph.</p>
<p>This time, there’s enough room for the block image to hoist to the top of the associated paragraph. This time, there’s enough room for the block image to hoist to the top of the associated paragraph. This time, there’s enough room for the block image to hoist to the top of the associated paragraph.</p>
<p>This time, there’s enough room for the block image to hoist to the top of the associated paragraph. This time, there’s enough room for the block image to hoist to the top of the associated paragraph. This time, there’s enough room for the block image to hoist to the top of the associated paragraph.</p>
<div class="sidenote-wrapper">
<input type="checkbox" id="sn-25" class="margin-toggle"/>
<div class="marginnote">
<figure>
<img src="../img/sugarloaf-hill-forest-green.jpg" alt="Alt text is not caption">
<figcaption aria-hidden="true">
Proper caption now
</figcaption>
</figure>
</div>
</div>
<p>An explicit figure in a side note. Unfortunately, Pandoc markdown doesn’t turn images in footnotes into figures automatically, so if you want this behavior you have to write the <code>figure</code> HTML directly.<label for="sn-25" class="margin-toggle">⊕</label></p>
<p>This time, there’s enough room for the block image to hoist to the top of the associated paragraph. This time, there’s enough room for the block image to hoist to the top of the associated paragraph. This time, there’s enough room for the block image to hoist to the top of the associated paragraph.</p>
<h1 id="images">Images</h1>
<p>We can also handle images:</p>
<figure>
<img src="../img/sugarloaf-hill-forest-green.jpg" alt="Sugarloaf Hill, San Mateo, CA, April 2021" />
<figcaption aria-hidden="true">Sugarloaf Hill, San Mateo, CA, April 2021</figcaption>
</figure>
<p>This is some text after the image. The interesting thing is that the presence of a caption pushes the following paragraph down. For example, here’s an image without a caption:</p>
<p><img src="../img/el-capitan-from-four-mile-trail.jpg" /></p>
<p><img src="../img/el-capitan-from-four-mile-trail.jpg" /></p>
<p>Notice how the text after the image resumes further away, instead of being close to the image.</p>
<p>We can also do extra wide and full width images:</p>
<div class="wide extra-wide">
<p><img src="../img/sugarloaf-hill-trail-april-june.jpg" /></p>
</div>
<p>This project provides CSS files and a template for using Pandoc to generate standalone HTML files. It supports most features Pandoc Markdown has to offer, and some extras. The default look can be tweaked via CSS variables, and it does not need JavaScript, even for side notes.</p>
<div class="wide extra-wide">
<figure>
<img src="../img/sugarloaf-hill-trail-april-june.jpg" alt="Sugarloaf Hill, San Mateo, CA. Left: April 2021, right: June 2021" />
<figcaption aria-hidden="true">Sugarloaf Hill, San Mateo, CA. Left: April 2021, right: June 2021</figcaption>
</figure>
</div>
<p>This project provides CSS files and a template for using Pandoc to generate standalone HTML files. It supports most features Pandoc Markdown has to offer, and some extras. The default look can be tweaked via CSS variables, and it does not need JavaScript, even for side notes.</p>
<div class="wide full-width left-align-caption">
<figure>
<img src="../img/upper-crystal-springs-reservoir-facing-northwest.jpg" alt="Upper Crystal Springs Reservoir, near Belmont, CA" />
<figcaption aria-hidden="true">Upper Crystal Springs Reservoir, near Belmont, CA</figcaption>
</figure>
</div>
<p>And some text after the extra wide image. There’s <strong>currently a bug</strong> making it so that this text isn’t as tight as text for non-extra-wide images because there’s an extra div around it. But maybe that’s actually a feature not a bug.</p>
<h1 id="tables">Tables</h1>
<table>
<thead>
<tr>
<th><strong>Column 1</strong></th>
<th><strong>Column 2</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>This is <code>some</code> text.</td>
<td>This is some text.</td>
</tr>
<tr>
<td>This is some text.</td>
<td>This is some text.</td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th><strong>Column 1</strong></th>
<th><strong>Column 2</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>This is some text.</td>
<td>This is some text.</td>
</tr>
<tr>
<td>This is some text.</td>
<td>This is some text.</td>
</tr>
</tbody>
</table>
<p>The wild thing is that this is as tight as the body text gets to the table.</p>
<table style="width:56%;">
<colgroup>
<col style="width: 27%" />
<col style="width: 27%" />
</colgroup>
<thead>
<tr>
<th style="text-align: left;">Column 1</th>
<th style="text-align: left;">Column 2</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">This is some text.</td>
<td style="text-align: left;">This is some text.</td>
</tr>
<tr>
<td style="text-align: left;">This is some text.</td>
<td style="text-align: left;">This is some text.</td>
</tr>
</tbody>
</table>
<table>
<caption>This table has a caption.</caption>
<thead>
<tr>
<th><strong>Column 1</strong></th>
<th><strong>Column 2</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>This is some text.</td>
<td>This is some text.</td>
</tr>
<tr>
<td>This is some text.</td>
<td>This is some text.</td>
</tr>
</tbody>
</table>
<p>We can also make tables become wider than the main text if there’s a lot of stuff in the table. They suffer the same “<strong>margin is too big</strong>” bug that extra wide images do.</p>
<div class="wide left-align-caption">
<table>
<caption>The difference between <code>wide</code> and <code>extra-wide</code> is that extra-wide is the only one that will expand into the left <strong>and</strong> right columns.<br />
<br />
Meanwhile, <code>wide</code> will expand past the right column when the center column is smaller than <code>--main-width</code>.</caption>
<colgroup>
<col style="width: 20%" />
<col style="width: 20%" />
<col style="width: 20%" />
<col style="width: 20%" />
<col style="width: 20%" />
</colgroup>
<thead>
<tr>
<th><strong>Column 1</strong></th>
<th><strong>Column 2</strong></th>
<th><strong>Column 3</strong></th>
<th><strong>Column 4</strong></th>
<th><strong>Column 5</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>This is some text. This is some text.</td>
<td>This is some text. This is some text.</td>
<td>This is some text. This is some text.</td>
<td>This is some text. This is some text.</td>
<td>This is some text. This is some text.</td>
</tr>
<tr>
<td>This is some text. This is some text.</td>
<td>This is some text. This is some text.</td>
<td>This is some text. This is some text.</td>
<td>This is some text. This is some text.</td>
<td>This is some text. This is some text.</td>
</tr>
</tbody>
</table>
</div>
<div class="wide extra-wide">
<table style="width:100%;">
<caption>This extra wide table also has a caption. It has quite a bit of text in the caption, so it wraps onto multiple lines when rendered at smaller screen sizes.</caption>
<colgroup>
<col style="width: 10%" />
<col style="width: 10%" />
<col style="width: 10%" />
<col style="width: 10%" />
<col style="width: 10%" />
<col style="width: 10%" />
<col style="width: 10%" />
<col style="width: 10%" />
<col style="width: 10%" />
<col style="width: 10%" />
</colgroup>
<thead>
<tr>
<th><strong>Column 1</strong></th>
<th><strong>Column 2</strong></th>
<th><strong>Column 3</strong></th>
<th><strong>Column 4</strong></th>
<th><strong>Column 5</strong></th>
<th><strong>Column 6</strong></th>
<th><strong>Column 7</strong></th>
<th><strong>Column 8</strong></th>
<th><strong>Column 9</strong></th>
<th><strong>Column 10</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
</tr>
<tr>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
</tr>
</tbody>
</table>
</div>
<div class="wide extra-wide">
<table>
<caption>This extra wide table also has a caption. It has quite a bit of text in the caption, so it wraps onto multiple lines when rendered at smaller screen sizes.</caption>
<colgroup>
<col style="width: 4%" />
<col style="width: 4%" />
<col style="width: 4%" />
<col style="width: 4%" />
<col style="width: 4%" />
<col style="width: 4%" />
<col style="width: 4%" />
<col style="width: 4%" />
<col style="width: 4%" />
<col style="width: 4%" />
<col style="width: 4%" />
<col style="width: 4%" />
<col style="width: 4%" />
<col style="width: 4%" />
<col style="width: 4%" />
<col style="width: 4%" />
<col style="width: 4%" />
<col style="width: 4%" />
<col style="width: 4%" />
<col style="width: 4%" />
</colgroup>
<thead>
<tr>
<th><strong>Column 1</strong></th>
<th><strong>Column 2</strong></th>
<th><strong>Column 3</strong></th>
<th><strong>Column 4</strong></th>
<th><strong>Column 5</strong></th>
<th><strong>Column 6</strong></th>
<th><strong>Column 7</strong></th>
<th><strong>Column 8</strong></th>
<th><strong>Column 9</strong></th>
<th><strong>Column 10</strong></th>
<th><strong>Column 11</strong></th>
<th><strong>Column 12</strong></th>
<th><strong>Column 13</strong></th>
<th><strong>Column 14</strong></th>
<th><strong>Column 15</strong></th>
<th><strong>Colum 16</strong></th>
<th><strong>Colum 17</strong></th>
<th><strong>Colum 18</strong></th>
<th><strong>Colum 19</strong></th>
<th><strong>Colum 20</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
</tr>
<tr>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>
<td>This is some text.</td>