0

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?

5
  • 1
    The title page by default uses the plain pagesstyle. Try adding \thispagestyle{fancy} or redefine the plain page style with fancyhdr.
    – Bernard
    May 11, 2021 at 19:51
  • although this works, I have a running header on the left which I do not want on the title page as well as the line. How would I redefine the plain page style? Thanks
    – Zerender
    May 11, 2021 at 19:57
  • Do you want a header rule for this title page?
    – Bernard
    May 11, 2021 at 20:00
  • I think that should work, how would I add the header though without the line showing up
    – Zerender
    May 11, 2021 at 22:48
  • It is explained in the documentation of fancyhdr (p.13): \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} .
    – Bernard
    May 12, 2021 at 9:34

2 Answers 2

1

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}

enter image description here

0

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}}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .