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
|
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{fnspe}[2017/02/27 Package for FNSPE CTU in Prague made by Michal Zeman]
\RequirePackage{xstring}
\RequirePackage{bm}
\RequirePackage{amsmath}
\RequirePackage{amsfonts}
\RequirePackage{mathrsfs}
\RequirePackage{amsthm}
\RequirePackage{amssymb}
\RequirePackage{xcolor}
\RequirePackage{listings}
\RequirePackage{physics}
\newif\if@isointerval\@isointervalfalse
\DeclareOption{isointerval}{
\@isointervaltrue
}
\newif\if@isoointerval\@isoointervalfalse
\DeclareOption{isoointerval}{
\@isoointervaltrue
}
\newif\if@fnspeinterval\@fnspeintervalfalse
\DeclareOption{fnspeinterval}{
\@fnspeintervaltrue
}
\newif\if@isotensor\@isotensorfalse
\DeclareOption{isotensor}{
\@isotensortrue
}
\newif\if@undertensor\@undertensorfalse
\DeclareOption{undertensor}{
\@undertensortrue
}
\newif\if@arrowtensor\@arrowtensorfalse
\DeclareOption{arrowtensor}{
\@arrowtensortrue
}
\newif\if@oldcomplex\@oldcomplexfalse
\DeclareOption{oldcomplex}{
\@oldcomplextrue
}
\newif\if@isocomplex\@isocomplexfalse
\DeclareOption{isocomplex}{
\@isocomplextrue
}
\ProcessOptions\relax
\lstset
{
language=[LaTeX]TeX,
breaklines=true,
basicstyle=\tt\scriptsize,
morekeywords = [28]{ci,oi,lci,rci,rest,dif, hlf, degree, hem, htem, oover, realn, inte, ratin, compn, natun, impem, rot, dive, grad, lapl, varun, unit, expv, norm, abs, pder, tder,mat,curl,laplacian,divisionsymbol},
keywordstyle=\color{blue},
identifierstyle=\color{magenta},
}
%\catcode`_=\active
%\newcommand_[1]{\IfSubStr{#1}{!}{\sb{\mathrm{\StrBehind{#1}{!}}}}{\sb{#1}} }
\mathcode`\_=\string"8000
\catcode`\_=12
\begingroup
\catcode`\_=\active
\gdef_#1{\IfSubStr{#1}{!}{\sb{\mathrm{\StrBehind{#1}{!}}}}{\sb{#1}} }
\endgroup
\mathcode`\_=\string"8000
\catcode`\_=12
\if@arrowtensor
\else
\renewcommand{\vec}[1]{\ensuremath{\if@undertensor \underline{#1} \else \bm{\mathrm{\MakeLowercase{#1}}} \fi}}
\fi
\newcommand{\mat}[1]{\ensuremath{\if@undertensor \underline{\underline{#1}} \else \if@arrowtensor \overset{\leftrightarrow}{#1} \else \bm{\mathrm{\MakeUppercase{#1}}} \fi \fi}}
%\newcommand{\pder}[3][]{\ensuremath{\frac{\partial^#1 #2}{\partial #3^#1}}} \pdv
\newcommand*{\tder}[3][]{\dv[#1]{#2}{#3}} %\dv
\newcommand{\oi}[2]{\ensuremath{\if@fnspeinterval \left( #1 , #2 \right) \else \if@isoointerval \left( #1 , #2 \right) \else \left] #1 , #2 \right[ \fi \fi}}
\newcommand{\ci}[2]{\ensuremath{\if@fnspeinterval \left< #1 , #2 \right> \else \left[ #1 , #2 \right] \fi}}
\newcommand{\rci}[2]{\ensuremath{\if@fnspeinterval \left( #1 , #2 \right> \else \if@isoointerval \left( #1 , #2 \right] \else \left] #1 , #2 \right] \fi \fi}}
\newcommand{\lci}[2]{\ensuremath{\if@fnspeinterval \left< #1 , #2 \right) \else \if@isoointerval \left[ #1 , #2 \right) \else \left[ #1 , #2 \right[ \fi \fi}}
%\newcommand{\rest}[2]{\ensuremath{\left.#1\right|_{#2}}}
\newcommand{\dif}[1]{\ensuremath{\mathrm d #1}}
\newcommand{\hlf}{\ensuremath{\frac{1}{2}}}
\newcommand{\degree}{\ensuremath{{}^{\circ}}}
%\newcommand{\deg}{\degree}
\newcommand{\hem}[1][1]{\ensuremath{\hspace{#1em}}}
\newcommand{\htwoem}{\ensuremath{\hspace{2em}}}
\newcommand{\htem}{\ensuremath{\htwoem}}
\newcommand{\oover}[1]{\ensuremath{\ensuremath{\frac{1}{#1}}}}
\newcommand{\realn}{\ensuremath{\mathbb{R}}}
\newcommand{\compn}{\ensuremath{\mathbb{C}}}
\newcommand{\inte}{\ensuremath{\mathbb{Z}}}
\newcommand{\ratin}{\ensuremath{\mathbb{Q}}}
\newcommand{\natun}{\ensuremath{\mathbb{N}}}
\newcommand{\impem}{\ensuremath{\hem \Rightarrow \hem}}
\newcommand{\rot}{\ensuremath{\curl}}
%\newcommand{\dive}{\ensuremath{\nabla \cdot}}
%\newcommand{\grad}{\ensuremath{\nabla}}
\newcommand{\lapl}{\ensuremath{\Delta}} %\laplacian
\newcommand{\varun}[2]{\ensuremath{\left[#1\right]=\mathrm{#2}}}
\newcommand{\unit}[1]{\ensuremath{\;\mathrm{#1}}}
\newcommand{\expv}[1]{\ensuremath{\left<#1\right>}}
%\newcommand{\norm}[1]{\ensuremath{\left|\left|#1\right|\right|}}
%\newcommand{\abs}[1]{\ensuremath{\left|#1\right|}}
\if@oldcomplex
\renewcommand{\Re}{\mathfrak{Re}}
\else
\renewcommand{\Re}{\mathrm{Re}\;}
\fi
\if@oldcomplex
\renewcommand{\Im}{\mathfrak{Im}}
\else
\renewcommand{\Im}{\mathrm{Im}\;}
\fi
%\newcommand{\maxv}[1]{\vec{\mathcal{#1}}}
%\newcommand{\maxs}[1]{\mathcal{#1}}
|