/
skrapport.tex
4381 lines (4212 loc) · 158 KB
/
skrapport.tex
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
%% skrapport Skånings rapportklass
%%
%% Copyright (C) 2012-2016 by Simon Sigurdhsson <sigurdhsson@gmail.com>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainer of this work is Simon Sigurdhsson.
%%
%% This work consists of the file skrapport.tex and the derived files:
%% * skrapport.cls
%% * skrapport-colortheme-default.sty
%% * skrapport-colortheme-unscathed.sty
%% * skrapport-colortheme-violet.sty
%% * skrapport-colortheme-cruelwater.sty
%% * skrapport-colortheme-skdoc.sty
%% * skrapport-size-common.sty
%% * skrapport-size10pt.clo
%% * skrapport-size11pt.clo
%% * skrapport-size12pt.clo
\documentclass{skdoc}
\let\SI\relax
\usepackage{siunitx}
\DeclareSIUnit\point{pt}
\usepackage{hologo,booktabs,xcoffins,calc}
\usepackage[style=authoryear]{biblatex}
\usepackage{csquotes}
\usepackage{varioref,cleveref}
%\usepackage{chslacite}
\ExplSyntaxOn
\cs_set_protected_nopar:Npn\ExplHack{
\char_set_catcode_letter:n{ 58 }
\char_set_catcode_letter:n{ 95 }
}
\ExplSyntaxOff
% Hide the implementation
\OnlyDescription
% Bibliography entries
\begin{filecontents}{skrapport.bib}
@article{kpfonts,
author = {Christophe Caignaert},
title = {KP-Fonts 3.33},
year = {2018},
url = {http://mirror.ctan.org/fonts/kpfonts/doc/kpfonts.pdf}
}
@standard{ISO216,
title = {ISO 216:2007},
subtitle = {Writing paper and certain classes of printed matter -- Trimmed sizes -- A and B series, and indication of machine direction},
author = {{International Organization for Standardization, Technical Committee 6}},
year = {2007}
}
@standard{ISO8601,
title = {ISO 8601:2004},
subtitle = {Data elements and interchange formats -- Information interchange -- Representation of dates and times},
author = {{International Organization for Standardization, Technical Committee 154}},
year = {2004}
}
@article{Flynn,
author = {Peter Flynn},
title = {Rolling your own Document Class: Using \LaTeX{} to
keep away from the Dark Side},
journal = {The Prac\TeX{} Journal},
number = {4},
year = {2006},
url = {http://tug.org/pracjourn/2006-4/flynn/flynn.pdf}
}
\end{filecontents}
\addbibresource{skrapport.bib}
% Declare the target files
\SelfPreambleTo{\mypreamble}
\DeclareFile[key=class,preamble=\mypreamble]{skrapport.cls}
\DeclareFile[key=size-common,preamble=\mypreamble]%
{skrapport-size-common.sty}
\DeclareFile[key=size-10,preamble=\mypreamble]{skrapport-size10pt.clo}
\DeclareFile[key=size-11,preamble=\mypreamble]{skrapport-size11pt.clo}
\DeclareFile[key=size-12,preamble=\mypreamble]{skrapport-size12pt.clo}
\DeclareFile[key=theme-default,preamble=\mypreamble]%
{skrapport-colortheme-default.sty}
\DeclareFile[key=theme-unscathed,preamble=\mypreamble]%
{skrapport-colortheme-unscathed.sty}
\DeclareFile[key=theme-cruelwater,preamble=\mypreamble]%
{skrapport-colortheme-cruelwater.sty}
\DeclareFile[key=theme-violet,preamble=\mypreamble]%
{skrapport-colortheme-violet.sty}
\DeclareFile[key=theme-skdoc,preamble=\mypreamble]%
{skrapport-colortheme-skdoc.sty}
% This is where the documentation begins
\begin{document}
% Change & version info
\version{0.12k}
\changes{0.01}{Initial version}
\changes{0.03}{Removed \cs{rd} and \cs{id}}
\changes{0.04}{Added \pkg{microtype} package}
\changes{0.05}{Improved documentation}
\changes{0.06}{Corrected cheksum, further improved documentation}
\changes{0.07}{Various bugfixes, \hologo{XeLaTeX} compatibility,
better float settings, quote style fix,
\opt{intlimits} option to \pkg{amsmath}}
\changes{0.07a}{Fixed \pkg{kpfonts} issues}
\changes{0.09}{Introduced \pkg{kvoptions},
fixed abstract in twocolumn mode}
\changes{0.10}{Include skmath if exists
and wanted. Gobble optional arguments to
\env{figure} and \env{table} in two-column mode}
\changes{0.10a}{Include \pkg{xparse} (fixes breakage)}
\changes{0.11}{Added \opt{minion} for Adobe Minion Pro font}
\changes{0.11a}{Added \opt{skdoc} font option and \thm{skdoc} color theme}
\changes{0.12}{Deprecated several macros, moved to \LaTeX3. Use of TOC depth above 3 is now unsupported}
\changes{0.12a}{The \pkg{fontspec} package is now only loaded when using the \texttt{word} or \texttt{none} font stacks on \hologo{LuaLaTeX} or \hologo{XeLaTeX}. The \texttt{word} font stack is now
the default font stack on \hologo{XeLaTeX}}
\changes{0.12b}{Minor and major bugfixes to \cs{maketitle}, \opt{ptsize}, \opt{twocolumn} and others}
\changes{0.12c}{Added german language option, fixed sectioning macros in \opt{twocolumn} mode}
\changes{0.12d}{Added \opt{hanging-titles}, latin phrase macros. Load \pkg{isomath}. Don't load \pkg{icomma}. Use \cs{frenchspacing}}
\changes{0.12e}{Replace usage of deprecated \pkg{expl3} macros (thanks for the heads-up, Joseph Wright!)}
\changes{0.12f}{Fix incorrect usage of \pkg{xparse} macros}
\changes{0.12g}{Track \pkg{expl3} changes (thanks to Joseph Wright)}
\changes{0.12h}{Fix incompatibilities with recent \pkg{expl3}}
\changes{0.12i}{Track \pkg{expl3} changes (thanks to Joseph Wright)}
\changes{0.12j}{Track \pkg{expl3} changes (thanks to Phelype Oleinik). Replaces \pkg{opensans} option \opt{osfigures} with \opt{oldstyle}}
\changes{0.12k}{Don't try to generate \texttt{c}-variant macros from \texttt{n}-variant base forms}
% Don't forget to update the version number and release date of
% the package declaration in the implementation!
% Metadata
\package[ctan=skrapport,vcs=https://github.com/urdh/skrapport]{skrapport}
\title{The \textbf{\thepackage} document class}
\author{Simon Sigurdhsson}
\email{sigurdhsson@gmail.com}
% First page
\maketitle
\begin{abstract}
A document class intended for simple documents \emph{e.g.}
reports handed in to courses and such. It is small,
straight-forward and heavily inspired by the Prac\TeX{}
Journal style.
\end{abstract}
\tableofcontents
\section{Documentation}
The \thepackage\ document class aims to make typesetting simple but
stylish documents (mostly reports) as effortless as possible. It
does this by mostly reimplementing the default \pkg{article} class
in \LaTeX3, while making modifications to both form and function
along the way.
Because it is reimplemented in \LaTeX3, it may be incompatible with
any number of packages that patch or otherwise modify internals of
\pkg{article} or other document classes. For commonly used packages
(especially those used frequently by the author), this shouldn't be
a problem. The author gladly accepts reports of any such issues at
the project issue tracker --- see \enquote{Known issues} on
\vpageref{sec:issues}.
\subsection{Options}
As with other document classes, the class is loaded, possibly with
options, by issuing \Macro\documentclass[<options>]{skrapport}.
The class has a number of options controlling both form and function,
by \emph{e.g.} setting the font size, selecting a font stack, setting
the section title style, and so on.
\subsubsection{Layout}
Two options controlling the overall layout of the document are
provided. Collectively they control the paper size and text layout
of the document.
\Option{paper}\WithValues{a4, a5}\AndDefault{a4}
The \opt{paper} option controls the paper size of the document.
Internally, this is set by the \pkg{typearea} package, so in theory
many more paper sizes could be available, but the current options
cover most useful documents.
\Option{twocolumn}
The \opt{twocolumn} option sets up a two-column mode. This is not
provided by internal \LaTeX\ mechanics as in the original
\pkg{article} class, but instead by patching environments and macros
and using a combination of the \pkg{multicol} and \pkg{grid}
packages. In theory, this means that baselines of adjacent columns
should be aligned, and that three- or four-column modes are possible
in the future (but that'd be ridiculous).
\subsubsection{Style}
A couple of options to control the style of the document are
provided. Two of them, \opt{leqno} and \opt{fleqn}, are mainly
provided for compatibility with the \pkg{article} class.
\Option{leqno}
This option makes display math environments typeset their labels on
the left-hand side of the formula instead of the right-hand side.
\Option{fleqn}
This option makes display math environments left-align the entire
formula as opposed to centering it.
\Option{indent}\WithValues{true, false}\AndDefault{false}
The \opt{indent} option enables or disables the indentation of
paragraphs, with the default being not to indent anything. The
default behaviour thus is similar to that obtained using the
\pkg{parskip} package with the \pkg{article} package.
\Option{titles}\WithValues{rm, it, bf, sf}\AndDefault{bf}
Section titles (and a few other elements) are controlled by this
option in that they are typeset either using the regular roman font,
the boldfaced roman font or the sans serif font. For historical
reasons the default is a boldfaced roman font, but the sans serif
option is very handsome.
\Option{hanging-titles}\WithValues{true, false}\AndDefault{false}
This options allow sections to be set as \enquote{hanging} titles,
\emph{i.e.} with the section number in the margin.
\Option{color}\WithValues{\meta{color theme}}\AndDefault{default}
This option tells the class to activate color theme support and
optionally load a color theme. Several color themes are available
(as detailed by \enquote{Color themes} \vpageref{ssec:color}),
and the special value \texttt{false} disables color support
entirely (which only means that the \pkg{xcolor} package isn't
loaded, and that \cs{colortheme} remains undefined).
\subsubsection{Fonts}
Only two options control the font setup of the document class. The
class provides the same point sizes as \pkg{article}, but also
provides a large number of font stacks to choose from.
\Option{ptsize}\WithValues{10pt, 11pt, 12pt}\AndDefault{11pt}
The document class provides the same three point sizes as the
\pkg{article} class. There is room for expansion, but there really
shouldn't be any reason to use other point sizes.
\Option{font}\WithValues{none, kpfonts, lmodern, palatino, minion, skdoc, word}\AndDefault{kpfonts}
Several different font stacks, detailed by \vref{tab:font}, are
provided. Most of these work with \hologo{pdfLaTeX}, but there are
two special font stacks: \texttt{none} and \texttt{word}. The
former, predictably, loads no fonts whatsoever leaving the document
with Computer Modern fonts. This is useful if the fonts are replaced
later anyway, such as when using \hologo{XeLaTeX}.
The \texttt{word}
font stack, however, does load a few fonts. The fonts must be present
and installed on the system as OTF or TTF fonts, and the font stack
requires either \hologo{XeLaTeX} or \hologo{LuaLaTeX}.
Both \texttt{word} and \texttt{none} load the \pkg{fontspec}
package, assuming the document is compiled using \hologo{XeLaTeX}
or \hologo{LuaLaTeX}.
\Notice{The \texttt{skdoc} font stack doesn't have a math font.}
\Warning{Currently, \pkg{fontspec} is always loaded by
\hologo{XeLaTeX} regardless of options due to
the use of \pkg{polyglossia}. This means that
you \emph{have} to use OpenType fonts in your
document, otherwise \emph{only} Latin Modern
Roman (\emph{i.e.} no sans-serif or monospace
fonts) will be available. Therefore, the \texttt{word}
font stack is the default when using \hologo{XeLaTeX}.
\Hologo{LuaLaTeX} is not affected by this.}
\begin{table}[tp]
\centering
\caption{Font stacks provided by \thepackage.}
\label{tab:font}
\NewCoffin\tempcoffin\newlength\templength
\SetHorizontalCoffin\tempcoffin{
\begin{tabular}{lllll}
\toprule
Font stack & Serif font & Math font & Sans serif font & Monospace font \\
\midrule
\texttt{kpfonts} & Kp-Fonts & Kp-Fonts & Kp-Fonts & Kp-Fonts \\
\texttt{lmodern} & Latin Modern & Latin Modern & Latin Modern & Source Code Pro \\
\texttt{palatino} & \TeX\ Gyre & PX & Arev & Source Code Pro \\
\texttt{minion} & Minion Pro & Minion Pro & Myriad Pro & Source Code Pro \\
\texttt{skdoc} & PT Serif & --- & Open Sans & Source Code Pro \\
\texttt{word} & Cambria & Cambria Math & Calibri & Consolas \\
\bottomrule
\end{tabular}
}
\setlength{\templength}{(\textwidth - \CoffinWidth\tempcoffin)/2}
\hspace*{\templength}
\TypesetCoffin\tempcoffin
\end{table}
\subsubsection{Functionality}
The final three options affect functionality in one way or another.
Since \thepackage\ was originally designed for reports written in
either swedish or english, the class always loads either \pkg{babel}
or \pkg{polyglossia} with either of these languages. Additionally,
the class may load the \pkg{skmath} package if desirable.
\Option{nomath}\WithValues{true, false}\AndDefault{false}
When \texttt{false}, the \pkg{skmath} package is loaded, providing
improvements to the math functionality of \pkg{amsmath} and friends.
\Option{lang}\WithValues{en, sv, de}\AndDefault{sv}
This option specifies what main language \pkg{babel} or
\pkg{polyglossia} set up with. English (or swedish, for
\texttt{lang=en}) is loaded as well, for use in constructs
that allow for a second language.
\Option{draft}\WithValues{true, false}\AndDefault{false}
The \opt{draft} option, much like in \pkg{article}, enables
\cs{overfullrule}s and possibly similar functionality in loaded
packages (if they react to the global \opt{draft} option).
\subsection{User-level commands and environments}
The general idea behind the document class is to provide most
(if not all) of the macros provided by the standard \LaTeXe{}
classes, as well as additional macros to simplify and beautify
the documents produced. As such, most of the documentation that
follows details macros that are present in the standard document
classes. Some of them have changed functionality or semantics,
so at least a skim through this section is recommended.
\subsubsection{The front page}
The front page is the part of the document that has seen the most
changes in \thepackage\ compared to \pkg{article}. In addition to
the new, Prac\TeX-inspired layout, there are a few additional
pieces of information in it. Also, the \cs{author} macro has been
dramatically improved.
\DescribeMacro\date{<ISO8601 date>}
The \cs{date} macro now internally employs \pkg{isodate} to typeset
the date of the document. This means that the input must be either
the string \enquote{today}, the token \cs{today} or a date as defined
by ISO8601\footcite{ISO8601}. The mechanisms provided by
\pkg{isodate} can be used to affect the output format.
\DescribeMacro\author[<email>]{<name>}
In contrast with the \pkg{article} package, the \cs{author} macro
should no longer be used to typeset several author names at once.
Instead, one \cs{author} command is to be issued for every author,
optionally providing a corresponding email. These are then combined,
in the order they are given, to form a list of authors and a
corresponding list of email adresses.
\DescribeMacro\regarding{<topic>}
This macro defines a topic or other short message detailing the
purpose of the document. It is typeset along with the date in the
upper left corner of the title page.
\DescribeMacro\license{<license name>}
The \cs{license} macro defines a short license name to be typeset
in the lower right corner of the title page. This mechanism could of
course be used to typeset an institution name or similar as well.
It is only typeset when also using the \env{titlepage} environment
described below.
\DescribeMacro\title{<document title>}
The \cs{title} macro, while not defined by \pkg{skrapport}, is
relevant to describe. It simply sets the title of the document, as
displayed by \cs{maketitle}.
\DescribeMacro\maketitle[hide=\{date,regarding,email\},nopdfinfo]
As in \pkg{article}, the \cs{maketitle} macro typesets the
information provided by \cs{title}, \cs{author} and friends to form
a stylish front page. When combined with \env{abstract},
\env{titlepage} and/or \cs{tableofcontents}, you get a very
good-looking preamble with almost no effort.
The optional argument is a key-value list with two valid entries,
\opt*{hide} and \opt*{nopdfinfo}. The \opt*{hide} entry accepts a
comma-separated list in which the values \opt*{date},
\opt*{regarding} and \opt*{email}
are interpreted as instructions to hide the corresponding entry from
the front page. The \opt*{nopdfinfo} key disables the generation of
PDF information by \pkg{hyperref}.
\DescribeEnv[<abstract text>]{abstract}
The \env{abstract} environment defines an abstract, which is typeset
in a block with the \cs{abstractname} word next to it (see
\emph{e.g.} the title page of this manual for an example).
\DescribeEnv[<title page contents>]{titlepage}
Normally, \cs{maketitle} doesn't reserve its own page. By enclosing
\cs{maketitle} (and \env{abstract} if appropriate) in the
\env{titlepage} environment, the contents are typeset on their
own page, without page numbering and with the \cs{license} text
in the lower right corner (if applicable).
\subsubsection{Sectioning}
\DescribeMacro\section*[<short title>]{<title>}
\DescribeMacro\subsection*[<short title>]{<title>}
\DescribeMacro\subsubsection*[<short title>]{<title>}
\DescribeMacro\paragraph*[<short title>]{<title>}
\DescribeMacro\subparagraph*[<short title>]{<title>}
The sectioning macros are superficially very similar to those
provided by \pkg{article}, but have been completely reimplemented
in \pkg{expl3} code. Additionally, the style of these sectioning
macros, as detailed by the \opt{titles} option documentation above,
can be changed.
All of them have both arguments and behaviour in common, only
differing in style. The starred versions are unnumbered, but still
accept the opional short title (simply discarding it). The optional
short title is used in the table of contents. The
\texttt{secnumdepth} counter limits the depth of section numbering.
The first three macros, being section titles, are typeset as actual
titles on their own line with appropriate spacing above and below.
The paragraph macros instead typeset run-in titles.
\subsubsection{Macros and environments from \pkg{article}}
Aside from the \env{itemize} and \env{enumerate} envionments and the
font selection macros, which are carried without modification from
\LaTeXe, a couple of environments and macros are defined.
The old font macros, whose use has been discouraged for a long time,
are now deprecated. Instead of functioning correctly, they will emit
an error and require user input. Use the \cs*{text??}/\cs*{??family}
macros instead. For emphasis, use the \cs{emph} macro.
\DescribeMacro\emph{<text>}
Emphasized text will be typeset in italic, or bold italic if the
macro is used in a context where italic is already used (such as
inside another \cs{emph} invokation).
\DescribeEnv[\cs*{item}\oarg{item} \meta{description}]{description}
The \env{description} environment behaves as expected, typesetting
a list of descriptions as in the \pkg{article} class.
\DescribeEnv[<short quote>]{quote}
Intended for short quotes, the \env{quote} environment simply
typesets a centered block of italic text.
\DescribeEnv[<long quote>]{quotation}
Longer quoted passages are typeset using the \env{quotation}
environment. This is simply a \env{quote} environment with additional
spacing above and below.
\DescribeEnv[<pretentious poetry>]{verse}
The \env{verse} environment is intended for poetry and other text
where line breaks are critical. Use \verb|\\| to break
lines.
\DescribeMacro\appendix
This macro signals the end of the main matter and the start of
the appendix. In essence, it resets the section numbering counter
and changes the section numbering to the upper-case alphabetic
sequence.
\subsubsection{Floats}
Both the \env{figure} and \env{table} float environments accept an
optional positioning argument. The default positioning is
\texttt{tp}. Both environments also have starred variants, which
do nothing in one-column mode while typesetting the figure across
both columns in two-column mode. As usual, \cs{centering},
\cs{caption} and \cs{label} should be used inside the floats.
\DescribeEnv[<content>]{figure}[position]
This float environment is intended for figures. The most common
contents are \cs{includegraphics} statements or \env{tikzpicture}
environments.
\DescribeEnv[<content>]{table}[position]
A float intended for tables. Probably contains \env{tabular}s.
\DescribeEnv{figcenter}
This environment is useful for wide figures and tables. It typesets
its contents centered horizonally, but allows the content to extend
into the margin. The content is set in a horizontal coffin.
\subsubsection{Table of contents}
\DescribeMacro\tableofcontents
The table of contents are typeset using this macro. The
\texttt{tocdepth} counter limits the depth of the table of
contents, but for stylistic reasons values higher than 3 are
unsupported.
% \subsubsection{Basic bibliography support}
\subsubsection{Miscellaneous}
\DescribeMacro\comment*{<comment>}
\DescribeMacro\note*{<comment>}
\DescribeMacro\com*{<comment>}
These macros, the two latter being aliases of the first one, typeset
an author's comment in the document. The starred variants typeset the
comment inline with a red background, while the unstarred variant
typesets the comment in a \cs{marginpar}.
\DescribeMacro\eg
\DescribeMacro\ie
\DescribeMacro\etc
\DescribeMacro\cf
\DescribeMacro\viz
These macro print the abbreviation of the latin phrases
\emph{exempli gratia}, \emph{id est}, \emph{et cetera},
\emph{confer} and \emph{videlicet}, respectively.
The macros peek ahead to find punctuation marks and spaces, so they
should behave correctly regardless of usage (assuming they're used in
running text and uncomplicated settings). In languages other than
english, appropriate translations are made if applicable.
\DescribeMacro\dash
This macro prints an em-dash surrounded by thin spaces, as discussed
by \textcite[\pno~8]{Flynn}. When \cs*{DeclareUnicodeCharacter} is
available, the real em dash uses this definition.
\subsubsection{Color theme support}
\DescribeMacro\colortheme{<theme>}
The \cs{colortheme} macro, which is only available when the
\opt{color} option is \texttt{true}, applies a color theme to
the document. For a list of available color themes, see
\enquote{Color themes} \vpageref{ssec:color}.
\subsubsection{Font size macros}
The font size macros, expectedly, set the size of the text. They
do not take arguments, instead affecting all subsequent text of the
current \TeX\ group, so use braces to provide and limit context.
Also note that unlike \pkg{article}, these macros are \emph{all}
available, regardless of point size option.
\DescribeMacro\tiny
Typesets {\tiny tiny} text.
\DescribeMacro\scriptsize
Typesets {\scriptsize script-size} text.
\DescribeMacro\footnotesize
Typesets {\footnotesize footnote-sized} text.
\DescribeMacro\small
Typesets {\small small} text.
\DescribeMacro\normalsize
Typesets normal text.
\DescribeMacro\large
Typesets {\large large} text.
\DescribeMacro\Large
Typesets {\Large slightly larger} text.
\DescribeMacro\LARGE
Typesets {\LARGE even larger} text.
\DescribeMacro\huge
Typesets {\huge huge} text.
\DescribeMacro\Huge
Typesets {\Huge really huge} text.
\subsection{Color themes}\label{ssec:color}
\DescribeMacro\colortheme{<theme>}
If the package is loaded with the \opt{color} option, changing the color theme is
possible using \cs{colortheme}, which loads an
appropriate package. At the moment, four color themes are available.
\Theme{default}
The \thm{default} theme is fairly conservative, only coloring
\pkg{hyperef} links with more readable, slightly darker colors than
the standard ones. It should print well even on non-color printers.
\Theme{unscathed}
The \thm{unscathed} theme is based on a palette with the same
name on COLOURlovers%
\footnote{\url{http://www.colourlovers.com/palette/1440498/unscathed}},
and applies a \textcolor[HTML]{463335}{dark brown} color to
emphasized text, a \textcolor[HTML]{CF5D3B}{rusty} color to links,
a \textcolor[HTML]{B34430}{darker rust} color to titles and a
\textcolor[HTML]{70524A}{lighter brown} to quotes.
\Theme{cruelwater}
The \thm{cruelwater} theme is also based on a palette from
COLOURlovers%
\footnote{\url{http://www.colourlovers.com/palette/126030/Cruel_Water_at_Night}},
and applies a \textcolor[HTML]{030C22}{dark blue} color to bold
text and captions, a \textcolor[HTML]{20293F}{slightly less dark
blue} to titles and emphasized text, a \textcolor[HTML]{A9B0B3}{
light gray} color to small print and a \textcolor[HTML]{404749}{
darker gray} to quotes.
\Theme{violet}
The \thm{violet} theme, like \thm{unscathed} and \thm{cruelwater},
is based on a COLOURlovers palette%
\footnote{\url{http://www.colourlovers.com/palette/1831303/Violet_White_Bedrm}}.
It colors all links \textcolor[HTML]{932444}{bright purple}, applies
a \textcolor[HTML]{311A2A}{dark puple} color to titles, bold text
and captions, a \textcolor[HTML]{D6CBCF}{grayish purple} to small
print, a \textcolor[HTML]{463335}{dark brown} color to quotes and a
\textcolor[HTML]{98758D}{pastel violet} color to emphasized text.
\Theme{skdoc}
The \thm{skdoc} theme is loosely based on the \pkg{skdoc} document class, with which this documentation is typeset.
% \subsection{Additional information}
% The document class includes a number of packages by default. This
% is useful to know, since passing explicit options to these packages
% will require you to utilize the \cs{PassOptionsToPackage} macro
% before you load the class using \cs{documentclass}.
% Table~\ref{tab:pkgs} lists the packages included by \thepkg\ along
% with their options (if applicable).
%
% \begin{table}[tbp]
% \centering
% \caption{User-level packages included by \thepkg.}
% \label{tab:pkgs}
% \begin{tabular}{llp{15em}}
% \toprule
% \textbf{Package} & \textbf{Options} & \textbf{Comments} \\
% \midrule
% \pkg{amsmath} & \texttt{intlimits} & Provides \hologo{AmS} commands and environments. \\
% \pkg{amssymb} & & Only if not using \opt{kpfonts}.\\
% \pkg{babel} & see options \opt{swe} and \opt{eng} & Only loaded if \emph{not} using \hologo{XeTeX}.\\
% \pkg{calc} & & \\
% \pkg{fontenc} & \texttt{T1} & Only loaded if \emph{not} using \hologo{XeTeX}. Makes sure we are using a good font encoding for crisp appearance on-screen (OT1 is horrible). \\
% \pkg{fontspec} & \texttt{quiet} & Only loaded if using \hologo{XeTeX}. Provides basic OTF font selection commands.\\
% \pkg{geometry} & \texttt{a4paper} or \texttt{a5paper} & This is used by the \opt{paper} option to set the paper area. \\
% \pkg{icomma} & & \\
% \pkg{inconsolata} & & \\
% \pkg{microtype} & & Provides micro-typographic improvements.\\
% \pkg{multicol} & & Only loaded with the \opt{twocolumn} option. \\
% \pkg{polyglossia} & see options \opt{swe} and \opt{eng} & Only loaded if using \hologo{XeTeX}.\\
% \pkg{skmath} & & Only if it exists and \opt{nomath} isn't set.\\
% \pkg{textcomp} & & Only if not using \opt{kpfonts}.\\
% \pkg{xcolor} & & Only loaded with the \opt{color} option.\\
% \bottomrule
% \end{tabular}
% \end{table}
\section{Known issues}\label{sec:issues}
A list of current issues is available in the Github repository of this
package\footnote{\url{https://github.com/urdh/skrapport/issues}}, but as
of the release of \theversion, there is one known issue:
\begin{description}
% \item[\#6] ???
\item[--] If a \cs{subsubsection} is the last item of the Table
of Contents, it will not be indented properly.
\end{description}
If you discover any bugs in this package, please report them to the issue
tracker in the \thepackage\ Github repository.
\Implementation\ExplHack
\section{Implementation}
Start by including \pkg{expl3}, \pkg{l3keys2e} and some other
useful packages, as well as declaring the class.
\begin{MacroCode}{class}
\RequirePackage{expl3,l3keys2e,xparse,xstring,etoolbox}
\ProvidesExplClass{skrapport}%
{2019/10/15}{0.12k}{stylish report document class}
\end{MacroCode}
\subsection{Messages}
Tons of messages are declared for future use.
\begin{MacroCode}{class}
\msg_new:nnnn{skrapport}{option-deprecated}{Option~`#1'~deprecated!}
{Please~use~`#2'~instead.}
\msg_new:nnnn{skrapport}{option-no-effect}{Option~`#1'~deprecated!}
{It~has~no~effect;~simply~use~nothing~instead.}
\msg_new:nnnn{skrapport}{invalid-paper-size}{Invalid~paper~size~`#1'!}
{\token_to_str:N\__skrapport_setup_paper:n~was~invoked~with~an~
invalid~argument;~paper~size~will~remain~unchanged.}
\msg_new:nnnn{skrapport}{invalid-point-size}{Invalid~point~size~`#1'!}
{\token_to_str:N\__skrapport_setup_ptsize:n~was~invoked~with~an~
invalid~argument;~cannot~continue~without~setting~a~valid~point~
size.~Please~fix~the~issue~before~typesetting~again.}
\msg_new:nnnn{skrapport}{invalid-titles}{Invalid~title~type~`#1'!}
{\token_to_str:N\__skrapport_setup_titles:n~was~invoked~with~an~
invalid~argument;~falling~back~to~`#2'.}
\msg_new:nnnn{skrapport}{invalid-lang}{Invalid~language~`#1'!}
{\token_to_str:N\__skrapport_setup_lang:n~was~invoked~with~an~
invalid~argument;~`babel'~and/or~`polyglossia'~will~remain~
unloaded.}
\msg_new:nnnn{skrapport}{invalid-font}{Invalid~font~`#1'!}
{\token_to_str:N\__skrapport_setup_font:n~was~invoked~with~an~
invalid~argument;~no~font~package~has~been~loaded.~This~may~result~
in~bad~rendering~due~to~old~Computer~Modern~fonts.}
\msg_new:nnnn{skrapport}{noop-call}{No-op~invokation~of~macro!}
{\token_to_str:N#1~was~invoked,~but~circumstances~dictate~that~the~
macro~should~do~nothing.~Will~do~\token_to_str:N\prg_do_nothing:~
instead.}
\msg_new:nnnn{skrapport}{old-font-deprecated}{Deprecated~macro~\token_to_str:N#1!}
{The~old~font~macro~\token_to_str:N#1~is~deprecated!~Use~
\token_to_str:N#2~instead.}
\msg_new:nnnn{skrapport}{color-patch-failed}{Could~not~patch~macro~\token_to_str:N#1!}
{The~macro~\token_to_str:N#1~could~not~be~patched!~Color~theme~
support~may~be~incomplete.}
\msg_new:nnnn{skrapport}{license-not-printed}{Detected~\token_to_str:N\license\ but~no~`titlepage'!}
{The~text~provided~by~\token_to_str:N\license\ is~only~printed~when~
the~`titlepage'~environment~is~used,~but~it~seems~to~be~missing.}
\msg_new:nnnn{skrapport}{font-requires-xetex}{The~`font=#1'~option~requires~XeTeX~or~luaTeX!}
{Please~choose~another~font~setup~or~compile~the~document~with~
either~xelatex~or~lualatex.}
\msg_new:nnnn{skrapport}{tocdepth-too-deep}{TOC~depth~is~too~deep!}
{The~current~tocdepth,~#1,~is~not~supported.~Please~redefine~the~
\token_to_str:N#2~macro~to~enable~support.}
\msg_new:nnnn{skrapport}{caption-in-figcenter}{Cannot~use~\token_to_str:N\caption\ here!}
{The~\token_to_str:N\caption\ macro~can't~be~used~inside~figcenter~environments!~Please~move~the~caption~to~the~enclosing~float~environment.}
\end{MacroCode}
This message should probably not be used at all. Except in
development versions straight off Github, of course.
\begin{MacroCode}{class}
\msg_new:nnn{skrapport}{not-implemented}
{Unimplemented~macro~\token_to_str:N#1!}
\end{MacroCode}
\subsection{Options}
First, a few booleans used by parts of the option handling code.
\begin{macro}{\g__skrapport_draft_bool}
Are we in \opt{draft} mode?
\begin{MacroCode}{class}
\bool_new:N\g__skrapport_draft_bool
\end{MacroCode}
\end{macro}
\begin{macro}{\g__skrapport_color_bool}
Are we supposed to be using \opt{color}s?
\begin{MacroCode}{class}
\bool_new:N\g__skrapport_color_bool
\end{MacroCode}
\end{macro}
\begin{macro}{\g__skrapport_has_polyglossia_bool}
Has \pkg{polyglossia} been loaded?
\begin{MacroCode}{class}
\bool_new:N\g__skrapport_has_polyglossia_bool
\end{MacroCode}
\end{macro}
\subsubsection{Option setup macros}
In this section, all options declared in the previous section are
implemented using setup macros. Some of these may have to be called
in an appropriate order, but I haven't checked that yet.
\begin{macro}{\__skrapport_setup_paper:n}[1]
{Paper size (\texttt{a4} or \texttt{a5})}
\changes{0.12}{Use \pkg{typearea} to set paper size}
Note the extra integer, which is set up for use with \pkg{grid}.
\begin{macro*}{\g__skrapport_grid_lines_int}
\begin{MacroCode}{class}
\int_new:N\g__skrapport_grid_lines_int
\end{MacroCode}
\end{macro*}
\begin{MacroCode}{class}
\cs_new:Npn\__skrapport_setup_paper:n#1{
\str_case:nnF{#1}{
\end{MacroCode}
The two options simply consist of passing the appropriate option
to the \pkg{typearea} package. Note that the use of \pkg{typearea}
mean that we theoretically could accept more paper size options.
\begin{MacroCode}{class}
{a4}{
\PassOptionsToPackage{paper=A4}{typearea}
\int_gset:Nn\g__skrapport_grid_lines_int{40}
}
{a5}{
\PassOptionsToPackage{paper=A5}{typearea}
\int_gset:Nn\g__skrapport_grid_lines_int{28}
}
}{
\end{MacroCode}
Invalid paper sizes (such calls should never happen) are
handled by issuing a warning and hoping that the default
paper size is acceptable.
\begin{MacroCode}{class}
\msg_warning:nnn{skrapport}{invalid-paper-size}{#1}
}
\end{MacroCode}
The \pkg{typearea} package is loaded with the options specified
earlier through \cs{PassOptionsToPackage}, and some additional ones.
\begin{MacroCode}{class}
\AtEndOfClass{\RequirePackage[DIV=calc]{typearea}}
\end{MacroCode}
In case the point size changes later, or two column mode is
activated, we recalculate the typearea just before the typesetting
begins.
\begin{MacroCode}{class}
\AtBeginDocument{\recalctypearea}
}
\end{MacroCode}
\end{macro}
\begin{macro}{\__skrapport_setup_ptsize:n}[1]
{Point size (\texttt{10pt}, \texttt{11pt} or \texttt{12pt})}
The standard point sizes are defined much like in the \pkg{article}
class, \emph{i.e.} by saving a number and loading \file{size10.clo},
\file{size11.clo} or \file{size12.clo} as appropriate
\begin{MacroCode}{class}
\cs_new:Npn\__skrapport_setup_ptsize:n#1{
\str_case:nnF{#1}{
\end{MacroCode}
\begin{macro*}{\c__skrapport_ptsize_token}
\begin{MacroCode}{class}
{10pt}{\int_const:Nn\c__skrapport_ptsize_int{0}}
{11pt}{\int_const:Nn\c__skrapport_ptsize_int{1}}
{12pt}{\int_const:Nn\c__skrapport_ptsize_int{2}}
\end{MacroCode}
\end{macro*}
\begin{MacroCode}{class}
}{
\end{MacroCode}
Invalid point sizes are critical errors, since we can't recover
from them in any reasonable way. Loading a default point size is
unreasonable, since all in-class calls to this macro should know
what sizes are available, and if you're calling it with invalid
parameters from elsewhere, you should be punished.
\begin{MacroCode}{class}
\msg_critical:nnn{skrapport}{invalid-point-size}{#1}
}
\file_input:n{skrapport-size#1.clo}
}
\end{MacroCode}
\end{macro}
\begin{macro}{\__skrapport_setup_twocolumn:}
\changes{0.12c}{Major changes to the sectioning commands, to
override what \pkg{grid} is doing}
Setting up for twocolumn mode is slightly compliacted. Note that this
macro should be called from \cs{AtEndOfClass} to ensure that we patch
everything correctly. Note also that \pkg{multicol} is always loaded
as it is used for the \env{theindex} environment.
\begin{MacroCode}{class}
\cs_new:Nn\__skrapport_setup_twocolumn:{
\RequirePackage{etoolbox}
\AtBeginDocument{
\KOMAoptions{twocolumn=false,DIV=12}
}
\end{MacroCode}
We include the \pkg{grid} package in two-column mode, because
it looks way better that way.
\begin{MacroCode}{class}
\int_set:Nn\l_tmpa_int{10+\c__skrapport_ptsize_int}
\int_set:Nn\l_tmpb_int{12*\l_tmpa_int/10}
\RequirePackage[fontsize=\l_tmpa_int pt,
baseline=\l_tmpb_int pt,
lines=\g__skrapport_grid_lines_int]{grid}
\end{MacroCode}
Now, we patch commands. First up is \env{abstract}. Save the old
one in case we need it (we do).
\begin{MacroCode}{class}
\cs_set_eq:Nc\__skrapport_onecol_abstract:{environment~abstract~code}
\cs_set_eq:Nc\__skrapport_end_onecol_abstract:{environment~abstract~end~aux~}
\pretocmd{\__skrapport_onecol_abstract:}{\null}{}{}
\RenewDocumentEnvironment{abstract}{}{\section*{\abstractname}}{}
\end{MacroCode}
Then \env{document} (kind of, at least) and \cs{maketitle}. Again,
save the old \cs{maketitle}.
\begin{MacroCode}{class}
\AfterEndPreamble{\begin{multicols}{2}}
\AtEndDocument{\end{multicols}}
\cs_set_eq:NN\__skrapport_onecol_maketitle:\maketitle
\pretocmd{\maketitle}{\begin{onecol}}{}{}
\apptocmd{\maketitle}{\end{onecol}}{}{}
\end{MacroCode}
Next up is \env{titlepage}. This is where we need the saved
\env{abstract} and \cs{maketitle}.
\begin{MacroCode}{class}
\BeforeBeginEnvironment{titlepage}{
\begin{onecol}
\cs_set_eq:cN{environment~abstract~code}\__skrapport_onecol_abstract:
\cs_set_eq:cN{environment~abstract~end~aux~}\__skrapport_end_onecol_abstract:
\cs_set_eq:NN\maketitle\__skrapport_onecol_maketitle:
}
\AfterEndEnvironment{titlepage}{\end{onecol}}
\end{MacroCode}
Always typeset \env{equation} and friends outside the grid:
\begin{MacroCode}{class}
\BeforeBeginEnvironment{equation}{\begin{gridenv}}
\AfterEndEnvironment{equation}{\end{gridenv}}
\BeforeBeginEnvironment{equation*}{\begin{gridenv}}
\AfterEndEnvironment{equation*}{\end{gridenv}}
\BeforeBeginEnvironment{multline}{\begin{gridenv}}
\AfterEndEnvironment{multline}{\end{gridenv}}
\BeforeBeginEnvironment{multline*}{\begin{gridenv}}
\AfterEndEnvironment{multline*}{\end{gridenv}}
\BeforeBeginEnvironment{gather}{\begin{gridenv}}
\AfterEndEnvironment{gather}{\end{gridenv}}
\BeforeBeginEnvironment{gather*}{\begin{gridenv}}
\AfterEndEnvironment{gather*}{\end{gridenv}}
\BeforeBeginEnvironment{align}{\begin{gridenv}}
\AfterEndEnvironment{align}{\end{gridenv}}
\BeforeBeginEnvironment{align*}{\begin{gridenv}}
\AfterEndEnvironment{align*}{\end{gridenv}}
\BeforeBeginEnvironment{flalign}{\begin{gridenv}}
\AfterEndEnvironment{flalign}{\end{gridenv}}
\BeforeBeginEnvironment{flalign*}{\begin{gridenv}}
\AfterEndEnvironment{flalign*}{\end{gridenv}}
\BeforeBeginEnvironment{alignat}{\begin{gridenv}}
\AfterEndEnvironment{alignat}{\end{gridenv}}
\BeforeBeginEnvironment{alignat*}{\begin{gridenv}}
\AfterEndEnvironment{alignat*}{\end{gridenv}}
\end{MacroCode}
Since \pkg{grid} override the usual sectioning macros, we have to
provide fixed and improved variants that conform to our style
and out public API. This is only necessary for
the \enquote{major} sectioning macros, not \cs*{paragraph} and
\cs*{subparagraph}.
\begin{macro*}{\section}
\begin{MacroCode}{class}
\skip_gset:Nn\c__skrapport_section_pre_skip{-.999\baselineskip}
\skip_gset:Nn\c__skrapport_section_post_skip{0.001\baselineskip}
\dim_gset:Nn \c__skrapport_section_indent_dim{\c_zero_dim}
\cs_set_protected:Nn\__skrapport_section_style:
{\normalfont\__skrapport_title_style:}
\DeclareDocumentCommand\section{som}{
\__skrapport_generic_section:nnnnn{section}{1}{##1}{##2}{##3}
}
\end{MacroCode}
\end{macro*}
\begin{macro*}{\subsection}
\begin{MacroCode}{class}
\skip_gset:Nn\c__skrapport_subsection_pre_skip{\baselineskip}
\skip_gset:Nn\c__skrapport_subsection_post_skip{-.35\baselineskip}
\dim_gset:Nn \c__skrapport_subsection_indent_dim{\c_zero_dim}
\cs_set_protected:Nn\__skrapport_subsection_style:
{\normalfont\__skrapport_title_style:\unskip}
\DeclareDocumentCommand\subsection{som}{
\__skrapport_generic_section:nnnnn{subsection}{2}{##1}{##2}{##3}
}
\end{MacroCode}
\end{macro*}
\begin{macro*}{\subsubsection}
\begin{MacroCode}{class}
\skip_gset:Nn\c__skrapport_subsubsection_pre_skip{\baselineskip}
\skip_gset:Nn\c__skrapport_subsubsection_post_skip{-.35\baselineskip}
\dim_gset:Nn \c__skrapport_subsubsection_indent_dim{\c_zero_dim}
\cs_set_protected:Nn\__skrapport_subsubsection_style:
{\normalfont\itshape\__skrapport_title_style:\unskip}
\DeclareDocumentCommand\subsubsection{som}{
\__skrapport_generic_section:nnnnn{subsubsection}{3}{##1}{##2}{##3}
}
\end{MacroCode}
\end{macro*}
We also redefine \cs{l@section} to make the TOC blend in a bit.
\begin{macro*}{\l@section}
\begin{MacroCode}{class}
\DeclareDocumentCommand\l@section{mm}{
\group_begin:
\skip_vertical:n{.75ex}
\__skrapport_title_style:
\__skrapport_toc_line:nnnnn{1}{0em}{1.3em}{##1}{
\__skrapport_title_style: ##2
}
\group_end:
}
\end{MacroCode}
\end{macro*}
The \env{figure} environment is patched\ldots
\begin{MacroCode}{class}
\cs_new:Npn\__skrapport_xdblfloat:nn##1##2{\@xdblfloat{##1}[##2]}
\cs_generate_variant:Nn\__skrapport_xdblfloat:nn{nx}
\RenewDocumentEnvironment{figure}{o}{
\begin{gridenv}
\vspace{\intextsep}
\begin{minipage}{\linewidth}
\cs_set:Npn\@captype{figure}
\centering
}{
\end{minipage}
\vspace{\intextsep}
\end{gridenv}
}
\RenewDocumentEnvironment{figure*}{o}{
\__skrapport_xdblfloat:nx{figure}
{\IfNoValueTF{##1}{tp}{##1}}
\dim_set_eq:NN\hsize\textwidth
\dim_set_eq:NN\linewidth\textwidth
\centering
}{
\end@dblfloat
}
\end{MacroCode}
\ldots as is \env{table}.
\begin{MacroCode}{class}
\RenewDocumentEnvironment{table}{o}{%
\begin{gridenv}
\vspace{\intextsep}
\begin{minipage}{\linewidth}
\cs_set:Npn\@captype{table}
\cs_set_eq:NN\__skrapport_old_caption:\caption
\RenewDocumentCommand{\caption}{om}{%
\skip_set_eq:NN\l_tmpa_skip\abovecaptionskip
\skip_set_eq:NN\abovecaptionskip\belowcaptionskip
\skip_set_eq:NN\belowcaptionskip\l_tmpa_skip
\vspace{\abovecaptionskip}
\__skrapport_old_caption:[####1]{####2}
\vspace{\belowcaptionskip}
}
\centering
}{
\end{minipage}
\vspace{\intextsep}
\end{gridenv}
}
\RenewDocumentEnvironment{table*}{o}{
\__skrapport_xdblfloat:nx{table}
{\IfNoValueTF{##1}{tp}{##1}}
\dim_set_eq:NN\hsize\textwidth
\dim_set_eq:NN\linewidth\textwidth
\centering
}{
\end@dblfloat
}
\end{MacroCode}
\begin{environment}{onecol}
\changes{0.10}{Fixed, now not completely broken}
\changes{0.12b}{Reverted to \cs{newenvironment}, because \pkg{xparse} breaks the trickery}
Finally, we define an environment \env{onecol} that typesets
arbitrary material in a single column. This is a bit tricky to
do, and probably cargo-cult as well. We define the start of the
environment to immediately end itself (with the empty ending),