diff options
author | Mojca Miklavec <mojca.miklavec@gmail.com> | 2014-05-05 20:29:55 +0000 |
---|---|---|
committer | Mojca Miklavec <mojca.miklavec@gmail.com> | 2014-05-05 20:29:55 +0000 |
commit | ba9a57343987f1c2c72396e7c38f1fa30352c24c (patch) | |
tree | 66a8b12cdf67427ce96770fd0e9e581759aade1c /Master/texmf-dist/tex/context/base/pack-com.mkiv | |
parent | 15242121b8ddf7d4a041fb3998d295dd8232e1eb (diff) |
ConTeXt 2014.04.28 23:24
git-svn-id: svn://tug.org/texlive/trunk@33856 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/pack-com.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/pack-com.mkiv | 60 |
1 files changed, 41 insertions, 19 deletions
diff --git a/Master/texmf-dist/tex/context/base/pack-com.mkiv b/Master/texmf-dist/tex/context/base/pack-com.mkiv index 6c1363148b9..4ca77af1c45 100644 --- a/Master/texmf-dist/tex/context/base/pack-com.mkiv +++ b/Master/texmf-dist/tex/context/base/pack-com.mkiv @@ -267,10 +267,13 @@ \edef\p_pack_combinations_alternative{\combinationparameter\c!alternative}% \to \everydefinecombination -\def\pack_combinations_pickup % we want to add struts but still ignore an empty box +\def\pack_combinations_pickup {\dostarttagged\t!combinationpair\empty \dostarttagged\t!combinationcontent\empty - \dowithnextboxcs\pack_combinations_pickup_content\hbox} + \assumelongusagecs\pack_combinations_pickup_content_indeed} + +\def\pack_combinations_pickup_content_indeed + {\dowithnextboxcs\pack_combinations_pickup_content\hbox} \def\pack_combinations_pickup_content % we want to add struts but still ignore an empty box {\dostoptagged @@ -279,15 +282,21 @@ \expandnamespacemacro\??combinationalternative\p_pack_combinations_alternative\v!text} \setvalue{\??combinationalternative\v!text}% + {\assumelongusagecs\pack_combinations_alternative_text_indeed} + +\setvalue{\??combinationalternative\v!label}% + {\assumelongusagecs\pack_combinations_alternative_label_indeed} + +\def\pack_combinations_alternative_text_indeed {\dowithnextboxcs\pack_combinations_pickup_caption\vtop\bgroup \afterassignment\pack_combinations_caption_first \let\nexttoken=} -\setvalue{\??combinationalternative\v!label}% +\def\pack_combinations_alternative_label_indeed {\dowithnextboxcs\pack_combinations_pickup_caption\vtop\bgroup \hsize\wd\b_pack_combinations_content \ifx\p_align\empty\else\setupalign[\p_align]\fi - \usecombinationstyleandcolor\c!style\c!color % but label style wins, so independent configuration + \usecombinationstyleandcolor\c!style\c!color \begstrut \normalexpanded{\strc_labels_command{\v!combination\ifx\currentcombination\empty\else:\currentcombination\fi}}% \endstrut @@ -617,12 +626,12 @@ \unexpanded\def\placepairedbox[#1]% {\bgroup \edef\currentpairedbox{#1}% - \doifnextoptionalelse\pack_pairedboxes_place\pack_pairedboxes_place_indeed} + \doifnextoptionalcselse\pack_pairedboxes_place\pack_pairedboxes_place_indeed} \unexpanded\def\startplacepairedbox[#1]% {\bgroup \edef\currentpairedbox{#1}% - \doifnextoptionalelse\pack_pairedboxes_place\pack_pairedboxes_place_indeed} + \doifnextoptionalcselse\pack_pairedboxes_place\pack_pairedboxes_place_indeed} \unexpanded\def\stopplacepairedbox {} @@ -644,7 +653,7 @@ % \global\setsystemmode{pairedbox}% \pack_pairedboxes_before - \dogotopar\pack_pairedboxes_first_pickup} + \assumelongusagecs\pack_pairedboxes_first_pickup} \def\pack_pairedboxes_first_pickup {\dowithnextboxcs\pack_pairedboxes_first\hbox @@ -653,7 +662,7 @@ \def\pack_pairedboxes_first {\pack_pairedboxes_between - \dogotopar\pack_pairedboxes_second_pickup} + \assumelongusagecs\pack_pairedboxes_second_pickup} \def\pack_pairedboxes_second_pickup {\dowithnextboxcs\pack_pairedboxes_second\vbox @@ -782,19 +791,32 @@ \setrigidcolumnhsize\hsize{\pairedboxparameter\c!distance}\p_n \fi} +% \def\pack_pairedboxes_between_horizontal +% {\setlocalhsize +% \hsize\wd\b_pack_pairedboxes_first % trick +% \hsize\pairedboxparameter\c!width % can be \hsize +% \scratchdimen\dimexpr\wd\b_pack_pairedboxes_first+\pairedboxparameter\c!distance\relax +% \ifdim\dimexpr\hsize+\scratchdimen\relax>\pairedboxparameter\c!maxwidth\relax +% \hsize\dimexpr\pairedboxparameter\c!maxwidth-\scratchdimen\relax +% \fi} + \def\pack_pairedboxes_between_horizontal - {\hsize\wd\b_pack_pairedboxes_first % trick - \hsize\pairedboxparameter\c!width % can be \hsize - \scratchdimen\dimexpr\wd\b_pack_pairedboxes_first+\pairedboxparameter\c!distance\relax - \ifdim\dimexpr\hsize+\scratchdimen\relax>\pairedboxparameter\c!maxwidth\relax - \hsize\dimexpr\pairedboxparameter\c!maxwidth-\scratchdimen\relax + {\scratchdistance\pairedboxparameter\c!distance + \scratchwidth\pairedboxparameter\c!maxwidth\relax + \setlocalhsize + \hsize\dimexpr\availablehsize-\wd\b_pack_pairedboxes_first-\scratchdistance\relax + \hsize\pairedboxparameter\c!width\relax % can be \hsize + \scratchdimen\dimexpr\wd\b_pack_pairedboxes_first+\scratchdistance\relax + \ifdim\dimexpr\hsize+\scratchdimen\relax>\scratchwidth + \hsize\dimexpr\scratchwidth-\scratchdimen\relax \fi} \def\pack_pairedboxes_between_vertical - {\hsize\wd\b_pack_pairedboxes_first - \hsize\pairedboxparameter\c!width % can be \hsize - \ifdim\hsize>\pairedboxparameter\c!maxwidth\relax - \hsize\pairedboxparameter\c!maxwidth % can be \hsize + {\scratchwidth\pairedboxparameter\c!maxwidth\relax + \hsize\wd\b_pack_pairedboxes_first + \hsize\pairedboxparameter\c!width\relax % can be \hsize + \ifdim\hsize>\scratchwidth\relax + \hsize\scratchwidth \fi} \def\pack_pairedboxes_after @@ -811,7 +833,7 @@ \fi} \def\pack_pairedboxes_pack_horizontal - {\hbox\bgroup + {\dontleavehmode\hbox\bgroup \forgetall \s_pack_pairedboxes_size\ht \ifdim\ht\b_pack_pairedboxes_first>\ht\b_pack_pairedboxes_second @@ -832,7 +854,7 @@ \egroup} \def\pack_pairedboxes_pack_vertical - {\vbox\bgroup + {\dontleavehmode\vbox\bgroup \forgetall \s_pack_pairedboxes_size\wd \ifdim\wd\b_pack_pairedboxes_first>\wd\b_pack_pairedboxes_second |