TeX - LaTeX Asked by bissi on May 13, 2021
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.
The number is overprinted over the image, but may not be visible depending on the colours:
probably the easiest way to move the footline is the geometry
package:
documentclass{article}
usepackage{graphicx,geometry}
begin{document}
aaa
bbbb
begin{figure}[p]
centering
includegraphics[height=.9paperheight]{example-image-9x16}
end{figure}
clearpage
newgeometry{textheight=1.3textheight}
begin{figure}[p]
centering
includegraphics[height=.9paperheight]{example-image-9x16}
end{figure}
clearpage
restoregeometry
end{document}
Answered by David Carlisle on May 13, 2021
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:
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{-6baselineskip}{thepage}}
renewcommand{headrulewidth}{0pt}% Remove header rule
}
begin{document}
lipsum[1-2]
begin{figure}[p]
thisfloatpagestyle{plainlower}
centering
includegraphics[height=1.1textheight]{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?
Answered by Werner on May 13, 2021
Vertically moving the page number up using the command vspace worked for me. E.g.
begin{figure}[p]
thisfloatpagestyle{plainlower}
centering
includegraphics[height=1.1textheight]{example-image-9x16}
caption{A very large figure}
end{figure}
vspace*{-6ex}
fillandplacepagenumber
Note this uses the fillandplacepagenumber command from: Alexander Perlis's Answer
Answered by Jurren de Groot on May 13, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP