-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tex
212 lines (175 loc) · 6.58 KB
/
main.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
% these 2 commands allow greek text to be copied from the pdf correctly
\input{glyphtounicode}
\pdfgentounicode=1
\documentclass[11pt,a4paper,english,greek,twoside]{auth-thesis}
\usepackage{epsfig} % ability to import .eps
\usepackage[explicit]{titlesec}
\usepackage{afterpage}
\usepackage{mathtools} % mathtools need to be before ams*
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{array}
\usepackage{booktabs} % beautiful tables
\usepackage{color}
\usepackage{courier} % courier font for monospace
\usepackage{caption} % customize captions
\usepackage{datetime} % time in greek
\usepackage{epigraph} % for nice quote
\usepackage{epstopdf} % convert .eps to .pdf
\usepackage{graphicx}
\usepackage{indentfirst}
\usepackage{index}
\usepackage{babel} % internationalization
\usepackage{listings} % add code in the documents
\usepackage{latexsym}
\usepackage{longtable} % add tables that span across multiple pages
\usepackage{pdflscape} % add landscape pages
\usepackage{siunitx} % better handling of numbers and units
\usepackage{subcaption} % captions for subfigures
\usepackage{tabu} % better tables
\usepackage{textcomp}
\usepackage{url}
\usepackage{verbatim}
%\usepackage{makeidx} % to create indexs
\newindex{default}{idx}{ind}{Ευρετήριο όρων}
\newindex{en}{edx}{end}{Ευρετήριο αγγλικών όρων}
%\makeindex
% 1.5 spacing
\renewcommand{\baselinestretch}{1.2}
% space between paragraphs
%\setlength{\parskip}{9pt}
% break without hypher for tables
\def\+{\discretionary{}{}{}}
\newcommand\blankpage{%
\null
\thispagestyle{empty}%
\addtocounter{page}{-1}%
\newpage}
% fixing landscape orientation for two-sided document
\input{landscapefix}
% latin text (and greek text)
%\newcommand{\prg}[1]{\textlatin{\texttt{#1}}}
\newcommand{\tl}[1]{\textlatin{#1}}
\newcommand{\tg}[1]{\textgreek{#1}}
% typeset short english phrases
\newcommand{\en}[1]{\foreignlanguage{english}{#1}}
% typeset inline code
\newcommand{\src}[1]{{\texttt{\en{#1}}}}
% proper listings caption
\renewcommand{\lstlistingname}{\tg{Κώδικας}}
% typeset a backslash
%\newcommand{\bkslash}{\en{\symbol{92}}}
% typeset differential d
\newcommand{\dd}{\mathop{}\,\mathrm{d}}
% create a unit for electrons
\DeclareSIUnit\electrons{\ensuremath{\mathrm{e^-}}}
% how to write ranges of numbers
\sisetup{
range-phrase = \tg{ έως },
range-units = single,
}
\newcommand*\Hide{%
\titleformat{\chapter}[display]
{}{}{0pt}{\Huge}
\titleformat{\part}
{}{}{0pt}{}
}
\newtheorem{definition}{Ορισμός}
\newtheorem{proposition}{Πρόταση}
\newtheorem{theorem}{Θεώρημα}
\newtheorem{corollary}{Συμπέρασμα}
\newtheorem{lemma}{Λήμμα}
\newtheorem{example}{Παράδειγμα}
\newtheorem{remark}{Σημείωση}
\newtheorem{notation}{Συμβολισμός}
\newtheorem{law}{Νόμος}
\renewcommand{\thedefinition}{\arabic{chapter}.\arabic{definition}}
\renewcommand{\theproposition}{\arabic{chapter}.\arabic{proposition}}
\renewcommand{\thetheorem}{\arabic{chapter}.\arabic{theorem}}
\renewcommand{\thecorollary}{\arabic{chapter}.\arabic{corollary}}
\renewcommand{\thelemma}{\arabic{chapter}.\arabic{lemma}}
\renewcommand{\theexample}{\arabic{chapter}.\arabic{example}}
% "hack" to print the correct line numbers when skipping lines. "matchrangestart=t" must be added in the listings configuration
\makeatletter
\lst@Key{matchrangestart}{f}{\lstKV@SetIf{#1}\lst@ifmatchrangestart}
\def\lst@SkipToFirst{%
\lst@ifmatchrangestart\c@lstnumber=\numexpr-1+\lst@firstline\fi
\ifnum \lst@lineno<\lst@firstline
\def\lst@next{\lst@BeginDropInput\lst@Pmode
\lst@Let{13}\lst@MSkipToFirst
\lst@Let{10}\lst@MSkipToFirst}%
\expandafter\lst@next
\else
\expandafter\lst@BOLGobble
\fi}
\makeatother
% typeset matlab code
\definecolor{mygreen}{RGB}{28,172,0}
\definecolor{lightgray}{rgb}{0.97,0.97,0.97}
\definecolor{mylilas}{RGB}{170,55,241}
\lstset{
language=matlab,
backgroundcolor=\color{lightgray},
basicstyle=\normalsize\ttfamily\selectlanguage{english},
%% breaklines=false, % turning it to true breaks the compiling
captionpos=b, % sets the caption-position to bottom
commentstyle=\color{mygreen},%
emph=[1]{for,end,break},
emphstyle=[1]\color{red}, %some words to emphasise
%emph=[2]{word1,word2}, emphstyle=[2]{style},
%% escapeinside={\%*}{*)}, % if you want to add LaTeX within your code
frame=single, % adds a frame around the code
float,
identifierstyle=\color{black}, %
keywordstyle=\color{blue},%
morekeywords=[2]{1},
keywordstyle=[2]{\color{black}},
morekeywords={matlab2tikz},
numbers=left, % where to put the line-numbers; possible values are (none, left, right)
numbersep=9pt, % this defines how far the numbers are from the text
numberstyle={\tiny \color{black}},% the style that is used for the line-numbers
showstringspaces=false,%without this there will be a symbol in the places where there is a space
stringstyle=\color{mylilas},
tabsize=4,
matchrangestart=t,
}
% format quote
\epigraphsize{\small\itshape}
\setlength\epigraphwidth{8cm}
\setlength\epigraphrule{0pt}
\selectlanguage{greek}
\hyphenation{τμή-μα Επο-μέ-νως}
%\title{Προσομοιωτική Μελέτη \en{Electron Beam Scanner} για Επιταχυντές Μικρής Δέσμης}
\title{Προσομοιωτική Μελέτη Σαρωτή Δεσμών Ηλεκτρονίων για Γραμμικούς Επιταχυντές}
%SIMULATION OF AN ELECTRON-BEAM SCANNER FOR PROFILE MONITORING IN SHORT BUNCH MACHINES
\author{Ορφέας Αντωνίου}
\supervisor{Νικόλαος Κανταρτζής}
\begin{document}
\selectlanguage{greek}
\maketitle
\frontmatter
\include{chapters/acknowledgements}
\tableofcontents
\mainmatter
\include{chapters/chapter01}
\include{chapters/chapter02}
\include{chapters/chapter03}
\include{chapters/chapter04}
\include{chapters/chapter05}
% Add all entries from the bibliography database, whether they are referenced in the document or not
\nocite{*}
\bibliographystyle{hellas}
%\bibliographystyle{alpha}
%\bibliographystyle{abbrv}
% References imported from `references.bib'.
%IMPORTANT: Manually modify `main.bbl' by adding \selectlanguage{english} (2nd line) \selectlanguage{english} (last line) in order to correctly display Latin and Greek characters in the final text.
\bibliography{references}
\appendix
\include{chapters/appendix_glossary}
\include{chapters/appendix_CSTmodel}
\listoffigures
\listoftables
\include{chapters/abstract}
\backmatter
%\printindex
\end{document}