不同頁面上不同位置的頁碼

不同頁面上不同位置的頁碼

我的文件中的頁碼有問題。我正在使用我的講師給我們所有人的模板,並且沒有觸及頁碼,但當您瀏覽文件時它們會出現在不同的位置。它位於第一頁頁面中心的底部,從那時起,數字一直位於右上角。我嘗試自己解決這個問題,但似乎無法解決,但這是我第一次使用 LaTeX。任何建議,將不勝感激。這是我目前在文檔頂部得到的內容:

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,graphicx,hyperref,parskip,gensymb,fancyhdr}
\usepackage[cm]{fullpage}
\setlength{\headsep}{0.6 cm}
\pagestyle{myheadings}

\begin{document}

我還嘗試\pagenumbering{gobble}擺脫它們(這有效),然後\pagestyle{arabic}將它們帶回來 - 希望它們都在同一個地方,但這不起作用。最好,我希望所有數字都位於頁面底部的中間。謝謝!

編輯:

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,graphicx,hyperref,parskip,gensymb,fancyhdr}
\usepackage[cm]{fullpage}
\setlength{\headsep}{0.6 cm}
\pagestyle{myheadings}

\begin{document}

\title{Modelling the Back End of a Bus}

\maketitle

\begin{abstract}
.....
\end{abstract}

\section{introduction}
....
\end{document}

答案1

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,graphicx,hyperref,parskip,gensymb,fancyhdr}
\usepackage[cm]{fullpage}
\setlength{\headsep}{0.6 cm}
\setlength{\headheight}{15pt}% comment this line and the next for no header
\addtolength{\textheight}{-15pt}
\usepackage{fancyhdr}
\pagestyle{fancy}
%   \renewcommand{\headrulewidth}{0pt}% if you don't want a rule
%   \fancyhf[lh,ch,rh]{}% for no header
%   \fancyhf[lh]{Something left}
%   \fancyhf[rh]{Something right}
%   \fancyhf[ch]{Something centre}

\title{Title}
\author{Author}

\begin{document}

\title{Modelling the Back End of a Bus}

\maketitle

\begin{abstract}
.....
\end{abstract}

\section{introduction}
....

\newpage

some text
\end{document}

精美的頁面樣式

答案2

使用fancyhdr

\documentclass{article}
\usepackage{fancyhdr}
\pagestyle{fancy}
\rheader{\thepage}
\begin{document}
Every page will be numbered with the numbers in the upper right hand corner.
\end{document}

相關內容