0

I am using the bioinfo.cls (from the Bioinformatics journal). It creates a two-column format. One problem that happens is sometimes the text on the right side of the page begins only at the vertical level that a figure on the left side of the page ends. Here is an image to show that:

Example of the problem

Below is an example code of my problem that also created the example image above:

\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}

How can I fix such a problem? Any ideas would be so very much appreciated!

As a side note edit: Below is a copy of panda.jpg:

enter image description here

EDIT SOLUTION:

I think I figured out the solution. In the bioinfo.cls file, there is \usepackage{stfloats}. Once that is commented out, the problem disappeared. I found the solution at this URL: Single-column figure makes other column blank

5
  • 1
    The problem is almost certainly due to the bioinfo document class. Where does one download it? Commented May 10, 2018 at 3:44
  • That you, @JohnKormylo. It can be downloaded at this site: academic.oup.com/bioinformatics/pages/submission_online. The first sentence says: "Word* and LaTex* templates can be found here. Use of these templates is compulsory." Click on the word "LaTex". This will download a zip file called cabios-template.zip. Within it, there is the bioinfo.cls file. Commented May 10, 2018 at 12:21
  • 1
    I get a different result when I run your code. I get 2 pandas in the first column and the second column is fine. When is the last time you updated your packages? Commented May 10, 2018 at 14:13
  • Thank you very much for looking into it, @JohnKormylo. I did switch to a brand new computer yesterday and still had this problem after downloading the newest MacTeX. Do you think I would still need to update certain packages (and, if so, how would I know which ones)? One other thing is maybe we are using slightly different image sizes? I added panda.jpg in my edits in case that would change things. Sorry for so many questions; I have been having this problem for months and would just trail-and-error move around the location of the figure in the text to solve it but need a better solution now. Commented May 10, 2018 at 16:53
  • Technically I got 2 boxes with "panda.jpg" in text. I should also point out that I only copied the bioinfo.cls file and the PDF logo and left the rest of the packages, figuring most were already installed or would be automatically when used. Commented May 10, 2018 at 18:32

1 Answer 1

2
+25

The problem is caused because you use the blindtext package, or by default lipsum, in the code that I'm going to put here; the problem is that when these re fill-in texts are added on the first page, they do not include line-breaking typographies like \\, so when compiling Latex do not find a separation of the text and place it in a forced way, try adding pure text, without filling macros, avoid putting an image on the first page and I think that is what solves the problem. Here I found an example to look for how the compilation should result.

RESULT:

enter image description here

MWE:

% 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}
4
  • 1
    Thank you. And I appreciate the evil panda photos too! In my real document that has this problem on almost all of its pages (n=11), I am not using the blindtext or lipsum packages. It is all real text. I did just return to it and added "\\" after each paragraph (like you did), but the problem still persists. I also checked that there is no image on the first page, and the problem is still there. Strangely yet, there are two images that do not cause this problem in my real document, but I cannot detect what is making them different. Commented May 12, 2018 at 21:16
  • I might have discovered one additional characteristic about this problem. It only seems to happen when there is a figure on the left column of the page. Then, the right column will not start text until the vertical level at which the figure ends. The reverse does not seem to have a problem: When a figure is on the right column of the page, the text on the left column still seems fine. Commented May 13, 2018 at 1:37
  • I think I figured it out. Solution in edit :) Commented May 13, 2018 at 2:13
  • It is strange, when you want to end a paragraph in the second column, it always remains a line above, if a figure goes to the beginning the error appears; but if the continuation of the paragraph follows that if it is aligned with the other column, and after the image goes there is no problem, something must be configured for that to happen ...
    – J Leon V.
    Commented May 13, 2018 at 3:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .