-
Notifications
You must be signed in to change notification settings - Fork 0
/
hgbheadings.sty
33 lines (28 loc) · 1.07 KB
/
hgbheadings.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
%% File encoding: ASCII
%% --------------- Headings setup -------------------------------------
\ProvidesPackage{hgbheadings}
\RequirePackage{fancyhdr}
\pagestyle{fancy}
\RequirePackage[raggedright]{titlesec}
\@ifundefined{chapter}%
{}%
{\renewcommand{\chaptermark}[1]{%
\ifthenelse{\value{chapter} < 1}%
{\markboth{#1}{}}%
{\markboth{\thechapter.\ #1}{}}
}}
\addtolength{\headheight}{\baselineskip}
\renewcommand{\headrulewidth}{0pt} %% thin line under header
%\renewcommand{\headrulewidth}{0.4pt} %% no line under header
\renewcommand{\footrulewidth}{0pt}
\fancyhf{} %% Clear all fields.
%\fancyhead[LE,RO]{\sffamily\thepage} %{\bf \rightmark}
%\fancyhead[LO,RE]{\sffamily\nouppercase{\leftmark}} %{\slshape \leftmark}
\fancyhead[R]{\sffamily\thepage} %{\bf \rightmark}
\fancyhead[L]{\sffamily\nouppercase{\leftmark}} %{\slshape \leftmark}
\fancypagestyle{plain}{%
\fancyhf{} % clear all header and footer fields
\fancyfoot[C]{\sffamily\thepage} % except the center
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
}