-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcommands.tex
138 lines (127 loc) · 4.22 KB
/
commands.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
% text
\providecommand{\code}{\texttt}
\providecommand{\strong}{\textbf}
% images
\providecommand{\logo}[1]{
\begin{figure}
\centering
\includegraphics[scale=1, max height=\textheight, max width=\textwidth]{./images/#1}
\end{figure}
}
% Include an image (label for referencing = fig:#1)
% #1 Filename (without file ending relative to image-directory)
% #2 Caption
\providecommand{\image}[2]{
\begin{figure}
\centering
\includegraphics[scale=1, max height=\textheight, max width=\textwidth, \thedraft]{./images/#1}
\caption{#2} \label{fig:#1}
\end{figure}
}
% Include an image from PDF
% (label for referencing = fig:#1)
% #1 Filename (without file ending relative to image-directory)
% #2 Caption
% #3 PDF-Page to include
\newcommand{\imagepdf}[3]{%
\begin{figure}[htb]%
\centering%
\includegraphics[scale=1, max height=\textheight, max width=\textwidth, page=#3, \thedraft]{./images/#1}%
~\\[-0.25cm]
\caption{#2}%
% ~\\[-0.65cm]
\label{fig:#1}%
\end{figure}%
}
% Include an image with fixed width
% (label for referencing = fig:#1)
% #1 Filename (without file ending relative to image-directory)
% #2 Caption
% #3 Width in document in cm
\newcommand{\imagew}[3]{%
\begin{figure}[htb]%
\centering%
\includegraphics[width=#3cm, \thedraft]{./images/#1}%
~\\[-0.25cm]
\caption{#2}%
% ~\\[-0.65cm]
\label{fig:#1}%
\end{figure}%
}
% Include an image from PDF with fixed width
% (label for referencing = fig:#1)
% #1 Filename (without file ending relative to image-directory)
% #2 Caption
% #3 Width in document in cm
% #4 PDF-Page to include
\newcommand{\imagepdfw}[4]{%
\begin{figure}[htb]%
\centering%
\includegraphics[width=#3cm,page=#4, \thedraft]{./images/#1}%
~\\[-0.25cm]
\caption{#2}%
% ~\\[-0.65cm]
\label{fig:#1}%
\end{figure}%
}
\usepackage{subcaption}
% Include a double image
% #1 Filename 1 (without file ending relative to image-directory) (label for referencing = fig:#1)
% #2 Caption 1
% #3 Filename 2 (without file ending relative to image-directory) (label for referencing = fig:#3)
% #4 Caption 2
% #5 General Caption
\providecommand{\doubleImages}[5]{
\begin{figure}
\begin{subfigure}[a]{0.49\textwidth}
\centering
\includegraphics[scale=1, max height=\textheight, max width=\textwidth, \thedraft]{./images/#1}
\caption{#2} \label{fig:#1}
\end{subfigure}
\begin{subfigure}[a]{0.49\textwidth}
\centering
\includegraphics[scale=0.7, max height=\textheight, max width=\textwidth, \thedraft]{./images/#3}
\caption{#4} \label{fig:#3}
\end{subfigure}
\caption{#5}
\end{figure}
}
% Include a triple image
% #1 Filename 1 (without file ending relative to image-directory) (label for referencing = fig:#1)
% #2 Caption 1
% #3 Filename 2 (without file ending relative to image-directory) (label for referencing = fig:#3)
% #4 Caption 2
% #5 Filename 3 (without file ending relative to image-directory) (label for referencing = fig:#5)
% #6 Caption 3
% #7 General Caption
\providecommand{\tripleImages}[7]{
\begin{figure}
\begin{subfigure}[a]{0.32\textwidth}
\centering
\includegraphics[scale=1, max height=\textheight, max width=\textwidth, \thedraft]{./images/#1}
\caption{#2} \label{fig:#1}
\end{subfigure}
\begin{subfigure}[a]{0.32\textwidth}
\centering
\includegraphics[scale=0.7, max height=\textheight, max width=\textwidth, \thedraft]{./images/#3}
\caption{#4} \label{fig:#3}
\end{subfigure}
\begin{subfigure}[a]{0.32\textwidth}
\centering
\includegraphics[scale=0.7, max height=\textheight, max width=\textwidth, \thedraft]{./images/#5}
\caption{#6} \label{fig:#5}
\end{subfigure}
\caption{#7}
\end{figure}
}
% Include a rotated image
% (label for referencing = fig:#1)
% #1 Filename (without file ending relative to image-directory)
% #2 Caption
\providecommand{\rotatedImage}[2]{
\begin{sidewaysfigure}
\centering
\includegraphics[scale=1, max height=\textwidth, max width=\textheight, \thedraft]{./images/#1}
\caption{#2} \label{fig:#1}
\end{sidewaysfigure}
}