summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/cellprops/README.md17
-rw-r--r--Master/texmf-dist/doc/latex/cellprops/cellprops.pdfbin572886 -> 573624 bytes
-rw-r--r--Master/texmf-dist/source/latex/cellprops/cellprops.dtx117
-rw-r--r--Master/texmf-dist/source/latex/cellprops/cellprops.ins2
-rw-r--r--Master/texmf-dist/tex/latex/cellprops/cellprops.sty70
5 files changed, 147 insertions, 59 deletions
diff --git a/Master/texmf-dist/doc/latex/cellprops/README.md b/Master/texmf-dist/doc/latex/cellprops/README.md
index 04259f9eb9c..b09b4a5d35e 100644
--- a/Master/texmf-dist/doc/latex/cellprops/README.md
+++ b/Master/texmf-dist/doc/latex/cellprops/README.md
@@ -10,3 +10,20 @@ You can use most constructs of `mdwtab`, but some too hackish usage might
alter the function of cellprops.
Look at the PDF documentation to see examples and detailed usage.
+
+
+
+Copyright (C) 2018 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
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/Master/texmf-dist/doc/latex/cellprops/cellprops.pdf b/Master/texmf-dist/doc/latex/cellprops/cellprops.pdf
index 37072aa4c6b..20ebc28a520 100644
--- a/Master/texmf-dist/doc/latex/cellprops/cellprops.pdf
+++ b/Master/texmf-dist/doc/latex/cellprops/cellprops.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/cellprops/cellprops.dtx b/Master/texmf-dist/source/latex/cellprops/cellprops.dtx
index 2a86acdba6a..1ee1a858b55 100644
--- a/Master/texmf-dist/source/latex/cellprops/cellprops.dtx
+++ b/Master/texmf-dist/source/latex/cellprops/cellprops.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
% vim: tw=80 spl=en
%
-%% File: cellprops.dtx (C) Copyright 2016 RIVAUD Julien
+%% File: cellprops.dtx (C) Copyright 2018 RIVAUD Julien
%%
%% It may be distributed and/or modified under the conditions of the
%% General Public License (GPL), either version 3 of this
@@ -14,8 +14,8 @@
\RequirePackage{expl3}[2016/01/19]
\def\ExplFileName{cellprops}
\def\ExplFileDescription{CSS-like cell and table properties}
-\def\ExplFileDate{2018/06/14}
-\def\ExplFileVersion{1.3}
+\def\ExplFileDate{2018/07/16}
+\def\ExplFileVersion{1.4}
%</driver|package>
%<*driver>
\documentclass[full]{l3doc}
@@ -80,10 +80,12 @@
% min-height: 0pt;
% min-depth: 0pt;
% border-style: none solid solid none;
-% background-color: black!5!white;
% text-align: center;
% }
-% tr:nth-child(even) td {
+% table {
+% background-color: black!5!white;
+% }
+% tr:nth-child(even) {
% background-color: black!15!white;
% }
% td:nth-child(even) {
@@ -118,10 +120,12 @@
% min-height: 0pt;
% min-depth: 0pt;
% border-style: none solid solid none;
-% background-color: black!5!white;
% text-align: center;
% }
-% tr:nth-child(even) td {
+% table {
+% background-color: black!5!white;
+% }
+% tr:nth-child(even) {
% background-color: black!15!white;
% }
% td:nth-child(even) {
@@ -226,7 +230,8 @@
% "'table'" \OR
% "'tr'"[\<pseudo-class>] ["' '" \<element2>] \OR
% \<element2>
-% \item[element2] "'td'"[\<pseudo-class>]
+% \item[element2] "'td'"[\<pseudo-class>] ["' '" \<parbox>] \OR \<parbox>
+% \item[parbox] "'p'"
% \item[pseudo-class] "':nth-child('"\<nth>"')"
% \item[nth] \<number> \OR "'odd'" \OR "'even'" \OR \<number>"'n+'"\<number>
% \item[properties] [ \<property> "';'" ]*
@@ -357,6 +362,7 @@
\RequirePackage{xparse}
\RequirePackage{xcolor}
% \end{macrocode}
+%
% \subsection{Loading and fixing \pkg{mdwtab}}
%
% There is a bug in the command \cs{colpop} of \pkg{mdwtab}: instead of just
@@ -364,11 +370,10 @@
% completely because one \cs{expandafter} is missing. This is proof that not
% many package authors really use this API as recommended by Mark
% \textsc{Wooding}\ldots We thus load \pkg{mdwtab} and fix \cs{colpop}.
+%
% \begin{macrocode}
\RequirePackage{mdwtab}
\cs_set_nopar:Npn \tab@pop #1 { \tl_set:Nx #1 { \tl_tail:N #1 } }
-
-
% \end{macrocode}
%
% \subsection{Parsing CSS properties}
@@ -407,6 +412,7 @@
}
}
% \end{macrocode}
+%
% \end{macro}
% \end{macro}
% \end{macro}
@@ -416,6 +422,7 @@
% \begin{macro}{\@@_define_properties:nn}
% The control sequence \cs{_@@_property_type_<name>:nn} holds the setter for
% the property \meta{name}. It can be set by the following helper:
+%
% \begin{macrocode}
\cs_new_protected:Nn \@@_define_properties:nn {
\clist_map_inline:nn {#2} {
@@ -423,12 +430,14 @@
}
}
% \end{macrocode}
+%
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@@_use_setter:nn}
% Sometimes we need to use a setter right away rather than save its action
% somewhere. The following helper does that with an x-expansion.
+%
% \begin{macrocode}
\cs_new:Nn \@@_delegate_setter:nn {
\use:c {_@@_property_type_#1:nn} {#1} {#2}
@@ -439,6 +448,7 @@
}
}
% \end{macrocode}
+%
% \end{macro}
%
% \begin{macrocode}
@@ -668,7 +678,9 @@
\cs_new_protected:Nn \@@_parse_selector:Nn {
\str_set:Nx \l_tmpa_str {#2}
% \end{macrocode}
+%
% Replace some aliases with their meaning:
+%
% \begin{macrocode}
\prop_map_inline:Nn \c_@@_parse_replace_prop {
\use:x {
@@ -677,15 +689,19 @@
}
}
% \end{macrocode}
+%
% Replace all spaces by \cs{q_stop} to defeat the space removal feature of
% \cs{seq_set_split:Nnn}.
+%
% \begin{macrocode}
\tl_replace_all:Nnn \l_tmpa_str {~} {\q_stop}
\exp_args:NNVV
\seq_set_split:Nnn \l_tmpa_seq \c_@@_parse_nthchild_str \l_tmpa_str
\seq_pop_left:NN \l_tmpa_seq \l_tmpa_tl
% \end{macrocode}
+%
% And replace them back.
+%
% \begin{macrocode}
\tl_replace_all:Nnn \l_tmpa_tl {\q_stop} {~}
\seq_clear:N \l_@@_parse_selector_seq
@@ -693,15 +709,19 @@
\seq_map_inline:Nn \l_tmpa_seq {
\tl_set:Nn \l_tmpa_tl { ##1 }
% \end{macrocode}
+%
% And replace them back again.
+%
% \begin{macrocode}
\tl_replace_all:Nnn \l_tmpa_tl {\q_stop} {~}
% \end{macrocode}
+%
% Now replace the first closing parenthesis by \cs{q_stop}\cs{prg_do_nothing:}
% to use \cs{q_stop} as a delimiter for \cs{seq_set_split:Nnn} and thus split
% at most once. Note that here the space trimming feature is desired for the
% left part, but not just at the right of the parenthesis, so
% \cs{prg_do_nothing:} will act as a guard and will be removed afterwards.
+%
% \begin{macrocode}
\tl_replace_once:Nnn \l_tmpa_tl { ) } { \q_stop\prg_do_nothing: }
\seq_set_split:NnV \l_tmpa_seq { \q_stop } \l_tmpa_tl
@@ -841,13 +861,17 @@
\cs_set_eq:NN \@@_orig_tab@readpreamble:n \tab@readpreamble
\cs_set_eq:NN \tab@readpreamble \@@_readpreamble:n
% \end{macrocode}
+%
% Zero \cs{col@sep} but remember its value for the default padding.
+%
% \begin{macrocode}
\dim_set_eq:NN \l_@@_colsep_dim \col@sep
\dim_zero:N \col@sep
% \end{macrocode}
+%
% Also ignore \cs{*extrasep} dimensions that are not part of cellprop
% interface and should be replaced by CSS equivalents.
+%
% \begin{macrocode}
\dim_zero:N \tab@extrasep
\group_begin:
@@ -902,13 +926,14 @@
\@@_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
@@ -1001,6 +1026,15 @@
}
}
}
+% \end{macrocode}
+%
+% Reset \cs{firsthline} and \cs{lasthline} to \cs{hline} because the version
+% from \pkg{array} which might be loaded already will mess up the spacing and is
+% unneeded anyway.
+%
+% \begin{macrocode}
+\cs_set_eq:NN \firsthline \hline
+\cs_set_eq:NN \lasthline \hline
\colpush{tabular}
@@ -1068,6 +1102,7 @@
% \end{macrocode}
%
% Handle various \verb|:nth-child()| forms.
+%
% \begin{macrocode}
\cs_new_protected_nopar:Nn \@@_seq_nthchild:Nn {
\seq_clear:N #1
@@ -1081,27 +1116,6 @@
\cs_new_protected_nopar:Nn \@@_begincell:n {
\@@_begin_raw_cell:n {
- \@@_seq_nthchild:Nn \l_tmpa_seq { \g_@@_row_int }
- \@@_seq_nthchild:Nn \l_tmpb_seq { \g_@@_col_int }
- \seq_map_inline:Nn \l_tmpa_seq {
- \@@_recall_properties:n {tr:nth-child(##1)}
- }
- \@@_update_colors:
- \@@_recall_properties:n {td}
- \@@_recall_properties:n {tr~td}
- \seq_map_inline:Nn \l_tmpb_seq {
- \@@_recall_properties:n {td:nth-child(##1)}
- }
- \seq_map_inline:Nn \l_tmpa_seq {
- \@@_recall_properties:n {tr:nth-child(##1)~td}
- }
- \seq_map_inline:Nn \l_tmpa_seq {
- \seq_map_inline:Nn \l_tmpb_seq {
- \@@_recall_properties:n {tr:nth-child(##1)~
- td:nth-child(####1)}
- }
- }
- \@@_update_colors:
#1
\hbox_set:Nw \l_@@_cell_box
\str_case_x:nnF {\@@_get_property:n {math-mode}} {
@@ -1137,7 +1151,25 @@
\global\@minipagefalse
\everypar{}
}
+ \@@_seq_nthchild:Nn \l_tmpa_seq { \g_@@_row_int }
+ \@@_seq_nthchild:Nn \l_tmpb_seq { \g_@@_col_int }
\@@_recall_properties:n {td~p}
+ \seq_map_inline:Nn \l_tmpa_seq {
+ \@@_recall_properties:n {tr:nth-child(##1)~p}
+ }
+ \seq_map_inline:Nn \l_tmpb_seq {
+ \@@_recall_properties:n {td:nth-child(##1)~p}
+ }
+ \@@_recall_properties:n {tr~td~p}
+ \seq_map_inline:Nn \l_tmpa_seq {
+ \@@_recall_properties:n {tr:nth-child(##1)~td~p}
+ }
+ \seq_map_inline:Nn \l_tmpa_seq {
+ \seq_map_inline:Nn \l_tmpb_seq {
+ \@@_recall_properties:n {tr:nth-child(##1)~
+ td:nth-child(####1)~p}
+ }
+ }
}
}
\cs_new_protected_nopar:Nn \@@_end_par_cell:n {
@@ -1152,6 +1184,27 @@
\cs_new_protected_nopar:Nn \@@_begin_raw_cell:n {
\group_begin:
+ \@@_seq_nthchild:Nn \l_tmpa_seq { \g_@@_row_int }
+ \@@_seq_nthchild:Nn \l_tmpb_seq { \g_@@_col_int }
+ \seq_map_inline:Nn \l_tmpa_seq {
+ \@@_recall_properties:n {tr:nth-child(##1)}
+ }
+ \@@_update_colors:
+ \@@_recall_properties:n {td}
+ \@@_recall_properties:n {tr~td}
+ \seq_map_inline:Nn \l_tmpb_seq {
+ \@@_recall_properties:n {td:nth-child(##1)}
+ }
+ \seq_map_inline:Nn \l_tmpa_seq {
+ \@@_recall_properties:n {tr:nth-child(##1)~td}
+ }
+ \seq_map_inline:Nn \l_tmpa_seq {
+ \seq_map_inline:Nn \l_tmpb_seq {
+ \@@_recall_properties:n {tr:nth-child(##1)~
+ td:nth-child(####1)}
+ }
+ }
+ \@@_update_colors:
% Additional init code
#1
% Install the cell color
diff --git a/Master/texmf-dist/source/latex/cellprops/cellprops.ins b/Master/texmf-dist/source/latex/cellprops/cellprops.ins
index 6e7e57d725a..6ca53397386 100644
--- a/Master/texmf-dist/source/latex/cellprops/cellprops.ins
+++ b/Master/texmf-dist/source/latex/cellprops/cellprops.ins
@@ -1,6 +1,6 @@
\iffalse meta-comment
-File cellprops.ins (C) Copyright 2016 RIVAUD Julien
+File cellprops.ins (C) Copyright 2016-2018 RIVAUD Julien
It may be distributed and/or modified under the conditions of the
General Public License (GPL), either version 3 of this
diff --git a/Master/texmf-dist/tex/latex/cellprops/cellprops.sty b/Master/texmf-dist/tex/latex/cellprops/cellprops.sty
index 398b773c696..14e1bf5a17d 100644
--- a/Master/texmf-dist/tex/latex/cellprops/cellprops.sty
+++ b/Master/texmf-dist/tex/latex/cellprops/cellprops.sty
@@ -6,7 +6,7 @@
%%
%% cellprops.dtx (with options: `package')
%%
-%% File: cellprops.dtx (C) Copyright 2016 RIVAUD Julien
+%% File: cellprops.dtx (C) Copyright 2018 RIVAUD Julien
%%
%% It may be distributed and/or modified under the conditions of the
%% General Public License (GPL), either version 3 of this
@@ -15,8 +15,8 @@
\RequirePackage{expl3}[2016/01/19]
\def\ExplFileName{cellprops}
\def\ExplFileDescription{CSS-like cell and table properties}
-\def\ExplFileDate{2018/06/14}
-\def\ExplFileVersion{1.3}
+\def\ExplFileDate{2018/07/16}
+\def\ExplFileVersion{1.4}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -24,7 +24,6 @@
\RequirePackage{xcolor}
\RequirePackage{mdwtab}
\cs_set_nopar:Npn \tab@pop #1 { \tl_set:Nx #1 { \tl_tail:N #1 } }
-
\cs_new:Nn \__cellprops_generic_setter:nnn {
\exp_not:N \tl_set:Nn
\exp_not:c { l__cellprops_property_value_#2_tl }
@@ -485,7 +484,6 @@
\__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 {
@@ -577,6 +575,8 @@
}
}
}
+\cs_set_eq:NN \firsthline \hline
+\cs_set_eq:NN \lasthline \hline
\colpush{tabular}
@@ -652,27 +652,6 @@
\cs_new_protected_nopar:Nn \__cellprops_begincell:n {
\__cellprops_begin_raw_cell:n {
- \__cellprops_seq_nthchild:Nn \l_tmpa_seq { \g__cellprops_row_int }
- \__cellprops_seq_nthchild:Nn \l_tmpb_seq { \g__cellprops_col_int }
- \seq_map_inline:Nn \l_tmpa_seq {
- \__cellprops_recall_properties:n {tr:nth-child(##1)}
- }
- \__cellprops_update_colors:
- \__cellprops_recall_properties:n {td}
- \__cellprops_recall_properties:n {tr~td}
- \seq_map_inline:Nn \l_tmpb_seq {
- \__cellprops_recall_properties:n {td:nth-child(##1)}
- }
- \seq_map_inline:Nn \l_tmpa_seq {
- \__cellprops_recall_properties:n {tr:nth-child(##1)~td}
- }
- \seq_map_inline:Nn \l_tmpa_seq {
- \seq_map_inline:Nn \l_tmpb_seq {
- \__cellprops_recall_properties:n {tr:nth-child(##1)~
- td:nth-child(####1)}
- }
- }
- \__cellprops_update_colors:
#1
\hbox_set:Nw \l__cellprops_cell_box
\str_case_x:nnF {\__cellprops_get_property:n {math-mode}} {
@@ -708,7 +687,25 @@
\global\@minipagefalse
\everypar{}
}
+ \__cellprops_seq_nthchild:Nn \l_tmpa_seq { \g__cellprops_row_int }
+ \__cellprops_seq_nthchild:Nn \l_tmpb_seq { \g__cellprops_col_int }
\__cellprops_recall_properties:n {td~p}
+ \seq_map_inline:Nn \l_tmpa_seq {
+ \__cellprops_recall_properties:n {tr:nth-child(##1)~p}
+ }
+ \seq_map_inline:Nn \l_tmpb_seq {
+ \__cellprops_recall_properties:n {td:nth-child(##1)~p}
+ }
+ \__cellprops_recall_properties:n {tr~td~p}
+ \seq_map_inline:Nn \l_tmpa_seq {
+ \__cellprops_recall_properties:n {tr:nth-child(##1)~td~p}
+ }
+ \seq_map_inline:Nn \l_tmpa_seq {
+ \seq_map_inline:Nn \l_tmpb_seq {
+ \__cellprops_recall_properties:n {tr:nth-child(##1)~
+ td:nth-child(####1)~p}
+ }
+ }
}
}
\cs_new_protected_nopar:Nn \__cellprops_end_par_cell:n {
@@ -723,6 +720,27 @@
\cs_new_protected_nopar:Nn \__cellprops_begin_raw_cell:n {
\group_begin:
+ \__cellprops_seq_nthchild:Nn \l_tmpa_seq { \g__cellprops_row_int }
+ \__cellprops_seq_nthchild:Nn \l_tmpb_seq { \g__cellprops_col_int }
+ \seq_map_inline:Nn \l_tmpa_seq {
+ \__cellprops_recall_properties:n {tr:nth-child(##1)}
+ }
+ \__cellprops_update_colors:
+ \__cellprops_recall_properties:n {td}
+ \__cellprops_recall_properties:n {tr~td}
+ \seq_map_inline:Nn \l_tmpb_seq {
+ \__cellprops_recall_properties:n {td:nth-child(##1)}
+ }
+ \seq_map_inline:Nn \l_tmpa_seq {
+ \__cellprops_recall_properties:n {tr:nth-child(##1)~td}
+ }
+ \seq_map_inline:Nn \l_tmpa_seq {
+ \seq_map_inline:Nn \l_tmpb_seq {
+ \__cellprops_recall_properties:n {tr:nth-child(##1)~
+ td:nth-child(####1)}
+ }
+ }
+ \__cellprops_update_colors:
% Additional init code
#1
% Install the cell color