Comments (4)
You need to learn the joys (pain) of the fancyhdr package. See line 730 onwards in PhDThesisPSnPDF.cls. You could add a new page style option, i.e., replace lines 756 to 783 with:
% Style 3: Sets Page Number at the Top with Chapter Name and an empty footer
\fancypagestyle{PageStyleIII}{
\renewcommand{\chaptermark}[1]{\markboth{##1}{}}
% Clear the headers
\fancyhf{}
\fancyhead[RE]{\leftmark}
\fancyhead[LO]{\leftmark}
\fancyhead[LE,RO]{\thepage}
}
% Set Fancy Header Command is defined to Load FancyHdr after Geometry is defined
\newcommand{\setFancyHdr}{
\pagestyle{fancy}
\ifPHD@pageStyleI
% Style 1: Sets Page Number at the Top and Chapter/Section Name on LE/RO
\pagestyle{PageStyleI}
\else
\ifPHD@pageStyleII
% Style 2: Sets Page Number at the Bottom with Chapter/Section Name on LO/RE
\pagestyle{PageStyleII}
\else
\ifPHD@pageStyleIII
% Style 3: Sets Chapter Name on LO/RE
\pagestyle{PageStyleIII}
\else
% Default Style: Sets Page Number at the Top (LE/RO) with Chapter/Section Name
% on LO/RE and an empty footer
\renewcommand{\chaptermark}[1]{\markboth {##1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ ##1}}
\fancyhf{}
\fancyhead[LO]{\nouppercase \rightmark}
\fancyhead[LE,RO]{\bfseries\thepage}
\fancyhead[RE]{\nouppercase \leftmark}
\fi
\fi
\fi
}
Then add this below line 141:
\newif\ifPHD@pageStyleIII\PHD@pageStyleIIIfalse % Set Page StyleIII
\DeclareOption{PageStyleIII}{\PHD@pageStyleIIItrue}
Then pass PageStyleIII as an option to the \documentclass (line 4 in thesis.tex)
from phd-thesis-template.
Thank you so much for this! The only issue is that it doesn't seem to work with oneside
printing, as the header only goes across part of the page. (Sorry for not including that information in the original issue.)
from phd-thesis-template.
The header/footer styling options are written for two-sided output for printing. A test for oneside
or twoside
can be used to add support for one-sided documents. For example, for my previous Style 3 example:
% Style 3: Sets Page Number at the Top with Chapter Name and an empty footer
\fancypagestyle{PageStyleIII}{
\renewcommand{\chaptermark}[1]{\markboth{##1}{}}
% Clear the headers
\fancyhf{}
\if@oneside
\fancyhead[L]{\nouppercase \leftmark}
\fancyhead[R]{\nouppercase \thepage}
\else
\fancyhead[RE]{\nouppercase \leftmark}
\fancyhead[LO]{\nouppercase \leftmark}
\fancyhead[LE,RO]{\thepage}
\fi
}
However, the oneside
option cause fancyhdr warnings for the other styles. I see you have commented on issue #133 which is in the develop branch and attempts to address that issue.
from phd-thesis-template.
Ok, got it! Since I'm about to submit my thesis, I'm not going to play around with the development branch. I'll wait for it to move into production. Thanks so much for your help!
from phd-thesis-template.
Related Issues (20)
- Exclude from compilation
- Figure options (raster/vector) HOT 2
- There maybe something wrong with the line with which you imported the class file, since the compiler is saying "missing \begin{document}". Are you able to compile the template without any modification?nbhhkmbhj
- Remove blank pages, openany not works HOT 1
- Change title of Absract HOT 3
- Location to add usepackage{} HOT 2
- algpseucode HOT 1
- [Help] Change Hyperlinks in Table of Contents HOT 2
- [Help] Conversion from Tex/PDF to Docx HOT 2
- Customizing the title page, or building it from scratch HOT 1
- References turns into "[? ]" after running thesis.text on Mac HOT 2
- References turns into "[? ]" after running thesis.text on Mac HOT 2
- Footnote in Figure Caption
- BibTeX bibliography style: econometrica
- supervsiors alligned
- How do I remove the blank pages? HOT 1
- Is it possible to have nomenclature chapter wise? HOT 1
- Bibliography sorting HOT 1
- Help needed in adding certificate page
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phd-thesis-template.