Page Style

This commit is contained in:
Krishna Kumar 2013-11-24 00:53:30 +00:00
parent a923bda278
commit 8af08e284d
4 changed files with 46 additions and 20 deletions

View File

@ -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}

View File

@ -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!

Binary file not shown.

View File

@ -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