Custom LaTeX PhD package

Below is the custom style package I have created for my thesis, using bits and pieces that I have found elsewhere (thank you!). I’d be glad to amend/improve this set, so do not hesitate to send me snippets that you feel should be included. Please bear in mind, however, that the intended audience is academics working in the Humanities!

Among the options that I like to use: different size for quotes/quotations and verse environment, a better use of marginal notes, dropped capitals, epigraphs, custom headings, and so on.

How do you use this?

To use this file, you must put it in a directory which your LaTeX compiler can find. I called my file yanthese.sty (note that this is a style file, because it ends with .sty).

Afterwards, you simply call that package in the preamble in your .tex file: \usepackage{yanthese}. This will include everything below.

If you want to know how to use the packages listed below, I suggest you simply look on the web for their documentation. For instance, for the PDF hyperlinks option, search for “hyperref package latex” in Google, or search directly on CTAN, an official repository of LaTeX packages. This will help you add options, which are defined before the name of the package (the syntax is usually something like: \usepackage[here are the options]{name_of_package}).

I’ve also added some useful LaTeX-related links on Diigo.

yanthese.sty

\ProvidesPackage{yanthese}

% % %
% SPACING & NUMBERING
% = = = = = = = = = = = = = = = = = =
\usepackage{setspace} % use \begin{spacing}{1.5}, or \onehalfspacing, etc
\usepackage{enumerate} % this allows you to select the enumeration style (arabic, roman numerals, letters, etc.)

% % %
% COLOR / PICS
% = = = = = = = = = = = = = = = = = =
\usepackage{graphicx}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
\usepackage{color} % to add font color

% % %
% LANGUAGES/CHARSET
% = = = = = = = = = = = = = = = = = =
\usepackage[german,italian,greek,english,french]{babel}
% If you use several languages, list them above. See the babel package.
% The last language is the dominant language: it will determine which
% typographic rules LaTeX will follow (hyphenation, spacing, etc.)
\usepackage{tipa} % to use the international phonetic alphabet
\usepackage[applemac]{inputenc} %using applemac for a Mac setup

% % %
% EPIGRAPH
% = = = = = = = = = = = = = = = = = =
\usepackage{epigraph} % epigraph
%customize: \setlength{\epigraphwidth}{7cm}\setlength{\epigraphrule}{0pt}
%use: \epigraph{text}{reference}

% % %
%DROPPED CAPITALS
% = = = = = = = = = = = = = = = = = =
% font families: ppl (Palatino), ptm (Times), pbk (Bookman),
% pnc (NewCentury), pag (Avantgarde [sans])
\usepackage{lettrine}% use: \lettrine{A}{fter years} of looking...
\renewcommand{\LettrineFontHook}{\fontfamily{ptm}\mdseries\upshape}
\setcounter{DefaultLines}{2}

