summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/hepthesis/hepthesis.cls
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/hepthesis/hepthesis.cls')
-rw-r--r--Master/texmf-dist/tex/latex/hepthesis/hepthesis.cls96
1 files changed, 66 insertions, 30 deletions
diff --git a/Master/texmf-dist/tex/latex/hepthesis/hepthesis.cls b/Master/texmf-dist/tex/latex/hepthesis/hepthesis.cls
index a25773da227..8208cffecd4 100644
--- a/Master/texmf-dist/tex/latex/hepthesis/hepthesis.cls
+++ b/Master/texmf-dist/tex/latex/hepthesis/hepthesis.cls
@@ -15,8 +15,8 @@
%% ========================================================================
%% Admin
%% ========================================================================
-\def\fileversion{1.4.3}
-\def\filedate{2010/05/27}
+\def\fileversion{1.5.0}
+\def\filedate{2014/08/27}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{hepthesis}[\filedate\space HEP thesis class by Andy Buckley (v\fileversion)]
@@ -35,8 +35,8 @@
\def\@requiredraft{}
\def\@useAFour{yes}
\def\@requireAFourWide{}
+\def\@useTwelvePt{yes}
\def\@oneside{}
-%% TODO: Make "yes" by default...
\def\@sftitles{}
\def\@bindmargins{yes}
\def\@hidefrontmatter{}
@@ -181,6 +181,24 @@
\fi
+%% Font size (12pt is default)
+\DeclareOption{10pt}{%
+ \def\@useTwelvePt{}%
+ \PassOptionsToClass{10pt}{scrbook}%
+}
+\DeclareOption{11pt}{%
+ \def\@useTwelvePt{}%
+ \PassOptionsToClass{11pt}{scrbook}%
+}
+\DeclareOption{12pt}{%
+ \def\@useTwelvePt{yes}%
+}
+%% Handle the 12pt default font size
+\ifx\@useTwelvePt\@empty\else%
+ \PassOptionsToClass{12pt}{scrbook}%
+\fi
+
+
%% Options to be passed to the hep package
\DeclareOption{hepfd}{\def\@requirehep{yes}\PassOptionsToPackage{fd}{hep}}
\DeclareOption{heplayout}{\def\@requirehep{yes}\PassOptionsToPackage{layout}{hep}}
@@ -202,6 +220,12 @@
%% Use wide format if using A4 paper
\ifx\@requireAFourWide\@empty\else\RequirePackage{a4wide}\fi
+%% Use Type 1 font encoding
+\RequirePackage[T1]{fontenc}
+
+%% Useful tools
+\RequirePackage{etoolbox}
+
%% If building with PDFLaTeX, use microtype spacing adjustments
\RequirePackage{microtype}
@@ -289,21 +313,18 @@
%% Make sure bibliography (but not ToC) appears in the ToC
\RequirePackage[nottoc]{tocbibind}
-%% Verbatim things
-\RequirePackage{verbatim,comment}
+%% Special comments for block enabling/disabling
+\RequirePackage{comment}
-%% Rotated figures
+%% Rotated figures (used to define sidewaysfigure)
\RequirePackage{rotating}
%% Re-defines captions of figures and tables
%% TODO: make configurable / optional?
\RequirePackage[format=hang,labelfont=bf,labelsep=colon,font=small]{caption}[2004/01/23]
-%% Hyperlinks (optional, has to come late in the package list)
-\ifx\@requirehyper\@empty\else%
-\RequirePackage[colorlinks=true,bookmarks=true,plainpages=false]{hyperref}%
-%pdfpagemode=None, FullScreen, UseThumbs, UseOutlines
-\fi
+%% Ability to specify a hook for after a page is completed
+\RequirePackage{afterpage}
%% Misc tweaks
\AtEndOfClass{%
@@ -327,7 +348,6 @@
%% Increase inner margins for binding
\newlength{\@bindextramargin}
\AtEndOfClass{%
-
\ifx\@bindmargins\@empty%
\setlength{\@bindextramargin}{0.0in}
\else%
@@ -438,15 +458,6 @@
\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}
-
-
%% Commenting out front and back matter
\ifx\@hidefrontmatter\@yes\AtBeginDocument{\excludecomment{frontmatter}}\fi
\ifx\@hidebackmatter\@yes\AtBeginDocument{\excludecomment{backmatter}}\fi
@@ -456,11 +467,31 @@
%% Internal environments and commands
%% ========================================================================
-\AtEndOfClass{%
- \usepackage[babel]{csquotes}[2007/03/25]
+\AtEndPreamble{%
+ \RequirePackage[autostyle]{csquotes}[2007/03/25]
%% Provide dumb quoting commands in case the csquotes package hasn't been used.
\providecommand{\enquote}[1]{``#1''}%
\providecommand{\foreignquote}[1]{``#1''}%
+
+ %% Provide mixed-case versions of the Table of contents,
+ %% List of tables, List of figures, Bibliography etc. header names
+ \@ifpackageloaded{babel}{\addto\captionsenglish{%
+ \renewcommand*{\contentsname}{Contents}
+ \renewcommand*{\bibname}{Bibliography}
+ \renewcommand*{\listfigurename}{List of figures}
+ \renewcommand*{\listtablename}{List of tables}
+ }}{%
+ \renewcommand*{\contentsname}{Contents}
+ \renewcommand*{\bibname}{Bibliography}
+ \renewcommand*{\listfigurename}{List of figures}
+ \renewcommand*{\listtablename}{List of tables}
+ }
+
+ %% Hyperlinks (optional, has to come late in the package list)
+ \ifx\@requirehyper\@empty\else%
+ \RequirePackage[colorlinks=true,bookmarks=true,plainpages=false]{hyperref}%
+ % pdfpagemode=None, FullScreen, UseThumbs, UseOutlines
+ \fi
}
@@ -512,6 +543,7 @@
\end{\@frontmatterspacing}%
\endadjustwidth%
\ignorespacesafterend%
+ % \thispagestyle{empty}
}
@@ -519,8 +551,9 @@
\let\@oldmainmatter\mainmatter
\specialcomment{mainmatter}{%
%\@oldmainmatter%
- \@mainmattertrue
- \pagenumbering{arabic}%
+ \if@twoside\clearpage\fi%
+ \@mainmattertrue%
+ \afterpage{\pagenumbering{arabic}}%
\adjustwidth{\@mainmatterextramargin}{\@mainmatterextramargin}%
\begin{\@mainmatterspacing}%
}{%
@@ -545,7 +578,9 @@
%% Environment for all the junk at the end of the thesis
\let\@oldbackmatter\backmatter
\specialcomment{backmatter}{%
- \@oldbackmatter%
+ %\thispagestyle{plain}%
+ %pagestyle{plain}%
+ %\@oldbackmatter%
\adjustwidth{\@backmatterextramargin}{\@backmatterextramargin}%
\begin{\@backmatterspacing}%
\appendix%
@@ -677,8 +712,9 @@
\DeclareRobustCommand{\pagequote}[3][same]{%
\cleardoublepage%
\vspace*{\stretch{2}}%
- \thispagestyle{plain}%
- \pagestyle{plain}%
+ \thispagestyle{empty}%
+ % \thispagestyle{plain}%
+ % \pagestyle{plain}%
\begin{center}%
\begin{varwidth}{\textwidth}%
\def\@samelang{same}%
@@ -694,8 +730,8 @@
\end{varwidth}%
\end{center}%
\vspace*{\stretch{4}}%
- %\cleardoublepage%
- \pagestyle{plain}%
+ \if@twoside\clearpage\fi%
+ \thispagestyle{plain}%
}
%% Alias
\let\frontquote\pagequote