サブ図の番号から (a)、(b) を削除しますが、サブ図のキャプションは保持しますか?

サブ図の番号から (a)、(b) を削除しますが、サブ図のキャプションは保持しますか?

サブ図環境のラベルについて質問があります。(a) と (b) を削除して、代わりに何か他のものを挿入したいと思います。この「新しい」キャプションはサブ図ごとに異なり、論理カウンターではありません (つまり、i、ii などではありません)。どなたか助けていただけませんか?

現在の状況(上)と、理想の姿(下)を示す図を追加しました。

図の上の行が現在の状態、下の行が理想の状態です。

答え1

サブキャプション テキストをサブ図の下に重ねるだけです。 を希望のサイズに変更するだけで、サブキャプションのフォント サイズを変更できます\footnotesize。図とキャプションの間のギャップは、 のオプション引数によって制御され\stackunder、この例では に設定されています5pt(デフォルトは 3pt)。

この手法では、サブキャプションは自動的に折り返されないことに注意してください。あなたの場合、サブキャプションは短いラベルなので、折り返す必要はありませんでした。折り返しが必要な場合は、 の最後の引数を\stackunderにすることができます\parbox

(a)さらに、、を削除したいということは(b)、個々のサブ図を個別に参照する必要はないと想定しました。全体の図は、 を使用して参照できます\ref{}

\documentclass{article}
\usepackage{stackengine}
\usepackage[demo]{graphicx}
\begin{document}
\begin{figure}
\footnotesize
\stackunder[5pt]{\includegraphics[width=2in,height=.7in]{fileA}}{MRI-CGCM3}%
\hspace{1cm}%
\stackunder[5pt]{\includegraphics[width=2in,height=.7in]{fileB}}{NorESM1-M}
\caption{November to April}
\end{figure}
\end{document}

ここに画像の説明を入力してください

答え2

使用できます

\captionsetup[subfigure]{labelformat=empty}

ローカル:

\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}

\begin{document}

\begin{figure}
\captionsetup[subfigure]{labelformat=empty}
\begin{subfigure}{.5\textwidth}
\centering
\includegraphics[height=3cm]{example-image-a}
\caption{Test subfigure 1}
\end{subfigure}%
\begin{subfigure}{.5\textwidth}
\centering
\includegraphics[height=3cm]{example-image-b}
\caption{Test subfigure 2}
\end{subfigure}%
\caption{Two subfigures}
\end{figure}

\end{document}

ここに画像の説明を入力してください

別のオプションとしては、\caption*の代わりにを使用することです\caption

\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}

\begin{document}

\begin{figure}
\begin{subfigure}{.5\textwidth}
\centering
\includegraphics[height=3cm]{example-image-a}
\caption*{Test subfigure 1}
\end{subfigure}%
\begin{subfigure}{.5\textwidth}
\centering
\includegraphics[height=3cm]{example-image-b}
\caption*{Test subfigure 2}
\end{subfigure}%
\caption{Two subfigures}
\end{figure}

\end{document}

答え3

と同様にsubcaptionsubfigパッケージにも同じオプションがあります。

\documentclass{article}
\usepackage{graphicx,subfig}
\begin{document}
\captionsetup[subfigure]{labelformat=empty}
\begin{figure}
\centering
\subfloat[Test subfigure 1]{\includegraphics[width=.4\linewidth]{example-image-a}}
\hfill
\subfloat[Test subfigure 2]{\includegraphics[width=.4\linewidth]{example-image-b}}
\caption{Two subfigures}
\end{figure}
\end{document}

しかし、サブフロートキャプションの番号付けが必要ない場合は、 または を使用する理由がまだありますsubcaptionsubfig?

たとえば、2 つの列だけで同じ結果を得ることができます。

\documentclass{article}
\usepackage{graphicx,multicol}
\begin{document}
\begin{figure}
\begin{multicols}{2}
\centering
\includegraphics[width=.7\linewidth]{example-image-a}\\
Test subfigure 1
\includegraphics[width=.7\linewidth]{example-image-b}\\
Test subfigure 2
\end{multicols}
\caption{Two subfigures}
\end{figure}
\end{document}

ムウェ

答え4

ラベルを1つだけ削除する必要がある場合がありました。サブフィギュアを宣言するときに、\emptyその特定のサブフィギュアの文字を削除する追加を行うことができます。

\documentclass{article}
\usepackage{graphicx,multicol}
\begin{document}
   \begin{figure}
       \begin{multicols}{2}
            \centering
            \includegraphics[\empty]{example-image-a}
            \includegraphics[\empty]{example-image-b}
        \end{multicols}
    \caption{Two subfigures}
    \end{figure}
\end{document}

関連情報