# 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). You can click on the Grab button at the end of the page to download it as a text file.

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}).

## yanthese.sty

\ProvidesPackage{yanthese}

% % %
% SPACING & NUMBERING
% = = = = = = = = = = = = = = = = = =
\usepackage{setspace} % use \begin{spacing}{1.5}, or \onehalfspacing, etc
\usepackage{enumerate}

% % %
% 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} % phonetic alphabet
\usepackage[applemac]{inputenc} %using applemac

% % %
% 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 MARGINAR 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}

% % %
% = = = = = = = = = = = = = = = = = =
\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

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

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

\fancyhf{}

\fancypagestyle{plain}{% this is for beginning of chapter: empty
}

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

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

%
%\renewcommand{\chaptermark}[1]%
%{\markboth{\MakeUppercase{\thechapter.\ #1}}{}}
%\renewcommand{\sectionmark}[1]%
%{\markright{\MakeUppercase{\thesection.\ #1}}}
%\renewcommand{\footrulewidth}{0pt}
%\newcommand{\helv}{%
%\fontfamily{phv}\fontseries{b}\fontsize{9}{11}\selectfont}
%\fancyhf{}

% TOC
\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}

% = = = = = = = = = = = = = = = = = =
% How many levels of section head would you like to appear in the
% 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 use jurabib!

% % %
\usepackage[final,expansion=true,protrusion=true]{microtype}`