我正在制作一个包含两列的文档;但是,我希望将第一页用作封面页,标题跨越两列,封面图片也跨两列。我尝试按如下方式操作,使用将floatrow
跨度图像居中:
\documentclass[11pt,twocolumn,landscape]{article}
\usepackage{floatrow}
\begin{document}
\twocolumn[
\centerline{\Large\bf Project Title}
\medskip
\centerline{\Large\bf Subheader}
\medskip
\centerline{\today}
\bigskip
]
\begin{figure*}
\includegraphics[width=\textwidth]{figure.jpg}
\label{fig:label}
\end{figure*}
\clearpage %to end the page
%other content
\end{document}
然而,这总是导致环境之前出现分页符figure*
——我无法让图像与标题位于同一页!添加[h]
或[H]
标签似乎不起作用。我应该怎么做才能让图像与上一个文本保持在同一页上?
答案1
您可以使用titlepage
环境
\documentclass[11pt,twocolumn,landscape]{article}
\usepackage{graphicx}
\usepackage{kantlipsum}
\begin{document}
\begin{titlepage}
\centering
{\Large\bfseries Project Title}
\medskip
{\Large\bfseries Subheader}
\medskip
{\today}
%\bigskip
\vfill
\includegraphics[width=0.5\textwidth]{example-image-a}
\end{titlepage}
\kant
\end{document}
使用\bfseries
已\bf
弃用的\centerline
TeX,在 LaTeX 中使用。此外,当您没有标题时,\centering
也不需要。\label
答案2
使用multicols
可能比基本的 LaTeX 更有用\twocolumn
。当然,图片被更改了,并缩小到在一页上显示所有内容(因此也\clearpage
评论了)。其余部分保持不变,但是许多人不喜欢\bf
LaTeX 文档。参见,例如使文本加粗/斜体的“正确”方法是什么?。
%\documentclass[11pt,twocolumn,landscape]{article}
\documentclass[11pt,landscape]{article}
%\usepackage{floatrow}
\usepackage{multicol}
\usepackage{graphicx}
\begin{document}
%\twocolumn[
\centerline{\Large\bf Project Title}
\medskip
\centerline{\Large\bf Subheader}
\medskip
\centerline{\today}
\bigskip
%]
\begin{figure*}[h]
%\includegraphics[width=\textwidth]{figure.jpg}
\includegraphics[width=0.7\textwidth]{it}
\label{fig:label}
\end{figure*}
%\clearpage %to end the page % Commented to show all on one page - PS
%other content
\begin{multicols}{2}
other content other content other content other content other content
other content other content other content other content other content
other content other content other content other content other content
other content other content other content other content other content
other content other content other content other content other content
other content other content other content other content other content
other content other content other content other content other content
other content other content other content other content other content
other content other content other content other content other content
other content other content other content other content other content
other content other content other content other content other content
other content other content other content other content other content
other content other content other content other content other content
other content other content other content other content other content
other content other content other content other content other content
\end{multicols}
\end{document}