diff options
author | Norbert Preining <norbert@preining.info> | 2022-09-01 03:00:47 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-09-01 03:00:47 +0000 |
commit | 01683025083419ba101c2612ba7d243f87410bcf (patch) | |
tree | 8367e3fc8ad170abc83b58053b1aea54a3bacbbf /macros/latex/contrib | |
parent | d1518bf9b322780506b9422250024028e402f0ec (diff) |
CTAN sync 202209010300
Diffstat (limited to 'macros/latex/contrib')
101 files changed, 2314 insertions, 544 deletions
diff --git a/macros/latex/contrib/l3backend/CHANGELOG.md b/macros/latex/contrib/l3backend/CHANGELOG.md index 8bf6a93866..e2e4f4a3b3 100644 --- a/macros/latex/contrib/l3backend/CHANGELOG.md +++ b/macros/latex/contrib/l3backend/CHANGELOG.md @@ -6,6 +6,11 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2022-08-30] + +### Added +- Support for new approach to writing PDF objects + ## [2022-08-23] ### Changed @@ -262,7 +267,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/2022-08-23...HEAD +[Unreleased]: https://github.com/latex3/latex3/compare/2022-08-30...HEAD +[2022-08-30]: https://github.com/latex3/latex3/compare/2022-08-23...2022-08-30 [2022-08-23]: https://github.com/latex3/latex3/compare/2022-08-05...2022-08-23 [2022-08-05]: https://github.com/latex3/latex3/compare/2022-07-01...2022-08-05 [2022-07-01]: https://github.com/latex3/latex3/compare/2022-04-20...2022-07-01 diff --git a/macros/latex/contrib/l3backend/README.md b/macros/latex/contrib/l3backend/README.md index 724c54a890..5961e2ff7a 100644 --- a/macros/latex/contrib/l3backend/README.md +++ b/macros/latex/contrib/l3backend/README.md @@ -1,7 +1,7 @@ LaTeX3 Backend Drivers ====================== -Release 2022-08-23 +Release 2022-08-30 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 135bee63eb..09672f0ac8 100644 --- a/macros/latex/contrib/l3backend/l3backend-basics.dtx +++ b/macros/latex/contrib/l3backend/l3backend-basics.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % @@ -70,27 +70,27 @@ % \begin{macrocode} \ProvidesExplFile %<*dvipdfmx> - {l3backend-dvipdfmx.def}{2022-08-23}{} + {l3backend-dvipdfmx.def}{2022-08-30}{} {L3 backend support: dvipdfmx} %</dvipdfmx> %<*dvips> - {l3backend-dvips.def}{2022-08-23}{} + {l3backend-dvips.def}{2022-08-30}{} {L3 backend support: dvips} %</dvips> %<*dvisvgm> - {l3backend-dvisvgm.def}{2022-08-23}{} + {l3backend-dvisvgm.def}{2022-08-30}{} {L3 backend support: dvisvgm} %</dvisvgm> %<*luatex> - {l3backend-luatex.def}{2022-08-23}{} + {l3backend-luatex.def}{2022-08-30}{} {L3 backend support: PDF output (LuaTeX)} %</luatex> %<*pdftex> - {l3backend-pdftex.def}{2022-08-23}{} + {l3backend-pdftex.def}{2022-08-30}{} {L3 backend support: PDF output (pdfTeX)} %</pdftex> %<*xetex> - {l3backend-xetex.def}{2022-08-23}{} + {l3backend-xetex.def}{2022-08-30}{} {L3 backend support: XeTeX} %</xetex> % \end{macrocode} diff --git a/macros/latex/contrib/l3backend/l3backend-box.dtx b/macros/latex/contrib/l3backend/l3backend-box.dtx index 6b5b08457c..4a41423fb0 100644 --- a/macros/latex/contrib/l3backend/l3backend-box.dtx +++ b/macros/latex/contrib/l3backend/l3backend-box.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3backend/l3backend-code.pdf b/macros/latex/contrib/l3backend/l3backend-code.pdf Binary files differindex 00836f6abb..9862216c01 100644 --- a/macros/latex/contrib/l3backend/l3backend-code.pdf +++ b/macros/latex/contrib/l3backend/l3backend-code.pdf diff --git a/macros/latex/contrib/l3backend/l3backend-color.dtx b/macros/latex/contrib/l3backend/l3backend-color.dtx index dabf728427..a4eef23098 100644 --- a/macros/latex/contrib/l3backend/l3backend-color.dtx +++ b/macros/latex/contrib/l3backend/l3backend-color.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % @@ -852,8 +852,8 @@ { \use:x { - \pdf_object_new:nn { color \int_use:N \g_@@_model_int } { array } - \pdf_object_write:nn { color \int_use:N \g_@@_model_int } + \pdf_object_new:n { color \int_use:N \g_@@_model_int } + \pdf_object_write:nnn { color \int_use:N \g_@@_model_int } { array } { /Separation /#1 ~ #2 ~ \pdf_object_ref_last: } } \prop_gput:Nnx \g_@@_backend_colorant_prop { /#1 } @@ -867,8 +867,8 @@ { \pdf_object_if_exist:nF { @@_illuminant_CIELAB_ #1 } { - \pdf_object_new:nn { @@_illuminant_CIELAB_ #1 } { array } - \pdf_object_write:nx { @@_illuminant_CIELAB_ #1 } + \pdf_object_new:n { @@_illuminant_CIELAB_ #1 } + \pdf_object_write:nnx { @@_illuminant_CIELAB_ #1 } { array } { /Lab ~ << @@ -921,8 +921,8 @@ } \use:x { - \pdf_object_new:nn { color \int_use:N \g_@@_model_int } { array } - \pdf_object_write:nn { color \int_use:N \g_@@_model_int } + \pdf_object_new:n { color \int_use:N \g_@@_model_int } + \pdf_object_write:nnn { color \int_use:N \g_@@_model_int } { array } { /DeviceN ~ [ ~ #1 ~ ] ~ @@ -951,8 +951,8 @@ { \pdf_object_if_exist:nF { @@_icc_ #1 } { - \pdf_object_new:nn { @@_icc_ #1 } { fstream } - \pdf_object_write:nx { @@_icc_ #1 } + \pdf_object_new:n { @@_icc_ #1 } + \pdf_object_write:nnx { @@_icc_ #1 } { fstream } { { /N ~ \exp_not:n { #2 } ~ @@ -976,8 +976,8 @@ { \pdf_object_if_exist:nF { @@_icc_ #1 } { - \pdf_object_new:nn { @@_icc_ #1 } { fstream } - \pdf_object_write:nn { @@_icc_ #1 } + \pdf_object_new:n { @@_icc_ #1 } + \pdf_object_write:nnn { @@_icc_ #1 } { fstream } { { /N ~ #3 } {#1} diff --git a/macros/latex/contrib/l3backend/l3backend-draw.dtx b/macros/latex/contrib/l3backend/l3backend-draw.dtx index c3d91ed9af..952a849ec6 100644 --- a/macros/latex/contrib/l3backend/l3backend-draw.dtx +++ b/macros/latex/contrib/l3backend/l3backend-draw.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3backend/l3backend-graphics.dtx b/macros/latex/contrib/l3backend/l3backend-graphics.dtx index 4a4b5136ad..53e9c767ff 100644 --- a/macros/latex/contrib/l3backend/l3backend-graphics.dtx +++ b/macros/latex/contrib/l3backend/l3backend-graphics.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3backend/l3backend-header.dtx b/macros/latex/contrib/l3backend/l3backend-header.dtx index f4caf7a7e5..aab4a1228c 100644 --- a/macros/latex/contrib/l3backend/l3backend-header.dtx +++ b/macros/latex/contrib/l3backend/l3backend-header.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3backend/l3backend-opacity.dtx b/macros/latex/contrib/l3backend/l3backend-opacity.dtx index a1decb1c38..e47475eece 100644 --- a/macros/latex/contrib/l3backend/l3backend-opacity.dtx +++ b/macros/latex/contrib/l3backend/l3backend-opacity.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3backend/l3backend-pdf.dtx b/macros/latex/contrib/l3backend/l3backend-pdf.dtx index d93ddc4e33..b31805b0fd 100644 --- a/macros/latex/contrib/l3backend/l3backend-pdf.dtx +++ b/macros/latex/contrib/l3backend/l3backend-pdf.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % @@ -105,33 +105,34 @@ % % \subsubsection{Objects} % -% \begin{variable}{\g_@@_backend_object_int, \g_@@_backend_object_prop} -% For tracking objects to allow finalisation. +% \begin{variable}{\g_@@_backend_object_int} +% For tracking objects. % \begin{macrocode} \int_new:N \g_@@_backend_object_int -\prop_new:N \g_@@_backend_object_prop % \end{macrocode} % \end{variable} % -% \begin{macro}{\@@_backend_object_new:nn} +% \begin{macro}{\@@_backend_object_new:n} % \begin{macro}[EXP]{\@@_backend_object_ref:n} -% Tracking objects is similar to \texttt{dvipdfmx}. % \begin{macrocode} -\cs_new_protected:Npn \@@_backend_object_new:nn #1#2 +\cs_new_protected:Npn \@@_backend_object_new:n #1 { \int_gincr:N \g_@@_backend_object_int \int_const:cn - { c_@@_backend_object_ \tl_to_str:n {#1} _int } + { c_@@_object_ \tl_to_str:n {#1} _int } { \g_@@_backend_object_int } - \prop_gput:Nnn \g_@@_backend_object_prop {#1} {#2} } \cs_new:Npn \@@_backend_object_ref:n #1 - { { pdf.obj \int_use:c { c_@@_backend_object_ \tl_to_str:n {#1} _int } } } + { { pdf.obj \int_use:c { c_@@_object_ \tl_to_str:n {#1} _int } } } % \end{macrocode} % \end{macro} % \end{macro} % -% \begin{macro}{\@@_backend_object_write:nn, \@@_backend_object_write:nx} +% \begin{macro} +% { +% \@@_backend_object_write:nnn, \@@_backend_object_write:nnx, +% \@@_backend_object_write_aux:nnn +% } % \begin{macro} % { % \@@_backend_object_write_array:nn , @@ -141,16 +142,23 @@ % } % \begin{macro}{\@@_backend_object_write_stream:nnn} % This is where we choose the actual type: some work to get things -% right. +% right. To allow code sharing with the anonymous version, we use an +% auxiliary. % \begin{macrocode} -\cs_new_protected:Npn \@@_backend_object_write:nn #1#2 +\cs_new_protected:Npn \@@_backend_object_write:nnn #1#2#3 + { + \@@_backend_object_write_aux:nnn + { \@@_backend_object_ref:n {#1} } + {#2} {#3} + } +\cs_generate_variant:Nn \@@_backend_object_write:nnn { nnx } +\cs_new_protected:Npn \@@_backend_object_write_aux:nnn #1#2#3 { \@@_backend_pdfmark:x { - /_objdef ~ \@@_backend_object_ref:n {#1} + /_objdef ~ #1 /type - \str_case_e:nn - { \prop_item:Nn \g_@@_backend_object_prop {#1} } + \str_case:nn {#2} { { array } { /array } { dict } { /dict } @@ -159,11 +167,8 @@ } /OBJ } - \use:c - { @@_backend_object_write_ \prop_item:Nn \g_@@_backend_object_prop {#1} :nn } - { \@@_backend_object_ref:n {#1} } {#2} + \use:c { @@_backend_object_write_ #2 :nn } {#1} {#3} } -\cs_generate_variant:Nn \@@_backend_object_write:nn { nx } \cs_new_protected:Npn \@@_backend_object_write_array:nn #1#2 { \@@_backend_pdfmark:x @@ -213,22 +218,9 @@ \cs_new_protected:Npn \@@_backend_object_now:nn #1#2 { \int_gincr:N \g_@@_backend_object_int - \@@_backend_pdfmark:x - { - /_objdef ~ { pdf.obj \int_use:N \g_@@_backend_object_int } - /type - \str_case:nn - {#1} - { - { array } { /array } - { dict } { /dict } - { fstream } { /stream } - { stream } { /stream } - } - /OBJ - } - \exp_args:Nnx \use:c { @@_backend_object_write_ #1 :nn } - { { pdf.obj \int_use:N \g_@@_backend_object_int } } {#2} + \@@_backend_object_write_aux:nnn + { { pdf.obj \int_use:N \g_@@_backend_object_int } } + {#1} {#2} } \cs_generate_variant:Nn \@@_backend_object_now:nn { nx } % \end{macrocode} @@ -971,12 +963,12 @@ % \end{macrocode} % \end{variable} % -% \begin{macro}{\@@_backend_object_new:nn} +% \begin{macro}{\@@_backend_object_new:n} % \begin{macro}[EXP]{\@@_backend_object_ref:n} % Declaring objects means reserving at the PDF level plus starting % tracking. % \begin{macrocode} -\cs_new_protected:Npn \@@_backend_object_new:nn #1#2 +\cs_new_protected:Npn \@@_backend_object_new:n #1 { %<*luatex> \tex_pdfextension:D obj ~ @@ -986,27 +978,27 @@ %</pdftex> reserveobjnum ~ \int_const:cn - { c_@@_backend_object_ \tl_to_str:n {#1} _int } + { c_@@_object_ \tl_to_str:n {#1} _int } %<*luatex> { \tex_pdffeedback:D lastobj } %</luatex> %<*pdftex> { \tex_pdflastobj:D } %</pdftex> - \prop_gput:Nnn \g_@@_backend_object_prop {#1} {#2} } \cs_new:Npn \@@_backend_object_ref:n #1 - { \int_use:c { c_@@_backend_object_ \tl_to_str:n {#1} _int } ~ 0 ~ R } + { \int_use:c { c_@@_object_ \tl_to_str:n {#1} _int } ~ 0 ~ R } % \end{macrocode} % \end{macro} % \end{macro} % -% \begin{macro}{\@@_backend_object_write:nn,\@@_backend_object_write:nx} +% \begin{macro}{\@@_backend_object_write:nnn, \@@_backend_object_write:nnx} +% \begin{macro}[EXP]{\@@_backend_object_write:nn} % \begin{macro}[EXP]{\@@_exp_not_i:nn, \@@_exp_not_ii:nn} % Writing the data needs a little information about the structure of the % object. % \begin{macrocode} -\cs_new_protected:Npn \@@_backend_object_write:nn #1#2 +\cs_new_protected:Npn \@@_backend_object_write:nnn #1#2#3 { %<*luatex> \tex_immediate:D \tex_pdfextension:D obj ~ @@ -1016,9 +1008,12 @@ %</pdftex> useobjnum ~ \int_use:c - { c_@@_backend_object_ \tl_to_str:n {#1} _int } - \str_case_e:nn - { \prop_item:Nn \g_@@_backend_object_prop {#1} } + { c_@@_object_ \tl_to_str:n {#1} _int } + \@@_backend_object_write:nn {#2} {#3} + } +\cs_new:Npn \@@_backend_object_write:nn #1#2 + { + \str_case:nn {#1} { { array } { { [ ~ \exp_not:n {#2} ~ ] } } { dict } { { << ~ \exp_not:n {#2} ~ >> } } @@ -1034,12 +1029,13 @@ } } } -\cs_generate_variant:Nn \@@_backend_object_write:nn { nx } +\cs_generate_variant:Nn \@@_backend_object_write:nnn { nnx } \cs_new:Npn \@@_exp_not_i:nn #1#2 { \exp_not:n {#1} } \cs_new:Npn \@@_exp_not_ii:nn #1#2 { \exp_not:n {#2} } % \end{macrocode} % \end{macro} % \end{macro} +% \end{macro} % % \begin{macro}{\@@_backend_object_now:nn, \@@_backend_object_now:nx} % Much like writing, but direct creation. @@ -1052,22 +1048,7 @@ %<*pdftex> \tex_immediate:D \tex_pdfobj:D %</pdftex> - \str_case:nn - {#1} - { - { array } { { [ ~ \exp_not:n {#2} ~ ] } } - { dict } { { << ~ \exp_not:n {#2} ~ >> } } - { fstream } - { - stream ~ attr ~ { \@@_exp_not_i:nn #2 } ~ - file ~ { \@@_exp_not_ii:nn #2 } - } - { stream } - { - stream ~ attr ~ { \@@_exp_not_i:nn #2 } ~ - { \@@_exp_not_ii:nn #2 } - } - } + \@@_backend_object_write:nn {#1} {#2} } \cs_generate_variant:Nn \@@_backend_object_now:nn { nx } % \end{macrocode} @@ -1267,27 +1248,25 @@ % \end{macrocode} % \end{variable} % -% \begin{macro}{\@@_backend_object_new:nn} +% \begin{macro}{\@@_backend_object_new:n} % \begin{macro}[EXP]{\@@_backend_object_ref:n} % Objects are tracked at the macro level, but we don't have to do anything % at this stage. % \begin{macrocode} -\cs_new_protected:Npn \@@_backend_object_new:nn #1#2 +\cs_new_protected:Npn \@@_backend_object_new:n #1 { \int_gincr:N \g_@@_backend_object_int \int_const:cn - { c_@@_backend_object_ \tl_to_str:n {#1} _int } + { c_@@_object_ \tl_to_str:n {#1} _int } { \g_@@_backend_object_int } - \prop_gput:Nnn \g_@@_backend_object_prop {#1} {#2} } \cs_new:Npn \@@_backend_object_ref:n #1 - { @pdf.obj \int_use:c { c_@@_backend_object_ \tl_to_str:n {#1} _int } } + { @pdf.obj \int_use:c { c_@@_object_ \tl_to_str:n {#1} _int } } % \end{macrocode} % \end{macro} % \end{macro} % -% \begin{macro}{\@@_backend_object_write:nn, \@@_backend_object_write:nx} -% \begin{macro}{\@@_backend_object_write:nnn} +% \begin{macro}{\@@_backend_object_write:nnn, \@@_backend_object_write:nnx} % \begin{macro} % { % \@@_backend_object_write_array:nn , @@ -1298,17 +1277,12 @@ % \begin{macro}{\@@_backend_object_write_stream:nnnn} % This is where we choose the actual type. % \begin{macrocode} -\cs_new_protected:Npn \@@_backend_object_write:nn #1#2 - { - \exp_args:Nx \@@_backend_object_write:nnn - { \prop_item:Nn \g_@@_backend_object_prop {#1} } {#1} {#2} - } -\cs_generate_variant:Nn \@@_backend_object_write:nn { nx } \cs_new_protected:Npn \@@_backend_object_write:nnn #1#2#3 { - \use:c { @@_backend_object_write_ #1 :nn } - { \@@_backend_object_ref:n {#2} } {#3} + \use:c { @@_backend_object_write_ #2 :nn } + { \@@_backend_object_ref:n {#1} } {#3} } +\cs_generate_variant:Nn \@@_backend_object_write:nnn { nnx } \cs_new_protected:Npn \@@_backend_object_write_array:nn #1#2 { \@@_backend:x @@ -1335,7 +1309,6 @@ % \end{macro} % \end{macro} % \end{macro} -% \end{macro} % % \begin{macro}{\@@_backend_object_now:nn, \@@_backend_object_now:nx} % No anonymous objects with \texttt{dvipdfmx} so we have to give an @@ -1659,18 +1632,18 @@ % % \subsubsection{Objects} % -% \begin{macro}{\@@_backend_object_new:nn} +% \begin{macro}{\@@_backend_object_new:n} % \begin{macro}[EXP]{\@@_backend_object_ref:n} -% \begin{macro}{\@@_backend_object_write:nn, , \@@_backend_object_write:nx} +% \begin{macro}{\@@_backend_object_write:nnn, \@@_backend_object_write:nx} % \begin{macro}{\@@_backend_object_now:nn, , \@@_backend_object_now:nx} % \begin{macro}{\@@_backend_object_last:} % \begin{macro}[EXP]{\@@_backend_pageobject_ref:n} % All no-ops here. % \begin{macrocode} -\cs_new_protected:Npn \@@_backend_object_new:nn #1#2 { } +\cs_new_protected:Npn \@@_backend_object_new:nn #1 { } \cs_new:Npn \@@_backend_object_ref:n #1 { } -\cs_new_protected:Npn \@@_backend_object_write:nn #1#2 { } -\cs_new_protected:Npn \@@_backend_object_write:nx #1#2 { } +\cs_new_protected:Npn \@@_backend_object_write:nnn #1#2#3 { } +\cs_new_protected:Npn \@@_backend_object_write:nnx #1#2#3 { } \cs_new_protected:Npn \@@_backend_object_now:nn #1#2 { } \cs_new_protected:Npn \@@_backend_object_now:nx #1#2 { } \cs_new:Npn \@@_backend_object_last: { } diff --git a/macros/latex/contrib/l3kernel/CHANGELOG.md b/macros/latex/contrib/l3kernel/CHANGELOG.md index d747679ef0..90ed2a8771 100644 --- a/macros/latex/contrib/l3kernel/CHANGELOG.md +++ b/macros/latex/contrib/l3kernel/CHANGELOG.md @@ -7,6 +7,17 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2022-08-30] + +### Added +- `\pdf_object_new:n` and `\pdf_object_write:nnn` - support assignment of object + type at point-of-writing (issue + [\#1123](https://github.com/latex3/latex3/issues/1123)) +- `\text_map_function:nN` and `\text_map_inline:nn` for mapping to + graphemes in textual input +- Support for medevial Latin case changing +- `\char_to_nfd:n` to extend NFD support to 8-bit engines + ## [2022-08-23] ### Added @@ -1188,7 +1199,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/2022-08-23...HEAD +[Unreleased]: https://github.com/latex3/latex3/compare/2022-08-30...HEAD +[2022-08-30]: https://github.com/latex3/latex3/compare/2022-08-23...2022-08-30 [2022-08-23]: https://github.com/latex3/latex3/compare/2022-08-05...2022-08-23 [2022-08-05]: https://github.com/latex3/latex3/compare/2022-07-15...2022-08-05 [2022-07-15]: https://github.com/latex3/latex3/compare/2022-07-14...2022-07-15 diff --git a/macros/latex/contrib/l3kernel/README.md b/macros/latex/contrib/l3kernel/README.md index f25e9207e6..b6538e1855 100644 --- a/macros/latex/contrib/l3kernel/README.md +++ b/macros/latex/contrib/l3kernel/README.md @@ -1,7 +1,7 @@ LaTeX3 Programming Conventions ============================== -Release 2022-08-23 +Release 2022-08-30 Overview -------- diff --git a/macros/latex/contrib/l3kernel/expl3.dtx b/macros/latex/contrib/l3kernel/expl3.dtx index 63f4301438..ebf703b25f 100644 --- a/macros/latex/contrib/l3kernel/expl3.dtx +++ b/macros/latex/contrib/l3kernel/expl3.dtx @@ -24,7 +24,7 @@ % %<*driver|generic|package|2ekernel> %</driver|generic|package|2ekernel> -\def\ExplFileDate{2022-08-23}% +\def\ExplFileDate{2022-08-30}% %<*driver> \documentclass[full]{l3doc} \usepackage{graphicx} @@ -51,7 +51,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/expl3.pdf b/macros/latex/contrib/l3kernel/expl3.pdf Binary files differindex c86280538e..5726610041 100644 --- a/macros/latex/contrib/l3kernel/expl3.pdf +++ b/macros/latex/contrib/l3kernel/expl3.pdf diff --git a/macros/latex/contrib/l3kernel/interface3.pdf b/macros/latex/contrib/l3kernel/interface3.pdf Binary files differindex c16be2ce98..99e424d0c3 100644 --- a/macros/latex/contrib/l3kernel/interface3.pdf +++ b/macros/latex/contrib/l3kernel/interface3.pdf diff --git a/macros/latex/contrib/l3kernel/interface3.tex b/macros/latex/contrib/l3kernel/interface3.tex index 528adb8e9d..64d4cff561 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 2022-08-23} +\date{Released 2022-08-30} \pagenumbering{roman} \maketitle diff --git a/macros/latex/contrib/l3kernel/l3.ins b/macros/latex/contrib/l3kernel/l3.ins index fbcc815d9f..08949c097e 100644 --- a/macros/latex/contrib/l3kernel/l3.ins +++ b/macros/latex/contrib/l3kernel/l3.ins @@ -106,6 +106,7 @@ and all files in that bundle must be distributed together. \from{l3unicode.dtx} {package} \from{l3text.dtx} {package} \from{l3text-case.dtx} {package} + \from{l3text-map.dtx} {package} \from{l3text-purify.dtx}{package} \from{l3candidates.dtx} {package} \from{l3legacy.dtx} {package} diff --git a/macros/latex/contrib/l3kernel/l3basics.dtx b/macros/latex/contrib/l3kernel/l3basics.dtx index 69a59f065b..b881dbcf1d 100644 --- a/macros/latex/contrib/l3kernel/l3basics.dtx +++ b/macros/latex/contrib/l3kernel/l3basics.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3bootstrap.dtx b/macros/latex/contrib/l3kernel/l3bootstrap.dtx index 43a666d3ce..963aae5ddb 100644 --- a/macros/latex/contrib/l3kernel/l3bootstrap.dtx +++ b/macros/latex/contrib/l3kernel/l3bootstrap.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3box.dtx b/macros/latex/contrib/l3kernel/l3box.dtx index 67767992ee..bc0fbb7eb5 100644 --- a/macros/latex/contrib/l3kernel/l3box.dtx +++ b/macros/latex/contrib/l3kernel/l3box.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3candidates.dtx b/macros/latex/contrib/l3kernel/l3candidates.dtx index 155d51bc0e..3279dda762 100644 --- a/macros/latex/contrib/l3kernel/l3candidates.dtx +++ b/macros/latex/contrib/l3kernel/l3candidates.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % @@ -643,9 +643,21 @@ % \cs{char_to_nfd:N} \meta{char} % \end{syntax} % Converts the \meta{char} to the Unicode Normalization Form Canonical -% Decomposition. The category code of the generated character is the -% same as the \meta{char}. With $8$-bit engines, no change is made to the -% character. +% Decomposition. The category code of the \emph{first} generated character is +% the same as the \meta{char}; second and subsequent chars will have the +% current category code, as they would if typed in directly. For $8$-bit +% engines, no change will take place. +% \end{function} +% +% \begin{function}[added = 2022-08-29, rEXP]{\char_to_nfd:n} +% \begin{syntax} +% \cs{char_to_nfd:n} \Arg{codepoint} +% \end{syntax} +% Converts the (Unicode) \meta{codepoint} to the Unicode Normalization +% Form Canonical Decomposition. The generated character(s) will have +% the current category code as they would if typed in directly. In contrast +% to \cs{char_to_nfd:N}, this function \emph{does} decompose codepoints +% with $8$-bit engines. % \end{function} % % \begin{function}[added = 2018-09-23] diff --git a/macros/latex/contrib/l3kernel/l3cctab.dtx b/macros/latex/contrib/l3kernel/l3cctab.dtx index fac045495c..6bc41991e5 100644 --- a/macros/latex/contrib/l3kernel/l3cctab.dtx +++ b/macros/latex/contrib/l3kernel/l3cctab.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3clist.dtx b/macros/latex/contrib/l3kernel/l3clist.dtx index 34e78c62a3..4814d90427 100644 --- a/macros/latex/contrib/l3kernel/l3clist.dtx +++ b/macros/latex/contrib/l3kernel/l3clist.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3coffins.dtx b/macros/latex/contrib/l3kernel/l3coffins.dtx index 7d822312eb..ded70d1248 100644 --- a/macros/latex/contrib/l3kernel/l3coffins.dtx +++ b/macros/latex/contrib/l3kernel/l3coffins.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3color.dtx b/macros/latex/contrib/l3kernel/l3color.dtx index 33b28721ed..08b4f523e0 100644 --- a/macros/latex/contrib/l3kernel/l3color.dtx +++ b/macros/latex/contrib/l3kernel/l3color.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3debug.dtx b/macros/latex/contrib/l3kernel/l3debug.dtx index 9fe0518b1f..4867d5f563 100644 --- a/macros/latex/contrib/l3kernel/l3debug.dtx +++ b/macros/latex/contrib/l3kernel/l3debug.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3deprecation.dtx b/macros/latex/contrib/l3kernel/l3deprecation.dtx index 4153116c3a..ef7d77d064 100644 --- a/macros/latex/contrib/l3kernel/l3deprecation.dtx +++ b/macros/latex/contrib/l3kernel/l3deprecation.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3doc.dtx b/macros/latex/contrib/l3kernel/l3doc.dtx index d8b2dc9254..6fdf2e694f 100644 --- a/macros/latex/contrib/l3kernel/l3doc.dtx +++ b/macros/latex/contrib/l3kernel/l3doc.dtx @@ -85,7 +85,7 @@ and all files in that bundle must be distributed together. % require you to do updates, if the class changes.}} % % \author{\Team} -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % \maketitle % \tableofcontents % diff --git a/macros/latex/contrib/l3kernel/l3doc.pdf b/macros/latex/contrib/l3kernel/l3doc.pdf Binary files differindex ed15603bb8..115b0155b9 100644 --- a/macros/latex/contrib/l3kernel/l3doc.pdf +++ b/macros/latex/contrib/l3kernel/l3doc.pdf diff --git a/macros/latex/contrib/l3kernel/l3docstrip.dtx b/macros/latex/contrib/l3kernel/l3docstrip.dtx index bbf456084c..b7dc2c2257 100644 --- a/macros/latex/contrib/l3kernel/l3docstrip.dtx +++ b/macros/latex/contrib/l3kernel/l3docstrip.dtx @@ -63,7 +63,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3docstrip.pdf b/macros/latex/contrib/l3kernel/l3docstrip.pdf Binary files differindex e95341e2c8..492c003636 100644 --- a/macros/latex/contrib/l3kernel/l3docstrip.pdf +++ b/macros/latex/contrib/l3kernel/l3docstrip.pdf diff --git a/macros/latex/contrib/l3kernel/l3expan.dtx b/macros/latex/contrib/l3kernel/l3expan.dtx index 71b45cc3ca..e975071462 100644 --- a/macros/latex/contrib/l3kernel/l3expan.dtx +++ b/macros/latex/contrib/l3kernel/l3expan.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3file.dtx b/macros/latex/contrib/l3kernel/l3file.dtx index 642f77afde..7aaf7085de 100644 --- a/macros/latex/contrib/l3kernel/l3file.dtx +++ b/macros/latex/contrib/l3kernel/l3file.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3flag.dtx b/macros/latex/contrib/l3kernel/l3flag.dtx index af66b61964..cbe5351708 100644 --- a/macros/latex/contrib/l3kernel/l3flag.dtx +++ b/macros/latex/contrib/l3kernel/l3flag.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-assign.dtx b/macros/latex/contrib/l3kernel/l3fp-assign.dtx index 66e5be677d..8fa46b49dd 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 2022-08-23} +% \date{Released 2022-08-30} % \maketitle % % \begin{documentation} diff --git a/macros/latex/contrib/l3kernel/l3fp-aux.dtx b/macros/latex/contrib/l3kernel/l3fp-aux.dtx index 4b16b7c6fc..63c97ba5c1 100644 --- a/macros/latex/contrib/l3kernel/l3fp-aux.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-aux.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-basics.dtx b/macros/latex/contrib/l3kernel/l3fp-basics.dtx index 9afe96a069..74bd289d7a 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 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-convert.dtx b/macros/latex/contrib/l3kernel/l3fp-convert.dtx index daa67ea0a1..f39b77b9ee 100644 --- a/macros/latex/contrib/l3kernel/l3fp-convert.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-convert.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-expo.dtx b/macros/latex/contrib/l3kernel/l3fp-expo.dtx index ed26025368..ca6d5091c7 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 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-extended.dtx b/macros/latex/contrib/l3kernel/l3fp-extended.dtx index bc7e177093..b24112a5a0 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 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-logic.dtx b/macros/latex/contrib/l3kernel/l3fp-logic.dtx index dbade2f590..6fb84bfb97 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 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-parse.dtx b/macros/latex/contrib/l3kernel/l3fp-parse.dtx index efe9a6dfe9..facb50f0ea 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 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-random.dtx b/macros/latex/contrib/l3kernel/l3fp-random.dtx index 4cd51f0f89..ae5b968eca 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 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-round.dtx b/macros/latex/contrib/l3kernel/l3fp-round.dtx index 1a56d98509..f6122647e9 100644 --- a/macros/latex/contrib/l3kernel/l3fp-round.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-round.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-traps.dtx b/macros/latex/contrib/l3kernel/l3fp-traps.dtx index b566e3d1bb..1f0fbfa6a8 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 2022-08-23} +% \date{Released 2022-08-30} % \maketitle % % \begin{documentation} diff --git a/macros/latex/contrib/l3kernel/l3fp-trig.dtx b/macros/latex/contrib/l3kernel/l3fp-trig.dtx index a45b7856ff..f19a864aab 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 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp.dtx b/macros/latex/contrib/l3kernel/l3fp.dtx index 8d7c44dd35..da64860f8c 100644 --- a/macros/latex/contrib/l3kernel/l3fp.dtx +++ b/macros/latex/contrib/l3kernel/l3fp.dtx @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fparray.dtx b/macros/latex/contrib/l3kernel/l3fparray.dtx index c41a991af5..293154cad0 100644 --- a/macros/latex/contrib/l3kernel/l3fparray.dtx +++ b/macros/latex/contrib/l3kernel/l3fparray.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3int.dtx b/macros/latex/contrib/l3kernel/l3int.dtx index 1a6cb9ba77..7fce0b7a2d 100644 --- a/macros/latex/contrib/l3kernel/l3int.dtx +++ b/macros/latex/contrib/l3kernel/l3int.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3intarray.dtx b/macros/latex/contrib/l3kernel/l3intarray.dtx index 5e49b94d4e..be1fe6f7e3 100644 --- a/macros/latex/contrib/l3kernel/l3intarray.dtx +++ b/macros/latex/contrib/l3kernel/l3intarray.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3kernel-functions.dtx b/macros/latex/contrib/l3kernel/l3kernel-functions.dtx index c26a6f0ccf..d122477aeb 100644 --- a/macros/latex/contrib/l3kernel/l3kernel-functions.dtx +++ b/macros/latex/contrib/l3kernel/l3kernel-functions.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3keys.dtx b/macros/latex/contrib/l3kernel/l3keys.dtx index d8313614d1..f626c9bdb2 100644 --- a/macros/latex/contrib/l3kernel/l3keys.dtx +++ b/macros/latex/contrib/l3kernel/l3keys.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3legacy.dtx b/macros/latex/contrib/l3kernel/l3legacy.dtx index dc92bba1b5..3d37094612 100644 --- a/macros/latex/contrib/l3kernel/l3legacy.dtx +++ b/macros/latex/contrib/l3kernel/l3legacy.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3luatex.dtx b/macros/latex/contrib/l3kernel/l3luatex.dtx index de35da4d94..bb5779f09e 100644 --- a/macros/latex/contrib/l3kernel/l3luatex.dtx +++ b/macros/latex/contrib/l3kernel/l3luatex.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3msg.dtx b/macros/latex/contrib/l3kernel/l3msg.dtx index 8c9ac087e8..32f66edd92 100644 --- a/macros/latex/contrib/l3kernel/l3msg.dtx +++ b/macros/latex/contrib/l3kernel/l3msg.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3names.dtx b/macros/latex/contrib/l3kernel/l3names.dtx index ce1ec1a49d..5566ead50c 100644 --- a/macros/latex/contrib/l3kernel/l3names.dtx +++ b/macros/latex/contrib/l3kernel/l3names.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3news.pdf b/macros/latex/contrib/l3kernel/l3news.pdf Binary files differindex ff974735f1..11ac8695c2 100644 --- a/macros/latex/contrib/l3kernel/l3news.pdf +++ b/macros/latex/contrib/l3kernel/l3news.pdf diff --git a/macros/latex/contrib/l3kernel/l3news01.pdf b/macros/latex/contrib/l3kernel/l3news01.pdf Binary files differindex d6af6a94e5..23221ecb1f 100644 --- a/macros/latex/contrib/l3kernel/l3news01.pdf +++ b/macros/latex/contrib/l3kernel/l3news01.pdf diff --git a/macros/latex/contrib/l3kernel/l3news02.pdf b/macros/latex/contrib/l3kernel/l3news02.pdf Binary files differindex 3b9fb3e233..8443ef5802 100644 --- a/macros/latex/contrib/l3kernel/l3news02.pdf +++ b/macros/latex/contrib/l3kernel/l3news02.pdf diff --git a/macros/latex/contrib/l3kernel/l3news03.pdf b/macros/latex/contrib/l3kernel/l3news03.pdf Binary files differindex 1ed36a2586..b085e34232 100644 --- a/macros/latex/contrib/l3kernel/l3news03.pdf +++ b/macros/latex/contrib/l3kernel/l3news03.pdf diff --git a/macros/latex/contrib/l3kernel/l3news04.pdf b/macros/latex/contrib/l3kernel/l3news04.pdf Binary files differindex 3f38bc64e1..223cf69281 100644 --- a/macros/latex/contrib/l3kernel/l3news04.pdf +++ b/macros/latex/contrib/l3kernel/l3news04.pdf diff --git a/macros/latex/contrib/l3kernel/l3news05.pdf b/macros/latex/contrib/l3kernel/l3news05.pdf Binary files differindex 27f25062b4..17dac20b2c 100644 --- a/macros/latex/contrib/l3kernel/l3news05.pdf +++ b/macros/latex/contrib/l3kernel/l3news05.pdf diff --git a/macros/latex/contrib/l3kernel/l3news06.pdf b/macros/latex/contrib/l3kernel/l3news06.pdf Binary files differindex 1522296e77..b8514e2cc3 100644 --- a/macros/latex/contrib/l3kernel/l3news06.pdf +++ b/macros/latex/contrib/l3kernel/l3news06.pdf diff --git a/macros/latex/contrib/l3kernel/l3news07.pdf b/macros/latex/contrib/l3kernel/l3news07.pdf Binary files differindex 1d7e8d46db..753717acd7 100644 --- a/macros/latex/contrib/l3kernel/l3news07.pdf +++ b/macros/latex/contrib/l3kernel/l3news07.pdf diff --git a/macros/latex/contrib/l3kernel/l3news08.pdf b/macros/latex/contrib/l3kernel/l3news08.pdf Binary files differindex 9817c2739e..136b9e6c8a 100644 --- a/macros/latex/contrib/l3kernel/l3news08.pdf +++ b/macros/latex/contrib/l3kernel/l3news08.pdf diff --git a/macros/latex/contrib/l3kernel/l3news09.pdf b/macros/latex/contrib/l3kernel/l3news09.pdf Binary files differindex 728d25b06b..83f867b7f0 100644 --- a/macros/latex/contrib/l3kernel/l3news09.pdf +++ b/macros/latex/contrib/l3kernel/l3news09.pdf diff --git a/macros/latex/contrib/l3kernel/l3news10.pdf b/macros/latex/contrib/l3kernel/l3news10.pdf Binary files differindex 07e6da0ac5..99341027da 100644 --- a/macros/latex/contrib/l3kernel/l3news10.pdf +++ b/macros/latex/contrib/l3kernel/l3news10.pdf diff --git a/macros/latex/contrib/l3kernel/l3news11.pdf b/macros/latex/contrib/l3kernel/l3news11.pdf Binary files differindex 241f98de94..dc636b1ddb 100644 --- a/macros/latex/contrib/l3kernel/l3news11.pdf +++ b/macros/latex/contrib/l3kernel/l3news11.pdf diff --git a/macros/latex/contrib/l3kernel/l3news12.pdf b/macros/latex/contrib/l3kernel/l3news12.pdf Binary files differindex 8b8859834a..07aeb8ed1f 100644 --- a/macros/latex/contrib/l3kernel/l3news12.pdf +++ b/macros/latex/contrib/l3kernel/l3news12.pdf diff --git a/macros/latex/contrib/l3kernel/l3pdf.dtx b/macros/latex/contrib/l3kernel/l3pdf.dtx index 5a28010dde..f02362df38 100644 --- a/macros/latex/contrib/l3kernel/l3pdf.dtx +++ b/macros/latex/contrib/l3kernel/l3pdf.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % @@ -51,32 +51,18 @@ % % \section{Objects} % -% \begin{function}[added = 2021-02-10]{\pdf_object_new:nn} -% \begin{syntax} -% \cs{pdf_object_new:nn} \Arg{object} \Arg{type} -% \end{syntax} -% Declares \meta{object} as a PDF object of \meta{type}, which should be -% one of -% \begin{itemize} -% \item \texttt{array} -% \item \texttt{dict} -% \item \texttt{fstream} -% \item \texttt{stream} -% \end{itemize} -% The object may be referenced from this point on, and written later -% using \cs{pdf_object_write:nn}. -% \end{function} -% \begin{function}[EXP, pTF, added=2020-05-15]{\pdf_object_if_exist:n} +% \begin{function}[added = 2022-08-23]{\pdf_object_new:n} % \begin{syntax} -% \cs{pdf_object_if_exist_p:n} \Arg{object} -% \cs{pdf_object_if_exist:nTF} \Arg{object} +% \cs{pdf_object_new:n} \Arg{object} % \end{syntax} -% Tests whether an object with name \Arg{object} has been defined. +% Declares \meta{object} as a PDF object. The object may be referenced +% from this point on, and written later using \cs{pdf_object_write:nnn}. % \end{function} -% \begin{function}[added = 2021-02-10] -% {\pdf_object_write:nn, \pdf_object_write:nx} +% +% \begin{function}[added = 2022-08-23] +% {\pdf_object_write:nnn, \pdf_object_write:nnx} % \begin{syntax} -% \cs{pdf_object_write:nn} \Arg{object} \Arg{content} +% \cs{pdf_object_write:nn} \Arg{object} \Arg{type} \Arg{content} % \end{syntax} % Writes the \meta{content} as content of the \meta{object}. Depending on the % \meta{type} declared for the object, the format required for the @@ -133,6 +119,14 @@ % Inserts the appropriate information to reference the \meta{pageobject}. % \end{function} % +% \begin{function}[EXP, pTF, added = 2020-05-15]{\pdf_object_if_exist:n} +% \begin{syntax} +% \cs{pdf_object_if_exist_p:n} \Arg{object} +% \cs{pdf_object_if_exist:nTF} \Arg{object} +% \end{syntax} +% Tests whether an object with name \Arg{object} has been defined. +% \end{function} +% % \section{Version} % % \begin{function}[pTF, EXP, added = 2021-02-10]{\pdf_version_compare:Nn} @@ -250,6 +244,46 @@ % \end{function} % \end{documentation} % +% \section{Deprecated functions} +% +% \begin{function}[added = 2021-02-10]{\pdf_object_new:nn} +% \begin{syntax} +% \cs{pdf_object_new:nn} \Arg{object} \Arg{type} +% \end{syntax} +% Declares \meta{object} as a PDF object of \meta{type}, which should be +% one of +% \begin{itemize} +% \item \texttt{array} +% \item \texttt{dict} +% \item \texttt{fstream} +% \item \texttt{stream} +% \end{itemize} +% The object may be referenced from this point on, and written later +% using \cs{pdf_object_write:nn}. +% +% Deprecated in favor of \cs{pdf_object_new:n}. +% \end{function} +% +% \begin{function}[added = 2021-02-10]{\pdf_object_write:nn, \pdf_object_write:nx} +% \begin{syntax} +% \cs{pdf_object_write:nn} \Arg{object} \Arg{content} +% \end{syntax} +% Writes the \meta{content} as content of the \meta{object}. Depending on the +% \meta{type} declared for the object, the format required for the +% \meta{data} will vary +% \begin{itemize} +% \item[\texttt{array}] A space-separated list of values +% \item[\texttt{dict}] Key--value pairs in the form +% \texttt{/\meta{key} \meta{value}} +% \item[\texttt{fstream}] Two brace groups: \meta{file name} and +% \meta{file content} +% \item[\texttt{stream}] Two brace groups: \meta{attributes (dictionary)} +% and \meta{stream contents} +% \end{itemize} +% +% Deprecated in favor of \cs{pdf_object_write:nnn}. +% \end{function} +% % \begin{implementation} % % \section{\pkg{l3pdf} implementation} @@ -306,27 +340,28 @@ % % \subsection{Objects} % -% \begin{macro}{\pdf_object_new:nn, \pdf_object_write:nn, \pdf_object_write:nx} -% \begin{macro}[pTF]{\pdf_object_if_exist:n} +% \begin{macro}{\pdf_object_new:n} +% \begin{macro}{\pdf_object_write:nnn, \pdf_object_write:nnx} % \begin{macro}{\pdf_object_ref:n} % \begin{macro}{\pdf_object_unnamed_write:nn, \pdf_object_unnamed_write:nx} % \begin{macro}{\pdf_object_ref_last:} -% Simple to do. +% \begin{macro}[pTF]{\pdf_object_if_exist:n} +% Simple to do: all objects create a constant |int| so it is not a +% backend-specific name. % \begin{macrocode} -\cs_new_protected:Npn \pdf_object_new:nn #1#2 - { \@@_backend_object_new:nn {#1} {#2} } -\prg_new_conditional:Npnn \pdf_object_if_exist:n #1 { p , T , F , TF } +\cs_new_protected:Npn \pdf_object_new:n #1 { - \int_if_exist:cTF { c_@@_backend_object_ \tl_to_str:n {#1} _int } - { \prg_return_true: } - { \prg_return_false:} + \@@_backend_object_new:n {#1} + \cs_new_eq:cc + { c_@@_backend_object_ \tl_to_str:n {#1} _int } + { c_@@_object_ \tl_to_str:n {#1} _int } } -\cs_new_protected:Npn \pdf_object_write:nn #1#2 +\cs_new_protected:Npn \pdf_object_write:nnn #1#2#3 { - \@@_backend_object_write:nn {#1} {#2} + \@@_backend_object_write:nnn {#1} {#2} {#3} \bool_gset_true:N \g_@@_init_bool } -\cs_generate_variant:Nn \pdf_object_write:nn { nx } +\cs_generate_variant:Nn \pdf_object_write:nnn { nnx } \cs_new:Npn \pdf_object_ref:n #1 { \@@_backend_object_ref:n {#1} } \cs_new_protected:Npn \pdf_object_unnamed_write:nn #1#2 { @@ -335,12 +370,19 @@ } \cs_generate_variant:Nn \pdf_object_unnamed_write:nn { nx } \cs_new:Npn \pdf_object_ref_last: { \@@_backend_object_last: } +\prg_new_conditional:Npnn \pdf_object_if_exist:n #1 { p , T , F , TF } + { + \int_if_exist:cTF { c_@@_object_ \tl_to_str:n {#1} _int } + \prg_return_true: + \prg_return_false: + } % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} +% \end{macro} % % \begin{macro}{\pdf_pageobject_ref:n} % \begin{macrocode} @@ -450,6 +492,34 @@ } % \end{macrocode} % \end{macro} +% +% \subsection{Deprecated functions} +% +% \begin{variable}{\g_@@_object_prop} +% For tracking objects. +% \begin{macrocode} +\prop_new:N \g_@@_object_prop +% \end{macrocode} +% \end{variable} +% +% \begin{macro}{\pdf_object_new:nn, \pdf_object_write:nn, \pdf_object_write:nx} +% Wrap up the type data in a prop. +% \begin{macrocode} +\cs_new_protected:Npn \pdf_object_new:nn #1#2 + { + \prop_gput:Nnn \g_@@_object_prop {#1} {#2} + \@@_backend_object_new:n {#1} + } +\cs_new_protected:Npn \pdf_object_write:nn #1#2 + { + \exp_args:Nnx \@@_backend_object_write:nnn + {#1} { \prop_item:Nn \g_@@_object_prop {#1} } {#2} + \bool_gset_true:N \g_@@_init_bool + } +\cs_generate_variant:Nn \pdf_object_write:nn { nx } +% \end{macrocode} +% \end{macro} +% % \begin{macrocode} %</package> % \end{macrocode} diff --git a/macros/latex/contrib/l3kernel/l3prefixes.pdf b/macros/latex/contrib/l3kernel/l3prefixes.pdf Binary files differindex bc82e9425a..7aebfbe9bc 100644 --- a/macros/latex/contrib/l3kernel/l3prefixes.pdf +++ b/macros/latex/contrib/l3kernel/l3prefixes.pdf diff --git a/macros/latex/contrib/l3kernel/l3prg.dtx b/macros/latex/contrib/l3kernel/l3prg.dtx index 542dec79c8..cb0d282a3c 100644 --- a/macros/latex/contrib/l3kernel/l3prg.dtx +++ b/macros/latex/contrib/l3kernel/l3prg.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3prop.dtx b/macros/latex/contrib/l3kernel/l3prop.dtx index 11b11e7e18..6964f9ae47 100644 --- a/macros/latex/contrib/l3kernel/l3prop.dtx +++ b/macros/latex/contrib/l3kernel/l3prop.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3quark.dtx b/macros/latex/contrib/l3kernel/l3quark.dtx index 9d39718d8c..9723e11509 100644 --- a/macros/latex/contrib/l3kernel/l3quark.dtx +++ b/macros/latex/contrib/l3kernel/l3quark.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3regex.dtx b/macros/latex/contrib/l3kernel/l3regex.dtx index 049b1d46a4..5da0fa163f 100644 --- a/macros/latex/contrib/l3kernel/l3regex.dtx +++ b/macros/latex/contrib/l3kernel/l3regex.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3seq.dtx b/macros/latex/contrib/l3kernel/l3seq.dtx index 41202a7949..218bf5e507 100644 --- a/macros/latex/contrib/l3kernel/l3seq.dtx +++ b/macros/latex/contrib/l3kernel/l3seq.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3skip.dtx b/macros/latex/contrib/l3kernel/l3skip.dtx index 1c2b4884e4..e829802de1 100644 --- a/macros/latex/contrib/l3kernel/l3skip.dtx +++ b/macros/latex/contrib/l3kernel/l3skip.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3sort.dtx b/macros/latex/contrib/l3kernel/l3sort.dtx index 88489875ac..fac7fb0d1f 100644 --- a/macros/latex/contrib/l3kernel/l3sort.dtx +++ b/macros/latex/contrib/l3kernel/l3sort.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3str-convert.dtx b/macros/latex/contrib/l3kernel/l3str-convert.dtx index 7c35f41682..78f6a12649 100644 --- a/macros/latex/contrib/l3kernel/l3str-convert.dtx +++ b/macros/latex/contrib/l3kernel/l3str-convert.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3str.dtx b/macros/latex/contrib/l3kernel/l3str.dtx index b9ad620959..1ffa124f9e 100644 --- a/macros/latex/contrib/l3kernel/l3str.dtx +++ b/macros/latex/contrib/l3kernel/l3str.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3styleguide.pdf b/macros/latex/contrib/l3kernel/l3styleguide.pdf Binary files differindex f198f8d225..3a082655fd 100644 --- a/macros/latex/contrib/l3kernel/l3styleguide.pdf +++ b/macros/latex/contrib/l3kernel/l3styleguide.pdf diff --git a/macros/latex/contrib/l3kernel/l3styleguide.tex b/macros/latex/contrib/l3kernel/l3styleguide.tex index 81cc5e1347..c7352e8c42 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 2022-08-23} +\date{Released 2022-08-30} \begin{document} diff --git a/macros/latex/contrib/l3kernel/l3syntax-changes.pdf b/macros/latex/contrib/l3kernel/l3syntax-changes.pdf Binary files differindex eed70fbe05..459cdc2b01 100644 --- a/macros/latex/contrib/l3kernel/l3syntax-changes.pdf +++ b/macros/latex/contrib/l3kernel/l3syntax-changes.pdf diff --git a/macros/latex/contrib/l3kernel/l3syntax-changes.tex b/macros/latex/contrib/l3kernel/l3syntax-changes.tex index 4afd7aac05..83cca7ef05 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 2022-08-23} +\date{Released 2022-08-30} \newcommand{\TF}{\textit{(TF)}} diff --git a/macros/latex/contrib/l3kernel/l3sys.dtx b/macros/latex/contrib/l3kernel/l3sys.dtx index f2fb078a96..2e9b5b939d 100644 --- a/macros/latex/contrib/l3kernel/l3sys.dtx +++ b/macros/latex/contrib/l3kernel/l3sys.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3term-glossary.pdf b/macros/latex/contrib/l3kernel/l3term-glossary.pdf Binary files differindex 8fb11d26d2..b940dadaf5 100644 --- a/macros/latex/contrib/l3kernel/l3term-glossary.pdf +++ b/macros/latex/contrib/l3kernel/l3term-glossary.pdf diff --git a/macros/latex/contrib/l3kernel/l3term-glossary.tex b/macros/latex/contrib/l3kernel/l3term-glossary.tex index e45a40cd7b..a4d96e4164 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 2022-08-23} +\date{Released 2022-08-30} \newcommand{\TF}{\textit{(TF)}} diff --git a/macros/latex/contrib/l3kernel/l3text-case.dtx b/macros/latex/contrib/l3kernel/l3text-case.dtx index 765a351667..8a5615a1f6 100644 --- a/macros/latex/contrib/l3kernel/l3text-case.dtx +++ b/macros/latex/contrib/l3kernel/l3text-case.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % @@ -1435,6 +1435,40 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}[EXP]{\@@_change_case_lower_la-x-medieval:nnnN} +% \begin{macro}[EXP]{\@@_change_case_upper_la-x-medieval:nnnN} +% Simply swaps of characters. +% \begin{macrocode} +\cs_new:cpn { @@_change_case_lower_la-x-medieval:nnnN } #1#2#3#4 + { + \int_compare:nNnTF { `#4 } = { `V } + { + \@@_change_case_store:e + { + \char_generate:nn { `u } { \@@_char_catcode:N #4 } + } + \use:c { @@_change_case_char_next_ #2 :nn } + {#2} {#3} + } + { \@@_change_case_char:nnnN {#1} {#2} {#3} #4 } + } +\cs_new:cpn { @@_change_case_upper_la-x-medieval:nnnN } #1#2#3#4 + { + \int_compare:nNnTF { `#4 } = { `u } + { + \@@_change_case_store:e + { + \char_generate:nn { `V } { \@@_char_catcode:N #4 } + } + \use:c { @@_change_case_char_next_ #2 :nn } + {#2} {#3} + } + { \@@_change_case_char:nnnN {#1} {#2} {#3} #4 } + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% % \begin{macro}[EXP] % { % \@@_change_cases_lower_lt:nnnN , diff --git a/macros/latex/contrib/l3kernel/l3text-map.dtx b/macros/latex/contrib/l3kernel/l3text-map.dtx new file mode 100644 index 0000000000..8d8da0122f --- /dev/null +++ b/macros/latex/contrib/l3kernel/l3text-map.dtx @@ -0,0 +1,586 @@ +% \iffalse meta-comment +% +%% File: l3text-map.dtx +% +% Copyright (C) 2022 The LaTeX Project +% +% It may be distributed and/or modified under the conditions of the +% LaTeX Project Public License (LPPL), either version 1.3c of this +% license or (at your option) any later version. The latest version +% of this license is in the file +% +% https://www.latex-project.org/lppl.txt +% +% This file is part of the "l3kernel bundle" (The Work in LPPL) +% and all files in that bundle must be distributed together. +% +% ----------------------------------------------------------------------- +% +% The development version of the bundle can be found at +% +% https://github.com/latex3/latex3 +% +% for those people who are interested. +% +%<*driver> +\documentclass[full,kernel]{l3doc} +\begin{document} + \DocInput{\jobname.dtx} +\end{document} +%</driver> +% \fi +% +% \title{^^A +% The \textsf{l3text-map} package: text processing (mapping)^^A +% } +% +% \author{^^A +% The \LaTeX{} Project\thanks +% {^^A +% E-mail: +% \href{mailto:latex-team@latex-project.org} +% {latex-team@latex-project.org}^^A +% }^^A +% } +% +% \date{Released 2022-08-30} +% +% \maketitle +% +% \begin{documentation} +% +% \end{documentation} +% +% \begin{implementation} +% +% \section{\pkg{l3text-map} implementation} +% +% \begin{macrocode} +%<*package> +% \end{macrocode} +% +% \begin{macrocode} +%<@@=text> +% \end{macrocode} +% +% \subsection{Mapping to text} +% +% \begin{macro}[EXP]{\text_map_function:nN} +% \begin{macro}[EXP]{\@@_map_function:nN} +% \begin{macro}[EXP]{\@@_map_loop:Nnw} +% \begin{macro}[EXP]{\@@_map_group:Nnn} +% \begin{macro}[EXP]{\@@_map_space:Nnw} +% \begin{macro}[EXP]{\@@_map_N_type:NnN} +% \begin{macro}[EXP]{\@@_map_codepoint:Nnn} +% \begin{macro}[EXP]{\@@_map_CR:Nnw} +% \begin{macro}[EXP]{\@@_map_CR:NnN} +% \begin{macro}[EXP]{\@@_map_class:Nnnn} +% \begin{macro}[EXP]{\@@_map_class:nNnnn} +% \begin{macro}[EXP]{\@@_map_class_loop:Nnnnw} +% \begin{macro}[EXP]{\@@_map_class_end:nw} +% \begin{macro}[EXP] +% { +% \@@_map_Control:Nnn , +% \@@_map_Extend:Nnn , +% \@@_map_SpacingMark:Nnn , +% \@@_map_Prepend:Nnn , +% \@@_map_Prepend_aux:Nnn +% } +% \begin{macro}[EXP]{\@@_map_Prepend:nNnn} +% \begin{macro}[EXP]{\@@_map_Prepend_loop:Nnnw} +% \begin{macro}[EXP] +% { +% \@@_map_not_Control:Nnn , +% \@@_map_not_Extend:Nnn , +% \@@_map_not_SpacingMark:Nnn , +% \@@_map_not_Prepend:Nnn , +% \@@_map_not_L:Nnn , +% \@@_map_not_LV:Nnn , +% \@@_map_not_V:Nnn , +% \@@_map_not_LVT:Nnn , +% \@@_map_not_T:Nnn +% } +% \begin{macro}[EXP] +% { +% \@@_map_L:Nnn , +% \@@_map_LV:Nnn , +% \@@_map_V:Nnn , +% \@@_map_LVT:Nnn , +% \@@_map_T:Nnn +% } +% \begin{macro}[EXP]{\@@_map_hangul:Nnnw} +% \begin{macro}[EXP]{\@@_map_hangul:NnnN} +% \begin{macro}[EXP]{\@@_map_hangul:Nnnn} +% \begin{macro}[EXP]{\@@_map_hangul_aux:Nnnnw} +% \begin{macro}[EXP]{\@@_map_hangul:nNnnnw} +% \begin{macro}[EXP]{\@@_map_hangul_loop:Nnnnnw} +% \begin{macro}[EXP]{\@@_map_hangul_next:Nnnn} +% \begin{macro}[EXP]{\@@_map_hangul_end:nw} +% \begin{macro}[EXP] +% { +% \@@_map_hangul_L:Nnn , +% \@@_map_hangul_LV:Nnn , +% \@@_map_hangul_V:Nnn , +% \@@_map_hangul_LVT:Nnn , +% \@@_map_hangul_T:Nnn +% } +% \begin{macro}[EXP] +% {\@@_map_Regional_Indicator:Nnn, \@@_map_Regional_Indicator_aux:Nnn} +% \begin{macro}[EXP]{\@@_map_lookahead:NnNw} +% \begin{macro}[EXP]{\@@_map_lookahead:NnNN} +% \begin{macro}[EXP]{\@@_map_output:Nn} +% \begin{macro}[EXP]{\text_map_break:} +% \begin{macro}[EXP]{\text_map_break:n} +% The standard lead-off for an action loop. +% \begin{macrocode} +\cs_new:Npn \text_map_function:nN #1#2 + { \exp_args:Ne \@@_map_function:nN { \text_expand:n {#1} } #2 } +\cs_new:Npn \@@_map_function:nN #1#2 + { + \@@_map_loop:Nnw #2 { } #1 + \q_@@_recursion_tail \q_@@_recursion_stop + \prg_break_point:Nn \text_map_break: { } + } +% \end{macrocode} +% The standard set up for an \enquote{action} loop. Groups are handled by +% recursion, spaces are treated similarly: both count as grapheme boundaries. +% For \texttt{N}-type tokens, we filter out control sequences (again +% a boundary), then move on to further analysis. +% \begin{macrocode} +\cs_new:Npn \@@_map_loop:Nnw #1#2#3 \q_@@_recursion_stop + { + \tl_if_head_is_N_type:nTF {#3} + { \@@_map_N_type:NnN } + { + \tl_if_head_is_group:nTF {#3} + { \@@_map_group:Nnn } + { \@@_map_space:Nnw } + } + #1 {#2} #3 \q_@@_recursion_stop + } +\cs_new:Npn \@@_map_group:Nnn #1#2#3 + { + \@@_map_output:Nn #1 {#2} + { + \@@_map_loop:Nnw #1 { } #2 + \q_@@_recursion_tail \q_@@_recursion_stop + \prg_break_point:Nn \text_map_break: { } + } + \@@_map_loop:Nnw #1 { } + } +\use:x + { \cs_new:Npn \exp_not:N \@@_map_space:Nnw ##1##2 \c_space_tl } + { + \@@_map_output:Nn #1 {#2} + #1 { ~ } + \@@_map_loop:Nnw #1 { } + } +\cs_new:Npn \@@_map_N_type:NnN #1#2#3 + { + \@@_if_q_recursion_tail_stop_do:Nn #3 + { + \@@_map_output:Nn #1 {#2} + \text_map_break: + } + \token_if_cs:NTF #3 + { + \@@_map_output:Nn #1 {#2} + #1 {#3} + \@@_map_loop:Nnw #1 { } + } + { + \@@_codepoint_process:nN + { \@@_map_codepoint:Nnn #1 {#2} } #3 + } + } +% \end{macrocode} +% We pull out a few special cases here. Carriage returns case needs a bit of +% context handling so has an auxiliary. Codepoint U+200D is the zero-width +% joiner, which has no context to concern us: just don't break. +% \begin{macrocode} +\cs_new:Npn \@@_map_codepoint:Nnn #1#2#3 + { + \@@_codepoint_compare:nNnTF {#3} = { "0D } + { + \@@_map_output:Nn #1 {#2} + \@@_map_CR:Nnw #1 {#3} + } + { + \@@_codepoint_compare:nNnTF {#3} = { "200D } + { \@@_map_loop:Nnw #1 {#2#3} } + { \@@_map_class:Nnnn #1 {#2} {#3} { Control } } + } + } +% \end{macrocode} +% A carriage return is a boundary unless it is immediately followed by +% a line feed, in which case that pair is a boundary. +% \begin{macrocode} +\cs_new:Npn \@@_map_CR:Nnw #1#2#3 \q_@@_recursion_stop + { + \tl_if_head_is_N_type:nTF {#3} + { \@@_map_CR:NnN #1 {#2} } + { + #1 {#2} + \@@_map_loop:Nnw #1 { } + } + #3 \q_@@_recursion_stop + } +\cs_new:Npn \@@_map_CR:NnN #1#2#3 + { + \@@_if_q_recursion_tail_stop_do:Nn #3 + { + #1 {#2} + \text_map_break: + } + \bool_lazy_and:nnTF + { ! \token_if_cs_p:N #3 } + { \int_compare_p:nNn { `#3 } = { "0A } } + { + \@@_map_output:Nn #1 {#2#3} + \@@_map_loop:Nnw #1 { } + } + { \@@_map_loop:Nnw #1 { } #3 } + } +% \end{macrocode} +% There are various classes of character, and we deal with them all in +% the same general way. We need to example the relevant list of codepoints: +% if we get a hit, then we do whatever the relevant action is. Otherwise +% we loop, but only if the current codepoint could still match: the +% loop stops early otherwise and we move forward. +% \begin{macrocode} +\cs_new:Npn \@@_map_class:Nnnn #1#2#3#4 + { + \exp_args:Nv \@@_map_class:nNnnn { c_@@_grapheme_ #4 _clist } + #1 {#2} {#3} {#4} + } +\cs_new:Npn \@@_map_class:nNnnn #1#2#3#4#5 + { + \@@_map_class_loop:Nnnnw #2 {#3} {#4} {#5} + #1 , \q_@@_recursion_tail .. , \q_@@_recursion_stop + } +\cs_new:Npn \@@_map_class_loop:Nnnnw #1#2#3#4 #5 .. #6 , + { + \@@_if_q_recursion_tail_stop_do:nn {#5} + { \use:c { @@_map_not_ #4 :Nnn } #1 {#2} {#3} } + \@@_codepoint_compare:nNnTF {#3} < { "#5 } + { + \@@_map_class_end:nw + { \use:c { @@_map_not_ #4 :Nnn } #1 {#2} {#3} } + } + { + \@@_codepoint_compare:nNnTF {#3} > { "#6 } + { \@@_map_class_loop:Nnnnw #1 {#2} {#3} {#4} } + { + \@@_map_class_end:nw + { \use:c { @@_map_ #4 :Nnn } #1 {#2} {#3} } + } + } + } +\cs_new:Npn \@@_map_class_end:nw #1#2 \q_@@_recursion_stop {#1} +% \end{macrocode} +% Break before \emph{and} after. +% \begin{macrocode} +\cs_new:Npn \@@_map_Control:Nnn #1#2#3 + { + \@@_map_output:Nn #1 {#2} + \@@_map_output:Nn #1 {#3} + \@@_map_loop:Nnw #1 { } + } +% \end{macrocode} +% Keep collecting. +% \begin{macrocode} +\cs_new:Npn \@@_map_Extend:Nnn #1#2#3 + { \@@_map_loop:Nnw #1 {#2#3} } +\cs_new_eq:NN \@@_map_SpacingMark:Nnn \@@_map_Extend:Nnn +% \end{macrocode} +% Outputting anything earlier, the combine with what follows. The only +% exclusions are control characters. +% \begin{macrocode} +\cs_new:Npn \@@_map_Prepend:Nnn #1#2#3 + { + \@@_map_output:Nn #1 {#2} + \@@_map_lookahead:NnNw #1 {#3} \@@_map_Prepend_aux:Nnn + } +\cs_new:Npn \@@_map_Prepend_aux:Nnn #1#2#3 + { + \bool_lazy_or:nnTF + { \@@_codepoint_compare_p:nNn {#3} = { "0A } } + { \@@_codepoint_compare_p:nNn {#3} = { "0D } } + { + #1 {#2} + \@@_map_loop:Nnw #1 {#3} + } + { + \exp_args:NV \@@_map_Prepend:nNnn + \c_@@_grapheme_Control_clist + #1 {#2} {#3} + } + } +\cs_new:Npn \@@_map_Prepend:nNnn #1#2#3#4 + { + \@@_map_Prepend_loop:Nnnw #2 {#3} {#4} + #1 , \q_@@_recursion_tail .. , \q_@@_recursion_stop + } +\cs_new:Npn \@@_map_Prepend_loop:Nnnw #1#2#3 #4 .. #5 , + { + \@@_if_q_recursion_tail_stop_do:nn {#4} + { \@@_map_loop:Nnw #1 {#2#3} } + \@@_codepoint_compare:nNnTF {#3} < { "#4 } + { + \@@_map_class_end:nw + { \@@_map_loop:Nnw #1 {#2#3} } + } + { + \@@_codepoint_compare:nNnTF {#3} > { "#5 } + { \@@_map_Prepend_loop:Nnnw #1 {#2} {#3} } + { + \@@_map_class_end:nw + { \@@_map_loop:Nnw #1 {#2} #3 } + } + } + } +% \end{macrocode} +% Dealing with end-of-class is done such that we can be flexible. +% \begin{macrocode} +\cs_new:Npn \@@_map_not_Control:Nnn #1#2#3 + { \@@_map_class:Nnnn #1 {#2} {#3} { Extend } } +\cs_new:Npn \@@_map_not_Extend:Nnn #1#2#3 + { \@@_map_class:Nnnn #1 {#2} {#3} { SpacingMark } } +\cs_new:Npn \@@_map_not_SpacingMark:Nnn #1#2#3 + { \@@_map_class:Nnnn #1 {#2} {#3} { Prepend } } +\cs_new:Npn \@@_map_not_Prepend:Nnn #1#2#3 + { \@@_map_class:Nnnn #1 {#2} {#3} { L } } +\cs_new:Npn \@@_map_not_L:Nnn #1#2#3 + { \@@_map_class:Nnnn #1 {#2} {#3} { LV } } +\cs_new:Npn \@@_map_not_LV:Nnn #1#2#3 + { \@@_map_class:Nnnn #1 {#2} {#3} { V } } +\cs_new:Npn \@@_map_not_V:Nnn #1#2#3 + { \@@_map_class:Nnnn #1 {#2} {#3} { LVT } } +\cs_new:Npn \@@_map_not_LVT:Nnn #1#2#3 + { \@@_map_class:Nnnn #1 {#2} {#3} { T } } +\cs_new:Npn \@@_map_not_T:Nnn #1#2#3 + { \@@_map_class:Nnnn #1 {#2} {#3} { Regional_Indicator } } +\cs_new:Npn \@@_map_not_Regional_Indicator:Nnn #1#2#3 + { + \@@_map_output:Nn #1 {#2} + \@@_map_loop:Nnw #1 {#3} + } +% \end{macrocode} +% Hangul needs additional treatment. First we have to deal with +% the start-of-Hangul position: output what we had up to now, then +% move the the specialist handler. The idea here is to pick off the +% different codepoint types one at a time, tracking what else can be +% considered at each stage until we hit the end of the viable types. +% Other than that, we just keep building up the Hangul codepoints +% using a dedicated version of the loop from above. +% \begin{macrocode} +\cs_new:Npn \@@_map_L:Nnn #1#2#3 + { + \@@_map_output:Nn #1 {#2} + \@@_map_hangul:Nnnw + #1 {#3} { L ; V ; LV ; LVT } + } +\cs_new:Npn \@@_map_LV:Nnn #1#2#3 + { + \@@_map_output:Nn #1 {#2} + \@@_map_hangul:Nnnw + #1 {#3} { V ; T } + } +\cs_new_eq:NN \@@_map_V:Nnn \@@_map_LV:Nnn +\cs_new:Npn \@@_map_LVT:Nnn #1#2#3 + { + \@@_map_output:Nn #1 {#2} + \@@_map_hangul:Nnnw + #1 {#3} { T } + } +\cs_new_eq:NN \@@_map_T:Nnn \@@_map_LVT:Nnn +\cs_new:Npn \@@_map_hangul:Nnnw #1#2#3#4 \q_@@_recursion_stop + { + \tl_if_head_is_N_type:nTF {#4} + { \@@_map_hangul:NnnN #1 {#2} {#3} } + { + #1 {#2} + \@@_map_loop:Nnw #1 { } + } + #4 \q_@@_recursion_stop + } +\cs_new:Npn \@@_map_hangul:NnnN #1#2#3#4 + { + \@@_if_q_recursion_tail_stop_do:Nn #4 + { + #1 {#2} + \text_map_break: + } + \token_if_cs:NTF #4 + { + #1 {#2} + \@@_map_loop:Nnw #1 { } + } + { + \@@_codepoint_process:nN + { \@@_map_hangul:Nnnn #1 {#2} {#3} } #4 + } + } +\cs_new:Npn \@@_map_hangul:Nnnn #1#2#3#4 + { + \@@_map_hangul_aux:Nnnw #1 {#2} {#4} + #3 ; \q_recursion_tail ; \q_recursion_stop + } +\cs_new:Npn \@@_map_hangul_aux:Nnnw #1#2#3#4 ; + { + \quark_if_recursion_tail_stop_do:nn {#4} + { \@@_map_loop:Nnw #1 {#2} #3 } + \exp_args:Nv \@@_map_hangul:nNnnnw { c_@@_grapheme_ #4 _clist } + #1 {#2} {#3} {#4} + } +\cs_new:Npn \@@_map_hangul:nNnnnw #1#2#3#4#5#6 \q_recursion_stop + { + \@@_map_hangul_loop:Nnnnnw #2 {#3} {#4} {#5} {#6} + #1 , \q_@@_recursion_tail .. , \q_@@_recursion_stop + } +\cs_new:Npn \@@_map_hangul_loop:Nnnnnw #1#2#3#4#5 #6 .. #7 , + { + \@@_if_q_recursion_tail_stop_do:nn {#6} + { \@@_map_hangul_next:Nnnn #1 {#2} {#3} {#5} } + \@@_codepoint_compare:nNnTF {#3} < { "#6 } + { + \@@_map_hangul_end:nw + { \@@_map_hangul_next:Nnnn #1 {#2} {#3} {#5} } + } + { + \@@_codepoint_compare:nNnTF {#3} > { "#7 } + { \@@_map_hangul_loop:Nnnnnw #1 {#2} {#3} {#4} {#5} } + { + \@@_map_hangul_end:nw + { \use:c { @@_map_hangul_ #4 :Nnn } #1 {#2} {#3} } + } + } + } +\cs_new:Npn \@@_map_hangul_next:Nnnn #1#2#3#4 + { \@@_map_hangul_aux:Nnnw #1 {#2} {#3} #4 \q_recursion_stop } +\cs_new:Npn \@@_map_hangul_end:nw #1#2 \q_@@_recursion_stop {#1} +\cs_new:Npn \@@_map_hangul_L:Nnn #1#2#3 + { + \@@_map_hangul:Nnnw + #1 {#2#3} { L V { LV } { LVT } } + } +\cs_new:Npn \@@_map_hangul_LV:Nnn #1#2#3 + { + \@@_map_hangul:Nnnw + #1 {#2#3} { VT } + } +\cs_new_eq:NN \@@_map_hangul_V:Nnn \@@_map_hangul_LV:Nnn +\cs_new:Npn \@@_map_hangul_LVT:Nnn #1#2#3 + { + \@@_map_hangul:Nnnw + #1 {#2#3} { T } + } +\cs_new_eq:NN \@@_map_hangul_T:Nnn \@@_map_hangul_LVT:Nnn +% \end{macrocode} +% The Regional Indicator rule means looking ahead and dealing with the +% case where there are two in a row. So we use a look ahead to pick them +% off. As there is only one range the values are hard-coded. +% \begin{macrocode} +\cs_new:Npn \@@_map_Regional_Indicator:Nnn #1#2#3 + { + \@@_map_output:Nn #1 {#2} + \@@_map_lookahead:NnNw #1 {#3} \@@_map_Regional_Indicator_aux:Nnn + } +\cs_new:Npn \@@_map_Regional_Indicator_aux:Nnn #1#2#3 + { + \bool_lazy_or:nnTF + { \@@_codepoint_compare_p:nNn {#3} < { "1F1E6 } } + { \@@_codepoint_compare_p:nNn {#3} > { "1F1FF } } + { + \@@_map_loop:Nnw #1 {#2} #3 + } + { \@@_map_loop:Nnw #1 {#2#3} } + } +% \end{macrocode} +% A generic loop-ahead setup. +% \begin{macrocode} +\cs_new:Npn \@@_map_lookahead:NnNw #1#2#3#4 \q_@@_recursion_stop + { + \tl_if_head_is_N_type:nTF {#4} + { \@@_map_lookahead:NnNN #1 {#2} #3 } + { \@@_map_loop:Nnw #1 {#2} } + #4 \q_@@_recursion_stop + } +\cs_new:Npn \@@_map_lookahead:NnNN #1#2#3#4 + { + \@@_if_q_recursion_tail_stop_do:Nn #4 { #1 {#2} } + \token_if_cs:NTF #4 + { + #1 {#2} + \@@_map_loop:Nnw #1 { } + } + { \@@_codepoint_process:nN { #3 #1 {#2} } } + #4 + } +% \end{macrocode} +% For the end of the process. +% \begin{macrocode} +\cs_new:Npn \@@_map_output:Nn #1#2 + { \tl_if_blank:nF {#2} { #1 {#2} } } +\cs_new:Npn \text_map_break: + { \prg_map_break:Nn \text_map_break: { } } +\cs_new:Npn \text_map_break:n + { \prg_map_break:Nn \text_map_break: } +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\text_map_inline:nn} +% The standard non-expandable inline version. +% \begin{macrocode} +\cs_new_protected:Npn \text_map_inline:nn #1#2 + { + \int_gincr:N \g__kernel_prg_map_int + \cs_gset_protected:cpn + { @@_map_ \int_use:N \g__kernel_prg_map_int :w } ##1 {#2} + \exp_args:Nnc \text_map_function:nN {#1} + { @@_map_ \int_use:N \g__kernel_prg_map_int :w } + \prg_break_point:Nn \text_map_break: + { \int_gdecr:N \g__kernel_prg_map_int } + } +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +%</package> +% \end{macrocode} +% +% \end{implementation} +% +% \PrintIndex diff --git a/macros/latex/contrib/l3kernel/l3text-purify.dtx b/macros/latex/contrib/l3kernel/l3text-purify.dtx index 966e3518c7..3b5f5cb8c9 100644 --- a/macros/latex/contrib/l3kernel/l3text-purify.dtx +++ b/macros/latex/contrib/l3kernel/l3text-purify.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3text.dtx b/macros/latex/contrib/l3kernel/l3text.dtx index df4f2fcde5..3e89563a5e 100644 --- a/macros/latex/contrib/l3kernel/l3text.dtx +++ b/macros/latex/contrib/l3kernel/l3text.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % @@ -184,6 +184,8 @@ % combining dot is removed when uppercasing in these cases. Note that % \emph{only} the accents used in Lithuanian are covered: the behaviour % of other accents are not modified. +% \item Medieval Latin (\texttt{la-xmedieval}). +% The characters |u| and |V| are interchanged on case changing. % \item Dutch (\texttt{nl}). % Capitalisation of \texttt{ij} at the beginning of titlecased % input produces \texttt{IJ} rather than \texttt{Ij}. The output @@ -299,6 +301,62 @@ % \texttt{true}. % \end{variable} % +% \section{Mapping to graphemes} +% +% Grapheme splitting is implemented using the algorithm described in Unicode +% Standard Annex \#29. This includes support for extended grapheme clusters. +% Text starting with a line feed or carriage return character will drop this +% due to standard \TeX{} processing. At present extended pictograms are +% not supported: these may be added in a future release. +% +% \begin{function}[rEXP, added = 2022-08-04]{\text_map_function:nN} +% \begin{syntax} +% \cs{text_map_function:nN} \meta{text} \Arg{function} +% \end{syntax} +% Takes user input \meta{text} and expands as described for +% \cs{text_expand:n}, then maps over the \emph{graphemes} within the +% result, passing each grapheme to the \meta{function}. +% Broadly a grapheme is a \enquote{user perceived character}: +% the Unicode Consortium describe the decomposition of input to +% graphemes in depth, and the approach used here implements that +% algorithm. The \meta{function} should accept one argument as \meta{balanced +% text}: this may be comprise codepoints or may be a control sequence. +% With $8$-bit engines, the codepoint(s) themselves may of course be +% made up of multiple bytes: the mapping will pass the correct codepoints +% independent of the engine in use. +% See also \cs{text_map_inline:nn}. +% \end{function} +% +% \begin{function}[added = 2022-08-04]{\text_map_inline:nn} +% \begin{syntax} +% \cs{text_map_inline:nn} \meta{text} \Arg{inline function} +% \end{syntax} +% Takes user input \meta{text} and expands as described for +% \cs{text_expand:n}, then maps over the \emph{graphemes} within the +% result, passing each grapheme to the \meta{inline function}. +% Broadly a grapheme is a \enquote{user perceived character}: +% the Unicode Consortium describe the decomposition of input to +% graphemes in depth, and the approach used here implements that +% algorithm. The \meta{inline function} should consist of code which +% receives the grapheme as \meta{balanced +% text}: this may be comprise codepoints or may be a control sequence. +% With $8$-bit engines, the codepoint(s) themselves may of course be +% made up of multiple bytes: the mapping will pass the correct codepoints +% independent of the engine in use. +% See also \cs{text_map_function:nN}. +% \end{function} +% +% \begin{function}[rEXP, added = 2022-08-04] +% {\text_map_break:, \text_map_break:n} +% \begin{syntax} +% \cs{text_map_break:} +% \cs{text_map_break:n} \Arg{code} +% \end{syntax} +% Used to terminate a \cs[no-index]{text_map_\ldots} function before all +% entries in the \meta{text} have been processed. This +% normally takes place within a conditional statement. +% \end{function} +% % \end{documentation} % % \begin{implementation} @@ -357,11 +415,14 @@ % \end{macro} % % \begin{macro}[EXP]{\@@_if_q_recursion_tail_stop_do:Nn} +% \begin{macro}[EXP]{\@@_if_q_recursion_tail_stop_do:nn} % Functions to query recursion quarks. % \begin{macrocode} \__kernel_quark_new_test:N \@@_if_q_recursion_tail_stop_do:Nn +\__kernel_quark_new_test:N \@@_if_q_recursion_tail_stop_do:nn % \end{macrocode} % \end{macro} +% \end{macro} % % \begin{variable}{\s_@@_recursion_tail,\s_@@_recursion_stop} % Internal scan marks quarks. @@ -581,6 +642,121 @@ % \end{macrocode} % \end{macro} % +% \subsection{Codepoint utilities} +% +% For working with codepoints in an engine-neutral way. +% +% \begin{macro}[EXP]{\@@_codepoint_process:nN} +% \begin{macro}[EXP]{\@@_codepoint_process:nNN} +% \begin{macro}[EXP]{\@@_codepoint_process:nNNN} +% \begin{macro}[EXP]{\@@_codepoint_process:nNNNN} +% Grab a codepoint and apply some code to it: here |#1| should expect one +% following \emph{balanced text}. +% \begin{macrocode} +\bool_lazy_or:nnTF + { \sys_if_engine_luatex_p: } + { \sys_if_engine_xetex_p: } + { + \cs_new:Npn \@@_codepoint_process:nN #1#2 { #1 {#2} } + } + { + \cs_new:Npn \@@_codepoint_process:nN #1#2 + { + \int_compare:nNnTF { `#2 } > { "80 } + { + \int_compare:nNnTF { `#2 } < { "E0 } + { \@@_codepoint_process:nNN } + { + \int_compare:nNnTF { `#2 } < { "F0 } + { \@@_codepoint_process:nNNN } + { \@@_codepoint_process:nNNNN } + } + } + { \use:n } + {#1} #2 + } + \cs_new:Npn \@@_codepoint_process:nNN #1#2#3 + { #1 {#2#3} } + \cs_new:Npn \@@_codepoint_process:nNNN #1#2#3#4 + { #1 {#2#3#4} } + \cs_new:Npn \@@_codepoint_process:nNNNN #1#2#3#4#5 + { #1 {#2#3#4#5} } + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}[EXP, pTF]{\@@_codepoint_compare:nNn} +% \begin{macro}[EXP]{\@@_codepoint_compare:N, \@@_codepoint_compare_aux:N} +% \begin{macro}[EXP]{\@@_codepoint_compare:NN} +% \begin{macro}[EXP]{\@@_codepoint_compare:NNN} +% \begin{macro}[EXP]{\@@_codepoint_compare:NNNN} +% Allows comparison for all engines using a first \enquote{character} followed +% by a codepoint. +% \begin{macrocode} +\bool_lazy_or:nnTF + { \sys_if_engine_luatex_p: } + { \sys_if_engine_xetex_p: } + { + \prg_new_conditional:Npnn + \@@_codepoint_compare:nNn #1#2#3 { TF , p } + { + \int_compare:nNnTF { `#1 } #2 {#3} + \prg_return_true: \prg_return_false: + } + } + { + \prg_new_conditional:Npnn + \@@_codepoint_compare:nNn #1#2#3 { TF , p } + { + \int_compare:nNnTF { \@@_codepoint_compare:N #1 } + #2 {#3} + \prg_return_true: \prg_return_false: + } + \cs_new:Npn \@@_codepoint_compare:N #1 + { + \if_int_compare:w `#1 > "80 \exp_stop_f: + \if_int_compare:w `#1 < "E0 \exp_stop_f: + \exp_after:wN \exp_after:wN \exp_after:wN + \@@_codepoint_compare:NN + \else: + \if_int_compare:w `#1 < "F0 \exp_stop_f: + \exp_after:wN \exp_after:wN \exp_after:wN + \exp_after:wN \exp_after:wN \exp_after:wN + \exp_after:wN \@@_codepoint_compare:NNN + \else: + \exp_after:wN \exp_after:wN \exp_after:wN + \exp_after:wN \exp_after:wN \exp_after:wN + \exp_after:wN \@@_codepoint_compare:NNNN + \fi: + \fi: + \else: + \exp_after:wN \@@_codepoint_compare_aux:N + \fi: + #1 + } + \cs_new:Npn \@@_codepoint_compare_aux:N #1 { `#1 } + \cs_new:Npn \@@_codepoint_compare:NN #1#2 + { (`#1 - "C0) * "40 + `#2 - "80 } + \cs_new:Npn \@@_codepoint_compare:NNN #1#2#3 + { (`#1 - "E0) * "1000 + (`#2 - "80) * "40 + `#3 - "80 } + \cs_new:Npn \@@_codepoint_compare:NNNN #1#2#3#4 + { + (`#1 - "F0) * "40000 + + (`#2 - "80) * "1000 + + (`#3 - "80) * "40 + + `#4 - "80 + } + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% % \subsection{Configuration variables} % % \begin{variable}{\l_text_accents_tl, \l_text_letterlike_tl} diff --git a/macros/latex/contrib/l3kernel/l3tl-analysis.dtx b/macros/latex/contrib/l3kernel/l3tl-analysis.dtx index 728284c8ac..912436441f 100644 --- a/macros/latex/contrib/l3kernel/l3tl-analysis.dtx +++ b/macros/latex/contrib/l3kernel/l3tl-analysis.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3tl.dtx b/macros/latex/contrib/l3kernel/l3tl.dtx index 647442b82a..8bdbf5098b 100644 --- a/macros/latex/contrib/l3kernel/l3tl.dtx +++ b/macros/latex/contrib/l3kernel/l3tl.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3token.dtx b/macros/latex/contrib/l3kernel/l3token.dtx index 5583b55eef..eb2ef81b19 100644 --- a/macros/latex/contrib/l3kernel/l3token.dtx +++ b/macros/latex/contrib/l3kernel/l3token.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % @@ -1795,36 +1795,113 @@ % \end{macro} % % \begin{macro}[rEXP]{\char_to_nfd:N} -% \begin{macro}[rEXP]{\@@_to_nfd:n} +% \begin{macro}[rEXP]{\@@_to_nfd:n, \@@_to_nfd:e} % \begin{macro}[rEXP]{\@@_to_nfd:Nw} -% Look up any \textsc{nfd} and recursively produce the result. -% \begin{macrocode} -\cs_new:Npn \char_to_nfd:N #1 +% \begin{macro}[rEXP]{\char_to_nfd:n} +% \begin{macro}[rEXP]{\char_to_nfd:w} +% \begin{macro}[rEXP]{\char_nfd_generate:n} +% \begin{macro}[rEXP]{\char_nfd_generate:nnnn} +% Look up any \textsc{nfd} and recursively produce the result. Having shared +% code between Unicode and $8$-bit engines would be ideal, but this would be +% awkward as we have completely different treatment of catcodes, numbers +% of tokens, etc. The apparent saving becomes more of a headache than it's +% worth \dots +% \begin{macrocode} +\bool_lazy_or:nnTF + { \sys_if_engine_luatex_p: } + { \sys_if_engine_xetex_p: } { - \cs_if_exist:cTF { c_@@_nfd_ \token_to_str:N #1 _ tl } + \cs_new:Npn \char_to_nfd:N #1 { - \exp_after:wN \exp_after:wN \exp_after:wN \@@_to_nfd:Nw - \exp_after:wN \exp_after:wN \exp_after:wN #1 - \cs:w c_@@_nfd_ \token_to_str:N #1 _ tl \cs_end: - \s_@@_stop + \cs_if_exist:cTF { c_@@_nfd_ \token_to_str:N #1 _ tl } + { + \exp_after:wN \exp_after:wN \exp_after:wN \@@_to_nfd:Nw + \exp_after:wN \exp_after:wN \exp_after:wN #1 + \cs:w c_@@_nfd_ \token_to_str:N #1 _tl \cs_end: + \s_@@_stop + } + { \exp_not:n {#1} } + } + \cs_new_eq:NN \@@_to_nfd:n \char_to_nfd:N + \cs_generate_variant:Nn \@@_to_nfd:n { e } + \cs_new:Npn \@@_to_nfd:Nw #1#2#3 \s_@@_stop + { + \@@_to_nfd:e + { \char_generate:nn { `#2 } { \@@_change_case_catcode:N #1 } } + \tl_if_blank:nF {#3} + { + \@@_to_nfd:e + { \char_generate:nn { `#3 } { \char_value_catcode:n { `#3 } } } + } + } + \cs_new:Npn \char_to_nfd:n #1 + { + \@@_to_nfd:e { \char_generate:nn {#1} { \char_value_catcode:n {#1} } } } - { \exp_not:n {#1} } } -\cs_set_eq:NN \@@_to_nfd:n \char_to_nfd:N -\cs_new:Npn \@@_to_nfd:Nw #1#2#3 \s_@@_stop { - \exp_args:Ne \@@_to_nfd:n - { \char_generate:nn { `#2 } { \@@_change_case_catcode:N #1 } } - \tl_if_blank:nF {#3} + \cs_new:Npn \char_to_nfd:N #1 { \exp_not:n {#1} } + \cs_new:Npn \char_to_nfd:n #1 + { + \int_compare:nNnTF {#1} > { "80 } + { \exp_args:Ne \@@_to_nfd:n { \@@_nfd_generate:n {#1} } } + { \@@_nfd_generate:n {#1} } + } + \cs_new:Npn \@@_to_nfd:n #1 { - \exp_args:Ne \@@_to_nfd:n - { \char_generate:nn { `#3 } { \char_value_catcode:n { `#3 } } } + \cs_if_exist:cTF { c_@@_nfd_ \tl_to_str:n {#1} _ tl } + { + \exp_after:wN \exp_after:wN \exp_after:wN \@@_to_nfd:w + \cs:w c_@@_nfd_ \tl_to_str:n {#1} _tl \cs_end: + \s_@@_stop + } + { \exp_not:n {#1} } + } + \cs_new:Npn \@@_to_nfd:w #1#2 \s_@@_stop + { + \@@_to_nfd:n {#1} + \tl_if_blank:nF {#2} + { \@@_to_nfd:n {#2} } } + \cs_new:Npn \@@_nfd_generate:n #1 + { + \use:e + { + \exp_not:N \@@_nfd_generate:nnnn + \char_to_utfviii_bytes:n {#1} + } + } + \cs_new:Npn \@@_nfd_generate:nnnn #1#2#3#4 + { + \tl_if_blank:nTF {#2} + { \char_generate:nn {#1} { \char_value_catcode:n {#1} } } + { + \exp_after:wN \exp_after:wN \exp_after:wN + \exp_not:N \char_generate:nn {#1} { 13 } + \exp_after:wN \exp_after:wN \exp_after:wN + \exp_not:N \char_generate:nn {#2} { 13 } + \tl_if_blank:nF {#3} + { + \exp_after:wN \exp_after:wN \exp_after:wN + \exp_not:N \char_generate:nn {#3} { 13 } + \tl_if_blank:nF {#4} + { + \exp_after:wN \exp_after:wN \exp_after:wN + \exp_not:N \char_generate:nn {#4} { 13 } + } + } + } + + } } % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} % % \begin{macro}[EXP] % { diff --git a/macros/latex/contrib/l3kernel/l3unicode.dtx b/macros/latex/contrib/l3kernel/l3unicode.dtx index 8ae0f44fe8..737f970484 100644 --- a/macros/latex/contrib/l3kernel/l3unicode.dtx +++ b/macros/latex/contrib/l3kernel/l3unicode.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2022-08-23} +% \date{Released 2022-08-30} % % \maketitle % @@ -67,10 +67,9 @@ %<@@=char> % \end{macrocode} % -% Case changing both for strings and \enquote{text} requires data from -% the Unicode Consortium. Some of this is build in to the format (as -% \tn{lccode} and \tn{uccode} values) but this covers only the simple -% one-to-one situations and does not fully handle for example case folding. +% Text operations requires data from the Unicode Consortium. Data read into +% Unicode engine formats is at best a small part of what we need, so there +% is a loader here to set up the appropriate data structures. % % As only the data needs to remain at the end of this process, everything % is set up inside a group. The only thing that is outside is creating a @@ -78,30 +77,67 @@ % all engines. For performance reasons, some of the code here is very % low-level: the material is read during loading \pkg{expl3} in package % mode. +% +% Parsing the data files can be the same way for all engines, but the detail +% of data storage varies depending on whether they are Unicode or $8$-bit +% internally.Parsing is therefore done by common functions, with the data +% storage usign engine-specific auxiliaries. +% +% Conversion of a codepoint to a character (Unicode engines) or to one +% or more bytes ($8$-bit engines) is required. We might need those to be +% detokenized: if not, for Unicode engines they have the current category +% code. % \begin{macrocode} \ior_new:N \g_@@_data_ior -\bool_lazy_or:nnTF { \sys_if_engine_luatex_p: } { \sys_if_engine_xetex_p: } - { - \group_begin: -% \end{macrocode} -% Access the primitive but suppress further expansion: active chars are -% otherwise an issue. -% \begin{macrocode} - \cs_set:Npn \@@_generate_char:n #1 - { \tex_detokenize:D \tex_expandafter:D { \tex_Uchar:D " #1 } } -% \end{macrocode} -% A fast local implementation for generating characters; the chars may -% be active, so we prevent further expansion. -% \begin{macrocode} - \cs_set:Npx \@@_generate:n #1 +\group_begin: + \bool_lazy_or:nnTF + { \sys_if_engine_luatex_p: } + { \sys_if_engine_xetex_p: } + { + \cs_set:Npn \@@_generate_other:n #1 + { \tex_detokenize:D \tex_expandafter:D { \tex_Uchar:D #1 } } + \cs_set:Npn \@@_generate:n #1 + { + \tex_unexpanded:D \exp_after:wN + { \tex_Ucharcat:D #1 ~ \tex_catcode:D #1 ~ } + } + } + { + \cs_set:Npn \@@_generate_other:n #1 + { + \tex_detokenize:D \tex_expandafter:D + { \tex_expanded:D { \@@_generate:n {#1} } } + } + \cs_set:Npn \@@_generate:n #1 { - \exp_not:N \tex_unexpanded:D \exp_not:N \exp_after:wN + \use:e { - \exp_not:N \tex_Ucharcat:D - #1 ~ - \tex_catcode:D #1 ~ + \exp_not:N \@@_generate:nnnn + \char_to_utfviii_bytes:n {#1} } - } + } + \cs_set:Npn \@@_generate:nnnn #1#2#3#4 + { + \tex_unexpanded:D \exp_after:wN \exp_after:wN \exp_after:wN + { \char_generate:nn {#1} { 13 } } + \tl_if_blank:nF {#2} + { + \tex_unexpanded:D \exp_after:wN \exp_after:wN \exp_after:wN + { \char_generate:nn {#2} { 13 } } + \tl_if_blank:nF {#3} + { + \tex_unexpanded:D \exp_after:wN \exp_after:wN \exp_after:wN + { \char_generate:nn {#3} { 13 } } + \tl_if_blank:nF {#4} + { + \tex_unexpanded:D + \exp_after:wN \exp_after:wN \exp_after:wN + { \char_generate:nn {#4} { 13 } } + } + } + } + } + } % \end{macrocode} % Parse the main Unicode data file for two things. First, we want the titlecase % exceptions: the one-to-one lower- and uppercase mappings it contains are all @@ -109,51 +145,52 @@ % just the canonical \textsc{nfd} mappings. Those all yield either one or two % codepoints, so the split is relatively easy. % \begin{macrocode} - \ior_open:Nn \g_@@_data_ior { UnicodeData.txt } - \cs_set_protected:Npn \@@_data_auxi:w - #1 ; #2 ; #3 ; #4 ; #5 ; #6 ; #7 ; #8 ; #9 ; + \cs_set_protected:Npn \@@_data_auxi:w + #1 ; #2 ; #3 ; #4 ; #5 ; #6 ; #7 ; #8 ; #9 ; + { + \tl_if_blank:nF {#6} { - \tl_if_blank:nF {#6} - { - \tl_if_head_eq_charcode:nNF {#6} < % > - { \@@_data_auxii:w #1 ; #6 ~ \q_stop } - } - \@@_data_auxiii:w #1 ; + \tl_if_head_eq_charcode:nNF {#6} < % > + { \@@_data_auxii:w #1 ; #6 ~ \q_stop } } - \cs_set_protected:Npn \@@_data_auxii:w #1 ; #2 ~ #3 \q_stop + \@@_data_auxiii:w #1 ; + } + \cs_set_protected:Npn \@@_data_auxii:w #1 ; #2 ~ #3 \q_stop + { + \tl_const:cx + { c_@@_nfd_ \@@_generate_other:n { "#1 } _tl } { - \tl_const:cx - { c_@@_nfd_ \@@_generate_char:n {#1} _tl } - { - \@@_generate:n { "#2 } - \tl_if_blank:nF {#3} - { \@@_generate:n { "#3 } } + { \@@_generate:n { "#2 } } + { + \tl_if_blank:nF {#3} + { \@@_generate:n { "#3 } } } } - \cs_set_protected:Npn \@@_data_auxiii:w - #1 ; #2 ; #3 ; #4 ; #5 ; #6 ; #7 ~ \q_stop - { - \cs_set_nopar:Npn \l_@@_tmpa_tl {#7} - \reverse_if:N \if_meaning:w \l_@@_tmpa_tl \c_empty_tl - \cs_set_nopar:Npn \l_@@_tmpb_tl {#5} - \reverse_if:N \if_meaning:w \l_@@_tmpa_tl \l_@@_tmpb_tl - \tl_const:cx - { c_@@_titlecase_ \@@_generate_char:n {#1} _tl } - { \@@_generate:n { "#7 } } - \fi: - \fi: - } - \group_begin: - \char_set_catcode_space:n { `\ }% - \ior_map_variable:NNn \g_@@_data_ior \l_@@_tmpa_tl - {% - \if_meaning:w \l_@@_tmpa_tl \c_space_tl - \exp_after:wN \ior_map_break: - \fi: - \exp_after:wN \@@_data_auxi:w \l_@@_tmpa_tl \q_stop - }% - \group_end: - \ior_close:N \g_@@_data_ior + } + \cs_set_protected:Npn \@@_data_auxiii:w + #1 ; #2 ; #3 ; #4 ; #5 ; #6 ; #7 ~ \q_stop + { + \cs_set_nopar:Npn \l_@@_tmpa_tl {#7} + \reverse_if:N \if_meaning:w \l_@@_tmpa_tl \c_empty_tl + \cs_set_nopar:Npn \l_@@_tmpb_tl {#5} + \reverse_if:N \if_meaning:w \l_@@_tmpa_tl \l_@@_tmpb_tl + \tl_const:cx + { c_@@_titlecase_ \@@_generate_other:n { "#1 } _tl } + { \@@_generate:n { "#7 } } + \fi: + \fi: + } + \ior_open:Nn \g_@@_data_ior { UnicodeData.txt } + \group_begin: + \char_set_catcode_space:n { `\ }% + \ior_map_variable:NNn \g_@@_data_ior \l_@@_tmpa_tl + {% + \if_meaning:w \l_@@_tmpa_tl \c_space_tl + \exp_after:wN \ior_map_break: + \fi: + \exp_after:wN \@@_data_auxi:w \l_@@_tmpa_tl \q_stop + }% + \group_end: % \end{macrocode} % The other data files all use C-style comments so we have to worry about % |#| tokens (and reading as strings). The set up for case folding is in two @@ -162,93 +199,140 @@ % always store the result, splitting up the two or three code points in the input % as required. % \begin{macrocode} - \ior_open:Nn \g_@@_data_ior { CaseFolding.txt } + \ior_open:Nn \g_@@_data_ior { CaseFolding.txt } + \cs_set_protected:Npn \@@_data_auxi:w #1 ;~ #2 ;~ #3 ; #4 \q_stop + { + \if:w \tl_head:n { #2 ? } C + \reverse_if:N \if_int_compare:w + \char_value_lccode:n {"#1} = "#3 ~ + \tl_const:cx + { c_@@_foldcase_ \@@_generate_other:n { "#1 } _tl } + { \@@_generate:n { "#3 } } + \fi: + \else: + \if:w \tl_head:n { #2 ? } F + \@@_data_auxii:w #1 ~ #3 ~ \q_stop + \fi: + \fi: + } + \bool_lazy_or:nnF + { \sys_if_engine_luatex_p: } + { \sys_if_engine_xetex_p: } + { \cs_set_protected:Npn \@@_data_auxi:w #1 ;~ #2 ;~ #3 ; #4 \q_stop { - \if:w \tl_head:n { #2 ? } C - \reverse_if:N \if_int_compare:w - \char_value_lccode:n {"#1} = "#3 ~ - \tl_const:cx - { c_@@_foldcase_ \@@_generate_char:n {#1} _tl } - { \@@_generate:n { "#3 } } - \fi: - \else: - \if:w \tl_head:n { #2 ? } F - \@@_data_auxii:w #1 ~ #3 ~ \q_stop - \fi: + \if:w \tl_head:n { #2 ? } F + \@@_data_auxii:w #1 ~ #3 ~ \q_stop \fi: } - \cs_set_protected:Npn \@@_data_auxii:w #1 ~ #2 ~ #3 ~ #4 \q_stop + } + \cs_set_protected:Npn \@@_data_auxii:w #1 ~ #2 ~ #3 ~ #4 \q_stop + { + \tl_const:cx { c_@@_foldcase_ \@@_generate_other:n { "#1 } _tl } { - \tl_const:cx { c_@@_foldcase_ \@@_generate_char:n {#1} _tl } - { - \@@_generate:n { "#2 } - \@@_generate:n { "#3 } - \tl_if_blank:nF {#4} - { \@@_generate:n { \int_value:w "#4 } } - } - } - \ior_str_map_inline:Nn \g_@@_data_ior - { - \reverse_if:N \if:w \c_hash_str \tl_head:w #1 \c_hash_str \q_stop - \@@_data_auxi:w #1 \q_stop - \fi: + \@@_generate:n { "#2 } + \@@_generate:n { "#3 } + \tl_if_blank:nF {#4} + { \@@_generate:n { \int_value:w "#4 } } } - \ior_close:N \g_@@_data_ior + } + \ior_str_map_inline:Nn \g_@@_data_ior + { + \reverse_if:N \if:w \c_hash_str \tl_head:w #1 \c_hash_str \q_stop + \@@_data_auxi:w #1 \q_stop + \fi: + } + \ior_close:N \g_@@_data_ior % \end{macrocode} % For upper- and lowercasing special situations, there is a bit more to % do as we also have title casing to consider, plus we need to stop part-way % through the file. % \begin{macrocode} - \ior_open:Nn \g_@@_data_ior { SpecialCasing.txt } - \cs_set_protected:Npn \@@_data_auxi:w - #1 ;~ #2 ;~ #3 ;~ #4 ; #5 \q_stop + \ior_open:Nn \g_@@_data_ior { SpecialCasing.txt } + \cs_set_protected:Npn \@@_data_auxi:w + #1 ;~ #2 ;~ #3 ;~ #4 ; #5 \q_stop + { + \use:n { \@@_data_auxii:w #1 ~ lower ~ #2 ~ } ~ \q_stop + \use:n { \@@_data_auxii:w #1 ~ upper ~ #4 ~ } ~ \q_stop + \str_if_eq:nnF {#3} {#4} + { \use:n { \@@_data_auxii:w #1 ~ title ~ #3 ~ } ~ \q_stop } + } + \cs_set_protected:Npn \@@_data_auxii:w + #1 ~ #2 ~ #3 ~ #4 ~ #5 \q_stop + { + \tl_if_empty:nF {#4} { - \use:n { \@@_data_auxii:w #1 ~ lower ~ #2 ~ } ~ \q_stop - \use:n { \@@_data_auxii:w #1 ~ upper ~ #4 ~ } ~ \q_stop - \str_if_eq:nnF {#3} {#4} - { \use:n { \@@_data_auxii:w #1 ~ title ~ #3 ~ } ~ \q_stop } - } - \cs_set_protected:Npn \@@_data_auxii:w - #1 ~ #2 ~ #3 ~ #4 ~ #5 \q_stop - { - \tl_if_empty:nF {#4} + \tl_const:cx { c_@@_ #2 case_ \@@_generate_other:n { "#1 } _tl } { - \tl_const:cx { c_@@_ #2 case_ \@@_generate_char:n {#1} _tl } - { - \@@_generate:n { "#3 } - \@@_generate:n { "#4 } - \tl_if_blank:nF {#5} - { \@@_generate:n { "#5 } } - } + \@@_generate:n { "#3 } + \@@_generate:n { "#4 } + \tl_if_blank:nF {#5} + { \@@_generate:n { "#5 } } } } - \ior_str_map_inline:Nn \g_@@_data_ior + } + \ior_str_map_inline:Nn \g_@@_data_ior + { + \str_if_eq:eeTF { \tl_head:w #1 \c_hash_str \q_stop } { \c_hash_str } { - \str_if_eq:eeTF - { \tl_head:w #1 \c_hash_str \q_stop } - { \c_hash_str } + \str_if_eq:eeT + {#1} + { \c_hash_str \c_space_tl Conditional~Mappings } + { \ior_map_break: } + } + { \@@_data_auxi:w #1 \q_stop } + } + \ior_close:N \g_@@_data_ior +\group_end: + +% \end{macrocode} +% +% \begin{macrocode} +%<@@=text> +% \end{macrocode} +% +% Read the Unicode grapheme data. This is quite easy to handle and we only need +% codepoints, not characters, so there is no need to worry about the engine in use. +% As reading as a string is most convenient, we have to do some work to remove +% spaces: the hardest part of the entire process! +% \begin{macrocode} +\ior_new:N \g_@@_data_ior +\group_begin: + \ior_open:Nn \g_@@_data_ior { GraphemeBreakProperty.txt } + \cs_set_nopar:Npn \l_@@_tmpa_str { } + \cs_set_nopar:Npn \l_@@_tmpb_str { } + \cs_set_protected:Npn \@@_data_auxi:w #1 ;~ #2 ~ #3 \q_stop + { + \str_if_eq:VnF \l_@@_tmpb_str {#2} + { + \str_if_empty:NF \l_@@_tmpb_str { - \str_if_eq:eeT - {#1} - { \c_hash_str \c_space_tl Conditional~Mappings } - { \ior_map_break: } + \clist_const:cx { c_@@_grapheme_ \l_@@_tmpb_str _clist } + { \exp_after:wN \use_none:n \l_@@_tmpa_str } + \cs_set_nopar:Npn \l_@@_tmpa_str { } } + \cs_set_nopar:Npn \l_@@_tmpb_str {#2} + } + \@@_data_auxii:w #1 .. #1 .. #1 \q_stop + } + \cs_set_protected:Npn \@@_data_auxii:w #1 .. #2 .. #3 \q_stop + { + \cs_set_nopar:Npx \l_@@_tmpa_str + { + \l_@@_tmpa_str , + \tl_trim_spaces:n {#1} .. \tl_trim_spaces:n {#2} + } + } + \ior_str_map_inline:Nn \g_@@_data_ior + { + \str_if_eq:eeF { \tl_head:w #1 \c_hash_str \q_stop } { \c_hash_str } + { + \tl_if_blank:nF {#1} { \@@_data_auxi:w #1 \q_stop } } - \ior_close:N \g_@@_data_ior - \group_end: - } -% \end{macrocode} -% For the $8$-bit engines, open the stream and close again: this keeps -% file records the same. -% \begin{macrocode} - { - \group_begin: - \ior_open:Nn \g_@@_data_ior { UnicodeData.txt } - \ior_close:N \g_@@_data_ior - \group_end: - } + } + \ior_close:N \g_@@_data_ior +\group_end: % \end{macrocode} % % \begin{macrocode} diff --git a/macros/latex/contrib/l3kernel/source3.pdf b/macros/latex/contrib/l3kernel/source3.pdf Binary files differindex 3d3159d396..d262f0d76f 100644 --- a/macros/latex/contrib/l3kernel/source3.pdf +++ b/macros/latex/contrib/l3kernel/source3.pdf diff --git a/macros/latex/contrib/l3kernel/source3.tex b/macros/latex/contrib/l3kernel/source3.tex index 587253a1e3..090cb47785 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 2022-08-23} +\date{Released 2022-08-30} \pagenumbering{roman} \maketitle diff --git a/macros/latex/contrib/l3kernel/source3body.tex b/macros/latex/contrib/l3kernel/source3body.tex index 20e1875361..c9b0f3448d 100644 --- a/macros/latex/contrib/l3kernel/source3body.tex +++ b/macros/latex/contrib/l3kernel/source3body.tex @@ -589,6 +589,7 @@ used on top of \LaTeXe{} if \cs{outer} tokens are used in the arguments. \clist_gput_right:Nn \g_docinput_clist { l3text-case.dtx , + l3text-map.dtx , l3text-purify.dtx } \ExplSyntaxOff diff --git a/macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdf b/macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdf Binary files differindex c7be00aa75..51a9574018 100644 --- a/macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdf +++ b/macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdf diff --git a/macros/latex/contrib/profcollege/latex/ProfCollege.sty b/macros/latex/contrib/profcollege/latex/ProfCollege.sty index 7277b9fc58..9636b935d4 100644 --- a/macros/latex/contrib/profcollege/latex/ProfCollege.sty +++ b/macros/latex/contrib/profcollege/latex/ProfCollege.sty @@ -2,9 +2,9 @@ % licence : Released under the LaTeX Project Public License v1.3c % or later, see http://www.latex-project.org/lppl.txtf \NeedsTeXFormat{LaTeX2e}% -\def\filedate{2022/08/25}% +\def\filedate{2022/08/30}% \let\PfCfiledate\filedate% -\def\fileversion{0.99-w}% +\def\fileversion{0.99-y}% \let\PfCfileversion\fileversion% \ProvidesPackage{ProfCollege}[\filedate\space v\fileversion\space Aide pour utiliser LaTeX au college] @@ -347,6 +347,306 @@ } %%% +% Shikaku +%%% +\newcounter{PfCShikakuNom} +\setcounter{PfCShikakuNom}{0} + +\setKVdefault[Shikaku]{Couleur=Purple,Taille=4,Largeur=2em,Solution=false,CodeAfter={},Creation=false,TailleHor=10,TailleVer=10,TailleHorMax=5,TailleVerMax=5,Nom=Shikaku\PfCShikakuNom} + +\newlength\PfCShikakuh +\newlength\PfCShikakuv + +\NewDocumentCommand\Shikaku{o m}{% + \stepcounter{PfCShikakuNom}% + \useKVdefault[Shikaku]% + \setKV[Shikaku]{#1}% + \ifboolKV[Shikaku]{Creation}{% + \ifluatex\else\PackageWarning{ProfCollege}{La création automatique de Shikaku n'est disponible qu'avec LuaLaTeX.}\fi% + \ifboolKV[Shikaku]{Solution}{% + \ShikakuCreationSolution% + }{% + \ShikakuCreation% + }% + }{% + \setlength{\PfCShikakuv}{\useKV[Shikaku]{Largeur}+\tabcolsep}% + \setlength{\PfCShikakuh}{\useKV[Shikaku]{Largeur}}% + \colorlet{PfCCouleurShikaku}{\useKV[Shikaku]{Couleur}}% + \setsepchar[*]{,*/}% + \readlist*\ListeCasesSKK{#2}% + \savecomparemode% + \comparestrict% + \begin{NiceTabular}{*{\useKV[Shikaku]{Taille}}{m{\PfCShikakuh}}}[hvlines] + \xintFor* ##1 in {\xintSeq{0}{\fpeval{\useKV[Shikaku]{Taille}-1}}}\do{% + \xintFor* ##2 in {\xintSeq{1}{\useKV[Shikaku]{Taille}}}\do{% + \rule{0pt}{\PfCShikakuv}% + \StrCompare{\ListeCasesSKK[\fpeval{\useKV[Shikaku]{Taille}*##1+##2},1]}{b}[\PfCTestb]% + \StrCompare{\ListeCasesSKK[\fpeval{\useKV[Shikaku]{Taille}*##1+##2},1]}{l}[\PfCTestl]% + \StrCompare{\ListeCasesSKK[\fpeval{\useKV[Shikaku]{Taille}*##1+##2},1]}{lb}[\PfCTestlb]% + \xintifboolexpr{\PfCTestb==0}{% + \ifboolKV[Shikaku]{Solution}{% + \Block[borders={bottom,tikz=PfCCouleurShikaku},line-width=2pt]{1-1}{% + \ListeCasesSKK[\fpeval{\useKV[Shikaku]{Taille}*##1+##2},2]% + }% + }{% + \Block[]{1-1}{% + \ListeCasesSKK[\fpeval{\useKV[Shikaku]{Taille}*##1+##2},2]% + }% + }% + }{% Testl + \xintifboolexpr{\PfCTestl==0}{% + \ifboolKV[Shikaku]{Solution}{% + \Block[borders={left,tikz=PfCCouleurShikaku},line-width=2pt]{1-1}{% + \ListeCasesSKK[\fpeval{\useKV[Shikaku]{Taille}*##1+##2},2]% + }% + }{% + \Block[]{1-1}{% + \ListeCasesSKK[\fpeval{\useKV[Shikaku]{Taille}*##1+##2},2]% + }% + }% + }{% Testlb + \xintifboolexpr{\PfCTestlb==0}{% + \ifboolKV[Shikaku]{Solution}{% + \Block[borders={left,bottom,tikz=PfCCouleurShikaku},line-width=2pt]{1-1}{% + \ListeCasesSKK[\fpeval{\useKV[Shikaku]{Taille}*##1+##2},2]% + }% + }{% + \Block[]{1-1}{% + \ListeCasesSKK[\fpeval{\useKV[Shikaku]{Taille}*##1+##2},2]% + }% + }% + }{% + \Block[]{1-1}{% + \ListeCasesSKK[\fpeval{\useKV[Shikaku]{Taille}*##1+##2},2]% + }% + }% + }% + }% + \xintifForLast{\\}{&}% + }% + }% + \CodeAfter% + \useKV[Shikaku]{CodeAfter}% + \ifboolKV[Shikaku]{Solution}{% + \tikz\draw[line width=2pt,PfCCouleurShikaku] (1-|1) rectangle (last-|last);% + }{}% + \end{NiceTabular}% + \restorecomparemode% + }% +}% + +\NewDocumentCommand\ShikakuCreation{}{% + \ifluatex% + \mplibforcehmode + \xdef\PfCNomShikaku{\useKV[Shikaku]{Nom}}% + \begin{mplibcode}[\PfCNomShikaku]% + Taillehor=\useKV[Shikaku]{TailleHor}; + Taillever=\useKV[Shikaku]{TailleVer}; + + TailleMaxh=\useKV[Shikaku]{TailleHorMax}; + TailleMaxv=\useKV[Shikaku]{TailleVerMax}; + + u:=5mm; + + path R[],S[],RIso[],SIso[]; + numeric RAire[],SAire[]; + numeric RHor[],RVer[],SHor[],SVer[],RAngle[],SAngle[]; + + vardef RetiensLesInfosGenerales(expr depart,Lhor,Lver)= + R[k]:=polygone(depart,depart+u*(Lhor,0),depart+u*(Lhor,-Lver),depart+u*(0,-Lver)); + RIso[k]=iso(depart,depart+u*(Lhor,0),depart+u*(Lhor,-Lver),depart+u*(0,-Lver)); + RHor[k]=Lhor; + RVer[k]=Lver; + RAire[k]=Lhor*Lver; + RAngle[k]=ANGLE; + enddef; + + vardef RetiensLesInfosPourLaSuite(expr depart,Lhor,Lver)= + if Lver>0: + S[k]=polygone(depart,depart+u*(Lhor,0),depart+u*(Lhor,-Lver),depart+u*(0,-Lver)); + SIso[k]=iso(depart,depart+u*(Lhor,0),depart+u*(Lhor,-Lver),depart+u*(0,-Lver)); + SHor[k]=Lhor; + SVer[k]=Lver; + SAire[k]=Lhor*Lver; + SAngle[k]=ANGLE; + fi; + enddef; + + vardef RectangleAuto(expr aa,bb)= + save $; + path $; + $=polygone(aa,aa+(xpart(bb-aa),0),bb,bb-(xpart(bb-aa),0)); + $ + enddef; + + pair T[]; + + pair A[],B[]; + + A1=u*(0,Taillever); + A2-A1=u*(Taillehor,0); + A4=(0,0); + A3-A4=A2-A1; + + nbh=Taillehor div TailleMaxh; + nbv=Taillever div TailleMaxv; + + p:=0; + for l=0 upto nbv: + for k=0 upto nbh: + p:=p+1; + T[p]=A1+u*(k*TailleMaxh,-l*TailleMaxv); + if k<nbh: + Hor[p]=TailleMaxh; + else: + Hor[p]=Taillehor mod TailleMaxh; + fi; + if l<nbv: + Ver[p]=TailleMaxv; + else: + Ver[p]=Taillever mod TailleMaxv; + fi; + endfor; + endfor; + + Total:=p; + + vardef DecomposeUnRectangle(expr BASEA,THOR,TVER)= + TMAXV:=TVER; + pair BBASEA; + BTHOR:=THOR; + BTVER:=TVER; + BBASEA:=BASEA; + forever: + k:=k+1; + hor:=floor(1+uniformdeviate(BTHOR)); + ver:=floor(1+uniformdeviate(BTVER)); + RetiensLesInfosGenerales(BBASEA,hor,ver); + RetiensLesInfosPourLaSuite(BBASEA+u*(0,-ver),hor,TMAXV-ver); + BTHOR:=BTHOR-hor; + BTVER:=ver; + BBASEA:=BBASEA+u*(hor,0); + exitif BTHOR<1; + endfor; + enddef; + + k=0; + for l=1 upto Total: + if uniformdeviate(1)>0.5: + Angle[l]=180; + ANGLE:=Angle[l]; + else: + Angle[l]=0; + ANGLE:=Angle[l]; + fi; + DecomposeUnRectangle(T[l],Hor[l],Ver[l]); + endfor; + Totalk=k; + + picture RTEXT[],STEXT[]; + + drawoptions(withpen pencircle scaled 2); + for n=1 upto Totalk: + trace R[n] withcolor white; + RTEXT[n]=image( + label(decimal(RAire[n]),(0,0)); + ); + RTEXT[n]:=image( + trace rotation(RTEXT[n],center RTEXT[n],RAngle[n]) shifted ((point(0) of R[n]) shifted(u*(0.5+floor(uniformdeviate(RHor[n])),-0.5-floor(uniformdeviate(RVer[n]))))); + ); + trace RTEXT[n]; + endfor; + for n=1 upto Totalk: + if unknown S[n]: + else: + trace S[n] withcolor white; + STEXT[n]=image( + label(decimal(SAire[n]),(0,0)); + ); + STEXT[n]:=image( + trace rotation(STEXT[n],center STEXT[n],SAngle[n]) shifted ((point(0) of S[n]) shifted(u*(0.5+floor(uniformdeviate(SHor[n])),-0.5-floor(uniformdeviate(SVer[n]))))); + ); + trace STEXT[n]; + fi; + endfor; + clip currentpicture to polygone(A1,A2,A3,A4); + + picture CasesAvant[],CasesApres[]; + CasesAvant[0]=currentpicture; + + currentpicture:=nullpicture; + + drawoptions(withpen pencircle scaled 2); + for n=1 upto Totalk: + trace R[n]; + trace RTEXT[n]; + endfor; + for n=1 upto Totalk: + if unknown S[n]: + else: + trace S[n]; + trace STEXT[n]; + fi; + endfor; + clip currentpicture to polygone(A1,A2,A3,A4); + CasesApres[0]:=currentpicture; + + currentpicture:=nullpicture; + + for l=1 upto Total: + CasesAvant[l]=image(% + trace CasesAvant[0]; + clip currentpicture to polygone(T[l],T[l]+u*(Hor[l],0),T[l]+u*(Hor[l],-Ver[l]),T[l]+u*(0,-Ver[l])); + ); + currentpicture:=nullpicture; + CasesApres[l]=image( + trace CasesApres[0]; + clip currentpicture to polygone(T[l],T[l]+u*(Hor[l],0),T[l]+u*(Hor[l],-Ver[l]),T[l]+u*(0,-Ver[l])); + ); + currentpicture:=nullpicture; + endfor; + + for l=1 upto Total: + trace rotation(CasesAvant[l],center CasesAvant[l],Angle[l]); + endfor; + + drawoptions(withpen pencircle scaled 2); + trace RectangleAuto(A1,A3); + drawoptions(); + for k=1 upto Taillehor-1: + trace (k/Taillehor)[A4,A3]--(k/Taillehor)[A1,A2]; + endfor; + + for k=1 upto Taillever-1: + trace (k/Taillever)[A4,A1]--(k/Taillever)[A3,A2]; + endfor; + \end{mplibcode} + \fi% +}% + +\NewDocumentCommand\ShikakuCreationSolution{}{% + \ifluatex% + \mplibforcehmode + \xdef\PfCNomShikaku{\useKV[Shikaku]{Nom}}% + \begin{mplibcode}[\PfCNomShikaku]% + for l=1 upto Total: + trace rotation(CasesApres[l],center CasesApres[l],Angle[l]); + endfor; + drawoptions(withpen pencircle scaled 2); + trace RectangleAuto(A1,A3); + drawoptions(); + for k=1 upto Taillehor-1: + trace (k/Taillehor)[A4,A3]--(k/Taillehor)[A1,A2]; + endfor; + + for k=1 upto Taillever-1: + trace (k/Taillever)[A4,A1]--(k/Taillever)[A3,A2]; + endfor; + \end{mplibcode} + \fi% +}% + +%%% % Kakuro %%% \setKVdefault[Kakuro]{CouleurCase=LightGray,Taille=5,Solution=false,Largeur=2em,Aide=false,CouleurSolution=Black} @@ -626,7 +926,7 @@ %%% % Yohaku %%% -\setKVdefault[Yohaku]{Taille=2,Largeur=1cm,Hauteur=1cm,Addition,Multiplication=false,Perso=false,Limite=50,Pair=false,Impair=false,Premier=false,Solution=false,Visible=false,Bordure=false,CouleurResultat=gray!15,Ligne=0,Colonne=0,PasL=0,PasC=0,CouleurZone=gray!25}% +\setKVdefault[Yohaku]{Taille=2,Largeur=1cm,Hauteur=1cm,Addition,Multiplication=false,Perso=false,Limite=50,Relatif=false,Negatif=false,Pair=false,Impair=false,Premier=false,Solution=false,Visible=false,Bordure=false,CouleurResultat=gray!15,Ligne=0,Colonne=0,PasL=0,PasC=0,CouleurZone=gray!25}% \defKV[Yohaku]{Case=\setKV[Yohaku]{Visible}}% \newlength\PfCYohaku% @@ -640,6 +940,10 @@ \xdef\PfCYHKnombre{1}% \xdef\PfCYHKpair{2}% \xdef\PfCYHKimpair{1}% + \xdef\PfCYHKnegatif{}% + \xintFor* ##1 in{\xintSeq{2}{\fpeval{\useKV[Yohaku]{Limite}}}}\do{% + \xdef\PfCYHKnegatif{\PfCYHKnegatif -##1,}% + }% \xintFor* ##1 in{\xintSeq{2}{\fpeval{\useKV[Yohaku]{Limite}}}}\do{% \xdef\PfCYHKnombre{\PfCYHKnombre,##1}% }% @@ -649,7 +953,7 @@ \xintFor* ##1 in{\xintSeq{1}{\fpeval{\useKV[Yohaku]{Limite}}}}\do{% \xdef\PfCYHKimpair{\PfCYHKimpair,\fpeval{##1*2+1}}% }% - % + % \ifboolKV[Yohaku]{Perso}{% \setsepchar[*]{,*/}\ignoreemptyitems% \readlist*\PfCYHKListe{#2}% @@ -660,40 +964,62 @@ }% \ignoreemptyitems\readlist*\PfCYHKListeNA{\PfCYHKListeFoo}% \xdef\PfCYHKListeFoo{}% - \foreachitem\compteur\in\PfCYHKListe[2]{ + \foreachitem\compteur\in\PfCYHKListe[2]{% \xdef\PfCYHKListeFoo{\PfCYHKListeFoo \PfCYHKListe[2,\compteurcnt],}% }% \ignoreemptyitems\readlist*\PfCYHKListeP{\PfCYHKListeFoo}% }{% - \ifboolKV[Yohaku]{Premier}{% - \xdef\PfCYHKListe{\PfCYHKpremier}% + \ifboolKV[Yohaku]{Negatif}{% + \xdef\PfCYHKListe{\PfCYHKnegatif}% }{% - \ifboolKV[Yohaku]{Impair}{% - \xdef\PfCYHKListe{\PfCYHKimpair}% + \ifboolKV[Yohaku]{Premier}{% + \xdef\PfCYHKListe{\PfCYHKpremier}% }{% - \ifboolKV[Yohaku]{Pair}{% - \xdef\PfCYHKListe{\PfCYHKpair}% + \ifboolKV[Yohaku]{Impair}{% + \xdef\PfCYHKListe{\PfCYHKimpair}% }{% - \xdef\PfCYHKListe{\PfCYHKnombre}% + \ifboolKV[Yohaku]{Pair}{% + \xdef\PfCYHKListe{\PfCYHKpair}% + }{% + \xdef\PfCYHKListe{\PfCYHKnombre}% + }% }% }% }% - % \xintifboolexpr{\useKV[Yohaku]{Taille}==2}{\MelangeListe{\PfCYHKListe}{4}}{\MelangeListe{\PfCYHKListe}{9}}% - \MelangeListe{\PfCYHKListe}{\fpeval{\useKV[Yohaku]{Taille}**2}}% + \ifboolKV[Yohaku]{Relatif}{% + \xdef\PfCMoitieCase{\fpeval{floor((\useKV[Yohaku]{Taille}**2)/2)}}% + \xdef\PfCAutreMoitieCase{\fpeval{\useKV[Yohaku]{Taille}**2-\PfCMoitieCase}}% + \xdef\PfCFooRelatifYohaku{}% + \xdef\PfCYohakuAlea{\fpeval{randint(1,2)}}% + \xintifboolexpr{\PfCYohakuAlea==1}{% on choisit M1 négatifs, M2 positifs + \MelangeListe{\PfCYHKnegatif}{\PfCMoitieCase}% + \xdef\PfCYohakuInter{\faa}% + \MelangeListe{\PfCYHKnombre}{\PfCAutreMoitieCase}% + \xdef\PfCYohakuInter{\PfCYohakuInter,\faa}% + }{% on choisit M1 positifs, M2 négatifs + \MelangeListe{\PfCYHKnombre}{\PfCMoitieCase}% + \xdef\PfCYohakuInter{\faa}% + \MelangeListe{\PfCYHKnegatif}{\PfCAutreMoitieCase}% + \xdef\PfCYohakuInter{\PfCYohakuInter,\faa}% + }% + \MelangeListe{\PfCYohakuInter}{\fpeval{\useKV[Yohaku]{Taille}**2}}% + }{% + \MelangeListe{\PfCYHKListe}{\fpeval{\useKV[Yohaku]{Taille}**2}}% + }% \ignoreemptyitems\readlist*\PfCYHKListeNA{\faa}% %Sommes/Produits - \xdef\PfCYHKListeProduit{} + \xdef\PfCYHKListeProduit{}% %verticaux \xintFor* ##2 in {\xintSeq{1}{\fpeval{\useKV[Yohaku]{Taille}}}}\do{% \ifboolKV[Yohaku]{Multiplication}{% \xdef\PfCYHKTampon{1}% \xintFor* ##1 in {\xintSeq{0}{\fpeval{\useKV[Yohaku]{Taille}-1}}}\do{% - \xdef\PfCYHKTampon{\fpeval{\PfCYHKTampon*\PfCYHKListeNA[\fpeval{##2+##1*\useKV[Yohaku]{Taille}}]}} + \xdef\PfCYHKTampon{\fpeval{\PfCYHKTampon*\PfCYHKListeNA[\fpeval{##2+##1*\useKV[Yohaku]{Taille}}]}}% }% }{% \xdef\PfCYHKTampon{0}% \xintFor* ##1 in {\xintSeq{0}{\fpeval{\useKV[Yohaku]{Taille}-1}}}\do{% - \xdef\PfCYHKTampon{\fpeval{\PfCYHKTampon+\PfCYHKListeNA[\fpeval{##2+##1*\useKV[Yohaku]{Taille}}]}} + \xdef\PfCYHKTampon{\fpeval{\PfCYHKTampon+\PfCYHKListeNA[\fpeval{##2+##1*\useKV[Yohaku]{Taille}}]}}% }% }% \xdef\PfCYHKListeProduit{\PfCYHKListeProduit,\PfCYHKTampon}% @@ -703,21 +1029,21 @@ \ifboolKV[Yohaku]{Multiplication}{% \xdef\PfCYHKTampon{1}% \xintFor* ##1 in {\xintSeq{1}{\fpeval{\useKV[Yohaku]{Taille}}}}\do{% - \xdef\PfCYHKTampon{\fpeval{\PfCYHKTampon*\PfCYHKListeNA[\fpeval{(\useKV[Yohaku]{Taille}-##2)*\useKV[Yohaku]{Taille}+##1}]}} + \xdef\PfCYHKTampon{\fpeval{\PfCYHKTampon*\PfCYHKListeNA[\fpeval{(\useKV[Yohaku]{Taille}-##2)*\useKV[Yohaku]{Taille}+##1}]}}% }% }{% \xdef\PfCYHKTampon{0}% \xintFor* ##1 in {\xintSeq{1}{\fpeval{\useKV[Yohaku]{Taille}}}}\do{% - \xdef\PfCYHKTampon{\fpeval{\PfCYHKTampon+\PfCYHKListeNA[\fpeval{(\useKV[Yohaku]{Taille}-##2)*\useKV[Yohaku]{Taille}+##1}]}} + \xdef\PfCYHKTampon{\fpeval{\PfCYHKTampon+\PfCYHKListeNA[\fpeval{(\useKV[Yohaku]{Taille}-##2)*\useKV[Yohaku]{Taille}+##1}]}}% }% }% \xdef\PfCYHKListeProduit{\PfCYHKListeProduit,\PfCYHKTampon}% }% - \readlist*\PfCYHKListeP{\PfCYHKListeProduit} + \readlist*\PfCYHKListeP{\PfCYHKListeProduit}% }% \setlength{\PfCYohaku}{\useKV[Yohaku]{Largeur}-\tabcolsep}% - \colorlet{PfCFondYohaku}{\useKV[Yohaku]{CouleurResultat}} - \colorlet{PfCZoneYohaku}{\useKV[Yohaku]{CouleurZone}} + \colorlet{PfCFondYohaku}{\useKV[Yohaku]{CouleurResultat}}% + \colorlet{PfCZoneYohaku}{\useKV[Yohaku]{CouleurZone}}% \begin{NiceTabular}{*{\fpeval{\useKV[Yohaku]{Taille}+1}}{m{\PfCYohaku}}}[hvlines-except-borders] \CodeBefore \xintifboolexpr{\useKV[Yohaku]{Ligne}==0 || \useKV[Yohaku]{Colonne}==0}{}{% @@ -788,27 +1114,93 @@ %%% % Rose %%% -\setKVdefault[ClesRose]{Vide=false,Couleur=white,Produits=false,Solution=false,Rayon=2cm,Petales=7,Aide=false,FacteurMin=2,FacteurMax=10,ProduitVide=false,CaseVide=false,Polygone=false}% +\setKVdefault[ClesRose]{Vide=false,Couleur=white,Produits=false,Solution=false,Rayon=2cm,Petales=7,Aide=false,FacteurMin=2,FacteurMax=10,ProduitVide=false,CaseVide=false,Polygone=false,Nom=Rose1}% \NewDocumentCommand\RoseMul{o}{% \useKVdefault[ClesRose]% \setKV[ClesRose]{#1}% + \ifluatex% + \ifboolKV[ClesRose]{Solution}{% + \DessineRoseMulSol% + }{% + \DessineRoseMul% + }% + \else% \DessineRoseMul% + \fi% }% +\newcommand\DessineRoseMulSol{% + \ifluatex% + \mplibforcehmode% + \xdef\PfCNomRose{\useKV[ClesRose]{Nom}}% + \begin{mplibcode}[\PfCNomRose] + boolean Aide,Produits,Solution,Vide,ProduitVide,CaseVide,Polygone; + Aide:=\useKV[ClesRose]{Aide}; + Vide:=\useKV[ClesRose]{Vide}; + Solution:=\useKV[ClesRose]{Solution}; + Produits:=\useKV[ClesRose]{Produits}; + ProduitVide:=\useKV[ClesRose]{ProduitVide}; + CaseVide:=\useKV[ClesRose]{CaseVide}; + if ProduitVide:Solution:=true fi; + if CaseVide:Solution:=true fi; + % on labelise + if Vide=false: + if Produits: + else: + for k=0 upto Petales-1: + label(TEX("\num{"&decimal(Facteur[k])&"}"),(0.5[O,A[k]]-center BoiteRec)); + endfor; + fi; + if Produits or Solution: + for k=0 upto Petales-1: + label(TEX("\num{"&decimal(Produit[k])&"}"),(B[k]+0.5*Rayon*unitvector(B[k]))); + endfor; + fi; + fi; + % On trace et on affiche...éventuellement :) + if Aide: + for k=0 upto Petales-1: + drawarrow (0.5[O,A[k]]--1.75[O,B[k]]) cutbefore segment(A[k],A[k+1]) cutafter BoiteRec shifted (B[k]+0.5*Rayon*unitvector(B[k])) dashed evenly scaled 0.5; + drawarrow (0.5[O,A[k+1]]--1.75[O,B[k]]) cutbefore segment(A[k],A[k+1]) cutafter BoiteRec shifted (B[k]+0.5*Rayon*unitvector(B[k])) dashed evenly scaled 0.5; + endfor; + fi; + if ProduitVide: + %choix=floor(uniformdeviate(Petales-1)); + fill (BoiteRec shifted (1.75[O,B[choix]]-center BoiteRec)) withcolor Fond; + fill rotation(polygone(O,B0,A1,B1),O,(choix-1)*(360/Petales)) withcolor Fond; + fill rotation(polygone(O,B0,A1,B1),O,choix*(360/Petales)) withcolor Fond; + fi; + if CaseVide: + %choix:=floor(uniformdeviate(Petales-1)); + for k=0 upto Petales-1: + if k<>choix: + fill rotation(polygone(O,B0,A1,B1),O,k*(360/Petales)) withcolor Fond; + fi; + endfor; + fi; + trace A0 for k=1 upto Petales:--A[k] endfor --cycle; + for k=0 upto Petales-1: + trace segment(O,B[k]) dashed withdots scaled 0.25; + draw BoiteRec shifted (B[k]+0.5*Rayon*unitvector(B[k])) dashed evenly scaled 0.5; + endfor; + \end{mplibcode} + \fi +} \newcommand\DessineRoseMul{% \ifluatex% \mplibforcehmode% - \begin{mplibcode} + \xdef\PfCNomRose{\useKV[ClesRose]{Nom}}% + \begin{mplibcode}[\PfCNomRose] vardef ExtraireListe(expr nbmin,nbmax,nbfacteurs)= numeric ElementE[],ElementS[]; %% éléments d'entrée - nbe=1; + nbe:=1; for k=nbmin upto nbmax: ElementE[nbe]=k; nbe:=nbe+1; endfor; - totalE=(nbmax-nbmin)+1; + totalE:=(nbmax-nbmin)+1; numeric rec; for k=1 upto nbfacteurs: rec:=ceiling(uniformdeviate(totalE+1-k)); @@ -845,7 +1237,7 @@ color Fond; Fond:=\useKV[ClesRose]{Couleur}; O=(0,0); - ExtraireListe(FacteurMin,FacteurMax,Petales); + ExtraireListe(FacteurMin,FacteurMax,Petales); path cc; cc=cercles(O,Rayon); for k=0 upto Petales: @@ -862,11 +1254,11 @@ fi; %On détermine les facteurs et produits for k=0 upto Petales-1: - Facteur[k]=ElementS[k+1]; + Facteur[k]:=ElementS[k+1]; endfor; - Facteur[Petales]=Facteur[0]; + Facteur[Petales]:=Facteur[0]; for k=0 upto Petales-1: - Produit[k]=Facteur[k]*Facteur[k+1]; + Produit[k]:=Facteur[k]*Facteur[k+1]; endfor; %on labelise if Vide=false: @@ -890,7 +1282,7 @@ endfor; fi; if ProduitVide: - choix=floor(uniformdeviate(Petales-1)); + choix:=floor(uniformdeviate(Petales-1)); fill (BoiteRec shifted (1.75[O,B[choix]]-center BoiteRec)) withcolor Fond; fill rotation(polygone(O,B0,A1,B1),O,(choix-1)*(360/Petales)) withcolor Fond; fill rotation(polygone(O,B0,A1,B1),O,choix*(360/Petales)) withcolor Fond; @@ -983,12 +1375,12 @@ if Produits: else: for k=0 upto Petales-1: - label(TEX("\num{"&decimal(Facteur[k])&"}"),(0.5[O,A[k]]-center BoiteRec)); + label(LATEX("\num{"&decimal(Facteur[k])&"}"),(0.5[O,A[k]]-center BoiteRec)); endfor; fi; if Produits or Solution: for k=0 upto Petales-1: - label(TEX("\num{"&decimal(Produit[k])&"}"),(B[k]+0.5*Rayon*unitvector(B[k]))); + label(LATEX("\num{"&decimal(Produit[k])&"}"),(B[k]+0.5*Rayon*unitvector(B[k]))); endfor; fi; fi; @@ -4751,7 +5143,7 @@ transform canvas={xshift=0em,yshift=0em}},rectangle,rounded corners,ultra thick, %%% % Labyrinthe Nombre %%% -\setKVdefault[ClesLabyNb]{Multiple=5,XDepart=0,YDepart=0,Longueur=7,Largeur=4,XArrivee=6,YArrivee=3,Solution=false,Echelle=1,Angle=0,Couleur=red,Murs=false,Nom=Ex1,CouleurChemin=blue} +\setKVdefault[ClesLabyNb]{Multiple=5,XDepart=0,YDepart=0,Longueur=7,Largeur=4,XArrivee=6,YArrivee=3,Solution=false,Echelle=1,Angle=0,Couleur=red,Murs=false,Nom=Ex1,CouleurChemin=LightSteelBlue} \newcommand\LabyNombre[1][]{% \useKVdefault[ClesLabyNb]% @@ -6207,6 +6599,14 @@ couleur indiquée, le nombre de cases donné par le résultat du calcul. \newtcolorbox{CadreNombre}[1][]{% Expression,#1} +\newcommand\BoiteFlash[2][40pt]{% + \ifx\bla#2\bla% + \tcbox[BoiteExpression]{\hbox to#1{\phantom{A}}}% + \else + \tcbox[BoiteExpression]{#2}% + \fi +} + \setKVdefault[ClesFlash]{Hauteur=0.2\textheight,Simple=false,Intrus=false,Kahout=false,Daily=false,Expression=false,Mental=false,Mesure=false,Heure=false,Decimal=false,Operation=Multiplie,Numeration=false,Evaluation=false,Pause=false,Couleur1=blue!10,Couleur2=orange!10,Couleur3=green!10,Couleur4=yellow!10,Numerique=false,Seul=false} \newlength{\HauteurFlash} @@ -6528,13 +6928,7 @@ couleur indiquée, le nombre de cases donné par le résultat du calcul. \end{CadreNombre} } -\newcommand\BoiteFlash[1]{% - \ifx\bla#1\bla% - \tcbox[BoiteExpression]{\phantom{10000000}}% - \else - \tcbox[BoiteExpression]{#1}% - \fi -} + \newcommand\QFVide{% \begin{CadreNombre} @@ -7933,7 +8327,7 @@ couleur indiquée, le nombre de cases donné par le résultat du calcul. \newcounter{QuestionQCM}% \newcounter{TitreQCM}% \ifdef{\QCM}{% - \PackageWarning{ProfCollege}{La commande \noexpand\QCM étant définie par la classe du document, ProfCollege modifie sa commande \noexpand\QCM en \noexpand\QCMPfC.}% + \PackageWarning{ProfCollege}{La commande \noexpand\QCM étant définie par la classe du document, ProfCollege modifie sa commande \noexpand\QCM en \noexpand\QCMPfC.}% \newcommand\QCMPfC[2][]{% \useKVdefault[ClesQCM]% \setKV[ClesQCM]{#1}% @@ -8028,6 +8422,7 @@ couleur indiquée, le nombre de cases donné par le résultat du calcul. }% \hline% \end{tabular}% + \renewcommand{\arraystretch}{1}% }{% \ifboolKV[ClesQCM]{VF}{% \setKV[ClesQCM]{Reponses=2} @@ -8065,10 +8460,10 @@ couleur indiquée, le nombre de cases donné par le résultat du calcul. \end{tabular}% }% }% + \renewcommand{\arraystretch}{1}% }% } - %%% % Somme des angles %%% @@ -21046,12 +21441,14 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V %%% % Tableaux d'unit\'es %%% -\setKVdefault[ClesTableaux]{Virgule=true,Incline=false,Entiers=false,Decimaux=false,Milliards=false,Millions=false,Micro=false,Nano=false,Partie=false,CouleurG=gray!15,CouleurM=gray!15,Couleurm=gray!15,Couleuru=gray!15,Couleurd=gray!15,Classes=false,Nombres=false,Puissances=false,NbLignes=2,Metre=false,Are=false,Capacite=false,Carre=false,Cube=false,Litre=false,Gramme=false,Fleches=false,FlechesB=false,FlechesH=false,Colonnes=false,Prefixes=false,Escalier=false,Taille=5,Largeur=4.75em,Nom=PfCTableau,CodeAfter={}} +\setKVdefault[ClesTableaux]{Virgule=true,Incline=false,Entiers=false,Decimaux=false,Milliards=false,Millions=false,Micro=false,Nano=false,Partie=false,CouleurG=gray!15,CouleurM=gray!15,Couleurm=gray!15,Couleuru=gray!15,Couleurd=gray!15,Classes=false,Nombres=false,Puissances=false,NbLignes=2,Metre=false,Are=false,Capacite=false,Carre=false,Cube=false,Litre=false,Gramme=false,Fleches=false,FlechesB=false,FlechesH=false,Colonnes=false,Prefixes=false,Escalier=false,Taille=5,Largeur=4.75em,Nom=PfCTableau,CodeAfter={},PuissancesSeules=false,Colonne=-1} \newcommand\PfCTBstrut{\rule[-1.2ex]{0pt}{3.8ex}} % Top and Bottom strut \newcommand\PfCTstrut{\rule{0pt}{3.8ex}} % Top strut \newcommand\PfCBstrut{\rule[-1.2ex]{0pt}{0ex}} % Bottom strut +\newlength\PfCTableauPuissances% + \newcommand\Tableau[2][]{% \useKVdefault[ClesTableaux]% \setKV[ClesTableaux]{#1}% @@ -21222,9 +21619,7 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V }{}% }{}\\% }{}% - % %%% Prise en compte de la cl\'e Puissances - % \ifboolKV[ClesTableaux]{Puissances}{% \xdef\DecalageLigne{\fpeval{\DecalageLigne+1}}% \ifboolKV[ClesTableaux]{Milliards}{% @@ -21311,6 +21706,178 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V \setlength{\tabcolsep}{100\tabcolsep}% }{}% % + %%% Puissances seules + % + \ifboolKV[ClesTableaux]{PuissancesSeules}{% + \setlength{\PfCTableauPuissances}{3em}% + \xdef\DecalageLigne{0}% + \setlength{\tabcolsep}{0.01\tabcolsep}% + \begin{center}% + % + %%% Definition du tableau + % + \ifboolKV[ClesTableaux]{Milliards}{\xdef\PfCDerniereColonne{16}}{\ifboolKV[ClesTableaux]{Millions}{\xdef\PfCDerniereColonne{13}}{\xdef\PfCDerniereColonne{10}}}% + \begin{NiceTabular}{*{\ifboolKV[ClesTableaux]{Milliards}{12}{% + \ifboolKV[ClesTableaux]{Millions}{9}{6}% + }}{m{\PfCTableauPuissances}}>{\columncolor{gray!15}}{c}*{3}{m{\PfCTableauPuissances}}}% + \CodeBefore + \xintifboolexpr{\useKV[ClesTableaux]{Colonne}>0}{% + \tikz\fill[gray!15] (1-|\fpeval{\useKV[ClesTableaux]{Colonne}}) rectangle (last-|\fpeval{\useKV[ClesTableaux]{Colonne}+1}); + }{} + \Body + \hline + % + %%% Prise en compte de la cl\'e Partie +% % +% \ifboolKV[ClesTableaux]{Partie}{% +% \Block[]{1-% +% \ifboolKV[ClesTableaux]{Milliards}{12}{% +% \ifboolKV[ClesTableaux]{Millions}{9}{6}% +% }}{\bfseries Partie enti\`ere}\ifboolKV[ClesTableaux]{Milliards}{% +% &&&&&&% +% }{% +% \ifboolKV[ClesTableaux]{Millions}{% +% &&&% +% }{% +% }}% +% &&&&&% +% &\Block[fill=gray!15]{}{\ifboolKV[ClesTableaux]{Virgule}{,}{}}\xdef\DecalageLigne{\fpeval{\DecalageLigne+1}}%% +% &\Block[]{1-3}{\bfseries Partie d\'ecimale}% +% &&\\ +% }{}% +% % +% %%% Prise en compte de la cl\'e Classes +% % +% \ifboolKV[ClesTableaux]{Classes}{% +% \xdef\DecalageLigne{\fpeval{\DecalageLigne+1}}\ifboolKV[ClesTableaux]{Milliards}{\Block[draw,fill={\useKV[ClesTableaux]{CouleurG}}]{1-3}{Classe des milliards}&&&\Block[draw,fill={\useKV[ClesTableaux]{CouleurM}}]{1-3}{Classe des millions}&&&}{}% +% \ifboolKV[ClesTableaux]{Millions}{\Block[draw,fill={\useKV[ClesTableaux]{CouleurM}}]{1-3}{Classe des millions}&&&}{}% +% \Block[draw,fill={\useKV[ClesTableaux]{Couleurm}}]{1-3}{Classe des milliers}&&% +% &\Block[draw,fill={\useKV[ClesTableaux]{Couleuru}}]{1-3}{Classe des unités}&& +% &\Block[draw,fill=gray!15]{}{\ifboolKV[ClesTableaux]{Virgule}{,}{}}% +% &\Block[draw]{1-3}{}&&% +% \\ +% }{}% + % + %%% Valeurs ci-dessous par d\'efaut + % + %Affichage ou pas des noms ? +% \hline +% \ifboolKV[ClesTableaux]{Milliards}{% +% \Block[borders={left,right}]{}{\fontsize{5}{5}\selectfont centaines de milliards}% +% &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont dizaines de milliards}% +% &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont unit\'es de milliards}% +% &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont centaines de millions}% +% &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont dizaines de millions}% +% &\Block[]{}{\fontsize{5}{5}\selectfont unit\'es de millions}% +% & +% }{}% +% \ifboolKV[ClesTableaux]{Millions}{% +% \Block[borders={left,right}]{}{\fontsize{5}{5}\selectfont centaines de millions}% +% &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont dizaines de millions}% +% &\Block[]{}{\fontsize{5}{5}\selectfont unit\'es de millions}% +% & +% }{}% +% \Block[borders={left,right}]{}{\fontsize{5}{5}\selectfont centaines de milliers}% +% &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont dizaines de milliers}% +% &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont unit\'es de milliers}% +% &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont centaines}% +% &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont dizaines}% +% &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont unit\'es}% +% &\Block[borders={right}]{}{\ifboolKV[ClesTableaux]{Virgule}{,}{}}% +% &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont dixi\`emes}% +% &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont centi\`emes}% +% &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont milli\`emes}\\ +% % + %%% Prise en compte de la cl\'e Nombres + % + \ifboolKV[ClesTableaux]{Nombres}{% + \xdef\DecalageLigne{\fpeval{\DecalageLigne+1}}% + \ifboolKV[ClesTableaux]{Milliards}{% + \Block[borders={left,right}]{}{\fontsize{5}{5}\selectfont\num{100000000000}}% + &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont\num{10000000000}}% + &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont\num{1000000000}}% + &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont \num{100000000}}% + &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont \num{10000000}}% + &\Block[borders={}]{}{\fontsize{5}{5}\selectfont \num{1000000}}% + &% + }{}% + \ifboolKV[ClesTableaux]{Millions}{% + \Block[borders={left,right}]{}{\fontsize{5}{5}\selectfont \num{100000000}}% + &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont \num{10000000}}% + &\Block[borders={}]{}{\fontsize{5}{5}\selectfont \num{1000000}}% + &% + }{}% + \Block[borders={left,right}]{}{\fontsize{5}{5}\selectfont \num{100000}}% + &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont \num{10000}}% + &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont \num{1000}}% + &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont \num{100}}% + &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont \num{10}}% + &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont \num{1}}% + &\Block[borders={right}]{}{\ifboolKV[ClesTableaux]{Virgule}{,}{}}% + &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont \num{0,1} ou $\dfrac{\strut1}{\strut10}$}% + &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont \num{0,01} ou $\dfrac{\strut1}{\strut100}$}% + &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont \num{0,001} ou $\dfrac{\strut1}{\strut\num{1000}}$}% + \\ + }{}% + %%% Prise en compte de la cl\'e Puissances + \ifboolKV[ClesTableaux]{Milliards}{% + \Block[borders={left,right}]{}{\fontsize{5}{5}\selectfont $10^{11}$}&% + \Block[borders={right}]{}{\fontsize{5}{5}\selectfont $10^{10}$}% + &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont $10^{9}$}% + &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont $10^{8}$}% + &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont $10^{7}$}% + &\Block[borders={}]{}{\fontsize{5}{5}\selectfont $10^{6}$}% + &% + }{% + \ifboolKV[ClesTableaux]{Millions}{% + \Block[borders={left,right}]{}{\fontsize{5}{5}\selectfont $10^{8}$}&% + \Block[borders={right}]{}{\fontsize{5}{5}\selectfont $10^{7}$}% + &\Block[borders={}]{}{\fontsize{5}{5}\selectfont $10^{6}$}% + &% + }{% + }}% + \Block[borders={left,right}]{}{\fontsize{5}{5}\selectfont $10^{5}$} + &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont $10^{4}$}% + &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont $10^3$}% + &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont $\num{d2}$}% + &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont $\num{d1}$}% + &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont $\num{10}^0$}% + &\Block[borders={right}]{}{\ifboolKV[ClesTableaux]{Virgule}{,}{}}% + &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont $\num{10}^{-1}$}% + &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont $\num{10}^{-2}$}% + &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont $\num{10}^{-3}$}% + \\% + %%% Lignes vierges + \hline% + \xintFor* ##1 in {\xintSeq{1}{\useKV[ClesTableaux]{NbLignes}}}\do{% + \ifboolKV[ClesTableaux]{Milliards}{% + &&&&&&}{}% + \ifboolKV[ClesTableaux]{Millions}{% + &&&}{}% + &&&&&&\ifboolKV[ClesTableaux]{Virgule}{,}{\phantom{,}}&&&\\}% + \CodeAfter% + % on trace les lignes verticales + \xintFor* ##1 in {\xintSeq{1}{\fpeval{\PfCDerniereColonne+1}}}\do{% + \tikz\draw (\fpeval{\DecalageLigne+2}-|##1)--(\fpeval{\DecalageLigne+2+\useKV[ClesTableaux]{NbLignes}}-|##1);% + }% + % On place le nombre éventuel + \ifx\bla#2\bla% + \else% + \setsepchar[*]{,*/}% + \readlist*\ListeNombreAPlacer{#2}% + \setsepchar{,}% + \xintFor* ##2 in{\xintSeq {1}{\ListeNombreAPlacerlen}}\do{ + \StrLen{\ListeNombreAPlacer[##2,1]}[\TabLongueurNombre]% + \xintFor* ##1 in{\xintSeq {1}{\TabLongueurNombre}}\do{% + \tikz\node at (\fpeval{##2+1.5}-|\fpeval{\ListeNombreAPlacer[##2,2]-0.5+##1}) {\PfCTBstrut\StrMid{\ListeNombreAPlacer[##2,1]}{##1}{##1}}; + }% + } + \fi% + \end{NiceTabular}% + \end{center}% + \setlength{\tabcolsep}{100\tabcolsep}% + }{}% + % %%% Cl\'e Entiers % \ifboolKV[ClesTableaux]{Entiers}{% @@ -21442,7 +22009,7 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V \CodeAfter% % on trace les lignes verticales \xintFor* ##1 in {\xintSeq{1}{\PfCDerniereColonne}}\do{% - \tikz\draw (2-|##1)--(\fpeval{2+\useKV[ClesTableaux]{NbLignes}+1}-|##1);% + \tikz\draw (\fpeval{\DecalageLigne+1}-|##1)--(\fpeval{\DecalageLigne+1+\useKV[ClesTableaux]{NbLignes}+1}-|##1);% }% %% On place le nombre éventuel \ifx\bla#2\bla% @@ -21689,7 +22256,7 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V \ifboolKV[ClesTableaux]{Milliards}{\xdef\PfCDerniereColonne{17}}{\ifboolKV[ClesTableaux]{Millions}{\xdef\PfCDerniereColonne{14}}{\xdef\PfCDerniereColonne{11}}}% \begin{NiceTabular}{*{\ifboolKV[ClesTableaux]{Milliards}{12}{% \ifboolKV[ClesTableaux]{Millions}{9}{6}% - }}{m{1cm}}*{5}{m{1cm}}}% + }}{wc{1cm}}*{5}{wc{1cm}}}% % \CodeBefore% \ifboolKV[ClesTableaux]{Milliards}{% @@ -21836,7 +22403,7 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V % \ifboolKV[ClesTableaux]{Metre}{% \[\renewcommand{\arraystretch}{1.15}% - \begin{NiceTabular}{*{7}{p{7.5mm}}}% + \begin{NiceTabular}{*{7}{wc{7.5mm}}}% \Block[]{}{} &\Block[]{}{} &\Block[]{}{} @@ -21895,7 +22462,7 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V % \ifboolKV[ClesTableaux]{Carre}{% \[\renewcommand{\arraystretch}{1.15}% - \begin{NiceTabular}{*{7}{p{3.5mm}p{3.5mm}}}% + \begin{NiceTabular}{*{7}{wc{3.5mm}wc{3.5mm}}}% \Block[]{1-2}{} &&\Block[]{1-2}{} &&\Block[]{1-2}{} @@ -21971,7 +22538,7 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V \ifboolKV[ClesTableaux]{Cube}{% \[\renewcommand{\arraystretch}{1.15}% \setlength{\tabcolsep}{0.625\tabcolsep}% - \begin{NiceTabular}{*{7}{p{3.5mm}p{3.5mm}p{3.5mm}}} + \begin{NiceTabular}{*{7}{wc{3.5mm}wc{3.5mm}wc{3.5mm}}} \Block[]{1-3}{} &&&\Block[]{1-3}{} &&&\Block[]{1-3}{} @@ -22049,7 +22616,7 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V % \ifboolKV[ClesTableaux]{Litre}{% \[\renewcommand{\arraystretch}{1.15}% - \begin{NiceTabular}{*{6}{p{7.5mm}}}% + \begin{NiceTabular}{*{6}{wc{7.5mm}}}% \Block[]{1-1}{} &\Block[]{1-1}{} &\Block[]{1-1}{} @@ -22104,7 +22671,7 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V % \ifboolKV[ClesTableaux]{Gramme}{% \[\renewcommand{\arraystretch}{1.15}% - \begin{NiceTabular}{*{7}{p{7.5mm}}}% + \begin{NiceTabular}{*{7}{wc{7.5mm}}}% \Block[]{}{} &\Block[]{}{} &\Block[]{}{} @@ -22160,7 +22727,7 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V }% \newcommand\PfCTableauIncline{% -\begin{NiceTabular}{p{1.5em}p{1.5em}p{1.5em}p{1.5em}p{1.5em}p{1.5em}p{1.5em}} +\begin{NiceTabular}{wc{1.5em}wc{1.5em}wc{1.5em}wc{1.5em}wc{1.5em}wc{1.5em}wc{1.5em}} &&&&&&\\ \Block[borders={bottom}]{}{\si{\kilo\PfCTableauUnite}}&\\ &\Block[borders={left}]{}{}&\\ @@ -22333,6 +22900,18 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V }% \makeatother +\newtcolorbox{MyboxTrivial}[1][]{% + enhanced,% + nobeforeafter,% + left=0pt,right=0pt,top=0pt,bottom=0pt,% + text fill,% + width=\largeurcarte,% + height=\hauteurcarte,% + arc=5pt,% + colback=white,% + #1 +} + \newlength{\largeurcards}% \newlength{\hauteurcards}% \newlength{\largeurcarte}% @@ -22388,7 +22967,10 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V }% \setKVdefault[Cards]{Largeur=59,Hauteur=89,HauteurTheme=15,Marge=4,Landscape=false,Couleur=Cornsilk,Theme=Th\'eor\`eme\\de - Pythagore,ThemeSol=Solution,Trame=false,Titre=false,NomTitre=Jeu 1,Loop,JaiQuia=false,BackgroundAv=false,BackgroundAr=false,ImageAv=4813762.jpg,ImageAr=4813762.jpg,AffichageSolution=true,SolutionSeule=false}% + Pythagore,ThemeSol=Solution,Trame=false,Titre=false,NomTitre=Jeu 1,Loop,JaiQuia=false,BackgroundAv=false,BackgroundAr=false,ImageAv=4813762.jpg,ImageAr=4813762.jpg,AffichageSolution=true,SolutionSeule=false,% + % Pour le trivial + Trivial=false,Symboles={\faInfinity,\faSignal,\faProjectDiagram,\faHiking,\faRuler,\faLockOpen} +}% \newcommand\Cartes[2][]{% \useKVdefault[Cards]% @@ -22414,97 +22996,190 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V \setlength{\largeurtitre}{\fpeval{(\useKV[Cards]{Largeur}-\useKV[Cards]{Marge}-9)/2}mm}% \colorlet{TexteCouleur}{black}% \colorlet{TrameCouleur}{\useKV[Cards]{Couleur}}% - \ifboolKV[Cards]{JaiQuia}{% + \ifboolKV[Cards]{Trivial}{% + \xdef\PfCListeSymbolTrivial{\useKV[Cards]{Symboles}}% + \setsepchar{,}\readlist*\ListeSymbolesTrivial{\PfCListeSymbolTrivial}% + \setlength{\tabcolsep}{0.25\tabcolsep} \ifboolKV[Cards]{Trame}{% \clearpage% \thispagestyle{empty}% \begin{Trame} \multido{\i=1+1}{9}{% - \node at (Carte\i) {% - \begin{MyboxJQ}{\ListeCards[\i,1]}{\ListeCards[\i,2]}% - %% - \end{MyboxJQ}% + \node[] at (Carte\i) {% + \begin{MyboxTrivial}% + \begin{center} + \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[9,m]}[hvlines] + \xintFor* ##1 in{\xintSeq{1}{6}}\do{% + \rule{0pt}{0.12\hauteurcards}\Block{1-1}{\ListeSymbolesTrivial[##1]}&\ListeCards[\i,\fpeval{1+2*(##1-1)}]\\ + }% + \end{NiceTabular} + \end{center} + \end{MyboxTrivial}% };% }% \end{Trame}% - \clearpage% - }{% - \begin{MyboxJQ}{\ListeCards[1,1]}{\ListeCards[1,2]}% - %% - \end{MyboxJQ}% - }% - }{% - \ifboolKV[Cards]{Loop}{% - \ifboolKV[Cards]{Trame}{% + \ifboolKV[Cards]{AffichageSolution}{% \clearpage% \thispagestyle{empty}% \begin{Trame} - \multido{\i=1+1}{9}{% + \multido{\i=1+1}{3}{% + \node at (Carte\i) {% + \begin{MyboxTrivial}% + \begin{center} + \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[10,m]}[hvlines] + \xintFor* ##1 in{\xintSeq{1}{6}}\do{% + \rule{0pt}{0.12\hauteurcards}\Block{1-1}{\ListeSymbolesTrivial[##1]}&\ListeCards[\fpeval{4-\i},\fpeval{2*##1}]\\ + }% + \end{NiceTabular} + \end{center} + \end{MyboxTrivial}% + };% + }% + \multido{\i=4+1}{3}{% + \node at (Carte\i) {% + \begin{MyboxTrivial}% + \begin{center} + \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[10,m]}[hvlines] + \xintFor* ##1 in{\xintSeq{1}{6}}\do{% + \rule{0pt}{0.12\hauteurcards}\Block{1-1}{\ListeSymbolesTrivial[##1]}&\ListeCards[\fpeval{10-\i},\fpeval{2*##1}]\\ + }% + \end{NiceTabular} + \end{center} + \end{MyboxTrivial}% + };% + }% + \multido{\i=7+1}{3}{% \node at (Carte\i) {% - \begin{Mybox}{\ListeCards[\i,1]}{\useKV[Cards]{Theme}}{\ListeCards[\i,2]}% - \ListeCards[\i,3]% - \end{Mybox}% + \begin{MyboxTrivial} + \begin{center} + \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[10,m]}[hvlines] + \xintFor* ##1 in{\xintSeq{1}{6}}\do{% + \rule{0pt}{0.12\hauteurcards}\Block{1-1}{\ListeSymbolesTrivial[##1]}&\ListeCards[\fpeval{16-\i},\fpeval{2*##1}]\\ + }% + \end{NiceTabular} + \end{center} + \end{MyboxTrivial}% };% }% \end{Trame}% \clearpage% - }{% - \begin{Mybox}{\ListeCards[1,1]}{\useKV[Cards]{Theme}}{\ListeCards[1,2]}% - \ListeCards[1,3]% - \end{Mybox}% - }% + }{}% }{% + \begin{MyboxTrivial}% + \begin{center} + \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[10,m]}[hvlines] + \xintFor* ##1 in{\xintSeq{1}{6}}\do{% + \rule{0pt}{0.12\hauteurcards}\Block{1-1}{\ListeSymbolesTrivial[##1]}&\ListeCards[1,\fpeval{1+2*(##1-1)}]\\ + }% + \end{NiceTabular} + \end{center} + \end{MyboxTrivial}% + \ifboolKV[Cards]{AffichageSolution}{% + \begin{MyboxTrivial}% + \begin{center} + \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[10,m]}[hvlines] + \xintFor* ##1 in{\xintSeq{1}{6}}\do{% + \rule{0pt}{0.12\hauteurcards}\Block{1-1}{\ListeSymbolesTrivial[##1]}&\ListeCards[1,\fpeval{2*##1}]\\ + }% + \end{NiceTabular} + \end{center} + \end{MyboxTrivial}% + }{}% + }% + \setlength{\tabcolsep}{4\tabcolsep}% + }{% + \ifboolKV[Cards]{JaiQuia}{% \ifboolKV[Cards]{Trame}{% \clearpage% \thispagestyle{empty}% \begin{Trame} \multido{\i=1+1}{9}{% - \node[] at (Carte\i) {% - \begin{MyboxSimpleAv}{\useKV[Cards]{Theme}}% - \ListeCards[\i,1]% - \end{MyboxSimpleAv}% + \node at (Carte\i) {% + \begin{MyboxJQ}{\ListeCards[\i,1]}{\ListeCards[\i,2]}% + %% + \end{MyboxJQ}% };% }% \end{Trame}% - \ifboolKV[Cards]{AffichageSolution}{% + \clearpage% + }{% + \begin{MyboxJQ}{\ListeCards[1,1]}{\ListeCards[1,2]}% + %% + \end{MyboxJQ}% + }% + }{% + \ifboolKV[Cards]{Loop}{% + \ifboolKV[Cards]{Trame}{% \clearpage% \thispagestyle{empty}% \begin{Trame} - \multido{\i=1+1}{3}{% - \node at (Carte\i) {% - \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}% - \ListeCards[\fpeval{4-\i},2]% - \end{MyboxSimpleAr}% - };% - }% - \multido{\i=4+1}{3}{% - \node at (Carte\i) {% - \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}% - \ListeCards[\fpeval{10-\i},2]% - \end{MyboxSimpleAr}% - };% - }% - \multido{\i=7+1}{3}{% + \multido{\i=1+1}{9}{% \node at (Carte\i) {% - \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}% - \ListeCards[\fpeval{16-\i},2]% - \end{MyboxSimpleAr}% + \begin{Mybox}{\ListeCards[\i,1]}{\useKV[Cards]{Theme}}{\ListeCards[\i,2]}% + \ListeCards[\i,3]% + \end{Mybox}% };% }% \end{Trame}% \clearpage% - }{}% + }{% + \begin{Mybox}{\ListeCards[1,1]}{\useKV[Cards]{Theme}}{\ListeCards[1,2]}% + \ListeCards[1,3]% + \end{Mybox}% + }% }{% - \ifboolKV[Cards]{SolutionSeule}{}{% - \begin{MyboxSimpleAv}{\useKV[Cards]{Theme}}% - \ListeCards[1,1]% - \end{MyboxSimpleAv}% + \ifboolKV[Cards]{Trame}{% + \clearpage% + \thispagestyle{empty}% + \begin{Trame} + \multido{\i=1+1}{9}{% + \node[] at (Carte\i) {% + \begin{MyboxSimpleAv}{\useKV[Cards]{Theme}}% + \ListeCards[\i,1]% + \end{MyboxSimpleAv}% + };% + }% + \end{Trame}% + \ifboolKV[Cards]{AffichageSolution}{% + \clearpage% + \thispagestyle{empty}% + \begin{Trame} + \multido{\i=1+1}{3}{% + \node at (Carte\i) {% + \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}% + \ListeCards[\fpeval{4-\i},2]% + \end{MyboxSimpleAr}% + };% + }% + \multido{\i=4+1}{3}{% + \node at (Carte\i) {% + \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}% + \ListeCards[\fpeval{10-\i},2]% + \end{MyboxSimpleAr}% + };% + }% + \multido{\i=7+1}{3}{% + \node at (Carte\i) {% + \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}% + \ListeCards[\fpeval{16-\i},2]% + \end{MyboxSimpleAr}% + };% + }% + \end{Trame}% + \clearpage% + }{}% + }{% + \ifboolKV[Cards]{SolutionSeule}{}{% + \begin{MyboxSimpleAv}{\useKV[Cards]{Theme}}% + \ListeCards[1,1]% + \end{MyboxSimpleAv}% + }% + \ifboolKV[Cards]{AffichageSolution}{% + \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}% + \ListeCards[1,2]% + \end{MyboxSimpleAr}% + }{}% }% - \ifboolKV[Cards]{AffichageSolution}{% - \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}% - \ListeCards[1,2]% - \end{MyboxSimpleAr}% - }{}% }% }% }% @@ -22533,29 +23208,32 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V \newtoks\t@b \long\def\ifremain@lines#1\\#2\@nil{% - \csname @\ifx\@empty#2\@empty second\else first\fi oftwo\endcsname} + \csname @\ifx\@empty#2\@empty second\else first\fi oftwo\endcsname} \long\def\subst@eol#1\\#2\@nil{\addtot@b{#1\\}% \ifremain@lines#2\\\@nil{\addtot@b&\subst@eol#2\@nil}{\addtot@b{#2\CodeAfter\xintifboolexpr{\useKV[Tableur]{Ligne}==0 || \useKV[Tableur]{Colonne}==0}{}{% - \tikz\node at (row-\fpeval{\useKV[Tableur]{Ligne}+1+\useKV[Tableur]{PasL}}-|col-\fpeval{\useKV[Tableur]{Colonne}+1+\useKV[Tableur]{PasC}}) {\tiny$\blacksquare$};% - }% - \end{NiceTabular}}}}% + \tikz\node at (row-\fpeval{\useKV[Tableur]{Ligne}+1+\useKV[Tableur]{PasL}}-|col-\fpeval{\useKV[Tableur]{Colonne}+1+\useKV[Tableur]{PasC}}) {\tiny$\blacksquare$};% + }% + \end{NiceTabular}}}}% \long\def\collectcp@body#1\end{\subst@eol#1\@nil\end} \newcommand\addtot@b[1]{\t@b\expandafter{\the\t@b#1}} \newcommand\edftot@b[1]{\edef\temp@{#1}\expandafter\addtot@b\expandafter{\temp@}} -\newlength\LongInter -\newlength\TotalInter - +\newlength\PfCLongInter% +\newlength\PfCTableurLargeurUn% +\newlength\PfCTableurLargeur% +\setlength{\PfCTableurLargeurUn}{\useKV[Tableur]{LargeurUn}em} +\setlength{\PfCTableurLargeur}{\useKV[Tableur]{Largeur}em} \newenvironment{Tableur}[1][]{% \useKVdefault[Tableur]% \setKV[Tableur]{#1}% + \ttfamily% - \newcolumntype Y{>{\centering\arraybackslash}p{\useKV[Tableur]{LargeurUn}em}}% - \newcolumntype X{>{\centering\arraybackslash}p{\useKV[Tableur]{Largeur}em}}% + \newcolumntype Y{>{\centering\arraybackslash}wc{\PfCTableurLargeurUn}}% + \newcolumntype X{>{\centering\arraybackslash}wc{\PfCTableurLargeurUn}}% \ifboolKV[Tableur]{Bandeau}{% - \setlength{\LongInter}{\fpeval{\useKV[Tableur]{LargeurUn}+(\useKV[Tableur]{Colonnes}-2)*\useKV[Tableur]{Largeur}-4}em+\fpeval{\useKV[Tableur]{Colonnes}*2-6}\tabcolsep+\fpeval{\useKV[Tableur]{Colonnes}+1}\arrayrulewidth}% - \begin{NiceTabular}{p{\useKV[Tableur]{Largeur}em}p{1em}p{5em}p{\LongInter}}% + \setlength{\PfCLongInter}{\fpeval{\useKV[Tableur]{LargeurUn}+(\useKV[Tableur]{Colonnes}-2)*\useKV[Tableur]{Largeur}-4}em+\fpeval{\useKV[Tableur]{Colonnes}*2-6}\tabcolsep+\fpeval{\useKV[Tableur]{Colonnes}+1}\arrayrulewidth}% + \begin{NiceTabular}{wc{\PfCTableurLargeur}wc{1em}wc{5em}wc{\PfCLongInter}}% \Block[draw]{}{}\useKV[Tableur]{Cellule}&\Block[draw]{}{}\centering\arraybackslash\scriptsize$\blacktriangledown$&$f_x$\hfill$\sum$~\scriptsize$\blacktriangledown$\hfill$=$&\Block[draw]{}{}\useKV[Tableur]{Formule}\hfill\scriptsize$\blacktriangledown$\\ \end{NiceTabular}% \nopagebreak @@ -22568,10 +23246,10 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V \global\cntcol\z@\global\advance\cntlin\@ne \centering\arraybackslash \ifnum\cntlin>\@ne - \ifboolKV[Tableur]{Selection}{ + \ifboolKV[Tableur]{Selection}{% \xintifboolexpr{\cntlin>\useKV[Tableur]{Ligne} && \cntlin<\fpeval{\useKV[Tableur]{Ligne}+\useKV[Tableur]{PasL}+1}}{\textcolor{white}{\number\numexpr\cntlin-1\relax}}{\number\numexpr\cntlin-1\relax} }{\number\numexpr\cntlin-1\relax}\fi} - p{2em}Y*{\fpeval{\useKV[Tableur]{Colonnes}-1}}{X}}[hvlines]% + wc{2em}Y*{\fpeval{\useKV[Tableur]{Colonnes}-1}}{X}}[hvlines]% \CodeBefore % on colorie en gris toute la première ligne \tikz\draw[fill=gray!15](row-1-|col-1) rectangle (row-2-|last);% @@ -22920,7 +23598,7 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V %%% % Papiers %%% -\setKVdefault[Papiers]{Cinq=true,Seyes=false,Isometrique=false,Millimetre=false,Triangle=false,Largeur=5,Hauteur=4,Couleur=black,Grille=-1,PageEntiere=false,ZoneTexte=false,Baseline=false}% +\setKVdefault[Papiers]{Cinq=true,Seyes=false,Isometrique=false,IsometriquePointe=false,Millimetre=false,Triangle=false,Largeur=5,Hauteur=4,Couleur=black,Grille=-1,GrillePointe=-1,PageEntiere=false,ZoneTexte=false,Baseline=false}% %\def\MPBaseLineSkip#1#2#3{%à retravailler : ne fonctionne pas :( % % @@ -22947,7 +23625,6 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V \def\MPGrille#1#2#3#4{% \ifluatex% - %\mplibcodeinherit{enable}% \mplibforcehmode% \begin{mplibcode}% path horizon,verticon; @@ -22961,7 +23638,6 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V draw horizon shifted((0,(k/100)*cm)); endfor; \end{mplibcode}% - %\mplibcodeinherit{disable}% \else% \begin{mpost}% path horizon,verticon; @@ -22978,9 +23654,31 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V \fi% }% +\def\MPGrillePointe#1#2#3#4{% + \ifluatex% + \mplibforcehmode% + \begin{mplibcode}% + drawoptions(withcolor #3); + for k=0 step (#4*100) until (#1*100): + for l=0 step (#4*100) until (#2*100): + fill (cercles((0,0),1pt) shifted(((k/100)*cm,(l/100)*cm))); + endfor; + endfor; + \end{mplibcode}% + \else% + \begin{mpost}% + drawoptions(withcolor #3); + for k=0 step (#4*100) until (#1*100): + for l=0 step (#4*100) until (#2*100): + fill (cercles((0,0),0.5pt) shifted(((k/100)*cm,(l/100)*cm))); + endfor; + endfor; + \end{mpost}% + \fi% +}% + \def\MPCinq#1#2#3{% \ifluatex% - %\mplibcodeinherit{enable}% \mplibforcehmode% \begin{mplibcode}% path horizon,verticon; @@ -22994,7 +23692,6 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V draw horizon shifted((0,k*cm)); endfor; \end{mplibcode}% - %\mplibcodeinherit{disable}% \else% \begin{mpost} path horizon,verticon; @@ -23013,7 +23710,6 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V \def\MPSeyes#1#2#3{% \ifluatex% - %\mplibcodeinherit{enable}% \mplibforcehmode% \begin{mplibcode}% path horizon,verticon; @@ -23030,7 +23726,6 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V draw horizon shifted((0,(k/10)*cm)) withpen pencircle scaled 1.25; endfor; \end{mplibcode}% - %\mplibcodeinherit{disable}% \else% \begin{mpost}% path horizon,verticon; @@ -23052,7 +23747,6 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V \def\MPMillimetre#1#2#3{% \ifluatex% - %\mplibcodeinherit{enable}% \mplibforcehmode% \begin{mplibcode}% path horizon,verticon; @@ -23078,7 +23772,6 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V draw horizon shifted((0,k*cm)) withpen pencircle scaled 1.25; endfor; \end{mplibcode}% - %\mplibcodeinherit{disable}% \else% \begin{mpost}% path horizon,verticon; @@ -23109,54 +23802,76 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V \def\MPIsometrique#1#2#3{% \ifluatex% - %\mplibcodeinherit{enable}% \mplibforcehmode% \begin{mplibcode}% path diagon,antidiagon; diagon=(0,0)--#2*(sqrt(3)*cm,1*cm); antidiagon=(0,0)--#2*(-sqrt(3)*cm,1*cm); drawoptions(withcolor #3); - for k=0 step 1 until #1: - draw diagon shifted((k*cm,0)); - endfor; - for k=0 step (sqrt(3)/3) until (#2): - draw diagon shifted((0,k*cm)); - endfor; for k=0 step 1 until (#1): + draw diagon shifted((k*cm,0)); draw antidiagon shifted((k*cm,0)); endfor; for k=0 step (sqrt(3)/3) until (#2): + draw diagon shifted((0,k*cm)); draw antidiagon shifted((#1*cm,k*cm)); endfor; clip currentpicture to polygone((0,0),(#1*cm,0),(#1*cm,#2*cm),(0,#2*cm)); \end{mplibcode}% - %\mplibcodeinherit{disable}% \else% \begin{mpost}% path diagon,antidiagon; diagon=(0,0)--#2*(sqrt(3)*cm,1*cm); antidiagon=(0,0)--#2*(-sqrt(3)*cm,1*cm); drawoptions(withcolor #3); - for k=0 step 1 until #1: + for k=0 step 1 until (#1): draw diagon shifted((k*cm,0)); + draw antidiagon shifted((k*cm,0)); endfor; for k=0 step (sqrt(3)/3) until (#2): draw diagon shifted((0,k*cm)); + draw antidiagon shifted((#1*cm,k*cm)); endfor; - for k=0 step 1 until (#1): - draw antidiagon shifted((k*cm,0)); + clip currentpicture to polygone((0,0),(#1*cm,0),(#1*cm,#2*cm),(0,#2*cm)); + \end{mpost}% + \fi% +}% + +\def\MPIsometriquePointe#1#2#3{% + \ifluatex% + \mplibforcehmode% + \begin{mplibcode}% + pair diagon,antidiagon; + diagon=(1pt,1pt); + antidiagon=(1pt+0.5cm,1pt+0.5*(sqrt(3)*1cm/3)); + drawoptions(withcolor #3); + for k=0 step (sqrt(3)/3) until (#2): + for l=0 step 1 until (#1): + fill (cercles(diagon,1pt) shifted((l*cm,k*cm))); + fill (cercles(antidiagon,1pt) shifted((l*cm,k*cm))); endfor; + endfor; + clip currentpicture to polygone((0,0),(#1*cm+2pt,0),(#1*cm+2pt,#2*cm+1pt),(0,#2*cm+1pt)); + \end{mplibcode}% + \else% + \begin{mpost}% + pair diagon,antidiagon; + diagon=(1pt,1pt); + antidiagon=(1pt+0.5cm,1pt+0.5*(sqrt(3)*1cm/3)); + drawoptions(withcolor #3); for k=0 step (sqrt(3)/3) until (#2): - draw antidiagon shifted((#1*cm,k*cm)); + for l=0 step 1 until (#1): + fill (cercles(diagon,1pt) shifted((l*cm,k*cm))); + fill (cercles(antidiagon,1pt) shifted((l*cm,k*cm))); endfor; - clip currentpicture to polygone((0,0),(#1*cm,0),(#1*cm,#2*cm),(0,#2*cm)); + endfor; + clip currentpicture to polygone((0,0),(#1*cm+2pt,0),(#1*cm+2pt,#2*cm+1pt),(0,#2*cm+1pt)); \end{mpost}% \fi% }% \def\MPTriangulaire#1#2#3{% \ifluatex% - %\mplibcodeinherit{enable}% \mplibforcehmode% \begin{mplibcode}% path horizon,diagon,antidiagon; @@ -23181,7 +23896,6 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V endfor; clip currentpicture to polygone((0,0),(#1*cm,0),(#1*cm,#2*cm),(0,#2*cm)); \end{mplibcode}% - %\mplibcodeinherit{disable}% \else% \begin{mpost}% path horizon,diagon,antidiagon; @@ -23220,6 +23934,7 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V \xdef\PapierHauteur{\useKV[Papiers]{Hauteur}}% \xdef\PapierCouleur{\useKV[Papiers]{Couleur}}% \xdef\PapierGrille{\useKV[Papiers]{Grille}}% + \xdef\PapierGrillePointe{\useKV[Papiers]{GrillePointe}}% \checkoddpage% \ifoddpage% \setlength{\PapierLeftCurrent}{\oddsidemargin}% @@ -23233,20 +23948,28 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V \xdef\PapierLargeur{\fpeval{\textwidth/1cm}}% \begin{tikzpicture}[remember picture,overlay]% \node[anchor=south west,inner sep=0pt,transform canvas={xshift=\PapierLeft,yshift=\PapierBottom}] at (current page.south west) {% - \xintifboolexpr{\useKV[Papiers]{Grille}>0}{% - \MPGrille{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}{\PapierGrille}% - }{\ifboolKV[Papiers]{Baseline}{% - \MPBaseLineSkip{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% - }{% - \ifboolKV[Papiers]{Triangle}{% - \MPTriangulaire{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% - }{\ifboolKV[Papiers]{Millimetre}{% - \MPMillimetre{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% - }{\ifboolKV[Papiers]{Isometrique}{% - \MPIsometrique{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% - }{\ifboolKV[Papiers]{Seyes}{% - \MPSeyes{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% - }{\MPCinq{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% + \xintifboolexpr{\useKV[Papiers]{GrillePointe}>0}{% + \MPGrillePointe{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}{\PapierGrillePointe}% + }{% + \xintifboolexpr{\useKV[Papiers]{Grille}>0}{% + \MPGrille{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}{\PapierGrille}% + }{\ifboolKV[Papiers]{Baseline}{% + \MPBaseLineSkip{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% + }{% + \ifboolKV[Papiers]{IsometriquePointe}{% + \MPIsometriquePointe{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% + }{% + \ifboolKV[Papiers]{Triangle}{% + \MPTriangulaire{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% + }{\ifboolKV[Papiers]{Millimetre}{% + \MPMillimetre{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% + }{\ifboolKV[Papiers]{Isometrique}{% + \MPIsometrique{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% + }{\ifboolKV[Papiers]{Seyes}{% + \MPSeyes{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% + }{\MPCinq{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% + }% + }% }% }% }% @@ -23261,17 +23984,24 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V \xdef\PapierLargeur{\fpeval{\paperwidth/1cm}}% \begin{tikzpicture}[remember picture,overlay]% \node[anchor=south west,inner sep=0pt] at (current page.south west) {% - \xintifboolexpr{\useKV[Papiers]{Grille}>0}{% - \MPGrille{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}{\PapierGrille}% - }{\ifboolKV[Papiers]{Triangle}{% - \MPTriangulaire{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% - }{\ifboolKV[Papiers]{Millimetre}{% - \MPMillimetre{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% - }{\ifboolKV[Papiers]{Isometrique}{% - \MPIsometrique{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% - }{\ifboolKV[Papiers]{Seyes}{% - \MPSeyes{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% - }{\MPCinq{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% + \xintifboolexpr{\useKV[Papiers]{GrillePointe}>0}{% + \MPGrillePointe{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}{\PapierGrillePointe}% + }{% + \xintifboolexpr{\useKV[Papiers]{Grille}>0}{% + \MPGrille{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}{\PapierGrille}% + }{\ifboolKV[Papiers]{IsometriquePointe}{% + \MPIsometriquePointe{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% + }{\ifboolKV[Papiers]{Triangle}{% + \MPTriangulaire{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% + }{\ifboolKV[Papiers]{Millimetre}{% + \MPMillimetre{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% + }{\ifboolKV[Papiers]{Isometrique}{% + \MPIsometrique{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% + }{\ifboolKV[Papiers]{Seyes}{% + \MPSeyes{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% + }{\MPCinq{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% + }% + }% }% }% }% @@ -23280,20 +24010,28 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V };% \end{tikzpicture}% }{% - \xintifboolexpr{\useKV[Papiers]{Grille}>0}{% - \MPGrille{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}{\PapierGrille}% - }{\ifboolKV[Papiers]{Baseline}{% - \MPBaseLineSkip{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% - }{% - \ifboolKV[Papiers]{Triangle}{% - \MPTriangulaire{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% - }{\ifboolKV[Papiers]{Millimetre}{% - \MPMillimetre{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% - }{\ifboolKV[Papiers]{Isometrique}{% - \MPIsometrique{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% - }{\ifboolKV[Papiers]{Seyes}{% - \MPSeyes{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% - }{\MPCinq{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% + \xintifboolexpr{\useKV[Papiers]{GrillePointe}>0}{% + \MPGrillePointe{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}{\PapierGrillePointe}% + }{% + \xintifboolexpr{\useKV[Papiers]{Grille}>0}{% + \MPGrille{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}{\PapierGrille}% + }{\ifboolKV[Papiers]{Baseline}{% + \MPBaseLineSkip{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% + }{% + \ifboolKV[Papiers]{IsometriquePointe}{% + \MPIsometriquePointe{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% + }{% + \ifboolKV[Papiers]{Triangle}{% + \MPTriangulaire{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% + }{\ifboolKV[Papiers]{Millimetre}{% + \MPMillimetre{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% + }{\ifboolKV[Papiers]{Isometrique}{% + \MPIsometrique{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% + }{\ifboolKV[Papiers]{Seyes}{% + \MPSeyes{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% + }{\MPCinq{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}% + }% + }% }% }% }% |