summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2007-11-27 15:27:45 +0000
committerNorbert Preining <preining@logic.at>2007-11-27 15:27:45 +0000
commit296f7e0921065722d9da9e2df000b3c3747a6cc0 (patch)
tree96f3caba95399697f8133df9ec8cfa18565fc5cb /Master/texmf-dist/tex
parent7e2204f4ea41a8f2ef3d1749332042f0b050d365 (diff)
eplain 3.2 from CTAN
git-svn-id: svn://tug.org/texlive/trunk@5622 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/eplain/btxmac.tex13
-rw-r--r--Master/texmf-dist/tex/eplain/eplain.aux4
-rw-r--r--Master/texmf-dist/tex/eplain/eplain.tex155
3 files changed, 120 insertions, 52 deletions
diff --git a/Master/texmf-dist/tex/eplain/btxmac.tex b/Master/texmf-dist/tex/eplain/btxmac.tex
index 4b7fda7c61e..c8772a176b2 100644
--- a/Master/texmf-dist/tex/eplain/btxmac.tex
+++ b/Master/texmf-dist/tex/eplain/btxmac.tex
@@ -1,6 +1,6 @@
%% @texfile{
%% author = "Karl Berry and Oren Patashnik",
-%% version = "0.99k-18aug05",
+%% version = "0.99k-09sep07",
%% date = "19 August 2005",
%% filename = "btxmac.tex",
%% address = "tex-eplain@tug.org",
@@ -513,7 +513,16 @@
% the \@citedef, we define \@citelabel{#1}, where #1 is the user's
% label.
%
-\def\@citedef#1#2{\expandafter\gdef\csname\@citelabel{#1}\endcsname{#2}}%
+% The group around the def will keep the save stack from overflowing:
+% We are reading the .aux file inside a group. For undefined
+% commands, \csname...\endcsname makes them equivalent to \relax
+% locally in that group; when we globally redefine them, TeX enters
+% the definitions on the save stack, once for each label. When done
+% in the topmost group, this can overflow stack of any size, given
+% sufficient number of label definitions. So, we put these
+% \csname...\endcsname's inside another group, to pop the stack for
+% every label.
+\def\@citedef#1#2{{\expandafter\gdef\csname\@citelabel{#1}\endcsname{#2}}}%
%
%
% Reading the .bbl file also produces the typeset bibliography. Please
diff --git a/Master/texmf-dist/tex/eplain/eplain.aux b/Master/texmf-dist/tex/eplain/eplain.aux
index e69de29bb2d..421a9706688 100644
--- a/Master/texmf-dist/tex/eplain/eplain.aux
+++ b/Master/texmf-dist/tex/eplain/eplain.aux
@@ -0,0 +1,4 @@
+% This eplain.aux file is installed for the sake of initex. Running
+% initex without this file will produce eplain.fmt which will never
+% issue warning messages about undefined labels.
+
diff --git a/Master/texmf-dist/tex/eplain/eplain.tex b/Master/texmf-dist/tex/eplain/eplain.tex
index ae0685ca781..6881f08f038 100644
--- a/Master/texmf-dist/tex/eplain/eplain.tex
+++ b/Master/texmf-dist/tex/eplain/eplain.tex
@@ -1,10 +1,10 @@
%% @texfile{
%% author = "Karl Berry, Steven Smith, Oleg Katsitadze, and others",
-%% version = "3.1",
-%% date = "Sun Dec 3 14:39:31 EET 2006",
+%% version = "3.2",
+%% date = "Mon Nov 26 01:34:44 EET 2007",
%% filename = "eplain.tex",
%% email = "bug-eplain@tug.org",
-%% checksum = "4001 8638 128661",
+%% checksum = "4056 8707 129859",
%% codetable = "ASCII",
%% supported = "yes",
%% docstring = "This file defines macros that extend and expand on
@@ -219,7 +219,7 @@
\fi
%% @texfile{
%% author = "Karl Berry and Oren Patashnik",
-%% version = "0.99k-18aug05",
+%% version = "0.99k-09sep07",
%% date = "19 August 2005",
%% filename = "btxmac.tex",
%% address = "tex-eplain@tug.org",
@@ -364,7 +364,7 @@
\@notfirstcitationtrue
}%
\def\@citelabel#1{b@#1}%
-\def\@citedef#1#2{\expandafter\gdef\csname\@citelabel{#1}\endcsname{#2}}%
+\def\@citedef#1#2{{\expandafter\gdef\csname\@citelabel{#1}\endcsname{#2}}}%
\def\@readbblfile{%
\ifx\@itemnum\@undefined
\@innernewcount\@itemnum
@@ -1879,16 +1879,18 @@
\ignorespaces
}%
\def\@definelabel#1{% #2 and #3 will be read later.
- \expandafter\ifx\csname\xrlabel{#1}\endcsname \relax
- \let\next\@definelabel@nocheck
- \else
- \let\next\@definelabel@warn
- \fi
- \next{#1}%
+ \begingroup % Will be ended in \@definelabel@nocheck.
+ \expandafter\ifx\csname\xrlabel{#1}\endcsname \relax
+ \expandafter\@definelabel@nocheck
+ \else
+ \expandafter\@definelabel@warn
+ \fi
+ {#1}%
}%
\def\@definelabel@nocheck#1#2#3{%
- \expandafter\gdef\csname\xrlabel{#1}\endcsname{#2}%
- \setpropertyglobal{\xrlabel{#1}}{class}{#3}%
+ \expandafter\gdef\csname\xrlabel{#1}\endcsname{#2}%
+ \setpropertyglobal{\xrlabel{#1}}{class}{#3}%
+ \endgroup % From \@definelabel.
}%
\def\@definelabel@warn#1#2#3{%
\message{^^J\linenumber Label `#1' multiply defined,
@@ -2017,7 +2019,8 @@
{\@@hldestoff \definexref{#1}{#2}{eq}}%
\fi
\hldest@impl{eq}{\hl@eqlabel}%
- \@definelabel@nocheck{#1}{#2}{eq}%
+ \begingroup % \@definelabel@nocheck will end this group.
+ \@definelabel@nocheck{#1}{#2}{eq}%
}%
\def\eqdef{\@getoptionalarg\@fineqdef}%
\def\@fineqdef{%
@@ -2075,6 +2078,8 @@
\let\extraidxcmdsuffixes = \empty
\outer\def\defineindex#1{%
\def\@idxprefix{#1}%
+ \expandafter\innernewif\csname if\@idxprefix dx\endcsname
+ \csname \@idxprefix dxtrue\endcsname
\for\@idxcmd:=,marked,submarked,name%
\extraidxcmdsuffixes\do
{%
@@ -2106,23 +2111,30 @@
}%
\let\indexfilebasename = \jobname
\def\@idxwrite#1#2{%
+ \csname if\@idxprefix dx\endcsname
+ \@openidxfile
+ \def\temp{#1}%
+ \edef\@wr{%
+ \expandafter\write\csname @\@idxprefix indexfile\endcsname{%
+ \string\indexentry
+ {\sanitize\temp}%
+ {\noexpand#2}%
+ }%
+ }%
+ \@wr
+ \else
+ \write-1{}%
+ \fi
+ \ifindexproofing \insert\@indexproof{\indexproofterm{#1}}\ifhmode\allowhyphens\fi\fi
+ \hookrun{afterindexterm}%
+ \ifsilentindexentry \expandafter\ignorespaces\fi
+}%
+\def\@openidxfile{%
\csname if@\@idxprefix indexfileopened\endcsname \else
\expandafter\immediate\openout\csname @\@idxprefix indexfile\endcsname =
\indexfilebasename.\@idxprefix dx
\expandafter\global\csname @\@idxprefix indexfileopenedtrue\endcsname
\fi
- \def\temp{#1}%
- \edef\@wr{%
- \expandafter\write\csname @\@idxprefix indexfile\endcsname{%
- \string\indexentry
- {\sanitize\temp}%
- {\noexpand#2}%
- }%
- }%
- \@wr
- \ifindexproofing \insert\@indexproof{\indexproofterm{#1}}\allowhyphens\fi
- \hookrun{afterindexterm}%
- \ifsilentindexentry \expandafter\ignorespaces\fi
}%
\newif\ifindexproofing
\newinsert\@indexproof
@@ -2790,6 +2802,8 @@
\chardef\@numcolumns = 1
\mathchardef\@ejectpartialpenalty = 10141
\chardef\@col@minlines = 3
+\chardef\@col@extralines = 3
+\newdimen\@col@extraheight
\def\@columns#1{%
\@ndcolumns
\global\let\@ndcolumns = \@endcolumns
@@ -2825,17 +2839,14 @@
\ifvoid\topins\else \advance\vsize by -\skip\topins \fi
\multiply\count\topins by \@numcolumns
\global\vsize = \@numcolumns\vsize
+ \@col@extraheight=\@col@extralines\baselineskip
+ \multiply\@col@extraheight by \@numcolumns
+ \global\advance\vsize by \@col@extraheight
}%
\def\gutterbox{\vbox to \dimen0{\vfil\hbox{\hfil}\vfil}}%
-\newif\if@forceextraline\@forceextralinefalse
\def\@columnsplit{%
\splittopskip = \topskip
\splitmaxdepth = \baselineskip
- \dimen@ = \ht255
- \divide\dimen@ by \@numcolumns
- \if@forceextraline
- \advance\dimen@ by \baselineskip
- \fi
\begingroup
\vbadness = 10000
\global\setbox1 = \vsplit255 to \dimen@ \global\wd1 = \hsize
@@ -2847,10 +2858,6 @@
\global\setbox7 = \vsplit255 to \dimen@ \global\wd7 = \hsize
\fi
\endgroup
- \if@forceextraline % If this is the first time
- \else % through, save the single
- \setbox\@forcelinebox=\copy\@partialpage % column material.
- \fi
\setbox0 = \box255
\global\setbox255 = \vbox{%
\unvbox\@partialpage
@@ -2866,6 +2873,9 @@
\setbox\@partialpage = \box0
}%
\def\@columnoutput{%
+ \dimen@ = \ht255
+ \advance\dimen@ by -\@col@extraheight
+ \divide\dimen@ by \@numcolumns
\@columnsplit
\@recoverclubpenalty
\hsize = \@normalhsize % Local to \output's group.
@@ -2874,6 +2884,7 @@
\unvbox\@partialpage
\penalty\outputpenalty
\global\vsize = \@numcolumns\@normalvsize
+ \global\advance\vsize by \@col@extraheight
}%
\def\singlecolumn{%
\@ndcolumns
@@ -2881,29 +2892,73 @@
\vskip\belowcolumnskip
\nointerlineskip
}%
-\newbox\@forcelinebox
+\newbox\@singlecolumnbox
+\newdimen\column@pagegoal
+\newdimen\column@vsize
\def\@endcolumns{%
\global\let\@ndcolumns = \relax
\par % Shouldn't start in horizontal mode.
+ \column@pagegoal = \pagegoal
+ \advance\column@pagegoal by-\@col@extraheight
+ \ifdim \pagetotal > \column@pagegoal
+ \column@vsize = \column@pagegoal
+ \else
+ \column@vsize = \pagetotal
+ \fi
\global\output = {\global\setbox1 = \box255}%
\pagegoal = \pagetotal
\break % Exercise the page builder, i.e., \output.
\setbox2 = \box1 % Save material in box2 in case of overflow.
- \global\setbox255 = \copy2 % Retrieve what the fake \output set.
+ \global\output = \expandafter{\the\previousoutput}%
+ \setbox\@singlecolumnbox = \box\@partialpage
+ \@balancecolumns
+}%
+\def\@balancecolumns{%
+ \global\setbox255 = \copy2 % Retrieve what the fake \output set.
+ \dimen@ = \column@vsize
+ \divide\dimen@ by \@numcolumns
\@columnsplit
\ifvoid\@partialpage
- \else % There is some left-over.
- \setbox0=\box\@partialpage % Merely to void \@partialpage
- \global\setbox255 = \box2 % Retrieve what the fake \output set.
- \@forceextralinetrue % Add \forcelinebox to \box255 to save single
- \@columnsplit % column material.
- \global\setbox255 = \vbox{\box\@forcelinebox\box255}%
- \fi
- \global\vsize = \@normalvsize
- \global\hsize = \@normalhsize
- \global\output = \expandafter{\the\previousoutput}%
+ \global\vsize = \@normalvsize
+ \global\hsize = \@normalhsize
+ \dump@balanced@columns
+ \let\next\relax
+ \else
+ \advance \column@vsize by \@numcolumns pt
+ \test@spill@columns
+ \ifspill@columns
+ \begingroup
+ \vsize = \@normalvsize
+ \hsize = \@normalhsize
+ \dump@balanced@columns
+ \break
+ \@recoverclubpenalty
+ \endgroup
+ \unvbox\@partialpage
+ \let\next\@endcolumns
+ \else
+ \setbox0=\box\@partialpage % Merely to void \@partialpage.
+ \let\next\@balancecolumns
+ \fi
+ \fi
+ \next
+}%
+\def\dump@balanced@columns{%
\ifvoid\topins\else\topinsert\unvbox\topins\endinsert\fi
- \unvbox255
+ \unvbox\@singlecolumnbox
+ \nointerlineskip
+ \box255
+}%
+\newif\ifspill@columns
+\def\test@spill@columns{%
+ \spill@columnsfalse
+ \ifdim \column@vsize > \column@pagegoal
+ \ifvoid\footins
+ \ifvoid\topins
+ \spill@columnstrue
+ \fi
+ \fi
+ \fi
}%
\def\@saveclubpenalty{% save the current value of \clubpenalty
\edef\@recoverclubpenalty{%
@@ -3997,5 +4052,5 @@
\def\fmtname{eplain}%
\def\eplain{t}%
{\edef\plainversion{\fmtversion}%
- \xdef\fmtversion{3.1: 3 December 2006 (and plain \plainversion)}%
+ \xdef\fmtversion{3.2: 26 November 2007 (and plain \plainversion)}%
}%