Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
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
    
Thank you. Will do henceforth. –  TeXnewbie Nov 13 '12 at 23:08

1 Answer 1

up vote 2 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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