diff options
author | Karl Berry <karl@freefriends.org> | 2007-12-28 01:36:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-12-28 01:36:57 +0000 |
commit | 6c5ddd1296ce22ce1bd3f196c9deabe0bcbdf8cd (patch) | |
tree | 404401d5860a4e9d9c08f3720cb92e7d145def50 /Master/texmf-dist/tex | |
parent | 8ebc58dba0381898ce61235b298edc2b31fbbc28 (diff) |
mh update: breqn v0.97a, flexisym v0.96, mathstyle v0.84 (27dec07)
git-svn-id: svn://tug.org/texlive/trunk@5960 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/mh/breqn.sty | 321 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/mh/flexisym.sty | 10 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/mh/mathstyle.sty | 3 |
3 files changed, 136 insertions, 198 deletions
diff --git a/Master/texmf-dist/tex/latex/mh/breqn.sty b/Master/texmf-dist/tex/latex/mh/breqn.sty index e69a67473b5..fd4893e5734 100644 --- a/Master/texmf-dist/tex/latex/mh/breqn.sty +++ b/Master/texmf-dist/tex/latex/mh/breqn.sty @@ -28,19 +28,18 @@ %% breqn.sty, breqn.pdf, breqn.ins, breqn.drv. %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{breqn}[2007/12/10 v0.96] +\ProvidesPackage{breqn}[2007/12/22 v0.97a] \edef\breqnpopcats{% \catcode\number`\"=\number\catcode`\" \relax} \AtEndOfPackage{\breqnpopcats}% \catcode`\^=7 \catcode`\_=8 \catcode`\"=12 \relax -\DeclareOption{debug}{\errorcontextlines=2000\relax} \DeclareOption{mathstyleoff}{% \PassOptionsToPackage{mathstyleoff}{flexisym}% } \ProcessOptions\relax \@ifpackageloaded{flexisym}{}{% - \RequirePackage[cmbase]{flexisym}[2007/12/10] + \RequirePackage{flexisym}[2007/12/19] \edef\breqnpopcats{\breqnpopcats \catcode\number`\^=\number\catcode`\^ \catcode\number`\_=\number\catcode`\_ @@ -168,35 +167,6 @@ \@saveprimitive\vadjust\@@vadjust \@saveprimitive\insert\@@insert \@saveprimitive\mark\@@mark -\let\debug=\begingroup -\let\gubed=\endgroup -\def\debugmsg{\message{||= \iffalse}\fi - \@xp\@gobble\string -} -\def\debugwr#1{\immediate\write\sixt@@n{||= #1}} -\def\debug@box#1{% - \batchmode{\showboxbreadth\maxdimen\showboxdepth99\showbox#1}% - \errorstopmode -} -\def\eqinfo{% - \debug@box\EQ@copy - \wlog{!! EQ@copy: \the\wd\EQ@copy\space x - \the\ht\EQ@copy+\the\dp\EQ@copy - }% -} -\def\debug@para{% - \debugwr{\hsize\the\hsize, \parfillskip\the\parfillskip}% - \debugmsg{\leftskip\the\leftskip, \rightskip\the\rightskip}% - \debugmsg{\linepenalty\the\linepenalty, \adjdemerits\the\adjdemerits}% - \debugmsg{\pretolerance\the\pretolerance, \tolerance\the\tolerance, - \parindent\the\parindent}% -} -\@ifpackagewith{breqn}{debug}{}{% - \let\debug\relax \let\gubed\relax - \let\debugmsg\@gobble \let\debug@lines\relax \let\debug@para\relax - \let\debugwr\@gobble - \let\debug@box\@gobble \let\debug@push\@gobbletwo -} \@ifundefined{listwidth}{\newdimen\listwidth}{} \listwidth=\z@ \def\eqfontsize{} % Inherit from context [NOT USED?] @@ -409,6 +379,8 @@ \setlength\eq@given@sidespace{#1}% } \define@key{breqn}{style}{\eqstyle\@xp{\the\eqstyle #1}} +\define@key{breqn}{shortskiplimit}{\def\eq@shortskiplimit{#1}} +\def\eq@shortskiplimit{2em} \define@key{breqn}{frame}[\fboxrule]{\def\eq@frame{T}% \dim@a#1\relax\edef\eq@framewd{\the\dim@a}% \freeze@glue\eqlinespacing \freeze@glue\eqlineskip @@ -437,16 +409,9 @@ \define@key{breqn}{cols}{\global\let\@preamble\@empty \darray@mkpream#1\@percentchar } -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%BRM: The following incorporates several changes: -%% 1) modifications supplied by MJD to fix the eaten \cs{paragraph} problem. -%% 2) Added \cs{display@setup} here, rather than globally. \newenvironment{dmath}{% \let\eq@hasNumber\@True \@optarg\@dmath{}}{} \def\@dmath[#1]{% - \debugmsg{=== DMATH ==================================================}% \everydisplay\expandafter{\the\everydisplay \display@setup}% \if@noskipsec \leavevmode \fi \if@inlabel \leavevmode \global\@inlabelfalse \fi @@ -507,7 +472,6 @@ % This sets up numbox, etc, even if unnumbered????? \ifx\eq@number\@empty \else - \debugmsg{Number \eq@number}% \set@label{equation}\eq@number \global\sbox\EQ@numbox{% \next@label \global\let\next@label\@empty @@ -517,23 +481,36 @@ \fi \fi } +\newcount\eq@final@linecount +\let\eq@GRP@first@dmath\@True \def\eq@finish{% \begingroup - \debugmsg{Formatting equation}% - \debug@showmeasurements \if F\eq@frame\else \freeze@glue\eqlinespacing \freeze@glue\eqlineskip \fi \csname eq@\eqindent @setsides\endcsname % Compute \leftskip,\rightskip \adjust@parshape\eq@parshape% Final adjustment of parshape for left|right skips - \eq@topspace{\vskip\parskip}% Set top spacing - \debug@showformat - % Now, invoke the appropriate typesetter according to number placement + \if\eq@group + \if\eq@GRP@first@dmath + \global\let\eq@GRP@first@dmath\@False + \xdef\dmath@first@leftskip{\leftskip=\the\leftskip\relax}% + \else + \eq@topspace{\vskip\parskip}% Set top spacing + \fi + \else + \eq@topspace{\vskip\parskip}% Set top spacing + \fi + \afterassignment\remove@to@nnil + \eq@final@linecount=\expandafter\@gobble\eq@parshape\@nnil \if\eq@hasNumber \if\eq@shiftnumber \csname eq@typeset@\eqnumside Shifted\endcsname \else - \csname eq@typeset@\eqnumside\eqnumplace\endcsname + \ifnum\eq@final@linecount=\@ne + \csname eq@typeset@\eqnumside @single\endcsname + \else + \csname eq@typeset@\eqnumside\eqnumplace\endcsname + \fi \fi \else \eq@typeset@Unnumbered @@ -541,6 +518,31 @@ \endgroup \eq@botspace } +\def\eq@typeset@L@single{% + \nobreak + \eq@params\eq@parshape + \nointerlineskip\noindent + \add@grp@label + \rlap{\kern-\leftskip\box\EQ@numbox}% + \if F\eq@frame + \else + \rlap{\raise\eq@firstht\hbox to\z@{\eq@addframe\hss}}% + \fi + \eq@dump@box\unhbox\EQ@box \@@par +} +\def\eq@typeset@R@single{% + \nobreak + \eq@params\eq@parshape + \nointerlineskip\noindent + \add@grp@label + \if F\eq@frame + \else + \rlap{\raise\eq@firstht\hbox to\z@{\eq@addframe\hss}}% + \fi + \rlap{\kern-\leftskip\kern\linewidth\kern-\wd\EQ@numbox\copy\EQ@numbox}% + \eq@dump@box\unhbox\EQ@box + \@@par +} \def\peek@branch#1#2{% \let\peek@b#1\let\peek@space#2\futurelet\@let@token\peek@a } @@ -576,6 +578,7 @@ \else\ifx\@let@token ;\@nx\check@qed \else\ifx\@let@token ?\@nx\check@qed \else\ifx\@let@token !\@nx\check@qed + \else\@nx\finish@end \fi\fi\fi\fi\fi } \xdef\check@punct@b{% @@ -613,8 +616,8 @@ \def\eq@topspace#1{% \begingroup \global\let\EQ@shortskips\@False - \if\@And{\eq@group}{\@Not\GRP@top}% - \parskip\intereqskip \penalty\intereqpenalty + \if\@And{\eq@group}{\@Not\eq@GRP@first@dmath}% + \parskip\intereqskip \penalty\intereqpenalty \else \eq@check@shortskip \if\EQ@shortskips @@ -629,27 +632,35 @@ \else \addtolength\parskip{\eq@framesep+\eq@framewd}% \fi -\debugmsg{Topspace: \theb@@le\EQ@shortskips, \parskip=\the\parskip, \predisplaysize=\the\predisplaysize}% #1% \endgroup } -\def\eq@check@shortskip{% +\def\eq@check@shortskip {% \global\let\EQ@shortskips\@False \setlength\dim@a{\abovedisplayskip+\ht\EQ@numbox}% - \addtolength\leftskip{-2em}% standard TeX value \ifdim\leftskip<\predisplaysize - \else\if R\eqnumside \global\let\EQ@shortskips\@True - \else\if\eq@shiftnumber - \else\if T\eqnumplace - \ifdim\dim@a<\eq@firstht - \global\let\EQ@shortskips\@True - \fi \else - \setlength\dim@b{\eq@vspan/2}% - \ifdim\dim@a<\dim@b - \global\let\EQ@shortskips\@True + \ifdim -\maxdimen=\predisplaysize + \else + \if R\eqnumside + \global\let\EQ@shortskips\@True + \else + \if\eq@shiftnumber + \else + \if T\eqnumplace + \ifdim\dim@a<\eq@firstht + \global\let\EQ@shortskips\@True + \fi + \else + \setlength\dim@b{\eq@vspan/2}% + \ifdim\dim@a<\dim@b + \global\let\EQ@shortskips\@True + \fi + \fi + \fi + \fi \fi - \fi\fi\fi\fi + \fi } \def\eq@botspace{% \penalty\postdisplaypenalty @@ -681,8 +692,6 @@ \global\let\EQ@prebin@space\relax \binoppenalty\@M \relpenalty\@M } -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newdimen\eq@wdR\eq@wdR\z@%BRM \def\eq@capture{% \ifnum\lastpenalty>-\@M \penalty-\@Mi \fi @@ -706,14 +715,10 @@ % Apparently missing a \thickmuskip = 5mu = 5/18em=0.27777777777.. ? + 0.2777777777777em}% FUDGE??!?!?! \ifdim\dim@a>\eq@wdL - \debugmsg{Correcting LHS from \the\eq@wdL\space to \the\dim@a = \the\wd\EQ@box - \the\eq@wdR}% \eq@wdL\dim@a \xdef\EQ@setwdL{\eq@wdL\the\eq@wdL\relax}% \fi \fi - \debugmsg{Capture: total length=\the\wd\EQ@box - ^^J||===== has LHS=\theb@@le\EQ@hasLHS, \eq@wdL=\the\eq@wdL, \eq@wdR=\the\eq@wdR, - ^^J||===== \eq@wdCond=\the\eq@wdCond}% \egroup % end vbox started earlier } \def\eq@addpunct{% @@ -842,28 +847,6 @@ \endgroup \EQ@trial } -\def\debug@showmeasurements{% - \debugmsg{=> \number\eq@lines\space lines}% - \debug - \def\@elt##1^^J##2{^^J||===== \space\space##1/##2}% - \let\@endelt\@empty - \debugmsg{=> trial info:\eq@measurements}% - \debugmsg{=> bounding box: \the\eq@wdT x\the\eq@vspan, badness=\the\eq@badness}% - \let\@elt\relax \let\@endelt\relax - \gubed -} -\def\debug@showmeasurements{% - \begingroup - \def\@elt##1^^J##2{^^J||===== ##1/##2}% - \let\@endelt\@empty - \debugmsg{===> Measurements: \number\eq@lines\space lines - \eq@measurements - ^^J||===== bounding box: \the\eq@wdT x\the\eq@vspan, badness=\the\eq@badness - ^^J||===== \leftskip=\the\leftskip, \rightskip=\the\rightskip}% - \endgroup -} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \let\EQ@trial\@empty \newtoks\EQ@continue \let\EQ@widths\@empty @@ -882,33 +865,29 @@ \if T\eq@frame \eq@frame@adjust\dim@c \fi \ifdim\dim@c>\eq@linewidth \eq@linewidth\dim@c - \debugmsg{Choose Shape for width(#1)=\the\eq@linewidth}% \let\eq@trial@b\eq@trial@d \csname eq@try@layout@\eq@layout\endcsname - \else - \debugmsg{Next width (#1) is shorter; skip it}% \fi \edef\eq@linewidths{\iffalse}\fi } \def\eq@frame@adjust#1{% - \addtolength#1{-2\eq@framewd-2\eq@framesep}% + %\addtolength#1{-2\eq@framewd-2\eq@framesep}% + \dim@a\eq@framewd \advance\dim@a\eq@framesep + \advance#1-2\dim@a } \def\eq@trial@succeed{% \aftergroup\@gobbletwo % cancel the \EQ@fallback code; see \eq@trial@c (?) \global\EQ@continue{\eq@trial@done}% } \def\eq@trial@done{% - \debugmsg{End trial: Success!}% \let\eq@failout\relax } \def\eq@trial@init{\global\let\EQ@fallback\eq@nextlayout} \def\eq@nextlayout#1{% \endgroup - \debugmsg{Nope ... that ain't gonna work.}% \begingroup #1% } \def\eq@failout{% -\debugmsg{End trial: failout}% \global\let\EQ@trial\EQ@last@trial } \def\eq@trial@save#1{% @@ -934,7 +913,6 @@ } \def\eq@trial@b{\eq@trial@c} \def\eq@trial@c#1#2{% - \debugmsg{Trying layout "#1" with^^J||===== parshape\space\@xp\@gobble\@parshape}% \begingroup \eq@trial@init \def\eq@layout{#1}% @@ -959,9 +937,7 @@ } \def\eq@trial@d#1#2{\eq@trial@c{#1}{}} \def\eq@check@density{% - \debugmsg{Checking density for layout L}% \if\@Or{\@Not\EQ@hasLHS}{\eq@shortLHS}% - \debugmsg{Density check: No LHS, or is short; OK}% \eq@trial@succeed \else\if\eq@dense@enough \eq@trial@succeed @@ -981,7 +957,6 @@ \eq@ml@record@indents \eq@measure@lines \eq@recalc - \debug@showmeasurements } \let\adjust@rel@penalty\@empty \def\eq@fix@lastline{% @@ -1000,16 +975,14 @@ \let\@elt\eq@recalc@b \@elt#1x#2+#3\@endelt } -\def\eq@recalc@b#1^^J#2,#3x#4+#5@#6\@endelt{% +\def\eq@recalc@b#1X#2,#3x#4+#5@#6\@endelt{% \setlength\dim@a{#2+#3}% \ifdim\dim@a>\eq@wdT \eq@wdT\dim@a \fi \ifdim\dim@a<\eq@wdMin \eq@wdMin\dim@a \fi \eq@dp#5\relax - \addtolength\eq@vspan{#1+#4+#5}% + \addtolength\eq@vspan{#1+#4+\eq@dp}% \ifnum#6>\eq@badness \eq@badness#6\relax\fi } -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def\eq@layout{?} \@namedef{eq@try@layout@?}{% \let\eq@trial@b\eq@trial@c @@ -1022,34 +995,27 @@ \else\if\grp@hasNumber\addtolength\dim@b{-\wd\GRP@numbox-\eqnumsep}% \fi\fi\fi\fi \ifdim\dim@a<\dim@b% Do we even have a chance of fitting to one line? - \debugmsg{Choose Shape: (\the\wd\EQ@copy) may fit in \the\dim@b}% - % assuming it might fit, don't push too hard \setlength\dim@b{\columnwidth-\dim@a+\eq@wdCond}% \rightskip\z@\@plus\dim@b\@minus\hfuzz \eq@trial@b{i}{\eq@try@layout@multi}% \else - \debugmsg{Choose Shape: Too long (\the\wd\EQ@copy) for one line (free width=\the\dim@b)}% \eq@try@layout@multi \fi } \def\eq@try@layout@multi{% \if\EQ@hasLHS \ifdim\eq@wdL>\eq@linewidth - \debugmsg{Choose Shape: LHS \the\eq@wdL > linewidth}% \setlength\dim@a{\wd\EQ@copy-\eq@wdL}% \ifdim\dim@a<.25\eq@linewidth \eq@try@layout@S \else \eq@try@layout@l \fi % BRM: Originally .7: Extreme for L since rhs has to wrap within the remaining 30+%! \else\ifdim\eq@wdL>.50\eq@linewidth - \debugmsg{Choose Shape: LHS (\the\eq@wdL) > .50 linewidth (linewidth=\the\eq@linewidth)}% \eq@try@layout@D \else - \debugmsg{Choose Shape: LHS (\the\eq@wdL) not extraordinarily wide}% \eq@try@layout@L \fi\fi \else - \debugmsg{Choose Shape: No LHS here}% \eq@try@layout@S % (already checked case i) \fi } @@ -1107,10 +1073,8 @@ \let\eq@shiftnumber\@False \def\eq@retry@with@number{% \if\eq@shiftnumber - \debugmsg{Place number: Shifted number requested}% \else \ifdim\eq@wdCond>\z@\if R\eqnumside - \debugmsg{Place number: Condition w/Right number => Shift number}% \let\eq@shiftnumber\@True \fi\fi \dim@b\eq@wdNum @@ -1123,13 +1087,10 @@ \int@a\@ne\if\eq@group\int@a\maxint\fi \if\eq@shiftnumber % Already know we need to shift \else\ifdim\eq@wdT<\dim@a % Fits! - \debugmsg{Place number: eqn and number fit together}% \else \setlength\leftskip{\eq@wdNum}% \setlength\rightskip{\z@\@plus\dim@a}% \adjust@parshape\@parshape - \debugmsg{Place number: Try with \leftskip=\the\leftskip, \rightskip=\the\rightskip, - ^^J||===== parshape\space\@xp\@gobble\@parshape}% \nointerlineskip \edef\eq@prev@lines{\the\eq@lines}% \edef\eq@prev@badness{\the\eq@badness}% BRM @@ -1137,16 +1098,12 @@ \int@a\eq@prev@badness\relax\advance\int@a 50\relax%? \int@b\eq@prev@lines \if\eq@group\advance\int@b\@ne\fi% Allow 1 extra line in group \ifnum\eq@lines>\int@b % \eq@prev@lines - \debugmsg{Adjustment causes more breaks => Shift number}% \let\eq@shiftnumber\@True \else\if\eq@badline - \debugmsg{Adjustment causes bad lines (\the\eq@badness) => Shift}% \let\eq@shiftnumber\@True \else\ifnum\eq@badness>\int@a % BRM: New case - \debugmsg{Adjustment is badder than previous (\the\eq@badness >> \eq@prev@badness) => Shift}% \let\eq@shiftnumber\@True \else - \debugmsg{Adjustment succeeded}% \fi\fi%\fi \fi\fi\fi \if\eq@shiftnumber @@ -1206,7 +1163,6 @@ } \def\eq@ml@a{% \setbox\tw@\hbox{\unhbox\z@ \unskip}% find natural width - \debug\ifnum\eq@badness<\inf@bad\else\debugmsg{!?! Overfull: \the\wd\tw@ >\the\dim@b}\fi\gubed \ifdim\dim@b<\wd\tw@ \setlength\dim@a{\dim@b}% shrunken line \else \setlength\dim@a{\wd\tw@}% OK to use natural width \fi @@ -1223,7 +1179,7 @@ }% \fi \edef\eq@measurements{\@elt - \the\skip@a\space^^J% extra space to facilitate extracting only the + \the\skip@a\space X% extra space to facilitate extracting only the % dimen part later \csname eq@i% \ifnum\eq@curline<\parshape \number\eq@curline @@ -1241,11 +1197,9 @@ } \def\eq@dense@enough{% \ifnum\eq@lines<\thr@@ - \debugmsg{Density check: less than 3 lines; OK}% \@True \else \ifdim\eq@wdL >.7\eq@wdT - \debugmsg{Density check: LHS too long; NOT OK}% \@False \else \@xp\@xp\@xp\eq@dense@enough@a \fi @@ -1262,18 +1216,16 @@ \else \dim@b\z@ \let\@elt\eq@delt \eq@measurements \dim@c\eq@density@factor\eq@wdT \multiply\dim@c\eq@lines - \debugmsg{Density check: black \the\dim@b/\eq@density@factor total \the\dim@c}% \ifdim\dim@b>\dim@c \true@false@true \else \false@false@false \fi \fi } -\def\eq@delt#1^^J#2,#3x#4+#5@#6\@endelt{\addtolength\dim@b{#3}}% +\def\eq@delt#1X#2,#3x#4+#5@#6\@endelt{\addtolength\dim@b{#3}}% \def\eq@dense@enough@b{% \int@b\eq@wdT \divide\int@b\p@ \dim@b\eq@wdL \divide\dim@b\int@b \dim@c\eq@lines\p@ \multiply\dim@c\f@ur \int@b\eq@lines \multiply\int@b 9 \advance\int@b -10% \divide\dim@c\int@b - \debugmsg{Density check: l/t \the\dim@b\space< \the\dim@c\space 4n/(9n-10)?}% \ifdim\dim@b<\dim@c \true@true@true \else \false@true@false \fi } \let\eq@parshape\@empty @@ -1291,16 +1243,12 @@ \if L\eq@layout \box\tw@ \else\unhbox\tw@\fi \adjust@rel@penalty \unhbox\f@ur } -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def\eq@typeset@Unnumbered{% \eq@typeset@frame \eq@typeset@equation } \def\eq@typeset@LM{% - \addtolength\dim@a{(\eq@vspan+\ht\EQ@numbox-\dp\EQ@numbox)/2}% + \setlength\dim@a{(\eq@vspan+\ht\EQ@numbox-\dp\EQ@numbox)/2}% \eq@typeset@leftnumber \eq@typeset@frame \eq@typeset@equation @@ -1323,7 +1271,7 @@ \eq@typeset@equation } \def\eq@typeset@RM{% - \setlength\dim@a{(\eq@vspan+\ht\EQ@numbox-\dp\EQ@numbox)/2} + \setlength\dim@a{(\eq@vspan+\ht\EQ@numbox-\dp\EQ@numbox)/2}% \eq@typeset@rightnumber \eq@typeset@frame \eq@typeset@equation @@ -1347,22 +1295,6 @@ \parskip\dim@a \hbox to\hsize{\hfil\copy\EQ@numbox}\@@par% } -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\def\debug@showformat{% - \debugmsg{Formatting Layout:\eq@layout\space Center/indent: \eqindent\space Number placement \eqnumside\eqnumplace: - ^^J||===== \eq@linewidth=\the\eq@linewidth, \@totalleftmargin=\the\@totalleftmargin, - ^^J||===== Centered Lines=\theb@@le\eq@centerlines, Shift Number=\theb@@le\eq@shiftnumber, - ^^J||===== \eq@wdT=\the\eq@wdT, \eq@wdMin=\the\eq@wdMin, - ^^J||===== LHS=\theb@@le\EQ@hasLHS: \eq@wdL=\the\eq@wdL, - ^^J||===== \eq@firstht=\the\eq@firstht, \eq@vspan=\the\eq@vspan - ^^J||===== \eq@wdNum=\the\eq@wdNum - ^^J||===== \eq@wdCond=\the\eq@wdCond, \conditionsep=\the\conditionsep, - ^^J||===== \leftskip=\the\leftskip, \rightskip=\the\rightskip, - ^^J||===== \abovedisplayskip=\the\abovedisplayskip, - ^^J||===== \belowdisplayskip=\the\belowdisplayskip - ^^J||===== parshape=\eq@parshape}% -} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def\eq@C@setsides{% % \dim@c = space for number, if any, and not shifted. \dim@c\z@ @@ -1410,7 +1342,8 @@ \setlength\dim@e{\eq@wdT-\eq@wdMin}\dim@d=\z@ \dim@d\z@ \if\eq@centerlines - \divide\dim@e2\relax\dim@d\dim@e + \divide\dim@e2\relax + \dim@d=\dim@e \fi \setlength\leftskip{\dim@a\@plus\dim@d}% \addtolength\dim@e{\dim@c}% @@ -1421,10 +1354,14 @@ \if F\eq@frame\else \dim@b\dim@c \fi - \if\eq@hasNumber\if\eq@shiftnumber\else\if R\eqnumside - \dim@c\eq@wdNum - \ifdim\dim@c>\dim@b\dim@b\dim@c\fi - \fi\fi\fi + \if\@And{\eq@hasNumber}{\@Not{\eq@shiftnumber}}% + \if R\eqnumside + \dim@c\eq@wdNum + \ifdim\dim@c>\dim@b + \dim@b\dim@c + \fi + \fi + \fi % If either of those cases requires hard rightskip, move that part from glue. \ifdim\dim@b>\z@ \addtolength\dim@e{-\dim@c}% @@ -1432,35 +1369,35 @@ \fi % And peculiar further special case: in indented environs, width isn't where it would seem \ifdim\eq@wdCond>\z@ - \addtolength\rightskip{-\@totalleftmargin}% + \addtolength\rightskip{-\@totalleftmargin}% \fi \parfillskip\z@skip } -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def\eq@I@setsides{% - % Leftskip is normally just the requested indentation \leftskip\mathindent - % But move left, if shifted number presumably because of clashed w/ number? \if\eq@shiftnumber \setlength\dim@a{\eq@linewidth-\eq@wdT-\mathindent}% \ifdim\dim@a<\z@ \leftskip=\z@ % Or something minimal? - \fi\fi - % Push gently from right. + \fi + \fi \dim@a=\z@ \setlength\dim@b{\eq@linewidth-\leftskip-\eq@wdMin}% - % Special case: if framing be much more rigid(?) - \if F\eq@frame\else + \if F\eq@frame + \else \setlength\dim@a{\eq@linewidth-\leftskip-\eq@wdT} \addtolength\dim@b{-\dim@a}% \fi % Or force the space for right number, if needed - \if\eq@hasNumber\if\eq@shiftnumber\else\if R\eqnumside - \dim@c=\eq@wdNum - \if\dim@c>\dim@a - \addtolength\dim@b{-\dim@c}% - \dim@a=\dim@c - \fi\fi\fi\fi + \if\@And{\eq@hasNumber}{\@Not{\eq@shiftnumber}}% + \if R\eqnumside + \dim@c=\eq@wdNum + \if\dim@c>\dim@a + \addtolength\dim@b{-\dim@c}% + \dim@a=\dim@c + \fi + \fi + \fi \setlength\rightskip{\dim@a\@plus\dim@b \@minus\hfuzz }%\hfuzz\z@ \parfillskip\z@skip } @@ -1756,7 +1693,6 @@ \let\grp@hasNumber\@False \let\grp@eqs@numbered\@False \let\grp@aligned\@True -\global\let\GRP@top\@True \newenvironment{dgroup}{% \let\grp@hasNumber\@True\@optarg\@dgroup{}% }{% @@ -1769,8 +1705,7 @@ \end@dgroup } \def\@dgroup[#1]{% - \debugmsg{=== DGROUP ==================================================}% - \let\eq@group\@True \global\let\GRP@top\@True + \let\eq@group\@True \global\let\eq@GRP@first@dmath\@True \global\GRP@queue\@emptytoks \global\setbox\GRP@box\box\voidb@x \global\let\GRP@label\@empty \global\grp@wdL\z@\global\grp@wdR\z@\global\grp@wdT\z@ @@ -1807,7 +1742,6 @@ \setcounter{parentequation}{\value{equation}}% \setcounter{equation}{0}% \def\theequation{\theparentequation\alph{equation}}% - \debugmsg{Group Number \theequation}% } \def\grp@resetnumber{% \setcounter{equation}{\value{parentequation}}% @@ -1822,8 +1756,7 @@ \hbox{\box\EQ@box\box\EQ@copy\penalty\@ne\copy\EQ@numbox}% \unvbox\GRP@box }% - \global\let\GRP@top\@False - \EQ@trial + \EQ@trial \if\eq@isIntertext\else \ifdim\eq@wdL>\grp@wdL \global\grp@wdL\eq@wdL \fi \ifdim\eq@wdT>\grp@wdT \global\grp@wdT\eq@wdT \fi @@ -1841,27 +1774,34 @@ } \def\grp@finish{% \setlength\dim@a{\grp@wdL+\grp@wdR-4em}% Allowance for shrink? - \if\grp@aligned\ifdim\dim@a>\grp@linewidth - \global\let\grp@aligned\@False - \fi\fi + \if\grp@aligned + \ifdim\dim@a>\grp@linewidth + \global\let\grp@aligned\@False + \fi + \fi \addtolength\dim@a{\grp@wdNum }% Effective length - \if\grp@shiftnumber\else\if\grp@hasNumber\if\grp@eqs@numbered\else\ifdim\dim@a>\grp@linewidth - \global\let\grp@shiftnumber\@True - \fi\fi\fi\fi + \if\grp@shiftnumber + \else + \if\@And{\grp@hasNumber}{\@Not\grp@eqs@numbered} + \ifdim\dim@a>\grp@linewidth + \global\let\grp@shiftnumber\@True + \fi + \fi + \fi \if\grp@aligned - \global\grp@wdT\grp@wdL\global\advance\grp@wdT\grp@wdR + \global\grp@wdT\grp@wdL + \global\advance\grp@wdT\grp@wdR \fi - \debugmsg{======= DGROUP Formatting - ^^J||===== \grp@wdL=\the\grp@wdL, \grp@wdR=\the\grp@wdR - ^^J||===== Shift Number=\theb@@le\grp@shiftnumber, Eqns. numbered=\theb@@le\grp@eqs@numbered - ^^J||===== Aligned=\theb@@le\grp@aligned - ^^J||===== \grp@wdNum=\the\grp@wdNum}% \setbox\GRP@wholebox\vbox{% \let\@elt\eqgrp@elt \the\GRP@queue }% - \eq@topspace{\vskip\parskip}% - \if\grp@hasNumber\if\grp@eqs@numbered\else + \global\let\eq@GRP@first@dmath\@True + \begingroup + \dmath@first@leftskip + \eq@topspace{\vskip\parskip}% + \endgroup + \if\@And{\grp@hasNumber}{\@Not{\grp@eqs@numbered}}% \if\grp@shiftnumber \copy\GRP@numbox \penalty\@M \kern\eqlineskip @@ -1871,12 +1811,10 @@ \setlength\skip@c{\dim@a-\ht\GRP@numbox}% \vglue\skip@c% NON discardable \copy\GRP@numbox \penalty\@M -\debugmsg{GROUP NUMBER: preskip:\the\skip@c, postkern:\the\dim@a, height:\the\ht\GRP@wholebox, - ^^J||===== box height:\the\ht\GRP@numbox, box depth:\the\dp\GRP@numbox}% \kern-\dim@a \kern-\abovedisplayskip % To cancel the topspace above the first eqn. \fi - \fi\fi + \fi \unvbox\GRP@wholebox \let\@elt\relax \eq@botspace % not needed unless bottom number? @@ -1946,7 +1884,6 @@ } \newenvironment{darray}{\@optarg\@darray{}}{} \def\@darray[#1]{% - \debugmsg{=== DARRAY ==================================================}% \if\eq@group\else\eq@prelim\fi \global\let\@preamble\@empty \setkeys{breqn}{#1}% diff --git a/Master/texmf-dist/tex/latex/mh/flexisym.sty b/Master/texmf-dist/tex/latex/mh/flexisym.sty index 6d41ac66367..2634d311bfd 100644 --- a/Master/texmf-dist/tex/latex/mh/flexisym.sty +++ b/Master/texmf-dist/tex/latex/mh/flexisym.sty @@ -28,7 +28,7 @@ %% flexisym.sty, flexisym.pdf, flexisym.ins, flexisym.drv, %% cmbase.sym, mathpazo.sym, mathptmx.sym, msabm.sym. %% -\ProvidesPackage{flexisym}[2007/12/10 v0.95] +\ProvidesPackage{flexisym}[2007/12/19 v0.96] \let\@xp\expandafter \let\@nx\noexpand \edef\do{% \@nx\AtEndOfPackage{% @@ -269,11 +269,13 @@ \fi \fi \mathcode `\-45 \mathcode `\/47\mathcode `\:"603A\relax +}% } -} +\DeclareOption{mathstyleoff}{\PassOptionsToPackage{mathactivechars}{mathstyle}} \DeclareOption{cmbase}{\usesymbols{cmbase}} \DeclareOption{mathpazo}{\usesymbols{mathpazo}} \DeclareOption{mathptmx}{\usesymbols{mathptmx}} +\ExecuteOptions{cmbase} \ProcessOptions\relax \renewcommand{\lnot}{\neg} \renewcommand{\land}{\wedge} @@ -285,9 +287,7 @@ \renewcommand{\gets}{\leftarrow} \renewcommand{\to}{\rightarrow} \renewcommand{\|}{\Vert} -\@ifpackagewith{flexisym}{mathstyleoff}{}{% - \RequirePackage[activechars]{mathstyle}\relax -} +\RequirePackage{mathstyle} \endinput %% %% End of file `flexisym.sty'. diff --git a/Master/texmf-dist/tex/latex/mh/mathstyle.sty b/Master/texmf-dist/tex/latex/mh/mathstyle.sty index f95e9ad2a22..5dc1db7caff 100644 --- a/Master/texmf-dist/tex/latex/mh/mathstyle.sty +++ b/Master/texmf-dist/tex/latex/mh/mathstyle.sty @@ -27,7 +27,7 @@ %% and the derived files %% mathstyle.sty, mathstyle.pdf, mathstyle.ins, mathstyle.drv. %% -\ProvidesPackage{mathstyle}[2007/12/10 v0.83] +\ProvidesPackage{mathstyle}[2007/12/19 v0.84] \providecommand\@saveprimitive[2]{% \begingroup \edef\@tempa{\string#1}\edef\@tempb{\meaning#1}% @@ -146,6 +146,7 @@ \or \@@scriptscripstyle \fi} +\DeclareOption{mathactivechars}{\catcode`\^=7\relax \catcode`\_=8\relax } \DeclareOption{activechars}{\catcode`\^=13\relax \catcode`\_=13\relax } \ProcessOptions\relax \ifnum\catcode`\^=13\relax |