-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.html
2347 lines (2304 loc) · 113 KB
/
template.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
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="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.5.53">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<meta name="author" content="Forfatter1">
<meta name="author" content="Forfatter2">
<meta name="keywords" content="SSB, rapport, demo">
<title>Tittel på SSB-rapport</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
ul.task-list li input[type="checkbox"] {
width: 0.8em;
margin: 0 0.8em 0.2em -1em; /* quarto-specific, see https://github.com/quarto-dev/quarto-cli/issues/4556 */
vertical-align: middle;
}
/* CSS for syntax highlighting */
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
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 { display: inline-block; 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;
}
pre.numberSource { margin-left: 3em; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
/* CSS for citations */
div.csl-bib-body { }
div.csl-entry {
clear: both;
margin-bottom: 0em;
}
.hanging-indent div.csl-entry {
margin-left:2em;
text-indent:-2em;
}
div.csl-left-margin {
min-width:2em;
float:left;
}
div.csl-right-inline {
margin-left:2em;
padding-left:1em;
}
div.csl-indent {
margin-left: 2em;
}</style>
<script src="template_files/libs/clipboard/clipboard.min.js"></script>
<script src="template_files/libs/quarto-html/quarto.js"></script>
<script src="template_files/libs/quarto-html/popper.min.js"></script>
<script src="template_files/libs/quarto-html/tippy.umd.min.js"></script>
<script src="template_files/libs/quarto-html/anchor.min.js"></script>
<link href="template_files/libs/quarto-html/tippy.css" rel="stylesheet">
<link href="template_files/libs/quarto-html/quarto-syntax-highlighting.css" rel="stylesheet" id="quarto-text-highlighting-styles">
<script src="template_files/libs/bootstrap/bootstrap.min.js"></script>
<link href="template_files/libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="template_files/libs/bootstrap/bootstrap.min.css" rel="stylesheet" id="quarto-bootstrap" data-mode="light">
<script src="template_files/libs/kePrint-0.0.1/kePrint.js"></script>
<link href="template_files/libs/lightable-0.0.1/lightable.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es6"></script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js" type="text/javascript"></script>
<script type="text/javascript">
const typesetMath = (el) => {
if (window.MathJax) {
// MathJax Typeset
window.MathJax.typeset([el]);
} else if (window.katex) {
// KaTeX Render
var mathElements = el.getElementsByClassName("math");
var macros = [];
for (var i = 0; i < mathElements.length; i++) {
var texText = mathElements[i].firstChild;
if (mathElements[i].tagName == "SPAN") {
window.katex.render(texText.data, mathElements[i], {
displayMode: mathElements[i].classList.contains('display'),
throwOnError: false,
macros: macros,
fleqn: false
});
}
}
}
}
window.Quarto = {
typesetMath
};
</script>
</head>
<body>
<div id="quarto-content" class="page-columns page-rows-contents page-layout-article">
<div id="quarto-margin-sidebar" class="sidebar margin-sidebar">
<nav id="TOC" role="doc-toc" class="toc-active">
<h2 id="toc-title">Innhold</h2>
<ul class="collapse">
<li><a href="#sec-intro" id="toc-sec-intro" class="nav-link active" data-scroll-target="#sec-intro"><span class="header-section-number">1</span> Introduksjon</a></li>
<li><a href="#komponenter" id="toc-komponenter" class="nav-link" data-scroll-target="#komponenter"><span class="header-section-number">2</span> Komponenter</a></li>
<li><a href="#referanser-1" id="toc-referanser-1" class="nav-link" data-scroll-target="#referanser-1"><span class="header-section-number">3</span> Referanser</a></li>
<li><a href="#about-quarto-extensions-formats-and-quarto-journals-article" id="toc-about-quarto-extensions-formats-and-quarto-journals-article" class="nav-link" data-scroll-target="#about-quarto-extensions-formats-and-quarto-journals-article"><span class="header-section-number">4</span> About Quarto Extensions formats And Quarto Journals Article</a></li>
<li><a href="#structure-of-this-repository" id="toc-structure-of-this-repository" class="nav-link" data-scroll-target="#structure-of-this-repository"><span class="header-section-number">5</span> Structure of this repository</a></li>
<li><a href="#checklist-creating-a-custom-format" id="toc-checklist-creating-a-custom-format" class="nav-link" data-scroll-target="#checklist-creating-a-custom-format"><span class="header-section-number">6</span> Checklist: Creating a custom format</a></li>
<li><a href="#demo-of-some-features-found-in-this-demo-journal-template" id="toc-demo-of-some-features-found-in-this-demo-journal-template" class="nav-link" data-scroll-target="#demo-of-some-features-found-in-this-demo-journal-template"><span class="header-section-number">7</span> Demo of some features found in this demo journal template</a></li>
<li><a href="#bibliography" id="toc-bibliography" class="nav-link" data-scroll-target="#bibliography">References</a></li>
</ul>
<div class="quarto-alternate-formats"><h2>Other Formats</h2><ul><li><a href="template.pdf"><i class="bi bi-file-pdf"></i>PDF (ssb)</a></li></ul></div></nav>
</div>
<main class="content" id="quarto-document-content">
<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title">
<h1 class="title">Tittel på SSB-rapport</h1>
<p class="subtitle lead">Undertittel på SSB-rapport</p>
</div>
<div class="quarto-title-meta">
<div>
<div class="quarto-title-meta-heading">Authors</div>
<div class="quarto-title-meta-contents">
<p>Forfatter1 </p>
<p>Forfatter2 </p>
</div>
</div>
</div>
<div>
<div class="keywords">
<div class="block-title">Keywords</div>
<p>SSB, rapport, demo</p>
</div>
</div>
</header>
<section id="sec-intro" class="level2" data-number="1">
<h2 data-number="1" class="anchored" data-anchor-id="sec-intro"><span class="header-section-number">1</span> Introduksjon</h2>
<p>Denne teksten er et eksempel på hvordan teksten til en SSB-rapport skrives med markdown og renderes med <a href="https://quarto.org/">Quarto</a>. Quarto er et open source verktøy for publisiering av dokumenter som kombinerer tekst og data-analyse. Det gir muligheten til å lage dynamiske rapporter, presentasjoner, nettsider og bøker med integrert kode.</p>
<section id="kom-i-gang" class="level3" data-number="1.1">
<h3 data-number="1.1" class="anchored" data-anchor-id="kom-i-gang"><span class="header-section-number">1.1</span> Kom i gang</h3>
<p>For å bruke denne templaten kan du klone repoet og begynne å redigere på <code>template.qmd</code>.</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">git</span> clone https://github.com/statisticsnorway/ssb-quarto-report.git</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p>Deretter kan du kan gå inn i mappen <code>cd ssb-quarto-report</code> og rendere eksempelfilen:</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">quarto</span> preview ssb/template.qmd</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p>Det gir deg en forhåndsvisning av dokumentet som oppdateres fortløpende når du gjør endringer i <code>template.qmd</code>-filen.</p>
<section id="metadata" class="level4" data-number="1.1.1">
<h4 data-number="1.1.1" class="anchored" data-anchor-id="metadata"><span class="header-section-number">1.1.1</span> Metadata</h4>
<p>De første endringene man gjør i <code>template.qmd</code> er typisk å endre metadataene som ligger i toppen av fila. Der oppgir du tittel, undertittel, forfattere, forord, godkjenningsdato, etc.. Verdiene som oppgis her vil bli lagt inn i den ferdig renderte pdf-en på de riktige stedene i dokumentet. Metadataene kan derfor se slik ut:</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode yml code-with-copy"><code class="sourceCode yaml"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="fu">title</span><span class="kw">:</span><span class="at"> </span><span class="st">"Kvantitative svar på kompliserte spørsmål"</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="fu">subtitle</span><span class="kw">:</span><span class="at"> </span><span class="st">"En spennende rapport fra SSB"</span></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="fu">approved-date</span><span class="kw">:</span><span class="at"> 1. januar 2025</span></span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a><span class="fu">approved-by</span><span class="kw">:</span><span class="at"> Daniel Direktør</span></span>
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a><span class="fu">rapportnr</span><span class="kw">:</span><span class="at"> </span><span class="st">"2025/11"</span></span>
<span id="cb3-6"><a href="#cb3-6" aria-hidden="true" tabindex="-1"></a><span class="fu">publisert-dato</span><span class="kw">:</span><span class="at"> 1. desember 2024</span></span>
<span id="cb3-7"><a href="#cb3-7" aria-hidden="true" tabindex="-1"></a><span class="fu">isbn-t</span><span class="kw">:</span><span class="at"> 9999-9</span></span>
<span id="cb3-8"><a href="#cb3-8" aria-hidden="true" tabindex="-1"></a><span class="fu">isbn-e</span><span class="kw">:</span><span class="at"> 8888-8</span></span>
<span id="cb3-9"><a href="#cb3-9" aria-hidden="true" tabindex="-1"></a><span class="fu">format</span><span class="kw">:</span></span>
<span id="cb3-10"><a href="#cb3-10" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">ssb-pdf</span><span class="kw">:</span></span>
<span id="cb3-11"><a href="#cb3-11" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">keep-tex</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span><span class="at"> </span></span>
<span id="cb3-12"><a href="#cb3-12" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">ssb-html</span><span class="kw">:</span><span class="at"> default</span></span>
<span id="cb3-13"><a href="#cb3-13" aria-hidden="true" tabindex="-1"></a><span class="fu">author</span><span class="kw">:</span></span>
<span id="cb3-14"><a href="#cb3-14" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">name</span><span class="kw">:</span><span class="at"> Ståle Statistiker</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p>Hvis du gjør endringene over og trykker save så ser du at disse verdiene blir satt i forhåndsvisningen av pdf-en. Når du er fornøyd så kan du rendere den endelige versjonen ved å kjøre følende i terminalen:</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">quarto</span> render template.qmd</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</section>
<section id="skrive-artikkel" class="level4" data-number="1.1.2">
<h4 data-number="1.1.2" class="anchored" data-anchor-id="skrive-artikkel"><span class="header-section-number">1.1.2</span> Skrive artikkel</h4>
<p>Å skrive selve artikkelen kan man gjøre ved å skrive markdown i <code>template.qmd</code>. Markdown-syntaxen er godt dokumentert i <a href="https://quarto.org/docs/authoring/markdown-basics.html">Quart-manualen</a>. Det er også greit å vite at Quarto bruker <a href="https://pandoc.org/">Pandoc</a> under panseret.</p>
<p>Måten dokumentet pdf-rapporten blir til på er at:</p>
<ol type="1">
<li>All informasjon<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a> blir konvertert til formatet <a href="https://pandoc.org/lua-filters.html">Pandoc AST</a></li>
<li>For generering av PDF blir Pandoc AST først konvertert til Latex, og deretter PDF.</li>
<li>For generering av docx-filer blir Pandoc AST konvertert direkte til docx.</li>
<li>For generering av html blir Pandoc AST konvertert direkte til html.</li>
</ol>
<p>For de som ønsker å tilpasse templaten til sine behov, så må man derfor forholde seg til mellomformatet Pandoc AST, og hvis man ønsker at sluttproduktet skal være en pdf, så må man også ha basis kunnskap om Latex. Hvis man ønsker å gjøre endringer på Pandoc AST formatet direkte som en del av renderingen, så kan man skrive såkalte <strong>filtre</strong> eller <strong>shortcodes</strong> i Lua som prosesserer Pandoc AST direkte ved rendering. Men dette er kun nødvendig for avanserte brukere som ønsker å gjøre utvikling på templaten.</p>
<p>Av metadatene over ser vi at man kan velge å beholde den Latex-koden som generer pdf-fila, <code>keep-tex: true</code>. Det kan være nyttig for de som lurer på hvordan konvertering fra markdown, via AST, har blitt tolket som Latex. Man kan også bruke den til å manipulere Latex-koden direkte og deretter rendere.</p>
</section>
<section id="hvem-passer-dette-for" class="level4" data-number="1.1.3">
<h4 data-number="1.1.3" class="anchored" data-anchor-id="hvem-passer-dette-for"><span class="header-section-number">1.1.3</span> Hvem passer dette for?</h4>
<p>Denne arbeidsflyten kan passe for de i SSB som skriver rapporter der data er en viktig del av innholdet. Siden denne måten å skrive på tillater forfatteren å skrive der man har tilgang til data, samtidig som man kan blande tekst, kode og output på en enkel måte. En stor fordel med dette er at rapporten kan genereres på samme måte som statistikk genereres, ved å kjøre tekstfiler. På den måten kan man versjonhåndtere dokumentet på GitHub, kjøre dokumentet på nytt hvis dataene endrer seg, og dokumentere tall og figurere som en del av skrivingen.</p>
</section>
</section>
</section>
<section id="komponenter" class="level2" data-number="2">
<h2 data-number="2" class="anchored" data-anchor-id="komponenter"><span class="header-section-number">2</span> Komponenter</h2>
<p>Når man skriver dokumenter skal man følge den visuelle profilen til SSB. Defor må tabeller, figurer, forklaringsbokser, og kildehenvisninger følge SSBs profil.</p>
<section id="tabeller" class="level3" data-number="2.1">
<h3 data-number="2.1" class="anchored" data-anchor-id="tabeller"><span class="header-section-number">2.1</span> Tabeller</h3>
<p>Å lage tabeller kan gjøres på mange forskjellige måter i et Quarto-dokument. Man kan lage tabeller ved å bruke R- og Python-biblioteker som produserer markdown, Latex eller bilder. Man kan også legge inn ren Latex i denne filen.</p>
<section id="markdown" class="level4" data-number="2.1.1">
<h4 data-number="2.1.1" class="anchored" data-anchor-id="markdown"><span class="header-section-number">2.1.1</span> Markdown</h4>
<p>Man kan lage en tabell i Excel og <a href="https://tabletomarkdown.com/convert-spreadsheet-to-markdown/">transformere den til markdown</a>, som Quarto kan rendere til pdf eller html. Man kan også bruke R- og Python-pakker som genererer markdown-tabeller. Denne koden genererer en enkel tabell:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode markdown code-with-copy"><code class="sourceCode markdown"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="in">```{r}</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="in">#| echo: false</span></span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="in">library(knitr)</span></span>
<span id="cb5-5"><a href="#cb5-5" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb5-6"><a href="#cb5-6" aria-hidden="true" tabindex="-1"></a><span class="in"># Create a simple data frame</span></span>
<span id="cb5-7"><a href="#cb5-7" aria-hidden="true" tabindex="-1"></a><span class="in">df <- data.frame(</span></span>
<span id="cb5-8"><a href="#cb5-8" aria-hidden="true" tabindex="-1"></a><span class="in"> Name = c("John", "Jane", "Doe"),</span></span>
<span id="cb5-9"><a href="#cb5-9" aria-hidden="true" tabindex="-1"></a><span class="in"> Age = c(23, 35, 45),</span></span>
<span id="cb5-10"><a href="#cb5-10" aria-hidden="true" tabindex="-1"></a><span class="in"> Occupation = c("Engineer", "Doctor", "Artist")</span></span>
<span id="cb5-11"><a href="#cb5-11" aria-hidden="true" tabindex="-1"></a><span class="in">)</span></span>
<span id="cb5-12"><a href="#cb5-12" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb5-13"><a href="#cb5-13" aria-hidden="true" tabindex="-1"></a><span class="in"># Convert the data frame to a markdown table</span></span>
<span id="cb5-14"><a href="#cb5-14" aria-hidden="true" tabindex="-1"></a><span class="in">markdown_table <- knitr::kable(df, format = "markdown")</span></span>
<span id="cb5-15"><a href="#cb5-15" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb5-16"><a href="#cb5-16" aria-hidden="true" tabindex="-1"></a><span class="in"># Print the markdown table</span></span>
<span id="cb5-17"><a href="#cb5-17" aria-hidden="true" tabindex="-1"></a><span class="in">markdown_table</span></span>
<span id="cb5-18"><a href="#cb5-18" aria-hidden="true" tabindex="-1"></a><span class="in">```</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell">
<div id="tbl-md" class="cell quarto-float quarto-figure quarto-figure-center anchored">
<figure class="quarto-float quarto-float-tbl figure">
<figcaption class="quarto-float-caption-top quarto-float-caption quarto-float-tbl" id="tbl-md-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Table 1: En enkel tabell med markdown
</figcaption>
<div aria-describedby="tbl-md-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="cell-output-display">
<table class="do-not-create-environment cell caption-top table table-sm table-striped small">
<thead>
<tr class="header">
<th style="text-align: left;">Name</th>
<th style="text-align: right;">Age</th>
<th style="text-align: left;">Occupation</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">John</td>
<td style="text-align: right;">23</td>
<td style="text-align: left;">Engineer</td>
</tr>
<tr class="even">
<td style="text-align: left;">Jane</td>
<td style="text-align: right;">35</td>
<td style="text-align: left;">Doctor</td>
</tr>
<tr class="odd">
<td style="text-align: left;">Doe</td>
<td style="text-align: right;">45</td>
<td style="text-align: left;">Artist</td>
</tr>
</tbody>
</table>
</div>
</div>
</figure>
</div>
</div>
<p>Vi kunne også laget en tabell uten pakker. Denne teksten genererer også en enkel makrdown-tabell:</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode markdown code-with-copy"><code class="sourceCode markdown"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="in">```{markdown}</span></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="in">| Default | Left | Right | Center |</span></span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a><span class="in">|--------:|-----:|------:|:------:|</span></span>
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a><span class="in">| 12 | 12 | 12 | 12 |</span></span>
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a><span class="in">| 123 | 123 | 123 | 123 |</span></span>
<span id="cb6-6"><a href="#cb6-6" aria-hidden="true" tabindex="-1"></a><span class="in">| 1 | 1 | 1 | 1 |</span></span>
<span id="cb6-7"><a href="#cb6-7" aria-hidden="true" tabindex="-1"></a><span class="in">: Et annet eksempel med rå markdown {#tbl-md1 tbl-colwidths="[25,25]"}</span></span>
<span id="cb6-8"><a href="#cb6-8" aria-hidden="true" tabindex="-1"></a><span class="in">```</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div id="tbl-md1" class="quarto-float quarto-figure quarto-figure-center anchored" data-tbl-colwidths="[25,25]">
<figure class="quarto-float quarto-float-tbl figure">
<figcaption class="quarto-float-caption-top quarto-float-caption quarto-float-tbl" id="tbl-md1-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Table 2: Et annet eksempel med rå markdown
</figcaption>
<div aria-describedby="tbl-md1-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<table class="caption-top table">
<colgroup>
<col style="width: 25%">
<col style="width: 25%">
<col style="width: 25%">
<col style="width: 25%">
</colgroup>
<thead>
<tr class="header">
<th style="text-align: right;">Default</th>
<th style="text-align: right;">Left</th>
<th style="text-align: right;">Right</th>
<th style="text-align: center;">Center</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: right;">12</td>
<td style="text-align: right;">12</td>
<td style="text-align: right;">12</td>
<td style="text-align: center;">12</td>
</tr>
<tr class="even">
<td style="text-align: right;">123</td>
<td style="text-align: right;">123</td>
<td style="text-align: right;">123</td>
<td style="text-align: center;">123</td>
</tr>
<tr class="odd">
<td style="text-align: right;">1</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">1</td>
<td style="text-align: center;">1</td>
</tr>
</tbody>
</table>
</div>
</figure>
</div>
<p>Vi kan referere til tabellene ved å bruke <a href="#tbl-md" class="quarto-xref">Table 1</a>, <a href="#tbl-md1" class="quarto-xref">Table 2</a>. De blir også automatisk nummerert og listet ut i Tabellregisteret på slutten av dokumentet.</p>
</section>
<section id="latex" class="level4" data-number="2.1.2">
<h4 data-number="2.1.2" class="anchored" data-anchor-id="latex"><span class="header-section-number">2.1.2</span> Latex</h4>
<p>Man kan også bruke Latex til å generere tabeller, enten vha rå Latex eller R- eller Python-pakker. Her er et eksempel på hvordan man kan bruke R-pakken <a href="https://haozhu233.github.io/kableExtra/awesome_table_in_pdf.pdf">kableExtra</a> for enkelt lage avanserte Latex-tabeller:</p>
<div class="cell">
<div class="sourceCode cell-code" id="cb7"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(kableExtra)</span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a>dt <span class="ot"><-</span> mtcars[<span class="dv">1</span><span class="sc">:</span><span class="dv">5</span>, <span class="dv">1</span><span class="sc">:</span><span class="dv">6</span>]</span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a><span class="fu">kbl</span>(dt)</span>
<span id="cb7-4"><a href="#cb7-4" aria-hidden="true" tabindex="-1"></a>long_dt <span class="ot"><-</span> <span class="fu">rbind</span>(mtcars, mtcars)</span>
<span id="cb7-5"><a href="#cb7-5" aria-hidden="true" tabindex="-1"></a><span class="fu">kbl</span>(long_dt, <span class="at">longtable =</span> T, <span class="at">booktabs =</span> T) <span class="sc">%>%</span></span>
<span id="cb7-6"><a href="#cb7-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">add_header_above</span>(<span class="fu">c</span>(<span class="st">" "</span>, <span class="st">"Group 1"</span> <span class="ot">=</span> <span class="dv">5</span>, <span class="st">"Group 2"</span> <span class="ot">=</span> <span class="dv">6</span>)) <span class="sc">%>%</span></span>
<span id="cb7-7"><a href="#cb7-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">kable_styling</span>(<span class="at">latex_options =</span> <span class="fu">c</span>(<span class="st">"repeat_header"</span>, <span class="st">"striped"</span>)) <span class="sc">%>%</span></span>
<span id="cb7-8"><a href="#cb7-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">footnote</span>(<span class="at">general =</span> <span class="st">"Here is a general comments of the table. "</span>,</span>
<span id="cb7-9"><a href="#cb7-9" aria-hidden="true" tabindex="-1"></a> <span class="at">number =</span> <span class="fu">c</span>(<span class="st">"Footnote 1; "</span>, <span class="st">"Footnote 2; "</span>),</span>
<span id="cb7-10"><a href="#cb7-10" aria-hidden="true" tabindex="-1"></a> <span class="at">alphabet =</span> <span class="fu">c</span>(<span class="st">"Footnote A; "</span>, <span class="st">"Footnote B; "</span>),</span>
<span id="cb7-11"><a href="#cb7-11" aria-hidden="true" tabindex="-1"></a> <span class="at">symbol =</span> <span class="fu">c</span>(<span class="st">"Footnote Symbol 1; "</span>, <span class="st">"Footnote Symbol 2"</span>)</span>
<span id="cb7-12"><a href="#cb7-12" aria-hidden="true" tabindex="-1"></a> )</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div id="tbl-latex" class="cell quarto-float quarto-figure quarto-figure-center anchored">
<figure class="quarto-float quarto-float-tbl figure">
<figcaption class="quarto-float-caption-top quarto-float-caption quarto-float-tbl" id="tbl-latex-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Table 3: En avansert tabell med Latex/booktabs
</figcaption>
<div aria-describedby="tbl-latex-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="cell-output-display">
<table class="do-not-create-environment cell caption-top table table-sm table-striped small" data-quarto-postprocess="true">
<thead>
<tr class="header">
<th style="text-align: left;" data-quarto-table-cell-role="th"></th>
<th style="text-align: right;" data-quarto-table-cell-role="th">mpg</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">cyl</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">disp</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">hp</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">drat</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">wt</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">Mazda RX4</td>
<td style="text-align: right;">21.0</td>
<td style="text-align: right;">6</td>
<td style="text-align: right;">160</td>
<td style="text-align: right;">110</td>
<td style="text-align: right;">3.90</td>
<td style="text-align: right;">2.620</td>
</tr>
<tr class="even">
<td style="text-align: left;">Mazda RX4 Wag</td>
<td style="text-align: right;">21.0</td>
<td style="text-align: right;">6</td>
<td style="text-align: right;">160</td>
<td style="text-align: right;">110</td>
<td style="text-align: right;">3.90</td>
<td style="text-align: right;">2.875</td>
</tr>
<tr class="odd">
<td style="text-align: left;">Datsun 710</td>
<td style="text-align: right;">22.8</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">108</td>
<td style="text-align: right;">93</td>
<td style="text-align: right;">3.85</td>
<td style="text-align: right;">2.320</td>
</tr>
<tr class="even">
<td style="text-align: left;">Hornet 4 Drive</td>
<td style="text-align: right;">21.4</td>
<td style="text-align: right;">6</td>
<td style="text-align: right;">258</td>
<td style="text-align: right;">110</td>
<td style="text-align: right;">3.08</td>
<td style="text-align: right;">3.215</td>
</tr>
<tr class="odd">
<td style="text-align: left;">Hornet Sportabout</td>
<td style="text-align: right;">18.7</td>
<td style="text-align: right;">8</td>
<td style="text-align: right;">360</td>
<td style="text-align: right;">175</td>
<td style="text-align: right;">3.15</td>
<td style="text-align: right;">3.440</td>
</tr>
</tbody>
</table>
</div>
<div class="cell-output-display">
<table class="table do-not-create-environment cell caption-top table-sm table-striped small" data-quarto-postprocess="true">
<colgroup>
<col style="width: 8%">
<col style="width: 8%">
<col style="width: 8%">
<col style="width: 8%">
<col style="width: 8%">
<col style="width: 8%">
<col style="width: 8%">
<col style="width: 8%">
<col style="width: 8%">
<col style="width: 8%">
<col style="width: 8%">
<col style="width: 8%">
</colgroup>
<thead>
<tr class="header">
<th data-quarto-table-cell-role="th" style="text-align: left; empty-cells: hide; border-bottom: hidden;"></th>
<th colspan="5" data-quarto-table-cell-role="th" style="text-align: center; border-bottom: hidden; padding-bottom: 0; padding-left: 3px; padding-right: 3px;"><div style="border-bottom: 1px solid #ddd; padding-bottom: 5px; ">
Group 1
</div></th>
<th colspan="6" data-quarto-table-cell-role="th" style="text-align: center; border-bottom: hidden; padding-bottom: 0; padding-left: 3px; padding-right: 3px;"><div style="border-bottom: 1px solid #ddd; padding-bottom: 5px; ">
Group 2
</div></th>
</tr>
<tr class="odd">
<th style="text-align: left;" data-quarto-table-cell-role="th"></th>
<th style="text-align: right;" data-quarto-table-cell-role="th">mpg</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">cyl</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">disp</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">hp</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">drat</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">wt</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">qsec</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">vs</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">am</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">gear</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">carb</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">Mazda RX4</td>
<td style="text-align: right;">21.0</td>
<td style="text-align: right;">6</td>
<td style="text-align: right;">160.0</td>
<td style="text-align: right;">110</td>
<td style="text-align: right;">3.90</td>
<td style="text-align: right;">2.620</td>
<td style="text-align: right;">16.46</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">4</td>
</tr>
<tr class="even">
<td style="text-align: left;">Mazda RX4 Wag</td>
<td style="text-align: right;">21.0</td>
<td style="text-align: right;">6</td>
<td style="text-align: right;">160.0</td>
<td style="text-align: right;">110</td>
<td style="text-align: right;">3.90</td>
<td style="text-align: right;">2.875</td>
<td style="text-align: right;">17.02</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">4</td>
</tr>
<tr class="odd">
<td style="text-align: left;">Datsun 710</td>
<td style="text-align: right;">22.8</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">108.0</td>
<td style="text-align: right;">93</td>
<td style="text-align: right;">3.85</td>
<td style="text-align: right;">2.320</td>
<td style="text-align: right;">18.61</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">1</td>
</tr>
<tr class="even">
<td style="text-align: left;">Hornet 4 Drive</td>
<td style="text-align: right;">21.4</td>
<td style="text-align: right;">6</td>
<td style="text-align: right;">258.0</td>
<td style="text-align: right;">110</td>
<td style="text-align: right;">3.08</td>
<td style="text-align: right;">3.215</td>
<td style="text-align: right;">19.44</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">3</td>
<td style="text-align: right;">1</td>
</tr>
<tr class="odd">
<td style="text-align: left;">Hornet Sportabout</td>
<td style="text-align: right;">18.7</td>
<td style="text-align: right;">8</td>
<td style="text-align: right;">360.0</td>
<td style="text-align: right;">175</td>
<td style="text-align: right;">3.15</td>
<td style="text-align: right;">3.440</td>
<td style="text-align: right;">17.02</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">3</td>
<td style="text-align: right;">2</td>
</tr>
<tr class="even">
<td style="text-align: left;">Valiant</td>
<td style="text-align: right;">18.1</td>
<td style="text-align: right;">6</td>
<td style="text-align: right;">225.0</td>
<td style="text-align: right;">105</td>
<td style="text-align: right;">2.76</td>
<td style="text-align: right;">3.460</td>
<td style="text-align: right;">20.22</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">3</td>
<td style="text-align: right;">1</td>
</tr>
<tr class="odd">
<td style="text-align: left;">Duster 360</td>
<td style="text-align: right;">14.3</td>
<td style="text-align: right;">8</td>
<td style="text-align: right;">360.0</td>
<td style="text-align: right;">245</td>
<td style="text-align: right;">3.21</td>
<td style="text-align: right;">3.570</td>
<td style="text-align: right;">15.84</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">3</td>
<td style="text-align: right;">4</td>
</tr>
<tr class="even">
<td style="text-align: left;">Merc 240D</td>
<td style="text-align: right;">24.4</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">146.7</td>
<td style="text-align: right;">62</td>
<td style="text-align: right;">3.69</td>
<td style="text-align: right;">3.190</td>
<td style="text-align: right;">20.00</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">2</td>
</tr>
<tr class="odd">
<td style="text-align: left;">Merc 230</td>
<td style="text-align: right;">22.8</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">140.8</td>
<td style="text-align: right;">95</td>
<td style="text-align: right;">3.92</td>
<td style="text-align: right;">3.150</td>
<td style="text-align: right;">22.90</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">2</td>
</tr>
<tr class="even">
<td style="text-align: left;">Merc 280</td>
<td style="text-align: right;">19.2</td>
<td style="text-align: right;">6</td>
<td style="text-align: right;">167.6</td>
<td style="text-align: right;">123</td>
<td style="text-align: right;">3.92</td>
<td style="text-align: right;">3.440</td>
<td style="text-align: right;">18.30</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">4</td>
</tr>
<tr class="odd">
<td style="text-align: left;">Merc 280C</td>
<td style="text-align: right;">17.8</td>
<td style="text-align: right;">6</td>
<td style="text-align: right;">167.6</td>
<td style="text-align: right;">123</td>
<td style="text-align: right;">3.92</td>
<td style="text-align: right;">3.440</td>
<td style="text-align: right;">18.90</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">4</td>
</tr>
<tr class="even">
<td style="text-align: left;">Merc 450SE</td>
<td style="text-align: right;">16.4</td>
<td style="text-align: right;">8</td>
<td style="text-align: right;">275.8</td>
<td style="text-align: right;">180</td>
<td style="text-align: right;">3.07</td>
<td style="text-align: right;">4.070</td>
<td style="text-align: right;">17.40</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">3</td>
<td style="text-align: right;">3</td>
</tr>
<tr class="odd">
<td style="text-align: left;">Merc 450SL</td>
<td style="text-align: right;">17.3</td>
<td style="text-align: right;">8</td>
<td style="text-align: right;">275.8</td>
<td style="text-align: right;">180</td>
<td style="text-align: right;">3.07</td>
<td style="text-align: right;">3.730</td>
<td style="text-align: right;">17.60</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">3</td>
<td style="text-align: right;">3</td>
</tr>
<tr class="even">
<td style="text-align: left;">Merc 450SLC</td>
<td style="text-align: right;">15.2</td>
<td style="text-align: right;">8</td>
<td style="text-align: right;">275.8</td>
<td style="text-align: right;">180</td>
<td style="text-align: right;">3.07</td>
<td style="text-align: right;">3.780</td>
<td style="text-align: right;">18.00</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">3</td>
<td style="text-align: right;">3</td>
</tr>
<tr class="odd">
<td style="text-align: left;">Cadillac Fleetwood</td>
<td style="text-align: right;">10.4</td>
<td style="text-align: right;">8</td>
<td style="text-align: right;">472.0</td>
<td style="text-align: right;">205</td>
<td style="text-align: right;">2.93</td>
<td style="text-align: right;">5.250</td>
<td style="text-align: right;">17.98</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">3</td>
<td style="text-align: right;">4</td>
</tr>
<tr class="even">
<td style="text-align: left;">Lincoln Continental</td>
<td style="text-align: right;">10.4</td>
<td style="text-align: right;">8</td>
<td style="text-align: right;">460.0</td>
<td style="text-align: right;">215</td>
<td style="text-align: right;">3.00</td>
<td style="text-align: right;">5.424</td>
<td style="text-align: right;">17.82</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">3</td>
<td style="text-align: right;">4</td>
</tr>
<tr class="odd">
<td style="text-align: left;">Chrysler Imperial</td>
<td style="text-align: right;">14.7</td>
<td style="text-align: right;">8</td>
<td style="text-align: right;">440.0</td>
<td style="text-align: right;">230</td>
<td style="text-align: right;">3.23</td>
<td style="text-align: right;">5.345</td>
<td style="text-align: right;">17.42</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">3</td>
<td style="text-align: right;">4</td>
</tr>
<tr class="even">
<td style="text-align: left;">Fiat 128</td>
<td style="text-align: right;">32.4</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">78.7</td>
<td style="text-align: right;">66</td>
<td style="text-align: right;">4.08</td>
<td style="text-align: right;">2.200</td>
<td style="text-align: right;">19.47</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">1</td>
</tr>
<tr class="odd">
<td style="text-align: left;">Honda Civic</td>
<td style="text-align: right;">30.4</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">75.7</td>
<td style="text-align: right;">52</td>
<td style="text-align: right;">4.93</td>
<td style="text-align: right;">1.615</td>
<td style="text-align: right;">18.52</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">2</td>
</tr>
<tr class="even">
<td style="text-align: left;">Toyota Corolla</td>
<td style="text-align: right;">33.9</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">71.1</td>
<td style="text-align: right;">65</td>
<td style="text-align: right;">4.22</td>
<td style="text-align: right;">1.835</td>
<td style="text-align: right;">19.90</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">1</td>
</tr>
<tr class="odd">
<td style="text-align: left;">Toyota Corona</td>
<td style="text-align: right;">21.5</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">120.1</td>
<td style="text-align: right;">97</td>
<td style="text-align: right;">3.70</td>
<td style="text-align: right;">2.465</td>
<td style="text-align: right;">20.01</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">3</td>
<td style="text-align: right;">1</td>
</tr>
<tr class="even">
<td style="text-align: left;">Dodge Challenger</td>
<td style="text-align: right;">15.5</td>
<td style="text-align: right;">8</td>
<td style="text-align: right;">318.0</td>
<td style="text-align: right;">150</td>
<td style="text-align: right;">2.76</td>
<td style="text-align: right;">3.520</td>
<td style="text-align: right;">16.87</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">3</td>
<td style="text-align: right;">2</td>
</tr>
<tr class="odd">
<td style="text-align: left;">AMC Javelin</td>
<td style="text-align: right;">15.2</td>
<td style="text-align: right;">8</td>
<td style="text-align: right;">304.0</td>
<td style="text-align: right;">150</td>
<td style="text-align: right;">3.15</td>
<td style="text-align: right;">3.435</td>
<td style="text-align: right;">17.30</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">3</td>
<td style="text-align: right;">2</td>
</tr>
<tr class="even">
<td style="text-align: left;">Camaro Z28</td>
<td style="text-align: right;">13.3</td>
<td style="text-align: right;">8</td>
<td style="text-align: right;">350.0</td>
<td style="text-align: right;">245</td>
<td style="text-align: right;">3.73</td>
<td style="text-align: right;">3.840</td>
<td style="text-align: right;">15.41</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">3</td>
<td style="text-align: right;">4</td>
</tr>
<tr class="odd">
<td style="text-align: left;">Pontiac Firebird</td>
<td style="text-align: right;">19.2</td>
<td style="text-align: right;">8</td>
<td style="text-align: right;">400.0</td>
<td style="text-align: right;">175</td>
<td style="text-align: right;">3.08</td>
<td style="text-align: right;">3.845</td>
<td style="text-align: right;">17.05</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">3</td>
<td style="text-align: right;">2</td>
</tr>
<tr class="even">
<td style="text-align: left;">Fiat X1-9</td>
<td style="text-align: right;">27.3</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">79.0</td>
<td style="text-align: right;">66</td>
<td style="text-align: right;">4.08</td>
<td style="text-align: right;">1.935</td>
<td style="text-align: right;">18.90</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">1</td>
</tr>
<tr class="odd">
<td style="text-align: left;">Porsche 914-2</td>
<td style="text-align: right;">26.0</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">120.3</td>
<td style="text-align: right;">91</td>
<td style="text-align: right;">4.43</td>
<td style="text-align: right;">2.140</td>
<td style="text-align: right;">16.70</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">5</td>
<td style="text-align: right;">2</td>
</tr>
<tr class="even">
<td style="text-align: left;">Lotus Europa</td>
<td style="text-align: right;">30.4</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">95.1</td>
<td style="text-align: right;">113</td>
<td style="text-align: right;">3.77</td>
<td style="text-align: right;">1.513</td>
<td style="text-align: right;">16.90</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">5</td>
<td style="text-align: right;">2</td>
</tr>
<tr class="odd">
<td style="text-align: left;">Ford Pantera L</td>
<td style="text-align: right;">15.8</td>
<td style="text-align: right;">8</td>
<td style="text-align: right;">351.0</td>
<td style="text-align: right;">264</td>
<td style="text-align: right;">4.22</td>
<td style="text-align: right;">3.170</td>
<td style="text-align: right;">14.50</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">5</td>
<td style="text-align: right;">4</td>
</tr>
<tr class="even">
<td style="text-align: left;">Ferrari Dino</td>
<td style="text-align: right;">19.7</td>
<td style="text-align: right;">6</td>
<td style="text-align: right;">145.0</td>
<td style="text-align: right;">175</td>
<td style="text-align: right;">3.62</td>
<td style="text-align: right;">2.770</td>
<td style="text-align: right;">15.50</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">5</td>
<td style="text-align: right;">6</td>
</tr>
<tr class="odd">
<td style="text-align: left;">Maserati Bora</td>
<td style="text-align: right;">15.0</td>
<td style="text-align: right;">8</td>
<td style="text-align: right;">301.0</td>
<td style="text-align: right;">335</td>
<td style="text-align: right;">3.54</td>
<td style="text-align: right;">3.570</td>
<td style="text-align: right;">14.60</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">5</td>
<td style="text-align: right;">8</td>
</tr>
<tr class="even">
<td style="text-align: left;">Volvo 142E</td>
<td style="text-align: right;">21.4</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">121.0</td>
<td style="text-align: right;">109</td>
<td style="text-align: right;">4.11</td>
<td style="text-align: right;">2.780</td>
<td style="text-align: right;">18.60</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">2</td>
</tr>
<tr class="odd">
<td style="text-align: left;">Mazda RX41</td>
<td style="text-align: right;">21.0</td>
<td style="text-align: right;">6</td>
<td style="text-align: right;">160.0</td>
<td style="text-align: right;">110</td>
<td style="text-align: right;">3.90</td>
<td style="text-align: right;">2.620</td>
<td style="text-align: right;">16.46</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">4</td>
</tr>
<tr class="even">
<td style="text-align: left;">Mazda RX4 Wag1</td>
<td style="text-align: right;">21.0</td>
<td style="text-align: right;">6</td>
<td style="text-align: right;">160.0</td>
<td style="text-align: right;">110</td>
<td style="text-align: right;">3.90</td>
<td style="text-align: right;">2.875</td>
<td style="text-align: right;">17.02</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">4</td>
</tr>
<tr class="odd">
<td style="text-align: left;">Datsun 7101</td>
<td style="text-align: right;">22.8</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">108.0</td>
<td style="text-align: right;">93</td>
<td style="text-align: right;">3.85</td>
<td style="text-align: right;">2.320</td>
<td style="text-align: right;">18.61</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">1</td>
</tr>
<tr class="even">
<td style="text-align: left;">Hornet 4 Drive1</td>
<td style="text-align: right;">21.4</td>
<td style="text-align: right;">6</td>
<td style="text-align: right;">258.0</td>
<td style="text-align: right;">110</td>
<td style="text-align: right;">3.08</td>
<td style="text-align: right;">3.215</td>
<td style="text-align: right;">19.44</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">3</td>
<td style="text-align: right;">1</td>
</tr>
<tr class="odd">
<td style="text-align: left;">Hornet Sportabout1</td>
<td style="text-align: right;">18.7</td>
<td style="text-align: right;">8</td>
<td style="text-align: right;">360.0</td>
<td style="text-align: right;">175</td>
<td style="text-align: right;">3.15</td>
<td style="text-align: right;">3.440</td>
<td style="text-align: right;">17.02</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">3</td>
<td style="text-align: right;">2</td>
</tr>
<tr class="even">