-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathpreamble.tex
352 lines (310 loc) · 11.3 KB
/
preamble.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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{libs/commath2}
\usepackage[table]{xcolor}
\usepackage[hidelinks,draft=false]{hyperref}
\usepackage[skins,theorems]{tcolorbox}
\usepackage{titlesec}
\usepackage{tikz}
\usepackage{libs/circuitikz} % use our own recent version to make sure some bugs are fixed
\usepackage{pgfplots}
\usepackage{mathtools}
\usepackage[makeroom]{cancel}
\usepackage{mathrsfs}
\usepackage{wrapfig}
%\usepackage{subcaption}
%\usepackage{floatrow}
\usepackage{esint}
\usepackage{paralist}
\usepackage{enumitem}
%\usepackage{bm}
\usepackage{relsize}
\usepackage{xfrac}
\usepackage{comment}
\usepackage{siunitx}
\usepackage{multicol}
%\usepackage{MnSymbol}
\usepackage[obeyDraft,textsize=tiny]{todonotes}
%\usepackage{morefloats} % oh no!
%\usepackage[linesnumbered,lined]{algorithm2e}
\usepackage{glossaries}
\usepackage{xifthen}
\usepackage{tocloft}
\usepackage{nccmath}
\pgfplotsset{compat=1.13}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{patterns}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations.markings}
\usetikzlibrary{backgrounds}
\usetikzlibrary{shapes.misc}
\usetikzlibrary{shapes.multipart}
\usetikzlibrary{shadows.blur}
\usetikzlibrary{fadings}
\usetikzlibrary{intersections}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{calc}
\usetikzlibrary{matrix}
\usetikzlibrary{positioning}
\usetikzlibrary{shapes}
\usetikzlibrary{shadings}
\tcbuselibrary{breakable}
\tcbuselibrary{skins}
\tcbuselibrary{xparse}
\tikzset{cross/.style={cross out, draw,
minimum size=2*(#1-\pgflinewidth),
inner sep=0pt, outer sep=0pt}}
\tikzset{
mark position/.style args={#1(#2)}{
postaction={
decorate,
decoration={
post length=1mm, % ??? Magic to fix "Dimension
pre length=1mm, % ??? too large" errors.
markings,
mark=at position #1 with \coordinate (#2);
}
}
}
}
\tikzset{
arrow at/.style args={#1}{
postaction={
decorate,
decoration={
post length=1mm, % ??? Magic to fix "Dimension
pre length=1mm, % ??? too large" errors.
markings,
mark=at position #1 with {\arrow{>}};
}
}
}
}
\makeatletter
\tikzset{
use path for main/.code={%
\tikz@addmode{%
\expandafter\pgfsyssoftpath@setcurrentpath\csname tikz@intersect@path@name@#1\endcsname
}%
},
use path for actions/.code={%
\expandafter\def\expandafter\tikz@preactions\expandafter{\tikz@preactions\expandafter\let\expandafter\tikz@actions@path\csname tikz@intersect@path@name@#1\endcsname}%
},
use path/.style={%
use path for main=#1,
use path for actions=#1,
}
}
\makeatother
\pgfmathdeclarefunction{sinc}{1}{%
\pgfmathparse{abs(#1)<0.01 ? int(1) : int(0)}%
\ifnum\pgfmathresult>0 \pgfmathparse{1}\else\pgfmathparse{sin(#1 r)/#1}\fi%
}
\pgfmathdeclarefunction{gauss}{2}{%
\pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}%
}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
%\usepackage[no-math]{fontspec}
%\usepackage{fontspec}
\usepackage{mathspec}
%\usepackage{newtxtext,newtxmath}
%\usepackage{unicode-math}
%\setmainfont{texgyretermes-regular.otf}
%\setsansfont{texgyreheros-regular.otf}
%\newfontfamily\greekfont[Script=Greek]{Linux Libertine O}
%\newfontfamily\greekfontsf[Script=Greek]{Linux Libertine O}
\usepackage{polyglossia}
%\newfontfamily\greekfont[Script=Greek]{texgyretermes-regular.otf}
\newfontfamily\greekfontsf[Script=Greek]{texgyreheros-regular.otf}
\newfontfamily\greekfonttt[Script=Greek]{Latin Modern Mono}
%\usepackage[greek]{babel}
\setdefaultlanguage{greek}
\setotherlanguage{english}
%\usepackage[utf8]{inputenc}
%\usepackage[greek]{babel}
%\usepackage{tkz-euclide} % loads TikZ and tkz-base
%\usetkzobj{angles} % important you want to use angles
\newlist{enumparen}{enumerate}{1}
\setlist[enumparen]{label=(\arabic*)}
\newlist{enumpar}{enumerate}{1}
\setlist[enumpar]{label=\arabic*)}
\newlist{enumgreek}{enumerate}{1}
\setlist[enumgreek]{label=\alph*.}
\newlist{enumgreekparen}{enumerate}{1}
\setlist[enumgreekparen]{label=(\alph*)}
\newlist{enumgreekpar}{enumerate}{1}
\setlist[enumgreekpar]{label=\alph*)}
\newlist{enumroman}{enumerate}{1}
\setlist[enumroman]{label=(\roman*)}
\newlist{enumlatin}{enumerate}{1}
\setlist[enumlatin]{label=(\alph*)}
\newlist{invitemize}{itemize}{1}
\setlist[invitemize]{noitemsep,label=}
\input{libs/fiximplies}
%\input{libs/sphere}
\makeatletter
\let\anw@true\anw@false
%\newcommand{\attnboxed}[1]{\textcolor{red}{\fbox{\normalcolor\m@th$\displaystyle#1$}}}
\makeatother
\tcbset{highlight math style={enhanced,colframe=red,colback=white,%
arc=0pt,boxrule=1pt,shrink tight,boxsep=1.5mm,extrude by=0.5mm}}
\newcommand{\attnboxed}[1]{\tcbhighmath[colback=red!5!white,drop fuzzy shadow,arc=0mm]{#1}}
\newcommand{\infoboxed}[1]{%
\tcbhighmath[colframe=blue!50!white,colback=blue!5!white,arc=0mm]{#1}}
\titleformat{\section}{\bf\Large}{Κεφάλαιο \thesection}{1em}{}
\newtcolorbox{attnbox}[1]{colback=red!5!white,%
colframe=red!75!black,fonttitle=\bfseries,title=#1}
\newtcbox{quickattnbox}[1]{colback=red!5!white,%
colframe=red!75!black,fonttitle=\bfseries,title=#1}
\newtcolorbox{infobox}[1]{colback=blue!5!white,%
colframe=blue!75!black,fonttitle=\bfseries,title=#1}
\newtcolorbox{knowledgebox}[2][]{colbacktitle=red!10!white,
colback=blue!10!white,coltitle=blue!70!black,
attach title to upper,after title={:\ },
title={#2},fonttitle=\bfseries,#1}
%TODO: Knowledge titles to left
\newtcolorbox{questionbox}[2][]{
beamer,title={#2},#1}
\tcbset{frogbox/.style={enhanced jigsaw,%
overlay first={\foreach \x in {0cm} {
\begin{scope}[shift={([xshift=-0.2cm]title.west)}]
\draw[very thick,green!65!black!50!white,latex-] (0,0) -- ++(-1.5,0);
\end{scope}}}}}
\tcbset{frogtitle/.style={
attach boxed title to top left=
{xshift=0mm,yshift=-0.50mm},
boxed title style={skin=enhancedfirst jigsaw,
bottom=0mm,
interior style={fill=none,
left color=green!20!black,
right color=gray}}
}}
\DeclareTColorBox{exercise}{ O{} }{
enhanced jigsaw,
breakable,parbox=false,
%title style={left color=gray!50!white!50!green,opacity=.5,right color=white},
subtitle style={%boxrule=1pt,
colback=yellow!50!red!25!white,fontupper=\bfseries},
coltitle=black,colbacktitle=blue!90!black!25!white,colframe=black,
frame hidden,
boxrule=0mm,
%boxrule=1mm,
leftrule=0.8pt,toprule=0.8pt,rightrule=0pt, %reserve space
borderline west={0.8pt}{0pt}{white!25!black},%---- draw line
borderline north={0.8pt}{0pt}{white!25!black},%---- draw line
interior hidden,
%frame style={left color=black,right color=white},
sharp corners=all,
%frogbox, %TODO: frogbox
before lower={\tcbsubtitle[before skip=\baselineskip]{Λύση}},lower separated=false,
before title={\textbf{Άσκηση\ifthenelse{\isempty{#1}}{}{: }}},
title={\ifthenelse{\isempty{#1}}{\hspace{0pt}}{#1}}%
}
% Minipage utilities
\newcommand{\saveparinfo}{%
\edef\myindent{\the\parindent}%
\edef\myparskip{\the\parskip}}
\newcommand{\useparinfo}{%
\setlength{\parindent}{\myindent}%
\setlength{\parskip}{\myparskip}}
\AtBeginDocument{%
\let\arg\relax
\let\Re\relax
\let\Im\relax
\DeclareMathOperator{\arg}{arg}
\DeclareMathOperator{\Re}{Re}
\DeclareMathOperator{\Im}{Im}
}
\DeclareMathOperator{\sinc}{sinc}
\DeclareMathOperator{\sgn}{sgn}
\DeclareMathOperator{\erf}{erf}
\DeclareMathOperator{\cov}{cov}
\DeclareMathOperator{\atand}{atan2}
\DeclareMathOperator{\rank}{rank}
\DeclareMathOperator{\res}{Res}
\newenvironment{absolutelynopagebreak}
{\par\nobreak\vfil\penalty0\vfilneg
\vtop\bgroup}
{\par\xdef\tpd{\the\prevdepth}\egroup
\prevdepth=\tpd}
\DeclareSIUnit \voltampere { VA } %apparent power
\DeclareSIUnit \var { VAr } %volt-ampere reactive - idle power
\DeclareSIUnit \decade { dec } %decade
% Link colours
\hypersetup{colorlinks,linkcolor={blue!40!black!95!green},citecolor={blue!50!black},urlcolor={cyan!70!black}}
% Global amount of samples
% Set to a higher value (e.g. 200) for nicer graphs
% Set to a low value (e.g. 10) for performance
% NOTE: Check the sample variables below for further measurements
\newcommand*{\gsamples}{200}
% Equals command as a workaround for CircuiTikZ bug
% not allowing the = sign in labels
\newcommand*{\equals}{=}
\newcommand{\nesearrow}{%
\,%
\smash{\raisebox{-1.1ex}
{$%
\stackrel{\displaystyle\nearrow}{\displaystyle\searrow}%
$}}%
}
\newcommand{\degree}{^{\circ}} % not great
\newcommand\numberthis{\addtocounter{equation}{1}\tag{\theequation}} % add an equation number to a number-less math environment
% Provided commands
\providecommand\dif{d}
\providecommand\od[2]{\frac{#1}{#2}}
\newtcbtheorem[number within=section,list inside=thm]{theorem}{Θεώρημα}%
{colback=green!5,colframe=green!35!black,colbacktitle=green!35!black,fonttitle=\bfseries,enhanced,attach boxed title to top left={yshift=-2mm,xshift=-7mm},width=.9\textwidth,arc=.7mm}{th}
\newtcbtheorem[number within=section,list inside=defn]{defn}{Ορισμός}%
{colback=blue!5,colframe=cyan!35!black,colbacktitle=blue!35!black,fonttitle=\bfseries,enhanced,attach boxed title to top left={yshift=-2mm,xshift=-2mm}}{def}
\makeatletter
\def\tcb@cnt@theoremautorefname{Θεώρημα}
\def\tcb@cnt@defnautorefname{Ορισμός}
\makeatother
% Locus plot utilities
\tikzset{locus/.style={orange!50!red!70!brown}}
\tikzset{locuspole/.style={draw=red!30!black,cross,inner sep=2.5pt,fill=white,fill opacity=.6,thick,label={[below]-90:#1}}}
\tikzset{locuszero/.style={draw=red!30!black,circle,inner sep=2pt,fill=white,fill opacity=.6,thick,label={[below]-90:#1}}}
\tikzset{locusbreak/.style={rounded corners=1.5pt,inner sep=2pt,draw,top color=brown,bottom color=black,fill opacity=.8,label={[below]-90:#1}}}
% Lecture specifications
\newcommand{\listlecturename}{Κατάλογος Διαλέξεων}
\newlistof[chapter]{lecture}{toclec}{\listlecturename}
\renewcommand{\cfttoclectitlefont}{\normalfont\Large\bfseries}
\newcommand{\lecture}[2]{%
\refstepcounter{lecture}
\addcontentsline{toclec}{lecture}{\protect\numberline{#1}Διάλεξη #2}
\hypertarget{lecture_#1}{}
\nointerlineskip \vspace{.4\baselineskip}%\hspace{\fill}
\centerline{%\color{#1}
%\resizebox{1.1\linewidth}{\height}
\smash{{%
{\begin{tikzpicture}[xscale=2,baseline={([yshift=0ex]current bounding box.north)}]
\draw[blue!50!cyan,path fading=west] (0,0) -- (10.1,0);
\draw[blue!60!cyan!30!white,path fading=east] (0,0) -- (10.1,0);
\draw[>-,blue!60!cyan!70!white,>={LaTeX[scale=2]},draw opacity=1] (9.9,0) -- ++(0,-0.01);
\draw (9.9,-0.4) node[rectangle,align=center,scale=.7,blue!70!black,below]
{Διάλεξη #1\textsuperscript{η}\\#2};
\end{tikzpicture}}}}}%
%\hspace{\fill}
\par\nointerlineskip \vspace{.5\baselineskip}
}
%\newcommand{\autopageref}[1]{%
%\hyperref[#1]{Σελίδα \pageref*{#1}}%
%}
% Note: Latex requires a configuration flag for PDF named destinations to be stored:
% In dvipdfmx.cfg search for Dvipdfmx Compatibility Flags, and add this line after %C 0x0000:
% C 0x0010
%
% New plotting utilities
\def\vlowsamples{4}
\def\lowsamples{40}
\def\midsamples{60}
\def\hisamples{80}
\def\timecolour{blue!50!cyan!80!brown}
\def\omegacolour{red!50!orange!90!brown}
\tikzstyle{timecolour}=[\timecolour]
\tikzstyle{omegacolour}=[\omegacolour]
\renewcommand*{\pageautorefname}{Σελίδα}
\renewcommand*{\sectionautorefname}{Ενότητα}
\renewcommand*{\subsectionautorefname}{Ενότητα}
\renewcommand*{\subsubsectionautorefname}{Ενότητα}