
写真は1枚ありますが、実際には2つの図の組み合わせです。そのため\includegraphics
、1回しか使用できません。それでも、左側と右側に2つのラベルを使用したいです。答えを探しましたが、見つかりませんでした。予想される結果の写真を送ります。助けていただけませんか?
答え1
minipage
セクション2に示されているように、空の にサブキャプションを付けることができます。ドキュメントsubcaption
。
\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}
\begin{document}
\begin{figure}
\centering
\includegraphics[width=0.5\textwidth]{example-image-a}
\begin{minipage}{0.25\textwidth}
\subcaption{\label{left} Left half}
\end{minipage}
\begin{minipage}{0.25\textwidth}
\subcaption{\label{right} Right half}
\end{minipage}
\caption{\label{figure} Overall caption}
\end{figure}
Figure~\ref{figure} has \ref{left} on the left, and \ref{right} on the right,
also known as \subref{left} and \subref{right}.
\end{document}