From 12679ab7d3c2a210f4123163671b532b8b55d5f9 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 15 Mar 2024 03:06:35 +0000 Subject: CTAN sync 202403150306 --- macros/latex/contrib/l3experimental/CHANGELOG.md | 21 +- macros/latex/contrib/l3experimental/README.md | 9 +- .../latex/contrib/l3experimental/l3benchmark.dtx | 4 +- .../latex/contrib/l3experimental/l3benchmark.pdf | Bin 298116 -> 298521 bytes .../latex/contrib/l3experimental/l3draw-boxes.dtx | 2 +- .../latex/contrib/l3experimental/l3draw-code.pdf | Bin 683797 -> 685801 bytes .../latex/contrib/l3experimental/l3draw-layers.dtx | 2 +- .../latex/contrib/l3experimental/l3draw-paths.dtx | 79 ++-- .../latex/contrib/l3experimental/l3draw-points.dtx | 2 +- .../latex/contrib/l3experimental/l3draw-scopes.dtx | 2 +- .../contrib/l3experimental/l3draw-softpath.dtx | 10 +- .../latex/contrib/l3experimental/l3draw-state.dtx | 2 +- .../contrib/l3experimental/l3draw-transforms.dtx | 7 +- macros/latex/contrib/l3experimental/l3draw.dtx | 18 +- macros/latex/contrib/l3experimental/l3draw.pdf | Bin 516478 -> 518097 bytes macros/latex/contrib/l3experimental/l3galley.dtx | 4 +- macros/latex/contrib/l3experimental/l3galley.pdf | Bin 405966 -> 406366 bytes macros/latex/contrib/l3experimental/l3graphics.dtx | 4 +- macros/latex/contrib/l3experimental/l3graphics.pdf | Bin 378266 -> 378667 bytes macros/latex/contrib/l3experimental/l3opacity.dtx | 31 +- macros/latex/contrib/l3experimental/l3opacity.pdf | Bin 299358 -> 336876 bytes .../latex/contrib/l3experimental/l3str-format.dtx | 4 +- .../latex/contrib/l3experimental/l3str-format.pdf | Bin 337262 -> 337668 bytes .../latex/contrib/l3experimental/l3sys-shell.dtx | 446 --------------------- .../latex/contrib/l3experimental/l3sys-shell.ins | 62 --- .../latex/contrib/l3experimental/l3sys-shell.pdf | Bin 346725 -> 0 bytes macros/latex/contrib/l3experimental/xcoffins.dtx | 4 +- macros/latex/contrib/l3experimental/xcoffins.pdf | Bin 390902 -> 391312 bytes macros/latex/contrib/l3experimental/xgalley.dtx | 4 +- macros/latex/contrib/l3experimental/xgalley.pdf | Bin 323194 -> 323591 bytes 30 files changed, 139 insertions(+), 578 deletions(-) delete mode 100644 macros/latex/contrib/l3experimental/l3sys-shell.dtx delete mode 100644 macros/latex/contrib/l3experimental/l3sys-shell.ins delete mode 100644 macros/latex/contrib/l3experimental/l3sys-shell.pdf (limited to 'macros/latex/contrib/l3experimental') diff --git a/macros/latex/contrib/l3experimental/CHANGELOG.md b/macros/latex/contrib/l3experimental/CHANGELOG.md index 197fa4254d..900626c265 100644 --- a/macros/latex/contrib/l3experimental/CHANGELOG.md +++ b/macros/latex/contrib/l3experimental/CHANGELOG.md @@ -7,6 +7,24 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2024-03-14] + +### Added +- `\draw_path_replace_bb:` + +### Changed +- `l3opacity` is sped up a bit +- Support fp expr in `\draw_path_corner_arc:nn` + +### Fixed +- Interaction between drawing rotation and shift (issue \#1483) +- Shifting not applied to `\draw_path_rectangle:n` (issue \#1486) +- Out of boundary lines drawn by `\draw_path_grid:nnn` (issue \#1489) +- Two softpath markers with the same meaning in l3draw (issue \#1492) + +### Removed +- `l3sys-shell` in favor of `l3sys-query` methods added to `l3kernel` + ## [2024-02-20] ### Fixed @@ -309,7 +327,8 @@ this project uses date-based 'snapshot' version identifiers. - New `l3color` module using `xcolor`-like expression syntax - New `l3draw` module, based on `pgf` layer of the TikZ system -[Unreleased]: https://github.com/latex3/latex3/compare/2024-02-20...HEAD +[Unreleased]: https://github.com/latex3/latex3/compare/2024-03-14...HEAD +[2024-03-14]: https://github.com/latex3/latex3/compare/2024-02-20...2024-03-14 [2024-02-20]: https://github.com/latex3/latex3/compare/2024-01-04...2024-02-20 [2024-01-04]: https://github.com/latex3/latex3/compare/2023-12-08...2024-01-04 [2023-12-08]: https://github.com/latex3/latex3/compare/2023-11-01...2023-12-08 diff --git a/macros/latex/contrib/l3experimental/README.md b/macros/latex/contrib/l3experimental/README.md index dc28bad6ee..438d6c43c5 100644 --- a/macros/latex/contrib/l3experimental/README.md +++ b/macros/latex/contrib/l3experimental/README.md @@ -1,7 +1,7 @@ Experimental LaTeX3 Concepts ============================ -Release 2024-02-20 +Release 2024-03-14 Overview -------- @@ -26,7 +26,6 @@ bundles: * `l3graphics` * `l3opacity` * `l3str` -* `l3sys-shell` * `xcoffins` * `xgalley` @@ -61,12 +60,6 @@ category code 12 ('other'), with the exception of spaces which have the category code 10 ('space'). The `l3str-format` module provides methods for formatting such strings. -`l3sys-shell` -------------- - -This module provides abstractions for common shell functions, e.g. file -deletion and copying. - `xcoffins` ---------- diff --git a/macros/latex/contrib/l3experimental/l3benchmark.dtx b/macros/latex/contrib/l3experimental/l3benchmark.dtx index 58d4da8bb7..8cbd99cffb 100644 --- a/macros/latex/contrib/l3experimental/l3benchmark.dtx +++ b/macros/latex/contrib/l3experimental/l3benchmark.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Released 2024-02-20} +% \date{Released 2024-03-14} % % \maketitle % @@ -122,7 +122,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3benchmark}{2024-02-20}{} +\ProvidesExplPackage{l3benchmark}{2024-03-14}{} {L3 Experimental benchmarking} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3benchmark.pdf b/macros/latex/contrib/l3experimental/l3benchmark.pdf index 2c8c9d3634..5b39987238 100644 Binary files a/macros/latex/contrib/l3experimental/l3benchmark.pdf and b/macros/latex/contrib/l3experimental/l3benchmark.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3draw-boxes.dtx b/macros/latex/contrib/l3experimental/l3draw-boxes.dtx index 992acaa05c..fe2207fc1b 100644 --- a/macros/latex/contrib/l3experimental/l3draw-boxes.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-boxes.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2024-02-20} +% \date{Released 2024-03-14} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-code.pdf b/macros/latex/contrib/l3experimental/l3draw-code.pdf index 91237671cb..0dffee7391 100644 Binary files a/macros/latex/contrib/l3experimental/l3draw-code.pdf and b/macros/latex/contrib/l3experimental/l3draw-code.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3draw-layers.dtx b/macros/latex/contrib/l3experimental/l3draw-layers.dtx index 1244dfa0ec..bea1d2423c 100644 --- a/macros/latex/contrib/l3experimental/l3draw-layers.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-layers.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2024-02-20} +% \date{Released 2024-03-14} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-paths.dtx b/macros/latex/contrib/l3experimental/l3draw-paths.dtx index e869351f6b..0b428cad0f 100644 --- a/macros/latex/contrib/l3experimental/l3draw-paths.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-paths.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2024-02-20} +% \date{Released 2024-03-14} % % \maketitle % @@ -192,8 +192,8 @@ % \begin{macrocode} \cs_new_protected:Npn \draw_path_corner_arc:nn #1#2 { - \dim_set:Nn \l_@@_corner_xarc_dim {#1} - \dim_set:Nn \l_@@_corner_yarc_dim {#2} + \dim_set:Nn \l_@@_corner_xarc_dim { \fp_to_dim:n {#1} } + \dim_set:Nn \l_@@_corner_yarc_dim { \fp_to_dim:n {#2} } \bool_lazy_and:nnTF { \dim_compare_p:nNn \l_@@_corner_xarc_dim = { 0pt } } { \dim_compare_p:nNn \l_@@_corner_yarc_dim = { 0pt } } @@ -700,16 +700,18 @@ % \begin{macrocode} \cs_new_protected:Npn \draw_path_rectangle:nn #1#2 { - \@@_point_process:nnn + \bool_lazy_or:nnTF + { \l_@@_corner_arc_bool } + { \l_@@_matrix_active_bool } { - \bool_lazy_or:nnTF - { \l_@@_corner_arc_bool } - { \l_@@_matrix_active_bool } - { \@@_path_rectangle_rounded:nnnn } - { \@@_path_rectangle:nnnn } + \@@_point_process:nnn \@@_path_rectangle_rounded:nnnn + {#1} {#2} + } + { + \@@_point_process:nnn \@@_path_rectangle:nnnn + { (#1) + ( \l_@@_xshift_dim , \l_@@_yshift_dim ) } + { #2 } } - {#1} - {#2} } \cs_new_protected:Npn \@@_path_rectangle:nnnn #1#2#3#4 { @@ -766,8 +768,8 @@ \@@_point_process:nnn { \@@_path_grid_auxi:eennnn - { \dim_eval:n { \dim_abs:n {#1} } } - { \dim_eval:n { \dim_abs:n {#2} } } + { \dim_abs:n {#1} } + { \dim_abs:n {#2} } } {#3} {#4} } @@ -787,8 +789,8 @@ \cs_new_protected:Npn \@@_path_grid_auxiii:nnnnnn #1#2#3#4#5#6 { \@@_path_grid_auxiv:eennnnnn - { \fp_to_dim:n { #1 * trunc(#3/(#1)) } } - { \fp_to_dim:n { #2 * trunc(#4/(#2)) } } + { \fp_to_dim:n { #1 * ceil(#3/(#1)) } } + { \fp_to_dim:n { #2 * ceil(#4/(#2)) } } {#1} {#2} {#3} {#4} {#5} {#6} } \cs_new_protected:Npn \@@_path_grid_auxiv:nnnnnnnn #1#2#3#4#5#6#7#8 @@ -832,19 +834,20 @@ % \end{macrocode} % \end{variable} % -% \begin{variable}{\l_@@_path_use_bb_bool, \l_@@_path_use_clear_bool} +% \begin{variable}{\l_@@_path_use_clear_bool} % Actions handled at the macro layer. % \begin{macrocode} -\bool_new:N \l_@@_path_use_bb_bool \bool_new:N \l_@@_path_use_clear_bool % \end{macrocode} % \end{variable} % % \begin{macro}{\draw_path_use:n, \draw_path_use_clear:n} +% \begin{macro}{\draw_path_replace_bb:} +% \begin{macro}{\@@_path_replace_bb:NnN} % \begin{macro}{\@@_path_use:n} % \begin{macro}{\@@_path_use_action_draw:, \@@_path_use_action_fillstroke:} % \begin{macro}{\@@_path_use_stroke_bb:} -% \begin{macro}{\@@_path_use_stroke_bb_aux:NnN} +% \begin{macro}{\@@_path_use_bb:NnN} % There are a range of actions which can apply to a path: they are handled % in a single function which can carry out several of them. The first step % is to deal with the special case of clearing the path. @@ -865,6 +868,23 @@ } { \@@_path_use:n { #1 , clear } } } +\cs_new_protected:Npn \draw_path_replace_bb: + { + \@@_path_replace_bb:NnN x { max } + + \@@_path_replace_bb:NnN y { max } + + \@@_path_replace_bb:NnN x { min } - + \@@_path_replace_bb:NnN y { min } - + \@@_softpath_clear: + \@@_path_reset_limits: + } +\cs_new_protected:Npn \@@_path_replace_bb:NnN #1#2#3 + { + \dim_gset:cn { g_@@_ #1#2 _dim } + { + \dim_use:c { g_@@_path_ #1#2 _dim } + #3 0.5 \g_@@_linewidth_dim + } + } % \end{macrocode} % Map over the actions and set up the data: mainly just booleans, % but with the possibility to cover more complex cases. The business end @@ -913,7 +933,10 @@ } } \bool_if:NT \l_@@_path_use_clear_bool - { \@@_softpath_clear: } + { + \@@_softpath_clear: + \@@_path_reset_limits: + } } \cs_new_protected:Npn \@@_path_use_action_draw: { @@ -930,12 +953,12 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_path_use_stroke_bb: { - \@@_path_use_stroke_bb_aux:NnN x { max } + - \@@_path_use_stroke_bb_aux:NnN y { max } + - \@@_path_use_stroke_bb_aux:NnN x { min } - - \@@_path_use_stroke_bb_aux:NnN y { min } - + \@@_path_use_bb:NnN x { max } + + \@@_path_use_bb:NnN y { max } + + \@@_path_use_bb:NnN x { min } - + \@@_path_use_bb:NnN y { min } - } -\cs_new_protected:Npn \@@_path_use_stroke_bb_aux:NnN #1#2#3 +\cs_new_protected:Npn \@@_path_use_bb:NnN #1#2#3 { \dim_compare:nNnF { \dim_use:c { g_@@_ #1#2 _dim } } = { #3 -\c_max_dim } { @@ -956,6 +979,8 @@ % \end{macro} % \end{macro} % \end{macro} +% \end{macro} +% \end{macro} % % \subsection{Scoping paths} % @@ -1017,11 +1042,13 @@ % \end{macrocode} % \end{macro} % -% \begin{macrocode} +% \subsection{Messages} +% +% \begin{macrocode} \msg_new:nnnn { draw } { invalid-path-action } { Invalid~action~'#1'~for~path. } { Paths~can~be~used~with~actions~'draw',~'clip',~'fill'~or~'stroke'. } -% \end{macrocode} +% \end{macrocode} % % \begin{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3draw-points.dtx b/macros/latex/contrib/l3experimental/l3draw-points.dtx index 0cb0fd6507..919f073440 100644 --- a/macros/latex/contrib/l3experimental/l3draw-points.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-points.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2024-02-20} +% \date{Released 2024-03-14} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-scopes.dtx b/macros/latex/contrib/l3experimental/l3draw-scopes.dtx index 56ce949b24..81ab2dfed2 100644 --- a/macros/latex/contrib/l3experimental/l3draw-scopes.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-scopes.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2024-02-20} +% \date{Released 2024-03-14} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-softpath.dtx b/macros/latex/contrib/l3experimental/l3draw-softpath.dtx index c929e86aa7..0d5d6d8b6b 100644 --- a/macros/latex/contrib/l3experimental/l3draw-softpath.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-softpath.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2024-02-20} +% \date{Released 2024-03-14} % % \maketitle % @@ -163,6 +163,7 @@ % \end{macrocode} % \end{variable} % +% \begin{macro}{\@@_softpath_closepath:} % \begin{macro}{\@@_softpath_curveto:nnnnnn} % \begin{macro} % { @@ -227,6 +228,7 @@ % \end{macro} % \end{macro} % \end{macro} +% \end{macro} % % \begin{macro} % { @@ -260,12 +262,14 @@ { \@@_backend_lineto:nn {#1} {#2} } \cs_new_protected:Npn \@@_softpath_moveto_op:nn #1#2 { \@@_backend_moveto:nn {#1} {#2} } -\cs_new_protected:Npn \@@_softpath_roundpoint_op:nn #1#2 { } +\cs_new_protected:Npn \@@_softpath_roundpoint_op:nn #1#2 + { \@@_softpath_roundpoint_op:nn } \cs_new_protected:Npn \@@_softpath_rectangle_opi:nn #1#2 { \@@_softpath_rectangle_opi:nnNnn {#1} {#2} } \cs_new_protected:Npn \@@_softpath_rectangle_opi:nnNnn #1#2#3#4#5 { \@@_backend_rectangle:nnnn {#1} {#2} {#4} {#5} } - \cs_new_protected:Npn \@@_softpath_rectangle_opii:nn #1#2 { } +\cs_new_protected:Npn \@@_softpath_rectangle_opii:nn #1#2 + { \@@_softpath_rectangle_opii:nn } % \end{macrocode} % \end{macro} % \end{macro} diff --git a/macros/latex/contrib/l3experimental/l3draw-state.dtx b/macros/latex/contrib/l3experimental/l3draw-state.dtx index aef5c2111d..989c10fc2d 100644 --- a/macros/latex/contrib/l3experimental/l3draw-state.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-state.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2024-02-20} +% \date{Released 2024-03-14} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-transforms.dtx b/macros/latex/contrib/l3experimental/l3draw-transforms.dtx index 8e9143420e..411bf30928 100644 --- a/macros/latex/contrib/l3experimental/l3draw-transforms.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-transforms.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2024-02-20} +% \date{Released 2024-03-14} % % \maketitle % @@ -114,6 +114,7 @@ \fp_zero:N \l_@@_matrix_b_fp \fp_zero:N \l_@@_matrix_c_fp \fp_set:Nn \l_@@_matrix_d_fp { 1 } + \bool_set_false:N \l_@@_matrix_active_bool } \cs_new_protected:Npn \draw_transform_shift_reset: { @@ -219,7 +220,7 @@ \fp_to_dim:n { #1 + - ( #3 * \l_@@_matrix_a_fp + #4 * \l_@@_matrix_b_fp ) + ( #3 * \l_@@_matrix_a_fp + #4 * \l_@@_matrix_c_fp ) } } \dim_set:Nn \l_@@_yshift_dim @@ -227,7 +228,7 @@ \fp_to_dim:n { #2 + - ( #3 * \l_@@_matrix_c_fp + #4 * \l_@@_matrix_d_fp ) + ( #3 * \l_@@_matrix_b_fp + #4 * \l_@@_matrix_d_fp ) } } } diff --git a/macros/latex/contrib/l3experimental/l3draw.dtx b/macros/latex/contrib/l3experimental/l3draw.dtx index 2bfa4e00af..a884b922b2 100644 --- a/macros/latex/contrib/l3experimental/l3draw.dtx +++ b/macros/latex/contrib/l3experimental/l3draw.dtx @@ -110,7 +110,7 @@ % }^^A % } % -% \date{Released 2024-02-20} +% \date{Released 2024-03-14} % % \maketitle % @@ -583,7 +583,7 @@ % % \begin{function}{\draw_path_corner_arc:nn} % \begin{syntax} -% \cs{draw_path_corner_arc:n} \Arg{length1} \Arg{length2} +% \cs{draw_path_corner_arc:nn} \Arg{length1} \Arg{length2} % \end{syntax} % Sets the degree of rounding applied to corners in a path: the two % \meta{length} values are the distances from the corner at which the curving @@ -658,6 +658,18 @@ % at the macro level). % \end{function} % +% \begin{function}{\draw_path_replace_bb:} +% \begin{syntax} +% \cs{draw_path_replace_bb:} +% \end{syntax} +% Replaces the current bounding box of the drawing with one specified by the +% current path: this will be applied even when \cs{l_draw_bb_update_bool} +% is \texttt{false}. The current path is then cleared. Note that +% \cs{l_draw_bb_update_bool} is \emph{not} changed by this function: +% the user may wish to set it to \texttt{false} so that the bounding box +% is then left unchanged by further operations. +% \end{function} +% % \subsubsection{Path operations on drawing axes} % % The standard path functions are all influenced by the active transformation @@ -1181,7 +1193,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3draw}{2024-02-20}{} +\ProvidesExplPackage{l3draw}{2024-03-14}{} {L3 Experimental core drawing support} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3draw.pdf b/macros/latex/contrib/l3experimental/l3draw.pdf index a0941015ed..64b6ca1e50 100644 Binary files a/macros/latex/contrib/l3experimental/l3draw.pdf and b/macros/latex/contrib/l3experimental/l3draw.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3galley.dtx b/macros/latex/contrib/l3experimental/l3galley.dtx index 724d0d151d..8299d51d11 100644 --- a/macros/latex/contrib/l3experimental/l3galley.dtx +++ b/macros/latex/contrib/l3experimental/l3galley.dtx @@ -61,7 +61,7 @@ % }^^A % } % -% \date{Released 2024-02-20} +% \date{Released 2024-03-14} % % \maketitle % @@ -686,7 +686,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3galley}{2024-02-20}{} +\ProvidesExplPackage{l3galley}{2024-03-14}{} {L3 Experimental galley code} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3galley.pdf b/macros/latex/contrib/l3experimental/l3galley.pdf index b37d9194e4..d51755044e 100644 Binary files a/macros/latex/contrib/l3experimental/l3galley.pdf and b/macros/latex/contrib/l3experimental/l3galley.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3graphics.dtx b/macros/latex/contrib/l3experimental/l3graphics.dtx index ccb6f9669b..97be8ac39b 100644 --- a/macros/latex/contrib/l3experimental/l3graphics.dtx +++ b/macros/latex/contrib/l3experimental/l3graphics.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2024-02-20} +% \date{Released 2024-03-14} % % \maketitle % @@ -184,7 +184,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3graphics}{2024-02-20}{} +\ProvidesExplPackage{l3graphics}{2024-03-14}{} {L3 Experimental graphics inclusion support} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3graphics.pdf b/macros/latex/contrib/l3experimental/l3graphics.pdf index dd47e3b10f..8a5787f524 100644 Binary files a/macros/latex/contrib/l3experimental/l3graphics.pdf and b/macros/latex/contrib/l3experimental/l3graphics.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3opacity.dtx b/macros/latex/contrib/l3experimental/l3opacity.dtx index ba251f971d..fb293fd31c 100644 --- a/macros/latex/contrib/l3experimental/l3opacity.dtx +++ b/macros/latex/contrib/l3experimental/l3opacity.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Released 2024-02-20} +% \date{Released 2024-03-14} % % \maketitle % @@ -65,6 +65,12 @@ % particular, using Adobe Distiller, you will need to enable transparency % in the (text-based) configuration: this is not selectable from the GUI. % +% For users of PDF-based routes, note that opacity only takes effect if +% a \cs{DocumentMetadata}|{}| is added \emph{before} +% \cs[no-index]{documentclass}, which loads and activates +% the PDF management. +% See \file{pdfmanagement-testphase.pdf} for more info. +% % \begin{function}[added = 2021-07-01]{\opacity_select:n} % \begin{syntax} % \cs{opacity_select:n} \Arg{expression} @@ -96,13 +102,21 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3opacity}{2024-02-20}{} +\ProvidesExplPackage{l3opacity}{2024-03-14}{} {L3 Experimental opacity support} % \end{macrocode} % +% \begin{variable} +% Temporary storage. +% \begin{macrocode} +\fp_new:N \l_@@_tmp_fp +% \end{macrocode} +% \end{variable} +% % \begin{macro}{\opacity_select:n, \opacity_fill:n, \opacity_stroke:n} -% \begin{macro}{\@@_select:nN, \@@_select_aux:nN} -% Thin wrapper with error checking. +% \begin{macro}{\@@_select:nN} +% Thin wrapper with error checking. Opacity is passed to backend +% functions as a bounded, evaluated decimal number. % \begin{macrocode} \cs_new_protected:Npn \opacity_select:n #1 { \@@_select:nN {#1} \@@_backend_select:n } @@ -111,14 +125,13 @@ \cs_new_protected:Npn \opacity_stroke:n #1 { \@@_select:nN {#1} \@@_backend_stroke:n } \cs_new_protected:Npn \@@_select:nN #1#2 - { \exp_args:Ne \@@_select_aux:nN { \fp_eval:n {#1} } #2 } -\cs_new_protected:Npn \@@_select_aux:nN #1#2 { + \fp_set:Nn \l_@@_tmp_fp { #1 } \bool_lazy_or:nnTF - { \fp_compare_p:nNn {#1} < { 0 } } - { \fp_compare_p:nNn {#1} > { 1 } } + { \fp_compare_p:nNn \l_@@_tmp_fp < \c_zero_fp } + { \fp_compare_p:nNn \l_@@_tmp_fp > \c_one_fp } { \msg_error:nnn { opacity } { out-of-range } {#1} } - { #2 {#1} } + { \exp_args:Ne #2 { \fp_use:N \l_@@_tmp_fp } } } \msg_new:nnnn { opacity } { out-of-range } { Opacity~value~out~of~range. } diff --git a/macros/latex/contrib/l3experimental/l3opacity.pdf b/macros/latex/contrib/l3experimental/l3opacity.pdf index 7f0af34a48..e51f0341b3 100644 Binary files a/macros/latex/contrib/l3experimental/l3opacity.pdf and b/macros/latex/contrib/l3experimental/l3opacity.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3str-format.dtx b/macros/latex/contrib/l3experimental/l3str-format.dtx index 24aad77872..9ff5b451a9 100644 --- a/macros/latex/contrib/l3experimental/l3str-format.dtx +++ b/macros/latex/contrib/l3experimental/l3str-format.dtx @@ -48,7 +48,7 @@ % }^^A % } % -% \date{Released 2024-02-20} +% \date{Released 2024-03-14} % % \maketitle % @@ -166,7 +166,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3str-format}{2024-02-20}{} +\ProvidesExplPackage{l3str-format}{2024-03-14}{} {L3 Experimental string formatting} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3str-format.pdf b/macros/latex/contrib/l3experimental/l3str-format.pdf index 45bd5bd4c2..f1203b80c2 100644 Binary files a/macros/latex/contrib/l3experimental/l3str-format.pdf and b/macros/latex/contrib/l3experimental/l3str-format.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3sys-shell.dtx b/macros/latex/contrib/l3experimental/l3sys-shell.dtx deleted file mode 100644 index 186a03d87a..0000000000 --- a/macros/latex/contrib/l3experimental/l3sys-shell.dtx +++ /dev/null @@ -1,446 +0,0 @@ -% \iffalse meta-comment -% -%% File: l3sys-shell.dtx -% -% Copyright (C) 2018-2024 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 -% -% http://www.latex-project.org/lppl.txt -% -% This file is part of the "l3experimental 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|package> -\RequirePackage{expl3} -% -%<*driver> -\documentclass[full]{l3doc} -\begin{document} - \DocInput{\jobname.dtx} -\end{document} -% -% \fi -% -% \title{^^A -% The \pkg{l3sys-shell} package\\ System shell functions^^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 2024-02-20} -% -% \maketitle -% -% \begin{documentation} -% -% This module provides platform-neutral interfaces to system shell commands. -% These functions can only access the shell if a document is proceeded using -% \texttt{--shell-escape}, which allows \emph{unrestricted} access to command -% line functions. -% -% In general, arbitrary documents should \emph{not} be processed in this way, -% as shell escape could either accidentally or deliberately lead to unexpected -% side-effects. In that sense, they should be treated like any other arbitrary -% script: with caution. No attempt is made by the functions here to avoid -% injection of additional commands into the arguments. -% -% With the above security caveats in mind, these functions are provided for -% authors where a workflow scripting \emph{within} a \LaTeX{} document is -% preferable to using an external script. The latter would of course also have -% the ability to run arbitrary code. -% -% \begin{function}[added = 2018-07-28]{\sys_shell_cp:nn} -% \begin{syntax} -% \cs{sys_shell_cp:nn} \Arg{source} \Arg{dest} -% \end{syntax} -% Copies the files specified in the \meta{source} (which may include -% wildcards) to the \meta{dest}. The file paths should be specified using -% |/| as a path separator. Copying is \emph{not} recursive: only files at -% the path level given are copied. If unrestricted shell escape is not -% enabled, no action is attempted. -% \end{function} -% -% \begin{function}[added = 2018-07-27]{\sys_shell_mkdir:n} -% \begin{syntax} -% \cs{sys_shell_mkdir:n} \Arg{directory} -% \end{syntax} -% Creates the \meta{directory}, which should be specified using |/| as -% a path separator. If unrestricted shell escape is not enabled, no action is -% attempted. -% \end{function} -% -% \begin{function}[added = 2018-07-28]{\sys_shell_mv:nn} -% \begin{syntax} -% \cs{sys_shell_mv:nn} \Arg{old} \Arg{new} -% \end{syntax} -% Moves the files from the \meta{old} to \meta{new} names/locations: the -% \meta{old} names may include wildcards. In both arguments, |/| should be -% used as the path separator. If unrestricted shell escape is not enabled, no -% action is attempted. -% \end{function} -% -% \begin{function}[added = 2018-07-27]{\sys_shell_rm:n} -% \begin{syntax} -% \cs{sys_shell_rm:n} \Arg{files} -% \end{syntax} -% Removes the \meta{files} (which may include wildcards). The file path should -% be specified using |/| as a path separator. If unrestricted shell escape is -% not enabled, no action is attempted. -% \end{function} -% -% \begin{function}[added = 2018-07-27]{\sys_shell_rmdir:n} -% \begin{syntax} -% \cs{sys_shell_rmdir:n} \Arg{directory} -% \end{syntax} -% Removes the \meta{directory}, which should be specified using |/| as -% a path separator. If unrestricted shell escape is not enabled, no action is -% attempted. -% \end{function} -% -% \begin{function}[added = 2018-07-28]{\sys_get_shell_pwd:N} -% \begin{syntax} -% \cs{sys_get_shell_pwd:N} \meta{str var} -% \end{syntax} -% Sets the \meta{str var} to the present working directory (the output of -% |pwd| on Unix or |cd| on Windows). Note that on Windows this will contain -% string backslash chars (|\|). If unrestricted shell escape is not -% enabled, no action is taken. -% \end{function} -% -% \begin{function}[added = 2018-07-28, updated = 2024-02-20] -% {\sys_shell_split_ls:nN} -% \begin{syntax} -% \cs{sys_shell_split_ls:N} \Arg{glob} \meta{seq} -% \end{syntax} -% Sets the \meta{seq var} to contain one entry per directory listing -% (equivalent to |ls -1| or |dir /b /s| with relative paths) as specified by -% the \meta{glob}: the entries are strings. If unrestricted shell is not -% enabled, no action is taken. -% \end{function} -% -% \end{documentation} -% -% \begin{implementation} -% -% \section{\pkg{l3sys-shell} implementation} -% -% \begin{macrocode} -%<*package> -% \end{macrocode} -% -% \begin{macrocode} -%<@@=sys> -% \end{macrocode} -% -% \begin{macrocode} -\ProvidesExplPackage{l3sys-shell}{2024-02-20}{} - {L3 Experimental system shell functions} -% \end{macrocode} -% -% \begin{variable}{\s_@@_stop} -% Internal scan marks. -% \begin{macrocode} -\scan_new:N \s_@@_stop -% \end{macrocode} -% \end{variable} -% -% \begin{variable}{\q_@@_nil} -% Internal quarks. -% \begin{macrocode} -\quark_new:N \q_@@_nil -% \end{macrocode} -% \end{variable} -% -% \begin{macro}[pTF]{\@@_quark_if_nil:n} -% Branching quark conditional. -% \begin{macrocode} -\__kernel_quark_new_conditional:Nn \@@_quark_if_nil:N { F } -% \end{macrocode} -% \end{macro} -% -% \begin{macro}[EXP]{\@@_path_to_win:n} -% \begin{macro}[EXP]{\@@_path_to_win:w} -% \begin{macro}[EXP]{\@@_path_to_win:N} -% A simple expandable search-and-replace for providing Windows-style paths. -% \begin{macrocode} -\cs_new:Npn \@@_path_to_win:n #1 - { - \exp_after:wN \@@_path_to_win:w \tl_to_str:n {#1} ~ \s_@@_stop - } -\cs_new:Npn \@@_path_to_win:w #1 ~ #2 \s_@@_stop - { - \@@_path_to_win:N #1 \q_@@_nil - \tl_if_empty:nF {#2} - { - \c_space_tl - \@@_path_to_win:w #2 \s_@@_stop - } - } -\cs_new:Npn \@@_path_to_win:N #1 - { - \@@_quark_if_nil:NF #1 - { - \token_if_eq_meaning:NNTF #1 / - { \c_backslash_str } - {#1} - \@@_path_to_win:N - } - } -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\sys_shell_cp:nn} -% Simple Unix-like file copying: at some stage we may need a directory-only -% version as Windows and Unix have different requirements here. -% \begin{macrocode} -\cs_new_protected:Npe \sys_shell_cp:nn #1#2 - { - \sys_if_shell_unrestricted:T - { - \sys_shell_now:e - { - \sys_if_platform_unix:T - { - cp~-f~ \exp_not:N \tl_to_str:n {#1} ~ - \exp_not:N \tl_to_str:n {#2} - } - \sys_if_platform_windows:T - { - copy~/y~ \exp_not:N \@@_path_to_win:n {#1} ~ - \exp_not:N \@@_path_to_win:n {#2} - } - } - } - } -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\sys_shell_mkdir:n} -% Windows (with the extensions) will automatically make directory trees but -% issues a warning if the directory already exists: avoid by including a -% test. -% \begin{macrocode} -\cs_new_protected:Npe \sys_shell_mkdir:n #1 - { - \sys_if_shell_unrestricted:T - { - \sys_shell_now:e - { - \sys_if_platform_unix:T - { mkdir~-p~ \exp_not:N \tl_to_str:n {#1} } - \sys_if_platform_windows:T - { - if~not~exist~ - \exp_not:N \@@_path_to_win:n { #1 / nul } ~ - mkdir~ \exp_not:N \@@_path_to_win:n {#1} - } - } - } - } -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\sys_shell_mv:nn} -% On Windows we do not have a single |mv| operation, so copy-and-delete -% instead. -% \begin{macrocode} -\cs_new_protected:Npe \sys_shell_mv:nn #1#2 - { - \sys_if_shell_unrestricted:T - { - \sys_shell_now:e - { - \sys_if_platform_unix:T - { - mv~ \exp_not:N \tl_to_str:n {#1} ~ - \exp_not:N \tl_to_str:n {#2} - } - \sys_if_platform_windows:T - { - copy~/y~ \exp_not:N \@@_path_to_win:n {#1} ~ - \exp_not:N \@@_path_to_win:n {#2} - \token_to_str:N & \token_to_str:N & - del~/f~/q~\exp_not:N \@@_path_to_win:n {#1} - } - } - } - } -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\sys_shell_rm:n} -% Deletion: obviously a big health warning here! -% \begin{macrocode} -\cs_new_protected:Npe \sys_shell_rm:n #1 - { - \sys_if_shell_unrestricted:T - { - \sys_shell_now:e - { - \sys_if_platform_unix:T - { rm~-f~ \exp_not:N \tl_to_str:n {#1} } - \sys_if_platform_windows:T - { del~/f~/q~ \exp_not:N \@@_path_to_win:n {#1} } - } - } - } -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\sys_shell_rmdir:n} -% When removing a directory, we create it first as that avoids errors in -% the Windows case. -% \begin{macrocode} -\cs_new_protected:Npe \sys_shell_rmdir:n #1 - { - \sys_if_shell_unrestricted:T - { - \sys_shell_mkdir:n {#1} - \sys_shell_now:e - { - \sys_if_platform_unix:T - { rm~-rf~ \exp_not:N \tl_to_str:n {#1} } - \sys_if_platform_windows:T - { rmdir~/s~/q~ \exp_not:N \@@_path_to_win:n {#1} } - } - } - } -% \end{macrocode} -% \end{macro} -% -% \begin{variable}{\l_@@_tmp_seq, \l_@@_tmp_tl} -% Scratch space. -% \begin{macrocode} -\seq_new:N \l_@@_tmp_seq -\tl_new:N \l_@@_tmp_tl -% \end{macrocode} -% \end{variable} -% -% \begin{macro}{\sys_get_shell_pwd:N} -% Getting the path is easy: the main work is avoiding loosing any -% information. (This information can be obtained using the recorder file: -% that does not require shell escape. However, it's hard to see how it might -% be useful without the other file functions.) -% \begin{macrocode} -\cs_new_protected:Npe \sys_get_shell_pwd:N #1 - { - \sys_if_shell_unrestricted:T - { - \exp_not:N \sys_get_shell:nnN - { - \sys_if_platform_unix:T { pwd } - \sys_if_platform_windows:T { cd } - } - { - \char_set_catcode_other:N \exp_not:N \\ - \char_set_catcode_other:N \exp_not:N \# - \char_set_catcode_other:N \exp_not:N \~ - \char_set_catcode_other:N \exp_not:N \% - \char_set_catcode_space:N \exp_not:N \ % - \tex_endlinechar:D -1 \scan_stop: - } - \exp_not:N \l_@@_tmp_tl - \str_set:NV #1 \exp_not:N \l_@@_tmp_tl - } - } -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\sys_shell_split_ls:nN} -% \begin{macro}{\@@_shell_split_ls:nN} -% \begin{macro}{\@@_shell_split_ls:w} -% Getting a one-per-line listing is easy enough. We need to set -% \cs{ExplSyntaxOff} as that deals with the end-of-line character. After that, -% just a case of tidying up. The listing always ends in |^^M| so there is an -% extra entry to trim. -% \begin{macrocode} -\cs_new_protected:Npe \sys_shell_split_ls:nN #1#2 - { - \sys_if_shell_unrestricted:T - { - \exp_not:N \exp_args:Ne \exp_not:N \sys_get_shell:nnN - { - \sys_if_platform_unix:T { ls~-1~ #1 } - \sys_if_platform_windows:T - { dir~/b~/s~ \exp_not:N \@@_path_to_win:n {#1} } - } - { - \ExplSyntaxOff - \char_set_catcode_other:N \exp_not:N \\ - \char_set_catcode_other:N \exp_not:N \# - \char_set_catcode_other:N \exp_not:N \~ - \char_set_catcode_other:N \exp_not:N \% - \char_set_catcode_other:n { 13 } - } - \exp_not:N \l_@@_tmp_tl - \str_set:NV \exp_not:N \l_@@_tmp_tl \exp_not:N \l_@@_tmp_tl - \seq_set_split:NnV #2 { \char_generate:nn { `\^^M } { 12 } } - \exp_not:N \l_@@_tmp_tl - \seq_pop_right:NN #2 \exp_not:N \l_@@_tmp_tl - \exp_not:N \tl_if_blank:eTF { \exp_not:N \seq_item:Nn #2 { 1 } } - { \seq_clear:N #2 } - \sys_if_platform_windows:T - { - \sys_get_shell_pwd:N \exp_not:N \l_@@_tmp_tl - \exp_not:N \exp_args:NV \exp_not:N \@@_shell_split_ls:nN - \exp_not:N \l_@@_tmp_tl #2 - } - } - } -% \end{macrocode} -% On Windows, we can either get just file names (|dir /b|) or file names with -% complete paths (|dir /s /b|), but not file names with relative paths in -% a simple way. So we take the full paths and trim off the current working -% directory. Normalization gives the same results as |ls|, hopefully. -% \begin{macrocode} -\sys_if_platform_windows:T - { - \cs_new_protected:Npe \@@_shell_split_ls:nN #1#2 - { - \cs_set:Npn \exp_not:N \@@_shell_split_ls:w #1 \c_backslash_str { } - \seq_set_eq:NN \exp_not:N \l_@@_tmp_seq #2 - \seq_clear:N #2 - \seq_map_inline:Nn \exp_not:N \l_@@_tmp_seq - { - \tl_set:Ne \exp_not:N \l_@@_tmp_tl - { \exp_not:N \@@_shell_split_ls:w ##1 } - \tl_replace_all:Nnn \exp_not:N \l_@@_tmp_tl - { \c_backslash_str } { / } - \seq_put_right:NV #2 \exp_not:N \l_@@_tmp_tl - } - } - \cs_new:Npn \@@_shell_split_ls:w { } - } -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% -% \begin{macrocode} -% -% \end{macrocode} -% -% \end{implementation} -% -% \PrintIndex diff --git a/macros/latex/contrib/l3experimental/l3sys-shell.ins b/macros/latex/contrib/l3experimental/l3sys-shell.ins deleted file mode 100644 index 8e5e7169d9..0000000000 --- a/macros/latex/contrib/l3experimental/l3sys-shell.ins +++ /dev/null @@ -1,62 +0,0 @@ -\iffalse meta-comment - -File: l3sys-shell.ins - -Copyright (C) 2018-2024 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 - - http://www.latex-project.org/lppl.txt - -This file is part of the "l3experimental 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. - ------------------------------------------------------------------------ - -Any modification of this file should ensure that the copyright and -license information is placed in the derived files. - -\fi - -\input docstrip % -\askforoverwritefalse - -\preamble - -Copyright (C) 2018-2024 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: - - http://www.latex-project.org/lppl.txt - -This file is part of the "l3experimental bundle" (The Work in LPPL) -and all files in that bundle must be distributed together. - -\endpreamble -% stop docstrip adding \endinput -\postamble -\endpostamble - -\keepsilent - -\generate{\file{l3sys-shell.sty} - { - \from{l3sys-shell.dtx}{package} - } -} - -\endbatchfile diff --git a/macros/latex/contrib/l3experimental/l3sys-shell.pdf b/macros/latex/contrib/l3experimental/l3sys-shell.pdf deleted file mode 100644 index c35e6f24b6..0000000000 Binary files a/macros/latex/contrib/l3experimental/l3sys-shell.pdf and /dev/null differ diff --git a/macros/latex/contrib/l3experimental/xcoffins.dtx b/macros/latex/contrib/l3experimental/xcoffins.dtx index c84f21ae97..404171ddc1 100644 --- a/macros/latex/contrib/l3experimental/xcoffins.dtx +++ b/macros/latex/contrib/l3experimental/xcoffins.dtx @@ -53,7 +53,7 @@ % }^^A % } % -% \date{Released 2024-02-20} +% \date{Released 2024-03-14} % % \maketitle % @@ -672,7 +672,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xcoffins}{2024-02-20}{} +\ProvidesExplPackage{xcoffins}{2024-03-14}{} {L3 Experimental design level coffins} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/xcoffins.pdf b/macros/latex/contrib/l3experimental/xcoffins.pdf index a8e4ce7d9e..fa4fe50701 100644 Binary files a/macros/latex/contrib/l3experimental/xcoffins.pdf and b/macros/latex/contrib/l3experimental/xcoffins.pdf differ diff --git a/macros/latex/contrib/l3experimental/xgalley.dtx b/macros/latex/contrib/l3experimental/xgalley.dtx index 25344df931..5e4389eb95 100644 --- a/macros/latex/contrib/l3experimental/xgalley.dtx +++ b/macros/latex/contrib/l3experimental/xgalley.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2024-02-20} +% \date{Released 2024-03-14} % % \maketitle % @@ -731,7 +731,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xgalley}{2024-02-20}{} +\ProvidesExplPackage{xgalley}{2024-03-14}{} {L3 Experimental galley} \RequirePackage{xtemplate,l3galley} % \end{macrocode} diff --git a/macros/latex/contrib/l3experimental/xgalley.pdf b/macros/latex/contrib/l3experimental/xgalley.pdf index d08bc86926..5afb51f32e 100644 Binary files a/macros/latex/contrib/l3experimental/xgalley.pdf and b/macros/latex/contrib/l3experimental/xgalley.pdf differ -- cgit v1.2.3