# Box / Object moves in research article template depending on introduction length. Why?

Dear fellow LaTeX users,

I am new to the field and had to start quite deep with a relatively complex document template (PNAS research article template). The respective files can be obtained at: http://www.pnas.org/page/authors/latex

The template contains a box/object with a so-called "significance statement". Depending on how long I choose my introduction, the box moves to the next page. There's some threshold of raw length of the first paragraph that makes it reproducibly happening. I believe this should not happen, since all articles by PNAS have it on the bottom left right side of the first page (cf. my 2 screenshots)

There's nothing that sets up the location of this "Box" in the main .tex file, but I found the following in "the main" .sty file (cf. below). I tried to find out about it, I guess "afterpage" does put it on the following page? It this supposed to happen? Why does it happen after a threshold of paragraph length? How can I fix it to not move to the next page?

\RequirePackage{float}
\floatstyle{plain}
\newfloat{sigstatement}{b!}{sst}

\afterpage{\begin{sigstatement}
\sffamily
\mdfdefinestyle{pnassigstyle}{linewidth=0.7pt,backgroundcolor=pnasblueback,linecolor=pnasbluetext,fontcolor=pnasbluetext,innertopmargin=6pt,innerrightmargin=6pt,innerbottommargin=6pt,innerleftmargin=6pt}
\@ifundefined{@significancestatement}{}{%
\begin{mdframed}[style=pnassigstyle]%
\section*{Significance Statement}%
\@significancestatement
\end{mdframed}}
%     \medskip
\scriptsize
\@ifundefined{@authorcontributions}{}{\@authorcontributions}
\vskip5pt%
\@ifundefined{@authordeclaration}{}{\@authordeclaration}
\vskip5pt%
\@ifundefined{@equalauthors}{}{\@equalauthors}
\vskip5pt%
\@ifundefined{@correspondingauthor}{}{\@correspondingauthor}
\end{sigstatement}}
}


Thank you very much

• Welcome, don't worry about the layout, just care about the content. The journal will take care of the complete layout later on. – Johannes_B Nov 6 at 7:16
• (Had to merge accounts to comment, sorrry). I will have to send only the compiled PDF upon first submission, which will decide over the fate of my article. Since it is a high-end journal, I would to present a perfect document, with the box in its correct place, upon first submission – Andrew Nov 6 at 10:00

The \afterpage command is there because the significance statement is a float, and this ensures that it still comes at the bottom of the column even if there are other floats on the first page.

You're seeing this behavior because the first paragraph is extremely long and LaTeX can't find room for the significance statement on the first page, so it moves to the next. Try breaking up that text into multiple paragraphs and the problem goes away.

Notice in the example below (BTW, you should normally provide a MWE in your questions), if you set the blindtext repeat value in the first paragraph to 10 or greater, there's not room for this whole paragraph on the first page, and so the behavior you're seeing occurs. If you set it to 9, the end of the first paragraph is still on the second page, but that's because there would be room for it if not for the significance statement.

\documentclass[9pt,twocolumn,twoside,lineno]{pnas-new}
\templatetype{pnasresearcharticle}
\usepackage{blindtext}

\title{Template for preparing your research report submission to PNAS using Overleaf}
\author[a,c,1]{Author One}
\author[b,1,2]{Author Two}
\author[a]{Author Three}

\affil[a]{Affiliation One}
\affil[b]{Affiliation Two}
\affil[c]{Affiliation Three}

\significancestatement{Authors must submit a 120-word maximum statement about the
significance of their research paper written at a level understandable to an undergraduate
educated scientist outside their field of speciality. The primary goal of the Significance
The Significance Statement appears in the paper itself and is required for all research papers.}

\authorcontributions{Please provide details of author contributions here.}
\authordeclaration{Please declare any conflict of interest here.}
\equalauthors{\textsuperscript{1}A.O.(Author One) and A.T. (Author Two) contributed equally to this work (remove if not applicable).}
\correspondingauthor{\textsuperscript{2}To whom correspondence should be addressed. E-mail: author.two\@email.com}
\keywords{Keyword 1 $|$ Keyword 2 $|$ Keyword 3 $|$ ...}

\begin{abstract}
Please provide an abstract of no more than 250 words in a single paragraph. Abstracts should
explain to the general reader the major contributions of the article. References in the
abstract must be cited in full within the abstract itself and cited in the text.
\end{abstract}
\dates{This manuscript was compiled on \today}
\doi{\url{www.pnas.org/cgi/doi/10.1073/pnas.XXXXXXXXXX}}

\begin{document}

\maketitle
\thispagestyle{firststyle}
\ifthenelse{\boolean{shortarticle}}{\ifthenelse{\boolean{singlecolumn}}{\abscontentformatted}{\abscontent}}{}