I need to balance the heights of the last two columns of my ACM article that is typeset using sigplanconf.cls. This class file defines the following command:

  \global\@colht = \textheight
  \global\ht\@cclv = \textheight}

However, the above \balancecolumns command didn't work for me. I also tried the solutions proposed in response to similar questions: How to balance last page of two-column layout?, Uneven text distribution with two-column layout, and https://stackoverflow.com/q/2149854/130224. Specifically, I tried the flushend, balance, and multicol pacakges. But, none of these packages could automatically balance the last two columns of my bibliography section.

I managed to manually break the list of references using the command \vfill\eject. But, this solution required manipulating the generated bbl file. I'd prefer an automatic solution that doesn't require changing a generated file.

Note that, the bibliography section is the last section of the article, but it runs over two pages.


With the balance package the output is correct.

One must issue \balance between two paragraphs that fall in the first column of the final page. This might need to insert it manually in the .bbl file, if the last page consists only of bibliography items.

  • 1
    Thanks for the tip. I didn't try the \balance in the bbl file. Anyways, I'd rather not to modify the bbl file. So, I still wonder if there is a cleaner solution that doesn't require manipulating the bbl file. – reprogrammer Dec 15 '11 at 22:39
  • Assuming the etoolbox package is available, would \AtBeginEnvironment{thebibliography}{\balance} do the trick? – Mike Renfro Dec 16 '11 at 0:53
  • 1
    @MikeRenfro No, looking at the documentation of balance: the \balance command should be put between two paragraphs in the first column of the last page. – egreg Dec 16 '11 at 11:24
  • If the start of the bibliography wound up in that position, would it work? Or would a literal paragraph break need to be present? – Mike Renfro Dec 16 '11 at 13:00
  • @MikeRenfro It would probably work, I believe. – egreg Dec 16 '11 at 13:49

Here's an approach that seems to work. Truth be told, I've only tried it in article.cls with twocolumn and by inputing a .bbl file directly:(See edit below for verification with sigplanconf.cls).


    \def\balanceissued{unbalanced}%flag to indicate if \balance has been used

Based on @egreg's previous answer and the comments, it uses the balance package and inserts a \balance command on the last page by renewing the \bibitem command. The lastpage package is used to define \lastpage@lastpage. The \balanceissued is to prevent \balance from being called multiple times on the last page. Interestingly, it seems to work fine if this occurs (which could shorten the code a bit).

Here is without the above:

without balance

and with the above (run twice to establish the last page):

enter image description here


Assuming I am interpreting the question correctly, I have verified that the approach works with sigplanconf. Below is a test article using blindtext and enough references to get onto the next page (as the question states). Is this what you are after?


    \def\balanceissued{unbalanced}%flag to indicate if \balance has been used
