我正在使用 bioinfo.cls(来自《生物信息学》杂志)。它创建了两列格式。有时发生的一个问题是,页面右侧的文本仅在页面左侧图形结束的垂直水平处开始。以下图像显示了这一点:
下面是我的问题的示例代码,它也创建了上面的示例图像:
\documentclass{bioinfo}
\copyrightyear{2015} \pubyear{2015}
\access{Advance Access Publication Date: Day Month Year}
\appnotes{Manuscript Category}
\usepackage{blindtext}
\begin{document}
\firstpage{1}
\subtitle{Subject Section}
\title[Title]{Title}
\author[Sample \textit{et~al}.]{Author\,$^{\text{\sfb 1,}*}$, Author 2\,$^{\text{\sfb 2}}$}
\address{$^{\text{\sf 1}}$Address, \\
$^{\text{\sf 2}}$Address 2}
\corresp{$^\ast$To whom correspondence should be addressed.}
\history{Received on XXXXX; revised on XXXXX; accepted on XXXXX}
\editor{Associate Editor: XXXXXXX}
\abstract{\blindtext}
\maketitle
\section{Introduction}
\blindtext
\section{Section 1}
\blindtext
\begin{figure}[!tpb]
\centerline{\includegraphics[width=\columnwidth]{panda.jpg}}
\caption{Caption text.
\label{panda}}
\end{figure}
\begin{figure}[!tpb]
\centerline{\includegraphics[width=\columnwidth]{panda.jpg}}
\caption{Caption text.
\label{panda2}}
\end{figure}
\blindtext
\section{Section 2}
\blindtext
\blindtext
\blindtext
\blindtext
\blindtext
\blindtext
\begin{figure}[h!tb]
\centerline{\includegraphics[width=\columnwidth]{panda.jpg}}
\caption{Panda.
\label{panda3}}
\end{figure}
\end{document}
我该如何解决这个问题?任何想法都将不胜感激!
附注:下面是 panda.jpg 的副本:
编辑解决方案:
我想我找到了解决方案。在 bioinfo.cls 文件中,有 \usepackage{stfloats}。一旦将其注释掉,问题就消失了。我在这个 URL 上找到了解决方案:单列图表使其他列空白
答案1
出现该问题是因为您在代码中使用了blindtext
包,或者默认使用了lipsum
,我将在这里放置这些代码;问题是,当这些重新填写的文本添加到第一页时,它们不包含类似的换行字体\\
,因此在编译 Latex 时不要找到文本的分隔符并以强制方式放置它,尝试添加纯文本,而不填充宏,避免在第一页放置图像,我认为这就是解决问题的方法。这里我找到了一个例子来查看编译结果应该如何。
结果:
梅威瑟:
% arara: pdflatex: {synctex: yes, action: nonstopmode}
\documentclass{bioinfo}
\copyrightyear{2015} \pubyear{2015}
\access{Advance Access Publication Date: Day Month Year}
\appnotes{Manuscript Category}
\usepackage{lipsum}
\begin{document}
\firstpage{1}
\subtitle{Subject Section}
\title[Title]{Title}
\author[Sample \textit{et~al}.]{Author\,$^{\text{\sfb 1,}*}$, Author 2\,$^{\text{\sfb 2}}$}
\address{$^{\text{\sf 1}}$Address, \\
$^{\text{\sf 2}}$Address 2}
\corresp{$^\ast$To whom correspondence should be addressed.}
\history{Received on XXXXX; revised on XXXXX; accepted on XXXXX}
\editor{Associate Editor: XXXXXXX}
\abstract{\lipsum[1-2]}
\maketitle
\section{Introduction}
Nulla malesuada porttitor diam. Donec felis erat, congue non, volutpat
at, tincidunt tristique, libero. Vivamus viverra fermentum felis. Donec
nonummy pellentesque ante. Phasellus adipiscing semper elit. Proin fer-
mentum massa ac quam. Sed diam turpis, molestie vitae, placerat a,
molestie nec, leo. Suspendisse vel felis. Ut lorem lorem, interdum eu, tincidunt sit amet,
laoreet vitae, arcu. Aenean faucibus pede eu ante. Praesent enim elit,
rutrum at, molestie non, nonummy vel, nisl. Ut lectus eros, malesuada
sit amet, fermentum eu, sodales cursus, magna. Donec eu purus. Quisque
vehicula, urna sed ultricies auctor, pede lorem egestas dui, et convallis elit
erat sed nulla. Donec luctus. Curabitur et nunc. Aliquam dolor odio, com-
modo pretium, ultricies non, pharetra in, velit. Integer arcu est, nonummy
in, fermentum faucibus, egestas vel, odio.\\
Nulla malesuada porttitor diam. Suspendisse vel felis. Ut lorem lorem, interdum eu, tincidunt sit amet, laoreet vitae, arcu. Aenean faucibus pede eu ante. Praesent enim elit,
rutrum at, molestie non, nonummy vel, nisl. Ut lectus eros, malesuada sit amet, fermentum eu, sodales cursus, magna. Donec eu purus. Quisque vehicula, urna sed ultricies auctor, pede lorem egestas dui, et convallis elit erat sed nulla. Donec luctus. Curabitur et nunc. Aliquam dolor odio, com-modo pretium, ultricies non, pharetra in, velit. Integer arcu est, nonummy
in, fermentum faucibus, egestas vel, odio.\\
Donec felis erat, congue non, volutpat at, tincidunt tristique, libero. Vivamus viverra fermentum felis. Donec nonummy pellentesque ante. Phasellus adipiscing semper elit. Proin fer- mentum massa ac quam. Sed diam turpis, molestie vitae, placerat a, molestie nec, leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum urna frin-gilla ultrices. Phasellus eu tellus sit amet tortor gravida placerat. Integer
sapien est, iaculis in, pretium quis, viverra ac, nunc. Praesent eget sem vel
leo ultrices bibendum. Aenean faucibus.\\
Nulla malesuada porttitor diam. Donec felis erat, congue non, volutpat
at, tincidunt tristique, libero. Vivamus viverra fermentum felis. Donec
nonummy pellentesque ante. Phasellus adipiscing semper elit. Proin fer-
mentum massa ac quam. Sed diam turpis, molestie vitae, placerat a,
molestie nec, leo.\\
Suspendisse vel felis. Ut lorem lorem, interdum eu, tincidunt sit amet,
laoreet vitae, arcu. Aenean faucibus pede eu ante. Praesent enim elit,
rutrum at, molestie non, nonummy vel, nisl. Ut lectus eros, malesuada
sit amet, fermentum eu, sodales cursus, magna. Donec eu purus. Quisque
vehicula, urna sed ultricies auctor, pede lorem egestas dui, et convallis elit
erat sed nulla. Donec luctus. Curabitur et nunc. Aliquam dolor odio, com-
modo pretium, ultricies non, pharetra in, velit. Integer arcu est, nonummy
in, fermentum faucibus, egestas vel, odio.
\section{Methods}
Suspendisse vel felis. Ut lorem lorem, interdum eu, tincidunt sit amet,
laoreet vitae, arcu. Aenean faucibus pede eu ante. Praesent enim elit,
rutrum at, molestie non, nonummy vel, nisl. Ut lectus eros, malesuada
sit amet, fermentum eu, sodales cursus, magna. Donec eu purus. Quisque
vehicula, urna sed ultricies auctor, pede lorem egestas dui, et convallis elit
erat sed nulla. Donec luctus. Curabitur et nunc. Aliquam dolor odio, com-
modo pretium, ultricies non, pharetra in, velit. Integer arcu est, nonummy
in, fermentum faucibus, egestas vel, odio. \footnote{Quisque ullamcorper placerat ipsum. Cras nibh. Morbi vel justo vitaelacus tincidunt ultrices.}
\begin{figure}[h!]
\centerline{\includegraphics[width=\columnwidth]{panda}}
\caption{Caption text.
\label{panda}}
\end{figure}
\lipsum[3-5]
\begin{figure}[h!]
\centerline{\includegraphics[width=\columnwidth]{evilpanda}}
\caption{Evil panda.
\label{panda2}}
\end{figure}
\lipsum[5-7]
\section{Section 2}
\lipsum[8-10]
\begin{figure}[h!]
\centerline{\includegraphics[width=\columnwidth]{example-image-c}}
\caption{Panda.
\label{panda3}}
\end{figure}
\lipsum[11-12]
\end{document}