-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphdthesis.sty
74 lines (65 loc) · 2.38 KB
/
phdthesis.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
%%
%% This is file `phdthesis.sty`,
%%
%% This style file changes the appearance of the pages to improve
%% the aesthetics of PhD theses (in my opinion =)
%%
%% Copyright (C) 2007 Jamie Stevens, Luca Fossati
%%
%%
%% This program is free software: you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by
%% the Free Software Foundation, either version 3 of the License, or
%% (at your option) any later version.
%%
%% This program is distributed in the hope that it will be useful,
%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
%% GNU General Public License for more details.
%%
%% You should have received a copy of the GNU General Public License
%% along with this program. If not, see <http://www.gnu.org/licenses/>.
%%
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{phdthesis}[2007/09/11 v1.0 PhD Thesis Style]
%% Set the font packages and options
%% for better typesetting
\RequirePackage{times}
%% Load up fancy headers and footers package
\RequirePackage{fancyhdr}
%% now reset the headers and footers
\fancyhead{}
\fancyfoot{}
%% make the odd pages have the section name on the top right
\fancyhead[RO]{\sffamily\bfseries\nouppercase{\rightmark}}
%% make the even pages have the chapter name on the top left
\fancyhead[LE]{\sffamily\bfseries\nouppercase{\leftmark}}
\fancyfoot[CE,CO]{\thepage}
\pagestyle{fancy}
%% now redefine the plain style pages (chapter pages, contents pages)
%% to have the same page number stuff on the bottom
\fancypagestyle{plain}{
\fancyhf{}
\fancyfoot[CE,CO]{\thepage}
\renewcommand{\headrulewidth}{0pt}
}
%% this next section (till \makeatother) makes sure that blank pages
%% are actually completely blank, cause they're not usually
\makeatletter
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
\hbox{}
\vspace*{\fill}
\thispagestyle{empty}
\newpage
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother
\RequirePackage[calcwidth]{titlesec}
\titleformat{\section}[hang]{\sffamily\bfseries}
{\Large\thesection}{12pt}{\large}[{\titlerule[0.5pt]}]
%% Used to have big letters at the beginning of each Chapter
\RequirePackage{type1cm}
\RequirePackage{lettrine}
\renewcommand{\LettrineFontHook}{\color[gray]{0.3}}
\setcounter{DefaultLines}{3}
\renewcommand{\DefaultLoversize}{0.25}
\renewcommand{\DefaultLhang}{0.25}