[Tex/LaTex] How to get this page layout (header and main text)

header-footerpage-numbering

This is what I need (for my thesis's bibliography):

  • page number: up right corner, 1.25 cm to the top, and 2 cm to the right.
  • main text: 4 cm to the left, 2 cm to the right.

Both the header and the main text should use Times New Roman, 12pt.

At the moment, I have the following code:

\documentclass{article}
\usepackage{cite}
\usepackage{fancyhdr}
\begin{document}

scroll down~~.
\cite{r1}
\cite{r2}
\cite{r3}
\newpage
\pagestyle{fancy}
%\fancyhead[C]{\sffamily\fontsize{29pt}{29pt}\selectfont%%\thepage} % I tried to change the size of the word but failed
\lhead{}
\chead{}
\rhead{\thepage}
\lfoot{}
\cfoot{}
\rfoot{}
\renewcommand{\headrulewidth}{0pt}
\pagenumbering{arabic}
\setcounter{page}{75}
\bibliographystyle{IEEEtranS}
\bibliography{mybibfile, IEEEabrv}
\end{document}

Hi again, I finally solve it by this code, the size, font of the page number is not changed, but it looks OK compared with the other parts of my thesis:

\documentclass[12pt,a4paper]{article} 
\usepackage{txfonts}

\usepackage{lipsum}     % generate paragraph randomly
\usepackage{geometry}   % manipulate the margins of the main text
\usepackage{titlesec}   % manipulate the header/footer


\newpagestyle{main}{            
    \sethead{}{}{\thepage}  % \thepage gives the page number
    \setfoot{}{}{}          % {left}{mid}{right}
    %\headrule              % underline for the header
    %\footrule              % underline for the foot

}

\geometry{left=4cm,right=2cm,top=2.5cm,bottom=2.5cm}  % set the page margin
\usepackage{cite}
\begin{document}
scroll down~~.
\cite{r1}
\cite{r2}
\cite{r3}

\newpage
\pagestyle{main}    %use the main style that has just been defined

\pagenumbering{arabic}
\setcounter{page}{68}  % the bibliography has its page number starts with 68

\bibliographystyle{IEEEtranS}
\bibliography{mybibfile, IEEEabrv}
\end{document}

Best Answer

Is this what you want?

\documentclass[12pt]{article}
\usepackage[right = 2cm, left = 4cm]{geometry}
\usepackage{lipsum}
\usepackage{fancyhdr}
%  Times New Roman-----------------------
\usepackage[T1]{fontenc}
\usepackage{mathptmx}
%----------------------------------------
\setlength{\topmargin}{-.507874in}
%  The standard margin is 1 in from the top 1 - .507874in = 1.25cm                  
\fancyhead[RH]{\thepage}
\pagestyle{fancy}
\begin{document}
\lipsum[1-6]
\end{document}

enter image description here

To have the the header be 1.25cm from the top, we need to be .49...in down or a \topmargin of -.507874in.


If you use the option top = 1.25cm from the geometry package, your document will look like (the image below). I imagine this is an undesirable outcome.

enter image description here