I don't quite understand what causes the problem, but apparently it has something to do with the fact that your text is a single line which cannot be accomodated in two columns, and somehow TeX decides that, since it has to go in a single column, better to the right.
As soon as you add a second line to that page, the problem vanishes (although the result is far from optimal, imho:
\documentclass[aps,prb,reprint]{revtex4-1}
\usepackage{lipsum}
\makeatletter
\newcommand*{\balancecolsandclearpage}{%
\close@column@grid
\cleardoublepage
\twocolumngrid
}
\makeatother
\begin{document}
\lipsum[1-4]
\balancecolsandclearpage
This text is in the right column. But I added more text so that at least two
lines are required.
\end{document}
The problem gets solved if you put a \clearpage
after the contents of the last page:
\documentclass[aps,prb,reprint]{revtex4-1}
\usepackage{lipsum}
\makeatletter
\newcommand*{\balancecolsandclearpage}{%
\close@column@grid
\cleardoublepage
\twocolumngrid
}
\makeatother
\begin{document}
\lipsum[1-4]
\balancecolsandclearpage
This text is in the right column. But I added more text so that at least two
lines are required.
\clearpage
\end{document}
It also works when there is a single line, like in your original question. Perhaps it could be a good idea to put \AtEndDocument{\clearpage}
in your preamble.
Best Answer
There is a big difference between
\newpage
and\vfill\eject
.Definition of
\newpage
in LaTeXDefinition of
\eject
in Plain TeXLaTeX tries first to catch problems with
\everypar
; if\newpage
is given in sectional titles or immediately after or else in lists, some countermeasures are taken.After this the working is almost identical, but you can notice that
\newpage
issues\vfil
, because of how it deals with\flushbottom
and\raggedbottom
. Both constructions end with\penalty-10000
that forces a page break.