ページ番号はページによって位置が異なります

ページ番号はページによって位置が異なります

ドキュメントのページ番号に問題があります。講師から全員に渡されたテンプレートを使用しており、ページ番号には手を加えていませんが、ドキュメントを読み進めていくと、ページ番号がさまざまな場所に表示されます。最初のページではページ下部の中央にあり、それ以降は右上隅に番号が続きます。自分で修正しようとしましたが、どうやらできないようです。ただし、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}

関連情報