/
commands.tex
executable file
·165 lines (120 loc) · 5.5 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
\usepackage{amsmath, amsthm, amssymb, units, dsfont}
\usepackage{sidecap}
\usepackage{enumerate}
\usepackage{xcolor}
\usepackage{mathtools, mathdots}
\usepackage{pgffor}
\usepackage{pdflscape}
\usepackage{afterpage}
\usepackage{chngcntr}
\usepackage{multirow}
\usepackage{tabulary}
\usepackage{listings}
\usepackage{color}
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{breqn}
\usepackage{hyperref}
\usepackage{pgfkeys}
\usepackage{changepage}
\definecolor{darkgreen}{rgb}{0,0.6,0}
\definecolor{darkred}{rgb}{0.6,0,0}
\definecolor{darkblue}{rgb}{0,0,0.6}
\definecolor{darkgrey}{rgb}{0.3,0.3,0.3}
\definecolor{grey}{rgb}{0.6,0.6,0.6} %comment
\definecolor{lightgrey}{rgb}{0.92,0.92,0.92}
\definecolor{terminal}{rgb}{0.9,0.9,0.6}
\definecolor{cmd}{rgb}{0.8,0.8,0.98}
\lstset{
basicstyle=\ttfamily,
% language=Matlab, % choose the language of the code
% basicstyle=10pt, % the size of the fonts that are used for the code
% numbers=left, % where to put the line-numbers
keywordstyle=\color{darkblue},
commentstyle=\color{darkgreen},
stringstyle=\color{darkred},
% numberstyle=\footnotesize, % the size of the fonts that are used for the line-numbers
stepnumber=1, % the step between two line-numbers. If it's 1 each line will be numbered
numbersep=5pt, % how far the line-numbers are from the code
% backgroundcolor=\color{white}, % choose the background color. You must add \usepackage{color}
showspaces=false, % show spaces adding particular underscores
showstringspaces=false, % underline spaces within strings
showtabs=false, % show tabs within strings adding particular underscores
% frame=single, % adds a frame around the code
% tabsize=2, % sets default tabsize to 2 spaces
% captionpos=b, % sets the caption-position to bottom
breaklines=true, % sets automatic line breaking
breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace
escapeinside={\%*}{*)}, % if you want to add a comment within your code
emph={%
False, True%
},emphstyle={\color{darkblue}}
}
%\newcommand{\komentar}[1]{\textcolor{red}{\MakeUppercase{#1}} \newline}
%\newenvironment{upravit}{\color{blue}}{}
\newcommand{\Zomega}{\mathbb{Z}[\omega]}
\newcommand{\Zbeta}{\mathbb{Z}[\beta]}
\newcommand{\ZZ}{\mathbb{Z}}
\newcommand{\QQ}{\mathbb{Q}}
\newcommand{\CC}{\mathbb{C}}
\newcommand{\NN}{\mathbb{N}}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\A}{\mathcal{A}}
\newcommand{\B}{\mathcal{B}}
\newcommand{\Q}{\mathcal{Q}}
\newcommand{\Qw}[3][w]{\Q_{[#1_{-#2}, \dots, #1_{-#3}]}}
\newcommand{\Qwo}[2][w]{\Q_{[#1_{0}, \dots, #1_{-#2}]}}
\newcommand{\tuple}[3][w]{(#1_{-#2}, \dots, #1_{-#3})}
\newcommand{\tupleo}[2][w]{(#1_{0}, \dots, #1_{-#2})}
%\newcommand{\Qb}[1]{\mathcal{Q}_{[b^{#1}]}}
\newcommand{\Qb}[1]{\mathcal{Q}_{[\scriptstyle b]}^{\scriptstyle #1}}
\newcommand{\fin}[1]{\text{Fin}_{#1}(\beta)}
\newcommand{\multMat}[1]{\sum_{i=0}^{d-1} {#1}_i S^i}
\newcommand{\vect}[1]{\begin{pmatrix}
{#1}_0 \\
{#1}_1 \\
\vdots \\
{#1}_{d-1}
\end{pmatrix}}
\newcommand{\enum}[1]{({#1}_0,\ldots,{#1}_{d-1})}
\newcommand{\vertiii}[1]{{\left\vert\kern-0.25ex\left\vert\kern-0.25ex\left\vert #1\right\vert\kern-0.25ex\right\vert\kern-0.25ex\right\vert}}
\newcommand{\norm}[2]{\left\lVert#1\right\rVert_{#2}}
\newcommand{\Mnorm}[2]{\vertiii{#1}_{#2}}
\newcommand{\normBeta}[1]{\norm{#1}{\beta}}
\newcommand{\MnormBeta}[1]{\Mnorm{#1}{\beta}}
\renewcommand\Re{\operatorname{Re}}
\renewcommand\Im{\operatorname{Im}}
\renewcommand{\algorithmicrequire}{\textbf{Input:}}
\renewcommand{\algorithmicensure}{\textbf{Ouput:}}
\algsetup{indent=2em}
\usepackage{pifont}
\renewcommand\checkmark{\ding{51}}
\newcommand\xmark{\ding{55}}
\newcommand{\var}[1]{\textit{#1}}
\newcommand{\fun}[2]{\textbf{#1}\allowbreak{}(\var{#2})}
\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
\let\endchangemargin=\endlist
\newenvironment{method}[2]{
\noindent \textbf{#1(}\textit{#2}\textbf{)}
\vspace{-5pt}
\begin{changemargin}{3em}{0em}}
{\end{changemargin}}
\def\Cpp{{C\nolinebreak[4]\hspace{-.05em}\raisebox{.4ex}{\tiny\bf ++}}}
\pgfkeys{
/phaseOnecaptions array/.is family, /phaseOnecaptions array,
.unknown/.style = {\pgfkeyscurrentname/.initial = #1},
}
\newcommand\figurehascaptionOne[1]{\pgfkeys{/phaseOnecaptions array, #1}}
\newcommand\getcaptionOne[1]{\pgfkeysvalueof{/phaseOnecaptions array/#1}}
\pgfkeys{
/phase2captions array/.is family, /phase2captions array,
.unknown/.style = {\pgfkeyscurrentname/.initial = #1},
}
\newcommand\figurehascaptionTwo[1]{\pgfkeys{/phase2captions array, #1}}
\newcommand\getcaptionTwo[1]{\pgfkeysvalueof{/phase2captions array/#1}}
% \hyphenation{coef-fi-cient}
% \hyphenation{Algorithm-For-Parallel-Addition}
% \hyphenation{Polynomial-Quotient-Ring}
\hyphenation{con-ver-gen-ce}
\hyphenation{non-con-ver-gen-ce}
\hyphenation{re-pre-sen-ta-tions}