Page Layout ⇒ Particular Position for Page Number
Particular Position for Page Number
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
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Particular Position for Page Number
I have several questions about your page layout.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
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Particular Position for Page Number
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: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Particular Position for Page Number
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. […]
Which margins are now the correct ones? Is the header part of the type area?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) […]
I suggest that you prepare a minimal example that contains only necessary information about your document setup.
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Particular Position for Page Number
I solved the problem using tikz package
Thanks once again
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Particular Position for Page Number
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.kajal wrote:[…] I solved the problem using tikz package […]
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Particular Position for Page Number
Code: Select all
% 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}Regards
kajal
- Stefan Kottwitz
- Site Admin
- Posts: 10397
- Joined: Mon Mar 10, 2008 9:44 pm
Particular Position for Page Number
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
Particular Position for Page Number
Yes, I solve the solution using fancyhdr...
For one page, I set the page number as bellow.. So, I write partially
Code: Select all
\begin{tikzpicture}[overlay, remember picture]
\path (current page.north east) ++(-1.1,-1.1) node[below left] {\thepage};
\end{tikzpicture}regards
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Particular Position for Page Number
Code: Select all
% !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}Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10