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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using subfigure to arrange 3by2 subfigures with captions each of them. Normally, the captions should look like this: (a) , (b). But instead they look like this: ((a)) , ((b)).

MWE:

\documentclass[a4paper, 10pt, openany]{memoir}
\usepackage[demo]{graphicx}

\usepackage{caption}
\usepackage{subcaption}

% Enable subfigures
\newsubfloat{figure}

% Section numbering depth
\maxtocdepth{subsection}
\maxsecnumdepth{subsection}

% Make floats name bold
\captionnamefont{\bfseries}

\captionstyle{\OnehalfSpacing}

\begin{document}

    \begin{figure}[t!] % "[t!]" placement specifier just for this example
        \begin{subfigure}{0.5\textwidth}
            \includegraphics[trim=15 3 32 20,clip,width=\linewidth]{pss_off_powr4072.eps}
            \subcaption{???? Power} \label{fig:pss_off_p4072}
        \end{subfigure}\hspace*{\fill}
        \begin{subfigure}{0.5\textwidth}
            \includegraphics[trim=15 3 32 20,clip,width=\linewidth]{pss_off_powr40414061.eps}
            \subcaption{????? Line Flow} \label{fig:pss_off_pflow}
        \end{subfigure}

        \medskip
        \begin{subfigure}{0.5\textwidth}
            \includegraphics[trim=15 3 32 20,clip,width=\linewidth]{stab2_powr4072.eps}
            \subcaption{?????? Power} \label{fig:stab2_p4072}
        \end{subfigure}\hspace*{\fill}
        \begin{subfigure}{0.5\textwidth}
            \includegraphics[trim=15 3 32 20,clip,width=\linewidth]{stab2_powr40414061.eps}
            \subcaption{???? Line Flow 4041-4061} \label{fig:stab2_pflow}
        \end{subfigure}

        \medskip
        \begin{subfigure}{0.5\textwidth}
            \includegraphics[trim=15 3 32 20,clip,width=\linewidth]{stab1_2_powr4072.eps}
            \subcaption{???????? Power} \label{fig:stab1_2_p4072}
        \end{subfigure}\hspace*{\fill}
        \begin{subfigure}{0.5\textwidth}
            \includegraphics[trim=15 3 32 20,clip,width=\linewidth]{stab1_2_powr40414061.eps}
            \subcaption{???????? Line Flow} \label{fig:stab1_2_pflow}
        \end{subfigure}

        \caption{Comparison} \label{fig:pss_comparison}
    \end{figure}

\end{document}
share|improve this question
    
Instead of what you have now, could you provide the community with a minimal working example (MWE) that replicates your current setup. It should start with \documentclass and end with \end{document} and not contain any unnecessary information; only stuff pertinent to replicate the current problem. That is, no need for mathtools, or enumitem, or <whatever>, as that doesn't play a part with sub-figures. – Werner Jan 22 at 21:15
    
the class does warn you that you are straying out of supported territory Class memoir Warning: You are using the caption package with the memoir class. memoir has its own mechanisms for caption formatting and if possible it's best to use those. (I don't really know memoir that well to give details) – David Carlisle Jan 22 at 21:46
    
see this for a memoir/subcaption setup that appears to work looking at the answer tex.stackexchange.com/questions/48837/… – David Carlisle Jan 22 at 21:49
    
For reference, none of the document class options are needed for this to be a minimal example. Neither are the ToC-related numbering reference, nor all the \labels. Finally, showing only two subfigures would suffice since it would highlight the problem equally well than displaying six subfigures. – Werner Jan 22 at 22:01
up vote 6 down vote accepted

When using subcaption with memoir there is no need to say \newsubfloat{figure}. Remove that line and it's seems to be fine.

\documentclass[a4paper, 10pt, openany]{memoir}
\usepackage[demo]{graphicx}

\usepackage{caption}
\usepackage{subcaption}

% Enable subfigures
%\newsubfloat{figure} %commented

% Section numbering depth
\maxtocdepth{subsection}
\maxsecnumdepth{subsection}

% Make floats name bold
\captionnamefont{\bfseries}

\captionstyle{\OnehalfSpacing}

\begin{document}

    \begin{figure}[t!] % "[t!]" placement specifier just for this example
        \begin{subfigure}{0.5\textwidth}
            \includegraphics[trim=15 3 32 20,clip,width=\linewidth]{pss_off_powr4072.eps}
            \subcaption{???? Power} \label{fig:pss_off_p4072}
        \end{subfigure}\hspace*{\fill}
        \begin{subfigure}{0.5\textwidth}
            \includegraphics[trim=15 3 32 20,clip,width=\linewidth]{pss_off_powr40414061.eps}
            \subcaption{????? Line Flow} \label{fig:pss_off_pflow}
        \end{subfigure}

        \medskip
        \begin{subfigure}{0.5\textwidth}
            \includegraphics[trim=15 3 32 20,clip,width=\linewidth]{stab2_powr4072.eps}
            \subcaption{?????? Power} \label{fig:stab2_p4072}
        \end{subfigure}\hspace*{\fill}
        \begin{subfigure}{0.5\textwidth}
            \includegraphics[trim=15 3 32 20,clip,width=\linewidth]{stab2_powr40414061.eps}
            \subcaption{???? Line Flow 4041-4061} \label{fig:stab2_pflow}
        \end{subfigure}

        \medskip
        \begin{subfigure}{0.5\textwidth}
            \includegraphics[trim=15 3 32 20,clip,width=\linewidth]{stab1_2_powr4072.eps}
            \subcaption{???????? Power} \label{fig:stab1_2_p4072}
        \end{subfigure}\hspace*{\fill}
        \begin{subfigure}{0.5\textwidth}
            \includegraphics[trim=15 3 32 20,clip,width=\linewidth]{stab1_2_powr40414061.eps}
            \subcaption{???????? Line Flow} \label{fig:stab1_2_pflow}
        \end{subfigure}

        \caption{Comparison} \label{fig:pss_comparison}
    \end{figure}

\end{document}
share|improve this answer

I would avoid using caption with memoir as it provides its own mechanism for setting sub-floats:

enter image description here

\documentclass{memoir}
\usepackage{graphicx}

% Enable subfigures
\newsubfloat{figure}

\begin{document}

\begin{figure}
  \hfill
  \subbottom[First subcaption]{%
    \includegraphics[width=3cm]{example-image-a}}
  \hfill
  \subbottom[Second subcaption]{%
    \includegraphics[width=3cm]{example-image-b}}
  \hfill\mbox{}
  \caption{A figure caption}
\end{figure}

\end{document}

You can change the formatting as well to suit your needs. See Chapter 10 Floats and captions of the memoir documentation.

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.