1

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}%
}
  • If it is only page number, there are other easy methods like eso-pic and background etc. Are you interested? – user11232 Feb 10 '15 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 Feb 10 '15 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. – Andrew Swann Feb 10 '15 at 8:53
  • @HarishKumar Better then nothing i guess, do you want to answer? – Johannes_B Jun 19 '15 at 11:31
  • @HarishKumar I bet this one will get into the answer the unanswered queue tomorrow/tonight. – Johannes_B Aug 1 '15 at 2:02
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.