0
votes

Page numbers show correctly up in the table of contents, but not on the pages. How can I make LaTex display them on the pages in the document?

I have tried changing the documentclass from report to article and adding the hyperref package.

\documentclass[12pt]{report}
\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}
\usepackage{setspace}
\usepackage{hyperref}
\usepackage[usenames, dvipsnames]{color}
\usepackage{titling}
\usepackage{mathtools}
\usepackage{times}
\usepackage{graphicx}
\usepackage{amsfonts}
\usepackage{booktabs}
\usepackage{hyperref}
\setlength{\droptitle}{-5em}
\setlength{\parindent}{1cm}
\renewcommand{\thesection}{\arabic{section}}
\begin{document}
\thispagestyle{empty}
\newpage
\tableofcontents
\thispagestyle{empty}


\newpage
\doublespacing
\setcounter{page}{1}
1
please make a minimal working example (MWE) that reproduces the problem instead of a code fragmentsamcarter_is_at_topanswers.xyz

1 Answers

0
votes

I do get page numbers in this minimal example, both for documentclass article as report:

\documentclass{report}
% \documentclass{article}
\begin{document}
\tableofcontents

\section{one}
\newpage
\section{two}
\newpage
\section{three}
\newpage
\end{document}

You may not get a page number because you explicitly say so using \thispagestyle{empty}. Report may also define the first page (of a chapter) as a page without regular head and foot, and hence also without number.

Hyperref has nothing to do with (printed) page numbers.