% % %
% CHANGE MARGINAL PARAGRAPH STYLE
% = = = = = = = = = = = = = = = = = =
\setlength{\marginparwidth}{3cm}
\let\oldmarginpar\marginpar
\renewcommand\marginpar[1]{\-\oldmarginpar[\sffamily\raggedleft\footnotesize #1]%
{\sffamily\raggedright\footnotesize #1}}

% % %
% SIZE OF QUOTES / QUOTATIONS / VERSE
% To customize, change \small to size needed
% = = = = = = = = = = = = = = = = = =
\let\oldquote\quote
\renewcommand\quote{\par\singlespacing\small\oldquote}
\let\oldquotation\quotation
\renewcommand\quotation{\par\singlespacing\small\oldquotation}
\let\oldverse\verse
\renewcommand\verse{\par\singlespacing\small\oldverse}

% % %
% CUSTOM HEADINGS
% = = = = = = = = = = = = = = = = = =
\usepackage{sectsty}

\partnumberfont{\fontfamily{ppl}\mdseries\scshape\Large}
\parttitlefont{\fontfamily{ppl}\mdseries\scshape\LARGE}
\chapternumberfont{\sffamily\mdseries\upshape\Large}
\chaptertitlefont{\sffamily\mdseries\upshape\LARGE}
%\sectionfont{\normalsize}
%\subsectionfont{\small}
% % For subsubsection : small caps
\subsubsectionfont{\fontfamily{ppl}\mdseries\scshape\normalsize}
%\renewcommand \thesubsubsection{} % no number

% % HEADER
% % L/C/R = left / center / right
% % E/O = even / odd
\usepackage{fancyhdr}
\fancyhf{} % clear header + footer before defining new parameters
\pagestyle{fancy}
%\renewcommand{\headrulewidth}{0pt} % remove line

\renewcommand{\chaptermark}[1]{\markboth{\emph{ #1}}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\emph{ #1}}{}}

\fancyhf{}
\fancyhead[LE,RO]{\small\upshape\thepage}

\fancyhead[LO]{\small\upshape\rightmark}
\fancyhead[RE]{\small\upshape\leftmark}
\fancypagestyle{plain}{% this is for beginning of chapter: empty
\fancyhead{} % get rid of headers
\renewcommand{\headrulewidth}{0.5pt} % and the line
}

\fancyhead[LE,RO]{\fontfamily{ppl}\upshape\thepage} % page number

% % Clear Header Style on the Last Empty Odd pages
\makeatletter
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else%
\hbox{}%
\thispagestyle{empty}% % Empty header styles
\newpage%
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother

% % HEADER STYLE 2 - uncomment this if you prefer it, and comment the style above

%\usepackage{fancyhdr}
%\pagestyle{fancy}

%
%\renewcommand{\chaptermark}[1]%
%{\markboth{\MakeUppercase{\thechapter.\ #1}}{}}
%\renewcommand{\sectionmark}[1]%
%{\markright{\MakeUppercase{\thesection.\ #1}}}
%\renewcommand{\headrulewidth}{0.5pt}
%\renewcommand{\footrulewidth}{0pt}
%\newcommand{\helv}{%
%\fontfamily{phv}\fontseries{b}\fontsize{9}{11}\selectfont}
%\fancyhf{}
%\fancyhead[LE,RO]{\helv \thepage}
%\fancyhead[LO]{\helv \rightmark}
%\fancyhead[RE]{\helv \leftmark}

% TOC - change of font (using sans serif, small caps, etc.)
\usepackage[titles]{tocloft} % Alter the style of the Table of Contents
\renewcommand{\cftpartindent}{1.8em}
%\renewcommand{\cftpartpresnum}{Part }
\renewcommand{\cftpartaftersnum}{:}
\renewcommand{\cftpartfont}{\fontfamily{ppl}\mdseries\scshape\bfseries}
\renewcommand{\cftpartpagefont}{\sffamily\mdseries\scshape\normalsize}
\renewcommand{\cftchapfont}{\sffamily\bfseries\upshape}
\renewcommand{\cftchappagefont}{\rmfamily\mdseries\upshape}
\renewcommand{\cftsecfont}{\sffamily\mdseries\upshape}
\renewcommand{\cftsecpagefont}{\rmfamily\mdseries\upshape}
\renewcommand{\cftsubsecfont}{\sffamily\mdseries\upshape}
\renewcommand{\cftsubsecpagefont}{\rmfamily\mdseries\upshape}
\renewcommand{\cftsubsubsecfont}{\sffamily\mdseries\upshape}
\renewcommand{\cftsubsubsecpagefont}{\rmfamily\mdseries\upshape}

% % %
% How many levels of section head would you like numbered?
% 0= no section numbers, 1= section, 2= subsection, 3= subsubsection
\setcounter{secnumdepth}{3}

% Table of Contents:
% = = = = = = = = = = = = = = = = = =
% How many levels of section head would you like to appear in the
% Table of Contents?
% 0= chapter titles, 1= section titles, 2= subsection titles,
% 3= subsubsection titles.
\setcounter{tocdepth}{3}

% % %
% BIBLIOGRAPHY PACKAGE
% = = = = = = = = = = = = = = = = = =
\usepackage[citefull=chapter,
% switches on citefull=first automatically and resets each chapter.
opcit=chapter,%
]{jurabib} % I used jurabib for my phD. Nowadays, I use natbib which requires a slightly different setup.

% % %
% PDF HYPERLINKS - load after jurabib
% = = = = = = = = = = = = = = = = = =
\usepackage[pdftex,bookmarks,colorlinks,breaklinks,pagebackref,
pdftitle={TITLE},pdfauthor={AUTHOR}]{hyperref}
\hypersetup{linkcolor=black,citecolor=blue,filecolor=blue,urlcolor=blue} % change the colors if you want

% % %
%FONT KERNING/MARGIN - put last in preamble
% = = = = = = = = = = = = = = = = = =
\usepackage[final,expansion=true,protrusion=true]{microtype}