diff options
author | Karl Berry <karl@freefriends.org> | 2018-10-05 20:50:49 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-10-05 20:50:49 +0000 |
commit | 0d26b3e0dd0ee1b6de1dd0d98260547191d2a85c (patch) | |
tree | fe270fe541ac9316a9e65d1d452beb1b64df363c /Master/texmf-dist/tex/latex/nicematrix | |
parent | e20ac72552b2412459373e4e7be505028cf1ab36 (diff) |
nicematrix (5oct18)
git-svn-id: svn://tug.org/texlive/trunk@48836 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/nicematrix')
-rw-r--r-- | Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty | 66 |
1 files changed, 43 insertions, 23 deletions
diff --git a/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty b/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty index 2b86f50602f..f56c1921546 100644 --- a/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty +++ b/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty @@ -18,8 +18,8 @@ %% and version 1.3 or later is part of all distributions of %% LaTeX version 2005/12/01 or later. %% -\def\myfileversion{2.1.1} -\def\myfiledate{2018/09/16} +\def\myfileversion{2.1.2} +\def\myfiledate{2018/10/05} \RequirePackage{tikz} \usetikzlibrary{fit} \RequirePackage{l3keys2e} @@ -28,6 +28,10 @@ {\myfiledate} {\myfileversion} {Several features to improve the typesetting of mathematical matrices with TikZ} +\bool_new:N \c__nm_draft_bool +\DeclareOption {draft} {\bool_set_true:N \c__nm_draft_bool} +\DeclareOption* {} +\ProcessOptions \relax \RequirePackage{array} \RequirePackage{amsmath} \RequirePackage{xparse} @@ -91,8 +95,8 @@ NullifyDots .meta:n = nullify-dots, code-for-last-col .tl_set:N = \l__nm_code_for_last_col_tl, code-for-last-col .value_required:n = true, - code-for-first-row .tl_set:N = \l__nm_code_for_first_row_tl, - code-for-first-row .value_required:n = true, + code-for-first-row .tl_set:N = \l__nm_code_for_first_row_tl, + code-for-first-row .value_required:n = true, exterior-arraycolsep .bool_set:N = \l__nm_exterior_arraycolsep_bool , exterior-arraycolsep .default:n = true, columns-width .code:n = \str_if_eq:nnTF {#1} {auto} @@ -284,12 +288,39 @@ {Environments~\{NiceArray\}~(or~\{NiceMatrix\},~etc.)~can't~be~ nested.~We~can~go~on,~but,~maybe,~you~will~have~errors~or~an~incorrect~ result.} +\cs_new_protected:Npn \__nm_define_dots: + {\cs_set_eq:NN \Ldots \__nm_Ldots + \cs_set_eq:NN \Cdots \__nm_Cdots + \cs_set_eq:NN \Vdots \__nm_Vdots + \cs_set_eq:NN \Ddots \__nm_Ddots + \cs_set_eq:NN \Iddots \__nm_Iddots + \bool_if:NT \l__nm_renew_dots_bool + {\cs_set_eq:NN \ldots \__nm_Ldots + \cs_set_eq:NN \cdots \__nm_Cdots + \cs_set_eq:NN \vdots \__nm_Vdots + \cs_set_eq:NN \ddots \__nm_Ddots + \cs_set_eq:NN \iddots \__nm_Iddots + \cs_set_eq:NN \dots \__nm_Ldots + \cs_set_eq:NN \hdotsfor \__nm_Hdotsfor}} +\cs_new_protected:Npn \__nm_define_dots_to_nil: + {\cs_set_eq:NN \Ldots \prg_do_nothing: + \cs_set_eq:NN \Cdots \prg_do_nothing: + \cs_set_eq:NN \Vdots \prg_do_nothing: + \cs_set_eq:NN \Ddots \prg_do_nothing: + \cs_set_eq:NN \Iddots \prg_do_nothing: + \bool_if:NT \l__nm_renew_dots_bool + {\cs_set_eq:NN \ldots \prg_do_nothing: + \cs_set_eq:NN \cdots \prg_do_nothing: + \cs_set_eq:NN \vdots \prg_do_nothing: + \cs_set_eq:NN \ddots \prg_do_nothing: + \cs_set_eq:NN \iddots \prg_do_nothing: + \cs_set_eq:NN \dots \prg_do_nothing: + \cs_set_eq:NN \hdotsfor \__nm_Hdotsfor}} \NewDocumentEnvironment {NiceArray} {O{} m O{}} {\cs_if_exist:NT \__nm_in_NiceArray: {\__nm_msg_error:n {We~are~yet~in~an~environment~NiceArray}} - \ifcsname tikz@library@external@loaded\endcsname - \tikzset{external/export = false} - \fi + \cs_if_exist:NT \tikz@library@external@loaded + {\tikzset{external/export = false}} \cs_set:Npn \__nm_in_NiceArray: {--Void--} \aftergroup \__nm_after_array: \tl_gclear_new:N \g__nm_lines_to_draw_tl @@ -348,22 +379,12 @@ \hbox_set_end: \cs_set_eq:NN \hss \hfil \makebox[##2][##1]{\box_use:N \l_tmpa_box}}} - \cs_set_eq:NN \Ldots \__nm_Ldots - \cs_set_eq:NN \Cdots \__nm_Cdots - \cs_set_eq:NN \Vdots \__nm_Vdots - \cs_set_eq:NN \Ddots \__nm_Ddots - \cs_set_eq:NN \Iddots \__nm_Iddots + \bool_if:NTF \c__nm_draft_bool + \__nm_define_dots_to_nil: + \__nm_define_dots: \cs_set_eq:NN \Hspace \__nm_Hspace: \cs_set_eq:NN \Hdotsfor \__nm_Hdotsfor \cs_set_eq:NN \multicolumn \__nm_multicolumn:nnn - \bool_if:NT \l__nm_renew_dots_bool - {\cs_set_eq:NN \ldots \__nm_Ldots - \cs_set_eq:NN \cdots \__nm_Cdots - \cs_set_eq:NN \vdots \__nm_Vdots - \cs_set_eq:NN \ddots \__nm_Ddots - \cs_set_eq:NN \iddots \__nm_Iddots - \cs_set_eq:NN \dots \__nm_Ldots - \cs_set_eq:NN \hdotsfor \__nm_Hdotsfor} \seq_gclear_new:N \g__nm_empty_cells_seq \seq_gclear_new:N \g__nm_multicolumn_cells_seq \seq_gclear_new:N \g__nm_multicolumn_sizes_seq @@ -433,9 +454,8 @@ {\int_use:N \g__nm_column_int}}} \cs_new_protected:Nn \__nm_after_array: {\group_begin: - \ifcsname tikz@library@external@loaded\endcsname - \tikzset{external/export = false} - \fi + \cs_if_exist:NT \tikz@library@external@loaded + {\tikzset{external/export = false}} \int_gset_eq:NN \g__nm_column_int \g__nm_column_total_int \bool_if:NT \l__nm_exterior_column_bool {\int_gdecr:N \g__nm_column_int} \seq_gclear_new:N \g__nm_yet_drawn_seq |