0

I've created a TikZ figure and compiled it to pdf. In my main TeX document, I include it using:

\documentclass[12pt,a4paper]{article}
% ...
\begin{figure}
    \centering
    \includegraphics{tikzfigure.pdf}
    \caption{My caption.}
    \label{fig:myfig}
\end{figure}

The figure is large enough to cover an entire page. How can I hide the page number on the page that the float ends up on?

Is there a better solution for including full-page TikZ figures?

2
  • Apologies if my question is poor, I didn't realise that. Should I include a screenshot or a MWE?
    – Anna
    Mar 20, 2023 at 14:22
  • 1
    You should always include a compilable MWE so people can reproduce your problem without having to modify your code. Mar 20, 2023 at 14:26

1 Answer 1

1

You could use the floatpag package to change the pagestyle for float pages:

\documentclass[12pt,a4paper]{article}

\usepackage{graphicx}
\usepackage{lipsum}

\usepackage{floatpag}
\floatpagestyle{empty} 

\begin{document}

\lipsum

\begin{figure}[p]
    \centering
    \includegraphics[height=.95\textheight,width=\textwidth]{example-image-duck}
    \caption{My caption.}
    \label{fig:myfig}
\end{figure}

\lipsum

\end{document}
4
  • Thank you. I use other floats in my paper that are more properly sized, so I'd like pages with those floats to still show the page number. Would you solution work for that?
    – Anna
    Mar 20, 2023 at 14:26
  • @Anna If you want to only change a single float page, you can use \thisfloatpagestyle{empty} Mar 20, 2023 at 14:27
  • That worked great, thank you!
    – Anna
    Mar 20, 2023 at 14:30
  • @Anna You're welcome! Mar 20, 2023 at 14:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .