texlive[52205] Master/texmf-dist: cellprops (29sep19)
commits+karl at tug.org
commits+karl at tug.org
Sun Sep 29 23:12:55 CEST 2019
Revision: 52205
http://tug.org/svn/texlive?view=revision&revision=52205
Author: karl
Date: 2019-09-29 23:12:55 +0200 (Sun, 29 Sep 2019)
Log Message:
-----------
cellprops (29sep19)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/cellprops/LICENSE
trunk/Master/texmf-dist/doc/latex/cellprops/README.md
trunk/Master/texmf-dist/doc/latex/cellprops/cellprops.pdf
trunk/Master/texmf-dist/source/latex/cellprops/cellprops.dtx
trunk/Master/texmf-dist/source/latex/cellprops/cellprops.ins
trunk/Master/texmf-dist/tex/latex/cellprops/cellprops.sty
Modified: trunk/Master/texmf-dist/doc/latex/cellprops/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/latex/cellprops/LICENSE 2019-09-29 21:12:31 UTC (rev 52204)
+++ trunk/Master/texmf-dist/doc/latex/cellprops/LICENSE 2019-09-29 21:12:55 UTC (rev 52205)
@@ -632,7 +632,7 @@
the "copyright" line and a pointer to where the full notice is found.
cellprops
- Copyright (C) 2018 Julien "_FrnchFrgg_" RIVAUD
+ Copyright (C) 2016-2019 Julien "_FrnchFrgg_" RIVAUD
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -652,7 +652,7 @@
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
- cellprops Copyright (C) 2018 Julien "_FrnchFrgg_" RIVAUD
+ cellprops Copyright (C) 2016-2019 Julien "_FrnchFrgg_" RIVAUD
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
Modified: trunk/Master/texmf-dist/doc/latex/cellprops/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/cellprops/README.md 2019-09-29 21:12:31 UTC (rev 52204)
+++ trunk/Master/texmf-dist/doc/latex/cellprops/README.md 2019-09-29 21:12:55 UTC (rev 52205)
@@ -13,7 +13,7 @@
-Copyright (C) 2018 Julien "_FrnchFrgg_" RIVAUD
+Copyright (C) 2016-2019 Julien "_FrnchFrgg_" RIVAUD
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Modified: trunk/Master/texmf-dist/doc/latex/cellprops/cellprops.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/cellprops/cellprops.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/cellprops/cellprops.dtx 2019-09-29 21:12:31 UTC (rev 52204)
+++ trunk/Master/texmf-dist/source/latex/cellprops/cellprops.dtx 2019-09-29 21:12:55 UTC (rev 52205)
@@ -1,7 +1,7 @@
% \iffalse meta-comment
% vim: tw=80 spl=en
%
-%% File: cellprops.dtx (C) Copyright 2018 RIVAUD Julien
+%% File: cellprops.dtx (C) Copyright 2016-2019 RIVAUD Julien
%%
%% It may be distributed and/or modified under the conditions of the
%% General Public License (GPL), either version 3 of this
@@ -11,11 +11,11 @@
% The version of expl3 required is tested as early as possible, as
% some really old versions do not define \ProvidesExplPackage.
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\RequirePackage{expl3}[2016/01/19]
+\RequirePackage{expl3}[2018/06/19]
\def\ExplFileName{cellprops}
\def\ExplFileDescription{CSS-like cell and table properties}
-\def\ExplFileDate{2018/07/16}
-\def\ExplFileVersion{1.4}
+\def\ExplFileDate{2019/09/29}
+\def\ExplFileVersion{1.6}
%</driver|package>
%<*driver>
\documentclass[full]{l3doc}
@@ -103,12 +103,12 @@
% text-align: left;
% }
% }
-% \begin{array}{nnnn}
+% \begin{array}{nnnp{5em}}
% This is text & A_2 & A_3 & A_4 \\
% B1 & This is maths & B_3 & \\
% C1 & C_2 & X & Y \\
% D1 & D_2 & DX & v \\
-% E & F & \int_a^b f(t) dt & v \\
+% & F & \int_a^b f(t) dt & v \\
% \end{array}
% \]
% you can use:
@@ -274,17 +274,17 @@
% \end{description}
%
% Most of these properties are straight-forward. You should check a
-% CSS documentation to get more information. A very good source is the Mozilla
+% CSS documentation to get more information. A very good source is the Mozilla
% Developer Network.
%
% Here are the supported column types:
% \begin{itemize}
% \item "n": The most basic cell type, hbox, honoring all properties.
-% \item "l", "c", and "r": Same as "n" but with forced "text-align".
-% \item "M"\<coltype>: Same as \<coltype> but enforces "math-mode: math". The
-% net effect is that "Mc" will create a centered column whose contents are
-% in non-display math mode.
-% \item "T"\<coltype>: Same as \<coltype> but enforces "math-mode: text".
+% \item "l", "c" and "r": Same as "n" but with forced "text-align".
+% \item "Ml", "Mc" and "Mr": Same as column "l", "c" and "r" but enforces
+% "math-mode: math". The net effect is that "Mc" will create a centered
+% column whose contents are in non-display math mode.
+% \item "T"\<align>: Same as "M"\<align> but enforces "math-mode: text".
% \item "p{"\<width>"}", "m"\<width> and "b"\<width>: parbox cell with the
% corresponding vertical alignment (\cs{vtop}, \cs{vcenter} or \cs{vbox}).
% \item "*{"\<count>"}{"\<coltypes>"}": same as in \pkg{array} or
@@ -361,6 +361,7 @@
\RequirePackage{xparse}
\RequirePackage{xcolor}
+\RequirePackage{etoolbox}
% \end{macrocode}
%
% \subsection{Loading and fixing \pkg{mdwtab}}
@@ -458,7 +459,7 @@
\seq_map_inline:Nn \l_tmpa_seq {
\tl_if_empty:nF {##1} {
\exp_args:NNV \seq_set_split:Nnn \l_tmpb_seq \c_colon_str {##1}
- \int_compare:nNnTF {\seq_count:N \l_tmpb_seq} = \c_two {
+ \int_compare:nNnTF {\seq_count:N \l_tmpb_seq} = { 2 } {
\seq_get_left:NN \l_tmpb_seq \l_tmpa_tl
\exp_args:NNV \str_set:Nn \l_tmpa_str \l_tmpa_tl
\seq_get_right:NN \l_tmpb_seq \l_tmpa_tl
@@ -516,7 +517,7 @@
\str_if_eq:nnTF {#2} {inherit} {
\@@_generic_setter:nnn \exp_not:n {#1} {\c_@@_inherit_color_tl}
}{
- \str_case_x:nnF { \str_range:nnn {#2} {1} {4} } {
+ \str_case_e:nnF { \str_range:nnn {#2} {1} {4} } {
{rgb(} {
\@@_generic_setter:nnn \use:n {#1} {
\exp_not:n {\color[RGB]} {\str_range:nnn {#2} {5} {-2}}
@@ -904,8 +905,36 @@
\exp_args:Nx \tab at preamble
{ \exp_not:N\@@_startrow: \the\tab at preamble \exp_not:N\@@_endrow: }
}
+% \end{macrocode}
+%
+% The color inheritance is handled with \cs{l_@@_inherit_color_tl},
+% \cs{l_@@_color_tl} and \cs{l_@@_bgcolor_tl}. The role of
+% \cs{@@_update_color:Nn} is to set the inherit fallback to the already
+% existing value of \verb|#1| then set \verb|#1| to the CSS value, which can be
+% the inherit variable.
+%
+% \begin{macrocode}
+\cs_new_protected_nopar:Nn \@@_update_color:Nn {
+ \@@_get_property:nN {#2} \l_tmpa_tl
+ \exp_args:NV \tl_if_eq:NNF \l_tmpa_tl \c_@@_inherit_color_tl {
+ \tl_set_eq:NN #1 \l_tmpa_tl
+ }
+}
-
+\cs_new_protected_nopar:Nn \@@_update_colors: {
+ \@@_update_color:Nn \l_@@_color_tl {color}
+ \@@_update_color:Nn \l_@@_bgcolor_tl {background-color}
+}
+% \end{macrocode}
+%
+% Patch the \cs{@array}, \cs{LT at array}, \cs{@mkpream}, \cs{endarray} and
+% \cs{endlongtable} commands, so that we can properly setup our line and column
+% counting system. This is the most brittle part of \pkg{cellprops}, and subject
+% to compatibility problems with other packages that patch those (\pkg{hyperref}
+% in particular).
+%
+% \begin{macrocode}
+\AtEndPreamble{%
\cs_set_eq:NN \@@_orig_array:w \@array
\cs_set_protected_nopar:Npn \@array[#1]#2 {
\@@_array_init:
@@ -926,27 +955,7 @@
\@@_orig_LTarray:w [#1]{#2}
\@@_array_startcontent:
}
-% \end{macrocode}
-%
-% The color inheritance is handled with \cs{l_@@_inherit_color_tl},
-% \cs{l_@@_color_tl} and \cs{l_@@_bgcolor_tl}. The role of
-% \cs{@@_update_color:Nn} is to set the inherit fallback to the already
-% existing value of \verb|#1| then set \verb|#1| to the CSS value, which can be
-% the inherit variable.
-%
-% \begin{macrocode}
-\cs_new_protected_nopar:Nn \@@_update_color:Nn {
- \@@_get_property:nN {#2} \l_tmpa_tl
- \exp_args:NV \tl_if_eq:NNF \l_tmpa_tl \c_@@_inherit_color_tl {
- \tl_set_eq:NN #1 \l_tmpa_tl
- }
-}
-\cs_new_protected_nopar:Nn \@@_update_colors: {
- \@@_update_color:Nn \l_@@_color_tl {color}
- \@@_update_color:Nn \l_@@_bgcolor_tl {background-color}
-}
-
\cs_new_nopar:Nn \@@_end_array:n {
\tl_if_empty:NF \g_@@_borders_tl { \\ }
\crcr
@@ -971,7 +980,7 @@
\bool_if:NF \g_@@_inrow_bool {
\bool_gset_true:N \g_@@_inrow_bool
\int_gincr:N \g_@@_row_int
- \int_gset_eq:NN \g_@@_col_int \c_one
+ \int_gset_eq:NN \g_@@_col_int \c_one_int
\dim_gzero:N \g_@@_ht_dim
\dim_gzero:N \g_@@_dp_dim
}
@@ -1013,6 +1022,8 @@
}
}
+}
+
\cs_new_nopar:Nn \@@_fix_valign_end:n {
\noalign{
\dim_set:Nn \l_tmpa_dim {#1}
@@ -1020,7 +1031,7 @@
\exp_args:NV \tl_if_eq:nnTF \tab at hlstate {b} {
\dim_gadd:Nn \tab at endheight { \g_@@_dp_dim + \l_tmpa_dim }
}{
- \int_compare:nNnT \g_@@_row_int = \c_one {
+ \int_compare:nNnT \g_@@_row_int = \c_one_int {
\dim_gadd:Nn \tab at endheight { \g_@@_ht_dim }
}
}
@@ -1118,7 +1129,7 @@
\@@_begin_raw_cell:n {
#1
\hbox_set:Nw \l_@@_cell_box
- \str_case_x:nnF {\@@_get_property:n {math-mode}} {
+ \str_case_e:nnF {\@@_get_property:n {math-mode}} {
{ text } { \tab at btext }
{ math } { \tab at bmaths }
}{% any other treated as |auto|
@@ -1128,7 +1139,7 @@
}
\cs_new_protected_nopar:Nn \@@_endcell: {
- \str_case_x:nnF {\@@_get_property:n {math-mode}} {
+ \str_case_e:nnF {\@@_get_property:n {math-mode}} {
{ text } { \tab at etext }
{ math } { \tab at emaths }
}{% any other treated as |auto|
@@ -1179,7 +1190,7 @@
#1
\hbox_set_end:
\@@_end_raw_cell:
- \spewnotes\hfil
+ \spewnotes
}
\cs_new_protected_nopar:Nn \@@_begin_raw_cell:n {
@@ -1341,17 +1352,7 @@
{\g_@@_dp_dim}
{\box_dp:N \l_@@_cell_box}
}
- % Handle hpadding and halign
- \skip_set:Nn \l_tmpa_skip {
- \dim_max:nn
- {0pt}
- { (\@@_get_property:n {min-width})
- - \box_wd:N \l_@@_cell_box }
- }
- \skip_add:Nn \l_tmpa_skip {
- 0pt plus 1fil
- }
- % padding-left and border-left
+ % Handle padding-left and border-left
\@@_get_border_info:n {left}
\skip_set:Nn \l_@@_left_skip
{\@@_get_property:n {padding-left} + \l_@@_border_width_dim}
@@ -1387,7 +1388,17 @@
\exp_not:n { \kern \c_zero_dim }
}
}
- \str_case_x:nnF {\@@_get_property:n {text-align}} {
+ % Handle hpadding and halign
+ \skip_set:Nn \l_tmpa_skip {
+ \dim_max:nn
+ {0pt}
+ { (\@@_get_property:n {min-width})
+ - \box_wd:N \l_@@_cell_box }
+ }
+ \skip_add:Nn \l_tmpa_skip {
+ 1sp plus 1fil
+ }
+ \str_case_e:nnF {\@@_get_property:n {text-align}} {
{ right } {
\skip_add:Nn \l_@@_left_skip { \l_tmpa_skip }
}
@@ -1415,7 +1426,7 @@
\group_end:
}
\skip_horizontal:N \l_@@_left_skip
- \box_use_clear:N \l_@@_cell_box
+ \box_use_drop:N \l_@@_cell_box
\skip_horizontal:N \l_@@_right_skip
\kern\c_zero_dim
\group_end:
Modified: trunk/Master/texmf-dist/source/latex/cellprops/cellprops.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/cellprops/cellprops.ins 2019-09-29 21:12:31 UTC (rev 52204)
+++ trunk/Master/texmf-dist/source/latex/cellprops/cellprops.ins 2019-09-29 21:12:55 UTC (rev 52205)
@@ -1,6 +1,6 @@
\iffalse meta-comment
-File cellprops.ins (C) Copyright 2016-2018 RIVAUD Julien
+File cellprops.ins (C) Copyright 2016-2019 RIVAUD Julien
It may be distributed and/or modified under the conditions of the
General Public License (GPL), either version 3 of this
Modified: trunk/Master/texmf-dist/tex/latex/cellprops/cellprops.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/cellprops/cellprops.sty 2019-09-29 21:12:31 UTC (rev 52204)
+++ trunk/Master/texmf-dist/tex/latex/cellprops/cellprops.sty 2019-09-29 21:12:55 UTC (rev 52205)
@@ -6,22 +6,23 @@
%%
%% cellprops.dtx (with options: `package')
%%
-%% File: cellprops.dtx (C) Copyright 2018 RIVAUD Julien
+%% File: cellprops.dtx (C) Copyright 2016-2019 RIVAUD Julien
%%
%% It may be distributed and/or modified under the conditions of the
%% General Public License (GPL), either version 3 of this
%% license or (at your option) any later version.
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\RequirePackage{expl3}[2016/01/19]
+\RequirePackage{expl3}[2018/06/19]
\def\ExplFileName{cellprops}
\def\ExplFileDescription{CSS-like cell and table properties}
-\def\ExplFileDate{2018/07/16}
-\def\ExplFileVersion{1.4}
+\def\ExplFileDate{2019/09/29}
+\def\ExplFileVersion{1.6}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
\RequirePackage{xparse}
\RequirePackage{xcolor}
+\RequirePackage{etoolbox}
\RequirePackage{mdwtab}
\cs_set_nopar:Npn \tab at pop #1 { \tl_set:Nx #1 { \tl_tail:N #1 } }
\cs_new:Nn \__cellprops_generic_setter:nnn {
@@ -60,7 +61,7 @@
\seq_map_inline:Nn \l_tmpa_seq {
\tl_if_empty:nF {##1} {
\exp_args:NNV \seq_set_split:Nnn \l_tmpb_seq \c_colon_str {##1}
- \int_compare:nNnTF {\seq_count:N \l_tmpb_seq} = \c_two {
+ \int_compare:nNnTF {\seq_count:N \l_tmpb_seq} = { 2 } {
\seq_get_left:NN \l_tmpb_seq \l_tmpa_tl
\exp_args:NNV \str_set:Nn \l_tmpa_str \l_tmpa_tl
\seq_get_right:NN \l_tmpb_seq \l_tmpa_tl
@@ -118,7 +119,7 @@
\str_if_eq:nnTF {#2} {inherit} {
\__cellprops_generic_setter:nnn \exp_not:n {#1} {\c__cellprops_inherit_color_tl}
}{
- \str_case_x:nnF { \str_range:nnn {#2} {1} {4} } {
+ \str_case_e:nnF { \str_range:nnn {#2} {1} {4} } {
{rgb(} {
\__cellprops_generic_setter:nnn \use:n {#1} {
\exp_not:n {\color[RGB]} {\str_range:nnn {#2} {5} {-2}}
@@ -463,7 +464,18 @@
\exp_args:Nx \tab at preamble
{ \exp_not:N\__cellprops_startrow: \the\tab at preamble \exp_not:N\__cellprops_endrow: }
}
+\cs_new_protected_nopar:Nn \__cellprops_update_color:Nn {
+ \__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
+ }
+}
+\cs_new_protected_nopar:Nn \__cellprops_update_colors: {
+ \__cellprops_update_color:Nn \l__cellprops_color_tl {color}
+ \__cellprops_update_color:Nn \l__cellprops_bgcolor_tl {background-color}
+}
+\AtEndPreamble{%
\cs_set_eq:NN \__cellprops_orig_array:w \@array
\cs_set_protected_nopar:Npn \@array[#1]#2 {
\__cellprops_array_init:
@@ -484,18 +496,7 @@
\__cellprops_orig_LTarray:w [#1]{#2}
\__cellprops_array_startcontent:
}
-\cs_new_protected_nopar:Nn \__cellprops_update_color:Nn {
- \__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
- }
-}
-\cs_new_protected_nopar:Nn \__cellprops_update_colors: {
- \__cellprops_update_color:Nn \l__cellprops_color_tl {color}
- \__cellprops_update_color:Nn \l__cellprops_bgcolor_tl {background-color}
-}
-
\cs_new_nopar:Nn \__cellprops_end_array:n {
\tl_if_empty:NF \g__cellprops_borders_tl { \\ }
\crcr
@@ -520,7 +521,7 @@
\bool_if:NF \g__cellprops_inrow_bool {
\bool_gset_true:N \g__cellprops_inrow_bool
\int_gincr:N \g__cellprops_row_int
- \int_gset_eq:NN \g__cellprops_col_int \c_one
+ \int_gset_eq:NN \g__cellprops_col_int \c_one_int
\dim_gzero:N \g__cellprops_ht_dim
\dim_gzero:N \g__cellprops_dp_dim
}
@@ -562,6 +563,8 @@
}
}
+}
+
\cs_new_nopar:Nn \__cellprops_fix_valign_end:n {
\noalign{
\dim_set:Nn \l_tmpa_dim {#1}
@@ -569,7 +572,7 @@
\exp_args:NV \tl_if_eq:nnTF \tab at hlstate {b} {
\dim_gadd:Nn \tab at endheight { \g__cellprops_dp_dim + \l_tmpa_dim }
}{
- \int_compare:nNnT \g__cellprops_row_int = \c_one {
+ \int_compare:nNnT \g__cellprops_row_int = \c_one_int {
\dim_gadd:Nn \tab at endheight { \g__cellprops_ht_dim }
}
}
@@ -654,7 +657,7 @@
\__cellprops_begin_raw_cell:n {
#1
\hbox_set:Nw \l__cellprops_cell_box
- \str_case_x:nnF {\__cellprops_get_property:n {math-mode}} {
+ \str_case_e:nnF {\__cellprops_get_property:n {math-mode}} {
{ text } { \tab at btext }
{ math } { \tab at bmaths }
}{% any other treated as |auto|
@@ -664,7 +667,7 @@
}
\cs_new_protected_nopar:Nn \__cellprops_endcell: {
- \str_case_x:nnF {\__cellprops_get_property:n {math-mode}} {
+ \str_case_e:nnF {\__cellprops_get_property:n {math-mode}} {
{ text } { \tab at etext }
{ math } { \tab at emaths }
}{% any other treated as |auto|
@@ -715,7 +718,7 @@
#1
\hbox_set_end:
\__cellprops_end_raw_cell:
- \spewnotes\hfil
+ \spewnotes
}
\cs_new_protected_nopar:Nn \__cellprops_begin_raw_cell:n {
@@ -877,17 +880,7 @@
{\g__cellprops_dp_dim}
{\box_dp:N \l__cellprops_cell_box}
}
- % Handle hpadding and halign
- \skip_set:Nn \l_tmpa_skip {
- \dim_max:nn
- {0pt}
- { (\__cellprops_get_property:n {min-width})
- - \box_wd:N \l__cellprops_cell_box }
- }
- \skip_add:Nn \l_tmpa_skip {
- 0pt plus 1fil
- }
- % padding-left and border-left
+ % Handle padding-left and border-left
\__cellprops_get_border_info:n {left}
\skip_set:Nn \l__cellprops_left_skip
{\__cellprops_get_property:n {padding-left} + \l__cellprops_border_width_dim}
@@ -923,7 +916,17 @@
\exp_not:n { \kern \c_zero_dim }
}
}
- \str_case_x:nnF {\__cellprops_get_property:n {text-align}} {
+ % Handle hpadding and halign
+ \skip_set:Nn \l_tmpa_skip {
+ \dim_max:nn
+ {0pt}
+ { (\__cellprops_get_property:n {min-width})
+ - \box_wd:N \l__cellprops_cell_box }
+ }
+ \skip_add:Nn \l_tmpa_skip {
+ 1sp plus 1fil
+ }
+ \str_case_e:nnF {\__cellprops_get_property:n {text-align}} {
{ right } {
\skip_add:Nn \l__cellprops_left_skip { \l_tmpa_skip }
}
@@ -951,7 +954,7 @@
\group_end:
}
\skip_horizontal:N \l__cellprops_left_skip
- \box_use_clear:N \l__cellprops_cell_box
+ \box_use_drop:N \l__cellprops_cell_box
\skip_horizontal:N \l__cellprops_right_skip
\kern\c_zero_dim
\group_end:
More information about the tex-live-commits
mailing list