![如何平衡参考书目部分最后一页的列?](https://linux22.com/image/243817/%E5%A6%82%E4%BD%95%E5%B9%B3%E8%A1%A1%E5%8F%82%E8%80%83%E4%B9%A6%E7%9B%AE%E9%83%A8%E5%88%86%E6%9C%80%E5%90%8E%E4%B8%80%E9%A1%B5%E7%9A%84%E5%88%97%EF%BC%9F.png)
我需要平衡使用以下方式排版的 ACM 文章的最后两列的高度sigplanconf.cls.该类文件定义了以下命令:
\newcommand{\balancecolumns}{%
\vfill\eject
\global\@colht = \textheight
\global\ht\@cclv = \textheight}
但是,上述\balancecolumns
命令对我来说不起作用。我也尝试了针对类似问题提出的解决方案:如何平衡双列布局的最后一页?,双列布局下文本分布不均匀, 和https://stackoverflow.com/q/2149854/130224。具体来说,我尝试了冲洗,平衡, 和多色包。但是,这些包都不能自动平衡我的参考书目部分的最后两列。
我设法使用命令手动打破了引用列表\vfill\eject
。但是,此解决方案需要操作生成的 bbl 文件。我更喜欢不需要更改生成文件的自动解决方案。
请注意,参考书目部分是文章的最后一部分,但它超过两页。
答案1
使用这个balance
包,输出是正确的。
必须\balance
在最后一页第一列的两个段落之间发出一个引文。.bbl
如果最后一页仅包含参考书目项目,则可能需要手动将其插入文件中。
答案2
这是一种似乎可行的方法。说实话,我只尝试过请参阅下面的编辑以进行验证article.cls
直接twocolumn
输入 .bbl 文件:(sigplanconf.cls
)。
\documentclass[twocolumn]{article}
\usepackage{balance}
\usepackage{lastpage}
\makeatletter
\def\balanceissued{unbalanced}%flag to indicate if \balance has been used
\let\oldbibitem\bibitem
\def\bibitem{%
\ifnum\thepage=\lastpage@lastpage%
\expandafter\ifx\expandafter\relax\balanceissued\relax\else%
\balance%
\gdef\balanceissued{\relax}\fi%
\else\fi%
\oldbibitem}
\makeatother
\begin{document}
\input{addreading.bbl}
\end{document}
根据@egreg 之前的回答和评论,它使用balance
包并\balance
通过更新命令在最后一页插入命令\bibitem
。lastpage
包用于定义\lastpage@lastpage
。\balanceissued
是为了防止\balance
在最后一页被多次调用。有趣的是,如果发生这种情况,它似乎可以正常工作(这可以缩短代码一点)。
如果没有上述内容,则情况如下:
并与上述内容(运行两次以建立最后一页):
编辑:
假设我正确解释了这个问题,我已经验证了该方法适用于sigplanconf
。下面是一篇使用 和 的测试文章blindtext
,其中有足够的参考资料可以进入下一页(正如问题所述)。这就是你想要的吗?
\documentclass{sigplanconf}
\usepackage[pangram]{blindtext}
\usepackage{balance}
\usepackage{lastpage}
\makeatletter
\def\balanceissued{unbalanced}%flag to indicate if \balance has been used
\let\oldbibitem\bibitem
\def\bibitem{%
\ifnum\thepage=\lastpage@lastpage%
\expandafter\ifx\expandafter\relax\balanceissued\relax\else%
\balance%
\gdef\balanceissued{\relax}\fi%
\else\fi%
\oldbibitem}
\makeatother
\begin{document}
\title{Using \texttt{\textbackslash{}balance} to equalize the last two columns of references in a \texttt{sigplanconf} conference paper}
\authorinfo{John Doe}{Bogus University}{[email protected]}
\toappear{To appear somewhere}
\maketitle
\begin{abstract}
\Blindtext[1][1]
\end{abstract}
\section{Introduction}
\Blindtext[3][1]
\section{Materials and Methods}
\Blindtext[4][1]
\section{Results and Discussion}
\Blindtext[4][1]
\section{Conclusions}
\Blindtext[1][1]
\begin{thebibliography}{100}
\bibitem{Aguado06}
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
removal.
\newblock {\em Environmental Modelling \& Software}, 21(6):845--851, 2006.
\bibitem{Ahn07}
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.
\bibitem{Aiso05}
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.
\bibitem{Aitken07}
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.
\bibitem{Akiyama03}
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.
\bibitem{AlNajjar11}
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.
\bibitem{Alban03}
A.~Alban, S.~O. David, L.~Bjorkesten, C.~Andersson, E.~Sloge, S.~Lewis, and
I.~Currie.
\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.
\bibitem{Albuquerque13}
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.
\bibitem{Albuquerque10_CSTR}
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.
\bibitem{Albuquerque07}
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.
\bibitem{Albuquerque11}
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.
\bibitem{Albuquerque10}
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.
\bibitem{Alleman80}
James~E. Alleman and Robert~L. Irvine.
\newblock Storage-induced denitrification using sequencing batch reactor
operation.
\newblock {\em Water Research}, 14(10):1483--1488, 1980.
\bibitem{Andreottola97}
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.
\bibitem{Anterrieu14}
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.
\bibitem{Appel15}
Felicity~J. Appel.
\newblock Advancing a post-anoxic biological nutrient removal process selecting
for nitritation.
\newblock Master's thesis, University of Idaho, 2015.
\bibitem{Appels08}
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,
2008.
\bibitem{ArcosHernandez12}
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.
\bibitem{ArcosHernandez13}
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.
\bibitem{ArcosHernandez12_Dissertation}
M{\'o}nica~Vanessa Arcos~Hern{\'a}ndez.
\newblock {\em Production and Characterization of Mixed Culture
Polyhydroxyalkanoates}.
\newblock Doctoral thesis, The University of Queensland, 2012.
\bibitem{ArdernLockett14}
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,
1914.
\bibitem{Arora85}
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,
1985.
\bibitem{Artan02}
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.
\end{thebibliography}
\end{document}
答案3
根据@zwol 的回答的解决方案:
\newcounter{BalanceAtReference}
\setcounter{BalanceAtReference}{35}
\newcounter{ReferenceIndexForBalancing}
\makeatletter
% Disable acmart's automatic invocation of \balance from \AtEndDocument,
% which is usually too late.
\global\@ACM@balancefalse
% Invoke command when the \bibitem reaches the specified value
\def\@balancelastpageonce{%
\ifnum\value{ReferenceIndexForBalancing}=\value{BalanceAtReference}
\newpage
\else
\relax
\fi
\stepcounter{ReferenceIndexForBalancing}
}
\pretocmd{\bibitem}{\@balancelastpageonce}
{} % on success
{\@latex@error{Patching \bibitem failed}{\@ehd}}
\makeatother
此代码\newpage
在第 35 个引用之后插入。您需要手动找到中断位置并替换您的35
案例\setcounter{BalanceAtReference}{35}
。
\documentclass[sigconf,screen]{acmart}
我在 Overleaf 上使用。出于某种原因\balance
,它对我来说不起作用,即使手动插入\balance
bbl 文件也是如此,但\newpage
它可以工作。
答案4
我正在编写一份采用 IEEEtran 会议风格的文档,该风格会生成两列。文档以采用 IEEEbib 风格的参考书目结尾。
这冲洗包总是会从参考书目中间取出一个引文,并将其放在左(错误)列中,而参考书目的其余部分则放在右列中。使用保留最后一个框选项并没有什么区别。
但平衡包运行完美。我将 \balance 命令放在简短致谢部分的正上方,该命令位于生成参考书目的命令之前。