子图标题用双括号括起来

子图标题用双括号括起来

我正在使用子图来排列 3by2 子图,每个子图都有标题。正常情况下,标题应如下所示:(a),(b)。但它们却看起来像这样:((a)),((b))。

梅威瑟:

\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}

答案1

subcaption使用with时memoir无需说\newsubfloat{figure}。删除该行似乎就没问题了。

\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}

答案2

我会避免使用captionmemoir因为它提供了自己的设置子浮点数的机制:

在此处输入图片描述

\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}

您也可以更改格式以满足您的需要。请参阅第章10 浮动和标题memoir文档

相关内容