diff options
author | Norbert Preining <norbert@preining.info> | 2024-02-09 03:00:44 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2024-02-09 03:00:44 +0000 |
commit | fa4b456400bb2b415dcbbfe785542c50e9dd61e3 (patch) | |
tree | 61bb8ad8f9071ab1f33a17b7bc28dc74fd010b3c /macros/latex | |
parent | baa694429155689a0e8bba804206961689e0a606 (diff) |
CTAN sync 202402090300
Diffstat (limited to 'macros/latex')
26 files changed, 442 insertions, 143 deletions
diff --git a/macros/latex/contrib/derivative/README.md b/macros/latex/contrib/derivative/README.md index c440e837c5..5dc61019df 100644 --- a/macros/latex/contrib/derivative/README.md +++ b/macros/latex/contrib/derivative/README.md @@ -1,4 +1,4 @@ -## README for derivative package v1.31 dated 2023-11-04 +## README for derivative package v1.4 dated 2024-02-08 The package provides a set of commands `\NewDerivative`, `\NewDifferential` etc. that can be used to define a derivative or a differential operator, respectively. The package have already defined several derivatives and differentials: @@ -16,7 +16,7 @@ The package provides a set of commands `\NewDerivative`, `\NewDifferential` etc. ### Copyright and license -Copyright 2019-2023 Simon Jensen +Copyright 2019-2024 Simon Jensen This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 diff --git a/macros/latex/contrib/derivative/derivative.pdf b/macros/latex/contrib/derivative/derivative.pdf Binary files differindex 13fdeefa66..509cc963fe 100644 --- a/macros/latex/contrib/derivative/derivative.pdf +++ b/macros/latex/contrib/derivative/derivative.pdf diff --git a/macros/latex/contrib/derivative/derivative.sty b/macros/latex/contrib/derivative/derivative.sty index 6948795968..48f0401210 100644 --- a/macros/latex/contrib/derivative/derivative.sty +++ b/macros/latex/contrib/derivative/derivative.sty @@ -1,5 +1,5 @@ % derivative.sty -% Copyright 2019-2023 Simon Jensen +% Copyright 2019-2024 Simon Jensen % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -16,10 +16,9 @@ \NeedsTeXFormat{LaTeX2e} -\RequirePackage{expl3}[2021/11/07] -\RequirePackage{xparse}[2021/11/07] +\RequirePackage{expl3}[2023/12/08] \RequirePackage{l3keys2e} -\ProvidesExplPackage{derivative}{2023/11/04}{1.31}{Nice and easy derivatives and differentials for LaTeX} +\ProvidesExplPackage{derivative}{2024/02/08}{1.4}{Nice and easy derivatives and differentials for LaTeX} \bool_new:N \l__deriv_pkg_italic_bool \bool_new:N \l__deriv_pkg_upright_bool @@ -118,6 +117,7 @@ \tl_new:N \l__deriv_cs_name_tl \tl_new:N \l__deriv_derivset_tl +\bool_new:N \l__deriv_first_unknown_key_bool \tl_new:N \l__deriv_gcd_result_tl \tl_new:N \l__deriv_gcd_remain_tl @@ -290,14 +290,14 @@ scale-frac .choices:nn = { auto, none, big, Big, bigg, Bigg } { \__deriv_set_scale:nnn {dv_#1} {##1} { frac } }, scale-frac-/ .choices:nn = { auto, none, big, Big, bigg, Bigg } { \__deriv_set_scale:nnn {dv_#1} {##1} { frac_slash } }, - delims-eval .tl_set:c = { l__deriv_dv_#1_delims_eval_tl }, - delims-eval-/ .tl_set:c = { l__deriv_dv_#1_delims_eval_slash_tl }, - delims-eval-! .tl_set:c = { l__deriv_dv_#1_delims_eval_compact_tl }, - delims-fun .tl_set:c = { l__deriv_dv_#1_delims_fun_tl }, - delims-var .tl_set:c = { l__deriv_dv_#1_delims_var_tl }, - delims-var-! .tl_set:c = { l__deriv_dv_#1_delims_var_compact_tl }, - delims-frac .tl_set:c = { l__deriv_dv_#1_delims_frac_tl }, - delims-frac-/ .tl_set:c = { l__deriv_dv_#1_delims_frac_slash_tl }, + delims-eval .tl_set:c = { l__deriv_dv_#1_delims_eval_tl }, + delims-eval-/ .tl_set:c = { l__deriv_dv_#1_delims_eval_slash_tl }, + delims-eval-! .tl_set:c = { l__deriv_dv_#1_delims_eval_compact_tl }, + delims-fun .tl_set:c = { l__deriv_dv_#1_delims_fun_tl }, + delims-var .tl_set:c = { l__deriv_dv_#1_delims_var_tl }, + delims-var-! .tl_set:c = { l__deriv_dv_#1_delims_var_compact_tl }, + delims-frac .tl_set:c = { l__deriv_dv_#1_delims_frac_tl }, + delims-frac-/ .tl_set:c = { l__deriv_dv_#1_delims_frac_slash_tl }, sep-inf-ord .code:n = { \__deriv_set_rubber_length:cn { l__deriv_dv_#1_sep_inf_ord_tl } {##1} }, sep-inf-fun .code:n = { \__deriv_set_rubber_length:cn { l__deriv_dv_#1_sep_inf_fun_tl } {##1} }, @@ -329,12 +329,23 @@ fun .bool_set:c = { l__deriv_dv_#1_misc_fun_bool }, frac .bool_set:c = { l__deriv_dv_#1_misc_frac_bool }, var .clist_set:c = { l__deriv_dv_#1_misc_var_clist }, - var .default:n = {all}, + var .default:n = { all }, order .clist_set:c = { l__deriv_dv_#1_misc_order_clist }, ord .meta:n = { order={##1} }, mixed-order .tl_set:c = { l__deriv_dv_#1_misc_mixed_order_tl }, mixord .meta:n = { mixed-order={##1} }, + + unknown .code:n = + { + \bool_if:NT \l__deriv_first_unknown_key_bool + { + \clist_clear:c { l__deriv_dv_#1_misc_order_clist } + \bool_set_false:N \l__deriv_first_unknown_key_bool + } + \exp_args:NnnV \tl_set_rescan:Nnn \l__deriv_tmpa_tl { } \l_keys_key_str + \clist_put_right:cV { l__deriv_dv_#1_misc_order_clist } \l__deriv_tmpa_tl + } } } @@ -345,7 +356,7 @@ { \keys_define:nn { deriv/i/#1 } { - style-inf .tl_set:c = { l__deriv_i_#1_style_inf_tl }, + style-inf .tl_set:c = { l__deriv_i_#1_style_inf_tl }, style-var .choices:nn = { single, multiple, mixed } { \__deriv_i_set_style_var:nnn {i_#1} {##1} { } }, style-var-* .choices:nn = { single, multiple, mixed } { \__deriv_i_set_style_var:nnn {i_#1} {##1} { _star } }, @@ -370,7 +381,18 @@ var .default:n = {all}, order .clist_set:c = { l__deriv_i_#1_misc_order_clist }, - ord .clist_set:c = { l__deriv_i_#1_misc_order_clist }, + ord .meta:n = { order={##1} }, + + unknown .code:n = + { + \bool_if:NT \l__deriv_first_unknown_key_bool + { + \clist_clear:c { l__deriv_i_#1_misc_order_clist } + \bool_set_false:N \l__deriv_first_unknown_key_bool + } + \exp_args:NnnV \tl_set_rescan:Nnn \l__deriv_tmpa_tl { } \l_keys_key_str + \clist_put_right:cV { l__deriv_i_#1_misc_order_clist } \l__deriv_tmpa_tl + } } } @@ -462,6 +484,7 @@ % keyval, dv/i, variant \cs_new_protected:Npn \deriv_local_keys:nnn #1 #2 #3 { + \bool_set_true:N \l__deriv_first_unknown_key_bool \tl_if_novalue:nTF {#1} { \bool_if:cT { l__deriv_#2_#3_local_keys_bool } @@ -759,7 +782,7 @@ % Temporary store the order argument \tl_set:Nf \l__deriv_tmpb_tl { \seq_use:Nn #2 { \__deriv_insert_mskip:nn {#4} { ord_ord } } } - + \seq_pop_left:NN \l__deriv_tmpa_seq \l__deriv_tmpc_tl \tl_put_right:Nx #3 { @@ -769,7 +792,6 @@ \__deriv_show_order:NT \l__deriv_tmpb_tl { \__deriv_insert_ord:Nnn \l__deriv_tmpb_tl {#4} { var_ord } } } - \str_if_eq:cNT { l__deriv_#4_misc_mixed_order_tl } 1 { \tl_set_eq:cN { l__deriv_#4_misc_mixed_order_tl } \l__deriv_tmpb_tl } } @@ -1553,10 +1575,10 @@ \bool_while_do:nn { \deriv_binary_if_even_p:N #2 } { \deriv_binary_shift_right:N #2 } - \__deriv_gcd_swap_helper:NNff #1 #2 { \int_from_bin:V #1 } { \int_from_bin:V #2 } + \__deriv_gcd_swap_helper:NNff #1 #2 { \exp_args:NV \int_from_bin:n {#1} } { \exp_args:NV \int_from_bin:n {#2} } } \deriv_binary_shift_left:NV #1 \l__deriv_gcd_counter_int - \tl_set:Nx #1 { \int_from_bin:V #1 } + \tl_set:Nx #1 { \exp_args:NV \int_from_bin:n {#1} } } \cs_new:Npn \__deriv_gcd_swap_helper:NNnn #1 #2 #3 #4 { @@ -1659,7 +1681,7 @@ \DeclareDocumentCommand{\slashfrac}{ o m m } { - \group_begin: +\group_begin: \tl_if_novalue:nTF {#1} { \__deriv_slashfrac_auto:nn {#2} {#3} } { @@ -1670,7 +1692,7 @@ } { \__deriv_slashfrac_scale:nnn {#1} {#2} {#3} } } - \group_end: +\group_end: } % numerator, denominator \cs_new_protected:Npn \__deriv_slashfrac_auto:nn #1 #2 @@ -1695,7 +1717,6 @@ %%%%% Generate variants %%%%% \prg_generate_conditional_variant:Nnn \__deriv_show_order:N { c } { T, TF } -\prg_generate_conditional_variant:Nnn \tl_if_head_eq_charcode:nN { V } { T, F, TF } \cs_generate_variant:Nn \__deriv_set_rubber_length:Nn { c } \cs_generate_variant:Nn \deriv_dv_define:Nnn { NV } @@ -1726,9 +1747,6 @@ \cs_generate_variant:Nn \__deriv_update_seq:NNNNn { NNNNV } \cs_generate_variant:Nn \__deriv_addfrac:NNnnnnn { NNVVxx } -\cs_generate_variant:Nn \int_to_bin:n { V } -\cs_generate_variant:Nn \int_from_bin:n { V } - %%%%% Messages %%%%% \msg_new:nnnn { deriv } { command-already-defined } diff --git a/macros/latex/contrib/derivative/derivative.tex b/macros/latex/contrib/derivative/derivative.tex index 8e32837761..f9c693535e 100644 --- a/macros/latex/contrib/derivative/derivative.tex +++ b/macros/latex/contrib/derivative/derivative.tex @@ -1,5 +1,5 @@ % derivative.tex -% Copyright 2019-2023 Simon Jensen +% Copyright 2019-2024 Simon Jensen % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -42,23 +42,23 @@ group_skip "\n\n\\par\\bigskip\n" \RequirePackage[style=english,english=british]{csquotes} \RequirePackage[final,babel,auto]{microtype} \RequirePackage{xcolor} -% \definecolor{RoyalGray}{RGB}{127, 144, 158} -% \definecolor{RoyalDarkGray}{RGB}{78, 93, 104} -% \definecolor{RoyalLightGray}{RGB}{250, 250, 250} -% \definecolor{RoyalRed}{RGB}{157, 16, 45} -% \definecolor{RoyalBlue}{RGB}{0, 35, 102} -% \definecolor{RoyalGreen}{RGB}{32, 77, 2} - - \definecolor{RoyalGray}{RGB}{75, 75, 75} - \definecolor{RoyalDarkGray}{RGB}{225, 225, 225} - \definecolor{RoyalLightGray}{RGB}{30, 30, 30} - \definecolor{RoyalRed}{RGB}{255, 177, 151} % 207, 102, 121 - \definecolor{RoyalBlue}{RGB}{187, 134, 252} % 55, 185, 255 - \definecolor{RoyalGreen}{RGB}{3, 218, 198} % 52, 177, 20 - \definecolor{RoyalPageCoulor}{RGB}{18, 18, 18} % 30, 30, 30 - \definecolor{RoyalTextCoulor}{RGB}{225, 225, 225} - \pagecolor{RoyalPageCoulor} - \color{RoyalTextCoulor} + \definecolor{RoyalGray}{RGB}{127, 144, 158} + \definecolor{RoyalDarkGray}{RGB}{78, 93, 104} + \definecolor{RoyalLightGray}{RGB}{250, 250, 250} + \definecolor{RoyalRed}{RGB}{157, 16, 45} + \definecolor{RoyalBlue}{RGB}{0, 35, 102} + \definecolor{RoyalGreen}{RGB}{32, 77, 2} + +% \definecolor{RoyalGray}{RGB}{75, 75, 75} +% \definecolor{RoyalDarkGray}{RGB}{225, 225, 225} +% \definecolor{RoyalLightGray}{RGB}{30, 30, 30} +% \definecolor{RoyalRed}{RGB}{255, 177, 151} % 207, 102, 121 +% \definecolor{RoyalBlue}{RGB}{187, 134, 252} % 55, 185, 255 +% \definecolor{RoyalGreen}{RGB}{3, 218, 198} % 52, 177, 20 +% \definecolor{RoyalPageCoulor}{RGB}{18, 18, 18} % 30, 30, 30 +% \definecolor{RoyalTextCoulor}{RGB}{225, 225, 225} +% \pagecolor{RoyalPageCoulor} +% \color{RoyalTextCoulor} \RequirePackage{amsmath, amsthm} \allowdisplaybreaks @@ -1220,10 +1220,12 @@ group_skip "\n\n\\par\\bigskip\n" \mydoc_narg:n {#1} \group_end: } -\DeclareDocumentCommand{\oarg}{ m } +\DeclareDocumentCommand{\oarg}{ s m } { \group_begin: - \mydoc_oarg:n {#1} + \bool_if:nTF {#1} + { \mydoc_oarg_star:n {#2} } + { \mydoc_oarg:n {#2} } \group_end: } \DeclareDocumentCommand{\earg}{ m } @@ -1282,6 +1284,14 @@ group_skip "\n\n\\par\\bigskip\n" \mydoc_arg_delim_format:n { ] } } +\cs_new:Npn \mydoc_oarg_star:n #1 +{ + \__mydoc_oarg_font: + \mydoc_arg_delim_format:n { [ } + #1 + \mydoc_arg_delim_format:n { ] } +} + \cs_new:Npn \mydoc_earg:n #1 { \seq_set_from_clist:Nn \l__deriv_earg_seq {#1} @@ -1369,8 +1379,8 @@ group_skip "\n\n\\par\\bigskip\n" \Titel{The \pakkenavn{} package} \Forfatter{Simon Jensen} \Email{sjelatex@gmail.com} -\Dato{2023/11/04} -\Version{1.31} +\Dato{2024/02/08} +\Version{1.4} \RequirePackage{derivative}[\dato] @@ -1445,14 +1455,18 @@ Regarding terminology, I use the abbreviation \texttt{inf} to represent the oper The behavior of the star can be reversed by setting \keyval{switch-*}{true}. In other words, the equations in the previous example will be interchanged. \end{argument} - \begin{argument}{2}[updated = v1.0] + \begin{argument}{2}[updated = v1.4] The second argument of \macro{1}, enclosed in square brackets, is optional and used to specify options for the derivative using a \keyval[index=false]{key}{value} syntax. For instance, the order of differentiation can be set using the \key[cat=misc]{order} option. Here is an example: \begin{example} \pdv[order={2,3}]{f}{x,y,z} \\ \pdv[order={\beta,a,n+2a}]{f}{x,y,z} \\ - \pdv[order={2,n^2,n^2-1}]{f}{x,y,z} \\ + \pdv[sep-var-inf=0]{f}{x,y,z} \\ \pdv[order={3/2-n/3,n/2,1/3}]{f}{x,y,z} \end{example} + To ease the cumbersome order key, implicit orders can now be given: + \begin{example} + \pdv[n+2, \alpha]{f}{x,y,z} + \end{example} For a comprehensive list of available options that can be applied to derivatives, please refer to \cref{ssec:options_dv}. %The order may be a number, a symbol and a combination hereof. Note that the total order of differentiation (i.e $\odif[order=n+2]{}$) is automatically calculated and sorted. This is particularly useful when dealing with mixed partial derivatives which is further described in \cref{ssec:DV_pdv,ssec:overall_order} \end{argument} @@ -1632,14 +1646,18 @@ If you require more information on the usage and customization of these derivati The behavior of the star can be reversed by setting \keyval{switch-*}{true}. In other words, the equations in the previous example will be interchanged. \end{argument} - \begin{argument}{2} + \begin{argument}{2}[updated = v1.4] The second argument, enclosed in square brackets, is optional and is used to specify options for the differential using the \keyval[index=false]{key}{value} syntax. Here are some examples: \begin{example} \odif[order={n,3}]{x,y,z} \\ \odif[sep-var-inf=0]{x,y,z} \\ \odif*[sep-var-var=0]{x,y,z} \end{example} - The available options for the differential can be found in \cref{ssec:options_inf} + To ease the cumbersome order key, implicit orders can now be given: + \begin{example} + \odif[n+2, \alpha]{x,y,z} + \end{example} + For a comprehensive list of available options that can be applied to differentials, please refer to \cref{ssec:options_inf} \end{argument} \begin{argument}{3} @@ -3049,7 +3067,11 @@ Numbers in bold refer to the page where the entry is defined. \begin{change}[version=1.31, date=2023-11-04, beta=false] \item Fixed issue relating to the order when nesting derivatives (issues \#14). \end{change} + \bigskip + \begin{change}[version=1.4, date=2024-02-08, beta=false] + \item Introduced implicit order parameter to simplify specifying the order of differentiation, for example: \cs{pdv}\oarg*{n,2}\narg{f}\narg{x,y} (issues \#2 and \#10). + \end{change} \end{changelog} -\end{document} +\end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx index 944bc72ec4..fb12b1d6d1 100644 --- a/macros/latex/contrib/easybook/easybook.dtx +++ b/macros/latex/contrib/easybook/easybook.dtx @@ -15,7 +15,7 @@ %<*class> \NeedsTeXFormat{LaTeX2e}[2021/11/15] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2024/02/08}{2024x} +\ProvidesExplClass{easybook}{2024/02/08}{2024z} {Easily typesetting Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool @@ -297,7 +297,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e}[2021/11/15] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2024/02/08}{2024x} +\ProvidesExplPackage{easybase}{2024/02/08}{2024z} {Easily typesetting Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -848,10 +848,11 @@ { fnfirstindent .dim_set:N = \fnfirstindent, fnfirstindent .initial:n = 0.8em, - fnafterindent .tl_set:N = \fnafterindent, + fnafterindent .dim_set:N = \fnafterindent, fnafterindent .initial:n = 2em, fnparskip .skip_set:N = \fnparskip, fnparskip .initial:n = 0ex plus .1ex, + footnotesep .skip_set:N = \footnotesep, fnpara-format .tl_set:N = \l__eb_fnpara_format_tl, fntext-pos .tl_set:N = \l__eb_fntext_position_tl, fntext-pos .initial:n = super, @@ -889,11 +890,6 @@ \eb_at_end_preamble:n { - \group_begin: - \footnotesize - \setspread{\fp_use:N \l__eb_spread_footnote_fp} - \exp_args:NNNo \group_end: - \dim_set:Nn \footnotesep { \dim_use:N \box_ht:N \strutbox } \bool_if:NT \l__eb_chap_counter_withpart_bool { \counterwithin*{chapter}{part} } \str_case:VnT \l__eb_fnt_parent_counter_tl @@ -951,7 +947,7 @@ } \msg_new:nnn { easybase } { bottom-not-compatible } { - Not~compatible~with~the~'footmisc'~package, \\ + Not~compatible~with~the~'footmisc'~package. \\ Please~use~the~'bottom'~option~of~'footmisc'~package. } @@ -1061,13 +1057,21 @@ \@footnotemark \@footnotetext } +\cs_new_protected:Npn \eb_set_current_label:n #1 + { + \protected@edef\@currentlabel + { + \exp_args:Nnv + \use:c { p@#1 } { the#1 } + } + } \cs_set_protected:Npn \footnote { \peek_meaning:NTF [ { \@xfootnote } { \exp_args:NV \stepcounter \@mpfn - \eb_current_label:n { upfootnote } + \eb_set_current_label:n { upfootnote } \protected@xdef\@thefnmark{\thempfn} \protected@xdef\@the@up@fnmark{\theupfootnote} \@footnotemark @@ -1198,24 +1202,27 @@ \newcounter{bichapter} \newcounter{bisection}[bichapter] \newcounter{bisubsection}[bisection] -\cs_new_protected:Npn \eb_current_label:n #1 +\NewDocumentCommand{\counteruse}{sO{}D(){}mo} { - \tl_set:Nx \@currentlabel - { - \exp_args:Nnv - \use:c { p@#1 } { the#1 } - } + \use:c { the#4 } + \msg_warning:nnn { easybase } { counteruse } {#4} + } +\msg_new:nnn { easybase } { counteruse } + { + The~command~\string\counteruse{#1}\ is~deprecated. \\ + Please~use~the~\string\the#1\ command. } -\NewDocumentCommand{\counteruse}{sO{arabic}D(){.}mo} +\RenewDocumentCommand{\counterwithin}{sO{\arabic}mO{.}m} { - \IfBooleanF{#1}{\stepcounter{#4}} - \tl_set:cn { theeb-#4 } + \@ifbothcounters{#3}{#5} { - \IfValueT{#5}{\use:c { the#5 }#3} - \use:c {#2}{#4} + \@addtoreset{#3}{#5} + \IfBooleanF{#1} + { + \exp_args:Nc \cs_gset:Npn { the#3 } + { \use:c { the#5 }#4#2{#3} } + } } - \tl_use:c { theeb-#4 } - \eb_current_label:n { eb-#4 } } \cs_new:Npn \eb_section_counter_prefix:n #1 { @@ -1724,7 +1731,15 @@ table .initial:n = 1.354, math .fp_set:N = \l__eb_spread_math_fp, math .initial:n = 1.354, - footnote .fp_set:N = \l__eb_spread_footnote_fp, + footnote .code:n = + { + \fp_set:Nn \l__eb_spread_footnote_fp {#1} + \group_begin: + \footnotesize + \setspread{\fp_use:N \l__eb_spread_footnote_fp} + \exp_args:NNNo \group_end: + \dim_set:Nn \footnotesep { \dim_use:N \box_ht:N \strutbox } + }, footnote .initial:n = 1.2, caption-table .fp_set:N = \l__eb_spread_caption_table_fp, caption-figure .fp_set:N = \l__eb_spread_caption_figure_fp, @@ -2304,7 +2319,7 @@ } %</package> %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2024/02/08}{2024x} +\ProvidesExplFile{eb-tcolorbox.cfg}{2024/02/08}{2024z} {Customization of tcolorbox for easybook} \cs_set_protected:Npn \addtotcbstyle #1#2 diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf Binary files differindex ccc80a9691..09c0e1911b 100644 --- a/macros/latex/contrib/easybook/easybook.pdf +++ b/macros/latex/contrib/easybook/easybook.pdf diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex index feaac7dcc5..f22b361a7d 100644 --- a/macros/latex/contrib/easybook/easybook.tex +++ b/macros/latex/contrib/easybook/easybook.tex @@ -23,7 +23,7 @@ name = easybook, color-scheme = blue, title = EASYBOOK使用手册, - version = v2024x, + version = v2024z, date = 2024/02/08, authors = 瞿毅, info = 简便地排版中文学位论文或书籍, @@ -371,9 +371,9 @@ \keyval{multoc}{整数}\Default{2} 设置目录的排版栏数,与\ref{subsec:directory command} 中目录命令的同名选项有相同效果。 \keychoice{withpart}{true,\fbox{false}} - 使章标题跟随部分计数器编号,当开启新的一部分时章编号从1开始。 + 使章标题跟随部分计数器编号,仅在导言区有效。当开启新的部分标题时章编号从1开始。 \keychoice{fntnumwith}{part,\fbox{chapter},page} - 使脚注跟随编号的计数器名。默认跟随章计数器,即开启新的一章时脚注编号从1开始。 + 设置脚注跟随编号的计数器,仅在导言区有效。默认跟随章计数器,即开启新的章标题时脚注编号从1开始。 \keychoice{uppercase}{\fbox{all},first,none,none*} 使用 \cs{rightmark} 和 \cs{leftmark} 等标题标记命令获取标题内容用于页眉页脚时其中英文的大小写类型。\code{all} 为标题标记中的英文字母全部大写。\code{first} 为标记以英文起始时仅第一个字母大写。\code{none} 不改变标记中英文字母的大小写形式,变体 \code{none*} 则强制标记的字母均为小写形式。 \kvsplit{brackets}{左括号,右括号}\Default{\Marg{(,)}} @@ -706,7 +706,9 @@ \keyval{fnafterindent}{刚性长度}\Default{2em} 每个脚注第二段及之后段落的首行缩进,等于长度 \cs{fnafterindent} 的值。 \keyval{fnparskip}{弹性长度}\Default{0ex plus .1ex} - 不同脚注的段落间距,等于长度 \cs{fnparskip} 的值。 + 不同脚注自身的段落间距,脚注内容文本分段时生效,等于长度 \cs{fnparskip} 的值。 + \keyval{footnotesep}{弹性长度}\newtag% + 不同脚注之间的距离,默认情况下它自适应 \module*{spread} 模块脚注行距选项 \option{footnote} 的值。 \keychoice{fntext-pos}{normal,\fbox{super}} 设置脚注内容标记的位置,正常文本或是上标形式。 \keychoice{fnmark-num}{\fbox{plain},pifont,pifont*,pisans,pisans*,\textcolor{SlateGray}{short num}} @@ -783,9 +785,9 @@ \end{ctexexam} \end{commands} \keychoice{fnboth-format}{\textcolor{SlateGray}{format code},match} - 同时设定默认脚注标记 \option{fnmarktext-format} 和自定义脚注标记 \option{fncustom-format} 的格式。两种脚注标记匹配上标格式 \option{spcmd} 的值是独立的,使用 \code{match} 则可以同时匹配。标记格式选项含有字体命令会覆盖 \option{footnote} 的设置,最后一个格式命令可以带有一个参数接受脚注标记。 + 同时设定默认脚注标记 \option{fnmarktext-format} 和自定义脚注标记 \option{fncustom-format} 的格式。两种脚注标记匹配上标格式 \option{spcmd} 的值是独立的,使用 \code{match} 则可以同时匹配。会覆盖 \module*{subfont} 模块脚注字体选项 \option{footnote} 相同类型的命令,最后一个格式命令可以带有一个参数接受脚注标记。 \keyval{fnpara-format}{格式代码} - 脚注内容文本的格式。在此设置字体命令会覆盖 \option{footnote} 的设置,最后一个格式命令可以带有一个参数接受脚注内容文本。 + 脚注内容文本的格式。会覆盖 \module*{subfont} 模块脚注字体选项 \option{footnote} 相同类型的命令,最后一个格式命令可以带有一个参数接受脚注内容文本。 \kvsplit{fntext-code}{前代码,后代码} 可以用 \meta{前代码} 与 \meta{后代码} 额外增加脚注内容标记前后的代码。也可以只有前部分,\meta{前代码} 中最后一个格式命令可以带有一个参数接受脚注内容标记。由于脚注标记处于水平模式,可以配合盒子命令设置脚注内容标记的对齐方式,或在标记与脚注首行间插入一点距离。 \begin{ctexexam} @@ -1200,19 +1202,15 @@ \subsection{计数器} \begin{commands}\noitemsep \command{newcounter}[\marg{计数器}\oarg{父计数器}]\default{} - \command{counteruse}[\sarg\oarg{编号}\darg{分隔符}\marg{计数器}\oarg{父计数器}] - 命令 \cs{newcounter} 是 \LaTeX 自带的创建计数器命令。命令 \cs{counteruse} 可以在当前位置输出这种计数器的值,它仅具有\textbf{输出}功能,并不会改变计数器原有的绑定关系。默认每使用一次输出命令 \meta{计数器} 的值增加1,带有星号参数的命令使 \meta{计数器} 的值保持不变。计数器的 \meta{编号} 为 \code{arabic} 或 \code{alph} 等计数形式。在一定的场合下可能用到 \cs{counteruse} 命令,比如通过新建快捷命令在一些位置使用定理环境的计数器。使用 \cs{labelformat} 设置计数器的标签引用时需添加 \code{eb-} 前缀: - \begin{ctexexam} - \labelformat{eb-theorem}{定理#1} - \newcommand{\theoremhead}[1]{定理\counteruse{theorem}[chapter]\hspace{1em}#1} - \theoremhead{定理内容}\label{thm:theorem} - \end{ctexexam} - \command{counterwithin}[\sarg\oarg{格式}\marg{计数器}\marg{父计数器}] - 对计数器进行绑定的命令。将 \meta{计数器} 绑定于 \meta{父计数器},即 \meta{父计数器} 的值递增时 \meta{计数器} 的值会归零,输出格式 \cs*{the}\meta{计数器} 被改为 \cs*{the}\meta{父计数器}\code{.}\meta{格式}\marg{计数器}。\meta{格式} 应当为接受计数器值并改变编号形式的命令,默认为 \cs*{arabic}。带有星号参数的命令仅进行绑定不更改输出格式。 + \command{setcounter}[\marg{计数器}\marg{整数}]\default{} + \command{stepcounter}[\marg{计数器}] + 常用的计数器设置命令。命令 \cs{newcounter} 创建一个初始值为0的新计数器。命令 \cs{setcounter} 将计数器的值设定为指定值。命令 \cs{stepcounter} 使计数器的值递增1。 + \command{counterwithin}[\sarg\oarg{格式}\marg{计数器}\oarg{连字符}\marg{父计数器}]\newtag[Chg]% + 对计数器进行绑定的命令。将 \meta{计数器} 绑定于 \meta{父计数器},即 \meta{父计数器} 的值递增时 \meta{计数器} 的值会归零。输出格式 \cs*{the}\meta{计数器} 被定义为 \cs*{the}\meta{父计数器}\meta{连字符}\meta{格式}\marg{计数器}。\meta{格式} 一般为更改计数器编号形式的命令,默认为 \cs*{arabic}。带有星号参数的命令仅进行绑定不更改输出格式。 \command{counterwithout}[\sarg\oarg{格式}\marg{计数器}\marg{父计数器}] 对计数器关系进行解绑的命令。将 \meta{计数器} 解绑于 \meta{父计数器},同时输出格式被改为 \meta{格式}\marg{计数器}。带有星号参数的命令仅进行解绑不更改输出格式。 \begin{ctexexam} - \counterwithin[\Roman]{child}{parent} + \counterwithin[\Roman]{child}[-]{parent} \counterwithout*{child}{parent} \end{ctexexam} \end{commands} @@ -1354,12 +1352,12 @@ \shortversion{v = 1.638,date = 2022/03/04,changes = 增加目录条目样式选项注册命令 \cs{RegisterTocName}。} \shortversion{v = 1.644,date = 2022/03/10,changes = 增加浮动环境目录声明命令 \cs{DeclareFloatList} 配合 \pkg*{caption} 宏包。} \shortversion{v = 1.682,date = 2022/05/01,changes = 将迷你页判断命令 \cs{notminipage} 改为被保护命令兼容 \pkg*{circledtext} 宏包。} - \begin{version}[v = 2024x,date = 2024/02/08,simple] + \begin{version}[v = 2024z,date = 2024/02/08,simple] \item 核对依赖宏包的更新改动,优化使用手册的内容细节。 \item 修复图表等浮动环境题注目录中条目标签编号的计数器值显示错误问题。 \item 修复附录命令 \cs{appendix} 的可选参数设置英文目录中条目名字和编号失效的问题。 \item 新增目录风格定义命令 \cs{SetTocStyle} 和使用命令 \cs{UseTocStyle}。 - \item 新增脚注段落文本格式定义命令 \cs{deffntpara}。 + \item 新增脚注段落文本格式定义命令 \cs{deffntpara} 和脚注间距离选项 \option{footnotesep}。 \end{version} \end{changelog} \nocite{*} diff --git a/macros/latex/contrib/l3build/CHANGELOG.md b/macros/latex/contrib/l3build/CHANGELOG.md index 2f5f843086..ea466dfccc 100644 --- a/macros/latex/contrib/l3build/CHANGELOG.md +++ b/macros/latex/contrib/l3build/CHANGELOG.md @@ -7,6 +7,13 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2024-02-08] + +### Changed +- Extend normalization of line numbers to include those wrapped by LaTeX in + text `on line ...` +- Suppress `l3msg` message wrapping + ## [2024-01-18] ### Added @@ -769,7 +776,8 @@ this project uses date-based 'snapshot' version identifiers. - Rationalise short option names: removed `-d`, `-E`, `-r` - Target `cmdcheck`: specific to LaTeX kernel work -[Unreleased]: https://github.com/latex3/l3build/compare/2024-01-18...HEAD +[Unreleased]: https://github.com/latex3/l3build/compare/2024-02-08...HEAD +[2024-02-08]: https://github.com/latex3/l3build/compare/2024-01-18...2024-02-08 [2024-01-18]: https://github.com/latex3/l3build/compare/2024-01-09...2024-01-18 [2024-01-09]: https://github.com/latex3/l3build/compare/2024-01-04...2024-01-09 [2024-01-04]: https://github.com/latex3/l3build/compare/2023-12-15...2024-01-04 diff --git a/macros/latex/contrib/l3build/README.md b/macros/latex/contrib/l3build/README.md index 1dfdc42d52..b5172bbf21 100644 --- a/macros/latex/contrib/l3build/README.md +++ b/macros/latex/contrib/l3build/README.md @@ -1,7 +1,7 @@ l3build: a testing and building system for LaTeX ================================================= -Release 2024-01-18 +Release 2024-02-08 Overview -------- diff --git a/macros/latex/contrib/l3build/l3build-arguments.lua b/macros/latex/contrib/l3build/l3build-arguments.lua index ec3b5335d3..b7687a71a9 100644 --- a/macros/latex/contrib/l3build/l3build-arguments.lua +++ b/macros/latex/contrib/l3build/l3build-arguments.lua @@ -146,7 +146,7 @@ option_list = }, stdengine = { - desc = "Run tests only with the standard engine (which may vary between configs)", + desc = "Run tests with the std engine (config dependent)", short = "s", type = "boolean" }, diff --git a/macros/latex/contrib/l3build/l3build-check.lua b/macros/latex/contrib/l3build/l3build-check.lua index 9bfb09971a..812187123a 100644 --- a/macros/latex/contrib/l3build/l3build-check.lua +++ b/macros/latex/contrib/l3build/l3build-check.lua @@ -200,6 +200,10 @@ local function normalize_log(content,engine,errlevels) -- Two similar cases, Lua patterns mean we need to do them separately line = gsub(line, "on line %d*", "on line ...") line = gsub(line, "on input line %d*", "on input line ...") + -- And the case where LaTeX has wrapped + if match(line,"^%(%w+%)%s+%d+%.$") then + line = gsub(line,"%((%w+)%)(%s+)%d+%.", "(%1)%2....") + end -- Tidy up to ^^ notation for i = 0, 31 do line = gsub(line, char(i), "^^" .. char(64 + i)) diff --git a/macros/latex/contrib/l3build/l3build-manifest.lua b/macros/latex/contrib/l3build/l3build-manifest.lua index 99a82464b2..aa5a061bd3 100644 --- a/macros/latex/contrib/l3build/l3build-manifest.lua +++ b/macros/latex/contrib/l3build/l3build-manifest.lua @@ -136,7 +136,7 @@ manifest_build_init = function(entry) -- can't use "entry[kk] = entry[kk] or ll" because false/nil are indistinguishable! end - -- initialisation for internal data + -- initialization for internal data for kk,ll in pairs(manifest_group_init) do entry[kk] = ll end diff --git a/macros/latex/contrib/l3build/l3build.1 b/macros/latex/contrib/l3build/l3build.1 index c558ee000e..b983494b73 100644 --- a/macros/latex/contrib/l3build/l3build.1 +++ b/macros/latex/contrib/l3build/l3build.1 @@ -1,4 +1,4 @@ -.TH l3build 1 "2024-01-18" +.TH l3build 1 "2024-02-08" .SH NAME l3build \- Checking and building packages .SH SYNOPSIS @@ -76,7 +76,7 @@ Shows the invocation to update failing .tlg files .IP --shuffle Shuffles order of tests .IP --stdengine|-s -Run tests only with the standard engine (which may vary between configs) +Run tests with the std engine (config dependent) .IP --texmfhome Location of user texmf tree .IP --version diff --git a/macros/latex/contrib/l3build/l3build.dtx b/macros/latex/contrib/l3build/l3build.dtx index 28b06030c9..96c1f0ead8 100644 --- a/macros/latex/contrib/l3build/l3build.dtx +++ b/macros/latex/contrib/l3build/l3build.dtx @@ -251,7 +251,7 @@ % }^^A % } % -% \date{Released 2024-01-18} +% \date{Released 2024-02-08} % % \maketitle % \tableofcontents @@ -559,7 +559,7 @@ % This file is then used in all subsequent checks against the \texttt{\meta{name}.lvt} test. % % If the |--engine| (or |-e|) is specified (one of |pdftex|, |xetex|, or |luatex|), the saved output is stored in \texttt{\meta{name}.\meta{engine}.tlg}. This is necessary if running the test through a different engine produces a different output. -% A normalisation process is performed when checking to avoid common differences such as register allocation; full details are listed in Section~\vref{sec:norm}. +% A normalization process is performed when checking to avoid common differences such as register allocation; full details are listed in Section~\vref{sec:norm}. % % If the \var{recordstatus} variable is set \var{true}, additional information % will be added to the \texttt{.tlg} to record the \enquote{exit status} of the @@ -671,7 +671,7 @@ % % \subsection{Variables} % -% This section lists all variables defined in the |l3build.lua| script that are available for customisation. +% This section lists all variables defined in the |l3build.lua| script that are available for customization. % % \luavartypeset % @@ -839,13 +839,13 @@ % the |tokens| entry: this might for example be used to select a graphics driver % with a DVI-based route. % -% \subsection{Output normalisation} +% \subsection{Output normalization} % \label{sec:norm} % % To allow test files to be used between different systems (\emph{e.g.}~when % multiple developers are involved in a project), the log files are normalised % before comparison during checking. This removes some system-dependent -% data but also some variations due to different engines. This normalisation +% data but also some variations due to different engines. This normalization % consists of two parts: removing (\enquote{ignoring}) some lines and modifying % others to give consistent test. Currently, the following types of line are % ignored: @@ -861,11 +861,11 @@ % \begin{itemize} % \item Removal spaces at the start of lines. % \item Removal of |./| at start of file names. -% \item Standardisation of the list of units known to \TeX{} (\pdfTeX{} +% \item Standardization of the list of units known to \TeX{} (\pdfTeX{} % and \LuaTeX{} add a small number of additional units which are not % known to \TeX90 or \XeTeX{}, (u)p\TeX{} adds some additional non-standard % ones) -% \item Standardisation of \verb*|\csname\endcsname | to |\csname\endcsname| +% \item Standardization of \verb*|\csname\endcsname | to |\csname\endcsname| % (the former is formally correct, but the latter was produced for many % years due to a \TeX{} bug). % \item Conversion of \texttt{on line \meta{number}} to \texttt{on line ...} @@ -890,11 +890,11 @@ % these may not be desirable in all cases, they are handled separately. % When creating \LuaTeX{}-specific test files (either with \LuaTeX{} as % the standard engine or saving a \LuaTeX{}-specific |.tlg| file) no further -% normalisation is undertaken. On the other hand, for cross-engine comparison -% the following normalisation is applied: +% normalization is undertaken. On the other hand, for cross-engine comparison +% the following normalization is applied: % \begin{itemize} % \item Removal of additional (unused) |\discretionary| points. -% \item Normalisation of some |\discretionary| data to a \TeX{}90 form. +% \item normalization of some |\discretionary| data to a \TeX{}90 form. % \item Removal of |U+...| notation for missing characters. % \item Removal of |display| for display math boxes % (included by \TeX90/\pdfTeX{}/\XeTeX). @@ -912,7 +912,7 @@ % dependent on the active code page). This may be controlled using the % |asciiengines| option. Any engines named here will use a |.tcx| file to % produce only ASCII chars in the log output, whilst for other engines -% normalisation is carried out from UTF-8 to ASCII. If the option is set to +% normalization is carried out from UTF-8 to ASCII. If the option is set to % an empty table the latter process is skipped: suitable for cases where only % Unicode engines are in use. % @@ -920,16 +920,21 @@ % % Very occasionally, it is necessary to make changes to \pkg{l3build} that % change the \texttt{.tlg} file results. This is typically when additional -% normalisation is required. When this is the case, you should first verify +% normalization is required. When this is the case, you should first verify % that \texttt{.tlg} files pass with the older \pkg{l3build}, then update only % \pkg{l3build}, re-check the files and save the results. Where possible, % we provide a mechanism to run with older setting to allow this process to % take place smoothly. % +% \subsubsection{Release 2024-02-08} +% +% Wrapping of messages by \pkg{l3msg} is now suppressed, aligning with the +% approach to \var{maxprintline}. +% % \subsubsection{Release 2023-03-22} % % This release changes the standard value of \var{maxprintline} from $79$ to -% $9999$, to suppress line wrapping in the log. This makes normalisation of +% $9999$, to suppress line wrapping in the log. This makes normalization of % for example file paths more reliable. To check that \texttt{.tlg} files % are correct, you can set \var{maxprintline} in your \texttt{build.lua} file % explicitly to the old default, check that tests pass, then remove this @@ -939,7 +944,7 @@ % \label{sec:writing-tests} % % Test files are written in a \TeX{} dialect using the support file |regression-test.tex|, which should be |\input| at the very beginning of each test. -% Additional customisations to this driver can be included in a local |regression-test.cfg| file, which will be loaded automatically if found. +% Additional customizations to this driver can be included in a local |regression-test.cfg| file, which will be loaded automatically if found. % % The macros loaded by |regression-test.tex| set up the test system and provide a number of commands to aid the production of a structured test suite. % The basis of the test suite is to output material into the |.log| file, from which a normalised test output (|.tlg|) file is produced by the build command |save|. @@ -1432,7 +1437,7 @@ % % For package authors who have more complex requirements than those covered % by the standard set up, the Lua script offers the possibility for -% customisation. The Lua function \texttt{typeset} may be defined before +% customization. The Lua function \texttt{typeset} may be defined before % reading \texttt{l3build.lua} and should take one argument, the name of % the file to be typeset. Within this function, the auxiliary Lua % functions \texttt{biber}, \texttt{bibtex}, \texttt{makeindex} and @@ -1995,7 +2000,7 @@ % the inclusion of one-line descriptions for each file (Section~\vref{sec:manifest-desc}), % and the details of the formatting of each entry (Section~\vref{sec:manifest-formatting}). % -% To perform such customisations, either include the re-definitions directly within your +% To perform such customizations, either include the re-definitions directly within your % package's |build.lua| file, or make a copy of |l3build-manifest-setup.lua|, rename it, % and load it within your |build.lua| using |dofile()|. % @@ -2588,6 +2593,12 @@ \fi % \end{macrocode} % +% \begin{macrocode} +\ifcsname\detokenize{l_iow_line_count_int}\endcsname + \csname \detokenize{l_iow_line_count_int}\endcsname=9999 % +\fi +% \end{macrocode} +% % Finish up. % \begin{macrocode} \reset@catcodes diff --git a/macros/latex/contrib/l3build/l3build.lua b/macros/latex/contrib/l3build/l3build.lua index 5575dc9b90..5b40bc5111 100755 --- a/macros/latex/contrib/l3build/l3build.lua +++ b/macros/latex/contrib/l3build/l3build.lua @@ -25,7 +25,7 @@ for those people who are interested. --]] -- Version information -release_date = "2024-01-18" +release_date = "2024-02-08" -- File operations are aided by the LuaFileSystem module local lfs = require("lfs") diff --git a/macros/latex/contrib/l3build/l3build.pdf b/macros/latex/contrib/l3build/l3build.pdf Binary files differindex 54b3c2c198..af2c8688f0 100644 --- a/macros/latex/contrib/l3build/l3build.pdf +++ b/macros/latex/contrib/l3build/l3build.pdf diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf Binary files differindex 9d43499449..be43e21c1c 100644 --- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf +++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex index fcc8a0b680..52f82ea024 100644 --- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex +++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex @@ -5,8 +5,8 @@ % arara: lualatex: {shell: yes, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)') \documentclass[a4paper,french,11pt]{article} -\def\PLversion{3.01g} -\def\PLdate{27 janvier 2024} +\def\PLversion{3.02a} +\def\PLdate{7 février 2024} \usepackage{amsfonts} \usepackage{ProfLycee} \useproflyclib{piton,minted,pythontex,ecritures} diff --git a/macros/latex/contrib/proflycee/tex/ProfLycee.sty b/macros/latex/contrib/proflycee/tex/ProfLycee.sty index f7b6a4477b..fecfe1ead6 100644 --- a/macros/latex/contrib/proflycee/tex/ProfLycee.sty +++ b/macros/latex/contrib/proflycee/tex/ProfLycee.sty @@ -3,7 +3,8 @@ % or later, see http://www.latex-project.org/lppl.txtf \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ProfLycee}[2024/01/27 3.01g Aide pour l'utilisation de LaTeX en lycee] +\ProvidesPackage{ProfLycee}[2024/02/07 3.02a Aide pour l'utilisation de LaTeX en lycee] +% 3.02a Ajout des [ecritures] proba conditionnelle, norme, valeur absolue et IF/IC % 3.01g Ajout de commandes internes, en phase de test (et non documentées à 100%...) % 3.01f PseudoCode avec piton (avec langage=minimal de FP ^^) + Suppression Terminal (doublon avec sim-os-menus) % 3.01e Mise ne conformité avec pyluatex/piton diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-ecritures.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-ecritures.tex index ec26d66da2..f178c5b909 100644 --- a/macros/latex/contrib/proflycee/tex/proflycee-tools-ecritures.tex +++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-ecritures.tex @@ -7,6 +7,7 @@ \RequirePackage{esvect} \RequirePackage{ifthen} \RequirePackage{xspace} +\RequirePackage{mleftright} %pour une meilleure gestion des espacements avec \left \right :-) %\RequirePackage{mathrsfs}%pour \mathscr (à voir...) %===ENSEMBLES CLASSIQUES @@ -137,6 +138,28 @@ {\newcommand\Integrale{\displaystyle\int}}% {\renewcommand\Integrale{\displaystyle\int}}% +\ifthenelse{\isundefined{\Limite}}% + {% + \NewDocumentCommand\Limite{ s m m o }{% + \IfBooleanTF{#1}{\ensuremath{\lim_{\IfNoValueTF{#4}{#3}{\substack{#3 \\ #4}}} #2}}{\ensuremath{\lim\limits_{\IfNoValueTF{#4}{#3}{\substack{#3 \\ #4}}} #2}}}\xspace% + }% + {% + \RenewDocumentCommand\Limite{ s m m o }{% + \IfBooleanTF{#1}{\ensuremath{\lim_{\IfNoValueTF{#4}{#3}{\substack{#3 \\ #4}}} #2}}{\ensuremath{\lim\limits_{\IfNoValueTF{#4}{#3}{\substack{#3 \\ #4}}} #2}}}\xspace% + }% + +%====VALEUR ABSOLUE, NORME +\DeclarePairedDelimiter\ValAbs{\lvert}{\rvert}% +\DeclarePairedDelimiter\ModuleCplx{\lvert}{\rvert}% +\DeclarePairedDelimiter\Norme{\lVert}{\rVert}% +\makeatletter +\let\TmpValAbs\ValAbs +\let\TmpModule\ModuleCplx +\let\TmpNorme\Norme +\def\ValAbs{\@ifstar{\TmpValAbs}{\TmpValAbs*}} +\def\ModuleCplx{\@ifstar{\TmpModule}{\TmpModule*}} +\def\Norme{\@ifstar{\TmpNorme}{\TmpNorme*}} +\makeatother %====PROBAS \NewDocumentCommand\LoiNormale{ s m m }{% @@ -254,5 +277,186 @@ }% } +%====PROBAS +\setKVdefault[probascondit]{% + min=false,% + Maj=false,% + BB=false,% + Formule=false +} + +\newcommand\notationproba{P}% + +\NewDocumentCommand\ProbaCondit{ O{} m m }{% + \useKVdefault[probascondit]% + \setKV[probascondit]{#1}% + %gestion des booléens + \ifboolKV[probascondit]{Maj}{\def\notationproba{P}}{}% + \ifboolKV[probascondit]{min}{\def\notationproba{p}}{}% + \ifboolKV[probascondit]{BB}{\def\notationproba{\mathbb{P}}}{}% + \notationproba_{#3}{\left(#2\right)} \ifboolKV[probascondit]{Formule}{= \dfrac{\notationproba{\left(#2 \cap #3\right)}}{\notationproba{\left(#3\right)}}}{}% +} + +%====IF, IC +\defKV[IntFluc]{% + Seuil=\def\intflucconfProba{#1},% + Classe=\def\intflucconfNiv{#1},% + p=\def\intflucconfP{#1},% + n=\def\intflucconfN{#1},% + Arrondi=\def\intflucconfPrec{#1} +} +\setKVdefault[IntFluc]{% + Seuil=95,% + Classe=Term,% + Arrondi=2,% + Calcul=false,% + Details=false,% + Formule=true,% + p={},% + n={},% + Symbole=\approx +} + +\NewDocumentCommand\IntFluctu{ O{} }{% + \useKVdefault[IntFluc]% + \setKV[IntFluc]{#1}% + \IfStrEqCase{\intflucconfProba}{% + {90}{\def\ualpha{1.64}}% + {95}{\def\ualpha{1.96}}% + {99}{\def\ualpha{2.58}}% + %{99.9}{\def\ualpha{3.29}}% + }% + \ifboolKV[IntFluc]{Formule}% + {% + \IfStrEqCase{\intflucconfNiv}{% + {2de}{\IntervalleFF{ p - \dfrac{1}{\sqrt{n}} }{ p + \dfrac{1}{\sqrt{n}}}}% + {Term}{\IntervalleFF{ p-\num{\ualpha}\dfrac{\sqrt{p(1-p)}}{\sqrt{n}} }{ p+\num{\ualpha}\dfrac{\sqrt{p(1-p)}}{\sqrt{n}} }}% + }% + }% + {}% + \ifboolKV[IntFluc]{Details}% + {% + \IfSubStr{\intflucconfP}{/}% + {% + \def\ValIFp{\ConversionFraction[t]{\intflucconfP}}\def\ValIFpD{\ConversionFraction[d]{\intflucconfP}}% + }% + {% + \def\ValIFp{\num{\intflucconfP}}\def\ValIFpD{\num{\intflucconfP}}% + }% + = + \IfStrEqCase{\intflucconfNiv}{% + {2de}{\IntervalleFF{ \ValIFpD - \dfrac{1}{\sqrt{\intflucconfN}} }{ \ValIFpD + \dfrac{1}{\sqrt{\intflucconfN}}}}% + {Term}{\IntervalleFF{ \ValIFpD-\num{\ualpha}\dfrac{\sqrt{\ValIFp\mleft(1-\ValIFp\mright)}}{\sqrt{\intflucconfN}} }{ \ValIFpD+\num{\ualpha}\dfrac{\sqrt{\ValIFp\mleft(1-\ValIFp\mright)}}{\sqrt{\intflucconfN}} }}% + }% + }% + {}% + \ifboolKV[IntFluc]{Calcul}% + {% + \IfStrEqCase{\intflucconfNiv}{%calculs avec xfp ?? + {2de}% + {% + \def\calcborneinfIF{ \fpeval{ max(floor(\intflucconfP - 1/sqrt(\intflucconfN),\intflucconfPrec),0) } }% + \def\calcbornesupIF{ \fpeval{ min(ceil(\intflucconfP + 1/sqrt(\intflucconfN),\intflucconfPrec),1) } }% + }% + {Term}% + {% + \def\calcborneinfIF{ \fpeval{ max(floor(\intflucconfP - \ualpha*sqrt(\intflucconfP*(1-\intflucconfP))/sqrt(\intflucconfN),\intflucconfPrec),0) } }% + \def\calcbornesupIF{ \fpeval{ min(ceil(\intflucconfP + \ualpha*sqrt(\intflucconfP*(1-\intflucconfP))/sqrt(\intflucconfN),\intflucconfPrec),1) } }% + }% + }% + \useKV[IntFluc]{Symbole} \IntervalleFF{ \num{\calcborneinfIF} }{ \num{\calcbornesupIF} }% + }% + {}% +} + +\NewDocumentCommand\RedactionIntFluct{ O{} m }{% + %\setKV[IntFluc]{#1}% + \begin{flalign*} + #2 &= \IntFluctu[Formule,Details=false,Calcul=false] && \\ + & \IntFluctu[Formule=false,Details=true,Calcul=false,#1] && \\ + & \IntFluctu[Formule=false,Details=false,Calcul=true,#1] && \\ + \end{flalign*}% +} + +\defKV[IntConf]{% + Seuil=\def\intflucconfProba{#1},% + Classe=\def\intflucconfNiv{#1},% + f=\def\intflucconfF{#1},% + n=\def\intflucconfN{#1},% + Arrondi=\def\intflucconfPrec{#1} +} +\setKVdefault[IntConf]{% + Seuil=95,% + Classe=Term,% + Arrondi=2,% + Calcul=false,% + Details=false,% + Formule=true,% + f={},% + n={},% + Symbole=\approx +} + +\NewDocumentCommand\IntConf{ O{} }{% + \useKVdefault[IntConf]% + \setKV[IntConf]{#1}% + \IfStrEqCase{\intflucconfProba}{% + {90}{\def\ualpha{1.64}}% + {95}{\def\ualpha{1.96}}% + {99}{\def\ualpha{2.58}}% + %{99.9}{\def\ualpha{3.29}}% + }% + \ifboolKV[IntConf]{Formule}% + {% + \IfStrEqCase{\intflucconfNiv}{% + {2de}{\IntervalleFF{ f - \dfrac{1}{\sqrt{n}} }{ f + \dfrac{1}{\sqrt{n}}}}% + {Term}{\IntervalleFF{ f-\num{\ualpha}\dfrac{\sqrt{f(1-f)}}{\sqrt{n}} }{ f+\num{\ualpha}\dfrac{\sqrt{f(1-f)}}{\sqrt{n}} }}% + }% + }% + {}% + \ifboolKV[IntConf]{Details}% + {% + \IfSubStr{\intflucconfF}{/}% + {% + \def\ValIFp{\ConversionFraction[t]{\intflucconfF}}\def\ValIFpD{\ConversionFraction[d]{\intflucconfF}}% + }% + {% + \def\ValIFp{\num{\intflucconfF}}\def\ValIFpD{\num{\intflucconfF}}% + }% + = + \IfStrEqCase{\intflucconfNiv}{% + {2de}{\IntervalleFF{ \ValIFpD - \dfrac{1}{\sqrt{\num{\intflucconfN}}} }{ \ValIFpD + \dfrac{1}{\sqrt{\num{\intflucconfN}}}}}% + {Term}{\IntervalleFF{ \ValIFpD-\num{\ualpha}\dfrac{\sqrt{\ValIFp\mleft(1-\ValIFp\mright)}}{\sqrt{\num{\intflucconfN}}} }{ \ValIFpD+\num{\ualpha}\dfrac{\sqrt{\ValIFp\mleft(1-\ValIFp\mright)}}{\sqrt{\num{\intflucconfN}}} }}% + }% + }% + {}% + \ifboolKV[IntConf]{Calcul}% + {% + \IfStrEqCase{\intflucconfNiv}{%calculs avec xfp ?? + {2de}% + {% + \def\calcborneinfIF{ \fpeval{ max(floor(\intflucconfF - 1/sqrt(\intflucconfN),\intflucconfPrec),0) } }% + \def\calcbornesupIF{ \fpeval{ min(ceil(\intflucconfF + 1/sqrt(\intflucconfN),\intflucconfPrec),1) } }% + }% + {Term}% + {% + \def\calcborneinfIF{ \fpeval{ max(floor(\intflucconfF - \ualpha*sqrt(\intflucconfF*(1-\intflucconfF))/sqrt(\intflucconfN),\intflucconfPrec),0) } }% + \def\calcbornesupIF{ \fpeval{ min(ceil(\intflucconfF + \ualpha*sqrt(\intflucconfF*(1-\intflucconfF))/sqrt(\intflucconfN),\intflucconfPrec),1) } }% + }% + }% + \useKV[IntConf]{Symbole} + \IntervalleFF{ \num{\calcborneinfIF} }{ \num{\calcbornesupIF} }% + }% + {}% +} + +\NewDocumentCommand\RedactionIntConf{ O{} m }{% + %\setKV[IntConf]{#1}% + \begin{flalign*} + #2 &= \IntConf[Formule,Details=false,Calcul=false] && \\ + & \IntConf[Formule=false,Details=true,Calcul=false,#1] && \\ + & \IntConf[Formule=false,Details=false,Calcul=true,#1] && \\ + \end{flalign*}% +} \endinput
\ No newline at end of file diff --git a/macros/latex/contrib/ucph-revy/README.md b/macros/latex/contrib/ucph-revy/README.md index 924322a797..3b0e47a0a4 100644 --- a/macros/latex/contrib/ucph-revy/README.md +++ b/macros/latex/contrib/ucph-revy/README.md @@ -1,6 +1,6 @@ Package ucph-revy ================= -v1.0.0 +v1.0.1 A class for typesetting scripts, containing both lyrics and prose, in the style used by the student revues (revy) at the Faculties of @@ -63,7 +63,7 @@ out of the main `.dtx` file: Contact the author ------------------ -As of 2023: +As of 2024: [Kristoffer Levin Hansen](mailto:kristoffer@levinhansen.dk) diff --git a/macros/latex/contrib/ucph-revy/ucph-revy-da-doc.pdf b/macros/latex/contrib/ucph-revy/ucph-revy-da-doc.pdf Binary files differindex d6304aedad..5b9426a4f3 100644 --- a/macros/latex/contrib/ucph-revy/ucph-revy-da-doc.pdf +++ b/macros/latex/contrib/ucph-revy/ucph-revy-da-doc.pdf diff --git a/macros/latex/contrib/ucph-revy/ucph-revy-da-man.pdf b/macros/latex/contrib/ucph-revy/ucph-revy-da-man.pdf Binary files differindex b6870962ad..8f252d20ff 100644 --- a/macros/latex/contrib/ucph-revy/ucph-revy-da-man.pdf +++ b/macros/latex/contrib/ucph-revy/ucph-revy-da-man.pdf diff --git a/macros/latex/contrib/ucph-revy/ucph-revy-en-doc.pdf b/macros/latex/contrib/ucph-revy/ucph-revy-en-doc.pdf Binary files differindex 8a79c71e8a..3d09e9a2be 100644 --- a/macros/latex/contrib/ucph-revy/ucph-revy-en-doc.pdf +++ b/macros/latex/contrib/ucph-revy/ucph-revy-en-doc.pdf diff --git a/macros/latex/contrib/ucph-revy/ucph-revy-en-man.pdf b/macros/latex/contrib/ucph-revy/ucph-revy-en-man.pdf Binary files differindex 02766561f2..68c51ca12d 100644 --- a/macros/latex/contrib/ucph-revy/ucph-revy-en-man.pdf +++ b/macros/latex/contrib/ucph-revy/ucph-revy-en-man.pdf diff --git a/macros/latex/contrib/ucph-revy/ucph-revy.dtx b/macros/latex/contrib/ucph-revy/ucph-revy.dtx index 56d3fb6c6d..79a9a1aa0b 100644 --- a/macros/latex/contrib/ucph-revy/ucph-revy.dtx +++ b/macros/latex/contrib/ucph-revy/ucph-revy.dtx @@ -2,7 +2,7 @@ % % Copyright (C) 1995 Arne John Glenstrup % 2000 Uffe Friis Lichtenberg -% 2023 Kristoffer Levin Hansen +% 2024 Kristoffer Levin Hansen % % This file may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either @@ -20,7 +20,7 @@ %<class>\NeedsTeXFormat{LaTeX2e}[2005/12/01] %<class>\ProvidesClass{ucph-revy} %<*class> - [2023/05/23 v1.0.0 Initial publish] + [2024/02/07 v1.0.1 Fix occational divide by 0] %</class> %<*driver> \documentclass[a4paper]{ltxdoc} @@ -96,6 +96,12 @@ } \newenvironment{showcommand}{\quote}{\endquote} \usepackage{hyperref} + +% Multicol ToC: +\usepackage{tocloft} +\renewcommand\cfttocprehook{\begin{multicols}{2}} +\renewcommand\cfttocposthook{\end{multicols}} + \urlstyle{sf} %</driver> %<*class> @@ -1010,9 +1016,11 @@ % \end{macro} % \begin{danish} % Find ud af hvor højt et enkelt mærke skal være. +% \changes{v1.0.1}{2024/02/07}{Den må ikke dividere med 0} % \end{danish} % \begin{english} % Find the height of a single tab. +% \changes{v1.0.1}{2024/02/07}{Don't let it divide by 0} % \end{english} % \begin{macrocode} \newdimen\tabheight @@ -1020,7 +1028,7 @@ \advance\tabheight by -1cm% \def\undertab##1\text##2\stop{ \ifx\done##2% - \divide\tabheight by ##1% + \divide\tabheight by \ifnum0=##1 1 \else ##1\fi% \fi } \def\overtab##1\text##2\stop{}% @@ -1030,14 +1038,16 @@ % \begin{danish}^^A % De her definitioner indeholder forskellen på at vende % registermærkningerne mod højre eller mod venstre. +% \changes{v1.0.1}{2024/02/07}{Juster mærkebredden} % \end{danish}^^A % \begin{english}^^A % These definitions contain the differences % between right and left facing thumb tabs. +% \changes{v1.0.1}{2024/02/07}{Adjust tab width} % \end{english} % \begin{macrocode} - \def\overtableft{-1cm} - \def\overtabright{1cm} + \def\overtableft{-.75cm} + \def\overtabright{.5cm} \def\undertabright{\overtabright} \def\undertableft{\overtableft - 1cm} \def\underangle{|-} @@ -1678,7 +1688,7 @@ % en makro, som tager 1 argument (et \meta{tal}), og sætter ordet % `side' i det rigtige tal efter det. Så \verb|\pagessum{0}| giver % "`0 sider"', mens \verb|\pagessum{1}| giver "`1 side"'. En ny -% makro, som hedder \verb|\pagessum|, men gør ngoet andet, kan +% makro, som hedder \verb|\pagessum|, men gør noget andet, kan % defineres med \verb|\renewcommand|. % \end{danish} % \begin{english} @@ -2115,43 +2125,51 @@ % list. % \end{english} % \end{environment} -% -% \begin{macro}{\revy@itemname} +% +% \begin{macro}{\revy@itemwithout,\revy@itemwith,\revy@itemname} % \begin{danish} % Fordi \texttt{revy@list} er afledt fra \texttt{list}--miljøet, % så forventer det, at punkter på listen bliver kaldt med % \verb|\item|. Vi, som brugere, forventer, at vi kan bruge vores % egne navne for punkter på de her lister, og at de bliver sat i -% deres egen stil. Den her makro laver de definitioner, som er -% nødvendige, for at bruge de kommandoer. +% deres egen stil. \verb|\revy@itenmane| laver de definitioner, +% som er nødvendige, for at bruge de kommandoer, mens +% \verb|\revy@itenwith| og \verb|\revy@itemwithout| holder +% oversættelsen til en \verb|\item|--kommando. +% \changes{v1.0.1}{2024/02/07}{Fjernede unødvendige omdefinitioner.} % \end{danish} % \begin{english} % As the \texttt{revy@list} environment is derived from the % \texttt{list} environment, it expects entries in its list to % ultimately be called with \verb|\item|. However, for the % environments presented to the end user, we like to provide item -% commands that more closely match the intended use. This macro -% bundles the process of creating those commands. +% commands that more closely match the intended +% use. \verb|\revy@itemname| bundles the process of creating those +% commands, while \verb|\revy@itemwith| and +% \verb|\revy@itemwithout| hold the translation to an \verb|\item| +% command. +% \changes{v1.0.1}{2024/02/07}{Eliminated spurious redefinitions.} % \end{english} % \begin{macrocode} +\def\revy@itemwithout#1{\item [{\bf #1} \hfill] } +\def\revy@itemwith#1[#2]{\item [{\bf #1} (#2) \hfill] } \def\revy@itemname#1{% - \def\@itemwithout##1{\item [{\bf ##1} \hfill] } - \def\@itemwith##1[##2]{\item [{\bf ##1} (##2) \hfill] } \expandafter\def\csname #1\endcsname##1{% - \@ifnextchar [{\@itemwith{##1}}{\@itemwithout{##1}}%] + \@ifnextchar [ %] + {\revy@itemwith{##1}}{\revy@itemwithout{##1}}% } } % \end{macrocode} % \begin{danish} % Argumentet er navnet på den kommando, som kommer til at sætte % punkter på listen. -% +% % Se nogle eksempler på, hvordan den bruges, lige under her. % \end{danish} % \begin{english} % The argument is the name of the macro that will be created for % setting items on our lists. -% +% % Some examples of how these are used will follow. % \end{english} % \end{macro} @@ -3335,5 +3353,5 @@ \endinput % Local Variables: % mode: doctex -% TeX-master: t +% TeX-master: "ucph-revy-da-doc.ins" % End: |