4

How can I remove the letters found before the captions made with \subbottom? The usual asterisk (like \caption*) doesn't seem to work.

\documentclass{memoir}% http://ctan.org/pkg/memoir
\usepackage{graphicx}% http://ctan.org/pkg/graphicx
\newsubfloat{figure}% Allow subfloats in figure environment
\begin{document}

\begin{figure}
  \centering
  \subbottom[Increase]{%
    \includegraphics[width=0.3\linewidth]{example-image-a}}
  \subbottom[Increase]{%
    \includegraphics[width=0.3\linewidth]{example-image-b}}
  \subbottom[Increase]{%
    \includegraphics[width=0.3\linewidth]{example-image-c}}
  \caption{Round}
\end{figure}

\end{document} 

The standard \subbottom command (as can be seen using the code above) creates subcaptions starting with (a),(b),(c) under each figure. I would like to have the caption without the indexing (a,b,c,etc).

1
  • 1
    Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – user31729
    Mar 2, 2015 at 16:02

3 Answers 3

3

You can locally or globally redefine the subcaption setup. Here's the “local” version that will affect only one figure environment.

\documentclass{memoir}% http://ctan.org/pkg/memoir

\usepackage{graphicx}% http://ctan.org/pkg/graphicx

\newsubfloat{figure}% Allow subfloats in figure environment

\begin{document}

\begin{figure}
\centering
\renewcommand{\thesubfigure}{}% no subfigure number
\tightsubcaptions % we want tight subcaptions
\setlength{\subfloatlabelskip}{0pt}% no space between number and caption

\subbottom[Increase]{%
  \includegraphics[width=0.3\linewidth]{example-image-a}}
\subbottom[Increase]{%
  \includegraphics[width=0.3\linewidth]{example-image-b}}
\subbottom[Increase]{%
  \includegraphics[width=0.3\linewidth]{example-image-c}}

\caption{Round}
\end{figure}

\end{document}

enter image description here

For the “global” version, the three lines after \centering should go in the preamble.

2

The simplest solution seems to be not to use the subbottom-command.

You could define a new command that typesets the minipage and the other stuff to save some typing.

\documentclass{memoir}% http://ctan.org/pkg/memoir
\usepackage{graphicx}% http://ctan.org/pkg/graphicx
\usepackage{showframe}
\newsubfloat{figure}% Allow subfloats in figure environment
\begin{document}

\begin{figure}
    \centering
    \subbottom[Increase]{%
        \includegraphics[width=0.3\linewidth]{example-image-a}
    }
    \subbottom[Increase]{%
        \includegraphics[width=0.3\linewidth]{example-image-b}
    }
    \subbottom[Increase]{%
        \includegraphics[width=0.3\linewidth]{example-image-c}
    }
    \caption{Round}
\end{figure}



Not using subbottom
\begin{figure}
    \centering
    \begin{minipage}{.3\linewidth}
        \centering
        \includegraphics[width=\linewidth]{example-image-a}\par
        Increase
    \end{minipage}\hfill
    \begin{minipage}{.3\linewidth}
        \centering
        \includegraphics[width=\linewidth]{example-image-b}\par
        Increase
    \end{minipage}\hfill
    \begin{minipage}{.3\linewidth}
        \centering
        \includegraphics[width=\linewidth]{example-image-c}\par
        Increase
    \end{minipage}
    \caption{Round}
\end{figure}

\end{document} 

If you really want to get rid of the numbers (letters) which are meant for referencing, add the following to the preamble.

\makeatletter
\@namedef{thesubfigure}{}
\makeatother
3
  • This looks ok. If it is not possible to remove the default numbering in subbottom captions, then I'll use this. It's weird, because, today I changed all my subfigures in subbottoms after reading that subcaption and memoir are not compatible. Now I'll have to do it all again because some default numbering... Mar 2, 2015 at 21:44
  • You want to globally remove those numbers? Let me have a look at it.
    – Johannes_B
    Mar 2, 2015 at 21:46
  • I would like to globally remove those numbers. I looked in the memoir manual, and didn't find such an option. Mar 2, 2015 at 21:55
1

Another option, since in comments it has been mentioned that this is desired as a global setting, would be to patch \@memsubcaption to suppress the label:

\documentclass{memoir}
\usepackage{graphicx}
\usepackage{etoolbox}

\newsubfloat{figure}

\makeatletter
\patchcmd{\@memsubcaption}{\@nameuse{@@the#1}}{}{}{}
\patchcmd{\@memsubcaption}{\@nameuse{@the#1}}{}{}{}
\makeatother

\begin{document}

\begin{figure}
  \centering
  \subbottom[Increase]{%
    \includegraphics[width=0.3\linewidth]{example-image-a}}
  \subbottom[Increase]{%
    \includegraphics[width=0.3\linewidth]{example-image-b}}
  \subbottom[Increase]{%
    \includegraphics[width=0.3\linewidth]{example-image-c}}
  \caption{Round}
\end{figure}

\end{document}

enter image description here

2
  • This does exactly what I wanted. Great job. I am curious how did you came up with this. Mar 3, 2015 at 11:00
  • @BeniBogosel I read the code in memoir.cls to see how captions for subfloats were handled and detected the proper place to do the modification. Mar 3, 2015 at 14:10

You must log in to answer this question.

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