TransWikia.com

How to make numbered pages

TeX - LaTeX Asked on July 21, 2021

Below is my MWE.

When I use this on Overleaf however, everything come out nicely apart from having numbered pages. None of the pages are numbered, apart from the very first. How can I make all the pages be numbered at the bottom centre of each page?

documentclass{article}
usepackage{fancyhdr}
usepackage{lipsum}% just to generate text for the example
usepackage[utf8]{inputenc}
usepackage{amssymb,amsmath,amsthm}
usepackage[runin]{abstract}
usepackage{titlesec}
usepackage{titlecaps}

renewcommand{abstractname}{normalfontscshape{Abstract}.}

newtheorem{theorem}{Theorem}
newtheorem{lemma}{Lemma}

newcommandshorttitle{The Short Title}
newcommandauthors{Author A, Author B and AuthorC}

fancyhf{}
renewcommandheadrulewidth{0pt}
fancyhead[C]{%
ifoddvalue{page}
  smallscshapeauthors
else
  smallscshapeshorttitle
fi
}
pagestyle{fancy}

begin{document}
title{My Paper}
author{The Author}
maketitle
titleformat{section}[block]{filcenterscshape}{thesection.}{0.5em}{titlecap}

section{Introduction}
lipsum[1-20]

end{document}

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