adding univeristy latex files

This commit is contained in:
2020-10-31 22:54:46 +04:00
commit fe5006a953
23 changed files with 539 additions and 0 deletions

94
_setup/doc_setup.tex Normal file
View File

@@ -0,0 +1,94 @@
% load packages
\input{_setup/packages}
% set up macros
\input{_setup/macros}
% set line spacing
\doublespacing
% set headings format
\titleformat{\chapter}{\singlespacing\normalfont\huge\bfseries\titleColor}{\chaptertitlename\ \thechapter}{1em}{}
\titleformat{\section}{\singlespacing\normalfont\Large\bfseries\titleColor}{\thesection.}{1em}{}
\titleformat{\subsection}{\singlespacing\normalfont\large\bfseries}{\thesubsection.}{1em}{}
\titleformat{\subsubsection}{\singlespacing\normalfont\normalsize\bfseries}{\thesubsubsection.}{1em}{}
\titlespacing*{\chapter}{0pt}{10pt}{10pt}
% set paragraph indent
\setlength{\parindent}{18pt}
% set text color
\textColor
% set hyperlinks + pdf metadata
\hypersetup{
pdftitle={\docTitle},
pdfauthor={\docAuthor},
pdfkeywords={dissertation template},
colorlinks=true,%
citecolor=[HTML]{152845},%
linkcolor=[HTML]{152845},%
urlcolor=[HTML]{1976D2}
}
% styling the code listings
\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}
\lstdefinestyle{mystyle}{
backgroundcolor=\color{backcolour},
commentstyle=\color{codegreen},
keywordstyle=\color{magenta},
numberstyle=\tiny\color{codegray},
stringstyle=\color{codepurple},
basicstyle=\ttfamily\singlespacing,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2
}
\lstset{style=mystyle}
% reset names for code listing
\renewcommand{\lstlistingname}{Code}
\renewcommand{\lstlistlistingname}{List of \lstlistingname s}
% set cref for listing
\crefname{lstlisting}{\lstlistingname}{\lstlistingname s}
\Crefname{lstlisting}{\lstlistingname}{\lstlistingname s}
% set custom list of equations
\newcommand{\listequationsname}{List of Equations}
\newlistof{myequations}{equ}{\listequationsname}
\newcommand{\myequations}[1]{%
\addcontentsline{equ}{myequations}{\protect\numberline{\theequation}#1}
}
\setlength{\cftmyequationsnumwidth}{2.5em}% Width of equation number in List of Equations
% set custom list of algorithms
\newcommand{\listalgorithmssname}{List of Algorithms}
\newlistof{myalgorithms}{alg}{\listalgorithmssname}
\newcommand{\myalgorithms}[1]{%
\addcontentsline{alg}{myalgorithms}{\protect\numberline{\thealgorithm}#1}
}
\setlength{\cftmyequationsnumwidth}{2.5em}% Width of algorithm number in List of Algorithms
% set appendices refs with cleveref
\crefname{appendixchapter}{Appendix}{Appendices}
\Crefname{appendixchapter}{Appendix}{Appendices}
% set custom headers/footers
\pagestyle{fancy}
\fancyhf{}
\rhead{\secTextColor \docAuthor}
\lhead{\secTextColor \docTitle}
\cfoot{\thepage}

14
_setup/macros.tex Normal file
View File

@@ -0,0 +1,14 @@
% document details
\def\docTitle{Dissertation Template}
\def\docAuthor{Author \textsc{Student}}
\def\docSupervisor{Prof. \textsc{Supervisor}}
\def\docDate{October 2020}
% colors
\def\textColor{\color[HTML]{050505}}
\def\secTextColor{\color[HTML]{505050}}
\def\titleColor{\color[HTML]{356EC4}}
% math symbols
\newcommand{\myMatrix}{\ensuremath{M}}
\newcommand{\ratioA}{\ensuremath{\alpha}}

40
_setup/packages.tex Normal file
View File

@@ -0,0 +1,40 @@
% encoding
\usepackage[utf8]{inputenc}
% for dummy text
\usepackage{lipsum}
% setting page margins
\usepackage[a4paper, top=1in, bottom=1in, left=1in, right=1in, headheight=127mm]{geometry}
% to customise line spacing and paragraph indent
\usepackage{setspace}
% to customise headings formats
\usepackage{titlesec}
% for colors
\usepackage[table,dvipsnames]{xcolor}
% for hyperlinks
\usepackage{hyperref}
% to order references numbers in text
\usepackage[nocompress]{cite}
% to include figures
\usepackage{graphicx}
% formatting captions
\usepackage[font={color=black!90},labelfont={bf},width=.85\textwidth]{caption}
% for subfigures
\usepackage{subcaption}
% for more equations tools
\usepackage{amsmath,mathtools}
% for easier cross-references
\usepackage[capitalise,nameinlink,noabbrev]{cleveref}
% for algorithms
\usepackage{algorithm}
\usepackage{algorithmicx}
\usepackage{algpseudocode}
% for code listing
\usepackage{listings}
% for custom list of contents, e.g. equations or algorithms
\usepackage[titles]{tocloft}
% for appendices
\usepackage[titletoc]{appendix}
% for custom headers/footers
\usepackage{fancyhdr}
% vertical space between paragraphs
\usepackage{parskip}