-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtemplates.tex
391 lines (316 loc) · 10.6 KB
/
templates.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
\section{Related Work}
\label{sec:relatedwork}
Winery~\cite{Winery} is a graphical \commentontext{modeling}{modeling with one ``l'', because of AE} tool.
The whole idea of TOSCA is explained by \citet{Binz2009}.
\section{LaTeX Hints}
\label{sec:latexhints}
% Required for proper example rendering in the compiled PDF
\newcount\LTGbeginlineexample
\newcount\LTGendlineexample
\newenvironment{ltgexample}%
{\LTGbeginlineexample=\numexpr\inputlineno+1\relax}%
{\LTGendlineexample=\numexpr\inputlineno-1\relax%
%
\tcbinputlisting{%
listing only,
listing file=\currfilepath,
colback=green!5!white,
colframe=green!25,
coltitle=black!90,
coltext=black!90,
left=8mm,
title=Corresponding \LaTeX{} code of \texttt{\currfilepath},
listing options={%
frame=none,
language={[LaTeX]TeX},
escapeinside={},
firstline=\the\LTGbeginlineexample,
lastline=\the\LTGendlineexample,
firstnumber=\the\LTGbeginlineexample,
basewidth=.5em,
aboveskip=0mm,
belowskip=0mm,
numbers=left,
xleftmargin=0mm,
numberstyle=\tiny,
numbersep=8pt%
}
}
}%
This section contains hints on writing LaTeX.
It focuses on minimal examples, which can be directly adapted to the content
\subsection{Handling of paragraphs}
\begin{ltgexample}
One sentence per line.
This rule is important for the usage of version control systems.
A new line is generated with a blank line.
As you would do in Word:
New paragraphs are generated by pressing enter.
In LaTeX, this does not lead to a new paragraph as LaTeX joins subsequent lines.
In case you want a new paragraph, just press enter twice (!).
This leads to an empty line.
In word, there is the functionality to press shift and enter.
This leads to a hard line break.
The text starts at the beginning of a new line.
In LaTeX, you can do that by using two backslashes (\textbackslash\textbackslash).\\
This is rarely used.
Please do \textit{not} use two backslashes for new paragraphs.
For instance, this sentence belongs to the same paragraph, whereas the last one started a new one.
A long motivation for that is provided at \url{http://loopspace.mathforge.org/HowDidIDoThat/TeX/VCS/#section.3}.
\end{ltgexample}
\subsection{Notes separated from the text}
The package mindflow enables writing down notes and annotations in a way so that they are separated from the main text.
\begin{ltgexample}
\begin{mindflow}
This is a small note.
\end{mindflow}
\end{ltgexample}
\subsection{Hyphenation}
\LaTeX{} automatically hyphenates words.
When using microtype, there should be less hypnetations than in other settings.
It might be necessary to tweak the hyphenations nevertheless.
Here are some hints:
\begin{ltgexample}
In case you write \enquote{application-specific}, then the word will only be hyphenated at the dash.
You can also write \verb1applica\allowbreak{}tion-specific1 (result: applica\allowbreak{}tion-specific), but this is much more effort.
You can now write words containing hyphens which are hyphenated at other places in the word.
For instance, \verb1application"=specific1 gets application"=specific.
This is enabled by an additional configuration of the babel package.
\end{ltgexample}
\subsection{Typesetting Units}
\begin{ltgexample}
Numbers can written plain text (such as 100), by using the siunitx package like that:
\SI{100}{\km\per\hour},
or by using plain \LaTeX{} (and math mode):
$100 \frac{\mathit{km}}{h}$.
\end{ltgexample}
\begin{ltgexample}
\SI{5}{\percent} of \SI{10}{kg}
\end{ltgexample}
\begin{ltgexample}
Numbers are automatically grouped: \num{123456}.
\end{ltgexample}
\subsection{Surrounding Text by Quotes}
\begin{ltgexample}
Please use the \enquote{enquote command} to quote something.
Quoting with "`quote"' or ``quote'' also works.
\end{ltgexample}
\subsection{Cleveref examples}
\label{sec:ex:cref}
Cleveref demonstration: Cref at beginning of sentence, cref in all other cases.
\begin{figure}
\centering
\includegraphics[width=.75\linewidth]{example-image-a}
\caption{Example figure for cref demo}
\label{fig:ex:cref}
\end{figure}
\begin{table}
\centering
\begin{tabular}{ll}
\toprule
Heading1 & Heading2 \\
\midrule
One & Two \\
Thee & Four \\
\bottomrule
\end{tabular}
\caption{Example table for cref demo}
\label{tab:ex:cref}
\end{table}
\begin{ltgexample}
\Cref{fig:ex:cref} shows a simple fact, although \cref{fig:ex:cref} could also show something else.
\Cref{tab:ex:cref} shows a simple fact, although \cref{tab:ex:cref} could also show something else.
\Cref{sec:ex:cref} shows a simple fact, although \cref{sec:ex:cref} could also show something else.
\end{ltgexample}
\subsection{Figures}
\begin{ltgexample}
\Cref{fig:label} shows something interesting.
\begin{figure}
\centering
\includegraphics[width=.8\linewidth]{example-image-golden}
\caption[Simple Figure]{Simple Figure. Based on \citet{mwe}.}
\label{fig:label}
\end{figure}
\end{ltgexample}
One can also have pictures floating inside text:
\clearpage
\begin{ltgexample}
\begin{floatingfigure}{.33\linewidth}
\includegraphics[width=.29\linewidth]{example-image-a}
\caption{A floating figure}
\end{floatingfigure}
\blindtext[2]
\end{ltgexample}
\subsection{Sub Figures}
An example of two sub figures is shown in \cref{fig:two_sub_figures}.
\begin{ltgexample}
\begin{figure}[!b]
\centering
\subfloat[Case I]{\includegraphics[width=.4\linewidth]{example-image-a}%
\label{fig:first_case}}
\hfil
\subfloat[Case II]{\includegraphics[width=.4\linewidth]{example-image-b}%
\label{fig:second_case}}
\caption{Example figure with two sub figures.}
\label{fig:two_sub_figures}
\end{figure}
\end{ltgexample}
\subsection{Tables}
\begin{ltgexample}
\begin{table}
\caption{Simple Table}
\label{tab:simple}
\centering
\begin{tabular}{ll}
\toprule
Heading1 & Heading2 \\
\midrule
One & Two \\
Thee & Four \\
\bottomrule
\end{tabular}
\end{table}
\end{ltgexample}
\begin{ltgexample}
% Source: https://tex.stackexchange.com/a/468994/9075
\begin{table}
\caption{Table with diagonal line}
\label{tab:diag}
\begin{center}
\begin{tabular}{|l|c|c|}
\hline
\diagbox[width=10em]{Diag\\Column Head I}{Diag Column\\Head II} & Second & Third \\
\hline
& foo & bar \\
\hline
\end{tabular}
\end{center}
\end{table}
\end{ltgexample}
\subsection{Source Code}
\begin{ltgexample}
\Cref{lst:XML} shows source code written in XML.
\Cref{line:comment} contains a comment.
\begin{lstlisting}[
language=XML,
caption={Example XML Listing},
label={lst:XML}]
<listing name="example">
<!-- comment --> (* \label{line:comment} *)
<content>not interesting</content>
</listing>
\end{lstlisting}
\end{ltgexample}
One can also add \verb+float+ as parameter to have the listing floating.
\Cref{lst:flXML} shows the floating listing.
\begin{ltgexample}
\begin{lstlisting}[
% one can adjust spacing here if required
% aboveskip=2.5\baselineskip,
% belowskip=-.8\baselineskip,
float,
language=XML,
caption={Example XML listing -- placed as floating figure},
label={lst:flXML}]
<listing name="example">
Floating
</listing>
\end{lstlisting}
\end{ltgexample}
One can also typeset JSON as shown in \cref{lst:json}.
\begin{ltgexample}
\begin{lstlisting}[
float,
language=json,
caption={Example JSON listing -- placed as floating figure},
label={lst:json}]
{
key: "value"
}
\end{lstlisting}
\end{ltgexample}
Java is also possible as shown in \cref{lst:java}.
\begin{ltgexample}
\begin{lstlisting}[
caption={Example Java listing},
label=lst:java,
language=Java,
float]
public class Hello {
public static void main (String[] args) {
System.out.println("Hello World!");
}
}
\end{lstlisting}
\end{ltgexample}
\subsection{Itemization}
One can list items as follows:
\begin{ltgexample}
\begin{itemize}
\item Item One
\item Item Two
\end{itemize}
\end{ltgexample}
One can enumerate items as follows:
\begin{ltgexample}
\begin{enumerate}
\item Item One
\item Item Two
\end{enumerate}
\end{ltgexample}
With paralist, one can even have all items typset after each other and have them clean in the tex document:
\begin{ltgexample}
\begin{inparaenum}
\item All these items...
\item ...appear in one line
\item This is enabled by the paralist package.
\end{inparaenum}
\end{ltgexample}
\subsection{Other Features}
\begin{ltgexample}
The words \enquote{workflow} and \enquote{dwarflike} can be copied from the PDF and pasted to a text file.
\end{ltgexample}
\begin{ltgexample}
The symbol for powerset is now correct: $\powerset$ and not a Weierstrass p ($\wp$).
$\powerset({1,2,3})$
\end{ltgexample}
\begin{ltgexample}
Brackets work as designed:
<test>
One can also input backquotes in verbatim text: \verb|`test`|.
\end{ltgexample}
\section{Conclusion and Outlook}
\label{sec:outlook}
\lipsum[1-2]
\subsubsection*{Acknowledgments}
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}.
%%% ===============================================================================
%%% Bibliography
%%% ===============================================================================
In the bibliography, use \texttt{\textbackslash textsuperscript} for \enquote{st}, \enquote{nd}, \ldots:
E.g., \enquote{The 2\textsuperscript{nd} conference on examples}.
When you use \href{https://www.jabref.org}{JabRef}, you can use the clean up command to achieve that.
See \url{https://help.jabref.org/en/CleanupEntries} for an overview of the cleanup functionality.
\renewcommand{\bibsection}{\section*{References}} % requried for natbib to have "References" printed and as section*, not chapter*
% Use natbib compatbile splncs04nat style.
% It does provide all features of splncs04.bst, but is developed in a clean way.
% Source: https://github.com/tpavlic/splncs04nat
\bibliographystyle{splncs04nat}
\begingroup
\microtypecontext{expansion=sloppy}
\small % ensure correct font size for the bibliography
\bibliography{paper}
\endgroup
% Enfore empty line after bibliography
\ \\
%
All links were last followed on October 5, 2020.
%%% ===============================================================================
%\appendix
%\addcontentsline{toc}{chapter}{APPENDICES}
%\listoffigures
%\listoftables
%%% ===============================================================================
%%% ===============================================================================
%\section{My first appendix}\label{sec:appendix1}
%%% ===============================================================================