diff --git a/Classes/PhDThesisPSnPDF.cls b/Classes/PhDThesisPSnPDF.cls index 845cda5..fd950be 100644 --- a/Classes/PhDThesisPSnPDF.cls +++ b/Classes/PhDThesisPSnPDF.cls @@ -54,7 +54,11 @@ \DeclareOption{custombib}{\CU@custombibtrue} % ****************** Header / Footer Styling ******************** +\newif\ifCU@pageStyleI\CU@pageStyleIfalse % Set Page StyleI +\DeclareOption{PageStyleI}{\CU@pageStyleItrue} +\newif\ifCU@pageStyleII\CU@pageStyleIIfalse % Set Page StyleI +\DeclareOption{PageStyleII}{\CU@pageStyleIItrue} \ProcessOptions\relax% @@ -288,7 +292,28 @@ \pagestyle{fancy} -% Style 1: Sets Page Number at the Top (LE/RO) with Chapter/Section Name on LO/RE +\ifCU@pageStyleI +% Style 1: Sets Page Number at the Top and Chapter/Section Name on LE/RO +\renewcommand{\chaptermark}[1]{\markboth{#1}{}} +\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1\ }} +\fancyhf{} +\fancyhead[RO]{\nouppercase \rightmark | \bfseries{\thepage} } +\fancyhead[LE]{{\bfseries\thepage} | \nouppercase \leftmark } + + +\else +\ifCU@pageStyleII +% Style 2: Sets Page Number at the Bottom with Chapter/Section Name on LO/RE +\renewcommand{\chaptermark}[1]{\markboth{#1}{}} +\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}} +\fancyhf{} +\fancyhead[RO]{\bfseries\nouppercase \rightmark} +\fancyhead[LE]{\bfseries \nouppercase \leftmark} +\fancyfoot[C]{\thepage} + + +\else +% Default Style: Sets Page Number at the Top (LE/RO) with Chapter/Section Name on LO/RE \renewcommand{\chaptermark}[1]{\markboth {#1}{}} \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}} \fancyhf{} @@ -296,22 +321,9 @@ \fancyhead[LE,RO]{\bfseries\thepage} \fancyhead[RE]{\nouppercase \leftmark} +\fi -% Style 2: Sets Page Number at the Top and Chapter/Section Name on LE/RO -%\renewcommand{\chaptermark}[1]{\markboth{#1}{}} -%\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}} -%\fancyhf{} -%\fancyhead[RO]{\bfseries\nouppercase \rightmark} -%\fancyhead[LE]{\bfseries \nouppercase \leftmark} -%\fancyfoot[C]{\thepage} - -% Style 3: Sets Page Number at the Bottom with Chapter/Section Name on LO/RE -%\renewcommand{\chaptermark}[1]{\markboth{#1}{}} -%\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1\ }} -%\fancyhf{} -%\fancyhead[RO]{\nouppercase \rightmark | \bfseries{\thepage} } -%\fancyhead[LE]{{\bfseries\thepage} | \nouppercase \leftmark } - +\fi \setlength{\headheight}{14.5pt} %\renewcommand{\headrulewidth}{0.5pt} diff --git a/README.md b/README.md index 8002dbd..b31ede2 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,22 @@ It support the following custom options: * `custombib`: Define your own bibliography style in the `preamble.tex` file. `\RequirePackage[square, sort, numbers, authoryear]{natbib}` +### Choosing the Page Style + +`PhDThesisPSnPDF` defines 3 different page styles (header and footer). The following definition is for `twoside` layout. + +* `default (leave empty)`: For Page Numbers in Header (Left Even, Right Odd) and Chapter Name in Header (Right Even) and Section #. Section Name (Left Odd). Blank Footer. + +* `PageStyleI`: For Page Numbers in Header (Left Even, Right Odd) and Chapter Name next to the Page Number on Even Side (Left Even). Section Number and Section Name and Page Number in Header on Odd Side (Right Odd). Footer is empty. Layout: + + 3 | Introduction and 1.2 Section Name | 4 + + +* `PageStyleII`: Chapter Name on Even Side (Left Even) in Header. Section Number and Section Name in Header on Odd Side (Right Odd). Page numbering in footer. Layout: + +Header (Odd) : 1.2 Section Name +Header (Even) : Introduction +Footer[centered]: 3 ## Custom Settings @@ -180,8 +196,6 @@ You can run the following command: * Support Libertine fonts + Math -* Support custom margins - -* Support custom headers +* Support eco mode: squeeze more text in a page * Headheight should be fixed according to the fontsize used! diff --git a/thesis.pdf b/thesis.pdf index 6b8e51b..b3c9b28 100644 Binary files a/thesis.pdf and b/thesis.pdf differ diff --git a/thesis.tex b/thesis.tex index 512c587..566cda1 100644 --- a/thesis.tex +++ b/thesis.tex @@ -1,4 +1,4 @@ -\documentclass[a4paper,12pt,twoside,times,numbered,print,index]{Classes/PhDThesisPSnPDF} +\documentclass[a4paper,12pt,twoside,times,numbered,PageStyleII,print,index]{Classes/PhDThesisPSnPDF} % ********************************* Preamble ********************************** % Preamble: Contains packages and user-defined commands and settings