-
Notifications
You must be signed in to change notification settings - Fork 0
/
article.tex
112 lines (85 loc) · 2.66 KB
/
article.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
\documentclass{baseline}
\usepackage[english]{babel}
\usepackage[math]{blindtext}
\title{Sample Article}
\author{Lucas Lois Pelufo}
\date{\today}
\addbibresource{bibliography.bib}
\graphicspath{{img/}}
\svgpath{{figures/}}
\begin{document}
\maketitle
\tableofcontents
\section{Bibliography}
\blindtext \cite{coulouris,paxos}
\section{Programming}
Inline code samples: \mintinline{c}{int} or function calls like \mintinline{python}{print(x**2)}.
We also allow code blocks, as follows, or even floating listings like \cref{l:python-hello-world}.
\begin{minted}{c}
int main() {
printf("hello, world");
return 0;
}
\end{minted}
\begin{listing}
\begin{minted}{python}
def main():
print("hello, world")
return 0
\end{minted}
\caption{We can have code as floats, Python in this case.}
\label{l:python-hello-world}
\end{listing}
\section{Figures}
Figures drawn as svg can be brought in with the \texttt{\\includesvg} command as graphics, such as \cref{fig:latex-logo}.
Traditional image types can de added with the \texttt{\\includegraphics} command, as in \cref{fig:ucu-logo}.
\begin{figure}
\centering
\includegraphics[width=\textwidth]{ucu}
\caption{An image logo}\label{fig:ucu-logo}
\end{figure}
\begin{figure}
\centering
\includesvg[width=\textwidth]{LaTeX_logo}
\caption{\LaTeX\ logo}\label{fig:latex-logo}
\end{figure}
\begin{figure}
\centering
\begin{tikzpicture}
\Vertex[x=2,y=-1,label=R]{R}
\Vertex[label=A]{A}
\Vertex[y=-2,label=C]{B}
\Edge[Direct,label=N,style={dashed}](A)(R)
\Edge[Direct,label=N-1,style={dashed}](B)(R)
\Edge[RGB,color={127,201,127}](A)(B)
\end{tikzpicture}
\caption{A \texttt{tikz} diagram}
\end{figure}
\section{Tables}
See \cref{table:misc}.
\begin{table}
\centering
\begin{tabular}{lccccl}\toprule
& \multicolumn{3}{c}{\(a = b\)} & \multicolumn{2}{c}{\(c + d\)} \\
\cmidrule(lr){2-4}\cmidrule(lr){5-6}
& \(mv\) & Rel.~err & Time & \(mv\) & Rel.~err \\\midrule
Lorem & 11034 & 1.3e-7 & 3.9 & 15846 & 2.7e-11 \\
Ipsum & 21952 & 1.3e-7 & 6.2 & 31516 & 2.7e-11 \\
Dolor & 15883 & 5.2e-8 & 7.1 & 32023 & 1.1e-11 \\
Sit & 11180 & 8.0e-9 & 4.3 & 17348 & 1.5e-11 \\\bottomrule
\end{tabular}
\caption{A miscellaneous data table}
\label{table:misc}
\end{table}
\section{UML diagrams}
UML diagrams are built with \texttt{plantuml} by rendering the diagrams as svg
and including that, as shown in \cref{fig:uml}.
\begin{figure}
\centering
\includesvg[width=\textwidth]{hello}
\caption{A UML diagram}\label{fig:uml}.
\end{figure}
\Blinddocument
\pagebreak
\printbibliography{}
\end{document}