Debian Codegraph @

texmf-dist/source/latex/cs-techrep/cs-techrep.dtx

raw
1 %\iffalse
2 % cs-techrep.dtx generated using makedtx version 1.2 (c) Nicola Talbot
3 % Command line args:
4 % -src "(_cpn_copyIntoExamplesFolder_cls.cmd|cs-techrep.cls)=>\1"
5 % -doc "doc/cs-techrep.tex"
6 % -preamble "Copyright 2023-2026 Christoph P. Neumann This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c of this license or any later version. The latest version of this license is in https://www.latex-project.org/lppl.txt and version 1.3c or later is part of all distributions of LaTeX version 2008 or later. This work has the LPPL maintenance status maintained. The Current Maintainer of this work is Christoph P. Neumann. "
7 % -date "2023-2026"
8 % -macrocode ".*"
9 % -setambles ".*=>\nopreamble"
10 % -dir "src"
11 % -author "Christoph P. Neumann "
12 % cs-techrep
13 % Created on 2026/2/24 20:07
14 %\fi
15 %\iffalse
16 %<*package>
17 %% \CharacterTable
18 %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
19 %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
20 %% Digits \0\1\2\3\4\5\6\7\8\9
21 %% Exclamation \! Double quote \" Hash (number) \#
22 %% Dollar \$ Percent \% Ampersand \&
23 %% Acute accent \' Left paren \( Right paren \)
24 %% Asterisk \* Plus \+ Comma \,
25 %% Minus \- Point \. Solidus \/
26 %% Colon \: Semicolon \; Less than \<
27 %% Equals \= Greater than \> Question mark \?
28 %% Commercial at \@ Left bracket \[ Backslash \\
29 %% Right bracket \] Circumflex \^ Underscore \_
30 %% Grave accent \` Left brace \{ Vertical bar \|
31 %% Right brace \} Tilde \~}
32 %</package>
33 %\fi
34 % \iffalse
35 % Doc-Source file to use with LaTeX2e
36 % Copyright (C) 2023-2026 Christoph P. Neumann , all rights reserved.
37 % \fi
38 % \iffalse
39 %<*driver>
40 \documentclass{ltxdoc}
41
42 \CodelineNumbered
43 \EnableCrossrefs
44 \CodelineIndex
45 \RecordChanges
46 \GetFileInfo{cs-techrep.cls}
47
48 \parskip1.0ex
49 \parindent0.0ex
50
51 \begin{document}
52 \DocInput{cs-techrep.dtx}
53 \end{document}
54 %</driver>
55 %\fi
56 %\title{\textsf{cs-techrep}\\
57 %Technical Reports in Computer Science and Software Engineering}
58 %\author{Christoph P.\ Neumann \texttt{$<[email protected]$>$}}
59 %\date{Version 0.9.1}
60 %\maketitle
61 %\PrintChanges
62 %
63 %\begin{abstract}
64 %The \texttt{cs-techrep} class provides a convenient environment
65 %for writing technical reports in computer science and software engineering.
66 %The style is adopted from IEEE.
67 %The cs-techrep class requires the latex/pdflatex
68 %in combination with biblatex using a biber backend.
69 %\end{abstract}
70 %
71 %\section{Installation}
72 %
73 %The \texttt{zip} or \texttt{tar.gz} file comes with a \texttt{cs-techrep.ins}
74 %and a \texttt{cs-techrep.dtx} file included which contains the \LaTeX\ stuff.
75 %
76 %To extract the class files call:
77 %
78 %\begin{verbatim}
79 % $ latex cs-techrep.ins
80 %\end{verbatim}
81 %
82 %This call will extract all \LaTeX\ specific files to the current
83 %directory. You can either use the files for a single
84 %cv project or you can integrate the files into your \TeX\ installation.
85 %
86 %If you just want to use \textsf{cs-techrep} for a single curriculum vitae
87 %project, the simplest way is just to copy the generated files to the
88 %folder of the project.
89 %
90 %If you want to integrate \textsf{cs-techrep} into your \TeX\ installation,
91 %create a directory \texttt{tex/latex/cs-techrep} beneath your \TeX\ installation
92 %(e.g.~beneath \texttt{/usr/share/texmf}) and copy all files from the
93 %current directory there. Now call:
94 %
95 %\begin{verbatim}
96 % $ mktexlsr
97 %\end{verbatim}
98 %
99 %to update the file--cache of \LaTeX.
100 %
101 %Hint: The \textsf{cs-techrep} distribution contains a sample docstrip configuration
102 %in \texttt{docstrip.cfg} via which files can be distributed
103 %automatically to their correct positions inside a \LaTeX\ installation.
104 %Feel free to adapt this file to your environment and afterwards call
105 %\texttt{latex cs-techrep.ins} to install the package to its right place.
106 %
107 %\section{Templates}
108 %
109 %For a quick start the \textsf{iaria-lite} distribution contains document
110 %templates.
111 %The templates can be found in the \texttt{cs-techrep-example-ctan.zip} file.
112 %
113 %
114 %\section{Documentclass}
115 %
116 %\DescribeMacro{documentclass cs-techrep}
117 %This package provides the documentclass \texttt{cs-techrep}. The documentclass
118 %supports the following options:
119 %
120 %\begin{itemize}
121 %\item |conference| Passed to IEEEtran
122 %\item |a4paper| Passed to IEEEtran
123 %\item |subfig| Loads subfig package with custom style settings
124 %\item |subcaption| Loads subcaption package with custom style settings
125 %\item |flushend| Activate flushend package (compatible with arXiv build process)
126 %\item |pbalance| Activate pbalance package (incompatible with arXiv build process)
127 %\end{itemize}
128 %
129 %A Remark about two-column document balancing on the last page:
130 %The flushend package is recommended, because it works within the arXiv automated build process.
131 %However, flushend has a major incampatibility with package lineno, which is, e.\,g., transitively loaded by package mindflow.
132 %Thus, in case when flushend does not have any effect, check whether one of your packages loads lineno.
133 %Usually you are stuck with your packages and, thus, will instead be forced to switch from flushend to pbalance.
134 %Please be aware that pbalance works great and has high compatibility, but unfortunately it will not have any effect within the arXiv automated build process.
135 %In case of both, a somehow needed lineno package and an intended arXiv upload, I recommend to do without two-column balancing on the last page and just to stay away from both flushend and pbalance, in order to ensure that your paper is layouted identically in any initial publication and a later arXiv upload.
136 %I hope this remark proves helpful, it took me some nerve to find out.
137 %
138 %There is also another important difference between flushend and pbalance: the handling of footnotes on the last page.
139 %Flushend provides a decent result, but the result of pbalance is incomprehensible.
140 %I strongly recommend avoiding footnotes on the last page.
141 %If you absolutely need footnotes on the last page, consider staying away from two-column balancing on the last page.
142 %
143 %About subfigures:
144 %Both well-known packages subfig and subcaption can be used.
145 %However, they are not compatible with each other and we can either load one or the other.
146 %The document class provides options to load them for you with some customized style settings.
147 %
148 %\section{Requirements}
149 %
150 %We instrument several other \LaTeX\ packages for different purposes,
151 %which must be available under your installation.
152 %
153 %\begin{itemize}
154 %\item IEEEtran
155 %\item acronym
156 %\item afterpage
157 %\item babel
158 %\item biblatex
159 %\item biblatex-ieee
160 %\item booktabs
161 %\item ccicons
162 %\item cleveref
163 %\item csquotes
164 %\item diagbox
165 %\item doclicense
166 %\item etoolbox
167 %\item extdash
168 %\item flushend
169 %\item fontenc
170 %\item graphicx
171 %\item hypcap
172 %\item hyperref
173 %\item hyperref
174 %\item inputenc
175 %\item lipsum
176 %\item listings
177 %\item lmodern
178 %\item lscape
179 %\item microtype
180 %\item newtxtt
181 %\item orcidlink
182 %\item paralist
183 %\item pbalance
184 %\item pdflscape
185 %\item siunitx
186 %\item stfloats
187 %\item subcaption
188 %\item subfig
189 %\item tcolorbox
190 %\item times
191 %\item todonotes
192 %\item upquote
193 %\item url
194 %\item xcolor
195 %\item xpatch
196 %\item xspace
197 %\end{itemize}
198 %
199 %
200 %\StopEventually{}
201 %\section{The Code}
202 %\iffalse
203 % \begin{macrocode}
204 %<*_cpn_copyIntoExamplesFolder_cls.cmd>
205 % \end{macrocode}
206 %\fi
207 % \begin{macrocode}
208 @echo off
209
210 rem ***************************************************************************
211 rem * author: Christoph P. Neumann
212 rem ***************************************************************************
213 cd /d "%~dp0"
214
215 echo == ..\examples\* ==
216 for /D %%D in (..\examples\*) do (
217 echo == %%D ==
218 xcopy /Y ".\*.cls" "%%~D"
219 )
220
221 pause% \end{macrocode}
222 %\iffalse
223 % \begin{macrocode}
224 %</_cpn_copyIntoExamplesFolder_cls.cmd>
225 % \end{macrocode}
226 %\fi
227 %\iffalse
228 % \begin{macrocode}
229 %<*cs-techrep.cls>
230 % \end{macrocode}
231 %\fi
232 % \begin{macrocode}
233 %# Copyright (c) 2023-2026 Christoph P. Neumann,
234 %# Copyright (c) 2018-2021 Oliver Kopp
235 %# Reference: https://latextemplates.github.io/
236
237 % !TeX spellcheck = en-US
238 % LTeX: language=en-US
239 % !TeX encoding = utf8
240 % !TeX program = pdflatex
241 % !BIB program = biblatex / biber
242
243 \NeedsTeXFormat{LaTeX2e}
244
245 \ProvidesClass{cs-techrep}[2026/02/24 TechReps in CS and SWE v0.9.1]
246
247 % Define marker counter for options (counter are global in latex):
248
249 \newcounter{cstechrep@subfigtracker}
250 \newcounter{cstechrep@subcaptiontracker}
251 \newcounter{cstechrep@pbalancetracker}
252 \newcounter{cstechrep@flushendtracker}
253
254 % Declare options:
255
256 \DeclareOption{subfig}{
257 \setcounter{cstechrep@subfigtracker}{1}
258 \typeout{cs-techrep class: subfig option is set (use subfloat command).}
259 }
260 \DeclareOption{subcaption}{
261 \setcounter{cstechrep@subcaptiontracker}{1}
262 \typeout{cs-techrep class: subcaption option is set (use subfigure command).}
263 }
264
265 % IEEE option onecolumn will be ignored
266 \DeclareOption{onecolumn}{\OptionNotUsed}
267
268 \DeclareOption{pbalance}{
269 \setcounter{cstechrep@pbalancetracker}{1}
270 \typeout{cs-techrep class: pbalance option is set.}
271 }
272 \DeclareOption{flushend}{
273 \setcounter{cstechrep@flushendtracker}{1}
274 \typeout{cs-techrep class: flushend option is set.}
275 }
276
277 % We'll pass any document class options along to the underlying class
278 % (recommended IEEE options: conference,a4paper)
279 \DeclareOption*{%
280 \PassOptionsToClass{\CurrentOption}{IEEEtran}
281 }
282
283 % Now we'll execute any options passed in
284 \ProcessOptions\relax
285
286 % Instead of defining each and every little detail required to create a new
287 % document class, you can base your class on an existing document class.
288 \LoadClass{IEEEtran}
289
290 % This template has been tested with IEEEtran of 2015.
291
292 % =======================
293 % USER PROVIDED VARIABLES
294
295 \RequirePackage{etoolbox}
296
297 \makeatletter
298 \newcommand*\DefcstechrepVar[1]{%
299 \@namedef{cstechrep#1}{}% initialize
300 \@namedef{cstechrepSet#1}##1{%
301 \expandafter\gdef\csname cstechrep#1\endcsname{##1}}%
302 }
303 \makeatother
304
305 \DefcstechrepVar{AuthorListTex} % Use a comma ',' as author separator!
306 \DefcstechrepVar{AuthorListBib} % Use the word "and" as author separator!
307 \DefcstechrepVar{TitleTex}
308 \DefcstechrepVar{TitleBib}
309 \DefcstechrepVar{Department} % e.g., Department of Computer Science
310 \DefcstechrepVar{Institution} % e.g., OTH Amberg-Weiden
311 \DefcstechrepVar{Address} % e.g., Amberg, Germany
312 \DefcstechrepVar{Type} % e.g., Technical Report
313 \DefcstechrepVar{Year} % e.g., 2025
314 \DefcstechrepVar{Month} % e.g., 10 (for October)
315 \DefcstechrepVar{Number} % e.g., CL-TR-2024-42
316 \DefcstechrepVar{Lang} % e.g., english = en-US (or: ngerman = DE)
317
318 %%% Default values (can be overriden):
319 \cstechrepSetAuthorListTex{Vorname1 Nachname1, Vorname2 Nachname2, Vorname3 Nachname3, Vorname4 Nachname4,\\ Vorname5 Nachname5, Vorname6 Nachname6, and Christoph P.\ Neumann\,\orcidlink{0000-0002-5936-631X}}
320 \cstechrepSetAuthorListBib{Vorname1 Nachname1 and Vorname2 Nachname2 and Vorname3 Nachname3 and Vorname4 Nachname4 and Vorname5 Nachname5 and Vorname6 Nachname6 and Christoph P. Neumann}
321 % Capitalization: https://capitalizemytitle.com/style/Chicago/
322 \cstechrepSetTitleTex{FancyName: The Cloud-Native Foo for Bar}
323 \cstechrepSetTitleBib{{\cstechrepTitleTex}}
324 \cstechrepSetDepartment{CyberLytics\-/Lab at the Department of Electrical Engineering, Media, and Computer Science}
325 \cstechrepSetInstitution{Ostbayerische Technische Hochschule Amberg\-/Weiden}
326 \cstechrepSetAddress{Amberg, Germany}
327 \cstechrepSetType{Technical Report}
328 \cstechrepSetNumber{TR-\cstechrepYear-99}
329 \cstechrepSetLang{english}
330
331 % =======================
332
333 % backticks (`) are rendered as such in verbatim environments.
334 % See following links for details:
335 % - https://tex.stackexchange.com/a/341057/9075
336 % - https://tex.stackexchange.com/a/47451/9075
337 % - https://tex.stackexchange.com/a/166791/9075
338 \RequirePackage{upquote}
339
340 % Set English as language and allow to write hyphenated"=words
341 %
342 % Even though `american`, `english` and `usenglish` are synonyms
343 % for babel package (according to
344 % https://tex.stackexchange.com/questions/12775/babel-english-american-usenglish),
345 % the llncs document class is prepared to avoid the overriding of certain
346 % names (such as "Abstract." -> "Abstract" or "Fig." -> "Figure")
347 % when using `english`, but not when using the other 2.
348 % english has to go last to set it as default language
349 \RequirePackage[ngerman,main=english]{babel}
350 %
351 % Hint by http://tex.stackexchange.com/a/321066/9075 -> enable "= as dashes
352 \addto\extrasenglish{\languageshorthands{ngerman}\useshorthands{"}}
353
354 % CM variant with scalable font
355 % (to prevent "pdfTeX error (font expansion):
356 % auto expansion is only possible with scalable")
357 \RequirePackage{lmodern}
358 % Times New Roman, because IEEE is based on Times (and not CM/lmodern),
359 % however, package times is not a scalable font, thus, lmodern is required
360 % additionally and must be loaded before times.
361 \RequirePackage{times}
362
363 % Links behave as they should. Enables "\url{...}" for URL typesettings.
364 % Allow URL breaks also at a hyphen, even though it might be confusing:
365 % Is the "-" part of the address or just a hyphen?
366 % See https://tex.stackexchange.com/a/3034/9075.
367 \RequirePackage[hyphens]{url}
368
369 % When activated, use text font as url font, not the monospaced one.
370 % For all options see https://tex.stackexchange.com/a/261435/9075.
371 % \urlstyle{same}
372
373 % Improve wrapping of URLs - hint by http://tex.stackexchange.com/a/10419/9075
374 \makeatletter
375 \g@addto@macro{\UrlBreaks}{\UrlOrds}
376 \makeatother
377
378 % nicer // - solution by http://tex.stackexchange.com/a/98470/9075
379 % DO NOT ACTIVATE -> prevents line breaks
380 %\makeatletter
381 %\def\Url@twoslashes{\mathchar`\/\@ifnextchar/{\kern-.2em}{}}
382 %\g@addto@macro\UrlSpecials{\do\/{\Url@twoslashes}}
383 %\makeatother
384
385 % use nicer font for code
386 \RequirePackage[zerostyle=b,scaled=.75]{newtxtt}
387
388 % inputenc must be loaded before biblatex
389 \RequirePackage[utf8]{inputenc}
390
391 % Has to be loaded AFTER any font packages.
392 % See https://tex.stackexchange.com/a/2869/9075.
393 \RequirePackage[T1]{fontenc}
394
395
396 % Character protrusion and font expansion.
397 % See http://www.ctan.org/tex-archive/macros/latex/contrib/microtype/
398 \RequirePackage[
399 babel=true, % Enable language-specific kerning
400 expansion=alltext,
401 protrusion=alltext-nott, % Ensure no changes at the edge of the listing.
402 nopatch=eqnum, % fix unable to apply patch eqnum
403 final % Always enable microtype, even if in draft mode.
404 % This helps finding bad boxes quickly. In the standard
405 % configuration, this template is always in the final mode, so
406 % this option only makes a difference if "pros" use the draft mode.
407 ]{microtype}
408
409 % \texttt{test -- test} keeps the "--" as "--"
410 % (and does not convert it to an en dash)
411 \DisableLigatures{encoding = T1, family = tt* }
412
413 \RequirePackage{graphicx}
414
415 % Creative Commons
416 \RequirePackage{ccicons}
417
418 % Diagonal lines in a table
419 % http://tex.stackexchange.com/questions/17745/diagonal-lines-in-table-cell
420 % Slashbox is not available in texlive (due to licensing)
421 % and also gives bad results. Thus, we use diagbox
422 \RequirePackage{diagbox}
423
424 \RequirePackage[cmyk, table]{xcolor}
425
426 \RequirePackage{relsize} % allows for \textsmaller{..}
427
428 \RequirePackage[nolist,smaller]{acronym}
429
430 % Code Listings
431 \RequirePackage{listings}
432
433 \definecolor{eclipseStrings}{RGB}{42,0.0,255}
434 \definecolor{eclipseKeywords}{RGB}{127,0,85}
435 \colorlet{numb}{magenta!60!black}
436
437 % JSON definition
438 % Source: https://tex.stackexchange.com/a/433961/9075
439
440 \lstdefinelanguage{json}{
441 basicstyle=\normalfont\ttfamily,
442 commentstyle=\color{eclipseStrings}, % style of comment
443 stringstyle=\color{eclipseKeywords}, % style of strings
444 numbers=left,
445 numberstyle=\scriptsize,
446 stepnumber=1,
447 numbersep=8pt,
448 showstringspaces=false,
449 breaklines=true,
450 frame=lines,
451 % backgroundcolor=\color{gray}, %only if you like
452 string=[s]{"}{"},
453 comment=[l]{:\ "},
454 morecomment=[l]{:"},
455 literate=
456 *{0}{{{\color{numb}0}}}{1}
457 {1}{{{\color{numb}1}}}{1}
458 {2}{{{\color{numb}2}}}{1}
459 {3}{{{\color{numb}3}}}{1}
460 {4}{{{\color{numb}4}}}{1}
461 {5}{{{\color{numb}5}}}{1}
462 {6}{{{\color{numb}6}}}{1}
463 {7}{{{\color{numb}7}}}{1}
464 {8}{{{\color{numb}8}}}{1}
465 {9}{{{\color{numb}9}}}{1}
466 }
467
468 \lstset{
469 % everything between (* *) is a latex command
470 escapeinside={(*}{*)},
471 %
472 language=json,
473 %
474 showstringspaces=false,
475 %
476 extendedchars=true,
477 %
478 basicstyle=\footnotesize\ttfamily,
479 %
480 commentstyle=\slshape,
481 %
482 % default: \rmfamily
483 stringstyle=\ttfamily,
484 %
485 breaklines=true,
486 %
487 breakatwhitespace=true,
488 %
489 % alternative: fixed
490 columns=flexible,
491 %
492 numbers=left,
493 %
494 numberstyle=\tiny,
495 %
496 basewidth=.5em,
497 %
498 xleftmargin=.5cm,
499 %
500 % aboveskip=0mm,
501 %
502 % belowskip=0mm,
503 %
504 captionpos=b
505 }
506
507 % Enable Umlauts when using \lstinputputlisting.
508 % See https://stackoverflow.com/a/29260603/873282 für details.
509 % listingsutf8 did not work in June 2020.
510 \lstset{literate=
511 {á}{{\'a}}1 {é}{{\'e}}1 {í}{{\'i}}1 {ó}{{\'o}}1 {ú}{{\'u}}1
512 {Á}{{\'A}}1 {É}{{\'E}}1 {Í}{{\'I}}1 {Ó}{{\'O}}1 {Ú}{{\'U}}1
513 {à}{{\`a}}1 {è}{{\`e}}1 {ì}{{\`i}}1 {ò}{{\`o}}1 {ù}{{\`u}}1
514 {À}{{\`A}}1 {È}{{\'E}}1 {Ì}{{\`I}}1 {Ò}{{\`O}}1 {Ù}{{\`U}}1
515 {ä}{ä}1 {ë}{{\"e}}1 {ï}{{\"i}}1 {ö}{ö}1 {ü}{{\"u}}1
516 {Ä}{ä}1 {Ë}{{\"E}}1 {Ï}{{\"I}}1 {Ö}{ö}1 {Ü}{{\"U}}1
517 {â}{{\^a}}1 {ê}{{\^e}}1 {î}{{\^i}}1 {ô}{{\^o}}1 {û}{{\^u}}1
518 {Â}{{\^A}}1 {Ê}{{\^E}}1 {Î}{{\^I}}1 {Ô}{{\^O}}1 {Û}{{\^U}}1
519 {Ã}{{\~A}}1 {ã}{{\~a}}1 {Õ}{{\~O}}1 {õ}{{\~o}}1
520 {œ}{{\oe}}1 {Œ}{{\OE}}1 {æ}{{\ae}}1 {Æ}{{\AE}}1 {ß}{{\ss}}1
521 {ű}{{\H{u}}}1 {Ű}{{\H{U}}}1 {ő}{{\H{o}}}1 {Ő}{{\H{O}}}1
522 {ç}{{\c c}}1 {Ç}{{\c C}}1 {ø}{{\o}}1 {å}{{\r a}}1 {Å}{{\r A}}1
523 }
524
525 % Allows for column type X
526 % In tabularx environment, e.g., \begin{tabularx}{\textwidth}{lX}
527 \RequirePackage{tabularx}
528 % Definition of booktabs commands (\toprule, \midrule, \bottomrule)
529 % without booktabs package:
530 % (However, the smallskip still breaks vertical lines!)
531 \newcommand{\toprule}{\hline\noalign{\smallskip}}
532 \newcommand{\midrule}{\noalign{\smallskip}\hline\noalign{\smallskip}}
533 \newcommand{\bottomrule}{\noalign{\smallskip}\hline}
534
535 % Extended enumerate, such as \begin{compactenum}
536 \RequirePackage[alwaysadjust]{paralist}
537
538 % Read: Is there a disadvantage to using natbib=true with biblatex?
539 % https://tex.stackexchange.com/questions/149313
540 % /is-there-a-disadvantage-to-using-natbib-true-with-biblatex
541 % Substitutions:
542 % Natbib \textcite = biblatex \textcite
543 % Natbib \citep = biblatex \parencite
544
545 \RequirePackage[
546 defernumbers=true, % required due to self-cite
547 %style=ieee, % english only
548 sorting=none, % nty, nyt, nyvt, anyt, anyvt, ynt, ydnt, none, debug
549 sortcites=false,
550 citestyle=numeric-comp, % BEWARE: ieee-comp would improve IEEE-style-compatibility, but ieee-comp has less support by older tex build environments
551 bibstyle=numeric,
552 backend=biber,
553 bibencoding=utf8, % = auto, utf8, ascii
554 hyperref=true, % activate hyperref support
555 backref=false, % activate backrefs
556 isbn=true,
557 url=true,
558 doi=true,
559 urldate=iso, % = iso, iso8601, year, short, long, terse (terse is like iso/iso8601, but without leading word)
560 seconds=true, % iso requires also seconds=true
561 maxnames=5, % max number of names in text ??
562 minnames=1, % min number of names in text ??
563 maxbibnames=99, % max number of names in bibliography
564 minbibnames=1, % number of names in bibliography (bevor et al)
565 maxcitenames=99, % max number of names in text ??
566 mincitenames=1, % max number of names in text ??
567 giveninits=false, % abbreviate first names
568 uniquename=init, % otherwise option conflict with firstinits=true
569 autolang=other
570 ]{biblatex}
571
572 % Due to applied option defernumbers=true:
573 % Prevent citations in the references are being numbered as '0' in ArXiv
574 % https://tex.stackexchange.com/questions/463556
575 % /all-the-citations-in-the-references-are-being-numbered-as-0-in-arxiv-while-upl
576 \makeatletter
577 \let\blx@rerun@biber\relax
578 \makeatother
579
580 % selfref.bib needs to be generated, containing a bibentry with key selfref
581 \addbibresource{selfref.bib}
582 \DeclareBibliographyCategory{selfref}
583 \addtocategory{selfref}{selfref}
584 % How to use: \printbibliography[notcategory=selfref]
585
586 % Same fontsize as without natbib
587 \renewcommand{\bibfont}{\normalfont\small}
588
589 % Zotero generates wrong language fields with wrong "en"
590 % instead of correct "english" option, thus, despite
591 % default biblatex clearlang, the "en" will incorrectly
592 % be printed out, even in english papers.
593 % Make "en" equivalent to "english" and/or its derivatives:
594 \DeclareRedundantLanguages{en}{english,american,british,
595 canadian,australian,newzealand,USenglish,UKenglish}
596
597 % Enable hyperlinked author names in the case of \textcite
598 % Source: https://tex.stackexchange.com/a/76075/9075
599 \RequirePackage{etoolbox}
600 \makeatletter
601 \patchcmd{\NAT@test}{\else \NAT@nm}{\else \NAT@hyper@{\NAT@nm}}{}{}
602 \makeatother
603
604 \makeatletter
605 \DeclareCiteCommand{\citemonth}
606 {\usebibmacro{prenote}}
607 {%
608 \let\oldabx@bibmonth\abx@bibmonth%
609 \setkeys{blx@opt@pre}{dateabbrev=false}% nowork
610 \mkbibmonth{\thefield{month}}%
611 \let\abx@bibmonth\oldabx@bibmonth% restore
612 }
613 {\multicitedelim}
614 {\usebibmacro{postnote}}
615 \makeatother
616
617 %% Enable nice TODO comments
618 \RequirePackage[colorinlistoftodos,prependcaption,textsize=tiny]{todonotes}
619 \newcommand{\TODO}[1]{\todo[%
620 linecolor=red,backgroundcolor=red!25,bordercolor=red]{#1}}
621
622 % bring the table caption in the same line as label "Table I" (with etoolbox)
623 \makeatletter
624 \patchcmd{\@makecaption}
625 {\\}
626 {.\ }
627 {}
628 {}
629 \makeatother
630
631 % For controlling the placement of the captions
632 % (table: top | figure: bottom), the package caption
633 % recommends to use package floatrow:
634 % (Without foatrom, the positioning is determined by
635 % the textual (!) position of command \label in relation to
636 % includegraphics/begin-tabular; a well-known latex aspect.)
637 \RequirePackage{floatrow}
638 \floatsetup[table]{capposition=top,captionskip=5pt}
639 \floatsetup[figure]{capposition=bottom,captionskip=8pt}
640
641 % Put footnotes below floats
642 % Source: https://tex.stackexchange.com/a/32993/9075
643 % and allow floats in a twocolumn document with [t] or [b]
644 \RequirePackage{stfloats}
645 \fnbelowfloat
646
647 \RequirePackage[group-minimum-digits=4,per-mode=fraction]{siunitx}
648 \addto\extrasgerman{\sisetup{locale = DE}}
649
650 % Enable that parameters of \cref{}, \ref{}, \cite{}, ...
651 % are linked so that a reader can click on the number
652 % and jump to the target in the document
653 \RequirePackage{hyperref}
654
655 % Enable hyperref without colors and without bookmarks
656 \hypersetup{
657 hidelinks,
658 colorlinks=true,
659 allcolors=black,
660 pdfstartview=Fit,
661 breaklinks=true
662 }
663
664 % Enable correct jumping to figures when referencing
665 \RequirePackage[all]{hypcap}
666
667 \RequirePackage{orcidlink}
668
669 % For easy quotations: \enquote{text}
670 % This package is very smart when nesting is applied,
671 % otherwise textcmds (see below) provides a shorter command
672 \RequirePackage[autostyle=true]{csquotes}
673
674 % Enable using "`quote"'
675 % See: https://tex.stackexchange.com/a/150954/9075
676 \defineshorthand{"`}{\openautoquote}
677 \defineshorthand{"'}{\closeautoquote}
678
679 % amsmath must be loaded before cleveref
680 \usepackage{amsmath,amssymb,amsfonts}
681
682 % Extensions for references inside the document (\cref{fig:sample}, ...)
683 % Enable usage \cref{...} and \Cref{...} instead of \ref:
684 % Type of reference included in the link.
685 % That means, "Figure 5" is a full link instead of just "5".
686 % !! Underlying rules for "capitalize" and "noabbrev": APA style
687 % http://www.sagepub.com/upm-data/27160_APA_Style.pdf
688 % Use a capital letter "S" when saying "In Section 2, we..."
689 % Don't use capital letters when saying "There are four sections, ..."
690 % Capitalize when figure is followed by a number, e.g., "In Figure 3, we...."
691 % Don't use when no number follows, e.g., "The two figures ..."
692 % (Please notice: CMOS would prefer lower letters, in contrast to APA.)
693 \RequirePackage[capitalise,nameinlink,noabbrev]{cleveref}
694
695 \crefname{listing}{Listing}{Listings}
696 \Crefname{listing}{Listing}{Listings}
697 \crefname{lstlisting}{Listing}{Listings}
698 \Crefname{lstlisting}{Listing}{Listings}
699
700 \RequirePackage{lipsum}
701
702 \RequirePackage{tcolorbox}
703 \tcbuselibrary{listings}
704
705 %introduce \powerset
706 % See: http://matheplanet.com/matheplanet/nuke/
707 % html/viewtopic.php?topic=136492&post_id=997377
708 \DeclareFontFamily{U}{MnSymbolC}{}
709 \DeclareSymbolFont{MnSyC}{U}{MnSymbolC}{m}{n}
710 \DeclareFontShape{U}{MnSymbolC}{m}{n}{
711 <-6> MnSymbolC5
712 <6-7> MnSymbolC6
713 <7-8> MnSymbolC7
714 <8-9> MnSymbolC8
715 <9-10> MnSymbolC9
716 <10-12> MnSymbolC10
717 <12-> MnSymbolC12%
718 }{}
719 \DeclareMathSymbol{\powerset}{\mathord}{MnSyC}{180}
720
721 \RequirePackage{xspace}
722 %\newcommand{\eg}{e.\,g.,\xspace}
723 %\newcommand{\ie}{i.\,e.,\xspace}
724 \newcommand{\eg}{e.\,g.,\ }
725 \newcommand{\ie}{i.\,e.,\ }
726
727 % Enable hyphenation at other places as the dash.
728 % Example: application\hydash specific
729 \makeatletter
730 \newcommand{\hydash}{\penalty\@M-\hskip\z@skip}
731 % Definition of "=
732 % See: http://mirror.ctan.org/macros/latex
733 % /contrib/babel-contrib/german/ngermanb.dtx
734 \makeatother
735
736 % Enable copy and paste of text from the PDF
737 % Only required for pdflatex. It "just works" in the case of lualatex.
738 \input glyphtounicode
739 \pdfgentounicode=1
740
741 \RequirePackage{lscape}
742 \RequirePackage{pdflscape}
743 \RequirePackage{afterpage}
744
745 % requires, e.g., \PassOptionsToPackage{
746 % type=CC,modifier=by,version=4.0}{doclicense} before \documentclass
747 \RequirePackage[hyperxmp=false,lang=English]{doclicense}
748
749 % Improve wrapping of URLs
750 % See: http://tex.stackexchange.com/a/10419/9075
751 \makeatletter
752 \def\ps@IEEEtitlepagestyle{
753 \def\@oddfoot{\mycopyrightnotice}
754 \def\@evenfoot{}
755 }
756 \def\mycopyrightnotice{
757 {\footnotesize
758 \begin{minipage}{0.8\textwidth}
759 \centering
760 % License based on doclicense package:
761 \href{\doclicenseURL}{\doclicenseIcon{}
762 This work is licensed under a \doclicenseLongNameRef{}
763 (\doclicenseNameRef{}) license.}
764 % Citation advice:
765 \\Please cite as: \fullcite{selfref}.
766 \end{minipage}
767 }
768 }
769 \makeatother
770
771 \makeatletter
772 % allows for forcing command expansion inside a filecontents* environment
773 % (cf. https://tex.stackexchange.com/questions/534035
774 % /macros-commands-inside-a-filecontents-environment-does-not-expand)
775 \def\filecontentsForceExpansion#1#2#3{
776 \global\let\ltxspecials\dospecials
777 \gdef\dospecials{\ltxspecials
778 \catcode`#1=0
779 \catcode`#2=1
780 \catcode`#3=2
781 \global\let\dospecials\ltxspecials
782 }
783 }
784 \makeatother
785
786 \title{\cstechrepTitleTex}
787
788 \author{
789 \IEEEauthorblockN{\cstechrepAuthorListTex}
790 \IEEEauthorblockA{%
791 \cstechrepDepartment\\
792 \cstechrepInstitution\\
793 \cstechrepAddress
794 }}
795
796 \IEEEspecialpapernotice{\cstechrepType: \cstechrepNumber,
797 \citemonth{selfref} \cstechrepYear}
798
799 % subfigure captions with parentheses and footnotesize:
800 \ifnum\value{cstechrep@subfigtracker}=1
801 \typeout{cs-techrep class: load subfig package (use subfloat command).}
802 \RequirePackage[caption=false,font=footnotesize]{subfig}
803 \fi
804 \ifnum\value{cstechrep@subcaptiontracker}=1
805 \typeout{cs-techrep class: load subcaption package (use subfigure command).}
806 \RequirePackage{subcaption}
807 \captionsetup[subfigure]{labelformat=parens,font=footnotesize}
808 \fi
809
810 % Balance/level columns at the last page / in bibliography
811 % DISCLAIMER: No solution is a 100%/perfect one!
812 % Mainstream option: pbalance (see https://ctan.org/pkg/pbalance)
813 % BUT: incompatible with arxiv automated process (!)
814 \ifnum\value{cstechrep@pbalancetracker}=1
815 \typeout{cs-techrep class: load pbalance package.}
816 \RequirePackage{pbalance}
817 \fi
818 % Flushend => works with arxiv, but major incampatibility with lineno
819 % (and, thus, also with mindflow et al.)
820 \ifnum\value{cstechrep@flushendtracker}=1
821 \typeout{cs-techrep class: load flushend package.}
822 \RequirePackage{flushend}
823 \fi
824
825 % ========================================================
826 % Packages that need to be loaded last:
827
828 % Allows to hyphenate a word that contains a dash:
829 % https://stackoverflow.com/questions/2193307
830 % /how-do-i-get-latex-to-hyphenate-a-word-that-contains-a-dash
831 % Use \-/ for a breakable dash that does not prevent the remainer
832 % of the word to be hyphenated.
833 \RequirePackage[shortcuts]{extdash}
834 % ========================================================
835
836 % Finally, we'll use \endinput to indicate that LaTeX can stop reading
837 % this file. LaTeX will ignore anything after this line.
838 \endinput
839 % \end{macrocode}
840 %\iffalse
841 % \begin{macrocode}
842 %</cs-techrep.cls>
843 % \end{macrocode}
844 %\fi
845 %\Finale
846 \endinput