1

I am using the report class. On one page of my thesis I have a large figure, so LaTeX does not provide a page number as the caption and figure cover the most amount of space.

How can I force a page number to be there, without making the figure or caption smaller? There are margins on the bottom of the page with empty white space so it is not like there is no space on the page at all. Worst case the page number could even be a bit lower than the rest of the pages in the thesis.

Werner
  • 603,163
bissi
  • 139
  • How do you place the figure? Do you use \begin{figure}[p] ... \end{figure}? – Werner Sep 07 '16 at 19:04
  • @Werner Yes. I use [htb] though. – bissi Sep 07 '16 at 19:16
  • if it is that large why are you preventing it from being placed on a page on its own by using [htb] ???? – David Carlisle Sep 07 '16 at 19:19
  • latex will be printing the page number but then (presumably) over-printing the number with the over-large image, you (presumably) got warnings about the page being over-full? – David Carlisle Sep 07 '16 at 19:20
  • @DavidCarlisle Yes latex is presumably overprinting the number with the image. How can I still force a page number to be visible, perhaps manually? – bissi Sep 07 '16 at 19:36
  • @DavidCarlisle Even if I use [p] the problem does not solve. – bissi Sep 07 '16 at 19:37
  • it would be rather easier if you gave some clues, preferably a test document or at least confirm the warning you got from latex eg LaTeX Warning: Float too large for page by 55.00336pt on input line 9. which would be an indication of how far to move the number – David Carlisle Sep 07 '16 at 19:48
  • As a manual solution, I simply forced page numbers to be added via Adobe Acrobat. So I am closing the question. – bissi Sep 07 '16 at 20:49

3 Answers3

2

The number is overprinted over the image, but may not be visible depending on the colours:

enter image description here

probably the easiest way to move the footline is the geometry package:

enter image description here

\documentclass{article}
\usepackage{graphicx,geometry}
\begin{document}

aaa

bbbb


\begin{figure}[p]
\centering
\includegraphics[height=.9\paperheight]{example-image-9x16}


\end{figure}


\clearpage

\newgeometry{textheight=1.3\textheight}

\begin{figure}[p]
\centering
\includegraphics[height=.9\paperheight]{example-image-9x16}


\end{figure}

\clearpage

\restoregeometry

\end{document}
David Carlisle
  • 757,742
1

Firstly, I'd suggest setting the float using

\begin{figure}[p]
  % figure content here
\end{figure}

This would allow the float to be placed within the text, yet float to a page on its own. Secondly, use fancyhdr to design a float-specific page style that sets the page number lower than usual. Finally, use floatpag to specify this new float page style for that specific float:

enter image description here

\documentclass{article}

\usepackage{graphicx,floatpag,fancyhdr}
\usepackage{lipsum}

% This defines the fancy page style to be similar to plain
\pagestyle{fancy}
\fancyhf{}% Clear header/footer
\fancyfoot[C]{\thepage}
\renewcommand{\headrulewidth}{0pt}% Remove header rule

% Page style plainlower is similar to plain, but lowers page number by 6 lines of text
\fancypagestyle{plainlower}{
  \fancyhf{}% Clear header/footer
  \fancyfoot[C]{\raisebox{-6\baselineskip}{\thepage}}
  \renewcommand{\headrulewidth}{0pt}% Remove header rule
}

\begin{document}

\lipsum[1-2]

\begin{figure}[p]
  \thisfloatpagestyle{plainlower}
  \centering
  \includegraphics[height=1.1\textheight]{example-image-9x16}
  \caption{A very large figure}
\end{figure}

\lipsum[3-10]

\end{document}

Related reference: Suppress page number for a single page that only contains one large table?

Werner
  • 603,163
0

Vertically moving the page number up using the command vspace worked for me. E.g.

\begin{figure}[p]
\thisfloatpagestyle{plainlower}
  \centering
  \includegraphics[height=1.1\textheight]{example-image-9x16}
  \caption{A very large figure}
\end{figure}

\vspace*{-6ex} \fillandplacepagenumber

Note this uses the fillandplacepagenumber command from: Alexander Perlis's Answer

  • Welcome to TeX.SX! Your answer would be even more useful if the example you provided was complete, that is, if it could be compiled by itself. – Vincent Apr 01 '21 at 13:50