加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
balance.sty 3.29 KB
一键复制 编辑 原始数据 按行查看 历史
xyt556 提交于 2018-10-10 14:56 . Initial ShareLaTeX Import
%%
%% This is file `balance.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% balance.dtx (with options: `package')
%% =============================================
%% IMPORTANT NOTICE:
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt; either
%% version 1 of the License, or any later version.
%%
%% This is a generated file.
%% It may not be distributed without the original source file balance.dtx.
%%
%% Full documentation can be obtained by LaTeXing that original file.
%% Only a few abbreviated comments remain here to describe the usage.
%% =============================================
%% Copyright 1993-1999 Patrick W Daly
%% Max-Planck-Institut f\"ur Aeronomie
%% Max-Planck-Str. 2
%% D-37191 Katlenburg-Lindau
%% Germany
%% E-mail: daly@linmpi.mpg.de
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{balance}
[1999/02/23 4.3 (PWD)]
% In order to balance the columns on a page, \balance must be given
% somewhere within the first column. To turn off the feature, give
% \nobalance. One has to look at the unbalanced text first to decide
% where best to place \balance.
%-----------------------------------------------------------
\newcommand{\@BAlancecol}{\if@twocolumn
\setbox0=\vbox{\unvbox\@outputbox} \@tempdima=\ht0
\advance\@tempdima by \topskip \advance\@tempdima
by -\baselineskip \divide\@tempdima by 2
\splittopskip=\topskip
{\vbadness=\@M \loop \global\setbox3=\copy0
\global\setbox1=\vsplit3 to \@tempdima
\ifdim\ht3>\@tempdima \global\advance\@tempdima by 1pt \repeat}
\setbox\@leftcolumn=\vbox to \@tempdima{\unvbox1\vfil}
\setbox\@outputbox=\vbox to \@tempdima
{\dimen2=\dp3\unvbox3\kern-\dimen2
\vfil}
\fi}
\newif\if@BAlanceone
\global\@BAlanceonefalse
\newdimen\oldvsize
\newcommand{\@BAdblcol}{\if@firstcolumn
\unvbox\@outputbox \penalty\outputpenalty
\global\oldvsize=\@colht \global\multiply \@colht by 2
\global\@BAlanceonetrue
\global\@firstcolumnfalse
\else \global\@firstcolumntrue
\if@BAlanceone
\global\@BAlanceonefalse\@BAlancecol
\global\@colht=\oldvsize \else
\PackageWarningNoLine{balance}
{You have called \protect\balance\space
in second column\MessageBreak
Columns might not be balanced}\fi
\setbox\@outputbox\vbox to \@colht{\hbox to\textwidth
{\hbox to\columnwidth {\box\@leftcolumn \hss}\hfil
\vrule width\columnseprule\hfil \hbox to\columnwidth
{\box\@outputbox \hss}}\vfil}\@combinedblfloats
\@outputpage \begingroup \@dblfloatplacement
\@startdblcolumn \@whilesw\if@fcolmade \fi
{\@outputpage\@startdblcolumn}\endgroup
\fi}
\newcommand{\@BAcleardblpage}{\clearpage\if@twoside \ifodd\c@page\else
\hbox{}\newpage\fi\fi}
\newcommand{\@@cleardblpage}{}
\let\@@cleardblpage=\cleardoublepage
\newcommand{\@@utputdblcol}{}
\let\@@utputdblcol=\@outputdblcol
\newcommand{\balance}{\global\let\@outputdblcol=\@BAdblcol
\global\let\cleardoublepage=\@BAcleardblpage}
\newcommand{\nobalance}{\global\let\@outputdblcol=\@@utputdblcol
\global\let\cleardoublepage=\@@cleardblpage}
%%
%% <<<<< End of generated file <<<<<<
%%
%% End of file `balance.sty'.
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化