6

Like @brannerchinese here, I'd like to suppress the figure numbers for certain figures, but I'd like to do it within the context of the wrapfig and wrapfigure package/environment.

Being rather new at this, I don't really understand the answer that @GonzaloMedina gave him, so I can't generalize that, but I did try blindly copying and pasting the \newcommand\WLcaption[1]{ (et. al.) into my preamble just in case, and as I guessed, it didn't work (compile failed with error). Also tried \caption*{text} in case that had been implemented for wrapfig but also no joy.

Any ideas on how to do this? I just want a caption for some figures, but no figure numbers.

  • 1
    It would be helpful if you composed a fully compilable MWE including \documentclass and the appropriate packages that sets up the problem. While solving problems is fun, setting them up is not. Then those trying to help can simply cut and paste your MWE and get started on solving problem. – Peter Grill Nov 13 '12 at 22:21
5

The following code shows three options, all of them using features provided by the caption package: the first one, uses \caption*; the second one uses \captionsetup to declare the predefined labelformat=empty style to suppress the label; the third option uses \DeclareCaptionLabelFormat to define a caption format without number but keeping the "Figure" label:

\documentclass{article}
\usepackage{wrapfig}
\usepackage{caption}
\usepackage{lipsum}

\DeclareCaptionLabelFormat{nonumber}{#1}

\begin{document}
\begin{wrapfigure}{r}{3cm}
\centering
\rule{2cm}{2cm}
\caption*{Test figure}
\end{wrapfigure}
\lipsum[1]
\begin{wrapfigure}{r}{3cm}
\centering
\captionsetup{labelformat=empty}
\rule{2cm}{2cm}
\caption{Test figure}
\end{wrapfigure}
\lipsum[1]
\begin{wrapfigure}{r}{3cm}
\centering
\captionsetup{labelformat=nonumber}
\rule{2cm}{2cm}
\caption{Test figure}
\end{wrapfigure}
\lipsum[1]
\end{document} 

enter image description here

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.