2

I am using following commands for page number in the upper right corner 0.5 inch from the top and 1 inch from the right edge of the paper. How to update the below mentioned command to get that setting.

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyheadoffset{0cm}
\renewcommand{\headrulewidth}{0pt} 
\renewcommand{\footrulewidth}{0pt}
\fancyhead[R]{\thepage}
\fancypagestyle{plain}{%
\fancyhf{}%
\fancyhead[R]{\thepage}%
}
6
  • If it is only page number, there are other easy methods like eso-pic and background etc. Are you interested?
    – user11232
    Commented Feb 10, 2015 at 2:53
  • 1
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.
    – user11232
    Commented Feb 10, 2015 at 2:54
  • Please complete your code snippet to a minimal working example (MWE). Solutions will depend on your documentclass and how you set-up page dimensions. Commented Feb 10, 2015 at 8:53
  • @HarishKumar Better then nothing i guess, do you want to answer?
    – Johannes_B
    Commented Jun 19, 2015 at 11:31
  • @HarishKumar I bet this one will get into the answer the unanswered queue tomorrow/tonight.
    – Johannes_B
    Commented Aug 1, 2015 at 2:02

1 Answer 1

3

While you have many options like eso-pic etc, here is one with background package.

\documentclass[12pt]{article}
\usepackage{background}
\usepackage{kantlipsum}
\backgroundsetup{
        position=current page.north east,
        nodeanchor=north east,
        hshift=-1in,            
        vshift=-0.5in,
        angle=0,
        firstpage=true,
        scale=1,
        opacity=1,
        color=black,
        contents={\thepage},
}
\pagestyle{empty}
\begin{document}
  \kant[1-100]
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .