revtex4-1 already contains a functionality to recover spacing which was removed at the original column break: \marry@baselines. This uses \marry@skip, which is set by \set@marry@skip. We can see that this is called between \begin{document} and the first character of the document:
\documentclass[twocolumn]{revtex4-1} \usepackage{lipsum} \usepackage{etoolbox} \makeatletter \pretocmd{\set@marry@skip}{Here I am!}{}{} \begin{document} \setlength{\baselineskip}{45pt} \lipsum[1] \end{document}
A simple solution is to call \set@marry@skip manually before one expects that revtex4-1 will balance two columns; that is, before the end of the document, a widetext environment, or a manual switch to one-column mode. Compare this with and without the calls to \set@marry@skip:
\documentclass[twocolumn]{revtex4-1} \usepackage{lipsum} \begin{document} \setlength{\baselineskip}{30pt} \lipsum[1-2] \makeatletter\set@marry@skip\makeatother \onecolumngrid Manual switch to a single column, and back. Note the long line. \twocolumngrid \setlength{\baselineskip}{20pt} \lipsum[1] \makeatletter\set@marry@skip\makeatother \begin{widetext} some wide text \end{widetext} \setlength{\baselineskip}{60pt} \lipsum[1] \makeatletter\set@marry@skip\makeatother \end{document}
Of course, one only needs a few of these calls when using a single font size across the document, but balancing often happens in references which are often set in smaller font.
Combining the \pretocmd{\set@marry@skip}{Here I am!}{}{} method with the latter example, one notes that \set@marry@skip is always called at the beginning of a two-column section, while it should probably be called at the end of it (because balancing affects text near end of a section, so that the text formatting at the original column break is not set, but more probable to correspond to the formatting at the end of the section rather than its beginning).
This made me think that \pretocmd{\shut@column@mlt}{\set@marry@skip}{}{} may be the solution for all above cases:
\documentclass[twocolumn]{revtex4-1} \usepackage{lipsum} \usepackage{etoolbox} \makeatletter \pretocmd{\shut@column@mlt}{\set@marry@skip}{}{\GenericError{}{Failed to patch \protect\shut@column@mlt}{}{}} \makeatother \begin{document} \setlength{\baselineskip}{30pt} \lipsum[1-2] \onecolumngrid Manual switch to a single column, and back. Note the long line. \twocolumngrid \setlength{\baselineskip}{20pt} \lipsum[1] \begin{widetext} some wide text \end{widetext} \setlength{\baselineskip}{60pt} \lipsum[1] \end{document}
And it seems to be. One may even get rid of all the skip-related stuff in \set@column@hsize, although I am not fully sure of the \skip@\baselineskip... part:
\documentclass[twocolumn]{revtex4-1} \usepackage{lipsum} \usepackage{etoolbox} \makeatletter \pretocmd{\shut@column@mlt}{\set@marry@skip}{}{\GenericError{}{Failed to patch \protect\shut@column@mlt}{}{}} \patchcmd{\set@column@hsize}{\skip@\baselineskip\advance\skip@-\topskip}{}{}{\GenericError{}{Failed to patch \protect\set@column@hsize}{}{}} \patchcmd{\set@column@hsize}{\@ifnum{\pagegrid@col>\@ne}{\set@marry@skip}}{}{}{\GenericError{}{Failed to patch \protect\set@column@hsize}{}{}} \makeatother \begin{document} \setlength{\baselineskip}{30pt} \lipsum[1-2] \onecolumngrid Manual switch to a single column, and back. Note the long line. \twocolumngrid \setlength{\baselineskip}{20pt} \lipsum[1] \begin{widetext} some wide text \end{widetext} \setlength{\baselineskip}{60pt} \lipsum[1] \end{document}
Two more commands that came handy in bibliographies are these two:
\pretocmd{\endthebibliography}{\set@marry@skip}{}{\GenericError{}{Failed to patch \endthebibliography}{}{}} \xpatchcmd{\set@marry@skip}{\@ifdim{\skip@>\z@}{\xdef\marry@skip{\the\skip@}}{}}{\xdef\marry@skip{\the\skip@}}{}{\GenericError{}{Failed to patch \set@marry@skip}{}{}}
The first may be required when the end of the bibliography environment restores larger font sizes, but the break occurs in the bibliography environment. The second may be required to allow negative values of \marry@skip.