하위 플로트로우 캡션의 세로 간격 조정(하위 캡션+플로트로우)

하위 플로트로우 캡션의 세로 간격 조정(하위 캡션+플로트로우)

\subfloatrow여러 행과 행 외부에 추가 항목이 포함된 그림의 하위 그림에 대한 하위 캡션을 조정하려고 합니다 \ffigbox.

하위 그림과 하위 캡션 사이, 하위 캡션과 그 아래 하위 그림 사이의 세로 간격을 어떻게 수정합니까? 하위 캡션이 해당 하위 그림에 더 가깝고 그 아래의 하위 그림에서 조금 더 떨어져 있기를 바랍니다.

하위 캡션이 있는 행의 하위 그림

암호:

\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage[valign=c,heightadjust=all]{floatrow}
\begin{document}
\begin{figure}
  \centering
  \captionsetup[subfloatrow]{font+={footnotesize}}%
  \floatbox{figure}{%
    \begin{subfloatrow}[2]
      \ffigbox[\FBwidth]{%
        \includegraphics[height=8em]{example-image-a}}{\caption*{Sub-Caption}}
      \ffigbox[\FBwidth]{%
        \includegraphics[height=8em]{example-image-a}}{\caption*{Sub-Caption}}
    \end{subfloatrow}

    \begin{subfloatrow}[3]
      \ffigbox[\FBwidth]{%
        \includegraphics[height=8em]{example-image-a}}{\caption*{Sub-Caption}}
      \ffigbox[\FBwidth]{%
        \includegraphics[height=8em]{example-image-a}}{\caption*{Sub-Caption}}
      \ffigbox[\FBwidth]{%
        \includegraphics[height=8em]{example-image-a}}{\caption*{Sub-Caption}}
    \end{subfloatrow}

    \begin{subfloatrow}[3]
      \ffigbox[\FBwidth]{%
        \includegraphics[height=8em]{example-image-a}}{\caption*{Sub-Caption}}
      \ffigbox[\FBwidth]{%
        \includegraphics[height=8em]{example-image-a}}{\caption*{Sub-Caption}}
      \ffigbox[\FBwidth]{%
        \includegraphics[height=8em]{example-image-a}}{\caption*{Sub-Caption}}
    \end{subfloatrow}

    \begin{subfloatrow}[2]
      \ffigbox[\FBwidth]{%
        \includegraphics[height=8em]{example-image-a}}{\caption*{Sub-Caption}}
      \ffigbox[\FBwidth]{%
        \includegraphics[height=8em]{example-image-a}}{\caption*{Sub-Caption}}
    \end{subfloatrow}

    \ffigbox{%
      \includegraphics[height=8em]{example-image-a}}{\subcaption*{Sub-Caption}}
  }{%
    \caption{Caption}\label{fig:label}%
  }
\end{figure}
\end{document}

건트램의 질문비슷하지만 2년이 넘도록 답변이 없습니다. 의견의 제안은 의 사용을 포기하는 것입니다 floatrow. 그러나 이것은 caption/ 패키지 와 함께 작동하는 것으로 가정됩니다 subcaption. 적어도 문서에는 그렇게 나와 있습니다.

그러나 나는 의 문서가 전혀 쉽지 않다고 생각하며 - - 가 어떻게 함께 잘 작동하도록 의도되었는지 floatrow실제로 알 수 없습니다 .captionsubcaptionfloatrow

답변1

행 사이의 수직 간격 제어는 문서에 잘 숨겨져 있습니다. 를 통해 키를 선언하고 \DeclareFloatVCode를 사용하여 적용하도록 요청해야 합니다 \floatsetup{rowpostcode= …}. 글꼴 크기는 를 통해 변경할 수 있으며 \captionsetup[subfigure], 그림과 캡션 사이의 수직 건너뛰기는 으로 해결됩니다 \floatsetup{captionskip= …}.

다음은 (끔찍한) 예입니다.

\documentclass{article}
\usepackage[showframe, margin=25mm]{geometry}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage[,heightadjust=all]{floatrow}

\DeclareFloatVCode{largevskip}%
{\vskip 20pt}
\floatsetup{captionskip=0pt,rowpostcode =largevskip, valign=c }%
\captionsetup[subfigure]{font =Large}

\begin{document}
\begin{figure}
  \centering-%
  \floatbox{figure}{%
    \begin{subfloatrow}[2]
      \ffigbox[\FBwidth]{%
        \includegraphics[height=8em]{example-image-a}}{\caption*{Sub-Caption}}
      \ffigbox[\FBwidth]{%
        \includegraphics[height=8em]{example-image-a}}{\caption*{Sub-Caption}}
    \end{subfloatrow}

    \begin{subfloatrow}[3]
      \ffigbox[\FBwidth]{%
        \includegraphics[height=8em]{example-image-a}}{\caption*{Sub-Caption}}
      \ffigbox[\FBwidth]{%
        \includegraphics[height=8em]{example-image-a}}{\caption*{Sub-Caption}}
      \ffigbox[\FBwidth]{%
        \includegraphics[height=8em]{example-image-a}}{\caption*{Sub-Caption}}
    \end{subfloatrow}

    \begin{subfloatrow}[3]
      \ffigbox[\FBwidth]{%
        \includegraphics[height=8em]{example-image-a}}{\caption*{Sub-Caption}}
      \ffigbox[\FBwidth]{%
        \includegraphics[height=8em]{example-image-a}}{\caption*{Sub-Caption}}
      \ffigbox[\FBwidth]{%
        \includegraphics[height=8em]{example-image-a}}{\caption*{Sub-Caption}}
    \end{subfloatrow}

    \begin{subfloatrow}[2]
      \ffigbox[\FBwidth]{%
        \includegraphics[height=8em]{example-image-a}}{\caption*{Sub-Caption}}
      \ffigbox[\FBwidth]{%
        \includegraphics[height=8em]{example-image-a}}{\caption*{Sub-Caption}}
    \end{subfloatrow}

    \ffigbox{%
      \includegraphics[height=8em]{example-image-a}}{\subcaption*{Sub-Caption}}
  }{%
    \caption{Caption}\label{fig:label}%
  }
\end{figure}
\end{document} 

여기에 이미지 설명을 입력하세요

관련 정보