# Page count disappears after changing margins

I changed margins in my document midway to adjust for large figures, but at that point my page count disappeared altogether. Here is the code snippet :

\documentclass[12pt,twoside,onecolumn]{article}
\usepackage{graphicx}
\usepackage{a4}
\usepackage[margin=0.95in]{geometry}
\geometry{showframe}
\begin{document}
\section{Chapter 1}
\newpage\null
\section{Chapter 2}
\newpage\null

\newgeometry{left=3cm,bottom=0.1cm,top=2cm}
\section{Large figures}
\hspace{-2cm}\vspace{-5cm}\includegraphics[page = 1,scale = 0.9,angle=90]{fig1.pdf}

\hspace{-3cm}\vspace{-5cm}\includegraphics[page = 2,scale = 0.9,angle=90]{fig2.pdf}

\hspace{-2cm}\vspace{-5cm}\includegraphics[page = 3,scale = 0.9,angle=90]{fig3.pdf}
\restoregeometry % restore back previous settings
\newpage\null
\section{Chapter End}
\end{document}


I used showframe option to see how I changed the frames, and could see that for the figures that I used, the page number frame had disappeared. But for the remaining pages, it was back. However, there was still no page number on those pages.

• The bottom margin is too small, the page number is pushed below the paper edge. If you want to keep the space for the footer, use the includefoot option. Otherwise this is the space between the text area and the bottom of the paper, not between the footer and the bottom of the paper. \newgeometry{includefoot,left=3cm,bottom=0.1cm,top=2cm} – Pieter van Oostrum Nov 7 '16 at 12:57
• That worked perfectly. For some reason though, a blank page is created at \newgeometry command. That is, after the \newpage\null command, an additional page is created. – imranal Nov 7 '16 at 13:15
• @imranal \newgeometry always creates a page break. It is part of the command. – Dan Nov 8 '16 at 1:37
• @Dan I tried \let\cleardoublepage\clearpage but it could not remove the page break. Don't understand why someone found it necessary to add a blank page for simply adjusting margins through a document. – imranal Nov 10 '16 at 0:42

The following post happens to be relevant for this problem :

How to change geometry and remove page number from page containing one large figure only without automatically inserted blank page?

Instead of the newgeometry and afterpage stuff, use \includepdf

Here is a minimal code example :

\documentclass[12pt,twoside,onecolumn]{article}

\usepackage{a4}
\usepackage{pdfpages}
\usepackage[margin=0.95in]{geometry}
\geometry{showframe}
\begin{document}
\section{Chapter 1}
\newpage\null
\section{Chapter 2}
\newpage\null

\section{Large figures}
\includepdf[page = 1,scale = 0.9,angle=90]{page1.pdf}
\includepdf[page = 2,scale = 0.9,angle=90]{page2.pdf}
\includepdf[page = 3,scale = 0.9,angle=90]{page3.pdf}

\newpage\null
\section{Chapter End}

\end{document}