diff options
Diffstat (limited to 'macros/latex/contrib')
147 files changed, 3794 insertions, 664 deletions
diff --git a/macros/latex/contrib/l3backend/CHANGELOG.md b/macros/latex/contrib/l3backend/CHANGELOG.md index 82228400e2..5877ce53d3 100644 --- a/macros/latex/contrib/l3backend/CHANGELOG.md +++ b/macros/latex/contrib/l3backend/CHANGELOG.md @@ -6,11 +6,19 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2023-04-19] + +### Changed +- Pass additional attributes when loading graphics in PDF mode + +### Fixed +- Remove a stray `>` from graphics inclusion code for `dvipdfmx` + ## [2023-03-30] ### Changed -- Integrate l3color and l3opacity with luaotfload to ensure that - opacity specifications don't conflict. +- Integrate `l3color` and `l3opacity` with `luaotfload` to ensure that + opacity specifications don't conflict ## [2023-01-16] @@ -288,7 +296,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/2023-03-30...HEAD +[Unreleased]: https://github.com/latex3/latex3/compare/2023-04-19...HEAD +[2023-04-19]: https://github.com/latex3/latex3/compare/2023-03-30...2023-04-19 [2023-03-30]: https://github.com/latex3/latex3/compare/2023-01-16...2023-03-30 [2023-01-16]: https://github.com/latex3/latex3/compare/2022-10-26...2023-01-16 [2022-10-26]: https://github.com/latex3/latex3/compare/2022-09-28...2022-10-26 diff --git a/macros/latex/contrib/l3backend/README.md b/macros/latex/contrib/l3backend/README.md index 02fab16f9f..0aa2b14b5f 100644 --- a/macros/latex/contrib/l3backend/README.md +++ b/macros/latex/contrib/l3backend/README.md @@ -1,7 +1,7 @@ LaTeX3 Backend Drivers ====================== -Release 2023-03-30 +Release 2023-04-19 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 1f821aff25..cf4ad444ba 100644 --- a/macros/latex/contrib/l3backend/l3backend-basics.dtx +++ b/macros/latex/contrib/l3backend/l3backend-basics.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % @@ -70,27 +70,27 @@ % \begin{macrocode} \ProvidesExplFile %<*dvipdfmx> - {l3backend-dvipdfmx.def}{2023-03-30}{} + {l3backend-dvipdfmx.def}{2023-04-19}{} {L3 backend support: dvipdfmx} %</dvipdfmx> %<*dvips> - {l3backend-dvips.def}{2023-03-30}{} + {l3backend-dvips.def}{2023-04-19}{} {L3 backend support: dvips} %</dvips> %<*dvisvgm> - {l3backend-dvisvgm.def}{2023-03-30}{} + {l3backend-dvisvgm.def}{2023-04-19}{} {L3 backend support: dvisvgm} %</dvisvgm> %<*luatex> - {l3backend-luatex.def}{2023-03-30}{} + {l3backend-luatex.def}{2023-04-19}{} {L3 backend support: PDF output (LuaTeX)} %</luatex> %<*pdftex> - {l3backend-pdftex.def}{2023-03-30}{} + {l3backend-pdftex.def}{2023-04-19}{} {L3 backend support: PDF output (pdfTeX)} %</pdftex> %<*xetex> - {l3backend-xetex.def}{2023-03-30}{} + {l3backend-xetex.def}{2023-04-19}{} {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 ae7e2281fc..6d8d4ede02 100644 --- a/macros/latex/contrib/l3backend/l3backend-box.dtx +++ b/macros/latex/contrib/l3backend/l3backend-box.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3backend/l3backend-code.pdf b/macros/latex/contrib/l3backend/l3backend-code.pdf Binary files differindex 1ce7f2d3a8..6f9ea9a52e 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 786282333e..5049aae5f9 100644 --- a/macros/latex/contrib/l3backend/l3backend-color.dtx +++ b/macros/latex/contrib/l3backend/l3backend-color.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3backend/l3backend-draw.dtx b/macros/latex/contrib/l3backend/l3backend-draw.dtx index 6577bc3008..170f4090cd 100644 --- a/macros/latex/contrib/l3backend/l3backend-draw.dtx +++ b/macros/latex/contrib/l3backend/l3backend-draw.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3backend/l3backend-graphics.dtx b/macros/latex/contrib/l3backend/l3backend-graphics.dtx index b042bd04e5..da7dc7516e 100644 --- a/macros/latex/contrib/l3backend/l3backend-graphics.dtx +++ b/macros/latex/contrib/l3backend/l3backend-graphics.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % @@ -68,7 +68,7 @@ \cs_if_exist:NTF \hook_gput_code:nnn { \hook_gput_code:nnn - { file / l3graphics.sty / after } + { package / l3graphics / after } { backend } {#1} } @@ -148,7 +148,7 @@ % \end{macrocode} % \end{variable} % -% \begin{variable}{\l_@@_graphics_attr_tl} +% \begin{variable}{\l_@@_attr_tl} % In PDF mode, additional attributes of an graphic (such as page number) are % needed both to obtain the bounding box and when inserting the graphic: this % occurs as the graphic dictionary approach means they are read as part of @@ -156,7 +156,7 @@ % attributes using a dedicated |tl| rather than build up the same data % twice. % \begin{macrocode} -\tl_new:N \l_@@_graphics_attr_tl +\tl_new:N \l_@@_attr_tl % \end{macrocode} % \end{variable} % @@ -185,14 +185,15 @@ { \int_zero:N \l_@@_page_int \tl_clear:N \l_@@_pagebox_tl - \tl_set:Nx \l_@@_graphics_attr_tl + \tl_set:Nx \l_@@_attr_tl { \tl_if_empty:NF \l_@@_decodearray_str { :D \l_@@_decodearray_str } \bool_if:NT \l_@@_interpolate_bool { :I } + \str_if_empty:NF \l_@@_pdf_str + { :X \l_@@_pdf_str } } - \tl_clear:N \l_@@_graphics_attr_tl \@@_backend_getbb_auxi:n {#1} } \cs_new_eq:NN \@@_backend_getbb_jpeg:n \@@_backend_getbb_jpg:n @@ -201,17 +202,19 @@ { \tl_clear:N \l_@@_decodearray_str \bool_set_false:N \l_@@_interpolate_bool - \tl_set:Nx \l_@@_graphics_attr_tl + \tl_set:Nx \l_@@_attr_tl { : \l_@@_pagebox_tl \int_compare:nNnT \l_@@_page_int > 1 { :P \int_use:N \l_@@_page_int } + \str_if_empty:NF \l_@@_pdf_str + { :X \l_@@_pdf_str } } \@@_backend_getbb_auxi:n {#1} } \cs_new_protected:Npn \@@_backend_getbb_auxi:n #1 { - \@@_bb_restore:xF { #1 \l_@@_graphics_attr_tl } + \@@_bb_restore:xF { #1 \l_@@_attr_tl } { \@@_backend_getbb_auxii:n {#1} } } % \end{macrocode} @@ -225,16 +228,19 @@ { \exp_args:Ne \@@_backend_getbb_auxiii:n { \@@_backend_dequote:w #1 " #1 " \s_@@_stop } - \int_const:cn { c_@@_ #1 \l_@@_graphics_attr_tl _int } + \int_const:cn { c_@@_ #1 \l_@@_attr_tl _int } { \tex_the:D \tex_pdflastximage:D } - \@@_bb_save:x { #1 \l_@@_graphics_attr_tl } + \@@_bb_save:x { #1 \l_@@_attr_tl } } \cs_new_protected:Npn \@@_backend_getbb_auxiii:n #1 { \tex_immediate:D \tex_pdfximage:D - \bool_lazy_or:nnT - { \l_@@_interpolate_bool } - { ! \tl_if_empty_p:N \l_@@_decodearray_str } + \bool_lazy_any:nT + { + { \l_@@_interpolate_bool } + { ! \tl_if_empty_p:N \l_@@_decodearray_str } + { ! \str_if_empty_p:N \l_@@_pdf_str } + } { attr ~ { @@ -242,6 +248,7 @@ { /Decode~[ \l_@@_decodearray_str ] } \bool_if:NT \l_@@_interpolate_bool { /Interpolate~true } + \l_@@_pdf_str } } \int_compare:nNnT \l_@@_page_int > 0 @@ -274,7 +281,7 @@ \cs_new_protected:Npn \@@_backend_include_jpg:n #1 { \tex_pdfrefximage:D - \int_use:c { c_@@_ #1 \l_@@_graphics_attr_tl _int } + \int_use:c { c_@@_ #1 \l_@@_attr_tl _int } } \cs_new_eq:NN \@@_backend_include_jpeg:n \@@_backend_include_jpg:n \cs_new_eq:NN \@@_backend_include_pdf:n \@@_backend_include_jpg:n @@ -522,7 +529,7 @@ \tl_if_empty:NF \l_@@_decodearray_str { /Decode~[ \l_@@_decodearray_str ] } \bool_if:NT \l_@@_interpolate_bool - { /Interpolate~true> } + { /Interpolate~true } >> } } diff --git a/macros/latex/contrib/l3backend/l3backend-header.dtx b/macros/latex/contrib/l3backend/l3backend-header.dtx index 595e6a2924..0cb6767908 100644 --- a/macros/latex/contrib/l3backend/l3backend-header.dtx +++ b/macros/latex/contrib/l3backend/l3backend-header.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3backend/l3backend-opacity.dtx b/macros/latex/contrib/l3backend/l3backend-opacity.dtx index 3f3dd1c84a..033ab150f0 100644 --- a/macros/latex/contrib/l3backend/l3backend-opacity.dtx +++ b/macros/latex/contrib/l3backend/l3backend-opacity.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3backend/l3backend-pdf.dtx b/macros/latex/contrib/l3backend/l3backend-pdf.dtx index bb80237d4d..a95aff4070 100644 --- a/macros/latex/contrib/l3backend/l3backend-pdf.dtx +++ b/macros/latex/contrib/l3backend/l3backend-pdf.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % @@ -69,7 +69,11 @@ % \subsection{Shared code} % % A very small number of items that belong at the backend level but which -% are common to all backends. +% are common to most backends. +% +% \begin{macrocode} +%<*!dvisvgm> +% \end{macrocode} % % \begin{variable}{\l_@@_internal_box} % \begin{macrocode} @@ -77,6 +81,10 @@ % \end{macrocode} % \end{variable} % +% \begin{macrocode} +%</!dvisvgm> +% \end{macrocode} +% % \subsection{\texttt{dvips} backend} % % \begin{macrocode} diff --git a/macros/latex/contrib/l3experimental/CHANGELOG.md b/macros/latex/contrib/l3experimental/CHANGELOG.md index a3be92ce0f..fa3928d933 100644 --- a/macros/latex/contrib/l3experimental/CHANGELOG.md +++ b/macros/latex/contrib/l3experimental/CHANGELOG.md @@ -7,6 +7,14 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2023-04-19] + +### Added +- Key `pdf-attr` to `l3graphics` for additional attribute setting + +### Fixed +- Grouping in `\draw_path_arc_axes:nnnn` (see \#1195) + ## [2023-03-30] ### Fixed @@ -262,7 +270,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/2023-03-30...HEAD +[Unreleased]: https://github.com/latex3/latex3/compare/2023-04-19...HEAD +[2023-04-19]: https://github.com/latex3/latex3/compare/2023-03-30...2023-04-19 [2023-03-30]: https://github.com/latex3/latex3/compare/2023-01-24...2023-03-30 [2023-01-24]: https://github.com/latex3/latex3/compare/2022-04-20...2023-01-24 [2022-04-20]: https://github.com/latex3/latex3/compare/2022-04-10...2022-04-20 diff --git a/macros/latex/contrib/l3experimental/README.md b/macros/latex/contrib/l3experimental/README.md index 9415c76d92..ebd40bba2e 100644 --- a/macros/latex/contrib/l3experimental/README.md +++ b/macros/latex/contrib/l3experimental/README.md @@ -1,7 +1,7 @@ Experimental LaTeX3 Concepts ============================ -Release 2023-03-30 +Release 2023-04-19 Overview -------- diff --git a/macros/latex/contrib/l3experimental/l3benchmark.dtx b/macros/latex/contrib/l3experimental/l3benchmark.dtx index e8290bc435..c8ea43e4ac 100644 --- a/macros/latex/contrib/l3experimental/l3benchmark.dtx +++ b/macros/latex/contrib/l3experimental/l3benchmark.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % @@ -122,7 +122,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3benchmark}{2023-03-30}{} +\ProvidesExplPackage{l3benchmark}{2023-04-19}{} {L3 Experimental benchmarking} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3benchmark.pdf b/macros/latex/contrib/l3experimental/l3benchmark.pdf Binary files differindex 7abb2355b2..e82c024dac 100644 --- a/macros/latex/contrib/l3experimental/l3benchmark.pdf +++ b/macros/latex/contrib/l3experimental/l3benchmark.pdf diff --git a/macros/latex/contrib/l3experimental/l3bitset.dtx b/macros/latex/contrib/l3experimental/l3bitset.dtx index f3b7c26e1c..5eaffe8772 100644 --- a/macros/latex/contrib/l3experimental/l3bitset.dtx +++ b/macros/latex/contrib/l3experimental/l3bitset.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % \begin{documentation} @@ -264,7 +264,7 @@ %<@@=bitset> % \end{macrocode} % \begin{macrocode} -\ProvidesExplPackage{l3bitset}{2023-03-30}{} +\ProvidesExplPackage{l3bitset}{2023-04-19}{} {L3 Experimental bitset support} % \end{macrocode} % A bitset is a string variable. diff --git a/macros/latex/contrib/l3experimental/l3bitset.pdf b/macros/latex/contrib/l3experimental/l3bitset.pdf Binary files differindex b151ffb155..dfcf42b9ab 100644 --- a/macros/latex/contrib/l3experimental/l3bitset.pdf +++ b/macros/latex/contrib/l3experimental/l3bitset.pdf diff --git a/macros/latex/contrib/l3experimental/l3draw-boxes.dtx b/macros/latex/contrib/l3experimental/l3draw-boxes.dtx index c03fa2770a..b07d763e83 100644 --- a/macros/latex/contrib/l3experimental/l3draw-boxes.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-boxes.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-code.pdf b/macros/latex/contrib/l3experimental/l3draw-code.pdf Binary files differindex 3614cec3be..bdac951ab3 100644 --- a/macros/latex/contrib/l3experimental/l3draw-code.pdf +++ b/macros/latex/contrib/l3experimental/l3draw-code.pdf diff --git a/macros/latex/contrib/l3experimental/l3draw-layers.dtx b/macros/latex/contrib/l3experimental/l3draw-layers.dtx index 36f3433092..e72350c26a 100644 --- a/macros/latex/contrib/l3experimental/l3draw-layers.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-layers.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-paths.dtx b/macros/latex/contrib/l3experimental/l3draw-paths.dtx index 70b7608f2b..d747daf2f8 100644 --- a/macros/latex/contrib/l3experimental/l3draw-paths.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-paths.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % @@ -590,8 +590,10 @@ % \begin{macrocode} \cs_new_protected:Npn \draw_path_arc_axes:nnnn #1#2#3#4 { - \draw_transform_triangle:nnn { 0cm , 0cm } {#3} {#4} - \draw_path_arc:nnn {#1} {#2} { 1pt } + \group_begin: + \draw_transform_triangle:nnn { 0cm , 0cm } {#3} {#4} + \draw_path_arc:nnn {#1} {#2} { 1pt } + \group_end: } % \end{macrocode} % \end{macro} diff --git a/macros/latex/contrib/l3experimental/l3draw-points.dtx b/macros/latex/contrib/l3experimental/l3draw-points.dtx index 6467e01202..fea9203745 100644 --- a/macros/latex/contrib/l3experimental/l3draw-points.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-points.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-scopes.dtx b/macros/latex/contrib/l3experimental/l3draw-scopes.dtx index 9727e9ce6e..2601b04f25 100644 --- a/macros/latex/contrib/l3experimental/l3draw-scopes.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-scopes.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-softpath.dtx b/macros/latex/contrib/l3experimental/l3draw-softpath.dtx index 234c4930ef..3b1b4cdf07 100644 --- a/macros/latex/contrib/l3experimental/l3draw-softpath.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-softpath.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-state.dtx b/macros/latex/contrib/l3experimental/l3draw-state.dtx index 86275a5226..aa4b539157 100644 --- a/macros/latex/contrib/l3experimental/l3draw-state.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-state.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-transforms.dtx b/macros/latex/contrib/l3experimental/l3draw-transforms.dtx index e7d370a245..bc15d518bd 100644 --- a/macros/latex/contrib/l3experimental/l3draw-transforms.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-transforms.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % @@ -262,12 +262,12 @@ \@@_point_process:nnn { \@@_point_process:nn - { \@@_tranform_triangle:nnnnnn } + { \@@_transform_triangle:nnnnnn } {#1} } {#2} {#3} } -\cs_new_protected:Npn \@@_tranform_triangle:nnnnnn #1#2#3#4#5#6 +\cs_new_protected:Npn \@@_transform_triangle:nnnnnn #1#2#3#4#5#6 { \use:x { diff --git a/macros/latex/contrib/l3experimental/l3draw.dtx b/macros/latex/contrib/l3experimental/l3draw.dtx index c3d10d3b3e..8aafa2681e 100644 --- a/macros/latex/contrib/l3experimental/l3draw.dtx +++ b/macros/latex/contrib/l3experimental/l3draw.dtx @@ -110,7 +110,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % @@ -340,7 +340,7 @@ % \draw_join_round: % } % \begin{syntax} -% \cs{draw_cap_butt:} +% \cs{draw_join_miter:} % \end{syntax} % Sets the style of stroke joins to one of bevel, miter or round. % \end{function} @@ -1173,7 +1173,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3draw}{2023-03-30}{} +\ProvidesExplPackage{l3draw}{2023-04-19}{} {L3 Experimental core drawing support} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3draw.pdf b/macros/latex/contrib/l3experimental/l3draw.pdf Binary files differindex 30899fd0ca..b087608e83 100644 --- a/macros/latex/contrib/l3experimental/l3draw.pdf +++ b/macros/latex/contrib/l3experimental/l3draw.pdf diff --git a/macros/latex/contrib/l3experimental/l3galley.dtx b/macros/latex/contrib/l3experimental/l3galley.dtx index 405b248b64..5ad2b5c90e 100644 --- a/macros/latex/contrib/l3experimental/l3galley.dtx +++ b/macros/latex/contrib/l3experimental/l3galley.dtx @@ -61,7 +61,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % @@ -686,7 +686,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3galley}{2023-03-30}{} +\ProvidesExplPackage{l3galley}{2023-04-19}{} {L3 Experimental galley code} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3galley.pdf b/macros/latex/contrib/l3experimental/l3galley.pdf Binary files differindex 09c4291374..0470a5b137 100644 --- a/macros/latex/contrib/l3experimental/l3galley.pdf +++ b/macros/latex/contrib/l3experimental/l3galley.pdf diff --git a/macros/latex/contrib/l3experimental/l3graphics.dtx b/macros/latex/contrib/l3experimental/l3graphics.dtx index 942b15fd7d..209660e870 100644 --- a/macros/latex/contrib/l3experimental/l3graphics.dtx +++ b/macros/latex/contrib/l3experimental/l3graphics.dtx @@ -22,9 +22,6 @@ % % for those people who are interested. % -%<*driver|package> -\RequirePackage{expl3} -%</driver|package> %<*driver> \documentclass[full]{l3doc} \begin{document} @@ -46,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % @@ -81,6 +78,13 @@ % which may contain multiple pages. % \end{variable} % +% \begin{variable}{pdf-attr} +% Additional PDF-focussed attributes: available to allow control of +% extended |.pdf| structures beyond those needed for graphic inclusion. +% Due to backend restrictions, this key is only functional with direct +% PDF mode (pdf\TeX{} and Lua\TeX{}). +% \end{variable} +% % \begin{variable}{pagebox} % The nature of the page box setting used to determine the bounding box of % material: used for |.pdf| files which feature multiple page box @@ -88,11 +92,6 @@ % The standard setting is |crop|. % \end{variable} % -% \begin{variable}{draft} -% Switch to enable draft mode: graphics are read but not included when this is -% true. -% \end{variable} -% % \begin{variable}{type} % The type of graphic file beign included: if this key is not set, the % \emph{type} is determined from the file extension. @@ -185,7 +184,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3graphics}{2023-03-30}{} +\ProvidesExplPackage{l3graphics}{2023-04-19}{} {L3 Experimental graphics inclusion support} % \end{macrocode} % @@ -214,6 +213,7 @@ % \l_@@_interpolate_bool , % \l_@@_page_int , % \l_@@_pagebox_tl , +% \l_@@_pdf_str , % \l_@@_type_str % } % Keys which control features of graphics. The standard value of |pagebox| @@ -243,6 +243,8 @@ crop , page .int_set:N = \l_@@_page_int , + pdf-attr .str_set:N = + \l_@@_pdf_str , type . str_set:N = \l_@@_type_str } diff --git a/macros/latex/contrib/l3experimental/l3graphics.pdf b/macros/latex/contrib/l3experimental/l3graphics.pdf Binary files differindex 731fbae62e..3d5fb2bcc2 100644 --- a/macros/latex/contrib/l3experimental/l3graphics.pdf +++ b/macros/latex/contrib/l3experimental/l3graphics.pdf diff --git a/macros/latex/contrib/l3experimental/l3opacity.dtx b/macros/latex/contrib/l3experimental/l3opacity.dtx index 4d2de0fc69..50dac87620 100644 --- a/macros/latex/contrib/l3experimental/l3opacity.dtx +++ b/macros/latex/contrib/l3experimental/l3opacity.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % @@ -96,7 +96,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3opacity}{2023-03-30}{} +\ProvidesExplPackage{l3opacity}{2023-04-19}{} {L3 Experimental opacity support} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3opacity.pdf b/macros/latex/contrib/l3experimental/l3opacity.pdf Binary files differindex 1ed2e3f71e..967c1ca92f 100644 --- a/macros/latex/contrib/l3experimental/l3opacity.pdf +++ b/macros/latex/contrib/l3experimental/l3opacity.pdf diff --git a/macros/latex/contrib/l3experimental/l3str-format.dtx b/macros/latex/contrib/l3experimental/l3str-format.dtx index 05f466dbd4..2616f41a68 100644 --- a/macros/latex/contrib/l3experimental/l3str-format.dtx +++ b/macros/latex/contrib/l3experimental/l3str-format.dtx @@ -48,7 +48,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % @@ -166,7 +166,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3str-format}{2023-03-30}{} +\ProvidesExplPackage{l3str-format}{2023-04-19}{} {L3 Experimental string formatting} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3str-format.pdf b/macros/latex/contrib/l3experimental/l3str-format.pdf Binary files differindex f44719f92a..d315eeffcd 100644 --- a/macros/latex/contrib/l3experimental/l3str-format.pdf +++ b/macros/latex/contrib/l3experimental/l3str-format.pdf diff --git a/macros/latex/contrib/l3experimental/l3sys-shell.dtx b/macros/latex/contrib/l3experimental/l3sys-shell.dtx index f830455bf6..f27e540563 100644 --- a/macros/latex/contrib/l3experimental/l3sys-shell.dtx +++ b/macros/latex/contrib/l3experimental/l3sys-shell.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % @@ -151,7 +151,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3sys-shell}{2023-03-30}{} +\ProvidesExplPackage{l3sys-shell}{2023-04-19}{} {L3 Experimental system shell functions} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3sys-shell.pdf b/macros/latex/contrib/l3experimental/l3sys-shell.pdf Binary files differindex 2c80015c8f..81ed18d9eb 100644 --- a/macros/latex/contrib/l3experimental/l3sys-shell.pdf +++ b/macros/latex/contrib/l3experimental/l3sys-shell.pdf diff --git a/macros/latex/contrib/l3experimental/xcoffins.dtx b/macros/latex/contrib/l3experimental/xcoffins.dtx index 7b41377cc2..49b65d6ff2 100644 --- a/macros/latex/contrib/l3experimental/xcoffins.dtx +++ b/macros/latex/contrib/l3experimental/xcoffins.dtx @@ -53,7 +53,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % @@ -672,7 +672,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xcoffins}{2023-03-30}{} +\ProvidesExplPackage{xcoffins}{2023-04-19}{} {L3 Experimental design level coffins} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/xcoffins.pdf b/macros/latex/contrib/l3experimental/xcoffins.pdf Binary files differindex 09c8d7a162..d5a1678b8f 100644 --- a/macros/latex/contrib/l3experimental/xcoffins.pdf +++ b/macros/latex/contrib/l3experimental/xcoffins.pdf diff --git a/macros/latex/contrib/l3experimental/xgalley.dtx b/macros/latex/contrib/l3experimental/xgalley.dtx index b450528125..f464ca8c02 100644 --- a/macros/latex/contrib/l3experimental/xgalley.dtx +++ b/macros/latex/contrib/l3experimental/xgalley.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % @@ -731,7 +731,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xgalley}{2023-03-30}{} +\ProvidesExplPackage{xgalley}{2023-04-19}{} {L3 Experimental galley} \RequirePackage{xtemplate,l3galley} % \end{macrocode} diff --git a/macros/latex/contrib/l3experimental/xgalley.pdf b/macros/latex/contrib/l3experimental/xgalley.pdf Binary files differindex af229347da..26a7ab7d04 100644 --- a/macros/latex/contrib/l3experimental/xgalley.pdf +++ b/macros/latex/contrib/l3experimental/xgalley.pdf diff --git a/macros/latex/contrib/l3kernel/CHANGELOG.md b/macros/latex/contrib/l3kernel/CHANGELOG.md index 7cbc8d71c0..0545e08858 100644 --- a/macros/latex/contrib/l3kernel/CHANGELOG.md +++ b/macros/latex/contrib/l3kernel/CHANGELOG.md @@ -7,8 +7,27 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] -## [2023-03-30] +## [2023-04-19] + +### Added +- `\box_set_clipped:N` and variants (renamed from `\box_clip:N`) +- `\text_declare_lowercase_mapping:nn(n)`, + `\text_declare_titlecase_mapping:nn(n)` + and `\text_declare_uppercase_mapping:nn(n)` to allow customization of + case changing outcomes + +### Changed +- `\box_set_trim:Nnnnn` and `\box_set_viewport:Nnnnn` moved to + stable kernel +### Fixed +- Incorrect internal name in `\pdf_pagesize_gset:nn` + +### Removed +- Experimental `\box_clip:N` and variants (renamed to + `\box_set_clipped:N`) + +## [2023-03-30] ### Added - `\tex_endlocalcontrol:D` as expl3 name for the LuaTeX primitive @@ -1319,7 +1338,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/2023-03-30...HEAD +[Unreleased]: https://github.com/latex3/latex3/compare/2023-04-19...HEAD +[2023-04-19]: https://github.com/latex3/latex3/compare/2023-03-30...2023-04-19 [2023-03-30]: https://github.com/latex3/latex3/compare/2023-02-22...2023-03-30 [2023-02-22]: https://github.com/latex3/latex3/compare/2023-02-07...2023-02-22 [2023-02-07]: https://github.com/latex3/latex3/compare/2023-02-02...2023-02-07 diff --git a/macros/latex/contrib/l3kernel/README.md b/macros/latex/contrib/l3kernel/README.md index 0df952a621..9438a5eea7 100644 --- a/macros/latex/contrib/l3kernel/README.md +++ b/macros/latex/contrib/l3kernel/README.md @@ -1,7 +1,7 @@ LaTeX3 Programming Conventions ============================== -Release 2023-03-30 +Release 2023-04-19 Overview -------- diff --git a/macros/latex/contrib/l3kernel/expl3.dtx b/macros/latex/contrib/l3kernel/expl3.dtx index 263dff0730..b0392ded24 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{2023-03-30}% +\def\ExplFileDate{2023-04-19}% %<*driver> \documentclass[full]{l3doc} \usepackage{graphicx} @@ -51,7 +51,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/expl3.pdf b/macros/latex/contrib/l3kernel/expl3.pdf Binary files differindex 067a893604..e99e454a52 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 102275e76a..12a87f5da9 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 6824f38aef..3f6b5732c7 100644 --- a/macros/latex/contrib/l3kernel/interface3.tex +++ b/macros/latex/contrib/l3kernel/interface3.tex @@ -62,7 +62,7 @@ for those people who are interested. {latex-team@latex-project.org}% }% } -\date{Released 2023-03-30} +\date{Released 2023-04-19} \pagenumbering{roman} \maketitle diff --git a/macros/latex/contrib/l3kernel/l3basics.dtx b/macros/latex/contrib/l3kernel/l3basics.dtx index 37af99717e..c8acfdf593 100644 --- a/macros/latex/contrib/l3kernel/l3basics.dtx +++ b/macros/latex/contrib/l3kernel/l3basics.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3bootstrap.dtx b/macros/latex/contrib/l3kernel/l3bootstrap.dtx index 73064e4ce4..f757cc2a60 100644 --- a/macros/latex/contrib/l3kernel/l3bootstrap.dtx +++ b/macros/latex/contrib/l3kernel/l3bootstrap.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3box.dtx b/macros/latex/contrib/l3kernel/l3box.dtx index 26fb88edd9..bc24a673fa 100644 --- a/macros/latex/contrib/l3kernel/l3box.dtx +++ b/macros/latex/contrib/l3kernel/l3box.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % @@ -874,6 +874,70 @@ % dependent on the height of the original and \emph{vice versa}. % \end{function} % +% \section{Viewing part of a box} +% +% \begin{function}[updated = 2023-04-14] +% { +% \box_set_clipped:N, \box_set_clipped:c, +% \box_gset_clipped:N, \box_gset_clipped:c +% } +% \begin{syntax} +% \cs{box_set_clipped:N} \meta{box} +% \end{syntax} +% Clips the \meta{box} in the output so that only material inside the +% bounding box is displayed in the output. The updated \meta{box} is an +% hbox, irrespective of the nature of the \meta{box} before the clipping is +% applied. Additional box levels are also generated by this operation. +% +% \begin{texnote} +% Clipping is implemented by the driver, and as such the full content of +% the box is placed in the output file. Thus clipping does not remove +% any information from the raw output, and hidden material can therefore +% be viewed by direct examination of the file. +% \end{texnote} +% \end{function} +% +% \begin{function}[added = 2019-01-23] +% { +% \box_set_trim:Nnnnn, \box_set_trim:cnnnn, +% \box_gset_trim:Nnnnn, \box_gset_trim:cnnnn +% } +% \begin{syntax} +% \cs{box_set_trim:Nnnnn} \meta{box} \Arg{left} \Arg{bottom} \Arg{right} \Arg{top} +% \end{syntax} +% Adjusts the bounding box of the \meta{box} \meta{left} is removed from +% the left-hand edge of the bounding box, \meta{right} from the right-hand +% edge and so fourth. All adjustments are \meta{dim exprs}. +% Material outside of the bounding box is still displayed in the output +% unless \cs{box_set_clipped:N} is subsequently applied. +% The updated \meta{box} is an +% hbox, irrespective of the nature of the \meta{box} before the trim +% operation is applied. +% Additional box levels are also generated by this operation. +% The behavior of the operation where the trims requested is +% greater than the size of the box is undefined. +% \end{function} +% +% \begin{function}[added = 2019-01-23] +% { +% \box_set_viewport:Nnnnn, \box_set_viewport:cnnnn, +% \box_gset_viewport:Nnnnn, \box_gset_viewport:cnnnn +% } +% \begin{syntax} +% \cs{box_set_viewport:Nnnnn} \meta{box} \Arg{llx} \Arg{lly} \Arg{urx} \Arg{ury} +% \end{syntax} +% Adjusts the bounding box of the \meta{box} such that it has lower-left +% co-ordinates (\meta{llx}, \meta{lly}) and upper-right co-ordinates +% (\meta{urx}, \meta{ury}). All four co-ordinate positions are +% \meta{dim exprs}. Material outside of the bounding box is +% still displayed in the output unless \cs{box_set_clipped:N} is +% subsequently applied. +% The updated \meta{box} is an +% hbox, irrespective of the nature of the \meta{box} before the viewport +% operation is applied. +% Additional box levels are also generated by this operation. +% \end{function} +% % \section{Primitive box conditionals} % % \begin{function}[EXP]{\if_hbox:N} @@ -2298,6 +2362,163 @@ % \end{macrocode} % \end{macro} % +% \subsection{Viewing part of a box} +% +% \begin{macro}{\box_set_clipped:N, \box_set_clipped:c, \box_gset_clipped:N, \box_gset_clipped:c} +% A wrapper around the driver-dependent code. +% \begin{macrocode} +\cs_new_protected:Npn \box_set_clipped:N #1 + { \hbox_set:Nn #1 { \@@_backend_clip:N #1 } } +\cs_generate_variant:Nn \box_set_clipped:N { c } +\cs_new_protected:Npn \box_gset_clipped:N #1 + { \hbox_gset:Nn #1 { \@@_backend_clip:N #1 } } +\cs_generate_variant:Nn \box_gset_clipped:N { c } +% \end{macrocode} +% \end{macro} +% +% \begin{macro} +% { +% \box_set_trim:Nnnnn, \box_set_trim:cnnnn, +% \box_gset_trim:Nnnnn, \box_gset_trim:cnnnn +% } +% \begin{macro}{\@@_set_trim:NnnnnN} +% Trimming from the left- and right-hand edges of the box is easy: kern the +% appropriate parts off each side. +% \begin{macrocode} +\cs_new_protected:Npn \box_set_trim:Nnnnn #1#2#3#4#5 + { \@@_set_trim:NnnnnN #1 {#2} {#3} {#4} {#5} \box_set_eq:NN } +\cs_generate_variant:Nn \box_set_trim:Nnnnn { c } +\cs_new_protected:Npn \box_gset_trim:Nnnnn #1#2#3#4#5 + { \@@_set_trim:NnnnnN #1 {#2} {#3} {#4} {#5} \box_gset_eq:NN } +\cs_generate_variant:Nn \box_gset_trim:Nnnnn { c } +\cs_new_protected:Npn \@@_set_trim:NnnnnN #1#2#3#4#5#6 + { + \hbox_set:Nn \l_@@_internal_box + { + \__kernel_kern:n { -#2 } + \box_use:N #1 + \__kernel_kern:n { -#4 } + } +% \end{macrocode} +% For the height and depth, there is a need to watch the baseline is +% respected. Material always has to stay on the correct side, so trimming +% has to check that there is enough material to trim. First, the bottom +% edge. If there is enough depth, simply set the depth, or if not move +% down so the result is zero depth. \cs{box_move_down:nn} is used in both +% cases so the resulting box always contains a \tn{lower} primitive. +% The internal box is used here as it allows safe use of \cs{box_set_dp:Nn}. +% \begin{macrocode} + \dim_compare:nNnTF { \box_dp:N #1 } > {#3} + { + \hbox_set:Nn \l_@@_internal_box + { + \box_move_down:nn \c_zero_dim + { \box_use_drop:N \l_@@_internal_box } + } + \box_set_dp:Nn \l_@@_internal_box { \box_dp:N #1 - (#3) } + } + { + \hbox_set:Nn \l_@@_internal_box + { + \box_move_down:nn { (#3) - \box_dp:N #1 } + { \box_use_drop:N \l_@@_internal_box } + } + \box_set_dp:Nn \l_@@_internal_box \c_zero_dim + } +% \end{macrocode} +% Same thing, this time from the top of the box. +% \begin{macrocode} + \dim_compare:nNnTF { \box_ht:N \l_@@_internal_box } > {#5} + { + \hbox_set:Nn \l_@@_internal_box + { + \box_move_up:nn \c_zero_dim + { \box_use_drop:N \l_@@_internal_box } + } + \box_set_ht:Nn \l_@@_internal_box + { \box_ht:N \l_@@_internal_box - (#5) } + } + { + \hbox_set:Nn \l_@@_internal_box + { + \box_move_up:nn { (#5) - \box_ht:N \l_@@_internal_box } + { \box_use_drop:N \l_@@_internal_box } + } + \box_set_ht:Nn \l_@@_internal_box \c_zero_dim + } + #6 #1 \l_@@_internal_box + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro} +% { +% \box_set_viewport:Nnnnn, \box_set_viewport:cnnnn, +% \box_gset_viewport:Nnnnn, \box_gset_viewport:cnnnn +% } +% \begin{macro}{\@@_viewport:NnnnnN} +% The same general logic as for the trim operation, but with absolute +% dimensions. As a result, there are some things to watch out for in the +% vertical direction. +% \begin{macrocode} +\cs_new_protected:Npn \box_set_viewport:Nnnnn #1#2#3#4#5 + { \@@_set_viewport:NnnnnN #1 {#2} {#3} {#4} {#5} \box_set_eq:NN } +\cs_generate_variant:Nn \box_set_viewport:Nnnnn { c } +\cs_new_protected:Npn \box_gset_viewport:Nnnnn #1#2#3#4#5 + { \@@_set_viewport:NnnnnN #1 {#2} {#3} {#4} {#5} \box_gset_eq:NN } +\cs_generate_variant:Nn \box_gset_viewport:Nnnnn { c } +\cs_new_protected:Npn \@@_set_viewport:NnnnnN #1#2#3#4#5#6 + { + \hbox_set:Nn \l_@@_internal_box + { + \__kernel_kern:n { -#2 } + \box_use:N #1 + \__kernel_kern:n { #4 - \box_wd:N #1 } + } + \dim_compare:nNnTF {#3} < \c_zero_dim + { + \hbox_set:Nn \l_@@_internal_box + { + \box_move_down:nn \c_zero_dim + { \box_use_drop:N \l_@@_internal_box } + } + \box_set_dp:Nn \l_@@_internal_box { - \@@_dim_eval:n {#3} } + } + { + \hbox_set:Nn \l_@@_internal_box + { \box_move_down:nn {#3} { \box_use_drop:N \l_@@_internal_box } } + \box_set_dp:Nn \l_@@_internal_box \c_zero_dim + } + \dim_compare:nNnTF {#5} > \c_zero_dim + { + \hbox_set:Nn \l_@@_internal_box + { + \box_move_up:nn \c_zero_dim + { \box_use_drop:N \l_@@_internal_box } + } + \box_set_ht:Nn \l_@@_internal_box + { + (#5) + \dim_compare:nNnT {#3} > \c_zero_dim + { - (#3) } + } + } + { + \hbox_set:Nn \l_@@_internal_box + { + \box_move_up:nn { - \@@_dim_eval:n {#5} } + { \box_use_drop:N \l_@@_internal_box } + } + \box_set_ht:Nn \l_@@_internal_box \c_zero_dim + } + #6 #1 \l_@@_internal_box + } +% \end{macrocode} +% \end{macro} +% \end{macro} + +% % \begin{macrocode} %</package> % \end{macrocode} diff --git a/macros/latex/contrib/l3kernel/l3candidates.dtx b/macros/latex/contrib/l3kernel/l3candidates.dtx index 3b804316c2..23208c8220 100644 --- a/macros/latex/contrib/l3kernel/l3candidates.dtx +++ b/macros/latex/contrib/l3kernel/l3candidates.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % @@ -84,68 +84,6 @@ % into the kernel. However, real use sometimes leads to better ideas, so functions from this module are % \textbf{not necessarily stable} and we may have to adjust them! % -% \section{Additions to \pkg{l3box}} -% -% \begin{function}[updated = 2019-01-23] -% {\box_clip:N, \box_clip:c, \box_gclip:N, \box_gclip:c} -% \begin{syntax} -% \cs{box_clip:N} \meta{box} -% \end{syntax} -% Clips the \meta{box} in the output so that only material inside the -% bounding box is displayed in the output. The updated \meta{box} is an -% hbox, irrespective of the nature of the \meta{box} before the clipping is -% applied. -% -% \textbf{These functions require the \LaTeX3 native drivers: they do -% not work with the \LaTeXe{} \pkg{graphics} drivers!} -% -% \begin{texnote} -% Clipping is implemented by the driver, and as such the full content of -% the box is placed in the output file. Thus clipping does not remove -% any information from the raw output, and hidden material can therefore -% be viewed by direct examination of the file. -% \end{texnote} -% \end{function} -% -% \begin{function}[added = 2019-01-23] -% { -% \box_set_trim:Nnnnn, \box_set_trim:cnnnn, -% \box_gset_trim:Nnnnn, \box_gset_trim:cnnnn -% } -% \begin{syntax} -% \cs{box_set_trim:Nnnnn} \meta{box} \Arg{left} \Arg{bottom} \Arg{right} \Arg{top} -% \end{syntax} -% Adjusts the bounding box of the \meta{box} \meta{left} is removed from -% the left-hand edge of the bounding box, \meta{right} from the right-hand -% edge and so fourth. All adjustments are \meta{dim exprs}. -% Material outside of the bounding box is still displayed in the output -% unless \cs{box_clip:N} is subsequently applied. -% The updated \meta{box} is an -% hbox, irrespective of the nature of the \meta{box} before the trim -% operation is applied. -% The behavior of the operation where the trims requested is -% greater than the size of the box is undefined. -% \end{function} -% -% \begin{function}[added = 2019-01-23] -% { -% \box_set_viewport:Nnnnn, \box_set_viewport:cnnnn, -% \box_gset_viewport:Nnnnn, \box_gset_viewport:cnnnn -% } -% \begin{syntax} -% \cs{box_set_viewport:Nnnnn} \meta{box} \Arg{llx} \Arg{lly} \Arg{urx} \Arg{ury} -% \end{syntax} -% Adjusts the bounding box of the \meta{box} such that it has lower-left -% co-ordinates (\meta{llx}, \meta{lly}) and upper-right co-ordinates -% (\meta{urx}, \meta{ury}). All four co-ordinate positions are -% \meta{dim exprs}. Material outside of the bounding box is -% still displayed in the output unless \cs{box_clip:N} is -% subsequently applied. -% The updated \meta{box} is an -% hbox, irrespective of the nature of the \meta{box} before the viewport -% operation is applied. -% \end{function} -% % \section{Additions to \pkg{l3expan}} % % \begin{function}[added = 2018-04-04, updated = 2019-02-08] @@ -669,168 +607,6 @@ %<*package> % \end{macrocode} % -% \subsection{Additions to \pkg{l3box}} -% -% \begin{macrocode} -%<@@=box> -% \end{macrocode} -% -% \subsubsection{Viewing part of a box} -% -% \begin{macro}{\box_clip:N, \box_clip:c, \box_gclip:N, \box_gclip:c} -% A wrapper around the driver-dependent code. -% \begin{macrocode} -\cs_new_protected:Npn \box_clip:N #1 - { \hbox_set:Nn #1 { \@@_backend_clip:N #1 } } -\cs_generate_variant:Nn \box_clip:N { c } -\cs_new_protected:Npn \box_gclip:N #1 - { \hbox_gset:Nn #1 { \@@_backend_clip:N #1 } } -\cs_generate_variant:Nn \box_gclip:N { c } -% \end{macrocode} -% \end{macro} -% -% \begin{macro} -% { -% \box_set_trim:Nnnnn, \box_set_trim:cnnnn, -% \box_gset_trim:Nnnnn, \box_gset_trim:cnnnn -% } -% \begin{macro}{\@@_set_trim:NnnnnN} -% Trimming from the left- and right-hand edges of the box is easy: kern the -% appropriate parts off each side. -% \begin{macrocode} -\cs_new_protected:Npn \box_set_trim:Nnnnn #1#2#3#4#5 - { \@@_set_trim:NnnnnN #1 {#2} {#3} {#4} {#5} \box_set_eq:NN } -\cs_generate_variant:Nn \box_set_trim:Nnnnn { c } -\cs_new_protected:Npn \box_gset_trim:Nnnnn #1#2#3#4#5 - { \@@_set_trim:NnnnnN #1 {#2} {#3} {#4} {#5} \box_gset_eq:NN } -\cs_generate_variant:Nn \box_gset_trim:Nnnnn { c } -\cs_new_protected:Npn \@@_set_trim:NnnnnN #1#2#3#4#5#6 - { - \hbox_set:Nn \l_@@_internal_box - { - \__kernel_kern:n { -#2 } - \box_use:N #1 - \__kernel_kern:n { -#4 } - } -% \end{macrocode} -% For the height and depth, there is a need to watch the baseline is -% respected. Material always has to stay on the correct side, so trimming -% has to check that there is enough material to trim. First, the bottom -% edge. If there is enough depth, simply set the depth, or if not move -% down so the result is zero depth. \cs{box_move_down:nn} is used in both -% cases so the resulting box always contains a \tn{lower} primitive. -% The internal box is used here as it allows safe use of \cs{box_set_dp:Nn}. -% \begin{macrocode} - \dim_compare:nNnTF { \box_dp:N #1 } > {#3} - { - \hbox_set:Nn \l_@@_internal_box - { - \box_move_down:nn \c_zero_dim - { \box_use_drop:N \l_@@_internal_box } - } - \box_set_dp:Nn \l_@@_internal_box { \box_dp:N #1 - (#3) } - } - { - \hbox_set:Nn \l_@@_internal_box - { - \box_move_down:nn { (#3) - \box_dp:N #1 } - { \box_use_drop:N \l_@@_internal_box } - } - \box_set_dp:Nn \l_@@_internal_box \c_zero_dim - } -% \end{macrocode} -% Same thing, this time from the top of the box. -% \begin{macrocode} - \dim_compare:nNnTF { \box_ht:N \l_@@_internal_box } > {#5} - { - \hbox_set:Nn \l_@@_internal_box - { - \box_move_up:nn \c_zero_dim - { \box_use_drop:N \l_@@_internal_box } - } - \box_set_ht:Nn \l_@@_internal_box - { \box_ht:N \l_@@_internal_box - (#5) } - } - { - \hbox_set:Nn \l_@@_internal_box - { - \box_move_up:nn { (#5) - \box_ht:N \l_@@_internal_box } - { \box_use_drop:N \l_@@_internal_box } - } - \box_set_ht:Nn \l_@@_internal_box \c_zero_dim - } - #6 #1 \l_@@_internal_box - } -% \end{macrocode} -% \end{macro} -% \end{macro} -% -% \begin{macro} -% { -% \box_set_viewport:Nnnnn, \box_set_viewport:cnnnn, -% \box_gset_viewport:Nnnnn, \box_gset_viewport:cnnnn -% } -% \begin{macro}{\@@_viewport:NnnnnN} -% The same general logic as for the trim operation, but with absolute -% dimensions. As a result, there are some things to watch out for in the -% vertical direction. -% \begin{macrocode} -\cs_new_protected:Npn \box_set_viewport:Nnnnn #1#2#3#4#5 - { \@@_set_viewport:NnnnnN #1 {#2} {#3} {#4} {#5} \box_set_eq:NN } -\cs_generate_variant:Nn \box_set_viewport:Nnnnn { c } -\cs_new_protected:Npn \box_gset_viewport:Nnnnn #1#2#3#4#5 - { \@@_set_viewport:NnnnnN #1 {#2} {#3} {#4} {#5} \box_gset_eq:NN } -\cs_generate_variant:Nn \box_gset_viewport:Nnnnn { c } -\cs_new_protected:Npn \@@_set_viewport:NnnnnN #1#2#3#4#5#6 - { - \hbox_set:Nn \l_@@_internal_box - { - \__kernel_kern:n { -#2 } - \box_use:N #1 - \__kernel_kern:n { #4 - \box_wd:N #1 } - } - \dim_compare:nNnTF {#3} < \c_zero_dim - { - \hbox_set:Nn \l_@@_internal_box - { - \box_move_down:nn \c_zero_dim - { \box_use_drop:N \l_@@_internal_box } - } - \box_set_dp:Nn \l_@@_internal_box { - \@@_dim_eval:n {#3} } - } - { - \hbox_set:Nn \l_@@_internal_box - { \box_move_down:nn {#3} { \box_use_drop:N \l_@@_internal_box } } - \box_set_dp:Nn \l_@@_internal_box \c_zero_dim - } - \dim_compare:nNnTF {#5} > \c_zero_dim - { - \hbox_set:Nn \l_@@_internal_box - { - \box_move_up:nn \c_zero_dim - { \box_use_drop:N \l_@@_internal_box } - } - \box_set_ht:Nn \l_@@_internal_box - { - (#5) - \dim_compare:nNnT {#3} > \c_zero_dim - { - (#3) } - } - } - { - \hbox_set:Nn \l_@@_internal_box - { - \box_move_up:nn { - \@@_dim_eval:n {#5} } - { \box_use_drop:N \l_@@_internal_box } - } - \box_set_ht:Nn \l_@@_internal_box \c_zero_dim - } - #6 #1 \l_@@_internal_box - } -% \end{macrocode} -% \end{macro} -% \end{macro} -% % \subsection{Additions to \pkg{l3flag}} % % \begin{macrocode} diff --git a/macros/latex/contrib/l3kernel/l3cctab.dtx b/macros/latex/contrib/l3kernel/l3cctab.dtx index 8233acdc79..9337a4347a 100644 --- a/macros/latex/contrib/l3kernel/l3cctab.dtx +++ b/macros/latex/contrib/l3kernel/l3cctab.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3clist.dtx b/macros/latex/contrib/l3kernel/l3clist.dtx index c8a9d89bcb..3d92c2b3c5 100644 --- a/macros/latex/contrib/l3kernel/l3clist.dtx +++ b/macros/latex/contrib/l3kernel/l3clist.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3coffins.dtx b/macros/latex/contrib/l3kernel/l3coffins.dtx index 4a496da85f..d351a8b3e6 100644 --- a/macros/latex/contrib/l3kernel/l3coffins.dtx +++ b/macros/latex/contrib/l3kernel/l3coffins.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3color.dtx b/macros/latex/contrib/l3kernel/l3color.dtx index 017cad63c5..533e5411d7 100644 --- a/macros/latex/contrib/l3kernel/l3color.dtx +++ b/macros/latex/contrib/l3kernel/l3color.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3debug.dtx b/macros/latex/contrib/l3kernel/l3debug.dtx index 854f4f5b61..d46b1ceed5 100644 --- a/macros/latex/contrib/l3kernel/l3debug.dtx +++ b/macros/latex/contrib/l3kernel/l3debug.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3deprecation.dtx b/macros/latex/contrib/l3kernel/l3deprecation.dtx index 1e8af30022..5794a86fb3 100644 --- a/macros/latex/contrib/l3kernel/l3deprecation.dtx +++ b/macros/latex/contrib/l3kernel/l3deprecation.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3doc.dtx b/macros/latex/contrib/l3kernel/l3doc.dtx index f4f19d5aaa..0adf0d030d 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 2023-03-30} +% \date{Released 2023-04-19} % \maketitle % \tableofcontents % diff --git a/macros/latex/contrib/l3kernel/l3doc.pdf b/macros/latex/contrib/l3kernel/l3doc.pdf Binary files differindex fb8f1d82b3..9280d8c138 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 750356ac9f..a97448cfac 100644 --- a/macros/latex/contrib/l3kernel/l3docstrip.dtx +++ b/macros/latex/contrib/l3kernel/l3docstrip.dtx @@ -63,7 +63,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3docstrip.pdf b/macros/latex/contrib/l3kernel/l3docstrip.pdf Binary files differindex b16829443d..8b7604532a 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 d8a6c8cc99..e73d77c8df 100644 --- a/macros/latex/contrib/l3kernel/l3expan.dtx +++ b/macros/latex/contrib/l3kernel/l3expan.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3file.dtx b/macros/latex/contrib/l3kernel/l3file.dtx index dfc1c6338d..ca59e7ab61 100644 --- a/macros/latex/contrib/l3kernel/l3file.dtx +++ b/macros/latex/contrib/l3kernel/l3file.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3flag.dtx b/macros/latex/contrib/l3kernel/l3flag.dtx index e30f49f7f2..b3feeda330 100644 --- a/macros/latex/contrib/l3kernel/l3flag.dtx +++ b/macros/latex/contrib/l3kernel/l3flag.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-assign.dtx b/macros/latex/contrib/l3kernel/l3fp-assign.dtx index 3efd565575..8ea284a32e 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 2023-03-30} +% \date{Released 2023-04-19} % \maketitle % % \begin{documentation} diff --git a/macros/latex/contrib/l3kernel/l3fp-aux.dtx b/macros/latex/contrib/l3kernel/l3fp-aux.dtx index 0391f3e34f..480e428a2b 100644 --- a/macros/latex/contrib/l3kernel/l3fp-aux.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-aux.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-basics.dtx b/macros/latex/contrib/l3kernel/l3fp-basics.dtx index 9af50e5850..460f64c48e 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 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-convert.dtx b/macros/latex/contrib/l3kernel/l3fp-convert.dtx index d7a1936e77..29d765afe6 100644 --- a/macros/latex/contrib/l3kernel/l3fp-convert.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-convert.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-expo.dtx b/macros/latex/contrib/l3kernel/l3fp-expo.dtx index 1ea73e116e..5618124ff7 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 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-extended.dtx b/macros/latex/contrib/l3kernel/l3fp-extended.dtx index 5384037de1..a42b35aa7b 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 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-logic.dtx b/macros/latex/contrib/l3kernel/l3fp-logic.dtx index 2956f840a5..9e012f46b6 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 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-parse.dtx b/macros/latex/contrib/l3kernel/l3fp-parse.dtx index ef58cd8600..7bc00e16b6 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 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-random.dtx b/macros/latex/contrib/l3kernel/l3fp-random.dtx index a8929a1fae..59d7a42c7b 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 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-round.dtx b/macros/latex/contrib/l3kernel/l3fp-round.dtx index e721fc76c5..5e02ed2a64 100644 --- a/macros/latex/contrib/l3kernel/l3fp-round.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-round.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-traps.dtx b/macros/latex/contrib/l3kernel/l3fp-traps.dtx index c09a940b1b..9c99cfa009 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 2023-03-30} +% \date{Released 2023-04-19} % \maketitle % % \begin{documentation} diff --git a/macros/latex/contrib/l3kernel/l3fp-trig.dtx b/macros/latex/contrib/l3kernel/l3fp-trig.dtx index 07f5211c98..41c7fe98cf 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 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp.dtx b/macros/latex/contrib/l3kernel/l3fp.dtx index 7cf429eaf8..ca8fcd7b9b 100644 --- a/macros/latex/contrib/l3kernel/l3fp.dtx +++ b/macros/latex/contrib/l3kernel/l3fp.dtx @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fparray.dtx b/macros/latex/contrib/l3kernel/l3fparray.dtx index 121be8ee5b..fe225b1a0e 100644 --- a/macros/latex/contrib/l3kernel/l3fparray.dtx +++ b/macros/latex/contrib/l3kernel/l3fparray.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3int.dtx b/macros/latex/contrib/l3kernel/l3int.dtx index b90f881036..d0095ef63d 100644 --- a/macros/latex/contrib/l3kernel/l3int.dtx +++ b/macros/latex/contrib/l3kernel/l3int.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3intarray.dtx b/macros/latex/contrib/l3kernel/l3intarray.dtx index 8dc10287a8..5cdfd9c81c 100644 --- a/macros/latex/contrib/l3kernel/l3intarray.dtx +++ b/macros/latex/contrib/l3kernel/l3intarray.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3kernel-functions.dtx b/macros/latex/contrib/l3kernel/l3kernel-functions.dtx index ddf3ed637e..39e4a93c7c 100644 --- a/macros/latex/contrib/l3kernel/l3kernel-functions.dtx +++ b/macros/latex/contrib/l3kernel/l3kernel-functions.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3keys.dtx b/macros/latex/contrib/l3kernel/l3keys.dtx index 4650975217..4d3efad154 100644 --- a/macros/latex/contrib/l3kernel/l3keys.dtx +++ b/macros/latex/contrib/l3kernel/l3keys.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3legacy.dtx b/macros/latex/contrib/l3kernel/l3legacy.dtx index dfb25ad07b..5002449bc7 100644 --- a/macros/latex/contrib/l3kernel/l3legacy.dtx +++ b/macros/latex/contrib/l3kernel/l3legacy.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3luatex.dtx b/macros/latex/contrib/l3kernel/l3luatex.dtx index e25d630c23..1b347b50fe 100644 --- a/macros/latex/contrib/l3kernel/l3luatex.dtx +++ b/macros/latex/contrib/l3kernel/l3luatex.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3msg.dtx b/macros/latex/contrib/l3kernel/l3msg.dtx index e2c93d9504..f223686e5a 100644 --- a/macros/latex/contrib/l3kernel/l3msg.dtx +++ b/macros/latex/contrib/l3kernel/l3msg.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3names.dtx b/macros/latex/contrib/l3kernel/l3names.dtx index edf14241cd..8c1dc438bb 100644 --- a/macros/latex/contrib/l3kernel/l3names.dtx +++ b/macros/latex/contrib/l3kernel/l3names.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3news.pdf b/macros/latex/contrib/l3kernel/l3news.pdf Binary files differindex dcf940275b..7d4d69e615 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 d9bb9779a1..c75a768729 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 f8a160c4c0..2f8dc58422 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 f33e9649cd..d6d820d1c3 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 93700a72d3..ce0b3c0887 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 b922a0083f..bfef40d37c 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 adfe4c942b..7997c8bb23 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 4c668945bb..53e6690730 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 b536ddde2b..bcff1d2ee8 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 02d2819fd5..aaa5bb0779 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 0a1f80cd25..9ba010ae61 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 de7dfb6e2c..964089be24 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 60fb03748a..b5daf9527a 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 eacb62eb6f..6e08bd818f 100644 --- a/macros/latex/contrib/l3kernel/l3pdf.dtx +++ b/macros/latex/contrib/l3kernel/l3pdf.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % @@ -489,7 +489,7 @@ % \begin{macro}{\pdf_pagesize_gset:nn} % \begin{macrocode} \cs_new_protected:Npn \pdf_pagesize_gset:nn #1#2 - { \@@_pagesize_gset:nn {#1} {#2} } + { \@@_backend_pagesize_gset:nn {#1} {#2} } % \end{macrocode} % \end{macro} % diff --git a/macros/latex/contrib/l3kernel/l3prefixes.pdf b/macros/latex/contrib/l3kernel/l3prefixes.pdf Binary files differindex 7d03b58f92..05cf98d3b6 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 86e1e0e339..ebedfa06c0 100644 --- a/macros/latex/contrib/l3kernel/l3prg.dtx +++ b/macros/latex/contrib/l3kernel/l3prg.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3prop.dtx b/macros/latex/contrib/l3kernel/l3prop.dtx index dc611ae192..e83bff42eb 100644 --- a/macros/latex/contrib/l3kernel/l3prop.dtx +++ b/macros/latex/contrib/l3kernel/l3prop.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3quark.dtx b/macros/latex/contrib/l3kernel/l3quark.dtx index 2f52ef9d1e..8420062530 100644 --- a/macros/latex/contrib/l3kernel/l3quark.dtx +++ b/macros/latex/contrib/l3kernel/l3quark.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3regex.dtx b/macros/latex/contrib/l3kernel/l3regex.dtx index 09d078cd54..416c383acd 100644 --- a/macros/latex/contrib/l3kernel/l3regex.dtx +++ b/macros/latex/contrib/l3kernel/l3regex.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3seq.dtx b/macros/latex/contrib/l3kernel/l3seq.dtx index 47e48b2e1e..a1d377e929 100644 --- a/macros/latex/contrib/l3kernel/l3seq.dtx +++ b/macros/latex/contrib/l3kernel/l3seq.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3skip.dtx b/macros/latex/contrib/l3kernel/l3skip.dtx index 36e70ce35a..0be87af099 100644 --- a/macros/latex/contrib/l3kernel/l3skip.dtx +++ b/macros/latex/contrib/l3kernel/l3skip.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3sort.dtx b/macros/latex/contrib/l3kernel/l3sort.dtx index e92a11b528..544122ad45 100644 --- a/macros/latex/contrib/l3kernel/l3sort.dtx +++ b/macros/latex/contrib/l3kernel/l3sort.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3str-convert.dtx b/macros/latex/contrib/l3kernel/l3str-convert.dtx index 09539a13de..c7d3483b5e 100644 --- a/macros/latex/contrib/l3kernel/l3str-convert.dtx +++ b/macros/latex/contrib/l3kernel/l3str-convert.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3str.dtx b/macros/latex/contrib/l3kernel/l3str.dtx index c9229b83b5..3e04178113 100644 --- a/macros/latex/contrib/l3kernel/l3str.dtx +++ b/macros/latex/contrib/l3kernel/l3str.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3styleguide.pdf b/macros/latex/contrib/l3kernel/l3styleguide.pdf Binary files differindex 885afe83a1..f65fc76303 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 248f40b448..6a57059d33 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 2023-03-30} +\date{Released 2023-04-19} \begin{document} diff --git a/macros/latex/contrib/l3kernel/l3syntax-changes.pdf b/macros/latex/contrib/l3kernel/l3syntax-changes.pdf Binary files differindex 9c8164ddb4..f76ea7a1cb 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 383af6cc44..1a018c7fc1 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 2023-03-30} +\date{Released 2023-04-19} \newcommand{\TF}{\textit{(TF)}} diff --git a/macros/latex/contrib/l3kernel/l3sys.dtx b/macros/latex/contrib/l3kernel/l3sys.dtx index 23115dde50..0ac5430031 100644 --- a/macros/latex/contrib/l3kernel/l3sys.dtx +++ b/macros/latex/contrib/l3kernel/l3sys.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3term-glossary.pdf b/macros/latex/contrib/l3kernel/l3term-glossary.pdf Binary files differindex a9bd06e070..6441ffcb73 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 ffa4204e75..1394f75588 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 2023-03-30} +\date{Released 2023-04-19} \newcommand{\TF}{\textit{(TF)}} diff --git a/macros/latex/contrib/l3kernel/l3text-case.dtx b/macros/latex/contrib/l3kernel/l3text-case.dtx index b93243040d..a71bbc38f4 100644 --- a/macros/latex/contrib/l3kernel/l3text-case.dtx +++ b/macros/latex/contrib/l3kernel/l3text-case.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % @@ -153,7 +153,7 @@ % \begin{macro}[EXP]{\@@_change_case_exclude:nnNw} % \begin{macro}[EXP]{\@@_change_case_exclude:nnNnn} % \begin{macro}[EXP]{\@@_change_case_replace:nnN} -% \begin{macro}[EXP]{\@@_change_case_replace:nnn} +% \begin{macro}[EXP]{\@@_change_case_replace:nnn, \@@_change_case_replace:vnn} % \begin{macro}[EXP]{\@@_change_case_switch:nnN} % \begin{macro}[EXP] % { @@ -172,6 +172,14 @@ % \begin{macro}[EXP]{\@@_change_case_letterlike:nnnnN} % \begin{macro}[EXP] % { +% \@@_change_case_custom_lower:nnn , +% \@@_change_case_custom_title:nnn , +% \@@_change_case_custom_upper:nnn , +% \@@_change_case_custom_titleonly:nnn +% } +% \begin{macro}[EXP]{\@@_change_case_custom:nnn} +% \begin{macro}[EXP] +% { % \@@_change_case_codepoint_lower:nnn , % \@@_change_case_codepoint_upper:nnn , % \@@_change_case_codepoint_title:nnn , @@ -439,7 +447,7 @@ { \@@_change_case_exclude:nnN {#1} {#2} } { \@@_codepoint_process:nN - { \use:c { @@_change_case_codepoint_ #1 :nnn } {#1} {#2} } + { \use:c { @@_change_case_custom_ #1 :nnn } {#1} {#2} } } #3 } @@ -497,13 +505,14 @@ { \cs_if_exist:cTF { l_@@_case_ \token_to_str:N #3 _tl } { - \exp_args:Nv \@@_change_case_replace:nnn + \@@_change_case_replace:vnn { l_@@_case_ \token_to_str:N #3 _tl } {#1} {#2} } { \@@_change_case_switch:nnN {#1} {#2} #3 } } \cs_new:Npn \@@_change_case_replace:nnn #1#2#3 { \@@_change_case_loop:nnw {#2} {#3} #1 } +\cs_generate_variant:Nn \@@_change_case_replace:nnn { v } % \end{macrocode} % Allow for manually-controlled case switching. % \begin{macrocode} @@ -570,6 +579,42 @@ } } % \end{macrocode} +% Check for a customised codepoint result. +% \begin{macrocode} +\cs_new:Npn \@@_change_case_custom_lower:nnn #1#2#3 + { + \@@_change_case_custom:nnnnn {#1} {#2} {#3} {#1} + { \use:c { @@_change_case_codepoint_ #1 :nnn } {#1} {#2} {#3} } + } +\cs_new_eq:NN \@@_change_case_custom_upper:nnn + \@@_change_case_custom_lower:nnn +\cs_new:Npn \@@_change_case_custom_title:nnn #1#2#3 + { + \@@_change_case_custom:nnnnn { title } {#2} {#3} {#1} + { + \@@_change_case_custom:nnnnn { upper } {#2} {#3} {#1} + { \use:c { @@_change_case_codepoint_ #1 :nnn } {#1} {#2} {#3} } + } + } +\cs_new_eq:NN \@@_change_case_custom_titleonly:nnn + \@@_change_case_custom_title:nnn +\cs_new:Npn \@@_change_case_custom:nnnnn #1#2#3#4#5 + { + \tl_if_exist:cTF { l_@@_ #1 case _ \tl_to_str:n {#3} _ #2 _tl } + { + \@@_change_case_replace:vnn + { l_@@_ #1 case _ \tl_to_str:n {#3} _ #2 _tl } {#4} {#2} + } + { + \tl_if_exist:cTF { l_@@_ #1 case _ \tl_to_str:n {#3} _tl } + { + \@@_change_case_replace:vnn + { l_@@_ #1 case _ \tl_to_str:n {#3} _tl } {#4} {#2} + } + {#5} + } + } +% \end{macrocode} % For upper- and lowercase changes, once we get to this stage there are only % a couple of questions remaining: is there a language-specific mapping and % is there the special case of a terminal sigma. If not, then we pass to @@ -806,6 +851,8 @@ % \end{macro} % \end{macro} % \end{macro} +% \end{macro} +% \end{macro} % % \begin{macro}{\text_declare_case_equivalent:Nn} % Create equivalents to allow replacement. @@ -818,6 +865,62 @@ % \end{macrocode} % \end{macro} % +% \begin{macro} +% { +% \text_declare_lowercase_mapping:nn , +% \text_declare_titlecase_mapping:nn , +% \text_declare_uppercase_mapping:nn +% } +% \begin{macro} +% {\@@_declare_case_mapping:nnn, \@@_declare_case_mapping_aux:nnn} +% \begin{macro} +% { +% \text_declare_lowercase_mapping:nnn , +% \text_declare_titlecase_mapping:nnn , +% \text_declare_uppercase_mapping:nnn +% } +% \begin{macro} +% {\@@_declare_case_mapping:nnnn, \@@_declare_case_mapping_aux:nnnn} +% Codepoint customisation. +% \begin{macrocode} +\cs_new_protected:Npn \text_declare_lowercase_mapping:nn #1#2 + { \@@_declare_case_mapping:nnn { lower } {#1} {#2} } +\cs_new_protected:Npn \text_declare_titlecase_mapping:nn #1#2 + { \@@_declare_case_mapping:nnn { title } {#1} {#2} } +\cs_new_protected:Npn \text_declare_uppercase_mapping:nn #1#2 + { \@@_declare_case_mapping:nnn { upper } {#1} {#2} } +\cs_new_protected:Npn \@@_declare_case_mapping:nnn #1#2#3 + { + \exp_args:Ne \@@_declare_case_mapping_aux:nnn + { \codepoint_str_generate:n {#2} } {#1} {#3} + } +\cs_new_protected:Npn \@@_declare_case_mapping_aux:nnn #1#2#3 + { + \tl_clear_new:c { l_@@_ #2 case _ #1 _tl } + \tl_set:cn { l_@@_ #2 case _ #1 _ tl } {#3} + } +\cs_new_protected:Npn \text_declare_lowercase_mapping:nnn #1#2#3 + { \@@_declare_case_mapping:nnnn { lower } {#1} {#2} {#3} } +\cs_new_protected:Npn \text_declare_titlecase_mapping:nnn #1#2#3 + { \@@_declare_case_mapping:nnnn { title } {#1} {#2} {#3} } +\cs_new_protected:Npn \text_declare_uppercase_mapping:nnn #1#2#3 + { \@@_declare_case_mapping:nnnn { upper } {#1} {#2} {#3} } +\cs_new_protected:Npn \@@_declare_case_mapping:nnnn #1#2#3#4 + { + \exp_args:Ne \@@_declare_case_mapping_aux:nnnn + { \codepoint_str_generate:n {#2} } {#1} {#3} {#4} + } +\cs_new_protected:Npn \@@_declare_case_mapping_aux:nnnn #1#2#3#4 + { + \tl_clear_new:c { l_@@_ #2 case _ #1 _ #3 _tl } + \tl_set:cn { l_@@_ #2 case _ #1 _ #3 _ tl } {#4} + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% % \begin{macro}{\text_case_switch:nnnn} % \begin{macro}{\@@_case_switch_marker:} % Set up the mechanism for manual case switching. @@ -2038,6 +2141,17 @@ } % \end{macrocode} % +% A few adjustments to case mapping for combining chars: these are not needed +% for the Unicode engines +% \begin{macrocode} +\bool_lazy_or:nnF + { \sys_if_engine_luatex_p: } + { \sys_if_engine_xetex_p: } + { + \text_declare_uppercase_mapping:nn { "01F0 } { \v { J } } + } +% \end{macrocode} +% % \begin{macrocode} %</package> % \end{macrocode} diff --git a/macros/latex/contrib/l3kernel/l3text-map.dtx b/macros/latex/contrib/l3kernel/l3text-map.dtx index 8d35064933..c30686b6c3 100644 --- a/macros/latex/contrib/l3kernel/l3text-map.dtx +++ b/macros/latex/contrib/l3kernel/l3text-map.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3text-purify.dtx b/macros/latex/contrib/l3kernel/l3text-purify.dtx index 247dd7a0c3..a1d3413c60 100644 --- a/macros/latex/contrib/l3kernel/l3text-purify.dtx +++ b/macros/latex/contrib/l3kernel/l3text-purify.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3text.dtx b/macros/latex/contrib/l3kernel/l3text.dtx index eb5d2bede7..40c8e5a6a2 100644 --- a/macros/latex/contrib/l3kernel/l3text.dtx +++ b/macros/latex/contrib/l3kernel/l3text.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % @@ -102,7 +102,7 @@ % } % \begin{syntax} % \cs{text_uppercase:n} \Arg{tokens} -% \cs{text_uppercase:nn} \Arg{language} \Arg{tokens} +% \cs{text_uppercase:nn} \Arg{BCP-47} \Arg{tokens} % \end{syntax} % Takes user input \meta{text} first applies \cs{text_expand}, then % transforms the case of character tokens as specified by the @@ -145,9 +145,9 @@ % \texttt{SpecialCasing.txt}. For \pTeX{}, only the ASCII range is % covered as the engine treats input outside of this range as east Asian. % -% Language-sensitive conversions are enabled using the \meta{language} +% Locale-sensitive conversions are enabled using the \meta{BCP-47} % argument, and follow Unicode Consortium guidelines. Currently, the -% languages recognised for special handling are as follows. +% locale strings recognized for special handling are as follows. % \begin{itemize} % \item Armenian (\texttt{hy} and \texttt{hy-x-yiwn}) % The setting \texttt{hy} maps the codepoint U+0587, the ligature of @@ -172,7 +172,6 @@ % which converts the \textit{ypogegrammeni} (subscript muted iota) % to capital iota when uppercasing: the standard version retains the % subscript versions. -% capital iota. % \item Lithuanian (\texttt{lt}). % The lowercase letters i and j should retain a dot above when the % accents grave, acute or tilde are present. This is implemented for @@ -181,7 +180,7 @@ % 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}). +% \item Medieval Latin (\texttt{la-x-medieval}). % The characters |u| and |V| are interchanged on case changing. % \item Dutch (\texttt{nl}). % Capitalisation of \texttt{ij} at the beginning of titlecased @@ -217,6 +216,26 @@ % \meta{cmd} (a single token) is encountered during case changing. % \end{function} % +% \begin{function}[added = 2023-04-11] +% { +% \text_declare_lowercase_mapping:nn , +% \text_declare_lowercase_mapping:nnn , +% \text_declare_titlecase_mapping:nn , +% \text_declare_titlecase_mapping:nnn , +% \text_declare_uppercase_mapping:nn , +% \text_declare_uppercase_mapping:nnn +% } +% \begin{syntax} +% \cs{text_declare_lowercase_mapping:nn} \Arg{codeppoint} \Arg{replacement} +% \cs{text_declare_lowercase_mapping:nnn} \Arg{codeppoint} \Arg{BCP-47} \Arg{replacement} +% \end{syntax} +% Declares that the \meta{replacement} tokens should be used when case mapping +% the \meta{codepoint}, rather than the standard mapping given in the +% Unicode data files. The \texttt{nnn} version takes a BCP-47 tag, which +% can be used to specify that the customisation only applies to that +% locale. +% \end{function} +% % \begin{function}[EXP, added = 2022-07-04]{\text_case_switch:nnnn} % \begin{syntax} % \cs{text_case_switch:nnnn} \Arg{normal} \Arg{upper} \Arg{lower} \Arg{title} diff --git a/macros/latex/contrib/l3kernel/l3tl-analysis.dtx b/macros/latex/contrib/l3kernel/l3tl-analysis.dtx index 8a281accd7..c64b79604b 100644 --- a/macros/latex/contrib/l3kernel/l3tl-analysis.dtx +++ b/macros/latex/contrib/l3kernel/l3tl-analysis.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3tl.dtx b/macros/latex/contrib/l3kernel/l3tl.dtx index 70f545d0cf..a21d18fd93 100644 --- a/macros/latex/contrib/l3kernel/l3tl.dtx +++ b/macros/latex/contrib/l3kernel/l3tl.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3token.dtx b/macros/latex/contrib/l3kernel/l3token.dtx index ad94a32847..710fcab68b 100644 --- a/macros/latex/contrib/l3kernel/l3token.dtx +++ b/macros/latex/contrib/l3kernel/l3token.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3unicode.dtx b/macros/latex/contrib/l3kernel/l3unicode.dtx index 664a788f4f..bd78db18ba 100644 --- a/macros/latex/contrib/l3kernel/l3unicode.dtx +++ b/macros/latex/contrib/l3kernel/l3unicode.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-03-30} +% \date{Released 2023-04-19} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/source3.pdf b/macros/latex/contrib/l3kernel/source3.pdf Binary files differindex 0caa972f9f..10f47a1fd3 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 ba0668514c..ea8d5af892 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 2023-03-30} +\date{Released 2023-04-19} \pagenumbering{roman} \maketitle diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.pdf b/macros/latex/contrib/nicematrix/nicematrix-french.pdf Binary files differindex a054c4fadf..efad4b58ef 100644 --- a/macros/latex/contrib/nicematrix/nicematrix-french.pdf +++ b/macros/latex/contrib/nicematrix/nicematrix-french.pdf diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.tex b/macros/latex/contrib/nicematrix/nicematrix-french.tex index 4ec05bce2c..920c184433 100644 --- a/macros/latex/contrib/nicematrix/nicematrix-french.tex +++ b/macros/latex/contrib/nicematrix/nicematrix-french.tex @@ -20,7 +20,7 @@ % On utilise \MakeShortVerb de shortvrb et pas \DefineShortVerb de fancyvrb % car on ne veut pas que le contenu des petits éléments en verbatim soit colorié -% en grise +% en gris \usepackage{shortvrb} \MakeShortVerb{\|} @@ -63,6 +63,12 @@ \setlength{\parindent}{0pt} \skip \footins = 2 \bigskipamount + +\NewDocumentCommand{\Definition}{m} + {{\setlength{\fboxsep}{1pt}\colorbox{gray!20}{\ttfamily \vphantom{gl}#1}}} + + + \begin{document} \VerbatimFootnotes @@ -488,9 +494,6 @@ $\begin{bNiceArray}{cw{c}{1cm}c|c}[margin] 0 & \Cdots& 0 & 0 \end{bNiceArray}$ -\NewDocumentCommand{\Definition}{m} - {{\setlength{\fboxsep}{1pt}\colorbox{gray!20}{\ttfamily \vphantom{gl}#1}}} - \interitem La commande |\Block| accepte en premier argument optionnel (entre crochets) une @@ -809,7 +812,6 @@ Rang & \Block[C]{1-3}{Premier groupe} & & & \Block{1-3}{Deuxième groupe} \\ \subsection{Positionnement vertical du contenu des blocs} -\colorbox{yellow!50}{\textbf{Nouveau 6.14}} Concernant le positionnement vertical, la commande |\Block| admet les clés |v-center|\footnote{Cette clé ne peut être nommée \texttt{c} car la clé @@ -827,11 +829,13 @@ ligne de base de la première rangée concernée par le bloc. |\\|) est alignée avec la ligne de base de la dernière des rangées du tableau impliquées dans le bloc. -\item Avec la clé |T|, le contenu du bloc est calé vers le haut (avec une marge -égale au paramètre |inner ysep| de PGF/Tikz --- que l'on peut régler avec |\pgfset|). +\item Avec la clé |T|, le contenu du bloc est calé vers le haut. + +\colorbox{yellow!50}{Modification 6.18}\enskip Il n'y a plus de marge verticale. +Néanmoins, le contenu du bloc est (toujours) composé en interne dans une |{minipage}|, un +|{tabular}| ou un |{array}|, ce qui fait qu'il y souvent déjà une marge. -\item Avec la clé |B|, le contenu du bloc est calé vers le bas (avec une marge -égale au paramètre |inner ysep| de PGF/Tikz). +\item Avec la clé |B|, le contenu du bloc est calé vers le bas. \end{itemize} Quand aucune clé n'est donnée, c'est la clé |v-center| qui s'applique (sauf pour @@ -850,19 +854,19 @@ les blocs mono-rangée). \begin{BVerbatim}[baseline=c,boxwidth=10cm] \begin{NiceTabular}{ccc} \Block[fill=red!10,~emphase#t@,l]{4-2}{two\\lines} - & & \Huge first\\ - & & second \\ - & & third \\ - & & fourth \\ + & & \Huge Un\\ + & & deux \\ + & & trois \\ + & & \Huge quatre \\ text & text \\ \end{NiceTabular} \end{BVerbatim} \begin{NiceTabular}{ccc} \Block[fill=red!10,t,l]{4-2}{two\\lines} - & & \Huge first\\ - & & second \\ - & & third \\ - & & fourth \\ + & & \Huge Un\\ + & & deux \\ + & & trois \\ + & & \Huge quatre \\ text & text \\ \end{NiceTabular} @@ -871,19 +875,19 @@ text & text \\ \begin{BVerbatim}[baseline=c,boxwidth=10cm] \begin{NiceTabular}{ccc} \Block[fill=red!10,~emphase#b@,r]{4-2}{two\\lines} - & & \Huge first\\ - & & second \\ - & & third \\ - & & fourth \\ + & & \Huge Un\\ + & & deux \\ + & & trois \\ + & & \Huge quatre \\ text & text \\ \end{NiceTabular} \end{BVerbatim} \begin{NiceTabular}{ccc} \Block[fill=red!10,b,r]{4-2}{two\\lines} - & & \Huge first\\ - & & second \\ - & & third \\ - & & fourth \\ + & & \Huge Un\\ + & & deux \\ + & & trois \\ + & & \Huge quatre \\ text & text \\ \end{NiceTabular} @@ -891,19 +895,19 @@ text & text \\ \begin{BVerbatim}[baseline=c,boxwidth=10cm] \begin{NiceTabular}{ccc} \Block[fill=red!10,~emphase#T@,l]{4-2}{two\\lines} - & & \Huge first\\ - & & second \\ - & & third \\ - & & fourth \\ + & & \Huge Un\\ + & & deux \\ + & & trois \\ + & & \Huge quatre \\ text & text \\ \end{NiceTabular} \end{BVerbatim} \begin{NiceTabular}{ccc} \Block[fill=red!10,T,l]{4-2}{two\\lines} - & & \Huge first\\ - & & second \\ - & & third \\ - & & fourth \\ + & & \Huge Un\\ + & & deux \\ + & & trois \\ + & & \Huge quatre \\ text & text \\ \end{NiceTabular} @@ -912,19 +916,19 @@ text & text \\ \begin{BVerbatim}[baseline=c,boxwidth=10cm] \begin{NiceTabular}{ccc} \Block[fill=red!10,~emphase#B@,r]{4-2}{two\\lines} - & & \Huge first\\ - & & second \\ - & & third \\ - & & fourth \\ + & & \Huge Un\\ + & & deux \\ + & & trois \\ + & & \Huge quatre \\ text & text \\ \end{NiceTabular} \end{BVerbatim} \begin{NiceTabular}{ccc} \Block[fill=red!10,B,r]{4-2}{two\\lines} - & & \Huge first\\ - & & second \\ - & & third \\ - & & fourth \\ + & & \Huge Un\\ + & & deux \\ + & & trois \\ + & & \Huge quatre \\ text & text \\ \end{NiceTabular} @@ -1207,6 +1211,12 @@ arum & iris & jacinthe & muguet \end{NiceTabular} \end{center} +\medskip +On remarquera que quand la clé |rounded-corners| est utilisée pour +l'environnement |{NiceTabular}|, la clé |hvlines| trace des coins +arrondis pour le tableau : cf. partie~\ref{tabular-rounded-corners}, +p.~\pageref{tabular-rounded-corners}. + \medskip La clé |hvlines-except-borders| est similaire à la clé |hvlines| mais ne trace @@ -1260,9 +1270,12 @@ A & A & A & A & A & A \\ \medskip -Quand la clé |corners| est utilisée, \pkg{nicematrix} calcule les coins vides et -ces coins sont alors pris en compte par les outils de tracés de filets (les -filets ne seront pas tracés dans ces coins vides). +Quand la clé |corners|\footnote{La clé \texttt{corners} dont on parle là + n'a pas de rapport direct avec la clé \texttt{rounded-corners}, + décrite dans la partie \ref{tabular-rounded-corners}, + p.~\pageref{tabular-rounded-corners}.} est utilisée, \pkg{nicematrix} calcule +les coins vides et ces coins sont alors pris en compte par les outils de tracés +de filets (les filets ne seront pas tracés dans ces coins vides). \medskip \begin{BVerbatim}[boxwidth=11cm,baseline=c] @@ -1319,7 +1332,7 @@ doivent être séparés par des virgules). \end{NiceTabular} -\medskip +\bigskip $\triangleright$ Les coins sont également pris en compte par les outils de coloriage dans le |\CodeBefore|. Ces outils ne colorient pas les cases qui sont dans les coins (cf.~p.~\pageref{color-in-code-before}). @@ -1664,21 +1677,37 @@ De nouvelles commandes sont disponibles dans ce |\CodeBefore|: |\cellcolor|, p.~\pageref{nodes-i}.} \label{code-before} -\medskip -Toutes ces commandes acceptent un argument optionnel (entre crochets et en -première position) qui est le modèle colorimétrique pour la spécification des -couleurs. \medskip Ces commandes ne colorient pas les cases qui se trouvent dans les «coins» si la clé |corners| a été utilisée. La description de cette clé a été faite p.~\pageref{corners}. +\medskip +Ces commandes respectent les coins arrondis si la clé |rounded-corners| (décrite +à la partie \ref{tabular-rounded-corners}, p.~\pageref{tabular-rounded-corners}) +a été utilisée. + +\medskip +Toutes ces commandes acceptent un argument optionnel, entre crochets et en +première position. Cet argument optionel peut contenir deux éléments (séparés +par une virgule) : +\begin{itemize} +\item le modèle colorimétrique (|RGB|, |rgb|, |HTML|, etc.) comme spécifié par +l'extension \pkg{xcolor} ; +\item \colorbox{yellow!50}{\textbf{Nouveau 6.18}} + +une spécification d'opacité selon la forme \texttt{opacity = \textsl{valeur}}. +\end{itemize} + + +\medskip +On détaille maintenant ces différentes commandes. \medskip \begin{itemize} -\item La commande |\cellcolor| tient son nom de la commande |\cellcolor| de -\pkg{colortbl}. +\item La commande \Definition{\textbackslash cellcolor} tient son nom de la +commande |\cellcolor| de \pkg{colortbl}. Elle prend en arguments obligatoires une couleur et une liste de cases sous le format $i$-$j$ où $i$ est le numéro de ligne et $j$ le numéro de colonne. Malgré @@ -1710,9 +1739,9 @@ h & i & j \\ \medskip -\item La commande |\rectanglecolor| prend trois arguments obligatoires. Le -premier est la couleur, les deux suivants fournissent la case en haut à gauche -et la case en bas à droite du rectangle. +\item La commande \Definition{\textbackslash rectanglecolor} prend trois +arguments obligatoires. Le premier est la couleur, les deux suivants fournissent +la case en haut à gauche et la case en bas à droite du rectangle. \medskip \begin{scope} @@ -1739,15 +1768,16 @@ h & i & j \\ \medskip -\item La commande |\arraycolor| prend en argument obligatoire une couleur et -colorie tout le tableau (sauf les éventuelles rangées et colonnes extérieures: -cf.~p.~\pageref{exterior}) avec cette couleur. Ce n'est qu'un cas particulier de -la commande |\rectanglecolor|. +\item La commande \Definition{\textbackslash arraycolor} prend en argument +obligatoire une couleur et colorie tout le tableau (sauf les éventuelles rangées +et colonnes extérieures: cf.~p.~\pageref{exterior}) avec cette couleur. Ce n'est +qu'un cas particulier de la commande |\rectanglecolor|. \medskip \item \label{chessboardcolors}% -La commande |\chessboardcolors| prend en arguments obligatoires deux -couleurs et colorie les cases en quinconces avec les deux couleurs. +La commande \Definition{\textbackslash chessboardcolors} prend en arguments +obligatoires deux couleurs et colorie les cases en quinconces avec les deux +couleurs. \medskip \begin{scope} @@ -1778,11 +1808,11 @@ droite (cf. p.~\pageref{columns-type}). \medskip -\item La commande |\rowcolor| doit son nom à la commande |\rowcolor| de -\pkg{colortbl}. Son premier argument obligatoire est la couleur et le deuxième -est une liste de numéros de rangées ou bien d'intervalles de rangées sous la -forme $a$-$b$ (un intervalle de la forme $a$- représente toutes les rangées à -partir de la rangée~$a$). +\item La commande \Definition{\textbackslash rowcolor} doit son nom à la +commande |\rowcolor| de \pkg{colortbl}. Son premier argument obligatoire est la +couleur et le deuxième est une liste de numéros de rangées ou bien d'intervalles +de rangées sous la forme $a$-$b$ (un intervalle de la forme $a$- représente +toutes les rangées à partir de la rangée~$a$). \medskip @@ -1826,13 +1856,14 @@ a_{10} & b_{10} & c_{10} \\ \medskip -\item La commande |\columncolor| doit son nom à la commande |\columncolor| de -\pkg{colortbl}. Sa syntaxe est similaire à celle de |\rowcolor|. +\item La commande \Definition{\textbackslash columncolor} doit son nom à la +commande |\columncolor| de \pkg{colortbl}. Sa syntaxe est similaire à celle de +|\rowcolor|. \medskip -\item La commande |\rowcolors| (avec un \emph{s}) doit son nom à la commande -|\rowcolors| de \pkg{colortbl}. Le \emph{s} rappelle -qu'il y a deux couleurs. Elle colorie alternativement les rangées avec les deux +\item La commande \Definition{\textbackslash rowcolors} (avec un \emph{s}) doit +son nom à la commande |\rowcolors| de \pkg{colortbl}. Le \emph{s} rappelle qu'il +y a deux couleurs. Elle colorie alternativement les rangées avec les deux couleurs à partir de la rangée dont le numéro est donné en premier argument (obligatoire), comme le fait la commande |\rowcolors| de \pkg{xcolor}. @@ -1843,10 +1874,10 @@ l'intervalle constitué de toutes les rangées du tableau à partir de la rangé \medskip -La commande |\rowcolors| accepte une liste de couples \textsl{clé=valeur} comme -argument optionnel en dernière position (l'argument optionnel en première -position correspond à l'espace colorimétrique). Les clés disponibles sont -|cols|, |restart| et |respect-blocks|. +La commande |\rowcolors| accepte une liste de couples +\textsl{clé=valeur} comme argument optionnel en dernière position (l'argument +optionnel en première position correspond à l'espace colorimétrique). Les clés +disponibles sont |cols|, |restart| et |respect-blocks|. \begin{itemize} \item La clé |cols| décrit un ensemble de colonnes sur lesquelles portera l'effet de |\rowcolors|. Cet ensemble de colonnes est une liste d'intervalles de @@ -1940,11 +1971,11 @@ Henri & 14 \\ \medskip -\item L'extension \pkg{nicematrix} propose aussi une commande |\rowlistcolors|. -Cette commande généralise la commande |\rowcolors|: au lieu de prendre deux -arguments successifs pour les couleurs, elle prend un seul argument qui est une -liste de couleurs séparées par des virgules. Dans cette liste, le symbole |=| -représente une couleur identique à la précédente. +\item L'extension \pkg{nicematrix} propose aussi une commande \Definition{\textbackslash + rowlistcolors}. Cette commande généralise la commande |\rowcolors|: au lieu de +prendre deux arguments successifs pour les couleurs, elle prend un seul argument +qui est une liste de couleurs séparées par des virgules. Dans cette liste, le +symbole |=| représente une couleur identique à la précédente. \smallskip \begin{BVerbatim}[boxwidth=10cm,baseline=c] @@ -2189,7 +2220,7 @@ de même nom (cf. p.~\pageref{cell-space}). \item La clé |rowcolor| fixe la couleur de fond et la clé |color| fixe la couleur du texte.\footnote{La clé |color| utilise la commande |\color| mais insère aussi une instruction |\leavevmode| devant. Cela évite un espace - vertical parasite dans les cellules qui correspondent à des colonnes de type + vertical parasite dans les cases qui correspondent à des colonnes de type |p|, |b|, |m|, |X| et |V| (qui débutent en mode vertical).} \item La clé |bold| impose des caractères gras aux éléments de la rangée, qu'ils @@ -2493,7 +2524,7 @@ Dans le cadre de \pkg{nicematrix}, l'un des intérêts des colonnes de type |V| par rapport aux colonnes de type |p|, |m| ou |b| est que, pour les cases d'une telle colonne, le nœud PGF-TikZ créé pour le contenu d'une telle case a une largeur ajustée -au contenu de la cellule en question : cf. p.~\pageref{node-V}. +au contenu de la case en question : cf. p.~\pageref{node-V}. \medskip @@ -3655,7 +3686,7 @@ Comme on le voit, le tracé effectué par la commande |\MyDraw| est \emph{relati Les commandes |\OverBrace| and |\UnderBrace| permettent de placer des accolades horizontales sur une partie du tableau. Ces commandes prennent trois arguments : \begin{itemize} -\item le premier argument est le coin supérieur gauche du rectangle de cellules +\item le premier argument est le coin supérieur gauche du rectangle de cases impliquées dans l'accolade avec la syntaxe habituelle $i$|-|$j$ où $i$ est le numéro de rangée et $j$ le numéro de colonne ; @@ -4116,6 +4147,55 @@ utile l'utilisation de \pkg{threeparttable} en conjonction avec \pkg{nicematrix} \section{Autres fonctionnalités} +\subsection{La clé rounded-corners de \{NiceTabular\}} + +\label{tabular-rounded-corners} + +\colorbox{yellow!50}{\textbf{Nouveau 6.18}}\par\nobreak + +\smallskip +La clé |rounded-corners| que l'on décrit maintenant n'a pas de lien direct avec +la clé |corners| (qui sert à spécifier les «coins vides») décrite à la +partie~\ref{corners}, p.~\pageref{corners}. + +\smallskip +L'environnement |{NiceTabular}| propose une clé |rounded-corners| qui spécifie +que le tableau devra avoir des coins arrondis avec le rayon égal à la valeur +de cette clé (la valeur par défaut est 4~pt\footnote{Cette valeur est la valeur + par défaut des «\texttt{rounded corners}» de PGF/Tikz.}). Plus précisément, +cette clé a deux effets que l'on décrit maintenant. +\begin{itemize} +\item Toutes les commandes de coloriage de cases, colonnes et rangées (que ce +soit dans le |\CodeBefore| ou bien directement dans le tableau (quand la clé +|colortbl-like| est utilisée) respectent ces coins arrondis pour le tableau. + +\item Quand la clé |hvlines| est utilisée, les filets extérieurs sont tracés +avec des coins arrondis. +\end{itemize} + +\bigskip +\begin{BVerbatim}[baseline=c,boxwidth=9.5cm] +\begin{NiceTabular}{ccc}[hvlines,~emphase#rounded-corners@] +\CodeBefore + \rowcolor{red!15}{1} +\Body + Nom & Prénom & Profession \\ + Arvy & Jacques & Dentiste \\ + Jalon & Amandine & Dentiste \\ +\end{NiceTabular} +\end{BVerbatim} +\begin{NiceTabular}{ccc}[hvlines,rounded-corners] +\CodeBefore + \rowcolor{red!15}{1} +\Body + Nom & Prénom & Profession \\ + Arvy & Jacques & Dentiste \\ + Jalon & Amandine & Dentiste \\ + Sept & Huit & Neuf +\end{NiceTabular} + + + \subsection{Commande \textbackslash ShowCellNames} @@ -4168,7 +4248,7 @@ $\begin{pNiceArray}{ScW{c}{1cm}c}[nullify-dots,first-row] \end{pNiceArray}$ \medskip -En revanche, les colonnes |d| de l'extension \pkg{dcolumn} ne sont pas prises en +En revanche, les colonnes |d| de l'extension \pkg{dcolumn} ne sont \emph{pas} prises en charge par \pkg{nicematrix}. @@ -4656,9 +4736,9 @@ contenir au moins une instruction comme |\pgfusepath|, |\pgfusepathqstroke|, \label{node-V} Quand l'extension \pkg{varwidth} est chargée, les colonnes de type |V| définies par \pkg{varwidth} sont prises en charge par \pkg{nicematrix}. Il peut être -intéressant de préciser que, pour une cellule située dans une colonne de type -|V|, le nœud PGF-TikZ créé par \pkg{nicematrix} pour le contenu de cette cellule -a une largeur ajustée au contenu de cette cellule. Cela est en contraste avec le +intéressant de préciser que, pour une case située dans une colonne de type +|V|, le nœud PGF-TikZ créé par \pkg{nicematrix} pour le contenu de cette case +a une largeur ajustée au contenu de cette case. Cela est en contraste avec le cas des colonnes de type |p|, |m| ou |b| dans lesquelles les nœuds ont toujours une largeur égale à la largeur de la colonne. Dans l'exemple suivant, la commande |\lipsum| est fournie par l'extension éponyme. @@ -4920,7 +5000,7 @@ Voici un exemple d'utilisation de ces nœuds dans le |\CodeAfter|. \hline u_n &-& u_0 &=& nr \\ \CodeAfter - \tikz[very thick, red, opacity=0.4,name suffix = -medium] + \tikz[very thick, red, opacity=0.4, name suffix = -medium] \draw (1-1.north west) -- (2-3.south east) (2-1.north west) -- (3-3.south east) (3-1.north west) -- (4-3.south east) @@ -5112,7 +5192,7 @@ compilation supplémentaire (car les instructions sont écrites dans le fichier \medskip \emph{Exemple} : On souhaite écrire une commande |\crossbox| qui barre en croix -la cellule courante. Cette commande prendra en argument optionnel une liste de +la case courante. Cette commande prendra en argument optionnel une liste de couples \textsl{clé}-\textsl{valeur} qui sera passée à TikZ avant que la croix ne soit tracée. @@ -5559,32 +5639,6 @@ tous les filets sauf ceux sur les bords (qui sont, bien entendu, ajoutés par \end{center} -\vspace{1cm} -Cet exemple montre l'utilisation de \pkg{nicematrix} en conjonction avec -\pkg{tcolorbox}. Si on souhaite seulement faire un tableau avec un cadre -extérieur aux coins arrondis, il n'est pas nécessaire d'utiliser \pkg{tcolorbox} : -on peut tracer un |\Block| avec la commande |rounded-corners|. - -\medskip -\begin{BVerbatim}[baseline=c,boxwidth=10.5cm] -\begin{NiceTabular}{rcl}[hvlines-except-borders] -\Block[draw,transparent,~emphase#rounded-corners@]{*-*}{} - One & Two & Three \\ - Men & Mice & Lions \\ - Upper & Middle & Lower -\end{NiceTabular} -\end{BVerbatim} -\begin{NiceTabular}{rcl}[hvlines-except-borders] -\Block[draw,transparent,rounded-corners]{*-*}{} - One & Two & Three \\ - Men & Mice & Lions \\ - Upper & Middle & Lower -\end{NiceTabular} - -\medskip -On a utilisé la clé |transparent| de manière à avoir les filets spécifiés par -|hvlines-except-borders| tracés dans le bloc (par défaut, les filets ne sont -pas tracés dans les blocs). \subsection{Notes dans les tableaux} @@ -6291,7 +6345,7 @@ On considère maintenant la matrice suivante. Si on veut surligner chaque rangé de la matrice, on peut utiliser la technique précédente trois fois. \begin{Verbatim} -\[\begin{pNiceArray}{ccc}[last-col] +\[\begin{pNiceArray}{ccc}[last-col, margin = 2pt] \CodeBefore [create-cell-nodes] \begin{tikzpicture} ~emphase# \node [highlight = (1-1) (1-3)] {} ;@ @@ -6305,7 +6359,7 @@ a & a & a & L_3 \end{pNiceArray}\] \end{Verbatim} -\[\begin{pNiceArray}{ccc}[last-col] +\[\begin{pNiceArray}{ccc}[last-col, margin = 2pt] \CodeBefore [create-cell-nodes] \begin{tikzpicture} \node [highlight = (1-1) (1-3)] {} ; @@ -6323,7 +6377,7 @@ Le résultat peut paraître décevant. On peut l'améliorer en utilisant les «n moyens» au lieu des «nœuds normaux». \begin{Verbatim} -\[\begin{pNiceArray}{ccc}[last-col,create-medium-nodes] +\[\begin{pNiceArray}{ccc}[last-col, margin = 2pt, create-medium-nodes] \CodeBefore [create-cell-nodes] \begin{tikzpicture} ~emphase#[name suffix = -medium]@ \node [highlight = (1-1) (1-3)] {} ; @@ -6338,7 +6392,7 @@ a & a & a & L_3 \end{Verbatim} -\[\begin{pNiceArray}{ccc}[last-col,create-medium-nodes] +\[\begin{pNiceArray}{ccc}[last-col, margin = 2pt, create-medium-nodes] \CodeBefore [create-cell-nodes] \begin{tikzpicture} [name suffix = -medium] \node [highlight = (1-1) (1-3)] {} ; @@ -6441,7 +6495,7 @@ de parenthèses ont été rajoutées avec |\SubMatrix| dans le |\CodeBefore|. \label{triangular} Dans l'exemple suivant, on utilise le style PGF/Tikz |nicematrix/cell-node| pour faire -tourner le contenu des cellules (rotation que l'on compense ensuite en faisant +tourner le contenu des cases (rotation que l'on compense ensuite en faisant tourner tout le tableau avec la commande |\adjustbox| de l'extension éponyme, qui doit donc être chargée préalablement). diff --git a/macros/latex/contrib/nicematrix/nicematrix.dtx b/macros/latex/contrib/nicematrix/nicematrix.dtx index 3620cc0f4b..c22ed30da1 100644 --- a/macros/latex/contrib/nicematrix/nicematrix.dtx +++ b/macros/latex/contrib/nicematrix/nicematrix.dtx @@ -17,8 +17,8 @@ % % \fi % \iffalse -\def\myfileversion{6.17} -\def\myfiledate{2023/03/31} +\def\myfileversion{6.18} +\def\myfiledate{2023/04/19} % % %<*batchfile> @@ -850,7 +850,6 @@ version 2005/12/01 or later. % % \subsection{Vertical position of the content of the block} % -% \colorbox{yellow!50}{\textbf{New 6.14}} % % For the vertical position, the command |\Blocks| accepts the keys % |v-center|\footnote{That key could not have been named |c| since the key |c| @@ -866,11 +865,14 @@ version 2005/12/01 or later. % block (we recall that the content of a block may contains several lines % separated by |\\|) is aligned with the baseline of the last of the rows of the % array involved in the block. -% \item With the key |T|, the content of the block is set upwards with only a -% margin equal to the PGF/Tikz parameter |inner ysep| (use |\pgfset| to change -% the value of that parameter). -% \item With the key |B|, the content of the block is set downwards with only a -% margin equal to the PGF/Tikz parameter |inner ysep|. +% \item With the key |T|, the content of the block is set upwards. +% +% \colorbox{yellow!50}{\textbf{Modification 6.18}}\enskip No vertical margin is +% added. However, the contents of the block is (always) composed by +% \pkg{nicematrix} in a |{minipage}|, a |{tabular}| or an |{array}| and, hence, +% there will still remain a margin (in most cases). +% +% \item With the key |B|, the content of the block is set downwards. % \end{itemize} % % When no key is given, the key |v-center| applies (excepted in the mono-row blocks). @@ -890,19 +892,19 @@ version 2005/12/01 or later. % \begin{BVerbatim}[baseline=c,boxwidth=10cm] % \begin{NiceTabular}{ccc} % \Block[fill=red!10,~emphase#t@,l]{4-2}{two\\lines} -% & & \Huge first\\ -% & & second \\ -% & & third \\ -% & & fourth \\ +% & & \Huge Un\\ +% & & deux \\ +% & & trois \\ +% & & \Huge quatre \\ % text & text \\ % \end{NiceTabular} % \end{BVerbatim} % \begin{NiceTabular}{ccc} % \Block[fill=red!10,t,l]{4-2}{two\\lines} -% & & \Huge first\\ -% & & second \\ -% & & third \\ -% & & fourth \\ +% & & \Huge Un\\ +% & & deux \\ +% & & trois \\ +% & & \Huge quatre \\ % text & text \\ % \end{NiceTabular} % @@ -911,19 +913,19 @@ version 2005/12/01 or later. % \begin{BVerbatim}[baseline=c,boxwidth=10cm] % \begin{NiceTabular}{ccc} % \Block[fill=red!10,~emphase#b@,r]{4-2}{two\\lines} -% & & \Huge first\\ -% & & second \\ -% & & third \\ -% & & fourth \\ +% & & \Huge Un\\ +% & & deux \\ +% & & trois \\ +% & & \Huge quatre \\ % text & text \\ % \end{NiceTabular} % \end{BVerbatim} % \begin{NiceTabular}{ccc} % \Block[fill=red!10,b,r]{4-2}{two\\lines} -% & & \Huge first\\ -% & & second \\ -% & & third \\ -% & & fourth \\ +% & & \Huge Un\\ +% & & deux \\ +% & & trois \\ +% & & \Huge quatre \\ % text & text \\ % \end{NiceTabular} % @@ -931,19 +933,19 @@ version 2005/12/01 or later. % \begin{BVerbatim}[baseline=c,boxwidth=10cm] % \begin{NiceTabular}{ccc} % \Block[fill=red!10,~emphase#T@,l]{4-2}{two\\lines} -% & & \Huge first\\ -% & & second \\ -% & & third \\ -% & & fourth \\ +% & & \Huge Un\\ +% & & deux \\ +% & & trois \\ +% & & \Huge quatre \\ % text & text \\ % \end{NiceTabular} % \end{BVerbatim} % \begin{NiceTabular}{ccc} % \Block[fill=red!10,T,l]{4-2}{two\\lines} -% & & \Huge first\\ -% & & second \\ -% & & third \\ -% & & fourth \\ +% & & \Huge Un\\ +% & & deux \\ +% & & trois \\ +% & & \Huge quatre \\ % text & text \\ % \end{NiceTabular} % @@ -952,22 +954,23 @@ version 2005/12/01 or later. % \begin{BVerbatim}[baseline=c,boxwidth=10cm] % \begin{NiceTabular}{ccc} % \Block[fill=red!10,~emphase#B@,r]{4-2}{two\\lines} -% & & \Huge first\\ -% & & second \\ -% & & third \\ -% & & fourth \\ +% & & \Huge Un\\ +% & & deux \\ +% & & trois \\ +% & & \Huge quatre \\ % text & text \\ % \end{NiceTabular} % \end{BVerbatim} % \begin{NiceTabular}{ccc} % \Block[fill=red!10,B,r]{4-2}{two\\lines} -% & & \Huge first\\ -% & & second \\ -% & & third \\ -% & & fourth \\ +% & & \Huge Un\\ +% & & deux \\ +% & & trois \\ +% & & \Huge quatre \\ % text & text \\ % \end{NiceTabular} % +% % \end{scope} % % @@ -1235,9 +1238,15 @@ version 2005/12/01 or later. % \end{center} % % \bigskip +% It's worth noting that, when the key |rounded-corners| is used for the +% environment |{NiceTabular}|, the key |hvlines| draws rounded corners for the +% exterior frame of the tabular: cf. part~\ref{tabular-rounded-corners}, +% p.~\pageref{tabular-rounded-corners}. +% +% \bigskip % The key |hvlines-except-borders| is similar to the key |hvlines| but does not % draw the rules on the horizontal and vertical borders of the array. For an -% example of use of that key, see the part ``Use with tcolorbox`, +% example of use of that key, see the part ``Use with tcolorbox'', % p.~\pageref{tcolorbox}. % % \subsubsection{The (empty) corners} @@ -1255,7 +1264,7 @@ version 2005/12/01 or later. % natural. The precise definition of a ``non-empty cell'' is given below (cf. % p.~\pageref{empty-cells}).} % -% However, it's possible, for a cell without content, to require \pkg{nicemarix} +% However, it's possible, for a cell without content, to require \pkg{nicematrix} % to consider that cell as not empty with the key |\NotEmpty|. % %\bigskip @@ -1283,9 +1292,12 @@ version 2005/12/01 or later. % \end{NiceTabular} % % \bigskip -% When the key |corners| is used, \pkg{nicematrix} computes the (empty) corners -% and these corners will be taken into account by the tools for drawing the -% rules (the rules won't be drawn in the corners). +% When the key |corners|\footnote{The key \texttt{corners} that we describe now +% has no direct link with the key \texttt{rounded-corners} described in the part +% \ref{tabular-rounded-corners}, p.~\pageref{tabular-rounded-corners}} is used, +% \pkg{nicematrix} computes the (empty) corners and these corners will be taken +% into account by the tools for drawing the rules (the rules won't be drawn in +% the corners). % % \bigskip % \begin{BVerbatim}[boxwidth=11cm,baseline=c] @@ -1675,18 +1687,33 @@ version 2005/12/01 or later. % \label{code-before} % % \medskip -% All these commands accept an optional argument (between square brackets and -% in first position) which is the color model for the specification of the -% colors. +% These commands don't color the cells which are in the ``corners'' if the key +% |corners| is used. That key has been described p.~\pageref{corners}. % % \medskip -% These commands don't color the cells which are in the ``corners'' if the key -% |corners| is used. This key has been described p.~\pageref{corners}. +% These commands respect the rounded corners if the key |rounded-corners| +% (described in the part \ref{tabular-rounded-corners} at the +% page~\pageref{tabular-rounded-corners}) has been used. +% +% \medskip +% All these commands accept an optional argument, between square brackets and +% in first position. That optional argument may contain two elements (separated +% by a comma) +% \begin{itemize} +% \item the colorimetric space (|RGB|, |rgb|, |HTML|, etc) as specified by the +% the extension \pkg{xcolor}; +% \item \colorbox{yellow!50}{\textbf{New 6.18}}\par\nobreak +% a specification of opacity f the form \texttt{opacity = \textsl{value}}. +% \end{itemize} % +% \bigskip +% +% We describe now in detail those commands. +% % \medskip % \begin{itemize} -% \item The command |\cellcolor| takes its name from the command |\cellcolor| of -% \pkg{colortbl}. +% \item The command \Definition{\textbackslash cellcolor} takes its name from +% the command |\cellcolor| of \pkg{colortbl}. % % This command takes in as mandatory arguments a color and a list of cells, each % of which with the format $i$-$j$ where $i$ is the number of the row and $j$ the @@ -1718,9 +1745,9 @@ version 2005/12/01 or later. % \end{scope} % % \bigskip -% \item The command |\rectanglecolor| takes three mandatory arguments. The first -% is the color. The second is the upper-left cell of the rectangle and the third -% is the lower-right cell of the rectangle. +% \item The command \Definition{\textbackslash rectanglecolor} takes three +% mandatory arguments. The first is the color. The second is the upper-left cell +% of the rectangle and the third is the lower-right cell of the rectangle. % % \medskip % \begin{scope} @@ -1746,15 +1773,16 @@ version 2005/12/01 or later. % \end{scope} % % \bigskip -% \item The command |\arraycolor| takes in as mandatory argument a color and -% color the whole tabular with that color (excepted the potential exterior rows -% and columns: cf.~p.~\pageref{exterior}). It's only a particular case of -% |\rectanglecolor|. +% \item The command \Definition{\textbackslash arraycolor} takes in as mandatory +% argument a color and color the whole tabular with that color (excepted the +% potential exterior rows and columns: cf.~p.~\pageref{exterior}). It's only a +% particular case of |\rectanglecolor|. % % % \bigskip -% \item The command |\chessboardcolors| takes in as mandatory arguments two colors -% and it colors the cells of the tabular in quincunx with these colors. +% \item The command \Definition{\textbackslash chessboardcolors} takes in as +% mandatory arguments two colors and it colors the cells of the tabular in +% quincunx with these colors. % % \medskip % \begin{scope} @@ -1785,10 +1813,11 @@ version 2005/12/01 or later. % % % \bigskip -% \item The command |\rowcolor| takes its name from the command |\rowcolor| of -% \pkg{colortbl}. Its first mandatory argument is the color and the second is a -% comma-separated list of rows or interval of rows with the form $a$-$b$ (an -% interval of the form $a$- represent all the rows from the row $a$ until the end). +% \item The command \Definition{\textbackslash rowcolor} takes its name from the +% command |\rowcolor| of \pkg{colortbl}. Its first mandatory argument is the +% color and the second is a comma-separated list of rows or interval of rows +% with the form $a$-$b$ (an interval of the form $a$- represent all the rows +% from the row $a$ until the end). % % \medskip % \begin{scope} @@ -1829,17 +1858,17 @@ version 2005/12/01 or later. % % % \bigskip -% \item The command |\columncolor| takes its name from the command -% |\columncolor| of \pkg{colortbl}. Its syntax is similar to the syntax of -% |\rowcolor|. +% \item The command \Definition{\textbackslash columncolor} takes its name from +% the command |\columncolor| of \pkg{colortbl}. Its syntax is similar to the +% syntax of |\rowcolor|. % % \bigskip -% \item The command |\rowcolors| (with a \emph{s}) takes its name from the -% command |\rowcolors| of \pkg{colortbl}. The \emph{s} emphasizes -% the fact that there is \emph{two} colors. This command colors alternately the -% rows of the tabular with the two colors (provided in second and third -% argument), beginning with the row whose number is given in first (mandatory) -% argument. +% \item The command \Definition{\textbackslash rowcolors} (with a \emph{s}) +% takes its name from the command |\rowcolors| of \pkg{colortbl}. The \emph{s} +% emphasizes the fact that there is \emph{two} colors. This command colors +% alternately the rows of the tabular with the two colors (provided in second +% and third argument), beginning with the row whose number is given in first +% (mandatory) argument. % % In fact, the first (mandatory) argument is, more generally, a comma separated % list of intervals describing the rows involved in the action of |\rowcolors| @@ -1936,11 +1965,11 @@ version 2005/12/01 or later. % % % \bigskip -% \item The extension \pkg{nicematrix} provides also a command |\rowlistcolors|. -% This command generalises the command |\rowcolors|: instead of two successive -% arguments for the colors, this command takes in an argument which is a -% (comma-separated) list of colors. In that list, the symbol |=| represent a -% color identical to the previous one. +% \item The extension \pkg{nicematrix} provides also a command +% \Definition{\textbackslash rowlistcolors}. This command generalises the +% command |\rowcolors|: instead of two successive arguments for the colors, this +% command takes in an argument which is a (comma-separated) list of colors. In +% that list, the symbol |=| represent a color identical to the previous one. % % \smallskip % \begin{BVerbatim}[boxwidth=10cm,baseline=c] @@ -4068,15 +4097,63 @@ version 2005/12/01 or later. % % \section{Other features} % +% \subsection{The key rounded-corners of \{NiceTabular\}} +% +% \label{tabular-rounded-corners} +% \colorbox{yellow!50}{\textbf{New 6.18}}\par\nobreak +% +% \smallskip +% The key |rounded-corners| that we will descrite now has no direct link with +% the key |corners| (which is used to specify ``empty corners'') described in +% the part~\ref{corners}, p.~\pageref{corners}. +% +% \smallskip +% The environment |{NiceTabular}| provides also a key |rounded-corners| which +% specify that the tabular should have rounded corners with a radius equal to +% the value of that key (the default value is 4~pt\footnote{This value is the +% initial value of the \emph{rounded corners} of Tikz.}). More precisely, that +% key has two effects that we describe now. +% \begin{itemize} +% \item All the commands for coloring the cells, columns and rows (in the +% |\CodeBefore| but also directly in the array if the key |colortbl-like| is +% used) will respect those rounded corners. +% +% \item When the key |hvlines| is used, the exterior rules will be drawn with +% rounded corners. +% \end{itemize} +% \bigskip +% \begin{BVerbatim}[baseline=c,boxwidth=9cm] +% \begin{NiceTabular} +% [hvlines,~emphase#rounded-corners@] +% {ccc} +% \CodeBefore +% \rowcolor{red!15}{1} +% \Body +% Last name & First name & Profession \\ +% Arvy & Jacques & Physicist \\ +% Jalon & Amandine & Physicist +% \end{NiceTabular} +% \end{BVerbatim} +% \begin{NiceTabular}{ccc}[hvlines,rounded-corners] +% \CodeBefore +% \rowcolor{red!15}{1} +% \Body +% Last name & First name & Profession \\ +% Arvy & Jacques & Physicist \\ +% Jalon & Amandine & Physicist +% \end{NiceTabular} +% +% % \subsection{Command \textbackslash ShowCellNames} % % The command |\ShowCellNames|, which may be used in the |\CodeBefore| and in -% the |\CodeAfter| display the name (with the form $i$-$j$) of each cell. When +% the |\CodeAfter| displays the name (with the form $i$-$j$) of each cell. When % used in the |\CodeAfter|, that command applies a semi-transparent white % rectangle to fade the array (caution: some \textsc{pdf} readers don't support % transparency). % +% \medskip % \begin{BVerbatim}[baseline=c,boxwidth=10.6cm] % \begin{NiceTabular}{ccc}[hvlines,cell-space-limits=3pt] % \Block{2-2}{} & & test \\ @@ -4858,7 +4935,7 @@ version 2005/12/01 or later. % \hline % u_n &-& u_0 &=& nr \\ % \CodeAfter -% \tikz[very thick, red, opacity=0.4,name suffix = -medium] +% \tikz[very thick, red, opacity=0.4, name suffix = -medium] % \draw (1-1.north west) -- (2-3.south east) % (2-1.north west) -- (3-3.south east) % (3-1.north west) -- (4-3.south east) @@ -4878,7 +4955,7 @@ version 2005/12/01 or later. % \hline % u_n &-& u_0 &=& nr \\ % \CodeAfter -% \tikz[very thick, red, opacity=0.4,name suffix = -medium] +% \tikz[very thick, red, opacity=0.4, name suffix = -medium] % \draw (1-1.north west) -- (2-3.south east) % (2-1.north west) --(3-3.south east) % (3-1.north west) -- (4-3.south east) @@ -6200,7 +6277,7 @@ version 2005/12/01 or later. % this matrix, we can use the previous technique three times. % % \begin{Verbatim} -% \[\begin{pNiceArray}{ccc}[last-col] +% \[\begin{pNiceArray}{ccc}[last-col, margin = 2pt] % \CodeBefore [create-cell-nodes] % \begin{tikzpicture} % ~emphase# \node [highlight = (1-1) (1-3)] {} ;@ @@ -6215,7 +6292,7 @@ version 2005/12/01 or later. % \end{Verbatim} % % -% \[\begin{pNiceArray}{ccc}[last-col] +% \[\begin{pNiceArray}{ccc}[last-col, margin = 2pt] % \CodeBefore [create-cell-nodes] % \begin{tikzpicture} % \node [highlight = (1-1) (1-3)] {} ; @@ -6233,7 +6310,7 @@ version 2005/12/01 or later. % nodes'' instead of the ``normal nodes''. % % \begin{Verbatim} -% \[\begin{pNiceArray}{ccc}[last-col,create-medium-nodes] +% \[\begin{pNiceArray}{ccc}[last-col, margin = 2pt, create-medium-nodes] % \CodeBefore [create-cell-nodes] % \begin{tikzpicture} ~emphase#[name suffix = -medium]@ % \node [highlight = (1-1) (1-3)] {} ; @@ -6248,7 +6325,7 @@ version 2005/12/01 or later. % \end{Verbatim} % % -%\[\begin{pNiceArray}{ccc}[last-col,create-medium-nodes] +%\[\begin{pNiceArray}{ccc}[last-col, margin = 2pt, create-medium-nodes] % \CodeBefore [create-cell-nodes] % \begin{tikzpicture} [name suffix = -medium] % \node [highlight = (1-1) (1-3)] {} ; @@ -6597,27 +6674,25 @@ version 2005/12/01 or later. % \end{macrocode} % % \bigskip -% Here, the box |\l_tmpa_box| will be used as sandbox to take our security test. +% Here, the box |\l_tmpa_box| will be used as sandbox to take our security test. +% This code has benne modified in version 6.18 (see question 682891 on TeX +% StackExchange). % \begin{macrocode} -\hook_gput_code:nnn { begindocument } { . } +\hook_gput_code:nnn { begindocument / after } { . } { \@ifpackageloaded { mdwtab } { \@@_fatal:n { mdwtab~loaded } } { - \@ifpackageloaded { fontspec } - { } + \bool_if:NF \c_@@_no_test_for_array_bool { - \bool_if:NF \c_@@_no_test_for_array_bool - { - \group_begin: - \hbox_set:Nn \l_tmpa_box - { - \begin { tabular } { c > { \@@_security_test:n } c c } - text & & text - \end { tabular } - } - \group_end: - } + \group_begin: + \hbox_set:Nn \l_tmpa_box + { + \begin { tabular } { c > { \@@_security_test:n } c c } + text & & text + \end { tabular } + } + \group_end: } } } @@ -7174,6 +7249,13 @@ version 2005/12/01 or later. % \end{macrocode} % % \bigskip +% The following dimension will be used by the command |\Block| for the blocks +% with a key of vertical position equal to |T| or |B|. +% \begin{macrocode} +\dim_new:N \l_@@_block_ysep_dim +% \end{macrocode} +% +% \bigskip % The following dimension correspond to the key |width| (which may be fixed in % |\NiceMatrixOptions| but also in an environment |{NiceTabular}|). % \begin{macrocode} @@ -7377,6 +7459,9 @@ version 2005/12/01 or later. % \end{macrocode} % % \bigskip +% The value of the key |code-before| will be added to the left of +% |\g_@@_pre_code_before_tl|. Idem for the code between |\CodeBefore| and +% |\Body|. % \begin{macrocode} \tl_new:N \g_nicematrix_code_before_tl \tl_new:N \g_@@_pre_code_before_tl @@ -7586,7 +7671,7 @@ version 2005/12/01 or later. % % \medskip % The following flag will be raised if the key |width| is used in an environment -% |{NiceTabular}| (not in a comamnd |\NiceMatrixOptions|). You use it to raise +% |{NiceTabular}| (not in a command |\NiceMatrixOptions|). You use it to raise % an error when this key is used while no column |X| is used. % \begin{macrocode} \bool_new:N \l_@@_width_used_bool @@ -7648,6 +7733,15 @@ version 2005/12/01 or later. % |corners| is used). % % \medskip +% The following dimension corresponds to the key |rounded-corners| available in +% an individual environment |{NiceTabular}|. When that key is used, a clipping +% is applied in the |\CodeBefore| of the environment in order to have rounded +% corners for the potential colored panels. +% \begin{macrocode} +\dim_new:N \l_@@_tab_rounded_corners_dim +% \end{macrocode} +% +% \medskip % The following token list correspond to the key |color| of the command |\Block| % and also the key |color| of the command |\RowStyle|. % \begin{macrocode} @@ -7712,11 +7806,20 @@ version 2005/12/01 or later. \dim_new:N \l_@@_submatrix_left_xshift_dim \dim_new:N \l_@@_submatrix_right_xshift_dim \clist_new:N \l_@@_hlines_clist -\clist_new:N \l_@@_vlines_clist +\clist_new:N \l_@@_vlines_clist \clist_new:N \l_@@_submatrix_hlines_clist \clist_new:N \l_@@_submatrix_vlines_clist % \end{macrocode} % +% \medskip +% The following key is set when the keys |hvlines| and |hvlines-except-borders| +% are used. It's used only to change slightly the clipping path set by the key +% |rounded-corners| (for a |{tabular}|). +% \begin{macrocode} +\bool_new:N \l_@@_hvlines_bool +% \end{macrocode} +% +% % % \bigskip % The following flag will be used by (for instance) |\@@_vline_ii:|. @@ -8475,6 +8578,7 @@ version 2005/12/01 or later. % \begin{macrocode} \tl_new:N \l_@@_delimiters_color_tl % \end{macrocode} +% % % \bigskip % Sometimes, we want to have several arrays vertically juxtaposed in order to @@ -8619,6 +8723,7 @@ version 2005/12/01 or later. vlines-in-sub-matrix .value_required:n = true , hvlines .code:n = { + \bool_set_true:N \l_@@_hvlines_bool \clist_set:Nn \l_@@_vlines_clist { all } \clist_set:Nn \l_@@_hlines_clist { all } } , @@ -8626,6 +8731,7 @@ version 2005/12/01 or later. { \clist_set:Nn \l_@@_vlines_clist { all } \clist_set:Nn \l_@@_hlines_clist { all } + \bool_set_true:N \l_@@_hvlines_bool \bool_set_true:N \l_@@_except_borders_bool } , parallelize-diags .bool_set:N = \l_@@_parallelize_diags_bool , @@ -8996,6 +9102,8 @@ version 2005/12/01 or later. width .code:n = \dim_set:Nn \l_@@_width_dim { #1 } \bool_set_true:N \l_@@_width_used_bool , width .value_required:n = true , + rounded-corners .dim_set:N = \l_@@_tab_rounded_corners_dim , + rounded-corners .default:n = 4 pt , notes .code:n = \keys_set:nn { NiceMatrix / notes } { #1 } , tabularnote .tl_gset:N = \g_@@_tabularnote_tl , tabularnote .value_required:n = true , @@ -9745,7 +9853,7 @@ version 2005/12/01 or later. \cs_set_eq:NN \Block \@@_Block: \cs_set_eq:NN \rotate \@@_rotate: \cs_set_eq:NN \OnlyMainNiceMatrix \@@_OnlyMainNiceMatrix:n - \cs_set_eq:NN \dotfill \@@_old_dotfill: + \cs_set_eq:NN \dotfill \@@_dotfill: \cs_set_eq:NN \CodeAfter \@@_CodeAfter: \cs_set_eq:NN \diagbox \@@_diagbox:nn \cs_set_eq:NN \NotEmpty \@@_NotEmpty: @@ -10989,7 +11097,11 @@ version 2005/12/01 or later. \keys_set:nn { NiceMatrix / ColumnTypes } { #1 } \@@_patch_preamble:n } - { \@@_fatal:nn { unknown~column~type } { #1 } } + { + \tl_if_eq:nnT { #1 } { S } + { \@@_fatal:n { unknown~column~type~S } } + { \@@_fatal:nn { unknown~column~type } { #1 } } + } } } } @@ -12027,7 +12139,11 @@ version 2005/12/01 or later. \@@_W: { \@@_patch_m_preamble_v:nnnn { \@@_special_W: } #1 } \q_stop { } } - { \@@_fatal:nn { unknown~column~type } { #1 } } + { + \tl_if_eq:nnT { #1 } { S } + { \@@_fatal:n { unknown~column~type~S } } + { \@@_fatal:nn { unknown~column~type } { #1 } } + } } % \end{macrocode} % @@ -13294,6 +13410,36 @@ version 2005/12/01 or later. { \dim_set_eq:NN \l_@@_width_dim \linewidth } \str_gset:Nn \g_@@_name_env_str { NiceTabular } \keys_set:nn { NiceMatrix / NiceTabular } { #1 , #3 } + \int_compare:nNnT \l_@@_tab_rounded_corners_dim > \c_zero_dim + { + \bool_if:NT \l_@@_hvlines_bool + { + \bool_set_true:N \l_@@_except_borders_bool + % we should try to be more efficient in the number of lines of code here + \tl_if_empty:NTF \l_@@_rules_color_tl + { + \tl_gput_right:Nn \g_@@_pre_code_after_tl + { + \@@_stroke_block:nnn + { rounded-corners = \dim_use:N \l_@@_tab_rounded_corners_dim } + { 1-1 } + { \int_use:N \c@iRow - \int_use:N \c@jCol } + } + } + { + \tl_gput_right:Nn \g_@@_pre_code_after_tl + { + \@@_stroke_block:nnn + { + rounded-corners = \dim_use:N \l_@@_tab_rounded_corners_dim , + draw = \l_@@_rules_color_tl + } + { 1-1 } + { \int_use:N \c@iRow - \int_use:N \c@jCol } + } + } + } + } \tl_if_empty:NF \l_@@_short_caption_tl { \tl_if_empty:NT \l_@@_caption_tl @@ -15748,18 +15894,114 @@ version 2005/12/01 or later. { \pgfpicture \pgf@relevantforpicturesizefalse +% \end{macrocode} +% If the final user has used the key |rounded-corners| for the environment +% |{NiceTabular}|, we will clip to a rectangle with rounded corners before +% filling the rectangles. +% \begin{macrocode} + \dim_compare:nNnT \l_@@_tab_rounded_corners_dim > \c_zero_dim + { + \pgfsetcornersarced + { + \pgfpoint + { \l_@@_tab_rounded_corners_dim } + { \l_@@_tab_rounded_corners_dim } + } +% \end{macrococde} +% Because we want \pkg{nicematrix} compatible with arrays constructed by +% \pkg{array}, the nodes for the rows and columns (that is to say the nodes +% |row-|\textsl{i} and |col-|\textsl{j}) have not always the expected position, +% that is to say, there is sometimes a slight shifting of something such as +% |\arrayrulewidth|. Now, for the clipping, we have to change slightly the +% position of that clipping whether a rounded rectangle around the array is +% required. That's the point which is tested in the following line. +% \begin{macrocode} + \bool_if:NTF \l_@@_hvlines_bool + { + \pgfpathrectanglecorners + { + \pgfpointadd + { \@@_qpoint:n { row-1 } } + { \pgfpoint { 0.5 \arrayrulewidth } { \c_zero_dim } } + } + { + \pgfpointadd + { + \@@_qpoint:n + { \int_eval:n { \int_max:nn \c@iRow \c@jCol + 1 } } + } + { \pgfpoint \c_zero_dim { 0.5 \arrayrulewidth } } + } + } + { + \pgfpathrectanglecorners + { \@@_qpoint:n { row-1 } } + { + \pgfpointadd + { + \@@_qpoint:n + { \int_eval:n { \int_max:nn \c@iRow \c@jCol + 1 } } + } + { \pgfpoint \c_zero_dim \arrayrulewidth } + } + } + \pgfusepath { clip } + } \seq_map_indexed_inline:Nn \g_@@_colors_seq { - \color ##2 - \use:c { g_@@_color _ ##1 _tl } - \tl_gclear:c { g_@@_color _ ##1 _tl } - \pgfusepath { fill } + \begin { pgfscope } + \@@_color_opacity ##2 + \use:c { g_@@_color _ ##1 _tl } + \tl_gclear:c { g_@@_color _ ##1 _tl } + \pgfusepath { fill } + \end { pgfscope } } \endpgfpicture } % \end{macrocode} -% % +% \bigskip +% The following command will extract the potential key |opacity| in its optional +% argument (between square brackets) and (of course) then apply the command |\color|. +% \begin{macrocode} +\cs_new_protected:Npn \@@_color_opacity + { + \peek_meaning:NTF [ + { \@@_color_opacity:w } + { \@@_color_opacity:w [ ] } + } +% \end{macrocode} +% +% \bigskip +% The command |\@@_color_opacity:w| takes in as argument only the optional +% argument. One may consider that the second argument (the actual definition of +% the color) is provided by currification. +% \begin{macrocode} +\cs_new_protected:Npn \@@_color_opacity:w [ #1 ] + { + \tl_clear:N \l_tmpa_tl + \keys_set_known:nnN { nicematrix / color-opacity } { #1 } \l_tmpb_tl +% \end{macrocode} +% |\l_tmpa_tl| (if not empty) is now the opacity and |\l_tmpb_tl| (if not empty) is now the colorimetric space. +% \begin{macrocode} + \tl_if_empty:NF \l_tmpa_tl { \exp_args:NV \pgfsetfillopacity \l_tmpa_tl } + \tl_if_empty:NTF \l_tmpb_tl + { \@declaredcolor } + { \use:x { \exp_not:N \@undeclaredcolor [ \l_tmpb_tl ] } } + } +% \end{macrocode} +% +% \bigskip +% The following set of keys is used by the command |\@@_color_opacity:wn|. +% \begin{macrocode} +\keys_define:nn { nicematrix / color-opacity } + { + opacity .tl_set:N = \l_tmpa_tl , + opacity .value_required:n = true + } +% \end{macrocode} +% +% \bigskip % \begin{macrocode} \cs_new_protected:Npn \@@_cartesian_color:nn #1 #2 { @@ -18237,7 +18479,16 @@ version 2005/12/01 or later. % because we want to be able to take into account a potential instruction of % color of the font in |\g_@@_row_style_tl|. % \begin{macrocode} - \int_compare:nNnT { #1 } = 1 \g_@@_row_style_tl + \int_compare:nNnT { #1 } = 1 + { + \int_compare:nNnTF \c@iRow = 0 + \l_@@_code_for_first_row_tl + { + \int_compare:nNnT \c@iRow = \l_@@_last_row_int + \l_@@_code_for_last_row_tl + } + \g_@@_row_style_tl + } \group_begin: \bool_if:NF \l_@@_respect_arraystretch_bool { \cs_set:Npn \arraystretch { 1 } } @@ -18897,20 +19148,6 @@ version 2005/12/01 or later. } % \end{macrocode} % -% We take into account the case of a block of one row in the ``first row'' or -% the ``last row''. -% \begin{macrocode} - \int_compare:nNnT { #1 } = 0 - { - \int_compare:nNnT { #3 } = 0 - { \l_@@_code_for_first_row_tl } - } - \int_compare:nNnT { #1 } = \l_@@_last_row_int - { - \int_compare:nNnT { #3 } = \l_@@_last_row_int - { \l_@@_code_for_last_row_tl } - } -% \end{macrocode} % % \medskip % Now, we will put the label of the block. @@ -18980,7 +19217,11 @@ version 2005/12/01 or later. } { \l_tmpa_tl } } - \pgfset { inner~xsep = \c_zero_dim } + \pgfset + { + inner~xsep = \c_zero_dim , + inner~ysep = \l_@@_block_ysep_dim + } \pgfnode { rectangle } { \l_tmpa_tl } @@ -19484,19 +19725,15 @@ version 2005/12/01 or later. % case of use of |\dotfill| ``internally'' in the cell (e.g. |\hbox to 1cm {\dotfill}|). % \begin{macrocode} \@@_old_dotfill - \bool_if:NT \l_@@_NiceTabular_bool - { \group_insert_after:N \@@_dotfill_ii: } - { \group_insert_after:N \@@_dotfill_i: } + \tl_gput_right:Nn \g_@@_cell_after_hook_tl \@@_dotfill_i: } -\cs_new_protected:Npn \@@_dotfill_i: { \group_insert_after:N \@@_dotfill_ii: } -\cs_new_protected:Npn \@@_dotfill_ii: { \group_insert_after:N \@@_dotfill_iii: } % \end{macrocode} % Now, if the box if not empty (unfornately, we can't actually test whether the % box is empty and that's why we only consider it's width), we insert % |\@@_dotfill| (which is the saved version of |\dotfill|) in the cell of the % array, and it will extend, since it is no longer in |\l_@@_cell_box|. % \begin{macrocode} -\cs_new_protected:Npn \@@_dotfill_iii: +\cs_new_protected:Npn \@@_dotfill_i: { \dim_compare:nNnT { \box_wd:N \l_@@_cell_box } = \c_zero_dim \@@_old_dotfill } % \end{macrocode} % @@ -20946,19 +21183,38 @@ version 2005/12/01 or later. \seq_if_in:NVTF \g_@@_types_of_matrix_seq \g_@@_name_env_str { \int_compare:nNnTF \l_@@_last_col_int = { -2 } - { \@@_fatal:n { too~much~cols~for~matrix } } - { - \int_compare:nNnTF \l_@@_last_col_int = { -1 } - { \@@_fatal:n { too~much~cols~for~matrix } } - { - \bool_if:NF \l_@@_last_col_without_value_bool - { \@@_fatal:n { too~much~cols~for~matrix~with~last~col } } - } - } + { \@@_fatal:n { too~much~cols~for~matrix } } + { + \int_compare:nNnTF \l_@@_last_col_int = { -1 } + { \@@_fatal:n { too~much~cols~for~matrix } } + { + \bool_if:NF \l_@@_last_col_without_value_bool + { \@@_fatal:n { too~much~cols~for~matrix~with~last~col } } + } + } + } + { + \bool_lazy_and:nnTF + { \bool_if_p:n \c_@@_tabularx_loaded_bool } + { ! \str_if_eq_p:Vn \g_@@_name_env_str { NiceTabularX } } + { + \int_compare:nNnTF \c@iRow = \c_zero_int + { \@@_fatal:n { X~columns~with~tabularx } } + { + \@@_fatal:nn { too~much~cols~for~array } + { + However,~this~message~may~be~erroneous:~ + maybe~you~have~used~X~columns~while~'tabularx'~is~loaded,~ + ~which~is~forbidden~(however,~it's~still~possible~to~use~ + X~columns~in~{NiceTabularX}). + } + } + } + { \@@_fatal:nn { too~much~cols~for~array } { } } } - { \@@_fatal:n { too~much~cols~for~array } } } % \end{macrocode} +% % % The following command must \emph{not} be protected since it's used in an error message. % \begin{macrocode} @@ -21025,12 +21281,22 @@ version 2005/12/01 or later. ~you~try~to~use~more~columns~than~allowed~by~your~ \@@_full_name_env:.\@@_message_hdotsfor:\ The~maximal~number~of~columns~is~ \int_use:N \g_@@_static_num_of_col_int\ - ~(plus~the~potential~exterior~ones).~ + ~(plus~the~potential~exterior~ones).~#1 This~error~is~fatal. } % \end{macrocode} % - +% \medskip +% \begin{macrocode} +\@@_msg_new:nn { X~columns~with~tabularx } + { + There~is~a~problem.\\ + You~have~probably~used~X~columns~in~your~environment~{\g_@@_name_env_str}.~ + That's~not~allowed~because~'tabularx'~is~loaded~(however,~you~can~use~X~columns~ + in~an~environment~{NiceTabularX}).\\ + This~error~is~fatal. + } +% \end{macrocode} % % \begin{macrocode} \@@_msg_new:nn { columns~not~used } @@ -21538,6 +21804,17 @@ version 2005/12/01 or later. % \end{macrocode} % % \begin{macrocode} +\@@_msg_new:nn { unknown~column~type~S } + { + Bad~column~type.\\ + The~column~type~'S'~in~your~\@@_full_name_env:\ is~unknown. \\ + If~you~want~to~use~the~column~type~'S'~of~siunitx,~you~should~ + load~that~package. \\ + This~error~is~fatal. + } +% \end{macrocode} +% +% \begin{macrocode} \@@_msg_new:nn { tabularnote~forbidden } { Forbidden~command.\\ @@ -22061,6 +22338,7 @@ version 2005/12/01 or later. renew-dots,~ respect-arraystretch,~ right-margin,~ + rounded-corners,~ rules~(with~the~subkeys~'color'~and~'width'),~ short-caption,~ t,~ @@ -22116,6 +22394,19 @@ version 2005/12/01 or later. % \nolinkurl{https:www.tug.org/svn/texlive/trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty} % } % +% \subsection*{Changes between version 6.17 and 6.18} +% +% New key |opacity| in the commands to color cells, rows and columns. +% +% New key |rounded-corners| for a whole tabular. +% +% +% \subsection*{Changes between version 6.16 and 6.17} +% +% New PGF/Tikz style |nicematrix/cell-node|. +% +% New key |pgf-node-code| +% % \subsection*{Changes between version 6.15 and 6.16} % % It's now possible to put any LaTeX extensible delimiter (|\lgroup|, |\langle|, diff --git a/macros/latex/contrib/nicematrix/nicematrix.pdf b/macros/latex/contrib/nicematrix/nicematrix.pdf Binary files differindex 3e990cb257..7b447a8a11 100644 --- a/macros/latex/contrib/nicematrix/nicematrix.pdf +++ b/macros/latex/contrib/nicematrix/nicematrix.pdf diff --git a/macros/latex/contrib/oststud/LICENSE.txt b/macros/latex/contrib/oststud/LICENSE.txt new file mode 100644 index 0000000000..a73481c4be --- /dev/null +++ b/macros/latex/contrib/oststud/LICENSE.txt @@ -0,0 +1,428 @@ +Attribution-ShareAlike 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution-ShareAlike 4.0 International Public +License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution-ShareAlike 4.0 International Public License ("Public +License"). To the extent this Public License may be interpreted as a +contract, You are granted the Licensed Rights in consideration of Your +acceptance of these terms and conditions, and the Licensor grants You +such rights in consideration of benefits the Licensor receives from +making the Licensed Material available under these terms and +conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. BY-SA Compatible License means a license listed at + creativecommons.org/compatiblelicenses, approved by Creative + Commons as essentially the equivalent of this Public License. + + d. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + e. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + f. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + g. License Elements means the license attributes listed in the name + of a Creative Commons Public License. The License Elements of this + Public License are Attribution and ShareAlike. + + h. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + i. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + j. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + k. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + l. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + m. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part; and + + b. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. Additional offer from the Licensor -- Adapted Material. + Every recipient of Adapted Material from You + automatically receives an offer from the Licensor to + exercise the Licensed Rights in the Adapted Material + under the conditions of the Adapter's License You apply. + + c. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + b. ShareAlike. + + In addition to the conditions in Section 3(a), if You Share + Adapted Material You produce, the following conditions also apply. + + 1. The Adapter's License You apply must be a Creative Commons + license with the same License Elements, this version or + later, or a BY-SA Compatible License. + + 2. You must include the text of, or the URI or hyperlink to, the + Adapter's License You apply. You may satisfy this condition + in any reasonable manner based on the medium, means, and + context in which You Share Adapted Material. + + 3. You may not offer or impose any additional or different terms + or conditions on, or apply any Effective Technological + Measures to, Adapted Material that restrict exercise of the + rights granted under the Adapter's License You apply. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material, + + including for purposes of Section 3(b); and + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + + +======================================================================= + +Creative Commons is not a party to its public +licenses. Notwithstanding, Creative Commons may elect to apply one of +its public licenses to material it publishes and in those instances +will be considered the “Licensor.” The text of the Creative Commons +public licenses is dedicated to the public domain under the CC0 Public +Domain Dedication. Except for the limited purpose of indicating that +material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the +public licenses. + +Creative Commons may be contacted at creativecommons.org. + diff --git a/macros/latex/contrib/oststud/Makefile b/macros/latex/contrib/oststud/Makefile new file mode 100644 index 0000000000..a6035b941d --- /dev/null +++ b/macros/latex/contrib/oststud/Makefile @@ -0,0 +1,64 @@ +TEX := xelatex +TEXARGS := --synctex=1 --interaction=nonstopmode \ + --shell-escape + +.PHONY: ins doc tests dist +all: build ins doc tests + +build: + mkdir -p build + +dist: oststud.tar.gz + + +# ZIP to distribute to CTAN +oststud.tar.gz: Makefile README.md LICENSE.txt \ + oststud.ins oststud.dtx build/oststud.pdf \ + hsrstud.ins hsrstud.dtx build/hsrstud.pdf \ + hsrstud-classes.dtx build/hsrstud-classes.pdf + tar cvzf $@ --transform 's,build/,,' --transform 's,^,oststud/,' $^ + +# Installer file +ins: build/oststud.sty build/hsrzf.cls build/hsrbericht.cls build/hsrstud.sty + +build/oststud.sty: oststud.ins oststud.dtx build + $(TEX) $(TEXARGS) --output-directory=build $< + +build/hsrzf.cls build/hsrbericht.cls build/hsrstud.sty: hsrstud.ins hsrstud-classes.dtx hsrstud.dtx build + $(TEX) $(TEXARGS) --output-directory=build $< + + +# Documentation for packages +doc: build/oststud.pdf build/hsrstud.pdf build/hsrstud-classes.pdf + +build/oststud.pdf: oststud.dtx ins build + $(TEX) $(TEXARGS) --output-directory=build $< + cd build && \ + makeindex -s gind.ist -o oststud.ind oststud.idx && \ + makeindex -s gglo.ist -o oststud.gls oststud.glo + $(TEX) $(TEXARGS) --output-directory=build $< + $(TEX) $(TEXARGS) --output-directory=build $< + +build/hsrstud.pdf: hsrstud.dtx ins build + $(TEX) $(TEXARGS) --output-directory=build $< + cd build && \ + makeindex -s gind.ist -o hsrstud.ind hsrstud.idx && \ + makeindex -s gglo.ist -o hsrstud.gls hsrstud.glo + $(TEX) $(TEXARGS) --output-directory=build $< + $(TEX) $(TEXARGS) --output-directory=build $< + +build/hsrstud-classes.pdf: hsrstud-classes.dtx ins build + $(TEX) $(TEXARGS) --output-directory=build $< + cd build && \ + makeindex -s gind.ist -o hsrstud-classes.ind hsrstud-classes.idx && \ + makeindex -s gglo.ist -o hsrstud-classes.gls hsrstud-classes.glo + $(TEX) $(TEXARGS) --output-directory=build $< + $(TEX) $(TEXARGS) --output-directory=build $< + + +# Test files +tests: build/test/bericht.pdf build/test/zf.pdf + +build/test/%.pdf: test/%.tex + mkdir -p build/test + $(TEX) $(TEXARGS) --output-directory=build/test $< diff --git a/macros/latex/contrib/oststud/README.md b/macros/latex/contrib/oststud/README.md new file mode 100644 index 0000000000..aaac61e79b --- /dev/null +++ b/macros/latex/contrib/oststud/README.md @@ -0,0 +1,53 @@ +# OST-Stud LaTeX Style & Macros + +## Built it + +### Automagically with `make` + +It is as simple as it gets. +``` +$ make +``` +The output will be generated in a directory called `build`. + +### Manually + +This will generate many files including `oststud.sty` that can be placed in the +folder of any other LaTeX project, which can access the library with +`\usepackage{oststud}` +``` +$ xelatex oststud.ins # generate oststud.sty +``` + +To get the documentation (in PDF) you can compile the respective `dtx` file +``` +$ xelatex oststud.dtx # generate documentation oststud.pdf +``` + +## The older `hsrstud` package + +The previous version of thie package for the Hochschule für Technik Rapperswil, +i.e. `hsrstud`, is still available for backwards compatibility. To get +`hsrstud.sty` and its documentation run `make` or manually: +``` +$ xelatex hsrstud.ins # generate hsrstud.sty +$ xelatex hsrstud.dtx # generate documentation hsrstud.pdf +``` + +The `hsrstud` package has documentclasses which are not (yet) available in the +newer version. To get `hsrbericht.cls` or `hsrzf.cls` without using `make` run +``` +$ xelatex hsrstud-classes.ins # generate .cls files +$ xelatex hsrstud-classes.dtx # generate documentation hsrstud-classes.pdf +``` + + +## License +``` +OSTStud (c) by Naoki Pross + +OSTStud is licensed under a Creative Commons Attribution-ShareAlike 4.0 Unported License. +You should have received a copy of the license along with this work. If not, see + +http://creativecommons.org/licenses/by-sa/4.0/ +``` diff --git a/macros/latex/contrib/oststud/hsrstud-classes.dtx b/macros/latex/contrib/oststud/hsrstud-classes.dtx new file mode 100644 index 0000000000..d5ea6500c2 --- /dev/null +++ b/macros/latex/contrib/oststud/hsrstud-classes.dtx @@ -0,0 +1,594 @@ +% \iffalse +%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Documentation Builder +%<*doc> +\documentclass[a4paper]{ltxdoc} + +\usepackage{hsrstud} +\usepackage[ + type={CC}, + modifier={by-sa}, + version={4.0}, +]{doclicense} +\usepackage[ + margin=3.5cm, + left=4cm +]{geometry} + +\usepackage{booktabs} +\usepackage{enumitem} + +\CodelineIndex +\EnableCrossrefs +\RecordChanges + +%% Metadata +\title{\textcolor{hsr-blue}{HSR}--Stud Document Classes} +\author{Naoki Pross \texttt{<naoki.pross@ost.ch>}} +\date{\today} + +\begin{document} +\DocInput{\jobname.dtx} + +\end{document} +%</doc> +% \fi + +%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%^^A Classes Documentation +% +% \maketitle +% \tableofcontents +% +% \section{Purpose of these document classes} +% The following document classes were made by and for the HSR-Stud organization. +% These classes are intended to be used to create beautiful summaries and cheat +% sheets. Available classes are: +% \begin{description}[align=right] +% \item[|hsrzf|] For summaries (Zusammenfassung) +% \item[|hsrbericht|] For reports (Bericht) +% \end{description} +% +% +% \section{Class Options} +% \begin{description}[align=right] +% \item[\tt sans] Use Sans-Serif fonts (|cmbright| and |hfbright|). +% \item[\tt slab] Use Slab-Serif fonts (|bitter| and |eulervm|). +% \item[\tt margin=<size>] Sets up margins to reasonable size. +% \item[\tt *] Any other given option is passed to the underlying class (article). +% \end{description} +% +% \begin{table}\centering +% \begin{tabular}{l r r l r r} +% \toprule +% Size & H & V & Size & H & V \\ +% \midrule +% huge & 45 & 40 & small & 20 & 20 \\ +% large & 35 & 35 & tiny & 10 & 20 \\ +% big & 30 & 30 & minimal & 5 & 20 \\ +% normal & 25 & 30 \\ +% \bottomrule +% \end{tabular} +% \caption{Sizes for the {\tt margin} option. All sizes are in millimeters} +% \end{table} +% +% +% \section{Extra Metadata} +% Thanks to the {\tt titling} package, normal metadata informations are available +% throug the following commands: \cs{theauthor}, \cs{thedate}, \cs{thetitle}. +% Additionally, more metadata variables have been created for this class, to +% conserve informations related to the university course. +% \begin{description}[align=right] +% \item[\cs{course}] The degree programme of the discussed subject. +% Example: |Elektrotechnik| +% \item[\cs{module}] Short name of the module according to the class +% schedule. Example: |ComEng1| +% \item[\cs{semester}] Semester during which the summarized subject was +% taught. Example: |FS20| +% \item[\cs{institute}] Internal institute in which the module was taught. +% This field is optional. +% \item[\cs{authoremail}] Email of the author. This field is optional. +% \item[\cs{maintainer}] Name of the person maintaining the work. This +% field is optional. +% \item[\cs{contributors}] List of names of those who have contributed to +% the document. This field is optional. +% \end{description} +% Like \cs{date}, \cs{title}, etc. these fields have too an accessor macro +% \cs{the<metadata>}. For example: \cs{thecourse}, \cs{themodule}, and so on. +% +%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%^^A Zusammenfassung Class Documentation +% \section{Zusammenfassung \texttt{hsrzf} class} +% This class is intended to be used to write short summaries. +% +% \subsection{Class options} +% \begin{description}[align=right] +% \item[\tt header] Use the HSR--Stud standard header. The option +% {\tt noheader} disables the header. +% \end{description} +% +%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%^^A Bericht Class Documentation +% \section{Bericht \texttt{hsrbericht} class} +% This class tries to conform to the indications given by the communication +% department of the HSR. The specifications are found in the ``Werkzeugkastens +% Technische Berichte''. +% +% \subsection{Metadata} +% In addition to the metadata described in the previous section. This class +% requires: +% \begin{description}[align=right] +% \item[\cs{subtitle}] Pretty self explanatory. +% \item[\cs{category}] Category assigned to the project. +% This field is optional. +% \item[\cs{project}] Name or reference to your project. +% \item[\cs{topic}] You chosen topic in the category. +% \item[\cs{instructor}] Name of the instructor / academic that is +% following or has assigned your work. +% \item[\cs{startdate}] Date when you started the project. +% \item[\cs{finishdate}] Date when you finished the project (can be set to +% \cs{today} to keep automatically updated. +% \item[\cs{address}] Address or place where your work is produced. +% This field is optional. +% \item[\cs{matriculationnr}] Your matriculation number. +% \item[\cs{logo}] Code to insert your logo. +% \item[\cs{clientlogo}] Code to insert the logo of the client / research +% department / \dots . +% \end{description} +% +% \section{Minimal working examples} +% +% ^^A TODO: fix this with `%' +% \begin{lstlisting} +% \documentclass[margin=normal]{hsrzf} +% +% % Packages +% %% the HSRStud package +% \usepackage{hsrstud} +% +% % Metadata +% \course{Elektrotechnik} +% \module{ModAbk} +% \semester{Herbstsemester 2020} +% +% \authoremail{vname@hsr.ch} +% \author{\textsl{Vorname Name} -- \texttt{\theauthoremail}} +% +% \title{\texttt{\themodule} Zusammenfassung} +% \date{\thesemester} +% +% % document +% \begin{document} +% \maketitle +% \tableofcontents +% \section{Introduction} +% \[ +% i\hbar \partial_t \left| \psi(t) \right\rangle +% = \hat{H} \left| \psi(t) \right\rangle +% \] +% +% \end{document}\end{lstlisting} +% +% \section{License} +% \doclicenseThis +% +% \PrintChanges +% \PrintIndex +% +% \section{Implementation} +% \begin{macrocode} +%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%^^A Class Headers + +%<*hsrzf> +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{hsrzf}[2020/04/05 v0.1 HSRStud Summary class] +%</hsrzf> + +%<*hsrbericht> +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{hsrbericht}[2020/05/05 v0.1 HSRStud Report class] +%</hsrbericht> + +%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%^^A Implementation +% +%<*hsrzf|hsrbericht> + +%% Coding Packages (Dependencies) +\RequirePackage{iftex} +\RequirePackage{kvoptions} +\RequirePackage{etoolbox} + +%% Default font +\RequirePackage{lmodern} + +%% Class options +\SetupKeyvalOptions{ + family=hsr, + prefix=hsr@ +} + +%% Use header and footer +\DeclareBoolOption[false]{header} +\DeclareComplementaryOption{noheader}{header} + +%% Use a sans-serif slab-serif or concrete font +\DeclareBoolOption[false]{sans} +\DeclareBoolOption[false]{slab} +\DeclareBoolOption[false]{concrete} + +%% Configures the geometry package +%% +%% Possible values: +%% - huge (45mm, 40mm) +%% - large (35mm, 35mm) +%% - big (30mm, 30mm) +%% - normal (25mm, 30mm) +%% - small (20mm, 20mm) +%% - tiny (10mm, 20mm) +%% - minimal ( 5mm, 20mm) +\DeclareStringOption{margin}[huge] + +%% Configures the polyglossia package +% \DeclareStringOption[]{lang}[german] + + +%% Pass other options to the class +\DeclareDefaultOption{% + \ifx\CurrentOptionValue\relax + \PackageWarningNoLine{\@currname}{% + Unknown option ``\CurrentOption''\MessageBreak + is passed to class ``article''% + }% + % Pass the option to package color. + % Again it is better to expand \CurrentOption. + \expandafter\PassOptionsToClass + \expandafter{\CurrentOption}{article} + \else + % Package color does not take options with values. + % We provide the standard LaTeX error. + \@unknownoptionerror + \fi +} + +\ProcessKeyvalOptions{hsr} + + +%% Create new metadata fields + +%% Required fields +\newcommand\course[1]{\gdef\hsr@course{#1}} +\newcommand\hsr@course{\ClassError{hsrzf}{no \noexpand\course given}{}} +\newcommand\thecourse{\hsr@course} + +\newcommand\module[1]{\gdef\hsr@module{#1}} +\newcommand\hsr@module{\ClassError{hsrzf}{no \noexpand\module given}{}} +\newcommand\themodule{\hsr@module} + +\newcommand\semester[1]{\gdef\hsr@semester{#1}} +\newcommand\hsr@semester{\ClassError{hsrzf}{no \noexpand\semester given}{}} +\newcommand\thesemester{\hsr@semester} + +%% Optional fields +\newcommand\institute[1]{\gdef\hsr@institute{#1}} +\newcommand\hsr@institute{\ClassWarning{hsrzf}{no \noexpand\institute given}{}} +\newcommand\theinstitute{\hsr@institute} + +\newcommand\authoremail[1]{\gdef\hsr@authoremail{#1}} +\newcommand\hsr@authoremail{\ClassWarning{hsrzf}{no \noexpand\authoremail given}{}} +\newcommand\theauthoremail{\hsr@authoremail} + +\newcommand\maintainer[1]{\gdef\hsr@maintainer{#1}} +\newcommand\hsr@maintainer{\ClassWarning{hsrzf}{no \noexpand\maintainer given}{}} +\newcommand\themaintainer{\hsr@maintainer} + +\newcommand\contributors[1]{\gdef\hsr@contributors{#1}} +\newcommand\hsr@contributors{\ClassWarning{hsrzf}{no \noexpand\contributors given}{}} +\newcommand\thecontributors{\hsr@contributors} +%</hsrzf|hsrbericht> +%<*hsrbericht> +%% The report class has some extra metadata + +%% Extra title informations +\newcommand\subtitle[1]{\gdef\hsr@subtitle{#1}} +\newcommand\hsr@subtitle{\ClassError{hsrbericht}{no \noexpand\subtitle given}{}} +\newcommand\thesubtitle{\hsr@subtitle} + +%% Project informations +\newcommand\category[1]{\gdef\hsr@category{#1}} +\newcommand\hsr@category{\ClassWarning{hsrbericht}{no \noexpand\category given}{}} +\newcommand\thecategory{\hsr@category} + +\newcommand\project[1]{\gdef\hsr@project{#1}} +\newcommand\hsr@project{\ClassError{hsrbericht}{no \noexpand\project given}{}} +\newcommand\theproject{\hsr@project} + +\newcommand\topic[1]{\gdef\hsr@topic{#1}} +\newcommand\hsr@topic{\ClassError{hsrbericht}{no \noexpand\topic given}{}} +\newcommand\thetopic{\hsr@topic} + +\newcommand\version[1]{\gdef\hsr@version{#1}} +\newcommand\hsr@version{\ClassError{hsrbericht}{no \noexpand\version given}{}} +\newcommand\theversion{\hsr@version} + +\newcommand\instructor[1]{\gdef\hsr@instructor{#1}} +\newcommand\hsr@instructor{\ClassError{hsrbericht}{no \noexpand\instructor given}{}} +\newcommand\theinstructor{\hsr@instructor} + +\newcommand\startdate[1]{\gdef\hsr@startdate{#1}} +\newcommand\hsr@startdate{\ClassError{hsrbericht}{no \noexpand\startdate given}{}} +\newcommand\thestartdate{\hsr@startdate} + +\newcommand\finishdate[1]{\gdef\hsr@finishdate{#1}} +\newcommand\hsr@finishdate{\ClassError{hsrbericht}{no \noexpand\finishdate given}{}} +\newcommand\thefinishdate{\hsr@finishdate} + +%% Author informations +\newcommand\address[1]{\gdef\hsr@address{#1}} +\newcommand\hsr@address{\ClassWarning{hsrbericht}{no \noexpand\address given}{}} +\newcommand\theaddress{\hsr@address} + +\newcommand\matriculationnr[1]{\gdef\hsr@matriculationnr{#1}} +\newcommand\hsr@matriculationnr{\ClassError{hsrbericht}{no \noexpand\matriculationnr given}{}} +\newcommand\thematriculationnr{\hsr@matriculationnr} + +%% Logos informations +\newcommand\logo[1]{\gdef\hsr@logo{#1}} +\newcommand\hsr@logo{\ClassWarning{hsrbericht}{no \noexpand\logo given}{}} +\newcommand\thelogo{\hsr@logo} + +\newcommand\clientlogo[1]{\gdef\hsr@clientlogo{#1}} +\newcommand\hsr@clientlogo{\ClassWarning{hsrbericht}{no \noexpand\clientlogo given}{}} +\newcommand\theclientlogo{\hsr@clientlogo} +%</hsrbericht> +%<*hsrzf|hsrbericht> + +%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%^^A Setup base class +\LoadClass[a4paper]{article} + +%% Style deps +\RequirePackage{geometry} +\RequirePackage{fancyhdr} +\RequirePackage{titling} +\RequirePackage{totpages} +\RequirePackage{array} + +%% Insert metadata in the pdf +\PassOptionsToPackage{plainpages=false, pdfpagelabels, pdfusetitle}{hyperref} +\RequirePackage{hyperref} + +%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%^^A Setup Style +% + + +%% Configure Sans-Serif font +\ifhsr@sans + \ifhsr@slab + \PackageError{hsrzf}{% + sans ans slab options cannot be used at the same time + } + \fi + \ifhsr@concrete{hsrzf}{% + sans and concrete options cannot be used at the same time + } + \fi + + \PassOptionsToPackage{T1}{fontenc} + \RequirePackage{fontenc} + \RequirePackage{cmbright} + \RequirePackage{sfmath} +\fi + +%% Configure Slab-Serif font +\ifhsr@slab + \ifhsr@sans + \PackageError{hsrzf}{% + slab and sans options cannot be used at the same time + } + \fi + \ifhsr@concrete{hsrzf}{% + slab and concrete options cannot be used at the same time + } + \fi + + \PassOptionsToPackage{T1}{fontenc} + \RequirePackage{fontenc} + \PassOptionsToPackage{rm,light}{roboto} + \RequirePackage{roboto} +\fi + +%% Configure (secret) concrete font +\ifhsr@concrete + \ifhsr@sans{hsrzf}{% + concrete and sans options cannot be used at the same time + } + \fi + \ifhsr@slab + \PackageError{hsrzf}{% + concrete ans slab options cannot be used at the same time + } + \fi + + \PassOptionsToPackage{boldsans,amssymb}{concmath} + \RequirePackage{concmath} + \PassOptionsToPackage{T1}{fontenc} + \RequirePackage{fontenc} +\fi + +%% configure geometry +%% defaults to big +\newlength{\hsr@hmarginwidth} +\newlength{\hsr@vmarginheight} + +\ifx\hsr@margin\@empty + \setlength\hsr@hmarginwidth{30mm} + \setlength\hsr@vmarginheight{30mm} +\else + \expandafter\ifstrequal\expandafter{\hsr@margin}{huge}{ + \setlength\hsr@hmarginwidth{45mm} + \setlength\hsr@vmarginheight{40mm}}{} +%% + \expandafter\ifstrequal\expandafter{\hsr@margin}{large}{ + \setlength\hsr@hmarginwidth{35mm} + \setlength\hsr@vmarginheight{35mm}}{} +%% + \expandafter\ifstrequal\expandafter{\hsr@margin}{big}{ + \setlength\hsr@hmarginwidth{30mm} + \setlength\hsr@vmarginheight{30mm}}{} +%% + \expandafter\ifstrequal\expandafter{\hsr@margin}{normal}{ + \setlength\hsr@hmarginwidth{25mm} + \setlength\hsr@vmarginheight{30mm}}{} +%% + \expandafter\ifstrequal\expandafter{\hsr@margin}{small}{ + \setlength\hsr@hmarginwidth{20mm} + \setlength\hsr@vmarginheight{20mm}}{} +%% + \expandafter\ifstrequal\expandafter{\hsr@margin}{tiny}{ + \setlength\hsr@hmarginwidth{10mm} + \setlength\hsr@vmarginheight{20mm}}{} +%% + \expandafter\ifstrequal\expandafter{\hsr@margin}{minimal}{ + \setlength\hsr@hmarginwidth{ 5mm} + \setlength\hsr@vmarginheight{20mm}}{} +%% + % TODO: fix this + % \ClassError{hsrzf}{Invalid margin size} + % \setlength\hsr@hmarginwidth{30mm} + % \setlength\hsr@vmarginheight{30mm} +\fi + +%</hsrzf|hsrbericht> + +%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%^^A HSR ZF specific +%<*hsrzf> +%% TODO: change vmarginheight if header is on +\newgeometry{ + hmargin=\hsr@hmarginwidth, + vmargin=\hsr@vmarginheight, + marginparsep=0pt, + marginpar=0pt, +} + +\fancypagestyle{hsrzf}{% + \fancyhf{} % clear + \fancyhead[L]{\leftmark} + \fancyhead[C]{\themodule} + \fancyhead[R]{\@date} + + \fancyfoot[L]{\href{https://github.com/HSR-Stud/}{\texttt{HSR-Stud}}} + \fancyfoot[C]{\texttt{CC BY-NC-SA}} + \fancyfoot[R]{\thepage ~/ \pageref{TotPages}} + + \renewcommand{\headrulewidth}{.5pt} + \renewcommand{\footrulewidth}{.5pt} +} + +\fancypagestyle{hsrzf-norulers}{% + \fancyhf{} % clear + \fancyhead[L]{\leftmark} + \fancyhead[C]{\themodule} + \fancyhead[R]{\@date} + + \fancyfoot[L]{\href{https://github.com/HSR-Stud/}{\texttt{HSR-Stud}}} + \fancyfoot[C]{\texttt{CC BY-NC-SA}} + \fancyfoot[R]{\thepage ~/ \pageref{TotPages}} + + \renewcommand{\headrulewidth}{0pt} + \renewcommand{\footrulewidth}{0pt} +} + +\ifhsr@header +\pagestyle{hsrzf} +\fi +%</hsrzf> + +%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%^^A HSR Bericht specific +%<*hsrbericht> + +%% Redefine title and abstract +\renewcommand\maketitle{% +\begin{titlepage} + \thispagestyle{hsrbericht} + \begin{center} + \vspace*{6cm} + \textbf{\fontsize{48}{60}\selectfont \@title} + \vspace{1.5cm} \\ + \textbf{\fontsize{24}{48}\selectfont \hsr@subtitle} + \vspace{1cm} \\ + \textbf{\fontsize{22}{48}\selectfont \hsr@category} + \vspace{0.5cm} \\ + \begin{tabular}{rl} + \textbf{Version:} & \hsr@version \\ + \end{tabular} + \vspace{4cm} \\ + \begin{tabular}{rl p{1.5cm} rl} + \textbf{Autor:} & \textbf{\@author} && Dozent: & \hsr@instructor \\ + E-Mail: & \texttt{\hsr@authoremail} && Themengebiet: & \hsr@topic \\ + Matrikelnummer: & \hsr@matriculationnr && Studiengang: & \hsr@course \\ + Adresse: & \hsr@address && & \\ + \end{tabular}{} + \vspace{2cm} \\ + \begin{tabular}{rl} + \textbf{Erstellt am:} & \textbf{\hsr@startdate} \\ + \textbf{Letze Änderung am:} & \textbf{\hsr@finishdate} \\ + \end{tabular} + \end{center} +\end{titlepage}} + +\renewenvironment{abstract}{% + \section*{Abstract}% + \newcommand\problem{\paragraph{Problem}} + \newcommand\goal{\paragraph{Ziel}} + \newcommand\method{\paragraph{Method / Vorgehen}} + \newcommand\results{\paragraph{Wesentliche Ergebnisse}} + \newcommand\suggestions{\paragraph{Empfehlungen}} + \newcommand\keywords{\paragraph{Schl\"usselw\"orter}} +}{} + +%% TODO: twoside / book support +%% Debug: +%% \RequirePackage{showframe} + +\newgeometry{ + hmargin=\hsr@hmarginwidth, + vmargin=\hsr@vmarginheight, + marginparsep=0pt, + marginpar=0pt, +} + +%% Configure headers +\fancypagestyle{hsrbericht}{% + \fancyhf{} % clear + \fancyhead[C]{\@title} + \fancyhead[R]{\hsr@clientlogo} + \fancyhead[L]{\hsr@logo} + \fancyfoot[R]{\thepage / \pageref{TotPages} } + \fancyfoot[L]{Dockument: \jobname \\ Druck: \finishdate} + \renewcommand{\headrulewidth}{.5pt} + \renewcommand{\footrulewidth}{.5pt} +} + +\fancypagestyle{plain}{% + \fancyhf{} % clear + \fancyhead[C]{\@title} + \fancyhead[R]{\hsr@clientlogo} + \fancyhead[L]{\hsr@logo} + \fancyfoot[R]{\thepage / \pageref{TotPages} } + \fancyfoot[L]{Dockument: \jobname \\ Druck: \finishdate} + \renewcommand{\headrulewidth}{.5pt} + \renewcommand{\footrulewidth}{.5pt} +} + +\pagestyle{hsrbericht} + +%</hsrbericht> +% \end{macrocode} +% +% \Finale +%^^A vim:set tw=80 sw=2 ts=2 et: diff --git a/macros/latex/contrib/oststud/hsrstud-classes.pdf b/macros/latex/contrib/oststud/hsrstud-classes.pdf Binary files differnew file mode 100644 index 0000000000..29590a39a7 --- /dev/null +++ b/macros/latex/contrib/oststud/hsrstud-classes.pdf diff --git a/macros/latex/contrib/oststud/hsrstud.dtx b/macros/latex/contrib/oststud/hsrstud.dtx new file mode 100644 index 0000000000..c82dbe2fe0 --- /dev/null +++ b/macros/latex/contrib/oststud/hsrstud.dtx @@ -0,0 +1,619 @@ +% \iffalse meta-comment +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Headers + +%<*package> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{hsrstud}[2021/08/04 v0.2 HSR-Stud Macros] +%</package> + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Documentation +%<*doc> +\documentclass[a4paper]{ltxdoc} + +\usepackage{hypdoc} + +%% https://tex.stackexchange.com/questions/95882/avoid-multicol-error-error-saving-partial-page +%% \setlength\IndexMin{100pt} + +\usepackage[left=4cm, right=4cm, top=3cm, bottom=3cm]{geometry} + +\usepackage{\jobname} + +\usepackage{fancyvrb} +\usepackage{enumitem} +\usepackage{framed} +\usepackage{booktabs} +\usepackage{tikz} +\usepackage{xargs} +\usepackage{bookmark} + +\usepackage[ + type={CC}, + modifier={by-sa}, + version={4.0}, +]{doclicense} + +\CodelineIndex +\EnableCrossrefs +\RecordChanges + +\makeatletter +\newlength\excodewidth +\newenvironment{example}{% + \leftbar\VerbatimEnvironment% + \global\excodewidth=.5\linewidth% + \begin{VerbatimOut}{\jobname.vrb}% +}{% + \end{VerbatimOut}% + \noindent% + \minipage[c]{\excodewidth}% + \vspace{0pt}\input{\jobname.vrb}% + \endminipage% + \minipage[c]{\dimexpr\linewidth-\excodewidth-2\fboxsep-2\fboxrule-\FrameSep\relax}% + \vspace{0pt}\lstinputlisting{\jobname.vrb}% + \endminipage% + \endleftbar% +} + +\newenvironment{hexample}{% + \leftbar\VerbatimEnvironment% + \begin{VerbatimOut}{\jobname.vrb}% +}{% + \end{VerbatimOut}% + \noindent% + \begingroup\centering% + \hspace{5pt}% + \minipage[t]{\linewidth}% + \vspace{0pt}\input{\jobname.vrb}% + \endminipage\\ + \hspace{5pt}% + \minipage[t]{\linewidth}% + \vspace{0pt}\lstinputlisting{\jobname.vrb}% + \endminipage% + \endgroup% + \endleftbar% +} + + +\makeatother + +\begin{document} +\GetFileInfo{\jobname.sty} +\title{^^A + \texttt{\textcolor{hsr-blue}{hsr}stud} --- HSR-Stud Style and Macros\thanks{^^A + This file describes version \fileversion, last revised \filedate.^^A + }^^A +} +\author{Naoki Pross \texttt{<naoki.pross@ost.ch>}} +\date{Released \filedate} +\maketitle +\tableofcontents + +\changes{v0.2}{2021/08/05}{Remove legacy code and update notation} +\changes{v0.1}{2020/02/16}{Initial draft} + +\section{Purpose of this package} +This package is made for the HSR Studenten organization to provide an easy to +use interface to give a more consistent look and feel for the works produced by +its the members. A secondary objective of this package is to eliminate the +\emph{many} dispersed duplicate .tex files that fill the repositories of the +HSR-Stud org. + + +\section{Package Options} \label{sec:options} +\begin{description}[align=right] + \item[|dontrenew|] Do not renew existing \LaTeX{} commands and + environments. This is useful when the package is loaded on a document + that is already partially written. + + \item[|arrowvec|] Tells the package to use a vector notation with a small + arrow over the variables, as it were handwritten. + + \item[|textvecdiff|] Disables the ``Nabla'' or ``Del'' notation for vector + derivatives. Instead the symbols \(\vec{\nabla}, \vec{\nabla}\dotp, + \vec{\nabla}\crossp, \nabla^2, \vec{\nabla}^2\) are be replaced with + grad, div, curl and div grad. +\end{description} + +\section{Summary notation} + +\section{Default Theming} +\subsection{Links with \texttt{hyperref}} + +\begin{example} +Colors from +\cite{bib:hsrcolors} see \\ +\url{https://intranet.hsr.ch} +\end{example} + +\subsection{Source Code with \texttt{listings}} + +\begin{hexample} +\begin{lstlisting}[language=C++] +int main(int argc, char *argv[], char *envp[]) { + std::cout << "hello world" << std::endl; +} +\end{lstlisting} +\end{hexample} + +\section{Mathematics} +\subsection{Vectors} + +\begin{macro}{\vec} + +Vectors notation. Aliases: \cs{v}, \cs{vc}. If the option \texttt{arrowvec} +described in \S \ref{sec:options} is enabled, the notation with a small +arrow over the varible will be used \(\hsrvecarrow{x}\), otherwise the +vector is bold \(\hsrvecbold{x}\). Takes one option \marg{letter}. \cs{v} +is renamed to \cs{vaccent} and \cs{vec} to \cs{oldvec}. + +\begin{example} +\[ \vec{F} = m\vec{a} \] +\end{example} +\end{macro} + +\begin{macro}{\uvec} +Unit vector notation. Alias \cs{uv}. Takes \marg{letter}. It is implemented +in terms of \cmd{\vec}, which means that the style is inherited. +\begin{example} +\[ \uvec{x} = \vec{x}/x \] +\end{example} +\end{macro} + +\subsubsection{Products} +\begin{macro}{\dotp} +Dot product between vectors. +\begin{example} +\[ \vec{u}\dotp\vec{v} \] +\end{example} +\end{macro} + +\begin{macro}{\crossp} +Cross product between vectors. +\begin{example} +\[ \vec{u}\crossp\vec{v} \] +\end{example} +\end{macro} + + +\subsection{Matrices} + +\begin{macro}{\mx} +Matrix notation. Takes \marg{letter}. + +\begin{example} +\[ + \mx{J} = \begin{pmatrix} + 0 & 1 \\ + 1 & 0 + \end{pmatrix} +\] +\end{example} +\end{macro} + +\subsection{Equalities} + +\begin{macro}{\heq} + L'H\^opital limit equality symbol. +\begin{hexample} +\[ + \lim_{x\to\infty} \frac{x}{x^2 - 1} + \heq \lim_{x\to\infty} \frac{1}{2x} + = 0 +\] +\end{hexample} +\end{macro} + +\subsection{Derivatives} +\subsubsection{Differentials} + +\begin{macro}{\dd} +The differential element. It needs a \marg{var} and has the optional +argument \oarg{order}. +\begin{example} +\[ \dd{x} \qquad \dd[4]{x} \] +\end{example} +\end{macro} + +\begin{macro}{\di} +This is the same as \cs{dd} but with a small space in front, it is +intended to be used in integrals for a nicer typesetting. +\begin{hexample} +\begin{align*} + I &= \int \vec{J}\dotp\dd{\vec{s}} \\ + &= \iint \vec{J}\dotp\uvec{n}\di{x}\di{y} +\end{align*} +\end{hexample} +\end{macro} + +\subsubsection{Scalar functions} + +\begin{macro}{\deriv} +The derivative has arguments \marg{function}, \marg{var} and the optional +argument \oarg{order}. +\begin{example} +\[ + \deriv{y}{x} \qquad + \deriv[3]{y}{x} +\] +\end{example} +\end{macro} + +%% TODO: add mixed partial derivatives (probably using xparse) +\begin{macro}{\pderiv} +The partial derivative has arguments \marg{function}, \marg{var} and the +optional argument \oarg{order}. +\begin{example} +\[ + \pderiv{y}{x} \qquad + \pderiv[3]{y}{x} +\] +\end{example} +\end{macro} + +\subsubsection{Vector functions} + +\begin{macro}{\grad} +The gradient vector operator. +\begin{example} +\[ \grad f \] +\end{example} +\end{macro} + +\begin{macro}{\div} +The divergence operator, \cs{div} is renamed to \cs{divsymb}. If the option +|donotrenew| is used \cs{divg} is also available. +\begin{example} +\[ \div \vec{f} \] +\end{example} +\end{macro} + +\begin{macro}{\curl} +The curl operator. +\begin{example} +\[ \curl \vec{f} \] +\end{example} +\end{macro} + +\begin{macro}{\laplacian} +The laplacian operator. +\begin{example} +\[ + \laplacian f +\] +\end{example} +\end{macro} + +\begin{macro}{\vlaplacian} +The vector laplacian operator operator. +\begin{example} +\[ + \vlaplacian \vec{F} +\] +\end{example} +\end{macro} + + +\section{Colors} +\begin{center} +\begin{tikzpicture} + \foreach \color/\y in {% + hsr-blue/7, + hsr-mauve/6, + hsr-lakegreen/5, + hsr-reed/4, + hsr-petrol/3, + hsr-basswood/2, + hsr-lightgrey/1, + hsr-black/0}{ + \foreach \x/\a in {0/,1/80,2/60,3/40,4/20}{ + \node[anchor=east] at (-.5,\y) {\texttt{\color}}; + \fill[color=\color\a] (\x,\y-.25) rectangle ++(1,.5); + \node[anchor=west] at (\x,\y) {\texttt{\a}}; + } + } +\end{tikzpicture} +\end{center} + +\section{License} +\doclicenseThis + +\begin{thebibliography}{3} + \bibitem{bib:hsrcolors} + HSR Intern: Corporate Design / Farben, + \textit{Hochschule f\"ur Technik Rapperswil}, + \url{https://intranet.hsr.ch/Farben.7715.0.html} +\end{thebibliography} + +\PrintChanges +\PrintIndex + +\DocInput{\jobname.dtx} + +\end{document} + +%</doc> +%\fi + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \appendix +% \section{Implementation} +% |hsrstud| package implementation with inline documentation + +%\iffalse +%<*package> +%\fi + +% \subsection{Dependencies} +% \begin{macrocode} +%% Dependencies (( +\RequirePackage{amsmath} +\RequirePackage{amssymb} +\RequirePackage{bm} + +\RequirePackage{esint} +\PassOptionsToPackage{b}{esvect} +\RequirePackage{esvect} + +\RequirePackage{xcolor} +\RequirePackage{hyperref} +\RequirePackage{listings} + +\RequirePackage{iftex} +\RequirePackage{kvoptions} +%% )) +% \end{macrocode} + +% \subsection{Package options} +% \begin{macrocode} +\SetupKeyvalOptions{ + family=hsr, + prefix=hsr@ +} + +%% Do not renew LaTeX Macros +\DeclareBoolOption[false]{dontrenew} + +%% Vector style +\DeclareBoolOption[false]{arrowvec} +\DeclareComplementaryOption{boldvec}{arrowvec} + +%% Vector derivative style +\DeclareBoolOption[false]{textvecdiff} +\DeclareComplementaryOption{delvecdiff}{textvecdiff} + + +%% Process options +\ProcessLocalKeyvalOptions* +% \end{macrocode} + + +% \subsection{Summary notation} +% \begin{macrocode} +%% TODO: change letters in german +\newcommand{\bookref}[1]{\texttt{\textcolor{hsr-mauve}{P.#1}}} +\newcommand{\notesref}[1]{\texttt{\textcolor{hsr-blue}{S.#1}}} +\newcommand{\lectureref}[1]{\texttt{\textcolor{hsr-lakegreen}{L.#1}}} +% \end{macrocode} + +% \subsection{Default theming} +% \begin{macrocode} +%% Theming for hyperref and listings (( +\hypersetup{ + colorlinks=true, + linkcolor=hsr-black, + citecolor=hsr-mauve, + filecolor=hsr-black, + urlcolor=hsr-blue, +} + +%% Common listings settings +\lstdefinestyle{hsr-base}{ + belowcaptionskip=\baselineskip, + breaklines=true, + frame=none, + inputencoding=utf8, + % margin + xleftmargin=\parindent, + % numbers + numbers=left, + numbersep=5pt, + numberstyle=\ttfamily\footnotesize\color{hsr-black40}, + % background + backgroundcolor=\color{white}, + showstringspaces=false, + % default language + language=[LaTeX]TeX, + % break long lines, and show an arrow where the line was broken + breaklines=true, + postbreak=\mbox{\textcolor{hsr-blue}{$\hookrightarrow$}\space}, + % font + basicstyle=\ttfamily\small, + identifierstyle=\color{hsr-black}, + keywordstyle=\color{hsr-blue}, + commentstyle=\color{hsr-black40}, + stringstyle=\color{hsr-mauve80}, +} + +%% Define missing languages / aliases +\lstdefinelanguage{LaTeX}{ + language=[LaTeX]Tex +} + +%% Set style +\lstset{style=hsr-base, escapechar=`} +%%)) +% \end{macrocode} + +% \subsection{Mathematics} +% \subsubsection{Vectors} +% \begin{macrocode} +%% Vector (( +\newcommand{\hsrvecbold}[1]{\mathbf{\bm{#1}}} +\newcommand{\hsrvecarrow}[1]{\vv{\mathrm{#1}}} % from esvect + +\newcommand{\@hsrvecf}[1]{\hsrvecbold{#1}} +\ifhsr@arrowvec + \renewcommand{\@hsrvecf}[1]{\hsrvecarrow{#1}} +\fi + +\newcommand{\vc}{\@hsrvecf} +\ifhsr@dontrenew\else + % save previous command + \newcommand{\vaccent}{\v} + \newcommand{\oldvec}{\vec} + % redefine + \renewcommand{\v}[1]{\@hsrvecf{#1}} + \renewcommand{\vec}[1]{\@hsrvecf{#1}} +\fi +%%)) + +%% Unit vector (( +\newcommand{\hsruvecbold}[1]{\vec{\hat{#1}}} +\newcommand{\hsruvecarrow}[1]{\hat{\mathrm{#1}}} +\newcommand{\@hsruvecf}[1]{\hsruvecbold{#1}} +\ifhsr@arrowvec + \renewcommand{\@hsruvecf}[1]{\hsruvecarrow{#1}} +\fi + +\newcommand{\uv}[1]{\@hsruvecf{#1}} +\newcommand{\uvec}[1]{\@hsruvecf{#1}} +%%)) + +%% Products (( +\newcommand{\dotp}{\boldsymbol\cdot} +\newcommand{\crossp}{\boldsymbol\times} +%%)) +% \end{macrocode} + +% \subsubsection{Matrices and Tensors} +% \begin{macrocode} +\newcommand{\mx}[1]{\bm{\mathrm{#1}}} +% \end{macrocode} + +% \subsubsection{Equalities} +% \begin{macrocode} +\newcommand{\heq}{\stackrel{\hat{\texttt{H}}}{=}} +% \end{macrocode} + +% \subsection{Derivatives} +% \subsubsection{Differentials} +% \begin{macrocode} +\newcommand{\dd}[2][]{\mathrm{d}^{#1} #2} +\newcommand{\di}[2][]{\,\dd[#1]{#2}} +% \end{macrocode} + +% \subsubsection{Derivatives} +% \begin{macrocode} +\newcommand{\deriv}[3][]{\frac{\dd[#1]{#2}}{\dd[]{#3^{#1}}}} +\newcommand{\pderiv}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} +% \end{macrocode} + +% \subsubsection{Vector derivatives} +% \begin{macrocode} +%% Gradient (( +\ifhsr@textvecdiff + \DeclareMathOperator{\grad}{grad} +\else + \newcommand{\grad}{\vec{\nabla}} +\fi +%% )) + +%% Divergence (( +\ifhsr@textvecdiff + \newcommand{\@hsrdivf}{div} +\else + \newcommand{\@hsrdivf}{\vec{\nabla}\dotp} +\fi + +\DeclareMathOperator{\divg}{\@hsrdivf} +\ifhsr@dontrenew\else + \let\divsymb=\div + \renewcommand{\div}{\operatorname{\@hsrdivf}} +\fi +%% )) + +%% Curl (( +\ifhsr@textvecdiff + \DeclareMathOperator{\curl}{curl} +\else + \DeclareMathOperator{\curl}{\vec{\nabla}\crossp} +\fi +%% )) + +%% laplacian (( +\ifhsr@textvecdiff + \DeclareMathOperator{\laplacian}{div grad} +\else + \DeclareMathOperator{\laplacian}{\nabla^2} +\fi + +\ifhsr@textvecdiff + \DeclareMathOperator{\vlaplacian}{div grad} +\else + \DeclareMathOperator{\vlaplacian}{\vec{\nabla}^2} +\fi +%% )) +% \end{macrocode} + +% \subsection{Colors} +% \begin{macrocode} +\definecolor{hsr-blue}{HTML}{0065A3} +\definecolor{hsr-blue80}{HTML}{3384B5} +\definecolor{hsr-blue60}{HTML}{66A3C8} +\definecolor{hsr-blue40}{HTML}{99C1DA} +\definecolor{hsr-blue20}{HTML}{CCE0ED} + +\definecolor{hsr-mauve}{HTML}{6E1C50} +\definecolor{hsr-mauve80}{HTML}{8B4973} +\definecolor{hsr-mauve60}{HTML}{A87796} +\definecolor{hsr-mauve40}{HTML}{C5A4B9} +\definecolor{hsr-mauve20}{HTML}{E2D2DC} + +\definecolor{hsr-lakegreen}{HTML}{548C86} +\definecolor{hsr-lakegreen80}{HTML}{76A39E} +\definecolor{hsr-lakegreen60}{HTML}{98BAB6} +\definecolor{hsr-lakegreen40}{HTML}{BBD1CF} +\definecolor{hsr-lakegreen20}{HTML}{DDE8E7} + +\definecolor{hsr-reed}{HTML}{7B6951} +\definecolor{hsr-reed80}{HTML}{958774} +\definecolor{hsr-reed60}{HTML}{B0A597} +\definecolor{hsr-reed40}{HTML}{CAC3B9} +\definecolor{hsr-reed20}{HTML}{E5E1DC} + +\definecolor{hsr-petrol}{HTML}{00738D} +\definecolor{hsr-petrol80}{HTML}{338FA4} +\definecolor{hsr-petrol60}{HTML}{66ABBB} +\definecolor{hsr-petrol40}{HTML}{99C7D1} +\definecolor{hsr-petrol20}{HTML}{CCE3E8} + +\definecolor{hsr-basswood}{HTML}{BABD5D} +\definecolor{hsr-basswood80}{HTML}{C8CA7D} +\definecolor{hsr-basswood60}{HTML}{D6D79E} +\definecolor{hsr-basswood40}{HTML}{E3E5BE} +\definecolor{hsr-basswood20}{HTML}{F1F2DF} + +\definecolor{hsr-lightgrey}{HTML}{C6C7C8} +\definecolor{hsr-lightgrey80}{HTML}{D1D2D3} +\definecolor{hsr-lightgrey60}{HTML}{DDDDDE} +\definecolor{hsr-lightgrey40}{HTML}{E8E8E9} +\definecolor{hsr-lightgrey20}{HTML}{F4F4F4} + +\definecolor{hsr-black}{HTML}{1A171B} +\definecolor{hsr-black80}{HTML}{484549} +\definecolor{hsr-black60}{HTML}{767476} +\definecolor{hsr-black40}{HTML}{A4A2A4} +\definecolor{hsr-black20}{HTML}{D1D1D1} +% \end{macrocode} + +% \iffalse +% \begin{macrocode} +%</package> +% \end{macrocode} +% \fi +% +%\Finale diff --git a/macros/latex/contrib/oststud/hsrstud.ins b/macros/latex/contrib/oststud/hsrstud.ins new file mode 100644 index 0000000000..ec7b232494 --- /dev/null +++ b/macros/latex/contrib/oststud/hsrstud.ins @@ -0,0 +1,56 @@ +\input docstrip.tex +\preamble +This document is part of the HSRStud LaTeX Package + +THE FOLLOWING WORK IS UNDER THE CC BY-SA 4.0 LICENSE + +You are free to +--------------- + * Share -- Copy and redistribute the material in any medium or format + * Adapt -- Remix, transform, and build upon the material for any + purpose, even commercially + +The licensor cannot revoke these freedoms as long as you follow the +license terms. + +Under the following terms +------------------------- + * Attribution + You must give appropriate credit, provide a link to the license, and + indicate if changes were made. You may do so in any reasonable + manner, but not in any way that suggests the licensor endorses you + or your use. + + * ShareAlike + If you remix, transform, or build upon the material you must + distribute your contributions under the same license as the + original. + + * No additional restrictions + You may not apply legal terms or technological measures that + legally restrict others from doing anything the license permits. + +Notice +------ +You do not have to comply with the license for elements of the material +in the public domain or where your use is permitted by an applicable +exception or limitation. + +No warranties are given. The license may not give you all of the +permissions necessary for your intended use. For example, other rights +such as publicity, privacy, or moral rights may limit how you use the +material. +\endpreamble + +\keepsilent +\askforoverwritefalse +\usedir{tex/latex/hsrstud} + +\generate{ + \file{hsrstud.sty}{\from{hsrstud.dtx}{package}} + \file{hsrzf.cls}{\from{hsrstud-classes.dtx}{hsrzf}} + \file{hsrbericht.cls}{\from{hsrstud-classes.dtx}{hsrbericht}} +} +\endbatchfile + +\endinput diff --git a/macros/latex/contrib/oststud/hsrstud.pdf b/macros/latex/contrib/oststud/hsrstud.pdf Binary files differnew file mode 100644 index 0000000000..cf1ad1e27f --- /dev/null +++ b/macros/latex/contrib/oststud/hsrstud.pdf diff --git a/macros/latex/contrib/oststud/oststud.dtx b/macros/latex/contrib/oststud/oststud.dtx new file mode 100644 index 0000000000..35539e7b19 --- /dev/null +++ b/macros/latex/contrib/oststud/oststud.dtx @@ -0,0 +1,664 @@ +% \iffalse meta-comment +% +% Copyright (C) 2023 by Naoki Pross <np@0hm.ch> +% ------------------------------------------------------- +% +% OSTStud.dtx is licensed under a Creative Commons +% Attribution-ShareAlike 4.0 International License. +% +% You should have received a copy of the license along +% with this work. If not, see +% <http://creativecommons.org/licenses/by-sa/4.0/>. +% +% \fi +% +% \iffalse +%<*driver> +\ProvidesFile{oststud.dtx} +%</driver> +%<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01] +%<package>\ProvidesPackage{oststud} +%<*package> + [2023/04/18 v0.3 OST Student's package] +%</package> +% +%<*driver> +\documentclass{ltxdoc} + +\usepackage{oststud} +\usepackage{enumitem} +\usepackage{tikz} +\usepackage{framed} +\usepackage[ + type={CC}, + modifier={by-sa}, + version={4.0}, +]{doclicense} + + +\EnableCrossrefs +\CodelineIndex +\RecordChanges +\begin{document} + \DocInput{oststud.dtx} + \PrintChanges + \PrintIndex +\end{document} +%</driver> +% \fi +% +% \changes{v0.1}{2022/11/18}{Initial version} +% \changes{v0.2}{2022/11/22}{Port features of \texttt{hsrstud}} +% \changes{v0.3}{2023/04/18}{Cleanup for CTAN upload} +% +% \GetFileInfo{oststud.dtx} +% +% \DoNotIndex{\newcommand,\newenvironment,\fi,\else} +% +% \title{ +% \texttt{\textcolor{OSTBlackberry}{ost}stud} --- +% OST-Stud Style and Macros\thanks{ +% This document corresponds to \textsf{oststud}~\fileversion, last +% revised \filedate. +% } +% } +% \author{Naoki Sean Pross \texttt{<np@0hm.ch>}} +% \date{Released \filedate} +% +% \maketitle +% \tableofcontents +% +% \section*{License} +% \doclicenseThis +% +% \section{Purpose of this Package} +% +% This package is made for the OST Studenten organization to provide an easy to +% use interface that gives a more consistent look and feel to the works +% produced by its members. This package is the successor after the fusion of +% the old |hsrstud| package. +% +% \section{Package Options} +% \begin{description}[align=right] +% \item[|dontrenew|] Do not renew existing \LaTeX{} commands and +% environments. This is useful when the package is loaded on a document +% that is already partially written. +% \item[|textvecdiff|] Disables the ``Nabla'' or ``Del'' notation for vector +% derivatives. Instead the symbols \(\vec{\nabla}, \vec{\nabla}\dotp, +% \vec{\nabla}\crossp, \nabla^2, \vec{\nabla}^2\) are be replaced with +% grad, div, curl and div grad. +% \item[|bfemph|] \textit{Work in progress.} +% \item[|bbprobability|] \textit{Work in progress.} +% \item[|scrtransforms|] \textit{Work in progress.} +% \end{description} +% +% \section{Usage} +% +% \subsection{Vectors and Vector Calculus} +% +% \DescribeMacro{\vec} +% \DescribeMacro{\uvec} +% In the physics used by electrical engineers it is common to use lowercase +% bold letters for vectors (with the exception of electromagnetic fields +% $\vec{E},\vec{B},\vec{A},\ldots$). If the |dontrenew| option is set a new +% macro |\bvec| (bold |\vec|) that takes a \marg{symbol} defines the bold +% vector notation. Otherwise the default vector notation with the tiny ugly +% arrow ($\oldvec{u}$) is replaced by bold and the arrow notation saved in +% |\oldvec|. In vector calculus it is common to denote unit vectors by putting +% a hat, so there is a macro |\uvec| that does just that: +% \[ +% \uvec{u} = \vec{u}/u. +% \] +% +% \DescribeMacro{\dotp} +% \DescribeMacro{\crossp} +% To differentiate the dot and cross products (between vectors) from normal +% product between scalars ($a \cdot b$ and $a \times b$), the macros |\dotp| +% and |\crossp| provide a bold variant: +% \[ +% \vec{u} \dotp \vec{v}, \qquad +% \vec{u} \crossp \vec{v}. +% \] +% +% \DescribeMacro{\grad} +% \DescribeMacro{\div} +% \DescribeMacro{\curl} +% The macros |\grad|, |\div| and |\curl| provide symbols for the gradient, +% divergence and curl operators used in vector calculus. If the option +% |textvecdiff| is set, they symbols are written as words, otherwise they will +% he written (ab)using the Nabla symbol, i.e. by pretending that the symbol +% $\vec{\nabla}$ is a ``vector'' (sometime referred to as ``del'') of partial +% derivates: $\vec{\nabla} = (\partial_x, \partial_y, \partial_z)^\mathsf{T}$. +% Unless the option |dontrenew| is set, the division symbol is replaced by the +% divergence and the symbol $\divsymb$ is saved in |\divsymb|. For a scalar +% field $\phi$ or a vector field $\vec{F}$ the notation (in order) of the +% gradient, divergence and curl appear as follows: +% \[ +% \grad \phi, \quad +% \div \vec{F}, \quad +% \curl \vec{F}. +% \] +% +% \DescribeMacro{\laplacian} +% \DescribeMacro{\vlaplacian} +% Continuing with the (ab)use of the ``Nabla'' or ``Del'' notation, the +% there is a macro |\laplacian| for the Laplacian operator +% \[ +% \laplacian \equiv \div \grad \equiv \sum_i \partial^2_i. +% \] +% Notice that the Nabla symbol is not bold, that is because the Laplacian +% operator results in a scalar value. Though, sometimes in electrodynamics the +% vector Laplacian is used (which applies the Laplacian operator to each +% component). To differentiate the two there is a macro |\vlaplacian| which +% uses the bold nabla symbol: $\vlaplacian$. If the option |dontrenew| is set +% both symbols are replaced by div grad. +% +% \subsection{Linear Algebra} +% +% \DescribeMacro{\mx} +% Similarly to vectors it is common to write matrices as uppercase bold +% letters, thus the |\mx| macro takes a \marg{symbol} and typesets it as +% upright bold. +% +% \DescribeMacro{\mt} +% \DescribeMacro{\mh} +% The ``normal'' and Hermitian (complex conjugate) transpose of a matrix +% $\mx{F}$ are denoted by a superscript sans-serif T or H respectively +% ($\mt{\mx{F}}$ resp. $\mh{\mx{F}}$). The |\mt| and |\mh| macros (matrix +% transpose and Hermitian transpose) provide this notation; They both take a +% \marg{symbol}. In abstract vector spaces the Hermitian transpose becomes the +% adjoint, for which it is common to use a superscript dagger (adjoint of +% $\mathcal{Q}$ is $\mathcal{Q}^\dagger$), but since it does not come up very +% often this package does \emph{not} provide a macro for the adjoint. +% +% \DescribeMacro{\minv} +% Another common matrix operation that is annoying to write is the matrix +% inverse, which is usually written as a superscript -1. The |\minv| command +% takes a \marg{matrix} and adds the -1 superscript. +% +% Using all of the above we can typeset the matrix form of the linear least +% squares approximation by writing +% \begin{leftbar} +% |\vec{a} = \minv{(\mt{\mx{Q}} \mx{Q})} \mt{\mx{Q}}\vec{y}| +% \end{leftbar} +% \noindent which results in the following: +% \[ +% \vec{a} = \minv{(\mt{\mx{Q}} \mx{Q})} \mt{\mx{Q}}\vec{y} +% \iff +% \argmin_{(a_1,a_2)} \left(\sum_{i=0}^n y_i - a_1 x_i + a_2\right). +% \] +% +% \DescribeMacro{\tr} +% This package also provides a macro for the trace of a matrix. +% +% \subsection{Complex Numbers} +% +% ^^A TODO: write section +% \DescribeMacro{\Re} +% \DescribeMacro{\Im} +% AMS maths's default notation for the real and imaginary parts of a complex +% number use the Fraktur font capital letters $\mathfrak{R}$ and +% $\mathfrak{I}$. However, in engineering it is more common to see the notation +% $\Re{z}$ and $\Im{z}$, thus, unless the |dontrenew| option is set this +% package replaces the notation with the former symbols. Both of the macros +% were also modified to take an argument \marg{expression}, to surround the +% expression with opening and closing curly brackets. +% +% \subsection{Probability Operators} +% +% ^^A TODO: write section +% \textit{Work in progress.} +% +% \subsection{Transformation Operators} +% +% ^^A TODO: write section +% \textit{Work in progress.} +% \[ +% \laplace\{f(t)\} = F(s) \corresponds f(t) \rcorresponds F(s) +% \] +% +% \subsection{References} +% +% ^^A TODO: write section +% \textit{Work in progress.} +% +% ^^A \DescribeMacro{\skriptum} +% ^^A \DescribeMacro{\sref} +% +% ^^A \DescribeMacro{\textbook} +% ^^A \DescribeMacro{\bref} +% +% \subsection{OST Colors} +% +% The official OST color palette provides the following ``primary'' or +% ``accent'' colors. +% \begin{center} +% \begin{tikzpicture} +% \begin{scope} +% \foreach [count=\i] \c in {Black,Gray,Blackberry,Raspberry} { +% \node[ +% thick, draw=white, fill={OST\c}, +% minimum width=3cm, minimum height=1cm, +% ] (\c) at ({3.2cm*\i},0) {\texttt{OST\c}}; +% } +% ^^A Because you can't see black on black +% \node[text=white] at (Black) {\texttt{OSTBlack}}; +% \end{scope} +% \end{tikzpicture} +% \end{center} +% And then there are the other ``design colors''. +% \begin{center} +% \begin{tikzpicture} +% \begin{scope}[yshift=-2cm] +% \foreach [count=\i] \c in {Orange,Red,Purple,Blue,Green} { +% \foreach [count=\j] \s in {Dark,{},Light}{ +% \node[ +% thick, draw=white, fill={OST\s\c}, +% minimum width=3cm, minimum height=1cm, +% ] (\c\s) at ({3.2cm*\j},{-1.2cm*\i}) {\texttt{OST\s\c}}; +% } +% } +% \end{scope} +% \end{tikzpicture} +% \end{center} +% +% \subsection{Sane Defaults} +% +% ^^A TODO: write section +% \textit{Work in progress.} +% +% ^^A This macros separates the documentation from the implementation +% \StopEventually{} +% +% \section{Implementation} +% +% \subsection{Dependencies and Parse Options} +% +% First, we have the dependencies necessary for typesetting. +% \begin{macrocode} +\RequirePackage{xcolor} +\RequirePackage{amsmath} +\RequirePackage{amssymb} +\RequirePackage{bm} +% \end{macrocode} +% This package also sets sane defaults to the following packages. +% \begin{macrocode} +\RequirePackage{hyperref} +\RequirePackage{listings} +% \end{macrocode} +% Then we create the options for the package. +% \begin{macrocode} +\SetupKeyvalOptions{ + family=ost, + prefix=ost@ +} +\DeclareBoolOption[false]{dontrenew} +\DeclareBoolOption[false]{textvecdiff} +\DeclareBoolOption[false]{bfemph} +\DeclareBoolOption[false]{bbprobability} +% \DeclareBoolOption[false]{scrtransforms} +\ProcessLocalKeyvalOptions* +% \end{macrocode} +% +% \subsection{Bold emphasis} +% +% \begin{macro}{\emph} +% Change the behaviour of |\emph|. +% \begin{macrocode} +\ifost@bfemph + \ifost@dontrenew + \PackageError{The options \noexpand\dontrenew and \noexpand\bfemph cannot be used at the same time!} + \fi + \long\expandafter\def\csname em \endcsname{% + \@nomath\em + \if b\expandafter\@car\f@series\@nil + \itshape\else\bfseries\fi + } +\fi +% \end{macrocode} +% \end{macro} +% +% \subsection{Vectors and Vector Calculus} +% +% \begin{macro}{\vec} +% Set up bold notation for vectors. +% \begin{macrocode} +\newcommand{\ost@vec}[1]{\mathbf{\bm{#1}}} +\ifost@dontrenew + \newcommand{\bvec}[1]{\ost@vec{#1}} +\else + \let\oldvec\vec + \renewcommand{\vec}[1]{\ost@vec{#1}} +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\uvec} +% In vector calculus unit vectors are usually denoted by a hat. +% \begin{macrocode} +\newcommand{\uvec}[1]{\vec{\hat{#1}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dotp,\crossp} +% To differentiate them from |\cdot| and |\times| which are for scalars. +% \begin{macrocode} +\DeclareMathOperator{\dotp}{\boldsymbol\cdot} +\DeclareMathOperator{\crossp}{\boldsymbol\times} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\grad} +% Gradient of a vector valued scalar functon. +% \begin{macrocode} +\ifost@textvecdiff + \DeclareMathOperator{\grad}{grad} +\else + \DeclareMathOperator{\grad}{\vec{\nabla}} +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\div} +% Divergence operator. If the option |dontrenew| is a new macro |\divg| is +% defined. Otherwise |\div| is renamed to |\divsymb|. +% \begin{macrocode} +\ifost@textvecdiff + \DeclareMathOperator{\ost@div}{div} +\else + \DeclareMathOperator{\ost@div}{\vec{\nabla}\dotp} +\fi +\ifost@dontrenew + \DeclareMathOperator{\divg}{\ost@div} +\else + \let\divsymb\div + \renewcommand{\div}{\ost@div} +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\curl} +% Curl of a vector field. +% \begin{macrocode} +\ifost@textvecdiff + \DeclareMathOperator{\curl}{curl} +\else + \DeclareMathOperator{\curl}{\vec{\nabla}\crossp} +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\laplacian,\vlaplacian} +% Laplacian of a scalar and vector field. +% \begin{macrocode} +\ifost@textvecdiff + \DeclareMathOperator{\laplacian}{\div\grad} + \DeclareMathOperator{\vlaplacian}{\div\grad} +\else + \DeclareMathOperator{\laplacian}{\nabla^2} + \DeclareMathOperator{\vlaplacian}{\vec{\nabla}^2} +\fi +% \end{macrocode} +% \end{macro} +% +% \subsection{Linear Algebra} +% +% \begin{macro}{\mx} +% Notation for matrices as bold (uppercase) letters. +% \begin{macrocode} +\newcommand{\mx}[1]{\mathbf{\bm{#1}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\mt,\mh} +% Normal and Hermitian (conjugate) transpose of a matrix. +% \begin{macrocode} +\newcommand{\mt}[1]{{#1}^\mathsf{T}} +\newcommand{\mh}[1]{{#1}^\mathsf{H}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\minv} +% Matrix inverse. +% \begin{macrocode} +\newcommand{\minv}[1]{{#1}^{-1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\tr} +% Trace of a matrix. +% \begin{macrocode} +\DeclareMathOperator{\tr}{tr} +% \end{macrocode} +% \end{macro} +% +% \subsection{Mathematical Programming} +% \begin{macro}{\argmin,\argmax} +% \begin{macrocode} +\DeclareMathOperator*{\argmax}{arg\,max} +\DeclareMathOperator*{\argmin}{arg\,min} +% \end{macrocode} +% \end{macro} +% +% \subsection{Complex Numbers} +% +% \begin{macro}{\Re,\Im} +% Replace the real and imaginary operators to look ``normal'', that is not +% using the Fraktur fonts. +% \begin{macrocode} +\ifost@dontrenew\else + \let\oldRe\Re \let\oldIm\Im + \renewcommand{\Re}[1]{\mathrm{Re} \left\{#1\right\}} + \renewcommand{\Im}[1]{\mathrm{Im} \left\{#1\right\}} +\fi +% \end{macrocode} +% \end{macro} +% +% \subsection{Probability Operators} +% +% \begin{macro}{\E} +% Expectation of a random variable. +% \begin{macrocode} +\ifost@bbprobability + \DeclareMathOperator{\ost@expectation}{\mathbb{E}} +\else + \DeclareMathOperator{\ost@expectation}{E} +\fi +\newcommand{\E}[1]{\ost@expectation\left\{#1\right\}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\Var} +% Variance of a random variable. +% \begin{macrocode} +\ifost@bbprobability + \DeclareMathOperator{\ost@variance}{\mathbb{V}} +\else + \DeclareMathOperator{\ost@variance}{Var} +\fi +\newcommand{\Var}[1]{\ost@variance\left\{#1\right\}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\Pr} +% Probability operator. +% \begin{macrocode} +\ifost@bbprobability + \DeclareMathOperator{\ost@probability}{\mathbb{P}} +\else + \DeclareMathOperator{\ost@probability}{Pr} +\fi +\ifost@dontrenew + \newcommand{\P}[1]{\ost@probability\left\{#1\right\}} +\else + \renewcommand{\Pr}[1]{\ost@probability\left\{#1\right\}} +\fi +% \end{macrocode} +% \end{macro} +% +% \subsection{Transformation Operators} +% +% \begin{macro}{\fourier,\ifourier} +% Fourier transform and its inverse. +% \begin{macrocode} +\DeclareMathOperator{\fourier}{\mathcal{F}} +\DeclareMathOperator{\ifourier}{\mathcal{F}^{-1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\laplace,\ilaplace} +% Laplace transform and its inverse. +% \begin{macrocode} +\DeclareMathOperator{\laplace}{\mathcal{L}} +\DeclareMathOperator{\ilaplace}{\mathcal{L}^{-1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ztransf,\iztransf} +% Z-transform and its inverse. +% \begin{macrocode} +\DeclareMathOperator{\ztransf}{\mathcal{Z}} +\DeclareMathOperator{\iztransf}{\mathcal{Z}^{-1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hilbert} +% Hilbert transform. +% \begin{macrocode} +\DeclareMathOperator{\hilbert}{\mathcal{H}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\corresponds,\rcorresponds} +% Correspondence symbols. +% \begin{macrocode} +\newcommand{\corresponds}{% + \mbox{\setlength{\unitlength}{0.1em}% + \begin{picture}(20,10)% + \put(5,3){\circle{4}}% + \put(7,3){\line(1,0){7}}% + \put(16,3){\circle*{4}}% + \end{picture}}} +\newcommand{\rcorresponds}{% + \mbox{\setlength{\unitlength}{0.1em}% + \begin{picture}(20,10)% + \put(5,3){\circle*{4}}% + \put(7,3){\line(1,0){7}}% + \put(16,3){\circle{4}}% + \end{picture}}} +% \end{macrocode} +% \end{macro} +% +% \subsection{References} +% +% \begin{macro}{\skriptum,\sref} +% Reference material in the skriptum (lecture notes) of the course. +% \begin{macrocode} +\newcommand{\ost@skriptum}{\PackageWarning{No \noexpand\skriptum given}} +\newcommand{\skriptum}[1]{\gdef\ost@skriptum{#1}} +\newcommand{\sref}[1]{% + \texttt{\textcolor{OSTBlackberry}{#1}}\nocite{\ost@skriptum}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textbook,\bref} +% Reference material in the textbook of the course. +% \begin{macrocode} +\newcommand{\ost@textbook}{\PackageWarning{No \noexpand\textbook given}} +\newcommand{\textbook}[1]{\gdef\ost@textbook{#1}} +\newcommand{\bref}[1]{% + \texttt{\textcolor{OSTRaspberry}{#1}}\nocite{\ost@textbook}} +% \end{macrocode} +% \end{macro} +% +% \subsection{OST Colors} +% +% Define the colors according to the OST corporate design. The code was kindly +% stolen from H. Badertscher's \texttt{OSTColors.sty} +% \cite{hbadertscher-ostcolors}. First there are the ``primary colors''. +% \begin{macrocode} +\definecolor{OSTBlack}{RGB}{25,25,25} +\definecolor{OSTGray}{RGB}{198,198,198} +\definecolor{OSTBlackberry}{RGB}{140,25,95} +\definecolor{OSTRaspberry}{RGB}{215,40,100} +% \end{macrocode} +% Then the ``design colors''. +% \begin{macrocode} +\definecolor{OSTPurple}{RGB}{149,96,164} +\definecolor{OSTDarkPurple}{RGB}{107,56,129} +\definecolor{OSTLightPurple}{RGB}{208,169,208} +% \end{macrocode} +% \begin{macrocode} +\definecolor{OSTGreen}{RGB}{29,175,142} +\definecolor{OSTDarkGreen}{RGB}{0,126,107} +\definecolor{OSTLightGreen}{RGB}{167,213,194} +% \end{macrocode} +% \begin{macrocode} +\definecolor{OSTRed}{RGB}{232,78,15} +\definecolor{OSTDarkRed}{RGB}{195,46,21} +\definecolor{OSTLightRed}{RGB}{243,154,139} +% \end{macrocode} +% \begin{macrocode} +\definecolor{OSTBlue}{RGB}{0,134,205} +\definecolor{OSTDarkBlue}{RGB}{0,115,176} +\definecolor{OSTLightBlue}{RGB}{95,191,237} +% \end{macrocode} +% \begin{macrocode} +\definecolor{OSTOrange}{RGB}{251,186,0} +\definecolor{OSTDarkOrange}{RGB}{209,143,0} +\definecolor{OSTLightOrange}{RGB}{253,214,175} +% \end{macrocode} +% +% \subsection{Sane Defaults} +% +% First, set up |hyperref| to not look hideous. +% \begin{macrocode} +\hypersetup{ + colorlinks=true, + linkcolor=OSTBlack, + citecolor=OSTBlackberry, + filecolor=OSTBlack, + urlcolor=OSTDarkBlue, +} +% \end{macrocode} +% Then create a listings style. +% \begin{macrocode} +\lstdefinestyle{ost-base}{ + belowcaptionskip=\baselineskip, + breaklines=true, + frame=none, + inputencoding=utf8, + % margin + xleftmargin=\parindent, + % numbers + numbers=left, + numbersep=5pt, + numberstyle=\ttfamily\footnotesize\color{OSTGray}, + % background + backgroundcolor=\color{white}, + showstringspaces=false, + % default language + language=TeX, + % break long lines, and show an arrow where the line was broken + breaklines=true, + postbreak=\mbox{\textcolor{OSTDarkBlue}{$\hookrightarrow$}\space}, + % font + basicstyle=\ttfamily\small, + identifierstyle=\color{OSTBlack}, + keywordstyle=\color{OSTBlue}, + commentstyle=\color{OSTGray}, + stringstyle=\color{OSTBlackberry}, +} +% \end{macrocode} +% Then we set this style to be default. +% \begin{macrocode} +\lstset{style=ost-base, escapechar=`} +% \end{macrocode} +% +% ^^A\begin{thebibliography}{1} +% ^^A\bibitem[hbadertscher-ostcolors] OST Colorscheme. +% ^^A\url{https://github.com/HBadertscher/OSTReport/blob/master/header/OSTColors.sty} +% ^^A\end{thebibliography} +% \Finale +\endinput +% vim:ts=4 sw=4 et spell spelllang=en ft=tex: diff --git a/macros/latex/contrib/oststud/oststud.ins b/macros/latex/contrib/oststud/oststud.ins new file mode 100644 index 0000000000..de74922e32 --- /dev/null +++ b/macros/latex/contrib/oststud/oststud.ins @@ -0,0 +1,54 @@ +\input docstrip.tex +\preamble +This document is part of the HSRStud LaTeX Package + +THE FOLLOWING WORK IS UNDER THE CC BY-SA 4.0 LICENSE + +You are free to +--------------- + * Share -- Copy and redistribute the material in any medium or format + * Adapt -- Remix, transform, and build upon the material for any + purpose, even commercially + +The licensor cannot revoke these freedoms as long as you follow the +license terms. + +Under the following terms +------------------------- + * Attribution + You must give appropriate credit, provide a link to the license, and + indicate if changes were made. You may do so in any reasonable + manner, but not in any way that suggests the licensor endorses you + or your use. + + * ShareAlike + If you remix, transform, or build upon the material you must + distribute your contributions under the same license as the + original. + + * No additional restrictions + You may not apply legal terms or technological measures that + legally restrict others from doing anything the license permits. + +Notice +------ +You do not have to comply with the license for elements of the material +in the public domain or where your use is permitted by an applicable +exception or limitation. + +No warranties are given. The license may not give you all of the +permissions necessary for your intended use. For example, other rights +such as publicity, privacy, or moral rights may limit how you use the +material. +\endpreamble + +\keepsilent +\askforoverwritefalse +\usedir{tex/latex/oststud} + +\generate{ + \file{oststud.sty}{\from{oststud.dtx}{package}} +} +\endbatchfile + +\endinput diff --git a/macros/latex/contrib/oststud/oststud.pdf b/macros/latex/contrib/oststud/oststud.pdf Binary files differnew file mode 100644 index 0000000000..74abd99be0 --- /dev/null +++ b/macros/latex/contrib/oststud/oststud.pdf diff --git a/macros/latex/contrib/photobook/photobook.cls b/macros/latex/contrib/photobook/photobook.cls index 8dfe501db3..14016662b4 100644 --- a/macros/latex/contrib/photobook/photobook.cls +++ b/macros/latex/contrib/photobook/photobook.cls @@ -79,7 +79,7 @@ %%% NOTE: \def\<module-name>@[A-Z]+ macros will be visible to both the %%% code and the generated docs... -\edef\photobook@FILEVERSION{v0.1.18} +\edef\photobook@FILEVERSION{v0.1.19} \edef\photobook@FILEDATE{2023-04-11} @@ -1537,8 +1537,8 @@ \end{adjustbox}} -%M \DescribeEnv{CellContent} -%M \DescribeEnv{CellContent*} +%M \DescribeEnv{MinipageCellContent} +%M \DescribeEnv{MinipageCellContent*} % %M \EXPERIMENTAL %M @@ -1817,6 +1817,9 @@ % %% \EXPERIMENTAL %% +%% This a cell wrapper for |adjustbox|. +%% +% XXX DOC \newenvironment{adjustcell*}[4][t]{% \begin{adjustbox}{#2}% \vspace{0pt}% @@ -1963,13 +1966,78 @@ % %% Clip content to parent cell. %% -\newenvironment{cliptocell}{% - \begin{clipbox*}{0cm {\height - \cellheight} {\cellwidth} {\height}}% - \begin{minipage}[t][\cellheight][t]{\cellwidth}% - \ignorespaces% -}{% - \end{minipage}% - \end{clipbox*}} +%% >> \begin{cliptocell} ... \end{cliptocell} +%% +%% Clip content to cell adding bleeds +%% +%% >> \begin{cliptocell}[<size>] ... \end{cliptocell} +%% >> \begin{cliptocell}[<horizontal> <vertical>] ... \end{cliptocell} +%% >> \begin{cliptocell}[<left> <bottom> <right> <top>] ... \end{cliptocell} +%% +%% Clipping to bleeds will not affect the cell content positioning. +%% +\newlength\photobook@cliptocell@left +\setlength\photobook@cliptocell@left{0mm}% +\newlength\photobook@cliptocell@top +\setlength\photobook@cliptocell@top{0mm}% +\newlength\photobook@cliptocell@right +\setlength\photobook@cliptocell@right{0mm}% +\newlength\photobook@cliptocell@bottom +\setlength\photobook@cliptocell@bottom{0mm}% + +\newenvironment{cliptocell}[1][0mm]{% + \begingroup% + \setsepchar{ }% + \readlist*\photobook@cliptocell@bleeds{#1}% + % + % bleed + \ifnum \photobook@cliptocell@bleedslen = 1% + \setlength\photobook@cliptocell@left{% + \photobook@cliptocell@bleeds[1]}% + \setlength\photobook@cliptocell@bottom{% + \photobook@cliptocell@bleeds[1]}% + \setlength\photobook@cliptocell@right{% + \photobook@cliptocell@bleeds[1]}% + \setlength\photobook@cliptocell@top{% + \photobook@cliptocell@bleeds[1]}\fi% + % horizontal vertical + \ifnum \photobook@cliptocell@bleedslen = 2% + \setlength\photobook@cliptocell@left{% + \photobook@cliptocell@bleeds[1]}% + \setlength\photobook@cliptocell@bottom{% + \photobook@cliptocell@bleeds[2]}% + \setlength\photobook@cliptocell@right{% + \photobook@cliptocell@bleeds[1]}% + \setlength\photobook@cliptocell@top{% + \photobook@cliptocell@bleeds[2]}\fi% + % left top right bottom + \ifnum \photobook@cliptocell@bleedslen = 4% + \setlength\photobook@cliptocell@left{% + \photobook@cliptocell@bleeds[1]}% + \setlength\photobook@cliptocell@bottom{% + \photobook@cliptocell@bleeds[2]}% + \setlength\photobook@cliptocell@right{% + \photobook@cliptocell@bleeds[3]}% + \setlength\photobook@cliptocell@top{% + \photobook@cliptocell@bleeds[4]}\fi% + % + % XXX the spaces at the end of each line here are significant... + \begin{trimbox}{{\photobook@cliptocell@left} % + {\photobook@cliptocell@bottom} % + {\photobook@cliptocell@right} % + {\photobook@cliptocell@top}}% + \begin{clipbox*}{{-\photobook@cliptocell@left} % + {\height - \cellheight - \photobook@cliptocell@bottom} % + {\cellwidth + \photobook@cliptocell@right} % + {\height + \photobook@cliptocell@top}}% + \begin{minipage}[t][\cellheight][t]{\cellwidth}% + \ignorespaces% + }{% + \end{minipage}% + \end{clipbox*}% + \end{trimbox}% + \endgroup} + @@ -2949,10 +3017,6 @@ %% but will not affect this either in size (block size) or in position %% (top-left). %% -%\newenvironment{pagecell}{% -% \begin{cell*}{\bleed,\bleed}{\pageblockwidth}{\pageblockheight}% -%}{% -% \end{cell*}} \newenvironment{pagecell}{% \begin{cell*}{% \bleed + \ifnumodd{\thepage}{\bindingoffset}{0pt},% diff --git a/macros/latex/contrib/photobook/photobook.pdf b/macros/latex/contrib/photobook/photobook.pdf Binary files differindex a6f4a5d2d1..2dd314039c 100644 --- a/macros/latex/contrib/photobook/photobook.pdf +++ b/macros/latex/contrib/photobook/photobook.pdf diff --git a/macros/latex/contrib/photobook/scripts/cls2tex.sh b/macros/latex/contrib/photobook/scripts/cls2tex.sh index 9119cd6e82..5461207f05 100755 --- a/macros/latex/contrib/photobook/scripts/cls2tex.sh +++ b/macros/latex/contrib/photobook/scripts/cls2tex.sh @@ -54,13 +54,6 @@ printhelp(){ echo " in both the repo and in installed form, so .dtx is not used." } -# Usage: printerror MESSAGE... -printerror(){ - echo Error: $@ - echo - printusage -} - # Usage: printmsg TEXT printmsg(){ # print message... @@ -88,21 +81,23 @@ while true ; do ;; -p|--prefix) PREFIX=$2 - shift - shift + shift 2 + continue ;; -s|--strip) STRIP_DOC=1 shift + continue ;; -n|--no-msg) NO_MSG=1 shift + continue ;; # handle unknown options... -*|--*) - printerror "unknown option \"$1\"" + echo "Error: unknown option: \"$1\"" >&2 exit ;; diff --git a/macros/latex/contrib/photobook/scripts/make-spreads.sh b/macros/latex/contrib/photobook/scripts/make-spreads.sh index 1b10fc56cc..6505e1091f 100644 --- a/macros/latex/contrib/photobook/scripts/make-spreads.sh +++ b/macros/latex/contrib/photobook/scripts/make-spreads.sh @@ -177,38 +177,45 @@ while true ; do -a|--annotate) ANOTATE_IMAGE_PATHS=1 shift + continue ;; -c) $CONFIG="$2" [ -e "$CONFIG" ] \ && source "$CONFIG" shift 2 + continue ;; --templates) TEMPLATE_DIR=$2 shift 2 + continue ;; --single-image-tpl) IMAGE_SPREAD[1]=$2 shift 2 + continue ;; --double-image-tpl) IMAGE_SPREAD[2]=$2 shift 2 + continue ;; --text-spread-tpl) IMAGE_SPREAD[0]=$2 shift 2 + continue ;; --captions) CAPTION_DIR=$2 shift 2 + continue ;; # handle unknown options... -*|--*) - echo "Error: unknown option \"$1\"" + echo "Error: unknown option \"$1\"" >&2 exit ;; |