27

Basically I have some text:

\section{Section 1}

TEXT TEXT TEXT

Then I have an image:

\begin{figure}
\centering
\includegraphics[scale=0.6]{images/rlexample.png}
\caption{---}
\label{rlexample}
\end{figure}

This image takes a whole page so it's printed on a new page.
I would like to don't have page number on this page (where there is the image)

I have tried this after \end{figure}:

\thispagestyle{empty}

But the page with text got no page number too.

How can I have page number on the page with text but not on the page with the image?

1
20

There are two ways: use afterpage or put \thispagestyle{empty} inside the figure environment as commented by Peter.

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{afterpage}
\usepackage{lipsum}
\begin{document}
Here is some text with an equation in it: $f(x)=x^2+3x_0\cdot\sin x$
and the textual content continues into the second line. No other math
content is contained within this paragraph.

\afterpage{%
\thispagestyle{empty}
\begin{figure}
\centering
\includegraphics[width=\textwidth]{images/rlexample.png}
\caption{---}
\label{rlexample}
\end{figure}
}

Here is some text with an equation in it: $f(x)=x^2+3x_0\cdot\sin x$
and the textual content continues into the second line. No other math
content is contained within this paragraph.

\lipsum[1-10]

\begin{figure}
\thispagestyle{empty}
\centering
\includegraphics[width=\textwidth]{images/rlexample.png}
\caption{---}
\label{rlexample}
\end{figure}
\lipsum[11-20]
\end{document}

Note: Putting thispagestyle{empty} inside figure environment may need some \clearpage at appropriate places and may not work properly if [p] in \begin{figure}[p] is used as noted by Enrico. I would advice the use of afterpage though.

The code supplied in comment:

\documentclass[a4paper,12pt,oneside]{article}
\usepackage[utf8]{inputenc}

\usepackage{enumerate}
\usepackage[demo]{graphicx}
\usepackage{afterpage}
\usepackage{lipsum}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{B02,
  author = {Buthor, B.},
  year = {2002},
  title = {Bravo},
}
\end{filecontents}

\title{42}
\author{Jane Doe}
\date{June 2011}

\begin{document}

\maketitle

\section{Introduction}

\subsection{text}

text text \cite{B02} texttext text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

\afterpage{%
\thispagestyle{empty}
\begin{figure}[p]
\centering
\vspace*{-3cm}
\includegraphics[scale=0.4]{image.jpg}
\caption{caption}
\label{rlexample}
\end{figure}
\clearpage
}

\lipsum[1-10]


\bibliographystyle{plain}
\bibliography{\jobname}
\end{document}
7
  • 7
    The \thispagestyle{empty} method doesn't work for a page of floats, but only for floats that end in the same page where they are declared. – egreg Nov 22 '12 at 21:59
  • @egreg: Yes it won't work. Added to the answer. Thank you :-) – user11232 Nov 22 '12 at 22:06
  • 6
    tried everything nothing worked – dynamic Nov 22 '12 at 22:11
  • Take this miminmal example: sharelatex.com/project/50aea3ac3f475e415a1219cf currently the image is printed after the References page – dynamic Nov 22 '12 at 22:23
  • 4
    When the page contains only a float, the "floatpag" package can be used: tex.stackexchange.com/a/33011/20929 – Erel Segal-Halevi Sep 10 '15 at 12:35
4

First add the package \usepackage{floatpag}.

Then you can use \thisfloatpagestyle{empty} within the figure environment. This will provide an empty page where the figure is.

2
  • 1
    add the package \usepackae{floatpag} to work the above said suggestion... – MadyYuvi Dec 14 '19 at 4:30
  • Thanks I added it – subjord Dec 15 '19 at 18:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.