-
Notifications
You must be signed in to change notification settings - Fork 0
/
ihformat.sty
119 lines (99 loc) · 3.36 KB
/
ihformat.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
% % % % % % % % % % % % %
% Ian Huston - ihformat.sty
% formatting and macros
%
% % % % % % % % % % % % %
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{ihformat}[2010/06/28 v1.0 Ian Huston's thesis formatting package]
% Get ifthen package for later on
\RequirePackage{ifthen}
% CVS Revision command, Renew \CVSRevision in each file to get current data.
% \newcommand{\version}{}
% \DeclareOption{CVSoff}{%
% \let\@version\empty}
\DeclareOption{CVSon}{%
\def\version$#1,v #2 #3 #4${File #1:v#2\\ Last Saved #3} }%
\DeclareOption{CVSoff}{%
\def\version$#1,v #2 #3${} }%
% \renewcommand{\version}[$#1,v #2 #3 #4$]{#2, #3}}%
% Use the following line in each file to specify revision, date
% \renewcommand{\CVSrevision}{\version$Id: ihformat.sty,v 1.25 2009/11/12 23:42:49 ith Exp $}
% Should we use showlabels? Set with labels option, default is off.
\newboolean{@showlabels}
\setboolean{@showlabels}{false}
\DeclareOption{labels}{%
\setboolean{@showlabels}{true} }%
% Should we show todonotes? Set with todos option, default is off.
\newboolean{@showtodos}
\setboolean{@showtodos}{false}
\DeclareOption{todos}{%
\setboolean{@showtodos}{true} }%
% Use hyperref?
\newboolean{@usehyperref}
\setboolean{@usehyperref}{false}
\DeclareOption{hyperref}{%
\setboolean{@usehyperref}{true} }%
% End of options
\ExecuteOptions{CVSoff}
\ProcessOptions
% % % % % % % % % % % % % % %
% Packages
% % % % % % % % % % % % % % %
\RequirePackage{graphicx}
\RequirePackage{color}
% %
% \RequirePackage{times}
\RequirePackage{setspace}
\RequirePackage{verbatim}
% \usepackage[square]{natbib}
% \usepackage{rotating}
% \usepackage{psfrag}
% %
\pagestyle{headings}
\RequirePackage{fancyhdr}
% %
\RequirePackage{amsmath}
\RequirePackage{amssymb}
% \RequirePackage{amsbsy}
% \RequirePackage{mathrsfs}
\RequirePackage{makeidx}
% Natbib package
\RequirePackage[numbers,sort&compress]{natbib}
% % My macros package
% \RequirePackage{ihmacros}
% Todo notes package
\ifthenelse{\boolean{@showtodos}}{\RequirePackage[textsize=small, backgroundcolor=white]{todonotes}}{\RequirePackage[disable]{todonotes}}
\newcommand{\addtodo}[1]{\todo[inline]{TODO: #1}}
% Hyperlinking without footnotes.
\ifthenelse{\boolean{@usehyperref}}%
{\RequirePackage[pdftex,colorlinks,hyperfootnotes=false,linktocpage]{hyperref}}%
{\RequirePackage[draft]{hyperref}}
% {\newcommand{\hypersetup}[1]{}
% \newcommand{\url}[1]{#1}
% }%
% Should we use showlabels?
\ifthenelse{\boolean{@showlabels}}{\RequirePackage[inline]{showlabels}}{}
%subfig package
\RequirePackage{subfig}
% \captionsetup{lofdepth=2}
\RequirePackage{booktabs}
% % % % % % % % % %
% fancyhdr settings
% % % % % % % % % %
%%%% pagestyle should be indicated after the margins according to the
%%%% fancyheading instructions that come with the package
\pagestyle{fancyplain}
\newcommand{\CVSrevision}{}
\renewcommand{\chaptermark}[1]{\def\chapternamenow{#1}
\markright{\thechapter :\ #1} }
\renewcommand{\sectionmark}[1]{\markright{\thesection :\
%\chapternamenow \ ---\
#1}}
\lhead[\fancyplain{}{\thepage}] {\fancyplain{}{\rightmark}}
\chead[\fancyplain{}{}] {\fancyplain{}{}}
\rhead[\fancyplain{}{\leftmark}] {\fancyplain{}{\thepage}}
\lfoot[\fancyplain{}{}] {\fancyplain{}{}}
\cfoot[\fancyplain{\thepage}{}] {\fancyplain{\thepage}{}}
\rfoot[\fancyplain{} {}] {\fancyplain{}{\CVSrevision}}
% My macros package
\RequirePackage{ihmacros}