-
Notifications
You must be signed in to change notification settings - Fork 1
/
mystyle.sty
155 lines (132 loc) · 4.17 KB
/
mystyle.sty
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
\usepackage{standalone}
% line spacing and paragragh spacing
\usepackage{setspace}
\usepackage{indentfirst}
\usepackage{multicol}
\usepackage{caption}
\captionsetup[table]{skip=10pt}
\usepackage[table,xcdraw]{xcolor}
\usepackage[utf8]{inputenc}
\usepackage{subcaption}
\usepackage{dirtytalk}
\usepackage{tabulary}
\usepackage{hyperref}
\usepackage{graphicx} %package to manage images
\graphicspath{{img/}}
\renewcommand{\baselinestretch}{1.5}
%verbatim centering
\usepackage{fancyvrb}
% bibliography
\usepackage[noadjust]{cite}
\bibliographystyle{IEEEtran}
% to set page spacing
\usepackage{geometry}
\geometry{
a4paper,
total={150mm,217mm},
left=30mm,
top=40mm,
}
% to set page numbering spacing
\setlength{\footskip}{28mm}
\setcounter{secnumdepth}{5}
% Time New Roman Font
\usepackage[T1]{fontenc}
\usepackage{newtxtext,newtxmath}
% to set the dateformat
\usepackage[en-GB]{datetime2}
\DTMlangsetup[en-GB]{ord=raise,monthyearsep={,\space}}
%to make appendix
\usepackage[toc,page]{appendix}
%to wrap table data
%\usepackage{tabulary}
%Tikz
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\usepackage{pgfplots}
% centering chapter
\usepackage{sectsty}
\chapterfont{\centering}
% to center horizontally
\usepackage{array}
% to add algorithm
\usepackage{dsfont}
\usepackage{algorithm}
\usepackage{algorithmicx}
\usepackage{algpseudocode,float}
\usepackage{mathtools, xfrac}
\newcommand{\minbox}[2]{%
\mathmakebox[\ifdim#1<\width\width\else#1\fi]{#2}}
\newcommand{\Let}[2]{\State $ \minbox{1em}{#1} \gets #2 $}
\algnewcommand{\Local}{\State\textbf{Local Variables: }}
\makeatletter
\newenvironment{breakablealgorithm}
{% \begin{breakablealgorithm}
\begin{center}
\refstepcounter{algorithm}% New algorithm
\hrule height.8pt depth0pt \kern2pt% \@fs@pre for \@fs@ruled
\renewcommand{\caption}[2][\relax]{% Make a new \caption
{\raggedright\textbf{\ALG@name~\thealgorithm} ##2\par}%
\ifx\relax##1\relax % #1 is \relax
\addcontentsline{loa}{algorithm}{\protect\numberline{\thealgorithm}##2}%
\else % #1 is not \relax
\addcontentsline{loa}{algorithm}{\protect\numberline{\thealgorithm}##1}%
\fi
\kern2pt\hrule\kern2pt
}
}{% \end{breakablealgorithm}
\kern2pt\hrule\relax% \@fs@post for \@fs@ruled
\end{center}
}
\makeatother
%\usepackage[noend]{algpseudocode}
%\usepackage[algcompatible]{algpseudocode}
%\floatname{algorithm}{Procedure}
\renewcommand{\algorithmicrequire}{\textbf{Input:}}
\renewcommand{\algorithmicensure}{\textbf{Output:}}
%to manipulate foot note page number
\usepackage{fancyhdr}
\fancypagestyle{plain}{%
\fancyhf{} % clear all header and footer fields
\fancyfoot[C]{-\thepage-} % except the center
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}}
\pagestyle{plain}
% Default fixed font does not support bold face
\DeclareFixedFont{\ttb}{T1}{txtt}{bx}{n}{12} % for bold
\DeclareFixedFont{\ttm}{T1}{txtt}{m}{n}{12} % for normal
% to insert codes
\usepackage{listings}
\usepackage{color}
%New colors defined below
\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
%Code listing style named "mystyle"
\lstdefinestyle{mystyle}{
backgroundcolor=\color{backcolour}, commentstyle=\color{codegreen},
keywordstyle=\color{magenta},
numberstyle=\tiny\color{codegray},
stringstyle=\color{codepurple},
basicstyle=\footnotesize,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2
}
%"mystyle" code listing set
\lstset{style=mystyle}
%Bangla Typing
%\usepackage{polyglossia}
%\setmainlanguage{english}
%\setmainfont{Times New Roman}
%\setotherlanguage[numerals=Devanagari]{bengali}
%\newfontfamily\bengalifont[Script=Bengali, Scale=0.9]{kalpurush.ttf}
%\textbengali{বাংলা} command shoud be used for bangla typing