
私は論文で多くのサブ図を使用しています。今気づいたのですが、隣接するサブ図間のキャプションが非常に近いため、読みにくくなっています。
私の質問は次の2つです。
(1)2つのサブ図の間のデフォルトの距離を増やすにはどうすればよいですか?
または
(2)サブ図のキャプションのデフォルトの幅を小さくするにはどうすればよいでしょうか?
コード例:
\usepackage{subfigure}
...
\begin{figure}[h!t]
\centering
\subfigure[long long caption]{
\includegraphics{filename1}
}
\subfigure[another long caption]{
\includegraphics{filename2}
}
\caption{two subfigures}
\end{figure}
THX
答え1
使用するsubfig
、 subcaption
またはsubfigure
パッケージ (この最後のものは実際には CTAN では非推奨です) によって異なります。
非推奨の例subfigure
:
\documentclass[spanish,11pt]{article}
\usepackage{babel}
\usepackage[utf8]{inputenc}
% Compare between loose and normal option in the fig. 1
% (see more options in the documentation)
\usepackage[normal]{subfigure}
% \usepackage[loose]{subfigure}
% Compare fig. 1 and 2. subcaptions fixing this value
\subfigcapmargin = .5cm
% Fix these other commands as you want and see
% \subfigtopskip = 2cm
% \subfigcapskip = 2cm
% \subfigcaptopadj = 7cm % when caption is above
% \subfigbottomskip = 2cm
% \subfiglabelskip = 2cm
% See fig 3 to 6 examples of set distances
% between subfigures
% (there are not any space default, as far I know)
\begin{document}
\begin{figure}%
\centering
\subfigure[subcaption aa aa aa aa]{\framebox{... ... figure text ... ...}}
\subfigure[subcaption bb bb bb bb]{\framebox{... ... figure text ... ...}}
\caption[The caption]{The caption}
\end{figure}
\subfigcapmargin = .0cm
\begin{figure}%
\centering
\subfigure[subcaption aa aa aa aa]{\framebox{... ... figure text ... ...}}
\subfigure[subcaption bb bb bb bb]{\framebox{... ... figure text ... ...}}
\caption[The caption]{The caption}
\end{figure}
\begin{figure}%
%\centering
\subfigure[subcaption]{\framebox{... figure text ...}}\hfill
\subfigure[subcaption]{\framebox{... figure text ...}}
\caption[The caption]{The caption}
\end{figure}
\begin{figure}%
%\centering
\subfigure[subcaption]{\framebox{... figure text ...}}\qquad
\subfigure[subcaption]{\framebox{... figure text ...}}
\caption[The caption]{The caption}
\end{figure}
\begin{figure}%
\centering
\subfigure[subcaption]{\framebox{... figure text ...}}
\hspace{3cm}
\subfigure[subcaption]{\framebox{... figure text ...}}
\caption[The caption]{The caption}
\end{figure}
\begin{figure}%
\centering
\subfigure[subcaption]{\framebox{... figure text ...}}
\\\hspace{5cm}\vspace{1cm}
\subfigure[subcaption]{\framebox{... figure text ...}}
\caption[The caption]{The caption}
\end{figure}
\end{document}
別の解決策としては、サブキャプション パッケージ (サブフィギュアとは互換性がありません) をそのまま、またはいくつかのオプションを付けて使用することです。サブフィギュア間の間隔は他のフロートと同じであるためです。例:
\documentclass{article}
\usepackage{subcaption}
\usepackage[margin=20pt,
font+=small,labelformat=parens,labelsep=space,
skip=6pt,list=false,hypcap=false
]{subcaption}
\begin{document}
\begin{figure}%
\centering
\begin{subfigure}[h]{0.3\textwidth}
\framebox{... figure text ...}
\caption{subcaption}
\end{subfigure}
\begin{subfigure}[h]{0.3\textwidth}
\framebox{... figure text ...}
\caption{subcaption}
\end{subfigure}%
\caption[The caption]{Subfigures with default space and too much margin in subcaptions}
\end{figure}
\begin{figure}%
\centering
\begin{subfigure}[h]{0.3\textwidth}
\framebox{... figure text ...}
\caption{subcaption}
\end{subfigure}
\hspace{0.3\textwidth}
\begin{subfigure}[h]{0.3\textwidth}
\framebox{... figure text ...}
\caption{subcaption}
\end{subfigure}%
\caption[The caption]{Subfigures with extra space}
\end{figure}
\end{document}
同様に、subfig
パッケージを使用すると、コマンドを使用してサブフロート間のスペースを制御することも、多くのサブキャプション オプションを制御することもできます\qquad
。パッケージのドキュメントを参照してください。
\documentclass{article}
\usepackage[margin=40pt]
{subfig}
\begin{document}
\begin{figure}%
\centering
\subfloat[][subcaption aa aa aa ]{\framebox{... ... figure text ... ... }}%
\qquad
\subfloat[][subcaption bb bb bb ]{\framebox{... ... figure text ... ... }}%
\caption{The caption}%
\label{fig:cont}%
\end{figure}
\end{document}