Uwasa thesis template.tex
Författare
University of Vaasa
Last Updated
för 2 år sedan
Licens
Creative Commons CC BY 4.0
Sammanfattning
Template for Bachelor's thesis, Master's thesis, and Licentiate thesis of the University of Vaasa.
\documentclass[12pt,a4paper]{article}
\usepackage[sfdefault,lf]{carlito}
\usepackage{hyperref} % instead of \usepackage[spaces,obeyspaces,hyphens]{url}
\usepackage[natbibapa]{apacite}
\usepackage[english]{babel} % if your work is in English
%\usepackage[finnish]{babel} % jos työsi on suomeksi
\usepackage[utf8]{inputenc}
\usepackage{times}
\usepackage{setspace}
\linespread{1.5}
\usepackage[top = 2.8cm, bottom = 3.5cm, inner = 3cm, outer = 3cm, headheight = 15pt]{geometry}
\usepackage{lastpage}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage[mathscr]{eucal}
\usepackage{mathrsfs}
\usepackage{enumitem}
\usepackage{bm}
\usepackage{multirow}
\usepackage{array}
\usepackage{ragged2e}
\usepackage{etoolbox}
\usepackage{environ}
\usepackage[hang,flushmargin]{footmisc}
\usepackage{graphicx}
\usepackage{pdfpages}%%%% include pdf files
\usepackage{amsmath}
\usepackage{colortbl}
\usepackage[font=small,labelfont=bf, labelsep=period, format=hang, singlelinecheck=false, justification=raggedright, textformat=period]{caption}
\usepackage{titlesec}
\usepackage[nottoc]{tocbibind}
\usepackage[titletoc]{appendix}
\graphicspath{ {./figures/} }
\captionsetup[table]{position=above}
\captionsetup[figure]{position=below}
\bibliographystyle{apacite}
\usepackage[titles]{tocloft} % no bold or dots toc
\renewcommand{\cftsecfont}{\mdseries}
\renewcommand{\cftsecpagefont}{\mdseries}
\renewcommand{\cftdot}{}
\renewcommand{\doiprefix}{}
\newcommand{\doi}[1]{https://doi.org/#1}
\titlespacing\section{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\titlespacing\subsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\titlespacing\subsubsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Your personal info %%%%
%%%%%%% Omat tietosi %%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Pääotsikko Title
\newcommand{\thetitle}{
Title of your work
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Alaotsikko - Subtitle
\newcommand{\thesubtitle}{
Subtitle if needed
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Nimesi - Your name FirstName Familyname
\newcommand{\theauthor}{
First-Name Surname
} % Etunimi Sukunimi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% headings and pagenumbers &&&&
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{} % sets both header and footer to nothing
\fancyheadoffset{0cm}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%% thesis begins %%%%%%
%%%%%% opinnäyte alkaa %%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\setlength{\parindent}{0pt}
\setlength{\bibindent}{1.25cm}
\urlstyle{same}
\newcommand{\changefont}{%
\fontsize{11}{12}\selectfont}
% kansilehti - coverpage
\input{cover.tex}
% sivunumerointi - page numbering
\newpage\pagestyle{fancy}
\pagestyle{fancyplain} % Makes all pages in the document conform to the custom headers and footers
\fancyhead[L]{}% Empty left header
\fancyhead[C]{\changefont \thepage} % Page numbering for center header with smaller font
\fancyhead[R]{}% Empty right header
\fancyfoot[L]{}% Empty left footer
\fancyfoot[C]{}% Empty center footer
\fancyfoot[R]{}% Empty left footer
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% abstracts start here %%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% comment or remove next lines, if abstracts are not needed
\input{abstract-FI.tex}% tiivistelmä
\null\newpage % new page after abstract
\input{abstract-EN.tex}% abstract
\null\newpage %new page after abstract
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% abstracts end here %%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% sisällysluettelo - table of contents
\newpage
\tableofcontents
% kuviot - figures ... add \newpage and remove comment, if needed
%{\let\oldnumberline\numberline \renewcommand{\numberline}{\figurename~\oldnumberline} \listoffigures}
% taulukot - tables
% add \newpage and remove comment, if needed
%{\let\oldnumberline\numberline \renewcommand{\numberline}{\tablename~\oldnumberline} \listoftables }
% text settings
\setlength{\parskip}{1.8em}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ensimmäinen luku - first chapter
\newpage
\input{chapter1.tex}% Introduction, Johdanto eg jne
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% toinen luku - second chapter
\newpage
\input{chapter2.tex}
% lisää lukuja -- more chapters...
%%%%%%%%%%%%%%%%%%%%%%
% lähteet - references
% replace url with doi at bibliography
% settings
\newtoggle{bibdoi}
\newtoggle{biburl}
\makeatletter
\undef{\APACrefURL}
\undef{\endAPACrefURL}
\undef{\APACrefDOI}
\undef{\endAPACrefDOI}
\long\def\collect@url#1{\global\def\bib@url{#1}}
\long\def\collect@doi#1{\global\def\bib@doi{#1}}
\newenvironment{APACrefURL}{\global\toggletrue{biburl}\Collect@Body\collect@url}{\unskip\unskip}
\newenvironment{APACrefDOI}{\global\toggletrue{bibdoi}\Collect@Body\collect@doi}{}
\AtBeginEnvironment{thebibliography}{
\pretocmd{\PrintBackRefs}{%
\iftoggle{bibdoi}
{\iftoggle{biburl}{\unskip\unskip \bib@doi}{}}
{\iftoggle{biburl}{Retrieved from\bib@url}{}}
\togglefalse{bibdoi}\togglefalse{biburl}%
}{}{}
}
%\apptocmd{\sloppy}{\hbadness 10000\relax}{}{} %skip error message about too long urls
\newpage
\bibliography{example}
% to-do: space between urldate and url
% liitteet - appendices
\input{appendices.tex}
\end{document}