兩列文件中的一列圖形:與文字頂部和底部對齊

兩列文件中的一列圖形:與文字頂部和底部對齊

我在兩列文件中的數位浮動中有一個高圖像,我希望將其單獨放在一列中。我希望圖像的頂部和圖形標題的底部都與文字區域垂直對齊。

我目前所做的是手動調整圖形和標題之間的間距\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高度為 的a \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}

在此輸入影像描述

相關內容