I was able to place page numbers on all other pages using \rhead{\thepage} but the page number on the title page is on the bottom middle. I am using \pagestyle{fancy}. How do I place the page number in the top right?
2 Answers
With a KOMA-Script class it is recommended to use package scrlayer-scrpage
for header and footer.
Example:
\documentclass{scrartcl}
\usepackage{blindtext}% only for dummy text
\usepackage[automark,headsepline,markcase=upper]{scrlayer-scrpage}% sets page style scrheadings automatically
\clearpairofpagestyles
\ihead{\rightmark}
\ohead*{\pagemark}% short version of \ohead[\pagemark]{\pagemark}
\addtokomafont{pagehead}{\normalfont}
\begin{document}
\title{Title}
\author{Author}
\maketitle
\blinddocument
\end{document}
You could use
\fancypagestyle{plain}{}
This makes page style plain
the same as fancy
.
The second (empty) parameter can be used to add additional definitions if you want plain
to be a little different from fancy
. So if you don't want the running header on the left, and not the line, use
\fancypagestyle{plain}{\fancyhead[R]{}\renewcommand{\headrulewidth}{0pt}}
plain
pagesstyle. Try adding\thispagestyle{fancy}
or redefine the plain page style with fancyhdr.\renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt}
.