Created
January 6, 2014 04:45
-
-
Save jesserobertson/8278382 to your computer and use it in GitHub Desktop.
My thesis in LaTeX - needs pdflatex, minion pro and biber packages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%!TEX TS-program = pdflatex | |
%!TEX encoding = UTF-8 Unicode | |
% Preamble (fold) | |
\documentclass[12pt, openright]{book} | |
% \includeonly{chapters/frontmatter, chapters/introduction} | |
% Load packages | |
\usepackage[ibycus, english]{babel} | |
% \usepackage{amsmath, amssymb} | |
\usepackage[mathlf, textlf, loosequotes]{MinionPro} | |
\usepackage[top=2.3cm, left=4cm, right=2.3cm, bottom=2.3cm, a4paper]{geometry} | |
\usepackage[medium, compact]{titlesec} | |
\usepackage[authordate, hyperref, labelyear, natbib, uniquelist=minyear, uniquename=false, backend=biber]{biblatex-chicago} | |
\usepackage[svgnames]{xcolor} | |
\usepackage[colorlinks, pdfborder={0 0 0}]{hyperref} | |
\usepackage[font={small}, labelfont={color=DarkRed,bf}, labelsep=endash]{caption} | |
\usepackage{appendix, booktabs, csquotes, fancyhdr, footmisc, graphicx, lettrine, longtable, parskip, rotating, setspace, sidecap, tabularx, titletoc, microtype, wasysym} | |
% Settings | |
\hypersetup{pdfauthor={Jesse Robertson}, | |
pdftitle={Rheological controls on the dynamics of lava flow emplacement}, | |
pdfsubject={volcanology, rheology}, | |
colorlinks=false, | |
bookmarksnumbered=true} % Set hyperref options | |
\addbibresource{thesis.bib} % Set bibliography file | |
\urlstyle{same} | |
\setlength{\defaultaddspace}{10pt} | |
\renewcommand*{\footnotelayout}{\small} | |
% Some new macros | |
\newcommand{\degree}{\ensuremath{^{\circ}}} | |
\newcommand{\degreesC}{\ensuremath{^{\circ}\mbox{C}}} | |
\newcommand{\dd}{\ensuremath{\,\mathrm{d}}} | |
\newlength{\figurewidth} | |
\setlength{\figurewidth}{\textwidth} | |
% Page setup | |
\pagestyle{fancy} | |
\renewcommand{\headrulewidth}{\iffloatpage{0pt}{0.0pt}} | |
\setlength{\headheight}{15pt} | |
\renewcommand{\footrulewidth}{0pt} | |
\renewcommand{\chaptermark}[1]{\markboth{\lowercase{\textssc{#1}}}{}} | |
\renewcommand{\sectionmark}[1]{\markright{\lowercase{\textssc{#1}}}} | |
\fancyhead[LE,RO]{\thepage} | |
\fancyhead[LO]{\rightmark} | |
\fancyhead[RE]{\leftmark} | |
\lfoot{} | |
\cfoot{} | |
\rfoot{} | |
% Titling | |
\titleformat{\part}[display]{\color{DarkRed}\Huge\bf\centering}{}{1em}{} | |
\titleformat{\chapter}[display]{\color{DarkRed}\Large\bf}{\chaptertitlename\ \thechapter}{1em}{} | |
\titleformat{\section}{\color{DarkRed}\large\bf}{\thesection}{1em}{} | |
\titlespacing{\section}{0pt}{*2.0}{*0.2} | |
\titleformat{\subsection}{\color{darkgray}\normalsize\bf}{\thesubsection}{1em}{} | |
\titlespacing{\subsection}{0pt}{*1}{*0.2} | |
\titleformat{\subsubsection}{\color{darkgray}\normalsize\bf}{\thesubsubsection}{1em}{} | |
\titlespacing{\subsubsection}{0pt}{*0.2}{*0.2} | |
% Define new commands for tabularx so that extendable centered, left-aligned and right-aligned can be used as well as columns of the type p{...}. These new definitions are based on solumns oc the type X combined with a format command, which saved typing it every time. | |
% The new definitions are: | |
% X -> p{...} | |
% L -> left-aligned | |
% Y -> centered | |
% R -> right-aligned | |
\newcolumntype{L}{>{\raggedright\arraybackslash}X} | |
\newcolumntype{C}{>{\centering\arraybackslash}X} | |
\newcolumntype{R}{>{\raggedleft\arraybackslash}X} | |
% Note that the commands above refer to the ragged side of the text, hence why left-aligned is ragged right and vice versa. | |
% \ChapterOutsidePart and \ChapterInsidePart: control the bookmark level of each | |
% sectioning command by renumbering | |
\makeatletter | |
\newcommand{\chapteroutsidepart}{ | |
\def\toclevel@chapter{-1} | |
\def\toclevel@section{0} | |
\def\toclevel@subsection{1}} | |
\newcommand{\chapterinsidepart}{ | |
\def\toclevel@chapter{0} | |
\def\toclevel@section{1} | |
\def\toclevel@subsection{2}} | |
\makeatother | |
% Define new comamnd for list of illustrations | |
\makeatletter | |
\providecommand\phantomsection{}% for hyperref | |
\newcommand\listofillustrations{% | |
\chapter*{List of Illustrations}% | |
\phantomsection | |
\addcontentsline{toc}{chapter}{List of Illustrations}% | |
\section*{Figures}% | |
\phantomsection | |
\addcontentsline{toc}{section}{\protect\numberline{}Figures}% | |
\@starttoc{lof}% | |
\bigskip | |
\section*{Tables}% | |
\phantomsection | |
\addcontentsline{toc}{section}{\protect\numberline{}Tables}% | |
\@starttoc{lot}} | |
\makeatother | |
% preamble (end) | |
\begin{document} | |
% \frenchspacing | |
\frontmatter | |
\include{chapters/frontmatter} | |
\singlespacing | |
\phantomsection \label{contents} | |
\addcontentsline{toc}{chapter}{Contents} | |
\tableofcontents | |
\listofillustrations | |
\onehalfspacing | |
\newpage\newpage | |
\include{chapters/prologue} | |
\mainmatter | |
\pagestyle{fancy} | |
\chapteroutsidepart | |
\include{chapters/introduction} | |
\chapterinsidepart | |
\part*{Isothermal flows} | |
\include{chapters/numerics} | |
\include{chapters/isothermal_results} | |
\include{chapters/isothermal_applications} | |
\part*{Cooling and solidifying flows} | |
\include{chapters/experiments} | |
\include{chapters/solidifying_results} | |
\include{chapters/solidifying_applications} | |
\chapteroutsidepart | |
\include{chapters/conclusions} | |
\backmatter | |
\fancyhead[RE]{\lowercase{\textssc{Notation}}} | |
\fancyhead[LO]{\lowercase{\textssc{Notation}}} | |
\include{appendices/symbols_list} | |
\newpage | |
\fancyhead[RE]{\lowercase{\textssc{References}}} | |
\fancyhead[LO]{\lowercase{\textssc{References}}} | |
\phantomsection \label{references} | |
\addcontentsline{toc}{chapter}{References} | |
\printbibliography[title=References] | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment