-
Notifications
You must be signed in to change notification settings - Fork 0
/
commands.tex
214 lines (182 loc) · 4.74 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
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
% ==== Aliases, own commands ====
% Aliases
\newcommand{\ti}{\textit} % zkrácený příkaz pro kurzívu
\newcommand{\tb}{\textbf} % zkrácený příkaz pro tučné písmo
\newcommand{\bv}{\mathbf} % zkrácený příkaz pro tučné vektory v math mode
% Smaller lists
% Compact itemize
\newcommandx{\cit}[1]{
\begin{compactitem}
#1
\end{compactitem}
}
% Compact enumerate
\newcommandx{\cen}[1]{
\begin{compactenum}
#1
\end{compactenum}
}
% Faster and better images
% Single figure
\newcommandx{\pic}[5][4=0.8,5=H]{%
\begin{figure}[#5]
\centering
\includegraphics[width=#4\textwidth]{./img/#1}
\caption[#2]{#3}
\label{#1}
\end{figure}
}
% Two pictures side-by-side
\newcommandx{\dpic}[9][7=0.49,8=0.98,9=H]{%
\begin{figure}[#9]
\centering
\begin{minipage}{#7\textwidth}
\centering
\includegraphics[width=#8\textwidth]{img/#1} % first figure itself
\caption[#3]{#4}
\label{#1}
\end{minipage}\hfill
\begin{minipage}{#7\textwidth}
\centering
\includegraphics[width=#8\textwidth]{img/#2} % second figure itself
\caption[#5]{#6}
\label{#2}
\end{minipage}
\end{figure}
}
% Three figures side-by-side... Not really sure, whether it looks good
\newcommandx{\tpic}[9]{%
\begin{figure}[H]
\centering
\begin{minipage}{0.3\textwidth}
\centering
\includegraphics[width=0.95\textwidth]{img/#1} % first figure itself
\caption[#2]{#3}
\label{#1}
\end{minipage}\hfill
\begin{minipage}{0.3\textwidth}
\centering
\includegraphics[width=0.95\textwidth]{img/#4} % second figure itself
\caption[#5]{#6}
\label{#4}
\end{minipage}\hfill
\begin{minipage}{0.3\textwidth}
\centering
\includegraphics[width=0.95\textwidth]{img/#7} % second figure itself
\caption[#8]{#9}
\label{#7}
\end{minipage}
\end{figure}
}
% Better footnotes above punctuation
\newcommand{\footnotei}[2]{%
\mbox{%
\setbox0\hbox{#1}%
\copy0%
\hspace{-\wd0}}%
\footnote{#2}%
}
% Equations
\newcommandx{\eq}[1]{
\begin{equation}
#1
\end{equation}
}
\newcommandx{\eqa}[1]{
\begin{align}
#1
\end{align}
}
% Units
\newcommand{\jdt}[1]{
$\mathrm{#1}$
}
\newcommand{\jde}[1]{
\mathrm{#1}
}
% Derivative faster
\newcommand{\der}[2]{
\frac{\mathrm{d} #1}{\mathrm{d} #2}
}
% N-th derivative faster
\newcommand{\nder}[3]{
\frac{\mathrm{d}^{#3} #1}{\mathrm{d} {#2}^{#3}}
}
% Partial derivative faster
\newcommand{\pder}[2]{
\frac{\partial #1}{\partial #2}
}
% N-th partial derivative faster
\newcommand{\npder}[3]{
\frac{\partial^{#3} #1}{\partial {#2}^{#3}}
}
% Auto-sized brackets
\renewcommand{\(}{
\left(
}
\renewcommand{\)}{
\right)
}
\renewcommand{\[}{
\left[
}
\renewcommand{\]}{
\right]
}
% Mathematics "Defintion-Theorem-Proof"
\theoremstyle{definition}
\newtheorem{define}{Definice}[section]
\newtheorem{theorem}[define]{Věta}
\newtheorem{lemma}[define]{Lemma}
\newtheorem{comment}{Poznámka}
\newtheorem{example}{Příklad}
%% Math aliases
\newcommand{\mdef}[3]{
\begin{define}[#1]
\label{mdef:#2}
#3
\end{define}
}
\newcommand{\mtheor}[3]{
\begin{theorem}[#1]
\label{mtheor:#2}
#3
\end{theorem}
}
\newcommand{\mlemma}[3]{
\begin{lemma}[#1]
\label{mlemma:#2}
#3
\end{lemma}
}
\newcommand{\mcomm}[3]{
\begin{comment}[#1]
\label{mcomm:#2}
#3
\end{comment}
}
\newcommand{\mex}[2]{
\begin{example}
\label{mex:#1}
#2
\end{example}
}
% CTU stuff
\newcommand{\cvut}{České vysoké učení technické v~Praze}
% CTU Faculties
\newcommand{\fjfi}{Fakulta jaderná a fyzikálně inženýrská}
\newcommand{\fel}{Fakulta elektrotechnická}
\newcommand{\fit}{Fakulta informačních technologií}
% FNSPE
\newcommand{\km}{Katedra matematiky}
\newcommand{\kf}{Katedra fyziky}
\newcommand{\kvhj}{Katedra humanitních věd a jazyků}
\newcommand{\kipl}{Katedra inženýrství pevných látek}
\newcommand{\kfe}{Katedra fyzikální elektroniky}
\newcommand{\kmat}{Katedra materiálů}
\newcommand{\kjch}{Katedra jaderné chemie}
\newcommand{\kdaiz}{Katedra dozimetrie a aplikace ionizujícího záření}
\newcommand{\kjr}{Katedra jaderných reaktorů}
\newcommand{\ksi}{Katedra softwarového inženýrství}
\newcommand{\di}{Dopplerův institut}
\newcommand{\logoCVUT}{\includegraphics{img/symbol_cvut_konturova_verze_cb.pdf}} % logo ČVUT -- podle grafického manuálu ČVUT platného od prosince 2016. Pokud nevyhovuje PDF-verze, tak použijte jinou variantu loga: https://www.cvut.cz/logo-a-graficky-manual -> "Symbol a logo ČVUT v Praze"). Pokud chcete logo úplně vynechat, zadejte místo "\includegraphics{...}" text "\vspace{35mm}"