TransWikia.com

How to place page number in top right corner of title page using scartcl class

TeX - LaTeX Asked by Zerender on June 7, 2021

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

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

Answered by Pieter van Oostrum on June 7, 2021

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

Answered by esdd on June 7, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP