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}{\normalfont\scshape{Abstract}.}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\newcommand\shorttitle{The Short Title}
\newcommand\authors{Author A, Author B and AuthorC}
\fancyhf{}
\renewcommand\headrulewidth{0pt}
\fancyhead[C]{%
\ifodd\value{page}
\small\scshape\authors
\else
\small\scshape\shorttitle
\fi
}
\pagestyle{fancy}
\begin{document}
\title{My Paper}
\author{The Author}
\maketitle
\titleformat{\section}[block]{\filcenter\scshape}{\thesection.}{0.5em}{\titlecap}
\section{Introduction}
\lipsum[1-20]
\end{document}
\fancyhf{}and not added\thepageto either the head or the foot.\fancyfoot[C]{\thepage}would restore the default – David Carlisle Jan 19 '21 at 12:40\fancyhf{}etc from this answer: https://tex.stackexchange.com/questions/74034/page-header-alternatively-author-name-and-short-title but I'm not sure what he';s done, only that it worked. Would you mind quickly copying my MWO and editing it so it will work, in an answer? – A-Level Student Jan 19 '21 at 12:47\thepage? – A-Level Student Jan 19 '21 at 12:57\fancyfoot[C]{\thepage}just beforepagestyle{fancy}– Denis Jan 19 '21 at 14:28