diff options
Diffstat (limited to 'macros/latex')
96 files changed, 4122 insertions, 450 deletions
diff --git a/macros/latex/contrib/l3kernel/CHANGELOG.md b/macros/latex/contrib/l3kernel/CHANGELOG.md index d418810401..2ad6244fbd 100644 --- a/macros/latex/contrib/l3kernel/CHANGELOG.md +++ b/macros/latex/contrib/l3kernel/CHANGELOG.md @@ -7,6 +7,24 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2023-06-05] + +### Added +- `\cctab_gsave_current:N`, `\g_tmpa_cctab` and `\g_tmpb_cctab` (issue \#1089) +- `\prg_gset_eq_conditional:NNn` (issue \#1212) +- `\iow_shell_open:Nn` (issue \#1122) + +## Deprecated +- `\tl_case:Nn(TF)` +- `expl3` package option `enable-debug` (no longer required) + +### Fixed +- Set `\l_keys_value_tl` in `.initial:n` (issue \#1013) +- Support for boolean values in `expl3` package options + `check-declarations` and `log-functions` (issue \#978) +- Allow for optional `/` at end of `\input@path` entries + (see latex3/latex2e\#1076) + ## [2023-05-22] ### Added @@ -15,6 +33,7 @@ this project uses date-based 'snapshot' version identifiers. - `\coffin_(g)reset_poles:N` - `\dim_to_decimal_in_<unit>:n`, for `<unit>` types `cc`, `cm`, `dd`, `in`, `mm` and `pc` +- `\file_input_raw:n` - `\int_if_zero:n(TF)` - `\str_mdfive_hash:n` @@ -1432,7 +1451,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-05-22...HEAD +[Unreleased]: https://github.com/latex3/latex3/compare/2023-06-05...HEAD +[2023-06-05]: https://github.com/latex3/latex3/compare/2023-05-22...2023-06-05 [2023-05-22]: https://github.com/latex3/latex3/compare/2023-05-15...2023-05-22 [2023-05-15]: https://github.com/latex3/latex3/compare/2023-05-11...2023-05-15 [2023-05-11]: https://github.com/latex3/latex3/compare/2023-05-05...2023-05-11 diff --git a/macros/latex/contrib/l3kernel/README.md b/macros/latex/contrib/l3kernel/README.md index dd571168c5..e340b712e0 100644 --- a/macros/latex/contrib/l3kernel/README.md +++ b/macros/latex/contrib/l3kernel/README.md @@ -1,7 +1,7 @@ LaTeX3 Programming Conventions ============================== -Release 2023-05-22 +Release 2023-06-05 Overview -------- diff --git a/macros/latex/contrib/l3kernel/expl3.dtx b/macros/latex/contrib/l3kernel/expl3.dtx index 622593cf8f..9066920e35 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-05-22}% +\def\ExplFileDate{2023-06-05}% %<*driver> \documentclass[full]{l3doc} \usepackage{graphicx} @@ -51,7 +51,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % @@ -643,15 +643,15 @@ % as the argument, be it an integer, a length-type register, a token % list variable or similar. The value is passed to the function as a % braced token list. Can be applied to variables which have a -% \cs{\meta{var}_use:N} function (other than floating points and -% boxes), and which therefore deliver a single \enquote{value}. +% \cs{\meta{var}_use:N} function (other than boxes), +% and which therefore deliver a single \enquote{value}. % \item[v] Value of a register, constructed from a character string % used as a command name.\\ % This is a combination of |c| and |V| which first constructs a % control sequence from the argument and then passes the value of % the resulting register to the function. Can be applied to % variables which have a \cs{\meta{var}_use:N} function (other than -% floating points and boxes), and which therefore deliver a single +% boxes), and which therefore deliver a single % \enquote{value}. % \item[x] Fully-expanded token or braced token list.\\ % This means that the argument is expanded as in the replacement @@ -914,14 +914,6 @@ % required by the bootstrap code). See also \cs{debug_on:n} % \texttt{\{log-functions\}} in \pkg{l3candidates} for finer control. % -% \DescribeOption{enable-debug} -% To allow more localized checking and logging than provided by -% \texttt{check-declarations} and \texttt{log-functions}, \pkg{expl3} -% provides a few \cs[no-index]{debug_\ldots{}} functions (described -% elsewhere) that turn on the corresponding checks within a group. -% These functions can only be used if \pkg{expl3} is loaded with the -% \texttt{enable-debug} option. -% % \DescribeOption{backend} % Selects the backend to be used for color, graphics and related operations that % are backend-dependent. Options available are @@ -1392,19 +1384,28 @@ backend .choices:nn = { dvipdfmx , dvips , dvisvgm , luatex , pdftex , pdfmode , xdvipdfmx , xetex } { \sys_load_backend:n {#1} } , - check-declarations .code:n = + check-declarations .choice: , + check-declarations / true .code:n = + { \debug_on:n { check-declarations } } , + check-declarations / false .code:n = { - \sys_load_debug: - \debug_on:n { check-declarations } + \__kernel_if_debug:TF + { \debug_off:n { check-declarations } } + { } } , + check-declarations .default:n = true , driver .meta:n = { backend = #1 } , - enable-debug .code:n = - \sys_load_debug: , - log-functions .code:n = + enable-debug .code:n = {} , % A stub + log-functions .choice: , + log-functions / true .code:n = + { \debug_on:n { log-functions } } , + log-functions / false .code:n = { - \sys_load_debug: - \debug_on:n { log-functions } + \__kernel_if_debug:TF + { \debug_off:n { log-functions } } + { } } , + log-functions .default:n = true , suppress-backend-headers .bool_gset_inverse:N = \g__kernel_backend_header_bool , suppress-backend-headers .initial:n = false , diff --git a/macros/latex/contrib/l3kernel/expl3.pdf b/macros/latex/contrib/l3kernel/expl3.pdf Binary files differindex 9d6d1226ec..abe1806c37 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 e5733b848b..4c97703ece 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 f20b8d2d99..48deef820b 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-05-22} +\date{Released 2023-06-05} \pagenumbering{roman} \maketitle diff --git a/macros/latex/contrib/l3kernel/l3basics.dtx b/macros/latex/contrib/l3kernel/l3basics.dtx index 291e93bf7b..da72c5cba9 100644 --- a/macros/latex/contrib/l3kernel/l3basics.dtx +++ b/macros/latex/contrib/l3kernel/l3basics.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % @@ -601,6 +601,7 @@ % \begin{function}[updated = 2012-01-14] % { % \cs_generate_from_arg_count:NNnn, +% \cs_generate_from_arg_count:NNno, % \cs_generate_from_arg_count:cNnn, % \cs_generate_from_arg_count:Ncnn % } @@ -870,7 +871,7 @@ % \end{texnote} % \end{function} % -% \begin{function}[EXP, added = 2019-02-27]{\cs_replacement_spec:N} +% \begin{function}[EXP, added = 2019-02-27]{\cs_replacement_spec:N, \cs_replacement_spec:c} % \begin{syntax} % \cs{cs_replacement_spec:N} \meta{token} % \end{syntax} @@ -1148,11 +1149,6 @@ % conditionals described above. % \end{description} % -% \begin{variable}{\c_true_bool, \c_false_bool} -% Constants that represent |true| and |false|, respectively. Used to -% implement predicates. -% \end{variable} -% % \subsection{Tests on control sequences} % % \begin{function}[EXP,pTF]{\cs_if_eq:NN} @@ -1291,7 +1287,7 @@ % % \section{Debugging support} % -% \begin{function}[added = 2017-07-16, updated = 2017-08-02]{\debug_on:n, \debug_off:n} +% \begin{function}[added = 2017-07-16, updated = 2023-05-23]{\debug_on:n, \debug_off:n} % \begin{syntax} % \cs{debug_on:n} |{| \meta{comma-separated list} |}| % \cs{debug_off:n} |{| \meta{comma-separated list} |}| @@ -1313,8 +1309,7 @@ % Providing these as switches rather than options allows testing code % even if it relies on other packages: load all other packages, call % \cs{debug_on:n}, and load the code that one is interested in -% testing. These functions can only be used in \LaTeXe{} package mode -% loaded with \texttt{enable-debug} or another option implying it. +% testing. % \end{function} % % \begin{function}[added = 2017-11-28]{\debug_suspend:, \debug_resume:} @@ -1803,13 +1798,13 @@ % \begin{macrocode} \cs_set_protected:Npn \debug_on:n #1 { - \msg_error:nnx { debug } { enable-debug } - { \tl_to_str:n { \debug_on:n {#1} } } + \sys_load_debug: + \debug_on:n {#1} } \cs_set_protected:Npn \debug_off:n #1 { - \msg_error:nnx { debug } { enable-debug } - { \tl_to_str:n { \debug_off:n {#1} } } + \sys_load_debug: + \debug_off:n {#1} } % \end{macrocode} % \end{macro} @@ -2161,7 +2156,12 @@ % \end{macro} % \end{macro} % -% \begin{macro}{\prg_set_eq_conditional:NNn, \prg_new_eq_conditional:NNn} +% \begin{macro} +% { +% \prg_set_eq_conditional:NNn , +% \prg_gset_eq_conditional:NNn, +% \prg_new_eq_conditional:NNn +% } % \begin{macro}{\@@_set_eq_conditional:NNNn} % The setting-equal functions. Split both functions and feed % \Arg{name_1} \Arg{signature_1} \meta{boolean_1} @@ -2172,6 +2172,8 @@ % \begin{macrocode} \cs_set_protected:Npn \prg_set_eq_conditional:NNn { \@@_set_eq_conditional:NNNn \cs_set_eq:cc } +\cs_set_protected:Npn \prg_gset_eq_conditional:NNn + { \@@_set_eq_conditional:NNNn \cs_gset_eq:cc } \cs_set_protected:Npn \prg_new_eq_conditional:NNn { \@@_set_eq_conditional:NNNn \cs_new_eq:cc } \cs_set_protected:Npn \@@_set_eq_conditional:NNNn #1#2#3#4 @@ -3343,8 +3345,8 @@ % The approach here is different to that used by \LaTeXe{} or plain \TeX{}, % which unbox a void box to force horizontal mode. That inserts the % \tn{everypar} tokens \emph{before} the re-inserted unboxing tokens. The -% approach here uses either the \tn{quitvmode} primitive or the equivalent -% protected macro. In vertical mode, the \tn{indent} primitive is inserted: +% approach here uses a protected macro, equivalent to the \tn{quitvmode} +% primitive. In vertical mode, the \tn{indent} primitive is inserted: % this will switch to horizontal mode and insert \tn{everypar} tokens and % nothing else. Unlike the \LaTeXe{} version, the availability of \eTeX{} % means using a mode test can be done at for example the start of an diff --git a/macros/latex/contrib/l3kernel/l3bootstrap.dtx b/macros/latex/contrib/l3kernel/l3bootstrap.dtx index 8f69c22be3..152ace24f6 100644 --- a/macros/latex/contrib/l3kernel/l3bootstrap.dtx +++ b/macros/latex/contrib/l3kernel/l3bootstrap.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3box.dtx b/macros/latex/contrib/l3kernel/l3box.dtx index 3dc1a966de..093a1b23cd 100644 --- a/macros/latex/contrib/l3kernel/l3box.dtx +++ b/macros/latex/contrib/l3kernel/l3box.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3candidates.dtx b/macros/latex/contrib/l3kernel/l3candidates.dtx index 03639af043..fb60287e47 100644 --- a/macros/latex/contrib/l3kernel/l3candidates.dtx +++ b/macros/latex/contrib/l3kernel/l3candidates.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3cctab.dtx b/macros/latex/contrib/l3kernel/l3cctab.dtx index 2cbe46be18..f4e8088e3d 100644 --- a/macros/latex/contrib/l3kernel/l3cctab.dtx +++ b/macros/latex/contrib/l3kernel/l3cctab.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % @@ -52,7 +52,9 @@ % A category code table enables rapid switching of all category codes in % one operation. For \LuaTeX{}, this is possible over the entire Unicode % range. For other engines, only the $8$-bit range ($0$--$255$) is covered by -% such tables. +% such tables. The implementation of category code tables in \pkg{expl3} +% also saves and restores the \TeX{} \tn{endlinechar} primitive value, meaning +% they could be used for example to implement \cs{ExplSyntaxOn}. % % \section{Creating and initialising category code tables} % @@ -87,6 +89,15 @@ % can include a call to \cs{cctab_select:N}. % \end{function} % +% \begin{function}[added = 2023-05-26] +% {\cctab_gsave_current:N,\cctab_gsave_current:c} +% \begin{syntax} +% \cs{cctab_gsave_current:N} \meta{category code table} +% \end{syntax} +% Saves the current prevailing category codes in the +% \meta{category code table}. +% \end{function} +% % \section{Using category code tables} % % \begin{function}[updated = 2020-07-02]{\cctab_begin:N,\cctab_begin:c} @@ -141,19 +152,20 @@ % category code table. % \end{function} % -% \section{Constant category code tables} +% \section{Constant and scratch category code tables} % % \begin{variable}[updated = 2020-07-10]{\c_code_cctab} % Category code table for the \pkg{expl3} code environment; this does % \emph{not} include \texttt{@}, which is retained as an \enquote{other} -% character. +% character. Sets the \tn{endlinechar} value to $32$ (a space). % \end{variable} % % \begin{variable}[updated = 2020-07-08]{\c_document_cctab} % Category code table for a standard \LaTeX{} document, as set by the \LaTeX{} % kernel. In particular, the upper-half of the $8$-bit range will be set to % \enquote{active} with \pdfTeX{} \emph{only}. No \pkg{babel} shorthands -% will be activated. +% will be activated. Sets the \tn{endlinechar} value to $13$ (normal +% line ending). % \end{variable} % % \begin{variable}[updated = 2020-07-02]{\c_initex_cctab} @@ -162,13 +174,17 @@ % % \begin{variable}[updated = 2020-07-02]{\c_other_cctab} % Category code table where all characters have category code $12$ -% (other). +% (other). Sets the \tn{endlinechar} value to $-1$. % \end{variable} % % \begin{variable}[updated = 2020-07-02]{\c_str_cctab} % Category code table where all characters have category code $12$ % (other) with the exception of spaces, which have category code -% $10$ (space). +% $10$ (space). Sets the \tn{endlinechar} value to $-1$. +% \end{variable} +% +% \begin{variable}[added = 2023-05-26]{\g_tmpa_cctab, \g_tmpb_cctab} +% Scratch category code tables. % \end{variable} % % \end{documentation} @@ -363,6 +379,18 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\cctab_gsave_current:N, \cctab_gsave_current:c} +% Very simple. +% \begin{macrocode} +\cs_new_protected:Npn \cctab_gsave_current:N #1 + { + \@@_chk_if_valid:NT #1 + { \@@_gset:n {#1} } + } +\cs_generate_variant:Nn \cctab_gsave_current:N { c } +% \end{macrocode} +% \end{macro} +% % \subsection{Using category code tables} % % \begin{variable}{\g_@@_internal_cctab} @@ -864,6 +892,13 @@ % \end{macrocode} % \end{variable} % +% \begin{variable}{\g_tmpa_cctab, \g_tmpb_cctab} +% \begin{macrocode} +\cctab_new:N \g_tmpa_cctab +\cctab_new:N \g_tmpb_cctab +% \end{macrocode} +% \end{variable} +% % \subsection{Messages} % % \begin{macrocode} diff --git a/macros/latex/contrib/l3kernel/l3clist.dtx b/macros/latex/contrib/l3kernel/l3clist.dtx index f25ff97911..4d712152b5 100644 --- a/macros/latex/contrib/l3kernel/l3clist.dtx +++ b/macros/latex/contrib/l3kernel/l3clist.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % @@ -241,12 +241,16 @@ % \begin{function}[updated = 2011-09-05] % { % \clist_put_left:Nn, \clist_put_left:NV, +% \clist_put_left:Nv, % \clist_put_left:No, \clist_put_left:Nx, % \clist_put_left:cn, \clist_put_left:cV, +% \clist_put_left:cv, % \clist_put_left:co, \clist_put_left:cx, % \clist_gput_left:Nn, \clist_gput_left:NV, +% \clist_gput_left:Nv, % \clist_gput_left:No, \clist_gput_left:Nx, % \clist_gput_left:cn, \clist_gput_left:cV, +% \clist_gput_left:cv, % \clist_gput_left:co, \clist_gput_left:cx % } % \begin{syntax} @@ -264,12 +268,16 @@ % \begin{function}[updated = 2011-09-05] % { % \clist_put_right:Nn, \clist_put_right:NV, +% \clist_put_right:Nv, % \clist_put_right:No, \clist_put_right:Nx, % \clist_put_right:cn, \clist_put_right:cV, +% \clist_put_right:cv, % \clist_put_right:co, \clist_put_right:cx, % \clist_gput_right:Nn, \clist_gput_right:NV, +% \clist_gput_right:Nv, % \clist_gput_right:No, \clist_gput_right:Nx, % \clist_gput_right:cn, \clist_gput_right:cV, +% \clist_gput_right:cv, % \clist_gput_right:co, \clist_gput_right:cx % } % \begin{syntax} @@ -1158,16 +1166,20 @@ % \begin{macro} % { % \clist_put_left:Nn, \clist_put_left:NV, +% \clist_put_left:Nv, % \clist_put_left:No, \clist_put_left:Nx, % \clist_put_left:cn, \clist_put_left:cV, +% \clist_put_left:cv, % \clist_put_left:co, \clist_put_left:cx % } % \UnitTested % \begin{macro} % { % \clist_gput_left:Nn, \clist_gput_left:NV, +% \clist_gput_left:Nv, % \clist_gput_left:No, \clist_gput_left:Nx, % \clist_gput_left:cn, \clist_gput_left:cV, +% \clist_gput_left:cv, % \clist_gput_left:co, \clist_gput_left:cx % } % \UnitTested @@ -1185,10 +1197,10 @@ #2 \l_@@_internal_clist {#4} #1 #3 \l_@@_internal_clist #3 } -\cs_generate_variant:Nn \clist_put_left:Nn { NV , No , Nx } -\cs_generate_variant:Nn \clist_put_left:Nn { c , cV , co , cx } -\cs_generate_variant:Nn \clist_gput_left:Nn { NV , No , Nx } -\cs_generate_variant:Nn \clist_gput_left:Nn { c , cV , co , cx } +\cs_generate_variant:Nn \clist_put_left:Nn { NV , Nv , No , Nx } +\cs_generate_variant:Nn \clist_put_left:Nn { c , cV , cv , co , cx } +\cs_generate_variant:Nn \clist_gput_left:Nn { NV , Nv , No , Nx } +\cs_generate_variant:Nn \clist_gput_left:Nn { c , cV , cv , co , cx } % \end{macrocode} % \end{macro} % \end{macro} @@ -1197,16 +1209,20 @@ % \begin{macro} % { % \clist_put_right:Nn, \clist_put_right:NV, +% \clist_put_right:Nv, % \clist_put_right:No, \clist_put_right:Nx, % \clist_put_right:cn, \clist_put_right:cV, +% \clist_put_right:cv, % \clist_put_right:co, \clist_put_right:cx % } % \UnitTested % \begin{macro} % { % \clist_gput_right:Nn, \clist_gput_right:NV, +% \clist_gput_right:Nv, % \clist_gput_right:No, \clist_gput_right:Nx, % \clist_gput_right:cn, \clist_gput_right:cV, +% \clist_gput_right:cv, % \clist_gput_right:co, \clist_gput_right:cx % } % \UnitTested @@ -1221,10 +1237,10 @@ #2 \l_@@_internal_clist {#4} #1 #3 #3 \l_@@_internal_clist } -\cs_generate_variant:Nn \clist_put_right:Nn { NV , No , Nx } -\cs_generate_variant:Nn \clist_put_right:Nn { c , cV , co , cx } -\cs_generate_variant:Nn \clist_gput_right:Nn { NV , No , Nx } -\cs_generate_variant:Nn \clist_gput_right:Nn { c , cV , co , cx } +\cs_generate_variant:Nn \clist_put_right:Nn { NV , Nv , No , Nx } +\cs_generate_variant:Nn \clist_put_right:Nn { c , cV , cv , co , cx } +\cs_generate_variant:Nn \clist_gput_right:Nn { NV , Nv , No , Nx } +\cs_generate_variant:Nn \clist_gput_right:Nn { c , cV , cv , co , cx } % \end{macrocode} % \end{macro} % \end{macro} diff --git a/macros/latex/contrib/l3kernel/l3coffins.dtx b/macros/latex/contrib/l3kernel/l3coffins.dtx index f44299c55d..39fdb7700e 100644 --- a/macros/latex/contrib/l3kernel/l3coffins.dtx +++ b/macros/latex/contrib/l3kernel/l3coffins.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3color.dtx b/macros/latex/contrib/l3kernel/l3color.dtx index c03bd0c4bb..fd20fd7903 100644 --- a/macros/latex/contrib/l3kernel/l3color.dtx +++ b/macros/latex/contrib/l3kernel/l3color.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3debug.dtx b/macros/latex/contrib/l3kernel/l3debug.dtx index b6d6099031..fe3e669c56 100644 --- a/macros/latex/contrib/l3kernel/l3debug.dtx +++ b/macros/latex/contrib/l3kernel/l3debug.dtx @@ -43,12 +43,18 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % % \begin{documentation} % +% \end{documentation} +% +% \begin{implementation} +% +% \section{\pkg{l3debug} implementation} +% % \begin{function}{\__kernel_chk_var_local:N, \__kernel_chk_var_global:N} % \begin{syntax} % \cs{__kernel_chk_var_local:N} \meta{var} @@ -112,12 +118,6 @@ % This function is only created if debugging is enabled. % \end{function} % -% \end{documentation} -% -% \begin{implementation} -% -% \section{\pkg{l3debug} implementation} -% % \begin{macrocode} %<*package> % \end{macrocode} @@ -602,7 +602,8 @@ \cs_new:Npn \@@_arg_return:N #1 { \exp_after:wN #1 \exp:w \exp_end_continue_f:w } % \end{macrocode} -% \end{variable} +% \end{macro} +% \end{macro} % % \begin{macro}{ % \__kernel_patch:nnn, @@ -1471,7 +1472,7 @@ \\ LaTeX~will~create~the~variable~and~continue. } -% \end{macrocode} +% \end{macrocode} % % \begin{macro}{\__kernel_if_debug:TF} % Flip the switch for deprecated code. diff --git a/macros/latex/contrib/l3kernel/l3deprecation.dtx b/macros/latex/contrib/l3kernel/l3deprecation.dtx index 05264251e4..806c62670e 100644 --- a/macros/latex/contrib/l3kernel/l3deprecation.dtx +++ b/macros/latex/contrib/l3kernel/l3deprecation.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % @@ -583,6 +583,22 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}[noTF]{\tl_case:Nn, \tl_case:cn} +% \begin{macrocode} +\__kernel_patch_deprecation:nnNNpn { 2022-05-23 } { \token_case_meaning:Nn } +\cs_gset:Npn \tl_case:Nn { \token_case_meaning:Nn } +\__kernel_patch_deprecation:nnNNpn { 2022-05-23 } { \token_case_meaning:NnT } +\cs_gset:Npn \tl_case:NnT { \token_case_meaning:NnT } +\__kernel_patch_deprecation:nnNNpn { 2022-05-23 } { \token_case_meaning:NnF } +\cs_gset:Npn \tl_case:NnF { \token_case_meaning:NnF } +\__kernel_patch_deprecation:nnNNpn { 2022-05-23 } { \token_case_meaning:NnTF } +\cs_gset:Npn \tl_case:NnTF { \token_case_meaning:NnTF } +\cs_generate_variant:Nn \tl_case:Nn { c } +\prg_generate_conditional_variant:Nnn \tl_case:Nn + { c } { T , F , TF } +% \end{macrocode} +% \end{macro} +% % \subsection{Deprecated \pkg{l3token} functions} % % \begin{macro}[EXP]{\char_to_utfviii_bytes:n} diff --git a/macros/latex/contrib/l3kernel/l3doc.dtx b/macros/latex/contrib/l3kernel/l3doc.dtx index 1c789c1210..58778973a4 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-05-22} +% \date{Released 2023-06-05} % \maketitle % \tableofcontents % @@ -3374,7 +3374,7 @@ and all files in that bundle must be distributed together. \seq_set_map:NNn \l_@@_tmpa_seq \g_@@_nested_names_seq { \@@_macro_end_wrap_item:n {##1} } - End~ definition~ for~ + End~ of~ definition~ for~ \int_compare:nTF { \seq_count:N \l_@@_tmpa_seq <= 3 } { \seq_use:Nnnn \l_@@_tmpa_seq diff --git a/macros/latex/contrib/l3kernel/l3doc.pdf b/macros/latex/contrib/l3kernel/l3doc.pdf Binary files differindex c87a456156..4de407b4bf 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 715bceeb30..3d4536d5a4 100644 --- a/macros/latex/contrib/l3kernel/l3docstrip.dtx +++ b/macros/latex/contrib/l3kernel/l3docstrip.dtx @@ -63,7 +63,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3docstrip.pdf b/macros/latex/contrib/l3kernel/l3docstrip.pdf Binary files differindex 63e4c7157b..cd86234a1b 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 9288a5271c..8e52b52659 100644 --- a/macros/latex/contrib/l3kernel/l3expan.dtx +++ b/macros/latex/contrib/l3kernel/l3expan.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % @@ -134,7 +134,8 @@ % comma-separated list of \meta{variant argument specifiers} is % then used to define variants of the % \meta{original argument specifier} if these are not already -% defined. For each \meta{variant} given, a function is created +% defined; entries which correspond to existing functions are silently +% ingored. For each \meta{variant} given, a function is created % that expands its arguments as detailed and passes them % to the \meta{parent control sequence}. So for example % \begin{verbatim} @@ -150,7 +151,7 @@ % generates the functions |\foo:NV| and |\foo:cV| in the same % way. The \cs{cs_generate_variant:Nn} function should only be applied if % the \meta{parent control sequence} is already defined. (This is only -% enforced if debugging support is enabled.) +% enforced if debugging support \texttt{check-declarations} is enabled.) % If the \meta{parent % control sequence} is protected or if the \meta{variant} involves any % |x|~argument, then the \meta{variant control sequence} is also @@ -158,7 +159,9 @@ % \cs[no-index]{exp_args:N\meta{variant}} function needed to carry out the % expansion. There is no need to re-apply \cs{cs_generate_variant:Nn} after % changing the definition of the parent function: the variant will always -% use the current definition of the parent. +% use the current definition of the parent. Providing variants repeatedly is +% safe as \cs{cs_generate_variant:Nn} will only create new definitions if +% there is not already one available. % % Only |n|~and |N| arguments can be changed to other types. The only % allowed changes are @@ -1729,7 +1732,7 @@ % % The other case where variants should be protected is when the parent % function is a protected macro: then |protected| appears in the -% meaning before the fist occurrence of |macro|. The |ww| auxiliary +% meaning before the first occurrence of |macro|. The |ww| auxiliary % removes everything in the meaning string after the first |ma|. We % use |ma| rather than the full |macro| because the meaning of the % \tn{firstmark} primitive (and four others) can contain an arbitrary @@ -2387,6 +2390,18 @@ % \end{macro} % \end{macro} % +% \subsection{Held-over variant generation} +% +% \begin{macro}{\cs_generate_from_arg_count:NNno} +% \begin{macro}{\cs_replacement_spec:c} +% A couple of variants that are from early functions. +% \begin{macrocode} +\cs_generate_variant:Nn \cs_generate_from_arg_count:NNnn { NNno } +\cs_generate_variant:Nn \cs_replacement_spec:N { c } +% \end{macrocode} +% \end{macro} +% \end{macro} +% % \begin{macrocode} %</package> % \end{macrocode} diff --git a/macros/latex/contrib/l3kernel/l3file.dtx b/macros/latex/contrib/l3kernel/l3file.dtx index c4e5f0b1ce..5e2d8ba74d 100644 --- a/macros/latex/contrib/l3kernel/l3file.dtx +++ b/macros/latex/contrib/l3kernel/l3file.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % @@ -157,6 +157,23 @@ % \cs{sys_get_shell:nnNTF}. % \end{function} % +% \begin{function}[added = 2023-05-25]{\iow_shell_open:Nn} +% \begin{syntax} +% \cs{iow_shell_open:Nn} \meta{stream} \Arg{shell~command} +% \end{syntax} +% Opens the \emph{pseudo}-file created by the output of the +% \meta{shell command} for writing using \meta{stream} as the +% control sequence for access. If the \meta{stream} was already +% open it is closed before the new operation begins. The +% \meta{stream} is available for access immediately and will remain +% allocated to \meta{shell command} until a \cs{iow_close:N} instruction +% is given or the \TeX{} run ends. +% If piped system calls are disabled an error is raised. +% +% For details of handling of the \meta{shell command}, see +% \cs{sys_get_shell:nnNTF}. +% \end{function} +% % \begin{function}[updated = 2012-07-31] % {\ior_close:N, \ior_close:c, \iow_close:N, \iow_close:c} % \begin{syntax} @@ -917,6 +934,21 @@ % function. An error is raised if the file is not found. % \end{function} % +% \begin{function}[added = 2023-05-18, EXP]{\file_input_raw:n} +% \begin{syntax} +% \cs{file_input_raw:n} \Arg{file name} +% \end{syntax} +% Searches for \meta{file name} in the path as detailed for +% \cs{file_if_exist:nTF}, and if found reads in the file as +% additional \TeX{} source. No data concerning the file is +% tracked. If the file is not found, no action is taken. +% \begin{texnote} +% This function is intended only for contexts where files must +% be read purely by expansion, for example at the start of a +% table cell in an \tn{halign}. +% \end{texnote} +% \end{function} +% % \begin{function}[added = 2014-07-02]{\file_if_exist_input:n, \file_if_exist_input:nF} % \begin{syntax} % \cs{file_if_exist_input:n} \Arg{file name} @@ -1169,7 +1201,7 @@ { \sys_if_shell:TF { \exp_args:No \@@_shell_open:nN { \tl_to_str:n {#2} } #1 } - { \msg_error:nn { ior } { pipe-failed } } + { \msg_error:nn { kernel } { pipe-failed } } } \cs_new_protected:Npn \@@_shell_open:nN #1#2 { @@ -1180,7 +1212,7 @@ } { \__kernel_ior_open:Nn #2 { |#1 } } } -\msg_new:nnnn { ior } { pipe-failed } +\msg_new:nnnn { kernel } { pipe-failed } { Cannot~run~piped~system~commands. } { LaTeX~tried~to~call~a~system~process~but~this~was~not~possible.\\ @@ -1634,6 +1666,29 @@ % \end{macro} % \end{macro} % +% \begin{macro}{\iow_shell_open:Nn} +% \begin{macro}{\@@_shell_open:nN} +% Very similar to the \texttt{ior} version +% \begin{macrocode} +\cs_new_protected:Npn \iow_shell_open:Nn #1#2 + { + \sys_if_shell:TF + { \exp_args:No \@@_shell_open:nN { \tl_to_str:n {#2} } #1 } + { \msg_error:nn { kernel } { pipe-failed } } + } +\cs_new_protected:Npn \@@_shell_open:nN #1#2 + { + \tl_if_in:nnTF {#1} { " } + { + \msg_error:nnx + { kernel } { quote-in-shell } {#1} + } + { \__kernel_iow_open:Nn #2 { |#1 } } + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% % \begin{macro}{\iow_close:N, \iow_close:c} % Closing a stream is not quite the reverse of opening one. First, % the close operation is easier than the open one, and second as the @@ -2818,7 +2873,9 @@ % % \begin{macro}[EXP]{\file_full_name:n, \@@_full_name:n, \@@_full_name_aux:n} % \begin{macro}[EXP]{\@@_full_name_auxi:nn, \@@_full_name_auxii:nn} -% \begin{macro}[EXP]{\@@_full_name_aux:Nnnn} +% \begin{macro}[EXP]{\@@_full_name_aux:Nnn} +% \begin{macro}[EXP]{\@@_full_name_slash:n} +% \begin{macro}[EXP]{\@@_full_name_slash:w} % \begin{macro}[EXP]{\@@_full_name_aux:nN} % \begin{macro}[EXP]{\@@_full_name_aux:nnN} % \begin{macro}[EXP]{\@@_name_cleanup:w} @@ -2888,11 +2945,11 @@ \tl_if_blank:nTF {#2} { \seq_map_tokens:Nn \l_file_search_path_seq - { \@@_full_name_aux:Nnnn \seq_map_break:n {#1} { / } } + { \@@_full_name_aux:Nnn \seq_map_break:n {#1} } \cs_if_exist:NT \input@path { \tl_map_tokens:Nn \input@path - { \@@_full_name_aux:Nnnn \tl_map_break:n {#1} { } } + { \@@_full_name_aux:Nnn \tl_map_break:n {#1} } } \@@_name_end: } @@ -2902,8 +2959,25 @@ % Two pars to the auxiliary here so we can avoid doing quoting % twice in the event we find the right file. % \begin{macrocode} -\cs_new:Npn \@@_full_name_aux:Nnnn #1#2#3#4 - { \exp_args:Ne \@@_full_name_aux:nN { \tl_to_str:n {#4} #3 #2 } #1 } +\cs_new:Npn \@@_full_name_aux:Nnn #1#2#3 + { + \exp_args:Ne \@@_full_name_aux:nN + { + \exp_args:Ne \@@_full_name_slash:n + { \tl_to_str:n {#3} } #2 + } + #1 + } +\cs_new:Npn \@@_full_name_slash:n #1 + { + \@@_full_name_slash:nw {#1} #1 \q_nil / \q_nil / \q_nil \q_stop + } +\cs_new:Npn \@@_full_name_slash:nw #1#2 / \q_nil / #3 \q_stop + { + \quark_if_nil:nTF {#3} + { #1 / } + { #2 / } + } \cs_new:Npn \@@_full_name_aux:nN #1 { \exp_args:Nne \@@_full_name_aux:nnN {#1} { \@@_full_name_aux:n {#1} } } \cs_new:Npn \@@_full_name_aux:nnN #1 #2 #3 @@ -2971,6 +3045,8 @@ % \end{macro} % \end{macro} % \end{macro} +% \end{macro} +% \end{macro} % % \begin{macro}{\file_get_full_name:nN, \file_get_full_name:VN} % \begin{macro}[TF]{\file_get_full_name:nN, \file_get_full_name:VN} @@ -3355,6 +3431,30 @@ % \end{macro} % \end{macro} % +% \begin{macro}{\file_input_raw:n, \@@_input_raw:nn} +% No error checking, no tracking. +% \begin{macrocode} +\cs_new:Npn \file_input_raw:n #1 + { \exp_args:Ne \@@_input_raw:nn { \file_full_name:n {#1} } {#1} } +\cs_new:Npx \@@_input_raw:nn #1#2 + { + \exp_not:N \tl_if_blank:nTF {#1} + { + \exp_not:N \exp_args:Nnne \exp_not:N \msg_expandable_error:nnn + { kernel } { file-not-found } + { \exp_not:N \__kernel_file_name_sanitize:n {#2} } + } + { + \exp_not:N \tex_input:D + \sys_if_engine_luatex:TF + { {#1} } + { \exp_not:N \__kernel_file_name_quote:n {#1} \scan_stop: } + } + } +\exp_args_generate:n { nne } +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\file_parse_full_name:n, \file_parse_full_name_apply:nN} % The main parsing macro \cs{file_parse_full_name_apply:nN} passes the % file name |#1| through \cs{__kernel_file_name_sanitize:n} so that we diff --git a/macros/latex/contrib/l3kernel/l3flag.dtx b/macros/latex/contrib/l3kernel/l3flag.dtx index d34922db45..9640a6d2db 100644 --- a/macros/latex/contrib/l3kernel/l3flag.dtx +++ b/macros/latex/contrib/l3kernel/l3flag.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-assign.dtx b/macros/latex/contrib/l3kernel/l3fp-assign.dtx index 1021bfb830..ae30092b63 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-05-22} +% \date{Released 2023-06-05} % \maketitle % % \begin{documentation} diff --git a/macros/latex/contrib/l3kernel/l3fp-aux.dtx b/macros/latex/contrib/l3kernel/l3fp-aux.dtx index c138c06d2a..025a0af647 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-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-basics.dtx b/macros/latex/contrib/l3kernel/l3fp-basics.dtx index d041b95689..875027466d 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-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-convert.dtx b/macros/latex/contrib/l3kernel/l3fp-convert.dtx index ee86a451c8..6651d7931c 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-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-expo.dtx b/macros/latex/contrib/l3kernel/l3fp-expo.dtx index 312d0a33ca..42a6ebbbf1 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-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-extended.dtx b/macros/latex/contrib/l3kernel/l3fp-extended.dtx index f11d8f5f2c..6e57dbc01b 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-05-22} +% \date{Released 2023-06-05} % % \maketitle % @@ -172,10 +172,10 @@ % \subsection{Multiplying a fixed point number by a short one} % % \begin{macro}[EXP]{\@@_fixed_mul_short:wwn} -% \begin{syntax} +% \begin{syntax}\parskip=0pt\obeylines % \cs{@@_fixed_mul_short:wwn} -% \ \ \Arg{a_1} \Arg{a_2} \Arg{a_3} \Arg{a_4} \Arg{a_5} \Arg{a_6} |;| -% \ \ \Arg{b_0} \Arg{b_1} \Arg{b_2} |;| \Arg{continuation} +% | |\Arg{a_1} \Arg{a_2} \Arg{a_3} \Arg{a_4} \Arg{a_5} \Arg{a_6} |;| +% | |\Arg{b_0} \Arg{b_1} \Arg{b_2} |;| \Arg{continuation} % \end{syntax} % Computes the product $c=ab$ of $a=\sum_i \meta{a_i} 10^{-4i}$ and % $b=\sum_i \meta{b_i} 10^{-4i}$, rounds it to the closest multiple of diff --git a/macros/latex/contrib/l3kernel/l3fp-logic.dtx b/macros/latex/contrib/l3kernel/l3fp-logic.dtx index 1796aa16b5..4f58336b12 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-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-parse.dtx b/macros/latex/contrib/l3kernel/l3fp-parse.dtx index 93bbc4a799..84ca08a545 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-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-random.dtx b/macros/latex/contrib/l3kernel/l3fp-random.dtx index 54979b8701..0bb4a9209a 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-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-round.dtx b/macros/latex/contrib/l3kernel/l3fp-round.dtx index 14e327ab17..1ceeb011ef 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-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-traps.dtx b/macros/latex/contrib/l3kernel/l3fp-traps.dtx index 23857d73e6..d8c7b6aef5 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-05-22} +% \date{Released 2023-06-05} % \maketitle % % \begin{documentation} diff --git a/macros/latex/contrib/l3kernel/l3fp-trig.dtx b/macros/latex/contrib/l3kernel/l3fp-trig.dtx index a30c683e6c..6cd98b62d9 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-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp.dtx b/macros/latex/contrib/l3kernel/l3fp.dtx index 29f1ed453e..3c7144eb28 100644 --- a/macros/latex/contrib/l3kernel/l3fp.dtx +++ b/macros/latex/contrib/l3kernel/l3fp.dtx @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fparray.dtx b/macros/latex/contrib/l3kernel/l3fparray.dtx index 33b17da6ad..afc55ae4af 100644 --- a/macros/latex/contrib/l3kernel/l3fparray.dtx +++ b/macros/latex/contrib/l3kernel/l3fparray.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3int.dtx b/macros/latex/contrib/l3kernel/l3int.dtx index bf3c413b28..a5bf5279a2 100644 --- a/macros/latex/contrib/l3kernel/l3int.dtx +++ b/macros/latex/contrib/l3kernel/l3int.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % @@ -189,7 +189,8 @@ % explict integers, and this may terminate the expression: for % instance, \cs{int_eval:w} \verb*|1 + 1 9| (with explicit space % tokens inserted using |~| in a code setting) expands to \texttt{29} -% since the digit~\texttt{9} is not part of the expression. +% since the digit~\texttt{9} is not part of the expression. Expansion +% details, etc., are as given for \cs{int_eval:n}. % \end{function} % % \begin{function}[EXP, added = 2018-11-03]{\int_sign:n} diff --git a/macros/latex/contrib/l3kernel/l3intarray.dtx b/macros/latex/contrib/l3kernel/l3intarray.dtx index 3978f7f53a..1eeec96a3d 100644 --- a/macros/latex/contrib/l3kernel/l3intarray.dtx +++ b/macros/latex/contrib/l3kernel/l3intarray.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3kernel-functions.dtx b/macros/latex/contrib/l3kernel/l3kernel-functions.dtx index f97ddf0a3f..471c3c52dc 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-05-22} +% \date{Released 2023-06-05} % % \maketitle % @@ -93,9 +93,9 @@ % \end{function} % % \begin{function}{\__kernel_chk_tl_type:NnnT} -% \begin{syntax} +% \begin{syntax}\parskip=0pt\obeylines % \cs{__kernel_chk_tl_type:NnnT} \meta{control sequence} \Arg{specific type} \\ -% \ \ \Arg{reconstruction} \Arg{true code} +% | |\Arg{reconstruction} \Arg{true code} % \end{syntax} % Helper to test that the \meta{control sequence} is a variable of the % given \meta{specific type} of token list. Produces suitable error diff --git a/macros/latex/contrib/l3kernel/l3keys.dtx b/macros/latex/contrib/l3kernel/l3keys.dtx index 84d5bc1d96..d8cec60f8f 100644 --- a/macros/latex/contrib/l3kernel/l3keys.dtx +++ b/macros/latex/contrib/l3kernel/l3keys.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % @@ -286,6 +286,12 @@ % forbidden. Thus a required value cannot be supplied by a default % value, and giving a default value for a key which cannot take a value % does not trigger an error. +% +% When no value is given for a key as part of \cs{keys_set:nn}, the +% \texttt{.default:n} value provides the value before key properties are +% considered. The only exception is when the \texttt{.value_required:n} +% property is active: a required value cannot be supplied by the default, +% and must be explicitly given as part of \cs{keys_set:nn}. % \end{function} % % \begin{function}[updated = 2020-01-17] @@ -717,7 +723,7 @@ % \section{Setting keys} % % \begin{function}[updated = 2017-11-14] -% {\keys_set:nn, \keys_set:nV, \keys_set:nv, \keys_set:no} +% {\keys_set:nn, \keys_set:nV, \keys_set:nv, \keys_set:no, \keys_set:nx} % \begin{syntax} % \cs{keys_set:nn} \Arg{module} \Arg{keyval list} % \end{syntax} @@ -731,8 +737,8 @@ % {\l_keys_key_str, \l_keys_path_str, \l_keys_value_tl} % For each key processed, information of the full \emph{path} of the % key, the \emph{name} of the key and the \emph{value} of the key is -% available within three token list variables. These may be used within -% the code of the key. +% available within two string and one token list variables. +% These may be used within the code of the key. % % The \emph{value} is everything after the \texttt{=}, which may be % empty if no value was given. This is stored in \cs{l_keys_value_tl}, and @@ -2079,7 +2085,8 @@ \l_keys_path_str \s_@@_stop \l_keys_key_tl \l_keys_key_str \tl_set_eq:NN \l_keys_key_tl \l_keys_key_str - \@@_execute:nn \l_keys_path_str {#1} + \tl_set:Nn \l_keys_value_tl {#1} + \@@_execute:no \l_keys_path_str \l_keys_value_tl } } } @@ -2716,7 +2723,7 @@ % % \begin{macro} % { -% \keys_set:nn, \keys_set:nV, \keys_set:nv, \keys_set:no, +% \keys_set:nn, \keys_set:nV, \keys_set:nv, \keys_set:no, \keys_set:nx, % \@@_set:nn % } % \begin{macro}{\@@_set:nnn} @@ -2742,7 +2749,7 @@ { \exp_not:o \l_@@_relative_tl } } } -\cs_generate_variant:Nn \keys_set:nn { nV , nv , no } +\cs_generate_variant:Nn \keys_set:nn { nV , nv , no , nx } \cs_new_protected:Npn \@@_set:nn #1#2 { \exp_args:No \@@_set:nnn \l_@@_module_str {#1} {#2} } \cs_new_protected:Npn \@@_set:nnn #1#2#3 diff --git a/macros/latex/contrib/l3kernel/l3legacy.dtx b/macros/latex/contrib/l3kernel/l3legacy.dtx index 867d369f12..5e199990a4 100644 --- a/macros/latex/contrib/l3kernel/l3legacy.dtx +++ b/macros/latex/contrib/l3kernel/l3legacy.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3luatex.dtx b/macros/latex/contrib/l3kernel/l3luatex.dtx index 5849266ddb..2735f6efa2 100644 --- a/macros/latex/contrib/l3kernel/l3luatex.dtx +++ b/macros/latex/contrib/l3kernel/l3luatex.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3msg.dtx b/macros/latex/contrib/l3kernel/l3msg.dtx index 41812fd5f7..88bf2d8b55 100644 --- a/macros/latex/contrib/l3kernel/l3msg.dtx +++ b/macros/latex/contrib/l3kernel/l3msg.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % @@ -2056,22 +2056,6 @@ } % \end{macrocode} % -% Some errors are only needed in package mode if debugging is enabled by -% one of the options \texttt{enable-debug}, \texttt{check-declarations}, -% \texttt{log-functions}, or on the contrary if debugging is turned off. -% In format mode the error is somewhat different. -% \begin{macrocode} -\msg_new:nnnn { debug } { enable-debug } - { To~use~'#1'~set~the~'enable-debug'~option. } - { - The~function~'#1'~will~be~ignored~because~it~can~only~work~if~ - some~internal~functions~in~expl3~have~been~appropriately~ - defined.~This~only~happens~if~one~of~the~options~ - 'enable-debug',~'check-declarations'~or~'log-functions'~was~ - given~as~an~option:~see~the~main~expl3~documentation. - } -% \end{macrocode} -% % Some errors only appear in expandable settings, % hence don't need a \enquote{more-text} argument. % \begin{macrocode} diff --git a/macros/latex/contrib/l3kernel/l3names.dtx b/macros/latex/contrib/l3kernel/l3names.dtx index 97f4b0431d..9158270a84 100644 --- a/macros/latex/contrib/l3kernel/l3names.dtx +++ b/macros/latex/contrib/l3kernel/l3names.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3news.pdf b/macros/latex/contrib/l3kernel/l3news.pdf Binary files differindex 28d77fd1d6..9c485f66f1 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 011b51961d..50bb4103ff 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 0175fd31b2..a0c6f3f6e4 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 ad2cd7dd33..2ebae6016e 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 d283d35e09..a61d3e009f 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 d1e73ffb4b..b750ca4d87 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 fe6fb8ad49..5e01a63e75 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 8e6967b08a..6e0298e5a2 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 d32b9bff99..35b0094b1d 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 2e54f340e3..dcf4d4ed80 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 4039ae74b8..aff50d892b 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 308e42b7ea..7d4d2e520e 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 086869b52c..86ef749e1e 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 38896f7d87..c223938d2a 100644 --- a/macros/latex/contrib/l3kernel/l3pdf.dtx +++ b/macros/latex/contrib/l3kernel/l3pdf.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3prefixes.pdf b/macros/latex/contrib/l3kernel/l3prefixes.pdf Binary files differindex 9476774444..bde496ca75 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 7374a8d8b9..27a383899b 100644 --- a/macros/latex/contrib/l3kernel/l3prg.dtx +++ b/macros/latex/contrib/l3kernel/l3prg.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % @@ -171,7 +171,12 @@ % state. There must be a return statement for each branch; failing to do % so will result in erroneous output if that branch is executed. % -% \begin{function}{\prg_new_eq_conditional:NNn, \prg_set_eq_conditional:NNn} +% \begin{function}[updated = 2023-05-26] +% { +% \prg_new_eq_conditional:NNn, +% \prg_set_eq_conditional:NNn, +% \prg_gset_eq_conditional:NNn +% } % \begin{syntax} % \cs{prg_new_eq_conditional:NNn} \cs[no-index]{\meta{name_1}:\meta{arg spec_1}} \cs[no-index]{\meta{name_2}:\meta{arg spec_2}} \Arg{conditions} % \end{syntax} @@ -375,7 +380,12 @@ % check that the \meta{boolean} really is a boolean variable. % \end{function} % -% \subsection{Scratch booleans} +% \subsection{Constant and scratch booleans} +% +% \begin{variable}{\c_true_bool, \c_false_bool} +% Constants that represent |true| and |false|, respectively. Used to +% implement predicates. +% \end{variable} % % \begin{variable}{\l_tmpa_bool, \l_tmpb_bool} % A scratch boolean for local assignment. It is never used by diff --git a/macros/latex/contrib/l3kernel/l3prop.dtx b/macros/latex/contrib/l3kernel/l3prop.dtx index 259009a181..d254e43280 100644 --- a/macros/latex/contrib/l3kernel/l3prop.dtx +++ b/macros/latex/contrib/l3kernel/l3prop.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % @@ -165,16 +165,16 @@ % % \begin{function}[updated = 2012-07-09] % { -% \prop_put:Nnn, \prop_put:NnV, \prop_put:Nno, \prop_put:Nnx, +% \prop_put:Nnn, \prop_put:NnV, \prop_put:Nno, \prop_put:Nne, \prop_put:Nnx, % \prop_put:NVn, \prop_put:NVV, \prop_put:NVx, \prop_put:Nvx, % \prop_put:Non, \prop_put:Noo, \prop_put:Nxx, -% \prop_put:cnn, \prop_put:cnV, \prop_put:cno, \prop_put:cnx, +% \prop_put:cnn, \prop_put:cnV, \prop_put:cno, \prop_put:cne, \prop_put:cnx, % \prop_put:cVn, \prop_put:cVV, \prop_put:cVx, \prop_put:cvx, % \prop_put:con, \prop_put:coo, \prop_put:cxx, -% \prop_gput:Nnn, \prop_gput:NnV, \prop_gput:Nno, \prop_gput:Nnx, +% \prop_gput:Nnn, \prop_gput:NnV, \prop_gput:Nno, \prop_gput:Nne, \prop_gput:Nnx, % \prop_gput:NVn, \prop_gput:NVV, \prop_gput:NVx, \prop_gput:Nvx, % \prop_gput:Non, \prop_gput:Noo, \prop_gput:Nxx, -% \prop_gput:cnn, \prop_gput:cnV, \prop_gput:cno, \prop_gput:cnx, +% \prop_gput:cnn, \prop_gput:cnV, \prop_gput:cno, \prop_gput:cne, \prop_gput:cnx, % \prop_gput:cVn, \prop_gput:cVV, \prop_gput:cVx, \prop_gput:cvx, % \prop_gput:con, \prop_gput:coo, \prop_gput:cxx % } @@ -1152,19 +1152,19 @@ % % \begin{macro}[tested = m3prop002] % { -% \prop_put:Nnn, \prop_put:NnV, \prop_put:Nno, \prop_put:Nnx, +% \prop_put:Nnn, \prop_put:NnV, \prop_put:Nno, \prop_put:Nne, \prop_put:Nnx, % \prop_put:NVn, \prop_put:NVV, \prop_put:NVx, \prop_put:Nvx, % \prop_put:Non, \prop_put:Noo, \prop_put:Nxx, -% \prop_put:cnn, \prop_put:cnV, \prop_put:cno, \prop_put:cnx, +% \prop_put:cnn, \prop_put:cnV, \prop_put:cno, \prop_put:cne, \prop_put:cnx, % \prop_put:cVn, \prop_put:cVV, \prop_put:cVx, \prop_put:cvx, % \prop_put:con, \prop_put:coo, \prop_put:cxx % } % \begin{macro}[tested = m3prop002] % { -% \prop_gput:Nnn, \prop_gput:NnV, \prop_gput:Nno, \prop_gput:Nnx, +% \prop_gput:Nnn, \prop_gput:NnV, \prop_gput:Nno, \prop_gput:Nne, \prop_gput:Nnx, % \prop_gput:NVn, \prop_gput:NVV, \prop_hput:NVx, \prop_hput:Nvx, % \prop_gput:Non, \prop_gput:Noo, \prop_gput:Nxx, -% \prop_gput:cnn, \prop_gput:cnV, \prop_gput:cno, \prop_gput:cnx, +% \prop_gput:cnn, \prop_gput:cnV, \prop_gput:cno, \prop_gput:cne, \prop_gput:cnx, % \prop_gput:cVn, \prop_gput:cVV, \prop_gput:cVx, \prop_gput:cvx, % \prop_gput:con, \prop_gput:coo, \prop_gput:cxx % } @@ -1196,13 +1196,13 @@ { #1 #2 { \exp_not:o {#2} \l_@@_internal_tl } } } \cs_generate_variant:Nn \prop_put:Nnn - { NnV , Nno , Nnx , NV , NVV , NVx , Nvx , No , Noo , Nxx } + { NnV , Nno , Nne , Nnx , NV , NVV , NVx , Nvx , No , Noo , Nxx } \cs_generate_variant:Nn \prop_put:Nnn - { c , cnV , cno , cnx , cV , cVV , cVx , cvx , co , coo , cxx } + { c , cnV , cno , cne , cnx , cV , cVV , cVx , cvx , co , coo , cxx } \cs_generate_variant:Nn \prop_gput:Nnn - { NnV , Nno , Nnx , NV , NVV , NVx , Nvx , No , Noo , Nxx } + { NnV , Nno , Nne , Nnx , NV , NVV , NVx , Nvx , No , Noo , Nxx } \cs_generate_variant:Nn \prop_gput:Nnn - { c , cnV , cno , cnx , cV , cVV , cVx , cvx , co , coo , cxx } + { c , cnV , cno , cne , cnx , cV , cVV , cVx , cvx , co , coo , cxx } % \end{macrocode} % \end{macro} % \end{macro} diff --git a/macros/latex/contrib/l3kernel/l3quark.dtx b/macros/latex/contrib/l3kernel/l3quark.dtx index d2f02ae06d..bc18bd95a9 100644 --- a/macros/latex/contrib/l3kernel/l3quark.dtx +++ b/macros/latex/contrib/l3kernel/l3quark.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3regex.dtx b/macros/latex/contrib/l3kernel/l3regex.dtx index 9110d54b85..a87896011a 100644 --- a/macros/latex/contrib/l3kernel/l3regex.dtx +++ b/macros/latex/contrib/l3kernel/l3regex.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3seq.dtx b/macros/latex/contrib/l3kernel/l3seq.dtx index 3044da987c..25b316dfcd 100644 --- a/macros/latex/contrib/l3kernel/l3seq.dtx +++ b/macros/latex/contrib/l3kernel/l3seq.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % @@ -931,9 +931,9 @@ % % Adding an \meta{item} to a set \meta{seq~var} can be done by appending % it to the \meta{seq~var} if it is not already in the \meta{seq~var}: -% \begin{quote}\ttfamily -% \cs{seq_if_in:NnF} \meta{seq~var} \Arg{item} \\ -% \ \ \{ \cs{seq_put_right:Nn} \meta{seq~var} \Arg{item} \} +% \begin{quote}\ttfamily\parskip=0pt\obeylines +% \cs{seq_if_in:NnF} \meta{seq~var} \Arg{item} +% | |\{ \cs{seq_put_right:Nn} \meta{seq~var} \Arg{item} \} % \end{quote} % Removing an \meta{item} from a set \meta{seq~var} can be done using % \cs{seq_remove_all:Nn}, @@ -944,13 +944,13 @@ % The intersection of two sets \meta{seq~var_1} and \meta{seq~var_2} can % be stored into \meta{seq~var_3} by collecting items of % \meta{seq~var_1} which are in \meta{seq~var_2}. -% \begin{quote}\ttfamily -% \cs{seq_clear:N} \meta{seq~var_3} \\ -% \cs{seq_map_inline:Nn} \meta{seq~var_1} \\ -% \ \ \{ \\ -% \ \ \ \ \cs{seq_if_in:NnT} \meta{seq~var_2} \{\#1\} \\ -% \ \ \ \ \ \ \{ \cs{seq_put_right:Nn} \meta{seq~var_3} \{\#1\} \} \\ -% \ \ \} +% \begin{quote}\ttfamily\parskip=0pt\obeylines +% \cs{seq_clear:N} \meta{seq~var_3} +% \cs{seq_map_inline:Nn} \meta{seq~var_1} +% | |\{ +% | |\cs{seq_if_in:NnT} \meta{seq~var_2} \{\#1\} +% | |\{ \cs{seq_put_right:Nn} \meta{seq~var_3} \{\#1\} \} +% | |\} % \end{quote} % The code as written here only works if \meta{seq~var_3} is different % from the other two sequence variables. To cover all cases, items @@ -966,13 +966,13 @@ % \cs{seq_remove_duplicates:N} \meta{seq~var_3} % \end{quote} % or by adding items to (a copy of) \meta{seq~var_1} one by one -% \begin{quote}\ttfamily -% \cs{seq_set_eq:NN} \meta{seq~var_3} \meta{seq~var_1} \\ -% \cs{seq_map_inline:Nn} \meta{seq~var_2} \\ -% \ \ \{ \\ -% \ \ \ \ \cs{seq_if_in:NnF} \meta{seq~var_3} \{\#1\} \\ -% \ \ \ \ \ \ \{ \cs{seq_put_right:Nn} \meta{seq~var_3} \{\#1\} \} \\ -% \ \ \} +% \begin{quote}\ttfamily\parskip=0pt\obeylines +% \cs{seq_set_eq:NN} \meta{seq~var_3} \meta{seq~var_1} +% \cs{seq_map_inline:Nn} \meta{seq~var_2} +% | |\{ +% | |\cs{seq_if_in:NnF} \meta{seq~var_3} \{\#1\} +% | |\{ \cs{seq_put_right:Nn} \meta{seq~var_3} \{\#1\} \} +% | |\} % \end{quote} % The second approach is faster than the first when the \meta{seq~var_2} % is short compared to \meta{seq~var_1}. @@ -980,10 +980,10 @@ % The difference of two sets \meta{seq~var_1} and \meta{seq~var_2} can % be stored into \meta{seq~var_3} by removing items of the % \meta{seq~var_2} from (a copy of) the \meta{seq~var_1} one by one. -% \begin{quote}\ttfamily -% \cs{seq_set_eq:NN} \meta{seq~var_3} \meta{seq~var_1} \\ -% \cs{seq_map_inline:Nn} \meta{seq~var_2} \\ -% \ \ \{ \cs{seq_remove_all:Nn} \meta{seq~var_3} \{\#1\} \} +% \begin{quote}\ttfamily\parskip=0pt\obeylines +% \cs{seq_set_eq:NN} \meta{seq~var_3} \meta{seq~var_1} +% \cs{seq_map_inline:Nn} \meta{seq~var_2} +% | |\{ \cs{seq_remove_all:Nn} \meta{seq~var_3} \{\#1\} \} % \end{quote} % % The symmetric difference of two sets \meta{seq~var_1} and @@ -992,13 +992,13 @@ % the result as |\l__|\meta{pkg}|_internal_seq|, then the difference % between \meta{seq~var_2} and \meta{seq~var_1}, and finally % concatenating the two differences to get the symmetric differences. -% \begin{quote}\ttfamily -% \cs{seq_set_eq:NN} |\l__|\meta{pkg}|_internal_seq| \meta{seq~var_1} \\ -% \cs{seq_map_inline:Nn} \meta{seq~var_2} \\ -% \ \ \{ \cs{seq_remove_all:Nn} |\l__|\meta{pkg}|_internal_seq| \{\#1\} \} \\ -% \cs{seq_set_eq:NN} \meta{seq~var_3} \meta{seq~var_2} \\ -% \cs{seq_map_inline:Nn} \meta{seq~var_1} \\ -% \ \ \{ \cs{seq_remove_all:Nn} \meta{seq~var_3} \{\#1\} \} \\ +% \begin{quote}\ttfamily\parskip=0pt\obeylines +% \cs{seq_set_eq:NN} |\l__|\meta{pkg}|_internal_seq| \meta{seq~var_1} +% \cs{seq_map_inline:Nn} \meta{seq~var_2} +% | |\{ \cs{seq_remove_all:Nn} |\l__|\meta{pkg}|_internal_seq| \{\#1\} \} +% \cs{seq_set_eq:NN} \meta{seq~var_3} \meta{seq~var_2} +% \cs{seq_map_inline:Nn} \meta{seq~var_1} +% | |\{ \cs{seq_remove_all:Nn} \meta{seq~var_3} \{\#1\} \} % \cs{seq_concat:NNN} \meta{seq~var_3} \meta{seq~var_3} |\l__|\meta{pkg}|_internal_seq| % \end{quote} % diff --git a/macros/latex/contrib/l3kernel/l3skip.dtx b/macros/latex/contrib/l3kernel/l3skip.dtx index bf174f74dd..23d32a1b87 100644 --- a/macros/latex/contrib/l3kernel/l3skip.dtx +++ b/macros/latex/contrib/l3kernel/l3skip.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % @@ -491,7 +491,7 @@ % \end{syntax} % Evaluates the \meta{dim expr}, and leaves the result, % expressed in points (\texttt{pt}) in the input stream, with \emph{no -% units}. The result is rounded by \TeX{} to four or five decimal +% units}. The result is rounded by \TeX{} to at most five decimal % places. If the decimal part of the result is zero, it is omitted, % together with the decimal marker. % @@ -510,7 +510,7 @@ % \end{syntax} % Evaluates the \meta{dim expr}, and leaves the result, % expressed in big points (\texttt{bp}) in the input stream, with \emph{no -% units}. The result is rounded by \TeX{} to four or five decimal +% units}. The result is rounded by \TeX{} to at most five decimal % places. If the decimal part of the result is zero, it is omitted, % together with the decimal marker. % @@ -521,11 +521,14 @@ % leaves |0.99628| in the input stream, \emph{i.e.}~the magnitude of % one (\TeX{}) point when converted to big points. % \begin{texnote} -% The implementation of this functions is re-entrant: the result of +% The implementation of this function is re-entrant: the result of % \begin{verbatim} -% \dim_to_decimal_in_bp:n { <n>bp } +% \dim_compare:nNnTF +% { <x>bp } = +% { \dim_to_decimal_in_bp:n { <x>bp } bp } % \end{verbatim} -% will be the value \meta{n}. +% will be logically \texttt{true}. The decimal representations may +% differ provided they produce the same \TeX{} dimension. % \end{texnote} % \end{function} % @@ -550,28 +553,33 @@ % The maximum \TeX{} allowable dimension value (available as % \tn{maxdimen} in plain \TeX{} and \LaTeX{} and \cs{c_max_dim} in % \pkg{expl3}) can only be expressed exactly in the units -% \texttt{pt}, \texttt{bp} and \texttt{sp}. Expressed in different units, -% the maximum allowable input value to five decimal places is\\ +% \texttt{pt}, \texttt{bp} and \texttt{sp}. The maximum allowable +% input values to five decimal places are\\ % \begin{center} % \begin{tabular}{@{}>{$}r<{$}@{\,}l@{}} % 1276.00215 & cc \\ % 575.83174 & cm \\ -% 226.70540 & in \\ % 15312.02584 & dd \\ +% 226.70540 & in \\ % 5758.31742 & mm \\ % 1365.33333 & pc \\ % \end{tabular} % \end{center} +% (Note that these are not all equal, but rather any larger value will overflow +% due to the way \TeX{} converts to \texttt{sp}.) % Values given to five decimal places larger that these will result in \TeX{} % errors; the behavior if additional decimal places are given depends on the % \TeX{} internals and thus larger values are \emph{not} supported by % \pkg{expl3}. % \begin{texnote} -% The implementation of this functions is re-entrant: the result of +% The implementation of these functions is re-entrant: the result of % \begin{verbatim} -% \dim_to_decimal_in_<unit>:n { <n><unit> } +% \dim_compare:nNnTF +% { <x><unit> } = +% { \dim_to_decimal_in_<unit>:n { <x><unit> } <unit> } % \end{verbatim} -% will be the value \meta{n}. +% will be logically \texttt{true}. The decimal representations may +% differ provided they produce the same \TeX{} dimension. % \end{texnote} % \end{function} % @@ -584,7 +592,7 @@ % units}. The result is necessarily an integer. % \end{function} % -% \begin{function}[added = 2014-07-15, EXP] +% \begin{function}[added = 2014-07-15, updated = 2023-05-20, EXP] % {\dim_to_decimal_in_unit:nn} % \begin{syntax} % \cs{dim_to_decimal_in_unit:nn} \Arg{dim expr_1} \Arg{dim expr_2} @@ -603,11 +611,11 @@ % leaves |0.35278| in the input stream, \emph{i.e.}~the magnitude of % one big point when expressed in millimetres. The conversions do % \emph{not} guarantee that \TeX{} would yield identical results -% for the direct input in an equality test, hence +% for the direct input in an equality test, thus for instance % \begin{verbatim} % \dim_compare:nNnTF -% { \dim_to_decimal_in_unit:nn { 1bp } { 1mm } mm } -% { 1bp } +% { 1bp } = +% { \dim_to_decimal_in_unit:nn { 1bp } { 1mm } mm } % \end{verbatim} % will take the \texttt{false} branch. % \end{function} @@ -1754,7 +1762,7 @@ % The code to do this is contributed by Ruixi Zhang. % % \begin{macro}[EXP]{\dim_to_decimal_in_sp:n} -% The one eeasy case: the only requirement here is that we avoid an +% The one easy case: the only requirement here is that we avoid an % overflow. % \begin{macrocode} \cs_new:Npn \dim_to_decimal_in_sp:n #1 @@ -1798,7 +1806,7 @@ % (1)~$\hbox{midpoint}+\frac{1}{2}>N$ and % (2)~$\hbox{midpoint}+\frac{1}{2}<N+1$. In other words, % $N=\lfloor\hbox{midpoint}+\frac{1}{2}\rfloor$. As long as we can -% rewrite the midpoint as the result of a ``scaling operation'' of \eTeX, +% rewrite the midpoint as the result of a \enquote{scaling operation} of \eTeX, % the $\lfloor\ldots+\frac{1}{2}\rfloor$ part will follow naturally. % Indeed we can: $\hbox{midpoint}=(2X+1)\times(\frac{1}{2}\delta^{-1})$. % @@ -1825,7 +1833,9 @@ % Conversions to other units are now coded. % Consult the pdf\/\TeX{} source for each conversion factor~$\delta$. % Each factor $\frac{1}{2}\delta^{-1}$ is hand-coded -% for accuracy (and speed). +% for accuracy (and speed). As the units \texttt{nc} and \texttt{nd} +% are not supported by \XeTeX{} or (u)p\TeX{}, they are not included +% here. % \begin{macrocode} \@@_tmp:w { in } { 50 / 7227 } % delta = 7227/100 \@@_tmp:w { pc } { 1 / 24 } % delta = 12/1 @@ -1887,7 +1897,7 @@ % |<number2>;{<dimexpr1>}|, where |<number2>| represents |<dimexpr2>| in % |sp| unit. % If |#1| is~|0|$_{12}$, the \enquote{unit} |<dimexpr2>| must also be zero. -% So we throw out a ``division by zero'' error message at this point. +% So we throw out a \enquote{division by zero} error message at this point. % Otherwise, if |#1| is~|-|$_{12}$, we shall negate both |<dimexpr1>| and % |<dimexpr2>| for later procedures. % \begin{macrocode} @@ -1950,8 +1960,8 @@ % output $q+R'/65536$ in decimal. % % Note: $q=\lfloor X/n\rfloor=\lfloor\frac{2X-n}{2n}+\frac{1}{2}\rfloor$ -% represents the ``integer'' part, while $0\le R'\le65536$ represents the -% ``fractional'' part. (Can $R'=65536$ really happen? Didn't investigate.) +% represents the \enquote{integer} part, while $0\le R'\le65536$ represents the +% \enquote{fractional} part. (Can $R'=65536$ really happen? Didn't investigate.) % \begin{macrocode} \cs_new:Npn \@@_branch_unit:w #1;#2; { @@ -1991,12 +2001,12 @@ \token_if_eq_charcode:NNTF #1 - { \exp_after:wN \exp_after:wN \exp_after:wN \@@_get_remainder:w - \int_eval:w ( 2 * #2 - #3 ) / ( 2 * #3 ) ; + \int_eval:n { ( 2 * #2 - #3 ) / ( 2 * #3 ) } ; #2 ; #3 ; - ; } { \exp_after:wN \exp_after:wN \exp_after:wN \@@_get_remainder:w - \int_eval:w ( 2 * #1#2 - #3 ) / ( 2 * #3 ) ; + \int_eval:n { ( 2 * #1#2 - #3 ) / ( 2 * #3 ) } ; #1#2 ; #3 ; ; } } @@ -2012,7 +2022,7 @@ \cs_new:Npn \@@_get_remainder:w #1;#2;#3; { \exp_after:wN \exp_after:wN \exp_after:wN \@@_convert_remainder:w - \int_eval:w #2 - #1 * #3 ; + \int_eval:n { #2 - #1 * #3 } ; #3 ; #1 ; } % \end{macrocode} @@ -2025,7 +2035,7 @@ \cs_new:Npn \@@_convert_remainder:w #1;#2; { \exp_after:wN \exp_after:wN \exp_after:wN \@@_test_candidate:w - \int_eval:w #1 * 65536 / #2 ; + \int_eval:n { #1 * 65536 / #2 } ; #1 ; #2 ; } % \end{macrocode} @@ -2046,8 +2056,7 @@ { \dim_to_decimal:n { #1sp } \@@_eval:w #3sp \@@_eval_end: } { \@@_parse_decimal:w #1 ; } { - \exp_after:wN \@@_parse_decimal:w - \int_eval:w #1 + 1 ; + \@@_parse_decimal:w \int_eval:n { #1 + 1 } ; } } % \end{macrocode} diff --git a/macros/latex/contrib/l3kernel/l3sort.dtx b/macros/latex/contrib/l3kernel/l3sort.dtx index e73b6b39ab..bab6a36448 100644 --- a/macros/latex/contrib/l3kernel/l3sort.dtx +++ b/macros/latex/contrib/l3kernel/l3sort.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3str-convert.dtx b/macros/latex/contrib/l3kernel/l3str-convert.dtx index 2f2c4f36c7..ed4e866d73 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-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3str.dtx b/macros/latex/contrib/l3kernel/l3str.dtx index 3322a2289d..473e55f6d0 100644 --- a/macros/latex/contrib/l3kernel/l3str.dtx +++ b/macros/latex/contrib/l3kernel/l3str.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3styleguide.pdf b/macros/latex/contrib/l3kernel/l3styleguide.pdf Binary files differindex 1a83be2d01..0726531396 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 4c1a0087c6..8840a0aca6 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-05-22} +\date{Released 2023-06-05} \begin{document} diff --git a/macros/latex/contrib/l3kernel/l3syntax-changes.pdf b/macros/latex/contrib/l3kernel/l3syntax-changes.pdf Binary files differindex aad08104ac..3fef1f71e0 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 847089ac7a..7dc2f1b9bf 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-05-22} +\date{Released 2023-06-05} \newcommand{\TF}{\textit{(TF)}} diff --git a/macros/latex/contrib/l3kernel/l3sys.dtx b/macros/latex/contrib/l3kernel/l3sys.dtx index 2180d4085b..6b7aab3488 100644 --- a/macros/latex/contrib/l3kernel/l3sys.dtx +++ b/macros/latex/contrib/l3kernel/l3sys.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3term-glossary.pdf b/macros/latex/contrib/l3kernel/l3term-glossary.pdf Binary files differindex 238b5bb93e..abcc44bc3a 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 c70b135373..5fe65ecce4 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-05-22} +\date{Released 2023-06-05} \newcommand{\TF}{\textit{(TF)}} diff --git a/macros/latex/contrib/l3kernel/l3text-case.dtx b/macros/latex/contrib/l3kernel/l3text-case.dtx index 37172a6eb0..a69a695f49 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-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3text-map.dtx b/macros/latex/contrib/l3kernel/l3text-map.dtx index 223b778517..a2f9e5fae7 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-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3text-purify.dtx b/macros/latex/contrib/l3kernel/l3text-purify.dtx index a851e247a2..d3e8e099fb 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-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3text.dtx b/macros/latex/contrib/l3kernel/l3text.dtx index fcd1331b7d..bcdfa869f2 100644 --- a/macros/latex/contrib/l3kernel/l3text.dtx +++ b/macros/latex/contrib/l3kernel/l3text.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3tl-analysis.dtx b/macros/latex/contrib/l3kernel/l3tl-analysis.dtx index 8ae8a5d41e..7519981f52 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-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3tl.dtx b/macros/latex/contrib/l3kernel/l3tl.dtx index 1e113ee3b4..67154547b7 100644 --- a/macros/latex/contrib/l3kernel/l3tl.dtx +++ b/macros/latex/contrib/l3kernel/l3tl.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % @@ -161,12 +161,12 @@ % % \begin{function} % { -% \tl_set:Nn, \tl_set:NV, \tl_set:Nv, \tl_set:No, \tl_set:Nf, \tl_set:Nx, -% \tl_set:cn, \tl_set:cV, \tl_set:cv, \tl_set:co, \tl_set:cf, \tl_set:cx, +% \tl_set:Nn, \tl_set:NV, \tl_set:Nv, \tl_set:No, \tl_set:Ne, \tl_set:Nf, \tl_set:Nx, +% \tl_set:cn, \tl_set:cV, \tl_set:cv, \tl_set:co, \tl_set:ce, \tl_set:cf, \tl_set:cx, % \tl_gset:Nn, \tl_gset:NV, \tl_gset:Nv, -% \tl_gset:No, \tl_gset:Nf, \tl_gset:Nx, +% \tl_gset:No, \tl_gset:Ne, \tl_gset:Nf, \tl_gset:Nx, % \tl_gset:cn, \tl_gset:cV, \tl_gset:cv, -% \tl_gset:co, \tl_gset:cf, \tl_gset:cx +% \tl_gset:co, \tl_gset:ce, \tl_gset:cf, \tl_gset:cx % } % \begin{syntax} % \cs{tl_set:Nn} \meta{tl~var} \Arg{tokens} @@ -350,30 +350,6 @@ % Token groups (|{|\ldots|}|) are not single tokens. % \end{function} % -% \begin{function}[added = 2013-07-24, EXP, noTF]{\tl_case:Nn, \tl_case:cn} -% \begin{syntax} -% \cs{tl_case:NnTF} \meta{test token list variable} \\ -% ~~"{" \\ -% ~~~~\meta{token list variable case_1} \Arg{code case_1} \\ -% ~~~~\meta{token list variable case_2} \Arg{code case_2} \\ -% ~~~~\ldots \\ -% ~~~~\meta{token list variable case_n} \Arg{code case_n} \\ -% ~~"}" \\ -% ~~\Arg{true code} -% ~~\Arg{false code} -% \end{syntax} -% This function compares the \meta{test token list variable} in turn -% with each of the \meta{token list variable cases}. If the two -% are equal (as described for \cs{tl_if_eq:NNTF}) -% then the associated \meta{code} is left in the input -% stream and other cases are discarded. If any of the -% cases are matched, the \meta{true code} is also inserted into the -% input stream (after the code for the appropriate case), while if none -% match then the \meta{false code} is inserted. The function -% \cs{tl_case:Nn}, which does nothing if there is no match, is also -% available. -% \end{function} -% % \subsection{Testing the first token} % % \begin{function}[updated = 2012-07-09, EXP, pTF] @@ -462,7 +438,7 @@ % % \subsection{Using token lists} % -% \begin{function}[EXP]{\tl_to_str:n, \tl_to_str:V, \tl_to_str:v} +% \begin{function}[EXP]{\tl_to_str:n, \tl_to_str:o, \tl_to_str:V, \tl_to_str:v} % \begin{syntax} % \cs{tl_to_str:n} \Arg{token list} % \end{syntax} @@ -670,7 +646,7 @@ % \end{texnote} % \end{function} % -% \begin{function}[updated = 2015-08-07]{\tl_show:n} +% \begin{function}[updated = 2015-08-07]{\tl_show:n, \tl_show:x} % \begin{syntax} % \cs{tl_show:n} \Arg{token list} % \end{syntax} @@ -689,7 +665,7 @@ % \cs{tl_show:N} which displays the result in the terminal. % \end{function} % -% \begin{function}[added = 2014-08-22, updated = 2015-08-07]{\tl_log:n} +% \begin{function}[added = 2014-08-22, updated = 2015-08-07]{\tl_log:n, \tl_log:x} % \begin{syntax} % \cs{tl_log:n} \Arg{token list} % \end{syntax} @@ -1097,8 +1073,10 @@ % % \begin{function}[updated = 2011-08-11] % { -% \tl_replace_once:Nnn, \tl_replace_once:cnn, -% \tl_greplace_once:Nnn, \tl_greplace_once:cnn +% \tl_replace_once:Nnn, \tl_replace_once:Nxx, +% \tl_replace_once:cnn, \tl_replace_once:cxx, +% \tl_greplace_once:Nnn, \tl_greplace_once:Nxx +% \tl_greplace_once:cnn, \tl_greplace_once:cxx % } % \begin{syntax} % \cs{tl_replace_once:Nnn} \meta{tl~var} \Arg{old tokens} \Arg{new tokens} @@ -1112,8 +1090,10 @@ % % \begin{function}[updated = 2011-08-11] % { -% \tl_replace_all:Nnn, \tl_replace_all:cnn, -% \tl_greplace_all:Nnn, \tl_greplace_all:cnn +% \tl_replace_all:Nnn, \tl_replace_all:Nxx, +% \tl_replace_all:cnn, \tl_replace_all:cxx +% \tl_greplace_all:Nnn, \tl_greplace_all:Nxx, +% \tl_greplace_all:cnn, \tl_greplace_all:cxx % } % \begin{syntax} % \cs{tl_replace_all:Nnn} \meta{tl~var} \Arg{old tokens} \Arg{new tokens} @@ -1131,8 +1111,10 @@ % % \begin{function}[updated = 2011-08-11] % { -% \tl_remove_once:Nn, \tl_remove_once:cn, -% \tl_gremove_once:Nn, \tl_gremove_once:cn +% \tl_remove_once:Nn, \tl_remove_once:Nx, +% \tl_remove_once:cn, \tl_remove_once:cx, +% \tl_gremove_once:Nn, \tl_gremove_once:Nx +% \tl_gremove_once:cn, \tl_gremove_once:cx % } % \begin{syntax} % \cs{tl_remove_once:Nn} \meta{tl~var} \Arg{tokens} @@ -1145,8 +1127,10 @@ % % \begin{function}[updated = 2011-08-11] % { -% \tl_remove_all:Nn, \tl_remove_all:cn, -% \tl_gremove_all:Nn, \tl_gremove_all:cn +% \tl_remove_all:Nn, \tl_remove_all:Nx, +% \tl_remove_all:cn, \tl_remove_all:cx, +% \tl_gremove_all:Nn, \tl_gremove_all:Nx +% \tl_gremove_all:cn, \tl_gremove_all:cx % } % \begin{syntax} % \cs{tl_remove_all:Nn} \meta{tl~var} \Arg{tokens} @@ -1211,7 +1195,7 @@ % \end{texnote} % \end{function} % -% \begin{function}[updated = 2015-08-11]{\tl_rescan:nn} +% \begin{function}[updated = 2015-08-11]{\tl_rescan:nn, \tl_rescan:nV} % \begin{syntax} % \cs{tl_rescan:nn} \Arg{setup} \Arg{tokens} % \end{syntax} @@ -1463,15 +1447,15 @@ % % \begin{macro} % { -% \tl_set:Nn, \tl_set:NV, \tl_set:Nv, \tl_set:No, \tl_set:Nf, \tl_set:Nx, -% \tl_set:cn, \tl_set:cV, \tl_set:cv, \tl_set:co, \tl_set:cf, \tl_set:cx +% \tl_set:Nn, \tl_set:NV, \tl_set:Nv, \tl_set:No, \tl_set:Ne, \tl_set:Nf, \tl_set:Nx, +% \tl_set:cn, \tl_set:cV, \tl_set:cv, \tl_set:co, \tl_set:ce, \tl_set:cf, \tl_set:cx % } % \begin{macro} % { % \tl_gset:Nn, \tl_gset:NV, \tl_gset:Nv, -% \tl_gset:No, \tl_gset:Nf, \tl_gset:Nx, +% \tl_gset:No, \tl_gset:Ne, \tl_gset:Nf, \tl_gset:Nx, % \tl_gset:cn, \tl_gset:cV, \tl_gset:cv, -% \tl_gset:co, \tl_gset:cf, \tl_gset:cx +% \tl_gset:co, \tl_gset:ce, \tl_gset:cf, \tl_gset:cx % } % By using \cs{exp_not:n} token list variables can contain |#| tokens, % which makes the token list registers provided by \TeX{} @@ -1490,12 +1474,12 @@ { \__kernel_tl_gset:Nx #1 { \__kernel_exp_not:w \exp_after:wN {#2} } } \cs_new_protected:Npn \tl_gset:Nx #1#2 { \__kernel_tl_gset:Nx #1 {#2} } -\cs_generate_variant:Nn \tl_set:Nn { NV , Nv , Nf } -\cs_generate_variant:Nn \tl_set:Nn { c, cV , cv , cf } +\cs_generate_variant:Nn \tl_set:Nn { NV , Nv , Ne , Nf } +\cs_generate_variant:Nn \tl_set:Nn { c, cV , cv , ce , cf } \cs_generate_variant:Nn \tl_set:Nx { c } \cs_generate_variant:Nn \tl_set:No { c } -\cs_generate_variant:Nn \tl_gset:Nn { NV , Nv , Nf } -\cs_generate_variant:Nn \tl_gset:Nn { c, cV , cv , cf } +\cs_generate_variant:Nn \tl_gset:Nn { NV , Nv , Ne , Nf } +\cs_generate_variant:Nn \tl_gset:Nn { c, cV , cv , ce , cf } \cs_generate_variant:Nn \tl_gset:Nx { c } \cs_generate_variant:Nn \tl_gset:No { c } % \end{macrocode} @@ -1677,7 +1661,7 @@ % \tl_gset_rescan:Nnn, \tl_gset_rescan:Nno, \tl_gset_rescan:Nnx, % \tl_gset_rescan:cnn, \tl_gset_rescan:cno, \tl_gset_rescan:cnx % } -% \begin{macro}{\tl_rescan:nn} +% \begin{macro}{\tl_rescan:nn, \tl_rescan:nV} % \begin{macro}{\@@_rescan_aux:} % \begin{macro}{\@@_set_rescan:NNnn, \@@_set_rescan_multi:nNN} % \begin{macro}[EXP]{\@@_rescan:NNw} @@ -1740,6 +1724,7 @@ \exp_after:wN \@@_rescan_aux: \l_@@_internal_a_tl } +\cs_generate_variant:Nn \tl_rescan:nn { nV } \exp_args:NNo \cs_new_protected:Npn \@@_rescan_aux: { \tl_clear:N \l_@@_internal_a_tl } \cs_new_protected:Npn \tl_set_rescan:Nnn @@ -1917,10 +1902,10 @@ { \@@_replace:NnNNNnn \q_@@_mark ? \@@_replace_next:w \__kernel_tl_set:Nx } \cs_new_protected:Npn \tl_greplace_all:Nnn { \@@_replace:NnNNNnn \q_@@_mark ? \@@_replace_next:w \__kernel_tl_gset:Nx } -\cs_generate_variant:Nn \tl_replace_once:Nnn { c } -\cs_generate_variant:Nn \tl_greplace_once:Nnn { c } -\cs_generate_variant:Nn \tl_replace_all:Nnn { c } -\cs_generate_variant:Nn \tl_greplace_all:Nnn { c } +\cs_generate_variant:Nn \tl_replace_once:Nnn { Nxx , c , cxx } +\cs_generate_variant:Nn \tl_greplace_once:Nnn { Nxx , c , cxx } +\cs_generate_variant:Nn \tl_replace_all:Nnn { Nxx , c , cxx } +\cs_generate_variant:Nn \tl_greplace_all:Nnn { Nxx , c , cxx } % \end{macrocode} % \end{macro} % \end{macro} @@ -2113,8 +2098,8 @@ { \tl_replace_once:Nnn #1 {#2} { } } \cs_new_protected:Npn \tl_gremove_once:Nn #1#2 { \tl_greplace_once:Nnn #1 {#2} { } } -\cs_generate_variant:Nn \tl_remove_once:Nn { c } -\cs_generate_variant:Nn \tl_gremove_once:Nn { c } +\cs_generate_variant:Nn \tl_remove_once:Nn { Nx , c , cx } +\cs_generate_variant:Nn \tl_gremove_once:Nn { Nx , c , cx } % \end{macrocode} % \end{macro} % \end{macro} @@ -2127,8 +2112,8 @@ { \tl_replace_all:Nnn #1 {#2} { } } \cs_new_protected:Npn \tl_gremove_all:Nn #1#2 { \tl_greplace_all:Nnn #1 {#2} { } } -\cs_generate_variant:Nn \tl_remove_all:Nn { c } -\cs_generate_variant:Nn \tl_gremove_all:Nn { c } +\cs_generate_variant:Nn \tl_remove_all:Nn { Nx , c , cx } +\cs_generate_variant:Nn \tl_gremove_all:Nn { Nx , c , cx } % \end{macrocode} % \end{macro} % \end{macro} @@ -2234,14 +2219,7 @@ % Returns \cs{c_true_bool} if and only if the two token list variables are % equal. % \begin{macrocode} -\prg_new_conditional:Npnn \tl_if_eq:NN #1#2 { p , T , F , TF } - { - \if_meaning:w #1 #2 - \prg_return_true: - \else: - \prg_return_false: - \fi: - } +\prg_new_eq_conditional:NNn \tl_if_eq:NN \cs_if_eq:NN { p , T , F , TF } \prg_generate_conditional_variant:Nnn \tl_if_eq:NN { Nc , c , cc } { p , TF , T , F } % \end{macrocode} @@ -2437,69 +2415,6 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}[EXP, noTF]{\tl_case:Nn, \tl_case:cn} -% \begin{macro}[EXP]{\@@_case:nnTF} -% \begin{macro}[EXP]{\@@_case:Nw} -% \begin{macro}[EXP]{\@@_case_end:nw} -% The aim here is to allow the case statement to be evaluated -% using a known number of expansion steps (two), and without -% needing to use an explicit \enquote{end of recursion} marker. -% That is achieved by using the test input as the final case, -% as this is always true. The trick is then to tidy up -% the output such that the appropriate case code plus either -% the \texttt{true} or \texttt{false} branch code is inserted. -% \begin{macrocode} -\cs_new:Npn \tl_case:Nn #1#2 - { - \exp:w - \@@_case:NnTF #1 {#2} { } { } - } -\cs_new:Npn \tl_case:NnT #1#2#3 - { - \exp:w - \@@_case:NnTF #1 {#2} {#3} { } - } -\cs_new:Npn \tl_case:NnF #1#2#3 - { - \exp:w - \@@_case:NnTF #1 {#2} { } {#3} - } -\cs_new:Npn \tl_case:NnTF #1#2 - { - \exp:w - \@@_case:NnTF #1 {#2} - } -\cs_new:Npn \@@_case:NnTF #1#2#3#4 - { \@@_case:Nw #1 #2 #1 { } \s_@@_mark {#3} \s_@@_mark {#4} \s_@@_stop } -\cs_new:Npn \@@_case:Nw #1#2#3 - { - \tl_if_eq:NNTF #1 #2 - { \@@_case_end:nw {#3} } - { \@@_case:Nw #1 } - } -\cs_generate_variant:Nn \tl_case:Nn { c } -\prg_generate_conditional_variant:Nnn \tl_case:Nn - { c } { T , F , TF } -% \end{macrocode} -% To tidy up the recursion, there are two outcomes. If there was a hit to -% one of the cases searched for, then |#1| is the code to insert, -% |#2| is the \emph{next} case to check on and |#3| is all of -% the rest of the cases code. That means that |#4| is the \texttt{true} -% branch code, and |#5| tidies up the spare \cs{s_@@_mark} and the -% \texttt{false} branch. On the other hand, if none of the cases matched -% then we arrive here using the \enquote{termination} case of comparing -% the search with itself. That means that |#1| is empty, |#2| is -% the first \cs{s_@@_mark} and so |#4| is the \texttt{false} code (the -% \texttt{true} code is mopped up by |#3|). -% \begin{macrocode} -\cs_new:Npn \@@_case_end:nw #1#2#3 \s_@@_mark #4#5 \s_@@_stop - { \exp_end: #1 #4 } -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% % \subsection{Mapping over token lists} % % \begin{macro} @@ -2642,10 +2557,10 @@ % % \subsection{Using token lists} % -% \begin{macro}{\tl_to_str:n, \tl_to_str:V, \tl_to_str:v} +% \begin{macro}{\tl_to_str:n, \tl_to_str:o, \tl_to_str:V, \tl_to_str:v} % Another name for a primitive: defined in \pkg{l3basics}. % \begin{macrocode} -\cs_generate_variant:Nn \tl_to_str:n { V , v } +\cs_generate_variant:Nn \tl_to_str:n { o , V , v } % \end{macrocode} % \end{macro} % @@ -3578,7 +3493,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\tl_show:n, \@@_show:n} +% \begin{macro}{\tl_show:n, \tl_show:x, \@@_show:n} % \begin{macro}[EXP]{\@@_show:w} % Many |show| functions are based on \cs{tl_show:n}. % The argument of \cs{tl_show:n} is line-wrapped using @@ -3598,6 +3513,7 @@ % \begin{macrocode} \cs_new_protected:Npn \tl_show:n #1 { \iow_wrap:nnnN { >~ \tl_to_str:n {#1} . } { } { } \@@_show:n } +\cs_generate_variant:Nn \tl_show:n { x } \cs_new_protected:Npn \@@_show:n #1 { \tl_set:Nf \l_@@_internal_a_tl { \@@_show:w #1 \s_@@_stop } @@ -3615,12 +3531,13 @@ % \end{macro} % \end{macro} % -% \begin{macro}{\tl_log:n} +% \begin{macro}{\tl_log:n, \tl_log:x} % Logging is much easier, simply line-wrap. The |>~| and trailing % period is there to match the output of \cs{tl_show:n}. % \begin{macrocode} \cs_new_protected:Npn \tl_log:n #1 { \iow_wrap:nnnN { > ~ \tl_to_str:n {#1} . } { } { } \iow_log:n } +\cs_generate_variant:Nn \tl_log:n { x } % \end{macrocode} % \end{macro} % diff --git a/macros/latex/contrib/l3kernel/l3token.dtx b/macros/latex/contrib/l3kernel/l3token.dtx index d8eeca44ab..818018d10e 100644 --- a/macros/latex/contrib/l3kernel/l3token.dtx +++ b/macros/latex/contrib/l3kernel/l3token.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % @@ -2071,11 +2071,8 @@ % \begin{macro}[pTF]{\token_if_eq_meaning:NN} % Check if the tokens |#1| and |#2| have same meaning. % \begin{macrocode} -\prg_new_conditional:Npnn \token_if_eq_meaning:NN #1#2 { p , T , F , TF } - { - \if_meaning:w #1 #2 - \prg_return_true: \else: \prg_return_false: \fi: - } +\prg_new_eq_conditional:NNn \token_if_eq_meaning:NN \cs_if_eq:NN + { p , T , F , TF } % \end{macrocode} % \end{macro} % diff --git a/macros/latex/contrib/l3kernel/l3unicode.dtx b/macros/latex/contrib/l3kernel/l3unicode.dtx index f667a37efd..48b121f20a 100644 --- a/macros/latex/contrib/l3kernel/l3unicode.dtx +++ b/macros/latex/contrib/l3kernel/l3unicode.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-05-22} +% \date{Released 2023-06-05} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/source3.pdf b/macros/latex/contrib/l3kernel/source3.pdf Binary files differindex ffe5d5de9b..5657c614fb 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 5d7b26ceff..5e66150ee1 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-05-22} +\date{Released 2023-06-05} \pagenumbering{roman} \maketitle diff --git a/macros/latex/contrib/l3kernel/source3body.tex b/macros/latex/contrib/l3kernel/source3body.tex index c9b0f3448d..a56e37e828 100644 --- a/macros/latex/contrib/l3kernel/source3body.tex +++ b/macros/latex/contrib/l3kernel/source3body.tex @@ -2,7 +2,7 @@ File: source3body.tex -Copyright (C) 1990-2012,2014-2021 The LaTeX Project +Copyright (C) 1990-2012,2014-2023 The LaTeX Project It may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of this @@ -607,6 +607,7 @@ used on top of \LaTeXe{} if \cs{outer} tokens are used in the arguments. \ExplSyntaxOn \clist_gput_right:Nn \g_docinput_clist { l3deprecation.dtx } +\clist_gput_right:Nn \g_docinput_clist { l3debug.dtx } \ExplSyntaxOff \endinput diff --git a/macros/latex/contrib/postit/doc/postit-doc.pdf b/macros/latex/contrib/postit/doc/postit-doc.pdf Binary files differindex ba919f1d19..369fc1219d 100644 --- a/macros/latex/contrib/postit/doc/postit-doc.pdf +++ b/macros/latex/contrib/postit/doc/postit-doc.pdf diff --git a/macros/latex/contrib/postit/doc/postit-doc.tex b/macros/latex/contrib/postit/doc/postit-doc.tex index cc6611fadf..f9ee072286 100644 --- a/macros/latex/contrib/postit/doc/postit-doc.tex +++ b/macros/latex/contrib/postit/doc/postit-doc.tex @@ -4,8 +4,8 @@ \documentclass[french,a4paper,11pt]{article} \usepackage[margin=2cm,includefoot]{geometry} -\def\TPversion{0.1} -\def\TPdate{31 Mai 2023} +\def\TPversion{0.1.1} +\def\TPdate{5 juin 2023} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath,amssymb} @@ -54,6 +54,12 @@ \AddThinSpaceBeforeFootnotes \FrenchFootnotes +\usepackage{listings} + +\usepackage{newverbs} +\newverbcommand{\motcletex}{\color{cyan!75!black}}{} +\newverbcommand{\packagetex}{\color{violet!75!black}}{} + \tcbuselibrary{listingsutf8} \newtcblisting{DemoCode}[1][]{% enhanced,width=0.95\linewidth,center,% @@ -81,7 +87,7 @@ morekeywords={PostIt,\MiniPostIt},% keywordstyle={\color{green!50!black}},% classoffset=3,% - morekeywords={Couleur,CouleurAttache,Attache,Largeur,Hauteur,Inclinaison,Ombre,Coin,DecalAttache,AlignementH,AlignementV,AlignementPostIt,Bordure},% + morekeywords={Couleur,CouleurAttache,Attache,Largeur,Hauteur,Inclinaison,Ombre,Coin,DecalAttache,AlignementH,AlignementV,AlignementPostIt,Bordure,ExtraMargeDroite,Rendu,Titre,PoliceTitre},% keywordstyle={\color{orange}} },% #1 @@ -102,7 +108,7 @@ } } -\newcommand\Cle[1]{{\bfseries\sffamily\textlangle #1\textrangle}} +\newcommand\Cle[1]{{\small\sffamily\textlangle \textcolor{orange}{#1}\textrangle}} \newcommand\cmaj[1]{\tcbox[vignetteMaJ]{#1}\xspace} \begin{document} @@ -126,7 +132,7 @@ \\ {\LARGE Des petits Post-It,} \\ \\ - {\LARGE avec \textsf{tcolorbox}.} \\ + {\LARGE avec \textsf{tcolorbox} ou \textsf{Ti\textit{k}Z}.} \\ \end{tabular} \bigskip @@ -159,11 +165,11 @@ Ceci est un petit Post-It ! Pour rappeler par exemple que \[(a+b)^2=a^2+2ab+b^2.\] \end{PostIt} -\begin{PostIt}[Largeur=8cm,Couleur=orange,Attache=Non,Inclinaison=-5,Coin,AlignementPostIt=center] +\begin{PostIt}[Rendu=tikz,Largeur=8cm,Couleur=orange,Attache=Trombone,CouleurAttache=blue,Inclinaison=-5,AlignementPostIt=center,Titre={- Titre -},PoliceTitre={\color{blue!50!black}\bfseries\small\sffamily}] \lipsum[1][1-4] \end{PostIt} \hfill -\begin{PostIt}[Hauteur=6cm,AlignementV=center,Couleur=pink,Attache=Trombone,CouleurAttache=blue,Inclinaison=15,Coin,AlignementPostIt=center] +\begin{PostIt}[Hauteur=6cm,AlignementV=center,Couleur=pink,Attache=Non,CouleurAttache=blue,Inclinaison=15,Coin,AlignementPostIt=center,Attache=Scotch] \lipsum[1][1-4] \end{PostIt} @@ -198,6 +204,10 @@ \section{Historique} +\verb|v0.1.1|~:~~~~Ajout d'un \motcletex!\vphantom! pour les \textit{mini-}Post-It (hauteur \textit{uniforme}) + Correction de bugs. + +\verb| |~:~~~~Moteurs de rendu alternatif en \TikZ{} + Ajout d'un titre éventuel . + \verb|v0.1.0|~:~~~~Version initiale. \newpage @@ -207,7 +217,7 @@ \subsection{Introduction} \begin{noteblock} -Le package propose de quoi afficher, dans son document \LaTeX, un Post-It (créé à l'aide de \texttt{tcolorbox}), avec la possibilité : +Le package propose de quoi afficher, dans son document \LaTeX, un Post-It (créé à l'aide de \packagetex!tcolorbox! ou de \packagetex!tikz!), avec la possibilité : \begin{itemize} \item de spécifier les dimensions, la couleur ; @@ -215,7 +225,7 @@ Le package propose de quoi afficher, dans son document \LaTeX, un Post-It (créà \item de personnaliser les bordure et le coin. \end{itemize} -Le package propose également de quoi créer un \textit{mini-}Post-It (créé à l'aide d'une \texttt{tcbox}), avec la possibilité de gérer la couleur et l'ombre. +Le package propose également de quoi créer un \textit{mini-}Post-It (créé à l'aide d'une \motcletex!tcbox!), avec la possibilité de gérer la couleur et l'ombre. \end{noteblock} \subsection{Chargement du package, packages utilisés} @@ -223,7 +233,7 @@ Le package propose également de quoi créer un \textit{mini-}Post-It (créé à \begin{importantblock} Le package se charge, de manière classique, dans le préambule. -Il n'existe pas d'option pour le package, et \texttt{xcolor} n'est pas chargé. +Il n'existe pas d'option pour le package, et \packagetex!xcolor! n'est pas chargé. \end{importantblock} \begin{DemoCode}[listing only] @@ -233,11 +243,17 @@ Il n'existe pas d'option pour le package, et \texttt{xcolor} n'est pas chargé. \end{DemoCode} \begin{noteblock} -\textsf{postit} charge les packages suivantes : +\packagetex!postit! charge les packages suivantes : \begin{itemize} - \item \texttt{tcolorbox} avec la librairie \texttt{\textit{tcbox}.skins} ; - \item \texttt{xstring} et \texttt{simplekv}. + \item \packagetex!tcolorbox! avec la librairie \packagetex!tcbox.skins! ; + \item les librairies \packagetex!tikz! : + \begin{itemize} + \item \packagetex!tikz.calc! ; + \item \packagetex!tikz.decorations! ; + \item \packagetex!tikz.decorations.pathmorphing! ; + \end{itemize} + \item \packagetex!settobox!, \packagetex!xstring! et \packagetex!simplekv!. \end{itemize} Il est compatible avec les compilations usuelles en \textsf{latex}, \textsf{pdflatex}, \textsf{lualatex} ou \textsf{xelatex}. @@ -246,7 +262,7 @@ Il est compatible avec les compilations usuelles en \textsf{latex}, \textsf{pdfl \subsection{Compatibilité} \begin{cautionblock} -Si un autre package charge \texttt{tcolorbox}, et notamment avec l'option \Cle{[most]}, il vaut mieux charger \texttt{postit} après, afin d'éviter un \textsf{option clash error\ldots}. +Si un autre package charge \packagetex!tcolorbox!, et notamment avec l'option \Cle{[most]}, il vaut mieux charger \packagetex!postit! après, afin d'éviter un \motcletex!option clash error...!. \end{cautionblock} \begin{DemoCode}[listing only] @@ -266,9 +282,9 @@ Si un autre package charge \texttt{tcolorbox}, et notamment avec l'option \Cle{[ \subsection{Environnement et fonctionnement global} \begin{cautionblock} -L'environnement dédié à la création du Post-It est \texttt{PostIt}. +L'environnement dédié à la création du Post-It est \packagetex!PostIt!. -Il fonctionne avec un système de clés, entre \texttt{[...]} et il est possible, entre \texttt{<...>} de spécifier des options à la \textsf{tcbox}, en langage \textsf{tcbox} ! +Il fonctionne avec un système de clés, entre \texttt{[...]} et il est possible, entre \texttt{<...>} de spécifier des options à la \motcletex!tcbox!, en langage \textsf{tcbox} (inutile avec le rendu en \motcletex!tikz!) ! \end{cautionblock} \begin{DemoCode}[listing only] @@ -279,39 +295,57 @@ Il fonctionne avec un système de clés, entre \texttt{[...]} et il est possible \end{DemoCode} \begin{noteblock} -Comme indiqué dans l'introduction, le Post-It est créé à l'aide d'un environnement \textsf{tcbox}. +Comme indiqué dans l'introduction, le Post-It est créé à l'aide d'un environnement \motcletex!tcbox! ou d'un environnement \motcletex!tikz!. -La majorité des (multiples) paramètres d'une \textsf{tcbox} sont fixés par le code, mais il est possible de spécifier certaines caractéristiques esthétiques du Post-It ! +La majorité des (multiples) paramètres d'une \motcletex!tcbox! et d'une figuure \motcletex!tikz! sont fixés par le code, mais il est possible de spécifier certaines caractéristiques esthétiques du Post-It ! \end{noteblock} \begin{DemoCode}[] -%sortie par défaut, avec un paragraphe issu du package lipsum +%sortie par défaut (rendu tcbox), avec un paragraphe issu du package lipsum \begin{PostIt} \lipsum[1][1-2] \end{PostIt} \end{DemoCode} +\begin{DemoCode}[] +%sortie rendu tikz, avec un paragraphe issu du package lipsum +\begin{PostIt}[Rendu=tikz] + \lipsum[1][1-2] +\end{PostIt} +%sortie rendu tikzv2, avec un paragraphe issu du package lipsum +\begin{PostIt}[Rendu=tikzv2] + \lipsum[1][1-2] +\end{PostIt} +\end{DemoCode} + \begin{tipblock} -Les éventuelles couleurs choisies devront être données de manière \textit{unique}, sans utiliser les \textit{mélanges} (avec \texttt{CouleurA!...!CouleurB}) que propose le package \texttt{xcolor}. +Les éventuelles couleurs choisies devront être données de manière \textit{unique}, sans utiliser les \textit{mélanges} (avec \motcletex|CouleurA!...!CouleurB|) que propose le package \packagetex!xcolor!. Toutefois, toute couleur précédemment définie pourra être utilisée pour le Post-It. \end{tipblock} \begin{tipblock} -Le Post-It créé pourra être intégré dans une \textsf{minipage} ou un \textsf{wrapstuff} si besoin. +Le Post-It créé pourra être intégré dans une \motcletex!minipage! ou un \motcletex!wrapstuff! si besoin. -Pour l'alignement horizontal, il est conseillé d'utiliser des commandes dédiées comme \texttt{\textbackslash hfill} ou des envrionnements dédiées comme \texttt{flush...}. +Pour l'alignement horizontal, il est conseillé d'utiliser des commandes dédiées comme \motcletex!\hfill! ou des environnements dédiés comme \motcletex!flush...!. \end{tipblock} +\begin{warningblock} +Avec une \textit{attache} qui "déborde" verticalement (rendu \textsf{tcbox}), il sera sans doute nécessaire d'ajuster l'espacement vertical précédant le Post-It pour éviter un éventuel chevauchement. +\end{warningblock} + \subsection{Clés et options} \begin{tipblock} Le premier argument, optionnel et entre \texttt{[...]}, propose les \Cle{clés} suivantes : \begin{itemize} - \item \Cle{Largeur} : largeur du Post-It ; \hfill{}défaut : \Cle{6cm} + \item \Cle{Largeur} : largeur (en cm) du Post-It ; \hfill{}défaut : \Cle{6cm} \item \Cle{Couleur} : couleur du Post-It (la bordure sera plus foncée) ; \hfill{}défaut : \Cle{yellow} - \item \Cle{Hauteur} : hauteur du Post-It (par défaut elle est \textit{automatique}) ; \hfill{}défaut : \Cle{auto} + \item \Cle{Hauteur} : hauteur (en cm si déclarée) du Post-It (par défaut elle est \textit{automatique}) ; + + \hfill{}défaut : \Cle{auto} + \item \cmaj{0.1.1} \Cle{Rendu} : moteur du rendu parmi \Cle{tcbox / tikz / tikv2} ; \hfill{}défaut : \Cle{tcbox} \item \Cle{Inclinaison} : inclinaison du Post-It ; \hfill{}défaut : \Cle{0} \item \Cle{Ombre} : booléen pour afficher une ombre portée ; \hfill{}défaut : \Cle{true} \item \Cle{Bordure} : booléen pour afficher une fine bordure ; \hfill{}défaut : \Cle{true} @@ -320,7 +354,12 @@ Le premier argument, optionnel et entre \texttt{[...]}, propose les \Cle{clés} \hfill{}défaut : \Cle{Punaise} \item \Cle{CouleurAttache} : couleur de l'attache ; \hfill{}défaut : \Cle{red} - \item \Cle{DecalAttache} : décalage horizontal de l'attache par rapport à sa position initiale (au centre pour la punaise, à 1~cm du bord droit pour le trombone) ; + \item \Cle{DecalAttache} : décalage horizontal (sans unité, mais en cm) de l'attache par rapport à sa position initiale (au centre pour la punaise, à 1~cm du bord droit pour le trombone) ; + + \hfill{}défaut : \Cle{0} + \item \cmaj{0.1.1} \Cle{Titre} : rajouter un titre (en 1ère ligne et/ou sous l'Attache) ; \hfill{}défaut : \Cle{vide} + \item \cmaj{0.1.1} \Cle{PoliceTitre} : police du titre ; \hfill{}défaut : \Cle{\textbackslash normalfont\textbackslash normalfont} + \item \cmaj{0.1.1} \Cle{ExtraMargeDroite} : rajoute (en rendu \packagetex!tikz!, et en cm) une marge à droite ; \hfill{}défaut : \Cle{0cm} \item \Cle{AlignementV} : gère l'alignement vertical dans le Post-It (parmi \Cle{top/center/bottom}) ; @@ -337,18 +376,35 @@ Le premier argument, optionnel et entre \texttt{[...]}, propose les \Cle{clés} \end{tipblock} \begin{tipblock} -Le second argument, optionnel et entre \texttt{<...>} correspond à des options spécifiques à passer à la \textsf{tcolorbox}, en langage \textsf{tcbox}. +Le second argument, optionnel et entre \texttt{<...>} correspond à des options spécifiques à passer à la \motcletex!tcolorbox!, en langage \textsf{tcbox} (inutile si le rendu est \motcletex!tikz!). Elles permettent de modifier localement des options non paramétrées par des clés présentées précédemment. \end{tipblock} \begin{DemoCode}[] -\begin{PostIt} +\begin{PostIt}%moteur de rendu tcbox (défaut) [Couleur=cyan,Attache=Trombone,Largeur=10cm,Inclinaison=10]<center,right=1.5cm> \lipsum[1][1-3] \end{PostIt} \end{DemoCode} +\begin{DemoCode}[] +\hfill\begin{PostIt}%moteur de rendu tikz + [Rendu=tikz,Couleur=violet,Largeur=9cm,Inclinaison=-10,Attache=Trombone, + CouleurAttache=black,ExtraMargeDroite=1cm,Titre={Petit Titre}, + PoliceTitre={\color{white}\bfseries\small\sffamily}] +\lipsum[1][1-3] +\end{PostIt}\hfill~ +\end{DemoCode} + +\begin{DemoCode}[] +\hfill\begin{PostIt}%moteur de rendu tikzv2 + [Rendu=tikzv2,Couleur=orange,Largeur=9cm,Inclinaison=-10,Attache=Scotch, Titre={Essai}, + PoliceTitre={\color{blue!50!black}\bfseries\itshape\small\ttfamily}] +\lipsum[1][1-3] +\end{PostIt}\hfill~ +\end{DemoCode} + \pagebreak \subsection{Exemples} @@ -365,17 +421,48 @@ Elles permettent de modifier localement des options non paramétrées par des cl \end{DemoCode} \begin{DemoCode}[] +%usepackage{wrapstuff} +\begin{wrapstuff}[r,top=1] +\begin{PostIt}[Inclinaison=5,Rendu=tikz,Couleur=pink, CouleurAttache=blue,Bordure=false] +\lipsum[1][1-2] +\end{PostIt} +\end{wrapstuff} + +\lipsum[1] +\end{DemoCode} + +\begin{DemoCode}[] +%usepackage{wrapstuff} +\begin{wrapstuff}[r,top=1] +\begin{PostIt}[Inclinaison=5,Rendu=tikzv2,Attache=Scotch,Couleur=pink] +\lipsum[1][1-2] +\end{PostIt} +\end{wrapstuff} + +\lipsum[1] +\end{DemoCode} + +\begin{DemoCode}[] Un petit Post-It aligné à droite, et centré verticalement : % -\hfill\begin{PostIt}[Inclinaison=-10,Couleur=orange,Largeur=5cm,Hauteur=5cm, AlignementV=center,Coin,CouleurAttache=yellow, DecalAttache=-1cm,AlignementPostIt=center] +\hfill\begin{PostIt}[Inclinaison=-10,Couleur=orange,Largeur=5cm,Hauteur=5cm, AlignementV=center,Coin,CouleurAttache=yellow, DecalAttache=-1,AlignementPostIt=center] \textsf{\small\lipsum[1][1-2]} \[\mathsf{\displaystyle\sum_{k=1}^{n} k = \dfrac{n(n+1)}{2}}\] - \end{PostIt} \end{DemoCode} -\vfill~ +%\begin{DemoCode}[] +%Un petit Post-It aligné à droite, et centré verticalement : +%% +%\hfill\begin{PostIt}[Inclinaison=-10,Couleur=orange,Largeur=5cm,Hauteur=5cm, AlignementV=center,Rendu=tikz,Attache=Non,AlignementPostIt=center] +% +%\textsf{\small\lipsum[1][1-2]} +%\[\mathsf{\displaystyle\sum_{k=1}^{n} k = \dfrac{n(n+1)}{2}}\] +%\end{PostIt} +%\end{DemoCode} +% +%\vfill~ \pagebreak @@ -390,7 +477,11 @@ Elle fonctionne sous forme autonome, avec uniquement la couleur en \Cle{option}. \smallskip -Cette fois-ci le \textit{mini-} Post-It est créé à l'aide d'une commande \textsf{tcbox}. +Cette fois-ci le \textit{mini-} Post-It est créé à l'aide d'une commande \motcletex!tcbox!. + +\smallskip + +Les dimensions ne sont pas modifiables, et un \motcletex!\vphantom! est inséré au début de la \motcletex!tcbox! afin d'harmoniser la hauteur. \end{cautionblock} \begin{DemoCode}[listing only] @@ -410,9 +501,149 @@ La couleur (\Cle{yellow}), est gérée par l'argument optionnel entre \texttt{[. \begin{DemoCode}[] On va travailler sur une équation diophantienne du type $ax+by=c$. -On va utiliser le \MiniPostIt*[orange]{théorème de Bezout} puis le \MiniPostIt{théorème de Gauss}. +On va utiliser le \MiniPostIt*[orange]{théorème de Bezout}, le \MiniPostIt{théorème de Gauss} sans oublier la \MiniPostIt*[cyan]{réciproque}. Le schéma de résolution est classique, et assez simple à appréhender ! \end{DemoCode} +\pagebreak + +\section{Résumé des styles} + +\subsection{Moteur de rendu tcbox} + +\begin{DemoCode}[text only] +\hfill\begin{PostIt} +\texttt{Ombre/Épingle/Bordure} +\end{PostIt} +\begin{PostIt}[Ombre=false] +\texttt{Épingle/Bordure} +\end{PostIt}\hfill~ + +\medskip + +\hfill\begin{PostIt}[Bordure=false] +\texttt{Ombre/Épingle} +\end{PostIt} +\begin{PostIt}[Bordure=false,Ombre=false] +\texttt{Épingle} +\end{PostIt}\hfill~ + +\medskip + +\hfill\begin{PostIt}[Attache=Trombone] +\texttt{Ombre/Trombone/Bordure}\\ +~ +\end{PostIt} +\begin{PostIt}[Attache=Scotch] +\texttt{Ombre/Scotch/Bordure}\\ +~ +\end{PostIt}\hfill~ + +\medskip + +\hfill\begin{PostIt}[Attache=Non] +\texttt{Ombre/Bordure} +\end{PostIt} +\begin{PostIt}[Coin,Attache=Non] +\texttt{Ombre/Bordure/Coin} +\end{PostIt}\hfill~ + +\vspace{1cm} + +\hfill\begin{PostIt}[Titre={Lipsum[1][1-4]},PoliceTitre={\large\sffamily},Inclinaison=5,Couleur=pink,Hauteur=6cm,Attache=Scotch,AlignementV=center,Coin] +\lipsum[1][1-4] +\end{PostIt}\hfill~ +\end{DemoCode} + +\pagebreak + +\subsection{Moteur de rendu tikz} + +\begin{DemoCode}[text only] +\hfill\begin{PostIt}[Rendu=tikz] +\texttt{Ombre/Épingle/Bordure} +\end{PostIt} +\begin{PostIt}[Ombre=false,Rendu=tikz] +\texttt{Épingle/Bordure} +\end{PostIt}\hfill~ + +\medskip + +\hfill\begin{PostIt}[Bordure=false,Rendu=tikz] +\texttt{Ombre/Épingle} +\end{PostIt} +\begin{PostIt}[Bordure=false,Ombre=false,Rendu=tikz] +\texttt{Épingle} +\end{PostIt}\hfill~ + +\medskip + +\hfill\begin{PostIt}[Attache=Trombone,Rendu=tikz] +\texttt{Ombre/Trombone/Bordure}\\ +~ +\end{PostIt} +\begin{PostIt}[Attache=Scotch,Rendu=tikz] +\texttt{Ombre/Scotch/Bordure}\\ +~ +\end{PostIt}\hfill~ + +\medskip + +\hfill\begin{PostIt}[Attache=Non,Rendu=tikz] +\texttt{Ombre/Bordure} +\end{PostIt}\hfill~ + +\vspace{1cm} + +\hfill\begin{PostIt}[Rendu=tikz,Titre={Lipsum[1][1-4]},PoliceTitre={\large\sffamily},Inclinaison=5,Couleur=pink,Hauteur=6cm,Attache=Scotch,AlignementV=center,Coin] +\lipsum[1][1-4] +\end{PostIt}\hfill~ +\end{DemoCode} + +\subsection{Moteur de rendu tikzv2} + +\begin{DemoCode}[text only] +\hfill\begin{PostIt}[Rendu=tikzv2] +\texttt{Ombre/Épingle/Bordure} +\end{PostIt} +\begin{PostIt}[Ombre=false,Rendu=tikzv2] +\texttt{Épingle/Bordure} +\end{PostIt}\hfill~ + +\medskip + +\hfill\begin{PostIt}[Bordure=false,Rendu=tikzv2] +\texttt{Ombre/Épingle} +\end{PostIt} +\begin{PostIt}[Bordure=false,Ombre=false,Rendu=tikzv2] +\texttt{Épingle} +\end{PostIt}\hfill~ + +\medskip + +\hfill\begin{PostIt}[Attache=Trombone,Rendu=tikzv2] +\texttt{Ombre/Trombone/Bordure}\\ +~ +\end{PostIt} +\begin{PostIt}[Attache=Scotch,Rendu=tikzv2] +\texttt{Ombre/Scotch/Bordure}\\ +~ +\end{PostIt}\hfill~ + +\medskip + +\hfill\begin{PostIt}[Attache=Non,Rendu=tikzv2] +\texttt{Ombre/Bordure} +\end{PostIt}\hfill~ + +\vspace{1cm} + +\hfill\begin{PostIt}[Rendu=tikzv2,Titre={Lipsum[1][1-4]},PoliceTitre={\large\sffamily},Inclinaison=5,Couleur=pink,Hauteur=6cm,Attache=Scotch,AlignementV=center,Coin] +\lipsum[1][1-4] +\end{PostIt}\hfill~ +\end{DemoCode} + + + \end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/postit/tex/postit.sty b/macros/latex/contrib/postit/tex/postit.sty index 76497257df..13dbd10ace 100644 --- a/macros/latex/contrib/postit/tex/postit.sty +++ b/macros/latex/contrib/postit/tex/postit.sty @@ -3,15 +3,32 @@ % or later, see http://www.latex-project.org/lppl.txtf \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{postit}[2023/05/31 0.1.0 Utiliser des post-it] +\ProvidesPackage{postit}[2023/06/05 0.1.1 Utiliser des post-it] +%0.1.1 Ajout d'un \vphantom pour les mini-post-it + moteur de rendu tikz en supplément %0.1.0 Version initiale %------Packages utiles \RequirePackage{tcolorbox} \RequirePackage{simplekv} \RequirePackage{xstring} +\RequirePackage{settobox} %------Librairies \tcbuselibrary{skins} +\usetikzlibrary{calc,positioning,decorations,decorations.pathmorphing} + +%------variables utiles +\newsavebox{\maboitepostit} +\newlength{\HauteurEssaiTexte} +\def\OffsetOmbreA{3pt} +\def\OffsetOmbreB{2pt} +\def\OffsetOmbreC{1pt} +\def\MarginHGPostIt{0.25} +\def\MarginHDPostIt{0.55} +\def\MarginVHPostIt{3mm} +\def\MarginVBPostIt{2mm} +\def\LargeurStotch{2.5} +\def\HauteurScotch{1} +\def\PostItBorder{0.1mm} %------Clés \defKV[postit]{% @@ -25,7 +42,11 @@ Attache=\def\PostItDeco{#1},% AlignementV=\def\PostItAlignV{#1},% AlignementH=\def\PostItAlignH{#1},% - AlignementPostIt=\def\PostItAlignPostIt{#1} + AlignementPostIt=\def\PostItAlignPostIt{#1},% + Rendu=\def\PostItRender{#1},% + ExtraMargeDroite=\def\PostItExtraMargin{#1},% + Titre=\def\PostItTitre{#1},% + PoliceTitre=\def\PostItPoliceTitre{#1} } \setKVdefault[postit]{% @@ -36,41 +57,54 @@ EchelleAttache=1,% Ombre=true,% Hauteur=auto,% - DecalAttache=0cm,% + DecalAttache=0,% Attache=Punaise,% AlignementV=top,% AlignementH=justify,% AlignementPostIt=bottom,% Bordure=true,% - Coin=false + Coin=false,% + Rendu=tcbox,% + ExtraMargeDroite=0cm,% + Titre={},% + PoliceTitre=\normalfont\normalsize } %------Style principal tcolorbox \tcbset{testpostit/.style={% - on line,enhanced,colback=\PostItCoul!50,colframe=\PostItCoul!50!black,boxrule=\PostItBorder,width=\PostItLarg,sharp corners,halign=\PostItAlignH,valign=\PostItAlignV,% + on line,enhanced,colframe=\PostItCoul!50!black,boxrule=\PostItBorder,width=\PostItLarg,sharp corners,halign=\PostItAlignH,valign=\PostItAlignV,% + %colback=\PostItCoul!50,% finish={\CommandeDecoration},tikz={rotate=\PostItIncline,transform shape},% box align=\PostItAlignPostIt,% + interior style={top color=\PostItCoul!50,bottom color=\PostItCoul!33},% nobeforeafter }% } %------Gestion du coin \NewDocumentCommand\CoinPostIt{ }{% - \path[line width=\PostItBorder,fill=\PostItCoul!80!black] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2); + \path[line width=\PostItBorder,fill=\PostItCoul!66] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2); \path[line width=\PostItBorder,draw=\PostItCoul!50!black,shorten <=-0.05mm,shorten >=-0.05mm,color=\PostItCoul!50!black] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2); } %------Gestion du trombone \NewDocumentCommand\TrombonePostIt{ }{% - \begin{scope}[shift={([xshift={-1cm+\PostItDeclClip}]frame.north east)},rotate=-15,scale={\PostItCoulScaleClip*0.55},line cap=round] + \begin{scope}[shift={([xshift={-1cm+\PostItDeclClip cm}]frame.north east)},rotate=-15,scale={\PostItCoulScaleClip*0.55},line cap=round] \draw[line width=0.81mm,draw=\PostItCoulClip!66] (0,0) --++ (0,0.0) arc (180:0:3.5mm) --++ (0,-1.75) arc (0:-180:3mm) --++ (0,1.25) ; \draw[line width=0.27mm,draw=\PostItCoulClip!33] (0,0) --++ (0,0.0) arc (180:0:3.5mm) --++ (0,-1.75) arc (0:-180:3mm) --++ (0,1.25) ; \end{scope} } +%------Gestion du scotch +\NewDocumentCommand\ScotchPostIt{ }{% + \begin{scope}[shift={([xshift=\PostItDeclClip cm]frame.north)},scale={\PostItCoulScaleClip*0.65},line cap=round,rotate=3] + \draw[thin,gray!50,fill=lightgray,fill opacity=0.75] ({-0.5*\LargeurStotch},{-0.5*\HauteurScotch}) to ({0.5*\LargeurStotch},{-0.5*\HauteurScotch}) decorate [decoration={zigzag,segment length=2pt,amplitude=0.5pt}] {to ({0.5*\LargeurStotch},{0.5*\HauteurScotch})} to ({-0.5*\LargeurStotch},{0.5*\HauteurScotch}) decorate [decoration={zigzag,segment length=2pt,amplitude=0.5pt}] {to cycle} ; + \end{scope} +} + %------Gestion de la punaise \NewDocumentCommand\EpinglePostIt{ }{% - \begin{scope}[shift={([xshift=\PostItDeclClip,yshift=-0.5cm]frame.north)},scale={\PostItCoulScaleClip*0.55},rotate=-40] + \begin{scope}[shift={([xshift=\PostItDeclClip cm,yshift=-0.5cm]frame.north)},scale={\PostItCoulScaleClip*0.55},rotate=-40] \begin{scope}[rotate=-35] \draw[blue!10!gray,line cap=round,line width=2pt] (0,0) -- ++(90:0.85); \fill[blue!10!gray,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ; @@ -81,58 +115,444 @@ \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ; \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4); \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3); - \end{scope} } %------Environnement principal -\NewDocumentEnvironment{PostIt}{ O{} D<>{} }% +\NewDocumentEnvironment{PostIt}{ O{} D<>{} +b }% {% \restoreKV[postit]% \setKV[postit]{#1}% - %choix de la déco et paramètrage - \def\CommandeDecoration{\EpinglePostIt}% - \def\MarginOffsetV{4mm}% - \IfStrEq{\PostItDeco}{Trombone}% - {\def\CommandeDecoration{\TrombonePostIt}\def\MarginOffsetV{0mm}}% - {}% - \IfStrEq{\PostItDeco}{Non}% - {\def\CommandeDecoration{}\def\MarginOffsetV{0mm}}% - {}% - %cas de la bordure - \ifboolKV[postit]{Bordure}% - {% - \def\PostItBorder{0.1mm}% - \tcbset{bordure/.style={}}% - }% + \IfStrEq{\PostItRender}{tcbox}% {% - \def\PostItBorder{0mm}% - \tcbset{bordure/.style={frame hidden}}% - }% - %cas du coin - \ifboolKV[postit]{Coin}% + %choix de la déco et paramètrage + \def\CommandeDecoration{\EpinglePostIt}% + \def\MarginOffsetV{4mm}% + \IfStrEq{\PostItDeco}{Trombone}% + {\def\CommandeDecoration{\TrombonePostIt}\def\MarginOffsetV{0mm}}% + {}% + \IfStrEq{\PostItDeco}{Scotch}% + {\def\CommandeDecoration{\ScotchPostIt}\def\MarginOffsetV{1mm}}% + {}% + \IfStrEq{\PostItDeco}{Non}% + {\def\CommandeDecoration{}\def\MarginOffsetV{0mm}}% + {}% + %cas de la bordure + \ifboolKV[postit]{Bordure}% + {% + \def\PostItBorder{0.1mm}% + \tcbset{bordure/.style={}}% + }% + {% + \def\PostItBorder{0mm}% + \tcbset{bordure/.style={frame hidden}}% + }% + %cas du coin + \ifboolKV[postit]{Coin}% + {% + \tcbset{coincoin/.style={rounded corners=southeast,arc is angular,arc=3mm,underlay={\CoinPostIt}}}% + }% + {% + \tcbset{coincoin/.style={}}% + }% + %en fonction de hauteur auto ou non + \IfStrEq{\PostItHauteur}{auto}% + {% + \ifboolKV[postit]{Ombre}% + {\begin{tcolorbox}[testpostit,#2,bordure,coincoin,drop fuzzy shadow,top={2mm+\MarginOffsetV}]}% + {\begin{tcolorbox}[testpostit,#2,bordure,coincoin,top={2mm+\MarginOffsetV}]}% + }% + {% + \ifboolKV[postit]{Ombre}% + {\begin{tcolorbox}[testpostit,#2,bordure,coincoin,drop fuzzy shadow,height=\PostItHauteur,top={2mm+\MarginOffsetV}]}% + {\begin{tcolorbox}[testpostit,#2,bordure,coincoin,height=\PostItHauteur,top={2mm+\MarginOffsetV}]}% + }% + \IfStrEq{\PostItTitre}{}% + {}% + {% + \hfill{}{\PostItPoliceTitre\PostItTitre}\hfill~\\% + }% + #3% + \end{tcolorbox}% + }{}% + \IfStrEq{\PostItRender}{tikz}% {% - \tcbset{coincoin/.style={rounded corners=southeast,arc is angular,arc=3mm,underlay={\CoinPostIt}}}% - }% + \StrDel{\PostItLarg}{cm}[\PostItLarg]% + \StrDel{\PostItExtraMargin}{cm}[\PostItExtraMargin]% + \def\LargeurTextePostIt{\fpeval{\PostItLarg-\MarginHGPostIt-\MarginHDPostIt}}% + \def\TextePostIt{% + \IfStrEq{\PostItTitre}{}{}{\hfill{}{\PostItPoliceTitre\PostItTitre}\hfill~\\}% + #3% + }% + \IfStrEq{\PostItHauteur}{auto}% + {% + \sbox{\maboitepostit}{\parbox{\LargeurTextePostIt cm}{\TextePostIt}}% + \settoboxtotalheight{\HauteurEssaiTexte}{\maboitepostit}% + \addtolength\HauteurEssaiTexte{\MarginVHPostIt}\addtolength\HauteurEssaiTexte{\MarginVBPostIt}% + \IfStrEq{\PostItDeco}{Scotch}% + {\addtolength\HauteurEssaiTexte{0.4cm}}% + {}% + \IfStrEq{\PostItDeco}{Trombone}% + {\addtolength\HauteurEssaiTexte{0.2cm}}% + {}% + \IfStrEq{\PostItDeco}{Punaise}% + {\addtolength\HauteurEssaiTexte{0.6cm}}% + {}% + \IfStrEq{\PostItDeco}{Non}% + {\addtolength\HauteurEssaiTexte{0.2cm}}% + {}% + \def\hauteur{\the\HauteurEssaiTexte}% + }% + {% + \def\hauteur{\PostItHauteur}% + }% + \def\OptionTikzPostIt{current bounding box.south}% + \IfStrEq{\PostItAlignPostIt}{center}% + {\def\OptionTikzPostIt{current bounding box.center}}{}% + \IfStrEq{\PostItAlignPostIt}{top}% + {\def\OptionTikzPostIt{current bounding box.north}}{}% + \begin{tikzpicture}[baseline=(\OptionTikzPostIt),rotate=\PostItIncline,line join=bevel,line cap=round] + %tracé + %ombre1/2/3 + \ifboolKV[postit]{Ombre}% + {% + \draw[draw=none,fill=gray,semithick,fill=gray,fill opacity=0.5] + (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) + to[out=-90,in=104] ++ ($({0.15},{-\hauteur+0.15})+(\OffsetOmbreA,-\OffsetOmbreA)$) + to[out=182,in=-2] ++ ({-0.15-\PostItLarg-\PostItExtraMargin},{0.13}) + -- cycle ; + \draw[draw=none,fill=gray!50!black,semithick,fill=gray!50!black,fill opacity=0.5] + (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) + to[out=-90,in=104] ++ ($({0.15},{-\hauteur+0.15})+(\OffsetOmbreB,-\OffsetOmbreB)$) + to[out=182,in=-2] ++ ({-0.15-\PostItLarg-\PostItExtraMargin},{0.13}) + -- cycle ; + \draw[draw=none,fill=black,semithick,fill=black,fill opacity=0.5] + (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) + to[out=-90,in=104] ++ ($({0.15},{-\hauteur+0.15})+(\OffsetOmbreC,-\OffsetOmbreC)$) + to[out=182,in=-2] ++ ({-0.15-\PostItLarg-\PostItExtraMargin},{0.13}) + -- cycle ; + }% + {}% + %postit + \ifboolKV[postit]{Bordure} + {% + \shadedraw[draw=\PostItCoul!50!black,line width=0.1mm,top color=\PostItCoul!50,bottom color=\PostItCoul!33] + (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) + to[out=-90,in=104] ++ ({0.15},{-\hauteur+0.15}) + to[out=182,in=-2] ++ ({-0.15-\PostItLarg-\PostItExtraMargin},{0.13}) + -- cycle ; + }% + {% + \shadedraw[draw=none,top color=\PostItCoul!50,bottom color=\PostItCoul!33] + (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) + to[out=-90,in=104] ++ ({0.15},{-\hauteur+0.15}) + to[out=182,in=-2] ++ ({-0.15-\PostItLarg-\PostItExtraMargin},{0.13}) + -- cycle ; + }% + \IfStrEq{\PostItHauteur}{auto}% + {% + \IfStrEq{\PostItDeco}{Punaise}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.4cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Non}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Trombone}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Scotch}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + }% + {% + \IfStrEq{\PostItAlignV}{top} + {% + \IfStrEq{\PostItDeco}{Punaise}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.4cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Non}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Trombone}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Scotch}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + }% + {}% + \IfStrEq{\PostItAlignV}{center} + {% + \IfStrEq{\PostItDeco}{Punaise}% + {% + \draw ({0.5*\PostItLarg},{-0.5*\hauteur-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Non}% + {% + \draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Trombone}% + {% + \draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Scotch}% + {% + \draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + }% + {}% + \IfStrEq{\PostItAlignV}{bottom} + {% + \draw ({0.5*\PostItLarg},{-\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,above=0.6cm,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + }% + %affichage de la punaise + \IfStrEq{\PostItDeco}{Punaise}% + {% + \begin{scope}[shift={(0.5*\PostItLarg+0.5*\PostItExtraMargin+\PostItDeclClip,-0.49)},scale={0.55},rotate=-40] + \begin{scope}[rotate=-35] + \draw[blue!10!gray,line cap=round,line width=2pt] (0,0) -- ++(90:0.85); + \fill[blue!10!gray,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ; + \fill[blue!10!gray,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4); + \fill[blue!10!gray,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3); + \end{scope} + \draw[line cap=round,line width=2pt] (0,0) -- ++(90:0.85); + \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ; + \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4); + \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3); + \end{scope} + }% + {}% + %affichage du trombone + \IfStrEq{\PostItDeco}{Trombone}% + {% + \begin{scope}[shift={(\PostItLarg+\PostItExtraMargin-1+\PostItDeclClip,0)},rotate=-15,scale={\PostItCoulScaleClip*0.55},line cap=round] + \draw[line width=0.81mm,draw=\PostItCoulClip!66] (0,0) --++ (0,0.0) arc (180:0:3.5mm) --++ (0,-1.75) arc (0:-180:3mm) --++ (0,1.25) ; + \draw[line width=0.27mm,draw=\PostItCoulClip!33] (0,0) --++ (0,0.0) arc (180:0:3.5mm) --++ (0,-1.75) arc (0:-180:3mm) --++ (0,1.25) ; + \end{scope} + }% + {}% + %affichage du scotch + \IfStrEq{\PostItDeco}{Scotch}% + {% + \begin{scope}[shift={(0.5*\PostItLarg+0.5*\PostItExtraMargin+\PostItDeclClip,0)},scale={0.65},rotate=3,line cap=round] + \draw[thin,gray!50,fill=lightgray,fill opacity=0.75] ({-0.5*\LargeurStotch},{-0.5*\HauteurScotch}) to ({0.5*\LargeurStotch},{-0.5*\HauteurScotch}) decorate [decoration={zigzag,segment length=2pt,amplitude=0.5pt}] {to ({0.5*\LargeurStotch},{0.5*\HauteurScotch})} to ({-0.5*\LargeurStotch},{0.5*\HauteurScotch}) decorate [decoration={zigzag,segment length=2pt,amplitude=0.5pt}] {to cycle} ; + \end{scope} + }% + {}% + \end{tikzpicture}% + }{}% + \IfStrEq{\PostItRender}{tikzv2}% {% - \tcbset{coincoin/.style={}}% - }% - %en fonction de hauteur auto ou non - \IfStrEq{\PostItHauteur}{auto}% - {% - \ifboolKV[postit]{Ombre}% - {\begin{tcolorbox}[testpostit,#2,bordure,coincoin,drop fuzzy shadow,top={2mm+\MarginOffsetV}]}% - {\begin{tcolorbox}[testpostit,#2,bordure,coincoin,top={2mm+\MarginOffsetV}]}% - }% - {% - \ifboolKV[postit]{Ombre}% - {\begin{tcolorbox}[testpostit,#2,bordure,coincoin,drop fuzzy shadow,height=\PostItHauteur,top={2mm+\MarginOffsetV}]}% - {\begin{tcolorbox}[testpostit,#2,bordure,coincoin,height=\PostItHauteur,top={2mm+\MarginOffsetV}]}% - }% + \StrDel{\PostItLarg}{cm}[\PostItLarg]% + \StrDel{\PostItExtraMargin}{cm}[\PostItExtraMargin]% + \def\LargeurTextePostIt{\fpeval{\PostItLarg-\MarginHGPostIt-\MarginHDPostIt}}% + \def\TextePostIt{% + \IfStrEq{\PostItTitre}{}{}{\hfill{}{\PostItPoliceTitre\PostItTitre}\hfill~\\}% + #3% + }% + \IfStrEq{\PostItHauteur}{auto}% + {% + \sbox{\maboitepostit}{\parbox{\LargeurTextePostIt cm}{\TextePostIt}}% + \settoboxtotalheight{\HauteurEssaiTexte}{\maboitepostit}% + \addtolength\HauteurEssaiTexte{\MarginVHPostIt}\addtolength\HauteurEssaiTexte{\MarginVBPostIt}% + \IfStrEq{\PostItDeco}{Scotch}% + {\addtolength\HauteurEssaiTexte{0.4cm}}% + {}% + \IfStrEq{\PostItDeco}{Trombone}% + {\addtolength\HauteurEssaiTexte{0.2cm}}% + {}% + \IfStrEq{\PostItDeco}{Punaise}% + {\addtolength\HauteurEssaiTexte{0.6cm}}% + {}% + \IfStrEq{\PostItDeco}{Non}% + {\addtolength\HauteurEssaiTexte{0.2cm}}% + {}% + \def\hauteur{\the\HauteurEssaiTexte}% + }% + {% + \def\hauteur{\PostItHauteur}% + }% + \def\OptionTikzPostIt{current bounding box.south}% + \IfStrEq{\PostItAlignPostIt}{center}% + {\def\OptionTikzPostIt{current bounding box.center}}{}% + \IfStrEq{\PostItAlignPostIt}{top}% + {\def\OptionTikzPostIt{current bounding box.north}}{}% + \begin{tikzpicture}[baseline=(\OptionTikzPostIt),rotate=\PostItIncline,line join=bevel,line cap=round] + %tracé + %ombre1/2/3 + \ifboolKV[postit]{Ombre}% + {% + \draw[draw=none,fill=gray,semithick,fill=gray,fill opacity=0.5] + (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) + to[out=-90,in=91] ++ ($({0.05},{-\hauteur-0.05})+(2pt,-2pt)$) + --++ ($({-\PostItLarg-\PostItExtraMargin-0.1},{0})+(-4pt,0)$) + to[out=89,in=-90] (0,0) ; + \draw[draw=none,fill=gray!50!black,semithick,fill=gray!50!black,fill opacity=0.5] + (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) + to[out=-90,in=91] ++ ($({0.05},{-\hauteur-0.05})+(1.25pt,-1.25pt)$) + --++ ($({-\PostItLarg-\PostItExtraMargin-0.1},{0})+(-2.5pt,0)$) + to[out=89,in=-90] (0,0) ; + \draw[draw=none,fill=black,semithick,fill=black,fill opacity=0.5] + (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) + to[out=-90,in=91] ++ ($({0.05},{-\hauteur-0.05})+(0.5pt,-0.5pt)$) + --++ ($({-\PostItLarg-\PostItExtraMargin-0.1},{0})+(-1pt,0)$) + to[out=89,in=-90] (0,0) ; + }% + {}% + %postit + \ifboolKV[postit]{Bordure} + {% + \shadedraw[draw=\PostItCoul!50!black,line width=0.1mm,top color=\PostItCoul!50,bottom color=\PostItCoul!33] + (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) + to[out=-90,in=91] ++ ({0.05},{-\hauteur-0.05}) + --++ ({-\PostItLarg-\PostItExtraMargin-0.1},{0}) + to[out=89,in=-90] (0,0) ; + }% + {% + \shadedraw[draw=none,top color=\PostItCoul!50,bottom color=\PostItCoul!33] + (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0) + to[out=-90,in=91] ++ ({0.05},{-\hauteur-0.05}) + --++ ({-\PostItLarg-\PostItExtraMargin-0.1},{0}) + to[out=89,in=-90] (0,0) ; + }% + \IfStrEq{\PostItHauteur}{auto}% + {% + \IfStrEq{\PostItDeco}{Punaise}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.4cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Non}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Trombone}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Scotch}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + }% + {% + \IfStrEq{\PostItAlignV}{top} + {% + \IfStrEq{\PostItDeco}{Punaise}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.4cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Non}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Trombone}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Scotch}% + {% + \draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + }% + {}% + \IfStrEq{\PostItAlignV}{center} + {% + \IfStrEq{\PostItDeco}{Punaise}% + {% + \draw ({0.5*\PostItLarg},{-0.5*\hauteur-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Non}% + {% + \draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Trombone}% + {% + \draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + \IfStrEq{\PostItDeco}{Scotch}% + {% + \draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + }% + {}% + \IfStrEq{\PostItAlignV}{bottom} + {% + \draw ({0.5*\PostItLarg},{-\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,above=0.6cm,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ; + }% + {}% + }% + %affichage de la punaise + \IfStrEq{\PostItDeco}{Punaise}% + {% + \begin{scope}[shift={(0.5*\PostItLarg+0.5*\PostItExtraMargin+\PostItDeclClip,-0.49)},scale={0.55},rotate=-40] + \begin{scope}[rotate=-35] + \draw[blue!10!gray,line cap=round,line width=2pt] (0,0) -- ++(90:0.85); + \fill[blue!10!gray,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ; + \fill[blue!10!gray,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4); + \fill[blue!10!gray,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3); + \end{scope} + \draw[line cap=round,line width=2pt] (0,0) -- ++(90:0.85); + \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ; + \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4); + \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3); + \end{scope} + }% + {}% + %affichage du trombone + \IfStrEq{\PostItDeco}{Trombone}% + {% + \begin{scope}[shift={(\PostItLarg+\PostItExtraMargin-1+\PostItDeclClip,0)},rotate=-15,scale={\PostItCoulScaleClip*0.55},line cap=round] + \draw[line width=0.81mm,draw=\PostItCoulClip!66] (0,0) --++ (0,0.0) arc (180:0:3.5mm) --++ (0,-1.75) arc (0:-180:3mm) --++ (0,1.25) ; + \draw[line width=0.27mm,draw=\PostItCoulClip!33] (0,0) --++ (0,0.0) arc (180:0:3.5mm) --++ (0,-1.75) arc (0:-180:3mm) --++ (0,1.25) ; + \end{scope} + }% + {}% + %affichage du scotch + \IfStrEq{\PostItDeco}{Scotch}% + {% + \begin{scope}[shift={(0.5*\PostItLarg+0.5*\PostItExtraMargin+\PostItDeclClip,0)},scale={0.65},rotate=3,line cap=round] + \draw[thin,gray!50,fill=lightgray,fill opacity=0.75] ({-0.5*\LargeurStotch},{-0.5*\HauteurScotch}) to ({0.5*\LargeurStotch},{-0.5*\HauteurScotch}) decorate [decoration={zigzag,segment length=2pt,amplitude=0.5pt}] {to ({0.5*\LargeurStotch},{0.5*\HauteurScotch})} to ({-0.5*\LargeurStotch},{0.5*\HauteurScotch}) decorate [decoration={zigzag,segment length=2pt,amplitude=0.5pt}] {to cycle} ; + \end{scope} + }% + {}% + \end{tikzpicture}% + }{}% }% -{% - \end{tcolorbox}% -} +{}% %------Style principal minitcbox \tcbset{testminipostit/.style={% @@ -148,6 +568,7 @@ \NewTCBox{\MiniPostIt}{ s O{yellow} }{% testminipostit,colback=#2!50,colframe=#2!50!black,rounded corners=southeast,arc is angular,arc=2mm,% + before upper=\vphantom{pL}, underlay={ \path[line width=0.1mm,fill=#2!80!black] ([yshift=2mm]interior.south east)--++(-0.25,-0.1)--++(0.05,-0.1); \path[line width=0.1mm,draw=#2!50!black,shorten <=-0.05mm,shorten >=-0.05mm,color=#2!50!black] ([yshift=2mm]interior.south east)--++(-0.25,-0.1)--++(0.05,-0.1); diff --git a/macros/latex/contrib/profmaquette/README b/macros/latex/contrib/profmaquette/README new file mode 100644 index 0000000000..697df2b631 --- /dev/null +++ b/macros/latex/contrib/profmaquette/README @@ -0,0 +1,11 @@ +profmaquette est un package permettant d'adapter facilement différents documents. + +---------------- + +profmaquette is a package useful for change quickly documents. + +--------------- + +Author : Christophe Poulain +email : chrpoulain@gmail.com +Licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
\ No newline at end of file diff --git a/macros/latex/contrib/profmaquette/doc/TestParcoursPerso.pdf b/macros/latex/contrib/profmaquette/doc/TestParcoursPerso.pdf Binary files differnew file mode 100644 index 0000000000..b3880c8135 --- /dev/null +++ b/macros/latex/contrib/profmaquette/doc/TestParcoursPerso.pdf diff --git a/macros/latex/contrib/profmaquette/doc/TestParcoursPerso.tex b/macros/latex/contrib/profmaquette/doc/TestParcoursPerso.tex new file mode 100644 index 0000000000..9922ddb0ce --- /dev/null +++ b/macros/latex/contrib/profmaquette/doc/TestParcoursPerso.tex @@ -0,0 +1,31 @@ +\documentclass[12pt,french]{article} +\usepackage[nonamssymb]{ProfCollegeT} +\usepackage{PfMV7} +\input{Christ7} +\usepackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math} +\usepackage{fourier-otf} +\usepackage[a4paper,margin=1.5cm,nohead,includefoot]{geometry} +\setlength{\parindent}{0pt} +\pagestyle{empty} +\usepackage{mflogo} +\usepackage{babel} +\usepackage{lipsum} +\begin{document} +\begin{Maquette}[ParcoursPerso]{Type=Fiche,Fichier=Documentation,Theme=L'alphabet,Niveau=6,Classe=Alpha} + \begin{exercice} + A + \end{exercice} + \begin{exercice} + B + \end{exercice} + \begin{exercice} + C + \end{exercice} + \begin{exercice} + D + \end{exercice} +\end{Maquette} +\end{document} +%%% Local Variables: +%%% TeX-engine: luatex +%%% End:
\ No newline at end of file diff --git a/macros/latex/contrib/profmaquette/doc/profmaquette-doc.pdf b/macros/latex/contrib/profmaquette/doc/profmaquette-doc.pdf Binary files differnew file mode 100644 index 0000000000..1e1de72f44 --- /dev/null +++ b/macros/latex/contrib/profmaquette/doc/profmaquette-doc.pdf diff --git a/macros/latex/contrib/profmaquette/doc/profmaquette-doc.tex b/macros/latex/contrib/profmaquette/doc/profmaquette-doc.tex new file mode 100644 index 0000000000..2929c9926d --- /dev/null +++ b/macros/latex/contrib/profmaquette/doc/profmaquette-doc.tex @@ -0,0 +1,967 @@ +% with lualatex +\documentclass[12pt,french]{article} +\usepackage[nonamssymb]{ProfCollege} +\usepackage{ProfMaquette} +\input{Christ7} +\usepackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math} +\usepackage{fourier-otf} +\usepackage[a4paper,margin=1.5cm,nohead,includefoot]{geometry} +\setlength{\parindent}{0pt} +\pagestyle{empty} +\usepackage{mflogo} +\usepackage{babel} + +\def\MPclipOne#1#2#3{ + \begin{mplibcode} + vardef paired (expr d) = + if pair d : d else : (d,d) fi + enddef ; + + primarydef p xyscaled q = + begingroup ; save qq ; pair qq ; qq = paired(q) ; + ( p + if xpart qq<>0 : xscaled (xpart qq) fi + if ypart qq<>0 : yscaled (ypart qq) fi ) + endgroup + enddef ; + + path fullsquare; + fullsquare := unitsquare shifted - center unitsquare ; + + color myyellow; + myyellow = (242/255,226/255,149/255); + + path p; p := fullsquare xyscaled (#1,#2);% squeezed #3; + + %fill (point(0) of p)--(point(1) of p)--(point(2) of p)--(point(3) of p)--cycle; + pair pp; + pp=0.5[point(0) of p,point(2) of p]; + height=2pt; + width=2pt; + p:=(point(0) of p)--(point(1) of p)--(point(2) of p); + + p:=(1/3[point(0) of p,point(1) of p])--(point(1) of p)--(2/3[point(1) of p,point(2) of p]);% withpen pencircle scaled 2bp; + z1=point(0) of p; + x2=x12=xpart(point(length p/6) of p); + x3=x11=xpart(point(2*length p/6) of p); + x4=xpart(point(3*length p/6) of p)+width; + x5=x4-(width/3); + x6=x4-(2*width/3); + x7=xpart(point(length p) of p); + x8=x7-(width/3); + x9=x7-(2*width/3); + x10=x7-width; + y2=ypart(point(length p/6) of p)-(height/3); + y3=ypart(point(2*length p/6) of p)-(2*height/3); + y4=ypart(point(3*length p/6) of p)-height; + y12=ypart(point(length p/6) of p)+(height/3); + y11=ypart(point(2*length p/6) of p)+(2*height/3); + y10=ypart(point(3*length p/6) of p)+height; + y5=y9=ypart(point(4*length p/6) of p); + y6=y8=ypart(point(5*length p/6) of p); + y7=ypart(point(length p) of p); + fill z1--z2--cycle--z3--z4--z5--z6--z7--z8--z9--z10--z11--z12--cycle;% withcolor 0.85myyellow; + fill (z1--z2--cycle--z3--z4--z5--z6--z7--z8--z9--z10--z11--z12--cycle) rotatedabout(pp,180);% withcolor 0.85myyellow; + \end{mplibcode} +} + +\newsavebox{\tacochapterbox} + +\newcommand{\Tacoo}[1]{% + \begin{lrbox}{\tacochapterbox} + #1% + \end{lrbox} + \ooalign{% + \MPclipOne{\mpdim{\wd\tacochapterbox+1pc}}% width + {\mpdim{\ht\tacochapterbox+\dp\tacochapterbox+1pc}}% height + {0pt}% thickness of the curve + \cr\kern0.5pc\raisebox{\ht\tacochapterbox\relax}{\usebox\tacochapterbox}% + } +} + +\NewDocumentEnvironment{CadreMP}{+b}{% + \begin{lrbox}{\tacochapterbox} + \begin{minipage}{0.97\linewidth} + #1% + \end{minipage} + \end{lrbox} + \par + \ooalign{% + \MPclipOne{\mpdim{\wd\tacochapterbox+1pc}}% width + {\mpdim{\ht\tacochapterbox+\dp\tacochapterbox+1pc}}% height + {0pt}% thickness of the curve + \cr\kern0.5pc\raisebox{\ht\tacochapterbox\relax}{\usebox\tacochapterbox}% + }% +}{}% + +\usepackage{pdfpages} + +\title{Factoriser la production de documents} +\author{C.Poulain} +\date{\PfMfiledate} + +\usepackage[colorlinks=true,linkcolor=purple]{hyperref} + +\pagestyle{empty} + +\usepackage{listings} +\lstset{ + language = [LaTeX]TeX, + basicstyle = \ttfamily,% + breaklines = true, + commentstyle = \footnotesize\slshape\color{gray}, + emphstyle=\color{purple}, + columns=fullflexible,% + frame=tb,% + texcsstyle=*\color{black},%pour colorer la contre-oblique + classoffset=5, + texcsstyle=*\color{blue},%pour colorer la contre-oblique + moretexcs={brm,TikzDM,TikzDS,TikzIE,TikzFiche,Competences,TikzParcours,TikzPdT,PfMCompNA,PfMCompECA,PfMCompA,AfficheParcours}, + emph={Maquette,exercice,Solution,Reponse,Indice},% + classoffset=1, + keywords={DM,DS,IE,Fiche,CorrigeFin,CorrigeApres,PdT,Parcours,ParcoursPerso}, + keywordstyle=\color{OliveDrab}, + classoffset=2, + keywords={Theme,Niveau,Classe,Date,Calculatrice,Code,Numero,Sujet,Nom,NumSujet,Fichier,Type}, + keywordstyle=\color{BlueViolet},%DarkMagenta}, + classoffset=3, + keywords={Pouce,Direct,PasCorrige,BaremeDetaille,BaremeTotal,Source,Titre,Oral,Calculatrice,Competence,Trajet}, + keywordstyle=\color{DarkGreen}, +% delim = **[s][\color{purple}]{$}{$}, +% moredelim = **[s][\color{purple}]{\\[}{\\]}, +% moredelim = **[is][\color{black}]{\\Z}{\\Z}, + literate=*{[}{{\textcolor{orange}{[}}}{1} + {]}{{\textcolor{orange}{]}}}{1} + {\{}{\textcolor{amber}{\{}}{1} + {\}}{\textcolor{amber}{\}}}{1} + {\&}{\textcolor{red}{\&}}{1} + {\\[}{{\textcolor{purple}{\textbackslash[}}}{2} + {\\]}{{\textcolor{purple}{\textbackslash]}}}{2} + {$}{{\textcolor{purple}{\$}}}{1}%$ + {_}{{\textcolor{purple}{\_}}}{1}% + {^}{{\textcolor{purple}{\^{}}}}{1}%, +} + +% "Rehook" delimiters char table. +\makeatletter +\lst@AddToHook{SelectCharTable}{\lst@DefDelims} +\makeatother + +\usepackage{textcomp}%pour les < de listings +\usepackage{enumerate} +\usepackage{hhline} +\usepackage{pifont} + +\definecolor{mygray}{RGB}{245,245,245}%pour le background de listing +\definecolor{drab}{rgb}{0.59, 0.44, 0.09} +\definecolor{amber}{rgb}{1.0, 0.75, 0.0} +\definecolor{chocolate}{rgb}{0.82, 0.41, 0.12} +\colorlet{amber}{chocolate} + +\newtcblisting{Codes}[3][]{% + top=0mm,bottom=0mm,left=2mm,right=2mm,middle=0mm,% + colback=white,% + colframe=white!75!black,% + every listing line={#3},% + listing options={% + frame=,% + backgroundcolor=,% + },% + righthand width=#2\linewidth,% + #1% +}% + +\usepackage{menukeys} +\newcommand\metamk[1]{\textlangle#1\textrangle} + +\newcommand\Cle[1]{% + {\sffamily\textlangle #1\textrangle}% +}% + +\newcommand{\Defaut}[1]{% +\hfill valeur par défaut : {\sffamily #1}\par% +}% + +\usepackage{parskip} + +\newenvironment{Description} + {\list{}{\labelwidth0pt \leftmargin0pt \itemindent-\leftmargin + \let\makelabel\Descriptionlabel}} + {\endlist} +\newcommand*\Descriptionlabel[1]{\hspace\labelsep + \normalfont\bfseries #1} + +\parindent0pt + +\newcommand\TIKZ{Ti\textit{k}Z} + +\renewcommand\TikzDM{% + \begin{tcolorbox}[frame hidden,colback=white,enhanced,% + borderline north={3pt}{0pt}{gray!85}, + borderline north={2pt}{0.5pt}{gray!15}, + borderline south={3pt}{0pt}{gray!85}, + borderline south={2pt}{0.5pt}{gray!15}, + ]% + \sffamily Devoir en temps libre \no\useKV[DM]{Numero}\hfill\useKV[DM]{Niveau}\ieme{} \useKV[DM]{Classe}% + \par{\tiny\jobname}\hfill{\scriptsize Pour le \useKV[DM]{Date}}% + \end{tcolorbox}% +} +\renewcommand\TikzDS{% + \begin{tcolorbox}[colback=gray!5,% + enhanced,% + overlay unbroken and first={% + \node[yshift=1em] at (frame.south) {\scriptsize\sffamily-- Calculatrice \ifboolKV[DS]{Calculatrice}{autorisée}{interdite} --}; + } + ]% + \sffamily Devoir surveillé \no\useKV[DS]{Numero} (Sujet \useKV[DS]{Sujet})\hfill\useKV[DS]{Niveau}\ieme{} \useKV[DS]{Classe} + \par{\tiny\jobname}\hfill{\scriptsize\useKV[DS]{Date}} + \end{tcolorbox}% +} +\renewcommand\TikzIE{% + \begin{minipage}{0.6\linewidth} + \begin{tcolorbox}[colback=gray!5, + enhanced,% + overlay unbroken and first={% + \node[yshift=1em] at (frame.south) {\scriptsize\sffamily-- Calculatrice \ifboolKV[IE]{Calculatrice}{autorisée}{interdite} --}; + } + ]% + \sffamily \useKV[IE]{Nom} \no\useKV[IE]{Numero} : \useKV[IE]{Theme} \ifboolKV[IE]{Sujets}{\scriptsize(Sujet \useKV[IE]{NumSujet})}{} + \vspace{1em} + \par{\tiny\jobname}\hfill{\scriptsize\useKV[DS]{Date}} + \end{tcolorbox}% + \end{minipage}\hfill\begin{minipage}{0.35\linewidth} + Nom : \dotfill\\[0.5em] + Prénom : \dotfill\\[0.5em] + Classe : \dotfill + \end{minipage} + \par\bigskip +} + +\renewcommand\TikzFiche{% + \begin{tcolorbox}[%spread outwards=-1cm,spread inwards=-1cm, + colback=gray!5]% + \Large\sffamily \useKV[Fiche]{Theme}\hfill\useKV[Fiche]{Niveau}\ieme{} \useKV[Fiche]{Classe} + \par{\tiny\jobname}\hfill{\scriptsize\useKV[Fiche]{Date}} + \end{tcolorbox}% +} + +\renewcommand\TikzParcours{% + \begin{tcolorbox}[%spread outwards=-1cm,spread inwards=-1cm, + colback=gray!5]% + \Large\sffamily \useKV[Parcours]{Theme}\hfill\useKV[Parcours]{Niveau} \useKV[Parcours]{Classe}% + \par{\tiny\useKV[Parcours]{Code}}\hfill{\scriptsize\useKV[Parcours]{Date}}% + \end{tcolorbox}% +} + +\renewcommand\TikzPdT{% + \begin{tcolorbox}[%spread outwards=-1cm,spread inwards=-1cm, + colback=gray!5]% + \Large\sffamily \useKV[PdT]{Theme}\hfill\useKV[PdT]{Niveau} \useKV[PdT]{Classe}% + \par{\tiny\useKV[PdT]{Code}}\hfill{\scriptsize\useKV[PdT]{Date}}% + \end{tcolorbox}% +} +\begin{document} +\maketitle +\thispagestyle{empty} +Après la création du package \lstinline!ProfCollege!, l'idée de poursuivre la factorisation des méthodes de travail a naturellement germé. Produire des fiches, des devoirs, des évaluations\dots{} avec des méthodes différentes, cela peut vite apparaître fastidieux. Créé pour améliorer cela, cet ensemble de macro-commandes est basé, quasi exclusivement, sur les environnements \lstinline!Maquette! et \lstinline!exercice! : +\begin{itemize} +\item l'environnement \lstinline!Maquette! indique le type de document souhaité et ses caractéristiques; +\item l'environnement \lstinline!exercice! adapte la présentation et les fonctions des exercices en accord avec l'environnement \lstinline!Maquette!. +\end{itemize} +\clearpage +\section*{L'environnement \lstinline!Maquette!} +\begin{Codes}[listing only]{0.4}{} +\begin{Maquette} + +\end{Maquette} +\end{Codes} +C'est lui qui va indiquer : +\begin{itemize} +\item le type de document souhaité (Devoir Maison / Devoir Surveillé / Interrogatin écrite / Fiche d'exercices / Parcours d'exercices / Parcours personnalisé / Plan de travail); +\item et si ce travail est corrigé (à la suite d'un exercice ou à la fin du document) ou pas; +\end{itemize} +puis il indiquera les caractéristiques du document souhaité. +\clearpage +\subsection*{Les devoirs maison} +\begin{CadreMP} + \begin{Description} +\item[La clé \Cle{DM}]\Defaut{false} + \begin{itemize} + \item[La clé \Cle{Numero}]\Defaut{1} + \item[La clé \Cle{Date}]\Defaut{\lstinline!\\today!} + \item[La clé \Cle{Classe}]\Defaut{\{\}} + \item[La clé \Cle{Niveau}]\Defaut{3} + \item[La clé \Cle{Code}\footnotemark]\Defaut{\{\}} + \end{itemize} +\end{Description} +\end{CadreMP} +\footnotetext{Outil personnel de classement.} +\begin{Codes}[]{0.4}{} +\begin{Maquette}[DM]{Numero=3,Niveau=6,Classe=Zola,Date=25 décembre 2020} + On considère un triangle $ABC$\dots +\end{Maquette} +\end{Codes} +\clearpage +\subsection*{Les devoirs surveillés} +\begin{CadreMP} + \begin{Description} +\item[La clé \Cle{DS}]\Defaut{false} + \begin{itemize} + \item[La clé \Cle{Numero}]\Defaut{1} + \item[La clé \Cle{Date}]\Defaut{\lstinline!\\today!} + \item[La clé \Cle{Classe}]\Defaut{} + \item[La clé \Cle{Niveau}]\Defaut{3} + \item[La clé \Cle{Code}]\Defaut{} + \item[La clé \Cle{Calculatrice}] autorisée ou non\Defaut{false} + \item[La clé \Cle{Sujet}]\Defaut{A} + \end{itemize} +\end{Description} +\end{CadreMP} +\begin{Codes}[]{0.4}{} +\begin{Maquette}[DS]{Numero=3,Niveau=6,Classe=Zola,Date=25 décembre 2020} + On considère un triangle $ABC$\dots +\end{Maquette} +\end{Codes} +\clearpage +\subsection*{Les évaluations écrites} +\begin{CadreMP} + \begin{Description} +\item[La clé \Cle{IE}]\Defaut{false} + \begin{itemize} + \item[La clé \Cle{Numero}]\Defaut{1} + \item[La clé \Cle{Date}]\Defaut{\lstinline!\\today!} + \item[La clé \Cle{Classe}]\Defaut{} + \item[La clé \Cle{Niveau}]\Defaut{3} + \item[La clé \Cle{Code}]\Defaut{} + \item[La clé \Cle{Calculatrice}] autorisée ou nom\Defaut{false} + \item[La clé \Cle{Sujet}] pour de multiples sujets\Defaut{\{\}} + \item[La clé \Cle{Theme}] Thème de l'évaluation \Defaut{\{\}} + \item[La clé \Cle{Nom}] Pour changer le nom \og \'Evaluation\fg\Defaut{\'Evaluation} + \end{itemize} +\end{Description} +\end{CadreMP} +\begin{Codes}[]{0.4}{} +\begin{Maquette}[IE]{Numero=3,Niveau=6,Classe=Zola,Date=25 décembre 2020,Theme=La géométrie}% + On considère un triangle $ABC$\dots +\end{Maquette} +\end{Codes} +\clearpage +\subsection*{Les fiches d'exercices} +\begin{CadreMP} + \begin{Description} +\item[La clé \Cle{Fiche}]\Defaut{false} + \begin{itemize} + \item[La clé \Cle{Date}]\Defaut{\lstinline!\\today!} + \item[La clé \Cle{Classe}]\Defaut{Nairobi} + \item[La clé \Cle{Niveau}]\Defaut{6} + \item[La clé \Cle{Theme}] Thème de la fiche \Defaut{Les nombres décimaux} + \item[La clé \Cle{Code}]\Defaut{} + \item[La clé \Cle{NomExercice}] pour modifier le nom des exercices\Defaut{Exercice} + \end{itemize} +\end{Description} +\end{CadreMP} +\begin{Codes}[]{0.4}{} +\begin{Maquette}[Fiche]{Niveau=6,Classe=Zola,Date=25 décembre 2020} + On considère un triangle $ABC$\dots +\end{Maquette} +\end{Codes} +%\begin{Maquette}[Fiche]{Niveau=6,Classe=Zola,Date=25 décembre 2020} +% On considère un triangle $ABC$\dots +%\end{Maquette} +\clearpage +\subsection*{Les parcours} +\begin{CadreMP} + \begin{Description} +\item[La clé \Cle{Parcours}\footnotemark]\Defaut{false} + \begin{itemize} + \item[La clé \Cle{Date}]\Defaut{\lstinline!\\today!} + \item[La clé \Cle{Classe}]\Defaut{Nairobi} + \item[La clé \Cle{Niveau}]\Defaut{6} + \item[La clé \Cle{Theme}] Thème du parcours \Defaut{Les nombres décimaux} + \item[La clé \Cle{Code}]\Defaut{} + \item[La clé \Cle{NomExercice}] pour modifier le nom des exercices\Defaut{Exercice} + \end{itemize} +\end{Description} +\end{CadreMP} + \footnotetext{Il dispose des même clés que la clé \Cle{Fiche} et de la même présentation. Ce n'est pas là son utilité\dots} +\begin{Codes}[]{0.4}{} +\begin{Maquette}[Parcours]{Niveau=6,Classe=Zola,Date=25 décembre 2020} + On considère un triangle $ABC$\dots +\end{Maquette} +\end{Codes} +\clearpage +\subsection*{Les parcours fléchés} +\begin{CadreMP} + \begin{Description} +\item[La clé \Cle{PdT}\footnotemark]\Defaut{false} + \begin{itemize} + \item[La clé \Cle{Date}]\Defaut{\lstinline!\\today!} + \item[La clé \Cle{Classe}]\Defaut{Nairobi} + \item[La clé \Cle{Niveau}]\Defaut{6} + \item[La clé \Cle{Theme}] Thème du plan de travail \Defaut{Les nombres décimaux} + \item[La clé \Cle{Code}]\Defaut{} + \item[La clé \Cle{NomExercice}] pour modifier le nom des exercices\Defaut{Exercice} + \end{itemize} +\end{Description} +\end{CadreMP} + \footnotetext{Il dispose des même clés que la clé \Cle{Fiche} et de la même présentation. Ce n'est pas là son utilité\dots} +\begin{Codes}[]{0.4}{} +\begin{Maquette}[PdT]{Niveau=6,Classe=Zola,Date=25 décembre 2020} + On considère un triangle $ABC$\dots +\end{Maquette} +\end{Codes} +%\begin{Maquette}[PdT]{Niveau=6,Classe=Zola,Date=25 décembre 2020} +% On considère un triangle $ABC$\dots +%\end{Maquette} +\clearpage +\subsection*{Les parcours personnalisés} +\begin{CadreMP} + \begin{Description} +\item[La clé \Cle{ParcoursPerso}]\Defaut{false} + \begin{itemize} + \item[La clé \Cle{Fichier}]\Defaut{}\par est le nom du fichier {\ttfamily csv} à utiliser pour créer les parcours personnalisés. + \end{itemize} +\end{Description} +\end{CadreMP} +\begin{Codes}[listing only]{0.4}{} +\begin{Maquette}[ParcoursPerso]{Fichier=Eleves} + On considère un triangle $ABC$\dots +\end{Maquette} +\end{Codes} +\clearpage +Comme on peut le voir, chaque type de travail est associé à une présentation. Ces présentations sont créées par les commandes\footnote{Qu'on peut donc redéfinir. Par exemple, c'est ce que j'ai fait dans ce document pour la commande \lstinline!\\TikzFiche! : elle ne commence plus une nouvelle page.} : \lstinline!\TikzDM/\TikzDMCor! pour la clé \Cle{DM}; \lstinline!\TikzDS/\TikzDSCor! pour la clé \Cle{DS}; \lstinline!\TikzIE/\TikzIECor! pour la clé \Cle{IE}; \lstinline!\TikzFiche/\TikzFicheCor! pour la clé \Cle{Fiche}, \lstinline!\TikzParcours/\TikzParcoursCor! pour la clé \Cle{Parcours} et \lstinline!\TikzPdT! pour la clé \Cle{PdT}. + +On dispose également de la commande \lstinline!\Competences! permettant de construire un tableau de\dots{} compétences données par l'utilisateur; les compétences étant séparées par le symbole \lstinline!/!. +\begin{Codes}[]{0.4}{} +\Competences{Utiliser le compas/Utiliser l'équerre} +\end{Codes} +Les notations \lstinline!NA!, \lstinline!ECA! et \lstinline!A! peuvent être redéfinies par les commandes \lstinline!\PfMCompNA!, \lstinline!\PfMCompECA! et \lstinline!\PfMCompA!. +\begin{Codes}[]{0.4}{} +\renewcommand\PfMCompNA{\rule{0pt}{3ex}\RKangry} +\renewcommand\PfMCompECA{\RKsad} +\renewcommand\PfMCompA{\RKbigsmile} +\Competences{Utiliser le compas/Utiliser l'équerre} +\end{Codes} +Si l'on souhaite davantage de niveaux d'évaluations (ou moins), on utilisera les codes suivants : +\begin{Codes}[]{0.4}{} +\Competences[4]{0§1§2§3/Utiliser le compas/Utiliser l'équerre} +\end{Codes} +\begin{Codes}[]{0.4}{} +\Competences[2]{A§NA/Utiliser le compas/Utiliser l'équerre} +\end{Codes} +\clearpage +\section*{L'environnement \lstinline!exercice!} +\begin{Codes}[listing only]{0.4}{} +\begin{exercice} + +\end{exercice} +\end{Codes} +\subsection*{Habillage des exercices} +L'envionnement \lstinline!exercice! doit {\em impérativement} être inclus dans un environnement \lstinline!Maquette! car le choix de document influence la présentation des exercices. +\begin{Codes}[]{0.5}{} +\begin{Maquette}[IE]{Theme=Les fonctions,Niveau=3,Classe=Gide} + \begin{exercice} + La fonction $f:x\mapsto3x+2$ est-elle une fonction affine ? Justifier. + \end{exercice} +\end{Maquette} +\end{Codes} +\begin{Codes}[listing side text]{0.6}{} +\begin{Maquette}[DM]{Numero=50,Niveau=3,Classe=Gide} + \begin{exercice} + La fonction $f:x\mapsto3x+2$ est-elle une fonction affine ? Justifier. + \end{exercice} +\end{Maquette} +\end{Codes} +\begin{Codes}[listing side text]{0.6}{} +\begin{Maquette}[DS]{Numero=50,Niveau=3,Classe=Gide} + \begin{exercice} + La fonction $f:x\mapsto3x+2$ est-elle une fonction affine ? Justifier. + \end{exercice} +\end{Maquette} +\end{Codes} +\begin{Codes}[]{0.4}{} +\begin{Maquette}[Fiche]{Theme=Les fonctions,Niveau=3,Classe=Gide} + \begin{exercice} + La fonction $f:x\mapsto3x+2$ est-elle une fonction affine ? Justifier. + \end{exercice} +\end{Maquette} +\end{Codes} +%\begin{Maquette}[Fiche]{Theme=Les fonctions,Niveau=3,Classe=Gide} +% \begin{exercice} +% La fonction $f:x\mapsto3x+2$ est-elle une fonction affine ? Justifier. +% \end{exercice} +%\end{Maquette} +\subsection*{Le barème des exercices} +On remarque que certains exercices sont associés à un total de point. C'est une des clés disponibles pour l'environnement \lstinline!exercice!. Voici celles pour les barèmes : +\begin{Description} +\item[La clé \Cle{BaremeTotal}] qui affichera, dans le coin supérieur droit, le total de points de l'exercice. La valeur de cette clé : + \begin{itemize} + \item est {\em fixée} à {\sffamily false} pour la clé \Cle{Fiche}; + \item est positionnée à {\sffamily true} mais {\em modifiable} pour les clés \Cle{DM}, \Cle{DS} et \Cle{IE}. + \end{itemize} +\item[La clé \Cle{BaremeDetaille}]\Defaut{false}\par qui a le même fonctionnement que la clé \Cle{BaremeTotal}. + La commande \lstinline!\brm{}! permet la construction du barème (détaillé et total). +\item[La clé \Cle{MotPoint}]\Defaut{point}\par donnée sous forme de texte puisque le pluriel est géré. + \begin{Codes}[listing only]{0.4}{} +\begin{Maquette}[DS]{Numero=3,Classe=Euler,Niveau=4} + \begin{exercice} % ici le barème est total, pas de détail : comportement par défaut + On considère les expressions $A=2x(3x+5)$ et $B=x(7x-1)$. + \begin{enumerate} + \item\brm{1} Développer l'expression $A$. + \item\brm{1.5} Développer l'expression $B$. + \end{enumerate} + \end{exercice} + \begin{exercice}[BaremeDetaille] %ici le barème est total ET détaillé + On considère les expressions $A=2x(3x+5)$ et $B=x(7x-1)$. + \begin{enumerate} + \item\brm{1} Développer l'expression $A$. + \item\brm{1.5} Développer l'expression $B$. + \end{enumerate} + \end{exercice} +\end{Maquette} +\end{Codes} +\begin{Maquette}[DS]{Numero=3,Classe=Euler,Niveau=4} + \begin{exercice} % ici le barème est total, pas de détail : comportement par défaut + On considère les expressions $A=2x(3x+5)$ et $B=x(7x-1)$. + \begin{enumerate} + \item\brm{1} Développer l'expression $A$. + \item\brm{1.5} Développer l'expression $B$. + \end{enumerate} + \end{exercice} + \begin{exercice}[BaremeDetaille] %ici le barème est total ET détaillé + On considère les expressions $A=2x(3x+5)$ et $B=x(7x-1)$. + \begin{enumerate} + \item\brm{1} Développer l'expression $A$. + \item\brm{1.5} Développer l'expression $B$. + \end{enumerate} + \end{exercice} +\end{Maquette} +\end{Description} +\clearpage +\subsection*{Source, compétence et titre} +Si on souhaite citer la source d'un exercice ou lui donner un titre, on dispose des clés : +\begin{Description} +\item[La clé \Cle{Source}] pour citer la source de l'exercice.\Defaut{\{\}} +\item[La clé \Cle{Titre}] pour nommer un exercice.\Defaut{\{\}} +\item[La clé \Cle{Competence}] pour indiquer une compétence associée à l'exercice.\Defaut{\{\}} +\begin{Codes}[listing only]{0.4}{} +\begin{Maquette}[Fiche]{Theme=Algorithmique} + \colorlet{PfMColCpt}{Crimson} + \colorlet{PfMColSrc}{NavyBlue} + \begin{exercice}[Source=Olympiades 2019,Titre=Modifier des mots,Competence=Raisonner] + Dans ce problème, on appellera {\em mot} toute suite de lettres formée des lettres A, D et G. Par exemple : ADD, A, AAADG sont des {\em mots}. + \\Astrid possède un logiciel qui fonctionne de la manière suivante : un utilisateur entre un {\em mot} et, après un clic sur EXÉCUTER, chaque lettre A du {\em mot} (s'il y en a) est remplacée par le {\em mot} AGADADAGA. Ceci donne un nouveau {\em mot}.\\Par exemple, si l'utilisateur rentre le {\em mot} AGA, on obtient le {\em mot} AGADADAGAGAGADADAGA. Un deuxième clic sur EXÉCUTER réitère la transformation décrite ci-dessus au nouveau {\em mot}, et ainsi de suite. + \begin{enumerate} + \item Quels sont les {\em mots} qui restent inchangés quand on clique sur EXÉCUTER ? + \end{enumerate} +\end{exercice} +\end{Maquette} +\end{Codes} +%\clearpage +\begin{Maquette}[Fiche]{Theme=Algorithmique} + \colorlet{PfMColCpt}{Crimson} + \colorlet{PfMColSrc}{NavyBlue} + \begin{exercice}[Source=Olympiades 2019,Titre=Modifier des mots,Competence=Raisonner] + Dans ce problème, on appellera {\em mot} toute suite de lettres formée des lettres A, D et G. Par exemple : ADD, A, AAADG sont des {\em mots}. + \\Astrid possède un logiciel qui fonctionne de la manière suivante : un utilisateur entre un {\em mot} et, après un clic sur EXÉCUTER, chaque lettre A du {\em mot} (s'il y en a) est remplacée par le {\em mot} AGADADAGA. Ceci donne un nouveau {\em mot}.\\Par exemple, si l'utilisateur rentre le {\em mot} AGA, on obtient le {\em mot} AGADADAGAGAGADADAGA. Un deuxième clic sur EXÉCUTER réitère la transformation décrite ci-dessus au nouveau {\em mot}, et ainsi de suite. + \begin{enumerate} + \item Quels sont les {\em mots} qui restent inchangés quand on clique sur EXÉCUTER ? + \end{enumerate} +\end{exercice} +\end{Maquette} +\end{Description} +\clearpage +\subsection*{Des logos ?} +Les clés décrites dans cette partie ne sont disponibles que pour les maquettes +\lstinline!Fiche! / \lstinline!Parcours!. +\begin{Description} +\item[La clé \Cle{Oral}]\Defaut{false}\par + pour indiquer que l'exercice se résoud oralement. +\item[La clé \Cle{Calculatrice}]\Defaut{true}\par + pour afficher que la calculatrice {\em est interdite}. +\end{Description} + \begin{Codes}[listing only,listing options={frame=,escapechar=!}]{0.4}{} +\begin{Maquette}[Fiche]{Theme=Calcul mental} + \begin{exercice}[Oral] + $1+1=?$ + \end{exercice} + \begin{exercice}[!\color{DarkGreen}\ttfamily Calculatrice!=false] + $1+1=?$ + \end{exercice} + % On peut mélanger les deux logos. + \begin{exercice}[!\color{DarkGreen}\ttfamily Calculatrice!=false,Oral] + $1+1=?$ + \end{exercice} +\end{Maquette} +\end{Codes} +\begin{Maquette}[Fiche]{Theme=Calcul mental} + \begin{exercice}[Oral] + $1+1=?$ + \end{exercice} + \begin{exercice}[Calculatrice=false] + $1+1=?$ + \end{exercice} + \begin{exercice}[Calculatrice=false,Oral] + $1+1=?$ + \end{exercice} +\end{Maquette} +\clearpage +\subsection*{Focus sur la maquette \lstinline!Parcours!} +Dans le cas de cette maquette, l'environnement \lstinline!exercice! dispose de la clé \Cle{Trajet} permettant de construire automatiquement le ou les parcours. La commande \lstinline!\AfficheParcours{}! représente un schéma associé à un parcours. Ce schéma se construit seul, automatiquement, après que l'enseignant ait utilisé la clé \Cle{Trajet} dans la création de ses exercices. Il faudra néanmoins deux compilations. \`A noter que ce schéma, avec l'utilisation du package \lstinline!hyperref!, dispose de liens cliquables sur les exercices sélectionnés pour le parcours. +\begin{Codes}[listing only,listing options={frame=,escapechar=!}]{0.4}{\small} +\begin{Maquette}[Parcours]{Theme=Calcul mental} + \begin{description} + \item[!Parcours! Padawan] \AfficheParcours{Padawan} + \item[!Parcours! Jedï] \AfficheParcours{Jedi} + \item[!Parcours! Grand Maître] \AfficheParcours{GrandMaitre} + \end{description} + \begin{exercice}[Trajet={Padawan,Jedi,GrandMaitre}] + + \end{exercice} + \begin{exercice}[Trajet={Padawan,Jedi}] + + \end{exercice} + \begin{exercice}[Trajet={Padawan}] + + \end{exercice} +\end{Maquette} +\end{Codes} +\begin{Maquette}[Parcours]{Theme=Calcul mental} + \begin{description} + \item[Parcours Padawan] \AfficheParcours{Padawan} + \item[Parcours Jedï] \AfficheParcours{Jedi} + \item[Parcours Grand Maître] \AfficheParcours{GrandMaitre} + \end{description} + \begin{exercice}[Trajet={Padawan,Jedi,GrandMaitre}] + + \end{exercice} + \begin{exercice}[Trajet={Padawan,Jedi}] + + \end{exercice} + \begin{exercice}[Trajet={Padawan}] + + \end{exercice} +\end{Maquette} +\clearpage +\subsection*{Focus sur la maquette \lstinline!ParcoursPerso!} +Dans le cas de cette maquette, l'environnement \lstinline!exercice! n'admet aucune clé. En effet, cette maquette utilise : +\begin{itemize} +\item et un fichier {\ttfamily *.csv} de la forme : + \begin{Codes}[listing only]{0.4}{} +Anne,Bec,{1,2} +Paul,Isse,{1,3} +Jean,Némar,{1,4} + \end{Codes} +\item une liste d'exercices pour produire les trois pages suivantes à l'aide du code : +\begin{Codes}[listing only]{0.4}{} +\begin{Maquette}[ParcoursPerso]{Type=Fiche,Fichier=Documentation,Theme=L'alphabet,Niveau=6,Classe=Alpha} + \begin{exercice} + A + \end{exercice} + \begin{exercice} + B + \end{exercice} + \begin{exercice} + C + \end{exercice} + \begin{exercice} + D + \end{exercice} +\end{Maquette} +\end{Codes} +\end{itemize} +\clearpage +\includepdf[pages=-]{TestParcoursPerso.pdf} +\clearpage +\subsection*{Focus sur la maquette \lstinline!PdT!} +Dans le cas de cette maquette, la présentation des exercices est modifiée : il n'y a plus de titre afin de gagner de la place. De plus, chaque exercice définit, en fonction de son numéro (non écrit mais présent), huit points d'ancrages :\lstinline!N-5!, \lstinline!S-5!, \lstinline!O-5!, \lstinline!E-5!, \lstinline!NO-5!, \lstinline!NE-5!, \lstinline!SO-5! et \lstinline!SE-5! pour respectivement les points Nord, Sud, Ouest, Est, Nord-Ouest, Nord-Est, Sud-Ouest et Sud-Est du cadre de l'exercice 5. + +On pourra aussi utiliser (avec les même n\oe uds précédés de \lstinline!SOS!) l'environnement \lstinline!SOS! servant d'aide aux élèves en difficulté. + +De plus, deux commandes font leur apparition : +\begin{itemize} +\item \lstinline!\CheminVrai! listant les liaisons entre exercices sous la forme \lstinline!noeud départ/noeud arrivée!; +\item \lstinline!\CheminFaux! listant les liaisons entre exercices sous la forme \lstinline!noeud départ/noeud arrivée!. +\end{itemize} +L'exemple suivant est obtenu par le code présenté à la page suivante. +\begin{Maquette}[PdT]{Theme=Plan de travail : Calcul littéral,Niveau=3,Classe=Alpha,Date={},Code={}} + \setcounter{PfMExo}{0} + \begin{minipage}{0.35\linewidth} + \begin{exercice}%Exercice 1 + A + \end{exercice} + \end{minipage} + \hfill + \begin{minipage}{0.3\linewidth} + \begin{exercice}%Exercice 2 + B + \end{exercice} + \end{minipage} + \hfill + \begin{minipage}{0.15\linewidth} + \begin{SOS}%SOS 1 + Aide A + \end{SOS} + \end{minipage} + + \vspace*{2cm} + + \begin{minipage}{0.35\linewidth} + \begin{exercice}%Exercice 3 + C + \end{exercice} + \end{minipage} + \hfill + \begin{minipage}{0.3\linewidth} + \begin{exercice}%Exercice 4 + D + \end{exercice} + \end{minipage} + \hfill + \begin{minipage}{0.15\linewidth} + \begin{SOS}%SOS 2 + Aide B + \end{SOS} + \end{minipage} + \CheminVrai{S-1/NO-3} + \CheminFaux{E-1/O-2,E-2/SOS-O-1} + \end{Maquette} + \clearpage +\begin{Codes}[listing only]{}{} + \begin{Maquette}[PdT]{Theme=Plan de travail : Calcul littéral,Niveau=3,Classe=Alpha,Date={},Code={}} + \begin{minipage}{0.35\linewidth} + \begin{exercice}%Exercice 1 + A + \end{exercice} + \end{minipage} + \hfill + \begin{minipage}{0.3\linewidth} + \begin{exercice}%Exercice 2 + B + \end{exercice} + \end{minipage} + \hfill + \begin{minipage}{0.15\linewidth} + \begin{SOS}%SOS 1 + Aide A + \end{SOS} + \end{minipage} + + \vspace*{2cm} + + \begin{minipage}{0.35\linewidth} + \begin{exercice}%Exercice 3 + C + \end{exercice} + \end{minipage} + \hfill + \begin{minipage}{0.3\linewidth} + \begin{exercice}%Exercice 4 + D + \end{exercice} + \end{minipage} + \hfill + \begin{minipage}{0.15\linewidth} + \begin{SOS}%SOS 2 + Aide B + \end{SOS} + \end{minipage} + \CheminVrai{S-1/NO-3} + \CheminFaux{E-1/O-2,E-2/SOS-O-1} + \end{Maquette} +\end{Codes} +\clearpage +\subsection*{\og Correction\fg{} des exercices} + Un exercice avec correction aura la forme suivante : + \begin{Codes}[listing only]{0.4}{} +\begin{exercice} + +\end{exercice} +\begin{Solution} + +\end{Solution} +\end{Codes} +On peut gérer la correction des exercices à deux niveaux : +\begin{Description} + \item[Au niveau de l'environnement ]\lstinline!Maquette!, on dispose de deux clés : +\end{Description} + \begin{Description} +\item[la Clé \Cle{CorrigeApres}]\Defaut{false}\par qui affiche le corrigé, s'il existe, après l'énoncé de l'exercice. +\item[la Clé \Cle{CorrigeFin}]\Defaut{false}\par qui affiche les corrigés, s'ils existent, à la fin du document. +\end{Description} + +Pour la maquette \lstinline!ParcoursPerso!, seule la clé \Cle{CorrigeFin} est autorisée. + +\begin{Codes}[listing only]{0.4}{\footnotesize} +\begin{Maquette}[IE,CorrigeApres]{Theme=Calcul littéral} + \begin{exercice}% n'a pas de correction + \begin{enumerate} + \item $1+1=?$. + \end{enumerate} + \end{exercice} + \begin{exercice} + \begin{enumerate} + \item Développer $A=2(x+3)$. + \end{enumerate} + \end{exercice} + \begin{Solution} + \begin{enumerate} + \item $A=2(x+3)=2\times x+2\times3=2x+6$ + \end{enumerate} + \end{Solution} +\end{Maquette} +\end{Codes} +\begin{Maquette}[IE,CorrigeApres]{Theme=Calcul littéral} + \begin{exercice}% n'a pas de correction + \begin{enumerate} + \item $1+1=?$. + \end{enumerate} + \end{exercice} + \begin{exercice} + \begin{enumerate} + \item Développer $A=2(x+3)$. + \end{enumerate} + \end{exercice} + \begin{Solution} + \begin{enumerate} + \item $A=2(x+3)=2\times x+2\times3=2x+6$ + \end{enumerate} + \end{Solution} +\end{Maquette} +\begin{Description} +\item[Au niveau de l'environnement ]\lstinline!exercice!, on peut affiner la correction proposée en écrivant le code de l'exercice sous la forme : +\end{Description} +\begin{Codes}[listing only]{0.4}{} +\begin{exercice} + +\end{exercice} +\begin{Solution} + +\end{Solution} +\begin{Reponse} + +\end{Reponse} +\begin{Indice} + +\end{Indice} +\end{Codes} +L'environnement \lstinline!exercice! dispose alors des clés suivantes : +\begin{Description} +\item[la Clé \Cle{PasCorrige}]\Defaut{false}\par supprime l'affichage de tous types de correction pour l'exercice considéré; +\item[la Clé \Cle{Pouce}]\Defaut{false}\par qui affiche uniquement le contenu de l'environnement \lstinline!Indice!; +\item[la Clé \Cle{Direct}]\Defaut{false}\par qui affiche uniquement le contenu de l'environnement \lstinline!Reponse!. +\end{Description} + +\bigskip + +Cela engendre, si nécessaire, la création de fichier \lstinline!*.sol! pour les solutions, \lstinline!*.rep! pour les réponses et \lstinline!*.cdp! pour les indices. Il conviendra de les effacer à chaque changement de clé (\Cle{PasCorrige}, \Cle{Pouce}, \Cle{Direct}) ou ajout d'exercice(s). En effet, la priorité d'affichage est donnée aux fichiers \lstinline!*.sol! puis \lstinline!*.rep! et enfin \lstinline!*.cdp!. + +\bigskip + +\begin{Codes}[listing only]{0.4}{} +\begin{Maquette}[DS,CorrigeFin]{Numero=3} + \begin{exercice} % La clé CorrigeFin utilise le contenu de l'environnement Solution + $1+\dfrac2{10}=$ + \end{exercice} + \begin{Solution} + $1+\dfrac2{10}=\num{1.2}$ + \end{Solution} + \begin{Reponse} + \num{1.2} + \end{Reponse} + \begin{Indice} + Une unité représente dix dixièmes de l'unité. + \end{Indice} + \begin{exercice}[PasCorrige] % Malgré les environnements Solution, Reponse, Indice + $7(x+5)=$ ? + \end{exercice} + \begin{Solution} + $7(x+5)=7\times x+7\times 5=7x+35$ + \end{Solution} + \begin{Indice} + Utiliser la simple distributivité. + \end{Indice} + \begin{Reponse} + $7x+35$ + \end{Reponse} + \begin{exercice}[Direct] % On affiche uniquement l'environnement Reponse + $\dfrac34-\dfrac25=$? + \end{exercice} + \begin{Solution} + $\dfrac34-\dfrac25=\dfrac{15}{20}-\dfrac8{20}=\dfrac7{20}$ + \end{Solution} + \begin{Reponse} + $\dfrac7{20}$ + \end{Reponse} + \begin{Indice} + C'est une soustraction, il faut réduire au même dénominateur. + \end{Indice} + \begin{exercice}[Pouce] % On affiche uniquement l'environnement Indice + Si $x=3$, que vaut $x^3+4x$ ? + \end{exercice} + \begin{Solution} + $x^3+4x=3^3+4\times3=27+12=39$ + \end{Solution} + \begin{Indice} + Que veut dire $x^3$ ? Que veut dire $4x$ ? + \end{Indice} + \begin{Reponse} + 39 + \end{Reponse} +\end{Maquette} +\end{Codes} +\begin{Maquette}[DS,CorrigeFin]{Numero=3} + \begin{exercice} % La clé CorrigeFin utilise le contenu de l'environnement Solution + $1+\dfrac2{10}=$ + \end{exercice} + \begin{Solution} + $1+\dfrac2{10}=\num{1.2}$ + \end{Solution} + \begin{Reponse} + \num{1.2} + \end{Reponse} + \begin{Indice} + Une unité représente dix dixièmes de l'unité. + \end{Indice} + \begin{exercice}[PasCorrige] + $7(x+5)=$ ? + \end{exercice} + \begin{Solution} + $7(x+5)=7\times x+7\times 5=7x+35$ + \end{Solution} + \begin{Indice} + Utiliser la simple distributivité. + \end{Indice} + \begin{Reponse} + $7x+35$ + \end{Reponse} + \begin{exercice}[Direct] + + $\dfrac34-\dfrac25=$? + \end{exercice} + \begin{Solution} + $\dfrac34-\dfrac25=\dfrac{15}{20}-\dfrac8{20}=\dfrac7{20}$ + \end{Solution} + \begin{Reponse} + $\dfrac7{20}$ + \end{Reponse} + \begin{Indice} + C'est une soustraction, il faut réduire au même dénominateur. + \end{Indice} + \begin{exercice}[Pouce] + Si $x=3$, que vaut $x^3+4x$ ? + \end{exercice} + \begin{Solution} + $x^3+4x=3^3+4\times3=27+12=39$ + \end{Solution} + \begin{Indice} + Que veut dire $x^3$ ? Que veut dire $4x$ ? + \end{Indice} + \begin{Reponse} + 39 + \end{Reponse} +\end{Maquette} +\end{document} +%%% Local Variables: +%%% TeX-engine: luatex +%%% End:
\ No newline at end of file diff --git a/macros/latex/contrib/profmaquette/latex/ProfMaquette.sty b/macros/latex/contrib/profmaquette/latex/ProfMaquette.sty new file mode 100644 index 0000000000..c18029cbe4 --- /dev/null +++ b/macros/latex/contrib/profmaquette/latex/ProfMaquette.sty @@ -0,0 +1,1879 @@ +% Author : Christophe Poulain +% licence : Released under the LaTeX Project Public License v1.3c +% or later, see http://www.latex-project.org/lppl.txtf +\NeedsTeXFormat{LaTeX2e}% +\def\filedate{2023/06/04}% +\let\PfMfiledate\filedate% +\def\fileversion{0.15}% +\let\PfMfileversion\fileversion% +\ProvidesPackage{ProfMaquette}[\filedate\space v\fileversion\space Maquettage de documents]% + +% packages nécessaires +\RequirePackage{verbatim} + +\RequirePackage{calc} + +\RequirePackage{xlop} + +\RequirePackage[most]{tcolorbox} +\RequirePackage{varwidth} +\RequirePackage{xinttools} + +\RequirePackage{listofitems} +\RequirePackage{array} +\RequirePackage{datatool} + +%définition des clés +\RequirePackage{simplekv} +\setKVdefault[Boulot]{Base=false,BaseHTML=false,Fiche=false,DM=false,DS=false,IE=false,Kholle=false,RecapBrevet=false,PdT=false,Parcours=false,ParcoursPerso=false,CorrigeApres=false,CorrigeFin=false,Brevet=false,BaremeComplet=false,BaremeGlobal=false,AllDirect=false,AllPouce=false}%Les deux derniers pour essayer de mettre tous les exercices d'un même fichier en mode Reponse, en mode Indice. Pas implanté, pas testé +\setKVdefault[DM]{Numero=1,Date=\today,Classe={},Niveau=3,Code=\jobname} +\setKVdefault[DS]{Numero=1,Date=\today,Classe={},Niveau=3,Code=\jobname,Calculatrice=false,Sujet=A} +\setKVdefault[Fiche]{Theme=Les nombres décimaux,Date=\today,Niveau=6,Classe=Nairobi,Code={},NomExercice=Exercice} +\setKVdefault[PdT]{Theme=Les nombres décimaux,Date=\today,Niveau=6,Classe=Nairobi,Code={},NomExercice=Exercice} +\setKVdefault[Parcours]{Theme=Les nombres décimaux,Date=\today,Niveau=6,Classe=Nairobi,Code={},NomExercice=Exercice,Vertical=false} +\setKVdefault[ParcoursPerso]{Fichier={}} +\setKVdefault[IE]{Nom=\'Evaluation,Sujets=false,Theme={},Numero=1,Date=\today,Classe={},Niveau=3,Code=\jobname,Calculatrice=false} +\defKV[IE]{Sujet=\setKV[IE]{Sujets}} +\setKVdefault[RecapBrevet]{Theme=Les nombres décimaux,Date=\today,Code={},NomExercice=Exercice} +\setKVdefault[Kholle]{Sujet=1,Numero=1,Date=15,Niveau=TSI-1,Code=\jobname,Lieu=Lycée + du Hainaut (Valenciennes),NomEleve=Albert Einstein,CR=false} +\setKVdefault[ClesExercices]{PasTitre=false,AffichageSource=false,BaremeTotal,BaremeDetaille=false,MotPoint=point,AffichageTitre=false,Calculatrice=true,Oral=false,Difficulte=0,AffichageCompetence=false,TitreExo=Exercice,PasCorrige=false,Direct=false,Pouce=false,Parcours=false}% +\defKV[ClesExercices]{Source=\setKV[ClesExercices]{AffichageSource}}% +\defKV[ClesExercices]{Titre=\setKV[ClesExercices]{AffichageTitre}}% +\defKV[ClesExercices]{Competence=\setKV[ClesExercices]{AffichageCompetence}}% +\defKV[ClesExercices]{Trajet=\setKV[ClesExercices]{Parcours}} +\setKVdefault[SchemaParcours]{Colonnes=100,Rayon=2.5mm,Largeur=7.5mm,Couleur=LightSteelBlue,Csv=false}% +% Definition de longueurs +\newlength\PfMLargeurSchemaParcours +\newlength{\PfMHauteurAppreciation} +\setlength{\PfMHauteurAppreciation}{5cm} +\newlength{\PfMHauteurRemarque} +\setlength{\PfMHauteurRemarque}{5cm} +%définition des compteurs +\newcounter{PfMExo}%Numéro des exercices +\setcounter{PfMExo}{0}% +\newcounter{PfMCorrigeParcoursPerso}%affichage des solutions ou pas dans le cadre d'un parcours perso +\setcounter{PfMCorrigeParcoursPerso}{0}% +\newcounter{PfMSOS}%Numéro des SOS dans les parcours fléchés +\setcounter{PfMSOS}{0}% +\newcounter{PfMAlea}%Pour repérer les valeurs aléatoires construites automatiquement +\setcounter{PfMAlea}{0}% +\newcounter{RetiensSol}%Pour l'affichage des solutions +\newcounter{RetiensRep}%Pour l'affichage des reponses. +\newcounter{RetiensInd}%Pour l'affichage des indices. +\setcounter{RetiensSol}{0}% +\setcounter{RetiensRep}{0}% +\setcounter{RetiensInd}{0}% +\newcounter{PfMNbLogo}%Pour décaler les logos sur la ligne haute de tcolorbox +\setcounter{PfMNbLogo}{0}% +\newcounter{Maquette}%Pour compter le nombres de "travaux" +\setcounter{Maquette}{0}% +\newcount\Orientation%Pour le schéma des parcours +% couleurs +\colorlet{PfMColCpt}{gray!50} +\colorlet{PfMColSrc}{gray!50} +\colorlet{PfMCadreFiche}{gray!50} +\colorlet{PfMCadreDM}{gray!85} +\colorlet{PfMCadreParcours}{gray!50} +% Définitions de commandes +\newcommand\PfMIENom{\dotfill} +\newcommand\PfMIEPrenom{\dotfill} +\newcommand\PfMIEClasse{\dotfill} +\newcommand\PfMCompNA{NA} +\newcommand\PfMCompECA{ECA} +\newcommand\PfMCompA{A} +% Définitions pour les compétences +\NewDocumentCommand\Competences{O{3}m}{% + \setsepchar[*]{/*§}\ignoreemptyitems% + \readlist*\ListeCompetence{#2} + \ifnum#1=3\relax + \buildtabcompetences% + \else + \Buildtabcompetences{#1}{\listlen\ListeCompetence[1]}% + \fi +} + +\def\buildtabcompetences{% + \[\begin{tabular}{|p{0.70\linewidth}|*{3}{>{\centering\arraybackslash}p{0.05\linewidth}|}} + \cline{2-4} + \multicolumn{1}{c|}{}&\PfMCompNA&\PfMCompECA&\PfMCompA\\ + \hline + \xintFor* ##1 in {\xintSeq {1}{\ListeCompetencelen}}\do{\ListeCompetence[##1]&&&\\\hline} + \end{tabular} + \] +}% + +\newlength\PfMLargeurComp + +\def\Buildtabcompetences#1#2{% + \setlength{\PfMLargeurComp}{\fpeval{0.85-0.05*#2}\linewidth}% + \[\begin{tabular}{|p{\PfMLargeurComp}|*{#1}{>{\centering\arraybackslash}p{0.05\linewidth}|}}% + \cline{2-\fpeval{1+#1}}% + \multicolumn{1}{c|}{}\xintFor* ##1 in{\xintSeq{1}{#1}}\do{% + &\ListeCompetence[1,##1]}\\% + \hline% + \xintFor* ##1 in {\xintSeq {2}{\ListeCompetencelen}}\do{\ListeCompetence[##1]% + \xintFor* ##2 in {\xintSeq{1}{#1}}\do{&}% + \\\hline% + }% + \end{tabular}% + \]% +}% + +%%%% +%%% Définitions des environnements pour la correction +\makeatletter +\newwrite\verbatim@out + +\def\SolutionWrite{% + \@bsphack + \immediate\openout \verbatim@out "\jobname-Ex\thePfMExo.sol" % + \let\do\@makeother\dospecials + \catcode`\^^M\active + \def\verbatim@processline{% + \immediate\write\verbatim@out{\the\verbatim@line}}% + \verbatim@start} +\def\endSolutionWrite{\immediate\closeout\verbatim@out\@esphack} + +\def\SolutionWritePP{% + \@bsphack + \immediate\openout \verbatim@out "\jobname-PPEx\thePfMExo.sol" % + \let\do\@makeother\dospecials + \catcode`\^^M\active + \def\verbatim@processline{% + \immediate\write\verbatim@out{\the\verbatim@line}}% + \verbatim@start} +\def\endSolutionWritePP{\immediate\closeout\verbatim@out\@esphack} + +\def\ReponseWrite{% + \@bsphack + \immediate\openout \verbatim@out "\jobname-Ex\thePfMExo.rep" % + \let\do\@makeother\dospecials + \catcode`\^^M\active + \def\verbatim@processline{% + \immediate\write\verbatim@out{\the\verbatim@line}}% + \verbatim@start} +\def\endReponseWrite{\immediate\closeout\verbatim@out\@esphack} + +\def\IndiceWrite{% + \@bsphack + \immediate\openout \verbatim@out "\jobname-Ex\thePfMExo.cdp" %coup de pouce + \let\do\@makeother\dospecials + \catcode`\^^M\active + \def\verbatim@processline{% + \immediate\write\verbatim@out{\the\verbatim@line}}% + \verbatim@start} +\def\endIndiceWrite{\immediate\closeout\verbatim@out\@esphack} +\makeatother + +\def\SolutionNow{\textbf{Correction de l'exercice --}\par\nopagebreak} +\def\endSolutionNow{\par\goodbreak} + +\def\ReponseNow{\textbf{Réponse(s) de l'exercice --}\par\nopagebreak} +\def\endReponseNow{\par\goodbreak} + +\def\IndiceNow{\textbf{Indice(s) --}\par\nopagebreak} +\def\endIndiceNow{\par\goodbreak} + +\NewDocumentEnvironment{Solution}{}{}{}% +\NewDocumentEnvironment{Reponse}{}{}{}% +\NewDocumentEnvironment{Indice}{}{}{}% + +\NewDocumentCommand\PfMChoixAffichageCorrection{}{% + \ifboolKV[Boulot]{ParcoursPerso}{% + \let\Solution\SolutionWritePP\let\endSolution\endSolutionWritePP + }{% + \ifnum\theRetiensSol=1\relax + \let\Reponse\comment\let\endReponse\endcomment + \let\Indice\comment\let\endIndice\endcomment + \ifboolKV[Boulot]{CorrigeFin}{% + \let\Solution\SolutionWrite\let\endSolution\endSolutionWrite + }{\ifboolKV[Boulot]{CorrigeApres}{% + \let\Solution\SolutionNow\let\endSolution\endSolutionNow + }{}% + }% + \else + \let\Solution\comment\let\endSolution\endcomment + \let\Indice\comment\let\endIndice\endcomment + \ifnum\theRetiensRep=1\relax + \ifboolKV[Boulot]{CorrigeFin}{% + \let\Reponse\ReponseWrite\let\endReponse\endReponseWrite + }{\ifboolKV[Boulot]{CorrigeApres}{% + \let\Reponse\ReponseNow\let\endReponse\endReponseNow + }{}% + }% + \else + \let\Solution\comment\let\endSolution\endcomment + \let\Reponse\comment\let\endReponse\endcomment + \ifnum\theRetiensInd=1\relax + \ifboolKV[Boulot]{CorrigeFin}{% + \let\Indice\IndiceWrite\let\endIndice\endIndiceWrite + }{\ifboolKV[Boulot]{CorrigeApres}{% + \let\Indice\IndiceNow\let\endIndice\endIndiceNow + }{}% + }% + \fi + \fi + \fi + }% +}% + +\NewDocumentCommand\PfMChoixCorrection{}{% + \setcounter{RetiensSol}{0} + \setcounter{RetiensRep}{0} + \setcounter{RetiensInd}{0} + \ifboolKV[Boulot]{CorrigeFin}{% + \setcounter{RetiensSol}{1}% + \setcounter{RetiensRep}{0}% + \setcounter{RetiensInd}{0}% + }{\ifboolKV[Boulot]{CorrigeApres}{% + \setcounter{RetiensSol}{1}% + \setcounter{RetiensRep}{0}% + \setcounter{RetiensInd}{0}% + }{}% + }% + \ifboolKV[ClesExercices]{PasCorrige}{% + \setcounter{RetiensSol}{0} + \setcounter{RetiensRep}{0} + \setcounter{RetiensInd}{0}% + }{% + \ifboolKV[ClesExercices]{Direct}{% + \setcounter{RetiensSol}{0} + \setcounter{RetiensRep}{1} + \setcounter{RetiensInd}{0}% + }{% + \ifboolKV[ClesExercices]{Pouce}{ + \setcounter{RetiensSol}{0} + \setcounter{RetiensRep}{0} + \setcounter{RetiensInd}{1}% + }{}% + }% + }% +}% + +\NewDocumentCommand\PfMAffichageCorrige{}{% + \xintFor* ##1 in{\xintSeq{1}{\thePfMExo}}\do{% + \IfFileExists{\jobname-Ex##1.sol}{\textbf{Corrigé de l'exercice ##1}\par\nopagebreak\input{\jobname-Ex##1.sol}\par\goodbreak}{\IfFileExists{\jobname-Ex##1.rep}{\textbf{Réponse(s) seule(s) de l'exercice ##1}\par\nopagebreak\input{\jobname-Ex##1.rep}\par\goodbreak}{% + \IfFileExists{\jobname-Ex##1.cdp}{\textbf{Indice(s) pour l'exercice ##1}\par\nopagebreak\input{\jobname-Ex##1.cdp}\par\goodbreak}{} + }% + }% + }% +}% +%%%%%%%% BAREME %%%%%%%%%%% +%% Bareme +\newlength{\brouillon} + +\newcommand*\FranPt[1]{% + \ifboolKV[ClesExercices]{BaremeDetaille}{% + \color{gray!75}(\num{#1})% + }{} +} + +\makeatletter +\newcommand\BaremeEspace@Marge{15pt} +\newcommand\BaremeEspace@MargeCorrection{0pt} +%\f@size est la taille par défaut de la fonte. + +\newcommand*{\brm}[1]{% + \ifboolKV[Boulot]{Fiche}{}{% + \immediate\write\@auxout{% + \string\opadd*{#1}% + {total\the\c@section-\the\c@PfMExo}% + {total\the\c@section-\the\c@PfMExo}% + \string\opcopy{\thePfMExo}{TotalExo}% + }% + \ifboolKV[ClesExercices]{BaremeDetaille}{% + \setlength{\brouillon}{\BaremeEspace@Marge-\linewidth+\textwidth}% + \makebox[0pt][r]{\footnotesize\FranPt{#1}\hspace*{\brouillon}}% + \ignorespaces% + }% + }{}% +}% + +\newcommand*{\Brm}[1]{% + \ifboolKV[Boulot]{Fiche}{}{% + \setlength{\brouillon}{\BaremeEspace@MargeCorrection-\linewidth+\textwidth}% + \makebox[0pt][r]{\footnotesize\color{gray!75}(\opprint{#1})\hspace*{\brouillon}}% + \ignorespaces% + }% +}% + +\newcommand\total[1]{% + \@ifundefined{Op@total#1}{recompilez}% + {% + \opunzero{total#1}% on ne sait jamais + \opset{decimalsepsymbol={,}} + \opprint{total#1}~% + \opset{decimalsepsymbol={.}} + \opcmp{total#1}{2}% + \ifopge \useKV[ClesExercices]{MotPoint}s\else \useKV[ClesExercices]{MotPoint}\fi + }% +} + +\newcommand\NoteFinale{% + \@ifundefined{Op@TotalExo}{Recompilez}% + {% + \opexport{TotalExo}{\TotalExo}%Le total d'exercices est \TotalExo. + \xdef\NoteTotale{0}% + \xintFor* ##1 in {\xintSeq{1}{\TotalExo}}\do{% + \opexport{total##1-##1}{\totalUn}% + \xdef\NoteTotale{\fpeval{\NoteTotale+\totalUn}}% + }% + \NoteTotale% + }% +}% + +\newcommand\TableauRecapitulatif{% + \@ifundefined{Op@TotalExo}{Recompilez}% + {% + \opexport{TotalExo}{\TotalExo}% + \begin{tabular}{|c|c|} + \hline + \multicolumn{2}{|c|}{Barème récapitulatif}\\ + \hline + \xintFor* ##1 in {\xintSeq{1}{\TotalExo}}\do{ + Exercice ##1&\total{##1-##1}\\ + } + \hline + \end{tabular} + } +}% +\makeatother +%%%%%%%% FIN BAREME %%%%%%%%%%%%%%%% +%%%Style des différents documents +\tcbset{% + tikzbase/.style={% + before skip=1em, + enhanced, + breakable, + bicolor, + colback=LightSteelBlue, + colbacklower=white, + frame hidden, + } +} + +\tcbset{% + tikzbasehtml/.style={% + before skip=1em, + enhanced, + breakable, + frame hidden, + } +} + +\makeatletter +%%% Base des exercices DM +\tcbset{% + BaseDM/.style={% + lowerbox=ignored, + enhanced, + breakable, + colback=white, + colframe=PfMCadreDM, + fonttitle=\bfseries\sffamily, + title=Exercice \thePfMExo, + attach boxed title to top left={xshift=0.2mm}, + boxed title size=standard, + boxed title style={% + empty, + rounded corners=north, + boxrule=0pt, + bottom=0pt + }, + underlay boxed title={% + \filldraw[rounded corners, gray!85, line width=.5mm] + (title.south east)--++(90:\tcboxedtitleheight)--++(183:\tcboxedtitlewidth)--++(-90:\tcboxedtitleheight)|-cycle; + },% + overlay unbroken and first={% + \ifboolKV[ClesExercices]{AffichageSource}{% + \node[% + fill=white, + anchor=east, + xshift=-10pt, + text=gray!50, + ] + at (frame.south east) + {\scriptsize\sffamily \useKV[ClesExercices]{Source}}; + }{}% + \ifboolKV[ClesExercices]{BaremeTotal}{% + \node[ + fill=white, + anchor=east, + xshift=-10pt, + text=black, + font=\bfseries + ] + at (frame.north east) + {\footnotesize\sffamily \total{\the\c@section-\the\c@PfMExo}}; + }{} + }% + }% +}% + +\newenvironment{exerciceDM}[1][]{% + \setcounter{PfMAlea}{0}% + \useKVdefault[ClesExercices] + \setKV[ClesExercices]{#1} + \refstepcounter{section} + \PfMChoixCorrection% + \refstepcounter{PfMExo} + \immediate\write\@auxout{% + \string\opcopy{\thePfMExo}{TotalExo}% + } + \ifboolKV[ClesExercices]{BaremeTotal}{% + \immediate\write\@auxout{% + \string\opcopy{0}{total\the\c@section-\the\c@PfMExo}% + }}{} + \tcolorbox[% + BaseDM, + label is label, + label=page-\theMaquette-\thePfMExo% + ] +}{% + \endtcolorbox% +} + +%%Parcours + +%\makeatletter +\NewDocumentCommand\AfficheParcours{om}{% + \useKVdefault[SchemaParcours]% + \setKV[SchemaParcours]{#1}% + \setlength{\PfMLargeurSchemaParcours}{\useKV[SchemaParcours]{Largeur}}% + \colorlet{PfMCouleurSP}{\useKV[SchemaParcours]{Couleur}}% + \@ifundefined{Op@ParcoursTotalExo}{Recompilez pour obtenir le parcours.}% + {% + \opexport{ParcoursTotalExo}{\ParcoursTotalExo}% + \setsepchar{,}\ignoreemptyitems% + \readlist*\ListeExercicesPA{\csname Parcours#2\endcsname} + \reademptyitems% + \xdef\PfCFooTestA{\ListeExercicesPA[1]}% + \ifnum\ListeExercicesPAlen>1\relax% + \xintFor* ##1 in{\xintSeq{2}{\ListeExercicesPAlen}}\do{% + \xdef\PfCFooTestA{\PfCFooTestA,\ListeExercicesPA[##1]}% + }% + \fi% + \ifboolKV[Parcours]{Vertical}{% + \BuildParcoursTikzV{\ParcoursTotalExo}{\PfCFooTestA}% + }{% + \BuildParcoursTikz{\ParcoursTotalExo}{\PfCFooTestA}% + }% + }% +}% +%\makeatother + +\NewDocumentCommand\BuildParcoursTikzV{mm}{% + \setsepchar{,}% + \readlist*\ListeRetiens{#2}% + \begin{tikzpicture}[remember picture,overlay] + % On place les points + \coordinate[xshift=-1cm,yshift=-4cm] (A-1) at (current page.north east);% + \xintFor* ##1 in{\xintSeq{2}{#1}}\do{% + \coordinate[yshift=-1cm] (A-##1) at (A-\fpeval{##1-1});% + }% + \foreach\i in{2,...,#1}{% + \draw[dashed] (A-\fpeval{\i-1}) -- (A-\i);% + }% + \xintFor* ##1 in{\xintSeq{1}{#1}}\do{% + \draw[fill=white,dashed](A-##1) circle (2.5mm) node{##1};% + }% + \foreachitem\compteur\in\ListeRetiens{% + \draw[fill=PfMCouleurSP](A-\ListeRetiens[\compteurcnt]) circle (2.5mm) node{\ref{page-\theMaquette-\ListeRetiens[\compteurcnt]}};% + }% + \end{tikzpicture}% +}% + +\NewDocumentCommand\BuildParcoursTikz{mm}{% + \setsepchar{,}% + \readlist*\ListeRetiens{#2}% + \begin{tikzpicture} + % On place les points + \Orientation=1\relax + \coordinate (A-1) at (0,0);% + \xintFor* ##1 in{\xintSeq{2}{#1}}\do{% + \modulo{##1}{\useKV[SchemaParcours]{Colonnes}}% + \ifnum\remainder=0\relax% + \Orientation=\numexpr\Orientation*(-1)\relax% + \coordinate[yshift=-1cm] (A-##1) at (A-\fpeval{##1-1});% + \else% + \coordinate[xshift=\the\Orientation*\PfMLargeurSchemaParcours] (A-##1) at (A-\fpeval{##1-1});% + \fi% + }% + \foreach\i in{2,...,#1}{% + \draw[dashed] (A-\fpeval{\i-1}) -- (A-\i);% + }% + \xintFor* ##1 in{\xintSeq{1}{#1}}\do{% + \draw[fill=white,dashed](A-##1) circle (2.5mm) node{##1};% + }% + \foreachitem\compteur\in\ListeRetiens{% + \draw[fill=PfMCouleurSP](A-\ListeRetiens[\compteurcnt]) circle (2.5mm) node{\ref{page-\theMaquette-\ListeRetiens[\compteurcnt]}};% + }% + \end{tikzpicture}% +}% + +\NewDocumentCommand\RemplisParcours{m}{% + \ifcsname trajet#1\endcsname + \expandafter\xdef\csname trajet#1\endcsname{\csname trajet#1\endcsname,\thePfMExo}% +% Yes ! + \else +% No ! + \expandafter\xdef\csname trajet#1\endcsname{\thePfMExo}% + \fi + \immediate\write\@auxout{\noexpand\expandafter\gdef\noexpand\csname Parcours#1\endcsname{\csname trajet#1\endcsname}}% +}% + +\def\exerciceParcoursPerso{% + \stepcounter{PfMExo}% + \PfMChoixCorrection% + \@bsphack% + \immediate\openout \verbatim@out "\jobname-PPEx\thePfMExo.tex" % + \let\do\@makeother\dospecials% + \catcode`\^^M\active% + \def\verbatim@processline{% + \immediate\write\verbatim@out{\the\verbatim@line}}% + \verbatim@start}% + +\def\endexerciceParcoursPerso{\immediate\closeout\verbatim@out\@esphack}% + +\newenvironment{exerciceParcours}[1][]{% + \setcounter{PfMAlea}{0}% + \setcounter{PfMNbLogo}{1}% + \useKVdefault[ClesExercices]% + \setKV[ClesExercices]{#1}% + \setKV[ClesExercices]{BaremeTotal=false,BaremeDetaille=false}% + \refstepcounter{section}% + \PfMChoixCorrection% + \refstepcounter{PfMExo}% + \immediate\write\@auxout{\string\opcopy{\thePfMExo}{ParcoursTotalExo}}% + % Creation des parcours + \ifboolKV[ClesExercices]{Parcours}{% + \setsepchar{,}% + \xdef\PfMFooListeParcours{\useKV[ClesExercices]{Trajet}} + \readlist*\ListeParcours{\PfMFooListeParcours}% + \foreachitem\compteur\in\ListeParcours{% + \RemplisParcours{\ListeParcours[\compteurcnt]}% + }% + }{}% + % + \tcolorbox[% + tikzparcours, + label is label, + label=page-\theMaquette-\thePfMExo + ] +}{\endtcolorbox% +} + +\newenvironment{exerciceFiche}[1][]{% + \setcounter{PfMAlea}{0}% + \setcounter{PfMNbLogo}{1}% + \useKVdefault[ClesExercices]% + \setKV[ClesExercices]{#1}% + \setKV[ClesExercices]{BaremeTotal=false,BaremeDetaille=false}% + \refstepcounter{section}% + \PfMChoixCorrection% + \refstepcounter{PfMExo}% + \tcolorbox[% + tikzfiche, + label is label, + label=page-\theMaquette-\thePfMExo + ] +}{\endtcolorbox% +} + +\newenvironment{exerciceDS}[1][]{% + \setcounter{PfMAlea}{0}% + \useKVdefault[ClesExercices]% + \setKV[ClesExercices]{#1}% + \refstepcounter{section}% + \PfMChoixCorrection% + \refstepcounter{PfMExo}% + \immediate\write\@auxout{% + \string\opcopy{\thePfMExo}{TotalExo}% + } + \ifboolKV[ClesExercices]{BaremeTotal}{% + \immediate\write\@auxout{% + \string\opcopy{0}{total\the\c@section-\the\c@PfMExo}% + }}{} + \tcolorbox[% + tikzds, + label is label, + label=page-\theMaquette-\thePfMExo + ] +}{\endtcolorbox% +} +\makeatother +%%% Recap Brevet +% Fiche Exercice Brevet +\newcommand\TikzRecapBrevet{% +\begin{tcolorbox}[spread upwards=-1cm,colback=gray!5]% + \Large\sffamily \useKV[RecapBrevet]{Theme} + \par{\tiny\useKV[RecapBrevet]{Code}}\hfill{\scriptsize\useKV[RecapBrevet]{Date}} + \end{tcolorbox}% +} + +\newcommand\TikzRecapBrevetCor[1]{% + \clearpage + \setKV[RecapBrevet]{#1}% + \begin{tcolorbox}[spread upwards=-1cm,colback=gray!5]% + \Large\sffamily \useKV[RecapBrevet]{Theme} (Correction) + \par{\tiny\useKV[RecapBrevet]{Code}}\hfill{\scriptsize\useKV[RecapBrevet]{Date}} + \end{tcolorbox}% +} + +\makeatletter +\newenvironment{ExerciceRecapBrevet}[1][]{% + \setcounter{PfMAlea}{0}% + \useKVdefault[ClesExercices]% + \setKV[ClesExercices]{#1}% + \refstepcounter{section}% + \PfMChoixCorrection% + \refstepcounter{PfMExo}% + \ifboolKV[ClesExercices]{BaremeTotal}{% + \immediate\write\@auxout{% + \string\opcopy{0}{total\the\c@section-\the\c@PfMExo}% + }% + }{}% + \tcolorbox[% + tikzrecapbrevet, + label is label, + label=page-\theMaquette-\thePfMExo + ] +}{\endtcolorbox% +} + +\tcbset{% + tikzrecapbrevet/.style={% + before skip=1em,% + enhanced,% + breakable,% + colback=white,% + colframe=PfMCadreFiche,% + overlay unbroken and first={% + \node[% + name=A,% + fill=white,% + anchor=west,% + xshift=10pt,% + ] at (frame.north west){\bfseries\sffamily \useKV[Fiche]{NomExercice} \thePfMExo\ifboolKV[ClesExercices]{AffichageTitre}{ : \useKV[ClesExercices]{Titre}}{}};% + %% + \node[% + fill=white,% + anchor=east,% + xshift=-10pt,% + text=black,% + font=\bfseries% + ] + at (frame.north east)% + {\footnotesize\sffamily \total{\the\c@section-\the\c@PfMExo}};% + }% + }% +}% +\makeatother +%% PDT +\tcbset{% + tikzpdt/.style={% + top=\ifboolKV[ClesExercices]{PasTitre}{0mm}{2mm},bottom=0mm,left=0mm,right=0mm,% + before skip=1em, + enhanced, + breakable, + colback=white, + colframe=blue!50, + remember, + overlay unbroken and first={% + \coordinate[xshift=2pt,yshift=-2pt] (NO-\thePfMExo) at (frame.north west);% + \coordinate[xshift=-2pt,yshift=-2pt] (NE-\thePfMExo) at (frame.north east);% + \coordinate[xshift=-2pt,yshift=2pt] (SE-\thePfMExo) at (frame.south east);% + \coordinate[xshift=2pt,yshift=2pt] (SO-\thePfMExo) at (frame.south west);% + \coordinate (N-\thePfMExo) at (frame.north); + \coordinate (S-\thePfMExo) at (frame.south); + \coordinate (E-\thePfMExo) at (frame.east); + \coordinate (O-\thePfMExo) at (frame.west); + \ifboolKV[ClesExercices]{PasTitre}{% + \coordinate[xshift=10pt] (A) at (frame.north west); + }{% + \node[% + name=A, + fill=white, + anchor=west, + xshift=10pt, + ] at (frame.north west){\bfseries\sffamily \useKV[PdT]{NomExercice} \thePfMExo\ifboolKV[ClesExercices]{AffichageTitre}{ : \useKV[ClesExercices]{Titre}}{}}; + } + %% + \ifboolKV[ClesExercices]{Calculatrice}{}{\node[fill=white,anchor=west,xshift=(\thePfMNbLogo*2.5+(\thePfMNbLogo-1)*20)*1pt] at (A.east) {\cancel{\faCalculator}};\stepcounter{PfMNbLogo}} + \ifboolKV[ClesExercices]{Oral}{\node[fill=white,anchor=west,xshift=(\thePfMNbLogo*2.5+(\thePfMNbLogo-1)*20)*1pt] at (A.east) {\faBullhorn};\stepcounter{PfMNbLogo}}{}% + %% + \ifboolKV[ClesExercices]{AffichageCompetence}{% + \node[% + fill=white, + anchor=east, + xshift=-10pt, + text=PfMColCpt,% + ] + at (frame.north east) + {\itshape\scriptsize\sffamily Compétence(s) dominante(s) : \useKV[ClesExercices]{Competence}}; + }{}% + %% + \ifboolKV[ClesExercices]{AffichageSource}{% + \node[% + fill=white, + anchor=east, + xshift=-10pt, + text=PfMColSrc, + ] + at (frame.south east) + {\scriptsize\sffamily \useKV[ClesExercices]{Source}}; + }{}% + }% + }% +}% + +\NewDocumentCommand\TikzPdT{}{% + \begin{tcolorbox}[spread upwards=-1cm,colback=gray!5]% + \Large\sffamily \useKV[PdT]{Theme}\hfill\useKV[PdT]{Niveau} \useKV[PdT]{Classe}% + \par{\tiny\useKV[PdT]{Code}}\hfill{\scriptsize\useKV[PdT]{Date}}% + \end{tcolorbox}% +} + +\NewDocumentCommand\TikzPdTCor{m}{% + \clearpage + \setKV[PdT]{#1}% + \begin{tcolorbox}[spread upwards=-1cm,colback=gray!5]% + \Large\sffamily \useKV[PdT]{Theme} (Correction) \hfill\useKV[PdT]{Niveau} \useKV[PdT]{Classe} + \par{\tiny\useKV[PdT]{Code}}\hfill{\scriptsize\useKV[PdT]{Date}} + \end{tcolorbox}% +} + +\newenvironment{exercicePdT}[1][]{% + \setcounter{PfMAlea}{0}% + \setcounter{PfMNbLogo}{1} + \useKVdefault[ClesExercices]% + \setKV[ClesExercices]{#1}% + \setKV[ClesExercices]{BaremeTotal=false,BaremeDetaille=false}% + \refstepcounter{section}% + \PfMChoixCorrection% + \refstepcounter{PfMExo}% + \tcolorbox[% + tikzpdt + ]% +}{\endtcolorbox% +} + +\newenvironment{SOS}[1][]{% + \stepcounter{PfMSOS}% + \tcolorbox[% + enhanced, + remember,% + tikzsos, + overlay unbroken and first={% + \coordinate[xshift=2pt,yshift=-2pt] (SOS-NO-\thePfMSOS) at (frame.north west);% + \coordinate[xshift=-2pt,yshift=-2pt] (SOS-NE-\thePfMSOS) at (frame.north east);% + \coordinate[xshift=-2pt,yshift=2pt] (SOS-SE-\thePfMSOS) at (frame.south east);% + \coordinate[xshift=2pt,yshift=2pt] (SOS-SO-\thePfMSOS) at (frame.south west);% + \coordinate (SOS-N-\thePfMSOS) at (frame.north); + \coordinate (SOS-S-\thePfMSOS) at (frame.south); + \coordinate (SOS-E-\thePfMSOS) at (frame.east); + \coordinate (SOS-O-\thePfMSOS) at (frame.west); + }% + ]% +}{\endtcolorbox% +} + +\tikzstyle{cheminPdT}=[-stealth] + +\NewDocumentCommand\CheminVrai{m}{% + \setsepchar[*]{,*/}% + \readlist*\ListeCheminVrai{#1}% + \setsepchar{,}% + \begin{tikzpicture}[remember picture,overlay]% + \foreachitem\compteur\in\ListeCheminVrai{% + \draw[cheminPdT] (\ListeCheminVrai[\compteurcnt,1]) to node[midway]{\Large \RKbigsmile}(\ListeCheminVrai[\compteurcnt,2]);% + }% + \end{tikzpicture}% +}% + +\NewDocumentCommand\CheminFaux{m}{% + \setsepchar[*]{,*/}% + \readlist*\ListeCheminVrai{#1}% + \setsepchar{,}% + \begin{tikzpicture}[remember picture,overlay]% + \foreachitem\compteur\in\ListeCheminVrai{% + \draw[cheminPdT] (\ListeCheminVrai[\compteurcnt,1]) to node[midway]{\Large \RKdevilish}(\ListeCheminVrai[\compteurcnt,2]);% + }% + \end{tikzpicture}% +}% + +\tcbset{% + tikzsos/.style={% + left=0pt,right=0pt,top=0pt,bottom=0pt,% + colback=Crimson!15,% + colframe=Crimson!50,% + }% +}% + +%% Kholle +\tcbset{% + tikzkholle/.style={% + before skip=1em, + enhanced, + breakable, + colback=white, + colframe=gray!50, + overlay unbroken and first={% + \node[% + name=A, + fill=white, + anchor=west, + xshift=10pt, + ] at (frame.north west){\ifboolKV[ClesExercices]{AffichageTitre}{% + {\bfseries\sffamily\useKV[ClesExercices]{Titre}}% + }{\bfseries\sffamily Exercice \thePfMExo}% + \xintifboolexpr{\useKV[ClesExercices]{Difficulte}<1}{}{% + ~(\foreach \s in {1,...,\useKV[ClesExercices]{Difficulte}}{% + $\star$% + })% + } + } + ; + %% + \ifboolKV[ClesExercices]{AffichageSource}{% + \node[ + fill=white, + anchor=east, + xshift=-10pt, + text=gray!50, + ] + at (frame.south east) + {\scriptsize\sffamily \useKV[ClesExercices]{Source}}; + }{} + } + } +} + +\newenvironment{CRNote}{% + \tcolorbox[colback=white,height=2cm,title=NOTE,fonttitle=\color{black}\bfseries\sffamily,colbacktitle=white,enhanced,% + overlay unbroken and first={% + \node[% + anchor=east, + yshift=-8pt, + xshift=-10pt, + text=black, + ] + at (frame.north east) + {\sffamily\bfseries \useKV[Kholle]{NomEleve}}; + \node[% + anchor=center, + yshift=-8pt, + text=black, + ] + at (frame.north) + {\sffamily\bfseries \useKV[Kholle]{Date}}; + } + ]% + }{% + \endtcolorbox% +} + +\newlength{\CRRHauteur} +\setlength{\CRRHauteur}{10cm} + +\newenvironment{CRRemarque}{% + \tcolorbox[colback=white,height=\CRRHauteur,title=REMARQUE(S),fonttitle=\color{black}\bfseries\sffamily,colbacktitle=white% + ]} +{% + \endtcolorbox% +}% + +\NewDocumentEnvironment{exerciceKholle}{o}{% + \useKVdefault[ClesExercices]% + \setKV[ClesExercices]{#1}% + \setKV[ClesExercices]{BaremeTotal=false,BaremeDetaille=false}% + \PfMChoixCorrection% + \refstepcounter{PfMExo}% + \tcolorbox[% + tikzkholle, + label is label, + label=page-\theMaquette-\thePfMExo + ] +}{\endtcolorbox% +} + +\newenvironment{exerciceBase}[1][]{% + \setcounter{PfMAlea}{0}% + \setcounter{PfMNbLogo}{1} + \useKVdefault[ClesExercices] + \setKV[ClesExercices]{#1} + \setKV[ClesExercices]{BaremeTotal=false,BaremeDetaille=false} + \refstepcounter{PfMExo} + \tcolorbox[% + tikzbase + ] +}{\endtcolorbox% +} + +\newenvironment{exerciceBaseHTML}[1][]{% + \setcounter{PfMAlea}{0}% + \setcounter{PfMNbLogo}{1} + \useKVdefault[ClesExercices] + \setKV[ClesExercices]{#1} + \setKV[ClesExercices]{BaremeTotal=false,BaremeDetaille=false} + \refstepcounter{PfMExo} + \tcolorbox[% + standard jigsaw, opacityback=0, + lowerbox=ignored, + tikzbasehtml + ] +}{\endtcolorbox% +} + +%Alias pour tous les exercices. +\NewDocumentEnvironment{exercice}{}{}{}% + +%%%%%%%%% STyle Kholle%%%%%%%%%% +% Kholle +\newcommand\TikzKholle{% + \clearpage + \begin{tcolorbox}[frame hidden,colback=white,enhanced,% + borderline north={3pt}{0pt}{gray!85}, + borderline north={2pt}{0.5pt}{gray!15}, + borderline south={3pt}{0pt}{gray!85}, + borderline south={2pt}{0.5pt}{gray!15}, + ]% + \sffamily Interrogation Orale \no\useKV[Kholle]{Numero}\hfill + \ifboolKV[Kholle]{CR}{}{Sujet \useKV[Kholle]{Sujet}\hfill}\useKV[Kholle]{Niveau}% + \par\useKV[Kholle]{Lieu}\hfill Le \useKV[Kholle]{Date}% + \end{tcolorbox}% +} + +\newcommand\TikzKholleCor[1]{% + \clearpage + \setKV[Kholle]{#1} + \begin{tcolorbox}[colback=white,height=2cm,title=NOTE,fonttitle=\color{black}\bfseries\sffamily,colbacktitle=white,enhanced,% + overlay unbroken and first={% + \node[% + anchor=east, + yshift=-8pt, + xshift=-10pt, + text=black, + ] + at (frame.north east) + {\sffamily\bfseries Nom : \hbox to5cm{}}; + \node[% + anchor=center, + yshift=-8pt, + text=black, + ] + at (frame.north) + {\sffamily\bfseries \useKV[Kholle]{Date}}; + } + ]% + \end{tcolorbox}% + \begin{tcolorbox}[colback=white,height=2cm,title=EXERCICE(S),fonttitle=\color{black}\bfseries\sffamily,colbacktitle=white% + ]% + \end{tcolorbox}% + \begin{tcolorbox}[colback=white,height=\textheight-5cm,title=REMARQUE(S),fonttitle=\color{black}\bfseries\sffamily,colbacktitle=white% + ]% + \end{tcolorbox}% +} + +%%%%%%%%%% Style DM%%%%%%%%%%%%% +\NewDocumentCommand\TikzDM{}{% + \clearpage% + \begin{tcolorbox}[frame hidden,colback=white,enhanced,% + borderline north={3pt}{0pt}{gray!85},% + borderline north={2pt}{0.5pt}{gray!15},% + borderline south={3pt}{0pt}{gray!85},% + borderline south={2pt}{0.5pt}{gray!15},% + ]% + \sffamily Devoir en temps libre \useKV[DM]{Numero}\hfill\useKV[DM]{Niveau} \useKV[DM]{Classe}%\no + \par{\tiny\useKV[DM]{Code}}\hfill{\scriptsize Pour le \useKV[DM]{Date}}% + \end{tcolorbox}% +}% + +\NewDocumentCommand\TikzDMCor{m}{% + \clearpage + \setKV[DM]{#1} + \begin{tcolorbox}[colback=white,height=\PfMHauteurAppreciation,title=APPR\'ECIATION,fonttitle=\color{black}\bfseries\sffamily,colbacktitle=white,enhanced,% + overlay unbroken and first={% + \node[% + inner sep=0pt, + fill=white, + anchor=east, + yshift=-9pt, + xshift=-10pt, + text=black, + ] + at (frame.north east) + {\scriptsize\sffamily\bfseries \useKV[DM]{Code}}; + } + ]% + \end{tcolorbox}% + \begin{tcolorbox}[colback=white,height=\PfMHauteurRemarque,title=CONSEIL(S) / REMARQUE(S),fonttitle=\color{black}\bfseries\sffamily,colbacktitle=white% + ]% + \end{tcolorbox}% +} +%%%%%%Style Fiche +\NewDocumentCommand\TikzFiche{}{% + \begin{tcolorbox}[spread upwards=-1cm,colback=gray!5]% + \Large\sffamily \useKV[Fiche]{Theme}\hfill\useKV[Fiche]{Niveau} \useKV[Fiche]{Classe}% + \par{\tiny\useKV[Fiche]{Code}}\hfill{\scriptsize\useKV[Fiche]{Date}}% + \end{tcolorbox}% +} + +\NewDocumentCommand\TikzFicheCor{m}{% + \clearpage + \setKV[Fiche]{#1}% + \begin{tcolorbox}[spread upwards=-1cm,colback=gray!5]% + \Large\sffamily \useKV[Fiche]{Theme} (Correction) \hfill\useKV[Fiche]{Niveau} \useKV[Fiche]{Classe} + \par{\tiny\useKV[Fiche]{Code}}\hfill{\scriptsize\useKV[Fiche]{Date}} + \end{tcolorbox}% +} + +\tcbset{% + tikzfiche/.style={% + before skip=1em, + enhanced, + breakable, + colback=white, + colframe=PfMCadreFiche, + overlay unbroken and first={% + \node[% + name=A, + fill=white, + anchor=west, + xshift=10pt, + ] at (frame.north west){\bfseries\sffamily \useKV[Fiche]{NomExercice} \thePfMExo\ifboolKV[ClesExercices]{AffichageTitre}{ : \useKV[ClesExercices]{Titre}}{}}; + %% + \ifboolKV[ClesExercices]{Calculatrice}{}{\node[fill=white,anchor=west,xshift=(\thePfMNbLogo*2.5+(\thePfMNbLogo-1)*20)*1pt] at (A.east) {\cancel{\faCalculator}};\stepcounter{PfMNbLogo}} + \ifboolKV[ClesExercices]{Oral}{\node[fill=white,anchor=west,xshift=(\thePfMNbLogo*2.5+(\thePfMNbLogo-1)*20)*1pt] at (A.east) {\faBullhorn};\stepcounter{PfMNbLogo}}{} + %% + \ifboolKV[ClesExercices]{AffichageCompetence}{% + \node[% + fill=white, + anchor=east, + xshift=-10pt, + text=PfMColCpt,% + ] + at (frame.north east) + {\itshape\scriptsize\sffamily Compétence(s) dominante(s) : \useKV[ClesExercices]{Competence}}; + }{}% + %% + \ifboolKV[ClesExercices]{AffichageSource}{% + \node[% + fill=white, + anchor=east, + xshift=-10pt, + text=PfMColSrc, + ] + at (frame.south east) + {\scriptsize\sffamily \useKV[ClesExercices]{Source}}; + }{}% + }% + }% +}% +%%% Parcours %%% +\NewDocumentCommand\TikzParcours{}{% + \begin{tcolorbox}[spread upwards=-1cm,colback=gray!5]% + \Large\sffamily \useKV[Parcours]{Theme}\hfill\useKV[Parcours]{Niveau} \useKV[Parcours]{Classe}% + \par{\tiny\useKV[Parcours]{Code}}\hfill{\scriptsize\useKV[Parcours]{Date}}% + \end{tcolorbox}% +} + +\NewDocumentCommand\TikzParcoursCor{m}{% + \clearpage + \setKV[Parcours]{#1}% + \begin{tcolorbox}[spread upwards=-1cm,colback=gray!5]% + \Large\sffamily \useKV[Parcours]{Theme} (Correction) \hfill\useKV[Parcours]{Niveau} \useKV[Parcours]{Classe} + \par{\tiny\useKV[Parcours]{Code}}\hfill{\scriptsize\useKV[Parcours]{Date}} + \end{tcolorbox}% +} + +\tcbset{% + tikzparcours/.style={% + before skip=1em, + enhanced, + breakable, + colback=white, + colframe=PfMCadreParcours, + overlay unbroken and first={% + \node[% + name=A, + fill=white, + anchor=west, + xshift=10pt, + ] at (frame.north west){\bfseries\sffamily \useKV[Parcours]{NomExercice} \thePfMExo\ifboolKV[ClesExercices]{AffichageTitre}{ : \useKV[ClesExercices]{Titre}}{}}; + %% + \ifboolKV[ClesExercices]{Calculatrice}{}{\node[fill=white,anchor=west,xshift=(\thePfMNbLogo*2.5+(\thePfMNbLogo-1)*20)*1pt] at (A.east) {\cancel{\faCalculator}};\stepcounter{PfMNbLogo}} + \ifboolKV[ClesExercices]{Oral}{\node[fill=white,anchor=west,xshift=(\thePfMNbLogo*2.5+(\thePfMNbLogo-1)*20)*1pt] at (A.east) {\faBullhorn};\stepcounter{PfMNbLogo}}{} + %% + \ifboolKV[ClesExercices]{AffichageCompetence}{% + \node[% + fill=white, + anchor=east, + xshift=-10pt, + text=PfMColCpt,% + ] + at (frame.north east) + {\itshape\scriptsize\sffamily Compétence(s) dominante(s) : \useKV[ClesExercices]{Competence}}; + }{}% + %% + \ifboolKV[ClesExercices]{AffichageSource}{% + \node[% + fill=white, + anchor=east, + xshift=-10pt, + text=PfMColSrc, + ] + at (frame.south east) + {\scriptsize\sffamily \useKV[ClesExercices]{Source}}; + }{}% + }% + }% +}% +%% Fin Parcours %%% +%%% DS %%% +\newcommand\TikzDS{% + \clearpage + \begin{tcolorbox}[colback=gray!5,% + enhanced,% + overlay unbroken and first={% + \node[yshift=1em] at (frame.south) {\scriptsize\sffamily-- Calculatrice \ifboolKV[DS]{Calculatrice}{autorisée}{interdite} --}; + } + ]% + \sffamily Devoir surveillé \no\useKV[DS]{Numero} (Sujet \useKV[DS]{Sujet})\hfill\useKV[DS]{Niveau} \useKV[DS]{Classe} + \par{\tiny\useKV[DS]{Code}}\hfill{\scriptsize\useKV[DS]{Date}} + \end{tcolorbox}% +}% + +\newcommand\TikzDSCor[1]{% + \clearpage + \setKV[DS]{#1} + \begin{tcolorbox}[colback=gray!5]% + \sffamily Devoir surveillé \no\useKV[DS]{Numero} (Sujet \useKV[DS]{Sujet})\hfill\useKV[DS]{Niveau} \useKV[DS]{Classe}% + \par Correction% + \end{tcolorbox}% +} + +\makeatletter +\tcbset{% + tikzds/.style={% + enhanced, + breakable, + before skip=2mm,after skip=2mm, + colback=white, + attach boxed title to top left={xshift=1cm,yshift*=1mm-\tcboxedtitleheight}, + varwidth boxed title*=-3cm, + boxed title style={frame code={ + \path[fill=tcbcolback!30!black] + ([yshift=-1mm,xshift=-1mm]frame.north west) + arc[start angle=0,end angle=180,radius=1mm] + ([yshift=-1mm,xshift=1mm]frame.north east) + arc[start angle=180,end angle=0,radius=1mm]; + \path[left color=tcbcolback!60!black,right color=tcbcolback!60!black, + middle color=tcbcolback!80!black] + ([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east) + [rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east) + -- (frame.south east) -- (frame.south west) + -- ([xshift=-1mm,yshift=-1mm]frame.north west) + [sharp corners]-- cycle; + },interior engine=empty, + }, + fonttitle=\bfseries\sffamily, + title=Exercice \thePfMExo \ifboolKV[ClesExercices]{AffichageTitre}{ : \useKV[ClesExercices]{Titre}}{}, + overlay unbroken and first={% + \ifboolKV[ClesExercices]{AffichageSource}{% + \node[ + fill=white, + anchor=east, + yshift=0.5pt, + xshift=-10pt, + text=gray!85, + ] + at (frame.south east) + {\scriptsize\sffamily \useKV[ClesExercices]{Source}}; + }{} + \ifboolKV[ClesExercices]{BaremeTotal}{% + \node[ + fill=white, + anchor=east, + xshift=-10pt, + text=black, + font=\bfseries + ] + at (frame.north east) + {\footnotesize\sffamily \total{\the\c@section-\the\c@PfMExo}}; + }{} + }% + }% +}% +\makeatother +%Interrogations écrites +\newcommand\TikzIE{% + \clearpage + \begin{minipage}{0.6\linewidth} + \begin{tcolorbox}[colback=gray!5, + enhanced,% + overlay unbroken and first={% + \node[yshift=1em] at (frame.south) {\scriptsize\sffamily-- Calculatrice \ifboolKV[IE]{Calculatrice}{autorisée}{interdite} --}; + } + ]% + \sffamily \useKV[IE]{Nom} \no\useKV[IE]{Numero} : \useKV[IE]{Theme} \ifboolKV[IE]{Sujets}{\scriptsize(Sujet \useKV[IE]{Sujet})}{} + \vspace{1em} + \par{\tiny\useKV[IE]{Code}}\hfill{\scriptsize\useKV[IE]{Date}} + \end{tcolorbox}% + \end{minipage}\hfill\begin{minipage}{0.35\linewidth} + Nom : \PfMIENom\\[0.5em] + Prénom : \PfMIEPrenom\\[0.5em] + Classe : \PfMIEClasse + \end{minipage} + \par\bigskip +} + +\newcommand\TikzIECor[1]{% + \clearpage + \setKV[IE]{#1} + \begin{tcolorbox}[colback=gray!5, + enhanced,% + overlay unbroken and first={% + \node[yshift=1em] at (frame.south) {\scriptsize\sffamily-- Calculatrice \ifboolKV[DS]{Calculatrice}{autorisée}{interdite} --}; + } + ]% + \sffamily \useKV[IE]{Nom} \no\useKV[IE]{Numero} : \useKV[IE]{Theme} \ifboolKV[IE]{Sujets}{\scriptsize(Sujet \useKV[IE]{Sujet})}{}\hfill Correction% + \par{\tiny\useKV[IE]{Code}}\hfill{\scriptsize\useKV[DS]{Date}} + \end{tcolorbox}% +} + +\NewDocumentCommand\Recapitulatif{m}{% + \DTLforeach*{dataperso}{\Prenom=PrenomEleve,\Nom=NomEleve,\RecapListeExo=ListeExo}{% + \begin{Maquette}[Fiche]{#1,Code=\normalsize\Prenom~\Nom}% + \readlist*\ListeExercices{\RecapListeExo}% + \foreach\i in{1,...,\ListeExerciceslen}{% + \begin{exercice}% + \input{\jobname-PPEx\ListeExercices[\i].tex}% + \end{exercice}% + }% + \end{Maquette}% + }% +}% + +\NewDocumentCommand\RecapitulatifCorrection{m}{% + \DTLforeach*{dataperso}{\Prenom=PrenomEleve,\Nom=NomEleve,\RecapListeExo=ListeExo}{% + \clearpage + \TikzFicheCor{#1,Code=\normalsize\Prenom~\Nom}% + \readlist*\ListeExercices{\RecapListeExo}% + \foreach\i in{1,...,\ListeExerciceslen}{% + \IfFileExists{\jobname-PPEx\ListeExercices[\i].sol}{\textbf{Corrigé de l'exercice \i} : \input{\jobname-PPEx\ListeExercices[\i].sol}\par\goodbreak}{}% + }% + }% +}% + +%%%%%%%%%%%%%%% Debut Maquette %%%%%%% +% Environnement englobant le tout. +%\makeatletter +\NewDocumentEnvironment{Maquette}{om}{% + % on remet à zéro le compteur des exercices + \setcounter{PfMExo}{0}% + \setcounter{PfMSOS}{0}% + % nouvelles valeurs. + \stepcounter{Maquette}% + % options de boulot + \IfHookExistsTF{env/Maquette/after}{\RemoveFromHook{env/Maquette/after}[*]}{}% + \IfHookExistsTF{env/exercice/after}{\RemoveFromHook{env/exercice/after}[*]}{}% + %\AddToHook{env/exercice/after}[ChoixExo]{\PfMChoixAffichageCorrection}% + \useKVdefault[Boulot]% + \setKV[Boulot]{#1}% + \IfHookExistsTF{env/exercice/after}{\RemoveFromHook{env/exercice/after}[*]\AddToHook{env/exercice/after}[ChoixExo]{\PfMChoixAffichageCorrection}}{\AddToHook{env/exercice/after}[ChoixExo]{\PfMChoixAffichageCorrection}}% + \ifboolKV[Boulot]{RecapBrevet}{% + \setKV[RecapBrevet]{#2}% + \TikzRecapBrevet% + \let\exercice\ExerciceRecapBrevet\let\endexercice\endExerciceRecapBrevet% + \ifboolKV[Boulot]{CorrigeFin}{% + \AddToHook{env/Maquette/after}[Correction]{% + \TikzRecapBrevetCor{#2}% + \PfMAffichageCorrige% + }% + }{}% + }{% + \ifboolKV[Boulot]{ParcoursPerso}{% + \setKV[ParcoursPerso]{#2}% + \DTLloaddb[noheader,keys={PrenomEleve,NomEleve,ListeExo}]{dataperso}{\useKV[ParcoursPerso]{Fichier}.csv}% + \let\exercice\exerciceParcoursPerso% + \let\endexercice\endexerciceParcoursPerso% + \ifboolKV[Boulot]{CorrigeFin}{\setcounter{PfMCorrigeParcoursPerso}{1}}{}% + \setcounter{PfMExo}{0}% + \AtEndDocument{% + \Recapitulatif{#2}% + \ifnum\thePfMCorrigeParcoursPerso=1\relax% + \RecapitulatifCorrection{#2}% + \fi + }% + }{% + \ifboolKV[Boulot]{Parcours}{% + \setKV[Parcours]{#2}\TikzParcours% + \let\exercice\exerciceParcours% + \let\endexercice\endexerciceParcours% + \ifboolKV[Boulot]{CorrigeFin}{% + \PfMAffichageCorrige% + }{}% + }{% + \ifboolKV[Boulot]{PdT}{% + \setKV[PdT]{#2}\TikzPdT% + \let\exercice\exercicePdT + \let\endexercice\endexercicePdT% + \ifboolKV[Boulot]{CorrigeFin}{% + \AddToHook{env/Maquette/after}[Correction]{% + \TikzPdTCor{#2}% + \PfMAffichageCorrige% + }% + }{}% + }{ + \ifboolKV[Boulot]{DM}{% + \setKV[DM]{#2}\TikzDM% + \let\exercice\exerciceDM + \let\endexercice\endexerciceDM% + \ifboolKV[Boulot]{CorrigeFin}{% + \AddToHook{env/Maquette/after}[Correction]{% + \TikzDMCor{#2}% + \PfMAffichageCorrige% + }% + }{}% + }{% + \ifboolKV[Boulot]{Fiche}{% + \setKV[Fiche]{#2}\TikzFiche% + \let\exercice\exerciceFiche + \let\endexercice\endexerciceFiche% + \ifboolKV[Boulot]{CorrigeFin}{% + \AddToHook{env/Maquette/after}[Correction]{% + \TikzFicheCor{#2}% + \PfMAffichageCorrige% + }% + }{}% + }{% + \ifboolKV[Boulot]{DS}{% + \setKV[DS]{#2}\TikzDS% + \let\exercice\exerciceDS + \let\endexercice\endexerciceDS% + \ifboolKV[Boulot]{BaremeComplet}{% + \begin{center} + \TableauRecapitulatif + \end{center} + }{}% + \ifboolKV[Boulot]{CorrigeFin}{% + \AddToHook{env/Maquette/after}[Correction]{% + \TikzDSCor{#2}% + \PfMAffichageCorrige% + }% + }{}% + }{% + \ifboolKV[Boulot]{IE}{% + \setKV[IE]{#2}\TikzIE% + \let\exercice\exerciceDS\let\endexercice\endexerciceDS%On garde exerciceDS + \ifboolKV[Boulot]{CorrigeFin}{% + \AddToHook{env/Maquette/after}[Correction]{% + \TikzIECor{#2}% + \PfMAffichageCorrige% + }% + }{}% + }{% + \ifboolKV[Boulot]{Kholle}{% + \setKV[Kholle]{#2}% + \TikzKholle% + \let\exercice\exerciceKholle\let\endexercice\endexerciceKholle% + \ifboolKV[Kholle]{CR}{}{% + \ifboolKV[Boulot]{CorrigeFin}{% + \AddToHook{env/Maquette/after}[Correction]{% + \TikzKholleCor{#2}% + \TikzKholleCor{#2}% + \TikzKholleCor{#2}% + \PfMAffichageCorrige% + }% + }{}% + }% + }{}% + }% + }% + }% + }% + }% + }% + }% + }% +}{}% +%\makeatother + +%D'après JCC +% pour gérer les nombres pseudo-aléatoires +\makeatletter +\input{random} + +% Pour toutes les macros de liste, le premier paramètre est le nom de +% la macro représentant la liste. + +% macro pour tester si une liste est vide +\def\empty@list{} + +% Macro pour définir une nouvelle liste +\newcommand\definelist[2]{\def#1{#2}} + +% Macro pour ajouter un élément en fin de liste +\newcommand\push[2]{% + \ifx\\#2\\% + \PackageError{randomlist} + {You can't push an empty value.} + {Arg 2 of \string\pushlist is empty.}% + \else + \ifx#1\empty@list + \def#1{#2}% + \else + \edef#1{#1,#2}% + \fi + \fi +} + +% Macro pour retirer le premier élément d'une liste +\newcommand\pop[2]{% + \getwidth{#1}{\RL@temp}% + \ifnum\RL@temp = 0 + % cas de la liste vide + \PackageError{randomlist} + {You can't pop an empty list.} + {There is no value to pull in list #1.}% + \else\ifnum\RL@temp = 1 + % cas de la liste avec un seul élément + \edef#2{#1}% + \def#1{}% + \else + % cas de la liste avec au moins deux éléments + \expandafter\@@poplist#1,\@nil#1#2% + \fi\fi +} +\def\@@poplist#1,#2,\@nil#3#4{% + \def#4{#1}% + \def#3{#2}% +} + +% Macro comptant le nombre d'élément d'une liste. +\newcount\RL@cnta +\newcommand\getwidth[2]{% + \RL@cnta \z@ + \unless\ifx#1\empty@list + \expandafter\@countlist#1,\@nil,% + \fi + \edef#2{\the\RL@cnta}% +} +\def\@countlist#1,{% + \def\RL@arg{#1}% + \unless\ifx\RL@arg\@nnil + \advance\RL@cnta \@ne + \expandafter\@countlist + \fi +} + +% Macro d'extraction de la nieme valeur +\newcommand\extract[3]{% + % #1 = liste + % #2 = indice + % #3 = macro de retour de la nieme valeur + % On vérifie si la longueur de la liste est suffisante + \getwidth{#1}{\RL@temp}% + \ifnum#2>\RL@temp + \PackageError{randomlist} + {Value number #2 doesn't exist in list #1} + {List #1 has only \RL@temp\ values}% + \else + \RL@cnta #2 + % On initialise une liste temporaire qui se remplira avec les + % éléments non extraits + \def\RL@temp{}% + % Lancement de la lecture récursive de la liste + \expandafter\RL@extract#1,\@nil,% + % On met la valeur extraite dans la macro prévue + \xdef#3{\RL@return}%cp a remplacé edef par xdef + % La liste est celle sans l'élément extrait + \let#1\RL@temp + \fi +} +\def\RL@extract#1,{% + % Dans cette étape, on ne peut pas atteindre la fin de la liste, il + % faut juste repérer l'élément à extraire + \advance\RL@cnta \m@ne + \ifnum\RL@cnta = 0 + % L'élément est atteint, on le sauvegarde + \def\RL@return{#1}% + % et on appelle la macro récursive de fin de lecture. + \expandafter\RL@@extract + \else + % L'élément n'est pas atteint, on augmente la liste temporaire + % on protège d'éventuelles virgule avec des accolades + \edef\RL@temp{\RL@temp,{#1}}% + % et on réalise l'appel récursif + \expandafter\RL@extract + \fi +} +\def\RL@@extract#1,{% + % L'élément a été extrait, on lit le reste de la liste pour mettre à + % jour la liste temporaire + \def\RL@arg{#1}% + \ifx\RL@arg\@nnil + % Si la liste est vide, on place une virgule + \ifx\RL@temp\empty + \def\RL@temp{,}% + \fi + % La fin de la liste est atteinte, il faut supprimer la virgule + % initiale de la liste temporaire + \expandafter\RL@@@extract\RL@temp\@nil + \else + % On n'a pas atteint la fin de liste, on augmente la liste + % temporaire avec l'élément lu et on réalise l'appel récursif + % l'élément ajouté est protégé avec des accolades au cas où il + % contiendrait des virgules. + \edef\RL@temp{\RL@temp,{#1}}% + \expandafter\RL@@extract + \fi +} +\def\RL@@@extract,#1\@nil{\def\RL@temp{#1}} + +% Extraction de l'élément <n> de la liste. Le choix de <n> étant +% aléatoire +\newcount\RL@cntb +\newcommand\randomextract[2]{% + % Le choix aléatoire se fait dans l'intervalle [1,max de la liste] + % donc on commence par récupérer l'indice maximum de la liste. + \getwidth{#1}{\RL@temp}% + % Nombre aléatoire dans le compteur \RL@cntb + \setrannum{\RL@cntb}{1}{\RL@temp}% + % Appel de la macro d'extraction + \extract{#1}{\the\RL@cntb}{#2}% +} +% +% Initialisation du germe en gardant la même valeur toutes les #2 +% compilations. Lors de la première compilation, c'est #1 qui sera le +% germe (si valeur vide, on laisse faire random) +\newcommand\initrandomlist[2][]{% + \ifdefined\randomlistseed + % Si le germe existe, c'est qu'il a été déclaré dans le + % fichier .aux avec le compteur de compilation. Le germe et le + % compteur de compilation existent et sont à jour. + \else + % Si le fichier aux n'a pas déclaré de compteur \randomlistseed + % on considère qu'on est à la première compilation donc qu'on + % compile avec un nouveau germe et un compteur de compilation à + % un. Dans ce cas particulier, on laisse random.tex choisir le + % germe. + \newcount\randomlistseed + \ifx\\#1\\ + % si l'argument optionnel est vide, on laisse faire random + \nextrandom + \randomlistseed \randomi + \else + % sinon, on prend cet argument comme germe initial + \randomlistseed #1 + \fi + \newcount\randomlistcompile + \randomlistcompile \@ne + \fi + % Utilisation du germe adéquat pour la compilation en cours. + \randomi\randomlistseed + % Préparation de la compilation suivante (dans le fichier .aux) + % On regarde si le nombre de compilations est égale à zéro modulo #2 + \ifnum\numexpr(\randomlistcompile/#2)*#2-\randomlistcompile=0 + % Si le nombre de compilations avec le même germe est atteint + % on changera le germe à la prochaine compilation. + \immediate\write\@mainaux{% + \string\newcount\string\randomlistseed + }% + % modification du germe (sans laisser faire random sinon cela ne + % change pas au cours de chaque minute) + \ifnum\randomlistseed>2147483646 + \randomlistseed \z@ + \else + \advance\randomlistseed \@ne + \fi + \immediate\write\@mainaux{% + \string\global\string\randomlistseed=\the\randomlistseed + }% + \else + % Il faut faire encore des compilations avec le même germe, on + % sauvegarde le germe et le compteur de compilation dans le + % fichier .aux. + \immediate\write\@mainaux{% + \string\newcount\string\randomlistseed + }% + \immediate\write\@mainaux{% + \string\global\string\randomlistseed=\the\randomlistseed + }% + \fi + % Dans tous les cas, on augmente le compteur de compilation + \immediate\write\@mainaux{% + \string\newcount\string\randomlistcompile + }% + \advance\randomlistcompile \@ne + \immediate\write\@mainaux{% + \string\global\string\randomlistcompile=\the\randomlistcompile + }% +} +\makeatother +\newcommand\initEnsemblede{% + \definelist{\EnsembleDe}{% + {2,4,6,8,10,12},% + {1,3,5,7,9,11},% + {2,3,5,7,11,13},% + } +} + +\newcommand\GetValeurDe[1]{% + \extract{\EnsembleDe}{#1}{\DeChoisi}% + \randomextract{\DeChoisi}{\NbDeChoisi}% +} + +\newcommand\initpremiers{% + \definelist{\listpremiers}{13,17,19,23,29,31,37,41,43,47}% +} + +\newcommand\initPremiers{% + \definelist{\listPremiers}{71,73,79,83,89,97,101,103,107,109,113,127,131,137,139}% +} + +\newcommand\getpremier{% + \randomextract{\listpremiers}{\NbPremier} +}% + +\newcommand\getPremier{% + \randomextract{\listPremiers}{\NBPremier} +}% + +\newcommand\getpytha{% + \randomextract{\tripletspythaentier}{\triplet}% + \extract{\triplet}{3}{\grand}% le troisième et le plus grand + \randomextract{\triplet}{\cote}% + \randomextract{\triplet}{\autre}% +} + +\newcommand\initalpha{% + \definelist{\alphas}{b,c,d,e,f} +} +\newcommand\getalpha{% + \randomextract{\alphas}{\alphaA}% +}% + +\newcommand\initsommet{% + \definelist{\sommets}{A,B,C,D,E,F,G,H,I,J,K,L,M,% pas d'espace ? + N,O,P,Q,R,S,T,U,V,W,X,Y,Z}% +} + +\newcommand\initsommetrep{% + \definelist{\sommets}{A,B,C,D,E,F,G,H,I,J,K,L,M,% pas d'espace ? + N,P,Q,R,S,T,U,V,W,X,Y,Z}% +} + +\newcommand\gettri{% + \randomextract{\sommets}{\pA}% + \randomextract{\sommets}{\pB}% + \randomextract{\sommets}{\pC}% +} + +\newcommand\getquad{% + \randomextract{\sommets}{\pA}% + \randomextract{\sommets}{\pB}% + \randomextract{\sommets}{\pC}% + \randomextract{\sommets}{\pD}% +} + +\newcommand\getpenta{% + \randomextract{\sommets}{\pA}% + \randomextract{\sommets}{\pB}% + \randomextract{\sommets}{\pC}% + \randomextract{\sommets}{\pD}% + \randomextract{\sommets}{\pE}% +} + +\newcommand\gethexa{% + \randomextract{\sommets}{\pA}% + \randomextract{\sommets}{\pB}% + \randomextract{\sommets}{\pC}% + \randomextract{\sommets}{\pD}% + \randomextract{\sommets}{\pE}% + \randomextract{\sommets}{\pF}% +} + +\newcommand\gethepta{% + \randomextract{\sommets}{\pA}% + \randomextract{\sommets}{\pB}% + \randomextract{\sommets}{\pC}% + \randomextract{\sommets}{\pD}% + \randomextract{\sommets}{\pE}% + \randomextract{\sommets}{\pF}% + \randomextract{\sommets}{\pG}% +} + +\newcommand\getocto{% + \randomextract{\sommets}{\pA}% + \randomextract{\sommets}{\pB}% + \randomextract{\sommets}{\pC}% + \randomextract{\sommets}{\pD}% + \randomextract{\sommets}{\pE}% + \randomextract{\sommets}{\pF}% + \randomextract{\sommets}{\pG}% + \randomextract{\sommets}{\pH}% +} + +\newcommand\getnonna{% + \randomextract{\sommets}{\pA}% + \randomextract{\sommets}{\pB}% + \randomextract{\sommets}{\pC}% + \randomextract{\sommets}{\pD}% + \randomextract{\sommets}{\pE}% + \randomextract{\sommets}{\pF}% + \randomextract{\sommets}{\pG}% + \randomextract{\sommets}{\pH}% + \randomextract{\sommets}{\pI}% +} + +\newcommand\gettreize{% + \randomextract{\sommets}{\pA}% + \randomextract{\sommets}{\pB}% + \randomextract{\sommets}{\pC}% + \randomextract{\sommets}{\pD}% + \randomextract{\sommets}{\pE}% + \randomextract{\sommets}{\pF}% + \randomextract{\sommets}{\pG}% + \randomextract{\sommets}{\pH}% + \randomextract{\sommets}{\pI}% + \randomextract{\sommets}{\pJ}% + \randomextract{\sommets}{\pK}% + \randomextract{\sommets}{\pL}% + \randomextract{\sommets}{\pM}% +} + +\definelist{\quadruplets}{% +{2{,}8,9{,}6,6,8},%10 +{3{,}2,12{,}6,5,12},%13 +{6{,}6,11{,}2,5,12},%13 +{7{,}8,10{,}4,5,12},%13 +{3{,}2,12{,}6,6{,}6,11{,}2},%13 +{3{,}2,12{,}6,7{,}8,10{,}4},%13 +{6{,}6,11{,}2,7{,}8,10{,}4},%13 +{7{,}8,10{,}4,6{,}6,11{,}2},%13 +{4{,}2,14{,}4,9,12},%15 +{2{,}6,16{,}8,7{,}2,15{,}4},%17 +{8,15,10{,}2,13{,}6},%17 +{2{,}6,16{,}8,8,15},%17 +{2{,}6,16{,}8,10{,}2,13{,}6},%17 +{5{,}6,19{,}2,12,16},%20 +{12,16,5{,}6,19{,}2},%20 +{7,24,8{,}8,23{,}4},%25 +{7,24,15,20},%25 +{8{,}8,23{,}4,15,20},%25 +{6{,}4,25{,}2,10,24},%26 +{6{,}4,25{,}2,13{,}2,22{,}4},%26 +{10,24,13{,}2,22{,}4},%26 +{10,24,15{,}6,20{,}8},%26 +{13{,}2,22{,}4,15{,}6,20{,}8},%26 +{9,40,16{,}8,37{,}4},%41 +{24{,}6,32{,}8,26{,}6,31{,}2},%41 +{9,40,26{,}6,31{,}2},%41 +{24{,}6,32{,}8,16{,}8,37{,}4}%41 +}% + +\definelist{\Quadruplets}{%pour un fonctionnement avec \fpeval +{2.8,9.6,6,8},%10 +{3.2,12.6,5,12},%13 +{6.6,11.2,5,12},%13 +{7.8,10.4,5,12},%13 +{3.2,12.6,6.6,11.2},%13 +{3.2,12.6,7.8,10.4},%13 +{6.6,11.2,7.8,10.4},%13 +{7.8,10.4,6.6,11.2},%13 +{4.2,14.4,9,12},%15 +{2.6,16.8,7.2,15.4},%17 +{8,15,10.2,13.6},%17 +{2.6,16.8,8,15},%17 +{2.6,16.8,10.2,13.6},%17 +{5.6,19.2,12,16},%20 +{12,16,5.6,19.2},%20 +{7,24,8.8,23.4},%25 +{7,24,15,20},%25 +{8.8,23.4,15,20},%25 +{6.4,25.2,10,24},%26 +{6.4,25.2,13.2,22.4},%26 +{10,24,13.2,22.4},%26 +{10,24,15.6,20.8},%26 +{13.2,22.4,15.6,20.8},%26 +{9,40,16.8,37.4},%41 +{24.6,32.8,26.6,31.2},%41 +{9,40,26.6,31.2},%41 +{24.6,32.8,16.8,37.4}%41 +}% + +\definelist{\tripletspytha}{{2{,}8,9{,}6,10},{6,8,10},%10 +{3{,}2,12{,}6,13},{5,12,13},%13 +{6{,}6,11{,}2,13},{7{,}8,10{,}4,13},%13 +{4{,}2,14{,}4,15},{9,12,15},%15 +{2{,}6,16{,}8,17},{7{,}2,15{,}4,17},%17 +{8,15,17},{10{,}2,13{,}6,17},%17 +{5{,}6,19{,}2,20},{12,16,20},%20 +{7,24,25},{8{,}8,23{,}4,25},%25 +{15,20,25},%25 +{8{,}8,23{,}4,25},%25 +{6{,}4,25{,}2,26},{10,24,26},%26 +{13{,}2,22{,}4,26},%26 +{15{,}6,20{,}8,26},%26 +{9,40,41},{16{,}8,37{,}4,41},%41 +{24{,}6,32{,}8,41},{26{,}6,31{,}2,41}%41 +}% + +\definelist{\tripletspythaentier}{% +{3,4,5},{5,12,13},{6,8,10},{7,24,25},{8,15,17},{9,12,15},{9,40,41},{10,24,26},{11,60,61},{12,16,20},{12,35,37},{13,84,85},{14,48,50},{15,20,25},{15,36,39},{16,30,34},{16,63,65},{18,24,30},{18,80,82},{20,21,29},{20,48,52},{21,28,35},{21,72,75},{24,32,40},{24,45,51},{24,70,74},{25,60,65},{27,36,45},{28,45,53},{28,96,100},{30,40,50},{30,72,78},{32,60,68},{33,44,55},{33,56,65},{35,84,91},{36,48,60},{36,77,85},{39,52,65},{39,80,89},{40,42,58},{40,75,85},{42,56,70},{45,60,75},{48,55,73},{48,64,80},{51,68,85},{54,72,90},{57,76,95},{60,63,87},{60,80,100},{65,72,97}}%%d'après villement.gerard.free.fr + + +\newcommand\initcarre{% + \definelist{\carres}{4,9,16,25,36,49,64,81,100}% +} +\newcommand\getcarre{% + \randomextract{\carres}{\carreA} +} + +%2009-2018 + % Source https://ec.europa.eu/eurostat/databrowser/view/ENV_AIR_GGE__custom_743354/default/table?lang=en +\definelist{\GazSerreEu}{% + {{la },Belgique,131038.46,123642.9},% + {{la },Bulgarie,58617.88,58595.07},% + {{le },Danemark,65734.85,51299.75},% + {{l'},Allemagne,934202.04,888718.56},% + {{l'},Irlande,63985.03,64241.55},% + {{la },Grèce,127381.2,96113.19},% + {{l'},Espagne,385211.04,352208.55},% + {{la },France,521519.73,462798.66},% + {{l'},Italie,510950.49,439263.95},% + {{les },{Pays Bas},212360.67,200458.52},% + {{la },Pologne,395464.33,415858.2},% + {{la },Norvège,54280.59,53769.04},% + {{la },Suisse,57276.22,52099.15}% +} + +\newcommand\getGazSerre{% + \randomextract{\GazSerreEu}{\GazSerrePays}% + \extract{\GazSerrePays}{1}{\ArticlePaysGS}% + \extract{\GazSerrePays}{1}{\NomPaysGS}% + \extract{\GazSerrePays}{1}{\ConsoAPaysGS}% + \extract{\GazSerrePays}{1}{\ConsoBPaysGS}% +} + + \definelist{\VehiculesINSEE}{% + {2012,13132,22264,8111,15242},% + {2013,12853,22712,8028,15020},% + {2014,12778,23134,8049,14905},% + {2015,12874,23460,8144,14813},% + {2016,13144,23634,8308,14813},% + {2017,13580,23645,8437,14629},% + {2018,14140,23293,8652,14453},% + {2019,14756,22636,8920,14392}% + }% + \newcommand\getVehiculesINSEE{% + \randomextract{\VehiculesINSEE}{\NbVehiculesINSEE}% + \extract{\NbVehiculesINSEE}{1}{\AnneeVehiculesINSEE}% + \extract{\NbVehiculesINSEE}{1}{\EssenceVehiculesINSEE}% + \extract{\NbVehiculesINSEE}{1}{\DieselVehiculesINSEE}% + \extract{\NbVehiculesINSEE}{1}{\KmEssenceVehiculesINSEE}% + \extract{\NbVehiculesINSEE}{1}{\KmDieselVehiculesINSEE}% + }
\ No newline at end of file |