Page LayoutPage Number on Top of the right Margin

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
xJippu
Posts: 6
Joined: Thu Nov 01, 2012 11:32 pm

Page Number on Top of the right Margin

Post by xJippu »

Hey!

I've pretty much got my thesis formatting figured out, just a few minor trims here and there left. One of them is the page numbering. I've used myheadings as my main page style, which makes the page number appear in the right edge of the header by default. However, my faculty wants it to appear in the upright corner of the page, vertically aligned with the header but horizontally located where the top and right margins cross each other.

They also wanted special margins, so for those I've used the geometry package.

Here's an example of my current settings:

Code: Select all

\documentclass{article}
\usepackage[top=2cm, bottom=2cm, left=4cm, right=2cm]{geometry}
\pagestyle{myheadings}
\begin{document}
\section{NEW SECTION}
Blah blah blablablablah
\end{document}
I tried to see if fancyhdr had any options to solve this, but couldn't find any.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Page Number on Top of the right Margin

Post by localghost »

xJippu wrote:[…] However, my faculty wants it to appear in the upright corner of the page, vertically aligned with the header but horizontally located where the top and right margins cross each other. […]
This description is quite fuzzy. The place where top and right margin intersect is exactly the upper right corner of the text body. And this should be done by your generated page style. So a more detailed description of the wanted result could be helpful.
xJippu wrote:[…] I tried to see if fancyhdr had any options to solve this, but couldn't find any.
Then you are certainly able to show what you tried in form of a minimal example.


Thorsten
Post Reply