migrate the customised thesis
This commit is contained in:
@@ -1,66 +1,272 @@
|
||||
\ProvidesPackage{mythesis}[2005/07/28]
|
||||
%\RequirePackage{timing}
|
||||
\RequirePackage{hepnicenames,abhep}
|
||||
% \RequirePackage{siunitx}
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{mythesis}
|
||||
|
||||
%% Citation spacing hack to bring the citation
|
||||
%% number a little closer to the referring text
|
||||
\let\@OldCite\cite
|
||||
\renewcommand{\cite}[1]{\mbox{\!\!\!\@OldCite{#1}}}
|
||||
%% -------------------------------------
|
||||
%% Packages
|
||||
%% -------------------------------------
|
||||
%$ Page layout
|
||||
\RequirePackage[top=1in, bottom=1in,
|
||||
%inner=1.25in, outer=1in]{geometry}
|
||||
inner=1.25in, outer=1in, twoside]{geometry}
|
||||
\RequirePackage{amsmath}
|
||||
|
||||
%% Maths
|
||||
\DeclareRobustCommand{\thesismath}[1]{\ensuremath{\maybebmsf{#1}}}
|
||||
\DeclareRobustCommand{\parenths}[1]{\mymath{\left({#1}\right)}}
|
||||
\DeclareRobustCommand{\braces}[1]{\mymath{\left\{{#1}\right\}}}
|
||||
\DeclareRobustCommand{\angles}[1]{\mymath{\left\langle{#1}\right\rangle}}
|
||||
\DeclareRobustCommand{\sqbracs}[1]{\mymath{\left[{#1}\right]}}
|
||||
\DeclareRobustCommand{\mods}[1]{\mymath{\left\lvert{#1}\right\rvert}}
|
||||
\DeclareRobustCommand{\modsq}[1]{\mymath{\mods{#1}^2}}
|
||||
\DeclareRobustCommand{\dblmods}[1]{\mymath{\left\lVert{#1}\right\rVert}}
|
||||
\DeclareRobustCommand{\expOf}[1]{\mymath{\exp{\!\parenths{#1}}}}
|
||||
\DeclareRobustCommand{\eexp}[1]{\mymath{e^{#1}}}
|
||||
\DeclareRobustCommand{\plusquad}{\mymath{\oplus}}
|
||||
\DeclareRobustCommand{\logOf}[1]{\log\!\parenths{#1}}
|
||||
\DeclareRobustCommand{\lnOf}[1]{\ln\!\parenths{#1}}
|
||||
\DeclareRobustCommand{\ofOrder}[1]{\mymath{ \mathcal{O}\parenths{#1} }}
|
||||
%$ Hyper-link ..
|
||||
\RequirePackage[%
|
||||
colorlinks=true,% color links instead of using boxes
|
||||
linkcolor=red,% color for internal (intra-document) links
|
||||
citecolor=green,% color for bibliographic links
|
||||
urlcolor=blue,% color for URL links
|
||||
hyperfootnotes=false,% disable links to footnotes (because feature broken)
|
||||
hyperindex,% make page numbers in index into hyperlinks
|
||||
pdfstartview={FitH},% startup page view: fit width of page to window
|
||||
bookmarks
|
||||
]{hyperref}
|
||||
\RequirePackage[all]{hypcap}
|
||||
|
||||
%% General utility defns
|
||||
\DeclareRobustCommand{\arXivCode}[1]{arXiv:#1}
|
||||
\DeclareRobustCommand{\CPviolation}{\CP-violation\xspace}
|
||||
\DeclareRobustCommand{\CPv}{\CPviolation}
|
||||
\DeclareRobustCommand{\LHCb}{LHCb\xspace}
|
||||
\DeclareRobustCommand{\LHC}{LHC\xspace}
|
||||
\DeclareRobustCommand{\LEP}{LEP\xspace}
|
||||
\DeclareRobustCommand{\CERN}{CERN\xspace}
|
||||
\AtBeginDocument{\thispagestyle{plain}}
|
||||
|
||||
%% Basic rate formalisms
|
||||
\DeclareRobustCommand{\Rate}{\thesismath{\Gamma}\xspace}
|
||||
\DeclareRobustCommand{\RateOf}[1]{\thesismath{\Gamma}\parenths{#1}\xspace}
|
||||
%% Custom header, no upper case, two sided
|
||||
\RequirePackage{fancyhdr}
|
||||
\pagestyle{fancy}
|
||||
\fancyhf{}
|
||||
\fancyhead[LE,RO]{\thepage}
|
||||
\fancyhead[RE]{\nouppercase{\leftmark}}
|
||||
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
|
||||
\setlength{\headheight}{15pt}
|
||||
\RequirePackage{emptypage}
|
||||
%% Others
|
||||
\RequirePackage{booktabs}
|
||||
\RequirePackage{cite}
|
||||
%\RequirePackage{morefloats}
|
||||
\RequirePackage{mathrsfs} % script font
|
||||
\RequirePackage{afterpage}
|
||||
%% Using Babel allows other languages to be used and mixed-in easily
|
||||
\RequirePackage[ngerman,english]{babel}
|
||||
\selectlanguage{english}
|
||||
\RequirePackage[babel]{csquotes}
|
||||
|
||||
%% Phrases to be consistent about (with b/B)
|
||||
\DeclareRobustCommand{\bphysics}{\Pbottom-physics\xspace}
|
||||
\DeclareRobustCommand{\bhadron}{\Pbottom-hadron\xspace}
|
||||
\DeclareRobustCommand{\Bmeson}{\PB-meson\xspace}
|
||||
\DeclareRobustCommand{\bbaryon}{\Pbottom-baryon\xspace}
|
||||
\DeclareRobustCommand{\Bdecay}{\PB-decay\xspace}
|
||||
\DeclareRobustCommand{\bdecay}{\Pbottom-decay\xspace}
|
||||
\RequirePackage{subfig}
|
||||
\RequirePackage{tikz}
|
||||
\RequirePackage{fixltx2e}
|
||||
\RequirePackage{setspace}
|
||||
\RequirePackage{verbatim}
|
||||
\RequirePackage{lipsum}
|
||||
\RequirePackage{datatool}
|
||||
\RequirePackage[capitalise]{cleveref}
|
||||
\RequirePackage[final]{listings}
|
||||
\RequirePackage{xfrac}
|
||||
%% Units
|
||||
\RequirePackage[]{siunitx}
|
||||
%% Various fonts ...
|
||||
%\RequirePackage[T1]{fontenc}
|
||||
%\RequirePackage{charter}
|
||||
%\RequirePackage[expert]{mathdesign}
|
||||
|
||||
%% Processes
|
||||
\DeclareRobustCommand{\BToKPi}{\HepProcess{ \PB \to \PK \, \Ppi }\xspace}
|
||||
\DeclareRobustCommand{\BToPiPi}{\HepProcess{ \PB \to \Ppi \, \Ppi }\xspace}
|
||||
\DeclareRobustCommand{\BToKK}{\HepProcess{\PB \to \PK \, \PK}\xspace}
|
||||
\DeclareRobustCommand{\BToRhoPi}{\HepProcess{ \PB \to \Prho \, \Ppi }\xspace}
|
||||
\DeclareRobustCommand{\BToRhoRho}{\HepProcess{ \PB \to \Prho \Prho }\xspace}
|
||||
\DeclareRobustCommand{\X}{\thesismath{X}\xspace}
|
||||
\DeclareRobustCommand{\Xbar}{\thesismath{\overline{X}}\xspace}
|
||||
\DeclareRobustCommand{\Xzero}{\HepGenParticle{X}{}{0}\xspace}
|
||||
\DeclareRobustCommand{\Xzerobar}{\HepGenAntiParticle{X}{}{0}\xspace}
|
||||
\DeclareRobustCommand{\epluseminus}{\Pelectron\Ppositron\xspace}
|
||||
|
||||
% Fix hyperref labels in PDFTeX
|
||||
\@ifpackageloaded{hyperref}{%
|
||||
\pdfstringdefDisableCommands{%
|
||||
\def\pi{pi}%
|
||||
\def\gamma{gamma}%
|
||||
}%
|
||||
}{}
|
||||
%\usepackage[T1]{fontenc}
|
||||
%\usepackage[bitstream-charter]{mathdesign}
|
||||
|
||||
|
||||
%\RequirePackage{lmodern}
|
||||
%\RequirePackage{libertine}
|
||||
%\RequirePackage[libertine]{newtxmath}
|
||||
|
||||
% this works
|
||||
%\usepackage[]{mathpazo} % With old-style figures and real smallcaps.
|
||||
%\linespread{1.025} % Palatino leads a little more leading
|
||||
%\usepackage[small]{eulervm}
|
||||
|
||||
\RequirePackage{tabularx}
|
||||
\RequirePackage{color}
|
||||
\RequirePackage{pifont}
|
||||
\RequirePackage{soul}
|
||||
\RequirePackage[]{dcolumn}
|
||||
\RequirePackage[]{sidecap}
|
||||
\RequirePackage[]{wrapfig}
|
||||
\RequirePackage{feynmp}
|
||||
\RequirePackage[]{afterpage}
|
||||
\RequirePackage[]{multirow}
|
||||
|
||||
%% provide adjustwidth
|
||||
\RequirePackage{changepage}
|
||||
\RequirePackage{comment}
|
||||
|
||||
%% -------------------------------------
|
||||
%% More settings ...
|
||||
%% -------------------------------------
|
||||
%% Treat forced blank pages in the same way as chapter title pages
|
||||
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else%
|
||||
\hbox{}%
|
||||
\thispagestyle{empty}%
|
||||
%\thispagestyle{plain}%
|
||||
\newpage%
|
||||
\if@twocolumn\hbox{}\newpage\fi\fi\fi}%
|
||||
|
||||
|
||||
%% Provide mixed-case versions of the Table of contents,
|
||||
%% List of tables, List of figures, Bibliography etc. header names
|
||||
\DeclareRobustCommand{\contentsname}{Contents}
|
||||
\DeclareRobustCommand{\bibname}{Bibliography}
|
||||
\DeclareRobustCommand{\listfigurename}{List of figures}
|
||||
\DeclareRobustCommand{\listtablename}{List of tables}
|
||||
|
||||
%% -------------------------------------
|
||||
%% Extra environments, stole from hepthesis.cls
|
||||
%% -------------------------------------
|
||||
%% Extra margins for various sections
|
||||
\newlength{\@mainmatterextramargin}%
|
||||
\setlength{\@mainmatterextramargin}{0cm}%
|
||||
\newlength{\@backmatterextramargin}%
|
||||
\setlength{\@backmatterextramargin}{0cm}%
|
||||
\newlength{\@frontmatterextramargin}%
|
||||
\setlength{\@frontmatterextramargin}{0cm}%
|
||||
\newlength{\@appendixextramargin}%
|
||||
\setlength{\@appendixextramargin}{0cm}%
|
||||
\newlength{\@abstractextramargin}%
|
||||
\setlength{\@abstractextramargin}{1.5cm}%
|
||||
\newlength{\@declarationextramargin}%
|
||||
\setlength{\@declarationextramargin}{1cm}%
|
||||
\newlength{\@acknowledgementsextramargin}%
|
||||
\setlength{\@acknowledgementsextramargin}{0cm}%
|
||||
\newlength{\@prefaceextramargin}%
|
||||
\setlength{\@prefaceextramargin}{0cm}%
|
||||
\newlength{\@pagequoteextramargin}%
|
||||
\setlength{\@pagequoteextramargin}{2cm}%
|
||||
%% Top vertical spacing in the front matter
|
||||
\newlength{\@frontmattertopskip}%
|
||||
\newlength{\@frontmattertitletopskip}%
|
||||
\newlength{\frontmattertitleskip}%
|
||||
\addtolength{\frontmattertitleskip}{2cm}%
|
||||
\addtolength{\@frontmattertitletopskip}{0cm}%
|
||||
\setlength{\@frontmattertopskip}{\frontmattertitleskip}%
|
||||
\addtolength{\@frontmattertopskip}{\@frontmattertitletopskip}%
|
||||
|
||||
%% Figure widths
|
||||
\newlength{\smallfigwidth}
|
||||
\newlength{\mediumfigwidth}
|
||||
\newlength{\largefigwidth}
|
||||
\newlength{\hugefigwidth}
|
||||
\setlength{\smallfigwidth}{0.45\textwidth}
|
||||
\setlength{\mediumfigwidth}{0.6\textwidth}
|
||||
\setlength{\largefigwidth}{0.75\textwidth}
|
||||
\setlength{\hugefigwidth}{0.9\textwidth}
|
||||
%% Environment for thesis abstract in frontmatter
|
||||
%% (argument is the thesis title)
|
||||
|
||||
\newenvironment{abstract}[1][Abstract]{%
|
||||
\adjustwidth{\@abstractextramargin}{\@abstractextramargin}%
|
||||
\cleardoublepage%
|
||||
\vspace*{\@frontmattertopskip}%
|
||||
\begin{center}%
|
||||
\begingroup
|
||||
\ifx\@sftitles\@empty\else\sf\fi
|
||||
{\LARGE\textbf{#1}}%
|
||||
\endgroup
|
||||
\end{center}%
|
||||
\vspace*{1cm}%
|
||||
}{ \endadjustwidth \ignorespacesafterend }
|
||||
|
||||
%% Environment for declaration rubrik page in frontmatter
|
||||
\newenvironment{declaration}{%
|
||||
\cleardoublepage%
|
||||
\adjustwidth{\@declarationextramargin}{\@declarationextramargin}%
|
||||
\vspace*{\@frontmattertopskip}%
|
||||
\begin{center}%
|
||||
\begingroup
|
||||
\ifx\@sftitles\@empty\else\sf\fi
|
||||
{\LARGE\textbf{Declaration}}%
|
||||
\endgroup
|
||||
\end{center}%
|
||||
\vspace*{1cm}%
|
||||
}{%
|
||||
%\newline \newline \newline%
|
||||
%\begin{flushright}
|
||||
% \thesisauthor\newline
|
||||
% \today\newline
|
||||
%\end{flushright}
|
||||
\endadjustwidth%
|
||||
\ignorespacesafterend%
|
||||
}
|
||||
|
||||
%% Change the spacing of lines
|
||||
\DeclareRobustCommand{\setspacing}[1]{%
|
||||
\setfrontmatterspacing{#1}%
|
||||
\setmainmatterspacing{#1}%
|
||||
\setappendixspacing{#1}%
|
||||
\setbackmatterspacing{#1}%
|
||||
}
|
||||
\DeclareRobustCommand{\setfrontmatterspacing}[1]{\def\@frontmatterspacing{#1spacing}}
|
||||
\DeclareRobustCommand{\setmainmatterspacing}[1]{\def\@mainmatterspacing{#1spacing}}
|
||||
\DeclareRobustCommand{\setappendixspacing}[1]{\def\@appendixspacing{#1spacing}}
|
||||
\DeclareRobustCommand{\setbackmatterspacing}[1]{\def\@backmatterspacing{#1spacing}}
|
||||
|
||||
|
||||
%% Change the extra margin size
|
||||
\DeclareRobustCommand{\setextramargins}[1]{%
|
||||
\setfrontmatterextramargins{#1}%
|
||||
\setmainmatterextramargins{#1}%
|
||||
\setappendixextramargins{#1}%
|
||||
\setbackmatterextramargins{#1}%
|
||||
}
|
||||
\DeclareRobustCommand{\setfrontmatterextramarginsg}[1]{\setlength{\@frontmatterextramargin}{#1}}
|
||||
\DeclareRobustCommand{\setmainmatterextramargins}[1]{\setlength{\@mainmatterextramargin}{#1}}
|
||||
\DeclareRobustCommand{\setappendixextramargins}[1]{\setlength{\@appendixextramargin}{#1}}
|
||||
\DeclareRobustCommand{\setbackmatterextramargins}[1]{\setlength{\@backmatterextramargin}{#1}}
|
||||
\DeclareRobustCommand{\setabstractextramargins}[1]{\setlength{\@abstractextramargin}{#1}}
|
||||
\DeclareRobustCommand{\setdeclarationextramargins}[1]{\setlength{\@declarationextramargin}{#1}}
|
||||
\DeclareRobustCommand{\setacknowledgementsextramargins}[1]{\setlength{\@acknowledgementsextramargin}{#1}}
|
||||
\DeclareRobustCommand{\setprefaceextramargins}[1]{\setlength{\@prefaceextramargin}{#1}}
|
||||
|
||||
%% Part-wise spacing commands and definitions
|
||||
\def\@frontmatterspacing{onehalfspacing}
|
||||
\def\@mainmatterspacing{onehalfspacing}
|
||||
\def\@appendixspacing{onehalfspacing}
|
||||
\def\@backmatterspacing{onehalfspacing}
|
||||
%% An environment for the rubbish at the front of a typical thesis
|
||||
\let\@oldfrontmatter\frontmatter
|
||||
\specialcomment{frontmatter}{%
|
||||
\setcounter{tocdepth}{2}% show down to subsections in contents
|
||||
\setcounter{secnumdepth}{2}% number down to subsections
|
||||
%\newcounter{iterlist}%
|
||||
\@oldfrontmatter%
|
||||
\adjustwidth{\@frontmatterextramargin}{\@frontmatterextramargin}%
|
||||
\begin{\@frontmatterspacing}%
|
||||
}{%
|
||||
\end{\@frontmatterspacing}%
|
||||
\endadjustwidth%
|
||||
\ignorespacesafterend%
|
||||
}
|
||||
|
||||
|
||||
%% Title page
|
||||
|
||||
%% Use the \title and \author arguments to build the front page etc.
|
||||
\ifx\@requiretitling\@empty%
|
||||
%% Re-define \title and \author to store their args in \thetitle, \theauthor
|
||||
%variables
|
||||
\renewcommand*\title[1]{\gdef\@title{#1}\global\let\thetitle\@title}%
|
||||
\renewcommand*\author[1]{\gdef\@author{#1}\global\let\theauthor\@author}%
|
||||
\else%
|
||||
\RequirePackage{titling}%
|
||||
\fi
|
||||
%% Makes a thesis title page
|
||||
\let\@oldtitlepage\titlepage
|
||||
\let\@oldendtitlepage\endtitlepage
|
||||
\DeclareRobustCommand{\titlepage}[2][]{%
|
||||
\thispagestyle{empty}%
|
||||
\begingroup%
|
||||
\ifx\@sftitles\@empty\else\sf\fi%
|
||||
\begin{center}%
|
||||
\vspace*{\frontmattertitleskip}%
|
||||
\begin{doublespace}%
|
||||
{\Huge\textbf{\thetitle}}\\%
|
||||
\end{doublespace}%
|
||||
\vspace*{3cm}%
|
||||
%{\Large{{\theauthor} \\ {#1}}}\\%
|
||||
{\Large{{\theauthor}\\}}
|
||||
\vspace*{8cm}%
|
||||
{#2}%
|
||||
\end{center}%
|
||||
\endgroup%
|
||||
}
|
||||
\renewcommand{\maketitle}[1]{\titlepage{}}
|
||||
|
||||
Reference in New Issue
Block a user