\title{Using \texttt{\textbackslash{}balance} to equalize the last two columns of references in a \texttt{sigplanconf} conference paper}
\authorinfo{John Doe}{Bogus University}{doe@bogus.edu}
\toappear{To appear somewhere}
\section{Materials and Methods}
\section{Results and Discussion}

    Daniel Aguado, Tatiana Montoya, Jos{\'e} Ferrer, and Aurora Seco.
    \newblock Relating ions concentration variations to conductivity variations in
      a sequencing batch reactor operated for enhanced biological phosphorus
    \newblock {\em Environmental Modelling \& Software}, 21(6):845--851, 2006.

    Johwan Ahn, Sarah Schroeder, Michael Beer, Simon McIlroy, Ronald~C. Bayly,
      John~W. May, George Vasiliadis, and Robert~J. Seviour.
    \newblock Ecology of the microbial community removing phosphate from wastewater
      under continuously aerobic conditions in a sequencing batch reactor.
    \newblock {\em Applied and Environmental Microbiology}, 73(7):2257--2270, 2007.

    T.~Aiso, H.~Yoshida, A.~Wada, and R.~Ohki.
    \newblock Modulation of {mRNA} stability participates in
      stationary-phase-specific expression of ribosome modulation factor.
    \newblock {\em Journal of Bacteriology}, 187(6):1951--1958, 2005.

    Michael~D. Aitken, Mark~D. Sobsey, Nicole~A. Van~Abel, Kimberly~E. Blauth,
      David~R. Singleton, Phillip~L. Crunk, Cora Nichols, Glenn~W. Walters, and
      Maria Schneider.
    \newblock Inactivation of \textit{Escherichia coli} {O157:H7} during
      thermophilic anaerobic digestion of manure from dairy cattle.
    \newblock {\em Water Research}, 41(8):1659--1666, 2007.

    M.~Akiyama, T.~Tsuge, and Y.~Doi.
    \newblock Environmental life cycle comparison of polyhydroxyalkanoates produced
      from renewable carbon resources by bacterial fermentation.
    \newblock {\em Polymer Degradation and Stability}, 80(1):183--194, 2003.

    Muamar~M. Al-Najjar, Erik~R. Coats, and Frank~J. Loge.
    \newblock The role of the microbial stringent response in excess intracellular
      accumulation of phosphorous in mixed consortia fed synthetic wastewater.
    \newblock {\em Water Research}, 45(16):5038--5046, 2011.

    A.~Alban, S.~O. David, L.~Bjorkesten, C.~Andersson, E.~Sloge, S.~Lewis, and
    \newblock A novel experimental design for comparative two-dimensional gel
      analysis: Two-dimensional difference gel electrophoresis incorporating a
      pooled internal standard.
    \newblock {\em Proteomics}, 3(1):36--44, 2003.

    M.~G.~E. Albuquerque, G.~Carvalho, C.~Kragelund, A.~F. Silva, M.~T.~B. Crespo,
      M.~A.~M. Reis, and P.~H. Nielsen.
    \newblock Link between microbial composition and carbon substrate-uptake
      preferences in a {PHA}-storing community.
    \newblock {\em {ISME} Journal}, 7(1):1--12, 2013.

    M.~G.~E. Albuquerque, S.~Concas, S.~Bengtsson, and M.~A.~M. Reis.
    \newblock Mixed culture polyhydroxyalkanoates production from sugar molasses:
      The use of a 2-stage {CSTR} system for culture selection.
    \newblock {\em Bioresource Technology}, 101(18):7112--7122, 2010.

    M.~G.~E. Albuquerque, M.~Eiroa, C.~Torres, B.~R. Nunes, and M.~A.~M. Reis.
    \newblock Strategies for the development of a side stream process for
      polyhydroxyalkanoate {(PHA)} production from sugar cane molasses.
    \newblock {\em Journal of Biotechnology}, 130(4):411--421, 2007.

    M.~G.~E. Albuquerque, V.~Martino, E.~Pollet, L.~Av{\'e}rous, and M.~A.~M. Reis.
    \newblock Mixed culture polyhydroxyalkanoate {(PHA)} production from volatile
      fatty acid {(VFA)}-rich streams: Effect of substrate composition and feeding
      regime on {PHA} productivity, composition and properties.
    \newblock {\em Journal of Biotechnology}, 151(1):66--76, 2011.

    M.~G.~E. Albuquerque, C.~A.~V. Torres, and M.~A.~M. Reis.
    \newblock Polyhydroxyalkanoate {(PHA)} production by a mixed microbial culture
      using sugar molasses: Effect of the influent substrate concentration on
      culture selection.
    \newblock {\em Water Research}, 44(11):3419--3433, 2010.

    James~E. Alleman and Robert~L. Irvine.
    \newblock Storage-induced denitrification using sequencing batch reactor
    \newblock {\em Water Research}, 14(10):1483--1488, 1980.

    G.~Andreottola, G.~Bortone, and A.~Tilche.
    \newblock Experimental validation of a simulation and design model for nitrogen
      removal in sequencing batch reactors.
    \newblock {\em Water Science and Technology}, 35(1):113--120, 1997.

    Simon Anterrieu, Luca Quadri, Bert Geurkink, Inez Dinkla, Simon Bengtsson,
      Monica Arcos-Hernandez, Tomas Alexandersson, Fernando Morgan-Sagastume, Anton
      Karlsson, Markus Hjort, Lamija Karabegovic, Per Magnusson, Peter Johansson,
      Magnus Christensson, and Alan Werker.
    \newblock Integration of biopolymer production with process water treatment at
      a sugar factory.
    \newblock {\em New Biotechnology}, 31(4):308--323, 2014.

    Felicity~J. Appel.
    \newblock Advancing a post-anoxic biological nutrient removal process selecting
      for nitritation.
    \newblock Master's thesis, University of Idaho, 2015.

    Lise Appels, Jan Baeyens, Jan Degr{\`e}ve, and Raf Dewil.
    \newblock Principles and potential of the anaerobic digestion of
      waste-activated sludge.
    \newblock {\em Progress in Energy and Combustion Science}, 34(6):755--781,

    M.~V. Arcos-Hernandez, B.~Laycock, S.~Pratt, B.~C. Donose, M.~A.~L. Nikolic,
      P.~Luckman, A.~Werker, and P.~A. Lant.
    \newblock Biodegradation in a soil environment of activated sludge derived
      polyhydroxyalkanoate {(PHBV)}.
    \newblock {\em Polymer Degradation and Stability}, 97(11):2301--2312, 2012.

    M{\'o}nica~V. Arcos-Hern{\'a}ndez, Bronwyn Laycock, Bogdan~C. Donose, Steven
      Pratt, Peter Halley, Salah Al-Luaibi, Alan Werker, and Paul~A. Lant.
    \newblock Physicochemical and mechanical properties of mixed culture
      polyhydroxyalkanoate {(PHBV)}.
    \newblock {\em European Polymer Journal}, 49(4, SI):904--913, 2013.

    M{\'o}nica~Vanessa Arcos~Hern{\'a}ndez.
    \newblock {\em Production and Characterization of Mixed Culture
    \newblock Doctoral thesis, The University of Queensland, 2012.

    Edward Ardern and William~T. Lockett.
    \newblock Experiments on the oxidation of sewage without the aid of filters.
    \newblock {\em Journal of the Society of Chemical Industry}, 33(10):523--539,

    Madan~L. Arora, Edwin~F. Barth, and Margaret~B. Umphres.
    \newblock Technology evaluation of sequencing batch reactors.
    \newblock {\em Journal Water Pollution Control Federation}, 57(8):867--875,

    N.~Artan, D.~Orhon, and R.~Tasli.
    \newblock Design of {SBR} systems for nutrient removal from wastewaters subject
      to seasonal fluctuations.
    \newblock {\em Water Science and Technology}, 46(8):91--98, 2002.


Second to last page: secondtolast page

Last page balanced with \balance automatically inserted: balanced last page

  • 1
    Thanks for the detailed answer. I am actually using this with IEEEtrans which is not the same class as in the original question. And your solution works without problem. I gave you the bounty but OP should come back after four years and accept your solution :) – Aydin Oct 16 '15 at 13:56
  • 4
    This doesn't work with the new ACM template, there is an import clash with the lastpage package. – Raff.Edward Sep 15 '17 at 14:25
  • @guho Seems very cool. It doesn't seem to work for me using documentclass[english,final,twocolumn]{article}, \usepackage[big]{dgruyter}. – Lars Abrahamsson Aug 14 '19 at 22:16
  • 1
    It doesn't work with current acmart for several reasons. \theTotPages expands to \arabic{TotPages} which is not acceptable to \ifnum. If you change this to \ifnum\value{TotPages}=\value{page} then you're actually comparing numbers, but then you hit the second problem: \value{TotPages} is always the wrong number! What you actually need is the value of the label TotPages, which will be typeset by \ref{TotPages}, but I don't know how to use that in any kind of \if expression. – zwol Oct 20 '20 at 3:02
  • 1
    @MicahSmith I just posted an answer that works with current versions of acmart. Hope it's not too late to do you any good. – zwol Jan 26 at 18:42

Solution based on @zwol's answer:



% Disable acmart's automatic invocation of \balance from \AtEndDocument,
% which is usually too late.

% Invoke command when the \bibitem reaches the specified value
  {} % on success
  {\@latex@error{Patching \bibitem failed}{\@ehd}}


This code inserts a \newpage after 35th reference. You need to manually find where to break and replace the 35 in \setcounter{BalanceAtReference}{35} for your case.

I'm using \documentclass[sigconf,screen]{acmart} on Overleaf. For some reason \balance does not work for me, even when manually inserting \balance to the bbl file, but \newpage works.


Here is an approach for automatically issuing \balance at an appropriate point in the bibliography, that is compatible with the totpages package, as used by e.g. current versions of acmart.cls. It uses \getrefnumber, which is defined in the refcount package, and \pretocmd, which is in etoolbox; acmart.cls already loads both of these.


% Disable acmart's automatic invocation of \balance from \AtEndDocument,
% which is usually too late.

% Invoke \balance from the first \bibitem on the last page of the document.
  {} % on success
  {\@latex@error{Patching \bibitem failed}{\@ehd}}


Prepending the additional code to \bibitem seems to be more reliable than appending it -- I tried it both ways and got weird low-level errors with \apptocmd.

However, this does not always actually make the columns balance -- see discussion in the comments. I will revise this answer if I come up with something that works more reliably.

  • Thanks for picking this up, and your seems like a very reasonable approach. Adding this to my document, I don't see any differences. (My last page of references, which is the final page in my doc, is still not balanced.) How would I debug that this is working as intended? I'm now on acmart 1.67 fwiw. Will also try to create a MRE. – Micah Smith Jan 27 at 15:09
  • I am actually having the same problem with the document I wanted this for, and I don't have any idea how to debug it. :-( It seems to be sensitive to exactly how many bibliography entries are on the last page, but beyond that, no clue. – zwol Jan 27 at 15:16
  • I was able to create a smaller example where your solution does work as intended, but in this example just putting \balance before \bibliography{references.bib} also successfully balances. – Micah Smith Jan 27 at 15:39
  • Not able to quickly come up with a MRE for my paper, but let us know if you make any updates! – Micah Smith Jan 27 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.