2 列の文書内の 1 列の図: テキストと上下の配置

2 列の文書内の 1 列の図: テキストと上下の配置

2 列のドキュメント内の図フロートに縦長の画像があり、それを 1 列に単独で表示したいと考えています。画像の上部と図のキャプションの下部の両方をテキスト領域と垂直に揃えたいと思います。

現在私が行っているのは、図とキャプションの間の間隔を で手動で調整することです\captionsetup{skip=1.5cm}

skip手動で行うのではなく、図のキャプションが列内の残りの垂直スペースをすべて自動的に消費するようにする方法はありますか?

私の問題を説明するための MWE は次のとおりです。

\documentclass[twocolumn]{article}

\usepackage{lipsum} % for the MWE
\usepackage{caption, graphicx}

\begin{document}
\begin{figure}[!p]
    \captionsetup{skip=1.5cm}
    \centering
    \rule{\columnwidth}{0.9\textheight} % for the MWE
    %\includegraphics[width=1\columnwidth]{my_image} % what I do
    \caption{Some Caption}
\end{figure}
\lipsum % for the MWE
\end{document}

その結果は次のようになります:

ここに画像の説明を入力してください

答え1

minipage高さ の を使用し\textheight\vfillキャプションの前に を追加します。

\documentclass[twocolumn]{article}

\usepackage{lipsum} % for the MWE
\usepackage{caption,graphicx}

\begin{document}
\begin{figure}[!p]
    %\smallskip   %%if needed
     \begin{minipage}[t][\textheight]{\columnwidth}
    \centering
    \rule{\columnwidth}{0.9\textheight} % for the MWE
    %\includegraphics[height=0.9\textheight, width=\coulmnwidth]{example-image}    

    \vfill    %% leave that blank line above
    \caption{some caption}
    \end{minipage}
\end{figure}
\lipsum % for the MWE
\end{document}

ここに画像の説明を入力してください

関連情報