`Figure` 및 `table` 환경(`\intextsep`)의 위와 아래 공간을 로컬로 정의하는 것이 가능합니까?

`Figure` 및 `table` 환경(`\intextsep`)의 위와 아래 공간을 로컬로 정의하는 것이 가능합니까?

captions위와 아래의 수직 공간을 전역적으로 정의하는 방법과 지역적으로 정의하는 방법을 확립했는데 , \intextsep로컬에서도 정의할 수 있는 방법이 있는지 궁금합니다. 또한 package 에서 제공하는 매개변수를 floating사용하여 비활성화 했기 때문에 문제가 되지 않는다고 가정합니다 .Hfloat\textfloatsep

\documentclass{article}
\usepackage[demo]{graphicx} 
\setlength{\intextsep}{50.0pt plus 2.0pt minus 2.0pt}
\usepackage[font=small,skip=10pt]{caption}
\usepackage{float}

\begin{document}

Some text...

\begin{figure}[H]
\captionsetup{font=Large,skip=5pt}
\begin{center}
\includegraphics[height=1in,width=1in,angle=-90]{foo}
\caption{This is a figure.}
\end{center}
\end{figure}

... more text...

\begin{figure}[H]
\captionsetup{font=tiny,skip=15pt}
\begin{center}
\includegraphics[height=1in,width=1in,angle=-90]{foo}
\caption{This is another figure.}
\end{center}
\end{figure}

... still more text...
\newpage
Text...

\begin{table}[H]
\captionsetup{font=small,skip=10pt}
\centering
\caption{This is a table.}
\begin{tabular}{|c|c|}
\hline
    % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...
    1 & 2 \\
    4 & 7 \\
    \hline
\end{tabular}
\end{table}

... end of text.

\end{document}

답변1

내부에서 정의 \begingroup하고 \endgroup아래를 참조하여 20pt로 설정된 첫 번째 거리를 확인할 수 있습니다.

편집: @daleif가 질문에 댓글을 달고 \begin{centrer}추가 \end{center} 공간을 추가하면 필요하지 않으며 실제 공간이 늘어납니다. 그래서 \centering향후 방문자에게 더 나은 코드를 제공하기 위해 로 교체했습니다.

\documentclass{article}
\usepackage[demo]{graphicx} 
\setlength{\intextsep}{50.0pt plus 2.0pt minus 2.0pt}
\usepackage[font=small,skip=10pt]{caption}
\usepackage{float}

\begin{document}

Some text...

\begingroup
\setlength{\intextsep}{20.0pt plus 2.0pt minus 2.0pt}
\begin{figure}[H]
\captionsetup{font={Large},skip=5pt}
\centering
\includegraphics[height=1in,width=1in,angle=-90]{foo}
\caption{This is a figure.}
\end{figure}

... more text...
\endgroup

\begin{figure}[H]
\captionsetup{font={normalsize},skip=15pt}
\centering
\includegraphics[height=1in,width=1in,angle=-90]{foo}
\caption{This is another figure.}
\end{figure}

... still more text...
\newpage
Text...

\begin{table}[H]
\captionsetup{font=small,skip=10pt}
\centering
\caption{This is a table.}
\begin{tabular}{|c|c|}
\hline
    % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...
    1 & 2 \\
    4 & 7 \\
    \hline
\end{tabular}
\end{table}

... end of text.

\end{document}

관련 정보