將標題放在相鄰行中

將標題放在相鄰行中

在兩列文件中,我有 1 列長的圖形。因此,標題不適合其下方。如何將標題放置在相鄰列?請參考圖片進行說明:

在此輸入影像描述

答案1

您可以使用capt-of(或者caption) 依下列方式放置暫時浮動標題:

\captionof{<type>}[<toc entry>]{<caption>}

以下最小範例使用上述建議,但很大程度上依賴文件佈局:

在此輸入影像描述

\documentclass[twocolumn]{article}

\usepackage{capt-of,graphicx}
\usepackage{lipsum}

\begin{document}

\section{A section}
\lipsum[2-3]\lipsum[3]

\captionof{figure}{This is a figure caption}

\begin{figure}[t]
  \includegraphics[width=\columnwidth,height=.99\textheight]{example-image}
\end{figure}

\clearpage

\lipsum[4-7]

\end{document}

相關內容