-
Notifications
You must be signed in to change notification settings - Fork 1
/
premeable.tex
167 lines (149 loc) · 5.05 KB
/
premeable.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
\usepackage{amsthm,amssymb,amsmath}
\usepackage[top=40mm, bottom=40mm, left=25mm, right=35mm]{geometry}
\usepackage{graphicx}
\usepackage{framed}
\usepackage{lastpage}
\usepackage[pagebackref=false,colorlinks=false,linkcolor=black,citecolor=blue,unicode=true,bookmarks=true]{hyperref}
\usepackage{fancyhdr}
\usepackage{setspace}
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{subfigure}
\usepackage{caption}
\usepackage[subfigure]{tocloft}
\usepackage[nottoc]{tocbibind}
\usepackage{makeidx}
\makeindex
\usepackage[export]{adjustbox}
\usepackage{array}
\usepackage{tabularx}
\usepackage{pifont,mdframed}
\usepackage{colortbl}
\usepackage{longtable}
\usepackage{etoc}
\usepackage{minted}
\usepackage[listings,skins,breakable]{tcolorbox}
\usepackage{xcolor}
\usepackage{mdframed}
\usepackage{xepersian}
\setmainfont[Ligatures=TeX, Path=fonts/, Scale=1.2]{XB Niloofar.ttf}
\settextfont[Scale=1.2, Path=fonts/, BoldFont=B Nazanin Bold.ttf]{B Nazanin.ttf}
\setlatintextfont[Scale=0.8, Path=fonts/, BoldFont=timesbd.ttf]{times.ttf}
\setdigitfont[Scale=0.8, Path=fonts/]{XB Zar.ttf}
\defpersianfont\titlefont[Scale=0.8, Path=fonts/]{XB Titre.ttf}
\SepMark{-}
\theoremstyle{definition}
\newtheorem{definition}{تعریف}[section]
\newtheorem{theorem}[definition]{قضیه}
\newtheorem{lemma}[definition]{لم}
\newtheorem{proposition}[definition]{گزاره}
\newtheorem{corollary}[definition]{نتیجه}
\newtheorem{remark}[definition]{ملاحظه}
\theoremstyle{definition}
\newtheorem{example}[definition]{مثال}
\numberwithin{algorithm}{chapter}
\def\listalgorithmname{فهرست الگوریتمها}
\def\listfigurename{فهرست تصاویر}
\def\listtablename{فهرست جداول}
\doublespacing
\newlength\mylenprt
\newlength\mylenchp
\newlength\mylenapp
\renewcommand\cftpartpresnum{\partname~}
\renewcommand\cftchappresnum{\chaptername~}
\renewcommand\cftchapaftersnum{:}
\settowidth\mylenprt{\cftpartfont\cftpartpresnum\cftpartaftersnum}
\settowidth\mylenchp{\cftchapfont\cftchappresnum\cftchapaftersnum}
\settowidth\mylenapp{\cftchapfont\appendixname~\cftchapaftersnum}
\addtolength\mylenprt{\cftpartnumwidth}
\addtolength\mylenchp{\cftchapnumwidth}
\addtolength\mylenapp{\cftchapnumwidth}
\setlength\cftpartnumwidth{\mylenprt}
\setlength\cftchapnumwidth{\mylenchp}
\makeatletter
{\def\thebibliography#1{\chapter*{\refname\@mkboth
{\uppercase{\refname}}{\uppercase{\refname}}}\list
{[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}
\rightmargin\labelwidth
\advance\rightmargin\labelsep
\advance\rightmargin\bibindent
\itemindent -\bibindent
\listparindent \itemindent
\parsep \z@
\usecounter{enumi}}
\def\newblock{}
\sloppy
\sfcode`\.=1000\relax}}
\makeatother
\usepackage{grfext}
\graphicspath{{figures/}}
\usepackage{caption}
%% new colours
\definecolor{aox}{rgb}{0.0, 0.5, 0.0}
\definecolor{bred}{rgb}{0.8, 0.0, 0.0}
\definecolor{darkolivegreen}{rgb}{0.33, 0.42, 0.18}
\newcommand{\lbb}{\textbf{\{}}
\newcommand{\rbb}{\textbf{\}}}
\newcommand{\gcm}[1]{\textbf{\textcolor{aox}{#1}}}
\newcommand{\egcm}[1]{\textbf{\textcolor{bred}{#1}}}
%% toc depth
\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{3}
%% table coluring
\newcommand{\mc}[2]{\multicolumn{#1}{c}{#2}}
\definecolor{Gray}{gray}{0.85}
\definecolor{LightCyan}{rgb}{0.8,1,1}
\newcolumntype{a}{>{\columncolor{Gray}}c}
\newcolumntype{b}{>{\columncolor{white}}c}
%% waning box
\definecolor{warningbackground}{RGB}{252,226,158}
\newcommand{\alertwarningbox}[1]{
\begin{centering}
\begin{tabularx}{\linewidth}{
>{\columncolor{warningbackground}}c
>{\columncolor{warningbackground}}X}
\raisebox{\dimexpr2\baselineskip-\height}
{\includegraphics[scale=1.0]{figures/warning.jpg}}&
\raisebox{\tabcolsep}{\strut}#1\raisebox{-\tabcolsep}{\strut}
\end{tabularx}
\end{centering}
}
\makeatletter
\def\set@docident{
\begingroup
\def\@step##1##2\@nil{\advance\@tempcnta##1 \def\@tempa{##2}}
\def\@tempa{{31}{28}{31}{30}{31}{30}{31}{31}{30}{31}{30}{31}}%
\@tempcnta=\day % day of month
\@tempcntb=\month % month of year (unit-offset)
\loop
\advance\@tempcntb-1
\ifnum \@tempcntb>0
\expandafter\@step\@tempa\@nil
\repeat
\@tempcntb=\year % yes, do calculate leap years
\divide\@tempcntb 4 \multiply\@tempcntb 4
\ifnum\@tempcntb=\year
\ifnum\month>2 % but let's not worry about century years (slack...)
\advance\@tempcnta 1
\fi
\fi
\xdef\docident{%
\the\@tempcnta % day-of-year
-\the\time} % minutes since midnight
\endgroup
}
\set@docident
\makeatother
\usepackage[some]{background}
\definecolor{titlepagecolor1}{cmyk}{0.3,0.6,0,.60}
\definecolor{titlepagecolor2}{cmyk}{0.3,0.6,0,.60}
\DeclareFixedFont{\bigsf}{T1}{phv}{b}{n}{1.5cm}
\backgroundsetup{
scale=1,
angle=0,
opacity=1,
contents={\begin{tikzpicture}[remember picture,overlay]
\path [fill=titlepagecolor1] (-0.5\paperwidth,5) rectangle (0.5\paperwidth,10);
\path [fill=titlepagecolor2] (-0.5\paperwidth,5) rectangle (0.5\paperwidth,10);
\end{tikzpicture}}
}