summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-06-13 21:44:12 +0000
committerKarl Berry <karl@freefriends.org>2018-06-13 21:44:12 +0000
commit0dc40a1ee19496b265caf65c297647f19b2a6096 (patch)
tree6443eab155e506a7e1d53c73ad4723f38c882bf1 /Master/texmf-dist/tex
parent581f55ef218d96498090aaefe5634c3b2dffe058 (diff)
cellprops (13jun18)
git-svn-id: svn://tug.org/texlive/trunk@48004 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/cellprops/cellprops.sty86
1 files changed, 63 insertions, 23 deletions
diff --git a/Master/texmf-dist/tex/latex/cellprops/cellprops.sty b/Master/texmf-dist/tex/latex/cellprops/cellprops.sty
index 2f63c5f4419..b7b4441aca3 100644
--- a/Master/texmf-dist/tex/latex/cellprops/cellprops.sty
+++ b/Master/texmf-dist/tex/latex/cellprops/cellprops.sty
@@ -16,7 +16,7 @@
\def\ExplFileName{cellprops}
\def\ExplFileDescription{CSS-like cell and table properties}
\def\ExplFileDate{2018/06/12}
-\def\ExplFileVersion{1.1a}
+\def\ExplFileVersion{1.2}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -36,7 +36,11 @@
}
\cs_set_protected_nopar:Nn \__cellprops_get_property:nN {
- \tl_set_eq:Nc #2 { l__cellprops_property_value_#1_tl }
+ \tl_if_exist:cTF { l__cellprops_property_value_#1_tl } {
+ \tl_set_eq:Nc #2 { l__cellprops_property_value_#1_tl }
+ }{
+ \tl_clear:N #2
+ }
}
\cs_set_protected:Nn \__cellprops_define_properties:nn {
\clist_map_inline:nn {#2} {
@@ -317,8 +321,7 @@
\tl_new:N \l__cellprops_color_tl
\tl_new:N \l__cellprops_bgcolor_tl
-\cs_set_eq:NN \__cellprops_orig_array: \@array
-\cs_set_protected_nopar:Npn \@array[#1]#2 {
+\cs_new_protected:Nn \__cellprops_array_init: {
\tl_set:Nx \l__cellprops_restore_tl {
\bool_if:NTF \g__cellprops_inrow_bool {
\exp_not:n {\bool_gset_true:N \g__cellprops_inrow_bool}
@@ -336,12 +339,8 @@
}
\int_gzero:N \g__cellprops_row_int
\bool_gset_false:N \g__cellprops_inrow_bool
- \cs_set_eq:NN \__cellprops_orig_tab@initread: \tab@initread
- \cs_set_protected_nopar:Npn \tab@initread {
- \cs_set_eq:NN \tab@initread \__cellprops_orig_tab@initread:
- \tab@initread
- \tl_put_left:Nn \tab@tabtext {\int_gincr:N \g__cellprops_col_int}
- }
+ \cs_set_eq:NN \__cellprops_orig_tab@readpreamble:n \tab@readpreamble
+ \cs_set_eq:NN \tab@readpreamble \__cellprops_readpreamble:n
\dim_set_eq:NN \l__cellprops_colsep_dim \col@sep
\dim_zero:N \col@sep
\dim_zero:N \tab@extrasep
@@ -358,13 +357,46 @@
\tl_set_eq:NN \l__cellprops_color_tl \g_tmpa_tl
\tl_set_eq:NN \l__cellprops_bgcolor_tl \g_tmpb_tl
\__cellprops_recall_properties:n {tr}
- \__cellprops_orig_array:[{#1}]{#2}
+}
+
+\cs_set_nopar:Nn \__cellprops_array_startcontent: {
\hlx{s[\l__cellprops_tablepadding_top_dim]}
}
+
+\cs_set_protected_nopar:Nn \__cellprops_readpreamble:n {
+ \cs_set_eq:NN \tab@readpreamble \__cellprops_orig_tab@readpreamble:n
+ \tl_put_left:Nn \tab@multicol {\__cellprops_startrow:}
+ \tl_put_left:Nn \tab@tabtext {\int_gincr:N \g__cellprops_col_int}
+ \tab@readpreamble{#1}
+ \exp_args:Nx \tab@preamble
+ { \exp_not:N\__cellprops_startrow: \the\tab@preamble \exp_not:N\__cellprops_endrow: }
+}
+
+\cs_set_eq:NN \__cellprops_orig_array:w \@array
+\cs_set_protected_nopar:Npn \@array[#1]#2 {
+ \__cellprops_array_init:
+ \__cellprops_orig_array:w [#1]{#2}
+ \__cellprops_array_startcontent:
+}
+
+\cs_set_eq:NN \__cellprops_orig_LTmkpream:n \@mkpream
+\cs_set_protected_nopar:Npn \@mkpream#1 {
+ \group_end:
+ \__cellprops_array_init:
+ \group_begin:
+ \__cellprops_orig_LTmkpream:n {#1}
+}
+
+\cs_set_eq:NN \__cellprops_orig_LTarray:w \LT@array
+\cs_set_protected_nopar:Npn \LT@array [#1]#2 {
+ \__cellprops_orig_LTarray:w [#1]{#2}
+ \__cellprops_array_startcontent:
+}
+
\cs_new_protected_nopar:Nn \__cellprops_update_color:Nn {
- \__cellprops_get_property:nN {#2} \l_tmpc_tl
- \exp_args:NV \tl_if_eq:NNF \l_tmpc_tl \c__cellprops_inherit_color_tl {
- \tl_set_eq:NN #1 \l_tmpc_tl
+ \__cellprops_get_property:nN {#2} \l_tmpa_tl
+ \exp_args:NV \tl_if_eq:NNF \l_tmpa_tl \c__cellprops_inherit_color_tl {
+ \tl_set_eq:NN #1 \l_tmpa_tl
}
}
@@ -373,17 +405,24 @@
\__cellprops_update_color:Nn \l__cellprops_bgcolor_tl {background-color}
}
-\cs_set_eq:NN \__cellprops_orig_endarray: \endarray
-\cs_set_nopar:Npn \endarray {
+\cs_set_nopar:Nn \__cellprops_end_array:n {
\crcr
\hlx{s[\l__cellprops_tablepadding_bottom_dim]}
- \__cellprops_orig_endarray:
+ #1
\tl_use:N \l__cellprops_restore_tl
}
-\cs_set_eq:NN \__cellprops_orig_tab@startrow: \tab@startrow
-\cs_set_nopar:Npn \tab@startrow {
- \__cellprops_orig_tab@startrow:
+\cs_set_eq:NN \__cellprops_orig_endarray: \endarray
+\cs_set_nopar:Npn \endarray {
+ \__cellprops_end_array:n { \__cellprops_orig_endarray: }
+}
+
+\cs_set_eq:NN \__cellprops_orig_endLT: \endlongtable
+\cs_set_nopar:Npn \endlongtable {
+ \__cellprops_end_array:n { \__cellprops_orig_endLT: }
+}
+
+\cs_set_protected_nopar:Nn \__cellprops_startrow: {
\bool_if:NF \g__cellprops_inrow_bool {
\bool_gset_true:N \g__cellprops_inrow_bool
\int_gincr:N \g__cellprops_row_int
@@ -393,15 +432,16 @@
}
}
-\cs_set_eq:NN \__cellprops_orig_tab@arraycr: \tab@arraycr
-\cs_set_protected_nopar:Npn \tab@arraycr {
+\cs_set_protected_nopar:Npn \__cellprops_endrow: {
\bool_if:NT \g__cellprops_inrow_bool {
\bool_gset_false:N \g__cellprops_inrow_bool
\__cellprops_fix_valign_end:
}
- \__cellprops_orig_tab@arraycr:
}
+\cs_set_eq:NN \__cellprops_orig_tab@arraycr:n \tab@arraycr
+\cs_set_nopar:Npn \tab@arraycr { \__cellprops_endrow:\__cellprops_orig_tab@arraycr:n }
+
\cs_set_eq:NN \__cellprops_orig_multicolumn:w \multicolumn
\cs_set:Npn \multicolumn#1#2#3 {
\__cellprops_orig_multicolumn:w {#1}{#2}{