-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.tex
More file actions
101 lines (87 loc) · 2.39 KB
/
main.tex
File metadata and controls
101 lines (87 loc) · 2.39 KB
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
%----------------------------------------------------------------------------------------
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------
\documentclass[12pt,a4paper]{article}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{svg}
\usepackage{tikz}
\usepackage{plantuml}
\usepackage{import}
\usepackage{float}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage{hyperref}
\usepackage{listings}
\usepackage{fontspec}
\usepackage{luacode}
\usepackage{caption}
\usepackage[bottom]{footmisc}
% Setup watermark on whole document
% Uncomment the next line to add watermark
% \usepackage[color={[gray]{0.85}},text=DRAFT]{draftwatermark}
% Set up the main and monospaced fonts
\setmainfont{SourceSansPro}[
Path=./fonts/SourceSansPro/,
Extension = .ttf,
UprightFont = *-Regular,
BoldFont = *-Bold,
ItalicFont = *-Italic,
BoldItalicFont = *-BoldItalic,
]
\setmonofont{SourceCodePro}[
Path=./fonts/SourceCodePro/,
Extension = .ttf,
UprightFont = *-Regular,
BoldFont = *-Bold,
ItalicFont = *-Italic,
BoldItalicFont = *-BoldItalic,
]
% Custom command to create a pdf from a PlantUML source and insert it into the final doc
% First param - path to plantUML source file without extension
% Second param - scale settings
% Third param - caption text
\newcommand{\RenderPlantUML}[3]{
\IfFileExists{#1.pdf}{}{
\immediate\write18{plantuml -tpdf #1.tex}
}
% Include the pdf:
\begin{figure}[H]
\centering
\includegraphics[width=#2]{#1.pdf}
\ifx#3\empty
\else
\caption{#3}
\fi
\end{figure}
}
% Custom command to create a pdf from a Drawio source and insert it into the final doc
% First param - path to drawio file without extension
% Second param - scale settings
% Third param - caption text
\newcommand{\RenderDrawio}[3]{
\IfFileExists{#1.pdf}{}{%
\immediate\write18{drawio -x -f pdf -o #1.pdf #1.drawio --no-sandbox --no-gpu --crop}
}
% Include the pdf:
\begin{figure}[H]
\centering
\includegraphics[width=#2]{#1.pdf}
\ifx#3\empty
\else
\caption{#3}
\fi
\end{figure}
}
\begin{document}
\import{./}{title.tex}
\tableofcontents
\clearpage
\section{Introduction}
\import{chapters/}{section_1.tex}
\pagebreak
\section{Section 2}
\import{chapters/}{section_2.tex}
\pagebreak
\end{document}