summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-19 03:00:38 +0000
committerNorbert Preining <norbert@preining.info>2019-09-19 03:00:38 +0000
commit344e74a832ad49360aa4e08c467ff783c1f02f66 (patch)
tree40f366f591a98147966bf890234761e337aaac61 /macros
parent841a985f019b145be416f24859bcd1e0833ddb76 (diff)
CTAN sync 201909190300
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/derivative/README.md14
-rw-r--r--macros/latex/contrib/derivative/derivative.pdfbin176237 -> 183369 bytes
-rw-r--r--macros/latex/contrib/derivative/derivative.sty458
-rw-r--r--macros/latex/contrib/derivative/derivative.tex2805
-rw-r--r--macros/latex/contrib/extract/README4
-rw-r--r--macros/latex/contrib/extract/extract.dtx91
-rw-r--r--macros/latex/contrib/extract/extract.pdfbin229260 -> 231413 bytes
-rw-r--r--macros/latex/contrib/extract/extract.sty545
-rw-r--r--macros/latex/contrib/iodhbwm/README.md31
-rw-r--r--macros/latex/contrib/iodhbwm/doc/examples/customizing/iodhbwm-print.pdfbin147016 -> 125376 bytes
-rw-r--r--macros/latex/contrib/iodhbwm/doc/examples/customizing/iodhbwm-print.tex4
-rw-r--r--macros/latex/contrib/iodhbwm/doc/examples/listings/iodhbwm-listings-color.pdfbin173543 -> 174188 bytes
-rw-r--r--macros/latex/contrib/iodhbwm/doc/examples/listings/iodhbwm-listings.pdfbin174059 -> 152752 bytes
-rw-r--r--macros/latex/contrib/iodhbwm/doc/examples/listings/iodhbwm-listings.tex4
-rw-r--r--macros/latex/contrib/iodhbwm/doc/iodhbwm.pdfbin634846 -> 633935 bytes
-rw-r--r--macros/latex/contrib/iodhbwm/doc/iodhbwm.tex22
-rw-r--r--macros/latex/contrib/iodhbwm/tex/iodhbwm-templates.sty6
-rw-r--r--macros/latex/contrib/iodhbwm/tex/iodhbwm.cls40
-rw-r--r--macros/latex/contrib/l3build/CHANGELOG.md9
-rw-r--r--macros/latex/contrib/l3build/README.md2
-rw-r--r--macros/latex/contrib/l3build/l3build-check.lua3
-rw-r--r--macros/latex/contrib/l3build/l3build.12
-rw-r--r--macros/latex/contrib/l3build/l3build.dtx10
-rw-r--r--macros/latex/contrib/l3build/l3build.lua2
-rw-r--r--macros/latex/contrib/l3build/l3build.pdfbin704553 -> 705121 bytes
-rw-r--r--macros/luatex/generic/luaotfload/NEWS5
-rw-r--r--macros/luatex/generic/luaotfload/README.md4
-rw-r--r--macros/luatex/generic/luaotfload/filegraph.pdfbin39715 -> 39711 bytes
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-auxiliary.lua6
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-colors.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-conf.pdfbin77672 -> 77515 bytes
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-configuration.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-database.lua90
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-diagnostics.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-embolden.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-features.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-filelist.lua5
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-glyphlist.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-init.lua18
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-latex.pdfbin347111 -> 353062 bytes
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-letterspace.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-loaders.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-log.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-main.lua5
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-main.tex30
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-multiscript.lua208
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-notdef.lua113
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-parsers.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-resolvers.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-status.lua49
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-tool.12
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-tool.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-tool.pdfbin76919 -> 76761 bytes
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-tool.rst4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-unicode.lua4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload.conf.52
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload.conf.rst4
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload.sty2
58 files changed, 3255 insertions, 1396 deletions
diff --git a/macros/latex/contrib/derivative/README.md b/macros/latex/contrib/derivative/README.md
index 4d444d4b58..0208052909 100644
--- a/macros/latex/contrib/derivative/README.md
+++ b/macros/latex/contrib/derivative/README.md
@@ -1,13 +1,13 @@
-## README for derivative package v0.9 dated 2019-07-21
+## README for derivative package v0.95 dated 2019-09-18
The package provides a set of commands `\NewOdvVariant`, `\NewPdvVariant` etc. that can be used to define a variant of a derivative. The package have already defined several derivatives:
- - \odv Ordinary derivative
- - \pdv Partial derivative
- - \fdv Functional derivtive
- - \mdv Material derivative
- - \adv Average rate of change
- - \jdv Jacobian
+ - `\odv` Ordinary derivative
+ - `\pdv` Partial derivative
+ - `\fdv` Functional derivtive
+ - `\mdv` Material derivative
+ - `\adv` Average rate of change
+ - `\jdv` Jacobian
### Copyright and license
diff --git a/macros/latex/contrib/derivative/derivative.pdf b/macros/latex/contrib/derivative/derivative.pdf
index a9eb554cb0..735d2fc7ca 100644
--- a/macros/latex/contrib/derivative/derivative.pdf
+++ b/macros/latex/contrib/derivative/derivative.pdf
Binary files differ
diff --git a/macros/latex/contrib/derivative/derivative.sty b/macros/latex/contrib/derivative/derivative.sty
index 0034114097..de10a6dd5f 100644
--- a/macros/latex/contrib/derivative/derivative.sty
+++ b/macros/latex/contrib/derivative/derivative.sty
@@ -16,11 +16,11 @@
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{xparse}[2018/05/09]
-\ProvidesExplPackage{derivative}{2019/07/21}{0.9}{Nice and easy derivatives}
+\ProvidesExplPackage{derivative}{2018/06/14}{1.0}{Nice and easy derivatives}
%%%%% Useful conditionals %%%%%
-\prg_new_conditional:Npnn \__if_novalue_blank:n #1 { T , F , TF }
+\prg_new_conditional:Npnn \__deriv_if_novalue:n #1 { T , F , TF }
{
\tl_if_novalue:nTF {#1}
{ \prg_return_true: }
@@ -31,18 +31,18 @@
}
}
-\prg_new_conditional:Npnn \__if_novalue_blank_or:nn #1 #2 { F, TF }
+\prg_new_conditional:Npnn \__deriv_if_novalue_and:nn #1 #2 { F, TF }
{
- \__if_novalue_blank:nTF {#1}
+ \__deriv_if_novalue:nTF {#1}
{
- \__if_novalue_blank:nTF {#2}
+ \__deriv_if_novalue:nTF {#2}
{ \prg_return_true: }
{ \prg_return_false: }
}
{ \prg_return_false: }
}
-\prg_new_conditional:Npnn \__show_order:N #1 { T, TF }
+\prg_new_conditional:Npnn \__deriv_show_order:N #1 { T, TF }
{
\quark_if_no_value:NTF #1
{ \prg_return_false: }
@@ -86,43 +86,6 @@
\cs_new:Npn \__deriv_case_end:nw #1#2#3 \q_mark #4#5 \q_stop
{ \exp_end: #1 #4 }
-%%%%% slash frac %%%%%
-
-\DeclareDocumentCommand{\slashfrac}{ o m m }
-{
- \tl_if_novalue:nTF {#1}
- { \__deriv_slashfrac_auto:nn {#2} {#3} }
- {
- \str_case:nnF {#1}
- {
- { auto } { \__deriv_slashfrac_auto:nn {#2} {#3} }
- { none } { \__deriv_slashfrac_none:nn {#2} {#3} }
- }
- { \__deriv_slashfrac_scale:nnn {#1} {#2} {#3} }
- }
-}
-% numerator , denominator
-\cs_new_protected:Npn \__deriv_slashfrac_auto:nn #1 #2
-{
- \__deriv_auto_left:n . \kern-\nulldelimiterspace
- {#1} \middle/ {#2}
- \__deriv_auto_right:n . \kern-\nulldelimiterspace
-}
-% numerator , denominator
-\cs_new_protected:Npn \__deriv_slashfrac_none:nn #1 #2
-{
- {#1} / {#2}
-}
-% scale , numerator , denominator
-\cs_new_protected:Npn \__deriv_slashfrac_scale:nnn #1 #2 #3
-{
- \cs:w #1 l \cs_end: .
- {#2}
- \cs:w #1 \cs_end: /
- {#3}
- \cs:w #1 r \cs_end: .
-}
-
%%%%% Variables for settings of odv, pdv and variants %%%%%
\cs_new_protected:Npn \__deriv_auto_left:n #1 { \left #1 }
@@ -201,7 +164,7 @@
%%%%% Key-val for odv and variants %%%%%
\cs_new:Npn \__deriv_d_define_keys:n #1
{
- \keys_define:nn { deriv-d-#1 }
+ \keys_define:nn { deriv/d/#1 }
{
style-inf .code:n = { \cs_set_eq:cN { __deriv_#1_style_inf:n } ##1 },
@@ -214,7 +177,6 @@
scale-eval .choices:nn =
{ auto, none, big, Big, bigg, Bigg }
{ \tl_set_eq:cN { l__deriv_#1_scale_eval_tl } \l_keys_choice_tl },
-
scale-eval .default:n = { auto },
scale-eval-/ .choices:nn =
@@ -285,20 +247,14 @@
misc-remove-delims .default:n = { fun, var, frac }
}
\bool_lazy_or:nnT { \sys_if_engine_luatex_p: } { \sys_if_engine_xetex_p: }
- {
- \keys_define:nn { deriv-d-#1 }
- { style-inf .default:n = { \symnormal } }
- }
+ { \keys_define:nn { deriv/d/#1 } { style-inf .default:n = { \symnormal } } }
\sys_if_engine_pdftex:T
- {
- \keys_define:nn { deriv-d-#1 }
- { style-inf .default:n = { \mathnormal } }
- }
+ { \keys_define:nn { deriv/d/#1 } { style-inf .default:n = { \mathnormal } } }
}
%%%%%% Key-val for pdv and variants %%%%%%
\cs_new:Npn \__deriv_p_define_keys:n #1
{
- \keys_define:nn { deriv-p-#1 }
+ \keys_define:nn { deriv/p/#1 }
{
style-inf .code:n = { \cs_set_eq:cN { __deriv_#1_style_inf:n } ##1 },
@@ -400,17 +356,13 @@
sort-abs-reverse .default:n = { false }
}
\bool_lazy_or:nnT { \sys_if_engine_luatex_p: } { \sys_if_engine_xetex_p: }
- {
- \keys_define:nn { deriv-p-#1 }
- { style-inf .default:n = { \symnormal } }
- }
+ { \keys_define:nn { deriv/p/#1 } { style-inf .default:n = { \symnormal } } }
\sys_if_engine_pdftex:T
- {
- \keys_define:nn { deriv-p-#1 }
- { style-inf .default:n = { \mathnormal } }
- }
+ { \keys_define:nn { deriv/p/#1 } { style-inf .default:n = { \mathnormal } } }
}
+%%%%% Setting keys %%%%%
+
\DeclareDocumentCommand{\derivset}{ m o }
{
\token_if_macro:NTF {#1}
@@ -443,7 +395,7 @@
{
\tl_if_novalue:nTF {#2}
{
- \keys_set:nn { deriv-d-#1 }
+ \keys_set:nn { deriv/d/#1 }
{
style-inf , style-frac , style-frac-/ ,
scale-eval , scale-eval-/ , scale-fun , scale-var , scale-frac , scale-frac-/ ,
@@ -453,14 +405,14 @@
misc-remove-delims
}
}
- { \keys_set:nn { deriv-d-#1 } {#2} }
+ { \keys_set:nn { deriv/d/#1 } {#2} }
}
% key=val clist
\cs_new_protected:Npn \__deriv_p_set_keys:nn #1 #2
{
\tl_if_novalue:nTF {#2}
{
- \keys_set:nn { deriv-p-#1 }
+ \keys_set:nn { deriv/p/#1 }
{
style-inf , style-frac , style-frac-/ ,
scale-eval , scale-eval-/ , scale-fun , scale-var , scale-frac , scale-frac-/ ,
@@ -471,7 +423,7 @@
misc-remove-delims
}
}
- { \keys_set:nn { deriv-p-#1 } {#2} }
+ { \keys_set:nn { deriv/p/#1 } {#2} }
}
% key=val clist
\cs_new_protected:Npn \__deriv_all_set_keys:n #1
@@ -483,49 +435,7 @@
%%%%% Declaring variants %%%%%
-\DeclareDocumentCommand{\NewOdvVariant}{ m m o }
-{
- \cs_if_exist:NTF #1
- {
- \msg_error:nnxx { deriv } { command-already-defined }
- { \token_to_str:N #1 }
- { \token_to_str:N \NewOdvVariant }
- }
- {
- \deriv_d_preamble:Nnn \l__deriv_dv_tmp_tl {#1} {#3}
- \deriv_d_define:Vnnn \l__deriv_dv_tmp_tl { New } {#1} {#2}
- }
-}
-
-\DeclareDocumentCommand{\RenewOdvVariant}{ m m o }
-{
- \cs_if_exist:NTF #1
- {
- \deriv_d_preamble:Nnn \l__deriv_dv_tmp_tl {#1} {#3}
- \deriv_d_define:Vnnn \l__deriv_dv_tmp_tl { Renew } {#1} {#2}
- }
- {
- \msg_error:nnxx { deriv } { command-not-defined }
- { \token_to_str:N #1 }
- { \token_to_str:N \RenewOdvVariant }
- }
-}
-
-\DeclareDocumentCommand{\ProvideOdvVariant}{ m m o }
-{
- \cs_if_exist:NF #1
- {
- \deriv_d_preamble:Nnn \l__deriv_dv_tmp_tl {#1} {#3}
- \deriv_d_define:Vnnn \l__deriv_dv_tmp_tl { Provide } {#1} {#2}
- }
-}
-
-\DeclareDocumentCommand{\DeclareOdvVariant}{ m m o }
-{
- \deriv_d_preamble:Nnn \l__deriv_dv_tmp_tl {#1} {#3}
- \deriv_d_define:Vnnn \l__deriv_dv_tmp_tl { Declare } {#1} {#2}
-}
-
+% tl-dv , macro , key-value
\cs_new_protected:Npn \deriv_d_preamble:Nnn #1 #2 #3
{
\tl_set:Nx #1 { \cs_to_str:N #2 }
@@ -538,7 +448,7 @@
\__deriv_derivset:VV #1 \c_novalue_tl
\tl_if_novalue:nF {#3} { \__deriv_derivset:Vn #1 {#3} }
}
-
+% dv , new/delare/renew/provide , macro , inf
\cs_new_protected:Npn \deriv_d_define:nnnn #1 #2 #3 #4
{
\use:c { #2 DocumentCommand }{#3}{ s o m t/ m !e{\sb^} }
@@ -547,61 +457,18 @@
\exp_args:Nnc \bool_xor:nnTF {##4} { l__deriv_#1_switch_slash_bool }
{
\exp_args:Nnc \bool_xor:nnTF {##1} { l__deriv_#1_switch_star_bool }
- { \__deriv_odv_both:Nnnnnnn #4 {#1} {##2} {##3} {##5} {##6} {##7} }
- { \__deriv_odv_slash:Nnnnnnn #4 {#1} {##2} {##3} {##5} {##6} {##7} }
+ { \__deriv_odv_both:nnnnnnn {#4} {#1} {##2} {##3} {##5} {##6} {##7} }
+ { \__deriv_odv_slash:nnnnnnn {#4} {#1} {##2} {##3} {##5} {##6} {##7} }
}
{
\exp_args:Nnc \bool_xor:nnTF {##1} { l__deriv_#1_switch_star_bool }
- { \__deriv_odv_star:Nnnnnnn #4 {#1} {##2} {##3} {##5} {##6} {##7} }
- { \__deriv_odv_none:Nnnnnnn #4 {#1} {##2} {##3} {##5} {##6} {##7} }
+ { \__deriv_odv_star:nnnnnnn {#4} {#1} {##2} {##3} {##5} {##6} {##7} }
+ { \__deriv_odv_none:nnnnnnn {#4} {#1} {##2} {##3} {##5} {##6} {##7} }
}
\group_end:
}
}
-
-\DeclareDocumentCommand{\NewPdvVariant}{ m m o }
-{
- \cs_if_exist:NTF #1
- {
- \msg_error:nnxx { deriv } { command-already-defined }
- { \token_to_str:N #1 }
- { \token_to_str:N \NewPdvVariant }
- }
- {
- \deriv_p_preamble:Nnn \l__deriv_dv_tmp_tl {#1} {#3}
- \deriv_p_define:Vnnn \l__deriv_dv_tmp_tl { New } {#1} {#2}
- }
-}
-
-\DeclareDocumentCommand{\RenewPdvVariant}{ m m o }
-{
- \cs_if_exist:NTF #1
- {
- \deriv_p_preamble:Nnn \l__deriv_dv_tmp_tl {#1} {#3}
- \deriv_p_define:Vnnn \l__deriv_dv_tmp_tl { Renew } {#1} {#2}
- }
- {
- \msg_error:nnxx { deriv } { command-already-defined }
- { \token_to_str:N #1 }
- { \token_to_str:N \RenewPdvVariant }
- }
-}
-
-\DeclareDocumentCommand{\ProvidePdvVariant}{ m m o }
-{
- \cs_if_exist:NF #1
- {
- \deriv_p_preamble:Nnn \l__deriv_dv_tmp_tl {#1} {#3}
- \deriv_p_define:Vnnn \l__deriv_dv_tmp_tl { Provide } {#1} {#2}
- }
-}
-
-\DeclareDocumentCommand{\DeclarePdvVariant}{ m m o }
-{
- \deriv_p_preamble:Nnn \l__deriv_dv_tmp_tl {#1} {#3}
- \deriv_p_define:Vnnn \l__deriv_dv_tmp_tl { Declare } {#1} {#2}
-}
-
+% tl-dv , macro , key-value
\cs_new_protected:Npn \deriv_p_preamble:Nnn #1 #2 #3
{
\tl_set:Nx #1 { \cs_to_str:N #2 }
@@ -614,7 +481,7 @@
\__deriv_derivset:VV #1 \c_novalue_tl
\tl_if_novalue:nF {#3} { \__deriv_derivset:Vn #1 {#3} }
}
-
+% dv , new/delare/renew/provide , macro , inf
\cs_new_protected:Npn \deriv_p_define:nnnn #1 #2 #3 #4
{
\use:c { #2 DocumentCommand }{#3}{ s o o m t/ m !e{\sb^} }
@@ -623,13 +490,13 @@
\exp_args:Nnc \bool_xor:nnTF {##5} { l__deriv_#1_switch_slash_bool }
{
\exp_args:Nnc \bool_xor:nnTF {##1} { l__deriv_#1_switch_star_bool }
- { \__deriv_pdv_both:Nnnnnnnn #4 {#1} {##2} {##3} {##4} {##6} {##7} {##8} }
- { \__deriv_pdv_slash:Nnnnnnnn #4 {#1} {##2} {##3} {##4} {##6} {##7} {##8} }
+ { \__deriv_pdv_both:nnnnnnnn #4 {#1} {##2} {##3} {##4} {##6} {##7} {##8} }
+ { \__deriv_pdv_slash:nnnnnnnn #4 {#1} {##2} {##3} {##4} {##6} {##7} {##8} }
}
{
\exp_args:Nnc \bool_xor:nnTF {##1} { l__deriv_#1_switch_star_bool }
- { \__deriv_pdv_star:Nnnnnnnn #4 {#1} {##2} {##3} {##4} {##6} {##7} {##8} }
- { \__deriv_pdv_none:Nnnnnnnn #4 {#1} {##2} {##3} {##4} {##6} {##7} {##8} }
+ { \__deriv_pdv_star:nnnnnnnn {#4} {#1} {##2} {##3} {##4} {##6} {##7} {##8} }
+ { \__deriv_pdv_none:nnnnnnnn {#4} {#1} {##2} {##3} {##4} {##6} {##7} {##8} }
}
\group_end:
}
@@ -637,36 +504,36 @@
% dv
\cs_new_protected:Npn \__deriv_d_variables:n #1
{
- \__deriv_new:nnnn {#1} { scale } { tl } { eval, eval_slash, fun, var, frac, frac_slash }
- \__deriv_new:nnnn {#1} { delims } { tl } { eval, eval_slash, fun, var, frac, frac_slash }
- \__deriv_new:nnnn {#1} { sep } { muskip } { inf_ord, inf_fun, ord_fun, var_ord, inf_var, eval_sb, eval_sp }
- \__deriv_new:nnnn {#1} { switch } { bool } { star, slash }
- \__deriv_new:nnnn {#1} { mics } { bool } { fun, var, frac }
+ \__deriv_new:nnnn { tl } {#1} { scale } { eval, eval_slash, fun, var, frac, frac_slash }
+ \__deriv_new:nnnn { tl } {#1} { delims } { eval, eval_slash, fun, var, frac, frac_slash }
+ \__deriv_new:nnnn { muskip } {#1} { sep } { inf_ord, inf_fun, ord_fun, var_ord, inf_var, eval_sb, eval_sp }
+ \__deriv_new:nnnn { bool } {#1} { switch } { star, slash }
+ \__deriv_new:nnnn { bool } {#1} { mics } { fun, var, frac }
}
% dv
\cs_new_protected:Npn \__deriv_p_variables:n #1
{
- \__deriv_new:nnnn {#1} { scale } { tl } { eval, eval_slash, fun, var, frac, frac_slash }
- \__deriv_new:nnnn {#1} { delims } { tl } { eval, eval_slash, fun, var, frac, frac_slash }
- \__deriv_new:nnnn {#1} { sep } { muskip } { inf_ord, inf_fun, ord_fun, inf_var, var_ord, var_inf, ord_inf, eval_sb, eval_sp }
- \__deriv_new:nnnn {#1} { switch } { bool } { star, slash }
- \__deriv_new:nnnn {#1} { sort } { clist } { method }
- \__deriv_new:nnnn {#1} { sort } { tl } { numerical }
- \__deriv_new:nnnn {#1} { sort } { bool } { sign_reverse, symbol_reverse, abs_reverse }
- \__deriv_new:nnnn {#1} { mics } { bool } { fun, var, frac }
+ \__deriv_new:nnnn { tl } {#1} { scale } { eval, eval_slash, fun, var, frac, frac_slash }
+ \__deriv_new:nnnn { tl } {#1} { delims } { eval, eval_slash, fun, var, frac, frac_slash }
+ \__deriv_new:nnnn { muskip } {#1} { sep } { inf_ord, inf_fun, ord_fun, inf_var, var_ord, var_inf, ord_inf, eval_sb, eval_sp }
+ \__deriv_new:nnnn { bool } {#1} { switch } { star, slash }
+ \__deriv_new:nnnn { clist } {#1} { sort } { method }
+ \__deriv_new:nnnn { tl } {#1} { sort } { numerical }
+ \__deriv_new:nnnn { bool } {#1} { sort } { sign_reverse, symbol_reverse, abs_reverse }
+ \__deriv_new:nnnn { bool } {#1} { mics } { fun, var, frac }
}
-% dv , sub-category , data-type , cs-var-list
+% data-type , dv , category , cs-var-list
\cs_new:Npn \__deriv_new:nnnn #1 #2 #3 #4
{
\seq_set_from_clist:Nn \l__deriv_var_seq {#4}
\seq_map_inline:Nn \l__deriv_var_seq
- { \cs:w #3_new:c \cs_end: { l__deriv_#1_#2_##1_#3 } }
+ { \cs:w #1_new:c \cs_end: { l__deriv_#2_#3_##1_#1 } }
}
%%%%% Ordinary derivative definition %%%%%
% inf , dv , order , function , variable , sb-point , sp-point
-\cs_new_protected:Npn \__deriv_odv_both:Nnnnnnn #1 #2 #3 #4 #5 #6 #7
+\cs_new_protected:Npn \__deriv_odv_both:nnnnnnn #1 #2 #3 #4 #5 #6 #7
{
\__deriv_set_order:Nn \l__deriv_d_order_tl {#3}
\__deriv_evaluation_slash:nnnn {#2} {#6} {#7}
@@ -674,15 +541,14 @@
\__deriv_fraction_slash:nn {#2}
{
\use:c { __deriv_#2_style_frac_slash:n }
- { \__deriv_d_numerator_nofun:Nn #1 {#2} }
- { \__deriv_d_denominator:Nnn #1 {#2} {#5} }
+ { \__deriv_d_numerator_nofun:nn {#1} {#2} }
+ { \__deriv_d_denominator:nnn {#1} {#2} {#5} }
}
-
\__deriv_function:nn {#2} {#4}
}
}
% inf , dv , order , function , variable , sb-point , sp-point
-\cs_new_protected:Npn \__deriv_odv_star:Nnnnnnn #1 #2 #3 #4 #5 #6 #7
+\cs_new_protected:Npn \__deriv_odv_star:nnnnnnn #1 #2 #3 #4 #5 #6 #7
{
\__deriv_set_order:Nn \l__deriv_d_order_tl {#3}
\__deriv_evaluation:nnnn {#2} {#6} {#7}
@@ -690,14 +556,14 @@
\__deriv_fraction:nn {#2}
{
\use:c { __deriv_#2_style_frac:n }
- { \__deriv_d_numerator_nofun:Nn #1 {#2} }
- { \__deriv_d_denominator:Nnn #1 {#2} {#5} }
+ { \__deriv_d_numerator_nofun:nn {#1} {#2} }
+ { \__deriv_d_denominator:nnn {#1} {#2} {#5} }
}
\__deriv_function:nn {#2} {#4}
}
}
% inf , dv , order , function , variable , sb-point , sp-point
-\cs_new_protected:Npn \__deriv_odv_slash:Nnnnnnn #1 #2 #3 #4 #5 #6 #7
+\cs_new_protected:Npn \__deriv_odv_slash:nnnnnnn #1 #2 #3 #4 #5 #6 #7
{
\__deriv_set_order:Nn \l__deriv_d_order_tl {#3}
\__deriv_evaluation_slash:nnnn {#2} {#6} {#7}
@@ -705,13 +571,13 @@
\__deriv_fraction_slash:nn {#2}
{
\use:c { __deriv_#2_style_frac_slash:n }
- { \__deriv_d_numerator_fun:Nnn #1 {#2} {#4} }
- { \__deriv_d_denominator:Nnn #1 {#2} {#5} }
+ { \__deriv_d_numerator_fun:nnn {#1} {#2} {#4} }
+ { \__deriv_d_denominator:nnn {#1} {#2} {#5} }
}
}
}
% inf , dv , order , function , variable , sb-point , sp-point
-\cs_new_protected:Npn \__deriv_odv_none:Nnnnnnn #1 #2 #3 #4 #5 #6 #7
+\cs_new_protected:Npn \__deriv_odv_none:nnnnnnn #1 #2 #3 #4 #5 #6 #7
{
\__deriv_set_order:Nn \l__deriv_d_order_tl {#3}
\__deriv_evaluation:nnnn {#2} {#6} {#7}
@@ -719,100 +585,100 @@
\__deriv_fraction:nn {#2}
{
\use:c { __deriv_#2_style_frac:n }
- { \__deriv_d_numerator_fun:Nnn #1 {#2} {#4} }
- { \__deriv_d_denominator:Nnn #1 {#2} {#5} }
+ { \__deriv_d_numerator_fun:nnn {#1} {#2} {#4} }
+ { \__deriv_d_denominator:nnn {#1} {#2} {#5} }
}
}
}
% inf , dv , function
-\cs_new_protected:Npn \__deriv_d_numerator_fun:Nnn #1 #2 #3
+\cs_new_protected:Npn \__deriv_d_numerator_fun:nnn #1 #2 #3
{
- \__deriv_insert_inf:Nn #1 {#2}
+ \__deriv_insert_inf:nn {#1} {#2}
\__deriv_insert_ord:Nnn \l__deriv_d_order_tl {#2} { inf_ord }
\__deriv_insert_fun:Nnn \l__deriv_d_order_tl {#2} {#3}
}
% inf , dv
-\cs_new_protected:Npn \__deriv_d_numerator_nofun:Nn #1 #2
+\cs_new_protected:Npn \__deriv_d_numerator_nofun:nn #1 #2
{
- \__deriv_insert_inf:Nn #1 {#2}
+ \__deriv_insert_inf:nn {#1} {#2}
\__deriv_insert_ord:Nnn \l__deriv_d_order_tl {#2} { inf_ord }
}
% inf , dv , variable
-\cs_new_protected:Npn \__deriv_d_denominator:Nnn #1 #2 #3
+\cs_new_protected:Npn \__deriv_d_denominator:nnn #1 #2 #3
{
- \__deriv_insert_inf:Nn #1 {#2}
+ \__deriv_insert_inf:nn {#1} {#2}
\__deriv_insert_var_ord:Nnn \l__deriv_d_order_tl {#2} {#3}
}
%%%%% Partial derivative definition %%%%%
% inf , dv , order , mixed order , function , variable , sb-point , sp-point
-\cs_new_protected:Npn \__deriv_pdv_both:Nnnnnnnn #1 #2 #3 #4 #5 #6 #7 #8
+\cs_new_protected:Npn \__deriv_pdv_both:nnnnnnnn #1 #2 #3 #4 #5 #6 #7 #8
{
- \__deriv_preparation:NNNnnnn \l__deriv_p_mo_tl \l__deriv_p_denom_tl #1 {#2} {#3} {#4} {#6}
+ \__deriv_preparation:NNnnnnn \l__deriv_p_mo_tl \l__deriv_p_denom_tl {#1} {#2} {#3} {#4} {#6}
\__deriv_evaluation_slash:nnnn {#2} {#7} {#8}
{
\__deriv_fraction_slash:nn {#2}
{
\use:c { __deriv_#2_style_frac_slash:n }
- { \__deriv_p_numerator_nofun:Nn #1 {#2} }
+ { \__deriv_p_numerator_nofun:nn {#1} {#2} }
{ \__deriv_p_denominator:n {#2} }
}
\__deriv_function:nn {#2} {#5}
}
}
% inf , dv , order , mixed order , function , variable , sb-point , sp-point
-\cs_new_protected:Npn \__deriv_pdv_star:Nnnnnnnn #1 #2 #3 #4 #5 #6 #7 #8
+\cs_new_protected:Npn \__deriv_pdv_star:nnnnnnnn #1 #2 #3 #4 #5 #6 #7 #8
{
- \__deriv_preparation:NNNnnnn \l__deriv_p_mo_tl \l__deriv_p_denom_tl #1 {#2} {#3} {#4} {#6}
+ \__deriv_preparation:NNnnnnn \l__deriv_p_mo_tl \l__deriv_p_denom_tl {#1} {#2} {#3} {#4} {#6}
\__deriv_evaluation:nnnn {#2} {#7} {#8}
{
\__deriv_fraction:nn {#2}
{
\use:c { __deriv_#2_style_frac:n }
- { \__deriv_p_numerator_nofun:Nn #1 {#2} }
+ { \__deriv_p_numerator_nofun:nn {#1} {#2} }
{ \__deriv_p_denominator:n {#2} }
}
\__deriv_function:nn {#2} {#5}
}
}
% inf , dv , order , mixed order , function , variable , sb-point , sp-point
-\cs_new_protected:Npn \__deriv_pdv_slash:Nnnnnnnn #1 #2 #3 #4 #5 #6 #7 #8
+\cs_new_protected:Npn \__deriv_pdv_slash:nnnnnnnn #1 #2 #3 #4 #5 #6 #7 #8
{
- \__deriv_preparation:NNNnnnn \l__deriv_p_mo_tl \l__deriv_p_denom_tl #1 {#2} {#3} {#4} {#6}
+ \__deriv_preparation:NNnnnnn \l__deriv_p_mo_tl \l__deriv_p_denom_tl {#1} {#2} {#3} {#4} {#6}
\__deriv_evaluation_slash:nnnn {#2} {#7} {#8}
{
\__deriv_fraction_slash:nn {#2}
{
\use:c { __deriv_#2_style_frac_slash:n }
- { \__deriv_p_numerator_fun:Nnn #1 {#2} {#5} }
+ { \__deriv_p_numerator_fun:nnn {#1} {#2} {#5} }
{ \__deriv_p_denominator:n {#2} }
}
}
}
% inf , dv , order , mixed order , function , variable , sb-point , sp-point
-\cs_new_protected:Npn \__deriv_pdv_none:Nnnnnnnn #1 #2 #3 #4 #5 #6 #7 #8
+\cs_new_protected:Npn \__deriv_pdv_none:nnnnnnnn #1 #2 #3 #4 #5 #6 #7 #8
{
- \__deriv_preparation:NNNnnnn \l__deriv_p_mo_tl \l__deriv_p_denom_tl #1 {#2} {#3} {#4} {#6}
+ \__deriv_preparation:NNnnnnn \l__deriv_p_mo_tl \l__deriv_p_denom_tl {#1} {#2} {#3} {#4} {#6}
\__deriv_evaluation:nnnn {#2} {#7} {#8}
{
\__deriv_fraction:nn {#2}
{
\use:c { __deriv_#2_style_frac:n }
- { \__deriv_p_numerator_fun:Nnn #1 {#2} {#5} }
+ { \__deriv_p_numerator_fun:nnn {#1} {#2} {#5} }
{ \__deriv_p_denominator:n {#2} }
}
}
}% inf , dv , function
-\cs_new_protected:Npn \__deriv_p_numerator_fun:Nnn #1 #2 #3
+\cs_new_protected:Npn \__deriv_p_numerator_fun:nnn #1 #2 #3
{
- \__deriv_insert_inf:Nn #1 {#2}
+ \__deriv_insert_inf:nn {#1} {#2}
\__deriv_insert_ord:Nnn \l__deriv_p_mo_tl {#2} { inf_ord }
\__deriv_insert_fun:Nnn \l__deriv_p_mo_tl {#2} {#3}
}
% inf , dv
-\cs_new_protected:Npn \__deriv_p_numerator_nofun:Nn #1 #2
+\cs_new_protected:Npn \__deriv_p_numerator_nofun:nn #1 #2
{
- \__deriv_insert_inf:Nn #1 {#2}
+ \__deriv_insert_inf:nn {#1} {#2}
\__deriv_insert_ord:Nnn \l__deriv_p_mo_tl {#2} { inf_ord }
}
% dv
@@ -821,7 +687,7 @@
\tl_use:N \l__deriv_p_denom_tl %{ \__deriv_insert_mskip:nn {#1} { var_inf } }
}
% mixed-order-tl , denom-seq , inf , dv , order , mixed order , variable
-\cs_new_protected:Npn \__deriv_preparation:NNNnnnn #1 #2 #3 #4 #5 #6 #7
+\cs_new_protected:Npn \__deriv_preparation:NNnnnnn #1 #2 #3 #4 #5 #6 #7
{
\seq_clear:N #2
\seq_set_from_clist:Nn \l__deriv_p_var_seq {#7}
@@ -835,7 +701,7 @@
}
{ \tl_set:Nn #1 {#6} }
- \__deriv_p_build_denom:NNNNn \l__deriv_p_var_seq \l__deriv_p_order_seq #2 #3 {#4}
+ \__deriv_p_build_denom:NNNnn \l__deriv_p_var_seq \l__deriv_p_order_seq #2 {#3} {#4}
}
\cs_new_protected:Npn \__deriv_adjust_mo_seq:NNN #1 #2 #3
@@ -852,7 +718,7 @@
}
}
% \l__deriv_p_var_seq \l__deriv_p_order_seq, denom-tl , inf , dv
-\cs_new_protected:Npn \__deriv_p_build_denom:NNNNn #1 #2 #3 #4 #5
+\cs_new_protected:Npn \__deriv_p_build_denom:NNNnn #1 #2 #3 #4 #5
{
\int_zero:N \l__deriv_tmpa_int
\seq_map_inline:Nn #1
@@ -863,7 +729,7 @@
{
\tl_put_right:Nx #3
{
- \__deriv_insert_inf:Nn #4 {#5}
+ \__deriv_insert_inf:nn {#4} {#5}
\int_compare:nNnTF { \l__deriv_tmpa_int } = { \seq_count:N #1 }
{ \__deriv_insert_var_ord:Nnn \l__deriv_p_tmpa_tl {#5} {##1} }
{ \__deriv_insert_var_ord_sep:Nnn \l__deriv_p_tmpa_tl {#5} {##1} }
@@ -873,12 +739,11 @@
}
%%%%% And the rest of the code %%%%%
% inf , dv
-\cs_new:Npn \__deriv_insert_inf:Nn #1 #2
+\cs_new:Npn \__deriv_insert_inf:nn #1 #2
{
\exp_not:n
{
- \use:c { __deriv_#2_style_inf:n }
- { \tl_use:N #1 }
+ \use:c { __deriv_#2_style_inf:n } {#1}
}
}
% dv , function
@@ -920,7 +785,7 @@
% order , dv , name
\cs_new:Npn \__deriv_insert_ord:Nnn #1 #2 #3
{
- \__show_order:NT #1
+ \__deriv_show_order:NT #1
{
\sp
{
@@ -932,7 +797,7 @@
% order , dv , name
\cs_new:Npn \__deriv_insert_ord:Nn #1 #2
{
- \__show_order:NTF #1
+ \__deriv_show_order:NTF #1
{
\sp
{
@@ -1003,23 +868,23 @@
% dv , sub , sup , code-for-fraction
\cs_new:Npn \__deriv_evaluation:nnnn #1 #2 #3 #4
{
- \__if_novalue_blank_or:nnTF {#2} {#3}
+ \__deriv_if_novalue_and:nnTF {#2} {#3}
{ #4 }
{
\__deriv_add_delims:nnn {#1} { eval } {#4}
- \__if_novalue_blank:nF {#2} { \sb{ \__deriv_insert_mskip:nn {#1} { eval_sb } #2 } }
- \__if_novalue_blank:nF {#3} { \sp{ \__deriv_insert_mskip:nn {#1} { eval_sp } #3 } }
+ \__deriv_if_novalue:nF {#2} { \sb{ \__deriv_insert_mskip:nn {#1} { eval_sb } #2 } }
+ \__deriv_if_novalue:nF {#3} { \sp{ \__deriv_insert_mskip:nn {#1} { eval_sp } #3 } }
}
}
% dv , sub , sup , code-for-fraction
\cs_new:Npn \__deriv_evaluation_slash:nnnn #1 #2 #3 #4
{
- \__if_novalue_blank_or:nnTF {#2} {#3}
+ \__deriv_if_novalue_and:nnTF {#2} {#3}
{ #4 }
{
\__deriv_add_delims:nnn {#1} { eval_slash } {#4}
- \__if_novalue_blank:nF {#2} { \sb{ \__deriv_insert_mskip:nn {#1} { eval_sb } #2 } }
- \__if_novalue_blank:nF {#3} { \sp{ \__deriv_insert_mskip:nn {#1} { eval_sp } #3 } }
+ \__deriv_if_novalue:nF {#2} { \sb{ \__deriv_insert_mskip:nn {#1} { eval_sb } #2 } }
+ \__deriv_if_novalue:nF {#3} { \sp{ \__deriv_insert_mskip:nn {#1} { eval_sp } #3 } }
}
}
% dv , name , value
@@ -1208,12 +1073,12 @@
{
\__deriv_case:nF
{
- { \tl_if_head_eq_charcode_p:VN \l__deriv_num_tmpb_tl - && ! \tl_if_head_eq_charcode_p:VN \l__deriv_num_tmpa_tl - } { \__deriv_sort_reverse:nnn {#1} { sign } { same } }
- { \tl_if_head_eq_charcode_p:VN \l__deriv_num_tmpa_tl - && ! \tl_if_head_eq_charcode_p:VN \l__deriv_num_tmpb_tl - } { \__deriv_sort_reverse:nnn {#1} { sign } { swapped } }
+ { \tl_if_head_eq_charcode_p:VN \l__deriv_num_tmpb_tl - && ! \tl_if_head_eq_charcode_p:VN \l__deriv_num_tmpa_tl - } { \__deriv_sort_reverse:nnn {#1} { sign } { same } }
+ { \tl_if_head_eq_charcode_p:VN \l__deriv_num_tmpa_tl - && ! \tl_if_head_eq_charcode_p:VN \l__deriv_num_tmpb_tl - } { \__deriv_sort_reverse:nnn {#1} { sign } { swapped } }
}
{
\int_compare:nNnTF { \l__deriv_sort_counter_int } = { \l__deriv_sort_max_int }
- { \sort_return_same: }
+ { \sort_return_same: }
{ \__deriv_sort_method:n {#1} }
}
}
@@ -1227,7 +1092,7 @@
}
{
\int_compare:nNnTF { \l__deriv_sort_counter_int } = { \l__deriv_sort_max_int }
- { \sort_return_same: }
+ { \sort_return_same: }
{ \__deriv_sort_method:n {#1} }
}
}
@@ -1241,7 +1106,7 @@
}
{
\int_compare:nNnTF { \l__deriv_sort_counter_int } = { \l__deriv_sort_max_int }
- { \sort_return_same: }
+ { \sort_return_same: }
{ \__deriv_sort_method:n {#1} }
}
}
@@ -1279,6 +1144,131 @@
\tl_if_empty:NT #1 { \tl_set:Nn #1 { 0 } }
}
+%%%%% Declaring Variant %%%%%
+
+\DeclareDocumentCommand{\NewOdvVariant}{ m m o }
+{
+ \cs_if_exist:NTF #1
+ {
+ \msg_error:nnxx { deriv } { command-already-defined }
+ { \token_to_str:N #1 }
+ { \token_to_str:N \NewOdvVariant }
+ }
+ {
+ \deriv_d_preamble:Nnn \l__deriv_dv_tmp_tl {#1} {#3}
+ \deriv_d_define:Vnnn \l__deriv_dv_tmp_tl { New } {#1} {#2}
+ }
+}
+
+\DeclareDocumentCommand{\RenewOdvVariant}{ m m o }
+{
+ \cs_if_exist:NTF #1
+ {
+ \deriv_d_preamble:Nnn \l__deriv_dv_tmp_tl {#1} {#3}
+ \deriv_d_define:Vnnn \l__deriv_dv_tmp_tl { Renew } {#1} {#2}
+ }
+ {
+ \msg_error:nnxx { deriv } { command-not-defined }
+ { \token_to_str:N #1 }
+ { \token_to_str:N \RenewOdvVariant }
+ }
+}
+
+\DeclareDocumentCommand{\ProvideOdvVariant}{ m m o }
+{
+ \cs_if_exist:NF #1
+ {
+ \deriv_d_preamble:Nnn \l__deriv_dv_tmp_tl {#1} {#3}
+ \deriv_d_define:Vnnn \l__deriv_dv_tmp_tl { Provide } {#1} {#2}
+ }
+}
+
+\DeclareDocumentCommand{\DeclareOdvVariant}{ m m o }
+{
+ \deriv_d_preamble:Nnn \l__deriv_dv_tmp_tl {#1} {#3}
+ \deriv_d_define:Vnnn \l__deriv_dv_tmp_tl { Declare } {#1} {#2}
+}
+
+\DeclareDocumentCommand{\NewPdvVariant}{ m m o }
+{
+ \cs_if_exist:NTF #1
+ {
+ \msg_error:nnxx { deriv } { command-already-defined }
+ { \token_to_str:N #1 }
+ { \token_to_str:N \NewPdvVariant }
+ }
+ {
+ \deriv_p_preamble:Nnn \l__deriv_dv_tmp_tl {#1} {#3}
+ \deriv_p_define:Vnnn \l__deriv_dv_tmp_tl { New } {#1} {#2}
+ }
+}
+
+\DeclareDocumentCommand{\RenewPdvVariant}{ m m o }
+{
+ \cs_if_exist:NTF #1
+ {
+ \deriv_p_preamble:Nnn \l__deriv_dv_tmp_tl {#1} {#3}
+ \deriv_p_define:Vnnn \l__deriv_dv_tmp_tl { Renew } {#1} {#2}
+ }
+ {
+ \msg_error:nnxx { deriv } { command-already-defined }
+ { \token_to_str:N #1 }
+ { \token_to_str:N \RenewPdvVariant }
+ }
+}
+
+\DeclareDocumentCommand{\ProvidePdvVariant}{ m m o }
+{
+ \cs_if_exist:NF #1
+ {
+ \deriv_p_preamble:Nnn \l__deriv_dv_tmp_tl {#1} {#3}
+ \deriv_p_define:Vnnn \l__deriv_dv_tmp_tl { Provide } {#1} {#2}
+ }
+}
+
+\DeclareDocumentCommand{\DeclarePdvVariant}{ m m o }
+{
+ \deriv_p_preamble:Nnn \l__deriv_dv_tmp_tl {#1} {#3}
+ \deriv_p_define:Vnnn \l__deriv_dv_tmp_tl { Declare } {#1} {#2}
+}
+
+%%%%% slash frac %%%%%
+
+\DeclareDocumentCommand{\slashfrac}{ o m m }
+{
+ \tl_if_novalue:nTF {#1}
+ { \__deriv_slashfrac_auto:nn {#2} {#3} }
+ {
+ \str_case:nnF {#1}
+ {
+ { auto } { \__deriv_slashfrac_auto:nn {#2} {#3} }
+ { none } { \__deriv_slashfrac_none:nn {#2} {#3} }
+ }
+ { \__deriv_slashfrac_scale:nnn {#1} {#2} {#3} }
+ }
+}
+% numerator , denominator
+\cs_new_protected:Npn \__deriv_slashfrac_auto:nn #1 #2
+{
+ \__deriv_auto_left:n . \kern-\nulldelimiterspace
+ {#1} \middle/ {#2}
+ \__deriv_auto_right:n . \kern-\nulldelimiterspace
+}
+% numerator , denominator
+\cs_new_protected:Npn \__deriv_slashfrac_none:nn #1 #2
+{
+ {#1} / {#2}
+}
+% scale , numerator , denominator
+\cs_new_protected:Npn \__deriv_slashfrac_scale:nnn #1 #2 #3
+{
+ \cs:w #1 l \cs_end: .
+ {#2}
+ \cs:w #1 \cs_end: /
+ {#3}
+ \cs:w #1 r \cs_end: .
+}
+
%%%%% Generate variants %%%%%
\cs_generate_variant:Nn \tl_if_head_eq_charcode_p:nN { V }
@@ -1332,6 +1322,6 @@
\DeclareOdvVariant{\jdv}{\partial}[misc-add-delims = {fun, var}]
\DeclarePdvVariant{\pdv}{\partial}[sep-inf-ord=1, sep-ord-fun=-2]
}
-%\derivset{all}
+\derivset{all}
\endinput
diff --git a/macros/latex/contrib/derivative/derivative.tex b/macros/latex/contrib/derivative/derivative.tex
index 13fd600e72..d538bc8566 100644
--- a/macros/latex/contrib/derivative/derivative.tex
+++ b/macros/latex/contrib/derivative/derivative.tex
@@ -12,6 +12,7 @@
% This work has the LPPL maintenance status `maintained'.
%
% The Current Maintainer of this work is Simon Jensen.
+
\NeedsTeXFormat{LaTeX2e}
\documentclass[final,british,10pt]{scrartcl}
@@ -54,9 +55,6 @@
\makeatletter
\ExplSyntaxOn
-\def\verbatim{\@beginparpenalty \predisplaypenalty \@verbatim
- \VerbFont \frenchspacing \@vobeyspaces \@xverbatim}
-
\tl_new:N \pakkenavn
\tl_new:N \titel
\tl_new:N \g_deriv_email
@@ -64,29 +62,16 @@
\tl_new:N \g_deriv_dato
\tl_new:N \g_deriv_version
-\seq_new:N \l__deriv_args_seq
-\seq_new:N \l__deriv_marg_args_seq
-\seq_new:N \l__deriv_macro_seq
-\seq_new:N \l__deriv_tmp_seq
-\seq_new:N \l__deriv_def_opt_seq
-\seq_new:N \l__deriv_opt_seq
-\seq_new:N \l__deriv_value_seq
-
-\tl_new:N \l__deriv_tmp_tl
-\tl_new:N \l__deriv_default_tl
-
\NewDocumentCommand{\Pakkenavn}{ m }{ \tl_gset:Nf \pakkenavn { \tl_trim_spaces:n { #1 } } }
\NewDocumentCommand{\Titel} { m }{ \tl_gset:Nf \titel { \tl_trim_spaces:n { #1 } } }
\NewDocumentCommand{\Forfatter}{ m }{ \tl_gset:Nf \forfatter { \tl_trim_spaces:n { #1 } } }
\NewDocumentCommand{\Email} { m }{ \tl_gset:Nf \g_deriv_email { \tl_trim_spaces:n { #1 } } }
\NewDocumentCommand{\Dato} { m }{ \tl_gset:Nf \g_deriv_dato { \tl_trim_spaces:n { #1 } } }
\NewDocumentCommand{\Version} { m }{ \tl_gset:Nf \g_deriv_version { \tl_trim_spaces:n { #1 } } }
-\NewDocumentCommand{\default} { s }
-{
- \bool_if:nTF {#1}
- { \seq_use:Nnnn \l__deriv_def_opt_seq {~and~} { ,~} {~and~} }
- { \seq_use:Nn \l__deriv_def_opt_seq { ,~} }
-}
+
+\NewDocumentCommand{\mypackage}{ } { \pkg{\pakkenavn} }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NewDocumentCommand{\forside}{}
{
@@ -130,32 +115,17 @@
\clearpage
}
-\newlist{todo}{enumerate}{1}
-\setlist[todo]{label=(\roman{todoi}),~ref=\thesubsection(\roman{todoi})}
-\crefname{todoi}{todo}{todos}
-
-\newlist{revision}{enumerate}{1}
-\setlist[revision]{label=(\roman{revisioni}), ref=\thesubsection(\roman{revisioni})}
-\crefname{revisioni}{revision}{revisions}
-
-\newlist{consideration}{enumerate}{1}
-\setlist[consideration]{label=(\roman{considerationi}), ref=\thesubsection(\roman{considerationi})}
-\crefname{considerationi}{consideration}{considerations}
-
-\renewcommand{\@idxitem}{\par \hangindent 0\p@ }
-\renewcommand{\subitem}{\@idxitem \hspace *{0\p@ }}
-
\lstset
{
tabsize = 1,
columns = fullflexible,
- basicstyle = \CommonFont,
+ basicstyle = \ttfamily\upshape\small,
escapechar = \%,
alsoletter = {\\,-},
keywords = [0]{style-inf, add-delims,sep-inf-ord,sep-ord-fun},
- keywordstyle = [0]\OptionFont,
+ keywordstyle = [0]\__mydoc_option_font:,
keywords = [1]{\\odv, \\mdv, \\fdv, \\adv, \\jdv, \\pdv, \\NewOdvVariant, \\RenewOdvVariant, \\ProvideOdvVariant, \\DeclareOdvVariant, \\NewPdvVariant, \\RenewPdvVariant, \\ProvidePdvVariant, \\DeclarePdvVariant},
- keywordstyle = [1]\MacroFont,
+ keywordstyle = [1]\__mydoc_function_font:,
commentstyle = \footnotesize,
frame = single,
xleftmargin=3.4pt,
@@ -167,408 +137,907 @@
\lstnewenvironment{definition}{\normalmarginpar}{\reversemarginpar}
+\newlist{todo}{enumerate}{1}
+\setlist[todo]{label=(\roman{todoi}), ref=\thesubsection(\roman{todoi})}
+\crefname{todoi}{todo}{todos}
+
+\newlist{changes}{enumerate}{1}
+\setlist[changes]{label=(\roman{changesi}), ref=\thesubsection(\roman{changesi})}
+\crefname{changesi}{change}{changes}
+
+\newlist{consideration}{enumerate}{1}
+\setlist[consideration]{label=(\roman{considerationi}), ref=\thesubsection(\roman{considerationi})}
+\crefname{considerationi}{consideration}{considerations}
+
+\renewcommand{\@idxitem}{\par \hangindent 0\p@ }
+\renewcommand{\subitem}{\@idxitem \hspace *{0\p@ }}
+
\NewDocumentCommand{\marginnote}{ m }
{
\leavevmode
- \marginline{\leavevmode \CommonFont \color{RoyalDarkGray} \tl_trim_spaces:n {#1} }
+ \marginline{\leavevmode \ttfamily\upshape\small \color{RoyalDarkGray} \tl_trim_spaces:n {#1} }
}
-\NewDocumentCommand{\print}{ m }
-{
- \__deriv_print:n {#1}
- \tl_use:N \l_tmpb_tl
-}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\cs_new:Npn \__deriv_print:n #1
+\NewDocumentCommand{\ket}{ m }
{
- \tl_set:Nn \l_tmpa_tl {#1}
- \regex_replace_all:nnN { . } { \c{string} \0 } \l_tmpa_tl
- \tl_set:Nx \l_tmpb_tl { \l_tmpa_tl }
+ \lvert #1 \rangle
}
-\seq_new:N \l__deriv_eks_seq
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\NewDocumentCommand{\eks}{ s m }
+\NewDocumentCommand{\pkg}{ m }
{
- \int_gzero:N \g_tmpa_int
- \begin{center}
- \bool_if:nTF {#1}
- {
- \__deriv_eks_star:n {#2}
- }
- {
- \__deriv_eks:n {#2}
- }
- \end{center}
+ \group_begin:
+ \sffamily \upshape \small #1
+ \group_end:
}
-\cs_new_protected:Npn \__deriv_eks_star:n #1
+\NewDocumentCommand{\uni}{} % Kræver unicode
+{ \textsuperscript{\texttt{U}} }
+
+\NewDocumentCommand{\pdf}{} % Kræver pdflatex
+{ \textsuperscript{\texttt{P}} }
+
+\NewDocumentCommand{\req}{} % Kræver pakke
+{ \textsuperscript{\texttt{R}} }
+
+\NewDocumentCommand{\tex}{}{\texorpdfstring{\hologo{TeX}}{TeX}}
+\NewDocumentCommand{\pdftex}{}{\texorpdfstring{\hologo{pdfTeX}}{pdfTeX}}
+\NewDocumentCommand{\luatex}{}{\texorpdfstring{\hologo{LuaTeX}}{LuaTeX}}
+\NewDocumentCommand{\xetex}{}{\texorpdfstring{\hologo{XeTeX}}{XeTeX}}
+\NewDocumentCommand{\latex}{ t2 t3 }
{
- \seq_set_split:Nnn \l__deriv_eks_seq { ; } { #1 }
- \tabular{ @{}c@{} }
- \seq_map_inline:Nn \l__deriv_eks_seq
+ \bool_if:nTF {#1}
+ { \texorpdfstring{\hologo{LaTeX2e}}{LaTeX2e} }
{
- \int_gincr:N \g_tmpa_int
- \EksFont
- \print{##1}
-
- \\[0.5em]
- $ \Longrightarrow \qquad \displaystyle ##1 $
- \int_compare:nNnF { \g_tmpa_int } = { \seq_count:N \l__deriv_eks_seq }
- {
- \\ \addlinespace[0.5em]
- }
+ \bool_if:nTF {#2}
+ { \texorpdfstring{\hologo{LaTeX3}}{LaTeX3} }
+ { \LaTeX }
}
- \endtabular
}
-\cs_new_protected:Npn \__deriv_eks:n #1
+\NewDocumentCommand{\xmark}{}
{
- \seq_set_split:Nnn \l__deriv_eks_seq { ; } { #1 }
- \tabular{ @{}r c l@{} }
- \seq_map_inline:Nn \l__deriv_eks_seq
- {
- \int_gincr:N \g_tmpa_int
- \EksFont
- \print{##1}
-
- & $ \Longrightarrow $
- & $ \displaystyle ##1 $
- \int_compare:nNnF { \g_tmpa_int } = { \seq_count:N \l__deriv_eks_seq }
- {
- \\ \addlinespace[0.5em]
+ \textcolor{red}{\ensuremath{\mathord{\mathpalette\bigcdot@{}}}}
+}
+\NewDocumentCommand{\cmark}{}
+{
+ \textcolor{green}{\ensuremath{\checkmark}}
+}
+
+\NewDocumentCommand{\answer}{ m m }
+{
+ #1
+ \textbf{Conclusion:}
+ \c_space_tl
+ \group_begin:
+ \slshape
+ #2
+ \group_end:
+}
+
+\newcommand*{\bigcdot@scalefactor}{1.25}
+\newcommand*{\bigcdot@widthfactor}{1.15}
+\newcommand*{\bigcdot@}[2]{
+ % #1: math style
+ % #2: unused
+ \sbox0{$#1\vcenter{}$}% math axis
+ \sbox2{$#1\vectimes\m@th$}
+ \hbox to \bigcdot@widthfactor\wd2{
+ \hfil
+ \raise\ht0\hbox{
+ \scalebox{\bigcdot@scalefactor}{
+ \lower\ht0\hbox{$#1\vectimes\m@th$}
+ }
}
+ \hfil
}
- \endtabular
}
-\RenewDocumentCommand{\arg}{ m }
+
+
+
+
+
+
+
+
+
+\tl_new:N \l__mydoc_ch_version_tl
+\tl_new:N \l__mydoc_ch_date_tl
+\tl_new:N \l__mydoc_ch_change_tl
+
+\bool_new:N \l__mydoc_ch_beta_bool
+\bool_new:N \l__mydoc_ch_change_bool
+
+\keys_define:nn { mydoc/changelog }
{
- { \ArgFont \seq_item:Nn \l__deriv_marg_args_seq {#1} }
+ version .tl_set:N = \l__mydoc_ch_version_tl,
+ version .default:n = \c_novalue_tl,
+
+ date .tl_set:N = \l__mydoc_ch_date_tl,
+ date .default:n = \c_novalue_tl,
+
+ beta .bool_set:N = \l__mydoc_ch_beta_bool,
+ beta .default:n = {false}
}
-\NewDocumentCommand{\macro}{ s m o }
+
+\let\mydoc_item:\item
+
+\DeclareDocumentCommand{\item}{ }
{
- \token_if_macro:NTF {#2}
+ \mydoc_item:
+ \bool_if:NT \l__mydoc_ch_change_bool
{
- \tl_set:Nf \l__deriv_tmp_tl { \cs_to_str:N #2 }
+ \tl_use:N \l__mydoc_ch_change_tl
+ \bool_set_false:N \l__mydoc_ch_change_bool
}
- {
- \tl_set:Nf \l__deriv_tmp_tl { \seq_item:Nn \l__deriv_declare_macros_seq {#2} }
- }
-
- { \MacroFont \cs{ \tl_use:N \l__deriv_tmp_tl } }
-
- \bool_if:nF {#1} { \exp_args:NV \__deriv_index:nn \l__deriv_tmp_tl { macro } }
+}
+
+\DeclareDocumentEnvironment{change}{ o }
+{
+ \IfNoValueTF{#1}
+ { \keys_set:nn { mydoc/changelog } { version, date, beta } }
+ { \keys_set:nn { mydoc/changelog } { version, date, beta, #1 } }
- \tl_if_novalue:nF {#3}
+ \mydoc_change_set:
+ \mydoc_change_begin:
+}
+{
+ \mydoc_change_end:
+}
+
+\cs_new_protected:Npn \mydoc_change_set:
+{
+ \bool_set_true:N \l__mydoc_ch_change_bool
+ \tl_set:Nn \l__mydoc_ch_change_tl
{
- \group_begin:
- \__deriv_macro_syntax:n {#3}
- \group_end:
+ \leavevmode
+ \marginline
+ {
+ \upshape \scriptsize \ttfamily
+ %\leavevmode
+ \null\vspace{-3.5\baselineskip}\null
+ \tabular[t]{ r }
+ \toprule
+ v\tl_use:N \l__mydoc_ch_version_tl
+ \\
+ \tl_use:N \l__mydoc_ch_date_tl
+ \bool_if:NT \l__mydoc_ch_beta_bool
+ { \\ \midrule \color{RoyalRed} Beta }
+ \\ \bottomrule
+ \endtabular
+ }
+ \ignorespaces
}
}
-\NewDocumentCommand{\DescribeMacro}{ s m m }
+\cs_new_protected:Npn \mydoc_change_begin:
{
- \__deriv_cs_to_str_seq:Nn \l__deriv_declare_macros_seq {#2}
- \bool_if:nTF {#1} {\noindent} { \__deriv_init: }
-
- \__deriv_index_def:Nn \l__deriv_declare_macros_seq { macro-def }
- \__deriv_marginpar_macro:NN \MacroFont \l__deriv_declare_macros_seq
- \__deriv_macro_syntax:n {#3} \hfill
- \__deriv_end_par:
+ \itemize
}
-\NewDocumentCommand{\DescribeArg}{ s m }
+\cs_new_protected:Npn \mydoc_change_end:
{
- \seq_set_from_clist:Nn \l__deriv_args_seq {#2}
- \bool_if:nTF {#1} {\noindent} { \__deriv_init: }
-
- \__deriv_marginpar:NN \ArgFont \l__deriv_args_seq
- \__deriv_end:
+ \enditemize
+ \let\item\mydoc_item:
}
-\NewDocumentCommand{\DescribeOption}{ s v o m }
+\NewDocumentEnvironment{changelog}{ }
{
- \seq_set_from_clist:Nn \l__deriv_keys_seq {#2}
- \bool_if:nTF {#1} {\noindent} { \__deriv_init: }
-
- \__deriv_index_def:Nn \l__deriv_keys_seq { option-def }
- \__deriv_marginpar:NN \OptionFont \l__deriv_keys_seq
- \__deriv_option_syntax:nn {#3} {#4}
- \__deriv_end_par:
+ \mydoc_ch_begin:
+}
+{
+ \mydoc_ch_end:
}
-\cs_new_protected:Npn \__deriv_cs_to_str_seq:Nn #1 #2
+\cs_new_protected:Npn \mydoc_ch_begin:
{
- \seq_clear:N #1
- \seq_set_from_clist:Nn \l_tmpa_seq {#2}
-
- \seq_map_inline:Nn \l_tmpa_seq
+}
+
+\cs_new_protected:Npn \mydoc_ch_end:
+{
+}
+
+
+
+\tl_new:N \l__mydoc_number_tl
+\tl_new:N \l_mydoc_index_item_tl
+\tl_new:N \l_mydoc_index_subitem_tl
+\tl_new:N \l_mydoc_index_entry_tl
+
+\seq_new:N \l__mydoc_macro_arg_seq
+
+\seq_new:N \l__mydoc_group_seq
+\seq_new:N \l__mydoc_type_seq
+\seq_new:N \l__mydoc_function_seq
+\seq_new:N \g__mydoc_syntax_seq
+\seq_new:N \l__deriv_earg_seq
+
+\int_new:N \l__mydoc_earg_int
+\int_new:N \l__mydoc_function_int
+\int_new:N \l__mydoc_option_int
+
+\bool_new:N \l__mydoc_number_bool
+
+\tl_set:Nn \l__mydoc_number_tl {0123456789}
+
+\seq_new:N \l__mydoc_example_seq
+\int_new:N \g__mydoc_example_int
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\cs_new_protected:Npn \mydoc_define_vars_keys:nnnn #1 #2 #3 #4
+{
+ \seq_set_from_clist:Nn \l__mydoc_group_seq {#4}
+ \seq_map_inline:Nn \l__mydoc_group_seq
{
- \exp_args:NNf \seq_put_right:Nn #1 { \cs_to_str:N ##1 }
+ \mydoc_define_var:nnnn {#1} {#2} {#3} {##1}
+ \mydoc_define_key:nnnn {#1} {#2} {#3} {##1}
}
}
-\cs_new_protected:Npn \__deriv_index_def:Nn #1 #2
+\cs_new_protected:Npn \mydoc_define_var:nnnn #1 #2 #3 #4
+{ \use:c { #3_new:c } { #2__mydoc_#1_#4_#3 } }
+
+\cs_new_protected:Npn \mydoc_define_key:nnnn #1 #2 #3 #4
{
- \str_case:nn {#2}
+ \str_if_eq:nnTF {#2} { g }
+ { \keys_define:nn { mydoc/#1 } { #4 .#3_#2set:c = { #2__mydoc_#1_#4_#3 } } }
+ { \keys_define:nn { mydoc/#1 } { #4 .#3_set:c = { #2__mydoc_#1_#4_#3 } } }
+}
+
+%\cs_new_protected:Npn \mydoc_define_inital:nnn #1 #2 #3
+%{ \keys_define:nn { mydoc/#1 } { #3 .initial:n = {#2} } }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\cs_new_protected:Npn \mydoc_set_keys:nn #1 #2
+{
+ \keys_set:nn { mydoc/#1 } {#2}
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\cs_new_protected:Npn \mydoc_define_font_i:n #1
+{
+ \mydoc_define_vars_keys:nnnn {#1} { l } { tl } { colour, family, shape, size }
+
+ \cs_new_protected:cpn { __mydoc_#1_font: }
{
- { macro-def } { \__deriv_index_macro_def:Nn #1 { macro } }
- { option-def } { \__deriv_index_option_def:Nn #1 { option } }
+ \color { \use:c { l__mydoc_#1_colour_tl } }
+ \tl_use:c { l__mydoc_#1_family_tl }
+ \tl_use:c { l__mydoc_#1_shape_tl }
+ \tl_use:c { l__mydoc_#1_size_tl }
}
}
-\cs_new_protected:Npn \__deriv_index:nn #1 #2
+\cs_new_protected:Npn \mydoc_define_font_ii:n #1
{
- \str_case:nn {#2}
+ \mydoc_define_vars_keys:nnnn {#1} { l } { tl } { colour, family, shape, size }
+ \mydoc_define_vars_keys:nnnn {#1} { l } { bool } { colourb, familyb, shapeb, sizeb }
+
+ \cs_new_protected:cpn { __mydoc_#1_font: }
{
- { option } { \__deriv_index_option:nn {#1} {#2} }
- { macro } { \__deriv_index_macro:nn {#1} {#2} }
+ \bool_if:cT { l__mydoc_#1_colourb_bool } { \color { \use:c { l__mydoc_#1_colour_tl } } }
+ \bool_if:cT { l__mydoc_#1_familyb_bool } { \tl_use:c { l__mydoc_#1_family_tl } }
+ \bool_if:cT { l__mydoc_#1_shapeb_bool } { \tl_use:c { l__mydoc_#1_shape_tl } }
+ \bool_if:cT { l__mydoc_#1_sizeb_bool } { \tl_use:c { l__mydoc_#1_size_tl } }
}
}
-\cs_new_protected:Npn \__deriv_index_macro_def:Nn #1 #2
+\cs_new_protected:Npn \mydoc_define_index:n #1
{
- \seq_map_inline:Nn #1
- { \index[#2]{##1@\protect{\CommonFont\cs{##1}}|textbf} }
+ \mydoc_define_vars_keys:nnnn {#1} { l } { bool } { index }
+ \mydoc_define_vars_keys:nnnn {#1} { l } { bool } { definition }
}
-\cs_new_protected:Npn \__deriv_index_option_def:Nn #1 #2
+
+\cs_new_protected:Npn \mydoc_define_default:n #1
{
- \seq_map_inline:Nn #1
+ \mydoc_define_vars_keys:nnnn {#1} { g } { clist } { default }
+ \mydoc_define_vars_keys:nnnn {#1} { l } { tl } { sepa }
+ \mydoc_define_vars_keys:nnnn {#1} { l } { tl } { sepb }
+ \mydoc_define_vars_keys:nnnn {#1} { l } { tl } { sepc }
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\cs_new_protected:Npn \mydoc_define_type:nn #1 #2
+{
+ \seq_set_from_clist:Nn \l__mydoc_type_seq {#2}
+ \seq_map_inline:Nn \l__mydoc_type_seq
{
- \seq_set_split:Nnn \l_tmpa_seq {-} {##1}
- \tl_set:Nx \l_tmpa_tl { \seq_item:Nn \l_tmpa_seq {1} }
- \index[#2]{{\l_tmpa_tl}!##1@\protect{\CommonFont##1}|textbf}
+ \str_case:nn {##1}
+ {
+ { font_i } { \mydoc_define_font_i:n {#1} }
+ { font_ii } { \mydoc_define_font_ii:n {#1} }
+ { index } { \mydoc_define_index:n {#1} }
+ { default } { \mydoc_define_default:n {#1} }
+ }
}
}
-\cs_new_protected:Npn \__deriv_index_macro:nn #1 #2
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\mydoc_define_type:nn { function } { font_i, index }
+\mydoc_define_type:nn { macro } { font_i, index }
+\mydoc_define_type:nn { syntax } { font_i }
+\mydoc_define_type:nn { argument } { font_i, }
+\mydoc_define_type:nn { arg } { font_i, }
+\mydoc_define_type:nn { option } { font_i, index }
+\mydoc_define_type:nn { key } { font_i, index }
+\mydoc_define_type:nn { values } { font_i, default }
+\mydoc_define_type:nn { val } { font_i }
+\mydoc_define_type:nn { example } { font_i }
+\mydoc_define_type:nn { marg } { font_ii }
+\mydoc_define_type:nn { narg } { font_ii }
+\mydoc_define_type:nn { oarg } { font_ii }
+\mydoc_define_type:nn { targ } { font_ii }
+\mydoc_define_type:nn { meta } { font_ii }
+\mydoc_define_type:nn { cs } { font_ii }
+
+\mydoc_set_keys:nn { function } { colour = RoyalRed, family = \ttfamily, shape = \upshape, size = \small, index = true, definition = true }
+\mydoc_set_keys:nn { macro } { colour = black, family = \ttfamily, shape = \upshape, size = \small, index = true, definition = false }
+\mydoc_set_keys:nn { syntax } { colour = black, family = \rmfamily, shape = \upshape, size = \small }
+\mydoc_set_keys:nn { argument } { colour = RoyalBlue, family = \rmfamily, shape = \upshape, size = \small }
+\mydoc_set_keys:nn { arg } { colour = black, family = \rmfamily, shape = \upshape, size = \small }
+\mydoc_set_keys:nn { option } { colour = RoyalGreen, family = \ttfamily, shape = \upshape, size = \small, index = true, definition = true }
+\mydoc_set_keys:nn { key } { colour = black, family = \ttfamily, shape = \upshape, size = \small, index = true, definition = false }
+\mydoc_set_keys:nn { values } { colour = black, family = \ttfamily, shape = \upshape, size = \small, default = \c_novalue_tl, sepa = { ,~}, sepb = { ,~}, sepc = { ,~} }
+\mydoc_set_keys:nn { val } { colour = black, family = \ttfamily, shape = \upshape, size = \small }
+\mydoc_set_keys:nn { example } { colour = black, family = \ttfamily, shape = \upshape, size = \small }
+\mydoc_set_keys:nn { marg } { colour = black, family = \ttfamily, shape = \upshape, size = \small, colourb = true, familyb = true, shapeb = true, sizeb = true }
+\mydoc_set_keys:nn { narg } { colour = black, family = \ttfamily, shape = \upshape, size = \small, colourb = true, familyb = true, shapeb = true, sizeb = true }
+\mydoc_set_keys:nn { oarg } { colour = black, family = \ttfamily, shape = \upshape, size = \small, colourb = true, familyb = true, shapeb = true, sizeb = true }
+\mydoc_set_keys:nn { targ } { colour = black, family = \ttfamily, shape = \upshape, size = \small, colourb = true, familyb = true, shapeb = true, sizeb = true }
+\mydoc_set_keys:nn { meta } { colour = black, family = \rmfamily, shape = \slshape, size = \small, colourb = true, familyb = true, shapeb = true, sizeb = true }
+\mydoc_set_keys:nn { cs } { colour = black, family = \rmfamily, shape = \upshape, size = \small, colourb = true, familyb = true, shapeb = true, sizeb = true }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\prg_new_protected_conditional:Npnn \mydoc_if_int:n #1 { T, F, TF }
{
- \index[#2]{#1@\protect{\CommonFont\cs{#1}}}
+ \tl_map_inline:Nn {#1}
+ {
+ \tl_if_in:NnTF \l__mydoc_number_tl {##1}
+ { \bool_set_true:N \l__mydoc_number_bool }
+ { \tl_map_break:n { \bool_set_false:N \l__mydoc_number_bool } }
+ }
+ \bool_if:NTF \l__mydoc_number_bool
+ { \prg_return_true: }
+ { \prg_return_false: }
}
-\cs_new_protected:Npn \__deriv_index_option:nn #1 #2
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\cs_new_protected:Npn \mydoc_vspace:n #1
{
- \seq_set_split:Nnn \l_tmpa_seq {-} {#1}
- \tl_set:Nx \l_tmpa_tl { \seq_item:Nn \l_tmpa_seq {1} }
- \index[#2]{{\l_tmpa_tl}!#1@\protect{\CommonFont#1}}
+ \vspace{#1\baselineskip}
}
-
-\cs_new_protected:Npn \__deriv_marginpar:NN #1 #2
+\cs_new_protected:Npn \mydoc_margin:n #1
{
\leavevmode
\marginline
{
\leavevmode
#1
- \seq_use:Nn #2 { \\ }
}
+ \ignorespaces
}
-\cs_new_protected:Npn \__deriv_marginpar_macro:NN #1 #2
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\cs_new_protected:Npn \__mydoc_function_begin:n #1
{
- \int_zero:N \l_tmpb_int
- \leavevmode
- \marginline
+ \par
+ \bool_if:NF {#1} { \mydoc_vspace:n { 0.3 } }
+ \@afterindentfalse \@afterheading
+}
+
+\cs_new_protected:Npn \__mydoc_function_end:
+{
+ \seq_gclear:N \g__mydoc_syntax_seq
+ \par \noindent \ignorespacesafterend
+}
+
+\cs_new_protected:Npn \__mydoc_function_margin:n #1
+{
+ \seq_set_from_clist:Nn \l__mydoc_function_seq {#1}
+ \int_zero:N \l__mydoc_function_int
+
+ \mydoc_margin:n
{
- \leavevmode
- #1
- \seq_map_inline:Nn #2
+ \__mydoc_function_font:
+ \seq_map_inline:Nn \l__mydoc_function_seq
{
- \cs{##1}
- \int_incr:N \l_tmpb_int
- \int_compare:nNnF { \l_tmpb_int } = { \seq_count:N #2 }
+ \int_incr:N \l__mydoc_function_int
+ \mydoc_cs_to_str:N ##1
+ \mydoc_index_cs:Nnn ##1 { function } { macro }
+ \int_compare:nNnF { \l__mydoc_function_int } = { \seq_count:N \l__mydoc_function_seq }
{ \\ }
}
}
}
-\cs_new_protected:Npn \__deriv_init:
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\cs_new_protected:Npn \__mydoc_syntax_begin:
+{ \ignorespaces }
+
+\cs_new_protected:Npn \mydoc_syntax:n #1
{
- \vspace{0.30\baselineskip}
- \noindent \ignorespaces
+ \seq_gset_from_clist:Nn \g__mydoc_syntax_seq {#1}
+
+ \__mydoc_syntax_font:
+ \seq_use:Nn \g__mydoc_syntax_seq { }
}
-\cs_new_protected:Npn \__deriv_end_par:
+\cs_new_protected:Npn \__mydoc_syntax_end:
+{ \par \mydoc_vspace:n { 0.2 } \noindent \ignorespacesafterend }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\cs_new_protected:Npn \__mydoc_argument_begin:n #1
{
\par
- \vspace{0.20\baselineskip}
- \noindent \ignorespaces
+ \bool_if:NF {#1} { \mydoc_vspace:n { 0.3 } }
+ \@afterindentfalse \@afterheading
}
-\cs_new_protected:Npn \__deriv_end:
+\cs_new_protected:Npn \__mydoc_argument_end:
{
- \noindent \ignorespaces
+ \par\noindent\ignorespacesafterend
}
-\cs_new_protected:Npn \__deriv_macro_syntax:n #1
+\cs_new_protected:Npn \__mydoc_argument_margin:n #1
{
- \seq_set_from_clist:Nn \l__deriv_marg_args_seq { #1 }
-
- \group_begin:
- \CommonFontsize
- \seq_use:Nn \l__deriv_marg_args_seq {}
- \group_end:
+ \mydoc_margin:n
+ {
+ \mydoc_set_keys:nn { marg } { colourb = false, familyb = false, shapeb = false, sizeb = false }
+ \mydoc_set_keys:nn { narg } { colourb = false, familyb = false, shapeb = false, sizeb = false }
+ \mydoc_set_keys:nn { oarg } { colourb = false, familyb = false, shapeb = false, sizeb = false }
+ \mydoc_set_keys:nn { targ } { colourb = false, familyb = false, shapeb = false, sizeb = false }
+ \mydoc_set_keys:nn { meta } { colourb = false, familyb = true, shapeb = true, sizeb = false }
+ \mydoc_set_keys:nn { cs } { colourb = false, familyb = false, shapeb = false, sizeb = false }
+ \__mydoc_argument_font:
+ \mydoc_if_int:nTF {#1}
+ { \seq_item:Nn \g__mydoc_syntax_seq {#1} }
+ { #1 }
+ }
}
-\cs_new_protected:Npn \__deriv_option_syntax:nn #1 #2
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\cs_new_protected:Npn \__mydoc_option_begin:n #1
{
- \__deriv_set_option_seq:Nn \l__deriv_opt_seq {#2}
-
- \seq_use:Nn \l__deriv_opt_seq { ,~}
-
- \hfill
- \tl_if_novalue:nF {#1}
- {
- \__deriv_set_option_seq:Nn \l__deriv_def_opt_seq {#1}
- \seq_use:Nn \l__deriv_def_opt_seq { ,~}
- }
+ \par
+ \bool_if:NF {#1} { \mydoc_vspace:n { 0.3 } }
+ \@afterindentfalse \@afterheading
}
-\cs_new_protected:Npn \__deriv_set_option_seq:Nn #1 #2
+\cs_new_protected:Npn \__mydoc_option_end:
{
- \seq_set_from_clist:Nn \l__deriv_tmp_seq {#2}
- \seq_clear:N #1
+ \seq_clear:N \l__mydoc_option_seq
+ \par \noindent \ignorespacesafterend
+}
+
+\cs_new_protected:Npn \__mydoc_option_margin:n #1
+{
+ \seq_set_from_clist:Nn \l__mydoc_option_seq {#1}
+ \int_zero:N \l__mydoc_option_int
- \seq_map_inline:Nn \l__deriv_tmp_seq
+ \mydoc_margin:n
{
- \tl_if_head_eq_charcode:nNTF {##1} !
- {
- \seq_put_right:Nn #1 { { \CommonFontsize \tl_tail:n {##1} } }
- }
+ \__mydoc_option_font:
+ \seq_map_inline:Nn \l__mydoc_option_seq
{
- \seq_put_right:Nn #1 { \val{##1} }
+ \int_incr:N \l__mydoc_option_int
+ ##1
+ \mydoc_index_key:nnn {##1} { option } { option }
+ \int_compare:nNnF { \l__mydoc_option_int } = { \seq_count:N \l__mydoc_option_seq }
+ { \\ }
}
}
}
-\DeclareRobustCommand\meta[1]{%
- \ensuremath\langle
- \ifmmode \expandafter \nfss@text \fi
- {%
- \meta@font@select
- \edef\meta@hyphen@restore
- {\hyphenchar\the\font\the\hyphenchar\font}%
- \hyphenchar\font\m@ne
- \language\l@nohyphenation
- #1\/%
- \meta@hyphen@restore
- }\ensuremath\rangle
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\cs_new_protected:Npn \__mydoc_values_begin:
+{ \ignorespaces }
+
+\cs_new_protected:Npn \mydoc_values:n #1
+{
+ \seq_gset_from_clist:Nn \g__mydoc_values_seq {#1}
+
+ \__mydoc_values_font:
+ \seq_use:Nn \g__mydoc_values_seq { ,~}
+
+ \exp_args:Nf \tl_if_novalue:nF { \clist_item:Nn \g__mydoc_values_default_clist { 1 } }
+ {
+ \hfill
+ \mydoc_clist_use:n { values }
+ }
}
-\def\meta@font@select{\itshape}
-\DeclareRobustCommand\cs[1]{{\CommonFont \char`\\#1}}
-\NewDocumentCommand{\marg}{ s m }
+\cs_new_protected:Npn \mydoc_clist_use:n #1
{
- \bool_if:NTF {#1}
- { {\ttfamily\char`\{} { \CommonFontfamily #2 } {\ttfamily\char`\}} }
- { {\ttfamily\char`\{} \meta{#2} {\ttfamily\char`\}} }
+ \clist_use:cnnn { g__mydoc_#1_default_clist }
+ { \tl_use:c { l__mydoc_#1_sepa_tl } }
+ { \tl_use:c { l__mydoc_#1_sepb_tl } }
+ { \tl_use:c { l__mydoc_#1_sepc_tl } }
}
-\providecommand\oarg[1]{%
- {\ttfamily[}\meta{#1}{\ttfamily]}}
-\let\garg\marg
+\cs_new_protected:Npn \__mydoc_values_end:
+{ \par \mydoc_vspace:n { 0.2 } \noindent \ignorespacesafterend }
-\providecommand\targ[1]{
- {\ttfamily #1}}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\providecommand{\sarg}{ \targ{*} }
+\NewDocumentEnvironment{example}{ s o b }
+{ \__mydoc_example_begin:nn {#1} {#3} }
+{ \__mydoc_example_end: }
-\seq_new:N \l__deriv_earg_seq
+\cs_new_protected:Npn \__mydoc_example_begin:nn #1 #2
+{
+ \seq_set_split:Nnn \l__deriv_example_seq { \\ } {#2}
+ \bool_if:nTF {#1}
+ {
+ \center \tabular{ @{} c @{} }
+ \__mydoc_example_content:Nnn \l__deriv_example_seq { \\[0.5em] } { \qquad }
+ }
+ {
+ \center \tabular{ @{} r c l @{} }
+ \__mydoc_example_content:Nnn \l__deriv_example_seq { & } { $ & $ }
+ }
+}
-\NewDocumentCommand{\earg}{ m }
+\cs_new_protected:Npn \__mydoc_example_content:Nnn #1 #2 #3
{
- \seq_set_from_clist:Nn \l__deriv_earg_seq {#1}
-
- \int_zero:N \l_tmpa_int
- \seq_map_inline:Nn \l__deriv_earg_seq
+ \int_gzero:N \g__mydoc_example_int
+ \seq_map_inline:Nn #1
{
- \int_incr:N \l_tmpa_int
- \int_if_odd:nTF \l_tmpa_int
- {
- { \ttfamily ##1 }
- }
- {
- \marg{ ##1 }
- }
+ \int_gincr:N \g__mydoc_example_int
+ \__mydoc_example_font:
+ \__mydoc_print:n {##1}
+ #2
+ $\Longrightarrow #3 \displaystyle ##1 $
+ \int_compare:nNnF { \g__mydoc_example_int } = { \seq_count:N #1 }
+ { \\ \addlinespace[0.5em] }
}
}
-\NewDocumentCommand{\key}{ s m o o }
+\cs_new_protected:Npn \__mydoc_example_end:
+{
+ \endtabular
+ \endcenter
+}
+
+\tl_new:N \l__mydoc_print_tmp_tl
+\cs_new_protected:Npn \__mydoc_print:n #1
+{
+ \tl_set:Nn \l__mydoc_print_tmp_tl {#1}
+ \regex_replace_all:nnN { . } { \c{string} \0 } \l__mydoc_print_tmp_tl
+ \tl_use:N \l__mydoc_print_tmp_tl
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\NewDocumentEnvironment{function}{ s o m }
+{
+ \tl_if_novalue:nF {#2} { \mydoc_set_keys:nn { function } {#2} }
+ \__mydoc_function_begin:n {#1}
+ \__mydoc_function_margin:n {#3}
+}
+{
+ \__mydoc_function_end:
+}
+
+\NewDocumentEnvironment{syntax}{ o b }
+{
+ \tl_if_novalue:nF {#1} { \mydoc_set_keys:nn { syntax } {#1} }
+ \__mydoc_syntax_begin:
+ \mydoc_syntax:n {#2}
+}
+{
+ \__mydoc_syntax_end:
+}
+
+\NewDocumentEnvironment{argument}{ s o m }
+{
+ \tl_if_novalue:nF {#2} { \mydoc_set_keys:nn { argument } {#2} }
+ \__mydoc_argument_begin:n {#1}
+ \__mydoc_argument_margin:n {#3}
+}
+{
+ \__mydoc_argument_end:
+}
+
+\NewDocumentEnvironment{option}{ s o m }
+{
+ \tl_if_novalue:nF {#2} { \mydoc_set_keys:nn { option } {#2} }
+ \__mydoc_option_begin:n {#1}
+ \__mydoc_option_margin:n {#3}
+}
+{
+ \__mydoc_option_end:
+}
+
+\NewDocumentEnvironment{values}{ o b }
+{
+ \tl_if_novalue:nF {#1} { \mydoc_set_keys:nn { values } {#1} }
+ \__mydoc_values_begin:
+ \mydoc_values:n {#2}
+}
+{
+ \__mydoc_values_end:
+}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\NewDocumentCommand{\default}{ s O{values} }
{
- { \KeyFont #2 }
- \bool_if:nF {#1}{ \__deriv_index:nn {#2} {option} }
- \IfNoValueF{#3}{ { \KeyFont - } \meta{#3} }
- \IfNoValueF{#4}{ { \KeyFont - } \meta{#4} }
+ \group_begin:
+ \mydoc_default:nn {#1} {#2}
+ \group_end:
}
-\NewDocumentCommand{\keyval}{ s m m }
+\cs_new_protected:Npn \mydoc_default:nn #1 #2
+{
+ \bool_if:nTF {#1}
+ { \clist_use:cnnn { g__mydoc_#2_default_clist } {~and~} { ,~} {~and~} }
+ { \clist_use:cn { g__mydoc_#2_default_clist } { ,~} }
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\NewDocumentCommand{\macro}{ o m o }
{
\group_begin:
- \seq_set_from_clist:Nn \l__deriv_value_seq {#3}
- \int_compare:nNnTF { \seq_count:N \l__deriv_value_seq } = { 1 }
+ \tl_if_novalue:nF {#1} { \mydoc_set_keys:nn { macro } { #1 } }
+ \mydoc_macro:nn {#2} {#3}
+ \group_end:
+}
+
+\cs_new_protected:Npn \mydoc_macro:nn #1 #2
+{
+ \__mydoc_macro_font:
+ \mydoc_if_int:nTF {#1}
+ {
+ \tl_set:Nx \l__mydoc_marg_tl { \seq_item:Nn \l__mydoc_function_seq {#1} }
+ \mydoc_cs_to_str:x { \seq_item:Nn \l__mydoc_function_seq {#1} }
+ \exp_args:NV \mydoc_index_cs:Nnn \l__mydoc_marg_tl { macro } { macro }
+ }
{
- \KeyFont #2
- \bool_if:nF {#1}{ \__deriv_index:nn {#2} {option} }
- = \ValFont \seq_use:Nn \l__deriv_value_seq {,}
+ \mydoc_cs_to_str:N #1
+ \mydoc_index_cs:Nnn #1 { macro } { macro }
}
+ \tl_if_novalue:nF {#2}
{
- \KeyFont #2
- \bool_if:nF {#1}{ \__deriv_index:nn {#2} {option} }
- = \ValFont \{ \seq_use:Nn \l__deriv_value_seq {,} \}
+ \seq_set_from_clist:Nn \l__mydoc_macro_arg_seq {#2}
+ \seq_map_function:NN \l__mydoc_macro_arg_seq \mydoc_arg:n
}
+}
+
+\RenewDocumentCommand{\arg}{ o m }
+{
+ \group_begin:
+ \mydoc_arg:n {#2}
\group_end:
}
-\NewDocumentCommand{\val}{ m }
+\cs_new_protected:Npn \mydoc_arg:n #1
{
- { \ValFont #1 }
+ \__mydoc_arg_font:
+ \mydoc_if_int:nTF {#1}
+ { \seq_item:Nn \g__mydoc_syntax_seq {#1} }
+ { #1 }
}
-\NewDocumentCommand{\CommonFontsize}{ }{ \small }
+\NewDocumentCommand{\key}{ o m }
+{
+ \group_begin:
+ \tl_if_novalue:nF {#1} { \mydoc_set_keys:nn { key } {#1} }
+ \mydoc_key:n {#2}
+ \group_end:
+}
-\NewDocumentCommand{\CommonFontfamily}{ }{ \ttfamily }
+\NewDocumentCommand{\val}{ o m }
+{
+ \group_begin:
+ \tl_if_novalue:nF {#1} { \mydoc_set_keys:nn { val } {#1} }
+ \mydoc_val:n {#2}
+ \group_end:
+}
-\NewDocumentCommand{\CommonFont}{ }{ \CommonFontsize\CommonFontfamily }
+\NewDocumentCommand{\keyval}{ o m m }
+{
+ \group_begin:
+ \tl_if_novalue:nF {#1} { \mydoc_set_keys:nn { key } {#1} }
+ \mydoc_keyval:nn {#2} {#3}
+ \group_end:
+}
-\NewDocumentCommand{\PackageFont}{ }{ \small \sffamily }
+\cs_new_protected:Npn \mydoc_key:n #1
+{
+ \__mydoc_key_font:
+ #1
+ \mydoc_index_key:nnn {#1} { key } { option }
+}
-\NewDocumentCommand{\KeyFont}{ }{ \CommonFont }
+\cs_new_protected:Npn \mydoc_val:n #1
+{
+ \__mydoc_key_font:
+ #1
+}
-\NewDocumentCommand{\ValFont}{ }{ \CommonFont }
+\cs_new_protected:Npn \mydoc_keyval:nn #1 #2
+{
+ \group_begin:
+ \mydoc_key:n {#1}
+ =
+ \mydoc_val:n {#2}
+ \group_end:
+}
-\NewDocumentCommand{\EksFont}{ }{ \CommonFont }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\NewDocumentCommand{\OptionFont}{ }{ \CommonFont \color{RoyalGreen} }
+\cs_new_protected:Npn \mydoc_index_cs:Nnn #1 #2 #3
+{
+ \tl_set:Nf \l_mydoc_index_item_tl { \cs_to_str:N #1 }
+ \tl_set:Nx \l_mydoc_index_entry_tl { \cstostr{#1} }
+
+ \bool_if:cT { l__mydoc_#2_index_bool }
+ {
+ \bool_if:cTF { l__mydoc_#2_definition_bool }
+ { \mydoc_index:VVnn \l_mydoc_index_item_tl \l_mydoc_index_entry_tl {#3} { textbf } }
+ { \mydoc_index:VVnn \l_mydoc_index_item_tl \l_mydoc_index_entry_tl {#3} { textnormal } }
+ }
+}
-\NewDocumentCommand{\MacroFont}{ }{ \CommonFont \color{RoyalRed} }
+\cs_new_protected:Npn \mydoc_index_key:nnn #1 #2 #3
+{
+ \seq_set_split:Nnn \l__mydoc_index_seq { - } {#1}
+ \tl_set:Nx \l_mydoc_index_item_tl { \seq_item:Nn \l__mydoc_index_seq {1} }
+ \tl_set:Nx \l_mydoc_index_subitem_tl {#1}
+ \tl_set:Nx \l_mydoc_index_entry_tl {#1}
+
+ \bool_if:cT { l__mydoc_#2_index_bool }
+ {
+ \bool_if:cTF { l__mydoc_#2_definition_bool }
+ { \mydoc_index:VVVnn \l_mydoc_index_item_tl \l_mydoc_index_subitem_tl \l_mydoc_index_entry_tl {#3} { textbf } }
+ { \mydoc_index:VVVnn \l_mydoc_index_item_tl \l_mydoc_index_subitem_tl \l_mydoc_index_entry_tl {#3} { textnormal } }
+ }
+}
-\NewDocumentCommand{\ArgFont}{ }{ \small \color{RoyalBlue} }
+\cs_new_protected:Npn \mydoc_index:nnnn #1 #2 #3 #4
+{
+ \index[#3]{#1@\protect{#2}|#4}
+}
-\NewDocumentCommand{\VerbFont}{ }{ \CommonFont }
+\cs_new_protected:Npn \mydoc_index:nnnnn #1 #2 #3 #4 #5
+{
+ \index[#4]{#1!#2@\protect{#3}|#5}
+}
+\cs_generate_variant:Nn \mydoc_index:nnnnn { VVV }
+\cs_generate_variant:Nn \mydoc_index:nnnn { VV }
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\NewDocumentCommand{\tsb}{ m }{ \textsubscript{#1} }
+
+\NewDocumentCommand{\meta}{ m }
+{
+ \ensuremath{\langle}
+ \group_begin:
+ \__mydoc_meta_font:
+ #1
+ \group_end:
+ \ensuremath{\rangle}
+}
+
+\NewDocumentCommand{\marg}{ m }
+{
+ \group_begin:
+ \mydoc_marg:n {#1}
+ \group_end:
+}
+\NewDocumentCommand{\narg}{ m }
+{
+ \group_begin:
+ \mydoc_narg:n {#1}
+ \group_end:
+}
+\NewDocumentCommand{\oarg}{ m }
+{
+ \group_begin:
+ \mydoc_oarg:n {#1}
+ \group_end:
+}
+\NewDocumentCommand{\earg}{ m }
+{
+ \group_begin:
+ \mydoc_earg:n {#1}
+ \group_end:
+}
+\NewDocumentCommand{\targ}{ m }
+{
+ \group_begin:
+ \mydoc_targ:n {#1}
+ \group_end:
+}
+\NewDocumentCommand{\sarg}{ }
+{
+ \group_begin:
+ \mydoc_sarg:
+ \group_end:
+}
+\NewDocumentCommand{\cs}{ m }
+{
+ \group_begin:
+ \mydoc_cs:n {#1}
+ \group_end:
+}
-\NewDocumentCommand{\pkg}{ s m }
+\cs_new:Npn \mydoc_marg:n #1
{
- \IfBooleanTF{ #1 }
- { { \PackageFont #2.sty } }
- { { \PackageFont #2 } }
+ \__mydoc_marg_font:
+ \mydoc_arg_delim_format:n { \{ }
+ \meta{#1}
+ \mydoc_arg_delim_format:n { \} }
+}
+
+\cs_new:Npn \mydoc_narg:n #1
+{
+ \__mydoc_narg_font:
+ \mydoc_arg_delim_format:n { \{ }
+ #1
+ \mydoc_arg_delim_format:n { \} }
+}
+
+\cs_new:Npn \mydoc_oarg:n #1
+{
+ \__mydoc_oarg_font:
+ \mydoc_arg_delim_format:n { [ }
+ \meta{#1}
+ \mydoc_arg_delim_format:n { ] }
+}
+
+\cs_new:Npn \mydoc_earg:n #1
+{
+ \seq_set_from_clist:Nn \l__deriv_earg_seq {#1}
+ \int_zero:N \l__mydoc_earg_int
+ \seq_map_inline:Nn \l__deriv_earg_seq
+ {
+ \int_incr:N \l__mydoc_earg_int
+ \int_if_odd:nTF \l__mydoc_earg_int
+ { \mydoc_arg_delim_format:n {##1} }
+ { \mydoc_marg:n {##1} }
+ }
}
-\NewDocumentCommand{\mypackage}{ }
+\cs_new:Npn \mydoc_targ:n #1
{
- \pkg{\pakkenavn}
+ \__mydoc_targ_font:
+ \mydoc_arg_delim_format:n {#1}
}
-\NewDocumentCommand{\tsb}{ m }
+\cs_new:Npn \mydoc_sarg:
+{ \mydoc_targ:n { * } }
+
+\cs_new:Npn \mydoc_cs:n #1
{
- \textsubscript{#1}
+ \__mydoc_cs_font:
+ \mydoc_arg_delim_format:n { \\#1 }
}
-\NewDocumentCommand{\tcf}{ }
+
+\cs_new:Npn \mydoc_arg_delim_format:n #1
{
- \textasciicircum
+ \group_begin:
+ \ttfamily \char` #1
+ \group_end:
}
-\seq_new:N \l__low_seq
\NewDocumentCommand{\low}{ O{0,0} m m }
{
@@ -599,46 +1068,25 @@
\group_end:
}
-\NewDocumentCommand{\uni}{} % Kræver unicode
-{ \textsuperscript{\texttt{U}} }
+\cs_new_protected:Npn \mydoc_cs_to_str:N #1
+{ \char` \\ \cs_to_str:N #1 }
-\NewDocumentCommand{\pdf}{} % Kræver pdflatex
-{ \textsuperscript{\texttt{P}} }
+\cs_new_protected:Npn \mydoc_cs_to_str:n #1
+{ \char` \\ \cs_to_str:N #1 }
+\cs_generate_variant:Nn \mydoc_cs_to_str:n { x }
-\NewDocumentCommand{\req}{} % Kræver pakke
-{ \textsuperscript{\texttt{R}} }
+\NewDocumentCommand{\cstostr}{ m }
+{ \mydoc_cs_to_str:N #1 }
-\NewDocumentCommand{\tex}{}{\texorpdfstring{\hologo{TeX}}{TeX}}
-\NewDocumentCommand{\pdftex}{}{\texorpdfstring{\hologo{pdfTeX}}{pdfTeX}}
-\NewDocumentCommand{\luatex}{}{\texorpdfstring{\hologo{LuaTeX}}{LuaTeX}}
-\NewDocumentCommand{\xetex}{}{\texorpdfstring{\hologo{XeTeX}}{XeTeX}}
-\NewDocumentCommand{\latex}{ t2 t3 }
-{
- \bool_if:nTF {#1}
- { \texorpdfstring{\hologo{LaTeX2e}}{LaTeX2e} }
- {
- \bool_if:nTF {#2}
- { \texorpdfstring{\hologo{LaTeX3}}{LaTeX3} }
- { \LaTeX }
- }
-}
-
-\NewDocumentCommand{\ket}{ m }
-{
- \lvert #1 \rangle
-}
-
-\mathitalicsmode=1
-
-\ExplSyntaxOff
\makeatother
+\ExplSyntaxOff
\Pakkenavn{derivative}
\Titel{The \pakkenavn{} package}
\Forfatter{Simon Jensen}
\Email{sjelatex@gmail.com}
-\Dato{2019-07-21}
-\Version{v0.9}
+\Dato{2019-09-18}
+\Version{v0.95}
\hypersetup
{
@@ -661,398 +1109,676 @@
\indexsetup{level = \subsection*, noclearpage = true, toclevel = subsection}
-\begin{document}
-
-\forside
-
-\clearpage
-\tableofcontents
-
-\clearpage
-\section{Introduction}
-This is a beta version meaning that some elements might be changed in the official release. Using this package in its current state is therefore on your own risk. An update will be made before the official release explaining what will be changed and what impact this might cause.
-
-This package started as a personnel package a few years ago that I used in various projects. Firstly, it was written in \tex and \latex, which gave rise to various errors as the complexity of the package grew larger and ended up as a spaghetti code. Therefore, the code was rewritten into the \latex3 language and may now be easily maintained. Originally this package was written because there did not exist any great package for derivatives. It was first much later that I discovered the \pkg{diffcoeff} package, which does a good job. However, at this time, I had already written much of the code with no documentation. I decided to write one and make it into a package for the public.
-
-As a note on terminology, I use the wording \emph{infinitesimal} and abbreviated as \texttt{inf} for the operator symbol $d, \partial, \delta$ etc. used in various derivatives like $\odv{y}{x}, \pdv{y}{x}, \fdv{y}{x}$ etc. Moreover I explicitly use \emph{differential d} for $d$ and \emph{partial} for $\partial$. In the description of macros and options, I often write \emph{cs-\meta{placeholder}} to denote a comma-separated list of \meta{placeholder}. For example, \oarg{cs-orders} is used in the partial derivative's description to denote the order differentiation and is read as a comma-separated list of orders. It should also be noted that whenever an argument reads \meta{key=value}, it means that it is a comma-separated list of key-value pairs.
-
-
-\clearpage
-\section{Ordinary derivative}
-
-\DescribeMacro*{\odv}{ \sarg, \oarg{order}, \marg{function}, \targ{/}, \marg{variable}, \earg{\_,{point\tsb{1}},\tcf,{point\tsb{2}}} }
-The ordinary derivative \macro{1} is defined with a set of mandatory and optional arguments that either typeset specific parts or changing the style of the derivative. In this package, the ordinary derivative is defined with an upright lowercase d, because it is used by many nowadays books, as
-
-\begin{definition}
- \DeclareOdvVariant{\odv}{d}[style-inf=\mathrm]%\marginnote{\pdftex\\\xetex, \luatex}%
- \DeclareOdvVariant{\odv}{d}[style-inf=\symup]
-\end{definition}
-
-\DescribeArg*{\arg{1}}
-The first argument of \macro{1} is an optional star that determines where the function is typeset; either in the numerator of the fraction or next to the fraction. Using the option \keyval{switch-*}{false}, the function is typeset in the numerator when the star is absent, and next to the fraction when the star is present as shown below
-
-\eks{ \odv{y}{x} ; \odv*{y}{x} }
-
-\noindent The effect of the star's presence can be switched around using \keyval{switch-*}{true} i.e. the equations in the above example are exchanged, as described in \cref{ssec:odv_options}.
-
-\DescribeArg{\arg{2}}
-The second argument is optional and is written inside square brackets. This argument is used to set the order of differentiation as seen below
-
-\eks{ \odv[2]{y}{x} ; \odv[n]{y}{x} ; \odv[n+2]{y}{x} }
+\def\indexspace{}
-\noindent The order may be a number, a symbol and a combination hereof, because it is simply typeset there. This is different from how the partial derivative's mixed order is typeset, which is computed. The order \textit{is not} automatically sorted as the mixed order for the partial derivative. This argument is subject to change, see \cref{consid:order2keyval} for more information.
-
-\DescribeArg{\arg{3}}
-This is the first mandatory argument that typeset the function that is to be differentiated
-
-\eks{ \odv{f(x)}{x} ; \odv{e^{\sin(x)}}{x} }
-
-\noindent The function is simply typeset in the numerator or next to the fraction.
-
-\DescribeArg{\arg{4}}
-The fourth argument is an optional slash written \emph{between the function and the variable} and determines which fraction style the derivative is typeset with, as described in \cref{ssec:odv_options}. Using the option \keyval{switch-/}{false} and the package's default settings, the derivative is typeset with \cs{frac} when the slash is absent, and \cs{slashfrac}\footnote{which is a macro defined by the package, see \cref{ssec:slashfrac} for more information.\label{foot:sfrac}} when the slash is present, as shown below
-
-\eks{ \odv{y}{x} ; \odv{y}/{x} }
-
-\noindent As for the star argument, the effect of the slash's presence can be switched around using \keyval{switch-/}{true} i.e. the equations in the above example are exchanged, as described in \cref{ssec:odv_options}.
-
-\DescribeArg{\arg{5}}
-This is the second and final mandatory argument, which purpose is to typeset the variable in which the function is differentiated with respect to as shown below
-
-\eks{ \odv{f}{x} ; \odv{f}{y} }
-
-\noindent The variable is always typeset in the denominator.
-
-\DescribeArg{\arg{6}}
-This is the last optional argument that specifies the point(s) of evaluation. It is an \emph{e-type} argument in the \pkg{xparse} language and given as \verb|e{_^}|. This means that the subscript \verb|_| and superscript \verb|^| accepts an argument given in braces. Moreover, the order of \verb|_| and \verb|^| is independent as shown below
-
-\eks{ \odv{y}{x}_{x_1} ; \odv{y}{x}^{x_2} ; \odv{y}{x}_{x_1}^{x_2} ; \odv{y}{x}^{x_2}_{x_1} }
-
-The common way to specify the point of evaluation is using the subscript argument. If needed, the second point of evaluation can be specified with the superscript argument.
-
-\subsection{Variants}
-This package offers four variants of the ordinary derivative: Material derivative \macro{\mdv}, functional derivative \macro{\fdv}, the average rate of change \macro{\adv} and the Jacobian \macro{\jdv}. A unique feature of this package, is that you can define your own variants of the ordinary derivative as described in \cref{ssec:CreateOdvVariant}.
-
-\DescribeMacro{\mdv}{ \sarg, \oarg{order}, \marg{function}, \targ{/}, \marg{variable}, \earg{\_,{point\tsb{1}},\tcf,{point\tsb{2}}} }
-The material derivative is used in some branches of physics (e.g. thermodynamic, fluid dynamic etc.). It is only natural for a physics student as me to define such a variant, that used an upright uppercase D. In this package, the material derivative is defined as
-
-\begin{definition}
- \DeclareOdvVariant{\mdv}{D}[style-inf=\mathrm]%\marginnote{\pdftex\\\xetex, \luatex}%
- \DeclareOdvVariant{\mdv}{D}[style-inf=\symup]
-\end{definition}
-
-\noindent In physics, the material derivative is defined by
-\begin{equation*}
- \mdv{ \varphi(\symbf{r}, t) }{ t } \coloneq \pdv{ \varphi(\symbf{r}, t) }{ t } + \dot{\symbf{r}} \cdot \nabla \varphi(\symbf{r}, t)
-\end{equation*}
-
-\DescribeMacro{\fdv}{ \sarg, \oarg{order}, \marg{function}, \targ{/}, \marg{variable}, \earg{\_,{point\tsb{1}},\tcf,{point\tsb{2}}} }
-The functional derivative is used in the calculus of variation and uses a lowercase delta. With the package's default settings, it will use an italic delta. In this package, the functional derivative is defined as
-
-\begin{definition}
- \DeclareOdvVariant{\fdv}{\delta}%\marginnote{\pdftex, \xetex, \luatex}%
-\end{definition}
-
-\noindent In physics, it is for example used in the Lagrange equation or in the derivation of the Hartree-Fock equation
-\begin{equation*}
- \fdv{I}{q_{\alpha}} = \pdv{L}{q_{\alpha}} - \odv*{ \pdv{L}{ \dot{q}_{\alpha} } } { t } = 0, \qquad \fdv{ \symcal{L} }{ \psi_{n}^* } = \hat{F} \ket{\psi_{n}} - \epsilon_{n} \ket{\psi_{n}} = 0
- ,
-\end{equation*}
-respectively.
-
-\DescribeMacro{\adv}{ \sarg, \oarg{order}, \marg{function}, \targ{/}, \marg{variable}, \earg{\_,{point\tsb{1}},\tcf,{point\tsb{2}}} }
-The average rate of change is defined to use an upright uppercase delta with the packages default settings. In this package, the average rate of change is defined as
-
-\begin{definition}
- \DeclareOdvVariant{\adv}{\Delta}[style-inf=\mathrm]%\marginnote{\pdftex\\\xetex, \luatex}%
- \DeclareOdvVariant{\adv}{\Delta}
-\end{definition}
-
-\noindent The average rate of change is used to determine the slope of a straight line
-\begin{equation*}
- \adv{ y }{ x } = \frac{y_2- y_1}{x_2 - x_1}
-\end{equation*}
-
-\DescribeMacro{\jdv}{ \sarg, \oarg{order}, \marg{function}, \targ{/}, \marg{variable}, \earg{\_,{point\tsb{1}},\tcf,{point\tsb{2}}} }
-The Jacobian is defined to use an italic partial differential with the package's default settings. Also a pair of parentheses is automatically inserted around the function and variable. In this package, the Jacobian is defined as
-
-\begin{definition}
- \DeclareOdvVariant{\jdv}{\partial}[add-delims={fun,var}]%\marginnote{\pdftex, \xetex, \luatex}%
-\end{definition}
-
-\noindent which gives
-\begin{equation*}
- \jdv{f,g,h}{x,y,z}
-\end{equation*}
-
-
-\clearpage
-\section{Partial derivative}
-
-\DescribeMacro*{\pdv}{ \sarg, \oarg{cs-orders}, \oarg{mixed order}, \marg{function}, \targ{/}, \marg{cs-variables}, \earg{\_,{point\tsb{1}},\tcf,{point\tsb{2}}} }
-The partial derivative \macro{1} is defined with a set of mandatory and optional arguments that either typeset specific parts or changing the style of the derivative. In this package, the partial derivative is defined with an italic partial differential as
-
-\begin{definition}
- \DeclarePdvVariant{\pdv}{\partial}[sep-inf-ord=1, sep-ord-fun=-2]%\marginnote{\pdftex, \xetex, \luatex}%
-\end{definition}
-
-\DescribeArg*{\arg{1}}
-The first argument of \macro{1} is an optional star that determines where the function is typeset; either in the numerator of the fraction or next to the fraction. Using the
-option \keyval{switch-*}{false}, the function is typeset in the numerator when the star is absent, and next to the fraction when the star is present as shown below
-
-\eks{ \pdv{f}{x,y} ; \pdv*{f}{x,y} }
-
-\noindent The effect of the star's presence can be switched around using \keyval{switch-*}{true} i.e. the equations in the above example are exchanged, as described in \cref{ssec:pdv_options}.
-
-\DescribeArg{\arg{2}}
-The second argument is optional and is written inside square brackets. This argument is used to set the order of differentiation for each of the variables and should be given in a comma-separated list e.g. \texttt{[1,2,3]} as shown below
-
-\eks{ \pdv[2,3]{f}{x,y} ; \pdv[\beta,a,n+2a]{f}{x,y,z} ; \pdv[2,n^2,n^2-1]{f}{x,y,z} }
-
-The orders may consist numbers, symbols and a combination hereof. Notice, that the mixed order is automatically calculated and sorted based on the variables orders by the package. See \cref{ssec:pdv_options,ssec:overall_order} for more information. This argument is subject to change, see \cref{consid:order2keyval} for more information.
-
-\DescribeArg{\arg{3}}
-If you, unfortunately, come to the conclusion, that you are unsatisfied with how the package typeset the mixed order or if it gives a wrong result, then you can overwrite it with this argument. The use of this argument completely bypass the automatic calculation and sorting done by the package, and simply typeset the mixed order as you wrote it as shown below
-
-\eks{ \pdv[4n+2k, 3k+n]{ f(x,y) }{ x,y } ; \pdv[4n+2k, 3k+n][5(n+k)]{ f(x,y) }{ x,y } }
-
-\noindent This argument is also subject to change, see \cref{consid:RemoveMixedOrder} for more information.
-
-\DescribeArg{\arg{4}}
-This is the first mandatory argument that typeset the function that is to be partially differentiated as shown below
-
-\eks{ \pdv{ f(x,y,z) }{ x, y, z } ; \pdv{ e^x \sin(y) \ln(z) }{ x, y, z } }
-
-\noindent The function is simply typeset in the numerator or next to the fraction.
-
-\DescribeArg{\arg{5}}
-The fifth argument is an optional slash written \emph{between the function and the variables} and determines which fraction style the derivative is typeset with, as described in \cref{ssec:pdv_options}. Using the option \keyval{switch-/}{false} and the package's default settings, the derivative is typeset with \cs{frac} when the slash is absent and \cs{slashfrac}\footref{foot:sfrac} when the slash is present, as shown below
-
-\eks{ \pdv{f}{x,y} ; \pdv{f}/{x,y} }
-
-\noindent As for the star argument, the effect of the slash's presence can be switched around using \keyval{switch-/}{true} i.e. the equations in the above example are exchanged, as described in \cref{ssec:pdv_options}.
-
-\DescribeArg{\arg{6}}
-This is the second and final mandatory argument, which purpose is to typeset the variables in which the function is partially differentiated with respect to. The variables are given in a comma-separated list e.g. \texttt{\{x, y, z\}}, as shown below
-
-\eks{ \pdv{f}{x} ; \pdv{f}{x,y} }
-
-\noindent The variables are typeset in the denominator with a $\partial$ inserted to the left of them.
-
-\DescribeArg{\arg{7}}
-This is the last optional argument that specifies the point(s) of evaluation or variables held constant.
-It is an \emph{e-type} argument in the \pkg{xparse} language and given as \verb|e{_^}|. This means that the
-subscript \verb|_| and superscript \verb|^| accepts an argument given in braces. Moreover, the order
-of \verb|_| and \verb|^| is independent as shown below
-
-\eks{ \pdv{f}{x,y}_{(x_1,y_1)} ; \pdv{f}{x,y}^{(x_2,y_2)} ; \pdv{f}{x,y}_{(x_1,y_1)}^{(x_2,y_2)} ; \pdv{f}{x,y}^{(x_2,y_2)}_{(x_1,y_1)} }
-
-The subscript argument is commonly used as the point of evaluation or variables held constant. If needed, the superscript argument may be used for the second point of evaluation.
-
-\subsection{Variants}
-This package does not define any variants of the partial derivative. However, a unique feature of this package, is that you can define your own variants of the partial derivative as described in \cref{ssec:CreatePdvVariant}.
-
-\clearpage
-\section{Package options}
-This package accepts its options using the well-known \emph{key=value} syntax. The keys are divided into categories, for which each key have its associated category as a prefix. Each category and option is explained below.
-
-\DescribeMacro{\derivset}{ \marg{derivative}, \oarg{key=value} }
-The package options can be set either in the preamble or in the document using the \macro{1} command. The options may also be set when defining a new derivative. Currently, there is no other way to set the options however this is subject to change, see \cref{consid:order2keyval} for more information.
-
-\DescribeArg{\arg{1}}
-A mandatory argument that determines which derivative the \emph{key=value} pairs is assigned to, where the allowed \meta{main-category} are the derivatives defined by the packages and you, see \cref{ssec:CreateOdvVariant,ssec:CreatePdvVariant}. The special value \texttt{all} is also allowed, which gives access to the options that applies to \textit{all} derivatives.
-
-\DescribeArg{\arg{2}}
-This optional argument accepts its input as a comma-separated list of \emph{key=value} pairs. Leaving out \arg{2} sets the options to the packages default settings for the chosen \arg{1} e.g. \macro{\derivset}[\marg*{\macro{\odv}}] sets the options for the ordinary derivative to the packages default settings. This argument is subject to change, see \cref{consid:DerivsetOptional} for more information.
-
-\subsection{Categories}
-This section seeks to give a detailed description of each category.
-
-\begin{itemize}
- \item The \key*{style}[\dots] keys sets either the font style or the fraction style of \meta{\dots}. The font styles \cs{mathnormal}/\cs{symnormal} and \cs{mathrm}/\cs{symup} are commonly used in literature. The fraction style can be either \cs{frac}, \cs{dfrac}, \cs{tfrac}, \cs{sfrac}\req{}, \cs{slashfrac}\footref{foot:sfrac} and many more.
- \item The \key*{delims}[\dots] keys sets the delimiters used around the \meta{\dots}. The Rule of Two applies here: \enquote{Always two there are, no more, no less. A left and a right delimiter}. The allowed delimiters are those that can be scaled with \cs{left}, \cs{big} etc.
- \item The \key*{scale}[\dots] keys sets the size of the \meta{\dots}'s delimiters. The values \texttt{big}, \texttt{Big}, \texttt{bigg}, and \texttt{Bigg} are self-explanatory and internally a left and right version are used e.g. \cs{bigl} and \cs{bigr}. The value \texttt{none} inserts the delimiters (except periods) unscaled. While the value \texttt{auto} scales the delimiters automatically using \cs{left} and \cs{right}.
- \item The \key*{sep}[\dots][\dots] keys inserts math space between \meta{\dots} and \meta{\dots} using \cs{mskip}. These keys accepts a comma-separated list of numbers \texttt{\{x,y,z\}} that are internally used to form the syntax \texttt{x mu plus y mu minus z mu}.
- \item The \key*{switch}[\dots] keys serves to change an argument's behaviour by swapping the effect of an optional character's presence.
- \item The \key*{sort}[\dots] keys deals with the sorting algorithm behind the mixed order, where you can choose the sorting method that suits you best. These keys are unique to the partial derivative and variants of it.
- \item The \key*{mics}[\dots] keys are miscellaneous keys that does not belong to any of the above categories.
-\end{itemize}
-
-\begin{note}
- A value with superscripted \texttt{U}, \texttt{P} and \texttt{R} refers to a unicode engine i.e. \luatex{} and \xetex, \pdftex{} and requires package, respectively. Additionally, some keys have two versions; with and without \texttt{-/} at the end. These keys are related to the slash argument. If \keyval{switch-/}{false} then the keys with and without \texttt{-/} are used when the slash argument is present and absent, respectively. Setting \keyval{switch-/}{true} then these keys are used in the opposite cases for the slash's presence.
-\end{note}
-
-\subsection{Ordinary derivative} \label{ssec:odv_options}
-The options in this subsection are available for the ordinary derivative \macro{\odv} and variants hereof that are defined by the package and you.
-
-\subsubsection*{Style}
-\DescribeOption*{style-inf}[\cs{mathnormal}\pdf, \cs{symnormal}\uni]{ !\meta{math-font-style} }
-The font style of the infinitesimal for the chosen derivative is set by this key. The default font style is \default*. If an upright font is preferred then \cs{mathrm}\pdf{} and \cs{symup}\uni{} could be used, or if an italic font then \cs{mathnormal}\pdf{} and \cs{symit}\uni.
-
-\DescribeOption{style-frac}[\cs{frac}]{ !\meta{fraction} }
-The derivative uses the fraction set by this key whenever \keyval{switch-/}{false} and the slash argument is absent. The key's default value is the usual fraction \default.
-
-\DescribeOption{style-frac-/}[\cs{slashfrac}]{ !\meta{fraction} }
-The derivative uses the fraction set by this key whenever \keyval{switch-/}{false} and the slash argument is present. The key's default value is a text-styled fraction \default\footref{foot:sfrac} i.e. on the form $\derivset{\odv}[style-frac-/=\slashfrac, switch-/=false] \odv{y}/{x}$.
-
-\subsubsection*{Scaling}
-\DescribeOption*{scale-eval}[auto]{ auto, none, big, Big, bigg, Bigg }
-This key sets the size of the delimiters used for the point of evaluation. This scaling is used whenever \keyval{switch-/}{false} and the slash argument is absent. The key's default value is set to scale the delimiters automatically.
-
-\DescribeOption{scale-eval-/}[auto]{ auto, none, big, Big, bigg, Bigg }
-This key sets the size of the delimiters used for the point of evaluation. This scaling is used whenever \keyval{switch-/}{false} and the slash argument is present. The key's default value is set to scale the delimiters automatically.
-
-\DescribeOption{scale-fun}[auto]{ auto, none, big, Big, bigg, Bigg }
-This key sets the size of the delimiters used around the function. The scaling is used whenever \keyval{misc-add-delims}{fun} is used. The key's default value is set to scale the delimiters automatically.
-
-\DescribeOption{scale-var}[auto]{ auto, none, big, Big, bigg, Bigg }
-This key sets the size of the delimiters used around the variable. The scaling is used whenever \keyval{misc-add-delims}{fun} is used. The key's default value is set to scale the delimiters automatically.
-
-\DescribeOption{scale-frac}[auto]{ auto, none, big, Big, bigg, Bigg }
-This key sets the size of the delimiters used for around the fraction. This scaling is used whenever \keyval{switch-/}{false}, the slash argument is absent and \keyval{misc-add-delims}{frac} is used. The key's default value is set to scale the delimiters automatically.
-
-\DescribeOption{scale-frac-/}[auto]{ auto, none, big, Big, bigg, Bigg }
-This key sets the size of the delimiters used for around the fraction. This scaling is used whenever \keyval{switch-/}{false}, the slash argument is present and \keyval{misc-add-delims}{frac} is used. The key's default value is set to scale the delimiters automatically.
-
-\subsubsection*{Delimiters}
-\DescribeOption*{delims-eval}[.~\cs{rvert}]{ !\meta{left delimiter}\meta{right delimiter} }
-This key sets the left and right delimiters used to indicate the point of evaluation. These delimiters are inserted whenever \keyval{switch-/}{false} and the slash argument is absent. The default left and right delimiters is a period\footnote{which doesn't output anything.\label{foot:period_no_output}} and a vertical bar, respectively.
-
-\DescribeOption{delims-eval-/}[.~\cs{rvert}]{ !\meta{left delimiter}\meta{right delimiter} }
-This key sets the left and right delimiters used to indicate the point of evaluation. These delimiters are inserted whenever \keyval{switch-/}{false} and the slash argument is present. The default left and right delimiters is a period\footref{foot:period_no_output} and a vertical bar, respectively.
-
-\DescribeOption{delims-fun}[(~)]{ !\meta{left delimiter}\meta{right delimiter} }
-This key sets the left and right delimiters used to around the function and these are inserted whenever \keyval{misc-add-delims}{fun} is used. The key's default left and right delimiters are a left and a right parenthesis, respectively.
-
-\DescribeOption{delims-var}[(~)]{ !\meta{left delimiter}\meta{right delimiter} }
-This key sets the left and right delimiters used to around the variable and these are inserted whenever \keyval{misc-add-delims}{var} is used. The key's default left and right delimiters are a left and a right parenthesis, respectively.
-
-\DescribeOption{delims-frac}[(~)]{ !\meta{left delimiter}\meta{right delimiter} }
-This key sets the left and right delimiters used to around the variable- These delimiters are inserted whenever \keyval{switch-/}{false}, the slash argument is absent and \keyval{misc-add-delims}{frac} is used. The key's default left and right delimiters are a left and a right parenthesis, respectively.
-
-\DescribeOption{delims-frac-/}[(~)]{ !\meta{left delimiter}\meta{right delimiter} }
-This key sets the left and right delimiters used to around the variable- These delimiters are inserted whenever \keyval{switch-/}{false}, the slash argument is present and \keyval{misc-add-delims}{frac} is used. The key's default left and right delimiters are a left and a right parenthesis, respectively.
-
-\subsubsection*{Math spacing}
-The options in this subsection inserts extra horizontal math space. The below equation illustrates where the space is inserted
-\begin{equation*}
+\begin{document}
+
+ \forside
+
+ \clearpage
+ \tableofcontents
+
+ \clearpage
+ \section{Introduction}
+ This is a beta version meaning that some elements might be changed in the official release. Using this package in its current state is therefore on your own risk. An update will be made before the official release explaining what will be changed and what impact this might cause.
+
+ This package started as a personnel package a few years ago that I used in various projects. Firstly, it was written in \tex and \latex, which gave rise to various errors as the complexity of the package grew larger and ended up as a spaghetti code. Therefore, the code was rewritten into the \latex3 language and may now be easily maintained. Originally this package was written because there did not exist any great package for derivatives. It was first much later that I discovered the \pkg{diffcoeff} package, which does a good job. However, at this time, I had already written much of the code with no documentation. I decided to write one and make it into a package for the public.
+
+ As a note on terminology, I use the wording \emph{infinitesimal} and abbreviated as \texttt{inf} for the operator symbol $d, \partial, \delta$ etc. used in various derivatives like $\odv{y}{x}, \pdv{y}{x}, \fdv{y}{x}$ etc. Moreover I explicitly use \emph{differential d} for $d$ and \emph{partial} for $\partial$. In the description of macros and options, I often write \emph{cs-\meta{placeholder}} to denote a comma-separated list of \meta{placeholder}. For example, \oarg{cs-orders} is used in the partial derivative's description to denote the order differentiation and is read as a comma-separated list of orders. It should also be noted that whenever an argument reads \meta{key=value}, it means that it is a comma-separated list of key-value pairs.
+
+
+
+ \clearpage
+ \section{Ordinary derivative}
+
+ \begin{function}*{\odv}
+ \begin{syntax}
+ \sarg, \oarg{order}, \marg{function}, \targ{/}, \marg{variable}, \earg{\_, point\tsb{1}, \^, point\tsb{2}}
+ \end{syntax}
+ The ordinary derivative \macro{1} is defined with a set of mandatory and optional arguments that either typeset specific parts or changing the style of the derivative. In this package, the ordinary derivative is defined with an upright lowercase d, because it is used by many nowadays books, as
+
+ \begin{definition}
+ \DeclareOdvVariant{\odv}{d}[style-inf=\mathrm]%\marginnote{\pdftex\\\xetex, \luatex}%
+ \DeclareOdvVariant{\odv}{d}[style-inf=\symup]
+ \end{definition}
+
+ \begin{argument}*{1}
+ The first argument of \macro{1} is an optional star that determines where the function is typeset; either in the numerator of the fraction or next to the fraction. Using the option \keyval{switch-*}{false}, the function is typeset in the numerator when the star is absent, and next to the fraction when the star is present as shown below
+
+ \begin{example}
+ \odv{y}{x} \\
+ \odv*{y}{x}
+ \end{example}
+
+ \noindent The effect of the star's presence can be switched around using \keyval{switch-*}{true} i.e. the equations in the above example are exchanged, as described in \cref{ssec:odv_options}.
+ \end{argument}
+
+ \begin{argument}{2}
+ The second argument is optional and is written inside square brackets. This argument is used to set the order of differentiation as seen below
+
+ \begin{example}
+ \odv[2]{y}{x} \\
+ \odv[n]{y}{x} \\
+ \odv[n+2]{y}{x}
+ \end{example}
+
+ \noindent The order may be a number, a symbol and a combination hereof, because it is simply typeset there. This is different from how the partial derivative's mixed order is typeset, which is computed. The order \textit{is not} automatically sorted as the mixed order for the partial derivative. This argument is subject to change, see \cref{consid:order2keyval} for more information.
+ \end{argument}
+
+ \begin{argument}{3}
+ This is the first mandatory argument that typeset the function that is to be differentiated
+
+ \begin{example}
+ \odv{f(x)}{x} \\
+ \odv{e^{\sin(x)}}{x}
+ \end{example}
+
+ \noindent The function is simply typeset in the numerator or next to the fraction.
+ \end{argument}
+
+ \begin{argument}{4}
+ The fourth argument is an optional slash written \emph{between the function and the variable} and determines which fraction style the derivative is typeset with, as described in \cref{ssec:odv_options}. Using the option \keyval{switch-/}{false} and the package's default settings, the derivative is typeset with \cs{frac} when the slash is absent, and \cs{slashfrac}\footnote{which is a macro defined by the package, see \cref{ssec:slashfrac} for more information.\label{foot:sfrac}} when the slash is present, as shown below
+
+ \begin{example}
+ \odv{y}{x} \\
+ \odv{y}/{x}
+ \end{example}
+
+ \noindent As for the star argument, the effect of the slash's presence can be switched around using \keyval{switch-/}{true} i.e. the equations in the above example are exchanged, as described in \cref{ssec:odv_options}.
+ \end{argument}
+
+ \begin{argument}{5}
+ This is the second and final mandatory argument, which purpose is to typeset the variable in which the function is differentiated with respect to as shown below
+
+ \begin{example}
+ \odv{f}{x} \\
+ \odv{f}{y}
+ \end{example}
+
+ \noindent The variable is always typeset in the denominator.
+ \end{argument}
+
+ \begin{argument}{6}
+ This is the last optional argument that specifies the point(s) of evaluation. It is an \emph{e-type} argument in the \pkg{xparse} language and given as \verb|e{_^}|. This means that the subscript \verb|_| and superscript \verb|^| accepts an argument given in braces. Moreover, the order of \verb|_| and \verb|^| is independent as shown below
+
+ \begin{example}
+ \odv{y}{x}_{x_1} \\
+ \odv{y}{x}^{x_2} \\
+ \odv{y}{x}_{x_1}^{x_2} \\
+ \odv{y}{x}^{x_2}_{x_1}
+ \end{example}
+
+ The common way to specify the point of evaluation is using the subscript argument. If needed, the second point of evaluation can be specified with the superscript argument.
+ \end{argument}
+
+ \end{function}
+
+ \subsection{Variants}
+ This package offers four variants of the ordinary derivative: Material derivative \macro{\mdv}, functional derivative \macro{\fdv}, the average rate of change \macro{\adv} and the Jacobian \macro{\jdv}. A unique feature of this package, is that you can define your own variants of the ordinary derivative as described in \cref{ssec:CreateOdvVariant}.
+
+ \begin{function}*{\mdv}
+ \begin{syntax}
+ \sarg, \oarg{order}, \marg{function}, \targ{/}, \marg{variable}, \earg{\_, point\tsb{1}, \^, point\tsb{2}}
+ \end{syntax}
+ The material derivative is used in some branches of physics (e.g. thermodynamic, fluid dynamic etc.). It is only natural for a physics student as me to define such a variant, that used an upright uppercase D. In this package, the material derivative is defined as
+
+ \begin{definition}
+ \DeclareOdvVariant{\mdv}{D}[style-inf=\mathrm]%\marginnote{\pdftex\\\xetex, \luatex}%
+ \DeclareOdvVariant{\mdv}{D}[style-inf=\symup]
+ \end{definition}
+
+ \noindent In physics, the material derivative is defined by
+ \begin{equation*}
+ \mdv{ \varphi(\symbf{r}, t) }{ t } \coloneq \pdv{ \varphi(\symbf{r}, t) }{ t } + \dot{\symbf{r}} \cdot \nabla \varphi(\symbf{r}, t)
+ \end{equation*}
+ \end{function}
+
+ \begin{function}*{\fdv}
+ \begin{syntax}
+ \sarg, \oarg{order}, \marg{function}, \targ{/}, \marg{variable}, \earg{\_, point\tsb{1}, \^, point\tsb{2}}
+ \end{syntax}
+ The functional derivative is used in the calculus of variation and uses a lowercase delta. With the package's default settings, it will use an italic delta. In this package, the functional derivative is defined as
+
+ \begin{definition}
+ \DeclareOdvVariant{\fdv}{\delta}%\marginnote{\pdftex, \xetex, \luatex}%
+ \end{definition}
+
+ \noindent In physics, it is for example used in the Lagrange equation or in the derivation of the Hartree-Fock equation
+ \begin{equation*}
+ \fdv{I}{q_{\alpha}} = \pdv{L}{q_{\alpha}} - \odv*{ \pdv{L}{ \dot{q}_{\alpha} } } { t } = 0, \qquad \fdv{ \symcal{L} }{ \psi_{n}^* } = \hat{F} \ket{\psi_{n}} - \epsilon_{n} \ket{\psi_{n}} = 0
+ ,
+ \end{equation*}
+ respectively.
+ \end{function}
+
+ \begin{function}*{\adv}
+ \begin{syntax}
+ \sarg, \oarg{order}, \marg{function}, \targ{/}, \marg{variable}, \earg{\_, point\tsb{1}, \^, point\tsb{2}}
+ \end{syntax}
+ The average rate of change is defined to use an upright uppercase delta with the packages default settings. In this package, the average rate of change is defined as
+
+ \begin{definition}
+ \DeclareOdvVariant{\adv}{\Delta}[style-inf=\mathrm]%\marginnote{\pdftex\\\xetex, \luatex}%
+ \DeclareOdvVariant{\adv}{\Delta}
+ \end{definition}
+
+ \noindent The average rate of change is used to determine the slope of a straight line
+ \begin{equation*}
+ \adv{ y }{ x } = \frac{y_2- y_1}{x_2 - x_1}
+ \end{equation*}
+ \end{function}
+
+ \begin{function}*{\jdv}
+ \begin{syntax}
+ \sarg, \oarg{order}, \marg{function}, \targ{/}, \marg{variable}, \earg{\_, point\tsb{1}, \^, point\tsb{2}}
+ \end{syntax}
+ The Jacobian is defined to use an italic partial differential with the package's default settings. Also a pair of parentheses is automatically inserted around the function and variable. In this package, the Jacobian is defined as
+
+ \begin{definition}
+ \DeclareOdvVariant{\jdv}{\partial}[misc-add-delims={fun,var}]%\marginnote{\pdftex, \xetex, \luatex}%
+ \end{definition}
+
+ \noindent which gives
+ \begin{equation*}
+ \jdv{f,g,h}{x,y,z}
+ \end{equation*}
+ \end{function}
+
+
+
+ \clearpage
+ \section{Partial derivative}
+
+ \begin{function}*{\pdv}
+ \begin{syntax}
+ \sarg, \oarg{cs-orders}, \oarg{mixed order}, \marg{function}, \targ{/}, \marg{cs-variables}, \earg{\_,point\tsb{1},\^,point\tsb{2}}
+ \end{syntax}
+ The partial derivative \macro{1} is defined with a set of mandatory and optional arguments that either typeset specific parts or changing the style of the derivative. In this package, the partial derivative is defined with an italic partial differential as
+
+ \begin{definition}
+ \DeclarePdvVariant{\pdv}{\partial}[sep-inf-ord=1, sep-ord-fun=-2]%\marginnote{\pdftex, \xetex, \luatex}%
+ \end{definition}
+
+ \begin{argument}*{1}
+ The first argument of \macro{1} is an optional star that determines where the function is typeset; either in the numerator of the fraction or next to the fraction. Using the
+ option \keyval{switch-*}{false}, the function is typeset in the numerator when the star is absent, and next to the fraction when the star is present as shown below
+
+ \begin{example}
+ \pdv{f}{x,y} \\
+ \pdv*{f}{x,y}
+ \end{example}
+
+ \noindent The effect of the star's presence can be switched around using \keyval{switch-*}{true} i.e. the equations in the above example are exchanged, as described in \cref{ssec:pdv_options}.
+ \end{argument}
+
+ \begin{argument}{2}
+ The second argument is optional and is written inside square brackets. This argument is used to set the order of differentiation for each of the variables and should be given in a comma-separated list e.g. \texttt{[1,2,3]} as shown below
+
+ \begin{example}
+ \pdv[2,3]{f}{x,y} \\
+ \pdv[\beta,a,n+2a]{f}{x,y,z} \\
+ \pdv[2,n^2,n^2-1]{f}{x,y,z}
+ \end{example}
+
+ The orders may consist numbers, symbols and a combination hereof. Notice, that the mixed order is automatically calculated and sorted based on the variables orders by the package. See \cref{ssec:pdv_options,ssec:overall_order} for more information. This argument is subject to change, see \cref{consid:order2keyval} for more information.
+ \end{argument}
+
+ \begin{argument}{3}
+ If you, unfortunately, come to the conclusion, that you are unsatisfied with how the package typeset the mixed order or if it gives a wrong result, then you can overwrite it with this argument. The use of this argument completely bypass the automatic calculation and sorting done by the package, and simply typeset the mixed order as you wrote it as shown below
+
+ \begin{example}
+ \pdv[4n+2k, 3k+n]{ f(x,y) }{ x,y } \\
+ \pdv[4n+2k, 3k+n][5(n+k)]{ f(x,y) }{ x,y }
+ \end{example}
+
+ \noindent This argument is also subject to change, see \cref{consid:RemoveMixedOrder} for more information.
+ \end{argument}
+
+ \begin{argument}{4}
+ This is the first mandatory argument that typeset the function that is to be partially differentiated as shown below
+
+ \begin{example}
+ \pdv{ f(x,y,z) }{ x, y, z } \\
+ \pdv{ e^x \sin(y) \ln(z) }{ x, y, z }
+ \end{example}
+
+ \noindent The function is simply typeset in the numerator or next to the fraction.
+ \end{argument}
+
+ \begin{argument}{5}
+ The fifth argument is an optional slash written \emph{between the function and the variables} and determines which fraction style the derivative is typeset with, as described in \cref{ssec:pdv_options}. Using the option \keyval{switch-/}{false} and the package's default settings, the derivative is typeset with \cs{frac} when the slash is absent and \cs{slashfrac}\footref{foot:sfrac} when the slash is present, as shown below
+
+ \begin{example}
+ \pdv{f}{x,y} \\
+ \pdv{f}/{x,y}
+ \end{example}
+
+ \noindent As for the star argument, the effect of the slash's presence can be switched around using \keyval{switch-/}{true} i.e. the equations in the above example are exchanged, as described in \cref{ssec:pdv_options}.
+ \end{argument}
+
+ \begin{argument}{6}
+ This is the second and final mandatory argument, which purpose is to typeset the variables in which the function is partially differentiated with respect to. The variables are given in a comma-separated list e.g. \texttt{\{x, y, z\}}, as shown below
+
+ \begin{example}
+ \pdv{f}{x} \\
+ \pdv{f}{x,y}
+ \end{example}
+
+ \noindent The variables are typeset in the denominator with a $\partial$ inserted to the left of them.
+ \end{argument}
+
+ \begin{argument}{7}
+ This is the last optional argument that specifies the point(s) of evaluation or variables held constant.
+ It is an \emph{e-type} argument in the \pkg{xparse} language and given as \verb|e{_^}|. This means that the
+ subscript \verb|_| and superscript \verb|^| accepts an argument given in braces. Moreover, the order
+ of \verb|_| and \verb|^| is independent as shown below
+
+ \begin{example}
+ \pdv{f}{x,y}_{(x_1,y_1)} \\
+ \pdv{f}{x,y}^{(x_2,y_2)} \\
+ \pdv{f}{x,y}_{(x_1,y_1)}^{(x_2,y_2)} \\
+ \pdv{f}{x,y}^{(x_2,y_2)}_{(x_1,y_1)}
+ \end{example}
+
+ The subscript argument is commonly used as the point of evaluation or variables held constant. If needed, the superscript argument may be used for the second point of evaluation.
+ \end{argument}
+ \end{function}
+
+ \subsection{Variants}
+ This package does not define any variants of the partial derivative. However, a unique feature of this package, is that you can define your own variants of the partial derivative as described in \cref{ssec:CreatePdvVariant}.
+
+
+
+ \clearpage
+ \section{Package options}
+ This package accepts its options using the well-known \emph{key=value} syntax. The keys are divided into categories, for which each key have its associated category as a prefix. Each category and option is explained below.
+
+ \begin{function}{\derivset}
+ \begin{syntax}
+ \marg{derivative}, \oarg{key=value}
+ \end{syntax}
+ The package options can be set either in the preamble or in the document using the \macro{1} command. The options may also be set when defining a new derivative. Currently, there is no other way to set the options however this is subject to change, see \cref{consid:order2keyval} for more information.
+
+ \begin{argument}{1}
+ A mandatory argument that determines which derivative the \emph{key=value} pairs is assigned to, where the allowed \meta{main-category} are the derivatives defined by the packages and you, see \cref{ssec:CreateOdvVariant,ssec:CreatePdvVariant}. The special value \texttt{all} is also allowed, which gives access to the options that applies to \textit{all} derivatives.
+ \end{argument}
+
+ \begin{argument}{2}
+ This optional argument accepts its input as a comma-separated list of \emph{key=value} pairs. Leaving out \arg{2} sets the options to the packages default settings for the chosen \arg{1} e.g. \macro{\derivset}[\marg*{\macro{\odv}}] sets the options for the ordinary derivative to the packages default settings. This argument is subject to change, see \cref{consid:DerivsetOptional} for more information.
+ \end{argument}
+ \end{function}
+
+ \subsection{Categories}
+ This section seeks to give a detailed description of each category.
+
+ \begin{itemize}
+ \item The \key[index=false]{style-\meta{\dots}} keys sets either the font style or the fraction style of \meta{\dots}. The font styles \cs{mathnormal}/\cs{symnormal} and \cs{mathrm}/\cs{symup} are commonly used in literature. The fraction style can be either \cs{frac}, \cs{dfrac}, \cs{tfrac}, \cs{sfrac}\req{}, \cs{slashfrac}\footref{foot:sfrac} and many more.
+ \item The \key[index=false]{delims-\meta{\dots}} keys sets the delimiters used around the \meta{\dots}. The Rule of Two applies here: \enquote{Always two there are, no more, no less. A left and a right delimiter}. The allowed delimiters are those that can be scaled with \cs{left}, \cs{big} etc.
+ \item The \key[index=false]{scale-\meta{\dots}} keys sets the size of the \meta{\dots}'s delimiters. The values \texttt{big}, \texttt{Big}, \texttt{bigg}, and \texttt{Bigg} are self-explanatory and internally a left and right version are used e.g. \cs{bigl} and \cs{bigr}. The value \texttt{none} inserts the delimiters (except periods) unscaled. While the value \texttt{auto} scales the delimiters automatically using \cs{left} and \cs{right}.
+ \item The \key[index=false]{sep-\meta{\dots}-\meta{\dots}} keys inserts math space between \meta{\dots} and \meta{\dots} using \cs{mskip}. These keys accepts a comma-separated list of numbers \texttt{\{x,y,z\}} that are internally used to form the syntax \texttt{x mu plus y mu minus z mu}.
+ \item The \key[index=false]{switch-\meta{\dots}} keys serves to change an argument's behaviour by swapping the effect of an optional character's presence.
+ \item The \key[index=false]{sort-\meta{\dots}} keys deals with the sorting algorithm behind the mixed order, where you can choose the sorting method that suits you best. These keys are unique to the partial derivative and variants of it.
+ \item The \key[index=false]{mics-\meta{\dots}} keys are miscellaneous keys that does not belong to any of the above categories.
+ \end{itemize}
+
+ \begin{note}
+ A value with superscripted \texttt{U}, \texttt{P} and \texttt{R} refers to a unicode engine i.e. \luatex{} and \xetex, \pdftex{} and requires package, respectively. Additionally, some keys have two versions; with and without \texttt{-/} at the end. These keys are related to the slash argument. If \keyval{switch-/}{false} then the keys with and without \texttt{-/} are used when the slash argument is present and absent, respectively. Setting \keyval{switch-/}{true} then these keys are used in the opposite cases for the slash's presence.
+ \end{note}
+
+ \subsection{Ordinary derivative} \label{ssec:odv_options}
+ The options in this subsection are available for the ordinary derivative \macro{\odv} and variants hereof that are defined by the package and you.
+
+ \subsubsection*{Style}
+
+ \begin{option}*{style-inf}
+ \begin{values}[default = { \cs{mathnormal}\pdf, \cs{symnormal}\uni }]
+ \meta{math-font-style}
+ \end{values}
+ The font style of the infinitesimal for the chosen derivative is set by this key. The default font style is \default*. If an upright font is preferred then \cs{mathrm}\pdf{} and \cs{symup}\uni{} could be used, or if an italic font then \cs{mathnormal}\pdf{} and \cs{symit}\uni.
+ \end{option}
+
+ \begin{option}{style-frac}
+ \begin{values}[default = \cs{frac}]
+ \meta{fraction}
+ \end{values}
+ The derivative uses the fraction set by this key whenever \keyval{switch-/}{false} and the slash argument is absent. The key's default value is the usual fraction \default.
+ \end{option}
+
+ \begin{option}{style-frac-/}
+ \begin{values}[default = \cs{slashfrac}]
+ \meta{fraction}
+ \end{values}
+ The derivative uses the fraction set by this key whenever \keyval{switch-/}{false} and the slash argument is present. The key's default value is a text-styled fraction \default\footref{foot:sfrac} i.e. on the form $\derivset{\odv}[style-frac-/=\slashfrac, switch-/=false] \odv{y}/{x}$.
+ \end{option}
+
+ \subsubsection*{Scaling}
+
+ \begin{option}*{scale-eval}
+ \begin{values}[default = auto]
+ auto, none, big, Big, bigg, Bigg
+ \end{values}
+ This key sets the size of the delimiters used for the point of evaluation. This scaling is used whenever \keyval{switch-/}{false} and the slash argument is absent. The key's default value is set to scale the delimiters automatically.
+ \end{option}
+
+ \begin{option}{scale-eval-/}
+ \begin{values}[default = auto]
+ auto, none, big, Big, bigg, Bigg
+ \end{values}
+ This key sets the size of the delimiters used for the point of evaluation. This scaling is used whenever \keyval{switch-/}{false} and the slash argument is present. The key's default value is set to scale the delimiters automatically.
+ \end{option}
+
+ \begin{option}{scale-fun}
+ \begin{values}[default = auto]
+ auto, none, big, Big, bigg, Bigg
+ \end{values}
+ This key sets the size of the delimiters used around the function. The scaling is used whenever \keyval{misc-add-delims}{fun} is used. The key's default value is set to scale the delimiters automatically.
+ \end{option}
+
+ \begin{option}{scale-var}
+ \begin{values}[default = auto]
+ auto, none, big, Big, bigg, Bigg
+ \end{values}
+ This key sets the size of the delimiters used around the variable. The scaling is used whenever \keyval{misc-add-delims}{var} is used. The key's default value is set to scale the delimiters automatically.
+ \end{option}
+
+ \begin{option}{scale-frac}
+ \begin{values}[default = auto]
+ auto, none, big, Big, bigg, Bigg
+ \end{values}
+ This key sets the size of the delimiters used for around the fraction. This scaling is used whenever \keyval{switch-/}{false}, the slash argument is absent and \keyval{misc-add-delims}{frac} is used. The key's default value is set to scale the delimiters automatically.
+ \end{option}
+
+ \begin{option}{scale-frac-/}
+ \begin{values}[default = auto]
+ auto, none, big, Big, bigg, Bigg
+ \end{values}
+ This key sets the size of the delimiters used for around the fraction. This scaling is used whenever \keyval{switch-/}{false}, the slash argument is present and \keyval{misc-add-delims}{frac} is used. The key's default value is set to scale the delimiters automatically.
+ \end{option}
+
+ \subsubsection*{Delimiters}
+
+ \begin{option}*{delims-eval}
+ \begin{values}[default = .~\cs{rvert}]
+ \meta{left delimiter}\meta{right delimiter}
+ \end{values}
+ This key sets the left and right delimiters used to indicate the point of evaluation. These delimiters are inserted whenever \keyval{switch-/}{false} and the slash argument is absent. The default left and right delimiters is a period\footnote{which doesn't output anything.\label{foot:period_no_output}} and a vertical bar, respectively.
+ \end{option}
+
+ \begin{option}{delims-eval-/}
+ \begin{values}[default = .~\cs{rvert}]
+ \meta{left delimiter}\meta{right delimiter}
+ \end{values}
+ This key sets the left and right delimiters used to indicate the point of evaluation. These delimiters are inserted whenever \keyval{switch-/}{false} and the slash argument is present. The default left and right delimiters is a period\footref{foot:period_no_output} and a vertical bar, respectively.
+ \end{option}
+
+ \begin{option}{delims-fun}
+ \begin{values}[default = (~)]
+ \meta{left delimiter}\meta{right delimiter}
+ \end{values}
+ This key sets the left and right delimiters used to around the function and these are inserted whenever \keyval{misc-add-delims}{fun} is used. The key's default left and right delimiters are a left and a right parenthesis, respectively.
+ \end{option}
+
+ \begin{option}{delims-var}
+ \begin{values}[default = (~)]
+ \meta{left delimiter}\meta{right delimiter}
+ \end{values}
+ This key sets the left and right delimiters used to around the variable and these are inserted whenever \keyval{misc-add-delims}{var} is used. The key's default left and right delimiters are a left and a right parenthesis, respectively.
+ \end{option}
+
+ \begin{option}{delims-frac}
+ \begin{values}[default = (~)]
+ \meta{left delimiter}\meta{right delimiter}
+ \end{values}
+ This key sets the left and right delimiters used to around the fraction in the derivative e.g. $\derivset{\odv}[misc-add-delims=frac] \odv*{y}{x}$ These delimiters are inserted whenever \keyval{switch-/}{false}, the slash argument is absent and \keyval{misc-add-delims}{frac} is used. The key's default left and right delimiters are a left and a right parenthesis, respectively.
+ \end{option}
+
+ \begin{option}{delims-frac-/}
+ \begin{values}[default = (~)]
+ \meta{left delimiter}\meta{right delimiter}
+ \end{values}
+ This key sets the left and right delimiters used to around the fraction in the derivative e.g. $\derivset{\odv}[misc-add-delims=frac] \odv*{y}/{x}$ These delimiters are inserted whenever \keyval{switch-/}{false}, the slash argument is present and \keyval{misc-add-delims}{frac} is used. The key's default left and right delimiters are a left and a right parenthesis, respectively.
+ \end{option}
+
+ \subsubsection*{Math spacing}
+ The options in this subsection inserts extra horizontal math space. The below equation illustrates where the space is inserted
+ \begin{equation*}
\frac{ \symup{d} \ms{inf-fun} y }{ \symup{d} \ms{inf-var} x }
\qquad
\frac{ \symup{d}^{ \ms{inf-ord} 2 } \ms{ord-fun} y }{ \symup{d} x^{ \ms{var-ord} 2 } }
\qquad
\mleft. \frac{ \symup{d} y}{ \symup{d} x } \mright\rvert_{ \ms{eval-sb} x_1}^{ \ms{eval-sp} x_2}
-\end{equation*}
-where it have been split into three to give a better overview.
-
-\DescribeOption{sep-inf-ord}[0]{ !\meta{cs-numbers} }
-This key sets the math space that is inserted in the infinitesimal's power left to the order. It is only inserted when the order is different from \num{1}. The key's default value is \default{} \texttt{mu}.
-
-\DescribeOption{sep-inf-fun}[0]{ !\meta{cs-numbers} }
-This key sets the math space that is inserted between the infinitesimal and the function when the order \emph{is equal} to \num{1}. The space is only inserted when a non-blank function is printed \emph{in the numerator}. The key's default value is \default{} \texttt{mu}.
-
-\DescribeOption{sep-ord-fun}[0]{ !\meta{cs-numbers} }
-This key sets the math space that is inserted between the infinitesimal and the function when the order \emph{is different} from \num{1}. The space is only inserted when a non-blank function is printed \emph{in the numerator}. The key's default value is \default{} \texttt{mu}.
-
-\DescribeOption{sep-inf-var}[0]{ !\meta{cs-numbers} }
-This key sets the math space that is inserted between the infinitesimal and the variable. The space is only inserted when a non-blank variable is given. The key's default value is \default{} \texttt{mu}.
-
-\DescribeOption{sep-var-ord}[0]{ !\meta{cs-numbers} }
-This key sets the math space that is inserted in the variable's power left to the order. The space is only inserted when the order is different from \num{1}. The key's default value is \default{} \texttt{mu}.
-
-\DescribeOption{sep-eval-sb}[0]{ !\meta{cs-numbers} }
-This key sets the math space that is inserted in the evaluation subscript left to the point of evaluation. The space is only inserted when a non-blank subscript is given. The key's default value is \default{} \texttt{mu}.
-
-\DescribeOption{sep-eval-sp}[0]{ !\meta{cs-numbers} }
-This key sets the math space that is inserted in the evaluation superscript left to the point of evaluation. The space is only inserted when a non-blank superscript is given. The key's default value is \default{} \texttt{mu}.
-
-\subsubsection*{Switches}
-\DescribeOption*{switch-*}[false]{ true, false }
-The effect of the star's presence can be switched with the value \val{true}. That is, the function is typeset next to the fraction when the star is absent and in the numerator when the star is present. As an example, compare below where the option is turned on (\val{true}) and off (\val{false}),
-
-\eks{ \derivset{\odv}[switch-*=false] \odv{y}{x} ; \derivset{\odv}[switch-*=true] \odv{y}{x} }
-
-\noindent The key's default value is \default.
-
-\DescribeOption{switch-/}[false]{ true, false }
-The effect of the slash's presence can be switched with the value \val{true}. That is, the derivative is typeset with the fraction set by \key{style-frac-/} when the slash is absent and with the fraction set by \key{style-frac} when the slash is present. As an example, compare below where the option is turned on (\val{true}) and off (\val{false}),
-
-\eks{ \derivset{\odv}[switch-/=false] \odv{y}{x} ; \derivset{\odv}[switch-/=true] \odv{y}{x} }
-
-\noindent The key's default value is \default.
-
-\subsubsection*{Miscellaneous}
-\DescribeOption*{ misc-add-delims, misc-remove-delims }{ fun, var, frac }
-These two keys accepts its input as an comma-separated list of values such that
-\begin{verbatim}
- \derivset{\odv}[misc-add-delims=fun]
- \derivset{\odv}[misc-add-delims={fun,var}]
- \derivset{\odv}[misc-add-delims={fun,var,frac}]
-\end{verbatim}
-are all valid, and the same goes for \key{misc-remove-delims}. The key \key{misc-add-delims}{} is used to insert the delimiters around the key's values, while \key{misc-remove-delims}{} is used to remove the inserted delimiters. The next example shows the key \key{misc-add-delims} in action
-
-\eks{\derivset{\odv}[misc-add-delims=fun] \odv{y}{x} ; \derivset{\odv}[misc-add-delims={fun,var}] \odv{y}{x} ; \derivset{\odv}[misc-add-delims={fun,var,frac}] \odv{y}{x}}
-
-\noindent All the above applies to \key{misc-remove-delims}{} as well, except it removes the delimiters. The effect of the key \key{misc-add-delims}{} is turned off (\val{false}) locally inside a derivative. This is to ensure that the option is not applied to more than one derivative when nested as shown below
-
-\eks{\derivset{\odv}[misc-add-delims=var] \odv*{\odv{y}{x}}{x};\derivset{\odv}[misc-add-delims=fun] \odv*{\odv{y}{x}}{x};\derivset{\odv}[misc-add-delims=frac] \odv*{\odv{y}{x}}{x}}
-
-\noindent These two keys and this local behaviour are subject to change, see \cref{revis:add_remove,consid:add_remove_local} for more information.
-
-
-\subsection{Partial derivative} \label{ssec:pdv_options}
-The options in this subsection are available for the partial derivative \macro{\pdv} and variants hereof that are defined by the package and you.
-
-\subsubsection*{Style}
-\DescribeOption*{style-inf}[\cs{mathnormal}\pdf, \cs{symnormal}\uni]{ !\meta{math-font-style} }
-The font style of the infinitesimal for the chosen derivative is set by this key. The default font style is \default*. If an upright font is preferred then \cs{mathrm}\pdf{} and \cs{symup}\uni{} could be used, or if an italic font then \cs{mathnormal}\pdf{} and \cs{symit}\uni.
-
-\DescribeOption{style-frac}[\cs{frac}]{ !\meta{fraction} }
-The derivative uses the fraction set by this key whenever \keyval{switch-/}{false} and the slash argument is absent. The key's default value is the usual fraction \cs{frac}.
-
-\DescribeOption{style-frac-/}[\cs{slashfrac}]{ !\meta{fraction} }
-The derivative uses the fraction set by this key whenever \keyval{switch-/}{false} and the slash argument is present. The key's default value is a text-styled fraction \default\footref{foot:sfrac} i.e. on the form $\derivset{\pdv}[style-frac-/=\slashfrac, switch-/=false] \pdv{f}/{x,y}$.
-
-\subsubsection*{Scaling}
-\DescribeOption*{scale-eval}[auto]{ auto, none, big, Big, bigg, Bigg }
-This key sets the size of the delimiters used for the point of evaluation. This scaling is used whenever \keyval{switch-/}{false} and the slash argument is absent. The key's default value is set to scale the delimiters automatically.
-
-\DescribeOption{scale-eval-/}[auto]{ auto, none, big, Big, bigg, Bigg }
-This key sets the size of the delimiters used for the point of evaluation. This scaling is used whenever \keyval{switch-/}{false} and the slash argument is present. The key's default value is set to scale the delimiters automatically.
-
-\DescribeOption{scale-fun}[auto]{ auto, none, big, Big, bigg, Bigg }
-This key sets the size of the delimiters used around the function. The scaling is used whenever \keyval{misc-add-delims}{fun} is used. The key's default value is set to scale the delimiters automatically.
-
-\DescribeOption{scale-var}[auto]{ auto, none, big, Big, bigg, Bigg }
-This key sets the size of the delimiters used around the variable. The scaling is used whenever \keyval{misc-add-delims}{fun} is used. The key's default value is set to scale the delimiters automatically.
-
-\DescribeOption{scale-frac}[auto]{ auto, none, big, Big, bigg, Bigg }
-This key sets the size of the delimiters used for around the fraction. This scaling is used whenever \keyval{switch-/}{false}, the slash argument is absent and \keyval{misc-add-delims}{frac} is used. The key's default value is set to scale the delimiters automatically.
-
-\DescribeOption{scale-frac-/}[auto]{ auto, none, big, Big, bigg, Bigg }
-This key sets the size of the delimiters used for around the fraction. This scaling is used whenever \keyval{switch-/}{false}, the slash argument is present and \keyval{misc-add-delims}{frac} is used. The key's default value is set to scale the delimiters automatically.
-
-\subsubsection*{Delimiters}
-\DescribeOption*{delims-eval}[(~)]{ !\meta{left delimiter}\meta{right delimiter} }
-This key sets the left and right delimiters used to indicate the point of evaluation. These delimiters are inserted whenever \keyval{switch-/}{false} and the slash argument is absent. The key's default left and right delimiters are a left and a right parenthesis, respectively.
-
-\DescribeOption{delims-eval-/}[(~)]{ !\meta{left delimiter}\meta{right delimiter} }
-This key sets the left and right delimiters used to indicate the point of evaluation. These delimiters are inserted whenever \keyval{switch-/}{false} and the slash argument is present. The key's default left and right delimiters are a left and a right parenthesis, respectively.
-
-\DescribeOption{delims-fun}[(~)]{ !\meta{left delimiter}\meta{right delimiter} }
-This key sets the left and right delimiters used to around the function and these are inserted whenever \keyval{misc-add-delims}{fun} is used. The key's default left and right delimiters are a left and a right parenthesis, respectively.
-
-\DescribeOption{delims-var}[(~)]{ !\meta{left delimiter}\meta{right delimiter} }
-This key sets the left and right delimiters used to around the variable and these are inserted whenever \keyval{misc-add-delims}{var} is used. The key's default left and right delimiters are a left and a right parenthesis, respectively.
-
-\DescribeOption{delims-frac}[(~)]{ !\meta{left delimiter}\meta{right delimiter} }
-This key sets the left and right delimiters used to around the variable- These delimiters are inserted whenever \keyval{switch-/}{false}, the slash argument is absent and \keyval{misc-add-delims}{frac} is used. The key's default left and right delimiters are a left and a right parenthesis, respectively.
-
-\DescribeOption{delims-frac-/}[(~)]{ !\meta{left delimiter}\meta{right delimiter} }
-This key sets the left and right delimiters used to around the variable- These delimiters are inserted whenever \keyval{switch-/}{false}, the slash argument is present and \keyval{misc-add-delims}{frac} is used. The key's default left and right delimiters are a left and a right parenthesis, respectively.
-
-\subsubsection*{Math spacing}
-The options in this subsection inserts extra horizontal math space. The below equation illustrates where the space is inserted
-\begin{equation*}
+ ,
+ \end{equation*}
+ where it has been split into three to give a better overview.
+
+ \begin{option}{sep-inf-ord}
+ \begin{values}[default = 0]
+ \meta{cs-numbers}
+ \end{values}
+ This key sets the math space that is inserted in the infinitesimal's power left to the order. It is only inserted when the order is different from \num{1}. The key's default value is \default{} \texttt{mu}.
+ \end{option}
+
+ \begin{option}{sep-inf-fun}
+ \begin{values}[default = 0]
+ \meta{cs-numbers}
+ \end{values}
+ This key sets the math space that is inserted between the infinitesimal and the function when the order \emph{is equal} to \num{1}. The space is only inserted when a non-blank function is printed \emph{in the numerator}. The key's default value is \default{} \texttt{mu}.
+ \end{option}
+
+ \begin{option}{sep-ord-fun}
+ \begin{values}[default = 0]
+ \meta{cs-numbers}
+ \end{values}
+ This key sets the math space that is inserted between the infinitesimal and the function when the order \emph{is different} from \num{1}. The space is only inserted when a non-blank function is printed \emph{in the numerator}. The key's default value is \default{} \texttt{mu}.
+ \end{option}
+
+ \begin{option}{sep-inf-var}
+ \begin{values}[default = 0]
+ \meta{cs-numbers}
+ \end{values}
+ This key sets the math space that is inserted between the infinitesimal and the variable. The space is only inserted when a non-blank variable is given. The key's default value is \default{} \texttt{mu}.
+ \end{option}
+
+ \begin{option}{sep-var-ord}
+ \begin{values}[default = 0]
+ \meta{cs-numbers}
+ \end{values}
+ This key sets the math space that is inserted in the variable's power left to the order. The space is only inserted when the order is different from \num{1}. The key's default value is \default{} \texttt{mu}.
+ \end{option}
+
+ \begin{option}{sep-eval-sb}
+ \begin{values}[default = 0]
+ \meta{cs-numbers}
+ \end{values}
+ This key sets the math space that is inserted in the evaluation subscript left to the point of evaluation. The space is only inserted when a non-blank subscript is given. The key's default value is \default{} \texttt{mu}.
+ \end{option}
+
+ \begin{option}{sep-eval-sp}
+ \begin{values}[default = 0]
+ \meta{cs-numbers}
+ \end{values}
+ This key sets the math space that is inserted in the evaluation superscript left to the point of evaluation. The space is only inserted when a non-blank superscript is given. The key's default value is \default{} \texttt{mu}.
+ \end{option}
+
+ \subsubsection*{Switches}
+
+ \begin{option}*{switch-*}
+ \begin{values}[default = false]
+ true, false
+ \end{values}
+ The effect of the star's presence can be switched with the value \val{true}. That is, the function is typeset next to the fraction when the star is absent and in the numerator when the star is present. As an example, compare below where the option is turned on (\val{true}) and off (\val{false}),
+
+ \begin{example}
+ \derivset{\odv}[switch-*=false] \odv{y}{x} \\
+ \derivset{\odv}[switch-*=true] \odv{y}{x}
+ \end{example}
+
+ \noindent The key's default value is \default.
+ \end{option}
+
+ \begin{option}{switch-/}
+ \begin{values}[default = false]
+ true, false
+ \end{values}
+ The effect of the slash's presence can be switched with the value \val{true}. That is, the derivative is typeset with the fraction set by \key{style-frac-/} when the slash is absent and with the fraction set by \key{style-frac} when the slash is present. As an example, compare below where the option is turned on (\val{true}) and off (\val{false}),
+
+ \begin{example}
+ \derivset{\odv}[switch-/=false] \odv{y}{x} \\
+ \derivset{\odv}[switch-/=true] \odv{y}{x}
+ \end{example}
+
+ \noindent The key's default value is \default.
+ \end{option}
+
+ \subsubsection*{Miscellaneous}
+
+ \begin{option}*{misc-add-delims, misc-remove-delims}
+ \begin{values}
+ fun, var, frac
+ \end{values}
+ These two keys accepts its input as an comma-separated list of values such that
+ \begin{verbatim}
+ \derivset{\odv}[misc-add-delims=fun]
+ \derivset{\odv}[misc-add-delims={fun,var}]
+ \derivset{\odv}[misc-add-delims={fun,var,frac}]
+ \end{verbatim}
+ are all valid, and the same goes for \key{misc-remove-delims}. The key \key{misc-add-delims}{} is used to insert the delimiters around the key's values, while \key{misc-remove-delims}{} is used to remove the inserted delimiters. The next example shows the key \key{misc-add-delims} in action
+
+ \begin{example}
+ \derivset{\odv}[misc-add-delims=fun] \odv{y}{x} \\
+ \derivset{\odv}[misc-add-delims={fun,var}] \odv{y}{x} \\
+ \derivset{\odv}[misc-add-delims={fun,var,frac}] \odv{y}{x}
+ \end{example}
+
+ \noindent All the above applies to \key{misc-remove-delims}{} as well, except it removes the delimiters. The effect of the key \key{misc-add-delims}{} is turned off (\val{false}) locally inside a derivative. This is to ensure that the option is not applied to more than one derivative when nested as shown below
+
+ \begin{example}
+ \derivset{\odv}[misc-add-delims=var] \odv*{\odv{y}{x}}{x} \\
+ \derivset{\odv}[misc-add-delims=fun] \odv*{\odv{y}{x}}{x} \\
+ \derivset{\odv}[misc-add-delims=frac] \odv*{\odv{y}{x}}{x}
+ \end{example}
+
+ \noindent These two keys and this local behaviour are subject to change, see \cref{revis:add_remove,consid:add_remove_local} for more information.
+ \end{option}
+
+
+ \subsection{Partial derivative} \label{ssec:pdv_options}
+ The options in this subsection are available for the partial derivative \macro{\pdv} and variants hereof that are defined by the package and you.
+
+ \subsubsection*{Style}
+
+ \begin{option}*{style-inf}
+ \begin{values}[default = { \cs{mathnormal}\pdf, \cs{symnormal}\uni }]
+ \meta{math-font-style}
+ \end{values}
+ The font style of the infinitesimal for the chosen derivative is set by this key. The default font style is \default*. If an upright font is preferred then \cs{mathrm}\pdf{} and \cs{symup}\uni{} could be used, or if an italic font then \cs{mathnormal}\pdf{} and \cs{symit}\uni.
+ \end{option}
+
+ \begin{option}{style-frac}
+ \begin{values}[default = \cs{frac}]
+ \meta{fraction}
+ \end{values}
+ The derivative uses the fraction set by this key whenever \keyval{switch-/}{false} and the slash argument is absent. The key's default value is the usual fraction \cs{frac}.
+ \end{option}
+
+ \begin{option}{style-frac-/}
+ \begin{values}[default = \cs{slashfrac}]
+ \meta{fraction}
+ \end{values}
+ The derivative uses the fraction set by this key whenever \keyval{switch-/}{false} and the slash argument is present. The key's default value is a text-styled fraction \default\footref{foot:sfrac} i.e. on the form $\derivset{\pdv}[style-frac-/=\slashfrac, switch-/=false] \pdv{f}/{x,y}$.
+ \end{option}
+
+ \subsubsection*{Scaling}
+
+ \begin{option}*{scale-eval}
+ \begin{values}[default = auto]
+ auto, none, big, Big, bigg, Bigg
+ \end{values}
+ This key sets the size of the delimiters used for the point of evaluation. This scaling is used whenever \keyval{switch-/}{false} and the slash argument is absent. The key's default value is set to scale the delimiters automatically.
+ \end{option}
+
+ \begin{option}{scale-eval-/}
+ \begin{values}[default = auto]
+ auto, none, big, Big, bigg, Bigg
+ \end{values}
+ This key sets the size of the delimiters used for the point of evaluation. This scaling is used whenever \keyval{switch-/}{false} and the slash argument is present. The key's default value is set to scale the delimiters automatically.
+ \end{option}
+
+ \begin{option}{scale-fun}
+ \begin{values}[default = auto]
+ auto, none, big, Big, bigg, Bigg
+ \end{values}
+ This key sets the size of the delimiters used around the function. The scaling is used whenever \keyval{misc-add-delims}{fun} is used. The key's default value is set to scale the delimiters automatically.
+ \end{option}
+
+ \begin{option}{scale-var}
+ \begin{values}[default = auto]
+ auto, none, big, Big, bigg, Bigg
+ \end{values}
+ This key sets the size of the delimiters used around the variable. The scaling is used whenever \keyval{misc-add-delims}{var} is used. The key's default value is set to scale the delimiters automatically.
+ \end{option}
+
+ \begin{option}{scale-frac}
+ \begin{values}[default = auto]
+ auto, none, big, Big, bigg, Bigg
+ \end{values}
+ This key sets the size of the delimiters used for around the fraction. This scaling is used whenever \keyval{switch-/}{false}, the slash argument is absent and \keyval{misc-add-delims}{frac} is used. The key's default value is set to scale the delimiters automatically.
+ \end{option}
+
+ \begin{option}{scale-frac-/}
+ \begin{values}[default = auto]
+ auto, none, big, Big, bigg, Bigg
+ \end{values}
+ This key sets the size of the delimiters used for around the fraction. This scaling is used whenever \keyval{switch-/}{false}, the slash argument is present and \keyval{misc-add-delims}{frac} is used. The key's default value is set to scale the delimiters automatically.
+ \end{option}
+
+ \subsubsection*{Delimiters}
+
+ \begin{option}*{delims-eval}
+ \begin{values}[default = (~)]
+ \meta{left delimiter}\meta{right delimiter}
+ \end{values}
+ This key sets the left and right delimiters used to indicate the point of evaluation. These delimiters are inserted whenever \keyval{switch-/}{false} and the slash argument is absent. The key's default left and right delimiters are a left and a right parenthesis, respectively.
+ \end{option}
+
+ \begin{option}{delims-eval-/}
+ \begin{values}[default = (~)]
+ \meta{left delimiter}\meta{right delimiter}
+ \end{values}
+ This key sets the left and right delimiters used to indicate the point of evaluation. These delimiters are inserted whenever \keyval{switch-/}{false} and the slash argument is present. The key's default left and right delimiters are a left and a right parenthesis, respectively.
+ \end{option}
+
+ \begin{option}{delims-fun}
+ \begin{values}[default = (~)]
+ \meta{left delimiter}\meta{right delimiter}
+ \end{values}
+ This key sets the left and right delimiters used to around the function and these are inserted whenever \keyval{misc-add-delims}{fun} is used. The key's default left and right delimiters are a left and a right parenthesis, respectively.
+ \end{option}
+
+ \begin{option}{delims-var}
+ \begin{values}[default = (~)]
+ \meta{left delimiter}\meta{right delimiter}
+ \end{values}
+ This key sets the left and right delimiters used to around the variable and these are inserted whenever \keyval{misc-add-delims}{var} is used. The key's default left and right delimiters are a left and a right parenthesis, respectively.
+ \end{option}
+
+ \begin{option}{delims-frac}
+ \begin{values}[default = (~)]
+ \meta{left delimiter}\meta{right delimiter}
+ \end{values}
+ This key sets the left and right delimiters used to around the fraction in the derivative e.g. $\derivset{\pdv}[misc-add-delims=frac] \pdv*{y}{x}$. These delimiters are inserted whenever \keyval{switch-/}{false}, the slash argument is absent and \keyval{misc-add-delims}{frac} is used. The key's default left and right delimiters are a left and a right parenthesis, respectively.
+ \end{option}
+
+ \begin{option}{delims-frac-/}
+ \begin{values}[default = (~)]
+ \meta{left delimiter}\meta{right delimiter}
+ \end{values}
+ This key sets the left and right delimiters used to around the fraction in the derivative e.g. $\derivset{\pdv}[misc-add-delims=frac] \pdv*{y}/{x}$. These delimiters are inserted whenever \keyval{switch-/}{false}, the slash argument is present and \keyval{misc-add-delims}{frac} is used. The key's default left and right delimiters are a left and a right parenthesis, respectively.
+ \end{option}
+
+ \subsubsection*{Math spacing}
+ The options in this subsection inserts extra horizontal math space. The below equation illustrates where the space is inserted
+ \begin{equation*}
\frac{ \partial \ms{inf-fun} f }{ \partial \ms{inf-var} x }
\qquad
\frac{ \partial^{ \ms{inf-ord} 2 } \ms{ord-fun} f }{ \partial x \ms{var-inf} \partial y }
@@ -1060,172 +1786,282 @@ The options in this subsection inserts extra horizontal math space. The below eq
\frac{ \partial^{ 3 } f }{ \partial x^{ \ms{var-ord} 2 } \ms{ord-inf} \partial y }
\qquad
\mleft( \frac{ \partial f}{ \partial x } \mright)_{ \ms{eval-sb} (x_1,y_1)}^{ \ms{eval-sp} (x_2,y_2)}
-\end{equation*}
-where it have been split into four to give a better overview.
-
-\DescribeOption{sep-inf-ord}[0]{ !\meta{cs-number} }
-This key sets the math space that is inserted in the infinitesimal's power left to the mixed order. It is only inserted when the mixed order is different from \num{1}. The key's default value is \default{} \texttt{mu}.
-
-\DescribeOption{sep-inf-fun}[0]{ !\meta{cs-number} }
-This key sets the math space that is inserted between the infinitesimal and the function when the mixed order \emph{is equal} to \num{1}. The space is only inserted when a non-blank function is printed \emph{in the numerator}. The key's default value is \default{} \texttt{mu}.
-
-\DescribeOption{sep-ord-fun}[0]{ !\meta{cs-number} }
-This key sets the math space that is inserted between the infinitesimal and the function when the mixed order \emph{is different} from \num{1}. The space is only inserted when a non-blank function is printed \emph{in the numerator}. The key's default value is \default{} \texttt{mu}.
-
-\DescribeOption{sep-inf-var}[0]{ !\meta{cs-number} }
-This key sets the math space that is inserted between the infinitesimal and the following variable. The space is only inserted when a non-blank variable is given. The key's default value is \default{} \texttt{mu}.
-
-\DescribeOption{sep-var-ord}[0]{ !\meta{cs-number} }
-This key sets the math space that is inserted in a variable's power left to the order. The space is only inserted when the order is different from \num{1}. The key's default value is \default{} \texttt{mu}.
-
-\DescribeOption{sep-var-inf}[3]{ !\meta{cs-number} }
-They key sets the math space that is inserted between a variable and the following infinitesimal. The space is only inserted when the variable's order \emph{is equal} to \num{1}. It is only inserted when more than one non-blank variables are given. The key's default value is \default{} \texttt{mu}.
-
-\DescribeOption{sep-ord-inf}[3]{ !\meta{cs-number} }
-They key sets the math space that is inserted between a variable and the following infinitesimal. The space is only inserted when the variable's order \emph{is different} from \num{1}. It is only inserted when more than one non-blank variables are given. The key's default value is \default{} \texttt{mu}.
-
-\DescribeOption{sep-eval-sb}[-4]{ !\meta{cs-number} }
-This key sets the math space that is inserted in the evaluation subscript left to the point of evaluation. The space is only inserted when a non-blank subscript is given. The key's default value is \default{} \texttt{mu}.
-
-\DescribeOption{sep-eval-sp}[-4]{ !\meta{cs-number} }
-This key sets the math space that is inserted in the evaluation superscript left to the point of evaluation. The space is only inserted when a non-blank superscript is given. The key's default value is \default{} \texttt{mu}.
-
-\subsubsection*{Switches}
-\DescribeOption*{switch-*}[false]{ true, false }
-The effect of the star's presence can be switched with the value \val{true}. That is, the function is typeset next to the fraction when the star is absent and in the numerator when the star is present. As an example, compare below where the option is turned on (\val{true}) and off (\val{false}),
-
-\eks{ \derivset{\pdv}[switch-/=false] \pdv{y}{x} ; \derivset{\pdv}[switch-/=true] \pdv{y}{x} }
-
-\noindent The key's default value is \default.
-
-\DescribeOption{switch-/}[false]{ true, false }
-The effect of the slash's presence can be switched with the value \val{true}. That is, the derivative is typeset with the fraction set by \key{style-frac-/} when the slash is absent and with the fraction set by \key{style-frac} when the slash is present. As an example, compare below where the option is turned on (\val{true}) and off (\val{false}),
-
-\eks{ \derivset{\pdv}[switch-*=false] \pdv{y}{x} ; \derivset{\pdv}[switch-*=true] \pdv{y}{x} }
-
-\noindent The key's default value is \default.
-
-\subsubsection*{Miscellaneous}
-\DescribeOption*{ misc-add-delims, misc-remove-delims }{ fun, var, frac }
-These two keys accepts its input as an comma-separated list of values such that
-\begin{verbatim}
- \derivset{\pdv}[misc-add-delims=fun]
- \derivset{\pdv}[misc-add-delims={fun,var}]
- \derivset{\pdv}[misc-add-delims={fun,var,frac}]
-\end{verbatim}
-are all valid, and the same goes for \key{misc-remove-delims}. The key \key{misc-add-delims}{} is used to insert the delimiters around the key's values, while \key{misc-remove-delims}{} is used to remove the inserted delimiters. The next example shows the key \key{misc-add-delims} in action
-
-\eks{\derivset{\pdv}[misc-add-delims=fun] \pdv{y}{x} ; \derivset{\pdv}[misc-add-delims={fun,var}] \pdv{y}{x} ; \derivset{\pdv}[misc-add-delims={fun,var,frac}] \pdv{y}{x}}
-
-\noindent All the above applies to \key{misc-remove-delims}{} as well, except it removes the delimiters. The effect of the key \key{misc-add-delims}{} is turned off (\val{false}) locally inside a derivative. This is to ensure that the option is not applied to more than one derivative when nested as shown below
-
-\eks{\derivset{\pdv}[misc-add-delims=var] \pdv*{\pdv{y}{x}}{x}}
-
-\noindent These two keys and this local behaviour are subject to change, see \cref{revis:add_remove,consid:add_remove_local} for more information.
-
-\subsubsection*{Sort}
-The keys given in this subsection will be briefly described here and a more in-depth description will be given in \cref{ssec:overall_order}.
-
-\DescribeOption{sort-method}[sign, symbol, abs]{abs, sign, symbol}
-This key sets the sorting method behind the mixed order using build in algorithms. The symbolic terms in the mixed order is sorted by sign, symbolic length and absolute value by the \val{sign}, \val{symbol} and \val{abs} algorithms, respectively. The key takes its input as a comma-separated list of values, accepting up to three values e.g.
-
-\eks*{\derivset{\pdv}[sort-method=sign] \pdv[c+kn,-b+2a]{f}{x,y}; \derivset{\pdv}[sort-method={sign,symbol}] \pdv[c+kn,-b+2a]{f}{x,y}; \derivset{\pdv}[sort-method={sign,symbol,abs}] \pdv[c+kn,-b+2a]{f}{x,y}}
-
-\noindent are valid inputs. Note how the terms in the mixed order are ordered using different sorting methods. This key is further described in \cref{ssec:sort-method}. The key's default value uses all three algorithms as \default.
-
-\DescribeOption{sort-numerical}[auto]{auto, first, last}
-This key determines where the numerical term\footnote{The numerical term is the sum of all the orders that does not contain any symbols, but solely consist of numbers.\label{foot:numerical-term}} is placed in the mixed order. Using the values \val{first} and \val{last}, then the numerical term will \emph{always} be placed as the first and last term in the mixed order, respectively. While the value \val{auto} will automatically determine where to place the numerical term depending on the sign of the first symbolic term; it is placed as the first and last term if the sign is negative and positive, respectively. This is shown below
-
-\eks*{\derivset{\pdv}[sort-numerical=first] \pdv[n,2]{f}{x,y}; \derivset{\pdv}[sort-numerical=last] \pdv[-n,2]{f}{x,y}}
-
-\noindent where the value \val{auto} would have placed the numerical term opposite in both equations. The key is further described in \cref{ssec:sort-numerical}, and its default value is \default.
-
-\DescribeOption{sort-sign-reverse}[false]{true, false}
-The sorting algorithm \val{sign} separates the positive and negative terms where the former is placed first and the latter last. The value \val{true} will reverse this ordering such that the negative terms is placed first and the positive terms last. See \cref{ssec:sort-reverse} for more information.
-
-\DescribeOption{sort-symbol-reverse}[false]{true, false}
-The sorting algorithm \val{symbol} separates the terms by their symbolic length, where the terms are ordered in a descending manner according to their length. If the value \val{true} is used, then the terms will ordered in a ascending manner instead. See \cref{ssec:sort-reverse} for more information.
-
-\DescribeOption{sort-abs-reverse}[false]{true, false}
-The sorting algorithm \val{number} separates the terms by their absolute value, where the terms are ordered in a descending manner. If the value \val{true} is used, then the terms will ordered in a ascending manner instead. See \cref{ssec:sort-reverse} for more information.
-
-\subsection{All derivatives} \label{ssec:both_options}
-The options in this subsection are applied to all of the derivatives that are defined by the package and you, because some options should be consisting regardless of the derivatives. The options are accessed using \macro{\derivset}[\marg*{all},\oarg{key=value}].
-
-\DescribeOption*{scale-auto}[leftright]{ leftright, mleftmright\req }
-This package uses \cs{left} and \cs{right} to automatically scale delimiters. The value \val{mleftmright} requires the \pkg{mleftright} package, which makes this package use \cs{mleft} and \cs{mright} instead.
-
-
-\clearpage
-\section{Defining variants} \label{sec:createvariants}
-This section goes into detail with how to define variants of the ordinary and partial derivative based on the package's internal commands, as mentioned earlier. The \mypackage{} package provides a \latex2 way of defining the derivatives. Thought it is preferable to define variants of the ordinary derivative over the partial derivative, unless one needs more than one variable of differentiation and access to the mixed order.
-
-\subsection{Variants of the ordinary derivative} \label{ssec:CreateOdvVariant}
-\DescribeMacro*{\NewOdvVariant, \RenewOdvVariant, \ProvideOdvVariant, \DeclareOdvVariant}{\meta{control-sequence}, \meta{inf-d}, \oarg{key=value}}
-This family of commands are used to define a variant of the ordinary derivative with the macro name \arg{1}. Moreover, the new derivative will use \arg{2} as its infinitesimal and inherit the package's default settings given in \cref{ssec:odv_options}, but they may be overwritten with \arg{3}. The difference between them, is as follows:
-
-\begin{itemize}
- \item \macro{1} is similar to \cs{NewDocumentCommand} of the \pkg{xparse} package and will issue an error if \arg{1} has already been defined.
- \item \macro{2} is similar to \cs{RenewDocumentCommand} of the \pkg{xparse} package and will issue an error if \arg{1} has not previously been defined.
- \item \macro{3} is similar to \cs{ProvideDocumentCommand} of the \pkg{xparse} package and will define \arg{1} if it does not have an existing definition. It will not issue any errors.
- \item \macro{4} is similar to \cs{DeclareDocumentCommand} of the \pkg{xparse} package and will always define the \arg{1} with the new definition regardless of whether it already exists.
-\end{itemize}
-
-\DescribeArg*{\arg{1}}
-The first argument is the macro name of the derivative that is to be defined.
-
-\DescribeArg{\arg{2}}
-While the second argument makes the derivative \arg{1} use \arg{2} as the infinitesimal, like \enquote{d} is used as the infinitesimal in the ordinary derivative \macro{\odv}. The argument must be a \emph{single token} thought this is subject to change, see \cref{consid:infd_single_token}.
-
-\DescribeArg{\arg{3}}
-The optional argument accepts its input as a comma-separated list of \emph{key=value} pairs, which overrides the package's default options for the keys given. Leaving out this argument, then the derivative will use the package's default settings.
-
-\subsection{Variants of the partial derivative} \label{ssec:CreatePdvVariant}
-\DescribeMacro{\NewPdvVariant, \RenewPdvVariant, \ProvidePdvVariant, \DeclarePdvVariant}{\meta{control-sequence}, \meta{inf-p}, \oarg{key=value}}
-This family of commands are used to define a variant of the partial derivative with the macro name \arg{1}. Moreover, the new derivative will use \arg{2} as its infinitesimal and inherit the package's default options given in \cref{ssec:pdv_options}, but they may be overwritten with \arg{3}. The difference between them is as follows:
-
-\begin{itemize}
- \item \macro{1} is similar to \cs{NewDocumentCommand} of the \pkg{xparse} package and will issue an error if \arg{1} has already been defined.
- \item \macro{2} is similar to \cs{RenewDocumentCommand} of the \pkg{xparse} package and will issue an error if \arg{1} has not previously been defined.
- \item \macro{3} is similar to \cs{ProvideDocumentCommand} of the \pkg{xparse} package and will define \arg{1} if it does not have an existing definition. It will not issue any errors.
- \item \macro{4} is similar to \cs{DeclareDocumentCommand} of the \pkg{xparse} package and will always define the \arg{1} with the new definition regardless of whether it already exists.
-\end{itemize}
-
-\DescribeArg*{\arg{1}}
-The first argument is the macro name of the derivative that is to be defined.
-
-\DescribeArg{\arg{2}}
-While the second argument makes the derivative \arg{1} use \arg{2} as the infinitesimal, like \enquote{$\partial$} is used as the infinitesimal in the partial derivative \macro{\pdv}. The argument must be a \emph{single token} thought this is subject to change, see \cref{consid:infd_single_token}.
-
-\DescribeArg{\arg{3}}
-The optional argument accepts its input as a comma-separated list of \emph{key=value} pairs, which overrides the package's default options for the keys given. Leaving out this argument, then the derivative will use the package's default settings.
-
-
-\clearpage
-\section{The mixed order} \label{ssec:overall_order}
-
-\subsection{Sorting algorithms} \label{ssec:sort-method}
-A unique feature of this package is that the sorting method behind the mixed order may be changed using built-in algorithms and there are currently three algorithms available: \val{sign}, \val{symbol} and \val{abs} which are explained below. The algorithms have been chosen such that it the terms in the mixed order may be arranged in many ways with as few algorithms as possible to suit your liking. A sorting method may consist of up to three algorithms which are applied in layers.
-
-\begin{itemize}
- \item The sorting algorithm \val{sign} separates the positive and negative terms, putting the former terms first and the latter terms last in the mixed order. Using the option \keyval{sort-sign-reverse}{true}, then this ordering is reversed such that the negative terms appear before the positive terms.
- \item The sorting algorithm \val{symbol} separates the terms by their symbolic length, where the terms are ordered in a descending manner according to their length. Using the option \keyval{sort-symbol-reverse}{true}, then the terms are ordered in a ascending manner instead.
- \item The sorting by \val{abs} separates the terms by their absolute value, where the terms are ordered in a descending manner according to their absolute value. Using the option \keyval{sort-abs-reverse}{true}, then the terms are ordered in an ascending manner instead.
-\end{itemize}
-
-When using the option \keyval{sort-method}{\{...\}}, the number of algorithms determines the number of layers e.g. \keyval{sort-method}{sign,symbol} is a sorting method with two layers, where the algorithms \val{sign} and \val{symbol} are applied in layer \num{1} and layer \num{2}, respectively. It should be understood as that the \val{sign} algorithm splits the terms into two groups, one with positive terms and one with negative terms. Then the \val{symbol} algorithm will order the terms within each groups according to the terms symbolic length. The mixed order is then formed by combining these two groups such that the positive terms comes first.
-
-The next subsubsection is dedicated to give some examples of how the algorithms in this package sorts the mixed order.
-
-\subsubsection{Examples}
-The examples are constructed of a partial derivative with the comma separated list of orders given by \texttt{[3a-3hh-2b, 4c+4gg+2ff, -5d-5ee]} and a close up view of the mixed order. Square brackets are used to indicate grouping of terms and the text below a group refers to the algorithm applied. Here the words positive and negative, long and short, and big and low refers to the \val{sign}, \val{symbol}, and \val{abs} algorithms, respectively. A row of square brackets represents a layer.
-
-The packages default sorting method is \keyval{sort-method}{sign,symbol,abs}, which is used below. The \val{sign} algorithm separate the positive and negative terms in the first layer. While in the second layer, the terms are separated by symbol length etc.
-\begin{equation*}
+ \end{equation*}
+ where it have been split into four to give a better overview.
+
+ \begin{option}{sep-inf-ord}
+ \begin{values}[default = 0]
+ \meta{cs-number}
+ \end{values}
+ This key sets the math space that is inserted in the infinitesimal's power left to the mixed order. It is only inserted when the mixed order is different from \num{1}. The key's default value is \default{} \texttt{mu}.
+ \end{option}
+
+ \begin{option}{sep-inf-fun}
+ \begin{values}[default = 0]
+ \meta{cs-number}
+ \end{values}
+ This key sets the math space that is inserted between the infinitesimal and the function when the mixed order \emph{is equal} to \num{1}. The space is only inserted when a non-blank function is printed \emph{in the numerator}. The key's default value is \default{} \texttt{mu}.
+ \end{option}
+
+ \begin{option}{sep-ord-fun}
+ \begin{values}[default = 0]
+ \meta{cs-number}
+ \end{values}
+ This key sets the math space that is inserted between the infinitesimal and the function when the mixed order \emph{is different} from \num{1}. The space is only inserted when a non-blank function is printed \emph{in the numerator}. The key's default value is \default{} \texttt{mu}.
+ \end{option}
+
+ \begin{option}{sep-inf-var}
+ \begin{values}[default = 0]
+ \meta{cs-number}
+ \end{values}
+ This key sets the math space that is inserted between the infinitesimal and the following variable. The space is only inserted when a non-blank variable is given. The key's default value is \default{} \texttt{mu}.
+ \end{option}
+
+ \begin{option}{sep-var-ord}
+ \begin{values}[default = 0]
+ \meta{cs-number}
+ \end{values}
+ This key sets the math space that is inserted in a variable's power left to the order. The space is only inserted when the order is different from \num{1}. The key's default value is \default{} \texttt{mu}.
+ \end{option}
+
+ \begin{option}{sep-var-inf}
+ \begin{values}[default = 3]
+ \meta{cs-number}
+ \end{values}
+ They key sets the math space that is inserted between a variable and the following infinitesimal. The space is only inserted when the variable's order \emph{is equal} to \num{1}. It is only inserted when more than one non-blank variables are given. The key's default value is \default{} \texttt{mu}.
+ \end{option}
+
+ \begin{option}{sep-ord-inf}
+ \begin{values}[default = 3]
+ \meta{cs-number}
+ \end{values}
+ They key sets the math space that is inserted between a variable and the following infinitesimal. The space is only inserted when the variable's order \emph{is different} from \num{1}. It is only inserted when more than one non-blank variables are given. The key's default value is \default{} \texttt{mu}.
+ \end{option}
+
+ \begin{option}{sep-eval-sb}
+ \begin{values}[default = -4]
+ \meta{cs-number}
+ \end{values}
+ This key sets the math space that is inserted in the evaluation subscript left to the point of evaluation. The space is only inserted when a non-blank subscript is given. The key's default value is \default{} \texttt{mu}.
+ \end{option}
+
+ \begin{option}{sep-eval-sp}
+ \begin{values}[default = -4]
+ \meta{cs-number}
+ \end{values}
+ This key sets the math space that is inserted in the evaluation superscript left to the point of evaluation. The space is only inserted when a non-blank superscript is given. The key's default value is \default{} \texttt{mu}.
+ \end{option}
+
+ \subsubsection*{Switches}
+
+ \begin{option}*{switch-*}
+ \begin{values}[default = false]
+ true, false
+ \end{values}
+ The effect of the star's presence can be switched with the value \val{true}. That is, the function is typeset next to the fraction when the star is absent and in the numerator when the star is present. As an example, compare below where the option is turned on (\val{true}) and off (\val{false}),
+
+ \begin{example}
+ \derivset{\pdv}[switch-/=false] \pdv{y}{x} \\
+ \derivset{\pdv}[switch-/=true] \pdv{y}{x}
+ \end{example}
+
+ \noindent The key's default value is \default.
+ \end{option}
+
+ \begin{option}{switch-/}
+ \begin{values}[default = false]
+ true, false
+ \end{values}
+ The effect of the slash's presence can be switched with the value \val{true}. That is, the derivative is typeset with the fraction set by \key{style-frac-/} when the slash is absent and with the fraction set by \key{style-frac} when the slash is present. As an example, compare below where the option is turned on (\val{true}) and off (\val{false}),
+
+ \begin{example}
+ \derivset{\pdv}[switch-/=false] \pdv{y}{x} \\
+ \derivset{\pdv}[switch-/=true] \pdv{y}{x}
+ \end{example}
+
+ \noindent The key's default value is \default.
+ \end{option}
+
+ \subsubsection*{Miscellaneous}
+
+ \begin{option}*{misc-add-delims, misc-remove-delims}
+ \begin{values}
+ fun, var, frac
+ \end{values}
+ These two keys accepts its input as an comma-separated list of values such that
+ \begin{verbatim}
+ \derivset{\pdv}[misc-add-delims=fun]
+ \derivset{\pdv}[misc-add-delims={fun,var}]
+ \derivset{\pdv}[misc-add-delims={fun,var,frac}]
+ \end{verbatim}
+ are all valid, and the same goes for \key{misc-remove-delims}. The key \key{misc-add-delims}{} is used to insert the delimiters around the key's values, while \key{misc-remove-delims}{} is used to remove the inserted delimiters. The next example shows the key \key{misc-add-delims} in action
+
+ \begin{example}
+ \derivset{\pdv}[misc-add-delims=fun] \pdv{y}{x} \\
+ \derivset{\pdv}[misc-add-delims={fun,var}] \pdv{y}{x} \\
+ \derivset{\pdv}[misc-add-delims={fun,var,frac}] \pdv{y}{x}
+ \end{example}
+
+ \noindent All the above applies to \key{misc-remove-delims}{} as well, except it removes the delimiters. The effect of the key \key{misc-add-delims}{} is turned off (\val{false}) locally inside a derivative. This is to ensure that the option is not applied to more than one derivative when nested as shown below
+
+ \begin{example}
+ \derivset{\pdv}[misc-add-delims=var] \pdv*{\pdv{y}{x}}{x}
+ \end{example}
+
+ \noindent These two keys and this local behaviour are subject to change, see \cref{revis:add_remove,consid:add_remove_local} for more information.
+ \end{option}
+
+ \subsubsection*{Sort}
+ The keys given in this subsection will be briefly described here and a more in-depth description will be given in \cref{ssec:overall_order}.
+
+ \begin{option}{sort-method}
+ \begin{values}[default = {sign, symbol, abs}]
+ abs, sign, symbol
+ \end{values}
+ This key sets the sorting method behind the mixed order using build in algorithms. The symbolic terms in the mixed order is sorted by sign, symbolic length and absolute value by the \val{sign}, \val{symbol} and \val{abs} algorithms, respectively. The key takes its input as a comma-separated list of values, accepting up to three values e.g.
+
+ \begin{example}*
+ \derivset{\pdv}[sort-method=sign] \pdv[c+kn,-b+2a]{f}{x,y} \\
+ \derivset{\pdv}[sort-method={sign,symbol}] \pdv[c+kn,-b+2a]{f}{x,y} \\
+ \derivset{\pdv}[sort-method={sign,symbol,abs}] \pdv[c+kn,-b+2a]{f}{x,y}
+ \end{example}
+
+ \noindent are valid inputs. Note how the terms in the mixed order are ordered using different sorting methods. This key is further described in \cref{ssec:sort-method}. The key's default value uses all three algorithms as \default.
+ \end{option}
+
+ \begin{option}{sort-numerical}
+ \begin{values}[default = auto]
+ auto, first, last
+ \end{values}
+ This key determines where the numerical term\footnote{The numerical term is the sum of all the orders that does not contain any symbols, but solely consist of numbers.\label{foot:numerical-term}} is placed in the mixed order. Using the values \val{first} and \val{last}, then the numerical term will \emph{always} be placed as the first and last term in the mixed order, respectively. While the value \val{auto} will automatically determine where to place the numerical term depending on the sign of the first symbolic term; it is placed as the first and last term if the sign is negative and positive, respectively. This is shown below
+
+ \begin{example}*
+ \derivset{\pdv}[sort-numerical=first] \pdv[n,2]{f}{x,y} \\
+ \derivset{\pdv}[sort-numerical=last] \pdv[-n,2]{f}{x,y}
+ \end{example}
+
+ \noindent where the value \val{auto} would have placed the numerical term opposite in both equations. The key is further described in \cref{ssec:sort-numerical}, and its default value is \default.
+ \end{option}
+
+ \begin{option}{sort-sign-reverse}
+ \begin{values}[default = false]
+ true, false
+ \end{values}
+ The sorting algorithm \val{sign} separates the positive and negative terms where the former is placed first and the latter last. The value \val{true} will reverse this ordering such that the negative terms is placed first and the positive terms last. See \cref{ssec:sort-reverse} for more information.
+ \end{option}
+
+ \begin{option}{sort-symbol-reverse}
+ \begin{values}[default = false]
+ true, false
+ \end{values}
+ The sorting algorithm \val{symbol} separates the terms by their symbolic length, where the terms are ordered in a descending manner according to their length. If the value \val{true} is used, then the terms will ordered in a ascending manner instead. See \cref{ssec:sort-reverse} for more information.
+ \end{option}
+
+ \begin{option}{sort-abs-reverse}
+ \begin{values}[default = false]
+ true, false
+ \end{values}
+ The sorting algorithm \val{number} separates the terms by their absolute value, where the terms are ordered in a descending manner. If the value \val{true} is used, then the terms will ordered in a ascending manner instead. See \cref{ssec:sort-reverse} for more information.
+ \end{option}
+
+ \subsection{All derivatives} \label{ssec:both_options}
+ The options in this subsection are applied to all of the derivatives that are defined by the package and you, because some options should be consisting regardless of the derivatives. The options are accessed using \macro{\derivset}[\narg{all},\oarg{key=value}].
+
+ \begin{option}{scale-auto}
+ \begin{values}[default = leftright]
+ leftright, mleftmright\req
+ \end{values}
+ This package uses \cs{left} and \cs{right} to automatically scale delimiters. The value \val{mleftmright} requires the \pkg{mleftright} package, which makes this package use \cs{mleft} and \cs{mright} instead.
+ \end{option}
+
+
+
+ \clearpage
+ \section{Defining variants} \label{sec:createvariants}
+ This section goes into detail with how to define variants of the ordinary and partial derivative based on the package's internal commands, as mentioned earlier. The \mypackage{} package provides a \latex2 way of defining the derivatives. Thought it is preferable to define variants of the ordinary derivative over the partial derivative, unless one needs more than one variable of differentiation and access to the mixed order.
+
+ \subsection{Variants of the ordinary derivative} \label{ssec:CreateOdvVariant}
+
+ \begin{function}*{\NewOdvVariant, \RenewOdvVariant, \ProvideOdvVariant, \DeclareOdvVariant}
+ \begin{syntax}
+ \meta{control-sequence}, \meta{inf-d}, \oarg{key=value}
+ \end{syntax}
+ This family of commands are used to define a variant of the ordinary derivative with the macro name \arg{1}. Moreover, the new derivative will use \arg{2} as its infinitesimal and inherit the package's default settings given in \cref{ssec:odv_options}, but they may be overwritten with \arg{3}. The difference between them, is as follows:
+ \begin{itemize}
+ \item \macro{1} is similar to \cs{NewDocumentCommand} of the \pkg{xparse} package and will issue an error if \arg{1} has already been defined.
+ \item \macro{2} is similar to \cs{RenewDocumentCommand} of the \pkg{xparse} package and will issue an error if \arg{1} has not previously been defined.
+ \item \macro{3} is similar to \cs{ProvideDocumentCommand} of the \pkg{xparse} package and will define \arg{1} if it does not have an existing definition. It will not issue any errors.
+ \item \macro{4} is similar to \cs{DeclareDocumentCommand} of the \pkg{xparse} package and will always define the \arg{1} with the new definition regardless of whether it already exists.
+ \end{itemize}
+
+ \begin{argument}{1}
+ The first argument is the macro name of the derivative that is to be defined.
+ \end{argument}
+
+ \begin{argument}{2}
+ While the second argument makes the derivative \arg{1} use \arg{2} as the infinitesimal, like \enquote{d} is used as the infinitesimal in the ordinary derivative \macro{\odv}. The argument must be a \emph{single token} thought this is subject to change, see \cref{consid:infd_single_token}.
+ \end{argument}
+
+ \begin{argument}{3}
+ The optional argument accepts its input as a comma-separated list of \emph{key=value} pairs, which overrides the package's default options for the keys given. Leaving out this argument, then the derivative will use the package's default settings.
+ \end{argument}
+ \end{function}
+
+ \subsection{Variants of the partial derivative} \label{ssec:CreatePdvVariant}
+
+ \begin{function}*{\NewPdvVariant, \RenewPdvVariant, \ProvidePdvVariant, \DeclarePdvVariant}
+ \begin{syntax}
+ \meta{control-sequence}, \meta{inf-p}, \oarg{key=value}
+ \end{syntax}
+ This family of commands are used to define a variant of the partial derivative with the macro name \arg{1}. Moreover, the new derivative will use \arg{2} as its infinitesimal and inherit the package's default options given in \cref{ssec:pdv_options}, but they may be overwritten with \arg{3}. The difference between them is as follows:
+
+ \begin{itemize}
+ \item \macro{1} is similar to \cs{NewDocumentCommand} of the \pkg{xparse} package and will issue an error if \arg{1} has already been defined.
+ \item \macro{2} is similar to \cs{RenewDocumentCommand} of the \pkg{xparse} package and will issue an error if \arg{1} has not previously been defined.
+ \item \macro{3} is similar to \cs{ProvideDocumentCommand} of the \pkg{xparse} package and will define \arg{1} if it does not have an existing definition. It will not issue any errors.
+ \item \macro{4} is similar to \cs{DeclareDocumentCommand} of the \pkg{xparse} package and will always define the \arg{1} with the new definition regardless of whether it already exists.
+ \end{itemize}
+
+ \begin{argument}{1}
+ The first argument is the macro name of the derivative that is to be defined.
+ \end{argument}
+
+ \begin{argument}{2}
+ While the second argument makes the derivative \arg{1} use \arg{2} as the infinitesimal, like \enquote{$\partial$} is used as the infinitesimal in the partial derivative \macro{\pdv}. The argument must be a \emph{single token} thought this is subject to change, see \cref{consid:infd_single_token}.
+ \end{argument}
+
+ \begin{argument}{3}
+ The optional argument accepts its input as a comma-separated list of \emph{key=value} pairs, which overrides the package's default options for the keys given. Leaving out this argument, then the derivative will use the package's default settings.
+ \end{argument}
+ \end{function}
+
+
+
+ \clearpage
+ \section{The mixed order} \label{ssec:overall_order}
+
+ \subsection{Sorting algorithms} \label{ssec:sort-method}
+ A unique feature of this package is that the sorting method behind the mixed order may be changed using built-in algorithms and there are currently three algorithms available: \val{sign}, \val{symbol} and \val{abs} which are explained below. The algorithms have been chosen such that it the terms in the mixed order may be arranged in many ways with as few algorithms as possible to suit your liking. A sorting method may consist of up to three algorithms which are applied in layers.
+
+ \begin{itemize}
+ \item The sorting algorithm \val{sign} separates the positive and negative terms, putting the former terms first and the latter terms last in the mixed order. Using the option \keyval{sort-sign-reverse}{true}, then this ordering is reversed such that the negative terms appear before the positive terms.
+ \item The sorting algorithm \val{symbol} separates the terms by their symbolic length, where the terms are ordered in a descending manner according to their length. Using the option \keyval{sort-symbol-reverse}{true}, then the terms are ordered in a ascending manner instead.
+ \item The sorting by \val{abs} separates the terms by their absolute value, where the terms are ordered in a descending manner according to their absolute value. Using the option \keyval{sort-abs-reverse}{true}, then the terms are ordered in an ascending manner instead.
+ \end{itemize}
+
+ When using the option \keyval{sort-method}{\{...\}}, the number of algorithms determines the number of layers e.g. \keyval{sort-method}{sign,symbol} is a sorting method with two layers, where the algorithms \val{sign} and \val{symbol} are applied in layer \num{1} and layer \num{2}, respectively. It should be understood as that the \val{sign} algorithm splits the terms into two groups, one with positive terms and one with negative terms. Then the \val{symbol} algorithm will order the terms within each groups according to the terms symbolic length. The mixed order is then formed by combining these two groups such that the positive terms comes first.
+
+ The next subsubsection is dedicated to give some examples of how the algorithms in this package sorts the mixed order.
+
+ \subsubsection{Examples}
+ The examples are constructed of a partial derivative with the comma separated list of orders given by \texttt{[3a-3hh-2b, 4c+4gg+2ff, -5d-5ee]} and a close up view of the mixed order. Square brackets are used to indicate grouping of terms and the text below a group refers to the algorithm applied. Here the words positive and negative, long and short, and big and low refers to the \val{sign}, \val{symbol}, and \val{abs} algorithms, respectively. A row of square brackets represents a layer.
+
+ The packages default sorting method is \keyval{sort-method}{sign,symbol,abs}, which is used below. The \val{sign} algorithm separate the positive and negative terms in the first layer. While in the second layer, the terms are separated by symbol length etc.
+ \begin{equation*}
\derivset{\pdv}[sort-method = {sign,symbol,abs}]
\pdv[3a-3hh-2b, 4c+4gg+2ff, -5d-5ee]{f}{x,y,z}
-\end{equation*}
-\begin{equation*}
+ \end{equation*}
+ \begin{equation*}
\low{
\low{
\low{4gg}{big} +
@@ -1246,13 +2082,13 @@ The packages default sorting method is \keyval{sort-method}{sign,symbol,abs}, wh
\low[2,2]{2b}{low}
}{short}
}{negative}
-\end{equation*}
-as expected. Interchanging \val{sign} and \val{symbol} algorithms from the previous example i.e \keyval{sort-method}{symbol, sign, abs}, then the \val{symbol} \cal{sign} algorithms are now applied in the first and second layer, respectively. The result is shown below
-\begin{equation*}
+ \end{equation*}
+ as expected. Interchanging \val{sign} and \val{symbol} algorithms from the previous example i.e \keyval{sort-method}{symbol, sign, abs}, then the \val{symbol} \cal{sign} algorithms are now applied in the first and second layer, respectively. The result is shown below
+ \begin{equation*}
\derivset{\pdv}[sort-method = {symbol,sign,abs}]
\pdv[3a-3hh-2b, 4c+4gg+2ff, -5d-5ee]{f}{x,y,z}
-\end{equation*}
-\begin{equation*}
+ \end{equation*}
+ \begin{equation*}
\low{
\low{
\low{4gg}{big} +
@@ -1273,15 +2109,15 @@ as expected. Interchanging \val{sign} and \val{symbol} algorithms from the previ
\low[2,2]{2b}{low}
}{negative}
}{short}
-\end{equation*}
-where a clear difference is seen between the above two examples.
-
-The above two examples used 3-layer sorting methods but as mentioned earlier, the sorting method can also be constructed with one and two algorithms i.e. 1-layer and 2-layer sorting methods. A sorting method with two layers could be constructed as \keyval{sort-method}{sign,symbol} and with it, the terms are ordered by sign and then symbolic length. In this case, there is not a third layer. Instead, the terms \enquote{appear randomly} according to their absolute value as shown below
-\begin{equation*}
+ \end{equation*}
+ where a clear difference is seen between the above two examples.
+
+ The above two examples used 3-layer sorting methods but as mentioned earlier, the sorting method can also be constructed with one and two algorithms i.e. 1-layer and 2-layer sorting methods. A sorting method with two layers could be constructed as \keyval{sort-method}{sign,symbol} and with it, the terms are ordered by sign and then symbolic length. In this case, there is not a third layer. Instead, the terms \enquote{appear randomly} according to their absolute value as shown below
+ \begin{equation*}
\derivset{\pdv}[sort-method = {sign,symbol}]
\pdv[3a-3hh-2b, 4c+4gg+2ff, -5d-5ee]{f}{x,y,z}
-\end{equation*}
-\begin{equation*}
+ \end{equation*}
+ \begin{equation*}
\low{
\low{ 4gg + 2ff }{long} +
\low{ 3a + 4c }{short}
@@ -1290,103 +2126,158 @@ The above two examples used 3-layer sorting methods but as mentioned earlier, th
\low{ 3hh - 5ee }{long} -
\low{ 2b - 5d }{short}
}{negative}
-\end{equation*}
-It is seen that the first two terms came out in a descending manner according to their absolute value, while the next two terms came out in a ascending manner. Hence the choice of word: \enquote{appear randomly}. The last example shows a 1-layer sorting method given as \keyval{sort-method}{symbol} which gives the result
-\begin{equation*}
+ \end{equation*}
+ It is seen that the first two terms came out in a descending manner according to their absolute value, while the next two terms came out in a ascending manner. Hence the choice of word: \enquote{appear randomly}. The last example shows a 1-layer sorting method given as \keyval{sort-method}{symbol} which gives the result
+ \begin{equation*}
\derivset{\pdv}[sort-method = symbol]
\pdv[3a-3hh-2b, 4c+4gg+2ff, -5d-5ee]{f}{x,y,z}
-\end{equation*}
-\begin{equation*}
+ \end{equation*}
+ \begin{equation*}
\low{ - 3hh + 4gg + 2ff - 5ee }{long} +
\low{ 3a - 2b + 4c - 5d }{short}
-\end{equation*}
-where it can be see that the terms are not ordered by sign nor absolute value. A fourth sorting algorithm might be implemented in the future, see \cref{consid:sort_number} for more information.
-
-\subsection{The numerical term} \label{ssec:sort-numerical}
-With the symbolic part of the mixed order treated, it is time to look at the numerical term\footref{foot:numerical-term}. For this reason it is treated differently than the symbolic terms. Currently it is only possible to control its position in the mixed order.
-
-The numerical term may be placed either at the beginning or at the end of the mixed order with the values \val{first} and \val{last}, respectively. Thought it is also possible to have the package automatically determine where to place the term with the value \val{auto}. Compare below
-\begin{align*}
+ \end{equation*}
+ where it can be see that the terms are not ordered by sign nor absolute value. A fourth sorting algorithm might be implemented in the future, see \cref{consid:sort_number} for more information.
+
+ \subsection{The numerical term} \label{ssec:sort-numerical}
+ With the symbolic part of the mixed order treated, it is time to look at the numerical term\footref{foot:numerical-term}. For this reason it is treated differently than the symbolic terms. Currently it is only possible to control its position in the mixed order.
+
+ The numerical term may be placed either at the beginning or at the end of the mixed order with the values \val{first} and \val{last}, respectively. Thought it is also possible to have the package automatically determine where to place the term with the value \val{auto}. Compare below
+ \begin{align*}
\text{\keyval{sort-numerical}{auto}:} & \quad \pdv[\beta, 2]{f}{x,y} \qquad \pdv[\beta, -2]{f}{x,y} \qquad \pdv[-\beta, 2]{f}{x,y} \qquad \pdv[-\beta, -2]{f}{x,y} \\
\text{\keyval{sort-numerical}{first}:} & \quad \derivset{\pdv}[sort-numerical = first]
\pdv[\beta, 2]{f}{x,y} \qquad \pdv[\beta, -2]{f}{x,y} \qquad \pdv[-\beta, 2]{f}{x,y} \qquad \pdv[-\beta, -2]{f}{x,y} \\
\text{\keyval{sort-numerical}{last}:} & \quad \derivset{\pdv}[sort-numerical = last]
\pdv[\beta, 2]{f}{x,y} \qquad \pdv[\beta, -2]{f}{x,y} \qquad \pdv[-\beta, 2]{f}{x,y} \qquad \pdv[-\beta, -2]{f}{x,y}
-\end{align*}
-These three options should satisfy every need, but there might come more options, see \cref{consid:sort_numerical}.
-
-\subsection{Reversing the sort algorithm} \label{ssec:sort-reverse}
-The three reverse keys serves to reverse the sorting order of the sorting algorithms. This allows for even greater flexibility over the sorting method by \enquote{doubling} the number of algorithms. So if the default ordering of an algorithm is not wished it may be reversed with the corresponding reverse key. For example, the \val{sign} algorithm places the positive terms first and the negative terms last, but using the option \keyval{sort-sign-reverse}{true} will place the negative terms first and positive terms last. The reverse keys in action are shown below
-\begin{align*}
+ \end{align*}
+ These three options should satisfy every need, but there might come more options, see \cref{consid:sort_numerical}.
+
+ \subsection{Reversing the sort algorithm} \label{ssec:sort-reverse}
+ The three reverse keys serves to reverse the sorting order of the sorting algorithms. This allows for even greater flexibility over the sorting method by \enquote{doubling} the number of algorithms. So if the default ordering of an algorithm is not wished it may be reversed with the corresponding reverse key. For example, the \val{sign} algorithm places the positive terms first and the negative terms last, but using the option \keyval{sort-sign-reverse}{true} will place the negative terms first and positive terms last. The reverse keys in action are shown below
+ \begin{align*}
\text{\keyval{sort-sign-reverse}{false}:} & \quad \derivset{\pdv}[sort-sign-reverse = false] \pdv[a, -b]{f}{x,y} &
\text{\keyval{sort-sign-reverse}{true}:} & \quad \derivset{\pdv}[sort-sign-reverse = true] \pdv[a, -b]{f}{x,y} \\
\text{\keyval{sort-symbol-reverse}{false}:} & \quad \derivset{\pdv}[sort-symbol-reverse = false] \pdv[ab, c]{f}{x,y} &
\text{\keyval{sort-symbol-reverse}{true}:} & \quad \derivset{\pdv}[sort-symbol-reverse = true] \pdv[ab, c]{f}{x,y} \\
\text{\keyval{sort-abs-reverse}{false}:} & \quad \derivset{\pdv}[sort-abs-reverse = false] \pdv[2a, b]{f}{x,y} &
\text{\keyval{sort-abs-reverse}{true}:} & \quad \derivset{\pdv}[sort-abs-reverse = true] \pdv[2a, b]{f}{x,y}
-\end{align*}
-
-
-\clearpage
-\section{Miscellaneous}
-
-\subsection{Slashfrac}\label{ssec:slashfrac}
-\DescribeMacro*{\slashfrac}{ \oarg{scale}, \marg{numerator}, \marg{denominator} }
-A text-styled fraction i.e. $\slashfrac{a}{b}$, is commonly used in text-mode. While \macro{\slashfrac}[\marg*{a},\marg*{b}] is certainly longer to write than \texttt{a/b}, which only requires three keystrokes, but for the implementation of text-styled derivatives, a macro is needed anyway.
-
-\DescribeArg{\arg{1}}
-The optional argument is the scaling parameter for the slash and takes the inputs as shown below. Leaving out \arg{1} sets the scaling parameter to \val{auto}
-
-\eks{\slashfrac[auto]{y_f}{x} ; \slashfrac[none]{y_f}{x} ; \slashfrac[big]{y_f}{x} ; \slashfrac[Big]{y_f}{x} ; \slashfrac[bigg]{y_f}{x} ; \slashfrac[Bigg]{y_f}{x}}
-
-This argument is subject to change, see \cref{consid:slashfrac_opt,consid:slashfrac_def_scale} for more information.
-
-\DescribeArg{\arg{2}}
-This argument typeset the fraction's numerator.
-
-\DescribeArg{\arg{3}}
-This argument typeset the fraction's denominator.
-
-
-\clearpage
-\section{To do}
-
-\subsection{Future implementation}
-The list describes what \emph{will be added} to the package in a later release.
-\begin{todo}
- \item Define commands that can create variants of infinitesimal like $\symup{d}$, $\partial$, $\delta$ etc. for use in integrals $\int f(x) \mathop{}\!\symup{d}x$, in differential equations $\pdv{f}{x} \mathop{}\! \symup{d}x + \pdv{f}{y}\mathop{}\! \symup{d}y$ and a shorthand notation of the partial derivative $\partial_{xx}f(x,y)$.
- \item Implement the option to turn off the sorting of the terms in the mixed order. This could be made as a \val{draft} / \val{final} option.
-\end{todo}
-
-\subsection{Future changes}
-The list describes what \emph{will be changed} in the package in a later release.
-\begin{revision}
- \item A complete rewrite of the options \key*{misc-add-delims} and \key*{misc-remove-delims} is necessary so that they have a clearer syntax. Moreover, the value \val{var} needs to work differently (and correctly) for the partial derivatives and variants hereof( pretty much useless here). \label{revis:add_remove}
-\end{revision}
-
-\subsection{Future considerations}
-The list describes what \emph{might be changed or added} to the package in a later release.
-\begin{consideration}
- \item As mentioned earlier in the documentation, I heavily consider to change the optional argument \oarg{order} to a \oarg{key=value} argument. Of course this will lead to some changes: \label{consid:order2keyval}
- \begin{itemize}
- \item I would need a way to set the order of differentiation.. I am thinking of something like a key value option; \keyval*{order}{\marg{cs-orders}}.
- \item Such an option should not be possible to be set with \macro*{\derivset} or in the definition of a new derivative (or maybe if one really needs a lot of higher order derivative).
- \end{itemize}
- \item With the above consideration, than it would only be natural to remove the mixed order and then have an option \keyval*{mixed-order}{\marg{mixed-order}}. Likewise, it should not be possible to be set with \macro*{\derivset} or in the definition of a new derivative. \label{consid:RemoveMixedOrder}
- \item Currently \macro*{\derivset}'s optional argument \oarg{key=val}, when not given, sets the derivatives options to the package default settings. This should probably be changed to the options set in the definition of the derivative. \label{consid:DerivsetOptional}
- \item It can become rather cumbersome to read a derivative with a very long function. To ease this up, I am considering to add a switch that exchange the variable and the function arguments. But this might be against the \latex{} way of using arguments, which is reason I have not done it and I would like feedback on it. \label{consid:Fun_Var_switch}
- \item Should I add a key, possible a switch, that turn on/off the local behaviour \key*{misc-add-delims} and \key*{misc-remove-delims} inside derivative? \label{consid:add_remove_local}
- \item It was mentioned in \cref{sec:createvariants}, that the second argument of \cs{\ldots Varaint} should be a single token, e.g. meaning that \macro*{\NewOdvVariant}[\marg*{\cs{myvariant}},\marg*{\cs{partial}\_\cs{mu}}] is not allowed but \macro*{\NewOdvVariant}[\marg*{\cs{myvariant}},\marg*{\marg*{\cs{partial}\_\cs{mu}}}] is. It can easily be change to accept a multi token input. \label{consid:infd_single_token}
- \item Should I add the option to \key*{sort-numerical}, so that it is treated as a symbolic term instead of a numerical term? \label{consid:sort_numerical}
- \item Should I add a sorting algorithm that order the terms according to their number (including sign)? \label{consid:sort_number}
- \item I am considering making the optional argument of \macro*{\slashfrac} into a \oarg{key=value} argument with something like \keyval*{scale}{\marg{scaling}}. \label{consid:slashfrac_opt}
- \item Should the default scaling for \macro*{\slashfrac} be \val{auto} or \val{none}? Or should it be possible to set it with something like \cs{slashfracset}\oarg{key=value}? \label{consid:slashfrac_def_scale}
-\end{consideration}
-
-\clearpage
-\addsec{Index}
-Numbers in bold refer to the page where the entry is defined.
-\printindex[option]
-\printindex[macro]
-
+ \end{align*}
+
+
+
+ \clearpage
+ \section{Miscellaneous}
+
+ \subsection{Slashfrac}\label{ssec:slashfrac}
+ \begin{function}*{\slashfrac}
+ \begin{syntax}
+ \oarg{scale}, \marg{numerator}, \marg{denominator}
+ \end{syntax}
+ A text-styled fraction i.e. $\slashfrac{a}{b}$, is commonly used in text-mode. While \macro{\slashfrac}[\narg{a},\narg{b}] is certainly longer to write than \texttt{a/b}, which only requires three keystrokes, but for the implementation of text-styled derivatives, a macro is needed anyway.
+
+ \begin{argument}{1}
+ The optional argument is the scaling parameter for the slash and takes the inputs as shown below. Leaving out \arg{1} sets the scaling parameter to \val{auto}
+ \begin{example}
+ \slashfrac[auto]{y_f}{x} \\
+ \slashfrac[none]{y_f}{x} \\
+ \slashfrac[big]{y_f}{x} \\
+ \slashfrac[Big]{y_f}{x} \\
+ \slashfrac[bigg]{y_f}{x} \\
+ \slashfrac[Bigg]{y_f}{x}
+ \end{example}
+ This argument is subject to change, see \cref{consid:slashfrac_opt,consid:slashfrac_def_scale} for more information.
+ \end{argument}
+
+ \begin{argument}{2}
+ This argument typeset the fraction's numerator.
+ \end{argument}
+
+ \begin{argument}{3}
+ This argument typeset the fraction's denominator.
+ \end{argument}
+ \end{function}
+
+
+
+ \clearpage
+ \section{To do}
+
+ Entries marked with \cmark{} will be implemented in a future release specified in the entry. Entries marked with \xmark{} will not be implemented.
+
+ \subsection{Future implementation}
+ The list describes what \emph{will be added} to the package in a later release.
+ \begin{todo}
+ \item Define commands that can create variants of infinitesimal like $\symup{d}$, $\partial$, $\delta$ etc. for use in integrals $\int f(x) \mathop{}\!\symup{d}x$, in differential equations $\pdv{f}{x} \mathop{}\! \symup{d}x + \pdv{f}{y}\mathop{}\! \symup{d}y$ and a shorthand notation of the partial derivative $\partial_{xx}f(x,y)$.
+ \item Implement the option to turn off the sorting of the terms in the mixed order. This could be made as a \val{draft} / \val{final} option.
+ \end{todo}
+
+ \subsection{Future changes}
+ The list describes what \emph{will be changed} in the package in a later release.
+ \begin{changes}
+ \item A complete rewrite of the options \key[index=false]{misc-add-delims} and \key[index=false]{misc-remove-delims} is necessary so that they have a clearer syntax. Moreover, the value \val{var} needs to work differently (and correctly) for the partial derivatives and variants hereof (pretty much useless here). \label{revis:add_remove}
+ \end{changes}
+
+ \subsection{Future considerations}
+ The list describes what \emph{might be changed or added} to the package in a later release.
+ \begin{consideration}
+ \item As mentioned earlier in the documentation, I heavily consider to change the optional argument \oarg{order} to a \oarg{key=value} argument. Of course this will lead to some changes: \label{consid:order2keyval}
+ \begin{itemize}
+ \item I would need a way to set the order of differentiation. I am thinking of something like a key value option; \keyval[index=false]{order}{\marg{cs-orders}}.
+ %
+ \item Such an option should not be possible to be set with \macro[index=false]{\derivset} or in the definition of a new derivative (or maybe if one really needs a lot of higher order derivative).
+ \end{itemize}
+ \answer{\cmark}{I truly believe this is the right way forward and is coming in the next release. More features can easily be added in a key-value style. The order argument will be replaced with a key-value argument and a order key introduced; \texttt{ord=\meta{order}}.}
+ %
+ \item With the above consideration, than it would only be natural to remove the mixed order and then have an option \keyval[index=false]{mixed-order}{\marg{mixed-order}}. Likewise, it should not be possible to be set with \macro[index=false]{\derivset} or in the definition of a new derivative. \label{consid:RemoveMixedOrder} \\
+ \answer{\cmark}{The mixed order argument will be removed due to the introduction of a key-value argument as mentioned above in the next release. The mixed order can be set with the knew key \texttt{m-ord=\meta{mixed-order}}.}
+ \item Currently \macro[index=false]{\derivset}'s optional argument \oarg{key=val}, when not given, sets the derivatives options to the package default settings. This should probably be changed to the options set in the definition of the derivative. \label{consid:DerivsetOptional} \\
+ \answer{\cmark}{I believe this would a nice change for the future, but I do not have the time to make the implementation for the next release.}
+ %
+ \item It can become rather cumbersome to read a derivative with a very long function. To ease this up, I am considering to add a switch that exchange the variable and the function arguments. But this might be against the \latex{} way of using arguments, which is the reason it have not been done and I would like feedback on it. \label{consid:Fun_Var_switch}
+ %
+ \item Should I add a key, possible a switch, that turn on/off the local behaviour \key[index=false]{misc-add-delims} and \key[index=false]{misc-remove-delims} inside derivative? \label{consid:add_remove_local}
+ %
+ \item It was mentioned in \cref{sec:createvariants}, that the second argument of \cs{\ldots Variant} should be a single token, e.g. meaning that \macro[index=false]{\NewOdvVariant}[\narg{\cs{myvariant}},\narg{\cs{partial}\_\cs{mu}}] is not allowed but \macro[index=false]{\NewOdvVariant}[\narg{\cs{myvariant}},\narg{\{\cs{partial}\_\cs{mu}\}}] is. It can easily be change to accept a multi token input. \label{consid:infd_single_token} \\
+ \answer{\cmark}{This have already been changed in this release, since it is an unnecessary constraint.}
+ %
+ \item Should I add the option to \key[index=false]{sort-numerical}, so that it is treated as a symbolic term instead of a numerical term? \label{consid:sort_numerical}
+ \\ \answer{\cmark}{Yes. Yes I should. This feature will be added in the next release.}
+ \item Should I add a sorting algorithm that order the terms according to their number (including sign)? \label{consid:sort_number}
+ \\ \answer{\cmark}{Yes. Yes I should. This feature will be added in the next release.}
+ %
+ \item I am considering making the optional argument of \macro[index=false]{\slashfrac} into a \oarg{key=value} argument with something like \keyval[index=false]{scale}{\marg{scaling}}. \label{consid:slashfrac_opt} \\
+ \answer{\cmark}{I want an key-value implementation like this in the future, but it will not be added it the next release.}
+ %
+ \item Should the default scaling for \macro[index=false]{\slashfrac} be \val{auto} or \val{none}? Or should it be possible to set it with something like \cs{slashfracset}\oarg{key=value}? \label{consid:slashfrac_def_scale} \\
+ \answer{\xmark}{The package default should be \val{auto}, but it will be possible to change it, when the key-value is implemented or \macro[index=false]{\slashfrac}.}
+ \end{consideration}
+
+
+
+ \clearpage
+ \addsec{Index}
+ Numbers in bold refer to the page where the entry is defined.
+
+ \printindex[option]
+ \printindex[macro]
+
+
+
+ \clearpage
+ \addsec{Change history}
+
+ \setlength{\marginparwidth}{75pt}
+
+ \begin{changelog}
+ \begin{change}[version = 0.9, date = 2019-07-21, beta = true]
+ \item First release of the package. The package is currently in a beta version.
+ \end{change}
+ \bigskip
+ \begin{change}[version = 0.95, date = 2019-09-18, beta = true]
+ \item Second beta release of the package.
+ \item Removed the single token restriction of the infinitesimal since it made no sense.
+ \item Fixed the documentation errors and typos.
+ \item Minor fixes to the code.
+ \end{change}
+ \end{changelog}
+
\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/extract/README b/macros/latex/contrib/extract/README
index c54f79fc8a..581b965c20 100644
--- a/macros/latex/contrib/extract/README
+++ b/macros/latex/contrib/extract/README
@@ -1,5 +1,5 @@
-extract v1.9
-------------
+extract v1.9a
+-------------
This package can be used to (conditionally) extract specific
commands and environments from a source file and write them to a
diff --git a/macros/latex/contrib/extract/extract.dtx b/macros/latex/contrib/extract/extract.dtx
index 42aa96f4c5..801a983433 100644
--- a/macros/latex/contrib/extract/extract.dtx
+++ b/macros/latex/contrib/extract/extract.dtx
@@ -16,7 +16,7 @@
% extract.sty
%
%% ---------------------------------------
-%% Copyright (C) 2004-2005 Hendri Adriaens
+%% Copyright (C) 2004-2019 Hendri Adriaens
%% ---------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -109,7 +109,7 @@ of the package.
%
% \GetFileInfo{extract.sty}
%
-% \CheckSum{1011}
+% \CheckSum{1069}
%
% \DoNotIndex{\@backslashchar,\@bsphack,\@checkend,\@currenvir,
% \@currenvline,\@doendpe,\@eha,\@ehc,\@empty,\@endpefalse,\@esphack,
@@ -920,7 +920,7 @@ of the package.
%<*extract>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{extract}
- [2019/09/17 v1.9 extract content from document (HA)]
+ [2019/09/18 v1.9a extract content from document (HA)]
\RequirePackage{verbatim}
\RequirePackage{xkeyval}
\newwrite\XTR@out
@@ -1086,47 +1086,50 @@ of the package.
% \end{macro}
% \begin{macro}{\begin}
% \marg{environment}\\
-% \changes{v1.9}{2019/09/17}{Changed definition to robust version}
+% \changes{v1.9a}{2019/09/18}{Added definitions for robust versions of \cs{begin} and \cs{end}}
% Modify the macro |\begin| to allow adding code to a level specific
% hook which can be executed after |\endgroup| in |\end|. See for
-% more info on this macro the \LaTeX\ source~\cite{LaTeXbase}.
-% \begin{macrocode}
-\@namedef{begin}#1{%
- \@ifundefined{#1}%
- {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
- {\def\reserved@a{\def\@currenvir{#1}%
- \edef\@currenvline{\on@line}%
- \csname #1\endcsname}}%
- \@ignorefalse
- \begingroup\@endpefalse
+% more info on this macro the \LaTeX\ source~\cite{LaTeXbase}. We first do this
+% for the new \LaTeX\ format, which defines robust versions of |\begin| and |\end|.
+% \begin{macrocode}
+\@ifl@t@r\fmtversion{2019/10/01}%
+{% new format
+ \@namedef{begin }#1{%
+ \@ifundefined{#1}%
+ {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
+ {\def\reserved@a{\def\@currenvir{#1}%
+ \edef\@currenvline{\on@line}%
+ \csname #1\endcsname}}%
+ \@ignorefalse
+ \begingroup\@endpefalse
% \end{macrocode}
% Advance depth level.
% \begin{macrocode}
- \global\advance\@envdepth\@ne
+ \global\advance\@envdepth\@ne
% \end{macrocode}
% Initialize the hook for this level.
% \begin{macrocode}
- \global\@namedef{@afterendenvhook@\romannumeral\@envdepth}{}%
- \reserved@a}
+ \global\@namedef{@afterendenvhook@\romannumeral\@envdepth}{}%
+ \reserved@a
+ }%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\end}
% \marg{environment}\\
-% \changes{v1.9}{2019/09/17}{Changed definition to robust version}
% Modify |\end| to execute the code collected in the hook.
% \begin{macrocode}
-\@namedef{end}#1{%
- \csname end#1\endcsname\@checkend{#1}%
- \expandafter\endgroup\if@endpe\@doendpe\fi
+ \@namedef{end }#1{%
+ \csname end#1\endcsname\@checkend{#1}%
+ \expandafter\endgroup\if@endpe\@doendpe\fi
% \end{macrocode}
% Copy current hook code to a temporary macro.
% \begin{macrocode}
- \expandafter\let\expandafter\reserved@a
- \csname @afterendenvhook@\romannumeral\@envdepth\endcsname
+ \expandafter\let\expandafter\reserved@a
+ \csname @afterendenvhook@\romannumeral\@envdepth\endcsname
% \end{macrocode}
% Decrease the depth.
% \begin{macrocode}
- \global\advance\@envdepth\m@ne
+ \global\advance\@envdepth\m@ne
% \end{macrocode}
% Execute the hook of the current environment. This is done after
% decreasing the depth as to avoid level mixing problems when the
@@ -1135,8 +1138,44 @@ of the package.
% defined since it is executed after the group and does not belong
% anymore to the environment in which the hook was defined.
% \begin{macrocode}
- \reserved@a\relax
- \if@ignore\@ignorefalse\ignorespaces\fi}
+ \reserved@a\relax
+ \if@ignore\@ignorefalse\ignorespaces\fi
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\begin}
+% \marg{environment}\\
+% This is the code for the old format of \LaTeX.
+% \begin{macrocode}
+}{% old format
+ \def\begin#1{%
+ \@ifundefined{#1}%
+ {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
+ {\def\reserved@a{\def\@currenvir{#1}%
+ \edef\@currenvline{\on@line}%
+ \csname #1\endcsname}}%
+ \@ignorefalse
+ \begingroup\@endpefalse
+ \global\advance\@envdepth\@ne
+ \global\@namedef{@afterendenvhook@\romannumeral\@envdepth}{}%
+ \reserved@a
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\end}
+% \marg{environment}
+% This is the code for the old format of \LaTeX.
+% \begin{macrocode}
+ \def\end#1{%
+ \csname end#1\endcsname\@checkend{#1}%
+ \expandafter\endgroup\if@endpe\@doendpe\fi
+ \expandafter\let\expandafter\reserved@a
+ \csname @afterendenvhook@\romannumeral\@envdepth\endcsname
+ \global\advance\@envdepth\m@ne
+ \reserved@a\relax
+ \if@ignore\@ignorefalse\ignorespaces\fi
+ }%
+}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\AfterEndEnv}
diff --git a/macros/latex/contrib/extract/extract.pdf b/macros/latex/contrib/extract/extract.pdf
index 1ed5ee687d..b980a38125 100644
--- a/macros/latex/contrib/extract/extract.pdf
+++ b/macros/latex/contrib/extract/extract.pdf
Binary files differ
diff --git a/macros/latex/contrib/extract/extract.sty b/macros/latex/contrib/extract/extract.sty
new file mode 100644
index 0000000000..2bf5f5d3a4
--- /dev/null
+++ b/macros/latex/contrib/extract/extract.sty
@@ -0,0 +1,545 @@
+%%
+%% This is file `extract.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% extract.dtx (with options: `extract')
+%%
+%% ---------------------------------------
+%% Copyright (C) 2004-2019 Hendri Adriaens
+%% ---------------------------------------
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2003/12/01 or later.
+%%
+%% This work has the LPPL maintenance status "maintained".
+%%
+%% This Current Maintainer of this work is Hendri Adriaens.
+%%
+%% This work consists of the file extract.dtx and the derived files
+%% extract.sty, xtrex1.tex, xtrex2.tex, xtrex3.tex, xtrex4.tex,
+%% xtrex5.tex, xtrex6.tex and xtrex7.tex.
+%%
+%% The following files constitute the extract package and must be
+%% distributed as a whole: readme, extract.dtx, extract.pdf and
+%% extract.sty.
+%%
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesPackage{extract}
+ [2019/09/18 v1.9a extract content from document (HA)]
+\RequirePackage{verbatim}
+\RequirePackage{xkeyval}
+\newwrite\XTR@out
+\newwrite\XTR@tmp
+\newif\ifXTR@st
+\newif\ifXTR@skip
+\newif\ifXTR@extract
+\def\XTR@err#1{\PackageError{extract}{#1}\@ehc}
+\def\XTR@namelet#1#2{%
+ \expandafter\let\csname#1\expandafter\endcsname\csname#2\endcsname
+}
+\define@boolkey[XTR]{extract.sty}[XTR@]{active}[true]{}
+\define@boolkey[XTR]{extract.sty}[XTR@]{header}[true]{}
+\define@boolkey[XTR]{extract.sty}[XTR@]{handles}[true]{}
+\define@boolkey[XTR]{extract.sty}[XTR@]{copydocumentclass}[true]{}
+\DeclareOptionX[XTR]{generate}{\lowercase{\def\XTR@file{#1}}}
+\DeclareOptionX[XTR]{extract-env}{%
+ \def\XTR@envs{#1}%
+ \XKV@for@n{#1}\XTR@tempa\XTR@tempb
+}
+\DeclareOptionX[XTR]{extract-cmd}{%
+ \def\XTR@cmdsargs{#1}%
+ \XKV@for@n{#1}\XTR@tempa\XTR@tempb
+}
+\DeclareOptionX[XTR]{extract-cmdline}{%
+ \def\XTR@cmdsline{#1}%
+ \XKV@for@n{#1}\XTR@tempa\XTR@tempb
+}
+\def\XTR@tempb{%
+ \DeclareOptionX[XTR]{\XTR@tempa-nrs}{%
+ \expandafter\XKV@sp@deflist\csname XTR@\XKV@tkey\endcsname{##1}%
+ \XTR@namelet{XTR@\XKV@tkey @cnt}{z@}%
+ }%
+ \DeclareOptionX[XTR]{\XTR@tempa-labels}{%
+ \expandafter\XKV@sp@deflist\csname XTR@\XKV@tkey\endcsname{##1}%
+ }%
+}
+\def\XTR@tempa{line}\XTR@tempb
+\def\XTR@tempa{extract}\XTR@tempb
+\def\XTR@tempa{extractskip}\XTR@tempb
+\DeclareOptionX*{\XTR@err{Unknown option `\CurrentOption'}}
+\ExecuteOptionsX[XTR]{header=true,handles=true,copydocumentclass=true}
+\ProcessOptionsX[XTR]
+\def\XTR@opentmp{\immediate\openout\XTR@tmp\jobname.xtr\relax}
+\def\XTR@writetmp{\immediate\write\XTR@tmp}
+\def\XTR@closetmp{\immediate\closeout\XTR@tmp}
+\def\XTR@writeout{\immediate\write\XTR@out}
+\ifXTR@active
+ \XKV@ifundefined{XTR@file}{
+ \XTR@activefalse
+ \XTR@err{no file to generate; extract deactivated}
+ }{}
+ \XTR@opentmp
+ \XTR@writetmp{%
+ \string\lowercase{\string\def\string\XTR@tempa{\jobname}}%
+ }
+ \XTR@closetmp
+ \input{\jobname.xtr}
+ \ifx\XTR@tempa\XTR@file
+ \XTR@activefalse
+ \XTR@err{attempt to overwrite source file; extract deactivated}
+ \fi
+\fi
+\newcount\@envdepth\@envdepth\z@
+\@ifl@t@r\fmtversion{2019/10/01}%
+{% new format
+ \@namedef{begin }#1{%
+ \@ifundefined{#1}%
+ {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
+ {\def\reserved@a{\def\@currenvir{#1}%
+ \edef\@currenvline{\on@line}%
+ \csname #1\endcsname}}%
+ \@ignorefalse
+ \begingroup\@endpefalse
+ \global\advance\@envdepth\@ne
+ \global\@namedef{@afterendenvhook@\romannumeral\@envdepth}{}%
+ \reserved@a
+ }%
+ \@namedef{end }#1{%
+ \csname end#1\endcsname\@checkend{#1}%
+ \expandafter\endgroup\if@endpe\@doendpe\fi
+ \expandafter\let\expandafter\reserved@a
+ \csname @afterendenvhook@\romannumeral\@envdepth\endcsname
+ \global\advance\@envdepth\m@ne
+ \reserved@a\relax
+ \if@ignore\@ignorefalse\ignorespaces\fi
+ }%
+}{% old format
+ \def\begin#1{%
+ \@ifundefined{#1}%
+ {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
+ {\def\reserved@a{\def\@currenvir{#1}%
+ \edef\@currenvline{\on@line}%
+ \csname #1\endcsname}}%
+ \@ignorefalse
+ \begingroup\@endpefalse
+ \global\advance\@envdepth\@ne
+ \global\@namedef{@afterendenvhook@\romannumeral\@envdepth}{}%
+ \reserved@a
+ }%
+ \def\end#1{%
+ \csname end#1\endcsname\@checkend{#1}%
+ \expandafter\endgroup\if@endpe\@doendpe\fi
+ \expandafter\let\expandafter\reserved@a
+ \csname @afterendenvhook@\romannumeral\@envdepth\endcsname
+ \global\advance\@envdepth\m@ne
+ \reserved@a\relax
+ \if@ignore\@ignorefalse\ignorespaces\fi
+ }%
+}
+\def\AfterEndEnv{%
+ \expandafter\g@addto@macro
+ \csname @afterendenvhook@\romannumeral\@envdepth\endcsname
+}
+\def\XTR@checkxtr#1#2{%
+ \@nameuse{XTR@#1false}%
+ \XTR@namelet{XTR@maketrue}{XTR@#1true}%
+ \XKV@ifundefined{XTR@#2-nrs}{%
+ \XKV@ifundefined{XTR@#2-labels}\XTR@maketrue{}%
+ }{%
+ \begingroup
+ \expandafter\count@\csname XTR@#2-nrs@cnt\endcsname
+ \advance\count@\@ne
+ \edef\XTR@resa{\expandafter\noexpand\expandafter\gdef\expandafter
+ \noexpand\csname XTR@#2-nrs@cnt\endcsname{\the\count@}}%
+ \expandafter\endgroup\XTR@resa
+ }%
+ \@nameuse{ifXTR@#1}\else
+ \XKV@ifundefined{XTR@#2-labels}{}{%
+ \ifx\XTR@currentlabel\relax\else
+ \@expandtwoargs\in@{,\XTR@currentlabel,}%
+ {,\csname XTR@#2-labels\endcsname,}%
+ \ifin@\XTR@maketrue\fi
+ \fi
+ }%
+ \fi
+ \@nameuse{ifXTR@#1}\else
+ \XKV@ifundefined{XTR@#2-nrs}{}{%
+ \expandafter\XTR@ch@ckxtr\csname XTR@#2-nrs\expandafter
+ \endcsname\csname XTR@#2-nrs@cnt\endcsname
+ }%
+ \fi
+ \global\let\XTR@currentlabel\relax
+}
+\def\XTR@ch@ckxtr#1#2{%
+ \XKV@for@o#1\XTR@resa{\expandafter\XTR@ch@ck@tr\XTR@resa--\@nil#2}%
+}
+\def\XTR@ch@ck@tr#1-#2-#3\@nil#4{%
+ \ifx\@empty#1\@empty
+ \ifnum#4>#2 \else\XTR@maketrue\fi
+ \else
+ \ifx\@empty#2\@empty
+ \ifx\@empty#3\@empty
+ \ifnum#4=#1 \XTR@maketrue\fi
+ \else
+ \ifnum#4<#1 \else\XTR@maketrue\fi
+ \fi
+ \else
+ \ifnum#4<#1 \else\ifnum#4>#2 \else\XTR@maketrue\fi\fi
+ \fi
+ \fi
+}
+\def\extractionlabel{\KV@@sp@def\XTR@currentlabel}
+\let\XTR@currentlabel\relax
+\def\extract{\XTR@stfalse\XTR@extract}
+\@namedef{extract*}{\XTR@sttrue\XTR@extract}
+\def\XTR@extract{%
+ \@bsphack
+ \let\do\@makeother\dospecials\catcode`\^^M\active
+ \@testopt\XTR@@xtract\@nil
+}
+\def\XTR@@xtract[#1]{%
+ \ifXTR@active
+ \def\XTR@tempa{#1}%
+ \ifx\XTR@tempa\@nnil\else
+ \KV@@sp@def\XTR@currentlabel{#1}%
+ \fi
+ \XTR@checkxtr{extract}{extract}%
+ \else
+ \XTR@extractfalse
+ \fi
+ \ifXTR@st\XTR@opentmp\fi
+ \let\verbatim@processline\XTR@processline@begin
+ \verbatim@start
+}
+\begingroup
+ \lccode`\!=`\\ \lccode`\(=`\{ \lccode`\)=`\}
+\lowercase{\endgroup
+\def\XTR@processline@begin{%
+ \@temptokena{}%
+ \edef\XTR@orig@line{\the\verbatim@line}%
+ \verbatim@line{}%
+ \expandafter\XTR@testbegin\XTR@orig@line!begin(extractskip)\@nil
+}
+\def\XTR@testbegin#1!begin(extractskip)#2\@nil{%
+ \@temptokena\expandafter{\the\@temptokena#1}%
+ \verbatim@line\expandafter{\the\verbatim@line#1}%
+ \def\XTR@tempa{#2}%
+ \ifx\XTR@tempa\@empty\XTR@processline@write\else\XKV@afterfi
+ \XTR@skiplabel#2[]\@nil
+ \XTR@checkxtr{skip}{extractskip}%
+ \let\verbatim@processline\XTR@processline@end
+ \ifx\XTR@tempa\@nnil\XKV@afterelsefi
+ \XTR@t@stbegin#2\@nil
+ \else\XKV@afterfi
+ \expandafter\XTR@t@stbegin\XTR@tempa\@nil
+ \fi
+ \fi
+}
+\def\XTR@skiplabel#1[#2]#3\@nil{%
+ \def\XTR@tempa{#1}%
+ \def\XTR@tempb{#2}%
+ \ifx\XTR@tempa\@empty
+ \ifx\XTR@tempb\@empty
+ \let\XTR@tempa\@nnil
+ \else
+ \KV@@sp@def\XTR@currentlabel{#2}%
+ \XTR@sk@plabel#3\@nil
+ \fi
+ \else
+ \let\XTR@tempa\@nnil
+ \fi
+}
+\def\XTR@sk@plabel#1[]\@nil{\def\XTR@tempa{#1}}
+\def\XTR@t@stbegin#1!begin(extractskip)\@nil{%
+ \XTR@testend#1!end(extractskip)\@nil
+}
+\def\XTR@processline@end{%
+ \@temptokena{}%
+ \edef\XTR@orig@line{\the\verbatim@line}%
+ \verbatim@line{}%
+ \expandafter\XTR@testend\XTR@orig@line!end(extractskip)\@nil
+}
+\def\XTR@testend#1!end(extractskip)#2\@nil{%
+ \@temptokena\expandafter{\the\@temptokena#1}%
+ \ifXTR@skip\else\verbatim@line\expandafter{\the\verbatim@line#1}\fi
+ \def\XTR@tempa{#2}%
+ \ifx\XTR@tempa\@empty\XTR@processline@write\else\XKV@afterfi
+ \let\verbatim@processline\XTR@processline@begin
+ \XTR@t@stend#2\@nil
+ \fi
+}
+\def\XTR@t@stend#1!end(extractskip)\@nil{%
+ \XTR@testbegin#1!begin(extractskip)\@nil
+}}
+\def\XTR@processline@write{%
+ \ifXTR@st\ifcat$\the\@temptokena$\else
+ \XTR@writetmp{\the\@temptokena}%
+ \fi\fi
+ \ifXTR@extract\ifcat$\the\verbatim@line$\else
+ \XTR@writeout{\the\verbatim@line}%
+ \fi\fi
+ \ifx\XTR@orig@line\@empty\XTR@writetmp{}\XTR@writeout{}\fi
+}
+\def\endextract{\XTR@stfalse\XTR@endextract}
+\@namedef{endextract*}{\XTR@sttrue\XTR@endextract}
+\def\XTR@endextract{%
+ \@esphack
+ \ifXTR@st
+ \XTR@closetmp
+ \AfterEndEnv{\input{\jobname.xtr}}%
+ \fi
+}
+\@namedef{extractskip}{\XTR@activefalse\@nameuse{extract*}}
+\XTR@namelet{endextractskip}{endextract*}
+\def\extractline{%
+ \XKV@ifstar{\XTR@sttrue\XTR@extractline}%
+ {\XTR@stfalse\XTR@extractline}%
+}
+\def\XTR@extractline{%
+ \begingroup
+ \let\do\@makeother\dospecials\catcode`\^^M\active
+ \@testopt\XTR@@xtractline\@nil
+}
+\begingroup
+ \catcode`\~=\active\lccode`\~=`\^^M
+\lowercase{\endgroup
+ \def\XTR@@xtractline[#1]#2~{%
+ \ifXTR@active
+ \def\XTR@tempa{#1}%
+ \ifx\XTR@tempa\@nnil\else
+ \KV@@sp@def\XTR@currentlabel{#1}%
+ \fi
+ \XTR@checkxtr{extract}{line}%
+ \else
+ \XTR@extractfalse
+ \fi
+ \ifXTR@extract\XTR@writeout{#2}\fi
+ \ifXTR@st\XTR@opentmp\XTR@writetmp{#2}\XTR@closetmp\fi
+ \endgroup
+ \ifXTR@st
+ \input{\jobname.xtr}%
+ \fi
+ }%
+}
+\ifXTR@active
+\immediate\openout\XTR@out\XTR@file\relax
+\ifXTR@header
+ \@tempcnta\time
+ \divide\@tempcnta 60
+ \edef\XTR@tempb{%
+ \the\year/\ifnum\the\month<10 0\fi\the\month/%
+ \ifnum\the\day<10 0\fi\the\day,\the\@tempcnta:%
+ }
+ \multiply\@tempcnta 60
+ \@tempcntb\time
+ \advance\@tempcntb-\@tempcnta
+ \ifnum\@tempcntb<10
+ \xdef\XTR@tempb{\XTR@tempb0\the\@tempcntb}
+ \else
+ \xdef\XTR@tempb{\XTR@tempb\the\@tempcntb}
+ \fi
+ \begingroup
+ \catcode`\%=12
+ \gdef\XTR@tempa{%%\space}
+ \endgroup
+ \XTR@writeout{\XTR@tempa}
+ \filename@parse\XTR@file
+ \ifx\filename@ext\relax\def\filename@ext{tex}\fi
+ \XTR@writeout{%
+ \XTR@tempa This is file, `\filename@base.\filename@ext',%
+ }
+ \XTR@writeout{%
+ \XTR@tempa generated with the extract package.^^J\XTR@tempa
+ }
+ \XTR@writeout{\XTR@tempa Generated on : \space\XTR@tempb}
+ \filename@parse\jobname
+ \ifx\filename@ext\relax\def\filename@ext{tex}\fi
+ \XTR@writeout{%
+ \XTR@tempa From source \space: \space\filename@base.\filename@ext
+ }
+ \XTR@writeout{%
+ \XTR@tempa Using options: \space\csname opt@extract.sty\endcsname
+ }
+ \XTR@writeout{\XTR@tempa}
+\fi
+\ifXTR@copydocumentclass
+ \def\XTR@tempa#1.cls\@nil{\def\XTR@tempa{#1}}
+ \expandafter\XTR@tempa\XKV@documentclass\@nil
+ \ifx\XKV@classoptionslist\@empty
+ \XTR@writeout{\string\documentclass{\XTR@tempa}}
+ \else
+ \@temptokena\expandafter{\XKV@classoptionslist}%
+ \XTR@writeout{\string\documentclass[\the\@temptokena]{\XTR@tempa}}
+ \fi
+\fi
+\AtBeginDocument{%
+ \ifXTR@handles
+ \XTR@writeout{}%
+ \XTR@writeout{\string\begin{document}}%
+ \fi
+ \XKV@ifundefined{XTR@envs}{}{%
+ \XKV@for@o\XTR@envs\XTR@tempa{%
+ \XKV@ifundefined\XTR@tempa{%
+ \XTR@err{%
+ environment `\XTR@tempa' not defined; extraction canceled%
+ }%
+ }{%
+ \XTR@namelet{XTR\XTR@tempa}{\XTR@tempa}%
+ \@namedef{\XTR@tempa\expandafter}\expandafter{\expandafter
+ \def\expandafter\XTR@tempa\expandafter{\XTR@tempa}%
+ \XTR@checkxtr{extract}\XTR@tempa
+ \ifXTR@extract
+ \XTR@writeout{}\XTR@opentmp
+ \@bsphack
+ \let\do\@makeother\dospecials\catcode`\^^M\active
+ \def\verbatim@processline{%
+ \let\verbatim@processline\XTR@processline@begin
+ \XTR@writeout{%
+ \string\begin{\XTR@tempa}\the\verbatim@line
+ }%
+ \XTR@writetmp{%
+ \string\begin{XTR\XTR@tempa}\the\verbatim@line
+ }%
+ }%
+ \XTR@sttrue\let\XTR@tempb\verbatim@
+ \else
+ \edef\XTR@tempb{\noexpand\begin{XTR\XTR@tempa}}%
+ \fi
+ \XTR@tempb
+ }%
+ \XTR@namelet{endXTR\XTR@tempa}{end\XTR@tempa}%
+ \@namedef{end\XTR@tempa\expandafter}\expandafter{\expandafter
+ \def\expandafter\XTR@tempa\expandafter{\XTR@tempa}%
+ \ifXTR@extract
+ \@esphack
+ \XTR@writeout{\string\end{\XTR@tempa}}%
+ \XTR@writetmp{\string\end{XTR\XTR@tempa}}%
+ \XTR@closetmp
+ \AfterEndEnv{\input{\jobname.xtr}}%
+ \else
+ \edef\XTR@tempa{\noexpand\end{XTR\XTR@tempa}}%
+ \expandafter\XTR@tempa
+ \fi
+ }%
+ }%
+ }%
+ }%
+ \XKV@ifundefined{XTR@cmdsargs}{}{%
+ \let\XTR@sect\@sect
+ \let\XTR@chapter\@chapter
+ \def\XTR@tempb{chapter}%
+ \XKV@for@o\XTR@cmdsargs\XTR@tempa{%
+ \XKV@ifundefined\XTR@tempa{%
+ \XTR@err{command `\@backslashchar\XTR@tempa' not defined;
+ extraction canceled%
+ }%
+ }{%
+ \@expandtwoargs\in@{,\XTR@tempa,}%
+ {,chapter,section,subsection,subsubsection,}%
+ \ifin@
+ \ifx\XTR@tempa\XTR@tempb
+ \def\@chapter[#1]#2{%
+ \XTR@checkxtr{extract}{chapter}%
+ \ifXTR@extract
+ \XTR@writeout{}%
+ \def\XTR@tempa{#1}%
+ \def\XTR@tempb{#2}%
+ \ifx\XTR@tempa\XTR@tempb
+ \@temptokena{{#2}}%
+ \else
+ \@temptokena{[#1]{#2}}%
+ \fi
+ \XTR@writeout{\string\chapter\the\@temptokena}%
+ \fi
+ \XTR@chapter[#1]{#2}%
+ }%
+ \else
+ \def\@sect#1#2#3#4#5#6[#7]#8{%
+ \@expandtwoargs\in@{,#1,}{,\XTR@cmdsargs,}%
+ \ifin@
+ \XTR@checkxtr{extract}{#1}%
+ \ifXTR@extract
+ \XTR@writeout{}%
+ \def\XTR@tempa{#7}%
+ \def\XTR@tempb{#8}%
+ \ifx\XTR@tempa\XTR@tempb
+ \@temptokena{{#8}}%
+ \else
+ \@temptokena{[#7]{#8}}%
+ \fi
+ \XTR@writeout{\expandafter
+ \string\csname#1\endcsname\the\@temptokena}%
+ \fi
+ \fi
+ \XTR@sect{#1}{#2}{#3}{#4}{#5}{#6}[#7]{#8}%
+ }%
+ \fi
+ \else
+ \XTR@err{unsupported command `\XTR@tempa';
+ try the `extract-cmdline option}%
+ \fi
+ }%
+ }%
+ }%
+ \XKV@ifundefined{XTR@cmdsline}{}{%
+ \XKV@for@o\XTR@cmdsline\XTR@tempa{%
+ \XKV@ifundefined\XTR@tempa{%
+ \XTR@err{command `\@backslashchar\XTR@tempa' not defined;
+ extraction canceled}%
+ }{%
+ \@expandtwoargs\in@{,\XTR@tempa,}%
+ {,chapter,section,subsection,subsubsection,}%
+ \ifin@
+ \XTR@err{%
+ use the `extract-cmd' option for command `\XTR@tempa'%
+ }%
+ \else
+ \XTR@namelet{XTR\XTR@tempa}{\XTR@tempa}%
+ \@namedef{\XTR@tempa\expandafter}\expandafter{\expandafter
+ \def\expandafter\XTR@tempa\expandafter{\XTR@tempa}%
+ \XTR@checkxtr{extract}\XTR@tempa
+ \begingroup
+ \let\do\@makeother\dospecials\catcode`\^^M\active
+ \XTR@extractcmdline
+ }%
+ \fi
+ }%
+ }%
+ \begingroup
+ \catcode`\~=\active\lccode`\~=`\^^M
+ \lowercase{\endgroup
+ \def\XTR@extractcmdline#1~{\verbatim@line{#1}\XTR@@xtractcmdline}%
+ }%
+ \def\XTR@@xtractcmdline{%
+ \XTR@writeout{}%
+ \XTR@writeout{\expandafter\string\csname\XTR@tempa
+ \endcsname\the\verbatim@line
+ }%
+ \XTR@opentmp
+ \XTR@writetmp{\expandafter\string\csname XTR\XTR@tempa
+ \endcsname\the\verbatim@line
+ }%
+ \XTR@closetmp
+ \endgroup
+ \input{\jobname.xtr}%
+ }%
+ }%
+}
+\AtEndDocument{%
+ \ifXTR@handles
+ \XTR@writeout{}%
+ \XTR@writeout{\string\end{document}}%
+ \fi
+ \immediate\closeout\XTR@out
+}
+\fi
+\endinput
+%%
+%% End of file `extract.sty'.
diff --git a/macros/latex/contrib/iodhbwm/README.md b/macros/latex/contrib/iodhbwm/README.md
index d7f5937cb9..fff5878e17 100644
--- a/macros/latex/contrib/iodhbwm/README.md
+++ b/macros/latex/contrib/iodhbwm/README.md
@@ -1,36 +1,43 @@
-# iodhbwm
+iodhbwm
+=======
[![CTAN](https://img.shields.io/ctan/v/iodhbwm.svg)](https://www.ctan.org/pkg/iodhbwm)
[![GitHub license](https://img.shields.io/github/license/faltfe/iodhbwm.svg?style=flat-square)](https://github.com/faltfe/iodhbwm/blob/master/LICENSE)
[![Build Status](https://img.shields.io/travis/faltfe/iodhbwm/master.svg?style=flat-square)](https://travis-ci.org/faltfe/iodhbwm)
----
-
-This project provides the _unofficial_ template of the [DHBW Mannheim](http://www.dhbw-mannheim.de) for the creation of bachelor thesis, studies or project work with _LaTeX_. The goal of the package is the quick creation of a basic framework without much effort.
+--------------------------------------------------------------------------
+This project provides the _unofficial_ template of the [DHBW Mannheim](http://www.dhbw-mannheim.de) for
+the creation of bachelor thesis, studies or project work with _LaTeX_. The goal of the package is
+the quick creation of a basic framework without much effort.
The documentation is currently only available in German.
----
+--------------------------------------------------------------------------
Felix Faltin
-Web: <https://github.com/faltfe/iodhbwm>
+Web: <https://github.com/faltfe/iodhbwm>
E-Mail: ffaltin91@gmail.com
----
-
+--------------------------------------------------------------------------
Copyright 2018-2019 Felix Faltin
-This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 of this license or (at your option) any later version. The latest version of this license is in <http://www.latex-project.org/lppl.txt> and version 1.3 or later is part of all distributions of LaTeX version 2005/12/01 or later.
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either version 1.3
+of this license or (at your option) any later version.
+The latest version of this license is in
+ <http://www.latex-project.org/lppl.txt>
+and version 1.3 or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
-This work has the LPPL maintenance status `maintained`.
+This work has the LPPL maintenance status `maintained'.
The Current Maintainer of this work is Felix Faltin.
----
+--------------------------------------------------------------------------
If you have any ideas, questions, suggestions or bugs to report, please
feel free to contact me.
----
+--------------------------------------------------------------------------
diff --git a/macros/latex/contrib/iodhbwm/doc/examples/customizing/iodhbwm-print.pdf b/macros/latex/contrib/iodhbwm/doc/examples/customizing/iodhbwm-print.pdf
index 5bb082e1f7..914858dc7c 100644
--- a/macros/latex/contrib/iodhbwm/doc/examples/customizing/iodhbwm-print.pdf
+++ b/macros/latex/contrib/iodhbwm/doc/examples/customizing/iodhbwm-print.pdf
Binary files differ
diff --git a/macros/latex/contrib/iodhbwm/doc/examples/customizing/iodhbwm-print.tex b/macros/latex/contrib/iodhbwm/doc/examples/customizing/iodhbwm-print.tex
index 38d0dec2c2..63be57d122 100644
--- a/macros/latex/contrib/iodhbwm/doc/examples/customizing/iodhbwm-print.tex
+++ b/macros/latex/contrib/iodhbwm/doc/examples/customizing/iodhbwm-print.tex
@@ -1,6 +1,6 @@
% ---------------------------------------------------
-% Date: 08.10.2018
-% Version: v0.1
+% Date: 08.08.2019
+% Version: v1.1.1
% Autor: Felix Faltin <ffaltin91[at]gmail.com>
% Repository: https://github.com/faltfe/iodhbwm
% ---------------------------------------------------
diff --git a/macros/latex/contrib/iodhbwm/doc/examples/listings/iodhbwm-listings-color.pdf b/macros/latex/contrib/iodhbwm/doc/examples/listings/iodhbwm-listings-color.pdf
index d72891bb3c..ee8f2b3600 100644
--- a/macros/latex/contrib/iodhbwm/doc/examples/listings/iodhbwm-listings-color.pdf
+++ b/macros/latex/contrib/iodhbwm/doc/examples/listings/iodhbwm-listings-color.pdf
Binary files differ
diff --git a/macros/latex/contrib/iodhbwm/doc/examples/listings/iodhbwm-listings.pdf b/macros/latex/contrib/iodhbwm/doc/examples/listings/iodhbwm-listings.pdf
index d88cde7bf6..5a492b0478 100644
--- a/macros/latex/contrib/iodhbwm/doc/examples/listings/iodhbwm-listings.pdf
+++ b/macros/latex/contrib/iodhbwm/doc/examples/listings/iodhbwm-listings.pdf
Binary files differ
diff --git a/macros/latex/contrib/iodhbwm/doc/examples/listings/iodhbwm-listings.tex b/macros/latex/contrib/iodhbwm/doc/examples/listings/iodhbwm-listings.tex
index 9ec47e71f8..09d8b11042 100644
--- a/macros/latex/contrib/iodhbwm/doc/examples/listings/iodhbwm-listings.tex
+++ b/macros/latex/contrib/iodhbwm/doc/examples/listings/iodhbwm-listings.tex
@@ -1,6 +1,6 @@
% ---------------------------------------------------
-% Date: 12.12.2018
-% Version: v0.1
+% Date: 08.09.2019
+% Version: v1.1.1
% Autor: Felix Faltin <ffaltin91[at]gmail.com>
% Repository: https://github.com/faltfe/iodhbwm
% ---------------------------------------------------
diff --git a/macros/latex/contrib/iodhbwm/doc/iodhbwm.pdf b/macros/latex/contrib/iodhbwm/doc/iodhbwm.pdf
index e165761332..1de10b8c49 100644
--- a/macros/latex/contrib/iodhbwm/doc/iodhbwm.pdf
+++ b/macros/latex/contrib/iodhbwm/doc/iodhbwm.pdf
Binary files differ
diff --git a/macros/latex/contrib/iodhbwm/doc/iodhbwm.tex b/macros/latex/contrib/iodhbwm/doc/iodhbwm.tex
index 944cd3bf3b..d26a35aa24 100644
--- a/macros/latex/contrib/iodhbwm/doc/iodhbwm.tex
+++ b/macros/latex/contrib/iodhbwm/doc/iodhbwm.tex
@@ -1,6 +1,6 @@
\documentclass[babel=ngerman,highlight=false]{skdoc}
\usepackage[T1]{fontenc}
-\usepackage[utf8]{inputenc}
+%\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{enumitem}
\usepackage[most]{tcolorbox}
@@ -9,7 +9,7 @@
%\usepackage{showframe}
\package[vcs=https://github.com/faltfe/iodhbwm,ctan=iodhbwm]{iodhbwm}
-\version{1.1.0}
+\version{1.1.1}
\title{iodhbwm Klasse}
\author{Felix Faltin}
@@ -276,8 +276,6 @@
\Option{mainlanguage}\WithValues{babel language}\AndDefault{empty}
Im Gegensatz zu \classOption{\opt{language}} wird mit der Option ausschließlich die Hauptsprache gesetzt, welche im Dokument benutzt wird. Die Sprache wird zusätzlich an entsprechende Pakete übergeben.
-
-
\begin{sourcecode}[listing only]
\documentclass[%
language = english,
@@ -292,12 +290,8 @@
\Option{print-}\WithValues{true, false}\AndDefault{false}
Bei Aktivierung der Option wird die farbige Darstellung von Links deaktiviert. Dies wird durch \verb|\hypersetup{hidelinks}| erreicht.\medskip
- \Option{print}\WithValues{true, false}\AndDefault{false}
- Im Gegensatz zu der Option \classOption{\opt{print-}} schaltet die Option zusätzlich noch die Darstellung von Quelltext um. Die farbige Überschrift wird entfernt und durch eine einfache Überschrift ersetzt, welche durch einen Rahmen abgegrenzt ist.
-
- \begin{warning}{Verschiebungen von Texten}
- Bei der Verwendung von \opt{print} wird der Quelltext anders formatiert. Dadurch kann es unter Umständen zu Verschiebungen des Layouts kommen. Dieses Verhalten ist nicht vollständig beabsichtigt, bot jedoch vorläufig die einfachste Umsetzung. An einer adäquaten Lösung wird gearbeitet.
- \end{warning}
+ \Option{print}\WithValues{}
+ Im Gegensatz zu der Option \classOption{\opt{print-}} schaltet die Option \textit{zusätzlich} noch die Darstellung von Quelltext um. Die farbige Überschrift wird durch eine einfache Überschrift ersetzt. Zusätzliche wird der Quelltext in schwarzer Farbe dargestellt.
\subsubsection{Darstellung der Verzeichnisse}
Die DHBW gibt eine gewissen Struktur der Arbeit vor. Um dem Autor die Arbeit etwas zu erleichtern, bietet die Klasse drei Optionen an, welche eine automatisierte Darstellung der Verzeichnisse vornimmt. Alle Optionen sind nur in Kombination mit \classOption{\opt{load-dhbw-templates}} wirksam. Im \Cref{subsub:options-tocs} werden weitere paketseitige Einstellungen beschrieben, mit welchen die zu erstellenden Verzeichnisse angepasst werden können.\medskip
@@ -341,7 +335,7 @@
\end{hint}
\medskip
- \Option{add-bibliography-}\WithValues{true, false}\AndDefault{false}
+ \Option{add-bibliography-}\WithValues{}
Die Option verhält sich ähnlich wie \classOption{\opt{add-bibliography}} mit dem Unterschied, dass am Ende des Dokuments kein Literaturverzeichnis abgebildet wird. Zusätzlich werden die Verlinkungen zum Literaturverzeichnis deaktiviert. Möchte man ein manuelles Literaturverzeichnis, so sollte die Verlinkung wieder aktiviert werden.
\begin{sourcecode}[listing only]
@@ -442,7 +436,7 @@
Mit der Option wird das Datum angegeben.\medskip
\Option{submission date}\WithValues{\meta{value}}\AndDefault{\opt{date}}
- Mit der Option wird das Abgabedatum angegeben. Standardmäßig entspricht der Wert der Option \setupOption{\opt{date}} und hat nur Einfluss auf \setupOption{\opt{bachelor type} = \meta{BA}}.\medskip
+ Mit der Option wird das Abgabedatum angegeben. Standardmäßig entspricht der Wert der Option \setupOption{\opt{date}} und hat nur Einfluss auf \setupOption{\opt{thesis type} = \meta{BA}}.\medskip
\Option{location}\WithValues{\meta{value}}
Mit Setzen der Option wird der Ort angegeben, an welchem die Arbeit erstellt wurde.\medskip
@@ -487,7 +481,7 @@
\subsubsection{Angaben zur DHBW}
\Option{dhbw location}\WithValues{\meta{value}}\AndDefault{Mannheim}
- \Version{1.1.0}Die Option erlaubt eine Änderung des DHBW Standortes. Als Standardeinstellung ist die DHBW Manneinheim gesetzt. Der Standort wird automatisch auf den mitgelieferten Titelseiten angepasst.
+ \Version{1.1.0}Die Option erlaubt eine Änderung des DHBW Standortes. Als Standardeinstellung ist die DHBW Mannheim gesetzt. Der Standort wird automatisch auf den mitgelieferten Titelseiten angepasst.
\Option{dhbw logo}\WithValues{\meta{value}}\AndDefault{dhbw-logo}
\Version{1.1.0}Ein alternatives Logo der DHBW kann mithilfe dieser Option angegeben werden. Die Dateiendung sollte, wie in \LaTeX{} üblich, weggelassen werden.
@@ -541,7 +535,7 @@
\Option{intro/roman page numbers}\WithValues{true, false}\AndDefault{false}
- \Version{1.2.0}Bei Aktivierung der Option wird die Nummerierung innerhalb der Verzeichnisse auf Römisch umgeschaltet. Des Weiteren werden die Römischen Seitenzahlen für die Verzeichnisse ebenfalls im Inhalsverzeichnis angezeigt.
+ \Version{1.1.0}Bei Aktivierung der Option wird die Nummerierung innerhalb der Verzeichnisse auf Römisch umgeschaltet. Des Weiteren werden die Römischen Seitenzahlen für die Verzeichnisse ebenfalls im Inhalsverzeichnis angezeigt.
\begin{hint}{}
Bei Aktivierung der Option \setupOption{\opt{intro/roman page numbers}=\meta{true}} erfolgt eine Abweichung von den Richtlinien der DHBW.
diff --git a/macros/latex/contrib/iodhbwm/tex/iodhbwm-templates.sty b/macros/latex/contrib/iodhbwm/tex/iodhbwm-templates.sty
index ec23a7f018..3f9a6e7b06 100644
--- a/macros/latex/contrib/iodhbwm/tex/iodhbwm-templates.sty
+++ b/macros/latex/contrib/iodhbwm/tex/iodhbwm-templates.sty
@@ -7,7 +7,7 @@
% Felix Faltin
% E-Mail: ffaltin91@gmail.com
% ----------------------------------------------------------
-% Copyright 2017 Felix Faltin
+% Copyright 2017-2019 Felix Faltin
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -23,8 +23,8 @@
%
% ----------------------------------------------------------
-\newcommand*{\iodhbwm@pkg@version}{v1.1.0}
-\newcommand*{\iodhbwm@pkg@date}{2019-05-15}
+\newcommand*{\iodhbwm@pkg@version}{v1.1.1}
+\newcommand*{\iodhbwm@pkg@date}{2019-09-08}
\newcommand*{\iodhbwm@pkg@info}{Inoffical DHBW Mannheim thesis package}
\newcommand*{\iodhbwm@pkg@name}{iodhbwm-templates}
diff --git a/macros/latex/contrib/iodhbwm/tex/iodhbwm.cls b/macros/latex/contrib/iodhbwm/tex/iodhbwm.cls
index 508c307183..86d6340ed3 100644
--- a/macros/latex/contrib/iodhbwm/tex/iodhbwm.cls
+++ b/macros/latex/contrib/iodhbwm/tex/iodhbwm.cls
@@ -23,8 +23,8 @@
%
% ----------------------------------------------------------
-\newcommand*{\iodhbwm@cls@version}{v1.1.0}
-\newcommand*{\iodhbwm@cls@date}{2019-05-15}
+\newcommand*{\iodhbwm@cls@version}{v1.1.1}
+\newcommand*{\iodhbwm@cls@date}{2019-09-08}
\newcommand*{\iodhbwm@cls@info}{Inoffical DHBW Mannheim thesis class}
\ProvidesClass{iodhbwm}[%
@@ -204,6 +204,7 @@
\definecolor{DHBW-blue}{HTML}{026f93}
\definecolor{DHBW-darkblue}{HTML}{23527c}
\definecolor{DHBW-light}{HTML}{ffffff}
+\definecolor{DHBW-light-gray}{HTML}{f2f2f2}
\definecolor{DHBW-font}{HTML}{5c6971}
\definecolor{DHBW-dark-font}{HTML}{333333}
@@ -322,8 +323,11 @@
showstringspaces=false,
tabsize=2,
breaklines=true,
- xleftmargin=17pt,
- framexleftmargin=17pt,
+ xleftmargin=3em,
+ framexleftmargin=3em,
+ aboveskip=\baselineskip,
+ frame=tb,
+ captionpos=t,
}
\DeclareCaptionFont{DHBWlisting}{\color{DHBW-light}}
@@ -336,54 +340,44 @@
\DeclareCaptionFormat{listingprint}{%
\colorbox{white}{%
- \parbox{\dimexpr\textwidth-2\fboxsep\relax}{#1#2#3}%
+ \parbox{\dimexpr\textwidth-2\fboxsep\relax}{#1#2#3}
}%
}
\captionsetup[lstlisting]{%
- format=listing,
+ format=listingprint,
singlelinecheck=false,
margin=0pt
}%
\ifbool{iodhbwm@cls@if@print}{%
\captionsetup[lstlisting]{%
- format=listingprint,
- singlelinecheck=false,
- margin=0pt,
font={print,sf},
}%
\lstset{
- basicstyle=\footnotesize\ttfamily\color{DHBW-dark-font},
+ basicstyle=\scriptsize\ttfamily\color{DHBW-dark-font},
backgroundcolor=\color{DHBW-light},
rulecolor=\color{black},
commentstyle=\color{DHBW-font},
keywordstyle=\color{DHBW-dark-font},
- numberstyle=\scriptsize\color{DHBW-font},
- stringstyle=\color{DHBW-dark-font},
- frame=tb,
- captionpos=b,
- aboveskip=\baselineskip
+ numberstyle=\scriptsize\ttfamily\color{DHBW-font},
+ stringstyle=\color{DHBW-dark-font}
}%
}{%
\captionsetup[lstlisting]{%
format=listing,
- singlelinecheck=false,
- margin=0pt,
font={DHBWlisting,sf},
}%
\lstset{
- basicstyle=\footnotesize\ttfamily\color{DHBW-dark-font},
- backgroundcolor=\color{DHBW-light},
+ basicstyle=\scriptsize\ttfamily\color{DHBW-dark-font},
+ backgroundcolor=\color{DHBW-light-gray},
rulecolor=\color{DHBW-red},
commentstyle=\color{DHBW-font},
keywordstyle=\color{DHBW-darkblue},
- numberstyle=\scriptsize\color{DHBW-font},
- stringstyle=\color{purple},
- frame=b,
- captionpos=t,
+ numberstyle=\scriptsize\ttfamily\color{DHBW-font},
+ stringstyle=\color{purple}
}
}
}{}
diff --git a/macros/latex/contrib/l3build/CHANGELOG.md b/macros/latex/contrib/l3build/CHANGELOG.md
index 51aceb3797..50d5d5cc9d 100644
--- a/macros/latex/contrib/l3build/CHANGELOG.md
+++ b/macros/latex/contrib/l3build/CHANGELOG.md
@@ -7,6 +7,12 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+## [2019-09-18]
+
+### Added
+
+- `checkinit_hook()`
+
## [2019-09-14]
### Changed
@@ -321,7 +327,8 @@ this project uses date-based 'snapshot' version identifiers.
- Rationalise short option names: removed `-d`, `-E`, `-r`
- Target `cmdcheck`: specific to LaTeX3 kernel work
-[Unreleased]: https://github.com/latex3/l3build/compare/2019-09-14...HEAD
+[Unreleased]: https://github.com/latex3/l3build/compare/2019-09-18...HEAD
+[2019-09-18]: https://github.com/latex3/l3build/compare/2019-09-14...2019-09-18
[2019-09-14]: https://github.com/latex3/l3build/compare/2019-08-24...2019-09-14
[2019-08-24]: https://github.com/latex3/l3build/compare/2019-07-31...2019-08-24
[2019-07-31]: https://github.com/latex3/l3build/compare/2019-07-30...2019-07-31
diff --git a/macros/latex/contrib/l3build/README.md b/macros/latex/contrib/l3build/README.md
index 143cae0fdf..39787b7856 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 LaTeX3
=================================================
-Release 2019-09-14
+Release 2019-09-18
Overview
--------
diff --git a/macros/latex/contrib/l3build/l3build-check.lua b/macros/latex/contrib/l3build/l3build-check.lua
index c05defc792..8d1d58aee3 100644
--- a/macros/latex/contrib/l3build/l3build-check.lua
+++ b/macros/latex/contrib/l3build/l3build-check.lua
@@ -81,8 +81,11 @@ function checkinit()
cp(i, supportdir, testdir)
end
execute(os_ascii .. ">" .. testdir .. "/ascii.tcx")
+ return checkinit_hook()
end
+checkinit_hook = checkinit_hook or function() return 0 end
+
local function rewrite(source,result,processor,...)
local file = assert(open(source,"rb"))
local content = gsub(file:read("*all") .. "\n","\r\n","\n")
diff --git a/macros/latex/contrib/l3build/l3build.1 b/macros/latex/contrib/l3build/l3build.1
index 51c6f3f72d..bf724455ec 100644
--- a/macros/latex/contrib/l3build/l3build.1
+++ b/macros/latex/contrib/l3build/l3build.1
@@ -1,4 +1,4 @@
-.TH l3build 1 "2019-09-14"
+.TH l3build 1 "2019-09-18"
.SH NAME
l3build \- Checking and building packages
.SH SYNOPSIS
diff --git a/macros/latex/contrib/l3build/l3build.dtx b/macros/latex/contrib/l3build/l3build.dtx
index 81e3be423e..a7e04a1a6f 100644
--- a/macros/latex/contrib/l3build/l3build.dtx
+++ b/macros/latex/contrib/l3build/l3build.dtx
@@ -229,7 +229,7 @@
% }^^A
% }
%
-% \date{Released 2019-09-14}
+% \date{Released 2019-09-18}
%
% \maketitle
% \tableofcontents
@@ -1082,6 +1082,12 @@
% \END
% \end{Verbatim}
%
+% \subsection{Pre-check hook}
+%
+% To allow complex set up for tests, a hook |checkinit_hook()| is available
+% to be executed once all standard set up is complete but before any tests
+% are run.
+%
% \subsection{Additional test tasks}
%
% A standard test will run the file \texttt{\meta{name}.lvt} using one
@@ -1292,7 +1298,7 @@
% '\nrelease_date = "%d%d%d%d/%d%d/%d%d"\n',
% '\nrelease_date = "' .. tagname .. '"\n')
% end
-% return contents
+% return content
% end
% \end{lstlisting}
% \caption{Example \texttt{update_tag} function.}
diff --git a/macros/latex/contrib/l3build/l3build.lua b/macros/latex/contrib/l3build/l3build.lua
index fb7b727f80..c0eea6b33a 100644
--- 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 = "2019-09-14"
+release_date = "2019-09-18"
-- 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
index de378d10b3..3efe981d03 100644
--- a/macros/latex/contrib/l3build/l3build.pdf
+++ b/macros/latex/contrib/l3build/l3build.pdf
Binary files differ
diff --git a/macros/luatex/generic/luaotfload/NEWS b/macros/luatex/generic/luaotfload/NEWS
index aa6b4ca7d7..39bfcc4cc3 100644
--- a/macros/luatex/generic/luaotfload/NEWS
+++ b/macros/luatex/generic/luaotfload/NEWS
@@ -1,7 +1,8 @@
Change History
--------------
-2019-08-11 luaotfload v2.991
- * fix issue #88
+2019-09-13 luaotfload v3.0
+ * invisible option to avoid that some glyph are shown (issue #63)
+ * correct small bug in xheight calculation
2019-08-11 luaotfload v2.99
* some clean up
diff --git a/macros/luatex/generic/luaotfload/README.md b/macros/luatex/generic/luaotfload/README.md
index e59852f294..a6f24d4ab9 100644
--- a/macros/luatex/generic/luaotfload/README.md
+++ b/macros/luatex/generic/luaotfload/README.md
@@ -1,8 +1,8 @@
# The Luaotfload Package
-VERSION: 2.991
+VERSION: 3.00
-DATE: 2019-08-11
+DATE: 2019-09-13
## Description
diff --git a/macros/luatex/generic/luaotfload/filegraph.pdf b/macros/luatex/generic/luaotfload/filegraph.pdf
index e5807ca3ca..a14afaa169 100644
--- a/macros/luatex/generic/luaotfload/filegraph.pdf
+++ b/macros/luatex/generic/luaotfload/filegraph.pdf
Binary files differ
diff --git a/macros/luatex/generic/luaotfload/luaotfload-auxiliary.lua b/macros/luatex/generic/luaotfload/luaotfload-auxiliary.lua
index 3e3283b5ff..d3b5c73418 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-auxiliary.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-auxiliary.lua
@@ -6,8 +6,8 @@
local ProvidesLuaModule = {
name = "luaotfload-auxiliary",
- version = "2.991", --TAGVERSION
- date = "2019-08-11", --TAGDATE
+ version = "3.00", --TAGVERSION
+ date = "2019-09-13", --TAGDATE
description = "luaotfload submodule / auxiliary functions",
license = "GPL v2.0"
}
@@ -285,7 +285,7 @@ luaotfload_callbacks [#luaotfload_callbacks + 1] = {
local function set_xheight(tfmdata)
local parameters = tfmdata.parameters
if not parameters then return end
- if not (parameters.x_height or parameters[5] or 0) == 0 then return end
+ if not ((parameters.x_height or parameters[5] or 0) == 0) then return end
if tfmdata.characters and tfmdata.characters[120] then
parameters.x_height = tfmdata.characters[120].height
else
diff --git a/macros/luatex/generic/luaotfload/luaotfload-colors.lua b/macros/luatex/generic/luaotfload/luaotfload-colors.lua
index d9dabd1c6c..fdae0c4450 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-colors.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-colors.lua
@@ -5,8 +5,8 @@
local ProvidesLuaModule = {
name = "luaotfload-colors",
- version = "2.991", --TAGVERSION
- date = "2019-08-11", --TAGDATE
+ version = "3.00", --TAGVERSION
+ date = "2019-09-13", --TAGDATE
description = "luaotfload submodule / color",
license = "GPL v2.0",
author = "Khaled Hosny, Elie Roux, Philipp Gesang, Dohyun Kim, David Carlisle",
diff --git a/macros/luatex/generic/luaotfload/luaotfload-conf.pdf b/macros/luatex/generic/luaotfload/luaotfload-conf.pdf
index 7ea1cd2882..edea84a1d7 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-conf.pdf
+++ b/macros/luatex/generic/luaotfload/luaotfload-conf.pdf
Binary files differ
diff --git a/macros/luatex/generic/luaotfload/luaotfload-configuration.lua b/macros/luatex/generic/luaotfload/luaotfload-configuration.lua
index 12fc63e0d5..fc30cc8343 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-configuration.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-configuration.lua
@@ -7,8 +7,8 @@
local ProvidesLuaModule = {
name = "luaotfload-configuration",
- version = "2.991", --TAGVERSION
- date = "2019-08-11", --TAGDATE
+ version = "3.00", --TAGVERSION
+ date = "2019-09-13", --TAGDATE
description = "luaotfload submodule / config file reader",
license = "GPL v2.0"
}
diff --git a/macros/luatex/generic/luaotfload/luaotfload-database.lua b/macros/luatex/generic/luaotfload/luaotfload-database.lua
index a932456b6a..0610618905 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-database.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-database.lua
@@ -5,8 +5,8 @@
do -- block to avoid to many local variables error
local ProvidesLuaModule = {
name = "luaotfload-database",
- version = "2.991", --TAGVERSION
- date = "2019-08-11", --TAGDATE
+ version = "3.00", --TAGVERSION
+ date = "2019-09-13", --TAGDATE
description = "luaotfload submodule / database",
license = "GPL v2.0",
author = "Khaled Hosny, Elie Roux, Philipp Gesang, Marcel Krüger",
@@ -239,15 +239,53 @@ end
--- string -> string
-local invalidchars = "[^%a%d]"
-
+local macroman2utf8 do
+ local mapping = {
+ [0x80] = 0x00C4, [0x81] = 0x00C5, [0x82] = 0x00C7, [0x83] = 0x00C9,
+ [0x84] = 0x00D1, [0x85] = 0x00D6, [0x86] = 0x00DC, [0x87] = 0x00E1,
+ [0x88] = 0x00E0, [0x89] = 0x00E2, [0x8A] = 0x00E4, [0x8B] = 0x00E3,
+ [0x8C] = 0x00E5, [0x8D] = 0x00E7, [0x8E] = 0x00E9, [0x8F] = 0x00E8,
+ [0x90] = 0x00EA, [0x91] = 0x00EB, [0x92] = 0x00ED, [0x93] = 0x00EC,
+ [0x94] = 0x00EE, [0x95] = 0x00EF, [0x96] = 0x00F1, [0x97] = 0x00F3,
+ [0x98] = 0x00F2, [0x99] = 0x00F4, [0x9A] = 0x00F6, [0x9B] = 0x00F5,
+ [0x9C] = 0x00FA, [0x9D] = 0x00F9, [0x9E] = 0x00FB, [0x9F] = 0x00FC,
+ [0xA0] = 0x2020, [0xA1] = 0x00B0, [0xA2] = 0x00A2, [0xA3] = 0x00A3,
+ [0xA4] = 0x00A7, [0xA5] = 0x2022, [0xA6] = 0x00B6, [0xA7] = 0x00DF,
+ [0xA8] = 0x00AE, [0xA9] = 0x00A9, [0xAA] = 0x2122, [0xAB] = 0x00B4,
+ [0xAC] = 0x00A8, [0xAD] = 0x2260, [0xAE] = 0x00C6, [0xAF] = 0x00D8,
+ [0xB0] = 0x221E, [0xB1] = 0x00B1, [0xB2] = 0x2264, [0xB3] = 0x2265,
+ [0xB4] = 0x00A5, [0xB5] = 0x00B5, [0xB6] = 0x2202, [0xB7] = 0x2211,
+ [0xB8] = 0x220F, [0xB9] = 0x03C0, [0xBA] = 0x222B, [0xBB] = 0x00AA,
+ [0xBC] = 0x00BA, [0xBD] = 0x03A9, [0xBE] = 0x00E6, [0xBF] = 0x00F8,
+ [0xC0] = 0x00BF, [0xC1] = 0x00A1, [0xC2] = 0x00AC, [0xC3] = 0x221A,
+ [0xC4] = 0x0192, [0xC5] = 0x2248, [0xC6] = 0x2206, [0xC7] = 0x00AB,
+ [0xC8] = 0x00BB, [0xC9] = 0x2026, [0xCA] = 0x00A0, [0xCB] = 0x00C0,
+ [0xCC] = 0x00C3, [0xCD] = 0x00D5, [0xCE] = 0x0152, [0xCF] = 0x0153,
+ [0xD0] = 0x2013, [0xD1] = 0x2014, [0xD2] = 0x201C, [0xD3] = 0x201D,
+ [0xD4] = 0x2018, [0xD5] = 0x2019, [0xD6] = 0x00F7, [0xD7] = 0x25CA,
+ [0xD8] = 0x00FF, [0xD9] = 0x0178, [0xDA] = 0x2044, [0xDB] = 0x20AC,
+ [0xDC] = 0x2039, [0xDD] = 0x203A, [0xDE] = 0xFB01, [0xDF] = 0xFB02,
+ [0xE0] = 0x2021, [0xE1] = 0x00B7, [0xE2] = 0x201A, [0xE3] = 0x201E,
+ [0xE4] = 0x2030, [0xE5] = 0x00C2, [0xE6] = 0x00CA, [0xE7] = 0x00C1,
+ [0xE8] = 0x00CB, [0xE9] = 0x00C8, [0xEA] = 0x00CD, [0xEB] = 0x00CE,
+ [0xEC] = 0x00CF, [0xED] = 0x00CC, [0xEE] = 0x00D3, [0xEF] = 0x00D4,
+ [0xF0] = 0xF8FF, [0xF1] = 0x00D2, [0xF2] = 0x00DA, [0xF3] = 0x00DB,
+ [0xF4] = 0x00D9, [0xF5] = 0x0131, [0xF6] = 0x02C6, [0xF7] = 0x02DC,
+ [0xF8] = 0x00AF, [0xF9] = 0x02D8, [0xFA] = 0x02D9, [0xFB] = 0x02DA,
+ [0xFC] = 0x00B8, [0xFD] = 0x02DD, [0xFE] = 0x02DB, [0xFF] = 0x02C7,
+ }
+ function macroman2utf8(s)
+ local bytes = {string.byte(s, 1, -1)}
+ for i=1,#bytes do
+ bytes[i] = mapping[bytes[i]] or bytes[i]
+ end
+ return utf8.char(table.unpack(bytes))
+ end
+end
local sanitize_fontname = function (str)
if str ~= nil then
- if utf8len(str) then
- str = alphnum_only(casefold(str, true))
- else
- str = stringgsub(stringlower(str), invalidchars, "")
- end
+ str = utf8len(str) and str or macroman2utf8(str)
+ str = alphnum_only(casefold(str, true))
return str
end
return nil
@@ -258,19 +296,13 @@ local sanitize_fontnames = function (rawnames)
for category, namedata in next, rawnames do
if type (namedata) == "string" then
- if utf8len(namedata) then
- result [category] = alphnum_only(casefold(namedata, true))
- else
- result [category] = stringgsub(stringlower(namedata), invalidchars, "")
- end
+ namedata = utf8len(namedata) and namedata or macroman2utf8(namedata)
+ result [category] = alphnum_only(casefold(namedata, true))
else
local target = { }
for field, name in next, namedata do
- if utf8len(name) then
- target [field] = alphnum_only(casefold(name, true))
- else
- target [field] = stringgsub(stringlower(name), invalidchars, "")
- end
+ name = utf8len(name) and name or macroman2utf8(name)
+ target [field] = alphnum_only(casefold(name, true))
end
result [category] = target
end
@@ -2520,14 +2552,13 @@ local collect_font_filenames_local = function ()
local files = collect_font_filenames_dir (pwd, "local")
local nfiles = #files
if nfiles > 0 then
- targetnames.meta["local"] = true --- prevent saving to disk
logreport ("term", 1, "db", "Found %d files.", pwd)
else
logreport ("term", 1, "db",
"Couldn’t find a thing here. What a waste.", pwd)
end
logreport ("term", 3, "db", "Collected %d files.", #files)
- return files
+ return files, nfiles > 0
end
--- fontentry list -> filemap
@@ -3083,8 +3114,14 @@ local collect_font_filenames = function ()
tableappend (filenames, collect_font_filenames_texmf ())
tableappend (filenames, collect_font_filenames_system ())
- if config.luaotfload.db.scan_local == true then
- tableappend (filenames, collect_font_filenames_local ())
+ local scan_local = config.luaotfload.db.scan_local == true
+ if scan_local then
+ local localfonts, found = collect_font_filenames_local()
+ if found then
+ tableappend (filenames, localfonts)
+ else
+ scan_local = false
+ end
end
--- Now drop everything above max_fonts.
if max_fonts < #filenames then
@@ -3094,7 +3131,7 @@ local collect_font_filenames = function ()
if bisect then
return { unpack (filenames, bisect[1], bisect[2]) }
end
- return filenames
+ return filenames, scan_local
end
--[[doc--
@@ -3365,7 +3402,10 @@ update_names = function (currentnames, force, dry_run)
read_blacklist ()
--- pass 1: Collect the names of all fonts we are going to process.
- local font_filenames = collect_font_filenames ()
+ local font_filenames, local_fonts = collect_font_filenames ()
+ if local_fonts then
+ targetnames.meta['local'] = true
+ end
--- pass 2: read font files (normal case) or reuse information
--- present in index
diff --git a/macros/luatex/generic/luaotfload/luaotfload-diagnostics.lua b/macros/luatex/generic/luaotfload/luaotfload-diagnostics.lua
index 8ef443aedc..b38c1add0d 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-diagnostics.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-diagnostics.lua
@@ -7,8 +7,8 @@
local ProvidesLuaModule = {
name = "luaotfload-diagnostics",
- version = "2.991", --TAGVERSION
- date = "2019-08-11", --TAGDATE
+ version = "3.00", --TAGVERSION
+ date = "2019-09-13", --TAGDATE
description = "luaotfload-tool submodule / diagnostics",
license = "GPL v2.0"
}
diff --git a/macros/luatex/generic/luaotfload/luaotfload-embolden.lua b/macros/luatex/generic/luaotfload/luaotfload-embolden.lua
index 5229c009f7..bd2237f086 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-embolden.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-embolden.lua
@@ -5,8 +5,8 @@
local ProvidesLuaModule = {
name = "luaotfload-embolden",
- version = "2.991", --TAGVERSION
- date = "2019-08-11", --TAGDATE
+ version = "3.00", --TAGVERSION
+ date = "2019-09-13", --TAGDATE
description = "luaotfload submodule / color",
license = "GPL v2.0",
author = "Marcel Krüger"
diff --git a/macros/luatex/generic/luaotfload/luaotfload-features.lua b/macros/luatex/generic/luaotfload/luaotfload-features.lua
index 1d41cfd192..3901d940dd 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-features.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-features.lua
@@ -5,8 +5,8 @@
local ProvidesLuaModule = {
name = "luaotfload-features",
- version = "2.991", --TAGVERSION
- date = "2019-08-11", --TAGDATE
+ version = "3.00", --TAGVERSION
+ date = "2019-09-13", --TAGDATE
description = "luaotfload submodule / features",
license = "GPL v2.0",
author = "Hans Hagen, Khaled Hosny, Elie Roux, Philipp Gesang, Marcel Krüger",
diff --git a/macros/luatex/generic/luaotfload/luaotfload-filelist.lua b/macros/luatex/generic/luaotfload/luaotfload-filelist.lua
index 612822440f..ade50b4316 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-filelist.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-filelist.lua
@@ -6,8 +6,8 @@
local ProvidesLuaModule = {
name = "luaotfload-filelist",
- version = "2.991", --TAGVERSION
- date = "2019-08-11", --TAGDATE
+ version = "3.00", --TAGVERSION
+ date = "2019-09-13", --TAGDATE
description = "luaotfload submodule / filelist",
license = "GPL v2.0"
}
@@ -249,6 +249,7 @@ luaotfload.filelist.data =
{ name = "embolden" ,kind = kind_library, ext =".lua", gitdir=gitdirsrc, texdir=texdirtex, gitpref = "luaotfload-" },
{ name = "notdef" ,kind = kind_library, ext =".lua", gitdir=gitdirsrc, texdir=texdirtex, gitpref = "luaotfload-" },
{ name = "loaders" ,kind = kind_library, ext =".lua", gitdir=gitdirsrc, texdir=texdirtex, gitpref = "luaotfload-" },
+ { name = "multiscript" ,kind = kind_library, ext =".lua", gitdir=gitdirsrc, texdir=texdirtex, gitpref = "luaotfload-" },
{ name = "parsers" ,kind = kind_library, ext =".lua", gitdir=gitdirsrc, texdir=texdirtex, gitpref = "luaotfload-" },
{ name = "resolvers" ,kind = kind_library, ext =".lua", gitdir=gitdirsrc, texdir=texdirtex, gitpref = "luaotfload-" },
{ name = "unicode" ,kind = kind_library, ext =".lua", gitdir=gitdirsrc, texdir=texdirtex, gitpref = "luaotfload-" },
diff --git a/macros/luatex/generic/luaotfload/luaotfload-glyphlist.lua b/macros/luatex/generic/luaotfload/luaotfload-glyphlist.lua
index 43c927b3d3..1ba46ab0d7 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-glyphlist.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-glyphlist.lua
@@ -1,7 +1,7 @@
local ProvidesLuaModule = {
name = "luaotfload-glyphlist",
- version = "2.991", --TAGVERSION
- date = "2019-08-11", --TAGDATE
+ version = "3.00", --TAGVERSION
+ date = "2019-09-13", --TAGDATE
description = "luaotfload submodule / autogenerated glyphlist",
copyright = "derived from https://raw.githubusercontent.com/adobe-type-tools/agl-aglfn/master/glyphlist.txt",
original = "Adobe Glyph List, version 2.0, September 20, 2002",
diff --git a/macros/luatex/generic/luaotfload/luaotfload-init.lua b/macros/luatex/generic/luaotfload/luaotfload-init.lua
index 9c932892f4..6a80546d43 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-init.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-init.lua
@@ -7,8 +7,8 @@
local ProvidesLuaModule = {
name = "luaotfload-init",
- version = "2.991", --TAGVERSION
- date = "2019-08-11", --TAGDATE
+ version = "3.00", --TAGVERSION
+ date = "2019-09-13", --TAGDATE
description = "luaotfload submodule / initialization",
license = "GPL v2.0"
}
@@ -462,6 +462,14 @@ end --- [init_adapt]
local init_main = function ()
+ --[[doc--
+
+ First save a copy of font.each in order to also catch old-style fonts
+
+ --doc]]--
+
+ font.originaleach = font.each
+
local load_fontloader_module = luaotfload.loaders.fontloader
local ignore_module = luaotfload.loaders.ignore
@@ -648,7 +656,11 @@ local init_post_install_callbacks = function ()
-- MK Pass current text direction to simple_font_handler
local handler = nodes.simple_font_handler
local callback = function(head, groupcode, _, _, direction)
- return handler(head, groupcode, nil, nil, direction or tex.get'textdir')
+ if not direction then
+ direction = tex.get'textdir'
+ end
+ domultiscript(head, nil, nil, nil, direction)
+ return handler(head, groupcode, nil, nil, direction)
end
luatexbase.add_to_callback("pre_linebreak_filter",
callback,
diff --git a/macros/luatex/generic/luaotfload/luaotfload-latex.pdf b/macros/luatex/generic/luaotfload/luaotfload-latex.pdf
index 43bfb25a2b..8b128aed7e 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-latex.pdf
+++ b/macros/luatex/generic/luaotfload/luaotfload-latex.pdf
Binary files differ
diff --git a/macros/luatex/generic/luaotfload/luaotfload-letterspace.lua b/macros/luatex/generic/luaotfload/luaotfload-letterspace.lua
index 1acf67df8b..bbd045e4f8 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-letterspace.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-letterspace.lua
@@ -5,8 +5,8 @@
local ProvidesLuaModule = {
name = "luaotfload-letterspace",
- version = "2.991", --TAGVERSION
- date = "2019-08-11", --TAGDATE
+ version = "3.00", --TAGVERSION
+ date = "2019-09-13", --TAGDATE
description = "luaotfload submodule / color",
license = "GPL v2.0",
copyright = "PRAGMA ADE / ConTeXt Development Team",
diff --git a/macros/luatex/generic/luaotfload/luaotfload-loaders.lua b/macros/luatex/generic/luaotfload/luaotfload-loaders.lua
index 39ffd243f7..11e63c571a 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-loaders.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-loaders.lua
@@ -8,8 +8,8 @@
local ProvidesLuaModule = {
name = "luaotfload-loaders",
- version = "2.991", --TAGVERSION
- date = "2019-08-11", --TAGDATE
+ version = "3.00", --TAGVERSION
+ date = "2019-09-13", --TAGDATE
description = "luaotfload submodule / callback handling",
license = "GPL v2.0"
}
diff --git a/macros/luatex/generic/luaotfload/luaotfload-log.lua b/macros/luatex/generic/luaotfload/luaotfload-log.lua
index 17938ffd3d..04012632fa 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-log.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-log.lua
@@ -6,8 +6,8 @@
local ProvidesLuaModule = {
name = "luaotfload-log",
- version = "2.991", --TAGVERSION
- date = "2019-08-11", --TAGDATE
+ version = "3.00", --TAGVERSION
+ date = "2019-09-13", --TAGDATE
description = "luaotfload submodule / logging",
license = "GPL v2.0",
author = "Khaled Hosny, Elie Roux, Philipp Gesang",
diff --git a/macros/luatex/generic/luaotfload/luaotfload-main.lua b/macros/luatex/generic/luaotfload/luaotfload-main.lua
index 6c4b920181..26bbfab506 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-main.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-main.lua
@@ -20,8 +20,8 @@ local authors = "\z
-- version number is used below!
local ProvidesLuaModule = {
name = "luaotfload-main",
- version = "2.991", --TAGVERSION
- date = "2019-08-11", --TAGDATE
+ version = "3.00", --TAGVERSION
+ date = "2019-09-13", --TAGDATE
description = "luaotfload entry point",
author = authors,
copyright = authors,
@@ -301,6 +301,7 @@ luaotfload.main = function ()
loadmodule "embolden" --- fake bold
loadmodule "notdef" --- missing glyph handling
initialize "auxiliary" --- additional high-level functionality
+ loadmodule "multiscript" --- ...
luaotfload.aux.start_rewrite_fontname () --- to be migrated to fontspec
diff --git a/macros/luatex/generic/luaotfload/luaotfload-main.tex b/macros/luatex/generic/luaotfload/luaotfload-main.tex
index 424b4e0fa8..8fdb4048ad 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-main.tex
+++ b/macros/luatex/generic/luaotfload/luaotfload-main.tex
@@ -32,7 +32,7 @@
\beginfrontmatter
\setdocumenttitle {The \identifier{luaotfload} package}
- \setdocumentdate {2019-08-11 v2.991}
+ \setdocumentdate {2019-09-13 v3.00}
\setdocumentauthor {Elie Roux · Khaled Hosny · Philipp Gesang · Ulrike Fischer\\
Home: \hyperlink {https://github.com/lualatex/luaotfload}\\
New Home: \hyperlink {https://github.com/u-fischer/luaotfload}\\
@@ -55,6 +55,12 @@
\pdfbookmark[1]{\contentsname}{table}
\typesetcontent
+\beginsection {New in version 3.00 (by Ulrike Fischer/Marcel Krüger)}
+\begin{itemize}
+\item Default Ignorable characters are now invisible by default (issue 63). This can be deactivated with the option \texttt{invisible}.
+\end{itemize}
+\endsection
+
\beginsection {New in version 2.99 (by Ulrike Fischer)}
\begin{itemize}
\item Code cleanup.
@@ -942,6 +948,28 @@ obviously, \inlinecode{random}.
\font \test = LatinModernRoman:protrusion=default
\endlisting
\endaltitem
+
+ \beginaltitem {invisible}
+ Default Ignorable characters are control characters that should be invisible by default even if the font has glyphs for them. Since version 3.0 luaotfload makes them invisible, this can be switch on and off with the \texttt{invisible}. By default it is on.
+
+ For example
+
+ \beginlisting
+ \font\amiri={file:amiri-regular.ttf} at 20pt \amiri
+ \char"200Dي\char"200D
+ \endlisting
+
+ {\font\amiri={file:amiri-regular.ttf} at 20pt \amiri \char"200Dي\char"200D}
+
+ \beginlisting
+ \font\amiri={file:amiri-regular.ttf:-invisible;} at 20pt \amiri
+ \char"200Dي\char"200D
+ \endlisting
+
+ {\font\amiri={file:amiri-regular.ttf:-invisible;} at 20pt \amiri \char"200Dي\char"200D}
+
+
+ \endaltitem
\enddescriptions
\endsubsection
diff --git a/macros/luatex/generic/luaotfload/luaotfload-multiscript.lua b/macros/luatex/generic/luaotfload/luaotfload-multiscript.lua
new file mode 100644
index 0000000000..ed3aef05c3
--- /dev/null
+++ b/macros/luatex/generic/luaotfload/luaotfload-multiscript.lua
@@ -0,0 +1,208 @@
+-----------------------------------------------------------------------
+-- FILE: luaotfload-multiscript.lua
+-- DESCRIPTION: part of luaotfload / multiscript
+-----------------------------------------------------------------------
+
+local ProvidesLuaModule = {
+ name = "luaotfload-multiscript",
+ version = "3.00", --TAGVERSION
+ date = "2019-09-13", --TAGDATE
+ description = "luaotfload submodule / multiscript",
+ license = "GPL v2.0",
+ author = "Marcel Krüger"
+}
+
+if luatexbase and luatexbase.provides_module then
+ luatexbase.provides_module (ProvidesLuaModule)
+end
+
+local nodenew = node.direct.new
+local getfont = font.getfont
+local setfont = node.direct.setfont
+local getwhd = node.direct.getwhd
+local insert_after = node.direct.insert_after
+local traverse_char = node.direct.traverse_char
+local protect_glyph = node.direct.protect_glyph
+local otffeatures = fonts.constructors.newfeatures "otf"
+
+local sep = lpeg.P' '^0 * ';' * lpeg.P' '^0
+local codepoint = lpeg.S'0123456789ABCDEF'^4/function(c)return tonumber(c, 16)end
+local codepoint_range = codepoint * ('..' * codepoint + lpeg.Cc(false))
+local function multirawset(table, key1, key2, value)
+ for key = key1,(key2 or key1) do
+ rawset(table, key, value)
+ end
+ return table
+end
+local script_extensions do
+ local entry = lpeg.Cg(codepoint_range * sep * lpeg.Ct((lpeg.C(lpeg.R'AZ' * lpeg.R'az'^1))^1 * ' ') * '#')^-1 * (1-lpeg.P'\n')^0 * '\n'
+ local file = lpeg.Cf(
+ lpeg.Ct''
+ * entry^0
+ , multirawset)
+
+ local f = io.open(kpse.find_file"ScriptExtensions.txt")
+ script_extensions = file:match(f:read'*a')
+ f:close()
+ for cp,t in next, script_extensions do
+ for i=1,#t do
+ t[t[i]] = true
+ end
+ end
+end
+local script_mapping do
+ -- We could extract these from PropertyValueAliases.txt...
+ local script_aliases = {
+ Adlam = "Adlm", Caucasian_Albanian = "Aghb", Ahom = "Ahom", Arabic = "Arab",
+ Imperial_Aramaic = "Armi", Armenian = "Armn", Avestan = "Avst",
+ Balinese = "Bali", Bamum = "Bamu", Bassa_Vah = "Bass", Batak = "Batk",
+ Bengali = "Beng", Bhaiksuki = "Bhks", Bopomofo = "Bopo", Brahmi = "Brah",
+ Braille = "Brai", Buginese = "Bugi", Buhid = "Buhd", Chakma = "Cakm",
+ Canadian_Aboriginal = "Cans", Carian = "Cari", Cham = "Cham",
+ Cherokee = "Cher", Coptic = "Copt", Cypriot = "Cprt", Cyrillic = "Cyrl",
+ Devanagari = "Deva", Dogra = "Dogr", Deseret = "Dsrt", Duployan = "Dupl",
+ Egyptian_Hieroglyphs = "Egyp", Elbasan = "Elba", Elymaic = "Elym",
+ Ethiopic = "Ethi", Georgian = "Geor", Glagolitic = "Glag",
+ Gunjala_Gondi = "Gong", Masaram_Gondi = "Gonm", Gothic = "Goth",
+ Grantha = "Gran", Greek = "Grek", Gujarati = "Gujr", Gurmukhi = "Guru",
+ Hangul = "Hang", Han = "Hani", Hanunoo = "Hano", Hatran = "Hatr",
+ Hebrew = "Hebr", Hiragana = "Hira", Anatolian_Hieroglyphs = "Hluw",
+ Pahawh_Hmong = "Hmng", Nyiakeng_Puachue_Hmong = "Hmnp",
+ Katakana_Or_Hiragana = "Hrkt", Old_Hungarian = "Hung", Old_Italic = "Ital",
+ Javanese = "Java", Kayah_Li = "Kali", Katakana = "Kana",
+ Kharoshthi = "Khar", Khmer = "Khmr", Khojki = "Khoj", Kannada = "Knda",
+ Kaithi = "Kthi", Tai_Tham = "Lana", Lao = "Laoo", Latin = "Latn",
+ Lepcha = "Lepc", Limbu = "Limb", Linear_A = "Lina", Linear_B = "Linb",
+ Lisu = "Lisu", Lycian = "Lyci", Lydian = "Lydi", Mahajani = "Mahj",
+ Makasar = "Maka", Mandaic = "Mand", Manichaean = "Mani", Marchen = "Marc",
+ Medefaidrin = "Medf", Mende_Kikakui = "Mend", Meroitic_Cursive = "Merc",
+ Meroitic_Hieroglyphs = "Mero", Malayalam = "Mlym", Modi = "Modi",
+ Mongolian = "Mong", Mro = "Mroo", Meetei_Mayek = "Mtei", Multani = "Mult",
+ Myanmar = "Mymr", Nandinagari = "Nand", Old_North_Arabian = "Narb",
+ Nabataean = "Nbat", Newa = "Newa", Nko = "Nkoo", Nushu = "Nshu",
+ Ogham = "Ogam", Ol_Chiki = "Olck", Old_Turkic = "Orkh", Oriya = "Orya",
+ Osage = "Osge", Osmanya = "Osma", Palmyrene = "Palm", Pau_Cin_Hau = "Pauc",
+ Old_Permic = "Perm", Phags_Pa = "Phag", Inscriptional_Pahlavi = "Phli",
+ Psalter_Pahlavi = "Phlp", Phoenician = "Phnx", Miao = "Plrd",
+ Inscriptional_Parthian = "Prti", Rejang = "Rjng", Hanifi_Rohingya = "Rohg",
+ Runic = "Runr", Samaritan = "Samr", Old_South_Arabian = "Sarb",
+ Saurashtra = "Saur", SignWriting = "Sgnw", Shavian = "Shaw",
+ Sharada = "Shrd", Siddham = "Sidd", Khudawadi = "Sind", Sinhala = "Sinh",
+ Sogdian = "Sogd", Old_Sogdian = "Sogo", Sora_Sompeng = "Sora",
+ Soyombo = "Soyo", Sundanese = "Sund", Syloti_Nagri = "Sylo",
+ Syriac = "Syrc", Tagbanwa = "Tagb", Takri = "Takr", Tai_Le = "Tale",
+ New_Tai_Lue = "Talu", Tamil = "Taml", Tangut = "Tang", Tai_Viet = "Tavt",
+ Telugu = "Telu", Tifinagh = "Tfng", Tagalog = "Tglg", Thaana = "Thaa",
+ Thai = "Thai", Tibetan = "Tibt", Tirhuta = "Tirh", Ugaritic = "Ugar",
+ Vai = "Vaii", Warang_Citi = "Wara", Wancho = "Wcho", Old_Persian = "Xpeo",
+ Cuneiform = "Xsux", Yi = "Yiii", Zanabazar_Square = "Zanb",
+ Inherited = "Zinh", Common = "Zyyy", Unknown = "Zzzz",
+ }
+ local entry = lpeg.Cg(codepoint_range * sep * ((lpeg.R'AZ' + lpeg.R'az' + '_')^1/script_aliases))^-1 * (1-lpeg.P'\n')^0 * '\n'
+ -- local entry = lpeg.Cg(codepoint_range * sep * lpeg.Cc(true))^-1 * (1-lpeg.P'\n')^0 * '\n'
+ local file = lpeg.Cf(
+ lpeg.Ct''
+ * entry^0
+ , multirawset)
+
+ local f = io.open(kpse.find_file"Scripts.txt")
+ script_mapping = file:match(f:read'*a')
+ f:close()
+end
+
+local additional_scripts_tables = { }
+
+local additional_scripts_fonts = setmetatable({}, {
+ __index = function(t, fid)
+ local f = font.getfont(fid)
+ -- table.tofile('myfont2', f)
+ local res = f and f.additional_scripts or false
+ t[fid] = res
+ return res
+ end,
+})
+
+local function makecombifont(tfmdata, _, additional_scripts)
+ local basescript = tfmdata.properties.script
+ local scripts = {basescript = false}
+ additional_scripts = additional_scripts_tables[additional_scripts]
+ for script, fontname in pairs(additional_scripts) do
+ if script ~= basescript then
+ local f = fonts.definers.read(fontname, tfmdata.size)
+ local fid
+ if type(f) == 'table' then
+ fid = font.define(f)
+ else
+ error[[FIXME???]]
+ end
+ scripts[script] = {
+ fid = fid,
+ font = f,
+ characters = f.characters,
+ }
+ end
+ end
+ tfmdata.additional_scripts = scripts
+end
+
+local glyph_id = node.id'glyph'
+-- TODO: unset last_script, matching parentheses etc
+function domultiscript(head, _, _, _, direction)
+ head = node.direct.todirect(head)
+ local last_fid, last_fonts, last_script
+ for cur, cid, fid in traverse_char(head) do
+ if fid ~= last_fid then
+ last_fid, last_fonts, last_script = fid, additional_scripts_fonts[fid]
+ end
+ if last_fonts then
+ local mapped_scr = script_mapping[cid]
+ if mapped_scr == "Zinh" then
+ mapped_scr = last_script
+ else
+ local additional_scr = script_extensions[cid]
+ if additional_scripts then
+ if additional_scripts[last_script] then
+ mapped_scr = last_script
+ elseif not last_fonts[mapped_scr] then
+ for i = 1, #additional_scripts do
+ if last_fonts[additional_scripts[i]] then
+ mapped_scr = additional_scripts[i]
+ break
+ end
+ end
+ end
+ elseif mapped_scr == "Zyyy" then
+ mapped_scr = last_script
+ end
+ end
+ last_script = mapped_scr
+ local mapped_font = last_fonts[mapped_scr]
+ if mapped_font then
+ setfont(cur, mapped_font.fid)
+ end
+ end
+ end
+end
+
+function luaotfload.add_multiscript(name, fonts)
+ if fonts == nil then
+ fonts = name
+ name = #additional_scripts_fonts + 1
+ end
+ additional_scripts_tables[name] = fonts
+ return name
+end
+
+otffeatures.register {
+ name = "multiscript",
+ description = "Combine fonts for multiple scripts",
+ manipulators = {
+ node = makecombifont,
+ },
+ -- processors = { -- processors would be nice, but they are applied
+ -- -- too late for our purposes
+ -- node = donotdef,
+ -- }
+}
+
+--- vim:sw=2:ts=2:expandtab:tw=71
diff --git a/macros/luatex/generic/luaotfload/luaotfload-notdef.lua b/macros/luatex/generic/luaotfload/luaotfload-notdef.lua
index 196ea928bb..0cc972a0e3 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-notdef.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-notdef.lua
@@ -5,8 +5,8 @@
local ProvidesLuaModule = {
name = "luaotfload-notdef",
- version = "2.991", --TAGVERSION
- date = "2019-08-11", --TAGDATE
+ version = "3.00", --TAGVERSION
+ date = "2019-09-13", --TAGDATE
description = "luaotfload submodule / color",
license = "GPL v2.0",
author = "Marcel Krüger"
@@ -16,14 +16,69 @@ if luatexbase and luatexbase.provides_module then
luatexbase.provides_module (ProvidesLuaModule)
end
-local nodenew = node.direct.new
+local flush_node = node.direct.flush_node
local getfont = font.getfont
-local setfont = node.direct.setfont
+local getnext = node.direct.getnext
local getwhd = node.direct.getwhd
+local insert = table.insert
local insert_after = node.direct.insert_after
-local traverse_char = node.direct.traverse_char
+local kern_id = node.id'kern'
+local nodenew = node.direct.new
+local otfregister = fonts.constructors.features.otf.register
local protect_glyph = node.direct.protect_glyph
-local otffeatures = fonts.constructors.newfeatures "otf"
+local remove = node.direct.remove
+local setfont = node.direct.setfont
+local traverse_char = node.direct.traverse_char
+
+-- According to DerivedCoreProperties.txt, Default_Ignorable_Code_Point
+-- is generated from:
+-- Other_Default_Ignorable_Code_Point
+-- + Cf (Format characters)
+-- + Variation_Selector
+-- - White_Space
+-- - FFF9..FFFB (Interlinear annotation format characters)
+-- - 13430..13438 (Egyptian hieroglyph format characters)
+-- - Prepended_Concatenation_Mark (Exceptional format characters that should be visible)
+-- Based on HarfBuzz, we add the exclusion
+-- - Lo (Letter, Other)
+-- This affects Hangul fillers.
+local ignorable_codepoints do
+ local sep = lpeg.P' '^0 * ';' * lpeg.P' '^0
+ local codepoint = lpeg.S'0123456789ABCDEF'^4/function(c)return tonumber(c, 16)end
+ local codepoint_range = codepoint * ('..' * codepoint + lpeg.Cc(false))
+ local function multirawset(table, key1, key2, value)
+ for key = key1,(key2 or key1) do
+ rawset(table, key, value)
+ end
+ return table
+ end
+ local entry = lpeg.Cg(codepoint * ';' * (1-lpeg.P';')^0 * ';Cf;' * lpeg.Cc(true))^-1 * (1-lpeg.P'\n')^0 * '\n'
+ local file = lpeg.Cf(
+ lpeg.Ct''
+ * entry^0
+ , rawset)
+ local f = io.open(kpse.find_file"UnicodeData.txt")
+ ignorable_codepoints = file:match(f:read'*a')
+ f:close()
+ entry = lpeg.Cg(codepoint_range * sep * ('Other_Default_Ignorable_Code_Point' * lpeg.Cc(true)
+ + 'Variation_Selector' * lpeg.Cc(true)
+ + 'White_Space' * lpeg.Cc(nil)
+ + 'Prepended_Concatenation_Mark' * lpeg.Cc(nil)
+ ) * ' # ' * (1-lpeg.P'Lo'))^-1 * (1-lpeg.P'\n')^0 * '\n'
+ file = lpeg.Cf(
+ lpeg.Carg(1)
+ * entry^0
+ , multirawset)
+ f = io.open(kpse.find_file"PropList.txt")
+ ignorable_codepoints = file:match(f:read'*a', 1, ignorable_codepoints)
+ f:close()
+ for i = 0xFFF9,0xFFFB do
+ ignorable_codepoints[i] = nil
+ end
+ for i = 0x13430,0x13438 do
+ ignorable_codepoints[i] = nil
+ end
+end
local function setnotdef(tfmdata, factor)
local desc = tfmdata.shared.rawdata.descriptions
@@ -35,7 +90,6 @@ local function setnotdef(tfmdata, factor)
tfmdata.notdefcode = 0xF0000
return
end
- print')'
-- If this didn't happen, it might be mapped to one of the
-- replacement characters:
for code = 0xFFFC,0xFFFF do
@@ -45,7 +99,6 @@ local function setnotdef(tfmdata, factor)
return
end
end
- print')))'
-- Oh no, we couldn't find it. Maybe we can find it by name?
local code = tfmdata.resources.unicodes[".notdef"]
-- Better safe than sorry
@@ -54,7 +107,6 @@ local function setnotdef(tfmdata, factor)
tfmdata.notdefcode = code
return
end
- print'))))'
-- So the font didn't do the obvious things and then it lied to us.
-- At this point we should think about sending an automated complain
-- to the font author, but we probably can't trust the contact
@@ -81,7 +133,7 @@ local function donotdef(head, font, _, _, _)
if not notdef then return end
for cur, cid, fid in traverse_char(head) do if fid == font then
local w, h, d = getwhd(cur)
- if w == 0 and h == 0 and d == 0 and not chars[cid] then
+ if w == 0 and h == 0 and d == 0 and not chars[cid] and not ignorable_codepoints[cid] then
local notdefnode = nodenew(glyph_id, 256)
setfont(notdefnode, font, notdef)
insert_after(cur, cur, notdefnode)
@@ -90,7 +142,7 @@ local function donotdef(head, font, _, _, _)
end end
end
-otffeatures.register {
+otfregister {
name = "notdef",
description = "Add notdef glyphs",
default = 1,
@@ -102,4 +154,43 @@ otffeatures.register {
}
}
+function fonts.handlers.otf.handlers.gsub_remove(head,char,dataset,sequence,replacement)
+ local next
+ head, next = remove(head, char)
+ flush_node(char)
+ if not head and not next then -- Avoid a double free if we were alone
+ head = nodenew(kern_id)
+ end
+ return head, next, true, true
+end
+
+local sequence = {
+ features = {invisible = {["*"] = {["*"] = true}}},
+ flags = {false, false, false, false},
+ name = "invisible",
+ order = {"invisible"},
+ nofsteps = 1,
+ steps = {{
+ coverage = ignorable_codepoints,
+ index = 1,
+ }},
+ type = "gsub_remove",
+}
+local function invisibleinitialiser(tfmdata, value)
+ local resources = tfmdata.resources
+ local sequences = resources and resources.sequences
+ if sequences then
+ -- Now we get to the interesting part: At which point should our new sequence be inserted? Let's do it at the end, then they are still seen by all features.
+ insert(sequences, sequence)
+ end
+end
+otfregister {
+ name = 'invisible',
+ description = 'Remove invisible control characters',
+ default = true,
+ initializers = {
+ node = invisibleinitialiser,
+ },
+}
+
--- vim:sw=2:ts=2:expandtab:tw=71
diff --git a/macros/luatex/generic/luaotfload/luaotfload-parsers.lua b/macros/luatex/generic/luaotfload/luaotfload-parsers.lua
index 5a7ccd576f..f9fd5c919e 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-parsers.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-parsers.lua
@@ -7,8 +7,8 @@
local ProvidesLuaModule = {
name = "luaotfload-parsers",
- version = "2.991", --TAGVERSION
- date = "2019-08-11", --TAGDATE
+ version = "3.00", --TAGVERSION
+ date = "2019-09-13", --TAGDATE
description = "luaotfload submodule / filelist",
license = "GPL v2.0"
}
diff --git a/macros/luatex/generic/luaotfload/luaotfload-resolvers.lua b/macros/luatex/generic/luaotfload/luaotfload-resolvers.lua
index 839155a979..5146f1d20e 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-resolvers.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-resolvers.lua
@@ -11,8 +11,8 @@
local ProvidesLuaModule = {
name = "luaotfload-resolvers",
- version = "2.991", --TAGVERSION
- date = "2019-08-11", --TAGDATE
+ version = "3.00", --TAGVERSION
+ date = "2019-09-13", --TAGDATE
description = "luaotfload submodule / resolvers",
license = "GPL v2.0"
}
diff --git a/macros/luatex/generic/luaotfload/luaotfload-status.lua b/macros/luatex/generic/luaotfload/luaotfload-status.lua
index bd7b328979..69948c43ca 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-status.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-status.lua
@@ -55,36 +55,37 @@ return {
{ "fontloader-reference.lua", "759787e7ee75437382c0a2c4f8fe3b81" },
{ "fontloader-basics-gen.lua", "b21e91bbd534f77e368f0ec13f865aed" },
{ "mktests", "c7cff7025962922944376acc1ffa9c47" },
- { "mkstatus", "d84c8b2ae4c2335c5dbd9fba4846f0e9" },
+ { "mkstatus", "64b9a6b302168fced414830a53fdcce1" },
{ "mkcharacters", "92c24bb582fc84c0365634f29eb89863" },
{ "mkglyphlist", "557836886d4f0e6d656eac3ded4456a2" },
{ "mkimport", "60e0b11a1a68719033e86a3e0f4d5e86" },
- { "luaotfload-glyphlist.lua", "8a1cbf89f48a8ebe05a13345352a3435" },
+ { "luaotfload-glyphlist.lua", "df822678061548ce6b510a0c1c7fc103" },
{ "luaotfload-characters.lua", "593ce9dccf6ddc4f7d4be0514f581102" },
- { "luaotfload-unicode.lua", "aac378708c062d4de18132ae7600526f" },
- { "luaotfload-resolvers.lua", "7e777d41afc10c928cd26dccfed6ba09" },
- { "luaotfload-parsers.lua", "c69570b5f57d26abff8304f3a8eade58" },
- { "luaotfload-loaders.lua", "920578f2f66758755c20fbf3539b3542" },
- { "luaotfload-notdef.lua", "a4a40c92368510dcd81f6e95124bb2d3" },
- { "luaotfload-embolden.lua", "4b6a0240b0f696d63cf2b343603fc742" },
- { "luaotfload-letterspace.lua", "29453f635acb72ef76ec19942ce0449b" },
- { "luaotfload-features.lua", "1c837c95c485d54204157fd3840e177e" },
- { "luaotfload-database.lua", "3a3d0cbb02b0c9ff53b0dab969c7a879" },
- { "luaotfload-configuration.lua", "37ffbef314b79ca2ae9bfaf4e4552207" },
- { "luaotfload-colors.lua", "9b1ffa13d20cc4d1f2016e8d5b0939f1" },
- { "luaotfload-auxiliary.lua", "99ff2ebee659717c2d1f9999e3ab4448" },
- { "luaotfload-filelist.lua", "9de0e08f4b15acd7c56602ef362967e1" },
- { "luaotfload-tool.lua", "4a1be51390301a48480681e66d9be64f" },
- { "luaotfload-diagnostics.lua", "8c50e2459731ca15a511e4bd0b0d7685" },
- { "luaotfload-log.lua", "981ccf90bb3a970b056dbfa87046b36d" },
- { "luaotfload-init.lua", "acfe693817999d5c09272f3b33fe1aad" },
- { "luaotfload-main.lua", "80b07ab0301a7b8fb5d03acec1b5c5dc" },
+ { "luaotfload-unicode.lua", "d9ce2f2a07e951be6310e85fdfcc785d" },
+ { "luaotfload-resolvers.lua", "0b0d407501e68537971484ac2256af20" },
+ { "luaotfload-parsers.lua", "9b199d5157d9972c415aee7f9350df5b" },
+ { "luaotfload-multiscript.lua", "3a4cfa1687c9d1694cbf728183bb066e" },
+ { "luaotfload-loaders.lua", "007be1e29cf23779f4d9d0097b56cc4a" },
+ { "luaotfload-notdef.lua", "982810e9197d2261ffdc3acd5d8dcecf" },
+ { "luaotfload-embolden.lua", "92dfba7dbf10484c85f7e3c971691f8e" },
+ { "luaotfload-letterspace.lua", "bb123f78712cc0342419f3c2a5f6a940" },
+ { "luaotfload-features.lua", "45ab2c6405c678f8834339fe0d9fb47a" },
+ { "luaotfload-database.lua", "da3c5b55a086a2213ee825ecc2bf7e0f" },
+ { "luaotfload-configuration.lua", "015022f5b9597254afafff26f9f0f98c" },
+ { "luaotfload-colors.lua", "81a23496c5f5c855674b05180869b8cf" },
+ { "luaotfload-auxiliary.lua", "81432ebaebfce3df73b5949e1001d13c" },
+ { "luaotfload-filelist.lua", "aa3c9fa695042573d6f6c2e5d0c23558" },
+ { "luaotfload-tool.lua", "1833a47868c3e5958d492bb947d39dec" },
+ { "luaotfload-diagnostics.lua", "53dbf51623658f1e325d2e6279a2ee15" },
+ { "luaotfload-log.lua", "30491ef5890898d5ae3af44f72e82b1f" },
+ { "luaotfload-init.lua", "479854a620629b1934d16723aa4cae0c" },
+ { "luaotfload-main.lua", "95c7d3ce348ac83e0659f7332e98eacc" },
},
["notes"]={
- ["committer"]="Ulrike Fischer <fischer@troubleshooting-tex.de>",
- ["description"]="v2.991/2019-08-11",
+ ["committer"]="Marcel Fabian Krüger <tex@2krueger.de>",
+ ["description"]="v3.00/2019-09-13",
["loader"]="fontloader-2019-08-11.lua",
- ["revision"]="a86a6798c324c745af7b04f33fa188298d749a2a",
- ["timestamp"]="2019-08-19 19:38:30 +0200",
+ ["revision"]="e758f5d39e3d416e4bc1e2a23918abed744563ae",
+ ["timestamp"]="2019-09-13 00:43:25 +0200",
},
} \ No newline at end of file
diff --git a/macros/luatex/generic/luaotfload/luaotfload-tool.1 b/macros/luatex/generic/luaotfload/luaotfload-tool.1
index 81b5c22d6d..3636d2f6e6 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-tool.1
+++ b/macros/luatex/generic/luaotfload/luaotfload-tool.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH LUAOTFLOAD-TOOL 1 "2019-08-11" "2.991" "text processing"
+.TH LUAOTFLOAD-TOOL 1 "2019-09-13" "3.00" "text processing"
.SH NAME
luaotfload-tool \- generate and query the Luaotfload font names database
.
diff --git a/macros/luatex/generic/luaotfload/luaotfload-tool.lua b/macros/luatex/generic/luaotfload/luaotfload-tool.lua
index e7e144c6c7..06729778f4 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-tool.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-tool.lua
@@ -9,8 +9,8 @@
local ProvidesLuaModule = {
name = "luaotfload-tool",
- version = "2.991", --TAGVERSION
- date = "2019-08-11", --TAGDATE
+ version = "3.00", --TAGVERSION
+ date = "2019-09-13", --TAGDATE
description = "luaotfload-tool / database functionality",
license = "GPL v2.0"
}
diff --git a/macros/luatex/generic/luaotfload/luaotfload-tool.pdf b/macros/luatex/generic/luaotfload/luaotfload-tool.pdf
index e278f8bbc5..697cfefd3c 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-tool.pdf
+++ b/macros/luatex/generic/luaotfload/luaotfload-tool.pdf
Binary files differ
diff --git a/macros/luatex/generic/luaotfload/luaotfload-tool.rst b/macros/luatex/generic/luaotfload/luaotfload-tool.rst
index e091cbb1d1..5d61e04368 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-tool.rst
+++ b/macros/luatex/generic/luaotfload/luaotfload-tool.rst
@@ -6,9 +6,9 @@
generate and query the Luaotfload font names database
-----------------------------------------------------------------------
-:Date: 2019-08-11
+:Date: 2019-09-13
:Copyright: GPL v2.0
-:Version: 2.991
+:Version: 3.00
:Manual section: 1
:Manual group: text processing
diff --git a/macros/luatex/generic/luaotfload/luaotfload-unicode.lua b/macros/luatex/generic/luaotfload/luaotfload-unicode.lua
index 928bfcec96..d7cb98a338 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-unicode.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-unicode.lua
@@ -5,8 +5,8 @@
local ProvidesLuaModule = {
name = "luaotfload-unicode",
- version = "2.991", --TAGVERSION
- date = "2019-08-11", --TAGDATE
+ version = "3.00", --TAGVERSION
+ date = "2019-09-13", --TAGDATE
description = "luaotfload submodule / Unicode helpers",
license = "CC0 1.0 Universal",
author = "Marcel Krüger"
diff --git a/macros/luatex/generic/luaotfload/luaotfload.conf.5 b/macros/luatex/generic/luaotfload/luaotfload.conf.5
index 7fc9e48574..1173d9a3de 100644
--- a/macros/luatex/generic/luaotfload/luaotfload.conf.5
+++ b/macros/luatex/generic/luaotfload/luaotfload.conf.5
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH LUAOTFLOAD.CONF 5 "2019-08-11" "2.991" "text processing"
+.TH LUAOTFLOAD.CONF 5 "2019-09-13" "3.00" "text processing"
.SH NAME
luaotfload.conf \- Luaotfload configuration file
.
diff --git a/macros/luatex/generic/luaotfload/luaotfload.conf.rst b/macros/luatex/generic/luaotfload/luaotfload.conf.rst
index 754dff9f6a..7b85fd1a28 100644
--- a/macros/luatex/generic/luaotfload/luaotfload.conf.rst
+++ b/macros/luatex/generic/luaotfload/luaotfload.conf.rst
@@ -6,9 +6,9 @@
Luaotfload configuration file
-----------------------------------------------------------------------
-:Date: 2019-08-11
+:Date: 2019-09-13
:Copyright: GPL v2.0
-:Version: 2.991
+:Version: 3.00
:Manual section: 5
:Manual group: text processing
diff --git a/macros/luatex/generic/luaotfload/luaotfload.sty b/macros/luatex/generic/luaotfload/luaotfload.sty
index 69f2a4151f..1dede25f2f 100644
--- a/macros/luatex/generic/luaotfload/luaotfload.sty
+++ b/macros/luatex/generic/luaotfload/luaotfload.sty
@@ -40,7 +40,7 @@
\fi
\ifdefined\ProvidesPackage
\ProvidesPackage{luaotfload}%
- [2019/08/11 v2.991 OpenType layout system]
+ [2019/09/13 v3.00 OpenType layout system]
\fi
\directlua{
if xpcall(function ()%