.png)
subfig
및 을 사용하여 두 행의 하위 그림을 정렬하려고 합니다 floatrow
. 캡션도 원하는 대로 정렬되어 있고 개체의 수직 정렬도 괜찮습니다. 그러나 하위 그림 사이의 수평 간격을 균일하게 만드는 방법을 알 수 없습니다. 맨 아래 행에는 문제가 없습니다. 사이에 약간의 공백이 있는 2개의 숫자입니다. 괜찮은. 그러나 맨 윗줄에서는 두 번째와 세 번째 숫자 사이보다 처음 두 숫자 사이에 더 많은 공간이 있습니다. 그리고 나는 그 이유를 알 수 없습니다.
내가 무엇을 놓치고 있나요?
\documentclass{article}
\usepackage{graphicx,subfig}
\usepackage[heightadjust=all,valign=c]{floatrow}
\usepackage{fr-subfig}
\begin{document}
\begin{figure}[!htbp]
\captionsetup[subfigure]{justification=centering}
\floatbox{figure}{%
\caption{%
Components of the system: Penguins (\ref{fig:a}), Jumpers (\ref{fig:b}), Thingies (\ref{fig:c}), Cabbages (\ref{fig:d}) and Nuclear Warheads (\ref{fig:e})%
}\label{fig:x}%
}{%
\begin{subfloatrow}%
\subfloat[Penguins were here and here and here]{%
\includegraphics[height=.1\textheight]{example-image-a}\label{fig:a}}
\qquad
\subfloat[Penguin]{%
\includegraphics[height=.15\textheight]{example-image-b}\label{fig:b}}
\qquad
\subfloat[Penguin]{%
\includegraphics[height=.125\textheight]{example-image-a}\label{fig:c}}
\end{subfloatrow}
\begin{subfloatrow}
\subfloat[Penguin]{%
\includegraphics[height=.15\textheight]{example-image-b}\label{fig:d}}
\qquad
\subfloat[Penguins were here, there and everywhere!]{%
\includegraphics[height=.2\textheight]{example-image-a}\label{fig:e}}
\end{subfloatrow}}
\end{figure}
\end{document}
에 대한 대안을 알고 있습니다 subfig
. 에 사용할 수 있는 솔루션이 없으면 subfig
지금은 뭔가를 해킹하고 향후에는 다른 옵션을 살펴보겠습니다.
답변1
업데이트
subfloatrowsep
, 키 floatrowsep
를 사용하면 floatrow를 사용할 때 하위 부동(부동) 사이의 수평 분리를 제어할 수 있습니다. 그러나 단순히 다음과 같은 것을 사용하면
\thisfloatsetup{subfloatrowsep=qquad}
현재 코드에서는~ 아니다\subfloat
(패키지에서 ) 사용하고 있으므로 원하는 결과를 생성합니다 subfig
. 해결책은 대신 '를 사용하지 않고 \subfloat
사용하는 것입니다 . 이것은 만든다 floatrow
\ffigbox
\thisfloatsetup{subfloatrowsep=qquad}
예상대로 작동하고 카운터 문제도 해결합니다(자세한 내용은subfig 및 floatrow를 사용하여 하위 그림의 올바른 라벨링을 얻으려면 어떻게 해야 합니까?).
\documentclass{article}
\usepackage{graphicx,subfig}
\usepackage[heightadjust=all,valign=c]{floatrow}
\usepackage{fr-subfig}
\begin{document}
\thisfloatsetup{subfloatrowsep=qquad}
\begin{figure}[!htbp]
\captionsetup[subfigure]{justification=centering}
\ffigbox{%
\begin{subfloatrow}[3]%
\ffigbox[\FBwidth]{\caption{Penguins were here and here and here}\label{fig:a}}{%
\includegraphics[height=.1\textheight]{example-image-a}}
\ffigbox[\FBwidth]{\caption{Penguin}\label{fig:b}}{%
\includegraphics[height=.15\textheight]{example-image-b}}
\ffigbox[\FBwidth]{\caption{Penguin}\label{fig:c}}{%
\includegraphics[height=.125\textheight]{example-image-a}}
\end{subfloatrow}
\begin{subfloatrow}
\ffigbox[\FBwidth]{\caption{Penguin}\label{fig:d}}{%
\includegraphics[height=.15\textheight]{example-image-b}}
\ffigbox[\FBwidth]{\caption{Penguins were here, there and everywhere!}\label{fig:e}}{%
\includegraphics[height=.2\textheight]{example-image-a}}
\end{subfloatrow}%
}{%
\caption{Components of the system: Penguins (\ref{fig:a}), Jumpers (\ref{fig:b}), Thingies (\ref{fig:c}), Cabbages (\ref{fig:d}) and Nuclear Warheads (\ref{fig:e})\label{fig:x}}%
}
\end{figure}
\end{document}
출력:
초기 버전
또한 , 키를 사용하여 그림을 수평으로 배치하는 데 문제가 있었고 floatrow
키 floatrowsep
가 subfloatrowsep
항상 예상대로 작동하지 않는 것 같습니다.
문제가 있는 경우 작동하는 것으로 확인된 한 가지 옵션은 기본 분리를 종료한 다음 또는 다른 간격 명령을 subfloatrowsep=none
사용하여 분리를 수동으로 제어하는 것입니다(누군가는 자동으로 이를 처리할 것이라고 생각할 수도 있지만 항상 그런 것은 아닙니다). . 어쨌든 내 제안은 다음과 같습니다.\quad
subfloatrowsep=quad
\documentclass{article}
\usepackage{graphicx,subfig}
\usepackage[heightadjust=all,valign=c]{floatrow}
\usepackage{fr-subfig}
\begin{document}
\thisfloatsetup{subfloatrowsep=none}
\begin{figure}[!htbp]
\captionsetup[subfigure]{justification=centering}
\floatbox{figure}{%
\caption{%
Components of the system: Penguins (\ref{fig:a}), Jumpers (\ref{fig:b}), Thingies (\ref{fig:c}), Cabbages (\ref{fig:d}) and Nuclear Warheads (\ref{fig:e})%
}\label{fig:x}%
}{%
\begin{subfloatrow}%
\subfloat[Penguins were here and here and here]{%
\includegraphics[height=.1\textheight]{example-image-a}\label{fig:a}}%
\qquad
\subfloat[Penguin]{%
\includegraphics[height=.15\textheight]{example-image-b}\label{fig:b}}
\qquad
\subfloat[Penguin]{%
\includegraphics[height=.125\textheight]{example-image-a}\label{fig:c}}
\end{subfloatrow}
\begin{subfloatrow}
\subfloat[Penguin]{%
\includegraphics[height=.15\textheight]{example-image-b}\label{fig:d}}
\qquad
\subfloat[Penguins were here, there and everywhere!]{%
\includegraphics[height=.2\textheight]{example-image-a}\label{fig:e}}
\end{subfloatrow}}
\end{figure}
\end{document}