Quickstart Thesis
Author
Jan Küster
Last Updated
8年前
License
Other (as stated in the work)
Abstract
A quick start template with all necessary features for a thesis: double pages, fancy headers, appendix, bib, toc, title.
Licence: MIT
A quick start template with all necessary features for a thesis: double pages, fancy headers, appendix, bib, toc, title.
Licence: MIT
% !TEX TS-program = pdflatex
% !TEX encoding = UTF-8 Unicode
%---------------------------------------------------------------------------------------------------------%
% The MIT License (MIT)
%
% Copyright (c) 2014 Jan Küster, info@jankuester.com
%
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the "Software"), to deal
% in the Software without restriction, including without limitation the rights
% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
% copies of the Software, and to permit persons to whom the Software is
% furnished to do so, subject to the following conditions:
%
% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
% THE SOFTWARE.
%
%
%--------------------------------------------------------------------------------------------------------%
%============================================================================%
%
%
% DOCUMENMT DEFINITION
%
%
%============================================================================%
%we use report class for thesis design
\documentclass[11pt,titlepage,twoside,openright]{report}
%----------------------------------------------------------------------------------------
% ENCODING
%----------------------------------------------------------------------------------------
\usepackage[utf8]{inputenc}
%----------------------------------------------------------------------------------------
% COLOR DEFINITIONS
%----------------------------------------------------------------------------------------
\usepackage{color}
%citation reference color
\definecolor{citationscol}{rgb}{0.1,0.1,0.5}
%urls color
\definecolor{urlscol}{RGB}{220,120,0}
%internal references color
\definecolor{linkscol}{rgb}{0.2,0.2,0.3}
%----------------------------------------------------------------------------------------
% REFERENCES URL CITATION STYLES AND SO ON
%----------------------------------------------------------------------------------------
%apply reference color definitions to hyperref package
\usepackage[colorlinks=true,citecolor=citationscol,urlcolor=urlscol,linkcolor=linkscol]{hyperref}
\usepackage{url}
\urlstyle{same}
%----------------------------------------------------------------------------------------
% FONT DEFINITIONS
%----------------------------------------------------------------------------------------
% Better typography
\usepackage[protrusion=true,expansion=true]{microtype}
% Use the Palatino font
\usepackage{mathpazo}
% Required for accented characters
\usepackage[T1]{fontenc}
% Change line spacing here, Palatino benefits from a slight increase by default
\linespread{1.05}
% more font size definitions
\usepackage{moresize}
%----------------------------------------------------------------------------------------
% GEOMETRY DEFINITIONS
%----------------------------------------------------------------------------------------
%define page styles using geometry
\usepackage[inner=4cm,outer=2cm,bottom=3.5cm]{geometry}
%define A4 Paper
\geometry{a4paper}
\setlength{\oddsidemargin}{15.5pt}
\setlength{\evensidemargin}{15.5pt}
\setlength{\parindent}{4mm}
\setlength{\parskip}{1mm }
%----------------------------------------------------------------------------------------
% GRAPHICS DEFINITIONS
%----------------------------------------------------------------------------------------
% Required for including pictures
\usepackage{graphicx}
% make it possible to include more than one captioned figure/table in a single float
\usepackage{subfig}
% for much better looking tables
\usepackage{booktabs}
% for better arrays (eg matrices) in maths
\usepackage{array}
%----------------------------------------------------------------------------------------
% ENVIRONMENT DEFINITIONS
%----------------------------------------------------------------------------------------
% very flexible & customisable lists
%(eg. enumerate/itemize, etc.)
\usepackage{paralist}
% adds environment for commenting
% out blocks of text & for better verbatim
\usepackage{verbatim}
%----------------------------------------------------------------------------------------
% CUSTOM STRUT FOR EMPTY BOXES
%----------------------------------------- -----------------------------------------------
\newcommand{\mystrut}{\rule[-.3\baselineskip]{0pt}{\baselineskip}}
%----------------------------------------------------------------------------------------
% HEADER / FOOTER DEFINITIONS
%----------------------------------------------------------------------------------------
% This should be set AFTER setting up the page geometry
\usepackage{fancyhdr}
\renewcommand{\chaptermark}[1]
{
\markboth{#1}{}
}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\lhead{\sffamily\textcolor{urlscol}{Chapter \thechapter: \leftmark}}
\rhead{\sffamily\textcolor{urlscol}{\rightmark}}
\fancyhf[FLE,FRO]{\sffamily\large\thepage}
\cfoot{}
%override plain page style
\fancypagestyle{plain}{ %
\fancyhf{} % remove everything
\renewcommand{\headrulewidth}{0pt} % remove lines as well
\renewcommand{\footrulewidth}{0pt}
\cfoot{\sffamily\large\thepage}
}
%----------------------------------------------------------------------------------------
% SECTION TITLE APPEARANCE
%----------------------------------------------------------------------------------------
\usepackage{sectsty}
% (See the fntguide.pdf for font help)
\allsectionsfont{\sffamily\mdseries\upshape}
\usepackage[explicit]{titlesec}
\titleformat{\section}{\LARGE\bf\sffamily}
{\textcolor{urlscol}{\thesection \hspace{12pt} #1}}{0pt}{}
\titleformat{\chapter}{\HUGE\bf\sffamily}
{
\hspace{-0.25\linewidth}\colorbox{urlscol}
{
\makebox[1\linewidth][c]
{
\textcolor{white}{\HUGE \thechapter \hspace{18pt}#1}
}
}
}
{0pt}{}
\titleformat{\subsection}{\large\bf\sffamily}{\textcolor{urlscol}{#1}}{0pt}{}
%----------------------------------------------------------------------------------------
% TABLE OF CONTENT APPEARANCE
%----------------------------------------------------------------------------------------
%\usepackage[nottoc,notlof,notlot]{tocbibind} % Put the bibliography in the ToC
\usepackage[titles,subfigure]{tocloft} % Alter the style of the Table of Contents
\renewcommand{\cftsecfont}{\rmfamily\mdseries\upshape}
\renewcommand{\cftsecpagefont}{\rmfamily\mdseries\upshape} % No bold!
\renewcommand{\abstractname}{Executive Summary} %switches abstract to executive summary
%============================================================================%
%
% TITLE AND AUTHOR
%
%============================================================================%
\title{\HUGE\textbf{The Master Thesis Title}}
\vspace{50pt} % Some vertical space between the title and author name
\author{ \vspace{20pt}The Author\\
Dept of LaTex\\
Tex University\\
Textown, Texland\\
mail@texuni.com}
\vspace{40pt} % Some vertical space between the title and author name
\date{\today}
%============================================================================%
%
% INDEX AND GLOSSARY
%
%============================================================================%
\usepackage[style=long,nonumberlist,toc,xindy,acronym,nomain]{glossaries} % nomain, if you define glossaries in a file, and you use \include{INP-00-glossary}
%\loadglsentries[main]{glossary}
% or using \input:
\include{glossary}
\makeglossaries
\usepackage[xindy]{imakeidx}
\makeindex
%============================================================================%
%
% BEGIN DOCUMENT
%
%============================================================================%
\begin{document}
% before the chapters start, we
% use roman numbering on the pages
\setcounter{page}{1}
\pagenumbering{roman}
% Print the title section
\maketitle
\vspace{30pt} % Some vertical space between the abstract and first section
\cleardoublepage
%table of contents
\tableofcontents
\cleardoublepage
% EXECUTIVE SUMMARY
\pagestyle{empty}
\begin{abstract}
Morbi tempor congue porta. Proin semper, leo vitae faucibus dictum, metus mauris lacinia lorem, ac congue leo felis eu turpis. Sed nec nunc pellentesque, gravida eros at, porttitor ipsum. Praesent consequat urna a lacus lobortis ultrices eget ac metus. In tempus hendrerit rhoncus. Mauris dignissim turpis id sollicitudin lacinia. Praesent libero tellus, fringilla nec ullamcorper at, ultrices id nulla. Phasellus placerat a tellus a malesuada.
\end{abstract}
\cleardoublepage
% Back to arabic numbering
\setcounter{page}{1}
\pagenumbering{arabic}
\pagestyle{fancy}
%============================================================================%
%
% CHAPTER 1
%
%============================================================================%
\chapter[Introduction]{Introduction}
Morbi tempor congue porta. Proin semper, leo vitae faucibus dictum, metus mauris lacinia lorem, ac congue leo felis eu turpis. Sed nec nunc pellentesque, gravida eros at, porttitor ipsum. Praesent consequat urna a lacus lobortis ultrices eget ac metus. In tempus hendrerit rhoncus. Mauris dignissim turpis id sollicitudin lacinia. Praesent libero tellus, fringilla nec ullamcorper at, ultrices id nulla. Phasellus placerat a tellus a malesuada.
\newpage
\section[1st Section Name]{First Section}
Morbi tempor congue porta. Proin semper, leo vitae faucibus dictum, metus mauris lacinia lorem, ac congue leo felis eu turpis. Sed nec nunc pellentesque, gravida eros at, porttitor ipsum. Praesent consequat urna a lacus lobortis ultrices eget ac metus. In tempus hendrerit rhoncus. Mauris dignissim turpis id sollicitudin lacinia. Praesent libero tellus, fringilla nec ullamcorper at, ultrices id nulla. Phasellus placerat a tellus a malesuada.
\begin{itemize}
\item Morbi tempor congue porta. Proin semper, leo vitae faucibus dictum, metus mauris lacinia lorem, ac congue leo felis eu turpis.
\item Morbi tempor congue porta. Proin semper, leo vitae faucibus dictum, metus mauris lacinia lorem, ac congue leo felis eu turpis.
\item Morbi tempor congue porta. Proin semper, leo vitae faucibus dictum, metus mauris lacinia lorem, ac congue leo felis eu turpis.
\item Morbi tempor congue porta. Proin semper, leo vitae faucibus dictum, metus mauris lacinia lorem, ac congue leo felis eu turpis.
\end{itemize}
\subsection[1st Subsection Name]{A subsection}
Morbi tempor congue porta. Proin semper, leo vitae faucibus dictum, metus mauris lacinia lorem, ac congue leo felis eu turpis. Sed nec nunc pellentesque, gravida eros at, porttitor ipsum. Praesent consequat urna a lacus lobortis ultrices eget ac metus. In tempus hendrerit rhoncus. Mauris dignissim turpis id sollicitudin lacinia. Praesent libero tellus, fringilla nec ullamcorper at, ultrices id nulla. Phasellus placerat a tellus a malesuada.
More text. More text. More text. \index{more here} More text. More text. More text. More text. More text. More text.
\cleardoublepage
\section[2nd Section Name]{Second Section}
Morbi tempor congue porta. Proin semper, leo vitae faucibus dictum, metus mauris lacinia lorem, ac congue leo felis eu turpis. Sed nec nunc pellentesque, gravida eros at, porttitor ipsum. Praesent consequat urna a lacus lobortis ultrices eget ac metus. In tempus hendrerit rhoncus. Mauris dignissim turpis id sollicitudin lacinia. Praesent libero tellus, fringilla nec ullamcorper at, ultrices id nulla. Phasellus placerat a tellus a malesuada.
\begin{itemize}
\item Morbi tempor congue porta. Proin semper, leo vitae faucibus dictum, metus mauris lacinia lorem, ac congue leo felis eu turpis.
\item Morbi tempor congue porta. Proin semper, leo vitae faucibus dictum, metus mauris lacinia lorem, ac congue leo felis eu turpis.
\item Morbi tempor congue porta. Proin semper, leo vitae faucibus dictum, metus mauris lacinia lorem, ac congue leo felis eu turpis.
\item Morbi tempor congue porta. Proin semper, leo vitae faucibus dictum, metus mauris lacinia lorem, ac congue leo felis eu turpis.
\end{itemize}
\subsection[1st Subsection Name]{A subsection}
Morbi tempor congue porta. Proin semper, leo vitae faucibus dictum, metus mauris lacinia lorem, ac congue leo felis eu turpis. Sed nec nunc pellentesque, gravida eros at, porttitor ipsum. Praesent consequat urna a lacus lobortis ultrices eget ac metus. In tempus hendrerit rhoncus. Mauris dignissim turpis id sollicitudin lacinia. Praesent libero tellus, fringilla nec ullamcorper at, ultrices id nulla. Phasellus placerat a tellus a malesuada.
More text. More text. More text. \index{more here} More text. More text. More text. More text. More text. More text.
%============================================================================%
%
% APPENDIX
%
%============================================================================%
\cleardoublepage
\pagestyle{plain}
\phantomsection %hyperref package support
\addcontentsline{toc}{chapter}{Appendix}
{\textbf{\LARGE{Appendix}}}\\ %headline
Some Appendix Text. \index{Appendix} Some Appendix Text. Some Appendix Text.
%============================================================================%
%
% BIBLIOGRAPHY
%
%============================================================================%
%useful: https://en.wikibooks.org/wiki/LaTeX/Bibliography_Management
%------------ linking bib to table of content ------------------%
\cleardoublepage
\phantomsection %hyperref package support
\addcontentsline{toc}{chapter}{Bibliography}
%------------ the bibliography ------------------%
{\textbf{\LARGE{Bibliography}}}\\ %headline
\nocite{*} % Show all Bib-entries (DEBUG)
%\bibliographystyle{plainnat}
\bibliographystyle{plain}
\bibliography{literature.bib}
%============================================================================%
%
% INDEX AND GLOSSARY
%
%============================================================================%
\cleardoublepage
\phantomsection %hyperref package support
\addcontentsline{toc}{chapter}{Index}
{\textbf{\LARGE{Index}}}\\ %headline
\printindex
%\printglossary[title=List of Terms,toctitle=Terms and abbreviations]
\printglossaries
\end{document}