diff options
author | Karl Berry <karl@freefriends.org> | 2011-02-05 00:19:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-02-05 00:19:57 +0000 |
commit | aca1d102ca518e1c50d8b981087274aa7ba410ef (patch) | |
tree | 8ccb5b86e87a9babe98c483f59519e86c1cc4503 /Master/texmf-dist/tex/latex/gmutils/gmcommand.sty | |
parent | 9475dd92fbbacb2867d8eff365ced7f92766015e (diff) |
gmutils (2feb11)
git-svn-id: svn://tug.org/texlive/trunk@21294 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/gmutils/gmcommand.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/gmutils/gmcommand.sty | 387 |
1 files changed, 281 insertions, 106 deletions
diff --git a/Master/texmf-dist/tex/latex/gmutils/gmcommand.sty b/Master/texmf-dist/tex/latex/gmutils/gmcommand.sty index 77ea0839d87..574667d67bf 100644 --- a/Master/texmf-dist/tex/latex/gmutils/gmcommand.sty +++ b/Master/texmf-dist/tex/latex/gmutils/gmcommand.sty @@ -2,7 +2,7 @@ %% \iffalse ^^A we skip the debug setting \IfFileExists{\string~/bin/gen_and_xela}{\errorcontextlines=1000 }{} %% \fi -%% ^^A $Id: TheUltimateMaster.gmd,v 0.250 2010/10/24 14:42:35 natror Exp natror $ +%% ^^A $Id: TheUltimateMaster.gmd,v 0.297 2011/02/02 18:13:11 natror Exp natror $ %% This is file “gmcommand.sty” generated with the DocStrip utility. %% %% @@ -69,6 +69,9 @@ \newif\if@dc@long@ +\newif\if@dc@BareSpace@ + + \def\@dc@long@letter{% \if@dc@long@ P\fi } @@ -190,11 +193,13 @@ \let\if@dc@long@ = \if@dc@GroteLang@ % and reset the expandaftering switches \@dc@falsify@xadefaults + \@dc@BareSpace@false } \def\@dc@argtypes{% =\gobblespace \loop \lostwax \SameAs \Scope - AaBbCcDdGgKkMmOoQqSs*TtUuWw% + AaBbCcDdGgKkMmOo% ^^U Ôô + QqSs*TtŤťUuǓǔWw% \drs } @@ -232,11 +237,15 @@ {}% {% \gmu@ifsbany{#1}{=\gobblespace}{\@dc@ignore@true}{}% - \gmu@if {@dc@long@} {} + \gmu@ifsw {@dc@BareSpace@}% + {\@dc@addtoparsed@BareSpace } + {}% + % + \gmu@ifsw {@dc@long@}% {\@dc@addtospecs@bare{>P}} {}% % - \gmu@if {@dc@ignore@}{}% + \gmu@ifsw {@dc@ignore@}% {\@dc@addtoparsed@Ignore }% {}% % @@ -262,7 +271,7 @@ {\grab@optparam{#1}}% \@XA{\gmu@CASEsbany{#1}}\@xa{\@dc@drses}% {\grab@optparam{#1}}% - \gmu@CASEsbany{#1}{UuWw\lostwax}% + \gmu@CASEsbany{#1}{UuǓǔWw\lostwax}% {\@dc@grab@Loop #1}% putting the specifier's letter as |#1| for the % grabber suppresses adding it to the parsed specifiers' list. \gmu@lastCASE @@ -281,6 +290,11 @@ \advance\c@dc@argnum\@ne } +\def\@dc@addtoparsed@BareSpace{% + \addtotoks\toks@{\@dc@BareSpaceArg }% + \@dc@addtospecs@bare{>\BareSpace }% +} + \def\@dc@process@ms{% \gmu@if {@dc@Mmode@}{}% {\gmu@if {num}{\@dc@Ms@initial@listate=\@dc@Ms@listate}% @@ -309,12 +323,10 @@ \edef\@dc@processms@hash {\the\numexpr#1}% \edef\@dc@processms@left {\the\numexpr 9-\c@dc@argnum+\@ne}% % - \gmu@if {condsconj} {% - {% - {num} {\@dc@processms@hash >\z@} - {num} {\@dc@processms@hash <\numexpr - \@dc@processms@left+1 \relax }% - }% + \gmu@AND {% + {num} {\@dc@processms@hash >\z@} + {num} {\@dc@processms@hash <\numexpr + \@dc@processms@left+1 \relax }% }% {\stepnummacro \@dc@Ms@num \@dc@processms@hash \edef\@dc@hashgoal {% @@ -324,8 +336,10 @@ \@dc@addinnerhash }% % - \@dc@ParseNextSpecifier }% - {\PackageError{gmcommand}{% + \@dc@ParseNextSpecifier + }% of if all conds.\ satisfied + {% some of the conds.\ not satisfied + \PackageError{gmcommand}{% The argument to the M or m specifier, if any, has to be ^^J% a number between 1 and \@dc@processms@left ^^J% (there is/are \the\c@dc@argnum\space arg(s) declared @@ -371,8 +385,12 @@ } \@dc@DeclareDefault D{0} +\@dc@DeclareDefault d{0} -\@dc@DeclareDefault Ď{0} +\@ifXeTeX {% + \@dc@DeclareDefault Ď{0}% +} +{} \@xa\@dc@DeclareDefault \@xa\Scope\@xa{\all@stars} @@ -447,8 +465,17 @@ \Restore@Macro\@dc@addargum}% } +\pdef\@dc@BareSpaceArg{% + \let \@dc@Loop@CareOfSpace \@dc@Loop@CareOfSpace@NoBraces + \def\@dc@addargum {% + \Restore@Macro\@dc@addargum + \Restore@Macro\@dc@Loop@CareOfSpace + \@dc@addargum + }% +} + -\def\grab@prefix@CASE{% jus a shorthand +\def\grab@prefix@CASE{% just a shorthand \@xa\gmu@CASEsbany\gmu@forarg } @@ -456,7 +483,7 @@ %% \CH{2010/07/26 v0.993 made for-eaching to make it behave as %% expected, i.e.\ that latter settings prævalent over the former} % - \gmu@foreach#1\gmu@foreach@delim{% + \gmu@foreach#1\gmu@foreach@delim {% % \grab@prefix@CASE {\long!lL\par Pp}% @@ -503,7 +530,12 @@ \GroteLStop\GrossLStop}% {% \let\if@dc@GroteLang@=\if@dc@alllong@ - \let\if@dc@long@=\if@dc@alllong@}% + \let\if@dc@long@=\if@dc@alllong@ + }% + % + \grab@prefix@CASE + {\BareSpace} + {\@dc@BareSpace@true} % \gmu@EatCases {\IgnInfo{gmcommand}{while parsing arg specifiers}{#1}}% @@ -577,15 +609,17 @@ \@dc@LowerAliases B -\long\def\ArgumentCatcher@T@ % parsing of a~single \textbf Token continued: -#1% the list to search |#4| on, -#2% the default value, -#3% the tail of args parsers, -#4% the token we search in |#1| (it's an unbraced +\long\def\ArgumentCatcher@T@ % parsing of a~single \textbf Token + % continued: +#1% kind of test (|strings| or |StrX| so far (2010/12/28, 7.24)) +#2% the list to search |#4| on, +#3% the default value, +#4% the tail of args parsers, +#5% the token we search in |#1| (it's an unbraced {% - \gmu@ifStrXany #4{#1}% - {\@dc@addargum {{#4}}#3\@dc@arguments}% - {\@dc@addargum {{#2}}#3\@dc@arguments#4}% + #1 #5{#2}% + {\@dc@addargum {{#5}}#4\@dc@arguments}% + {\@dc@addargum {{#3}}#4\@dc@arguments#5}% } \long\def\ArgumentCatcher@T % parsing of a~ single \textbf Token. It's @@ -595,7 +629,7 @@ \@dc@arguments{% \@ifnextnotgroup % \label{dc@S:bgroup} - {\ArgumentCatcher@T@{#1}{#2}{#3}}% + {\ArgumentCatcher@T@ \gmu@ifStrXany {#1}{#2}{#3}}% {\@dc@addargum {{#2}}#3\@dc@arguments}% if we parse an % opening or closing brace, then we are sure it's not any expected % Single. @@ -603,6 +637,15 @@ \@dc@AliasPLower T +\long\def\ArgumentCatcher@Ť #1#2#3% as in |›…@T| +{% + \ArgumentCatcher@Loop + {StrX}{\any}{#1}{\any}{}{1}{#2}{% empty eacher + }{#3}% +} + +\@dc@AliasPLower Ť + \edef\ArgumentCatcher@S #1% default value @@ -615,27 +658,28 @@ \newif\if@debugacro@ \long\def\ArgumentCatcher@Loop %^^A >>>>>>>loop -#1% “sign” of match for iteration: |\any| or |\none| -#2% list of tokens |\@let@token| will be matched against with |#1| -#3% test for “drainers” (allowed values as for |#1|) -#4% list of “drainers”: if |\@let@token| satisfies the |#3| test, -#5% upper bound of number of items (may be empty or negative to turn -#6% default value (if empty sequence is parsed), |\NoValue| by default. -#7% an “eacher”—stuff to be put before each token/text added to the -#8% the tail of args parser +#1% kind of test (|StrX| or |str| or anything else for what +#2% “sign” of match for iteration: |\any| or |\none| +#3% list of tokens |\@let@token| will be matched against with |#1| +#4% test for “drainers” (allowed values as for |#1|) +#5% list of “drainers”: if |\@let@token| satisfies the |#3| test, +#6% upper bound of number of items (may be empty or negative to turn +#7% default value (if empty sequence is parsed), |\NoValue| by default. +#8% an “eacher”—stuff to be put before each token/text added to the +#9% the tail of args parser \@dc@arguments % delimiter {% - \dc@DefParseNext{#8}% + \dc@DefParseNext{#9}% \emptify\@dc@seQuence - \c@dc@Loop@bound=\numexpr(\gmu@ifempty{#5}{-1}{#5})*1\relax + \c@dc@Loop@bound=\numexpr(\gmu@ifempty{#6}{-1}{#6})*1\relax \gmu@if {num}{\c@dc@Loop@bound<\z@}% {\c@dc@Loop@bound=-\c@dc@Loop@bound \let\@dc@Loop@countby\z@ }% {\let\@dc@Loop@countby\m@ne}% % - \gmu@ifempty{#2}% - {\gmu@if {strings}{\none #1}% + \gmu@ifempty{#3}% + {\gmu@if {strings}{\none #2}% {\@dc@Loop@iteralltrue}% it's an additional switch for better % performance in a special case: when we wish % only count the items and iterate over anything @@ -644,16 +688,16 @@ \def\ArgumentCatcher@Loop@defcheck{% \Restore@Macro\ArgumentCatcher@Loop@defcheck \ArgumentCatcher@Loop@shipout}% - }% of if |#1| str-is |\any| - }% of if |#2| empty + }% of if |#2| str-is |\any| + }% of if |#3| empty {\@dc@Loop@iterallfalse}% when |#2| nonempty, we \emph{have} to % perform matching. \rrthis % - \gmu@ifempty{#4}% - {\gmu@if {strings} {\any #3}% + \gmu@ifempty{#5}% + {\gmu@if {strings} {\any #4}% {\@dc@Loop@addallfalse\@dc@Loop@drainalltrue}% {\@dc@Loop@addalltrue\@dc@Loop@drainallfalse}% - }% of if |#4| empty + }% of if |#5| empty {\@dc@Loop@addallfalse\@dc@Loop@drainallfalse}% when |#4| nonempty, % we \emph{have} to perform matching. \rrthis % @@ -662,7 +706,7 @@ {\firstoftwo}% {\unexpanded{% \@dc@Loop@test - #1{#2}% if the next token StrX-is/is not on |#2|, + {#1}#2{#3}% if the next token StrX-is/is not on |#2|, % then… \label{h1.@let@token.h2} }% of |\unexpanded| }% of if we don't iterate over all (of preparation of iteration test) @@ -672,8 +716,8 @@ {\@nx \ArgumentCatcher@Loop@drain}% {\unexpanded{% \@dc@Loop@test - #3{#4}% if the next token satisfies |#3|-direction StrX - % match against |#4|, then we discard it, + {#1}#4{#5}% if the next token satisfies |#4|-direction StrX/str + % match against |#5|, then we discard it, % otherwise we add it. \ArgumentCatcher@Loop@drain \ArgumentCatcher@Loop@add @@ -685,10 +729,10 @@ {}% {\@nx \ArgumentCatcher@Loop@shipout}% }% - \unexpanded{{#6}{#7}}% + \unexpanded{{#7}{#8}}% }% of |\ArgumentCatcher@Loop@afterpeep| % - \ArgumentCatcher@Loop@defcheck {#6}{#7}% + \ArgumentCatcher@Loop@defcheck {#7}{#8}% \ArgumentCatcher@Loop@check }% of |\ArgumentCatcher@Loop| @@ -699,18 +743,25 @@ \newif\if@dc@Loop@drainall \long\def\@dc@Loop@test -#1% |\any| or |\none| -#2% list of tokens to match against -#3% what if \OK -#4% what if not \OK. +#1% kind of test (|StrX| or |str| so far (2010/12/28, 7.51)) +#2% |\any| or |\none| +#3% list of tokens to match against +#4% what if \OK +#5% what if not \OK. {% remember we are in the argument of |\gmu@peep@next| so we are after % peep. \gmu@if {defined}{\@def@token} - {\csname gmu@ifStrX\strip@bslash #1\@xa\endcsname + {\csname gmu@if#1\strip@bslash #2\@xa\endcsname \@def@token }% - {\csname gmu@ifx\strip@bslash #1\endcsname + {\csname + gmu@if% + \gmu@ifdetokens {#1}{str}% + {NX}% + {x}% + \strip@bslash #2% + \endcsname \@let@token }% - {#2}{#3}{#4}% + {#3}{#4}{#5}% } \@dc@AliasCatcher {PLoop} {Loop} @@ -740,6 +791,21 @@ % its way. } +\StoreMacro@nocat\@dc@Loop@CareOfSpace + +\lpdef\@dc@Loop@CareOfSpace@NoBraces +#1% a macro with all the arguments except last +{% +\gmu@ifpeeped x \gmu@letspace + {\edef\@dc@Loop@careofspace@aas{% + \unexpanded{#1 }% note the space + }% edef unexpanded to allow |#| tokens in |#1| + \afterassignment\@dc@Loop@careofspace@aas + \let\gmu@drain= }% after |=| is a space. + {#1}% next not space, so just |#1| and let it process the next token + % its way. +} + \lpdef\@dc@Loop@CareOfSpaceAndGroup #1% as in the previous macro @@ -790,9 +856,10 @@ \long\def\ArgumentCatcher@Q #1% list -#2% default (|\NoValue| by default, as in previous versions. +#2% default (|\NoValue| by default, as in previous versions). {% \ArgumentCatcher@Loop + {StrX}% \any { #1}% note the space before |#1|—settheory sum of |#1| and drainers. \any @@ -805,6 +872,7 @@ \@dc@AliasPLower Q + \def\ArgumentCatcher@D{% decimal argument (useful for dates e.g.) \ArgumentCatcher@Q {-+0123456789}% @@ -819,6 +887,7 @@ #1% default value, 0 by default {% decimal argument \ArgumentCatcher@Loop + {StrX}% \any {-+0123456789}% \none @@ -827,20 +896,22 @@ {#1}% {}% }% -} -{}% \@dc@AliasPLower Ď -\@dc@AliasCatcher U {Loop} +}{}% of if \XeTeX + +\def\ArgumentCatcher@U {% + \ArgumentCatcher@Loop {StrX}% +} \@dc@AliasPLower U -\@dc@AliasCatcher W {Loop} +\@dc@AliasCatcher W {U} \@dc@AliasPLower W -\@dc@AliasCatcher {lostwax} U +\@dc@AliasCatcher {lostwax} U % ^^A Catcher@lostwax \long\def\ArgumentCatcher@item #1% “sign” of matching @@ -849,6 +920,7 @@ #4% eacher (which in this case will be applied to \emph{the} (one) {% \ArgumentCatcher@Loop + {StrX}% #1% {#2}% \none {}% we add all that matches @@ -857,6 +929,17 @@ {#4}% } +\if@XeTeX + + \def\ArgumentCatcher@Ǔ{% + \@dc@BareSpaceArg + \ArgumentCatcher@Loop {StrX}% + } + + \@dc@AliasPLower Ǔ + +\fi + \long\def\ArgumentCatcher@genM #1% the letter »P« (for long catcher) or nothing (for the short version) @@ -1125,6 +1208,10 @@ \bslash }% +\long\def\@dc@InnerEndName #1{% version for the end-macros of environments + \bslash end\strip@bslash{#1}% +}% + %% \CH{2010/07/26 v0.993 This strikingly simple idea of storing the %% specifiers' sequence in a macro came to my head only after some %% three years of developing \cmd\DeclareCommand} @@ -1291,7 +1378,7 @@ \@XA{\DeclareCommand\DeclareCommand % This is the final version by now.\ { - #1 >Pm % command to be defined (may be \incs{par} if you + #1 >Pm % command to be defined (may be even \incs{par} if you #2 >\@xa Q{\@dc@DCprefixQlist}{} %\ #3 >Pm % arguments specification (may contain \incmd\par), #4 >Pm % the definition body; may contain nearly anything including @@ -1359,7 +1446,7 @@ }% of |\@dc@define@K| \DeclareCommand\@dc@grab@Loop \long {% - #1 T{\any \none Uu\U \u Ww\W \w \lostwax} % the “sign” of matching for adding; use of + #1 T{\any \none Uu\U \u Ǔǔ\Ǔ \ǔ Ww\W \w \lostwax} % the “sign” of matching for adding; use of % the letters suppresses adding them to the % parsed specifiers' list, which is crucial for % |\SameAs| copying of specifiers: the “until” and “while” loops @@ -1476,7 +1563,7 @@ \gmu@CASE {strings} {{#1}\none} {\@dc@addtoParsed@bare {\none }}% % - \gmu@CASEsbany {#1} {Uu\lostwax } + \gmu@CASEsbany {#1} {UuǓǔ\lostwax } {\@dc@addtotoks@bare {\none }}% % \gmu@lastCASE @@ -1570,7 +1657,9 @@ }% }% of |\@dc@SameAs| -\DeclareCommand\DCUse{>Pm}{% ^^A with star we automatically pass the +\DeclareCommand\DCUse{ + #1 >Pm % the command +}{% ^^A with star we automatically pass the \gmu@ifDeclared{#1}% {% \@dc@arguments\@xa{\@xa @@ -1582,12 +1671,32 @@ \csname \@dc@SpecsArName{#1}\endcsname % of arity carrier \endcsname % of the catcher }% - {\PackageError{gmcommand}{% - Command \@nx#1 ^^J% - is not declared with \DeclareCommand. ^^J% - Therefore I can't use its inner macro (because of its nonexistence).^^J}% - {}% + {\DC@EndNotDeclaredErr{#1}}% +}% + +\pdef \DC@EndNotDeclaredErr #1{% + \PackageError{gmcommand}{% + Command \bslash end\strip@bslash{#1} ^^J% + is not declared with \DeclareCommand. ^^J% + Therefore I can't use its DC-inner macro (because of its nonexistence).^^J}% + {}% +} + +\DeclareCommand\DCUseEnd{ + #1 >Pm % the command (without “end”) +}{% + \gmu@ifDeclared{end\strip@bslash{#1}}% + {% + \@dc@arguments\@xa{\@xa + \csname \@dc@InnerEndName{#1}\endcsname + }% + % + \csname ArgumentCatcher@Pm@\romannumeral + \@xa \@xa \@xa \@thirdofthree + \csname \@dc@SpecsArName{#1}\endcsname % of arity carrier + \endcsname % of the catcher }% + {\DC@EndNotDeclaredErr{#1}}% }% @@ -1597,7 +1706,7 @@ % We repeat the specifiers, but the role of |#4| is slightly % different here: here it's the |\begin| part definition. % - m % (5) the end definition; it \emph{can} contain any + #5 m % the end definition; it \emph{can} contain any % \inverb|#|\<n>---the arguments of the environment are passed % to it, too. }{% @@ -1787,16 +1896,27 @@ % optional default \<nothing> and \cmd\newpage resp.} % \chgs{2009/10/21 v0.98 \cmd\par\ removed since to let it be used % for \cmd\pagebreak\ inside a paragraph} - \gmu@if {num} {% - \gmu@if {dim}{% - \dimexpr\pagegoal-\pagetotal<\dimexpr - (\IfValueTF{#1}{#1\baselineskip}{#2})*1\relax - } - 10% - \gmu@if {dim} {\pagegoal<\pagetotal} - 10% - >\z@ - } + \gmu@if {num} + {\numexpr + \ifdim + % if the space left is less than we wish then 1, otherwise 0. + \gmu@pageremain + <% + \dimexpr + (\IfValueTF{#1}{#1\baselineskip}{#2})*1% + \endexpr + % + % \CH{2010/06/28 v0.993 I added |(›…)*1| to assure that |\relax| + % really delimits the dimexpr} + % + 1\else 0% + \fi + *% + \ifdim \gmu@pageremain >-1sp + 1\else 0% + \fi + >\z@ + }% of condition {\typeout{@@@@@ not enough page \on@line}% #4% }% @@ -1918,9 +2038,10 @@ } \DeclareCommand\@StoreCommand -{T{+-}% grouplevel shift indicator - d % group level or shift - >Pm% name or \CS +{% + #1 T{+-}% grouplevel shift indicator + #2 d % group level or shift (the latter relative to the current g.l.) + #3 >Pm% name or \CS }{% \endgroup %we close the group opened in line \ref{SC begr}. \gmu@SC@setgrouplevel{#1}{#2}% @@ -1966,12 +2087,11 @@ \DeclareCommand\@UseStored \long{% - T{+-}% (1) indicator of grouplevel shift (in distiction from an absolute - % group level) - d % (2) optional grouplevel/shift (0 by default) - O{\@gobble}% (3) stuff to be put before the pair of \CS es, an - % assignment e.g. - m % (4) a \CS or csname + #1 T{+-}% (1) indicator of grouplevel shift (in distiction from an absolute + % group level) + #2 d % (2) optional grouplevel or shift (0 by default) + #3 O{\@gobble}% (3) stuff to be put before the |#4| \CS, e.g., an + #4 m % (4) a \CS or csname to be taken from the storage liquid }{% \chgs{2010/06/23 v0.993 added} \endgroup \gmu@SC@setgrouplevel{#1}{#2}% @@ -1992,7 +2112,7 @@ % and the csname remains not defined. \unless\ifcsname \gmu@SC@currname \endcsname 1\else 0\fi =11 - \repeat + \repeat \gmu@if{csname}{\gmu@SC@currname\endcsname}% {% % ^^A \s how\ExecutingTrueBranch @@ -2006,6 +2126,7 @@ \UseStored #2[\CommandLet #1*]% } + \newbox\gmu@smashbox \DeclareCommand\set@smashbox{% @@ -2016,7 +2137,8 @@ \def\smash@box{\smash{\box\gmu@smashbox}} -\newbox\gmu@boxa +\newbox\gmu@boxA +\newbox\gmu@boxB \newdimen\gmu@dima \newdimen\gmu@dimb @@ -2037,11 +2159,11 @@ }% % \long \def\gmu@dimextreme@step ##1{% - \setbox\gmu@boxa=\hbox{##1}% + \setbox\gmu@boxA=\hbox{##1}% % \gmu@dima= \gmu@if x {\totalheight#3} - {\dimexpr \ht\gmu@boxa +\dp\gmu@boxa\relax} - {#3\gmu@boxa}% + {\dimexpr \ht\gmu@boxA +\dp\gmu@boxA\relax} + {#3\gmu@boxA}% \relax % \gmu@if {dim} @@ -2060,6 +2182,37 @@ {#5\edef #1{\the\gmu@dimb }}% }% +\pdef\gmu@getht +#1% box register +#2% dimen (or glue) register to assign the (substitute) height to +{% + \setbox\gmu@boxA=\copy#1\relax + \ifvbox\gmu@boxA + \vbadness@M + \setbox\gmu@boxB=\vsplit\gmu@boxA to \maxdimen + \vbadness@Restore + % + % chcemy rzeczywiście pomierzyć, a nie być może odrzucić odstępy, + % kerny i grzywny. + \setbox\gmu@boxB=\vbox{\splitdiscards }% + \ifdim \ht\gmu@boxB >\z@ + \setbox \gmu@boxA=\vbox{ + \unvbox\gmu@boxB + \unvbox\gmu@boxA + }% + \fi + \else + \setbox\gmu@boxA=\box\voidb@x + \fi + % + \ifvoid\gmu@boxA + #2=\ht#1\relax + \else + #2=\maxdimen + \fi +}% of |\gmu@getht| + + \DeclareCommand\enlargefsize{ #1 m % enlargement (dim(expr)) for font size @@ -2130,11 +2283,20 @@ \relaxen\gmu@bihyphen@corr -\DeclareCommand\gmshowlists { - >iT{\depth} - Ď{1}% - >iT{\breadth} - Ď{10000000} +\@ifXeTeX{% + \DeclareCommand\gmshowlists { + >iT{\depth} + Ď{1}% + >iT{\breadth} + Ď{10000000} + }% +}{% not in \XeTeX\ we use legacy |D| arg.\ specifiers: + \DeclareCommand\gmshowlists { + >iT{\depth} + Ď{1}% + >iT{\breadth} + Ď{10000000} + }% } {\tracingonline=\@ne \showboxdepth=#1\relax % how many levels of @@ -2147,18 +2309,31 @@ \SameAs\gmshowlists } {\tracingonline=\@ne + \tracingoutput=\@ne \showboxdepth=#1\relax % how many levels of % box nesting should be shown \showboxbreadth=#2\relax % after how many elements »etc.« will be put - \tracingoutput=\@ne } -%%% (For my GNU Emacs:) -%%% Local Variables: -%%% mode: doctex -%%% coding: utf-8 -%%% End: +\newcount\c@FiBreakPenalty + +\DeclareCommand \AllowFiBreak {% + % The defaults are as in DEK's |\filbreak|. + Q{l}{l} + = {\c@FiBreakPenalty } +} +{% + \penalty\@M + \csname vfi#1\endcsname + \penalty \c@FiBreakPenalty + \csname vfi#1neg\endcsname +} + + +\DeclareCommand \IgnorePars {m Q{\par}} {#1} + + \endinput %% %% End of file `gmcommand.sty'. |