Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
latextemplates
GitHub Repository: latextemplates/LNCS
Path: blob/main/paper-minted-newtx.tex
224 views
1
% This template has been tested with LLNCS DOCUMENT CLASS -- version 2.21 (12-Jan-2022)
2
3
% !TeX spellcheck = en-US
4
% LTeX: language=en-US
5
% !TeX encoding = utf8
6
% !TeX program = lualatex
7
% !TeX TXS-program:compile = txs:///lualatex/[--shell-escape]
8
% !BIB program = bibtex
9
% -*- coding:utf-8 mod:LaTeX -*-
10
11
% "a4paper" enables:
12
%
13
% - easy print out on DIN A4 paper size
14
%
15
% One can configure default page size (a4 vs. letter) in the LaTeX installation.
16
% Thus, it is configuration dependend, what the paper size will be.
17
% Having "a4paper" option present, the page size is set to A4.
18
% Note that the current word template offered by Springer is DIN A4.
19
%
20
% "runningheads" enables:
21
%
22
% - page number on page 2 onwards
23
% - title/authors on even/odd pages
24
%
25
% This is good for other readers to enable proper archiving among other papers and pointing to
26
% content. Even if the title page states the title, when printed and stored in a folder, when
27
% blindly opening the folder, one could hit not the title page, but an arbitrary page. Therefore,
28
% it is good to have title printed on the pages, too.
29
%
30
% The optiion "runningheads" neesd to be removed upon request of the publisher.
31
%
32
% To disable outputting page headers and footers, remove "runningheads"
33
\documentclass[runningheads,a4paper,english]{llncs}[2022/01/12]
34
35
\usepackage{iftex}
36
37
% backticks (`) are rendered as such in verbatim environments.
38
% See following links for details:
39
% - https://tex.stackexchange.com/a/341057/9075
40
% - https://tex.stackexchange.com/a/47451/9075
41
% - https://tex.stackexchange.com/a/166791/9075
42
\usepackage{upquote}
43
44
% Set English as language and allow to write hyphenated"=words
45
%
46
% Even though `american`, `english` and `USenglish` are synonyms for babel package (according to https://tex.stackexchange.com/questions/12775/babel-english-american-usenglish), the llncs document class is prepared to avoid the overriding of certain names (such as "Abstract." -> "Abstract" or "Fig." -> "Figure") when using `english`, but not when using the other 2.
47
% english has to go last to set it as default language
48
\usepackage[ngerman,main=english]{babel}
49
%
50
% Hint by http://tex.stackexchange.com/a/321066/9075 -> enable "= as dashes
51
\addto\extrasenglish{\languageshorthands{ngerman}\useshorthands{"}}
52
53
% Links behave as they should. Enables "\url{...}" for URL typesettings.
54
% Allow URL breaks also at a hyphen, even though it might be confusing: Is the "-" part of the address or just a hyphen?
55
% See https://tex.stackexchange.com/a/3034/9075.
56
\usepackage[hyphens]{url}
57
58
% When activated, use text font as url font, not the monospaced one.
59
% For all options see https://tex.stackexchange.com/a/261435/9075.
60
% \urlstyle{same}
61
62
% Improve wrapping of URLs - hint by http://tex.stackexchange.com/a/10419/9075
63
\makeatletter
64
\g@addto@macro{\UrlBreaks}{\UrlOrds}
65
\makeatother
66
67
% nicer // - solution by http://tex.stackexchange.com/a/98470/9075
68
% DO NOT ACTIVATE -> prevents line breaks
69
%\makeatletter
70
%\def\Url@twoslashes{\mathchar`\/\@ifnextchar/{\kern-.2em}{}}
71
%\g@addto@macro\UrlSpecials{\do\/{\Url@twoslashes}}
72
%\makeatother
73
74
%% !!! If you change the font, be sure that words such as "workflow" can
75
%% !!! still be copied from the PDF. If this is not the case, you have
76
%% !!! to use glyphtounicode. See comment at cmap package.
77
%%
78
%% Background: "workflow" contains "fl" which is a ligature, which in turn
79
%% is rendered as one character in the PDF and needs to be split
80
%% whily copying.
81
82
\ifluatex
83
\usepackage[no-math]{fontspec}
84
\usepackage{unicode-math}
85
86
% See https://tug.org/FontCatalogue/texgyretermes/ for more information
87
\setmainfont{texgyretermes}[
88
Extension = .otf,
89
UprightFont = *-regular,
90
BoldFont = *-bold,
91
ItalicFont = *-italic,
92
BoldItalicFont = *-bolditalic,
93
Ligatures=TeX
94
]
95
% See https://tug.org/FontCatalogue/texgyreheros/ for more information
96
\setsansfont[Scale=.9]{TeX Gyre Heros Regular}
97
% newtxtt looks good with times, but no equivalent for lualatex found,
98
% therefore tried to replace with inconsolata.
99
% However, inconsolata does not look good in the context of LNCS ...
100
%\setmonofont[StylisticSet={1,3},Scale=.9]{inconsolata}
101
% ... thus, we use the good old Latin Modern Mono font for source code.
102
\setmonofont{Latin Modern Mono} % "variable=false"
103
104
% Enable proper ligatures
105
% For more information see https://ctan.org/pkg/selnolig
106
% language "english" or "ngerman" is passed to selnolig by the document class
107
\usepackage{selnolig}
108
109
\else
110
\RequirePackage{newtxtext}
111
\RequirePackage{newtxmath}
112
\RequirePackage[zerostyle=b,scaled=.9]{newtxtt}
113
114
% Has to be loaded AFTER any font packages. See https://tex.stackexchange.com/a/2869/9075.
115
\usepackage[T1]{fontenc}
116
\fi
117
118
% Character protrusion and font expansion. See http://www.ctan.org/tex-archive/macros/latex/contrib/microtype/
119
120
\usepackage[
121
babel=true, % Enable language-specific kerning. Take language-settings from the languge of the current document (see Section 6 of microtype.pdf)
122
expansion=alltext,
123
protrusion=alltext-nott, % Ensure that at listings, there is no change at the margin of the listing
124
% In the standard configuration, this template is always in the final mode, so this option only makes a difference if "pros" use the draft mode
125
final % Always enable microtype, even if in draft mode. This helps finding bad boxes quickly.
126
]{microtype}
127
128
% \texttt{test -- test} keeps the "--" as "--" (and does not convert it to an en dash)
129
\DisableLigatures{encoding = T1, family = tt* }
130
131
%\DeclareMicrotypeSet*[tracking]{my}{ font = */*/*/sc/* }%
132
%\SetTracking{ encoding = *, shape = sc }{ 45 }
133
% Source: http://homepage.ruhr-uni-bochum.de/Georg.Verweyen/pakete.html
134
% Deactiviated, because does not look good
135
136
\usepackage{graphicx}
137
138
% Diagonal lines in a table - http://tex.stackexchange.com/questions/17745/diagonal-lines-in-table-cell
139
% Slashbox is not available in texlive (due to licensing) and also gives bad results. Thus, we use diagbox
140
\usepackage{diagbox}
141
142
\ifluatex
143
\usepackage{spelling}
144
\spellingoutput{off}
145
\fi
146
147
\usepackage[dvipsnames, table]{xcolor}
148
% See https://github.com/gpoore/minted
149
\usepackage[newfloat]{minted}
150
151
\setminted{
152
% Line numbers not flowing out of the margin
153
numbersep=5pt,
154
xleftmargin=12pt,
155
%
156
% Better listing breaking
157
breakafter=-/\{,
158
breakbefore=\\
159
%
160
% Alternative: Rely on pygment's tokenizer. Does not work well with LaTeX and comments
161
% breakbytoken=true,
162
% breakbytokenanywhere=true
163
}
164
165
%\usemintedstyle{bw} %black and white style
166
%\usemintedstyle{vs} %visual studio
167
\usemintedstyle{friendly_grayscale}
168
%\usemintedstyle{friendly}
169
%\usemintedstyle{eclipse} %http://www.jevon.org/wiki/Eclipse_Pygments_Style
170
%\usemintedstyle{autumn}
171
%\usemintedstyle{rrt}
172
%\usemintedstyle{borland}
173
174
% We need to load caption to have a bold font on the label
175
% The other parameters mimic the layout of the LNCS class
176
\usepackage[labelfont=bf,font=small,skip=4pt]{caption}
177
\SetupFloatingEnvironment{listing}{name=List.,within=none}
178
179
% When using both minted and listings
180
% Compatibility of packages minted and listings with respect to the numbering of "List." caption
181
% Source: https://tex.stackexchange.com/a/269510/9075
182
% \AtBeginEnvironment{listing}{\setcounter{listing}{\value{lstlisting}}}
183
% \AtEndEnvironment{listing}{\stepcounter{lstlisting}}
184
185
% Intermediate solution for hyperlinked refs. See https://tex.stackexchange.com/q/132420/9075 for more information.
186
\newcommand{\labelline}[1]{\label[line]{#1}\hypertarget{#1}{}}
187
\newcommand{\refline}[1]{\hyperlink{#1}{\FancyVerbLineautorefname~\ref*{#1}}}
188
189
% For easy quotations: \enquote{text}
190
% This package is very smart when nesting is applied, otherwise textcmds (see below) provides a shorter command
191
\usepackage[autostyle=true]{csquotes}
192
193
% Enable using "`quote"' - see https://tex.stackexchange.com/a/150954/9075
194
\defineshorthand{"`}{\openautoquote}
195
\defineshorthand{"'}{\closeautoquote}
196
197
% Nicer tables (\toprule, \midrule, \bottomrule)
198
\usepackage{booktabs}
199
200
% Extended enumerate, such as \begin{compactenum}
201
\usepackage{paralist}
202
203
% Bibliopgraphy enhancements
204
% - enable \cite[prenote][]{ref}
205
% - enable \cite{ref1,ref2}
206
% Alternative: \usepackage{cite}, which enables \cite{ref1, ref2} only (otherwise: Error message: "White space in argument")
207
208
% Doc: http://texdoc.net/natbib
209
\usepackage[%
210
square, % for square brackets
211
comma, % use commas as separators
212
numbers, % for numerical citations;
213
%sort % orders multiple citations into the sequence in which they appear in the list of references;
214
sort&compress % as sort but in addition multiple numerical citations are compressed if possible (as 3-6, 15);
215
]{natbib}
216
217
% In the bibliography, references have to be formatted as 1., 2., ... not [1], [2], ...
218
\renewcommand{\bibnumfmt}[1]{#1.}
219
220
% Enable hyperlinked author names in the case of \citet
221
% Source: https://tex.stackexchange.com/a/76075/9075
222
\usepackage{etoolbox}
223
\makeatletter
224
\patchcmd{\NAT@test}{\else \NAT@nm}{\else \NAT@hyper@{\NAT@nm}}{}{}
225
\makeatother
226
227
% Prepare more space-saving rendering of the bibliography
228
% Source: https://tex.stackexchange.com/a/280936/9075
229
\SetExpansion
230
[ context = sloppy,
231
stretch = 30,
232
shrink = 60,
233
step = 5 ]
234
{ encoding = {OT1,T1,TS1} }
235
{ }
236
237
% Put figures aside a text
238
% Even though the package is from 1998, it works well
239
\usepackage[rflt]{floatflt}
240
241
% Farbige Tabellen
242
% ----------------
243
% Das Paket colortbl wird inzwischen automatisch durch xcolor geladen
244
%
245
% Erweiterte Funktionen innerhalb von Tabellen
246
% --------------------------------------------
247
%%% Doc: http://mirror.ctan.org/tex-archive/macros/latex/contrib/multirow/multirow.sty
248
\usepackage{multirow} % Mehrfachspalten
249
%
250
%%% Doc: Documentation inside dtx Package
251
\usepackage{dcolumn} % Ausrichtung an Komma oder Punkt
252
253
%%% Doc: http://mirror.ctan.org/tex-archive/macros/latex/contrib/supertabular/supertabular.pdf
254
%\usepackage{supertabular}
255
256
%%% Fussnoten/Endnoten ===================================================
257
258
% EN: Put footnotes below floats
259
% DE: Fußnoten unter Gleitumgebungen ("floats") platzieren
260
% Source: https://tex.stackexchange.com/a/32993/9075
261
\usepackage{stfloats}
262
\fnbelowfloat
263
264
% EN: Extended support for footnotes
265
% DE: Fußnoten
266
%
267
%\usepackage{dblfnote} %Zweispaltige Fußnoten
268
%
269
% Keine hochgestellten Ziffern in der Fußnote (KOMA-Script-spezifisch):
270
%\deffootnote[1.5em]{0pt}{1em}{\makebox[1.5em][l]{\bfseries\thefootnotemark}}
271
%
272
% Abstand zwischen Fußnoten vergrößern:
273
%\setlength{\footnotesep}{.85\baselineskip}
274
%
275
% EN: Following command disables the separting line of the footnote
276
% DE: Folgendes Kommando deaktiviert die Trennlinie zur Fußnote
277
%\renewcommand{\footnoterule}{}
278
%
279
%\addtolength{\skip\footins}{\baselineskip} % Abstand Text <-> Fußnote
280
281
% DE: Fußnoten immer ganz unten auf einer \raggedbottom-Seite
282
% DE: fnpos kommt aus dem yafoot package
283
%\usepackage{fnpos}
284
%\makeFNbelow
285
%\makeFNbottom
286
287
% TODO (and comment) configuration
288
%
289
% - \todo (from todo, easy-todo, todonotes) / \TODO (from fixmetodonotes) - for "normal" TODOs
290
% - \todofix - "important" TODOs
291
%
292
% - \textcomment - highlights text and has a hover comment
293
% - \sidecomment - just puts a comment to the side. Note: \comment MUST NOT be used as command name, it is already defined by much packages (mathdesign, mindflow, verbatim, and others)
294
%
295
% - \missingfigure
296
%
297
% - \textmarker
298
% - \modified
299
% - \change - adresses a review comment
300
301
% Enable nice comments
302
\usepackage{pdfcomment}
303
304
\newcommand{\textcomment}[2]{\colorbox{yellow!60}{#1}\pdfcomment[color={0.234 0.867 0.211},hoffset=-6pt,voffset=10pt,opacity=0.5]{#2}}
305
306
% Small PDF comment
307
% 1. Parameter: Comment
308
\newcommand{\sidecomment}[1]{\pdfcomment[color={0.045 0.278 0.643},voffset=4pt,icon=Note]{#1}}
309
% Disabled variant - for the final PDF
310
%\newcommand{\sidecomment}[1]{}
311
312
\newcommand{\todo}[1]{TODO!\sidecomment{#1}}
313
314
% Änderungen
315
%
316
% 1. Parameter: Review-Kommentar
317
% 2. Parameter: Neuer Text
318
\newcommand{\change}[2]{{\color{red}#2}\pdfcomment[color={0.234 0.867 0.211},voffset=8pt,opacity=0.5]{#1}}
319
% Disabled variant - for the final PDF
320
%\newcommand{\change}[2]{#2}
321
322
% Define default commands
323
\makeatletter
324
\@ifundefined{missingfigure}{\newcommand{\missingfigure}{... missing figure ...}}{}
325
\@ifundefined{textcomment}{\newcommand{\textcomment}[2]{#1 \todo{#2}}}{}
326
\@ifundefined{sidecomment}{\newcommand{\sidecomment}[1]{\marginpar{#1}}}{}
327
\@ifundefined{todo}{\newcommand{\todo}[1]{\sidecomment{#1}}}{}
328
\@ifundefined{TODO}{\newcommand{\TODO}[1]{\todo{#1}}}{}
329
\@ifundefined{todofix}{\newcommand{\todofix}[1]{\todo{#1}}}{}
330
\@ifundefined{change}{\newcommand{\change}[2]{#1 $\rightarrow$ #2}}{}
331
\makeatother
332
333
% Textmarker (Textfarbe rot)
334
\newcommand{\textmarker}[1]{{\color{red} #1}\xspace}
335
336
% Modified (Text blau)
337
\newcommand{\modified}[1]{{\color{blue!60!black} #1}\xspace}
338
339
\usepackage[group-minimum-digits=4,per-mode=fraction]{siunitx}
340
341
% Enable that parameters of \cref{}, \ref{}, \cite{}, ... are linked so that a reader can click on the number an jump to the target in the document
342
\usepackage{hyperref}
343
344
% Enable hyperref without colors and without bookmarks
345
\hypersetup{
346
hidelinks,
347
colorlinks=true, % Links erhalten Farben statt Kaeten
348
raiselinks=true, % calculate real height of the link
349
allcolors=black,
350
pdfstartview=Fit,
351
breaklinks=true, % Links ueberstehen Zeilenumbruch
352
hypertexnames=false, % Fix jumping to algorithm line - http://tex.stackexchange.com/a/156404/9075
353
}
354
355
% Enable correct jumping to figures when referencing
356
\usepackage[all]{hypcap}
357
358
\usepackage[caption=false,font=footnotesize]{subfig}
359
360
% Alternative for making subfigures:
361
% Part of the caption package. See http://www.ctan.org/pkg/caption
362
% Ersetzt die Pakete subfigure und subfig - siehe https://tex.stackexchange.com/a/13778/9075
363
%
364
% (subfigure is outdated. subfig is maintained, but subcaption is better)
365
% See: http://tex.stackexchange.com/questions/13625/subcaption-vs-subfig-best-package-for-referencing-a-subfigure
366
%\usepackage[hypcap=true]{subcaption}
367
368
\usepackage{mindflow}
369
370
% Extensions for references inside the document (\cref{fig:sample}, ...)
371
% Enable usage \cref{...} and \Cref{...} instead of \ref: Type of reference included in the link
372
% That means, "Figure 5" is a full link instead of just "5".
373
\usepackage[capitalise,nameinlink]{cleveref}
374
375
\crefname{section}{Sect.}{Sect.}
376
\Crefname{section}{Section}{Sections}
377
\crefname{listing}{List.}{List.}
378
\crefname{listing}{Listing}{Listings}
379
\Crefname{listing}{Listing}{Listings}
380
381
% Intermediate solution for hyperlinked refs. See https://tex.stackexchange.com/q/132420/9075 for more information.
382
\newcommand{\llabel}[1]{\label[line]{#1}\hypertarget{#1}{}}
383
\newcommand{\lref}[1]{\hyperlink{#1}{\FancyVerbLineautorefname~\ref*{#1}}}
384
385
\usepackage{lipsum}
386
387
% For demonstration purposes only
388
% These packages can be removed when all examples have been deleted
389
\usepackage[math]{blindtext}
390
\usepackage{mwe}
391
\usepackage[realmainfile]{currfile}
392
\usepackage{tcolorbox}
393
\tcbuselibrary{minted}
394
395
%introduce \powerset - hint by http://matheplanet.com/matheplanet/nuke/html/viewtopic.php?topic=136492&post_id=997377
396
\DeclareFontFamily{U}{MnSymbolC}{}
397
\DeclareSymbolFont{MnSyC}{U}{MnSymbolC}{m}{n}
398
\DeclareFontShape{U}{MnSymbolC}{m}{n}{
399
<-6> MnSymbolC5
400
<6-7> MnSymbolC6
401
<7-8> MnSymbolC7
402
<8-9> MnSymbolC8
403
<9-10> MnSymbolC9
404
<10-12> MnSymbolC10
405
<12-> MnSymbolC12%
406
}{}
407
\DeclareMathSymbol{\powerset}{\mathord}{MnSyC}{180}
408
409
% Allows for defining commands that don't eat spaces.
410
\usepackage{xspace}
411
% Adds compatibility to \xspace und \enquote
412
\makeatletter
413
\xspaceaddexceptions{\grqq \grq \csq@qclose@i \} }
414
\makeatother
415
416
\newcommand{\eg}{e.g.,\ }
417
\newcommand{\ie}{i.e.,\ }
418
419
% Enable hyphenation at other places as the dash.
420
% Example: applicaiton\hydash specific
421
\makeatletter
422
\newcommand{\hydash}{\penalty\@M-\hskip\z@skip}
423
% Definition of "= taken from http://mirror.ctan.org/macros/latex/contrib/babel-contrib/german/ngermanb.dtx
424
\makeatother
425
426
% Add manual adapted hyphenation of English words
427
% See https://ctan.org/pkg/hyphenex and https://tex.stackexchange.com/a/22892/9075 for details
428
\input{ushyphex}
429
430
% correct bad hyphenation here
431
\hyphenation{
432
op-tical net-works semi-conduc-tor
433
% May not be hypphenated
434
AROMA TOSCA BPMN OASIS OMG DMTF IT DevOps
435
}
436
437
\input{commands}
438
439
% Add copyright
440
%
441
% This is recommended if you intend to send the version to colleagues
442
% See https://ctan.org/pkg/llncsconf for details
443
\iffalse
444
% state: intended | submitted | llncs
445
% you can add "crop" if the paper should be cropped to the format Springer is publishing
446
\usepackage[intended]{llncsconf}
447
448
\conference{name of the conference}
449
450
% in case of "proceedings" (final version!)
451
% example: \llncs{Anonymous et al. (eds). \emph{Proceedings of the International Conference on \LaTeX-Hacks}, LNCS~42. Some Publisher, 2016.}{0042}
452
% 0042 denotes an example start page
453
\llncs{book editors and title}{0042}
454
\fi
455
456
\ifpdftex
457
% Enable copy and paste of text from the PDF
458
% Only required for pdflatex. It "just works" in the case of lualatex.
459
% Alternative: cmap or mmap package
460
% mmap enables mathematical symbols, but does not work with the newtx font set
461
% See: https://tex.stackexchange.com/a/64457/9075
462
% Other solutions outlined at http://goemonx.blogspot.de/2012/01/pdflatex-ligaturen-und-copynpaste.html and http://tex.stackexchange.com/questions/4397/make-ligatures-in-linux-libertine-copyable-and-searchable
463
% Trouble shooting outlined at https://tex.stackexchange.com/a/100618/9075
464
%
465
% According to https://tex.stackexchange.com/q/451235/9075 this is the way to go
466
\input{glyphtounicode}
467
\pdfgentounicode=1
468
\fi
469
\begin{document}
470
471
\title{Paper Title}
472
% If Title is too long, use \titlerunning
473
%\titlerunning{Short Title}
474
475
% Single insitute
476
\author{Firstname Lastname \and Firstname Lastname}
477
478
% If there are too many authors, use \authorrunning
479
%\authorrunning{First Author et al.}
480
481
\institute{Institute}
482
483
%% Multiple insitutes - ALTERNATIVE to the above
484
% \author{%
485
% Firstname Lastname\inst{1} \and
486
% Firstname Lastname\inst{2}
487
% }
488
%
489
%If there are too many authors, use \authorrunning
490
% \authorrunning{First Author et al.}
491
%
492
% \institute{
493
% Insitute 1\\
494
% \email{...}\and
495
% Insitute 2\\
496
% \email{...}
497
%}
498
499
\maketitle
500
501
\begin{abstract}
502
\lipsum[1]
503
504
\keywords{First keyword \and Second keyword \and Third keyword}
505
\end{abstract}
506
507
508
\section{Introduction}
509
\label{sec:introduction}
510
\lipsum[1-3]\todo{Refine me}
511
512
The remainder of the paper starts with a presentation of related work (\cref{sec:relatedwork}).
513
It is followed by a presentation of hints on \LaTeX{} (\cref{sec:latexhints}).
514
Finally, a conclusion is drawn and outlook on future work is made (\cref{sec:outlook}).
515
516
\section{Related Work}
517
\label{sec:relatedwork}
518
519
Winery~\cite{Winery} is a graphical \textcomment{modeling}{modeling with one ``l'', because of American English} tool.
520
The whole idea of TOSCA is explained by \citet{Binz2009}.
521
522
\section{LaTeX Hints}
523
\label{sec:latexhints}
524
525
% Required for proper example rendering in the compiled PDF
526
\newcount\LTGbeginlineexample
527
\newcount\LTGendlineexample
528
\newenvironment{ltgexample}%
529
{\LTGbeginlineexample=\numexpr\inputlineno+1\relax}%
530
{\LTGendlineexample=\numexpr\inputlineno-1\relax%
531
\tcbinputlisting{%
532
listing only,
533
listing file=\currfilepath,
534
colback=green!5!white,
535
colframe=green!25,
536
coltitle=black!90,
537
coltext=black!90,
538
left=8mm,
539
title=Corresponding \LaTeX{} code of \texttt{\currfilepath},
540
minted language=TeX,
541
minted style=vs,
542
minted options={
543
fontsize=\footnotesize,
544
firstline=\the\LTGbeginlineexample,
545
lastline=\the\LTGendlineexample,
546
firstnumber=\the\LTGbeginlineexample,
547
breaklines,
548
linenos,
549
numbersep=8pt
550
}
551
}
552
}%
553
554
This section contains hints on writing LaTeX.
555
It focuses on minimal examples, which can be directly adapted to the content
556
557
\subsection{Handling of paragraphs}
558
559
\begin{ltgexample}
560
One sentence per line.
561
This rule is important for the usage of version control systems.
562
A new line is generated with a blank line.
563
As you would do in Word:
564
New paragraphs are generated by pressing enter.
565
In LaTeX, this does not lead to a new paragraph as LaTeX joins subsequent lines.
566
In case you want a new paragraph, just press enter twice!
567
This leads to an empty line.
568
In word, there is the functionality to press shift and enter.
569
This leads to a hard line break.
570
The text starts at the beginning of a new line.
571
In LaTeX, you can do that by using two backslashes (\textbackslash\textbackslash).
572
\\
573
This is rarely used.
574
575
Please do \textit{not} use two backslashes for new paragraphs.
576
For instance, this sentence belongs to the same paragraph, whereas the last one started a new one.
577
A long motivation for that is provided at \url{http://loopspace.mathforge.org/HowDidIDoThat/TeX/VCS/#section.3}.
578
\end{ltgexample}
579
580
\subsection{Notes separated from the text}
581
582
The package mindflow enables writing down notes and annotations in a way so that they are separated from the main text.
583
584
\begin{ltgexample}
585
\begin{mindflow}
586
This is a small note.
587
\end{mindflow}
588
\end{ltgexample}
589
590
\subsection{Handling TODOs}
591
592
\begin{ltgexample}
593
\textmarker{Markierter Text.}
594
\end{ltgexample}
595
596
Bei \verb1\textmarker1 wird nur die Textfarbe geändert, da dies auch bei einigen Worten gut funktioniert.
597
598
\begin{ltgexample}
599
\textcomment{Markierter Text.}{Kommentar dazu.}
600
\end{ltgexample}
601
602
\begin{ltgexample}
603
\modified{Manuelle Markierung für Text, der seit der letzten Version geändert wurde.}
604
\end{ltgexample}
605
606
\begin{ltgexample}
607
Das ist ein Text.
608
\change{FL1: Text angepasst}{Geänderter Text}.
609
\end{ltgexample}
610
611
\begin{ltgexample}
612
Hier nur ein Kommentar\sidecomment{Kommentar}.
613
\end{ltgexample}
614
615
\begin{ltgexample}
616
\todo{Hier muss noch kräftig Text produziert werden}
617
\end{ltgexample}
618
619
\subsection{Hyphenation}
620
621
\LaTeX{} automatically hyphenates words.
622
When using \href{https://ctan.org/pkg/microtype}{microtype}, there should be fewer hyphenations than in other settings.
623
It might be necessary to tweak the hyphenations nevertheless.
624
Here are some hints:
625
626
\begin{ltgexample}
627
In case you write \enquote{application-specific}, then the word will only be hyphenated at the dash.
628
You can also write \verb1applica\allowbreak{}tion-specific1 (result: applica\allowbreak{}tion-specific), but this is much more effort.
629
630
You can now write words containing hyphens which are hyphenated at other places in the word.
631
For instance, \verb1application"=specific1 gets application"=specific.
632
This is enabled by an additional configuration of the babel package.
633
\end{ltgexample}
634
635
\subsection{Typesetting Units}
636
637
\begin{ltgexample}
638
Numbers can be written plain text (such as 100), by using the \href{https://ctan.org/pkg/siunitx}{siunitx} package as follows:
639
\SI{100}{\km\per\hour},
640
or by using plain \LaTeX{} (and math mode):
641
$100 \frac{\mathit{km}}{h}$.
642
\end{ltgexample}
643
644
\begin{ltgexample}
645
\SI{5}{\percent} of \SI{10}{kg}
646
\end{ltgexample}
647
648
\begin{ltgexample}
649
Numbers are automatically grouped: \num{123456}.
650
\end{ltgexample}
651
652
\subsection{Surrounding Text by Quotes}
653
654
\begin{ltgexample}
655
Please use the \enquote{enquote command} to quote something.
656
Quoting with "`quote"' or ``quote'' also works.
657
658
\end{ltgexample}
659
660
\subsection{Cleveref examples}
661
\label{sec:ex:cref}
662
663
Cleveref demonstration: Cref at beginning of sentence, cref in all other cases.
664
665
\begin{figure}
666
\centering
667
\includegraphics[width=.75\linewidth]{example-image-a}
668
\caption{Example figure for cref demo}
669
\label{fig:ex:cref}
670
\end{figure}
671
672
\begin{table}
673
\centering
674
\begin{tabular}{ll}
675
\toprule
676
Heading1 & Heading2 \\
677
\midrule
678
One & Two \\
679
Thee & Four \\
680
\bottomrule
681
\end{tabular}
682
\caption{Example table for cref demo}
683
\label{tab:ex:cref}
684
\end{table}
685
686
\begin{ltgexample}
687
\Cref{fig:ex:cref} shows a simple fact, although \cref{fig:ex:cref} could also show something else.
688
689
\Cref{tab:ex:cref} shows a simple fact, although \cref{tab:ex:cref} could also show something else.
690
691
\Cref{sec:ex:cref} shows a simple fact, although \cref{sec:ex:cref} could also show something else.
692
\end{ltgexample}
693
694
\subsection{Figures}
695
696
\begin{ltgexample}
697
\Cref{fig:label} shows something interesting.
698
699
\begin{figure}
700
\centering
701
\includegraphics[width=.8\linewidth]{example-image-golden}
702
\caption[Simple Figure]{
703
Simple Figure.
704
Based on \citet{mwe}.
705
}
706
\label{fig:label}
707
\end{figure}
708
\end{ltgexample}
709
710
One can also have pictures floating inside text:
711
\clearpage
712
713
\begin{ltgexample}
714
\begin{floatingfigure}{.33\linewidth}
715
\includegraphics[width=.29\linewidth]{example-image-a}
716
\caption{A floating figure}
717
\end{floatingfigure}
718
\lipsum[2]
719
\end{ltgexample}
720
721
\subsection{Sub Figures}
722
723
An example of two sub figures is shown in \cref{fig:two_sub_figures}.
724
725
\begin{ltgexample}
726
\begin{figure}[!b]
727
\centering
728
\subfloat[Case I]{\includegraphics[width=.4\linewidth]{example-image-a}%
729
\label{fig:first_case}}
730
\hfil
731
\subfloat[Case II]{\includegraphics[width=.4\linewidth]{example-image-b}%
732
\label{fig:second_case}}
733
\caption{Example figure with two sub figures.}
734
\label{fig:two_sub_figures}
735
\end{figure}
736
\end{ltgexample}
737
738
\subsection{Tables}
739
740
\begin{ltgexample}
741
\begin{table}
742
\caption{Simple Table}
743
\label{tab:simple}
744
\centering
745
\begin{tabular}{ll}
746
\toprule
747
Heading1 & Heading2 \\
748
\midrule
749
One & Two \\
750
Thee & Four \\
751
\bottomrule
752
\end{tabular}
753
\end{table}
754
\end{ltgexample}
755
756
\begin{ltgexample}
757
% Source: https://tex.stackexchange.com/a/468994/9075
758
\begin{table}
759
\caption{Table with diagonal line}
760
\label{tab:diag}
761
\begin{center}
762
\begin{tabular}{|l|c|c|}
763
\hline
764
\diagbox[width=10em]{Diag \\Column Head I}{Diag Column\\Head II} & Second & Third \\
765
\hline
766
& foo & bar \\
767
\hline
768
\end{tabular}
769
\end{center}
770
\end{table}
771
\end{ltgexample}
772
773
774
\subsection{Source Code}
775
776
\href{https://github.com/gpoore/minted}{minted} is a sophisticated package to enable properly highlighted listings.
777
It uses the \href{http://pygments.org/}{pygments} library, which in turn requires Python.
778
779
\begin{ltgexample}
780
\Cref{lst:XML} shows source code written in XML.
781
\refline{line:comment} contains a comment.
782
783
\begin{listing}[htbp]
784
\begin{minted}[linenos=true,escapeinside=||]{xml}
785
<listing name="example">
786
<!-- comment --> |\labelline{line:comment}|
787
<content>not interesting</content>
788
</listing>
789
\end{minted}
790
\caption{Example XML listing using minted}
791
\label{lst:XML}
792
\end{listing}
793
\end{ltgexample}
794
795
One can also typeset JSON as shown in \cref{lst:flJSON}.
796
797
\begin{ltgexample}
798
\begin{listing}[htbp]
799
\begin{minted}[linenos=true,escapeinside=||]{json}
800
{
801
key: "value"
802
}
803
\end{minted}
804
\caption{Example JSON listing using minted}
805
\label{lst:flJSON}
806
\end{listing}
807
\end{ltgexample}
808
809
Java is also possible as shown in \cref{lst:flJava}.
810
811
\begin{ltgexample}
812
\begin{listing}[htbp]
813
\begin{minted}[linenos=true,escapeinside=||]{java}
814
public class Hello {
815
public static void main (String[] args) {
816
System.out.println("Hello World!");
817
}
818
}
819
\end{minted}
820
\caption{Java code rendered using minted}
821
\label{lst:flJava}
822
\end{listing}
823
\end{ltgexample}
824
825
\subsection{Itemization}
826
827
One can list items as follows:
828
829
\begin{ltgexample}
830
\begin{itemize}
831
\item Item One
832
\item Item Two
833
\end{itemize}
834
\end{ltgexample}
835
836
837
One can enumerate items as follows:
838
839
\begin{ltgexample}
840
\begin{enumerate}
841
\item Item One
842
\item Item Two
843
\end{enumerate}
844
\end{ltgexample}
845
846
847
With paralist, one can even have all items typeset after each other and have them clean in the TeX document:
848
849
\begin{ltgexample}
850
\begin{inparaenum}
851
\item All these items...
852
\item ...appear in one line
853
\item This is enabled by the paralist package.
854
\end{inparaenum}
855
\end{ltgexample}
856
857
\subsection{Other Features}
858
859
\begin{ltgexample}
860
The words \enquote{workflow} and \enquote{dwarflike} can be copied from the PDF and pasted to a text file.
861
\end{ltgexample}
862
863
\begin{ltgexample}
864
The symbol for powerset is now correct: $\powerset$ and not a Weierstrass p ($\wp$).
865
866
$\powerset({1,2,3})$
867
\end{ltgexample}
868
869
\begin{ltgexample}
870
Brackets work as designed:
871
<test>
872
One can also input backticks in verbatim text: \verb|`test`|.
873
\end{ltgexample}
874
875
876
\section{Conclusion and Outlook}
877
\label{sec:outlook}
878
\lipsum[1-2]
879
880
\subsubsection*{Acknowledgments}
881
882
Identification of funding sources and other support, and thanks to individuals and groups that assisted in the research and the preparation of the work should be included in an acknowledgment section, which is placed just before the reference section in your document \cite{acmart}.
883
884
%%% ===============================================================================
885
%%% Bibliography
886
%%% ===============================================================================
887
888
In the bibliography, use \texttt{\textbackslash textsuperscript} for \enquote{st}, \enquote{nd}, \ldots:
889
E.g., \enquote{The 2\textsuperscript{nd} conference on examples}.
890
When you use \href{https://www.jabref.org}{JabRef}, you can use the clean up command to achieve that.
891
See \url{https://help.jabref.org/en/CleanupEntries} for an overview of the cleanup functionality.
892
893
\renewcommand{\bibsection}{\section*{References}} % requried for natbib to have "References" printed and as section*, not chapter*
894
% Use natbib compatbile splncs04nat style.
895
% It does provide all features of splncs04.bst, but is developed in a clean way.
896
% Source: https://github.com/tpavlic/splncs04nat
897
\bibliographystyle{splncs04nat}
898
\begingroup
899
\microtypecontext{expansion=sloppy}
900
\small % ensure correct font size for the bibliography
901
\bibliography{paper}
902
\endgroup
903
904
% Enfore empty line after bibliography
905
\ \\
906
%
907
\noindent
908
All links were last followed on October 5, 2020.
909
910
%%% ===============================================================================
911
%\appendix
912
%\addcontentsline{toc}{chapter}{APPENDICES}
913
914
%\listoffigures
915
%\listoftables
916
%%% ===============================================================================
917
918
%%% ===============================================================================
919
%\section{My first appendix}\label{sec:appendix1}
920
%%% ===============================================================================
921
\end{document}
922
923