Debian Codegraph @

texmf-dist/doc/latex/fnspe/fnspe.tex

raw
1 % fnspe 1.2a
2 % This material is subject to the LaTeX Project Public License.
3 % See https://www.latex-project.org/lppl/ for the details of that license.
4 %
5 % Useful commands for FNSPE students
6 %
7 % Created by Michal Zeman
8 % Updated on September 20, 2017
9 % Uploaded on September 20, 2017
10
11 \documentclass{article}
12 \usepackage[arrowtensor,oldcomplex]{fnspe}
13 \usepackage{hyperref}
14 \begin{document}
15 \section*{Options}
16
17 In this package there are four categories of options (examples and differences will be shown further)
18 \begin{enumerate}
19 \item for interval notation
20 \begin{itemize}
21 \item \texttt{isointerval} for using standardized format of interval described in \textbf{ISO 31-11}
22 \item \texttt{isoointerval} for using standardized alternative format of interval described in \textbf{ISO 31-11}
23 \item \texttt{fnspeinterval} for using special notation used at FNSPE CTU in Prague
24 \end{itemize}
25 \item for tensor notation (now for vectors and matrices)
26 \begin{itemize}
27 \item \texttt{isotensor} for using standardized format of tensor
28 \item \texttt{undertensor} for using underline notation of tensor
29 \item \texttt{arrowtensor} for using arrow notation of tensor
30 \end{itemize}
31 \item for complex notation (real and complex part)
32 \begin{itemize}
33 \item \texttt{isocomplex} for using standardized format of complex and real part
34 \item \texttt{oldcomplex} for using old \LaTeX{} default format of complex and real part
35 \end{itemize}
36 \item for definition notation
37 \begin{itemize}
38 \item \texttt{deftext} for definition using \textit{def.} over the equal
39 \item \texttt{defcolon} for definition using the colon with equal
40 \end{itemize}
41 \end{enumerate}
42
43 \section*{Macros}
44 \subsection*{Interval}
45 Let $a$ and $b$ be real numbers.
46
47 \subsubsection*{Closed interval}
48 Using of macro
49 \begin{lstlisting}
50 \ci{a}{b}
51 \end{lstlisting}
52 as \textbf{c}losed \textbf{i}nterval.
53
54 \begin{itemize}
55 \item \texttt{isointerval}
56 \begin{equation*}
57 \left[ a , b \right]
58 \end{equation*}
59 \item \texttt{isoointerval} (same as for \texttt{isointerval})
60 \begin{equation*}
61 \left[ a , b \right]
62 \end{equation*}
63 \item \texttt{fnspeinterval}
64 \begin{equation*}
65 \left< a , b \right>
66 \end{equation*}
67 \end{itemize}
68
69 \subsubsection*{Opened interval}
70 Using of macro
71 \begin{lstlisting}
72 \oi{a}{b}
73 \end{lstlisting}
74 as \textbf{o}pened \textbf{i}nterval.
75
76 \begin{itemize}
77 \item \texttt{isointerval}
78 \begin{equation*}
79 \left] a , b \right[
80 \end{equation*}
81 \item \texttt{isoointerval}
82 \begin{equation*}
83 \left( a , b \right)
84 \end{equation*}
85 \item \texttt{fnspeinterval} (same as for \texttt{isoointerval})
86 \begin{equation*}
87 \left( a , b \right)
88 \end{equation*}
89 \end{itemize}
90
91 \subsubsection*{Right closed interval}
92 Using of macro
93 \begin{lstlisting}
94 \rci{a}{b}
95 \end{lstlisting}
96 as \textbf{r}ight \textbf{c}losed \textbf{i}nterval.
97
98 \begin{itemize}
99 \item \texttt{isointerval}
100 \begin{equation*}
101 \left] a , b \right]
102 \end{equation*}
103 \item \texttt{isoointerval}
104 \begin{equation*}
105 \left( a , b \right]
106 \end{equation*}
107 \item \texttt{fnspeinterval}
108 \begin{equation*}
109 \left( a , b \right>
110 \end{equation*}
111 \end{itemize}
112
113 \subsubsection*{Left closed interval}
114 Using of macro
115 \begin{lstlisting}
116 \lci{a}{b}
117 \end{lstlisting}
118 as \textbf{l}eft \textbf{c}losed \textbf{i}nterval.
119
120 \begin{itemize}
121 \item \texttt{isointerval}
122 \begin{equation*}
123 \left[ a , b \right[
124 \end{equation*}
125 \item \texttt{isoointerval} (same as for \texttt{isointerval})
126 \begin{equation*}
127 \left[ a , b \right)
128 \end{equation*}
129 \item \texttt{fnspeinterval}
130 \begin{equation*}
131 \left< a , b \right)
132 \end{equation*}
133 \end{itemize}
134
135 \subsubsection*{Using in text}
136 All these macros can be used directly in text (thanks to the command \textit{ensuremath}). Therefore one can use this syntax
137 \begin{lstlisting}
138 Let $x$ be in \ci{a}{b}
139 \end{lstlisting}
140 which casts: Let $x$ be in \ci{a}{b}.
141
142 \subsection*{Tensor}
143 Let $x$ be vector and $A$ be matrix.
144
145 \subsubsection*{Vector}
146 Using of macro
147 \begin{lstlisting}
148 \vec{x}
149 \end{lstlisting}
150 as \textbf{vec}tor.
151
152 \begin{itemize}
153 \item \texttt{isotensor} - small letter with italic boldface
154 \begin{equation*}
155 \bm{\mathrm{x}}
156 \end{equation*}
157 \item \texttt{undertensor}
158 \begin{equation*}
159 \underline{x}
160 \end{equation*}
161 \item \texttt{arrowtensor}
162 \begin{equation*}
163 \vec x
164 \end{equation*}
165 \end{itemize}
166
167 \subsubsection*{Matrix}
168 Using of macro
169 \begin{lstlisting}
170 \mat{x}
171 \end{lstlisting}
172 as \textbf{mat}rix.
173
174 \begin{itemize}
175 \item \texttt{isotensor} - capital letter with italic boldface
176 \begin{equation*}
177 \bm{\mathrm{A}}
178 \end{equation*}
179 \item \texttt{undertensor}
180 \begin{equation*}
181 \underline{\underline{A}}
182 \end{equation*}
183 \item \texttt{arrowtensor}
184 \begin{equation*}
185 \mat{A}
186 \end{equation*}
187 \end{itemize}
188
189 \subsubsection*{Using in text}
190 All these macros can be used directly in text (thanks to the command \textit{ensuremath}). Therefore one can use this syntax
191 \begin{lstlisting}
192 Let \vec{x} be real.
193 \end{lstlisting}
194 which casts: Let \vec{x} be real.
195
196 \subsection*{Macro for set}
197
198 \subsubsection*{Set of natural numbers from 1 to $n$}
199 Using of macro
200 \begin{lstlisting}
201 \allset{n}
202 \end{lstlisting}
203 as \textbf{all} natural number up to $n$ \textbf{set} leads to
204 \begin{equation*}
205 \allset{n}.
206 \end{equation*}
207
208 \subsubsection*{Set of natural numbers from 0 to $n$}
209 Using of macro
210 \begin{lstlisting}
211 \allsetzero{n}
212 \end{lstlisting}
213 as \textbf{all} natural number up to $n$ \textbf{set} with \textbf{zero} leads to
214 \begin{equation*}
215 \allsetzero{n}.
216 \end{equation*}
217
218 \subsection*{Differentiability class}
219
220 \subsubsection*{Just symbol}
221 Using of macro
222 \begin{lstlisting}
223 \cclass
224 \end{lstlisting}
225 as \textbf{C} \textbf{class} leads to
226 \begin{equation*}
227 \cclass.
228 \end{equation*}
229
230 \subsubsection*{C infinity}
231 Using of macro
232 \begin{lstlisting}
233 \ccinf
234 \end{lstlisting}
235 as \textbf{C} \textbf{class} of \textbf{inf}inity leads to
236 \begin{equation*}
237 \ccinf.
238 \end{equation*}
239
240 \subsubsection*{C of order $d$}
241 Using of macro
242 \begin{lstlisting}
243 \ccof{d}
244 \end{lstlisting}
245 as \textbf{C} \textbf{class} \textbf{of} order leads to
246 \begin{equation*}
247 \ccof{d}.
248 \end{equation*}
249
250 \subsection*{Complex}
251 Let $z \in \compn$.
252
253 \subsubsection*{Real part}
254 Using of macro
255 \begin{lstlisting}
256 \Re{x}
257 \end{lstlisting}
258 as \textbf{Re}al.
259
260 \begin{itemize}
261 \item \texttt{oldcomplex}
262 \begin{equation*}
263 \Re\left\{z\right\}
264 \end{equation*}
265 \item \texttt{isocomplex}
266 \begin{equation*}
267 \mathrm{Re}\; z
268 \end{equation*}
269 \end{itemize}
270
271 \subsubsection*{Imaginary part}
272 Using of macro
273 \begin{lstlisting}
274 \Im{x}
275 \end{lstlisting}
276 as \textbf{Im}aginary.
277
278 \begin{itemize}
279 \item \texttt{oldcomplex}
280 \begin{equation*}
281 \Im\left\{z\right\}
282 \end{equation*}
283 \item \texttt{isocomplex}
284 \begin{equation*}
285 \mathrm{Im}\; z
286 \end{equation*}
287 \end{itemize}
288
289 \subsubsection*{Using in text}
290 All these macros can be used directly in text (thanks to the command \textit{ensuremath}). Therefore one can use this syntax
291 \begin{lstlisting}
292 Let $x$ equal to \Re{z}.
293 \end{lstlisting}
294 which casts: Let $x$ equal to $\mathrm{Re}\;z$.
295
296 \subsection*{Subscript}
297 Subscript text with two or more characters should be written in roman style (not italic as default). One can use prefix ! which makes the word after it in roman style. Using of macro
298 \begin{lstlisting}
299 A_{!unique}
300 \end{lstlisting}
301 which leads to
302 \begin{equation*}
303 A_{!unigue}
304 \end{equation*}
305 instead of classic
306 \begin{equation*}
307 A_{unique}
308 \end{equation*}
309
310 \subsection*{Floor and ceiling functions}
311 \subsubsection*{Floor function}
312 Macro
313 \begin{lstlisting}
314 \floor{x}
315 \end{lstlisting}
316 as \textbf{floor} function leads to
317 \begin{equation*}
318 \floor{x}
319 \end{equation*}
320
321 \subsubsection*{Ceil function}
322 Macro
323 \begin{lstlisting}
324 \ceil{x}
325 \end{lstlisting}
326 as \textbf{ceil} function leads to
327 \begin{equation*}
328 \ceil{x}
329 \end{equation*}
330
331 \subsection*{Definition operator}
332 There are two ways to set a definition operator. First with \textit{text} and the second with \textit{colon}.
333
334 \subsubsection*{Text definition}
335 Macro
336 \begin{lstlisting}
337 x \df a
338 \end{lstlisting}
339 \begin{itemize}
340 \item \texttt{deftext}
341 \begin{equation*}
342 x \stackrel{\mathclap{\normalfont{\mbox{\tiny def.}}}}{=} a
343 \end{equation*}
344 \item \texttt{defcolon}
345 \begin{equation*}
346 x \df a
347 \end{equation*}
348 \end{itemize}
349
350
351 \subsection*{Special sets of numbers}
352
353 \subsubsection*{Natural number}
354 Macro
355 \begin{lstlisting}
356 \natun
357 \end{lstlisting}
358 as \textbf{natu}ral \textbf{n}umber leads to
359 \begin{equation*}
360 \natun
361 \end{equation*}
362
363 \subsubsection*{Natural number with zero included}
364 Macro
365 \begin{lstlisting}
366 \nnzero
367 \end{lstlisting}
368 as \textbf{n}atural \textbf{n}umber \textbf{zero} leads to
369 \begin{equation*}
370 \nnzero
371 \end{equation*}
372
373 \subsubsection*{Integers}
374 Macro
375 \begin{lstlisting}
376 \inte
377 \end{lstlisting}
378 as \textbf{inte}regers leads to
379 \begin{equation*}
380 \inte
381 \end{equation*}
382
383 \subsubsection*{Rational number}
384 Macro
385 \begin{lstlisting}
386 \ratin
387 \end{lstlisting}
388 as \textbf{rati}onal \textbf{n}umber leads to
389 \begin{equation*}
390 \ratin
391 \end{equation*}
392
393 \subsubsection*{Real number}
394 Macro
395 \begin{lstlisting}
396 \realn
397 \end{lstlisting}
398 as \textbf{real} \textbf{n}umber leads to
399 \begin{equation*}
400 \realn
401 \end{equation*}
402
403 \subsubsection*{Complex number}
404 Macro
405 \begin{lstlisting}
406 \compn
407 \end{lstlisting}
408 as \textbf{comp}ex \textbf{n}umber leads to
409 \begin{equation*}
410 \compn
411 \end{equation*}
412
413 \subsubsection*{Using in text}
414 All these macros can be used directly in text (thanks to the command \textit{ensuremath}). Therefore one can use this syntax
415 \begin{lstlisting}
416 Let $n$ be in \natun
417 \end{lstlisting}
418 which casts: Let $n$ be in \natun.
419
420 \subsection*{Derivative}
421 It is derived from \textit{physics} package. The manual is \href{http://mirrors.ctan.org/macros/latex/contrib/physics/physics.pdf}{here}.
422
423 \subsection*{Operator}
424 Partially derived from \textit{physics} package.
425
426 \subsubsection*{Gradient}
427 Macro
428 \begin{lstlisting}
429 \grad
430 \end{lstlisting}
431 as \textbf{grad}ient leads to
432 \begin{equation*}
433 \grad
434 \end{equation*}
435
436 \subsubsection*{Divergence}
437 Macro
438 \begin{lstlisting}
439 \div
440 \end{lstlisting}
441 as \textbf{div}ergence leads to
442 \begin{equation*}
443 \div
444 \end{equation*}
445
446 \noindent Derived from \textit{physics} package, the original meaning of this command as a maths symbol for dividing has alias
447 \begin{lstlisting}
448 \divisionsymbol
449 \end{lstlisting}
450 which cast
451 \begin{equation*}
452 \divisionsymbol
453 \end{equation*}
454
455 \subsubsection*{Rotation}
456 In English literature as \textbf{curl} operator has macro
457 \begin{lstlisting}
458 \rot
459 \end{lstlisting}
460 as \textbf{rot}ation and leads to
461 \begin{equation*}
462 \rot
463 \end{equation*}
464
465 \noindent One can also use \textit{physics} package command
466 \begin{lstlisting}
467 \curl
468 \end{lstlisting}
469
470 \subsubsection*{Laplacian}
471 Macro
472 \begin{lstlisting}
473 \lapl
474 \end{lstlisting}
475 as \textbf{lapl}acian leads to
476 \begin{equation*}
477 \lapl
478 \end{equation*}
479
480 \noindent One can also use \textit{physics} package notation
481 \begin{equation*}
482 \laplacian
483 \end{equation*}
484 which is cast by macro
485 \begin{lstlisting}
486 \laplacian
487 \end{lstlisting}
488
489 \section*{Degree}
490 Macro
491 \begin{lstlisting}
492 \degree
493 \end{lstlisting}
494 as \textbf{degree} leads to \degree. Can be used without math mode.
495
496 \section*{Physics unit}
497 \subsubsection*{Variable unit}
498 Macro
499 \begin{lstlisting}
500 \varun{m}{kg}
501 \end{lstlisting}
502 as \textbf{var}iable \textbf{un}it leads to
503 \begin{equation*}
504 \varun{m}{kg}
505 \end{equation*}
506
507 \noindent This macro can be used directly in text (thanks to the \textit{ensure} function). Therefore one can use
508 \begin{lstlisting}
509 where \varun{m}{kg} is the mass.
510 \end{lstlisting}
511 which casts: where \varun{m}{kg} is the mass.
512
513 \subsubsection*{Unit}
514 Macro
515 \begin{lstlisting}
516 m\unit{kg}
517 \end{lstlisting}
518 as \textbf{unit} leads to
519 \begin{equation*}
520 m\unit{kg}
521 \end{equation*}
522 This macro looks as
523 \begin{lstlisting}
524 \;\mathrm{kg}
525 \end{lstlisting}
526 the space before the roman characters is very important in science publications.
527
528 \subsection*{Expected value}
529 Macro
530 \begin{lstlisting}
531 \expv{x}
532 \end{lstlisting}
533 as \textbf{exp}ected \textbf{v}alue leads to
534 \begin{equation*}
535 \expv{x}
536 \end{equation*}
537
538 \section*{Shortcuts}
539 \subsubsection*{One half}
540 Macro
541 \begin{lstlisting}
542 \hlf
543 \end{lstlisting}
544 as \textbf{h}a\textbf{lf} leads to
545 \begin{equation*}
546 \hlf
547 \end{equation*}
548
549 \subsubsection*{One over }
550 Macro
551 \begin{lstlisting}
552 \oover{x}
553 \end{lstlisting}
554 as \textbf{o}ne \textbf{over} leads to
555 \begin{equation*}
556 \oover{x}
557 \end{equation*}
558
559 \section*{Spaces}
560 \subsubsection*{Horizontal space}
561 Macro
562 \begin{lstlisting}
563 \hem[width]
564 \end{lstlisting}
565 as \textbf{h}space\{\textbf{em}\} leads to horizontal space of specific width (multiples of em). Special case is 1em
566 \begin{lstlisting}
567 \mathrm{text}\hem\mathrm{text}
568 \end{lstlisting}
569 which leads to
570 \begin{equation*}
571 \mathrm{text}\hem\mathrm{text}
572 \end{equation*}
573 or shortcut form space with 2em width
574 \begin{lstlisting}
575 \mathrm{text}\htem\mathrm{text}
576 \end{lstlisting}
577 which casts
578 \begin{equation*}
579 \mathrm{text}\htem\mathrm{text}
580 \end{equation*}
581
582 \subsection*{Implies with em spaces}
583 Macro
584 \begin{lstlisting}
585 \impem
586 \end{lstlisting}
587 as \textbf{implies} with \textbf{em} spaces leads to
588 \begin{equation*}
589 \mathrm{text}\impem\mathrm{text}
590 \end{equation*}
591 \end{document}