Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Charles' Fairly Vanilla LaTeX Thesis Template Using Memoir
\documentclass[a4paper,12pt,oldfontcommands]{memoir}
\PassOptionsToPackage{hyphens}{url}
\usepackage{url}
\usepackage{hyperref}
\usepackage{doi}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{epstopdf}
\usepackage{wrapfig}
\usepackage{natbib}
%% Using glossaries package for acronyms
\usepackage[acronym,nomain,toc=true]{glossaries}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
\newtheorem{hypothesis}{Hypothesis}[chapter]
% Subcaption package - made sure the fonts work.
\usepackage[labelfont=sf,font+=small]{caption}
\usepackage[labelfont=sf]{subcaption}
%\usepackage{showframe} % Good for checking table borders
%%
%% Memoir Styling
%%
%\OnehalfSpacing*
\OnehalfSpacing % Might be needed for examination copy
% Chapter style preset.
\chapterstyle{ell}
%% Section Headings
\nouppercaseheads
\pagestyle{ruled}
% Part styles
\renewcommand{\partnamefont}{\huge\sffamily}
\renewcommand{\partnumfont}{\huge\sffamily}
\renewcommand{\parttitlefont}{\huge\sffamily}
% Section headings
\setsecheadstyle{\large\sf\raggedright}
\setsubsecheadstyle{\normalsize\sf\raggedright}
\setsubsubsecheadstyle{\normalsize\itshape\raggedright}
% Normal headings
\makeevenhead{ruled}{\sf\leftmark}{}{}
\makeoddhead{ruled}{}{}{\sf\rightmark}
\makeevenfoot{ruled}{\sf\thepage}{}{}
\makeoddfoot{ruled}{}{}{\sf\thepage}
% Chapter footer
\makeevenfoot{plain}{}{\sf\thepage}{}
\makeoddfoot{plain}{}{\sf\thepage}{}
% hopefully title page footers
\makeevenfoot{empty}{}{}{}
\makeoddfoot{empty}{}{}{}
% Title page instructions
\pretitle{\thispagestyle{empty}\begin{flushright}\LARGE\sffamily}
\posttitle{\par\end{flushright}}
\preauthor{\begin{flushright}\Large\sffamily}
\postauthor{\par\end{flushright}\vskip 0.5em}
\predate{\begin{flushright}\large\sffamily}
\postdate{\par\end{flushright}\thispagestyle{empty}}
% Bibliography name
\renewcommand\bibname{Reference List}
% Section Settings
\setsecnumdepth{subsection}
\settocdepth{subsection}
% Table of contents styles
\renewcommand{\cftchapterpagefont}{\sffamily}
\renewcommand{\cftsectionpagefont}{\sffamily}
\renewcommand{\cftsubsectionpagefont}{\sffamily}
\renewcommand*{\cftchapterfont}{\bf\sffamily}
\renewcommand\cftbookpresnum{\sffamily}
\renewcommand\cftbookaftersnum{\sffamily}
\renewcommand\cftbookaftersnumb{\sffamily}
\renewcommand\cftpartpresnum{\sffamily}
\renewcommand\cftpartaftersnum{\sffamily}
\renewcommand\cftpartaftersnumb{\sffamily}
\renewcommand\cftchapterpresnum{\sffamily}
\renewcommand\cftchapteraftersnum{\sffamily}
\renewcommand\cftchapteraftersnumb{\sffamily}
\renewcommand\cftsectionpresnum{\sffamily}
\renewcommand\cftsectionaftersnum{\sffamily}
\renewcommand\cftsectionaftersnumb{\sffamily}
\renewcommand\cftsubsectionpresnum{\sffamily}
\renewcommand\cftsubsectionaftersnum{\sffamily}
\renewcommand\cftsubsectionaftersnumb{\sffamily}
%% Extra URL style from ---- somewhere?
% llt: Define a global style for URLs, rather that the default one
\makeatletter \def\url@leostyle{%
\@ifundefined{selectfont}{\def\UrlFont{\sf}}{\def\UrlFont{\small\bf\ttfamily}}}
\makeatother \urlstyle{leo}
%%
%% Acronym entries using glossaries
%%
% Acronym entries:
\newacronym{ML}{ML}{Machine Learning}
\newacronym{DSP}{DSP}{Digital Signal Processing}
%% TODO: add more.
\makeglossaries
%%
%% A few custom commands
%%
% For referencing distant things: e.g., see
% Figure~\refpageref{fig:distant-figure} produces "e.g., see Figure
% 1.1 (p. 11)
\newcommand{\refpageref}[1]{\ref{#1} (p.~\pageref{#1})}
% For citing: Author et al.'s (2009) work on hustle and bustle...
\newcommand{\citepos}[1]{\citeauthor{#1}'s \citeyearpar{#1}}
% Fake Glossary command (needed for using pandoc)
%\newcommand{\gls}[1]{#1}
%% Just using built-in memoir title page capability.
\title{Thesis Title}
\author{Joe Bloggs}
%\date{}
\begin{document}
\frontmatter
\maketitle
\pagebreak
\tableofcontents
\vfill
\pagebreak
\printglossary[type=\acronymtype,title=Abbreviations]
\vfill
%\pagebreak
%\listoffigures
%\pagebreak
%\listoftables
\chapter{Abstract}\label{abstract}
Abstract goes here
\subsubsection{Keywords:}
keywords, go, here.
\mainmatter
\chapter{Introduction}
Write the thesis.
\chapter{Stuff}
A bunch of stuff.
\chapter{Conclusion}
All worked out!
% Uncomment to add bibliography
%\bibliographystyle{apa-good-cpm-doi}
%\bibliography{bibfilename}
\appendix
\appendixpage
\chapter{Appendix}
Some extra stuff.
\end{document}
@cpmpercussion

This comment has been minimized.

Copy link
Owner Author

@cpmpercussion cpmpercussion commented Jan 21, 2016

My PhD thesis template; mainly using memoir functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment