From d045bcbc99b0eda65a444496d60d16ea2d063c65 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 19 Oct 2021 03:01:14 +0000 Subject: CTAN sync 202110190301 --- macros/latex/contrib/easybook/easybook.dtx | 163 ++- macros/latex/contrib/easybook/easybook.pdf | Bin 576486 -> 577839 bytes macros/latex/contrib/easybook/easybook.tex | 52 +- macros/latex/contrib/fithesis/VERSION.tex | 2 +- macros/latex/contrib/fithesis/fithesis.dtx | 2 +- macros/latex/contrib/fithesis/fithesis.pdf | Bin 766017 -> 766216 bytes .../fithesis/logo/mu/fithesis-base-color.pdf | Bin 15062 -> 15062 bytes .../fithesis/logo/mu/fithesis-base-czech-color.pdf | Bin 3841 -> 3841 bytes .../fithesis/logo/mu/fithesis-base-czech.pdf | Bin 3837 -> 3837 bytes .../logo/mu/fithesis-base-english-color.pdf | Bin 3771 -> 3771 bytes .../fithesis/logo/mu/fithesis-base-english.pdf | Bin 3767 -> 3767 bytes .../contrib/fithesis/logo/mu/fithesis-base.pdf | Bin 15892 -> 15892 bytes .../fithesis/logo/mu/fithesis-econ-color.pdf | Bin 12305 -> 12305 bytes .../fithesis/logo/mu/fithesis-econ-czech-color.pdf | Bin 4605 -> 4605 bytes .../fithesis/logo/mu/fithesis-econ-czech.pdf | Bin 4600 -> 4600 bytes .../logo/mu/fithesis-econ-english-color.pdf | 16 +- .../fithesis/logo/mu/fithesis-econ-english.pdf | 16 +- .../contrib/fithesis/logo/mu/fithesis-econ.pdf | Bin 12838 -> 12838 bytes .../contrib/fithesis/logo/mu/fithesis-fi-color.pdf | Bin 11709 -> 11709 bytes .../fithesis/logo/mu/fithesis-fi-czech-color.pdf | Bin 3702 -> 3702 bytes .../contrib/fithesis/logo/mu/fithesis-fi-czech.pdf | Bin 3697 -> 3697 bytes .../fithesis/logo/mu/fithesis-fi-english-color.pdf | 16 +- .../fithesis/logo/mu/fithesis-fi-english.pdf | Bin 2727 -> 2721 bytes .../latex/contrib/fithesis/logo/mu/fithesis-fi.pdf | Bin 11529 -> 11529 bytes .../fithesis/logo/mu/fithesis-fsps-color.pdf | Bin 11199 -> 11199 bytes .../fithesis/logo/mu/fithesis-fsps-czech-color.pdf | Bin 4657 -> 4657 bytes .../fithesis/logo/mu/fithesis-fsps-czech.pdf | Bin 4652 -> 4652 bytes .../logo/mu/fithesis-fsps-english-color.pdf | Bin 3307 -> 3307 bytes .../fithesis/logo/mu/fithesis-fsps-english.pdf | Bin 3303 -> 3303 bytes .../contrib/fithesis/logo/mu/fithesis-fsps.pdf | Bin 11634 -> 11634 bytes .../fithesis/logo/mu/fithesis-fss-color.pdf | Bin 10758 -> 10758 bytes .../fithesis/logo/mu/fithesis-fss-czech-color.pdf | Bin 4507 -> 4507 bytes .../fithesis/logo/mu/fithesis-fss-czech.pdf | Bin 4502 -> 4502 bytes .../logo/mu/fithesis-fss-english-color.pdf | Bin 3097 -> 3097 bytes .../fithesis/logo/mu/fithesis-fss-english.pdf | Bin 3091 -> 3091 bytes .../contrib/fithesis/logo/mu/fithesis-fss.pdf | Bin 11492 -> 11492 bytes .../fithesis/logo/mu/fithesis-law-color.pdf | Bin 17579 -> 17579 bytes .../fithesis/logo/mu/fithesis-law-czech-color.pdf | Bin 3786 -> 3786 bytes .../fithesis/logo/mu/fithesis-law-czech.pdf | Bin 3780 -> 3780 bytes .../logo/mu/fithesis-law-english-color.pdf | 16 +- .../fithesis/logo/mu/fithesis-law-english.pdf | 16 +- .../contrib/fithesis/logo/mu/fithesis-law.pdf | Bin 18339 -> 18339 bytes .../fithesis/logo/mu/fithesis-med-color.pdf | Bin 9955 -> 9955 bytes .../fithesis/logo/mu/fithesis-med-czech-color.pdf | Bin 3782 -> 3782 bytes .../fithesis/logo/mu/fithesis-med-czech.pdf | Bin 3776 -> 3776 bytes .../logo/mu/fithesis-med-english-color.pdf | Bin 2852 -> 2852 bytes .../fithesis/logo/mu/fithesis-med-english.pdf | Bin 2849 -> 2849 bytes .../contrib/fithesis/logo/mu/fithesis-med.pdf | Bin 10494 -> 10494 bytes .../fithesis/logo/mu/fithesis-ped-color.pdf | Bin 9901 -> 9901 bytes .../fithesis/logo/mu/fithesis-ped-czech-color.pdf | Bin 4119 -> 4119 bytes .../fithesis/logo/mu/fithesis-ped-czech.pdf | Bin 4113 -> 4113 bytes .../logo/mu/fithesis-ped-english-color.pdf | 16 +- .../fithesis/logo/mu/fithesis-ped-english.pdf | Bin 2894 -> 2894 bytes .../contrib/fithesis/logo/mu/fithesis-ped.pdf | Bin 10396 -> 10396 bytes .../fithesis/logo/mu/fithesis-pharm-color.pdf | Bin 41114 -> 41114 bytes .../logo/mu/fithesis-pharm-czech-color.pdf | Bin 4008 -> 4008 bytes .../fithesis/logo/mu/fithesis-pharm-czech.pdf | Bin 4002 -> 4002 bytes .../logo/mu/fithesis-pharm-english-color.pdf | Bin 3073 -> 3073 bytes .../fithesis/logo/mu/fithesis-pharm-english.pdf | Bin 3069 -> 3069 bytes .../contrib/fithesis/logo/mu/fithesis-pharm.pdf | Bin 41093 -> 41093 bytes .../fithesis/logo/mu/fithesis-phil-color.pdf | Bin 11596 -> 11596 bytes .../fithesis/logo/mu/fithesis-phil-czech-color.pdf | Bin 3802 -> 3802 bytes .../fithesis/logo/mu/fithesis-phil-czech.pdf | Bin 3797 -> 3797 bytes .../logo/mu/fithesis-phil-english-color.pdf | Bin 3128 -> 3128 bytes .../fithesis/logo/mu/fithesis-phil-english.pdf | 16 +- .../contrib/fithesis/logo/mu/fithesis-phil.pdf | Bin 12083 -> 12083 bytes .../fithesis/logo/mu/fithesis-sci-color.pdf | Bin 24328 -> 24328 bytes .../fithesis/logo/mu/fithesis-sci-czech-color.pdf | Bin 4398 -> 4398 bytes .../fithesis/logo/mu/fithesis-sci-czech.pdf | Bin 4393 -> 4393 bytes .../logo/mu/fithesis-sci-english-color.pdf | Bin 3068 -> 3068 bytes .../fithesis/logo/mu/fithesis-sci-english.pdf | Bin 3063 -> 3063 bytes .../contrib/fithesis/logo/mu/fithesis-sci.pdf | Bin 25396 -> 25396 bytes macros/latex/contrib/fithesis/style/mu/base.dtx | 2 +- macros/latex/contrib/fithesis/style/mu/ped.dtx | 22 +- macros/latex/contrib/l3backend/CHANGELOG.md | 5 +- macros/latex/contrib/l3backend/README.md | 2 +- .../latex/contrib/l3backend/l3backend-basics.dtx | 14 +- macros/latex/contrib/l3backend/l3backend-box.dtx | 2 +- macros/latex/contrib/l3backend/l3backend-code.pdf | Bin 891719 -> 896357 bytes macros/latex/contrib/l3backend/l3backend-color.dtx | 121 +- macros/latex/contrib/l3backend/l3backend-draw.dtx | 2 +- .../latex/contrib/l3backend/l3backend-graphics.dtx | 2 +- .../latex/contrib/l3backend/l3backend-header.dtx | 2 +- .../latex/contrib/l3backend/l3backend-opacity.dtx | 2 +- macros/latex/contrib/l3backend/l3backend-pdf.dtx | 2 +- macros/latex/contrib/l3kernel/CHANGELOG.md | 9 +- macros/latex/contrib/l3kernel/README.md | 2 +- macros/latex/contrib/l3kernel/expl3.dtx | 4 +- macros/latex/contrib/l3kernel/expl3.pdf | Bin 623220 -> 623350 bytes macros/latex/contrib/l3kernel/interface3.pdf | Bin 1740976 -> 1742003 bytes macros/latex/contrib/l3kernel/interface3.tex | 2 +- macros/latex/contrib/l3kernel/l3basics.dtx | 2 +- macros/latex/contrib/l3kernel/l3bootstrap.dtx | 2 +- macros/latex/contrib/l3kernel/l3box.dtx | 2 +- macros/latex/contrib/l3kernel/l3candidates.dtx | 2 +- macros/latex/contrib/l3kernel/l3cctab.dtx | 2 +- macros/latex/contrib/l3kernel/l3clist.dtx | 2 +- macros/latex/contrib/l3kernel/l3coffins.dtx | 2 +- macros/latex/contrib/l3kernel/l3color.dtx | 178 ++- macros/latex/contrib/l3kernel/l3debug.dtx | 2 +- macros/latex/contrib/l3kernel/l3deprecation.dtx | 2 +- macros/latex/contrib/l3kernel/l3doc.dtx | 2 +- macros/latex/contrib/l3kernel/l3docstrip.dtx | 2 +- macros/latex/contrib/l3kernel/l3docstrip.pdf | Bin 151531 -> 151628 bytes macros/latex/contrib/l3kernel/l3expan.dtx | 2 +- macros/latex/contrib/l3kernel/l3file.dtx | 2 +- macros/latex/contrib/l3kernel/l3flag.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-assign.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-aux.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-basics.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-convert.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-expo.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-extended.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-logic.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-parse.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-random.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-round.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-traps.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-trig.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp.dtx | 2 +- macros/latex/contrib/l3kernel/l3fparray.dtx | 2 +- macros/latex/contrib/l3kernel/l3int.dtx | 2 +- macros/latex/contrib/l3kernel/l3intarray.dtx | 2 +- .../latex/contrib/l3kernel/l3kernel-functions.dtx | 2 +- macros/latex/contrib/l3kernel/l3keys.dtx | 2 +- macros/latex/contrib/l3kernel/l3legacy.dtx | 2 +- macros/latex/contrib/l3kernel/l3luatex.dtx | 2 +- macros/latex/contrib/l3kernel/l3msg.dtx | 2 +- macros/latex/contrib/l3kernel/l3names.dtx | 2 +- macros/latex/contrib/l3kernel/l3news.pdf | Bin 395907 -> 395907 bytes macros/latex/contrib/l3kernel/l3news01.pdf | Bin 122713 -> 122713 bytes macros/latex/contrib/l3kernel/l3news02.pdf | Bin 150672 -> 150672 bytes macros/latex/contrib/l3kernel/l3news03.pdf | Bin 148707 -> 148707 bytes macros/latex/contrib/l3kernel/l3news04.pdf | Bin 114588 -> 114588 bytes macros/latex/contrib/l3kernel/l3news05.pdf | Bin 112485 -> 112485 bytes macros/latex/contrib/l3kernel/l3news06.pdf | Bin 151572 -> 151572 bytes macros/latex/contrib/l3kernel/l3news07.pdf | Bin 128312 -> 128312 bytes macros/latex/contrib/l3kernel/l3news08.pdf | Bin 163455 -> 163455 bytes macros/latex/contrib/l3kernel/l3news09.pdf | Bin 250134 -> 250134 bytes macros/latex/contrib/l3kernel/l3news10.pdf | Bin 150289 -> 150289 bytes macros/latex/contrib/l3kernel/l3news11.pdf | Bin 170069 -> 170069 bytes macros/latex/contrib/l3kernel/l3news12.pdf | Bin 204992 -> 204992 bytes macros/latex/contrib/l3kernel/l3pdf.dtx | 2 +- macros/latex/contrib/l3kernel/l3prefixes.pdf | Bin 80876 -> 80876 bytes macros/latex/contrib/l3kernel/l3prg.dtx | 2 +- macros/latex/contrib/l3kernel/l3prop.dtx | 2 +- macros/latex/contrib/l3kernel/l3quark.dtx | 2 +- macros/latex/contrib/l3kernel/l3regex.dtx | 2 +- macros/latex/contrib/l3kernel/l3seq.dtx | 2 +- macros/latex/contrib/l3kernel/l3skip.dtx | 2 +- macros/latex/contrib/l3kernel/l3sort.dtx | 2 +- macros/latex/contrib/l3kernel/l3str-convert.dtx | 2 +- macros/latex/contrib/l3kernel/l3str.dtx | 2 +- macros/latex/contrib/l3kernel/l3styleguide.pdf | Bin 295935 -> 296073 bytes macros/latex/contrib/l3kernel/l3styleguide.tex | 2 +- macros/latex/contrib/l3kernel/l3syntax-changes.pdf | Bin 242611 -> 242742 bytes macros/latex/contrib/l3kernel/l3syntax-changes.tex | 2 +- macros/latex/contrib/l3kernel/l3sys.dtx | 2 +- macros/latex/contrib/l3kernel/l3term-glossary.pdf | Bin 230994 -> 231128 bytes macros/latex/contrib/l3kernel/l3term-glossary.tex | 2 +- macros/latex/contrib/l3kernel/l3text-case.dtx | 2 +- macros/latex/contrib/l3kernel/l3text-purify.dtx | 2 +- macros/latex/contrib/l3kernel/l3text.dtx | 2 +- macros/latex/contrib/l3kernel/l3tl-analysis.dtx | 2 +- macros/latex/contrib/l3kernel/l3tl.dtx | 2 +- macros/latex/contrib/l3kernel/l3token.dtx | 2 +- macros/latex/contrib/l3kernel/l3unicode.dtx | 2 +- macros/latex/contrib/l3kernel/source3.pdf | Bin 6837796 -> 6845098 bytes macros/latex/contrib/l3kernel/source3.tex | 2 +- macros/latex/contrib/media9/ChangeLog | 5 + macros/latex/contrib/media9/doc/media9.pdf | Bin 3748216 -> 3748609 bytes macros/latex/contrib/media9/doc/media9.tex | 6 +- macros/latex/contrib/media9/media9.sty | 56 +- .../latex/contrib/nicematrix/nicematrix-french.pdf | Bin 476252 -> 487802 bytes .../latex/contrib/nicematrix/nicematrix-french.tex | 1051 +++++++++------- macros/latex/contrib/nicematrix/nicematrix.dtx | 1271 +++++++++++++------- macros/latex/contrib/nicematrix/nicematrix.pdf | Bin 1387232 -> 1419125 bytes 177 files changed, 2093 insertions(+), 1116 deletions(-) (limited to 'macros') diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx index ac09fdcaf7..a7d77a29ae 100644 --- a/macros/latex/contrib/easybook/easybook.dtx +++ b/macros/latex/contrib/easybook/easybook.dtx @@ -15,7 +15,7 @@ %<*class> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/10/16}{1.3N} +\ProvidesExplClass{easybook}{2021/10/18}{1.3O} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool @@ -319,7 +319,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2021/10/16}{1.3N} +\ProvidesExplPackage{easybase}{2021/10/18}{1.3O} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -797,9 +797,9 @@ { \ding{\int_eval:n { 171 + #1 }} } \cs_new:Npn \eb_fnmark_counter_pifont_neg:N #1 { \ding{\int_eval:n { 181 + #1 }} } -\cs_new:Npn \eb_fnmark_counter_pifont_sans:N #1 +\cs_new:Npn \eb_fnmark_counter_pisans:N #1 { \ding{\int_eval:n { 191 + #1 }} } -\cs_new:Npn \eb_fnmark_counter_pifont_sans_neg:N #1 +\cs_new:Npn \eb_fnmark_counter_pisans_neg:N #1 { \ding{\int_eval:n { 201 + #1 }} } \cs_new:Npn \eb_int_format_trans:NN #1 { @@ -826,10 +826,10 @@ { \exp_not:N \eb_fnmark_counter_pifont:N } { pifont* } { \exp_not:N \eb_fnmark_counter_pifont_neg:N } - { pifont-sans } - { \exp_not:N \eb_fnmark_counter_pifont_sans:N } - { pifont-sans* } - { \exp_not:N \eb_fnmark_counter_pifont_sans_neg:N } + { pisans } + { \exp_not:N \eb_fnmark_counter_pisans:N } + { pisans* } + { \exp_not:N \eb_fnmark_counter_pisans_neg:N } } { \exp_not:N \c@footnote } } @@ -849,33 +849,49 @@ } \cs_set_eq:cN {#2} \l__eb_fnmark_short_tokens_tl } -\bool_new:N \l__eb_fntext_bottom_bool +\cs_new_protected:Npn \eb_footnote_choice_handle:n #1 + { + \str_case:nnF {#1} + { + { bottom } + { \bool_set_true:N \l__eb_fnpara_bottom_bool } + { flush } + { + \tl_set:Nn \l__eb_footnote_choice_tl { default } + \clist_push:Nn \l__eb_footnote_mulchoice_clist {#1} + } + } + { + \bool_lazy_or:nnT + { \str_if_eq_p:nn {#1} { hang } } + { \str_if_eq_p:nn {#1} { default } } + { \tl_set:Nn \l__eb_footnote_choice_tl {#1} } + } + } +\bool_new:N \l__eb_fnpara_bottom_bool +\clist_new:N \l__eb_footnote_mulchoice_clist \ctex_define:nn { hdrset } { - fnmargin .dim_set:N = \footnoteindent, - fnmargin .initial:n = 0.75em, + fnindent .dim_set:N = \footnoteindent, + fnindent .initial:n = 0.75em, fnparskip .skip_set:N = \footparskip, fnparskip .initial:n = 0ex, fnparindent .dim_set:N = \footparindent, fnparindent .initial:n = 2em, - fntext-form .tl_set:N = \l__eb_fntext_format_tl, + fnpara-form .tl_set:N = \l__eb_fnpara_format_tl, fnmark-pos .tl_set:N = \l__eb_fnmark_position_tl, fnmark-pos .initial:n = super, - fnmark-code .code:n = \eb_assign_fnmark_code:n {#1}, - fnmark-code .initial:n = + fntext-code .code:n = \eb_assign_fnmark_code:n {#1}, + fntext-code .initial:n = { ,\tl_if_eq:NnF \l__eb_fnmark_position_tl { super } { \space } }, fnmark-form .tl_set:N = \l__eb_fnmark_format_tl, fncust-form .tl_set:N = \l__eb_fncust_format_tl, fnboth-form .meta:n = { fnmark-form = #1,fncust-form = #1 }, footnotetype .multichoices:nn = - { default,hang,bottom,para } - { - \tl_if_eq:nnTF { bottom } {#1} - { \bool_set_true:N \l__eb_fntext_bottom_bool } - { \tl_set:Nn \l__eb_footnotetype_choice_tl {#1} } - }, + { default,hang,bottom,para,flush } + { \eb_footnote_choice_handle:n {#1} }, footnotetype .value_required:n = true, footnotetype .initial:n = hang, @@ -912,7 +928,11 @@ { part } { \counterwithin*{footnote}{part} } { page } { \counterwithin*{footnote}{page} } } - \bool_if:NT \l__eb_fntext_bottom_bool + \eb_fnpara_if_pos_bottom: + } +\cs_new_protected:Npn \eb_fnpara_if_pos_bottom: + { + \bool_if:NT \l__eb_fnpara_bottom_bool { \cs_set:Npn \@makecol { @@ -948,57 +968,66 @@ } } } -\cs_set:Npn \@makefntext #1 +\cs_new_protected:Npn \eb_footnote_direct_hang: { - \group_begin: - \str_case:Vn \l__eb_footnotetype_choice_tl + \hbox_set:Nn \l_tmpa_box { - { hang } { \use_i:nn } - { default } { \use_ii:nn } + \dim_compare:nNnTF { \footnoteindent } > { 0pt } + { \hbox_to_wd:nn { \footnoteindent } { \eb@makefnmark\hss } } + { \eb@makefnmark } + } + \dim_set:Nn \leftmargin { \box_wd:N \l_tmpa_box } + \dim_zero:N \rightmargin + \dim_set_eq:NN \linewidth \columnwidth + \dim_sub:Nn \linewidth { \leftmargin } + \parshape\@ne\leftmargin\linewidth + \@setpar{{\@@par}} + \mode_leave_vertical: + \hbox_overlap_left:n { \box_use:N \l_tmpa_box } + } +\cs_new_protected:Npn \eb_footnote_direct_default: + { + \noindent + \clist_if_in:NnT \l__eb_footnote_mulchoice_clist { flush } + { \dim_zero:N \footnoteindent } + \int_case:nn { \dim_sign:V \footnoteindent } + { + { 1 } { \use_i:nnn } + { 0 } { \use_ii:nnn } + { -1 } { \use_iii:nnn } } + { \hbox_to_wd:nn { \footnoteindent } { \hss\eb@makefnmark } } + { \hbox_overlap_left:n { \eb@makefnmark } } { - \hbox_set:Nn \l_tmpa_box + \hbox_overlap_left:n { - \dim_compare:nNnTF { \footnoteindent } > { 0pt } - { \hbox_to_wd:nn { \footnoteindent } { \eb@makefnmark\hss } } - { \eb@makefnmark } - } - \dim_set:Nn \leftmargin { \box_wd:N \l_tmpa_box } - \dim_zero:N \rightmargin - \dim_set_eq:NN \linewidth \columnwidth - \dim_sub:Nn \linewidth { \leftmargin } - \parshape\@ne\leftmargin\linewidth - \@setpar{{\@@par}} - \mode_leave_vertical: - \hbox_overlap_left:n { \box_use:N \l_tmpa_box } - } - { - \noindent - \int_case:nn { \dim_sign:V \footnoteindent } - { - { 1 } { \use_i:nnn } - { 0 } { \use_ii:nnn } - { -1 } { \use_iii:nnn } - } - { \hbox_to_wd:nn { \footnoteindent } { \hss\eb@makefnmark } } - { \hbox_overlap_left:n { \eb@makefnmark } } - { - \hbox_overlap_left:n - { - \hbox_to_wd:nn { -\footnoteindent } - { \eb@makefnmark\hss } - } + \hbox_to_wd:nn { -\footnoteindent } + { \eb@makefnmark\hss } } } + } +\cs_set:Npn \@makefntext #1 + { + \group_begin: + \str_case:Vn \l__eb_footnote_choice_tl + { + { hang } { \use_i:nn } + { default } { \use_ii:nn } + } + { \eb_footnote_direct_hang: } + { \eb_footnote_direct_default: } \skip_set:NV \parskip \footparskip \dim_set:NV \parindent \footparindent - \l__eb_fntext_format_tl{#1} - \tl_if_eq:NnT \l__eb_footnotetype_choice_tl { hang } { \par } + \l__eb_fnpara_format_tl{#1} + \tl_if_eq:NnT \l__eb_footnote_choice_tl { hang } { \par } \group_end: } \cs_set_eq:NN \eb@makefntext \@makefntext \ctex_at_end_package:nn { footmisc } - { \cs_set_eq:NN \@makefntext \eb@makefntext } + { + \@ifpackagewith{footmisc}{hang} + {\cs_set_eq:NN \@makefntext \eb@makefntext}{} + } \eb_at_end_patch_cmd:nnn { \@footnotetext,\@mpfootnotetext } { \reset@font } { @@ -1079,7 +1108,7 @@ { \eb@fnmark@super* } { \tl_use:N \l__eb_fnmark_before_tl - \l__eb_fnmark_format_tl{\@thefnmark} + {\l__eb_fnmark_format_tl{\@thefnmark}} \tl_use:N \l__eb_fnmark_after_tl } } @@ -1098,7 +1127,7 @@ } \cs_new_protected:Npn \eb_fncust_format_initial: { - \hdrset{fnmark-code = { }} + % \hdrset{fntext-code = { }} \tl_set_eq:NN \l__eb_fnmark_format_tl \l__eb_fncust_format_tl } @@ -1914,7 +1943,7 @@ name = \tl_use:c { c__eb_name_#1_tl }, style = easy-theorem,#5 ] - \bool_if:NT \l__eb_thmbox_bool + \bool_if:NT \l__eb_thmframe_bool { \@ifpackageloaded{tcolorbox} {\tcolorboxenvironment{#1}{#4}} @@ -1924,7 +1953,7 @@ } \msg_new:nnn { easybase } { need-tcolorbox } { - Now~that~the~thmbox~option~is~true. \\ + Now~that~the~thmframe~option~is~true. \\ Please~load~the~tcolorbox~macro~package. } \cs_set_eq:NN \EBNewTheorem \DeclareTheorem @@ -1949,9 +1978,11 @@ { \ctex_define:nn { thmset } { #1 .tl_set:N = #2 } } \ctex_define:nn { thmset } { - thmbox .bool_set:N = \l__eb_thmbox_bool, + thmframe .bool_set:N = \l__eb_thmframe_bool, + thmframe .default:n = true, + thmframe .initial:n = false, + thmbox .meta:n = { thmframe = #1 }, thmbox .default:n = true, - thmbox .initial:n = false, notebraces .tl_set:N = \l__eb_thm_notebraces_tl, unknown .code:n = \eb_msg_unknown_option:n { thmset } } @@ -2391,7 +2422,7 @@ } % %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/10/16}{1.3N} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/10/18}{1.3O} {Customization of tcolorbox for easybook} \tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip } diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf index 02ae0c76ee..a6c182352e 100644 Binary files a/macros/latex/contrib/easybook/easybook.pdf and b/macros/latex/contrib/easybook/easybook.pdf differ diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex index b7e477da92..209ca5efe6 100644 --- a/macros/latex/contrib/easybook/easybook.tex +++ b/macros/latex/contrib/easybook/easybook.tex @@ -20,8 +20,8 @@ name = easybook, color-scheme = blue, title = EASYBOOK 使用手册, - version = v1.3N, - date = 2021/10/16, + version = v1.3O, + date = 2021/10/18, authors = 瞿毅, info = 排版简体中文学位论文和书籍, email = q1jx@foxmail.com, @@ -466,10 +466,10 @@ \keyval-{caption}{数值}\Default{1.2} 图片、表格和代码题注的行距因子。 \keyval-{footnote}{数值}\Default{1.2} - 脚注内容整体的行距因子,可以使用 \option{fntext-form} 的代码覆盖每个脚注单独的行距,从而与不同脚注的段落间距不同。 + 脚注内容整体的行距因子,可以使用 \option{fnpara-form} 的代码覆盖每个脚注单独的行距,从而与不同脚注的段落间距不同。 \begin{ctexexam} \spread{footnote = 1.3} - \hdrset{fntext-form = \linespread{1.2}\selectfont} + \hdrset{fnpara-form = \linespread{1.2}\selectfont} \end{ctexexam} \keyval-{spread-all}{数值}\Default 统一设置上述各种行距因子。 @@ -535,8 +535,8 @@ \label{subsec:theorem of style} 文档类已预置 8 个定理环境,环境名及对应的定理名见小节 \ref{subsec:theorem},它们均使用预置的定理样式 \code{easy-theorem}。下面 \module*{thmset} 模块的选项仅对这个定理样式生效,由 \pkg*{thmtools} 宏包提供支持。 \begin{options} - \keybool{thmbox}\Module{thmset}\Default{false} - 给定理环境使用彩色盒子。这个特殊选项在 \module*{thmset} 模块中使用 \pkg*{tcolorbox} 宏包来支持,\meta{盒子风格} 默认为 \code{tc-theorem}。新建定理命令的同名选项则包括 \code{L}、\code{M} 和 \code{S} 三个参数。 + \keybool{thmframe}\Module{thmset}\Default{false} + 给定理环境使用彩色盒子。这个特殊选项在 \module*{thmset} 模块中使用 \pkg*{tcolorbox} 宏包来支持,\meta{盒子风格} 默认为 \code{tc-theorem}。\pkg*{thmtools} 具有类似的选项 \option*{thmbox},可在新建定理样式的命令中使用。 \keychoice{within}{chapter,section,env,empty}\Default{chapter} 定理编号跟随的计数器,默认跟随章的编号,也可以跟随其它定理环境的编号,当计数器增加时定理编号会从零开始,空置时不跟随其它计数器编号。 \keyval-{headpunct}{代码}\Default @@ -580,7 +580,7 @@ \begin{itemize} \item 中英文模式下标题不同,英文标题为可选项,默认为首字母大写的 \meta{环境名}。 \item 自动定义交叉引用的格式,引用标签前缀为定理名。 - \item 模块 \module*{thmset} 的定理盒子选项 \keyis-{thmbox}{true} 仍然生效,其中 \meta{盒子风格} 可以使用新建盒子风格命令 \cs{newtcbstyle} 定义。 + \item 模块 \module*{thmset} 的定理盒子选项 \keyis-{thmframe}{true} 仍然生效,其中 \meta{盒子风格} 可以使用新建盒子风格命令 \cs{newtcbstyle} 定义。 \item 新建定理环境默认使用的 \meta{定理样式} 为 \code{easy-theorem},而不是 \pkg*{thmtools} 默认样式。 \end{itemize} \command{declaretheoremstyle}[\oarg{键值列表1}\marg{定理样式}\oarg{键值列表2}] @@ -695,33 +695,34 @@ \end{commands} \subsubsection{脚注格式} +模块 \module*{hdrset} 还可以灵活调整脚注编号和内容的格式。格式主要包括脚注标记的编号类型、字体、附加符号、对齐方式和缩进距离等,以及脚注内容的首行缩进、行距和字体等。基本思想是默认脚注和自定义编号脚注标记的格式分离,两种类型脚注各自正文和内容的标记又共享格式,默认脚注中正文和内容标记的编号类型分离。 \begin{options} - \keyval-{fnmargin}{刚性长度}\Module{hdrset}\Default{0.75em} - 脚注首段缩进距离,等于长度 \cs{footnoteindent} 的值。 + \keyval-{fnindent}{刚性长度}\Module{hdrset}\Default{0.75em} + 脚注内容首段缩进距离,等于长度 \cs{footnoteindent} 的值。 \keyval-{fnparskip}{弹性长度}\Default{0ex} 脚注段落间距,等于长度 \cs{footparskip} 的值。 \keyval-{fnparindent}{刚性长度}\Default{2em} 脚注段落缩进,等于长度 \cs{footparindent} 的值。 - \keychoice{footnotetype}{hang,default,bottom}\Default{hang} - 脚注的类型,悬挂缩进 \code{hang} 是默认值,\code{default} 是原始的类型,在一些浮动体排版的情况下,脚注可能位于页面中间,\code{bottom} 使脚注始终位于页面底端。这是个复合选项,\code{bottom} 可以与前两种类型重复或复合使用: + \keychoice{footnotetype}{hang,default,flush,bottom}\Default{hang} + 脚注的类型,悬挂缩进 \code{hang} 是默认值,\code{default} 是原始的类型,在一些浮动体排版的情况下,脚注可能位于页面中间,\code{bottom} 使脚注始终位于页面底端,\code{flush} 使脚注内容标记位于脚注首行边缘外侧并右对齐。其中 \code{bottom} 是复合选项,可以与前三种类型重复或复合使用: \begin{ctexexam} \hdrset{footnotetype = default,footnotetype = bottom} \hdrset{footnotetype = {hang,bottom}} \end{ctexexam} \keychoice{fnmark-pos}{normal,super}\Default{super} 设置脚注内容标记的位置,正常文本或是上标形式。 - \keychoice{fnmark-num}{plain,pifont,pifont*,pifont-sans,pifont-sans*,short num}\Default{plain} - 脚注正文标记编号的格式,默认为原生样式 \code{plain},还可以改为 \code{pifont} 的各个版本,从左往右依次为普通版、阴文衬线版、阳文无衬线版和阴文无衬线版,缺点是它们的编号仅包括 1-10。 + \keychoice{fnmark-num}{plain,pifont,pifont*,pisans,pisans*,short num}\Default{plain} + 脚注正文标记编号的类型,默认为原生样式 \code{plain},还可以改为 \code{pifont} 的各个版本,从左往右依次为普通版、阴文衬线版、阳文无衬线版和阴文无衬线版,缺点是它们的编号仅包括 1-10。 短编号的形式与列表环境类似,不过增加了一个中文数字格式参数 \code{c}。原生样式 \code{plain} 等同于单独使用数字 \code{1} 参数。这个选项可以用在正文中改变其后脚注编号格式。 \begin{ctexexam} \hdrset{fnmark-num = 1} % 等于编号格式plain \hdrset{fnmark-num = (a)} \end{ctexexam} - \keychoice{fntext-num}{plain,pifont,pifont*,pifont-sans,pifont-sans*,short num}\Default{plain} - 脚注内容标记编号的格式,用法与 \option{fnmark-num} 一样,所以脚注内容与正文标记编号格式\textbf{可以不同}。 - \keychoice{fnboth-num}{plain,pifont,pifont*,pifont-sans,pifont-sans*,short num}\Default{plain} - 同时设定脚注正文标记编号 \option{fnmark-num} 与脚注内容标记编号 \option{fntext-num} 的格式。目前脚注编号格式选项对于迷你页环境 \env*{minipage} 无效,其中的脚注保持默认英文字母的编号形式。 + \keychoice{fntext-num}{plain,pifont,pifont*,pisans,pisans*,short num}\Default{plain} + 脚注内容标记编号的类型,用法与 \option{fnmark-num} 一样,所以脚注内容与正文标记编号格式\textbf{可以不同}。 + \keychoice{fnboth-num}{plain,pifont,pifont*,pisans,pisans*,short num}\Default{plain} + 同时设定脚注正文标记编号 \option{fnmark-num} 与脚注内容标记编号 \option{fntext-num} 的类型。目前脚注编号格式选项对于迷你页环境 \env*{minipage} 无效,其中的脚注保持默认英文字母的编号形式。 \keyval-{fnmark-form}{格式代码}\Default 脚注标记的格式,一般配合选项 \keyis-{fnmark-num}{plain} 使用,例如配合 \pkg*{circledsteps} 宏包的带圈符号命令 \cs*{Circled} 给脚注标记添加圆圈: \begin{ctexexam} @@ -736,10 +737,17 @@ 单独设定自定义脚注标记的格式,自定义脚注的命令与用法见小节 \ref{subsubsec:custom footnotes}。 \keyval-{fnboth-form}{格式代码}\Default 同时设定脚注标记 \option{fnmark-form} 和自定义脚注标记 \option{fncust-form} 的格式。标记格式选项含有字体命令会覆盖 \module*{subfont/}\option{footnote} 的设置,最后一个格式命令可以带有一个参数接受脚注标记。 - \keyval-{fntext-form}{格式代码}\Default - 脚注内容的格式,在此设置字体命令会覆盖 \module*{subfont/}\option{footnote} 的设置,最后一个格式命令可以带有一个参数,这个参数接受脚注内容。 - \kvsplit{fnmark-code}{前代码,后代码}\newline - 脚注内容标记前后增加代码可以用 \meta{前代码} 与 \meta{后代码},也可以只有前部分,这两部分代码只对页面下方的标记有效。由于脚注标记处于水平模式,一般在脚注类型为 \keyis-{footnotetype}{default} 时在标记与其后脚注段落间插入距离代码,或与正文中的标记稍有不同。 + \keyval-{fnpara-form}{格式代码}\Default + 脚注内容的格式,在此设置字体命令会覆盖 \module*{subfont/}\option{footnote} 的设置,最后一个格式命令可以带有一个参数接受脚注内容。 + \kvsplit{fntext-code}{前代码,后代码}\newline + 可以用 \meta{前代码} 与 \meta{后代码} 额外增加脚注内容标记前后的代码,也可以只有前部分,\meta{前代码} 中最后一个格式命令可以带有一个参数接受脚注内容标记。由于脚注标记处于水平模式,一般用于在脚注内容标记与脚注首行间插入一点距离,或与脚注正文标记的格式稍有不同。 + \begin{ctexexam} + \hdrset + { + footnotetype = flush, + fntext-code = {,\enskip} + } + \end{ctexexam} \end{options} \subsection{目录样式} @@ -881,7 +889,7 @@ \environment{example}\default{} \environment{remark}\default{} \environment{proof} - 这些是预置的定理环境,可使用选项 \module*{thmset/}\option{thmbox} 为它们添加盒子边框,其中注与证明环境不编号,证明末尾会自动添加证明结束符,声明新的定理环境或更改定理盒子样式见小节 \ref{subsec:theorem of style}。环境名与之对应的定理名如下: + 这些是预置的定理环境,可使用选项 \module*{thmset/}\option{thmframe} 为它们添加盒子边框,其中注与证明环境不编号,证明末尾会自动添加证明结束符,声明新的定理环境或更改定理盒子样式见小节 \ref{subsec:theorem of style}。环境名与之对应的定理名如下: \begin{center} \begin{tblr} { diff --git a/macros/latex/contrib/fithesis/VERSION.tex b/macros/latex/contrib/fithesis/VERSION.tex index 5c64eb1e87..0dfaee2621 100644 --- a/macros/latex/contrib/fithesis/VERSION.tex +++ b/macros/latex/contrib/fithesis/VERSION.tex @@ -1 +1 @@ -2021/07/18 v1.0.1 fithesis4 MU thesis class +2021/10/17 v1.0.2 fithesis4 MU thesis class diff --git a/macros/latex/contrib/fithesis/fithesis.dtx b/macros/latex/contrib/fithesis/fithesis.dtx index b4f24e63da..53632b0a04 100644 --- a/macros/latex/contrib/fithesis/fithesis.dtx +++ b/macros/latex/contrib/fithesis/fithesis.dtx @@ -57,7 +57,7 @@ \gdef\thesis@version@number{#1} \gdef\thesis@version@date{#2} \gdef\thesis@version{#2 #1 fithesis4 MU thesis class}} -\thesis@versiondef{v1.0.1}{2021/07/18}} +\thesis@versiondef{v1.0.2}{2021/10/17}} % {\newwrite\f\openout\f=VERSION\write\f{\thesis@version}\closeout\f} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/macros/latex/contrib/fithesis/fithesis.pdf b/macros/latex/contrib/fithesis/fithesis.pdf index d36fce38e6..e176e1d46e 100644 Binary files a/macros/latex/contrib/fithesis/fithesis.pdf and b/macros/latex/contrib/fithesis/fithesis.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-base-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-base-color.pdf index e161090def..257f197708 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-base-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-base-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-base-czech-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-base-czech-color.pdf index e8741a78bf..db17792996 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-base-czech-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-base-czech-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-base-czech.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-base-czech.pdf index c61c0e83e9..735d952686 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-base-czech.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-base-czech.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-base-english-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-base-english-color.pdf index d0f5880cc2..09691f37d8 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-base-english-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-base-english-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-base-english.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-base-english.pdf index f8a0806875..0509a96a9c 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-base-english.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-base-english.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-base.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-base.pdf index ea965eef67..fd398ee22f 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-base.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-base.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-econ-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-econ-color.pdf index 8e8887ec54..d9edafa223 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-econ-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-econ-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-econ-czech-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-econ-czech-color.pdf index 0bde682c1f..f80ea85a60 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-econ-czech-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-econ-czech-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-econ-czech.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-econ-czech.pdf index f2a72c38de..a641af60b9 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-econ-czech.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-econ-czech.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-econ-english-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-econ-english-color.pdf index 63f761a9b0..e55fa24662 100644 --- a/macros/latex/contrib/fithesis/logo/mu/fithesis-econ-english-color.pdf +++ b/macros/latex/contrib/fithesis/logo/mu/fithesis-econ-english-color.pdf @@ -36,11 +36,11 @@ endobj - -2021-07-18T20:55:03Z -2021-07-18T20:55:03Z + +2021-10-17T20:47:16Z +2021-10-17T20:47:16Z cairo 1.16.0 (https://cairographics.org) - + Untitled @@ -50,9 +50,9 @@ endobj endstream endobj 2 0 obj -<>endobj xref 0 8 @@ -66,7 +66,7 @@ xref 0000001274 00000 n trailer << /Size 8 /Root 1 0 R /Info 2 0 R -/ID [<3884ACC246E12C00728F1F742413D21F><3884ACC246E12C00728F1F742413D21F>] +/ID [<40DA1DA992658F4FF4BFC98AEAF5041F><40DA1DA992658F4FF4BFC98AEAF5041F>] >> startxref 2722 diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-econ-english.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-econ-english.pdf index b90e3faf4e..381a5fae09 100644 --- a/macros/latex/contrib/fithesis/logo/mu/fithesis-econ-english.pdf +++ b/macros/latex/contrib/fithesis/logo/mu/fithesis-econ-english.pdf @@ -38,11 +38,11 @@ endobj - -2021-07-18T20:55:09Z -2021-07-18T20:55:09Z + +2021-10-17T20:47:21Z +2021-10-17T20:47:21Z cairo 1.16.0 (https://cairographics.org) - + Untitled @@ -52,9 +52,9 @@ endobj endstream endobj 2 0 obj -<>endobj xref 0 8 @@ -68,7 +68,7 @@ xref 0000001268 00000 n trailer << /Size 8 /Root 1 0 R /Info 2 0 R -/ID [] +/ID [<561CF86F93CEDC183EB3DEB7DCEDC00A><561CF86F93CEDC183EB3DEB7DCEDC00A>] >> startxref 2716 diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-econ.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-econ.pdf index 11537c4700..d62468248d 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-econ.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-econ.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-fi-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-fi-color.pdf index 3bebc977df..9b6e0f0c0f 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-fi-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-fi-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-fi-czech-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-fi-czech-color.pdf index b3c03dd838..8584123929 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-fi-czech-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-fi-czech-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-fi-czech.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-fi-czech.pdf index d958a4fd27..482cc07f7b 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-fi-czech.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-fi-czech.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-fi-english-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-fi-english-color.pdf index 0eb456f74f..daaa98c007 100644 --- a/macros/latex/contrib/fithesis/logo/mu/fithesis-fi-english-color.pdf +++ b/macros/latex/contrib/fithesis/logo/mu/fithesis-fi-english-color.pdf @@ -39,11 +39,11 @@ endobj - -2021-07-18T20:55:03Z -2021-07-18T20:55:03Z + +2021-10-17T20:47:17Z +2021-10-17T20:47:17Z cairo 1.16.0 (https://cairographics.org) - + Untitled @@ -53,9 +53,9 @@ endobj endstream endobj 2 0 obj -<>endobj xref 0 8 @@ -69,7 +69,7 @@ xref 0000000973 00000 n trailer << /Size 8 /Root 1 0 R /Info 2 0 R -/ID [<9940A6F61BA705D5DF4C62C35870625A><9940A6F61BA705D5DF4C62C35870625A>] +/ID [<31196CD0E4DB25BDCE8DAC5BF33AA38D><31196CD0E4DB25BDCE8DAC5BF33AA38D>] >> startxref 2421 diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-fi-english.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-fi-english.pdf index ab59ee1674..23be564898 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-fi-english.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-fi-english.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-fi.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-fi.pdf index 52639a4df6..af68121d87 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-fi.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-fi.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-fsps-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-fsps-color.pdf index 3f84f51b84..d0a3949eab 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-fsps-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-fsps-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-fsps-czech-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-fsps-czech-color.pdf index 76070f1040..dedb28198e 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-fsps-czech-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-fsps-czech-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-fsps-czech.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-fsps-czech.pdf index 43c76a513b..c86c207e3d 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-fsps-czech.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-fsps-czech.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-fsps-english-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-fsps-english-color.pdf index e854f08d11..c8673b5246 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-fsps-english-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-fsps-english-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-fsps-english.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-fsps-english.pdf index f93287cde0..739be37c73 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-fsps-english.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-fsps-english.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-fsps.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-fsps.pdf index 2480a44f75..720f54e9de 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-fsps.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-fsps.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-fss-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-fss-color.pdf index ad6045c868..f89cba1709 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-fss-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-fss-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-fss-czech-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-fss-czech-color.pdf index b70dc82c35..007775a16b 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-fss-czech-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-fss-czech-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-fss-czech.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-fss-czech.pdf index aa123c69e2..564a3b8b64 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-fss-czech.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-fss-czech.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-fss-english-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-fss-english-color.pdf index 6381148acf..5d7fc27007 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-fss-english-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-fss-english-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-fss-english.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-fss-english.pdf index 0b5d3d57ba..c38a7b9032 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-fss-english.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-fss-english.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-fss.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-fss.pdf index e165326897..88123ca498 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-fss.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-fss.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-law-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-law-color.pdf index 52af6886e7..e0c41d60ca 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-law-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-law-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-law-czech-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-law-czech-color.pdf index 3b3063b99d..5d322deffa 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-law-czech-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-law-czech-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-law-czech.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-law-czech.pdf index d784092278..8644f89765 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-law-czech.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-law-czech.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-law-english-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-law-english-color.pdf index e27356789d..851f77bf59 100644 --- a/macros/latex/contrib/fithesis/logo/mu/fithesis-law-english-color.pdf +++ b/macros/latex/contrib/fithesis/logo/mu/fithesis-law-english-color.pdf @@ -38,11 +38,11 @@ endobj - -2021-07-18T20:55:05Z -2021-07-18T20:55:05Z + +2021-10-17T20:47:18Z +2021-10-17T20:47:18Z cairo 1.16.0 (https://cairographics.org) - + Untitled @@ -52,9 +52,9 @@ endobj endstream endobj 2 0 obj -<>endobj xref 0 8 @@ -68,7 +68,7 @@ xref 0000001049 00000 n trailer << /Size 8 /Root 1 0 R /Info 2 0 R -/ID [<6FDBBDA31FD9B31FECF88C02E37CC2E1><6FDBBDA31FD9B31FECF88C02E37CC2E1>] +/ID [<55332FD948AF9B42F387E093B1930D59><55332FD948AF9B42F387E093B1930D59>] >> startxref 2497 diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-law-english.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-law-english.pdf index 2ee9b9e0e0..c21da08678 100644 --- a/macros/latex/contrib/fithesis/logo/mu/fithesis-law-english.pdf +++ b/macros/latex/contrib/fithesis/logo/mu/fithesis-law-english.pdf @@ -42,11 +42,11 @@ endobj - -2021-07-18T20:55:11Z -2021-07-18T20:55:11Z + +2021-10-17T20:47:23Z +2021-10-17T20:47:23Z cairo 1.16.0 (https://cairographics.org) - + Untitled @@ -56,9 +56,9 @@ endobj endstream endobj 2 0 obj -<>endobj xref 0 8 @@ -72,7 +72,7 @@ xref 0000001045 00000 n trailer << /Size 8 /Root 1 0 R /Info 2 0 R -/ID [] +/ID [<21FD358098839F82AC496F160C142ED4><21FD358098839F82AC496F160C142ED4>] >> startxref 2493 diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-law.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-law.pdf index 030b05dde2..d8b514082f 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-law.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-law.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-med-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-med-color.pdf index 055c89a047..9bd2d504af 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-med-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-med-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-med-czech-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-med-czech-color.pdf index b4fbb9c34a..cfafe11228 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-med-czech-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-med-czech-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-med-czech.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-med-czech.pdf index 5f8dcb4caa..76785f033f 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-med-czech.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-med-czech.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-med-english-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-med-english-color.pdf index 7934ab9d54..319583eebb 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-med-english-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-med-english-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-med-english.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-med-english.pdf index 9f1df5a076..cc5ae85028 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-med-english.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-med-english.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-med.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-med.pdf index 4d7b1d3e46..272e62aa36 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-med.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-med.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-ped-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-ped-color.pdf index 5f42f831f3..df3714c2e8 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-ped-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-ped-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-ped-czech-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-ped-czech-color.pdf index 6d15ec8a51..928e399668 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-ped-czech-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-ped-czech-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-ped-czech.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-ped-czech.pdf index 5b32fc42fe..608f3ed3e3 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-ped-czech.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-ped-czech.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-ped-english-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-ped-english-color.pdf index 658fe24a95..6b0a967117 100644 --- a/macros/latex/contrib/fithesis/logo/mu/fithesis-ped-english-color.pdf +++ b/macros/latex/contrib/fithesis/logo/mu/fithesis-ped-english-color.pdf @@ -37,11 +37,11 @@ endobj - -2021-07-18T20:55:06Z -2021-07-18T20:55:06Z + +2021-10-17T20:47:19Z +2021-10-17T20:47:19Z cairo 1.16.0 (https://cairographics.org) - + Untitled @@ -51,9 +51,9 @@ endobj endstream endobj 2 0 obj -<>endobj xref 0 8 @@ -67,7 +67,7 @@ xref 0000001143 00000 n trailer << /Size 8 /Root 1 0 R /Info 2 0 R -/ID [] +/ID [<3D23766A4C9CE113BE0885DB676F8FD4><3D23766A4C9CE113BE0885DB676F8FD4>] >> startxref 2591 diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-ped-english.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-ped-english.pdf index 70fcabfe10..e21f13c40d 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-ped-english.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-ped-english.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-ped.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-ped.pdf index 48c07f90a7..fb9a5ecfc6 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-ped.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-ped.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-pharm-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-pharm-color.pdf index 82e3f5ad11..6283436cc2 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-pharm-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-pharm-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-pharm-czech-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-pharm-czech-color.pdf index 9559ac56d2..53cc5e2ec7 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-pharm-czech-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-pharm-czech-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-pharm-czech.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-pharm-czech.pdf index 7b89a317dc..4fe8f626ed 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-pharm-czech.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-pharm-czech.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-pharm-english-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-pharm-english-color.pdf index 88c51b74cb..d390a724e1 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-pharm-english-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-pharm-english-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-pharm-english.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-pharm-english.pdf index 2718e6dc20..ae0341515c 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-pharm-english.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-pharm-english.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-pharm.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-pharm.pdf index f0dc05b65e..fde9998208 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-pharm.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-pharm.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-phil-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-phil-color.pdf index 334888892c..3df1faa654 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-phil-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-phil-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-phil-czech-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-phil-czech-color.pdf index 818b7f1dd8..33d878816b 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-phil-czech-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-phil-czech-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-phil-czech.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-phil-czech.pdf index 57fb501f0c..f6b15e0a0c 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-phil-czech.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-phil-czech.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-phil-english-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-phil-english-color.pdf index 4000ca595e..0d62d0db44 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-phil-english-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-phil-english-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-phil-english.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-phil-english.pdf index f5776d0147..f2df1f8b07 100644 --- a/macros/latex/contrib/fithesis/logo/mu/fithesis-phil-english.pdf +++ b/macros/latex/contrib/fithesis/logo/mu/fithesis-phil-english.pdf @@ -38,11 +38,11 @@ endobj - -2021-07-18T20:55:13Z -2021-07-18T20:55:13Z + +2021-10-17T20:47:25Z +2021-10-17T20:47:25Z cairo 1.16.0 (https://cairographics.org) - + Untitled @@ -52,9 +52,9 @@ endobj endstream endobj 2 0 obj -<>endobj xref 0 8 @@ -68,7 +68,7 @@ xref 0000001364 00000 n trailer << /Size 8 /Root 1 0 R /Info 2 0 R -/ID [<271CEF740125D4DCE22469EE726BB1FF><271CEF740125D4DCE22469EE726BB1FF>] +/ID [<80B8898B86BD65AA05E219B06B1C67C8><80B8898B86BD65AA05E219B06B1C67C8>] >> startxref 2812 diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-phil.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-phil.pdf index 4b0d5f1587..c3364b3249 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-phil.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-phil.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-sci-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-sci-color.pdf index 2fe356e734..b021508c51 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-sci-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-sci-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-sci-czech-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-sci-czech-color.pdf index e290678dd6..cf28aaa69c 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-sci-czech-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-sci-czech-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-sci-czech.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-sci-czech.pdf index b6b11e08d4..44efaf8bb7 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-sci-czech.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-sci-czech.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-sci-english-color.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-sci-english-color.pdf index 8059d8872b..7e919ea306 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-sci-english-color.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-sci-english-color.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-sci-english.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-sci-english.pdf index 55a99a2ec4..9115eba1c4 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-sci-english.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-sci-english.pdf differ diff --git a/macros/latex/contrib/fithesis/logo/mu/fithesis-sci.pdf b/macros/latex/contrib/fithesis/logo/mu/fithesis-sci.pdf index dae2270795..81801bfc2c 100644 Binary files a/macros/latex/contrib/fithesis/logo/mu/fithesis-sci.pdf and b/macros/latex/contrib/fithesis/logo/mu/fithesis-sci.pdf differ diff --git a/macros/latex/contrib/fithesis/style/mu/base.dtx b/macros/latex/contrib/fithesis/style/mu/base.dtx index 6a17ea26fa..a6c43b158d 100644 --- a/macros/latex/contrib/fithesis/style/mu/base.dtx +++ b/macros/latex/contrib/fithesis/style/mu/base.dtx @@ -127,7 +127,7 @@ \DeclareOption{nolot}{\let\thesis@blocks@lot\relax} \DeclareOption{lot}{\let\thesis@blocks@lot\listoftables} % \end{macrocode} -% \item\texttt{lot}, \texttt{nolot} -- The \DescribeMacro{^^A +% \item\texttt{lof}, \texttt{nolof} -- The \DescribeMacro{^^A % \thesis@blocks@lof}|\thesis@blocks@lof| macro will be defined % as either |\listoffigures| or |\relax|, respectively. As a % side effect, the |\listoffigures| either is or isn't going to diff --git a/macros/latex/contrib/fithesis/style/mu/ped.dtx b/macros/latex/contrib/fithesis/style/mu/ped.dtx index 88e2fb9918..6e0e223daa 100644 --- a/macros/latex/contrib/fithesis/style/mu/ped.dtx +++ b/macros/latex/contrib/fithesis/style/mu/ped.dtx @@ -7,14 +7,16 @@ % This is the style file for the theses written at the Faculty of % Education at the Masaryk University in Brno. It has been prepared % in accordance with the formal requirements published at the -% of the faculty\footnote{See \url{K_realizaci_zaverecnych_praci^^A -% __bakalarskych__diplomovych__rigoroznich_a_zaverecnych_praci_CZV_}, -% and standard of the department of Pedagogy -% \url{http://www.ped.muni.cz/pedagogika/wp-content/uploads/2018^^A -% /08/standard_zaverecnych_praci_katedra_pedagogiky-opravene3_08.pdf}}. +% of the faculty\footnote{See \url{https://is.muni.cz/do/mu/Uredni_^^A +% deska/Predpisy_MU/Pedagogicka_fakulta/Pokyny/PD2015-01/K_realizac^^A +% _ i_zaverecnych_praci__bakalarskych__diplomovych__rigoroznich_a_z^^A +% averecnych_praci_CZV__2021-06-10_09-07-51.pdf}, and the standard of +% the department of Pedagogy \url{http://www.ped.muni.cz/pedagogika^^A +% /wp-content/uploads/2018/08/standard_zaverecnych_praci_katedra_pe^^A +% dagogiky-opravene3_08.pdf}}. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{fithesis/style/mu/fithesis-mu-ped}[2021/04/24] +\ProvidesPackage{fithesis/style/mu/fithesis-mu-ped}[2021/10/17] % \end{macrocode} % The file defines the color scheme of the respective faculty. Note % the the color definitions are in RGB, which makes the resulting @@ -31,9 +33,15 @@ % \changes{v1.0.0}{2021/03/26}{^^A % The Faculty of Education at the Masaryk University in Brno % uses the APA citation and reference style. [VN]} +% \changes{v1.0.2}{2021/10/17}{^^A +% The Faculty of Education at the Masaryk University in Brno +% uses the ISO 690 citation and reference style, since the +% \textsf{biblatex-apa} package does not support Czech and +% Slovak. The |iso-authoryear| citations are used and the +% bibliography is sorted by name, title, and year. [VN]} % \begin{macrocode} \thesis@bibliography@setup{ - style=apa, + style=iso-authoryear, sorting=nty} \thesis@bibliography@load % \end{macrocode} diff --git a/macros/latex/contrib/l3backend/CHANGELOG.md b/macros/latex/contrib/l3backend/CHANGELOG.md index 9555227269..b6b15a00ec 100644 --- a/macros/latex/contrib/l3backend/CHANGELOG.md +++ b/macros/latex/contrib/l3backend/CHANGELOG.md @@ -6,6 +6,8 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2021-10-18] + ## [2021-10-17] ### Changed @@ -201,7 +203,8 @@ this project uses date-based 'snapshot' version identifiers. - Include `l3backend` in file names - Moved backend code to internal for each 'parent' module -[Unreleased]: https://github.com/latex3/latex3/compare/2021-10-17...HEAD +[Unreleased]: https://github.com/latex3/latex3/compare/2021-10-18...HEAD +[2021-10-18]: https://github.com/latex3/latex3/compare/2021-10-17...2021-10-18 [2021-10-17]: https://github.com/latex3/latex3/compare/2021-10-12...2021-10-17 [2021-10-12]: https://github.com/latex3/latex3/compare/2021-08-04...2021-10-12 [2021-08-04]: https://github.com/latex3/latex3/compare/2021-07-12...2021-08-04 diff --git a/macros/latex/contrib/l3backend/README.md b/macros/latex/contrib/l3backend/README.md index 5178df716c..5ca467a1f0 100644 --- a/macros/latex/contrib/l3backend/README.md +++ b/macros/latex/contrib/l3backend/README.md @@ -1,7 +1,7 @@ LaTeX3 Backend Drivers ====================== -Release 2021-10-17 +Release 2021-10-18 This package forms parts of `expl3`, and contains the code used to interface with backends (drivers) across the `expl3` codebase. The functions here are diff --git a/macros/latex/contrib/l3backend/l3backend-basics.dtx b/macros/latex/contrib/l3backend/l3backend-basics.dtx index a4de8bf46b..a8f2c67155 100644 --- a/macros/latex/contrib/l3backend/l3backend-basics.dtx +++ b/macros/latex/contrib/l3backend/l3backend-basics.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % @@ -70,27 +70,27 @@ % \begin{macrocode} \ProvidesExplFile %<*dvipdfmx> - {l3backend-dvipdfmx.def}{2021-10-17}{} + {l3backend-dvipdfmx.def}{2021-10-18}{} {L3 backend support: dvipdfmx} % %<*dvips> - {l3backend-dvips.def}{2021-10-17}{} + {l3backend-dvips.def}{2021-10-18}{} {L3 backend support: dvips} % %<*dvisvgm> - {l3backend-dvisvgm.def}{2021-10-17}{} + {l3backend-dvisvgm.def}{2021-10-18}{} {L3 backend support: dvisvgm} % %<*luatex> - {l3backend-luatex.def}{2021-10-17}{} + {l3backend-luatex.def}{2021-10-18}{} {L3 backend support: PDF output (LuaTeX)} % %<*pdftex> - {l3backend-pdftex.def}{2021-10-17}{} + {l3backend-pdftex.def}{2021-10-18}{} {L3 backend support: PDF output (pdfTeX)} % %<*xetex> - {l3backend-xetex.def}{2021-10-17}{} + {l3backend-xetex.def}{2021-10-18}{} {L3 backend support: XeTeX} % % \end{macrocode} diff --git a/macros/latex/contrib/l3backend/l3backend-box.dtx b/macros/latex/contrib/l3backend/l3backend-box.dtx index 179f5bb3f6..dc592e2fce 100644 --- a/macros/latex/contrib/l3backend/l3backend-box.dtx +++ b/macros/latex/contrib/l3backend/l3backend-box.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3backend/l3backend-code.pdf b/macros/latex/contrib/l3backend/l3backend-code.pdf index 9a6aca4f09..b190a428d9 100644 Binary files a/macros/latex/contrib/l3backend/l3backend-code.pdf and b/macros/latex/contrib/l3backend/l3backend-code.pdf differ diff --git a/macros/latex/contrib/l3backend/l3backend-color.dtx b/macros/latex/contrib/l3backend/l3backend-color.dtx index 3bd3fbc429..d47b2a7179 100644 --- a/macros/latex/contrib/l3backend/l3backend-color.dtx +++ b/macros/latex/contrib/l3backend/l3backend-color.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % @@ -546,6 +546,13 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\@@_backend_select_iccbased:nn} +% No support. +% \begin{macrocode} +\cs_new_protected:Npn \@@_backend_select_iccbased:nn #1#2 { } +% \end{macrocode} +% \end{macro} +% % \begin{macro} % { % \@@_backend_separation_init:nnnnn, @@ -807,6 +814,13 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\@@_backend_iccbased_init:nnn} +% No support at present. +% \begin{macrocode} +\cs_new_protected:Npn \@@_backend_iccbased_init:nnn #1#2#3 { } +% \end{macrocode} +% \end{macro} +% % \begin{macrocode} % % \end{macrocode} @@ -815,11 +829,15 @@ %<*dvisvgm> % \end{macrocode} % -% \begin{macro}{\@@_backend_select_separation:nn, \@@_backend_select_devicen:nn} +% \begin{macro} +% { +% \@@_backend_select_separation:nn, +% \@@_backend_select_devicen:nn +% } % No support at present. % \begin{macrocode} \cs_new_protected:Npn \@@_backend_select_separation:nn #1#2 { } -\cs_new_protected:Npn \@@_backend_select_devicen:nn #1#2 { } +\cs_new_eq:NN \@@_backend_select_devicen:nn \@@_backend_select_separation:nn % \end{macrocode} % \end{macro} % @@ -832,6 +850,30 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\@@_backend_select_iccbased:nn} +% As detailed in \url{https://www.w3.org/TR/css-color-4/#at-profile}, +% we can apply a color profile using CSS. As we have a local file, we use +% a relative URL. +% \begin{macrocode} +\cs_new_protected:Npn \@@_backend_select_iccbased:nn #1#2 + { + \__kernel_backend_literal_svg:x + { + + } + } +% \end{macrocode} +% \end{macro} +% % \begin{macrocode} % % \end{macrocode} @@ -840,7 +882,12 @@ %<*dvipdfmx|luatex|pdftex|xetex> % \end{macrocode} % -% \begin{macro}{\@@_backend_select_separation:nn, \@@_backend_select_devicen:nn} +% \begin{macro} +% { +% \@@_backend_select_separation:nn, +% \@@_backend_select_devicen:nn , +% \@@_backend_select_iccbased:nn +% } % Although \texttt{(x)dvipdfmx} has a built-in approach to color spaces, that % can't be used with the generic color stacks. So we take an approach in which % we share the same code as for \pdfTeX{}. @@ -848,6 +895,7 @@ \cs_new_protected:Npn \@@_backend_select_separation:nn #1#2 { \@@_backend_select:nn { /#1 ~ cs ~ #2 ~ scn } { /#1 ~ CS ~ #2 ~ SCN } } \cs_new_eq:NN \@@_backend_select_devicen:nn \@@_backend_select_separation:nn +\cs_new_eq:NN \@@_backend_select_iccbased:nn \@@_backend_select_separation:nn % \end{macrocode} % \end{macro} % @@ -982,6 +1030,71 @@ % \end{macro} % \end{macro} % +% \begin{macro}{\@@_backend_iccbased_init:nnn} +% Lots of data to save here: we only want to do that once per file, +% so track it by name. +% \begin{macrocode} +\cs_new_protected:Npn \@@_backend_iccbased_init:nnn #1#2#3 + { + \pdf_object_if_exist:nF { @@_icc_ #1 } + { + \pdf_object_new:nn { @@_icc_ #1 } { fstream } + \pdf_object_write:nx { @@_icc_ #1 } + { + { + /N ~ \exp_not:n { #2 } ~ + \tl_if_empty:nF { #3 } { /Range~[ #3 ] } + } + {#1} + } + } + \pdf_object_unnamed_write:nx { array } + { /ICCBased ~ \pdf_object_ref:n { @@_icc_ #1 } } + \cs_if_exist:NT \pdfmanagement_add:nnn + { + \use:x + { + \pdfmanagement_add:nnn { Page / Resources / ColorSpace } + { color \int_use:N \g_@@_model_int } + { ~ \pdf_object_ref_last: } + } + } + } +% \end{macrocode} +% \end{macro} + +% +% \begin{macro}{\@@_backend_iccbased_device:nnn} +% This is very similar to setting up a color space: the only part we +% skip is adding it to the page resources. +% \begin{macrocode} +\cs_new_protected:Npn \@@_backend_iccbased_device:nnn #1#2#3 + { + \pdf_object_if_exist:nF { @@_icc_ #1 } + { + \pdf_object_new:nn { @@_icc_ #1 } { fstream } + \pdf_object_write:nn { @@_icc_ #1 } + { + { /N ~ #3 } + {#1} + } + } + \pdf_object_unnamed_write:nx { array } + { /ICCBased ~ \pdf_object_ref:n { @@_icc_ #1 } } + \cs_if_exist:NT \pdfmanagement_add:nnn + { + \use:x + { + \pdfmanagement_add:nnn + { Page / Resources / ColorSpace } + { Default #2 } + { \pdf_object_ref_last: } + } + } + } +% \end{macrocode} +% \end{macro} +% % \begin{macrocode} % % \end{macrocode} diff --git a/macros/latex/contrib/l3backend/l3backend-draw.dtx b/macros/latex/contrib/l3backend/l3backend-draw.dtx index 884dd0167e..d8e8a19226 100644 --- a/macros/latex/contrib/l3backend/l3backend-draw.dtx +++ b/macros/latex/contrib/l3backend/l3backend-draw.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3backend/l3backend-graphics.dtx b/macros/latex/contrib/l3backend/l3backend-graphics.dtx index 602aa29e00..144b21cf5a 100644 --- a/macros/latex/contrib/l3backend/l3backend-graphics.dtx +++ b/macros/latex/contrib/l3backend/l3backend-graphics.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3backend/l3backend-header.dtx b/macros/latex/contrib/l3backend/l3backend-header.dtx index e465fc701d..7eab8cdf2f 100644 --- a/macros/latex/contrib/l3backend/l3backend-header.dtx +++ b/macros/latex/contrib/l3backend/l3backend-header.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3backend/l3backend-opacity.dtx b/macros/latex/contrib/l3backend/l3backend-opacity.dtx index 9595f5600d..ff9eec5226 100644 --- a/macros/latex/contrib/l3backend/l3backend-opacity.dtx +++ b/macros/latex/contrib/l3backend/l3backend-opacity.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3backend/l3backend-pdf.dtx b/macros/latex/contrib/l3backend/l3backend-pdf.dtx index 694a0c29a4..d9098ccd1f 100644 --- a/macros/latex/contrib/l3backend/l3backend-pdf.dtx +++ b/macros/latex/contrib/l3backend/l3backend-pdf.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/CHANGELOG.md b/macros/latex/contrib/l3kernel/CHANGELOG.md index c1daa97b10..82782d208d 100644 --- a/macros/latex/contrib/l3kernel/CHANGELOG.md +++ b/macros/latex/contrib/l3kernel/CHANGELOG.md @@ -7,6 +7,12 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2021-10-18] + +### Added +- Support for ICC-based color profiles +- `\color_profile_apply:nn` + ## [2021-10-17] ### Changed @@ -965,7 +971,8 @@ this project uses date-based 'snapshot' version identifiers. - Step functions have been added for dim variables, e.g. `\dim_step_inline:nnnn` -[Unreleased]: https://github.com/latex3/latex3/compare/2021-10-17...HEAD +[Unreleased]: https://github.com/latex3/latex3/compare/2021-10-18...HEAD +[2021-10-18]: https://github.com/latex3/latex3/compare/2021-10-17...2021-10-18 [2021-10-17]: https://github.com/latex3/latex3/compare/2021-10-12...2021-10-17 [2021-10-12]: https://github.com/latex3/latex3/compare/2021-08-27...2021-10-12 [2021-08-27]: https://github.com/latex3/latex3/compare/2021-07-12...2021-08-27 diff --git a/macros/latex/contrib/l3kernel/README.md b/macros/latex/contrib/l3kernel/README.md index b01138b891..0ceca4ca19 100644 --- a/macros/latex/contrib/l3kernel/README.md +++ b/macros/latex/contrib/l3kernel/README.md @@ -1,7 +1,7 @@ LaTeX3 Programming Conventions ============================== -Release 2021-10-17 +Release 2021-10-18 Overview -------- diff --git a/macros/latex/contrib/l3kernel/expl3.dtx b/macros/latex/contrib/l3kernel/expl3.dtx index e384d099fd..24246f1ace 100644 --- a/macros/latex/contrib/l3kernel/expl3.dtx +++ b/macros/latex/contrib/l3kernel/expl3.dtx @@ -24,7 +24,7 @@ % %<*driver|generic|package|2ekernel> % -\def\ExplFileDate{2021-10-17}% +\def\ExplFileDate{2021-10-18}% %<*driver> \documentclass[full]{l3doc} \usepackage{graphicx} @@ -51,7 +51,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/expl3.pdf b/macros/latex/contrib/l3kernel/expl3.pdf index e3fba2172a..60e57d4148 100644 Binary files a/macros/latex/contrib/l3kernel/expl3.pdf and b/macros/latex/contrib/l3kernel/expl3.pdf differ diff --git a/macros/latex/contrib/l3kernel/interface3.pdf b/macros/latex/contrib/l3kernel/interface3.pdf index 33280fbe08..19980978f9 100644 Binary files a/macros/latex/contrib/l3kernel/interface3.pdf and b/macros/latex/contrib/l3kernel/interface3.pdf differ diff --git a/macros/latex/contrib/l3kernel/interface3.tex b/macros/latex/contrib/l3kernel/interface3.tex index 744bff1617..b2c52db293 100644 --- a/macros/latex/contrib/l3kernel/interface3.tex +++ b/macros/latex/contrib/l3kernel/interface3.tex @@ -54,7 +54,7 @@ for those people who are interested. {latex-team@latex-project.org}% }% } -\date{Released 2021-10-17} +\date{Released 2021-10-18} \pagenumbering{roman} \maketitle diff --git a/macros/latex/contrib/l3kernel/l3basics.dtx b/macros/latex/contrib/l3kernel/l3basics.dtx index 8524fb42d8..d54bc9a70a 100644 --- a/macros/latex/contrib/l3kernel/l3basics.dtx +++ b/macros/latex/contrib/l3kernel/l3basics.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3bootstrap.dtx b/macros/latex/contrib/l3kernel/l3bootstrap.dtx index e5483c2453..c0c676dd9f 100644 --- a/macros/latex/contrib/l3kernel/l3bootstrap.dtx +++ b/macros/latex/contrib/l3kernel/l3bootstrap.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3box.dtx b/macros/latex/contrib/l3kernel/l3box.dtx index 184b66d0a2..8e000f70f5 100644 --- a/macros/latex/contrib/l3kernel/l3box.dtx +++ b/macros/latex/contrib/l3kernel/l3box.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3candidates.dtx b/macros/latex/contrib/l3kernel/l3candidates.dtx index 2ffdc7328a..e0787f1a0e 100644 --- a/macros/latex/contrib/l3kernel/l3candidates.dtx +++ b/macros/latex/contrib/l3kernel/l3candidates.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3cctab.dtx b/macros/latex/contrib/l3kernel/l3cctab.dtx index a944f5bc75..0d53ada539 100644 --- a/macros/latex/contrib/l3kernel/l3cctab.dtx +++ b/macros/latex/contrib/l3kernel/l3cctab.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3clist.dtx b/macros/latex/contrib/l3kernel/l3clist.dtx index c2318cd43b..8ca665469b 100644 --- a/macros/latex/contrib/l3kernel/l3clist.dtx +++ b/macros/latex/contrib/l3kernel/l3clist.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3coffins.dtx b/macros/latex/contrib/l3kernel/l3coffins.dtx index 0158489919..1a47fa6b73 100644 --- a/macros/latex/contrib/l3kernel/l3coffins.dtx +++ b/macros/latex/contrib/l3kernel/l3coffins.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3color.dtx b/macros/latex/contrib/l3kernel/l3color.dtx index 176594a3f4..cef2e7bef1 100644 --- a/macros/latex/contrib/l3kernel/l3color.dtx +++ b/macros/latex/contrib/l3kernel/l3color.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % @@ -393,6 +393,7 @@ % The latter should be one of % \begin{itemize} % \item \texttt{DeviceN} +% \item \texttt{ICCBased} % \item \texttt{Separation} % \end{itemize} % (The \meta{family} may be given in mixed case as-in the PDF reference: @@ -436,6 +437,28 @@ % a process color name (\texttt{cyan}, etc.) or the special name \texttt{none}. % \end{itemize} % +% For a \texttt{ICCBased} space, there is one \emph{compulsory} key. +% \begin{itemize} +% \item \texttt{file} The name of the file containing the profile. +% \end{itemize} +% +% \subsection{Color profiles} +% +% Color profiles are used to ensure color accuracy by linking to collaboration. +% Applying a profile can be used to standardise color which is otherwise +% device-dependence. +% +% \begin{function}[added = 2021-02-23]{\color_profile_apply:nn} +% \begin{syntax} +% \cs{color_profile_apply:nn} \Arg{profile} \Arg{model} +% \end{syntax} +% This function applies a \meta{profile} to one of the device \meta{models}. +% The profile will then apply to all color of the selected \meta{model}. The +% \meta{profile} should specify an ICC profile file. The \meta{model} has to +% be one the standard device models: \texttt{cmyk}, \texttt{gray} or +% \texttt{rgb}. +% \end{function} +% % \end{documentation} % % \begin{implementation} @@ -1781,11 +1804,10 @@ % A shared auxiliary to do the basics of setting up a new model: reserve a % number, create a fallback and white-equivalent, set up links to the backend. % \begin{macrocode} -\cs_new_protected:Npn \@@_model_init:nnn #1#2#3 +\cs_new_protected:Npn \@@_model_init:nnnnn #1#2#3#4#5 { \int_gincr:N \g_@@_model_int - \tl_const:cx { c_@@_fallback_ #1 _tl } - { 1 \prg_replicate:nn { #2 - 1 } { ~ 1 } } + \tl_const:cn { c_@@_fallback_ #1 _tl } { #4 } \clist_map_inline:nn { fill , stroke , select } { \cs_new_protected:cpx { @@_backend_ ##1 _ #1 :n } ####1 @@ -1797,12 +1819,23 @@ \cs_new_protected:cpx { @@_model_ #1 _white: } { \prop_put:Nnn \exp_not:N \l_@@_named_white_prop {#1} - { 0 \prg_replicate:nn { #2 - 1 } { ~ 0 } } + { \exp_not:n {#5} } \exp_not:N \int_compare:nNnF { \tex_currentgrouplevel:D } = 0 { \group_insert_after:N \exp_not:c { @@_model_ #1 _ white: } } } \use:c { @@_model_ #1 _white: } } +\cs_generate_variant:Nn \@@_model_init:nnnnn { nnnxx } +\cs_new_protected:Npn \@@_model_init:nnn #1#2#3 + { + \@@_model_init:nnnxx { #1 } { #2 } { #3 } + { + 1 \prg_replicate:nn { #2 - 1 } { ~ 1 } + } + { + 0 \prg_replicate:nn { #2 - 1 } { ~ 0 } + } + } % \end{macrocode} % \end{macro} % @@ -2513,6 +2546,118 @@ % \end{macro} % \end{macro} % +% \begin{variable}{\c_@@_icc_colorspace_signatures_prop} +% The signatures in the ICC file header indicating the underlying +% colorspace. We map it to three values: The number of components, +% the values corresponding to white, and the range. +% \begin{macrocode} +\prop_const_from_keyval:Nn \c_@@_icc_colorspace_signatures_prop + { +% Gray + 47524159 = {1} {1} {0} {}, +% RGB + 52474220 = {3} {0~0~0} {1~1~1} {}, +% CMYK + 434D594B = {4} {0~0~0~1} {0~0~0~0} {}, +% Lab + 4C616220 = {3} {0~0~0} {100~0~0} {0~100~-128~127~-128~127} + } +% \end{macrocode} +% \end{variable} +% \begin{macro}{\@@_model_iccbased:n} +% \begin{macro}{\@@_model_iccbased:nn} +% \begin{macro}{\@@_model_iccbased:nnn, \@@_model_iccbased_aux:nnn} +% For an ICC profile, we need a file name and a number of components. The +% file name is processed here so the backend can treat it as a string. +% \begin{macrocode} +\cs_new_protected:Npn \@@_model_iccbased:n #1 + { + \prop_get:NnNTF \l_@@_internal_prop { file } + \l_@@_internal_tl + { + \exp_args:NV \@@_model_iccbased:nn + \l_@@_internal_tl {#1} + } + { + \msg_error:nnn { color } + { ICCBased-requires-file } {#1} + } + } +\cs_new_protected:Npn \@@_model_iccbased:nn #1#2 + { + \exp_args:NNx \prop_get:NnNTF \c_@@_icc_colorspace_signatures_prop + { \file_hex_dump:nnn { #1 } { 17 } { 20 } } \l_@@_internal_tl + { + \exp_last_unbraced:NV \@@_model_iccbased_aux:nnnnnn + \l_@@_internal_tl { #2 } { #1 } + } + { + \msg_error:nnn { color } + { ICCBased-unsupported-colorspace } {#2} + } + } +% \end{macrocode} +% Here, we can use the same internals as for DeviceN approach as we know the +% number of components. No conversion is possible, so there is no need +% to worry about that at all. +% \begin{macrocode} +\cs_new_protected:Npn \@@_model_iccbased_aux:nnnnnn #1#2#3#4#5#6 + { + \@@_model_init:nnnnn {#5} {#1} { iccbased } {#2} {#3} + \use:c { @@_model_devicen_parse_ #1 :nn } {#5} {#1} + \exp_args:Nx \@@_backend_iccbased_init:nnn + { \file_full_name:n {#6} } {#1} {#4} + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \subsection{Applying profiles} +% +% \begin{macro}{\color_profile_apply:nn, \@@_profile_apply:nn} +% \begin{macro} +% { +% \@@_profile_apply_gray:n , +% \@@_profile_apply_rgb:n , +% \@@_profile_apply_cmyk:n +% } +% With a limited range of outcomes, this is largely about getting data to the +% backend. +% \begin{macrocode} +\cs_new_protected:Npn \color_profile_apply:nn #1#2 + { + \exp_args:Ne \@@_profile_apply:nn + { \file_full_name:n {#1} } {#2} + } +\cs_new_protected:Npn \@@_profile_apply:nn #1#2 + { + \cs_if_exist_use:cF { @@_profile_apply_ \tl_to_str:n {#2} :n } + { + \msg_error:nnn { color } { ICC-Device-unknown } {#2} + \use_none:n + } + {#1} + } +\cs_new_protected:Npn \@@_profile_apply_gray:n #1 + { + \int_gincr:N \g_@@_model_int + \@@_backend_iccbased_device:nnn {#1} { Gray } { 1 } + } +\cs_new_protected:Npn \@@_profile_apply_rgb:n #1 + { + \int_gincr:N \g_@@_model_int + \@@_backend_iccbased_device:nnn {#1} { RGB } { 3 } + } +\cs_new_protected:Npn \@@_profile_apply_cmyk:n #1 + { + \int_gincr:N \g_@@_model_int + \@@_backend_iccbased_device:nnn {#1} { CMYK } { 4 } + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% % \subsection{Diagnostics} % % \begin{macro}{\color_show:n, \color_log:n, \@@_show:Nn} @@ -2589,6 +2734,29 @@ \\ \\ key~was~given~with~the~correct~information. } +\msg_new:nnnn { color } { ICC-Device-unknown } + { Unknown~device~color~space~'#1'. } + { + LaTeX~has~been~asked~to~apply~an~ICC~profile~but~the~device~color~space~ + '#1'~is~unknown. + } +\msg_new:nnnn { color } { ICCBased-unsupported-colorspace } + { ICCBased~color~space~'#1'~uses~an~unsupported~data~color~space. } + { + LaTeX~has~been~asked~to~create~a~ICCBased~colorspace,~but~the~ + used~data~colorspace~is~not~supported.~ICC~profiles~used~for~ + defining~a~ICCBased~colorspace~should~use~a~Lab,~RGB,~or~ + CMYK~data~colorspace.~LaTeX~will~ignore~this~request. + } +\msg_new:nnnn { color } { ICCBased-requires-file } + { ICCBased~color~space~'#1'~require~an~file. } + { + LaTeX~has~been~asked~to~create~an~ICCBased~color~space,~but~no~\\ \\ + \iow_indent:n { file~=~ } + \\ \\ + key~was~given~with~the~correct~information.~LaTeX~will~ignore~this~ + request. + } \msg_new:nnnn { color } { model-already-defined } { Color~model~'#1'~already~defined. } { diff --git a/macros/latex/contrib/l3kernel/l3debug.dtx b/macros/latex/contrib/l3kernel/l3debug.dtx index 62f2cbf0bd..cbc2ba0dd3 100644 --- a/macros/latex/contrib/l3kernel/l3debug.dtx +++ b/macros/latex/contrib/l3kernel/l3debug.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3deprecation.dtx b/macros/latex/contrib/l3kernel/l3deprecation.dtx index 153c6a49f5..118446f74d 100644 --- a/macros/latex/contrib/l3kernel/l3deprecation.dtx +++ b/macros/latex/contrib/l3kernel/l3deprecation.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3doc.dtx b/macros/latex/contrib/l3kernel/l3doc.dtx index 63abe16eec..f8ddfd6744 100644 --- a/macros/latex/contrib/l3kernel/l3doc.dtx +++ b/macros/latex/contrib/l3kernel/l3doc.dtx @@ -79,7 +79,7 @@ and all files in that bundle must be distributed together. % % \title{The \cls{l3doc} class} % \author{\Team} -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % \maketitle % \tableofcontents % diff --git a/macros/latex/contrib/l3kernel/l3docstrip.dtx b/macros/latex/contrib/l3kernel/l3docstrip.dtx index a060d8d0b7..77b11bec37 100644 --- a/macros/latex/contrib/l3kernel/l3docstrip.dtx +++ b/macros/latex/contrib/l3kernel/l3docstrip.dtx @@ -63,7 +63,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3docstrip.pdf b/macros/latex/contrib/l3kernel/l3docstrip.pdf index a781bd8309..62968c5aa0 100644 Binary files a/macros/latex/contrib/l3kernel/l3docstrip.pdf and b/macros/latex/contrib/l3kernel/l3docstrip.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3expan.dtx b/macros/latex/contrib/l3kernel/l3expan.dtx index baaa1bbda9..de04809b76 100644 --- a/macros/latex/contrib/l3kernel/l3expan.dtx +++ b/macros/latex/contrib/l3kernel/l3expan.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3file.dtx b/macros/latex/contrib/l3kernel/l3file.dtx index feeba1ef66..e2c608cdfc 100644 --- a/macros/latex/contrib/l3kernel/l3file.dtx +++ b/macros/latex/contrib/l3kernel/l3file.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3flag.dtx b/macros/latex/contrib/l3kernel/l3flag.dtx index 39356163de..7a6712d474 100644 --- a/macros/latex/contrib/l3kernel/l3flag.dtx +++ b/macros/latex/contrib/l3kernel/l3flag.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-assign.dtx b/macros/latex/contrib/l3kernel/l3fp-assign.dtx index 6af194c41a..357481da6b 100644 --- a/macros/latex/contrib/l3kernel/l3fp-assign.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-assign.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % \maketitle % % \begin{documentation} diff --git a/macros/latex/contrib/l3kernel/l3fp-aux.dtx b/macros/latex/contrib/l3kernel/l3fp-aux.dtx index 718b3ee215..e735876dd4 100644 --- a/macros/latex/contrib/l3kernel/l3fp-aux.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-aux.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-basics.dtx b/macros/latex/contrib/l3kernel/l3fp-basics.dtx index 18fee3dd5f..bb869cd5ca 100644 --- a/macros/latex/contrib/l3kernel/l3fp-basics.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-basics.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-convert.dtx b/macros/latex/contrib/l3kernel/l3fp-convert.dtx index ce52e6c060..b113e024f7 100644 --- a/macros/latex/contrib/l3kernel/l3fp-convert.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-convert.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-expo.dtx b/macros/latex/contrib/l3kernel/l3fp-expo.dtx index 0a8441f4e9..f5f58acbe6 100644 --- a/macros/latex/contrib/l3kernel/l3fp-expo.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-expo.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-extended.dtx b/macros/latex/contrib/l3kernel/l3fp-extended.dtx index 2f6e282d2f..820faac536 100644 --- a/macros/latex/contrib/l3kernel/l3fp-extended.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-extended.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-logic.dtx b/macros/latex/contrib/l3kernel/l3fp-logic.dtx index 761d00256c..254983bcad 100644 --- a/macros/latex/contrib/l3kernel/l3fp-logic.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-logic.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-parse.dtx b/macros/latex/contrib/l3kernel/l3fp-parse.dtx index d5f13d7163..c07bbc130f 100644 --- a/macros/latex/contrib/l3kernel/l3fp-parse.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-parse.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-random.dtx b/macros/latex/contrib/l3kernel/l3fp-random.dtx index 2b29950c06..8defd82e8a 100644 --- a/macros/latex/contrib/l3kernel/l3fp-random.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-random.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-round.dtx b/macros/latex/contrib/l3kernel/l3fp-round.dtx index b8ef268c83..4669afeff6 100644 --- a/macros/latex/contrib/l3kernel/l3fp-round.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-round.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-traps.dtx b/macros/latex/contrib/l3kernel/l3fp-traps.dtx index d0cb6be72d..d12dfb5e9f 100644 --- a/macros/latex/contrib/l3kernel/l3fp-traps.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-traps.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % \maketitle % % \begin{documentation} diff --git a/macros/latex/contrib/l3kernel/l3fp-trig.dtx b/macros/latex/contrib/l3kernel/l3fp-trig.dtx index 1885f3c7dc..e7147443b1 100644 --- a/macros/latex/contrib/l3kernel/l3fp-trig.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-trig.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp.dtx b/macros/latex/contrib/l3kernel/l3fp.dtx index 0794e00917..eef38c230f 100644 --- a/macros/latex/contrib/l3kernel/l3fp.dtx +++ b/macros/latex/contrib/l3kernel/l3fp.dtx @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fparray.dtx b/macros/latex/contrib/l3kernel/l3fparray.dtx index 4c2b90c107..9646b84a94 100644 --- a/macros/latex/contrib/l3kernel/l3fparray.dtx +++ b/macros/latex/contrib/l3kernel/l3fparray.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3int.dtx b/macros/latex/contrib/l3kernel/l3int.dtx index c968a01d70..1e5ded3b6b 100644 --- a/macros/latex/contrib/l3kernel/l3int.dtx +++ b/macros/latex/contrib/l3kernel/l3int.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3intarray.dtx b/macros/latex/contrib/l3kernel/l3intarray.dtx index 7140a0f6f4..13ba3a394c 100644 --- a/macros/latex/contrib/l3kernel/l3intarray.dtx +++ b/macros/latex/contrib/l3kernel/l3intarray.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3kernel-functions.dtx b/macros/latex/contrib/l3kernel/l3kernel-functions.dtx index 3a6ea30815..bdc195d0a1 100644 --- a/macros/latex/contrib/l3kernel/l3kernel-functions.dtx +++ b/macros/latex/contrib/l3kernel/l3kernel-functions.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3keys.dtx b/macros/latex/contrib/l3kernel/l3keys.dtx index 10286cfc3a..e85bbc1d97 100644 --- a/macros/latex/contrib/l3kernel/l3keys.dtx +++ b/macros/latex/contrib/l3kernel/l3keys.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3legacy.dtx b/macros/latex/contrib/l3kernel/l3legacy.dtx index 250ae7c6a1..29872a655f 100644 --- a/macros/latex/contrib/l3kernel/l3legacy.dtx +++ b/macros/latex/contrib/l3kernel/l3legacy.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3luatex.dtx b/macros/latex/contrib/l3kernel/l3luatex.dtx index e46ead0aa4..f95ddecc82 100644 --- a/macros/latex/contrib/l3kernel/l3luatex.dtx +++ b/macros/latex/contrib/l3kernel/l3luatex.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3msg.dtx b/macros/latex/contrib/l3kernel/l3msg.dtx index 1a9cdcbd1b..722f902e29 100644 --- a/macros/latex/contrib/l3kernel/l3msg.dtx +++ b/macros/latex/contrib/l3kernel/l3msg.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3names.dtx b/macros/latex/contrib/l3kernel/l3names.dtx index cbaf5c9d21..9a34a74d24 100644 --- a/macros/latex/contrib/l3kernel/l3names.dtx +++ b/macros/latex/contrib/l3kernel/l3names.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3news.pdf b/macros/latex/contrib/l3kernel/l3news.pdf index 0e3b8ce95a..aea97df6cd 100644 Binary files a/macros/latex/contrib/l3kernel/l3news.pdf and b/macros/latex/contrib/l3kernel/l3news.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news01.pdf b/macros/latex/contrib/l3kernel/l3news01.pdf index df1a631206..8ca02b765d 100644 Binary files a/macros/latex/contrib/l3kernel/l3news01.pdf and b/macros/latex/contrib/l3kernel/l3news01.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news02.pdf b/macros/latex/contrib/l3kernel/l3news02.pdf index ae9aaf3648..d4f88d8113 100644 Binary files a/macros/latex/contrib/l3kernel/l3news02.pdf and b/macros/latex/contrib/l3kernel/l3news02.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news03.pdf b/macros/latex/contrib/l3kernel/l3news03.pdf index b2f7fac3a4..6ff2937537 100644 Binary files a/macros/latex/contrib/l3kernel/l3news03.pdf and b/macros/latex/contrib/l3kernel/l3news03.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news04.pdf b/macros/latex/contrib/l3kernel/l3news04.pdf index 4f2fb0700f..42b13884be 100644 Binary files a/macros/latex/contrib/l3kernel/l3news04.pdf and b/macros/latex/contrib/l3kernel/l3news04.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news05.pdf b/macros/latex/contrib/l3kernel/l3news05.pdf index ab7e927f54..87426871bc 100644 Binary files a/macros/latex/contrib/l3kernel/l3news05.pdf and b/macros/latex/contrib/l3kernel/l3news05.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news06.pdf b/macros/latex/contrib/l3kernel/l3news06.pdf index ba4b4b4b8e..825152e720 100644 Binary files a/macros/latex/contrib/l3kernel/l3news06.pdf and b/macros/latex/contrib/l3kernel/l3news06.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news07.pdf b/macros/latex/contrib/l3kernel/l3news07.pdf index 531db7a98b..3309098d71 100644 Binary files a/macros/latex/contrib/l3kernel/l3news07.pdf and b/macros/latex/contrib/l3kernel/l3news07.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news08.pdf b/macros/latex/contrib/l3kernel/l3news08.pdf index 63b6e10e66..beed982815 100644 Binary files a/macros/latex/contrib/l3kernel/l3news08.pdf and b/macros/latex/contrib/l3kernel/l3news08.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news09.pdf b/macros/latex/contrib/l3kernel/l3news09.pdf index 2f348a9820..4e7870ec4e 100644 Binary files a/macros/latex/contrib/l3kernel/l3news09.pdf and b/macros/latex/contrib/l3kernel/l3news09.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news10.pdf b/macros/latex/contrib/l3kernel/l3news10.pdf index 647fd6c467..6c12559b81 100644 Binary files a/macros/latex/contrib/l3kernel/l3news10.pdf and b/macros/latex/contrib/l3kernel/l3news10.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news11.pdf b/macros/latex/contrib/l3kernel/l3news11.pdf index 1c22d8c1ea..36b254b236 100644 Binary files a/macros/latex/contrib/l3kernel/l3news11.pdf and b/macros/latex/contrib/l3kernel/l3news11.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news12.pdf b/macros/latex/contrib/l3kernel/l3news12.pdf index 8be2eece47..b199276937 100644 Binary files a/macros/latex/contrib/l3kernel/l3news12.pdf and b/macros/latex/contrib/l3kernel/l3news12.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3pdf.dtx b/macros/latex/contrib/l3kernel/l3pdf.dtx index b7986a2921..0ccb6817f1 100644 --- a/macros/latex/contrib/l3kernel/l3pdf.dtx +++ b/macros/latex/contrib/l3kernel/l3pdf.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3prefixes.pdf b/macros/latex/contrib/l3kernel/l3prefixes.pdf index c9b1e2b092..cdaa3fe63b 100644 Binary files a/macros/latex/contrib/l3kernel/l3prefixes.pdf and b/macros/latex/contrib/l3kernel/l3prefixes.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3prg.dtx b/macros/latex/contrib/l3kernel/l3prg.dtx index b233a0bad8..ae119af206 100644 --- a/macros/latex/contrib/l3kernel/l3prg.dtx +++ b/macros/latex/contrib/l3kernel/l3prg.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3prop.dtx b/macros/latex/contrib/l3kernel/l3prop.dtx index a4120843ea..df20a5c02c 100644 --- a/macros/latex/contrib/l3kernel/l3prop.dtx +++ b/macros/latex/contrib/l3kernel/l3prop.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3quark.dtx b/macros/latex/contrib/l3kernel/l3quark.dtx index aecc92b0b0..a2d1080356 100644 --- a/macros/latex/contrib/l3kernel/l3quark.dtx +++ b/macros/latex/contrib/l3kernel/l3quark.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3regex.dtx b/macros/latex/contrib/l3kernel/l3regex.dtx index 604ccf5dce..db1ddee245 100644 --- a/macros/latex/contrib/l3kernel/l3regex.dtx +++ b/macros/latex/contrib/l3kernel/l3regex.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3seq.dtx b/macros/latex/contrib/l3kernel/l3seq.dtx index 225ec19484..5585aa3ddb 100644 --- a/macros/latex/contrib/l3kernel/l3seq.dtx +++ b/macros/latex/contrib/l3kernel/l3seq.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3skip.dtx b/macros/latex/contrib/l3kernel/l3skip.dtx index 173aa92817..1556f14ed8 100644 --- a/macros/latex/contrib/l3kernel/l3skip.dtx +++ b/macros/latex/contrib/l3kernel/l3skip.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3sort.dtx b/macros/latex/contrib/l3kernel/l3sort.dtx index 70c9d172f8..8261afa088 100644 --- a/macros/latex/contrib/l3kernel/l3sort.dtx +++ b/macros/latex/contrib/l3kernel/l3sort.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3str-convert.dtx b/macros/latex/contrib/l3kernel/l3str-convert.dtx index 81259af3c1..72c260cdc0 100644 --- a/macros/latex/contrib/l3kernel/l3str-convert.dtx +++ b/macros/latex/contrib/l3kernel/l3str-convert.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3str.dtx b/macros/latex/contrib/l3kernel/l3str.dtx index bf52b667ab..e84e2162a2 100644 --- a/macros/latex/contrib/l3kernel/l3str.dtx +++ b/macros/latex/contrib/l3kernel/l3str.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3styleguide.pdf b/macros/latex/contrib/l3kernel/l3styleguide.pdf index e5a8429dfc..4589d6a2d2 100644 Binary files a/macros/latex/contrib/l3kernel/l3styleguide.pdf and b/macros/latex/contrib/l3kernel/l3styleguide.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3styleguide.tex b/macros/latex/contrib/l3kernel/l3styleguide.tex index e8f09964eb..3b3ec1b3bf 100644 --- a/macros/latex/contrib/l3kernel/l3styleguide.tex +++ b/macros/latex/contrib/l3kernel/l3styleguide.tex @@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN. {latex-team@latex-project.org}% }% } -\date{Released 2021-10-17} +\date{Released 2021-10-18} \begin{document} diff --git a/macros/latex/contrib/l3kernel/l3syntax-changes.pdf b/macros/latex/contrib/l3kernel/l3syntax-changes.pdf index 711e08a627..55d08cee70 100644 Binary files a/macros/latex/contrib/l3kernel/l3syntax-changes.pdf and b/macros/latex/contrib/l3kernel/l3syntax-changes.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3syntax-changes.tex b/macros/latex/contrib/l3kernel/l3syntax-changes.tex index 858f0b85fb..882304511f 100644 --- a/macros/latex/contrib/l3kernel/l3syntax-changes.tex +++ b/macros/latex/contrib/l3kernel/l3syntax-changes.tex @@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN. {latex-team@latex-project.org}% }% } -\date{Released 2021-10-17} +\date{Released 2021-10-18} \newcommand{\TF}{\textit{(TF)}} diff --git a/macros/latex/contrib/l3kernel/l3sys.dtx b/macros/latex/contrib/l3kernel/l3sys.dtx index 0ff14bb00b..6aab0ca25f 100644 --- a/macros/latex/contrib/l3kernel/l3sys.dtx +++ b/macros/latex/contrib/l3kernel/l3sys.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3term-glossary.pdf b/macros/latex/contrib/l3kernel/l3term-glossary.pdf index 83fd993eec..51c0c6d52c 100644 Binary files a/macros/latex/contrib/l3kernel/l3term-glossary.pdf and b/macros/latex/contrib/l3kernel/l3term-glossary.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3term-glossary.tex b/macros/latex/contrib/l3kernel/l3term-glossary.tex index c160f2278b..8e289903b6 100644 --- a/macros/latex/contrib/l3kernel/l3term-glossary.tex +++ b/macros/latex/contrib/l3kernel/l3term-glossary.tex @@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN. {latex-team@latex-project.org}% }% } -\date{Released 2021-10-17} +\date{Released 2021-10-18} \newcommand{\TF}{\textit{(TF)}} diff --git a/macros/latex/contrib/l3kernel/l3text-case.dtx b/macros/latex/contrib/l3kernel/l3text-case.dtx index 57e04bf46e..4647339a81 100644 --- a/macros/latex/contrib/l3kernel/l3text-case.dtx +++ b/macros/latex/contrib/l3kernel/l3text-case.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3text-purify.dtx b/macros/latex/contrib/l3kernel/l3text-purify.dtx index 872df5e27b..5655cc757c 100644 --- a/macros/latex/contrib/l3kernel/l3text-purify.dtx +++ b/macros/latex/contrib/l3kernel/l3text-purify.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3text.dtx b/macros/latex/contrib/l3kernel/l3text.dtx index c73bc13aae..defd0585f4 100644 --- a/macros/latex/contrib/l3kernel/l3text.dtx +++ b/macros/latex/contrib/l3kernel/l3text.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3tl-analysis.dtx b/macros/latex/contrib/l3kernel/l3tl-analysis.dtx index 3720abd7b7..84d740e6df 100644 --- a/macros/latex/contrib/l3kernel/l3tl-analysis.dtx +++ b/macros/latex/contrib/l3kernel/l3tl-analysis.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3tl.dtx b/macros/latex/contrib/l3kernel/l3tl.dtx index e19200a2ae..13625c2542 100644 --- a/macros/latex/contrib/l3kernel/l3tl.dtx +++ b/macros/latex/contrib/l3kernel/l3tl.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3token.dtx b/macros/latex/contrib/l3kernel/l3token.dtx index cbabb88bf5..33960f4ec0 100644 --- a/macros/latex/contrib/l3kernel/l3token.dtx +++ b/macros/latex/contrib/l3kernel/l3token.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3unicode.dtx b/macros/latex/contrib/l3kernel/l3unicode.dtx index f5effcd049..38f142f04f 100644 --- a/macros/latex/contrib/l3kernel/l3unicode.dtx +++ b/macros/latex/contrib/l3kernel/l3unicode.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-10-17} +% \date{Released 2021-10-18} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/source3.pdf b/macros/latex/contrib/l3kernel/source3.pdf index 58d11eb65e..9884bf29d1 100644 Binary files a/macros/latex/contrib/l3kernel/source3.pdf and b/macros/latex/contrib/l3kernel/source3.pdf differ diff --git a/macros/latex/contrib/l3kernel/source3.tex b/macros/latex/contrib/l3kernel/source3.tex index b50a8d7b31..7910459271 100644 --- a/macros/latex/contrib/l3kernel/source3.tex +++ b/macros/latex/contrib/l3kernel/source3.tex @@ -53,7 +53,7 @@ for those people who are interested. {latex-team@latex-project.org}% }% } -\date{Released 2021-10-17} +\date{Released 2021-10-18} \pagenumbering{roman} \maketitle diff --git a/macros/latex/contrib/media9/ChangeLog b/macros/latex/contrib/media9/ChangeLog index 50af543880..075328178d 100644 --- a/macros/latex/contrib/media9/ChangeLog +++ b/macros/latex/contrib/media9/ChangeLog @@ -1,3 +1,8 @@ +2021-10-18 + * v1.23 : media9.sty + * new : SHOWTRANSPARENT and SECTIONCAPPING entries for 3D cross sections + (in the 3D views file) + 2021-09-12 * v1.22 : media9.sty * v0.53 : pdfbase.sty diff --git a/macros/latex/contrib/media9/doc/media9.pdf b/macros/latex/contrib/media9/doc/media9.pdf index cf0ef43243..79ef9c35a2 100644 Binary files a/macros/latex/contrib/media9/doc/media9.pdf and b/macros/latex/contrib/media9/doc/media9.pdf differ diff --git a/macros/latex/contrib/media9/doc/media9.tex b/macros/latex/contrib/media9/doc/media9.tex index a7942ef584..d7acd9d0e3 100644 --- a/macros/latex/contrib/media9/doc/media9.tex +++ b/macros/latex/contrib/media9/doc/media9.tex @@ -391,6 +391,8 @@ The file \verb++ is structured into view sections, one for every vie PLANECOLOR= INTERSECTIONVISIBLE=true | false INTERSECTIONCOLOR= + SHOWTRANSPARENT=true | false + SECTIONCAPPING=true | false END PARTSATTRS=keep PART= @@ -416,7 +418,7 @@ A view section starts with the keyword \verb+VIEW+, optionally followed by a nam Part sub-sections are opened by \verb+PART=+ and closed by \verb+END+. There may be as many part subsections as there are parts in a 3D scene. Table~\ref{tab:parts} lists the possible entries in a \verb+PART+ sub-section. All entries are optional. However, a \verb+UTF16NAME+ entry is recommended, as the part name may contain non-ASCII characters. The value of the \verb+UTF16NAME+ key is the part name as a hex-encoded Unicode string. If \verb+UTF16NAME+ is not used, the part name in the 3D file must be entirely composed of ASCII characters. In that case, \verb++ is mandatory and must match the part name as indicated in the \Acrobatmenu{ShowHideModelTree}{3D Model Tree} of the 3D object (accessible via right-click onto the model in the Reader). The part can be scaled and repositioned by means of a \verb+TRANSFORM+ entry which takes a 12-element transformation matrix as its value. Remaining entries in a part sub-section control the visual appearance of the part. -A view section may contain at most one \verb+CROSSSECT+ sub-section. It inserts a cutting plane at a definite position and orientation in the 3D space, controlled by optional \verb+CENTER+ and \verb+NORMAL+ entries. The appearance characteristics of the cutting plane and the intersection of the plane with the 3D geometry are controlled by optional \verb+OPACITY+, \verb+VISIBLE+, \verb+PLANECOLOR+, \verb+INTERSECTIONVISIBLE+, \verb+INTERSECTIONCOLOR+ entries. See Table~\ref{tab:crosss} for explanation. +A view section may contain at most one \verb+CROSSSECT+ sub-section. It inserts a cutting plane at a definite position and orientation in the 3D space, controlled by optional \verb+CENTER+ and \verb+NORMAL+ entries. The appearance characteristics of the cutting plane and the intersection of the plane with the 3D geometry are controlled by optional \verb+OPACITY+, \verb+VISIBLE+, \verb+PLANECOLOR+, \verb+INTERSECTIONVISIBLE+, \verb+INTERSECTIONCOLOR+,\\\verb+SHOWTRANSPARENT+, \verb+SECTIONCAPPING+ entries. See Table~\ref{tab:crosss} for explanation. The views file can be commented. As usual, comments start with the percent sign. @@ -500,6 +502,8 @@ Things like animation, lighting, background of 3D objects etc. may also be scrip {\tt PLANECOLOR} & three numbers & given as {\tt }, specify the colour (RGB) of the cutting plane\\ {\tt INTERSECTIONVISIBLE} & boolean & a flag (`{\tt true}' or `{\tt false}') indicating the visibility of the intersection of the cutting plane with any 3D geometry\\ {\tt INTERSECTIONCOLOR} & three numbers & given as {\tt }, specify the colour (RGB) for the cutting plane's intersection with the 3D geometry\\ + {\tt SHOWTRANSPARENT} & boolean & a flag (`{\tt true}' or `{\tt false}') indicating that the portion of a model on the cut side of a section plane shall be viewed using a transparent render mode\\ + {\tt SECTIONCAPPING} & boolean & a flag (`{\tt true}' or `{\tt false}') indicating whether the section plane shall be closed and rendered as if cutting through a solid object\\ \hline \end{tabular} \end{table} diff --git a/macros/latex/contrib/media9/media9.sty b/macros/latex/contrib/media9/media9.sty index 07bb391c01..a40d6fbe52 100644 --- a/macros/latex/contrib/media9/media9.sty +++ b/macros/latex/contrib/media9/media9.sty @@ -41,8 +41,8 @@ \RequirePackage{l3keys2e} -\def\g@mix@date@tl{2021/09/12} -\def\g@mix@version@tl{1.22} +\def\g@mix@date@tl{2021/10/18} +\def\g@mix@version@tl{1.23} \NeedsTeXFormat{LaTeX2e}[2020-10-01] \ProvidesExplPackage{media9}{\g@mix@date@tl}{\g@mix@version@tl} @@ -1905,6 +1905,26 @@ }, INTERSECTIONCOLOR .value_required:n = {true}, + SHOWTRANSPARENT .choices:nn = {true,false}{ + \int_compare:nF{\l_mix_level_tl=2}{ + \msg_error:nnxxxx{media9}{key~not~allowed} + {\g_mix_vfile_tl}{\int_use:N\l_mix_lineno_int}{SHOWTRANSPARENT} + {CROSSSECT} + } + \tl_set:Nx\l_mix_csst_tl{/ST~\l_keys_choice_tl} + }, + SHOWTRANSPARENT .default:n = {true}, + + SECTIONCAPPING .choices:nn = {true,false}{ + \int_compare:nF{\l_mix_level_tl=2}{ + \msg_error:nnxxxx{media9}{key~not~allowed} + {\g_mix_vfile_tl}{\int_use:N\l_mix_lineno_int}{SECTIONCAPPING} + {CROSSSECT} + } + \tl_set:Nx\l_mix_cssc_tl{/SC~\l_keys_choice_tl} + }, + SECTIONCAPPING .default:n = {true}, + TRANSFORM .code:n = { \int_compare:nF{\l_mix_level_tl=\c_one_int}{ \msg_error:nnxxxx{media9}{key~not~allowed} @@ -1937,6 +1957,8 @@ \tl_clear:N\l_mix_cspc_tl %plane colour \tl_clear:N\l_mix_csic_tl %intersection colour \tl_clear:N\l_mix_csiv_tl %intersection visibility + \tl_clear:N\l_mix_csst_tl %cut side shown transparent + \tl_clear:N\l_mix_cssc_tl %section capping }, CROSSSECT .value_forbidden:n = {true}, @@ -2018,7 +2040,7 @@ /C~[\l_mix_cscentre_tl] /O~[\l_mix_csorient_tl] \l_mix_csop_tl\l_mix_cspv_tl\l_mix_cspc_tl - \l_mix_csic_tl\l_mix_csiv_tl + \l_mix_csic_tl\l_mix_csiv_tl\l_mix_csst_tl\l_mix_cssc_tl } \tl_put_right:Nx\l_mix_saarray_tl{~\mix_pdflastobj:} \tl_set:Nn\l_mix_cscount_tl{\c_one_int} @@ -2409,8 +2431,8 @@ \RequirePackage{l3keys2e} -\def\g@mix@date@tl{2021/09/12} -\def\g@mix@version@tl{1.22} +\def\g@mix@date@tl{2021/10/18} +\def\g@mix@version@tl{1.23} \NeedsTeXFormat{LaTeX2e}[2020-10-01] \ProvidesExplPackage{media9}{\g@mix@date@tl}{\g@mix@version@tl} @@ -4335,6 +4357,26 @@ }, INTERSECTIONCOLOR .value_required:n = {true}, + SHOWTRANSPARENT .choices:nn = {true,false}{ + \int_compare:nF{\l_mix_level_tl=2}{ + \msg_error:nnxxxx{media9}{key~not~allowed} + {\g_mix_vfile_tl}{\int_use:N\l_mix_lineno_int}{SHOWTRANSPARENT} + {CROSSSECT} + } + \tl_set:Nx\l_mix_csst_tl{/ST~\l_keys_choice_tl} + }, + SHOWTRANSPARENT .default:n = {true}, + + SECTIONCAPPING .choices:nn = {true,false}{ + \int_compare:nF{\l_mix_level_tl=2}{ + \msg_error:nnxxxx{media9}{key~not~allowed} + {\g_mix_vfile_tl}{\int_use:N\l_mix_lineno_int}{SECTIONCAPPING} + {CROSSSECT} + } + \tl_set:Nx\l_mix_cssc_tl{/SC~\l_keys_choice_tl} + }, + SECTIONCAPPING .default:n = {true}, + TRANSFORM .code:n = { \int_compare:nF{\l_mix_level_tl=\c_one_int}{ \msg_error:nnxxxx{media9}{key~not~allowed} @@ -4367,6 +4409,8 @@ \tl_clear:N\l_mix_cspc_tl %plane colour \tl_clear:N\l_mix_csic_tl %intersection colour \tl_clear:N\l_mix_csiv_tl %intersection visibility + \tl_clear:N\l_mix_csst_tl %cut side shown transparent + \tl_clear:N\l_mix_cssc_tl %section capping }, CROSSSECT .value_forbidden:n = {true}, @@ -4448,7 +4492,7 @@ /C~[\l_mix_cscentre_tl] /O~[\l_mix_csorient_tl] \l_mix_csop_tl\l_mix_cspv_tl\l_mix_cspc_tl - \l_mix_csic_tl\l_mix_csiv_tl + \l_mix_csic_tl\l_mix_csiv_tl\l_mix_csst_tl\l_mix_cssc_tl } \tl_put_right:Nx\l_mix_saarray_tl{~\mix_pdflastobj:} \tl_set:Nn\l_mix_cscount_tl{\c_one_int} diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.pdf b/macros/latex/contrib/nicematrix/nicematrix-french.pdf index fae69c03b0..e95df7bfc3 100644 Binary files a/macros/latex/contrib/nicematrix/nicematrix-french.pdf and b/macros/latex/contrib/nicematrix/nicematrix-french.pdf differ diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.tex b/macros/latex/contrib/nicematrix/nicematrix-french.tex index 28723ff94b..86c4f74da8 100644 --- a/macros/latex/contrib/nicematrix/nicematrix-french.tex +++ b/macros/latex/contrib/nicematrix/nicematrix-french.tex @@ -1,4 +1,4 @@ -% -*- coding: utf-8 ; -*- +% -*- coding: utf-8 ; -*- \documentclass[dvipsnames]{article}% dvipsnames is for xcolor (loaded by Tikz, loaded by nicematrix) \usepackage{xltxtra} \usepackage[french]{babel} @@ -31,23 +31,24 @@ \def\LetterAt{@} -\def\interitem{\vspace{7mm plus 2 mm minus 3mm}} +\def\interitem{\vspace{7mm plus 2 mm minus 3mm}} \def\emphase{\bgroup\color{RoyalPurple}\let\next=} \usepackage{footnote} \usepackage{booktabs} \usepackage{varwidth} +\usepackage[auto-lang=false]{lipsum} \usepackage[hyperfootnotes = false]{hyperref} \hypersetup { - pdfinfo = + pdfinfo = { Title = L’extension nicematrix , Subject = Une extension LaTeX , - Author = F. Pantigny + Author = F. Pantigny } - } + } \NewDocumentEnvironment {scope} {} {} {} @@ -64,7 +65,7 @@ \title{L'extension \pkg{nicematrix} \thanks{Ce document correspond à la version~\myfileversion\space de \pkg{nicematrix}, - en date du~\myfiledate.}} + en date du~\myfiledate.}} \author{F. Pantigny \\ \texttt{fpantigny@wanadoo.fr}} @@ -88,14 +89,14 @@ $\begin{bNiceArray}{cccc}[first-row,first-col, L_1 & a_{11} & a_{12} & \Cdots & a_{1n} \\ L_2 & a_{21} & a_{22} & \Cdots & a_{2n} \\ \Vdots & \Vdots & \Vdots & \Ddots & \Vdots \\ -L_n & a_{n1} & a_{n2} & \Cdots & a_{nn} +L_n & a_{n1} & a_{n2} & \Cdots & a_{nn} \end{bNiceArray}$ \hspace{2cm} \begin{NiceTabular}[c]{lSSSS}% [code-before = \rowcolor{red!15}{1-2} \rowcolors{3}{blue!15}{}] \toprule \Block{2-1}{Produit} & \multicolumn{3}{c}{dimensions (cm)} & \Block{2-1}{\rotate Prix} \\ -\cmidrule(rl){2-4} +\cmidrule(rl){2-4} & L & l & h \\ \midrule petit & 3 & 5.5 & 1 & 30 \\ @@ -114,7 +115,7 @@ L'extension \pkg{nicematrix} est entièrement contenue dans le fichier |nicematr dans le répertoire courant ou dans une arborescence |texmf|. Le mieux reste néanmoins d'installer \pkg{nicematrix} avec une distribution TeX comme MiKTeX, TeXlive ou MacTeX. -\bigskip +\medskip \emph{Remarque} : Si vous utilisez un service LaTeX via Internet (ex. : Overleaf) vous pouvez télécharger le fichier |nicematrix.sty| dans le dossier de votre projet pour bénéficier de la dernière version de @@ -122,21 +123,25 @@ votre projet pour bénéficier de la dernière version de être téléchargée sur le serveur \textsc{svn} de TeXLive : \newline \small \url{https:www.tug.org/svn/texlive/trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty}} -\bigskip +\medskip Cette extension peut être utilisée avec |xelatex|, |lualatex| et |pdflatex| mais aussi avec le cheminement classique |latex|-|dvips|-|ps2pdf| (ou Adobe Distiller). \textsl{Néanmoins, le fichier nicematrix-french.tex de la présente documentation ne peut être compilé qu'avec XeLaTeX.} -\bigskip +\medskip Cette extension nécessite et charge les extensions \pkg{l3keys2e}, \pkg{array}, \pkg{amsmath} et \pkg{pgfcore} ainsi que le module \pkg{shapes} de \textsc{pgf} (l'extension \pkg{tikz}, qui est une surcouche de \textsc{pgf}, n'est \emph{pas} chargée). L'utilisateur final n'a qu'à charger l'extension \pkg{nicematrix} avec l'instruction habituelle : |\usepackage{nicematrix}|. +\medskip +Si vous utilisez une distribution TeXLive, sachez que TeXLive 2020 au minimum +est requis pour faire fonctionner \pkg{nicematrix}. -\bigskip + +\medskip L'idée de \pkg{nicematrix} est de créer des nœuds \textsc{pgf} derrière les cases et les positions des filets des tableaux créés par \pkg{array} et de les utiliser pour développer de nouvelles fonctionnalités. Comme toujours avec \textsc{pgf}, les coordonnées de ces nœuds sont écrites dans le fichier |aux| pour être utilisées à la @@ -145,18 +150,18 @@ compilation suivante. C'est pourquoi l'utilisation de \pkg{nicematrix} nécessit automatiquement le nombre de compilations nécessaire.} -\bigskip +\medskip La plupart des fonctionnalités de \pkg{nicematrix} sont accessibles sans avoir à utiliser explicitement \textsc{pgf} ou Tikz (ce dernier n'est d'ailleurs pas chargé par défaut). -\bigskip +\medskip Une commande|\NiceMatrixOptions| est fournie pour régler les options (la portée des options fixées par cette commande est le groupe TeX courant : elles sont semi-globales). \newpage -\section{Les environnements de cette extension} +\section{Les environnements de cette extension} L'extension \pkg{nicematrix} définit les nouveaux environnements suivants : @@ -169,7 +174,7 @@ L'extension \pkg{nicematrix} définit les nouveaux environnements suivants : \{NiceTabularX\} & \{bNiceArray\} & \{bNiceMatrix\} \\ & \{BNiceArray\} & \{BNiceMatrix\} \\ & \{vNiceArray\} & \{vNiceMatrix\} \\ - & \{VNiceArray\} & \{VNiceMatrix\} + & \{VNiceArray\} & \{VNiceMatrix\} \end{tabular} \end{ttfamily} @@ -230,14 +235,14 @@ $\begin{pmatrix} \frac13 & \frac14 \\ \end{pmatrix}$ -\bigskip +\medskip En s'inspirant de l'extension \pkg{cellspace} qui traite de ce problème, l'extension \pkg{nicematrix} propose deux clés |cell-space-top-limit| et |cell-space-bottom-limit| qui sont similaires aux deux paramètres -|\cellspacetoplimit| et |\cellspacebottomlimit| proposés par \pkg{cellspace}. +|\cellspacetoplimit| et |\cellspacebottomlimit| proposés par \pkg{cellspace}. Il existe aussi une clé |cell-space-limits| pour régler simultanément les deux -paramètres. +paramètres. La valeur initiale de ces paramètres est $0$~pt pour que les environnements de \pkg{nicematrix} aient par défaut le même comportement que ceux de \pkg{array} @@ -267,7 +272,7 @@ $\begin{pNiceMatrix} \end{scope} -\bigskip +\medskip \section{La clé baseline} L'extension \pkg{nicematrix} propose une option |baseline| pour la position @@ -296,7 +301,7 @@ absolue comme pour l'option des environnements |{tabular}| et |{array}| de \pkg{array}. La valeur initiale de |baseline| est~|c|. -\bigskip +\medskip Dans l'exemple suivant, on utilise l'option |t| (synonyme de |baseline=t|) immédiatement après un |\item| de liste. On remarquera que la présence d'un |\hline| initial n'empêche pas l'alignement sur la ligne de base de la première @@ -312,7 +317,7 @@ rangée (avec |{tabular}| ou |{array}| de \pkg{array}, il faut utiliser $\begin{NiceArray}[t]{lcccccc} \hline n & 0 & 1 & 2 & 3 & 4 & 5 \\ -u_n & 1 & 2 & 4 & 8 & 16 & 32 +u_n & 1 & 2 & 4 & 8 & 16 & 32 \hline \end{NiceArray}$ \end{enumerate} @@ -333,7 +338,7 @@ u_n & 1 & 2 & 4 & 8 & 16 & 32 \\ \end{minipage} -\bigskip +\medskip Il est également possible d'utiliser les outils de \pkg{booktabs}: |\toprule|, |\bottomrule|, |\midrule|, etc.\par\nobreak @@ -342,12 +347,12 @@ Il est également possible d'utiliser les outils de \pkg{booktabs}: |\toprule|, \begin{enumerate} \item an item \smallskip -\item +\item $\begin{NiceArray}[t]{lcccccc} ~emphase#\toprule@ n & 0 & 1 & 2 & 3 & 4 & 5 \\ ~emphase#\midrule@ -u_n & 1 & 2 & 4 & 8 & 16 & 32 +u_n & 1 & 2 & 4 & 8 & 16 & 32 ~emphase#\bottomrule@ \end{NiceArray}$ \end{enumerate} @@ -356,7 +361,7 @@ u_n & 1 & 2 & 4 & 8 & 16 & 32 \begin{enumerate} \item an item \smallskip -\item +\item $\begin{NiceArray}[t]{lcccccc} \toprule n & 0 & 1 & 2 & 3 & 4 & 5 \\ @@ -368,7 +373,7 @@ u_n & 1 & 2 & 4 & 8 & 16 & 32 \\ \end{minipage} -\bigskip +\medskip On peut aussi utiliser la clé |baseline| pour aligner une matrice sur un filet horizontal (tracé par |\hline|). On doit pour cela donner la valeur |line-|\textsl{i} où \textsl{i} est le numéro de la rangée qui \emph{suit} ce filet @@ -424,36 +429,34 @@ Si cet argument est laissé blanc, la valeur par défaut est |1-1|. Si le nombre de rangées n'est pas indiqué, ou bien est égal à |*|, le bloc s'étend jusqu'à la dernière rangée (idem pour les colonnes). -\item Le deuxième argument est le contenu du bloc. On peut utiliser |\\| dans -ce contenu pour avoir un contenu sur plusieurs lignes. Dans |{NiceTabular}|, le -contenu est composé en mode texte tandis que, dans les autres environnements, il -est composé en mode mathématique. +\item Le deuxième argument est le contenu du bloc. On peut utiliser |\\| dans ce +contenu pour avoir un contenu sur plusieurs lignes. Dans |{NiceTabular}|, +|{NiceTabular*}| et |{NiceTabularX}|, le contenu est composé en mode texte +tandis que, dans les autres environnements, il est composé en mode mathématique. \end{itemize} - - \interitem Voici un exemple d'utilisation de la commande |\Block| dans une matrice mathématique. \medskip \begin{BVerbatim}[baseline=c,boxwidth=10.6cm] -$\begin{bNiceArray}{ccc|c}[margin] +$\begin{bNiceArray}{cw{c}{1cm}c|c}[margin] ~emphase#\Block{3-3}{A}@ & & & 0 \\ -& \hspace*{1cm} & & \Vdots \\ +& & & \Vdots \\ & & & 0 \\ \hline 0 & \Cdots& 0 & 0 \end{bNiceArray}$ \end{BVerbatim} -$\begin{bNiceArray}{ccc|c}[margin] +$\begin{bNiceArray}{cw{c}{1cm}c|c}[margin] \Block{3-3}{A} & & & 0 \\ -& \hspace*{1cm} & & \Vdots \\ +& & & \Vdots \\ & & & 0 \\ \hline 0 & \Cdots& 0 & 0 \end{bNiceArray}$ -\bigskip +\medskip On peut souhaiter agrandir la taille du «$A$» placé dans le bloc de l'exemple précédent. Comme il est composé en mode mathématique, on ne peut pas directement utiliser une commande comme |\large|, |\Large| ou |\LARGE|. C'est pourquoi une @@ -461,44 +464,44 @@ option à mettre entre chevrons est proposée par |\Block| pour spécifier du co LaTeX qui sera inséré \emph{avant} le début du mode mathématique.\footnote{Cet argument entre chevrons peut aussi être utilisé pour insérer une commande de fonte comme |\bfseries| dans le cas où la commande |\\| est utilisée dans le - contenu du bloc.} + contenu du bloc.} \medskip \begin{BVerbatim}[baseline=c,boxwidth=10.6cm] -$\begin{bNiceArray}{ccc|c}[margin] +$\begin{bNiceArray}{cw{c}{1cm}c|c}[margin] \Block{3-3}~emphase#<\LARGE>@{A} & & & 0 \\ -& \hspace*{1cm} & & \Vdots \\ +& & & \Vdots \\ & & & 0 \\ \hline 0 & \Cdots& 0 & 0 \end{bNiceArray}$ \end{BVerbatim} -$\begin{bNiceArray}{ccc|c}[margin] +$\begin{bNiceArray}{cw{c}{1cm}c|c}[margin] \Block{3-3}<\LARGE>{A} & & & 0 \\ -& \hspace*{1cm} & & \Vdots \\ +& & & \Vdots \\ & & & 0 \\ \hline 0 & \Cdots& 0 & 0 \end{bNiceArray}$ -\bigskip +\medskip On peut régler le positionnement horizontal du bloc avec l'une des clés |l|, |c| et |r|. \medskip \begin{BVerbatim}[baseline=c,boxwidth=10.6cm] -$\begin{bNiceArray}{ccc|c}[margin] +$\begin{bNiceArray}{cw{c}{1cm}c|c}[margin] \Block~emphase#[r]@{3-3}<\LARGE>{A} & & & 0 \\ -& \hspace*{1cm} & & \Vdots \\ +& & & \Vdots \\ & & & 0 \\ \hline 0 & \Cdots& 0 & 0 \end{bNiceArray}$ \end{BVerbatim} -$\begin{bNiceArray}{ccc|c}[margin] +$\begin{bNiceArray}{cw{c}{1cm}c|c}[margin] \Block[r]{3-3}<\LARGE>{A} & & & 0 \\ -& \hspace*{1cm} & & \Vdots \\ +& & & \Vdots \\ & & & 0 \\ \hline 0 & \Cdots& 0 & 0 @@ -506,7 +509,7 @@ $\begin{bNiceArray}{ccc|c}[margin] -\interitem +\interitem La commande |\Block| accepte en fait en premier argument optionnel (entre crochets) une liste de couples \textsl{clé=valeur}. Les clés sont les suivantes : \begin{itemize} @@ -532,13 +535,15 @@ cette clé prend comme valeur une liste d'éléments parmi les suivants : |left| celui-ci est constitué de plusieurs lignes (séparées par la commande |\\|) ; \item la clé |hvlines| trace tous les filets horizontaux et verticaux dans le bloc ; -\item \colorbox{yellow!50}{\textbf{Nouveau 5.19}}\enskip quand la clé |tikz| est -utilisée, le chemin Tikz correspondant au rectangle délimitant le bloc est -exécuté avec Tikz\footnote{Tikz doit être chargé préalablement (par défaut, - \pkg{nicematrix} ne charge que \textsc{pgf}), faute de quoi, une erreur sera - levée.} en utilisant comme options la valeur de cette clé |tikz| (qui doit -donc être une liste de clés Tikz applicables à un chemin de Tikz). Pour des -exemple d'utilisation de cette clé |tikz|, voir p.~\pageref{tikz-key-examples}. +\item quand la clé |tikz| est utilisée, le chemin Tikz correspondant au +rectangle délimitant le bloc est exécuté avec Tikz\footnote{Tikz doit être + chargé préalablement (par défaut, \pkg{nicematrix} ne charge que + \textsc{pgf}), faute de quoi, une erreur sera levée.} en utilisant comme +options la valeur de cette clé |tikz| (qui doit donc être une liste de clés Tikz +applicables à un chemin de Tikz). Pour des exemple d'utilisation de cette clé +|tikz|, voir p.~\pageref{tikz-key-examples} ; +\item \colorbox{yellow!50}{\textbf{Nouveau 6.3}}\enskip la clé |name| donne un +nom au nœud Tikz rectangulaire correspondant au bloc. \end{itemize} @@ -556,12 +561,12 @@ construction |wc{...}| de \pkg{array}). \begin{BVerbatim} \begin{NiceTabular}{cwc{2cm}wc{3cm}c} rose & tulipe & marguerite & dahlia \\ -violette +violette & ~emphase#\Block[draw=red,fill=[RGB]{204,204,255},rounded-corners]{2-2}@ - ~emphase#{\LARGE De très jolies fleurs}@ + ~emphase#{\LARGE De très jolies fleurs}@ & & souci \\ pervenche & & & lys \\ -arum & iris & jacinthe & muguet +arum & iris & jacinthe & muguet \end{NiceTabular} \end{BVerbatim} @@ -573,14 +578,14 @@ rose & tulipe & marguerite & dahlia \\ violette & \Block[draw=red,fill=[RGB]{204,204,255},rounded-corners]{2-2} {\LARGE De très jolies fleurs} & & souci \\ pervenche & & & lys \\ -arum & iris & jacinthe & muguet +arum & iris & jacinthe & muguet \end{NiceTabular} \end{center} \subsection{Les blocs mono-colonne} -Les blocs mono-colonne ont un comportement spécial. +Les blocs mono-colonne ont un comportement spécial. \begin{itemize} \item La largeur naturelle du contenu de ces blocs est prise en compte pour la largeur de la colonne courante. @@ -662,14 +667,14 @@ la consigne générale donnée dans le préambule pour cette colonne. d'utiliser un bloc mono-case : on peut utiliser la commande |\cellcolor| si la clé |colortbl-like| est utilisée : voir p.~\pageref{colortbl-like}.} -\item On peut tracer ou plusieurs bordures de la case avec la clé |borders|. +\item On peut tracer une ou plusieurs bordures de la case avec la clé |borders|. \end{itemize} \medskip \begin{BVerbatim}[baseline=c,boxwidth=10cm] \begin{NiceTabular}{cc} \toprule -Écrivain +Écrivain & ~emphase#\Block[l]{}{année de\\ naissance}@ \\ \midrule Hugo & 1802 \\ @@ -680,7 +685,7 @@ Balzac & 1799 \\ % \begin{NiceTabular}{cc} \toprule -Écrivain +Écrivain & \Block[l]{}{année de\\ naissance} \\ \midrule Hugo & 1802 \\ @@ -702,7 +707,7 @@ Par défaut, le positionnement horizontal des contenus des blocs est calculé su le \emph{contenu} des colonnes impliquées. De ce fait, dans l'exemple suivant, l'en-tête «Premier groupe» est correctement centré même si un espacement des colonnes a été demandé par une instruction comme |!{\qquad}| dans le -préambule (ce n'est pas le cas avec |\multicolumn|). +préambule (ce n'est pas le cas avec |\multicolumn|). \medskip \begin{center} @@ -722,7 +727,7 @@ Rang & ~emphase#\Block{1-3}{Premier groupe}+ & & & \Block{1-3}{Deuxième groupe} \end{BVerbatim} \end{center} -\bigskip +\medskip \begin{center} \begin{NiceTabular}{@{}c!{\qquad}ccc!{\qquad}ccc@{}} \toprule @@ -750,7 +755,7 @@ néanmoins quelques petites différences de comportement avec les environnements classiques. -\bigskip +\medskip \subsection{Quelques différences avec les environnements classiques} \subsubsection{Les filets verticaux} @@ -760,7 +765,7 @@ Dans les environnements de \pkg{nicematrix}, les filets verticaux spécifiés pa de ligne incomplète ou de double filet horizontal spécifié par |\hline\hline| (il n'y a pas besoin d'utiliser \pkg{hhline}). -\bigskip +\medskip \begin{BVerbatim}[baseline=c,boxwidth=10cm] \begin{NiceTabular}{|c|c|} \hline Premier & Deuxième \\ ~emphase#\hline\hline@ @@ -776,13 +781,13 @@ Marie & Pauline \\ \hline \end{NiceTabular} -\bigskip +\medskip En revanche, les filets verticaux ne sont pas tracés à l'intérieur des blocs (créés par |\Block|: cf.~p.~\pageref{Block}) ni dans les coins (dont la création est demandée par la clé |corners|: cf.~p.~\pageref{corners}). -\bigskip +\medskip Si vous utilisez \pkg{booktabs} (qui fournit |\toprule|, |\midrule|, |\bottomrule|, etc.) et que vous tenez absolument à mettre des filets verticaux (ce qui est contraire à l'esprit à \pkg{booktabs}), vous constaterez que les @@ -806,7 +811,7 @@ a & b & c & d \\ \bottomrule \end{NiceArray}$ -\bigskip +\medskip Il reste néanmoins possible de définir un spécificateur, nommé par exemple |I|, pour tracer des filets verticaux avec le comportement standard de \pkg{array} : @@ -882,7 +887,7 @@ A&B&C&D \\ \end{scope} \medskip -\colorbox{yellow!50}{\textbf{Nouveau 6.2}}\enskip +\colorbox{yellow!50}{\textbf{Nouveau 6.2}}\enskip Dans les environnements de \pkg{nicematrix}, une instruction |\cline{|\textsl{\texttt{i}}|}| est @@ -936,7 +941,7 @@ p.~\pageref{OnlyMainNiceMatrix}. -\bigskip +\medskip \subsection{Les outils de nicematrix pour tracer des filets} Les outils proposés par \pkg{nicematrix} pour tracer des filets sont les @@ -948,7 +953,7 @@ préambule) ; \item la commande |\Hline|. \end{itemize} -\bigskip +\medskip \textbf{Ces outils ont en commun de ne pas tracer les filets dans les blocs ni dans les coins vides (quand la clé |corners| est utilisée).} \begin{itemize} @@ -962,36 +967,37 @@ p.~\pageref{Block}; par |\Cdots|, |\Vdots|, etc. : cf.~p.~\pageref{Cdots}. \end{itemize} \item Les coins sont créés par la clé |corners| détaillée un peu plus loin : cf. -p.~\pageref{corners}. +p.~\pageref{corners}. \end{itemize} En particulier, cette remarque explique la différence entre la commande standard |\hline| et la commande |\Hline| proposée par \pkg{nicematrix}. -\bigskip +\medskip \subsubsection{Les clés hlines et vlines} \medskip Les clés |hlines| et |vlines| (qui, bien sûr, tracent des filets horizontaux et verticaux) prennent comme valeur une liste de numéros qui sont les numéros des -filets à tracer. Si aucune valeur n'est donnée, tous les filets sont tracés. +filets\footnote{Il est également possible de mettre dans la liste des + intervalles de numéros de la forme $i$|-|$j$.} à tracer. Si aucune valeur n'est donnée, tous les filets sont tracés. En fait, pour les environnements avec délimiteurs (comme |{pNiceMatrix}| ou |{bNiceArray}|), la clé |vlines| ne trace pas les filets extérieurs (ce qui est -le comportement certainement attendu). +le comportement certainement attendu). \medskip \begin{BVerbatim}[baseline=c,boxwidth=10.6cm] $\begin{pNiceMatrix}[~emphase#vlines@,rules/width=0.2pt] 1 & 2 & 3 & 4 & 5 & 6 \\ 1 & 2 & 3 & 4 & 5 & 6 \\ -1 & 2 & 3 & 4 & 5 & 6 +1 & 2 & 3 & 4 & 5 & 6 \end{pNiceMatrix}$ \end{BVerbatim} $\begin{pNiceMatrix}[vlines,rules/width=0.2pt] 1 & 2 & 3 & 4 & 5 & 6 \\ 1 & 2 & 3 & 4 & 5 & 6 \\ -1 & 2 & 3 & 4 & 5 & 6 +1 & 2 & 3 & 4 & 5 & 6 \end{pNiceMatrix}$ @@ -1008,7 +1014,7 @@ La clé |hvlines|, qui ne prend pas de valeur, est la conjonction des clés rose & tulipe & marguerite & dahlia \\ violette & \Block[draw=red]{2-2}{\LARGE fleurs} & & souci \\ pervenche & & & lys \\ -arum & iris & jacinthe & muguet +arum & iris & jacinthe & muguet \end{NiceTabular} \end{Verbatim} % @@ -1017,21 +1023,21 @@ arum & iris & jacinthe & muguet rose & tulipe & marguerite & dahlia \\ violette & \Block[draw=red]{2-2}{\LARGE fleurs} & & souci \\ pervenche & & & lys \\ -arum & iris & jacinthe & muguet +arum & iris & jacinthe & muguet \end{NiceTabular} \end{center} -\bigskip +\medskip La clé |hvlines-except-borders| est similaire à la clé |hvlines| mais ne trace pas les filets sur les bords horizontaux et verticaux du tableau. -\bigskip +\medskip \subsubsection{Les coins (vides)} \label{corners} Les quatre coins d'un tableau seront notés |NW|, |SW|, |NE| et |SE| (\emph{north west}, \emph{south west}, \emph{north - east} et \emph{south east} en anglais). + east} et \emph{south east} en anglais). \smallskip Pour chacun de ces coins, on appellera \emph{coin vide} (ou tout simplement @@ -1045,7 +1051,7 @@ rectangle entièrement constitué de cases vides partant de ce coin.\footnote{Po On peut néanmoins imposer à une case sans contenu d'être considérée comme non vide par \pkg{nicematrix} avec la commande |\NotEmpty|. -\bigskip +\medskip \begin{minipage}{9cm} Dans l'exemple ci-contre (où B est au centre d'un bloc de taille $2\times 2$), on a colorié en bleu clair les quatre coins (vides) du tableau. @@ -1070,14 +1076,14 @@ A & A & A & A & A & A \\ \end{NiceTabular} -\bigskip +\medskip Quand la clé |corners| est utilisée, \pkg{nicematrix} calcule les coins vides et ces coins sont alors pris en compte par les outils de tracés de filets (les filets ne seront pas tracés dans ces coins vides). \emph{Remarque} : Dans les versions précédentes de \pkg{nicematrix}, il n'y avait qu'une clé |hvlines-except-corners| (maintenant considérée comme obsolète). -\bigskip +\medskip \begin{BVerbatim}[boxwidth=11cm,baseline=c] \NiceMatrixOptions{cell-space-top-limit=3pt} \begin{NiceTabular}{*{6}{c}}[~emphase#corners@,hvlines] @@ -1132,7 +1138,7 @@ doivent être séparés par des virgules). \end{NiceTabular} -\bigskip +\medskip $\triangleright$ Les coins sont également pris en compte par les outils de coloriage dans le |\CodeBefore|. Ces outils ne colorient pas les cases qui sont dans les coins (cf.~p.~\pageref{color-in-code-before}). @@ -1152,7 +1158,7 @@ $\begin{NiceArray}{*{5}{c}}[hvlines] e & e & a & b & c \\ a & a & e & c & b \\ b & b & c & e & a \\ -c & c & b & a & e +c & c & b & a & e \end{NiceArray}$ \end{BVerbatim} $\begin{NiceArray}{*{5}{c}}[hvlines] @@ -1160,7 +1166,7 @@ $\begin{NiceArray}{*{5}{c}}[hvlines] e & e & a & b & c \\ a & a & e & c & b \\ b & b & c & e & a \\ -c & c & b & a & e +c & c & b & a & e \end{NiceArray}$ \medskip @@ -1182,18 +1188,18 @@ commande de \pkg{arydshln}). 1 & 2 & 3 & 4 & 5 \\ ~emphase#\hdottedline@ 6 & 7 & 8 & 9 & 10 \\ -11 & 12 & 13 & 14 & 15 +11 & 12 & 13 & 14 & 15 \end{pNiceMatrix} \end{BVerbatim} $\begin{pNiceMatrix} 1 & 2 & 3 & 4 & 5 \\ \hdottedline 6 & 7 & 8 & 9 & 10 \\ -11 & 12 & 13 & 14 & 15 +11 & 12 & 13 & 14 & 15 \end{pNiceMatrix}$ -\bigskip +\medskip Dans les environnements avec un préambule explicite (comme |{NiceTabular}|, |{NiceArray}|, etc.), il est possible de dessiner un trait vertical en pointillés avec le spécificateur «|:|». @@ -1203,25 +1209,25 @@ pointillés avec le spécificateur «|:|». \begin{pNiceArray}{cccc~emphase#:@c} 1 & 2 & 3 & 4 & 5 \\ 6 & 7 & 8 & 9 & 10 \\ -11 & 12 & 13 & 14 & 15 +11 & 12 & 13 & 14 & 15 \end{pNiceArray} \end{BVerbatim} $\begin{pNiceArray}{cccc:c} 1 & 2 & 3 & 4 & 5 \\ 6 & 7 & 8 & 9 & 10 \\ -11 & 12 & 13 & 14 & 15 +11 & 12 & 13 & 14 & 15 \end{pNiceArray}$ -\bigskip +\medskip Il est possible de changer dans \pkg{nicematrix} la lettre utilisée pour indiquer dans le préambule un trait vertical en pointillés avec l'option -|letter-for-dotted-lines| disponible dans |\NiceMatrixOptions|. -Ainsi libérée, la lettre «|:|» peut être utilisée par ailleurs (par exemple par +|letter-for-dotted-lines| disponible dans |\NiceMatrixOptions|. +Ainsi libérée, la lettre «|:|» peut être utilisée par ailleurs (par exemple par l'extension \pkg{arydshln}\footnote{On remarquera néanmoins que l'extension \pkg{arydshln} n'est pas parfaitement compatible avec l'extension \pkg{nicematrix}.}). -\bigskip +\medskip \emph{Remarque} : Quand l'extension \pkg{array} (sur laquelle s'appuie \pkg{nicematrix}) est chargée, les traits verticaux et horizontaux que l'on insère rendent le tableau plus large ou plus long d'une quantité égale à la @@ -1274,7 +1280,7 @@ MuPDF. \end{itemize} L'extension \pkg{nicematrix} propose des outils qui permettent d'éviter ces -inconvénients. +inconvénients. \end{itemize} \subsection{Les outils de nicematrix dans le \textbackslash CodeBefore} @@ -1292,7 +1298,7 @@ successives.\footnote{Si vous utilisez Overleaf, Overleaf effectue \medskip L'extension \pkg{nicematrix} fournit une clé |code-before| pour du code qui sera -exécuté avant le tracé du tableau. +exécuté avant le tracé du tableau. \smallskip Une syntaxe alternative est proposée : on peut placer le contenu de ce @@ -1302,9 +1308,9 @@ l'environnement. \begin{Verbatim} \begin{pNiceArray}{~textsl#preamble@} ~emphase#\CodeBefore@ -~textsl#instructions du code-before@ + ~textsl#instructions du code-before@ ~emphase#\Body@ -~textsl#contenu de l'environnement@ + ~textsl#contenu de l'environnement@ \end{pNiceArray} \end{Verbatim} @@ -1313,7 +1319,7 @@ De nouvelles commandes sont disponibles dans ce |\CodeBefore|: |\cellcolor|, |\rectanglecolor|, |\rowcolor|, |\columncolor|, |\rowcolors|, |\rowlistcolors|, |\chessboardcolors| et |\arraycolor|.\footnote{On pourra remarquer que, dans le |\CodeBefore|, des nœuds PGF/Tikz de la forme \verb+(i-|j)+ correspondant - à la position des filets éventuels sont également accessibles : cf. p.~\pageref{noeuds-i}.} + à la position des filets éventuels sont également accessibles : cf. p.~\pageref{nodes-i}.} \label{code-before} \medskip @@ -1361,7 +1367,7 @@ h & i & j \\ \hline \end{scope} -\bigskip +\medskip \item La commande |\rectanglecolor| prend trois arguments obligatoires. Le premier est la couleur, les deux suivants fournissent la case en haut à gauche et la case en bas à droite du rectangle. @@ -1392,13 +1398,13 @@ h & i & j \\ \hline \end{scope} -\bigskip +\medskip \item La commande |\arraycolor| prend en argument obligatoire une couleur et colorie tout le tableau (sauf les éventuelles rangées et colonnes extérieures: cf.~p.~\pageref{exterior}) avec cette couleur. Ce n'est qu'un cas particulier de la commande |\rectanglecolor|. -\bigskip +\medskip \item \label{chessboardcolors}% La commande |\chessboardcolors| prend en arguments obligatoires deux couleurs et colorie les cases en quinconces avec les deux couleurs. @@ -1407,13 +1413,13 @@ couleurs et colorie les cases en quinconces avec les deux couleurs. \begin{scope} \hfuzz=10cm \begin{BVerbatim}[baseline=c,boxwidth=9cm] -$\begin{pNiceMatrix}[r,margin] +$\begin{pNiceMatrix}[r,margin] \CodeBefore ~emphase#\chessboardcolors{red!15}{blue!15}@ \Body 1 & -1 & 1 \\ -1 & 1 & -1 \\ -1 & -1 & 1 +1 & -1 & 1 \end{pNiceMatrix}$ \end{BVerbatim} $\begin{pNiceMatrix}[baseline=1, r, margin] @@ -1422,7 +1428,7 @@ $\begin{pNiceMatrix}[baseline=1, r, margin] \Body 1 & -1 & 1 \\ -1 & 1 & -1 \\ -1 & -1 & 1 +1 & -1 & 1 \end{pNiceMatrix}$ \end{scope} @@ -1431,7 +1437,7 @@ On a utilisé la clé |r| qui impose que toutes les colonnes soient alignées à droite (cf. p.~\pageref{key-R}). -\bigskip +\medskip \item La commande |\rowcolor| doit son nom à la commande |\rowcolor| de \pkg{colortbl}. Son premier argument obligatoire est la couleur et le deuxième est une liste de numéros de rangées ou bien d'intervalles de rangées sous la @@ -1443,7 +1449,7 @@ partir de la rangée~$a$). \begin{scope} \hfuzz=10cm \begin{BVerbatim}[boxwidth=9cm,baseline=c] -$\begin{NiceArray}{lll}[hvlines] +$\begin{NiceArray}{lll}[hvlines] \CodeBefore ~emphase#\rowcolor{red!15}{1,3-5,8-}@ \Body @@ -1479,11 +1485,11 @@ a_{10} & b_{10} & c_{10} \\ -\bigskip +\medskip \item La commande |\columncolor| doit son nom à la commande |\columncolor| de \pkg{colortbl}. Sa syntaxe est similaire à celle de |\rowcolor|. -\bigskip +\medskip \item La commande |\rowcolors| (avec un \emph{s}) doit son nom à la commande |\rowcolors| de \pkg{xcolor}\footnote{La commande |\rowcolors| de \pkg{xcolor} est disponible quand \pkg{xcolor} est chargé avec l'option |table|. Cett @@ -1492,13 +1498,13 @@ qu'il y a deux couleurs. Elle colorie alternativement les rangées avec les deux couleurs à partir de la rangée dont le numéro est donné en premier argument (obligatoire), comme le fait la commande |\rowcolors| de \pkg{xcolor}. -En fait, le premier argument (obligatoire) peut, plus généralement, contenir +En fait, le premier argument (obligatoire) peut, plus généralement, contenir une liste d'intervalles correspondant à l'ensemble des rangées sur lesquelles portera l'effet de |\rowcolors| (un intervalle de la forme $i$ désigne en fait l'intervalle constitué de toutes les rangées du tableau à partir de la rangée~$i$). -\bigskip +\medskip La commande |\rowcolors| accepte une liste de couples clé-valeur comme argument optionnel en dernière position (l'argument optionel en première position correspond à l'espace colorimétrique). Les clés disponibles sont |cols|, @@ -1534,7 +1540,7 @@ tableau pour englober les blocs (créés par la commande |\Block| : cf.~p.~\page \Block{4-1}{B}& Stéphanie & 18 \\ & Amélie & 20 \\ & Henri & 14 \\ - & Estelle & 15 + & Estelle & 15 \end{NiceTabular} \end{BVerbatim} \begin{NiceTabular}{clr}[hvlines,baseline=2] @@ -1547,7 +1553,7 @@ tableau pour englober les blocs (créés par la commande |\Block| : cf.~p.~\page \Block{4-1}{B}& Stéphanie & 18 \\ & Amélie & 20 \\ & Henri & 14 \\ - & Estelle & 15 + & Estelle & 15 \end{NiceTabular} \end{scope} @@ -1595,7 +1601,7 @@ Henri & 14 \\ -\bigskip +\medskip \item \colorbox{yellow!50}{\textbf{Nouveau 6.0}}\enskip L'extension \pkg{nicematrix} propose aussi une commande |\rowlistcolors|. Cette commande généralise la commande |\rowcolors|: au lieu de prendre deux arguments @@ -1633,7 +1639,7 @@ Stéphanie \\ \end{itemize} -\bigskip +\medskip On rappelle que toutes les commandes de coloriage que l'on vient de décrire ne colorient pas les cases qui sont dans les «coins». Dans l'exemple suivant, on utilise la clé |corners| pour demander de considérer le coin \emph{north east} (NE). @@ -1673,7 +1679,7 @@ utilise la clé |corners| pour demander de considérer le coin \emph{north east} -\bigskip +\medskip On remarquera que ces commandes sont compatibles avec les commandes de \pkg{booktabs} (|\toprule|, |\midrule|, |\bottomrule|, etc). Néanmoins, l'extension \pkg{booktabs} n'est \emph{pas} chargée par \pkg{nicematrix}. @@ -1684,12 +1690,12 @@ l'extension \pkg{booktabs} n'est \emph{pas} chargée par \pkg{nicematrix}. \begin{BVerbatim}[baseline=c,boxwidth=8.5cm] \begin{NiceTabular}{lSSSS} \CodeBefore - \rowcolor{red!15}{1-2} + \rowcolor{red!15}{1-2} \rowcolors{3}{blue!15}{} \Body ~emphase#\toprule@ \Block{2-1}{Produit} & -\Block{1-3}{dimensions (cm)} & & & +\Block{1-3}{dimensions (cm)} & & & \Block{2-1}{\rotate Prix} \\ ~emphase#\cmidrule(rl){2-4}@ & L & l & h \\ @@ -1704,14 +1710,14 @@ spécial & 12 & 12 & 0.5 & 70 \\ \end{BVerbatim} \begin{NiceTabular}[c]{lSSSS} \CodeBefore - \rowcolor{red!15}{1-2} + \rowcolor{red!15}{1-2} \rowcolors{3}{blue!15}{} \Body \toprule -\Block{2-1}{Produit} & -\Block{1-3}{dimensions (cm)} & & & +\Block{2-1}{Produit} & +\Block{1-3}{dimensions (cm)} & & & \Block{2-1}{\rotate Prix} \\ -\cmidrule(rl){2-4} +\cmidrule(rl){2-4} & L & l & h \\ \midrule petit & 3 & 5.5 & 1 & 30 \\ @@ -1752,7 +1758,7 @@ préambule). \medskip \begin{Verbatim} \NewDocumentCommand { \Blue } { } {~emphase#\columncolor{blue!15}@} -\begin{NiceTabular}[colortbl-like]{>{\Blue}c>{\Blue}cc} +\begin{NiceTabular}[colortbl-like]{>{\Blue}c>{\Blue}cc} \toprule ~emphase#\rowcolor{red!15}@ Nom & Prénom & Année de naissance \\ @@ -1768,7 +1774,7 @@ Dupont & Chantal & 15 janvier 1998 \\ \begin{center} \NewDocumentCommand { \Blue } { } {\columncolor{blue!15}} -\begin{NiceTabular}[colortbl-like]{>{\Blue}c>{\Blue}cc} +\begin{NiceTabular}[colortbl-like]{>{\Blue}c>{\Blue}cc} \toprule \rowcolor{red!15} Nom & Prénom & Année de naissance \\ @@ -1785,40 +1791,50 @@ Dupont & Chantal & 15 janvier 1998 \\ \label{RowStyle} -\colorbox{yellow!50}{\bfseries Nouveau 5.18}\enskip La commande |\RowStyle| -prend en argument des instructions de mise en forme qui seront appliquées à -chacune des cases restantes sur la rangée en cours. +La commande |\RowStyle| prend en argument des instructions de mise en forme qui +seront appliquées à chacune des cases restantes sur la rangée en cours. \medskip Elle prend aussi en premier argument optionnel, entre crochets, une liste de -couples clé-valeur. +couples clé-valeur. \begin{itemize} +\item \colorbox{yellow!50}{\bfseries Nouveau 6.3}\enskip La clé |nb-rows| +indique le nombre de rangées consécutives concernées par les spécifications de +cette commande. \item Les clés |cell-space-top-limit|, |cell-space-bottom-limit| et |cell-space-limits| sont disponibles avec le même effet que les clés globales -de même nom (cf. p.~\pageref{cell-space}). -\item \colorbox{yellow!50}{\bfseries Nouveau 6.1}\enskip La clé |color| fixe la -couleur du texte.\footnote{La clé |color| utilise la commande |\color| -mais insère aussi une instruction |\leavevmode| devant. Cela évite un -espace vertical parasite dans les cellules qui correspondent à des colonnes de -type |p|, |b|, |m| et |X| (qui débutent en mode vertical).} +de même nom (cf. p.~\pageref{cell-space}). + +\item \colorbox{yellow!50}{\bfseries Nouveau 6.3}\enskip La clé |rowcolor| fixe +la couleur de fond et la clé |color| fixe la couleur du texte.\footnote{La clé + |color| utilise la commande |\color| mais insère aussi une instruction + |\leavevmode| devant. Cela évite un espace vertical parasite dans les cellules + qui correspondent à des colonnes de type |p|, |b|, |m| et |X| (qui débutent en + mode vertical).} + +\item \colorbox{yellow!50}{\bfseries Nouveau 6.3}\enskip La clé |bold| impose +des caractères gras aux éléments de la rangée, qu'ils soient en mode texte ou +bien en mode mathématique. \end{itemize} \medskip -\begin{BVerbatim}[boxwidth=11cm,baseline=c] -\begin{NiceTabular}{cccc}[colortbl-like] +\begin{BVerbatim}[boxwidth=12cm,baseline=c] +\begin{NiceTabular}{cccc} \hline ~emphase#\RowStyle[cell-space-limits=3pt]{\rotate}@ premier & deuxième & troisième & quatrième \\ -\rowcolor{blue!50}~emphase#\RowStyle[color=white]{\sffamily}@ +~emphase#\RowStyle[nb-rows=2,color=white,rowcolor=blue!50]{\sffamily}@ 1 & 2 & 3 & 4 \\ +I & II & III & IV \end{NiceTabular} \end{BVerbatim} -\begin{NiceTabular}{cccc}[colortbl-like] +\begin{NiceTabular}{cccc} \hline \RowStyle[cell-space-limits=3pt]{\rotate} premier & deuxième & troisième & quatrième \\ -\rowcolor{blue!50}\RowStyle[color=white]{\sffamily} +\RowStyle[nb-rows=2,color=white,rowcolor=blue!50]{\sffamily} 1 & 2 & 3 & 4 \\ +I & II & III & IV \\ \end{NiceTabular} \medskip @@ -1839,17 +1855,17 @@ lettres classiques |w|, |W|, |p|, |b| et |m| de l'extension \pkg{array}. \begin{NiceTabular}{~emphase#W{c}{2cm}@cc}[hvlines] Paris & New York & Madrid \\ Berlin & London & Roma \\ -Rio & Tokyo & Oslo +Rio & Tokyo & Oslo \end{NiceTabular} \end{BVerbatim} \begin{NiceTabular}{W{c}{2cm}cc}[hvlines] Paris & New York & Madrid \\ Berlin & London & Roma \\ -Rio & Tokyo & Oslo +Rio & Tokyo & Oslo \end{NiceTabular} -\bigskip +\medskip Dans les environnements de \pkg{nicematrix}, il est aussi possible de fixer la largeur \emph{minimale} de toutes les colonnes (à l'exception des éventuelles colonnes extérieures: cf. p.~\pageref{exterior}) directement avec l'option @@ -1860,13 +1876,13 @@ colonnes extérieures: cf. p.~\pageref{exterior}) directement avec l'option $\begin{pNiceMatrix}[~emphase#columns-width = 1cm@] 1 & 12 & -123 \\ 12 & 0 & 0 \\ -4 & 1 & 2 +4 & 1 & 2 \end{pNiceMatrix}$ \end{BVerbatim} $\begin{pNiceMatrix}[columns-width = 1cm] 1 & 12 & -123 \\ 12 & 0 & 0 \\ -4 & 1 & 2 +4 & 1 & 2 \end{pNiceMatrix}$ \medskip @@ -1875,7 +1891,7 @@ Notez que l'espace inséré entre deux colonnes (égal à 2 |\tabcolsep| dans supprimé (il est évidemment possible de le supprimer en mettant |\tabcolsep| ou |\arraycolsep| à~$0$ avant). -\bigskip +\medskip Il est possible de donner la valeur spéciale |auto| à l'option |columns-width|: toutes les colonnes du tableau auront alors une largeur égale à la largeur de la case la plus large du tableau.\footnote{Le résultat est atteint dès la première @@ -1887,16 +1903,16 @@ case la plus large du tableau.\footnote{Le résultat est atteint dès la premiè $\begin{pNiceMatrix}[~emphase#columns-width = auto@] 1 & 12 & -123 \\ 12 & 0 & 0 \\ -4 & 1 & 2 +4 & 1 & 2 \end{pNiceMatrix}$ \end{BVerbatim} $\begin{pNiceMatrix}[columns-width = auto] 1 & 12 & -123 \\ 12 & 0 & 0 \\ -4 & 1 & 2 +4 & 1 & 2 \end{pNiceMatrix}$ -\bigskip +\medskip Sans surprise, il est possible de fixer la largeur minimale de toutes les colonnes de tous les tableaux dans une certaine portion de document avec la commande |\NiceMatrixOptions|.\par\nobreak @@ -1905,28 +1921,28 @@ commande |\NiceMatrixOptions|.\par\nobreak \begin{BVerbatim}[baseline=c,boxwidth=8.5cm] ~emphase#\NiceMatrixOptions{columns-width=10mm}@ $\begin{pNiceMatrix} -a & b \\ c & d +a & b \\ c & d \end{pNiceMatrix} -= += \begin{pNiceMatrix} -1 & 1245 \\ 345 & 2 +1 & 1245 \\ 345 & 2 \end{pNiceMatrix}$ \end{BVerbatim} \begin{scope} \NiceMatrixOptions{columns-width=10mm} $\begin{pNiceMatrix} a & b \\ -c & d +c & d \end{pNiceMatrix} -= += \begin{pNiceMatrix} 1 & 1245 \\ -345 & 2 +345 & 2 \end{pNiceMatrix}$ \end{scope} -\bigskip +\medskip Mais il est aussi possible de fixer une zone dans laquelle toutes les matrices auront leurs colonnes de la même largeur, égale à la largeur de la case la plus large de toutes les matrices de la zone. Cette construction utilise @@ -1942,10 +1958,10 @@ la commande |\Block| présentée précédemment dans ce document ~emphase#\begin{NiceMatrixBlock}[auto-columns-width]@ $\begin{array}{c} \begin{bNiceMatrix} - 9 & 17 \\ -2 & 5 + 9 & 17 \\ -2 & 5 \end{bNiceMatrix} \\ \\ \begin{bNiceMatrix} - 1 & 1245345 \\ 345 & 2 + 1 & 1245345 \\ 345 & 2 \end{bNiceMatrix} \end{array}$ ~emphase#\end{NiceMatrixBlock}@ @@ -1953,14 +1969,76 @@ $\begin{array}{c} \begin{NiceMatrixBlock}[auto-columns-width] $\begin{array}{c} \begin{bNiceMatrix} - 9 & 17 \\ -2 & 5 + 9 & 17 \\ -2 & 5 \end{bNiceMatrix} \\ \\ \begin{bNiceMatrix} - 1 & 1245345 \\ 345 & 2 + 1 & 1245345 \\ 345 & 2 \end{bNiceMatrix} \end{array}$ \end{NiceMatrixBlock} +\subsection{Les colonnes V de varwidth} + +\colorbox{yellow!50}{\textbf{Nouveau 6.3}} + +\smallskip +Rappelons d'abord le fonctionnement d'un environnement |{varwidth}| de +l'extension éponyme \pkg{varwidth}. Un tel environnement est similaire à +l'environnement classique |{minipage}| mais la largeur indiquée (en argument) +n'est que la largeur \emph{maximale} de la boîte créée. Dans la cas général, la +largeur d'une boîte |{varwidth}| est la largeur naturelle de son contenu. + +\smallskip +Cela est illustré avec les exemples suivants : + +\medskip +\begin{BVerbatim}[baseline=c,boxwidth=6cm] +\fbox{% +\begin{~emphase#varwidth@}{8cm} +\begin{itemize} +\item premier item +\item deuxième item +\end{itemize} +\end{~emphase#varwidth@}} +\end{BVerbatim} +\fbox{\begin{varwidth}{8cm} +\begin{itemize} +\item premier item +\item deuxième item +\end{itemize} +\end{varwidth}} + +\bigskip +\begin{BVerbatim}[baseline=c,boxwidth=6cm] +\fbox{% +\begin{~emphase#minipage@}{8cm} +\begin{itemize} +\item premier item +\item deuxième item +\end{itemize} +\end{~emphase#minipage@}} +\end{BVerbatim} +\fbox{\begin{minipage}{8cm} +\begin{itemize} +\item premier item +\item deuxième item +\end{itemize} +\end{minipage}} + +\bigskip +L'extension \pkg{varwidth} définit également le type de colonne |V|. Une colonne +|V{|$\langle$\textsl{dim}$\rangle$|}| encapsule toutes ses cases dans une +|{varwidth}| d'argument $\langle$\textsl{dim}$\rangle$ (et effectue quelques +réglages supplémentaires). + +\medskip +Lorsque l'extension \pkg{varwidth} est chargée, ces colonnes |V| de +\pkg{varwidth} sont prises en charge par \pkg{nicematrix}. Dans le cadre de +\pkg{nicematrix}, l'un des intérêts des colonnes de type |V| par rapport aux +colonnes de type |p|, |m| ou |b| est que, pour les cellules d'une telle colonne, +le nœud PGF/Tikz créé pour le contenu d'une telle cellule a une largeur ajusté +au contenu de la cellule en question : cf. p.~\pageref{node-V}. + \subsection{Les colonnes X} @@ -1968,37 +2046,42 @@ $\begin{array}{c} \colorbox{yellow!50}{\textbf{Nouveau 6.0}} +\smallskip L'environnement |{NiceTabular}| propose aussi des colonnes |X| similaires à celles proposées par l'environnement |{tabularx}| de l'extension éponyme. La valeur requise par la largeur du tableau peut être passée en argument de la -clé |width|. La valeur initiale de ce paramètre est |\linewidth|. +clé |width| (dans |{NiceTabular}| ou dans |\NiceMatrixOptions|). La valeur +initiale de ce paramètre est |\linewidth| (et non |\textwidth|). Pour se rapprocher davantage de l'environnement |{tabularx}|, \pkg{nicematrix} propose aussi un environnement |{NiceTabularX}| qui prend en premier argument (obligatoire) la largeur voulue pour le tableau.\footnote{Si \pkg{tabularx} est chargé, on doit obligatoirement utiliser |{NiceTabularX}| pour utiliser les - colonnes `X` (ceci est dû à un problème de conflit de définition des - spécificateurs de colonne `X`).} + colonnes |X| (ceci est dû à un problème de conflit de définition des + spécificateurs de colonne |X|).} Comme avec les extensions \pkg{tabu} et \pkg{tabularray}, le spécificateur |X| accepte entre crochets un argument optionnel qui est une liste de clés. \begin{itemize} \item On peut spécifier un poids pour la colonne en mettant directement un -entier comme argument du spécificateur |X|. Par exemple, une colonne |X[2]| aura -une largeur double de celle d'une colonne |X| (qui a un poids de 1). +entier positif comme argument du spécificateur |X|. Par exemple, une colonne +|X[2]| aura une largeur double de celle d'une colonne |X| (qui a un poids de +1).\footnote{Les valeurs négatives pour les poids, comme proposées par + \pkg{tabu} (maintenant obsolète), ne sont pas prises en charge par + \pkg{nicematrix}. Si une telle valeur est utilisée, une erreur sera levée.} \item On peut spécifier l'alignement horizontal avec une des lettres |l|, |c| et |r| (qui insèrent respectivement |\raggedright|, |\centering| et |\raggedleft| suivi de |\arraybackslash|). \item On peut spécifier l'alignement vertical avec l'une des lettres |t| (alias |p|), |m| et |b| (qui construisent respectivement des colonnes de types |p|, |m| -et |b|). La valeur par défaut est |t|. +et |b|). La valeur par défaut est |t|. \end{itemize} \begin{Verbatim} \begin{NiceTabular}~emphase#[width=9cm]{X[2,l]X[l]}@[hvlines] -Un texte relativement long qui tient sur plusieurs lignes. & +Un texte relativement long qui tient sur plusieurs lignes. & Un texte relativement long qui tient sur plusieurs lignes. \\ Un texte plus court. & Un texte plus court. \end{NiceTabular} @@ -2007,13 +2090,13 @@ Un texte plus court. & Un texte plus court. \begin{center} \begin{NiceTabular}[width=9cm]{X[2,l]X[l]}[hvlines] -Un texte relativement long qui tient sur plusieurs lignes. & +Un texte relativement long qui tient sur plusieurs lignes. & Un texte relativement long qui tient sur plusieurs lignes. \\ Un texte plus court. & Un texte plus court. \end{NiceTabular} \end{center} -\bigskip +\medskip \section{Les rangées et colonnes extérieures} Les environnements de \pkg{nicematrix} permettent de composer des rangées et des colonnes «extérieures» grâce aux options |first-row|, |last-row|, |first-col| et @@ -2030,7 +2113,7 @@ L_1 & a_{11} & a_{12} & a_{13} & a_{14} & L_1 \\ \Vdots & a_{21} & a_{22} & a_{23} & a_{24} & \Vdots \\ & a_{31} & a_{32} & a_{33} & a_{34} & \\ L_4 & a_{41} & a_{42} & a_{43} & a_{44} & L_4 \\ - & C_1 & \Cdots & & C_4 & + & C_1 & \Cdots & & C_4 & \end{pNiceMatrix}$ \end{Verbatim} % @@ -2040,14 +2123,14 @@ L_1 & a_{11} & a_{12} & a_{13} & a_{14} & L_1 \\ \Vdots & a_{21} & a_{22} & a_{23} & a_{24} & \Vdots \\ & a_{31} & a_{32} & a_{33} & a_{34} & \\ L_4 & a_{41} & a_{42} & a_{43} & a_{44} & L_4 \\ - & C_1 & \Cdots & & C_4 & + & C_1 & \Cdots & & C_4 & \end{pNiceMatrix}\] \medskip Les lignes pointillées ont été tracées avec les outils qui seront présentés p.~\pageref{Cdots}. -\bigskip +\medskip Il y a plusieurs remarques à formuler. % \begin{itemize}[beginpenalty=10000] @@ -2088,7 +2171,7 @@ C'est ce que nous ferons dans la suite. -\bigskip +\medskip On peut contrôler l'apparence de ces rangées et colonnes avec les options |code-for-first-row|, |code-for-last-row|, |code-for-first-col| et |code-for-last-col|. Ces options sont des listes de tokens qui seront insérées @@ -2106,7 +2189,7 @@ L_1 & a_{11} & a_{12} & a_{13} & a_{14} & L_1 \\ \hline & a_{31} & a_{32} & a_{33} & a_{34} & \\ L_4 & a_{41} & a_{42} & a_{43} & a_{44} & L_4 \\ - & C_1 & \Cdots & & C_4 & + & C_1 & \Cdots & & C_4 & \end{pNiceArray}$ \end{Verbatim} % @@ -2123,7 +2206,7 @@ L_1 & a_{11} & a_{12} & a_{13} & a_{14} & L_1 \\ \hline & a_{31} & a_{32} & a_{33} & a_{34} & \\ L_4 & a_{41} & a_{42} & a_{43} & a_{44} & L_4 \\ - & C_1 & \multicolumn1c{\Cdots} & & C_4 & + & C_1 & \multicolumn1c{\Cdots} & & C_4 & \end{pNiceArray} \end{displaymath} \end{scope} @@ -2148,7 +2231,7 @@ colonne». la commande |\\| après la «première rangée» ou avant la «dernière rangée». Le placement des délimiteurs serait erroné. Pour contourner cette restriction, on pourra envisager d'utiliser la commande |\SubMatrix| dans le |\CodeAfter| (cf. -p.~\pageref{sub-matrix}). +p.~\pageref{sub-matrix}). \end{itemize} @@ -2180,14 +2263,14 @@ avec l'option~|color|.\footnote{Il est aussi possible de changer la couleur de rappeler que cela s'applique à |\Cdots|, |\Ldots|, |Vdots|, etc.) : cf. p.~\pageref{customization}). }\par\nobreak -\bigskip +\medskip \begin{BVerbatim}[baseline=c,boxwidth=10cm] \begin{bNiceMatrix} a_1 & \Cdots & & & a_1 \\ \Vdots & a_2 & \Cdots & & a_2 \\ & \Vdots & \Ddots[color=red] \\ \\ -a_1 & a_2 & & & a_n +a_1 & a_2 & & & a_n \end{bNiceMatrix} \end{BVerbatim} $\begin{bNiceMatrix} @@ -2195,7 +2278,7 @@ a_1 & \Cdots & & & a_1 \\ \Vdots & a_2 & \Cdots & & a_2 \\ & \Vdots & \Ddots[color=red] \\ \\ -a_1 & a_2 & & & a_n +a_1 & a_2 & & & a_n \end{bNiceMatrix}$ @@ -2204,67 +2287,67 @@ a_1 & a_2 & & & a_n \interitem Pour représenter la matrice nulle, on peut choisir d'utiliser le codage suivant :\par\nobreak -\bigskip +\medskip \begin{BVerbatim}[baseline=c,boxwidth=10cm] \begin{bNiceMatrix} 0 & \Cdots & 0 \\ \Vdots & & \Vdots \\ -0 & \Cdots & 0 +0 & \Cdots & 0 \end{bNiceMatrix} \end{BVerbatim} $\begin{bNiceMatrix} 0 & \Cdots & 0 \\ \Vdots & & \Vdots \\ -0 & \Cdots & 0 +0 & \Cdots & 0 \end{bNiceMatrix}$ -\bigskip +\medskip On peut néanmoins souhaiter une matrice plus grande. Habituellement, dans un tel cas, les utilisateurs de LaTeX ajoutent une nouvelle ligne et une nouvelle colonne. Il est possible d'utiliser la même méthode avec \pkg{nicematrix} :\par\nobreak -\bigskip +\medskip \begin{BVerbatim}[baseline=c,boxwidth=10cm] \begin{bNiceMatrix} 0 & \Cdots & \Cdots & 0 \\ \Vdots & & & \Vdots \\ \Vdots & & & \Vdots \\ -0 & \Cdots & \Cdots & 0 +0 & \Cdots & \Cdots & 0 \end{bNiceMatrix} \end{BVerbatim} $\begin{bNiceMatrix} 0 & \Cdots & \Cdots & 0 \\ \Vdots & & & \Vdots \\ \Vdots & & & \Vdots \\ -0 & \Cdots & \Cdots & 0 +0 & \Cdots & \Cdots & 0 \end{bNiceMatrix}$ -\bigskip +\medskip Dans la première colonne de cet exemple, il y a deux instructions |\Vdots| mais, bien entendu, une seule ligne en pointillés sera. -\bigskip +\medskip En fait, dans cet exemple, il aurait été possible de tracer la même matrice plus rapidement avec le codage suivant :\par\nobreak -\bigskip +\medskip \begin{BVerbatim}[baseline=c,boxwidth=10cm] \begin{bNiceMatrix} 0 & \Cdots & & 0 \\ \Vdots & & & \\ & & & \Vdots \\ -0 & & \Cdots & 0 +0 & & \Cdots & 0 \end{bNiceMatrix} \end{BVerbatim} $\begin{bNiceMatrix} 0 & \Cdots & & 0 \\ \Vdots & & & \\ & & & \Vdots \\ -0 & & \Cdots & 0 +0 & & \Cdots & 0 \end{bNiceMatrix}$ -\bigskip +\medskip Il y a aussi d'autres moyens de changer la taille d'une matrice. On pourrait vouloir utiliser l'argument optionnel de la commande~|\\| pour l'espacement vertical et la commande~|\hspace*| dans une case pour l'espacement @@ -2279,18 +2362,18 @@ lignes en pointillés. C'est pourquoi l'extension \pkg{nicematrix} fournit une commande~|\Hspace| qui est une variante de |\hspace| transparente pour la construction des lignes en pointillés de \pkg{nicematrix}.\par\nobreak -\bigskip +\medskip \begin{BVerbatim}[baseline=c,boxwidth=10cm] \begin{bNiceMatrix} 0 & \Cdots & ~emphase#\Hspace*{1cm}@ & 0 \\ \Vdots & & & \Vdots \\~emphase#[1cm]@ -0 & \Cdots & & 0 +0 & \Cdots & & 0 \end{bNiceMatrix} \end{BVerbatim} $\begin{bNiceMatrix} 0 & \Cdots & \Hspace*{1cm} & 0 \\ \Vdots & & & \Vdots \\[1cm] -0 & \Cdots & & 0 +0 & \Cdots & & 0 \end{bNiceMatrix}$ \subsection{L'option nullify-dots} @@ -2302,16 +2385,16 @@ l'environnement |{pmatrix}| de \pkg{amsmath}.\par\nobreak \begin{BVerbatim}[baseline=c,boxwidth=10cm] $A = \begin{pmatrix} h & i & j & k & l & m \\ -x & & & & & x +x & & & & & x \end{pmatrix}$ \end{BVerbatim} $A = \begin{pmatrix} h & i & j & k & l & m \\ -x & & & & & x +x & & & & & x \end{pmatrix}$ -\bigskip +\medskip Si nous ajoutons des instructions |\ldots| dans la seconde rangée, la géométrie de la matrice est modifiée.\par\nobreak @@ -2319,15 +2402,15 @@ de la matrice est modifiée.\par\nobreak \begin{BVerbatim}[baseline=c,boxwidth=10cm] $B = \begin{pmatrix} h & i & j & k & l & m \\ -x & \ldots & \ldots & \ldots & \ldots & x +x & \ldots & \ldots & \ldots & \ldots & x \end{pmatrix}$ \end{BVerbatim} $B = \begin{pmatrix} h & i & j & k & l & m \\ -x & \ldots & \ldots & \ldots & \ldots & x +x & \ldots & \ldots & \ldots & \ldots & x \end{pmatrix}$ -\bigskip +\medskip Par défaut, avec \pkg{nicematrix}, si nous remplaçons |{pmatrix}| par |{pNiceMatrix}| et |\ldots| par |\Ldots|, la géométrie de la matrice n'est pas changée.\par\nobreak @@ -2336,15 +2419,15 @@ changée.\par\nobreak \begin{BVerbatim}[baseline=c,boxwidth=10cm] $C = \begin{pNiceMatrix} h & i & j & k & l & m \\ -x & \Ldots & \Ldots & \Ldots & \Ldots & x +x & \Ldots & \Ldots & \Ldots & \Ldots & x \end{pNiceMatrix}$ \end{BVerbatim} $C = \begin{pNiceMatrix} h & i & j & k & l & m \\ -x & \Ldots & \Ldots & \Ldots & \Ldots & x +x & \Ldots & \Ldots & \Ldots & \Ldots & x \end{pNiceMatrix}$ -\bigskip +\medskip On pourrait toutefois préférer la géométrie de la première matrice $A$ et vouloir avoir la même géométrie avec une ligne en pointillés continue dans la seconde rangée. C'est possible en utilisant l'option |nullify-dots| (et une @@ -2354,12 +2437,12 @@ seule instruction |\Ldots| suffit).\par\nobreak \begin{BVerbatim}[baseline=c,boxwidth=10cm] $D = \begin{pNiceMatrix}[~emphase#nullify-dots@] h & i & j & k & l & m \\ -x & \Ldots & & & & x +x & \Ldots & & & & x \end{pNiceMatrix}$ \end{BVerbatim} $D = \begin{pNiceMatrix}[nullify-dots] h & i & j & k & l & m \\ -x & \Ldots & & & & x +x & \Ldots & & & & x \end{pNiceMatrix}$ \medskip @@ -2385,17 +2468,17 @@ $\begin{pNiceMatrix} 1 & 2 & 3 & 4 & 5 \\ 1 & ~emphase#\Hdotsfor{3}@ & 5 \\ 1 & 2 & 3 & 4 & 5 \\ -1 & 2 & 3 & 4 & 5 +1 & 2 & 3 & 4 & 5 \end{pNiceMatrix}$ \end{BVerbatim} $\begin{pNiceMatrix} 1 & 2 & 3 & 4 & 5 \\ 1 & \Hdotsfor{3} & 5 \\ 1 & 2 & 3 & 4 & 5 \\ -1 & 2 & 3 & 4 & 5 +1 & 2 & 3 & 4 & 5 \end{pNiceMatrix}$ -\bigskip +\medskip Néanmoins, si ces cases sont vides, la ligne en pointillés s'étend seulement dans les cases spécifiées par l'argument de |\Hdotsfor| (par conception). @@ -2405,14 +2488,14 @@ $\begin{pNiceMatrix} 1 & 2 & 3 & 4 & 5 \\ & ~emphase#\Hdotsfor{3}@ \\ 1 & 2 & 3 & 4 & 5 \\ -1 & 2 & 3 & 4 & 5 +1 & 2 & 3 & 4 & 5 \end{pNiceMatrix}$ \end{BVerbatim} $\begin{pNiceMatrix} 1 & 2 & 3 & 4 & 5 \\ & \Hdotsfor{3} \\ 1 & 2 & 3 & 4 & 5 \\ -1 & 2 & 3 & 4 & 5 +1 & 2 & 3 & 4 & 5 \end{pNiceMatrix}$ \medskip @@ -2423,27 +2506,27 @@ commande |\Hdotsfor| est utilisable même lorsque l'extension est chargée (mais vous risquez d'avoir des problèmes si vous utilisez |\rowcolor| sur la même rangée que |\Hdotsfor|). -\bigskip +\medskip L'extension \pkg{nicematrix} propose aussi une commande |\Vdotsfor| similaire à |\Hdotsfor| mais traçant des lignes verticales. -\bigskip +\medskip L'exemple suivant utilise à la fois |\Hdotsfor| et |\Vdotsfor|: \begin{Verbatim}[formatcom=\small\color{gray}] \begin{bNiceMatrix} -C[a_1,a_1] & \Cdots & C[a_1,a_n] +C[a_1,a_1] & \Cdots & C[a_1,a_n] & \hspace*{20mm} & C[a_1,a_1^{(p)}] & \Cdots & C[a_1,a_n^{(p)}] \\ -\Vdots & \Ddots & \Vdots - & ~emphase#\Hdotsfor{1}@ & \Vdots & \Ddots & \Vdots \\ -C[a_n,a_1] & \Cdots & C[a_n,a_n] +\Vdots & \Ddots & \Vdots + & ~emphase#\Hdotsfor{1}@ & \Vdots & \Ddots & \Vdots \\ +C[a_n,a_1] & \Cdots & C[a_n,a_n] & & C[a_n,a_1^{(p)}] & \Cdots & C[a_n,a_n^{(p)}] \\ \rule{0pt}{15mm}\NotEmpty & ~emphase#\Vdotsfor{1}@ & & \Ddots & & ~emphase#\Vdotsfor{1}@ \\ -C[a_1^{(p)},a_1] & \Cdots & C[a_1^{(p)},a_n] +C[a_1^{(p)},a_1] & \Cdots & C[a_1^{(p)},a_n] & & C[a_1^{(p)},a_1^{(p)}] & \Cdots & C[a_1^{(p)},a_n^{(p)}] \\ -\Vdots & \Ddots & \Vdots - & ~emphase#\Hdotsfor{1}@ & \Vdots & \Ddots & \Vdots \\ -C[a_n^{(p)},a_1] & \Cdots & C[a_n^{(p)},a_n] +\Vdots & \Ddots & \Vdots + & ~emphase#\Hdotsfor{1}@ & \Vdots & \Ddots & \Vdots \\ +C[a_n^{(p)},a_1] & \Cdots & C[a_n^{(p)},a_n] & & C[a_n^{(p)},a_1^{(p)}] & \Cdots & C[a_n^{(p)},a_n^{(p)}] \end{bNiceMatrix} \end{Verbatim} @@ -2451,11 +2534,11 @@ C[a_n^{(p)},a_1] & \Cdots & C[a_n^{(p)},a_n] \[\begin{bNiceMatrix} C[a_1,a_1] & \Cdots & C[a_1,a_n] & \hspace*{20mm} & C[a_1,a_1^{(p)}] & \Cdots & C[a_1,a_n^{(p)}] \\ -\Vdots & \Ddots & \Vdots & \Hdotsfor{1} & \Vdots & \Ddots & \Vdots \\ +\Vdots & \Ddots & \Vdots & \Hdotsfor{1} & \Vdots & \Ddots & \Vdots \\ C[a_n,a_1] & \Cdots & C[a_n,a_n] & & C[a_n,a_1^{(p)}] & \Cdots & C[a_n,a_n^{(p)}] \\ \rule{0pt}{15mm}\NotEmpty & \Vdotsfor{1} & & \Ddots & & \Vdotsfor{1} \\ C[a_1^{(p)},a_1] & \Cdots & C[a_1^{(p)},a_n] & & C[a_1^{(p)},a_1^{(p)}] & \Cdots & C[a_1^{(p)},a_n^{(p)}] \\ -\Vdots & \Ddots & \Vdots & \Hdotsfor{1} & \Vdots & \Ddots & \Vdots \\ +\Vdots & \Ddots & \Vdots & \Hdotsfor{1} & \Vdots & \Ddots & \Vdots \\ C[a_n^{(p)},a_1] & \Cdots & C[a_n^{(p)},a_n] & & C[a_n^{(p)},a_1^{(p)}] & \Cdots & C[a_n^{(p)},a_n^{(p)}] \end{bNiceMatrix}\] @@ -2476,7 +2559,7 @@ points de suspension, on peut souhaiter utiliser les lignes pointillées de \smallskip \begin{itemize} -\item L'option |renew-dots|\par\nobreak +\item L'option |renew-dots|\par\nobreak Avec cette option, les commandes |\ldots|, |\cdots|, |\vdots|, |\ddots|, |\iddots|\footnotemark[\thefniddots] et |\hdotsfor| sont redéfinies dans les @@ -2485,17 +2568,17 @@ environnements de \pkg{nicematrix} et agissent alors comme |\Ldots|, |\Cdots|, suspension «automatiques» de |amsmath|) est aussi redéfinie et se comporte comme |\Ldots|. -\item L'option |renew-matrix|\par\nobreak +\item L'option |renew-matrix|\par\nobreak Avec cette option, l'environnement |{matrix}| est redéfini et se comporte comme |{NiceMatrix}| et il en est de même pour les cinq variantes. \end{itemize} -\bigskip +\medskip Par conséquent, avec les options |renew-dots| et |renew-matrix|, un code classique donne directement le résultat fourni par \pkg{nicematrix}.\par\nobreak -\bigskip +\medskip \begin{scope} \NiceMatrixOptions{renew-dots,renew-matrix} \begin{BVerbatim}[baseline=c,boxwidth=10cm] @@ -2529,13 +2612,13 @@ mathématique avec |\scriptstyle|. $\begin{bNiceMatrix} 1 & \hspace*{1cm} & 0 \\[8mm] & ~emphase#\Ddots^{n \text{ fois}}@ & \\ -0 & & 1 +0 & & 1 \end{bNiceMatrix}$ \end{BVerbatim} $\begin{bNiceMatrix} 1 & \hspace*{1cm} & 0 \\[8mm] & \Ddots^{n \text{ fois}} & \\ -0 & & 1 +0 & & 1 \end{bNiceMatrix}$ \subsection{Personnalisation des lignes en pointillés} @@ -2549,7 +2632,7 @@ options (que l'on met entre crochets après la commande) : % \begin{itemize} \item |color| ; -\item |shorten| ; +\item |shorten| ; \item |line-style|. \end{itemize} @@ -2559,13 +2642,13 @@ de |\CodeAfter|, ou bien au niveau d'un environnement mais elles doivent alors % \begin{itemize} \item |xdots/color| ; -\item |xdots/shorten| ; +\item |xdots/shorten| ; \item |xdots/line-style|. \end{itemize} % Pour la clarté, dans la suite, on utilisera ces noms-là. -\bigskip +\medskip \textbf{L'option xdots/color}\par\nobreak \smallskip @@ -2575,7 +2658,7 @@ extérieures (décrites plus loin) bénéficient d'un régime spécial : cf. p.~\pageref{exterior}. -\bigskip +\medskip \textbf{L'option xdots/shorten}\par\nobreak \smallskip @@ -2586,7 +2669,7 @@ valeur initiale de ce paramètre est de $0.3$~em (il est conseillé d'utiliser u unité de mesure dépendante de la fonte courante). -\bigskip +\medskip \textbf{L'option xdots/line-style}\par\nobreak \smallskip @@ -2603,7 +2686,7 @@ Il faut savoir que, par défaut, les lignes de Tikz tracées avec le paramètre \end{BVerbatim} \tikz \draw [dotted] (0,0) -- (5,0) ; -\bigskip +\medskip Voulant proposer des lignes avec des points ronds dans le style de celui de |\ldots| (au moins celui des fontes \emph{Computer Modern}), l'extension \pkg{nicematrix} contient en interne son propre système de ligne en pointillés @@ -2611,10 +2694,10 @@ Voulant proposer des lignes avec des points ronds dans le style de celui de appelé le style |standard|. Cette valeur est la valeur initiale du paramètre |xdots/line-style|. -\bigskip +\medskip Néanmoins (quand Tikz est chargé), on peut utiliser pour |xdots/line-style| n'importe quel style proposé par Tikz, c'est-à-dire n'importe quelle suite -d'options Tikz applicables à un chemin (à l'exception de «|color|», +d'options Tikz applicables à un chemin (à l'exception de «|color|», «|shorten >|» et «|shorten <|»). \medskip @@ -2623,7 +2706,7 @@ Voici par exemple une matrice tridiagonale avec le style |loosely dotted| :\par\ \medskip \begin{BVerbatim}[baseline=c] $\begin{pNiceMatrix}[nullify-dots,~emphase#xdots/line-style=loosely dotted@] -a & b & 0 & & \Cdots & 0 \\ +a & b & 0 & & \Cdots & 0 \\ b & a & b & \Ddots & & \Vdots \\ 0 & b & a & \Ddots & & \\ & \Ddots & \Ddots & \Ddots & & 0 \\ @@ -2634,7 +2717,7 @@ b & a & b & \Ddots & & \Vdots \\ \[\begin{pNiceMatrix}[nullify-dots,xdots/line-style=loosely dotted] -a & b & 0 & & \Cdots & 0 \\ +a & b & 0 & & \Cdots & 0 \\ b & a & b & \Ddots & & \Vdots \\ 0 & b & a & \Ddots & & \\ & \Ddots & \Ddots & \Ddots & & 0 \\ @@ -2681,18 +2764,18 @@ sera exécuté \emph{après} la construction du tableau. \medskip Pour améliorer la lisibilité du code, une syntaxe alternative est proposée : on peut spécifier les instructions du |code-after| à la fin de l'environnement, -après le mot-clé |\CodeAfter|. Bien que ce soit un mot-clé, |\CodeAfter| accepte -quand même un argument optionnel (entre crochets). Les clés autorisées forment -un sous-ensemble des clés acceptées par |\NiceMatrixOptions|. +après le mot-clé |\CodeAfter|. Bien que ce soit un mot-clé, |\CodeAfter| +accepte quand même un argument optionnel (entre crochets). Les clés autorisées +forment un sous-ensemble des clés acceptées par |\NiceMatrixOptions|. \medskip Les utilisateurs expérimentés peuvent, en particulier, utiliser les nœuds PGF/Tikz créés par \pkg{nicematrix} dans le |\CodeAfter|. Ces nœuds sont décrits à partir de la page \pageref{PGF-nodes}. - + \medskip Par ailleurs, deux commandes spéciales sont disponibles dans le |\CodeAfter| : -|\line| et |\SubMatrix|. +|\line| et |\SubMatrix|. On va maintenant détailler ces deux commandes. \subsection{La commande \textbackslash line dans le \textbackslash CodeAfter} @@ -2703,7 +2786,7 @@ les cases. Elle prend deux arguments correspondant aux deux cases à relier, chacun de la forme $i$-$j$ où $i$ est le numéro de ligne et $j$ est le numéro de colonne. Les options disponibles pour personnaliser les lignes pointillées créées par |\Cdots|, |\Vdots|, etc. peuvent aussi être passées à cette commande (cf. -p.~\pageref{customization}). +p.~\pageref{customization}). \medskip Cette commande peut par exemple être utilisée pour tracer une ligne entre deux @@ -2731,7 +2814,7 @@ I & 0 & \Cdots &0 \\ \end{pNiceMatrix}$ \end{scope} -\bigskip +\medskip Elle peut aussi être utilisée pour tracer une ligne diagonale non parallèle aux autres lignes diagonales (par défaut, les lignes tracées par |\Ddots| sont «parallélisées» : cf.~p.~\pageref{parallelization}). @@ -2742,7 +2825,7 @@ autres lignes diagonales (par défaut, les lignes tracées par |\Ddots| sont 1 & \Cdots & & 1 & 2 & \Cdots & 2 \\ 0 & \Ddots & & \Vdots & \Vdots & \hspace*{2.5cm} & \Vdots \\ \Vdots & \Ddots & & & & & \\ -0 & \Cdots & 0 & 1 & 2 & \Cdots & 2 +0 & \Cdots & 0 & 1 & 2 & \Cdots & 2 ~emphase#\CodeAfter \line[shorten=6pt]{1-5}{4-7}@ \end{bNiceMatrix} \end{BVerbatim} @@ -2750,7 +2833,7 @@ autres lignes diagonales (par défaut, les lignes tracées par |\Ddots| sont 1 & \Cdots & & 1 & 2 & \Cdots & 2 \\ 0 & \Ddots & & \Vdots & \Vdots & \hspace*{2.5cm} & \Vdots \\ \Vdots & \Ddots & & & & & \\ -0 & \Cdots & 0 & 1 & 2 & \Cdots & 2 +0 & \Cdots & 0 & 1 & 2 & \Cdots & 2 \CodeAfter \line[shorten=6pt]{1-5}{4-7} \end{bNiceMatrix}\] @@ -2793,7 +2876,7 @@ colonne avec |@{\hspace{1.5em}}| dans le préambule du tableau. \[\begin{NiceArray}{ccc~emphase#@{\hspace{1.5em}}+c}[cell-space-limits=2pt,~emphase#margin+] 1 & 1 & 1 & x \\ \dfrac{1}{4} & \dfrac{1}{2} & \dfrac{1}{4} & y \\ - 1 & 2 & 3 & z + 1 & 2 & 3 & z \CodeAfter ~emphase#\SubMatrix({1-1}{3-3})+ ~emphase#\SubMatrix({1-4}{3-4})+ @@ -2803,16 +2886,16 @@ colonne avec |@{\hspace{1.5em}}| dans le préambule du tableau. $\begin{NiceArray}{ccc@{\hspace{1.5em}}c}[cell-space-limits=2pt,margin] 1 & 1 & 1 & x \\ \dfrac{1}{4} & \dfrac{1}{2} & \dfrac{1}{4} & y \\ - 1 & 2 & 3 & z + 1 & 2 & 3 & z \CodeAfter \SubMatrix({1-1}{3-3}) \SubMatrix({1-4}{3-4}) \end{NiceArray}$ -\bigskip -\colorbox{yellow!50}{\bfseries Nouveau 5.18}\enskip La commande |\SubMatrix| -accepte en fait également deux arguments optionnels spécifiés par les symboles -traditionnels |^| et |_| pour des éléments en exposant et en indice. +\medskip +La commande |\SubMatrix| accepte en fait également deux arguments optionnels +spécifiés par les symboles traditionnels |^| et |_| pour des éléments en +exposant et en indice. \medskip \begin{scope} @@ -2821,7 +2904,7 @@ traditionnels |^| et |_| pour des éléments en exposant et en indice. $\begin{bNiceMatrix}[right-margin=1em] 1 & 1 & 1 \\ 1 & a & b \\ -1 & c & d +1 & c & d \CodeAfter ~emphase#\SubMatrix[{2-2}{3-3}]^{T}@ \end{bNiceMatrix}$ @@ -2829,14 +2912,14 @@ $\begin{bNiceMatrix}[right-margin=1em] $\begin{bNiceMatrix}[right-margin=1em] 1 & 1 & 1 \\ 1 & a & b \\ -1 & c & d +1 & c & d \CodeAfter \SubMatrix[{2-2}{3-3}]^{T} \end{bNiceMatrix}$ \end{scope} -\bigskip +\medskip Les clés disponibles pour la commande |\SubMatrix| sont les suivantes : % \begin{itemize} @@ -2861,13 +2944,13 @@ verticaux sont tracés) ; On remarquera que tous ces filets sont dessinés après la construction du tableau principal : les colonnes et les rangées ne sont pas écartées. -\bigskip +\medskip Ces clés sont aussi accessibles dans |\NiceMatrixOptions|, au niveau des environnements de \pkg{nicematrix} ou comme option de |\CodeAfter| avec le préfixe |sub-matrix|, c'est-à-dire qu'elles sont alors nommées |sub-matrix/left-xshift|, |sub-matrix/right-xshift|, |sub-matrix/xshift|, etc. -\bigskip +\medskip \begin{scope} \hfuzz=12cm \fvset{commandchars=\~\#\!}% @@ -2877,9 +2960,9 @@ $\begin{NiceArray}{cc@{\hspace{5mm}}l}[cell-space-limits=2pt] & & \frac14 \\[1mm] a & b & \frac12a+\frac14b \\ c & d & \frac12c+\frac14d \\ -\CodeAfter - \SubMatrix({1-3}{2-3}) - \SubMatrix({3-1}{4-2}) +\CodeAfter + \SubMatrix({1-3}{2-3}) + \SubMatrix({3-1}{4-2}) \SubMatrix({3-3}{4-3}) \end{NiceArray}$ \end{BVerbatim} @@ -2915,7 +2998,7 @@ c & d & \frac12c+\frac14d \\ \end{NiceArray}$ \end{BVerbatim} \end{scope} -% +% $\begin{NiceArray}{cc@{\hspace{5mm}}l}[cell-space-limits=2pt] & & \frac12 \\ & & \frac14 \\[1mm] @@ -2928,12 +3011,12 @@ c & d & \frac12c+\frac14d \\ \end{NiceArray}$ -\bigskip +\medskip Il existe aussi une clé |name| qui permet de donner un nom à une sous-matrice créée par une commande |\SubMatrix|. Ce nom est utilisé pour créer des nœuds PGF/Tikz : voir p.~\pageref{node-sub-matrix}. -\bigskip +\medskip Il est également possible de spécifier des délimiteurs\footnote{Les délimiteurs en question sont |(|, |[| et |\{| et les fermants correspondants. On peut bien sûr aussi mettre des \verb+|+ et des \verb+||+ dans le @@ -2950,14 +3033,14 @@ automatiquement. $\begin{pNiceArray}{~emphase#(c)(c)(c)@} a_{11} & a_{12} & a_{13} \\ a_{21} & \displaystyle \int_0^1\dfrac{1}{x^2+1}\,dx & a_{23} \\ -a_{31} & a_{32} & a_{33} +a_{31} & a_{32} & a_{33} \end{pNiceArray}$ \end{BVerbatim} \[\begin{pNiceArray}{(c)(c)(c)} a_{11} & a_{12} & a_{13} \\ a_{21} & \displaystyle \int_0^1\dfrac{1}{x^2+1}\,dx & a_{23} \\ -a_{31} & a_{32} & a_{33} +a_{31} & a_{32} & a_{33} \end{pNiceArray}\] @@ -3004,7 +3087,7 @@ permet de spécifier des notes qui seront composées à la fin du tableau avec u longueur de ligne égale à la largeur du tableau (hors éventuelles colonnes extérieures). Sans surprise, cette commande n'est disponible que dans les environnements sans délimiteurs, c'est-à-dire |{NiceTabular}|, |{NiceArray}| et -|{NiceMatrix}|. +|{NiceMatrix}|. En fait, cette commande n'est disponible que si l'extension \pkg{enumitem} a été chargée (avant ou après \pkg{nicematrix}). Les notes sont en effet composées en @@ -3033,9 +3116,9 @@ Dupont & Chantal & 15 janvier 1998 \\ \toprule \RowStyle{\bfseries} Nom & Prénom & Date de naissance \\ \midrule -Achard\tabularnote{La famille Achard est une très ancienne famille du Poitou.} +Achard\tabularnote{La famille Achard est une très ancienne famille du Poitou.} & Jacques & 5 juin 1962 \\ -Lefebvre\tabularnote{Le patronyme Lefebvre est une altération de Lefébure.} +Lefebvre\tabularnote{Le patronyme Lefebvre est une altération de Lefébure.} & Mathilde & 23 mai 1988 \\ Vanesse & Stéphanie & 30 octobre 1994 \\ Dupont & Chantal & 15 janvier 1998 \\ @@ -3045,7 +3128,7 @@ Dupont & Chantal & 15 janvier 1998 \\ -\bigskip +\medskip \begin{itemize} \item La commande |\tabularnote| est en fait utilisable avant l'environnement de \pkg{nicematrix}, le but étant de pouvoir l'utiliser sur le @@ -3138,13 +3221,13 @@ Wallis & John & 87 \\ Les notes de tableau peuvent être personnalisées grâce à un ensemble de clés disponibles dans |\NiceMatrixOptions|. Ces clés ont un nom préfixé par |notes| : \begin{itemize} -\item |notes/para| -\item |notes/bottomrule| -\item |notes/style| -\item |notes/label-in-tabular| -\item |notes/label-in-list| -\item |notes/enumitem-keys| -\item |notes/enumitem-keys-para| +\item |notes/para| +\item |notes/bottomrule| +\item |notes/style| +\item |notes/label-in-tabular| +\item |notes/label-in-list| +\item |notes/enumitem-keys| +\item |notes/enumitem-keys-para| \item |notes/code-before| \end{itemize} Pour la commmodité, il est aussi possible de fixer ces clés dans @@ -3155,12 +3238,12 @@ paires \textsl{clé=valeur} où le nom des clés n'a plus à être préfixé par \begin{BVerbatim}[formatcom = \small \color{gray}] \NiceMatrixOptions { - notes = + notes = { bottomrule , style = ... , label-in-tabular = ... , - enumitem-keys = + enumitem-keys = { labelsep = ... , align = ... , @@ -3175,12 +3258,12 @@ paires \textsl{clé=valeur} où le nom des clés n'a plus à être préfixé par -\bigskip +\medskip On détaille maintenant ces clés. \begin{itemize}[itemsep=\medskipamount] \item La clé |notes/para| demande la composition des notes en fin de tableau en un seul -paragraphe. +paragraphe. Valeur initiale : |false| @@ -3201,7 +3284,7 @@ utilisé par |\ref| pour faire référence à une note de tableau pour laquelle utilisé un |\label|. Ce sont les labels mis en forme avec ce style qui sont séparés par des virgules quand on utilise plusieurs commandes |\tabularnote| successivement. Le marqueur |#1| est censé correspondre à un nom de compteur -LaTeX. +LaTeX. Valeur initiale : |\textit{\alph{#1}}| @@ -3282,7 +3365,7 @@ dernière est une commande de \pkg{ragged2e}). -\bigskip +\medskip Pour un exemple de personnalisation des notes de tableau, voir p.~\pageref{ex:notes}. @@ -3296,7 +3379,7 @@ suivant (avec une version de LaTeX postérieure à 2020/10/01). \begin{Verbatim}[commandchars=\~\#\!] \makeatletter \AddToHook{env/threeparttable/begin} - {\TPT@hookin{NiceTabular}\TPT@hookin{NiceTabular*}\TPT@hookin{NiceTabularX}} + {\TPT@hookin{NiceTabular}\TPT@hookin{NiceTabular*}\TPT@hookin{NiceTabularX}} \makeatother \end{Verbatim} @@ -3308,7 +3391,7 @@ suivant (avec une version de LaTeX postérieure à 2020/10/01). Si l'extension \pkg{siunitx} est chargée (avant ou après \pkg{nicematrix}), il est possible d'utiliser les colonnes de type |S| de \pkg{siunitx} dans les environnements de \pkg{nicematrix}. L'implémentation n'utilise explicitement -aucune macro privée de \pkg{siunitx}. +aucune macro privée de \pkg{siunitx}. \medskip \begin{BVerbatim}[baseline = c, boxwidth = 10.6cm] @@ -3317,7 +3400,7 @@ $\begin{pNiceArray}{~emphase#S@cW{c}{1cm}c}[nullify-dots,first-row] 2.3 & 0 & \Cdots & 0 \\ 12.4 & \Vdots & & \Vdots \\ 1.45 \\ -7.2 & 0 & \Cdots & 0 +7.2 & 0 & \Cdots & 0 \end{pNiceArray}$ \end{BVerbatim} $\begin{pNiceArray}{ScW{c}{1cm}c}[nullify-dots,first-row] @@ -3325,7 +3408,7 @@ $\begin{pNiceArray}{ScW{c}{1cm}c}[nullify-dots,first-row] 2.3 & 0 & \Cdots & 0 \\ 12.4 & \Vdots & & \Vdots \\ 1.45 \\ -7.2 & 0 & \Cdots & 0 +7.2 & 0 & \Cdots & 0 \end{pNiceArray}$ \medskip @@ -3346,12 +3429,12 @@ colonnes alignées à gauche ou à droite. \begin{BVerbatim}[baseline=c,boxwidth=10cm] $\begin{bNiceMatrix}[r] \cos x & - \sin x \\ -\sin x & \cos x +\sin x & \cos x \end{bNiceMatrix}$ \end{BVerbatim} $\begin{bNiceMatrix}[r] \cos x & - \sin x \\ -\sin x & \cos x +\sin x & \cos x \end{bNiceMatrix}$ @@ -3360,13 +3443,13 @@ $\begin{bNiceMatrix}[r] \label{rotate} -Utilisée au début d'une case, la commande |\rotate| (fournie par \pkg{nicematrix}) compose le contenu après une -rotation de 90° dans le sens direct. +Utilisée au début d'une case, la commande |\rotate| (fournie par \pkg{nicematrix}) compose le contenu après une +rotation de 90° dans le sens direct. Dans l'exemple suivant, on l'utilise dans le |code-for-first-row|.\footnote{On peut aussi l'utiliser dans |\RowStyle| (cf. p.~\pageref{RowStyle}).} -\bigskip +\medskip \begin{BVerbatim}[baseline=c,boxwidth=12cm] \NiceMatrixOptions% @@ -3376,7 +3459,7 @@ $A = \begin{pNiceMatrix}[first-row,last-col=4] e_1 & e_2 & e_3 \\ 1 & 2 & 3 & e_1 \\ 4 & 5 & 6 & e_2 \\ -7 & 8 & 9 & e_3 +7 & 8 & 9 & e_3 \end{pNiceMatrix}$ \end{BVerbatim} \begin{varwidth}{10cm} @@ -3391,11 +3474,11 @@ e_1 & e_2 & e_3 \\ \end{pNiceMatrix}$ \end{varwidth} -\bigskip +\medskip Si la commande |\rotate| est utilisée dans la «dernière rangée» (extérieure à la matrice), les éléments qui subissent cette rotation sont alignés vers le haut. -\bigskip +\medskip \begin{BVerbatim}[baseline=c,boxwidth=12cm] \NiceMatrixOptions% {code-for-last-row = \scriptstyle ~emphase#\rotate@ , @@ -3404,7 +3487,7 @@ $A = \begin{pNiceMatrix}[last-row,last-col=4] 1 & 2 & 3 & e_1 \\ 4 & 5 & 6 & e_2 \\ 7 & 8 & 9 & e_3 \\ -\text{image de } e_1 & e_2 & e_3 +\text{image de } e_1 & e_2 & e_3 \end{pNiceMatrix}$ \end{BVerbatim} \begin{varwidth}{10cm} @@ -3415,7 +3498,7 @@ $A = \begin{pNiceMatrix}[last-row,last-col=4] 1 & 2 & 3 & e_1 \\ 4 & 5 & 6 & e_2 \\ 7 & 8 & 9 & e_3 \\ -\text{image de } e_1 & e_2 & e_3 +\text{image de } e_1 & e_2 & e_3 \end{pNiceMatrix}$ \end{varwidth} @@ -3429,27 +3512,27 @@ composés d'une manière proche de ce que propose l'environnement |{smallmatrix} de l'\pkg{amsmath} (et les environnements |{psmallmatrix}|, |{bsmallmatrix}|, etc. de \pkg{mathtools}). -\bigskip +\medskip \begin{Verbatim} -$\begin{bNiceArray}{cccc|c}[~emphase#small@, - last-col, - code-for-last-col = \scriptscriptstyle, - columns-width = 3mm ] +$\begin{bNiceArray}{cccc|c}[~emphase#small@, + last-col, + code-for-last-col = \scriptscriptstyle, + columns-width = 3mm ] 1 & -2 & 3 & 4 & 5 \\ 0 & 3 & 2 & 1 & 2 & L_2 \gets 2 L_1 - L_2 \\ -0 & 1 & 1 & 2 & 3 & L_3 \gets L_1 + L_3 +0 & 1 & 1 & 2 & 3 & L_3 \gets L_1 + L_3 \end{bNiceArray}$ \end{Verbatim} % \[\begin{bNiceArray}{cccc|c}[small, last-col, code-for-last-col = \scriptscriptstyle, columns-width=3mm] 1 & -2 & 3 & 4 & 5 \\ 0 & 3 & 2 & 1 & 2 & L_2 \gets 2 L_1 - L_2 \\ -0 & 1 & 1 & 2 & 3 & L_3 \gets L_1 + L_3 +0 & 1 & 1 & 2 & 3 & L_3 \gets L_1 + L_3 \end{bNiceArray}\] -\bigskip +\medskip On remarquera néanmoins que l'environnement |{NiceMatrix}| avec l'option |small| ne prétend pas être composé exactement comme l'environnement |{smallmatrix}|. C'est que les environnements de \pkg{nicematrix} sont tous fondés sur |{array}| @@ -3459,9 +3542,9 @@ directement sur un |\halign| de TeX). \medskip En fait, l'option |small| correspond aux réglages suivants : \begin{itemize} -\item les composantes du tableau sont composées en |\scriptstyle| ; -\item |\arraystretch| est fixé à $0.47$ ; -\item |\arraycolsep| est fixé à $1.45$~pt ; +\item les composantes du tableau sont composées en |\scriptstyle| ; +\item |\arraystretch| est fixé à $0.47$ ; +\item |\arraycolsep| est fixé à $1.45$~pt ; \item les caractéristiques des lignes en pointillés sont également modifiées. \end{itemize} @@ -3508,7 +3591,7 @@ d'autres extensions que \pkg{nicematrix} (ou tout simplement par l'utilisateur final), ces compteurs sont masqués dans les environnements de \pkg{nicematrix}. -\bigskip +\medskip L'extension \pkg{nicematrix} propose aussi des commandes pour composer automatiquement des matrices à partir d'un motif général. Ces commandes sont nommées |\AutoNiceMatrix|, |\pAutoNiceMatrix|, |\bAutoNiceMatrix|, @@ -3553,7 +3636,7 @@ b \cos a+\cos b { 2 \cos b } \end{bNiceMatrix}$ \end{BVerbatim} \end{scope} -% +% $\begin{bNiceMatrix}[light-syntax,first-row,first-col] {} a b ; a 2\cos a {\cos a + \cos b} ; @@ -3578,18 +3661,18 @@ d'éléments en verbatim (avec par exemple la commande Pour les environnements avec délimiteurs (|{pNiceArray}|, |{pNiceMatrix}|, etc.), il est possible de changer la couleur des délimiteurs avec la clé -|delimiters/color|. +|delimiters/color|. \medskip \begin{BVerbatim}[boxwidth=12cm,baseline=c] $\begin{bNiceMatrix}[delimiters/color=red] 1 & 2 \\ -3 & 4 +3 & 4 \end{bNiceMatrix}$ \end{BVerbatim} $\begin{bNiceMatrix}[delimiters/color=red] 1 & 2 \\ -3 & 4 +3 & 4 \end{bNiceMatrix}$ \medskip @@ -3612,7 +3695,7 @@ $\begin{~emphase#NiceArrayWithDelims@} {\downarrow}{\uparrow}{ccc}[margin] 1 & 2 & 3 \\ 4 & 5 & 6 \\ -7 & 8 & 9 +7 & 8 & 9 \end{~emphase#NiceArrayWithDelims@}$ \end{BVerbatim} % @@ -3620,7 +3703,7 @@ $\begin{NiceArrayWithDelims} {\downarrow}{\uparrow}{ccc}[margin] 1 & 2 & 3 \\ 4 & 5 & 6 \\ -7 & 8 & 9 +7 & 8 & 9 \end{NiceArrayWithDelims}$ @@ -3638,7 +3721,7 @@ du tableau considéré. Ces nœuds sont utilisés, entre autres, pour tracer les lignes en pointillés entre les cases du tableau. \smallskip -\textbf{Attention} : Par défaut, aucun nœud n'est créé dans une case vide. +\textbf{Attention} : Par défaut, aucun nœud n'est créé dans une case vide. \smallskip Néanmoins, on peut forcer la création d'un nœud avec la commande |\NotEmpty|.\footnote{Il faut toutefois remarquer qu'avec cette commande, la @@ -3646,7 +3729,7 @@ Néanmoins, on peut forcer la création d'un nœud avec la commande |\NotEmpty|. lignes pointillées (cf.~p.~\pageref{Cdots}) et la déterminations des «coins» (cf. p.~\pageref{corners}).} -\bigskip +\medskip Tous les nœuds du document doivent avoir des noms deux à deux distincts et le nom de ces nœuds doit donc faire intervenir le numéro de l'environnement courant. Les environnements créés par \pkg{nicematrix} sont en effet numérotés @@ -3670,31 +3753,31 @@ case considérée. On peut les utiliser avec \textsc{pgf} mais l'utilisateur fin préférera sans doute utiliser Tikz (qui est une sur-couche de \textsc{pgf}). Il faut néanmoins se souvenir que \pkg{nicematrix} ne charge pas Tikz par défaut. Dans les exemples qui suivent, on suppose que Tikz a été chargé par -l'utilisateur. +l'utilisateur. -\bigskip +\medskip \begin{BVerbatim}[baseline=c,boxwidth=11cm] $\begin{pNiceMatrix}[name=~emphase#ma-matrice@] 1 & 2 & 3 \\ 4 & 5 & 6 \\ -7 & 8 & 9 +7 & 8 & 9 \end{pNiceMatrix}$ -\tikz[remember picture,overlay] - \draw ~emphase#(ma-matrice-2-2)@ circle (2mm) ; +\tikz[remember picture,overlay] + \draw ~emphase#(ma-matrice-2-2)@ circle (2mm) ; \end{BVerbatim} $\begin{pNiceMatrix}[name=ma-matrice] 1 & 2 & 3 \\ 4 & 5 & 6 \\ -7 & 8 & 9 +7 & 8 & 9 \end{pNiceMatrix}$ -\tikz[remember picture,overlay] - \draw (ma-matrice-2-2) circle (2mm) ; +\tikz[remember picture,overlay] + \draw (ma-matrice-2-2) circle (2mm) ; \medskip Ne pas oublier les options |remember picture| et |overlay|. -\bigskip +\medskip Dans le |\CodeAfter|, et si Tikz est chargé, les choses sont plus simples. On peut (et on doit) désigner les nœuds sous la forme $i$-$j$ : il n'y a pas à préciser l'environnement qui est évidemment l'environnement courant. @@ -3705,22 +3788,22 @@ préciser l'environnement qui est évidemment l'environnement courant. $\begin{pNiceMatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ -7 & 8 & 9 +7 & 8 & 9 \CodeAfter -\tikz \draw ~emphase#(2-2)@ circle (2mm) ; +\tikz \draw ~emphase#(2-2)@ circle (2mm) ; \end{pNiceMatrix}$ \end{BVerbatim} $\begin{pNiceMatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ -7 & 8 & 9 +7 & 8 & 9 \CodeAfter -\tikz \draw (2-2) circle (2mm) ; +\tikz \draw (2-2) circle (2mm) ; \end{pNiceMatrix}$ -\bigskip +\medskip Dans l'exemple suivant, nous avons surligné tous les nœuds de la matrice (on explique plus loin la technique utilisée : cf. p. \pageref{highlight}). @@ -3741,10 +3824,52 @@ explique plus loin la technique utilisée : cf. p. \pageref{highlight}). \Body a & a + b & a + b + c \\ a & a & a + b \\ -a & a & a +a & a & a \end{pNiceMatrix}\] +\colorbox{yellow!50}{\textbf{Nouveau 6.3}}\enskip Les nœuds de la dernière +colonne (hors éventuelle «colonne extérieure» spécifiée par |last-col|) peuvent +aussi être désignés par $i$-|last|. De même, les nœuds de la dernière ligne +peuvent être désignés par |last|-$j$. + +\medskip +\subsubsection{Les colonnes V de varwidth} + +\label{node-V} +Quand l'extension \pkg{varwidth} est chargée, les colonnes de type |V| définies +par \pkg{varwidth} sont prises en charge par \pkg{nicematrix}. Il peut être +intéressant de préciser que, pour une cellule située dans une colonne de type +|V|, le nœud PGF/Tikz créé par \pkg{nicematrix} pour le contenu de cette cellule +a une largeur ajustée au contenu de cette cellule. Cela est en contraste avec le +cas des colonnes de type |p|, |m| ou |b| dans lesquelles les nœuds ont toujours +une largeur égale à la largeur de la colonne. + +\begin{Verbatim} +\begin{NiceTabular}{V{8cm}} +\bfseries \large +Titre \\ +\lipsum[1] +\CodeAfter + \tikz \draw [rounded corners] (1-1) -| (last-|2) -- (last-|1) |- (1-1) ; +\end{NiceTabular} +\end{Verbatim} + +\begin{center} +\begin{NiceTabular}{V{8cm}} +\bfseries \large +Titre \\ +\lipsum[1] +\CodeAfter + \tikz \draw [rounded corners] (1-1) -| (last-|2) -- (last-|1) |- (1-1) ; +\end{NiceTabular} +\end{center} + +On a utilisé les nœuds indiquant la position des filets, qui sont présentés un +peu plus loin, p.~\pageref{nodes-i}. + + + \subsection{Les «nœuds moyens» et les «nœuds larges»} @@ -3766,7 +3891,7 @@ moyens». Nous considérons que cet exemple se suffit à lui-même comme défini de ces nœuds. \[\begin{pNiceMatrix}[create-medium-nodes] \CodeBefore [create-cell-nodes] - \begin{tikzpicture} + \begin{tikzpicture} [every node/.style = {fill = red!15, inner sep = 0 pt}, name suffix = -medium] \node [fit = (1-1)] {} ; @@ -3782,7 +3907,7 @@ de ces nœuds. \Body a & a + b & a + b + c \\ a & a & a + b \\ -a & a & a +a & a & a \end{pNiceMatrix}\] @@ -3812,7 +3937,7 @@ de ces nœuds.\footnote{Il n'y a pas de «nœuds larges» créés dans les rang \Body a & a + b & a + b + c \\ a & a & a + b \\ -a & a & a +a & a & a \end{pNiceMatrix}\] @@ -3845,7 +3970,7 @@ utilisé les options |left-margin| et |right-margin|.\footnote{Les options \Body a & a + b & a + b + c \\ a & a & a + b \\ -a & a & a +a & a & a \end{pNiceMatrix}\] \medskip @@ -3872,15 +3997,15 @@ incorporées dans les «nœuds larges». Dans l'exemple suivant, nous avons util \Body a & a + b & a + b + c \\ a & a & a + b \\ -a & a & a +a & a & a \end{pNiceMatrix}\] -\bigskip +\medskip \textbf{Attention} : Ces nœuds sont reconstruits à partir des contenus des cases et ne correspondent donc pas nécessairement aux cases délimitées par des filets. -\bigskip +\medskip \begin{minipage}[c]{7.5cm} Voici un tableau qui a été composé de la manière suivante : @@ -3964,7 +4089,7 @@ du tableau proprement dit). \subsection{Les nœuds indiquant la position des filets} -\label{noeuds-i} +\label{nodes-i} L'extension \pkg{nicematrix} crée un nœud PGF-Tikz nommé simplement $i$ (précédé du préfixe habituel) à l'intersection du filet horizontal de numéro $i$ et du @@ -3980,21 +4105,21 @@ Ces nœuds sont accessibles dans le \begin{NiceTabular}{ccc}[hvlines,rules={width=1pt,color=gray}] & tulipe & lys \\ arum & & violette mauve \\ -muguet & dahlia +muguet & dahlia \CodeAfter \tiny \begin{tikzpicture} \foreach \i in {1,1.5,2,2.5,3,3.5,4} - { - \fill [red] (\i) circle (0.5mm) ; - \node [red,above right] at (\i) {\i} ; - } + { + \fill [red] (\i) circle (0.5mm) ; + \node [red,above right] at (\i) {\i} ; + } \end{tikzpicture} \end{NiceTabular} \end{center} -\bigskip +\medskip Si on utilise Tikz (on rappelle que \pkg{nicematrix} ne charge pas Tikz mais uniquement \textsc{pgf} qui est une sous-couche de Tikz), on peut donc accéder (dans le |\CodeAfter| mais aussi dans le |\CodeBefore|) à l'intersection du filet @@ -4018,7 +4143,7 @@ horizontal~$i$ et du filet vertical~$j$ avec la syntaxe |(|$i$\verb+-|+$j$|)|. 1 & 8 & 28 & 56 & 70 & 56 & 28 & 8 & 1 \end{NiceMatrix} \end{Verbatim} -% +% \[\begin{NiceMatrix} \CodeBefore \tikz \draw [fill=red!15] (7-|4) |- (8-|5) |- (9-|6) |- cycle ; @@ -4034,7 +4159,7 @@ horizontal~$i$ et du filet vertical~$j$ avec la syntaxe |(|$i$\verb+-|+$j$|)|. 1 & 8 & 28 & 56 & 70 & 56 & 28 & 8 & 1 \end{NiceMatrix}\] -\bigskip +\medskip Les nœuds de la forme $i$|.5| peuvent être utilisés par exemple pour barrer une ligne (si on a chargé Tikz). @@ -4043,16 +4168,16 @@ ligne (si on a chargé Tikz). $\begin{pNiceArray}{ccc|c} 2 & 1 & 3 & 0 \\ 3 & 3 & 1 & 0 \\ -3 & 3 & 1 & 0 -\CodeAfter +3 & 3 & 1 & 0 +\CodeAfter \tikz \draw [red] (~emphase#3.5@-|1) -- (~emphase#3.5@-|last) ; \end{pNiceArray}$ \end{BVerbatim} $\begin{pNiceArray}{ccc|c} 2 & 1 & 3 & 0 \\ 3 & 3 & 1 & 0 \\ -3 & 3 & 1 & 0 -\CodeAfter +3 & 3 & 1 & 0 +\CodeAfter \tikz \draw [red] (3.5-|1) -- (3.5-|last) ; \end{pNiceArray}$ @@ -4062,7 +4187,7 @@ $\begin{pNiceArray}{ccc|c} \label{node-sub-matrix} La commande |\SubMatrix| disponible dans le |\CodeAfter| a été présentée -p.~\pageref{sub-matrix}. +p.~\pageref{sub-matrix}. \smallskip Si une commande |\SubMatrix| est utilisée avec la clé |name| sous la forme @@ -4109,7 +4234,7 @@ L'extension \pkg{nicematrix} fournit deux variables internes mais publiques\foot \medskip Ces variables constituent le code du «|code-before|» (que l'on rentre souvent -avec la syntaxte utilisant |\CodeBefore| et |\Body| en début d'environnement et +avec la syntaxte utilisant |\CodeBefore| et |\Body| en début d'environnement) et du «|code-after|» (que l'on rentre souvent en fin d'environnement après le mot-clé |\CodeAfter|). Le développeur peut donc les utiliser pour y ajouter du code à partir d'une case du tableau (l'affectation devra être globale, ce qui @@ -4140,17 +4265,17 @@ utilise explicitement la variable publique |\g_nicematrix_code_after_tl|. \ExplSyntaxOn \cs_new_protected:Nn \__pantigny_crossbox:nnn { - \tikz \draw [ #3 ] - ( #1 -| \int_eval:n { #2 + 1 } ) -- ( \int_eval:n { #1 + 1 } -| #2 ) - ( #1 -| #2 ) -- ( \int_eval:n { #1 + 1 } -| \int_eval:n { #2 + 1 } ) ; + \tikz \draw [ #3 ] + ( #1 -| \int_eval:n { #2 + 1 } ) -- ( \int_eval:n { #1 + 1 } -| #2 ) + ( #1 -| #2 ) -- ( \int_eval:n { #1 + 1 } -| \int_eval:n { #2 + 1 } ) ; } \NewDocumentCommand \crossbox { ! O { } } { \tl_gput_right:Nx §emphase¤\g_nicematrix_code_after_tlμ - { - \__pantigny_crossbox:nnn - { \int_use:c { c@iRow } } + { + \__pantigny_crossbox:nnn + { \int_use:c { c@iRow } } { \int_use:c { c@jCol } } { \exp_not:n { #1 } } } @@ -4163,25 +4288,25 @@ utilise explicitement la variable publique |\g_nicematrix_code_after_tl|. \ExplSyntaxOn \cs_new_protected:Nn \__pantigny_crossbox:nnn { - \tikz \draw [ #3 ] - ( #1 -| \int_eval:n { #2 + 1 } ) -- ( \int_eval:n { #1 + 1 } -| #2 ) - ( #1 -| #2 ) -- ( \int_eval:n { #1 + 1 } -| \int_eval:n { #2 + 1 } ) ; + \tikz \draw [ #3 ] + ( #1 -| \int_eval:n { #2 + 1 } ) -- ( \int_eval:n { #1 + 1 } -| #2 ) + ( #1 -| #2 ) -- ( \int_eval:n { #1 + 1 } -| \int_eval:n { #2 + 1 } ) ; } \NewDocumentCommand \crossbox { ! O { } } { \tl_gput_right:Nx \g_nicematrix_code_after_tl - { - \__pantigny_crossbox:nnn - { \int_use:c { c@iRow } } + { + \__pantigny_crossbox:nnn + { \int_use:c { c@iRow } } { \int_use:c { c@jCol } } { \exp_not:n { #1 } } } } \ExplSyntaxOff -\bigskip +\medskip Voici un exemple d'utilisation : \medskip @@ -4189,13 +4314,13 @@ Voici un exemple d'utilisation : \begin{NiceTabular}{ccc}[hvlines] merlan & requin & cabillaud \\ baleine & ~emphase#\crossbox[red]@ & morue \\ -mante & raie & poule +mante & raie & poule \end{NiceTabular} \end{BVerbatim} \begin{NiceTabular}{ccc}[hvlines] merlan & requin & cabillaud \\ baleine & \crossbox[red] & morue \\ -mante & raie & poule +mante & raie & poule \end{NiceTabular} @@ -4255,7 +4380,7 @@ est sans effet. -\subsection{Lignes diagonales} +\subsection{Lignes diagonales} \label{parallelization} @@ -4270,6 +4395,8 @@ tableau peut avoir un effet marqué sur le résultat final. \medskip Dans les exemples suivants, la première instruction |\Ddots| est marquée en couleur : + + \medskip \begin{scope} \begin{minipage}{9.5cm} @@ -4290,7 +4417,7 @@ a+b & \Ddots & & \Vdots \\ a+b & \Cdots & a+b & 1 \end{pNiceMatrix}$ -\bigskip +\medskip \NiceMatrixOptions{parallelize-diags=true}% \begin{minipage}{9.5cm} \begin{Verbatim} @@ -4309,7 +4436,7 @@ a+b & & & \Vdots \\ a+b & \Cdots & a+b & 1 \end{pNiceMatrix}$ -\bigskip +\medskip Il est possible de désactiver la parallélisation avec l'option |parallelize-diags| mise à |false|: \par\nobreak @@ -4327,7 +4454,7 @@ a+b & \Cdots & a+b & 1 \end{scope} -\bigskip +\medskip On peut choisir l'instruction |\Ddots| qui sera tracée en premier (et qui servira pour tracer les suivantes quand la parallélisation est activée) avec la clé |draw-first| : |\Ddots[draw-first]|\rlap{.} @@ -4339,7 +4466,7 @@ Une instruction comme |\Ldots|, |\Cdots|, etc. essaye de déterminer la premièr case vide de part et d'autre de la case considérée. Néanmoins, une case «vide» n'est pas nécessairement sans contenu dans le codage TeX (c'est-à-dire sans aucun token entre les deux esperluettes~|&|). Les règles précises sont les -suivantes : +suivantes : \begin{itemize} \item Une case implicite est vide. Par exemple, dans la matrice suivante @@ -4347,7 +4474,7 @@ suivantes : \begin{Verbatim} \begin{pmatrix} a & b \\ -c +c \end{pmatrix} \end{Verbatim} @@ -4370,7 +4497,7 @@ pointillés par \pkg{nicematrix}. \medskip \item Une case d'une colonne de type |p|, |m| ou |t| est toujours non vide. -\emph{Attention} : Ne pas se fier à ce point car il est susceptible de changer. +\emph{Attention} : Ne pas se fier à ce point car il est susceptible de changer. \end{itemize} @@ -4415,9 +4542,29 @@ pointillés de \pkg{nicematrix} : \NiceMatrixOptions{letter-for-dotted-lines=;} \end{Verbatim} -\bigskip +\medskip L'extension \pkg{nicematrix} n'est pas compatible avec la classe \cls{ieeeaccess} -(car cette classe n'est pas compatible avec PGF/Tikz). +(car cette classe n'est pas compatible avec PGF/Tikz).\footnote{Voir + \url{https://tex.stackexchange.com/questions/528975/error-loading-tikz-in-ieeeaccess-class}} + +\medskip +Pour pouvoir utiliser \pkg{nicematrix} avec la classe \cls{aastex631}, on doit +ajouter dans le préambule du fichier les lignes suivantes : + +\begin{Verbatim} +\BeforeBegin{NiceTabular}{\let\begin\BeginEnvironment\let\end\EndEnvironment} +\BeforeBegin{NiceArray}{\let\begin\BeginEnvironment} +\BeforeBegin{NiceMatrix}{\let\begin\BeginEnvironment} +\end{Verbatim} + +\medskip +Pour pouvoir utiliser \pkg{nicematrix} avec la classe \cls{sn-jnl}, \pkg{pgf} +doit être chargé avant le |\documentclass|: + +\begin{Verbatim} +\RequirePackage{pgf} +\documentclass{sn-jnl} +\end{Verbatim} \section{Exemples} @@ -4427,7 +4574,7 @@ L'extension \pkg{nicematrix} n'est pas compatible avec la classe \cls{ieeeaccess La clé |tikz| de la commande |\Block| n'est disponible que lorsque Tikz est chargé.\footnote{Par défaut, \pkg{nicematrix} ne charge que \textsc{pgf}, qui - est une sous-couche de Tikz} + est une sous-couche de Tikz.} Pour l'exemple suivant, la bibliothèque \tikz{patterns} de Tikz doit aussi être chargée. @@ -4475,7 +4622,7 @@ Pour l'exemple suivant, la bibliothèque \tikz{patterns} de Tikz doit aussi êtr Les outils de \pkg{nicematrix} pour les notes dans les tableaux ont été présentés à la partie \ref{s:notes} p.~\pageref{s:notes}. -\bigskip +\medskip Imaginons que l'on souhaite numéroter les notes de tableau (celles construites avec |\tabularnote|) avec des astérisques.\footnote{Bien entendu, il faut qu'il y en ait très peu : trois paraît un maximum.} @@ -4486,7 +4633,7 @@ On commence par écrire une commande |\stars| similaire aux commandes classiques \begin{Verbatim} \ExplSyntaxOn \NewDocumentCommand ~emphase#\stars@ { m } - { \prg_replicate:nn { \value { ~#1 } } { $ \star $ } } + { \prg_replicate:nn { \value { ~#1 } } { $ \star $ } } \ExplSyntaxOff \end{Verbatim} % @@ -4497,13 +4644,13 @@ composer les labels avec une largeur égale à celle du plus grand des labels. O le label le plus large est bien entendu celui avec le maximum d'astéristiques. On connaît ce nombre : il est égal à |\value{tabularnote}| (car |tabularnote| est le compteur LaTeX utilisé par |\tabularnote| et il est donc égal à la fin au -nombre total de notes dans le tableau). On utilise alors la clé |widest*| de +nombre total de notes dans le tableau). On utilise alors la clé |widest*| de \pkg{enumitem} pour demander une largeur de label correspondante : -|widest*=\value{tabularnote}|. +|widest*=\value{tabularnote}|. \begin{Verbatim} -\NiceMatrixOptions +\NiceMatrixOptions { - notes = + notes = { ~emphase#style = \stars{~#1} , @ ~emphase#enumitem-keys = @ @@ -4520,16 +4667,16 @@ nombre total de notes dans le tableau). On utilise alors la clé |widest*| de \begin{scope} \ExplSyntaxOn \NewDocumentCommand \stars { m } - { \prg_replicate:nn { \value { #1 } } { $ \star $ } } -\NiceMatrixOptions + { \prg_replicate:nn { \value { #1 } } { $ \star $ } } +\NiceMatrixOptions { - notes = + notes = { style = \stars{#1} , - enumitem-keys = + enumitem-keys = { widest* = \value{tabularnote} , - align = right + align = right } } } @@ -4555,9 +4702,9 @@ Dupont & Chantal & 15 janvier 1998 \\ \toprule \RowStyle{\bfseries} Nom & Prénom & Date de naissance \\ \midrule -Achard\tabularnote{La famille Achard est une très ancienne famille du Poitou.} +Achard\tabularnote{La famille Achard est une très ancienne famille du Poitou.} & Jacques & 5 juin 1962 \\ -Lefebvre\tabularnote{Le patronyme Lefebvre est une altération de Lefébure.} +Lefebvre\tabularnote{Le patronyme Lefebvre est une altération de Lefébure.} & Mathilde & 23 mai 1988 \\ Vanesse & Stéphanie & 30 octobre 1994 \\ Dupont & Chantal & 15 janvier 1998 \\ @@ -4573,7 +4720,7 @@ Dupont & Chantal & 15 janvier 1998 \\ Un exemple pour le résultant de deux polynômes : \par\nobreak -\bigskip +\medskip \begin{BVerbatim} \setlength{\extrarowheight}{1mm} \begin{vNiceArray}{cccc:ccc}[columns-width=6mm] @@ -4583,11 +4730,11 @@ a_1 &\Ddots&& &b_1 &\Ddots& \\ a_p & &&a_0 & & &b_1 \\ &\Ddots&&a_1 &b_q & &\Vdots\\ & &&\Vdots & &\Ddots& \\ - & &&a_p & & &b_q + & &&a_p & & &b_q \end{vNiceArray} \end{BVerbatim} -\bigskip +\medskip \begin{scope} \setlength{\extrarowheight}{1mm} @@ -4598,9 +4745,9 @@ a_1 &\Ddots&& &b_1 &\Ddots& \\ a_p & &&a_0 & & &b_1 \\ &\Ddots&&a_1 &b_q & &\Vdots\\ & &&\Vdots & &\Ddots& \\ - & &&a_p & & &b_q + & &&a_p & & &b_q \end{vNiceArray}\] -\end{scope} +\end{scope} \vspace{2cm} Un exemple avec un système linéaire: @@ -4612,7 +4759,7 @@ $\begin{pNiceArray}{*6c|c}[nullify-dots,last-col,code-for-last-col=\scriptstyle] 0 & 0 & 1 &\Ddots & & \Vdots & & L_3 \gets L_3-L_1 \\ & & &\Ddots & & & \Vdots & \Vdots \\ \Vdots & & &\Ddots & & 0 & \\ -0 & & &\Cdots & 0 & 1 & 0 & L_n \gets L_n-L_1 +0 & & &\Cdots & 0 & 1 & 0 & L_n \gets L_n-L_1 \end{pNiceArray}$ \end{Verbatim} @@ -4623,7 +4770,7 @@ $\begin{pNiceArray}{*6c|c}[nullify-dots,last-col,code-for-last-col=\scriptstyle] 0 & 0 & 1 &\Ddots & & \Vdots & & L_3 \gets L_3-L_1 \\ & & &\Ddots & & & \Vdots & \Vdots \\ \Vdots & & &\Ddots & & 0 & \\ -0 & & &\Cdots & 0 & 1 & 0 & L_n \gets L_n-L_1 +0 & & &\Cdots & 0 & 1 & 0 & L_n \gets L_n-L_1 \end{pNiceArray}\] @@ -4693,10 +4840,10 @@ $\begin{pNiceMatrix}[first-row,first-col] & & \Ldots[line-style={solid,<->},shorten=0pt]^{n \text{ colonnes}} \\ & 1 & 1 & 1 & \Ldots & 1 \\ & 1 & 1 & 1 & & 1 \\ -\Vdots[line-style={solid,<->}]_{n \text{ rangées}} +\Vdots[line-style={solid,<->}]_{n \text{ rangées}} & 1 & 1 & 1 & & 1 \\ & 1 & 1 & 1 & & 1 \\ - & 1 & 1 & 1 & \Ldots & 1 + & 1 & 1 & 1 & \Ldots & 1 \end{pNiceMatrix}$ \end{Verbatim} @@ -4710,7 +4857,7 @@ $\begin{pNiceMatrix}[first-row,first-col] & 1 & 1 & 1 & & 1 \\ \Vdots[line-style={solid,<->}]_{n \text{ rangées}} & 1 & 1 & 1 & & 1 \\ & 1 & 1 & 1 & & 1 \\ - & 1 & 1 & 1 & \Ldots & 1 + & 1 & 1 & 1 & \Ldots & 1 \end{pNiceMatrix}\] \end{scope} @@ -4730,7 +4877,7 @@ avec l'environnement |{NiceMatrixBlock}| et l'option |auto-columns-width|. \begin{Verbatim}[formatcom=\small\color{gray}] ~emphase#\begin{NiceMatrixBlock}[auto-columns-width]@ \NiceMatrixOptions - { + { light-syntax, last-col, code-for-last-col = \color{blue} \scriptstyle, } @@ -4740,7 +4887,7 @@ $\begin{pNiceArray}{rrrr|r} 12 -8 7 5 3 {} ; 3 -18 12 1 4 ; -3 -46 29 -2 -15 ; - 9 10 -5 4 7 + 9 10 -5 4 7 \end{pNiceArray}$ \smallskip @@ -4755,7 +4902,7 @@ $\begin{pNiceArray}{rrrr|r} $\begin{pNiceArray}{rrrr|r} 12 -8 7 5 3 ; 0 64 -41 1 19 ; -0 0 0 0 0 { L_3 \gets 3 L_2 + L_3 } +0 0 0 0 0 { L_3 \gets 3 L_2 + L_3 } \end{pNiceArray}$ \smallskip @@ -4767,10 +4914,10 @@ $\begin{pNiceArray}{rrrr|r} ~emphase#\end{NiceMatrixBlock}@ \end{Verbatim} -\bigskip +\medskip \begin{NiceMatrixBlock}[auto-columns-width] \NiceMatrixOptions - { + { light-syntax, last-col, code-for-last-col = \color{blue} \scriptstyle , } @@ -4780,7 +4927,7 @@ $\begin{pNiceArray}{rrrr|r} 12 -8 7 5 3 {} ; 3 -18 12 1 4 ; -3 -46 29 -2 -15 ; - 9 10 -5 4 7 + 9 10 -5 4 7 \end{pNiceArray}$ \smallskip @@ -4795,7 +4942,7 @@ $\begin{pNiceArray}{rrrr|r} \quad $\begin{pNiceArray}{rrrr|r} 12 -8 7 5 3 ; 0 64 -41 1 19 ; -0 0 0 0 0 { L_3 \gets 3 L_2 + L_3 } +0 0 0 0 0 { L_3 \gets 3 L_2 + L_3 } \end{pNiceArray}$\par\nobreak \smallskip @@ -4805,7 +4952,7 @@ $\begin{pNiceArray}{rrrr|r} \end{pNiceArray}$ \end{NiceMatrixBlock} -\bigskip +\medskip On constate que la dernière matrice n'est pas parfaitement alignée avec les précédentes. C'est que les parenthèses, en LaTeX, n'ont pas toutes la même largeur suivant leur taille. @@ -4817,7 +4964,7 @@ avec leur largeur maximale grâce à la clé booléenne |delimiters/max-width|. \begin{Verbatim}[formatcom=\small\color{gray}] ~emphase#\begin{NiceMatrixBlock}[auto-columns-width]@ \NiceMatrixOptions - { + { ~emphase#delimiters/max-width@, light-syntax, last-col, code-for-last-col = \color{blue}\scriptstyle, @@ -4828,17 +4975,17 @@ $\begin{pNiceArray}{rrrr|r} 12 -8 7 5 3 {} ; 3 -18 12 1 4 ; -3 -46 29 -2 -15 ; - 9 10 -5 4 7 + 9 10 -5 4 7 \end{pNiceArray}$ ... ~emphase#\end{NiceMatrixBlock}@ \end{Verbatim} -\bigskip +\medskip \begin{NiceMatrixBlock}[auto-columns-width] \NiceMatrixOptions - { + { delimiters/max-width, light-syntax, last-col, code-for-last-col = \color{blue}\scriptstyle, @@ -4849,7 +4996,7 @@ $\begin{pNiceArray}{rrrr|r} 12 -8 7 5 3 {} ; 3 -18 12 1 4 ; -3 -46 29 -2 -15 ; - 9 10 -5 4 7 + 9 10 -5 4 7 \end{pNiceArray}$ \smallskip @@ -4864,7 +5011,7 @@ $\begin{pNiceArray}{rrrr|r} \quad $\begin{pNiceArray}{rrrr|r} 12 -8 7 5 3 ; 0 64 -41 1 19 ; -0 0 0 0 0 { L_3 \gets 3 L_2 + L_3 } +0 0 0 0 0 { L_3 \gets 3 L_2 + L_3 } \end{pNiceArray}$ \smallskip @@ -4900,7 +5047,7 @@ Bien sûr, ce tableau ne pourra pas être coupé par un saut de page. 0 & 0 &0 &0 & 0 & L_3 \gets 3L_2+L_3 \\[1mm] 12 & -8 &7 &5 & 3 \\ 0 & 64 &-41 & 1 & 19 \\ -~emphase#\CodeAfter [sub-matrix/vlines=4]@ +~emphase#\CodeAfter [sub-matrix/vlines=4]@ ~emphase# \SubMatrix({1-1}{4-5})@ ~emphase# \SubMatrix({5-1}{8-5})@ ~emphase# \SubMatrix({9-1}{11-5})@ @@ -4934,13 +5081,13 @@ Bien sûr, ce tableau ne pourra pas être coupé par un saut de page. \end{NiceMatrix}\] \end{scope} -\bigskip +\medskip Dans ce tableau, les instructions |\SubMatrix| sont exécutés après la composition du tableau et les traits verticaux sont donc tracés sans espacer les -colonnes. +colonnes. -\bigskip +\medskip \colorbox{yellow!50}{\textbf{Nouveau 6.2}}\enskip En fait, on peut avec la clé |vlines-in-sub-matrix| choisir un spécificateur dans le préambule du tableau pour indiquer des filets verticaux qui seront tracés dans les |\SubMatrix| @@ -4950,10 +5097,10 @@ uniquement (en espaçant les colonnes). \begin{Verbatim} \setlength{\extrarowheight}{1mm} \[\begin{NiceArray} - [ + [ ~emphase#vlines-in-sub-matrix=I@, - last-col, - code-for-last-col = \scriptstyle \color{blue} + last-col, + code-for-last-col = \scriptstyle \color{blue} ] {rrrrIr} 12 & -8 & 7 & 5 & 3 \\ @@ -4969,7 +5116,7 @@ uniquement (en espaçant les colonnes). 0 & 0 &0 &0 & 0 & L_3 \gets 3L_2+L_3 \\[1mm] 12 & -8 &7 &5 & 3 \\ 0 & 64 &-41 & 1 & 19 \\ -\CodeAfter +\CodeAfter \SubMatrix({1-1}{4-5}) \SubMatrix({5-1}{8-5}) \SubMatrix({9-1}{11-5}) @@ -4983,10 +5130,10 @@ uniquement (en espaçant les colonnes). \begin{scope} \setlength{\extrarowheight}{1mm} \[\begin{NiceArray} - [ + [ vlines-in-sub-matrix=I, - last-col, - code-for-last-col = \scriptstyle \color{blue} + last-col, + code-for-last-col = \scriptstyle \color{blue} ] {rrrrIr} 12 & -8 & 7 & 5 & 3 \\ @@ -5002,7 +5149,7 @@ uniquement (en espaçant les colonnes). 0 & 0 &0 &0 & 0 & L_3 \gets 3L_2+L_3 \\[1mm] 12 & -8 &7 &5 & 3 \\ 0 & 64 &-41 & 1 & 19 \\ -\CodeAfter +\CodeAfter \SubMatrix({1-1}{4-5}) \SubMatrix({5-1}{8-5}) \SubMatrix({9-1}{11-5}) @@ -5049,10 +5196,10 @@ options |hlines|, |vlines|, |hvlines| et |hvlines-except-borders| «écartent» composantes de la matrice.\footnote{Pour la commande |\cline|, voir la remarque p.~\pageref{remark-cline}.} -\vspace{1cm} +\vspace{1cm} Il est possible de colorier une rangée avec |\rowcolor| dans le |\CodeBefore| (ou avec |\rowcolor| dans une case de la rangée si on utilise la clé -|colortbl-like| − même si \pkg{colortbl} n'est pas chargé). +|colortbl-like| − même si \pkg{colortbl} n'est pas chargé). \begin{Verbatim} @@ -5060,7 +5207,7 @@ Il est possible de colorier une rangée avec |\rowcolor| dans le |\CodeBefore| ~emphase#\rowcolor{red!15}@A_{11} & A_{12} & A_{13} & A_{14} \\ A_{21} & ~emphase#\rowcolor{red!15}@A_{22} & A_{23} & A_{24} \\ A_{31} & A_{32} & ~emphase#\rowcolor{red!15}@A_{33} & A_{34} \\ - A_{41} & A_{42} & A_{43} & ~emphase#\rowcolor{red!15}@A_{44} + A_{41} & A_{42} & A_{43} & ~emphase#\rowcolor{red!15}@A_{44} \end{pNiceArray} \end{Verbatim} @@ -5070,14 +5217,14 @@ Il est possible de colorier une rangée avec |\rowcolor| dans le |\CodeBefore| \rowcolor{red!15}A_{11} & A_{12} & A_{13} & A_{14} \\ A_{21} & \rowcolor{red!15}A_{22} & A_{23} & A_{24} \\ A_{31} & A_{32} & \rowcolor{red!15}A_{33} & A_{34} \\ - A_{41} & A_{42} & A_{43} & \rowcolor{red!15}A_{44} + A_{41} & A_{42} & A_{43} & \rowcolor{red!15}A_{44} \end{pNiceArray}\] \medskip Les possibilités de réglages sont néanmoins limitées. C'est pourquoi nous présentons ici une autre méthode pour surligner une rangée d'une -matrice. +matrice. \medskip Cet exemple et les suivants nécessitent d'avoir chargé Tikz (\pkg{nicematrix} ne @@ -5098,7 +5245,7 @@ faut utiliser la clé |create-cell-nodes| du |\CodeBefore| pour demander leur cr \tikzset{highlight/.style={rectangle, fill=red!15, - rounded corners = 0.5 mm, + rounded corners = 0.5 mm, inner sep=1pt, fit=#1}} @@ -5106,7 +5253,7 @@ faut utiliser la clé |create-cell-nodes| du |\CodeBefore| pour demander leur cr \begin{Verbatim} \tikzset{highlight/.style={rectangle, fill=red!15, - rounded corners = 0.5 mm, + rounded corners = 0.5 mm, inner sep=1pt, fit=~#1}} @@ -5121,7 +5268,7 @@ $\begin{bNiceMatrix} \end{Verbatim} \[\begin{bNiceMatrix} -\CodeBefore [create-cell-nodes] +\CodeBefore [create-cell-nodes] \tikz \node [highlight = (2-1) (2-3)] {} ; \Body 0 & \Cdots & 0 \\ @@ -5134,7 +5281,7 @@ $\begin{bNiceMatrix} \vspace{1cm} On considère maintenant la matrice suivante. Si on veut surligner chaque rangée -de la matrice, on peut utiliser la technique précédente trois fois. +de la matrice, on peut utiliser la technique précédente trois fois. \begin{Verbatim} \[\begin{pNiceArray}{ccc}[last-col] @@ -5197,11 +5344,11 @@ a & a & a + b & L_2 \\ a & a & a & L_3 \end{pNiceArray}\] - + \subsection{Utilisation de \textbackslash SubMatrix dans le \textbackslash CodeBefore} -Dans l'exemple suivant, on illustre le produit mathématique de deux matrices. +Dans l'exemple suivant, on illustre le produit mathématique de deux matrices. L'ensemble de la figure est un environnement |{NiceArray}| et les trois paires de parenthèses ont été rajoutées avec |\SubMatrix| dans le |\CodeBefore|. @@ -5209,7 +5356,7 @@ de parenthèses ont été rajoutées avec |\SubMatrix| dans le |\CodeBefore|. \tikzset{highlight/.style={rectangle, fill=red!15, - rounded corners = 0.5 mm, + rounded corners = 0.5 mm, inner sep=1pt, fit=#1}}% % @@ -5220,7 +5367,7 @@ de parenthèses ont été rajoutées avec |\SubMatrix| dans le |\CodeBefore|. \SubMatrix({7-2}{11-6}) \SubMatrix({7-7}{11-11}) \begin{tikzpicture} - \node [highlight = (9-2) (9-6)] { } ; + \node [highlight = (9-2) (9-6)] { } ; \node [highlight = (2-9) (6-9)] { } ; \end{tikzpicture} \Body @@ -5232,7 +5379,7 @@ de parenthèses ont été rajoutées avec |\SubMatrix| dans le |\CodeBefore|. & & & & & & b_{n1} & \Cdots & b_{nj} & \Cdots & b_{nn} \\[3mm] & a_{11} & \Cdots & & & a_{1n} \\ & \Vdots & & & & \Vdots & & & \Vdots \\ -\color{blue}\scriptstyle L_i +\color{blue}\scriptstyle L_i & a_{i1} & \Cdots & a_{ik} & \Cdots & a_{in} & \Cdots & & c_{ij} \\ & \Vdots & & & & \Vdots \\ & a_{n1} & \Cdots & & & a_{nn} \\ @@ -5245,7 +5392,7 @@ de parenthèses ont été rajoutées avec |\SubMatrix| dans le |\CodeBefore|. \begin{Verbatim} \tikzset{highlight/.style={rectangle, fill=red!15, - rounded corners = 0.5 mm, + rounded corners = 0.5 mm, inner sep=1pt, fit=~#1}} \end{Verbatim} @@ -5257,7 +5404,7 @@ de parenthèses ont été rajoutées avec |\SubMatrix| dans le |\CodeBefore|. \SubMatrix({7-2}{11-6}) \SubMatrix({7-7}{11-11}) \begin{tikzpicture} - \node [highlight = (9-2) (9-6)] { } ; + \node [highlight = (9-2) (9-6)] { } ; \node [highlight = (2-9) (6-9)] { } ; \end{tikzpicture} \Body @@ -5269,7 +5416,7 @@ de parenthèses ont été rajoutées avec |\SubMatrix| dans le |\CodeBefore|. & & & & & & b_{n1} & \Cdots & b_{nj} & \Cdots & b_{nn} \\[3mm] & a_{11} & \Cdots & & & a_{1n} \\ & \Vdots & & & & \Vdots & & & \Vdots \\ -\color{blue}\scriptstyle L_i +\color{blue}\scriptstyle L_i & a_{i1} & \Cdots & a_{ik} & \Cdots & a_{in} & \Cdots & & c_{ij} \\ & \Vdots & & & & \Vdots \\ & a_{n1} & \Cdots & & & a_{nn} \\ @@ -5286,7 +5433,7 @@ Le document |nicematrix.pdf| (fourni avec l'extension \pkg{nicematrix}) contient une traduction anglaise de la documentation ici présente, ainsi que le code source commenté et un historique des versions. -\bigskip +\medskip Les versions successives du fichier |nicematrix.sty| fournies par TeXLive sont disponibles sur le serveur \textsc{svn} de TeXLive : diff --git a/macros/latex/contrib/nicematrix/nicematrix.dtx b/macros/latex/contrib/nicematrix/nicematrix.dtx index 034b863418..8da12f0a1c 100644 --- a/macros/latex/contrib/nicematrix/nicematrix.dtx +++ b/macros/latex/contrib/nicematrix/nicematrix.dtx @@ -15,8 +15,8 @@ % % \fi % \iffalse -\def\myfileversion{6.2} -\def\myfiledate{2021/09/09} +\def\myfileversion{6.3} +\def\myfiledate{2021/10/18} % % %<*batchfile> @@ -56,7 +56,8 @@ version 2005/12/01 or later. \usetikzlibrary{fit,patterns} \usepackage{nicematrix} \usepackage{siunitx} - +\usepackage{varwidth} +\usepackage[auto-lang=false]{lipsum} \NewDocumentEnvironment {scope} {} {} {} \def\interitem{\vspace{7mm plus 2 mm minus 3mm}} @@ -66,7 +67,6 @@ version 2005/12/01 or later. \titlespacing*{\section}{0pt}{6.5ex plus 1ex minus .2ex}{4.3ex plus .2ex} \titlespacing*{\subsection}{0pt}{4.5ex plus 1ex minus .2ex}{2ex plus .2ex} \usepackage{footnotehyper} -\usepackage{varwidth} \def\LetterAt{@} \parindent 0pt \skip \footins = 2 \bigskipamount @@ -160,7 +160,7 @@ version 2005/12/01 or later. % |texmf| tree. However, the best is to install \pkg{nicematrix} with a TeX % distribution such as MiKTeX, TeXlive or MacTeX. % -% \bigskip +% \medskip % \emph{Remark}: If you use LaTeX via Internet with, for example, Overleaf, you % can upload the file |nicematrix.sty| in the repertory of your % project in order to take full advantage of the latest version de @@ -170,21 +170,24 @@ version 2005/12/01 or later. % \small % \url{https:www.tug.org/svn/texlive/trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty}} % -% \bigskip +% \medskip % This package can be used with |xelatex|, |lualatex|, |pdflatex| but also by % the classical workflow |latex|-|dvips|-|ps2pdf| (or Adobe Distiller). % \textsl{However, the file nicematrix.dtx of the present documentation should % be compiled with XeLaTeX.} % -% \bigskip +% \medskip % This package requires and \textbf{loads} the packages \pkg{l3keys2e}, % \pkg{array}, \pkg{amsmath}, \pkg{pgfcore} and the module \pkg{shapes} of % \textsc{pgf} (\pkg{tikz}, which is a layer over \textsc{pgf} is \emph{not} % loaded). The final user only has to load the package with % |\usepackage{nicematrix}|. % +% \medskip +% If you use TeXLive as TeX distribution, you should note that TeXLive 2020 at +% least is required by \pkg{nicematrix}. % -% \bigskip +% \medskip % The idea of \pkg{nicematrix} is to create \textsc{pgf} nodes under the cells % and the positions of the rules of the tabular created by \pkg{array} and to % use these nodes to develop new features. As usual with \textsc{pgf}, the @@ -193,11 +196,11 @@ version 2005/12/01 or later. % compilations}.\footnote{If you use Overleaf, Overleaf will do automatically % the right number of compilations.} % -% \bigskip +% \medskip % Most features of \pkg{nicematrix} may be used without explicit use of % \textsc{pgf} or Tikz (which, in fact, is not loaded by default). % -% \bigskip +% \medskip % A command |\NiceMatrixOptions| is provided to fix the options (the % scope of the options fixed by this command is the current TeX group: they are % semi-global). @@ -239,9 +242,9 @@ version 2005/12/01 or later. % \pkg{nicematrix}): |{matrix}|, |{pmatrix}|, etc. % % \medskip -% L'environnement |{NiceTabularX}| is similar to the environment |{tabularx}| +% The environment |{NiceTabularX}| is similar to the environment |{tabularx}| % from the eponymous package.\footnote{In fact, it's possible to use directly the -% |X| columns in the environnement |{NiceTabular}| (and the required +% |X| columns in the environment |{NiceTabular}| (and the required % width for the tabular is fixed by the key |width|): cf. p.~\pageref{X-columns}}. % % \medskip @@ -468,9 +471,9 @@ version 2005/12/01 or later. % block extends until the last row (idem for the columns). % % \item The second argument is the content of the block. It's possible to use -% |\\| in that content to have a content on several lines. In |{NiceTabular}| -% the content of the block is composed in text mode whereas, in the other -% environments, it is composed in math mode. +% |\\| in that content to have a content on several lines. In |{NiceTabular}|, +% |{NiceTabular*}| and |{NiceTabularX}|, the content of the block is composed in +% text mode whereas, in the other environments, it is composed in math mode. % \end{itemize} % % @@ -479,17 +482,17 @@ version 2005/12/01 or later. % % \medskip % \begin{BVerbatim}[baseline=c,boxwidth=10.6cm] -% $\begin{bNiceArray}{ccc|c}[margin] +% $\begin{bNiceArray}{cw{c}{1cm}c|c}[margin] % ~emphase#\Block{3-3}{A}@ & & & 0 \\ -% & \hspace*{1cm} & & \Vdots \\ +% & & & \Vdots \\ % & & & 0 \\ % \hline % 0 & \Cdots& 0 & 0 % \end{bNiceArray}$ % \end{BVerbatim} -% $\begin{bNiceArray}{ccc|c}[margin] +% $\begin{bNiceArray}{cw{c}{1cm}c|c}[margin] % \Block{3-3}{A} & & & 0 \\ -% & \hspace*{1cm} & & \Vdots \\ +% & & & \Vdots \\ % & & & 0 \\ % \hline % 0 & \Cdots& 0 & 0 @@ -507,18 +510,18 @@ version 2005/12/01 or later. % % \medskip % \begin{BVerbatim}[baseline=c,boxwidth=10.6cm] -% $\begin{bNiceArray}{ccc|c}[margin] +% $\begin{bNiceArray}{cw{c}{1cm}c|c}[margin] % \Block{3-3}~emphase#<\Large>@{A} & & & 0 \\ -% & \hspace*{1cm} & & \Vdots \\ +% 0 & & & \Vdots \\ % & & & 0 \\ % \hline % 0 & \Cdots& 0 & 0 % \end{bNiceArray}$ % \end{BVerbatim} % \begin{scope} -% $\begin{bNiceArray}{ccc|c}[margin] +% $\begin{bNiceArray}{cw{c}{1cm}c|c}[margin] % \Block{3-3}<\Large>{A} & & & 0 \\ -% & \hspace*{1cm} & & \Vdots \\ +% & & & \Vdots \\ % & & & 0 \\ % \hline % 0 & \Cdots& 0 & 0 @@ -532,17 +535,17 @@ version 2005/12/01 or later. % % \medskip % \begin{BVerbatim}[baseline=c,boxwidth=10.6cm] -% $\begin{bNiceArray}{ccc|c}[margin] +% $\begin{bNiceArray}{cw{c}{1cm}c|c}[margin] % \Block~emphase#[r]@{3-3}<\LARGE>{A} & & & 0 \\ -% & \hspace*{1cm} & & \Vdots \\ +% & & & \Vdots \\ % & & & 0 \\ % \hline % 0 & \Cdots& 0 & 0 % \end{bNiceArray}$ % \end{BVerbatim} -% $\begin{bNiceArray}{ccc|c}[margin] +% $\begin{bNiceArray}{cw{c}{1cm}c|c}[margin] % \Block[r]{3-3}<\LARGE>{A} & & & 0 \\ -% & \hspace*{1cm} & & \Vdots \\ +% & & & \Vdots \\ % & & & 0 \\ % \hline % 0 & \Cdots& 0 & 0 @@ -575,13 +578,14 @@ version 2005/12/01 or later. % when it has a multi-line content (the lines are separated by |\\|); % \item the keys |hvlines| draws all the vertical and horizontal rules in the % block; -% \item \colorbox{yellow!50}{\textbf{New 5.19}}\enskip when the key |tikz| is -% used, the Tikz path corresponding of the rectangle which delimits the block is -% executed with Tikz\footnote{Tikz should be loaded (by default, -% \pkg{nicematrix} only loads \textsc{pgf}) and, if it's not, an error will be -% raised.} by using as options the value of that key |tikz| (which must be a -% list of keys allowed for a Tikz path). For examples, cf. -% p.~\pageref{tikz-key-examples}. +% \item when the key |tikz| is used, the Tikz path corresponding of the +% rectangle which delimits the block is executed with Tikz\footnote{Tikz should +% be loaded (by default, \pkg{nicematrix} only loads \textsc{pgf}) and, if it's +% not, an error will be raised.} by using as options the value of that key +% |tikz| (which must be a list of keys allowed for a Tikz path). For examples, +% cf. p.~\pageref{tikz-key-examples}; +% \item \colorbox{yellow!50}{\textbf{New 6.3}}\enskip the key |name| provides a +% name to the rectangular Tikz node corresponding to the block. % \end{itemize} % % \interitem @@ -596,24 +600,24 @@ version 2005/12/01 or later. % \bigskip % \begin{BVerbatim} % \begin{NiceTabular}{cwc{2cm}wc{3cm}c} -% rose & tulipe & marguerite & dahlia \\ -% violette +% rose & tulip & daisy & dahlia \\ +% violet % & ~emphase#\Block[draw=red,fill=[RGB]{204,204,255},rounded-corners]{2-2}@ -% ~emphase#{\LARGE De très jolies fleurs}@ -% & & souci \\ -% pervenche & & & lys \\ -% arum & iris & jacinthe & muguet +% ~emphase#{\LARGE Some beautiful flowers}@ +% & & marigold \\ +% iris & & & lis \\ +% arum & periwinkle & forget-me-not & hyacinth % \end{NiceTabular} % \end{BVerbatim} % % \medskip % \begin{center} % \begin{NiceTabular}{cwc{2cm}wc{3cm}c} -% rose & tulipe & marguerite & dahlia \\ -% violette & \Block[draw=red,fill=[RGB]{204,204,255},rounded-corners]{2-2} -% {\LARGE De très jolies fleurs} & & souci \\ -% pervenche & & & lys \\ -% arum & iris & jacinthe & muguet +% rose & tulip & daisy & dahlia \\ +% violet & \Block[draw=red,fill=[RGB]{204,204,255},rounded-corners]{2-2} +% {\LARGE Some beautiful flowers} & & marigold \\ +% iris & & & lis \\ +% arum & periwinkle & forget-me-not & hyacinth % \end{NiceTabular} % \end{center} % @@ -993,7 +997,8 @@ version 2005/12/01 or later. % % The keys |hlines| and |vlines| (which draw, of course, horizontal and vertical % rules) take in as value a list of numbers which are the numbers of the rules -% to draw. +% to draw.\footnote{It's possible to put in that list some intervals of integers +% with the syntax $i$|-|$j$.} % % In fact, for the environments with delimiters (such as |{pNiceMatrix}| or % |{bNiceArray}|), the key |vlines| don't draw the exterior rules (this is @@ -1306,9 +1311,9 @@ version 2005/12/01 or later. % \begin{Verbatim} % \begin{pNiceArray}{~textsl#preamble@} % ~emphase#\CodeBefore@ -% ~textsl#instructions of the code-before@ +% ~textsl#instructions of the code-before@ % ~emphase#\Body@ -% ~textsl#contents of the environnement@ +% ~textsl#contents of the environment@ % \end{pNiceArray} % \end{Verbatim} % @@ -1771,43 +1776,50 @@ version 2005/12/01 or later. % % \label{RowStyle} % -% \colorbox{yellow!50}{\bfseries New 5.18}\enskip The command |\RowStyle| takes -% in as argument some formatting intructions that will be applied to each cell -% on the rest of the current row. +% The command |\RowStyle| takes in as argument some formatting intructions that +% will be applied to each cell on the rest of the current row. % % \medskip % That command also takes in as optional argument (between square brackets) % a list of key-value pairs. % \begin{itemize} +% \item \colorbox{yellow!50}{\bfseries New 6.3}\enskip The key |nb-rows| sets +% the number of rows to which the specifications of the current command will +% apply. % \item The keys |cell-space-top-limit|, |cell-space-bottom-limit| and % |cell-space-limits| are available with the same meaning that the corresponding % global keys (cf. p.~\pageref{cell-space}). -% \item \colorbox{yellow!50}{\bfseries New 6.1}\enskip The key |color| sets the +% \item \colorbox{yellow!50}{\bfseries New 6.3}\enskip The key |rowcolor| sets +% the color of the background and the key |color| sets the % color of the text.\footnote{The key |color| uses the command % |\color| but inserts also an instruction |\leavevmode| before. This % instruction prevents a extra vertical space in the cells which belong to % columns of type |p|, |b|, |m| and |X| (which start in % vertical mode).} +% \item \colorbox{yellow!50}{\bfseries New 6.3}\enskip The key |bold| enforces +% bold characters for the cells of the row, both in math mode and text mode. % \end{itemize} % % \medskip -% \begin{BVerbatim}[boxwidth=11cm,baseline=c] -% \begin{NiceTabular}{cccc}[colortbl-like] +% \begin{BVerbatim}[boxwidth=12cm,baseline=c] +% \begin{NiceTabular}{cccc} % \hline % ~emphase#\RowStyle[cell-space-limits=3pt]{\rotate}@ % first & second & third & fourth \\ -% \rowcolor{blue!50}~emphase#\RowStyle[color=white]{\sffamily}@ +% ~emphase#\RowStyle[nb-rows=2,rowcolor=blue!50,color=white]{\sffamily}@ % 1 & 2 & 3 & 4 \\ +% I & II & III & IV % \end{NiceTabular} % \end{BVerbatim} -% \begin{NiceTabular}{cccc}[colortbl-like] +% \begin{NiceTabular}{cccc} % \hline % \RowStyle[cell-space-limits=3pt]{\rotate} % first & second & third & fourth \\ -% \rowcolor{blue!50}\RowStyle[color=white]{\sffamily} +% \RowStyle[nb-rows=2,color=white]{\sffamily} % 1 & 2 & 3 & 4 \\ +% I & II & III & IV \\ % \end{NiceTabular} -% +% % \medskip % The command |\rotate| is described p.~\pageref{rotate}. % @@ -1944,34 +1956,102 @@ version 2005/12/01 or later. % \end{array}$ % \end{NiceMatrixBlock} % +% \subsection{The columns V of varwidth} +% +% \colorbox{yellow!50}{\textbf{New 6.3}} +% +% \smallskip +% Let's recall first the behaviour of the environment |{varwidth}| of the +% eponymous package \pkg{varwidth}. That environment is similar to the classical +% environment |{minipage}| but the width provided in the argument is only the +% \emph{maximal} width of the created box. In the general case, the width of the +% box constructed by an environment |{varwidth}| is the natural width of its +% contents. +% +% \medskip +% That point is illustrated on the following examples. +% +% \medskip +% \begin{BVerbatim}[baseline=c,boxwidth=6cm] +% \fbox{% +% \begin{~emphase#varwidth@}{8cm} +% \begin{itemize} +% \item first item +% \item second item +% \end{itemize} +% \end{~emphase#varwidth@}} +% \end{BVerbatim} +% \fbox{\begin{varwidth}{8cm} +% \begin{itemize} +% \item first item +% \item second item +% \end{itemize} +% \end{varwidth}} +% +% \bigskip +% \begin{BVerbatim}[baseline=c,boxwidth=6cm] +% \fbox{% +% \begin{~emphase#minipage@}{8cm} +% \begin{itemize} +% \item first item +% \item second item +% \end{itemize} +% \end{~emphase#minipage@}} +% \end{BVerbatim} +% \fbox{\begin{minipage}{8cm} +% \begin{itemize} +% \item first item +% \item second item +% \end{itemize} +% \end{minipage}} +% +% +% \bigskip +% The package \pkg{varwidth} provides also the column type |V|. A column of type +% |V{|$\langle$\textsl{dim}$\rangle$|}| encapsulates all its cells in a +% |{varwidth}| with the argument $\langle$\textsl{dim}$\rangle$ (and does also some tuning). +% +% \smallskip +% When the package \pkg{varwidth} is loaded, the columns |V| of \pkg{varwidth} +% are supported by \pkg{nicematrix}. Concerning \pkg{nicematrix}, one of the +% interests of this type of columns is that, for a cell of a column of type~|V|, +% the PGF/Tikz node created by \pkg{nicematrix} for the content of that cell has +% a width adjusted to the content of the cell : cf. p.~\pageref{node-V}. +% +% % \subsection{The columns X} % % \label{X-columns} % \colorbox{yellow!50}{\textbf{New 6.0}} % +% \smallskip % The environment |{NiceTabular}| provides |X| columns similar to those provided % by the environment |{tabularx}| of the eponymous package. % -% The required width of the tabular may be specified with the key |width|. The -% initial value of this parameter is |\linewidth|. +% The required width of the tabular may be specified with the key |width| (in +% |{NiceTabular}| or in |\NiceMatrixOptions|). The initial value of this +% parameter is |\linewidth| (and not |\textwidth|). % % For sake of similarity with the environment |{tabularx}|, \pkg{nicematrix} % also provides an environment |{NiceTabularX}| with a first mandatory argument % which is the width of the tabular.\footnote{If \pkg{tabularx} is loaded, one % must use |{NiceTabularX}| (and not |{NiceTabular}|) in order to use the -% columns `X` (this point comes from a conflict in the definitions of the -% specifier `X`).} +% columns |X| (this point comes from a conflict in the definitions of the +% specifier |X|).} % % As with the packages \pkg{tabu} and \pkg{tabularray}, the specifier |X| takes % in an optional argument (between square brackets) which is a list of keys. % \begin{itemize} -% \item It's possible to give a weight for the column by providing an integer -% directly as argument of the specifier |X|. For example, a column |X[2]| will -% have a width double of the width of a column |X| (which has a weight equal to $1$). +% \item It's possible to give a weight for the column by providing a positive +% integer directly as argument of the specifier |X|. For example, a column +% |X[2]| will have a width double of the width of a column |X| (which has a +% weight equal to $1$).\footnote{The negative values of the weight, as provided +% by \pkg{tabu} (which is now obsolete), are not supported by \pkg{nicematrix}. +% If such a value is used, an error will be raised.} % \item It's possible to specify an horizontal alignment with one of the -% letters |l|, |c| and |r| (which inserts respectively |\raggedright|, +% letters |l|, |c| and |r| (which insert respectively |\raggedright|, % |\centering| and |\raggedleft| followed by |\arraybackslash|). -% \item It's possible to specify a vertical alignement with one of the keys +% \item It's possible to specify a vertical alignment with one of the keys % |t| (alias |p|), |m| and |b| (which construct respectively columns of type % |p|, |m| and |b|). The default value is |t|. % \end{itemize} @@ -2659,7 +2739,7 @@ version 2005/12/01 or later. % % \medskip % Moreover, two special commands are available in the |\CodeAfter|: |line| and -% |\SubMatrix|. +% |\SubMatrix|. We will now present these commands. % % \subsection{The command \textbackslash line in the \textbackslash CodeAfter} % @@ -2775,9 +2855,9 @@ version 2005/12/01 or later. % \end{NiceArray}$ % % \bigskip -% \colorbox{yellow!50}{\bfseries New 5.18}\enskip In fact, the command -% |\SubMatrix| also takes in two optional arguments specified by the -% traditional symbols |^| and |_| for material in superscript and subscript. +% In fact, the command |\SubMatrix| also takes in two optional arguments +% specified by the traditional symbols |^| and |_| for material in superscript +% and subscript. % % \medskip % \begin{scope} @@ -3692,6 +3772,47 @@ version 2005/12/01 or later. % a & a & a % \end{pNiceMatrix}\] % +% +% \colorbox{yellow!50}{\bfseries New 6.3}\enskip The nodes of the last column +% (excepted the potential «last column» specified by |last-col|) may also be +% indicated by $i$-|last|. Similarly, the nodes of the last row may be indicated +% by |last|-$j$. +% +% \subsubsection{Les colonnes V de varwidth} +% +% \label{node-V} +% When the extension \pkg{varwidth} is loaded, the columns of the type |V| +% defined by \pkg{varwidth} are supported by \pkg{nicematrix}. It may be +% interessant to notice that, for a cell of a column of type |V|, the PGF/Tikz +% node created by \pkg{nicematrix} for the content of that cell has a width +% adjusted to the content of the cell. This is in contrast to the case of the +% columns of type |p|, |m| or |b| for which the nodes have always a width equal +% to the width of the column. +% +% \begin{Verbatim} +% \begin{NiceTabular}{V{8cm}} +% \bfseries \large +% Titre \\ +% \lipsum[1] +% \CodeAfter +% \tikz \draw [rounded corners] (1-1) -| (last-|2) -- (last-|1) |- (1-1) ; +% \end{NiceTabular} +% \end{Verbatim} +% +% +% \begin{center} +% \begin{NiceTabular}{V{8cm}} +% \bfseries \large +% Titre \\ +% \lipsum[1] +% \CodeAfter +% \tikz \draw [rounded corners] (1-1) -| (last-|2) -- (last-|1) |- (1-1) ; +% \end{NiceTabular} +% \end{center} +% +% We have used the nodes corresponding to the position of the potential rules, +% which are described below (cf. p.~\pageref{nodes-i}). +% % % \subsection{The ``medium nodes'' and the ``large nodes''} % @@ -4300,7 +4421,7 @@ version 2005/12/01 or later. % \medskip % \item A cell of a column of type |p|, |m| or |t| is always considered as not % emtpy. \emph{Caution} : One should not rely upon that point because it may -% change if a future version of \pkg{nicematrix}. +% change in a future version of \pkg{nicematrix}. % % \end{itemize} % % @@ -4345,7 +4466,28 @@ version 2005/12/01 or later. % % \bigskip % The package \pkg{nicematrix} is not compatible with the class \cls{ieeeaccess} -% (because that class is not compatible with PGF/Tikz). +% (because that class is not compatible with PGF/Tikz).\footnote{See +% \url{https://tex.stackexchange.com/questions/528975/error-loading-tikz-in-ieeeaccess-class}} +% +% \bigskip +% In order to use \pkg{nicematrix} with the class \cls{aastex631}, you have to +% add the following lines in the preamble of your document : +% +% \begin{Verbatim} +% \BeforeBegin{NiceTabular}{\let\begin\BeginEnvironment\let\end\EndEnvironment} +% \BeforeBegin{NiceArray}{\let\begin\BeginEnvironment} +% \BeforeBegin{NiceMatrix}{\let\begin\BeginEnvironment} +% \end{Verbatim} +% +% \bigskip +% In order to use \pkg{nicematrix} with the class \cls{sn-jnln}, \pkg{pgf} must +% be loaded before the |\documentclass|: +% +% \begin{Verbatim} +% \RequirePackage{pgf} +% \documentclass{sn-jnl} +% \end{Verbatim} +% % % \section{Examples} % @@ -5203,7 +5345,7 @@ version 2005/12/01 or later. % \end{Verbatim} % % -%\section{Implementation} +% \section{Implementation} % % By default, the package \pkg{nicematrix} doesn't patch any existing code. % @@ -5302,8 +5444,12 @@ version 2005/12/01 or later. \bool_new:N \c_@@_enumitem_loaded_bool \bool_new:N \c_@@_tabularx_loaded_bool \bool_new:N \c_@@_tikz_loaded_bool +\bool_new:N \c_@@_varwidth_loaded_bool \AtBeginDocument { + \@ifpackageloaded { varwidth } + { \bool_set_true:N \c_@@_varwidth_loaded_bool } + { } \@ifpackageloaded { arydshln } { \bool_set_true:N \c_@@_arydshln_loaded_bool } { } @@ -5329,7 +5475,8 @@ version 2005/12/01 or later. % % That's why we create |\c_@@_pgfortikzpicture_tl| and % |\c_@@_endpgfortikzpicture_tl| which will be used to construct in a -% |\AtBeginDocument| the correct version of some commands. +% |\AtBeginDocument| the correct version of some commands. The tokens +% |\exp_not:N| are mandatory. % \begin{macrocode} \bool_set_true:N \c_@@_tikz_loaded_bool \tl_const:Nn \c_@@_pgfortikzpicture_tl { \exp_not:N \tikzpicture } @@ -5653,7 +5800,7 @@ version 2005/12/01 or later. \renewcommand*{\NC@rewrite@S}[1][] { % \end{macrocode} -% |\@temptokena| is a toks (not supported by \pkg{expl3}). +% |\@temptokena| is a toks (not supported by the L3 programming layer). % \begin{macrocode} \@temptokena \exp_after:wN { \tex_the:D \@temptokena \@@_S: [ ##1 ] } @@ -5773,6 +5920,14 @@ version 2005/12/01 or later. % \end{macrocode} % % \bigskip +% The following counter corresponds to the key |nb-rows| of the command +% |\RowStyle|. +% \begin{macrocode} +\int_new:N \l_@@_key_nb_rows_int +% \end{macrocode} +% +% +% \bigskip % The following token list will contain the type of horizontal alignment of the % current cell as provided by the corresponding column. The possible values are % |r|, |l|, |c|. For exemple, a column |p[l]{3cm}| will provide the value |l| @@ -5798,6 +5953,13 @@ version 2005/12/01 or later. \dim_new:N \g_@@_blocks_ht_dim \dim_new:N \g_@@_blocks_dp_dim % \end{macrocode} +% +% \bigskip +% The following dimension correspond to the key |width| (which may be fixed in +% |\NiceMatrixOptions| but also in an environment |{NiceTabular}|). +% \begin{macrocode} +\dim_new:N \l_@@_width_dim +% \end{macrocode} % % \bigskip % The sequence |\g_@@_names_seq| will be the list of all the names of @@ -5933,6 +6095,7 @@ version 2005/12/01 or later. % \bigskip % The following token list corresponds to the option |code-after| (it's also % possible to set the value of that parameter with the keyword |\CodeAfter|). +% That parameter is \emph{public}. % \begin{macrocode} \tl_new:N \g_nicematrix_code_after_tl % \end{macrocode} @@ -6089,10 +6252,10 @@ version 2005/12/01 or later. \seq_new:N \g_@@_blocks_seq % \end{macrocode} % We also manage a sequence of the \emph{positions} of the blocks. In that -% sequence, each block is represented by only the four first components: -% |{|\textsl{imin}|}{|\textsl{jmin}|}{|\textsl{imax}|}{|\textsl{jmax}|}|. A -% block with the key |hvlines| won't appear in that sequence (otherwise, the -% lines in that block would not be drawn!). +% sequence, each block is represented by only five components: +% |{|\textsl{imin}|}{|\textsl{jmin}|}{|\textsl{imax}|}{|\textsl{jmax}|}{|% +% \textsl{name}|}|. A block with the key |hvlines| won't appear in that +% sequence (otherwise, the lines in that block would not be drawn!). % \begin{macrocode} \seq_new:N \g_@@_pos_of_blocks_seq % \end{macrocode} @@ -6105,8 +6268,9 @@ version 2005/12/01 or later. % dotted lines are created in the array by |\Cdots|, |\Vdots|, |\Ddots|, etc. % However, their positions, that is to say, their extremities, will be % determined only after the construction of the array. In this sequence, each -% item contains four components: -% |{|\textsl{imin}|}{|\textsl{jmin}|}{|\textsl{imax}|}{|\textsl{jmax}|}|. +% item contains five components: +% |{|\textsl{imin}|}{|\textsl{jmin}|}{|\textsl{imax}|}{|\textsl{jmax}|}{|% +% \textsl{name}|}|. % \begin{macrocode} \seq_new:N \g_@@_pos_of_xdots_seq % \end{macrocode} @@ -6141,8 +6305,9 @@ version 2005/12/01 or later. % \end{macrocode} % % \medskip -% The following flag will be raised if the key |width| has been raised. You use -% it to raise an error when this key is used while no column |X| is used. +% The following flag will be raised if the key |width| is used in an environment +% |{NiceTabular}| (not in a comamnd |\NiceMatrixOptions|). You use it to raise +% an error when this key is used while no column |X| is used. % \begin{macrocode} \bool_new:N \l_@@_width_used_bool % \end{macrocode} @@ -6171,7 +6336,7 @@ version 2005/12/01 or later. % % \medskip % The following sequence will be used when the command |\SubMatrix| is used in -% the |code-before| (and not in the |\CodeAfter|). It will contain the position of +% the |\CodeBefore| (and not in the |\CodeAfter|). It will contain the position of % all the sub-matrices specified in the |code-before|. Each sub-matrix is % represented by an ``object'' of the forme |{|$i$|}{|$j$|}{|$k$|}{|$l$|}| % where $i$ and $j$ are the number of row and column of the upper-left cell and @@ -6277,11 +6442,6 @@ version 2005/12/01 or later. \bool_new:N \l_@@_dotted_bool % \end{macrocode} % -% \bigskip -% The following dimension will be used to trim the rules drawn in the array. -% \begin{macrocode} -\dim_new:N \l_@@_trim_dim -% \end{macrocode} % % \bigskip % \textbf{Variables for the exterior rows and columns}\par\nobreak @@ -6373,6 +6533,44 @@ version 2005/12/01 or later. % \end{macrocode} % This boolean is set to |false| at the end of |\@@_pre_array_ii:|. % \end{itemize} +% +% \bigskip +% \textbf{Some utilities} +% +% \begin{macrocode} +\cs_set_protected:Npn \@@_cut_on_hyphen:w #1-#2\q_stop + { + \tl_set:Nn \l_tmpa_tl { #1 } + \tl_set:Nn \l_tmpb_tl { #2 } + } +% \end{macrocode} +% +% +% The following takes as argument the name of a |clist| and which should be a +% list of intervals of integers. It \emph{expands} that list, that is to say, +% it replaces (by a sort of |mapcan| or |flat_map|) the interval by the explicit +% list of the integers. +% \begin{macrocode} +\cs_new_protected:Npn \@@_expand_clist:N #1 + { + \clist_if_in:NnF #1 { all } + { + \clist_clear:N \l_tmpa_clist + \clist_map_inline:Nn #1 + { + \tl_if_in:nnTF { ##1 } { - } + { \@@_cut_on_hyphen:w ##1 \q_stop } + { + \tl_set:Nn \l_tmpa_tl { ##1 } + \tl_set:Nn \l_tmpb_tl { ##1 } + } + \int_step_inline:nnn { \l_tmpa_tl } { \l_tmpb_tl } + { \clist_put_right:Nn \l_tmpa_clist { ####1 } } + } + \tl_set_eq:NN #1 \l_tmpa_clist + } + } +% \end{macrocode} % % \bigskip % \subsection*{The command \textbackslash tabularnote} @@ -6603,7 +6801,7 @@ version 2005/12/01 or later. % \end{macrocode} % % \medskip -% The command |\@@_pgf_rect_node:nnn| is a variant of |\@@_pgf_rect_node:nnnn|: +% The command |\@@_pgf_rect_node:nnn| is a variant of |\@@_pgf_rect_node:nnnnn|: % it takes two \textsc{pgf} points as arguments instead of the four dimensions % which are the coordinates. % \begin{macrocode} @@ -7195,6 +7393,8 @@ version 2005/12/01 or later. % \begin{macrocode} \keys_define:nn { NiceMatrix / NiceMatrixOptions } { + width .code:n = \dim_set:Nn \l_@@_width_dim { #1 } , + width .value_required:n = true , last-col .code:n = \tl_if_empty:nF { #1 } { \@@_error:n { last-col~non~empty~for~NiceMatrixOptions } } \int_zero:N \l_@@_last_col_int , @@ -7370,6 +7570,7 @@ version 2005/12/01 or later. { % \end{macrocode} % The dimension |width| will be used if at least a column of type |X| is used. +% If there is no column of type |X|, an error will be raised. % \begin{macrocode} width .code:n = \dim_set:Nn \l_@@_width_dim { #1 } \bool_set_true:N \l_@@_width_used_bool , @@ -7409,10 +7610,10 @@ version 2005/12/01 or later. \tl_gclear:N \g_@@_post_action_cell_tl % \end{macrocode} % At the beginning of the cell, we link |\CodeAfter| to a command which do -% \emph{not} begin with |\omit| (whereas the standard version of |\CodeAfter| -% begins with |\omit|). +% begins with |\\| (whereas the standard version of |\CodeAfter| begins does +% not). % \begin{macrocode} - \cs_set_eq:NN \CodeAfter \@@_CodeAfter_i:n + \cs_set_eq:NN \CodeAfter \@@_CodeAfter_i: % \end{macrocode} % We increment |\c@jCol|, which is the counter of the columns. % \begin{macrocode} @@ -7425,10 +7626,9 @@ version 2005/12/01 or later. \int_compare:nNnT \c@jCol = 1 { \int_compare:nNnT \l_@@_first_col_int = 1 \@@_begin_of_row: } % \end{macrocode} -% The content of the cell is composed in the box |\l_@@_cell_box| because we want -% to compute some dimensions of the box. The |\hbox_set_end:| corresponding to -% this |\hbox_set:Nw| will be in the |\@@_cell_end:| (and the potential -% |\c_math_toggle_token| also). +% The content of the cell is composed in the box |\l_@@_cell_box|. The +% |\hbox_set_end:| corresponding to this |\hbox_set:Nw| will be in the +% |\@@_cell_end:| (and the potential |\c_math_toggle_token| also). % \begin{macrocode} \hbox_set:Nw \l_@@_cell_box \bool_if:NF \l_@@_NiceTabular_bool @@ -7448,7 +7648,6 @@ version 2005/12/01 or later. \color { nicematrix } % \end{macrocode} % -% % \begin{macrocode} \g_@@_row_style_tl % \end{macrocode} @@ -7485,7 +7684,6 @@ version 2005/12/01 or later. % \begin{macrocode} \cs_new_protected:Npn \@@_begin_of_row: { - \tl_gclear:N \g_@@_row_style_tl \int_gincr:N \c@iRow \dim_gset_eq:NN \g_@@_dp_ante_last_row_dim \g_@@_dp_last_row_dim \dim_gset:Nn \g_@@_dp_last_row_dim { \box_dp:N \@arstrutbox } @@ -7691,17 +7889,17 @@ version 2005/12/01 or later. \hbox_set:Nn \l_@@_cell_box { \box_move_up:nn { \box_ht:N \l_@@_cell_box} - \hbox_overlap_left:n - { - \pgfsys@markposition - { \@@_env: - \int_use:N \c@iRow - \int_use:N \c@jCol - NW } + \hbox_overlap_left:n + { + \pgfsys@markposition + { \@@_env: - \int_use:N \c@iRow - \int_use:N \c@jCol - NW } % \end{macrocode} % I don't know why the following adjustement is needed when the compilation is % done with XeLaTeX or with the classical way |latex|, |divps|, |ps2pdf| (or % Adobe Distiller). However, it seems to work. % \begin{macrocode} - #1 - } + #1 + } \box_use:N \l_@@_cell_box \box_move_down:nn { \box_dp:N \l_@@_cell_box } \hbox_overlap_left:n @@ -7865,8 +8063,8 @@ version 2005/12/01 or later. { \@@_create_row_node: % \end{macrocode} -% We don't draw the rules of the key |hlines| (or |hvlines|) but we reserve the -% vertical space for theses rules. +% We don't draw now the rules of the key |hlines| (or |hvlines|) but we reserve the +% vertical space for theses rules (the rules will be drawn by \textsc{pgf}). % \begin{macrocode} \tl_if_empty:NF \l_@@_hlines_clist { @@ -7955,12 +8153,18 @@ version 2005/12/01 or later. % into account the color of the encompassing text. As a workaround, you peek the % color in force at the beginning of the environment and we will it in each cell. % \begin{macrocode} - \xglobal \colorlet { nicematrix } { . } + \xglobal \colorlet { nicematrix } { . } % \end{macrocode} % The number of letters |X| in the preamble of the array. % \begin{macrocode} - \int_gzero:N \g_@@_total_X_weight_int + \int_gzero:N \g_@@_total_X_weight_int +% \end{macrocode} +% +% \begin{macrocode} + \@@_expand_clist:N \l_@@_hlines_clist + \@@_expand_clist:N \l_@@_vlines_clist % \end{macrocode} +% % If \pkg{booktabs} is loaded, we have to patch the macro |\@BTnormal| which is % a macro of \pkg{booktabs}. The macro |\@BTnormal| draws an horizontal rule but % it occurs after a vertical skip done by a low level TeX command. When this @@ -8112,7 +8316,6 @@ version 2005/12/01 or later. \seq_gclear:N \g_@@_multicolumn_sizes_seq % \end{macrocode} % -% % The counter |\c@iRow| will be used to count the rows of the array (its % incrementation will be in the first cell of the row). % \begin{macrocode} @@ -8329,54 +8532,6 @@ version 2005/12/01 or later. } % \end{macrocode} % -% \bigskip -% \begin{macrocode} -\keys_define:nn { NiceMatrix / RowStyle } - { - cell-space-top-limit .code:n = - { - \tl_gput_right:Nn \g_@@_row_style_tl - { - \tl_gput_right:Nn \g_@@_post_action_cell_tl - { \dim_set:Nn \l_@@_cell_space_top_limit_dim { #1 } } - } - } , - cell-space-top-limit .value_required:n = true , - cell-space-bottom-limit .code:n = - { - \tl_gput_right:Nn \g_@@_row_style_tl - { - \tl_gput_right:Nn \g_@@_post_action_cell_tl - { \dim_set:Nn \l_@@_cell_space_bottom_limit_dim { #1 } } - } - } , - cell-space-bottom-limit .value_required:n = true , - cell-space-limits .meta:n = - { - cell-space-top-limit = #1 , - cell-space-bottom-limit = #1 , - } , - color .code:n = - { - \leavevmode \color { #1 } - \tl_gput_right:Nn \g_@@_row_style_tl - { \leavevmode \color { #1 } } - } , - color .value_required:n = true , - unknown .code:n = \@@_error:n { Unknown~key~for~RowStyle } - } -% \end{macrocode} -% -% \bigskip -% \begin{macrocode} -\NewDocumentCommand \@@_RowStyle:n { O { } m } - { - \tl_gset:Nn \g_@@_row_style_tl { #2 } - \keys_set:nn { NiceMatrix / RowStyle } { #1 } - #2 - \ignorespaces - } -% \end{macrocode} % % \bigskip % \subsection*{The \textbackslash CodeBefore} @@ -8398,7 +8553,7 @@ version 2005/12/01 or later. \int_set_eq:NN \g_@@_row_total_int { \seq_item:Nn \c_@@_size_seq 3 } \int_set_eq:NN \g_@@_col_total_int { \seq_item:Nn \c_@@_size_seq 6 } % \end{macrocode} -% +% % % Now, we will create all the |col| nodes and |row| nodes with the informations % written in the |aux| file. You use the technique described in the page~1229 of @@ -8441,6 +8596,12 @@ version 2005/12/01 or later. \endpgfpicture % \end{macrocode} % +% \medskip +% Now, the recreation of the nodes of the blocks \emph{which have a name}. +% \begin{macrocode} + \@@_create_blocks_nodes: +% \end{macrocode} +% % \begin{macrocode} \bool_if:NT \c_@@_tikz_loaded_bool { @@ -8472,7 +8633,7 @@ version 2005/12/01 or later. \group_begin: % \end{macrocode} % -% We compose the |code-before| in math mode in order to nullify the spaces put +% We compose the |\CodeBefore| in math mode in order to nullify the spaces put % by the user between instructions in the |code-before|. % \begin{macrocode} \bool_if:NT \l_@@_NiceTabular_bool \c_math_toggle_token @@ -8572,10 +8733,66 @@ version 2005/12/01 or later. } } } + \int_step_inline:nn \c@iRow + { + \pgfnodealias + { \@@_env: - ##1 - last } + { \@@_env: - ##1 - \int_use:N \c@jCol } + } + \int_step_inline:nn \c@jCol + { + \pgfnodealias + { \@@_env: - last - ##1 } + { \@@_env: - \int_use:N \c@iRow - ##1 } + } \@@_create_extra_nodes: } % \end{macrocode} % +% \bigskip +% \begin{macrocode} +\cs_new_protected:Npn \@@_create_blocks_nodes: + { + \pgfpicture + \pgf@relevantforpicturesizefalse + \pgfrememberpicturepositiononpagetrue + \seq_map_inline:Nn \g_@@_pos_of_blocks_seq + { \@@_create_one_block_node:nnnnn ##1 } + \endpgfpicture + } +% \end{macrocode} +% +% The following command is called |\@@_create_one_block_node:nnnnn| but, in +% fact, it creates a node only if the last argument (|#5|) which is the name of +% the block, is not empty.\footnote{Moreover, there is also in the list +% |\g_@@_pos_of_blocks_seq| the positions of the dotted lines (created by +% |\Cdots|, etc.) and, for these entries, there is, of course, no name (the +% fifth component is empty).} +% \begin{macrocode} +\cs_new_protected:Npn \@@_create_one_block_node:nnnnn #1 #2 #3 #4 #5 + { + \tl_if_empty:nF { #5 } + { + \@@_qpoint:n { col - #2 } + \dim_set_eq:NN \l_tmpa_dim \pgf@x + \@@_qpoint:n { #1 } + \dim_set_eq:NN \l_tmpb_dim \pgf@y + \@@_qpoint:n { col - \@@_succ:n { #4 } } + \dim_set_eq:NN \l_tmpc_dim \pgf@x + \@@_qpoint:n { \@@_succ:n { #3 } } + \dim_set_eq:NN \l_tmpd_dim \pgf@y + \@@_pgf_rect_node:nnnnn + { \@@_env: - #5 } + { \dim_use:N \l_tmpa_dim } + { \dim_use:N \l_tmpb_dim } + { \dim_use:N \l_tmpc_dim } + { \dim_use:N \l_tmpd_dim } + } + } +% \end{macrocode} +% +% +% \bigskip % \begin{macrocode} \cs_new_protected:Npn \@@_patch_for_revtex: { @@ -8602,7 +8819,7 @@ version 2005/12/01 or later. \NewDocumentEnvironment { NiceArrayWithDelims } { m m O { } m ! O { } t \CodeBefore } { - \bool_if:NT \c_@@_revtex_bool \@@_patch_for_revtex: + \bool_if:NT \c_@@_revtex_bool \@@_patch_for_revtex: % \end{macrocode} % % \begin{macrocode} @@ -9055,19 +9272,26 @@ version 2005/12/01 or later. \@@_newcolumntype W [ 2 ] { \@@_W: { ##1 } { ##2 } } % \end{macrocode} % +% \bigskip +% If the package \pkg{varwidth} has defined the column type |V|, we protect from +% expansion by redefining it to |\@@_V:| (which will be catched by our system). +% \begin{macrocode} + \cs_if_exist:NT \NC@find@V { \@@_newcolumntype V { \@@_V: } } +% \end{macrocode} +% % First, we have to store our preamble in the token register |\@temptokena| % (those ``token registers'' are \emph{not} supported by the L3 programming layer). % \begin{macrocode} - \exp_args:NV \@temptokena \g_@@_preamble_tl + \exp_args:NV \@temptokena \g_@@_preamble_tl % \end{macrocode} % Initialisation of a flag used by \pkg{array} to detect the end of the expansion. % \begin{macrocode} - \@tempswatrue + \@tempswatrue % \end{macrocode} % The following line actually does the expansion (it's has been copied from % |array.sty|). The expanded version is still in |\@temptokena|. % \begin{macrocode} - \@whilesw \if@tempswa \fi { \@tempswafalse \the \NC@list } + \@whilesw \if@tempswa \fi { \@tempswafalse \the \NC@list } % \end{macrocode} % % @@ -9080,24 +9304,24 @@ version 2005/12/01 or later. % |\@@_patch_preamble:n|. In the same time, we will count the columns with the % counter |\c@jCol|. % \begin{macrocode} - \int_gzero:N \c@jCol - \tl_gclear:N \g_@@_preamble_tl + \int_gzero:N \c@jCol + \tl_gclear:N \g_@@_preamble_tl % \end{macrocode} % |\g_tmpb_bool| will be raised if you have a \verb+|+ at the end of the preamble. % \begin{macrocode} - \bool_gset_false:N \g_tmpb_bool - \tl_if_eq:NnTF \l_@@_vlines_clist { all } - { - \tl_gset:Nn \g_@@_preamble_tl - { ! { \skip_horizontal:N \arrayrulewidth } } - } - { - \clist_if_in:NnT \l_@@_vlines_clist 1 - { - \tl_gset:Nn \g_@@_preamble_tl - { ! { \skip_horizontal:N \arrayrulewidth } } - } - } + \bool_gset_false:N \g_tmpb_bool + \tl_if_eq:NnTF \l_@@_vlines_clist { all } + { + \tl_gset:Nn \g_@@_preamble_tl + { ! { \skip_horizontal:N \arrayrulewidth } } + } + { + \clist_if_in:NnT \l_@@_vlines_clist 1 + { + \tl_gset:Nn \g_@@_preamble_tl + { ! { \skip_horizontal:N \arrayrulewidth } } + } + } % \end{macrocode} % The sequence |\g_@@_cols_vlsim_seq| will contain the numbers of the columns % where you will to have to draw vertical lines in the potential sub-matrices @@ -9209,27 +9433,29 @@ version 2005/12/01 or later. p { \@@_patch_preamble_iv:n #1 } b { \@@_patch_preamble_iv:n #1 } m { \@@_patch_preamble_iv:n #1 } - \@@_w: { \@@_patch_preamble_v:nnnn { } #1 } - \@@_W: { \@@_patch_preamble_v:nnnn { \cs_set_eq:NN \hss \hfil } #1 } - \@@_S: { \@@_patch_preamble_vi:n } - ( { \@@_patch_preamble_vii:nn #1 } - [ { \@@_patch_preamble_vii:nn #1 } - \{ { \@@_patch_preamble_vii:nn #1 } - ) { \@@_patch_preamble_viii:nn #1 } - ] { \@@_patch_preamble_viii:nn #1 } - \} { \@@_patch_preamble_viii:nn #1 } - X { \@@_patch_preamble_ix:n } + \@@_V: { \@@_patch_preamble_v:n } + V { \@@_patch_preamble_v:n } + \@@_w: { \@@_patch_preamble_vi:nnnn { } #1 } + \@@_W: { \@@_patch_preamble_vi:nnnn { \cs_set_eq:NN \hss \hfil } #1 } + \@@_S: { \@@_patch_preamble_vii:n } + ( { \@@_patch_preamble_viii:nn #1 } + [ { \@@_patch_preamble_viii:nn #1 } + \{ { \@@_patch_preamble_viii:nn #1 } + ) { \@@_patch_preamble_ix:nn #1 } + ] { \@@_patch_preamble_ix:nn #1 } + \} { \@@_patch_preamble_ix:nn #1 } + X { \@@_patch_preamble_x:n } % \end{macrocode} % When \pkg{tabularx} is loaded, a local redefinition of the specifier `X` is % done to replace `X` by `\@@_X`. Thus, our column type `X` will be used in the % `{NiceTabularX}`. % \begin{macrocode} - \@@_X { \@@_patch_preamble_ix:n } + \@@_X { \@@_patch_preamble_x:n } \q_stop { } } { \str_if_eq:VnTF \l_@@_letter_for_dotted_lines_str { #1 } - { \@@_patch_preamble_xi:n #1 } + { \@@_patch_preamble_xii:n #1 } { \str_if_eq:VnTF \l_@@_letter_vlism_tl { #1 } { @@ -9270,7 +9496,7 @@ version 2005/12/01 or later. % We increment the counter of columns and then we test for the presence of a |<|. % \begin{macrocode} \int_gincr:N \c@jCol - \@@_patch_preamble_x:n + \@@_patch_preamble_xi:n } % \end{macrocode} % @@ -9404,18 +9630,19 @@ version 2005/12/01 or later. % \begin{macrocode} \str_set:Nn \l_@@_hpos_col_str { j } \keys_set:nn { WithArrows / p-column } { #1 } - \@@_patch_preamble_iv_iv:n { #2 } + \@@_patch_preamble_iv_iv:nn { #2 } { minipage } } % \end{macrocode} % % \medskip -% The argument is the width of the column. +% The first argument is the width of the column. The second is the type of +% environment: |minipage| or |varwidth|. % \begin{macrocode} -\cs_new_protected:Npn \@@_patch_preamble_iv_iv:n #1 +\cs_new_protected:Npn \@@_patch_preamble_iv_iv:nn #1 #2 { \use:x { - \@@_patch_preamble_iv_v:nnnnnn + \@@_patch_preamble_iv_v:nnnnnnn { \str_if_eq:VnTF \l_@@_vpos_col_str { p } { t } { b } } { \dim_eval:n { #1 } } { @@ -9441,13 +9668,14 @@ version 2005/12/01 or later. { \str_if_eq:VnT \l_@@_vpos_col_str { m } \@@_center_cell_box: } { \str_if_eq:VnT \l_@@_hpos_col_str { si } \siunitx_cell_begin:w } { \str_if_eq:VnT \l_@@_hpos_col_str { si } \siunitx_cell_end: } + { #2 } } % \end{macrocode} % % We increment the counter of columns, and then we test for the presence of a |<|. % \begin{macrocode} \int_gincr:N \c@jCol - \@@_patch_preamble_x:n + \@@_patch_preamble_xi:n } % \end{macrocode} % @@ -9460,16 +9688,20 @@ version 2005/12/01 or later. % column. % % |#3| is the coding for the horizontal position of the content of the cell -% (|\centering|, |\raggedright|, |\raggedleft| or nothing). +% (|\centering|, |\raggedright|, |\raggedleft| or nothing). It's also possible +% to put in that |#3| some code to fix the value of |\l_@@_hpos_cell_str| which +% will be available in each cell of the column. % -% |#4| is an extra-code which contains |\l_@@_center_cell_box| (when the column +% |#4| is an extra-code which contains |\@@_center_cell_box:| (when the column % is a |m| column) or nothing (in the other cases). % % |#5| is a code put just before the |c|. % % |#6| is a code put just after the |c|. +% +% |#7| is the type of environment: |minipage| or |varwidth|. % \begin{macrocode} -\cs_new_protected:Npn \@@_patch_preamble_iv_v:nnnnnn #1 #2 #3 #4 #5 #6 +\cs_new_protected:Npn \@@_patch_preamble_iv_v:nnnnnnn #1 #2 #3 #4 #5 #6 #7 { \tl_gput_right:Nn \g_@@_preamble_tl { @@ -9481,7 +9713,7 @@ version 2005/12/01 or later. % \begin{macrocode} \dim_set:Nn \l_@@_col_width_dim { #2 } \@@_cell_begin:w - \begin { minipage } [ #1 ] { #2 } + \begin { #7 } [ #1 ] { #2 } % \end{macrocode} % The following lines have been taken from |array.sty|. % \begin{macrocode} @@ -9509,7 +9741,8 @@ version 2005/12/01 or later. % The following line has been taken from |array.sty|. % \begin{macrocode} \@finalstrut \@arstrutbox - \end { minipage } + % \bool_if:NT \g_@@_rotate_bool { \raggedright \hsize = 3 cm } + \end { #7 } % \end{macrocode} % If the letter in the preamble is |m|, |#3| will be equal to % |\@@_center_cell_box:| (see just below). @@ -9549,18 +9782,42 @@ version 2005/12/01 or later. ( \box_ht:N \l_@@_cell_box - \box_ht:N \@arstrutbox + \baselineskip ) / 2 } - { \box_use:N \l_@@_cell_box } + { \box_use:N \l_@@_cell_box } } } } } % \end{macrocode} % +% \medskip +% For |V| (similar to the |V| of \pkg{varwidth}). +% \begin{macrocode} +\cs_new_protected:Npn \@@_patch_preamble_v:n #1 + { + \str_if_eq:nnTF { #1 } { [ } + { \@@_patch_preamble_v_i:w [ } + { \@@_patch_preamble_v_i:w [ ] { #1 } } + } +\cs_new_protected:Npn \@@_patch_preamble_v_i:w [ #1 ] + { \@@_patch_preamble_v_ii:nn { #1 } } +\cs_new_protected:Npn \@@_patch_preamble_v_ii:nn #1 #2 + { + \str_set:Nn \l_@@_vpos_col_str { p } + \str_set:Nn \l_@@_hpos_col_str { j } + \keys_set:nn { WithArrows / p-column } { #1 } + \bool_if:NTF \c_@@_varwidth_loaded_bool + { \@@_patch_preamble_iv_iv:nn { #2 } { varwidth } } + { + \@@_error:n { varwidth~not~loaded } + \@@_patch_preamble_iv_iv:nn { #2 } { minipage } + } + } +% \end{macrocode} % % \medskip % For |w| and |W| % \begin{macrocode} -\cs_new_protected:Npn \@@_patch_preamble_v:nnnn #1 #2 #3 #4 +\cs_new_protected:Npn \@@_patch_preamble_vi:nnnn #1 #2 #3 #4 { \tl_gput_right:Nn \g_@@_preamble_tl { @@ -9589,7 +9846,7 @@ version 2005/12/01 or later. % We increment the counter of columns and then we test for the presence of a |<|. % \begin{macrocode} \int_gincr:N \c@jCol - \@@_patch_preamble_x:n + \@@_patch_preamble_xi:n } % \end{macrocode} % @@ -9598,17 +9855,17 @@ version 2005/12/01 or later. % during the first expansion of the preamble (done with the tools of standard % LaTeX and \pkg{array}). % \begin{macrocode} -\cs_new_protected:Npn \@@_patch_preamble_vi:n #1 +\cs_new_protected:Npn \@@_patch_preamble_vii:n #1 { \str_if_eq:nnTF { #1 } { [ } - { \@@_patch_preamble_vi_i:w [ } - { \@@_patch_preamble_vi_i:w [ ] { #1 } } + { \@@_patch_preamble_vii_i:w [ } + { \@@_patch_preamble_vii_i:w [ ] { #1 } } } % \end{macrocode} % % \begin{macrocode} -\cs_new_protected:Npn \@@_patch_preamble_vi_i:w [ #1 ] - { \@@_patch_preamble_vi_ii:n { #1 } } +\cs_new_protected:Npn \@@_patch_preamble_vii_i:w [ #1 ] + { \@@_patch_preamble_vii_ii:n { #1 } } % \end{macrocode} % % For version of \pkg{siunitx} at least equal to 3.0, the adaptation is different @@ -9621,7 +9878,7 @@ version 2005/12/01 or later. { \cs_if_exist:NTF \siunitx_cell_begin:w { - \cs_new_protected:Npn \@@_patch_preamble_vi_ii:n #1 + \cs_new_protected:Npn \@@_patch_preamble_vii_ii:n #1 { \tl_gput_right:Nn \g_@@_preamble_tl { @@ -9637,11 +9894,11 @@ version 2005/12/01 or later. % We increment the counter of columns and then we test for the presence of a |<|. % \begin{macrocode} \int_gincr:N \c@jCol - \@@_patch_preamble_x:n + \@@_patch_preamble_xi:n } } { - \cs_new_protected:Npn \@@_patch_preamble_vi_ii:n #1 + \cs_new_protected:Npn \@@_patch_preamble_vii_ii:n #1 { \tl_gput_right:Nn \g_@@_preamble_tl { @@ -9650,7 +9907,7 @@ version 2005/12/01 or later. < { \c_@@_table_print_tl \@@_cell_end: } } \int_gincr:N \c@jCol - \@@_patch_preamble_x:n + \@@_patch_preamble_xi:n } } } @@ -9660,7 +9917,7 @@ version 2005/12/01 or later. % \medskip % For |(|, |[| and |\{|. % \begin{macrocode} -\cs_new_protected:Npn \@@_patch_preamble_vii:nn #1 #2 +\cs_new_protected:Npn \@@_patch_preamble_viii:nn #1 #2 { \bool_if:NT \l_@@_small_bool { \@@_fatal:n { Delimiter~with~small } } % \end{macrocode} @@ -9681,15 +9938,15 @@ version 2005/12/01 or later. } { \tl_gput_right:Nn \g_@@_preamble_tl { ! { \enskip } } - \@@_patch_preamble_vii_i:nn { #1 } { #2 } + \@@_patch_preamble_viii_i:nn { #1 } { #2 } } } - { \@@_patch_preamble_vii_i:nn { #1 } { #2 } } + { \@@_patch_preamble_viii_i:nn { #1 } { #2 } } } % \end{macrocode} % % \begin{macrocode} -\cs_new_protected:Npn \@@_patch_preamble_vii_i:nn #1 #2 +\cs_new_protected:Npn \@@_patch_preamble_viii_i:nn #1 #2 { \tl_gput_right:Nx \g_@@_internal_code_after_tl { \@@_delimiter:nnn #1 { \@@_succ:n \c@jCol } \c_true_bool } @@ -9710,11 +9967,11 @@ version 2005/12/01 or later. % considered as the right delimiter of the environment if the environment is % |{NiceArray}|). % \begin{macrocode} -\cs_new_protected:Npn \@@_patch_preamble_viii:nn #1 #2 +\cs_new_protected:Npn \@@_patch_preamble_ix:nn #1 #2 { \bool_if:NT \l_@@_small_bool { \@@_fatal:n { Delimiter~with~small } } \tl_if_in:nnTF { ) ] \} } { #2 } - { \@@_patch_preamble_viii_i:nnn #1 #2 } + { \@@_patch_preamble_ix_i:nnn #1 #2 } { \tl_if_eq:nnTF { \q_stop } { #2 } { @@ -9739,7 +9996,7 @@ version 2005/12/01 or later. % \end{macrocode} % % \begin{macrocode} -\cs_new_protected:Npn \@@_patch_preamble_viii_i:nnn #1 #2 #3 +\cs_new_protected:Npn \@@_patch_preamble_ix_i:nnn #1 #2 #3 { \tl_if_eq:nnTF { \q_stop } { #3 } { @@ -9771,17 +10028,17 @@ version 2005/12/01 or later. % (between square brackets). That's why we test whether there is a |[| after the % letter |X|. % \begin{macrocode} -\cs_new_protected:Npn \@@_patch_preamble_ix:n #1 +\cs_new_protected:Npn \@@_patch_preamble_x:n #1 { \str_if_eq:nnTF { #1 } { [ } - { \@@_patch_preamble_ix_i:w [ } - { \@@_patch_preamble_ix_i:w [ ] #1 } + { \@@_patch_preamble_x_i:w [ } + { \@@_patch_preamble_x_i:w [ ] #1 } } % \end{macrocode} % % \begin{macrocode} -\cs_new_protected:Npn \@@_patch_preamble_ix_i:w [ #1 ] - { \@@_patch_preamble_ix_ii:n { #1 } } +\cs_new_protected:Npn \@@_patch_preamble_x_i:w [ #1 ] + { \@@_patch_preamble_x_ii:n { #1 } } % \end{macrocode} % |#1| is the optional argument of the |X| specifier (a list of % \emph{key}-\emph{value} pairs). @@ -9800,7 +10057,7 @@ version 2005/12/01 or later. % \medskip % In the following command, |#1| is the list of the options of the specifier |X|. % \begin{macrocode} -\cs_new_protected:Npn \@@_patch_preamble_ix_ii:n #1 +\cs_new_protected:Npn \@@_patch_preamble_x_ii:n #1 { % \end{macrocode} % The possible values of |\l_@@_hpos_col_str| are |j| (for \emph{justified} which is @@ -9826,6 +10083,12 @@ version 2005/12/01 or later. \int_set:Nn \l_@@_weight_int { 1 } \keys_set_known:nnN { WithArrows / p-column } { #1 } \l_tmpa_tl \keys_set:nV { WithArrows / X-column } \l_tmpa_tl + \int_compare:nNnT \l_@@_weight_int < 0 + { + \exp_args:Nnx \@@_error:nn { negative~weight } + { \int_use:N \l_@@_weight_int } + \int_set:Nn \l_@@_weight_int { - \l_@@_weight_int } + } \int_gadd:Nn \g_@@_total_X_weight_int \l_@@_weight_int % \end{macrocode} % @@ -9834,7 +10097,11 @@ version 2005/12/01 or later. % written in the |aux| file). % \begin{macrocode} \bool_if:NTF \l_@@_X_columns_aux_bool - { \@@_patch_preamble_iv_iv:n { \l_@@_weight_int \l_@@_X_columns_dim } } + { + \@@_patch_preamble_iv_iv:nn + { \l_@@_weight_int \l_@@_X_columns_dim } + { minipage } + } { \tl_gput_right:Nn \g_@@_preamble_tl { @@ -9859,14 +10126,14 @@ version 2005/12/01 or later. } } \int_gincr:N \c@jCol - \@@_patch_preamble_x:n + \@@_patch_preamble_xi:n } } % \end{macrocode} % % \bigskip % \begin{macrocode} -\cs_new_protected:Npn \@@_patch_preamble_xi:n #1 +\cs_new_protected:Npn \@@_patch_preamble_xii:n #1 { \tl_gput_right:Nn \g_@@_preamble_tl { ! { \skip_horizontal:N 2\l_@@_radius_dim } } @@ -9885,10 +10152,10 @@ version 2005/12/01 or later. % |<{..}| because, after those potential |<{...}|, we have to insert % |!{\skip_horizontal:N ...}| when the key |vlines| is used. % \begin{macrocode} -\cs_new_protected:Npn \@@_patch_preamble_x:n #1 +\cs_new_protected:Npn \@@_patch_preamble_xi:n #1 { \str_if_eq:nnTF { #1 } { < } - \@@_patch_preamble_xii:n + \@@_patch_preamble_xiii:n { \tl_if_eq:NnTF \l_@@_vlines_clist { all } { @@ -9909,10 +10176,10 @@ version 2005/12/01 or later. % \end{macrocode} % % \begin{macrocode} -\cs_new_protected:Npn \@@_patch_preamble_xii:n #1 +\cs_new_protected:Npn \@@_patch_preamble_xiii:n #1 { \tl_gput_right:Nn \g_@@_preamble_tl { < { #1 } } - \@@_patch_preamble_x:n + \@@_patch_preamble_xi:n } % \end{macrocode} % @@ -9977,6 +10244,7 @@ version 2005/12/01 or later. { \int_eval:n { \c@jCol + 1 } } { \int_use:N \c@iRow } { \int_eval:n { \c@jCol + #1 } } + { } % for the name of the block } } % \end{macrocode} @@ -10021,7 +10289,6 @@ version 2005/12/01 or later. b { \@@_patch_m_preamble_iv:nnn b #1 } \@@_w: { \@@_patch_m_preamble_v:nnnn { } #1 } \@@_W: { \@@_patch_m_preamble_v:nnnn { \cs_set_eq:NN \hss \hfil } #1 } - \@@_true_c: { \@@_patch_m_preamble_vi:n #1 } \q_stop { } } { \@@_fatal:nn { unknown~column~type } { #1 } } @@ -10125,20 +10392,6 @@ version 2005/12/01 or later. } % \end{macrocode} % -% \medskip -% For |\@@_true_c:| which will appear in our redefinition of the columns of type -% |S| (of \pkg{siunitx}). -% \begin{macrocode} -\cs_new_protected:Npn \@@_patch_m_preamble_vi:n #1 - { - \tl_gput_right:Nn \g_@@_preamble_tl { c } -% \end{macrocode} -% We test for the presence of a |<|. -% \begin{macrocode} - \@@_patch_m_preamble_x:n - } -% \end{macrocode} -% % % After a specifier of column, we have to test whether there is one or several % |<{..}| because, after those potential |<{...}|, we have to insert @@ -10280,9 +10533,9 @@ version 2005/12/01 or later. % The |\hbox| avoids that the |pgfpicture| inside |\@@_draw_blocks| adds a extra % vertical space before the notes. % \begin{macrocode} - \hbox:n - { - \box_use_drop:N \l_@@_the_array_box + \hbox + { + \box_use_drop:N \l_@@_the_array_box % \end{macrocode} % We have to draw the blocks right now because there may be tabular notes in % some blocks (which are not mono-column: the blocks which are mono-column @@ -10290,9 +10543,9 @@ version 2005/12/01 or later. % extra nodes before creating the blocks since there are |medium| nodes to create % for the blocks. % \begin{macrocode} - \@@_create_extra_nodes: - \seq_if_empty:NF \g_@@_blocks_seq \@@_draw_blocks: - } + \@@_create_extra_nodes: + \seq_if_empty:NF \g_@@_blocks_seq \@@_draw_blocks: + } \bool_lazy_or:nnT { \int_compare_p:nNn \c@tabularnote > 0 } { ! \tl_if_empty_p:V \l_@@_tabularnote_tl } @@ -10834,12 +11087,12 @@ version 2005/12/01 or later. \pgfcoordinate { \@@_env: - col - \@@_succ:n \g_tmpa_int } { \bool_lazy_and:nnTF \l_@@_Matrix_bool \l_@@_NiceArray_bool - { - \pgfpoint - { - 0.5 \arrayrulewidth - \arraycolsep } - \c_zero_dim - } - { \pgfpoint { - 0.5 \arrayrulewidth } \c_zero_dim } + { + \pgfpoint + { - 0.5 \arrayrulewidth - \arraycolsep } + \c_zero_dim + } + { \pgfpoint { - 0.5 \arrayrulewidth } \c_zero_dim } } \str_if_empty:NF \l_@@_name_str { @@ -10890,10 +11143,10 @@ version 2005/12/01 or later. { % \end{macrocode} % At the beginning of the cell, we link |\CodeAfter| to a command which do -% \emph{not} begin with |\omit| (whereas the standard version of |\CodeAfter| -% begins with |\omit|). +% begins with |\\| (whereas the standard version of |\CodeAfter| begins does +% not). % \begin{macrocode} - \cs_set_eq:NN \CodeAfter \@@_CodeAfter_i:n + \cs_set_eq:NN \CodeAfter \@@_CodeAfter_i: \bool_gset_true:N \g_@@_after_col_zero_bool \@@_begin_of_row: % \end{macrocode} @@ -10966,10 +11219,10 @@ version 2005/12/01 or later. { % \end{macrocode} % At the beginning of the cell, we link |\CodeAfter| to a command which do -% \emph{not} begin with |\omit| (whereas the standard version of |\CodeAfter| -% begins with |\omit|). +% begins with |\\| (whereas the standard version of |\CodeAfter| begins does +% not). % \begin{macrocode} - \cs_set_eq:NN \CodeAfter \@@_CodeAfter_i:n + \cs_set_eq:NN \CodeAfter \@@_CodeAfter_i: % \end{macrocode} % With the flag |\g_@@_last_col_found_bool|, we will know that the ``last % column'' is really used. @@ -11132,12 +11385,11 @@ version 2005/12/01 or later. \NewDocumentEnvironment { NiceTabular } { O { } m ! O { } } { % \end{macrocode} -% The dimension |\l_@@_width_dim| will be used if at least one column of type -% |X| is used. -% +% If the dimension |\l_@@_width_dim| is equal to $0$~pt, that means that it has +% not be set by a previous use of |\NiceMatrixOptions|. % \begin{macrocode} - \dim_zero_new:N \l_@@_width_dim - \dim_set_eq:NN \l_@@_width_dim \linewidth + \dim_compare:nNnT \l_@@_width_dim = \c_zero_dim + { \dim_set_eq:NN \l_@@_width_dim \linewidth } \str_gset:Nn \g_@@_name_env_str { NiceTabular } \keys_set:nn { NiceMatrix / NiceTabular } { #1 , #3 } \bool_set_true:N \l_@@_NiceTabular_bool @@ -11245,8 +11497,9 @@ version 2005/12/01 or later. } } % \end{macrocode} -% We write also the potential content of |\g_@@_pos_of_blocks_seq| (it will be -% useful if the command |\rowcolors| is used with the key |respect-blocks|). +% We write also the potential content of |\g_@@_pos_of_blocks_seq|. It will be +% used to recreate the blocks with a name in the |\CodeBefore| and also if the +% command |\rowcolors| is used with the key |respect-blocks|). % \begin{macrocode} \seq_if_empty:NF \g_@@_pos_of_blocks_seq { @@ -11274,6 +11527,41 @@ version 2005/12/01 or later. % \begin{macrocode} \@@_create_diag_nodes: % \end{macrocode} +% +% \medskip +% We create the aliases using |last| for the nodes of the cells in the last row +% and the last column. +% \begin{macrocode} + \pgfpicture + \int_step_inline:nn \c@iRow + { + \pgfnodealias + { \@@_env: - ##1 - last } + { \@@_env: - ##1 - \int_use:N \c@jCol } + } + \int_step_inline:nn \c@jCol + { + \pgfnodealias + { \@@_env: - last - ##1 } + { \@@_env: - \int_use:N \c@iRow - ##1 } + } + \str_if_empty:NF \l_@@_name_str + { + \int_step_inline:nn \c@iRow + { + \pgfnodealias + { \l_@@_name_str - ##1 - last } + { \@@_env: - ##1 - \int_use:N \c@jCol } + } + \int_step_inline:nn \c@jCol + { + \pgfnodealias + { \l_@@_name_str - last - ##1 } + { \@@_env: - \int_use:N \c@iRow - ##1 } + } + } + \endpgfpicture +% \end{macrocode} % % By default, the diagonal lines will be parallelized\footnote{It's possible to % use the option |parallelize-diags| to disable this parallelization.}. There @@ -11435,11 +11723,6 @@ version 2005/12/01 or later. } % \end{macrocode} % -% -% \begin{macrocode} - % \bool_if:NT \l_@@_code_before_bool \@@_write_aux_for_cell_nodes: -% \end{macrocode} -% % \medskip % \begin{macrocode} \str_gclear:N \g_@@_name_env_str @@ -11483,13 +11766,13 @@ version 2005/12/01 or later. \cs_new_protected:Npn \@@_adjust_pos_of_blocks_seq: { \seq_gset_map_x:NNn \g_@@_pos_of_blocks_seq \g_@@_pos_of_blocks_seq - { \@@_adjust_pos_of_blocks_seq_i:nnnn ##1 } + { \@@_adjust_pos_of_blocks_seq_i:nnnnn ##1 } } % \end{macrocode} % % The following command must \emph{not} be protected. % \begin{macrocode} -\cs_new:Npn \@@_adjust_pos_of_blocks_seq_i:nnnn #1 #2 #3 #4 +\cs_new:Npn \@@_adjust_pos_of_blocks_seq_i:nnnnn #1 #2 #3 #4 #5 { { #1 } { #2 } @@ -11503,6 +11786,7 @@ version 2005/12/01 or later. { \int_use:N \c@jCol } { #4 } } + { #5 } } % \end{macrocode} % @@ -11566,52 +11850,6 @@ version 2005/12/01 or later. % \end{macrocode} % % -% \bigskip -% \begin{macrocode} -\cs_new_protected:Npn \@@_write_aux_for_cell_nodes: - { - \pgfpicture - \pgfrememberpicturepositiononpagetrue - \pgf@relevantforpicturesizefalse - \int_step_inline:nnn \l_@@_first_row_int \g_@@_row_total_int - { - \int_step_inline:nnn \l_@@_first_col_int \g_@@_col_total_int - { - \cs_if_exist:cT { pgf @ sh @ ns @ \@@_env: - ##1 - ####1 } - { - \pgfscope - \pgftransformshift - { \pgfpointanchor { \@@_env: - ##1 - ####1 } { north~west } } - \pgfnode - { rectangle } - { center } - { - \hbox - { \pgfsys@markposition { \@@_env: - ##1 - ####1 - NW } } - } - { } - { } - \endpgfscope - \pgfscope - \pgftransformshift - { \pgfpointanchor { \@@_env: - ##1 - ####1 } { south~east } } - \pgfnode - { rectangle } - { center } - { - \hbox - { \pgfsys@markposition { \@@_env: - ##1 - ####1 - SE } } - } - { } - { } - \endpgfscope - } - } - } - \endpgfpicture - \@@_create_extra_nodes: - } -% \end{macrocode} % % \bigskip % The following command creates the diagonal nodes (in fact, if the matrix is @@ -11908,6 +12146,7 @@ version 2005/12/01 or later. { \int_min:nn \l_@@_initial_j_int \l_@@_final_j_int } { \int_use:N \l_@@_final_i_int } { \int_max:nn \l_@@_initial_j_int \l_@@_final_j_int } + { } % for the name of the block } } % \end{macrocode} @@ -12415,15 +12654,11 @@ version 2005/12/01 or later. \bool_if:NTF \l_@@_initial_open_bool { \@@_open_y_initial_dim: - % \@@_qpoint:n { col - \int_use:N \l_@@_initial_j_int } - % \dim_set_eq:NN \l_@@_x_initial_dim \pgf@x \@@_open_x_initial_dim: } { \@@_set_initial_coords_from_anchor:n { south~east } } \bool_if:NTF \l_@@_final_open_bool { - % \@@_open_y_final_dim: - % \@@_qpoint:n { col - \@@_succ:n \l_@@_final_j_int } \@@_open_x_final_dim: \dim_set_eq:NN \l_@@_x_final_dim \pgf@x } @@ -12849,8 +13084,8 @@ version 2005/12/01 or later. \int_compare:nNnTF \c@jCol = \l_@@_last_col_int { \@@_error:nn { in~last~col } \Ldots } { - \@@_instruction_of_type:nnn \c_false_bool { Ldots } - { #1 , down = #2 , up = #3 } + \@@_instruction_of_type:nnn \c_false_bool { Ldots } + { #1 , down = #2 , up = #3 } } } \bool_if:NF \l_@@_nullify_dots_bool @@ -12869,8 +13104,8 @@ version 2005/12/01 or later. \int_compare:nNnTF \c@jCol = \l_@@_last_col_int { \@@_error:nn { in~last~col } \Cdots } { - \@@_instruction_of_type:nnn \c_false_bool { Cdots } - { #1 , down = #2 , up = #3 } + \@@_instruction_of_type:nnn \c_false_bool { Cdots } + { #1 , down = #2 , up = #3 } } } \bool_if:NF \l_@@_nullify_dots_bool @@ -12889,8 +13124,8 @@ version 2005/12/01 or later. \int_compare:nNnTF \c@iRow = \l_@@_last_row_int { \@@_error:nn { in~last~row } \Vdots } { - \@@_instruction_of_type:nnn \c_false_bool { Vdots } - { #1 , down = #2 , up = #3 } + \@@_instruction_of_type:nnn \c_false_bool { Vdots } + { #1 , down = #2 , up = #3 } } } \bool_if:NF \l_@@_nullify_dots_bool @@ -13340,6 +13575,140 @@ version 2005/12/01 or later. % this command because they have to do other settings (for example, the diagonal % lines must be parallelized). % +% +% +% \bigskip +% \subsection*{The command \textbackslash RowStyle} +% +% \medskip +% \begin{macrocode} +\keys_define:nn { NiceMatrix / RowStyle } + { + cell-space-top-limit .dim_set:N = \l_tmpa_dim , + cell-space-top-limit .initial:n = \c_zero_dim , + cell-space-top-limit .value_required:n = true , + cell-space-bottom-limit .dim_set:N = \l_tmpb_dim , + cell-space-bottom-limit .initial:n = \c_zero_dim , + cell-space-bottom-limit .value_required:n = true , + cell-space-limits .meta:n = + { + cell-space-top-limit = #1 , + cell-space-bottom-limit = #1 , + } , + color .tl_set:N = \l_tmpa_tl , + color .value_required:n = true , + bold .bool_set:N = \l_tmpa_bool , + bold .default:n = true , + bold .initial:n = false , + nb-rows .int_set:N = \l_@@_key_nb_rows_int , + nb-rows .value_required:n = true , + nb-rows .initial:n = 1 , + rowcolor .tl_set:N = \l_tmpc_tl , + rowcolor .value_required:n = true , + rowcolor .initial:n = \c_empty_tl , + unknown .code:n = \@@_error:n { Unknown~key~for~RowStyle } + } +% \end{macrocode} +% +% \bigskip +% \begin{macrocode} +\NewDocumentCommand \@@_RowStyle:n { O { } m } + { + \keys_set:nn { NiceMatrix / RowStyle } { #1 } +% \end{macrocode} +% If the key |rowcolor| has been used. +% \begin{macrocode} + \tl_if_empty:NF \l_tmpc_tl + { +% \end{macrocode} +% First, the end of the current row (we remind that |\RowStyle| applies to the +% \emph{end} of the current row). +% \begin{macrocode} + \tl_gput_right:Nx \g_nicematrix_code_before_tl + { + \@@_rectanglecolor + { \l_tmpc_tl } + { \int_use:N \c@iRow - \int_use:N \c@jCol } + { \int_use:N \c@iRow - * } + } +% \end{macrocode} +% Then, the other rows (if there is several rows). +% \begin{macrocode} + \int_compare:nNnT \l_@@_key_nb_rows_int > 1 + { + \tl_gput_right:Nx \g_nicematrix_code_before_tl + { + \@@_rowcolor + { \l_tmpc_tl } + { + \int_eval:n { \c@iRow + 1 } + - \int_eval:n { \c@iRow + \l_@@_key_nb_rows_int - 1 } + } + } + } + } + \tl_gput_right:Nn \g_@@_row_style_tl { \ifnum \c@iRow < } + \tl_gput_right:Nx \g_@@_row_style_tl + { \int_eval:n { \c@iRow + \l_@@_key_nb_rows_int } } + \tl_gput_right:Nn \g_@@_row_style_tl { #2 } +% \end{macrocode} +% |\l_tmpa_dim| is the value of the key |cell-space-top-limit| of |\RowStyle|. +% \begin{macrocode} + \dim_compare:nNnT \l_tmpa_dim > \c_zero_dim + { + \tl_gput_right:Nx \g_@@_row_style_tl + { + \tl_gput_right:Nn \exp_not:N \g_@@_post_action_cell_tl + { + \dim_set:Nn \l_@@_cell_space_top_limit_dim + { \dim_use:N \l_tmpa_dim } + } + } + } +% \end{macrocode} +% |\l_tmpb_dim| is the value of the key |cell-space-bottom-limit| of |\RowStyle|. +% \begin{macrocode} + \dim_compare:nNnT \l_tmpb_dim > \c_zero_dim + { + \tl_gput_right:Nx \g_@@_row_style_tl + { + \tl_gput_right:Nn \exp_not:N \g_@@_post_action_cell_tl + { + \dim_set:Nn \l_@@_cell_space_bottom_limit_dim + { \dim_use:N \l_tmpb_dim } + } + } + } +% \end{macrocode} +% |\l_tmpa_tl| is the value of the key |color| of |\RowStyle|. +% \begin{macrocode} + \tl_if_empty:NF \l_tmpa_tl + { + \tl_gput_right:Nx \g_@@_row_style_tl + { \mode_leave_vertical: \exp_not:N \color { \l_tmpa_tl } } + } +% \end{macrocode} +% |\l_tmpa_bool| is the value of the key |bold|. +% \begin{macrocode} + \bool_if:NT \l_tmpa_bool + { + \tl_gput_right:Nn \g_@@_row_style_tl + { + \if_mode_math: + \c_math_toggle_token + \bfseries \boldmath + \c_math_toggle_token + \else: + \bfseries \boldmath + \fi: + } + } + \tl_gput_right:Nn \g_@@_row_style_tl { \fi } + \g_@@_row_style_tl + \ignorespaces + } +% \end{macrocode} +% % \bigskip % \subsection*{Colors of cells, rows and columns} % @@ -13423,13 +13792,6 @@ version 2005/12/01 or later. } % \end{macrocode} % -% \begin{macrocode} -\cs_set_protected:Npn \@@_cut_on_hyphen:w #1-#2\q_stop - { - \tl_set:Nn \l_tmpa_tl { #1 } - \tl_set:Nn \l_tmpb_tl { #2 } - } -% \end{macrocode} % % \begin{macrocode} \cs_new_protected:Npn \@@_cartesian_color:nn #1 #2 @@ -13548,7 +13910,7 @@ version 2005/12/01 or later. % \bigskip % \begin{macrocode} \keys_define:nn { NiceMatrix / arraycolor } - { except-corners .code:n = \@@_error:n { key except-corners } } + { except-corners .code:n = \@@_error:n { key~except-corners } } % \end{macrocode} % % \bigskip @@ -13617,7 +13979,7 @@ version 2005/12/01 or later. % \begin{macrocode} \seq_set_eq:NN \l_tmpb_seq \g_@@_pos_of_blocks_seq \seq_set_filter:NNn \l_tmpa_seq \l_tmpb_seq - { \@@_not_in_exterior_p:nnnn ##1 } + { \@@_not_in_exterior_p:nnnnn ##1 } } \pgfpicture \pgf@relevantforpicturesizefalse @@ -13654,8 +14016,8 @@ version 2005/12/01 or later. \bool_if:NT \l_@@_respect_blocks_bool { \seq_set_filter:NNn \l_tmpb_seq \l_tmpa_seq - { \@@_intersect_our_row_p:nnnn ####1 } - \seq_map_inline:Nn \l_tmpb_seq { \@@_rowcolors_i:nnnn ####1 } + { \@@_intersect_our_row_p:nnnnn ####1 } + \seq_map_inline:Nn \l_tmpb_seq { \@@_rowcolors_i:nnnnn ####1 } % \end{macrocode} % Now, the last row of the block is computed in |\l_tmpb_int|. % \begin{macrocode} @@ -13714,7 +14076,7 @@ version 2005/12/01 or later. % % \bigskip % \begin{macrocode} -\cs_new_protected:Npn \@@_rowcolors_i:nnnn #1 #2 #3 #4 +\cs_new_protected:Npn \@@_rowcolors_i:nnnnn #1 #2 #3 #4 #5 { \int_compare:nNnT { #3 } > \l_tmpb_int { \int_set:Nn \l_tmpb_int { #3 } } @@ -13724,7 +14086,7 @@ version 2005/12/01 or later. % % \bigskip % \begin{macrocode} -\prg_new_conditional:Nnn \@@_not_in_exterior:nnnn p +\prg_new_conditional:Nnn \@@_not_in_exterior:nnnnn p { \bool_lazy_or:nnTF { \int_compare_p:nNn { #4 } = \c_zero_int } @@ -13738,7 +14100,7 @@ version 2005/12/01 or later. % The following command return |true| when the block intersects the row % |\l_tmpa_int|. % \begin{macrocode} -\prg_new_conditional:Nnn \@@_intersect_our_row:nnnn p +\prg_new_conditional:Nnn \@@_intersect_our_row:nnnnn p { \bool_if:nTF { @@ -13896,7 +14258,7 @@ version 2005/12/01 or later. % |!| which may be activated by some packages (ex.: \pkg{babel} with the option % |french| on latex and pdflatex). % \begin{macrocode} - \cellcolor [ #1 ] { \exp_not:n { #2 } } + \@@_cellcolor [ #1 ] { \exp_not:n { #2 } } { \int_use:N \c@iRow - \int_use:N \c@jCol } } } @@ -13913,7 +14275,7 @@ version 2005/12/01 or later. { \tl_gput_right:Nx \g_nicematrix_code_before_tl { - \exp_not:N \rectanglecolor [ #1 ] { \exp_not:n { #2 } } + \@@_rectanglecolor [ #1 ] { \exp_not:n { #2 } } { \int_use:N \c@iRow - \int_use:N \c@jCol } { \int_use:N \c@iRow - \exp_not:n { \int_use:N \c@jCol } } } @@ -14054,33 +14416,33 @@ version 2005/12/01 or later. % etc.), we will set |\g_tmpa_bool| to |false| and the small vertical rule won't % be drawn. % \begin{macrocode} - \bool_gset_true:N \g_tmpa_bool - \seq_map_inline:Nn \g_@@_pos_of_blocks_seq - { \@@_test_vline_in_block:nnnn ##1 } - \seq_map_inline:Nn \g_@@_pos_of_xdots_seq - { \@@_test_vline_in_block:nnnn ##1 } - \seq_map_inline:Nn \g_@@_pos_of_stroken_blocks_seq - { \@@_test_vline_in_stroken_block:nnnn ##1 } - \clist_if_empty:NF \l_@@_corners_clist \@@_test_in_corner_v: - \bool_if:NTF \g_tmpa_bool - { - \tl_if_empty:NT \l_tmpc_tl + \bool_gset_true:N \g_tmpa_bool + \seq_map_inline:Nn \g_@@_pos_of_blocks_seq + { \@@_test_vline_in_block:nnnnn ##1 } + \seq_map_inline:Nn \g_@@_pos_of_xdots_seq + { \@@_test_vline_in_block:nnnnn ##1 } + \seq_map_inline:Nn \g_@@_pos_of_stroken_blocks_seq + { \@@_test_vline_in_stroken_block:nnnn ##1 } + \clist_if_empty:NF \l_@@_corners_clist \@@_test_in_corner_v: + \bool_if:NTF \g_tmpa_bool + { + \tl_if_empty:NT \l_tmpc_tl % \end{macrocode} % We keep in memory that we have a rule to draw. % \begin{macrocode} - { \tl_set_eq:NN \l_tmpc_tl \l_tmpa_tl } - } - { - \tl_if_empty:NF \l_tmpc_tl - { - \@@_vline_ii:nnnn - { #1 } - { #2 } - \l_tmpc_tl - { \int_eval:n { \l_tmpa_tl - 1 } } - \tl_clear:N \l_tmpc_tl - } - } + { \tl_set_eq:NN \l_tmpc_tl \l_tmpa_tl } + } + { + \tl_if_empty:NF \l_tmpc_tl + { + \@@_vline_ii:nnnn + { #1 } + { #2 } + \l_tmpc_tl + { \int_eval:n { \l_tmpa_tl - 1 } } + \tl_clear:N \l_tmpc_tl + } + } } \tl_if_empty:NF \l_tmpc_tl { @@ -14280,9 +14642,9 @@ version 2005/12/01 or later. % \begin{macrocode} \bool_gset_true:N \g_tmpa_bool \seq_map_inline:Nn \g_@@_pos_of_blocks_seq - { \@@_test_hline_in_block:nnnn ##1 } + { \@@_test_hline_in_block:nnnnn ##1 } \seq_map_inline:Nn \g_@@_pos_of_xdots_seq - { \@@_test_hline_in_block:nnnn ##1 } + { \@@_test_hline_in_block:nnnnn ##1 } \seq_map_inline:Nn \g_@@_pos_of_stroken_blocks_seq { \@@_test_hline_in_stroken_block:nnnn ##1 } \clist_if_empty:NF \l_@@_corners_clist \@@_test_in_corner_h: @@ -14559,7 +14921,7 @@ version 2005/12/01 or later. % |#1|, |#2|, |#3| and |#4|. If this rule would be in the block (it must not be % drawn), the boolean |\l_tmpa_bool| is set to |false|. % \begin{macrocode} -\cs_new_protected:Npn \@@_test_hline_in_block:nnnn #1 #2 #3 #4 +\cs_new_protected:Npn \@@_test_hline_in_block:nnnnn #1 #2 #3 #4 { \bool_lazy_all:nT { @@ -14574,7 +14936,7 @@ version 2005/12/01 or later. % % The same for vertical rules. % \begin{macrocode} -\cs_new_protected:Npn \@@_test_vline_in_block:nnnn #1 #2 #3 #4 +\cs_new_protected:Npn \@@_test_vline_in_block:nnnnn #1 #2 #3 #4 { \bool_lazy_all:nT { @@ -14703,8 +15065,8 @@ version 2005/12/01 or later. \@@_test_if_cell_in_a_block:nn { ##1 } { \int_eval:n { #2 } } \bool_lazy_or:nnTF { - \cs_if_exist_p:c - { pgf @ sh @ ns @ \@@_env: - ##1 - \int_eval:n { #2 } } + \cs_if_exist_p:c + { pgf @ sh @ ns @ \@@_env: - ##1 - \int_eval:n { #2 } } } \l_tmpb_bool { \bool_set_true:N \l_tmpa_bool } @@ -14786,7 +15148,7 @@ version 2005/12/01 or later. % % % \begin{macrocode} -\cs_new_protected:Npn \@@_test_if_cell_in_block:nnnnnnn #1 #2 #3 #4 #5 #6 +\cs_new_protected:Npn \@@_test_if_cell_in_block:nnnnnnn #1 #2 #3 #4 #5 #6 #7 { \int_compare:nNnT { #3 } < { \@@_succ:n { #1 } } { @@ -15500,7 +15862,7 @@ version 2005/12/01 or later. % If the box is rotated (the key |\rotate| may be in the previous |#4|), the % tabular used for the content of the cell will be constructed with a format % |c|. In the other cases, the tabular will be constructed with a format equal -% to the key of position of the box. In other words: the alignement internal to +% to the key of position of the box. In other words: the alignment internal to % the tabular is the same as the external alignment of the tabular (that is to % say the position of the block in its zone of merged cells). % \begin{macrocode} @@ -15603,7 +15965,7 @@ version 2005/12/01 or later. % In the list of options |#3|, maybe there is a key for the horizontal alignment % (|l|, |r| or |c|). In that case, that key has been read and stored in % |\l_@@_hpos_block_str|. However, maybe there were no key of the horizontal -% alignement and that's why we put a key corresponding to the value of +% alignment and that's why we put a key corresponding to the value of % |\l_@@_hpos_block_str|, which is fixed by the type of current column. % \begin{macrocode} { \exp_not:n { #3 } , \l_@@_hpos_block_str } @@ -15640,7 +16002,7 @@ version 2005/12/01 or later. % If the box is rotated (the key |\rotate| may be in the previous |#4|), the % tabular used for the content of the cell will be constructed with a format % |c|. In the other cases, the tabular will be constructed with a format equal -% to the key of position of the box. In other words: the alignement internal to +% to the key of position of the box. In other words: the alignment internal to % the tabular is the same as the external alignment of the tabular (that is to % say the position of the block in its zone of merged cells). % \begin{macrocode} @@ -15726,6 +16088,9 @@ version 2005/12/01 or later. t .value_forbidden:n = true , b .code:n = \str_set:Nn \l_@@_vpos_of_block_tl b , b .value_forbidden:n = true , + name .tl_set:N = \l_@@_block_name_str , + name .value_required:n = true , + name .initial:n = \c_empty_tl , unknown .code:n = \@@_error:n { Unknown~key~for~Block } } % \end{macrocode} @@ -15817,8 +16182,8 @@ version 2005/12/01 or later. % |hvlines|) will be used when drawing the rules (in fact, there is also the % |\multicolumn| and the |\diagbox| in that sequence). % \begin{macrocode} - \seq_gput_left:Nn \g_@@_pos_of_blocks_seq - { { #1 } { #2 } { #3 } { #4 } } + \seq_gput_left:Nx \g_@@_pos_of_blocks_seq + { { #1 } { #2 } { #3 } { #4 } { \l_@@_block_name_str } } } % \end{macrocode} % @@ -15975,11 +16340,21 @@ version 2005/12/01 or later. % The function |\@@_pgf_rect_node:nnnnn| takes in as arguments the name of the node % and the four coordinates of two opposite corner points of the rectangle. % \begin{macrocode} - \begin { pgfscope } \@@_pgf_rect_node:nnnnn { \@@_env: - #1 - #2 - block } \l_tmpb_dim \l_tmpa_dim \l_tmpd_dim \l_tmpc_dim - \end { pgfscope } + \str_if_empty:NF \l_@@_block_name_str + { + \pgfnodealias + { \@@_env: - \l_@@_block_name_str } + { \@@_env: - #1 - #2 - block } + \str_if_empty:NF \l_@@_name_str + { + \pgfnodealias + { \l_@@_name_str - \l_@@_block_name_str } + { \@@_env: - #1 - #2 - block } + } + } % \end{macrocode} % % \medskip @@ -16590,6 +16965,10 @@ version 2005/12/01 or later. { \int_use:N \c@jCol } { \int_use:N \c@iRow } { \int_use:N \c@jCol } +% \end{macrocode} +% The last argument is for the name of the block. +% \begin{macrocode} + { } } } % \end{macrocode} @@ -16600,7 +16979,7 @@ version 2005/12/01 or later. % \medskip % The first four arguments of |\@@_actually_diagbox:nnnnnn| correspond to the % rectangle (=block) to slash (we recall that it's possible to use |\diagbox| in -% a |\Block|). The two other are the elements to draw below and above the +% a |\Block|). The other two are the elements to draw below and above the % diagonal line. % \begin{macrocode} \cs_new_protected:Npn \@@_actually_diagbox:nnnnnn #1 #2 #3 #4 #5 #6 @@ -16632,11 +17011,24 @@ version 2005/12/01 or later. \pgfscope \pgftransformshift { \pgfpoint \l_tmpb_dim \l_tmpc_dim } \pgfnode { rectangle } { south~west } - { \@@_math_toggle_token: #5 \@@_math_toggle_token: } { } { } + { + \begin { minipage } { 20 cm } + \@@_math_toggle_token: #5 \@@_math_toggle_token: + \end { minipage } + } + { } + { } \endpgfscope \pgftransformshift { \pgfpoint \l_tmpd_dim \l_tmpa_dim } \pgfnode { rectangle } { north~east } - { \@@_math_toggle_token: #6 \@@_math_toggle_token: } { } { } + { + \begin { minipage } { 20 cm } + \raggedleft + \@@_math_toggle_token: #6 \@@_math_toggle_token: + \end { minipage } + } + { } + { } \endpgfpicture } % \end{macrocode} @@ -16681,29 +17073,32 @@ version 2005/12/01 or later. % |\@@_CodeAfter:|. That macro must \emph{not} be protected since it begins with % |\omit|. % \begin{macrocode} -\cs_new:Npn \@@_CodeAfter: { \omit \@@_CodeAfter_i:n } +\cs_new:Npn \@@_CodeAfter: { \omit \@@_CodeAfter_ii:n } % \end{macrocode} % % \medskip % However, in each cell of the environment, the command |\CodeAfter| will be -% linked to the following command |\@@_CodeAfter_i:n| which do \emph{not} begin -% with |\omit| (and thus, the user will be able to use |\CodeAfter| without -% error and without the need to prefix by |\omit|. +% linked to the following command |\@@_CodeAfter_ii:n| which begins +% with |\\|. +% +% \begin{macrocode} +\cs_new_protected:Npn \@@_CodeAfter_i: { \\ \omit \@@_CodeAfter_ii:n } +% \end{macrocode} % % \smallskip % We have to catch everything until the end of the current environment (of % \pkg{nicematrix}). First, we go until the next command |\end|. % \begin{macrocode} -\cs_new_protected:Npn \@@_CodeAfter_i:n #1 \end +\cs_new_protected:Npn \@@_CodeAfter_ii:n #1 \end { - \tl_gput_right:Nn \g_nicematrix_code_after_tl { #1 } - \@@_CodeAfter_ii:n + \tl_gput_right:Nn \g_nicematrix_code_after_tl { #1 } + \@@_CodeAfter_iv:n } % \end{macrocode} % % We catch the argument of the command |\end| (in |#1|). % \begin{macrocode} -\cs_new_protected:Npn \@@_CodeAfter_ii:n #1 +\cs_new_protected:Npn \@@_CodeAfter_iv:n #1 { % \end{macrocode} % If this is really the end of the current environment (of \pkg{nicematrix}), we @@ -16717,11 +17112,12 @@ version 2005/12/01 or later. % \begin{macrocode} { \tl_gput_right:Nn \g_nicematrix_code_after_tl { \end { #1 } } - \@@_CodeAfter_i:n + \@@_CodeAfter_ii:n } } % \end{macrocode} % +% % % \subsection*{The delimiters in the preamble} % @@ -16935,8 +17331,10 @@ version 2005/12/01 or later. \exp_args:NNV \NewDocumentCommand \@@_SubMatrix \l_@@_argspec_tl { \peek_remove_spaces:n - { \@@_sub_matrix:nnnnnnn - { #1 } { #2 } { #3 } { #4 } { #5 } { #6 } { #7 } } + { + \@@_sub_matrix:nnnnnnn + { #1 } { #2 } { #3 } { #4 } { #5 } { #6 } { #7 } + } } } % \end{macrocode} @@ -17531,7 +17929,7 @@ version 2005/12/01 or later. % The following message will be deleted when we will delete the key % |except-corners| for the command |\arraycolor|. % \begin{macrocode} -\@@_msg_new:nn { key except-corners } +\@@_msg_new:nn { key~except-corners } { The~key~'except-corners'~has~been~deleted~for~the~command~\token_to_str:N \arraycolor\ in~the~\token_to_str:N \CodeBefore.~You~should~instead~use~ @@ -17583,6 +17981,13 @@ version 2005/12/01 or later. } % \end{macrocode} % +% \begin{macrocode} +\@@_msg_new:nn { negative~weight } + { + The~weight~of~the~'X'~columns~must~be~positive~and~you~have~used~ + the~value~'#1'.~If~you~go~on,~the~absolute~value~will~be~used. + } +% \end{macrocode} % % \begin{macrocode} \@@_msg_new:nn { too~much~cols~for~matrix~with~last~col } @@ -17704,14 +18109,6 @@ version 2005/12/01 or later. } % \end{macrocode} % -% \begin{macrocode} -\@@_msg_new:nn { Unknown~key~for~RowStyle } - { - As~for~now,~there~is~only~four~keys~available~here:~'cell-space-top-limit',~ - 'cell-space-bottom-limit~'cell-space-limits'~and~color~(and~you~try~to~use~ - '\l_keys_key_str').~If~you~go~on,~this~key~will~be~ignored. - } -% \end{macrocode} % % \begin{macrocode} \@@_msg_new:nn { Unknown~key~for~rowcolors } @@ -18017,6 +18414,14 @@ version 2005/12/01 or later. } % \end{macrocode} % +% \begin{macrocode} +\@@_msg_new:nn { varwidth~not~loaded } + { + You~can't~use~the~column~type~'V'~because~'varwidth'~is~not~ + loaded.\\ + If~you~go~on,~your~column~will~behave~like~'p'. + } +% \end{macrocode} % % \begin{macrocode} \@@_msg_new:nnn { Unknown~key~for~Block } @@ -18027,7 +18432,7 @@ version 2005/12/01 or later. } { The~available~keys~are~(in~alphabetic~order):~b,~borders,~c,~draw,~fill,~ - hvlines,~l,~line-width,~rounded-corners,~r,~t~and~tikz. + hvlines,~l,~line-width,~name,~rounded-corners,~r,~t~and~tikz. } % \end{macrocode} % @@ -18095,6 +18500,26 @@ version 2005/12/01 or later. % \end{macrocode} % % \begin{macrocode} +\@@_msg_new:nnn { Unknown~key~for~RowStyle } + { + The~key~'\l_keys_key_str'~is~unknown~for~the~command~ + \token_to_str:N \RowStyle. \\ + If~you~go~on,~it~will~be~ignored. \\ + For~a~list~of~the~available~keys,~type~H~. + } + { + The~available~keys~are~(in~alphabetic~order):~ + 'bold',~ + 'cell-space-top-limit',~ + 'cell-space-bottom-limit',~ + 'cell-space-limits',~ + 'color',~ + 'nb-rows'~and~ + 'rowcolor'. + } +% \end{macrocode} +% +% \begin{macrocode} \@@_msg_new:nnn { Unknown~key~for~NiceMatrixOptions } { The~key~'\l_keys_key_str'~is~unknown~for~the~command~ @@ -18857,6 +19282,20 @@ version 2005/12/01 or later. % % Key |\color| for the command |\RowStyle|. % +% \subsection*{Changes between versions 6.1 and 6.2} +% +% Better compatibility with the classes \cls{revtex4-1} and \cls{revtex4-2}. +% +% Key |vlines-in-sub-matrix|. +% +% \subsection*{Changes between versions 6.2 and 6.3} +% +% Keys |nb-rows|, |rowcolor| and |bold| for the command |\RowStyle| +% +% Key |name| for the command |\Block|. +% +% Support for the columns |V| of \pkg{varwidth}. +% % % \PrintIndex % diff --git a/macros/latex/contrib/nicematrix/nicematrix.pdf b/macros/latex/contrib/nicematrix/nicematrix.pdf index eddc836218..392d727897 100644 Binary files a/macros/latex/contrib/nicematrix/nicematrix.pdf and b/macros/latex/contrib/nicematrix/nicematrix.pdf differ -- cgit v1.2.3