## LaTeX forum ⇒ Page Layout ⇒ Particular Position for Page Number Topic is solved

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
kajal
Posts: 6
Joined: Thu Apr 26, 2012 5:25 pm

### Particular Position for Page Number

Hi
Myself Kajal, Senior Research Fellow from India. I want to write my thesis in LaTeX. But I face on problem. Here is the problem.

Margin for my PhD thesis set by my university is 4cm from left, 2cm from right, and 3cm from top and the bottom. This one I have done using geometry package. But my university wants the page number 1cm from top and 1cm from right. Which I am unable to solve. Please help me in this matter.

Thank you

localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm
kajal wrote:[…] Margin for my PhD thesis set by my university is 4cm from left, 2cm from right, and 3cm from top and the bottom. […] But my university wants the page number 1cm from top and 1cm from right. […]

• Is the document always printed single-sided?
• Are there any other specifications regarding the header?
• Is the page number part of the page header or is it placed outside at that particular position?

Best regards and welcome to the board
Thorsten
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

kajal
Posts: 6
Joined: Thu Apr 26, 2012 5:25 pm
1. Document always printed single sided..
2. No other specifications regarding header.. But I use fancyhdr to set chapter name in the top left and page number top right (2cm from top and 2cm from right). That 2cm I want make 1cm from top and 1cm from right..
3. I set the page number in the header..Using any technique is it possible to set 1cm from top and 1cm from right..

Thanks once again

localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm
kajal wrote:[…] Margin for my PhD thesis set by my university is 4cm from left, 2cm from right, and 3cm from top and the bottom. […]

kajal wrote:[…] But I use fancyhdr to set chapter name in the top left and page number top right (2cm from top and 2cm from right) […]

Which margins are now the correct ones? Is the header part of the type area?

I suggest that you prepare a minimal example that contains only necessary information about your document setup.
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

kajal
Posts: 6
Joined: Thu Apr 26, 2012 5:25 pm
I solved the problem using tikz package

Thanks once again

localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm
kajal wrote:[…] I solved the problem using tikz package […]

Good to hear. Then please be so kind and post the complete solution here. Finally others with the same or a similar problem could come here by search engine and would be disappointed if they don't find a working solution.
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

kajal
Posts: 6
Joined: Thu Apr 26, 2012 5:25 pm
The tikz package solve my problem partially. Final solution for my problem as below
% Shifting 1cm horizontally\fancyheadoffset[RE,RO]{1cm}\fancyhead[RE,RO]{\thepage} % Shifting 1cm vertically\addtolength{\headheight}{8pt}\newlength{\headshift}\setlength{\headshift}{30pt}\addtolength{\headsep}{\headshift}\addtolength{\voffset}{-\headshift}

Thank you very much

Regards
kajal

Stefan Kottwitz
Posts: 9513
Joined: Mon Mar 10, 2008 9:44 pm
Hi kajal,

thanks for posting the solution!

I just don't see the TikZ package here, perhaps you mean the fancyhdr package. As I read TikZ, I wondered how to do that, I think it would be possible using the current page node as a reference for positioning page numbers, an interesting approach.

Best regards,

Stefan

kajal
Posts: 6
Joined: Thu Apr 26, 2012 5:25 pm
Thank you very much...
Yes, I solve the solution using fancyhdr...

For one page, I set the page number as bellow.. So, I write partially

\begin{tikzpicture}[overlay, remember picture]\path (current page.north east) ++(-1.1,-1.1) node[below left] {\thepage};\end{tikzpicture}

Thank you very much
regards
Last edited by Stefan Kottwitz on Wed May 09, 2012 2:19 pm, edited 1 time in total.
Reason: code marked

localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm
Since will still have no complete solution, here comes an example that only needs the fancyhdr package for the header setup.
% !TeX program = pdflatex\documentclass[11pt,a4paper,english]{report}\usepackage[T1]{fontenc}\usepackage{babel}\usepackage{geometry}\geometry{   includeheadfoot,   headheight=14pt,   left=4cm,   right=2cm,   top=2cm,   bottom=3cm}\usepackage{fancyhdr}\usepackage{blindtext}   % to be dropped in the real document \fancyhf{}\fancyheadoffset[R]{1cm}\rhead{\leavevmode\smash{\raisebox{1cm}{\thepage}}}\lhead{\rightmark}\renewcommand{\headrulewidth}{0pt}\pagestyle{fancy} \begin{document}   \blinddocument\end{document}

Setup for chapter pages is missing but can be modified according to Section 7 of the package manual.
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1