diff options
Diffstat (limited to 'tex/context/base/mkiv/tabl-xtb.mkvi')
-rw-r--r-- | tex/context/base/mkiv/tabl-xtb.mkvi | 65 |
1 files changed, 56 insertions, 9 deletions
diff --git a/tex/context/base/mkiv/tabl-xtb.mkvi b/tex/context/base/mkiv/tabl-xtb.mkvi index 24b004b2b..dc4a30e2b 100644 --- a/tex/context/base/mkiv/tabl-xtb.mkvi +++ b/tex/context/base/mkiv/tabl-xtb.mkvi @@ -140,8 +140,12 @@ \c!autostrut=\v!no, \c!split=\v!auto, % a number will take that many lines \c!splitoffset=\zeropoint, % extra space taken - % \c!aligncharacter=\v!no, - % \c!alignmentcharacter={,}, + \c!aligncharacter=\v!no, + \c!alignmentcharacter={,}, + \c!alignmentleftsample=, + \c!alignmentrightsample=, + \c!alignmentleftwidth=\zeropoint, + \c!alignmentrightwidth=\zeropoint, % \c!option=, % \v!stretch {\v!stretch,\v!width} % \c!footer=, % \c!header=, @@ -335,6 +339,7 @@ \clf_x_table_cleanup \dostoptagged \resetbuffer[\tabl_x_current_buffer]% + \resetcharacteralign \egroup} % text flow split modes @@ -480,8 +485,50 @@ {\tabl_x_start_cell_nop \tabl_x_stop_cell} +% \unexpanded\def\tabl_x_begin_of_cell +% {%\inhibitblank % already in framed +% \everypar{\delayedbegstrut}} + +\def\tabl_x_setup_character_align + {\edef\p_left {\directxtableparameter\c!alignmentleftsample}% + \edef\p_right{\directxtableparameter\c!alignmentrightsample}% + \ifx\p_left\empty + \scratchdimenone\dimexpr\directxtableparameter\c!alignmentleftwidth\relax + \else + \setbox\scratchbox\hbox{\p_left}% + \scratchdimenone\wd\scratchbox + \fi + \ifx\p_right\empty + \scratchdimentwo\dimexpr\directxtableparameter\c!alignmentrightwidth\relax + \else + \setbox\scratchbox\hbox{\p_right}% + \scratchdimentwo\wd\scratchbox + \fi + \clf_setcharacteraligndetail + \clf_x_table_c + {\directxtableparameter\c!alignmentcharacter}% + \scratchdimenone + \scratchdimentwo + \relax} + +\newtoks\t_tabl_x_every_cell + +% \appendtoks +% \inhibitblank % already in framed +% \to \t_tabl_x_every_cell + +\appendtoks + \edef\p_characteralign{\directxtableparameter\c!aligncharacter}% + \ifx\p_characteralign\v!yes + \ifcase\clf_x_table_r\or + \tabl_x_setup_character_align + \fi + \signalcharacteralign\clf_x_table_c\clf_x_table_r + \fi +\to \t_tabl_x_every_cell + \unexpanded\def\tabl_x_begin_of_cell - {%\inhibitblank % already in framed + {\the\t_tabl_x_every_cell \everypar{\delayedbegstrut}} \unexpanded\def\tabl_x_end_of_cell @@ -519,7 +566,7 @@ \let\tabl_x_set_hsize\relax \unexpanded\def\tabl_x_start_cell_reflow_width_yes[#settings]% - {\setbox\b_tabl_x\hbox\bgroup + {\setbox\b_tabl_x\hpack\bgroup \ifnum\c_tabl_x_nesting>\plusone \letxtableparameter\c!width \v!fit % overloads given width \letxtableparameter\c!height\v!fit % overloads given height @@ -548,7 +595,7 @@ \tabl_x_set_hsize} \unexpanded\def\tabl_x_start_cell_reflow_width_nop - {\setbox\b_tabl_x\hbox\bgroup + {\setbox\b_tabl_x\hpack\bgroup \ifnum\c_tabl_x_nesting>\plusone \letxtableparameter\c!width \v!fit % overloads given width \letxtableparameter\c!height\v!fit % overloads given height @@ -568,7 +615,7 @@ \clf_x_table_set_reflow_width} \unexpanded\def\tabl_x_start_cell_reflow_height_yes[#settings]% - {\setbox\b_tabl_x\hbox\bgroup + {\setbox\b_tabl_x\hpack\bgroup \clf_x_table_init_reflow_height \ifcase\c_tabl_x_skip_mode % can be sped up \ifnum\c_tabl_x_nesting>\plusone @@ -582,7 +629,7 @@ \fi} \unexpanded\def\tabl_x_start_cell_reflow_height_nop - {\setbox\b_tabl_x\hbox\bgroup + {\setbox\b_tabl_x\hpack\bgroup \clf_x_table_init_reflow_height \ifcase\c_tabl_x_skip_mode % can be sped up \ifnum\c_tabl_x_nesting>\plusone @@ -604,7 +651,7 @@ \unexpanded\def\tabl_x_start_cell_construct_yes[#settings]% {\dostarttagged\t!tablecell\empty % can't we just tag the box - \setbox\b_tabl_x\hbox\bgroup + \setbox\b_tabl_x\hpack\bgroup \setupcurrentxtable[#settings]% \letxtableparameter\c!width \d_tabl_x_width % overloads given width \letxtableparameter\c!height\d_tabl_x_height % overloads given height @@ -615,7 +662,7 @@ \unexpanded\def\tabl_x_start_cell_construct_nop {\dostarttagged\t!tablecell\empty % can't we just tag the box - \setbox\b_tabl_x\hbox\bgroup + \setbox\b_tabl_x\hpack\bgroup \letxtableparameter\c!width \d_tabl_x_width % overloads given width \letxtableparameter\c!height\d_tabl_x_height % overloads given height (commenting it ... nice option) \clf_x_table_init_construct |