diff options
author | Norbert Preining <norbert@preining.info> | 2025-02-16 03:03:23 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2025-02-16 03:03:23 +0000 |
commit | baf3f1749d75c5089256144019c074d60b182d4b (patch) | |
tree | 3b03bfa63bee3f3de3f25e6f401e42a471787756 /macros | |
parent | ae543609dd626aa6df44c3722611888fa2482af6 (diff) |
CTAN sync 202502160303
Diffstat (limited to 'macros')
56 files changed, 384 insertions, 332 deletions
diff --git a/macros/latex/contrib/codehigh/codehigh.lua b/macros/latex/contrib/codehigh/codehigh.lua index 4b23f1f9d6..798e070119 100644 --- a/macros/latex/contrib/codehigh/codehigh.lua +++ b/macros/latex/contrib/codehigh/codehigh.lua @@ -107,9 +107,9 @@ local count = 0 local function PrintCode(style, code) count = count + 1 - local name = "l__codehigh_parse_code_" .. count .. "_tl" + local name = "l__cdhh_parse_code_" .. count .. "_tl" PrintCommand(name, code) - name = "l__codehigh_parse_style_" .. count .. "_tl" + name = "l__cdhh_parse_style_" .. count .. "_tl" PrintCommand(name, style) end @@ -130,7 +130,7 @@ function ParseCode(lang, code) code = code:sub(e) end end - local name = "l__codehigh_parse_code_count_tl" + local name = "l__cdhh_parse_code_count_tl" tex.sprint("\\expandafter\\gdef\\csname " .. name .. "\\endcsname{" .. count .. "}") end diff --git a/macros/latex/contrib/codehigh/codehigh.pdf b/macros/latex/contrib/codehigh/codehigh.pdf Binary files differindex 3a8306706c..0d036968b7 100644 --- a/macros/latex/contrib/codehigh/codehigh.pdf +++ b/macros/latex/contrib/codehigh/codehigh.pdf diff --git a/macros/latex/contrib/codehigh/codehigh.sty b/macros/latex/contrib/codehigh/codehigh.sty index 36463c7ca6..6cd88621fb 100644 --- a/macros/latex/contrib/codehigh/codehigh.sty +++ b/macros/latex/contrib/codehigh/codehigh.sty @@ -12,7 +12,7 @@ \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\ProvidesExplPackage{codehigh}{2025-01-04}{2025A} +\ProvidesExplPackage{codehigh}{2025-02-15}{2025B} {Highlight codes and demos with l3regex and lpeg} %\RequirePackage{xparse} @@ -24,18 +24,20 @@ \RequirePackage{iftex} \legacy_if:nT {LuaTeX} {\RequirePackage{luatexbase}} -\int_new:N \l__codehigh_a_int -\int_new:N \l__codehigh_b_int -\tl_new:N \l__codehigh_a_tl -\tl_new:N \l__codehigh_b_tl -\tl_new:N \l__codehigh_c_tl -\tl_new:N \l__codehigh_d_tl -\tl_new:N \l__codehigh_m_tl +\int_new:N \l__cdhh_a_int +\int_new:N \l__cdhh_b_int +\tl_new:N \l__cdhh_a_tl +\tl_new:N \l__cdhh_b_tl +\tl_new:N \l__cdhh_c_tl +\tl_new:N \l__cdhh_d_tl +\tl_new:N \l__cdhh_m_tl \cs_generate_variant:Nn \regex_set:Nn {cn} \cs_generate_variant:Nn \seq_set_split:Nnn {NVV} \cs_generate_variant:Nn \str_remove_once:Nn {NV} +\cs_generate_variant:Nn \tl_greplace_all:Nnn {NV} \cs_generate_variant:Nn \tl_log:n {e} +\cs_generate_variant:Nn \tl_replace_all:Nnn {NV} \cs_generate_variant:Nn \tl_set:Nn {Ne} \cs_generate_variant:Nn \tl_set_rescan:Nnn {NnV} @@ -45,17 +47,18 @@ \group_begin: \obeylines - \tl_gset:Nn \g__codehigh_eol_tl {^^M} - \tl_gset:Nn \g__codehigh_eol_eol_tl {^^M^^M} + \tl_const:Nn \c__cdhh_el_tl {^^M} \group_end: +\tl_const:Nn \c__cdhh_nl_tl {^^J} +\tl_const:Nn \c__cdhh_nl_nl_tl {^^J^^J} %%% ------------------------------------------------------- %%> \section{Set CodeHigh Options} %%% ------------------------------------------------------- -\bool_new:N \l__codehigh_lite_bool -\bool_new:N \l__codehigh_long_bool -\bool_new:N \l__codehigh_demo_bool +\bool_new:N \l__cdhh_lite_bool +\bool_new:N \l__cdhh_long_bool +\bool_new:N \l__cdhh_demo_bool \NewDocumentCommand \CodeHigh {O{} m} { @@ -64,9 +67,9 @@ \keys_define:nn {codehigh} { - lite .bool_set:N = \l__codehigh_lite_bool, - long .bool_set:N = \l__codehigh_long_bool, - demo .bool_set:N = \l__codehigh_demo_bool, + lite .bool_set:N = \l__cdhh_lite_bool, + long .bool_set:N = \l__cdhh_long_bool, + demo .bool_set:N = \l__cdhh_demo_bool, } %%% ------------------------------------------------------- @@ -81,51 +84,51 @@ { %% it is \^^M but not `\^^M \char_set_catcode_active:N \^^M - \__codehigh_begin:nw {#2} + \__cdhh_begin:nw {#2} } \exp_args:Nc \NewDocumentCommand {end#1} {} { - \__codehigh_end: + \__cdhh_end: } } %% Now we need to replace each ^^M with a space character -\NewDocumentCommand \__codehigh_begin:nw {mO{}} +\NewDocumentCommand \__cdhh_begin:nw {mO{}} { \char_set_catcode_end_line:N \^^M \tl_set:Nn \l_tmpa_tl {#1,#2} - \__codehigh_replace_endlines:N \l_tmpa_tl + \__cdhh_replace_endlines:N \l_tmpa_tl \keys_set:nV {codehigh} \l_tmpa_tl - \tl_set:Ne \__codehigh_collect_end_tl + \tl_set:Ne \__cdhh_collect_end_tl { \c_backslash_str end \c_left_brace_str \@currenvir \c_right_brace_str } \exp_last_unbraced:NNNNo - \cs_set:Npn \__codehigh_collect:w ##1 \__codehigh_collect_end_tl + \cs_set:Npn \__cdhh_collect:w ##1 \__cdhh_collect_end_tl { - \__codehigh_store:n {##1} + \__cdhh_store:n {##1} \exp_args:No \end \@currenvir } \group_begin: - \__codehigh_do_specials: - \__codehigh_collect:w + \__cdhh_do_specials: + \__cdhh_collect:w } -\cs_new_protected:Npn \__codehigh_end: +\cs_new_protected:Npn \__cdhh_end: { \group_end: - \__codehigh_typeset: + \__cdhh_typeset: } \group_begin: \char_set_catcode_active:N \^^M - \cs_new_protected:Npn \__codehigh_replace_endlines:N #1 + \cs_new_protected:Npn \__cdhh_replace_endlines:N #1 { \tl_replace_all:Nnn #1 {^^M} {~} } \group_end: -\cs_new_protected:Npn \__codehigh_do_specials: +\cs_new_protected:Npn \__cdhh_do_specials: { \cs_set_eq:NN \do \char_set_catcode_other:N \dospecials @@ -133,25 +136,26 @@ \obeyspaces } -\tl_new:N \g__codehigh_code_tl +\tl_new:N \g__cdhh_code_tl -\cs_new_protected:Npn \__codehigh_store:n #1 +\cs_new_protected:Npn \__cdhh_store:n #1 { - \tl_gset:Nn \g__codehigh_code_tl { #1 } - \__codehigh_tracing:nn {code} {\__codehigh_log:N \g__codehigh_code_tl} + \tl_gset:Nn \g__cdhh_code_tl { #1 } + \tl_greplace_all:NVn \g__cdhh_code_tl \c__cdhh_el_tl {^^J} + \__cdhh_tracing:nn {code} {\__cdhh_log:N \g__cdhh_code_tl} } -\cs_new_protected:Npn \__codehigh_typeset: +\cs_new_protected:Npn \__cdhh_typeset: { - \bool_if:NTF \l__codehigh_demo_bool - {\__codehigh_typeset_demo:} {\__codehigh_typeset_code:} + \bool_if:NTF \l__cdhh_demo_bool + {\__cdhh_typeset_demo:} {\__cdhh_typeset_code:} } \NewCodeHighEnv {codehigh} {} \NewCodeHighEnv {demohigh} {demo} -\tl_new:N \l__codehigh_input_tl -\seq_new:N \l__codehigh_input_seq +\tl_new:N \l__cdhh_input_tl +\seq_new:N \l__cdhh_input_seq \NewDocumentCommand \NewCodeHighInput {mm} { @@ -159,55 +163,56 @@ { \group_begin: \keys_set:nn {codehigh} {#2, ##1} - \CatchFileDef \l__codehigh_input_tl {##2} {\__codehigh_do_specials:} + \CatchFileDef \l__cdhh_input_tl {##2} {\__cdhh_do_specials:} + \tl_replace_all:NVn \l__cdhh_input_tl \c__cdhh_el_tl {^^J} \setlength \parskip {0pt plus 1pt} - \__codehigh_typeset_input:N \l__codehigh_input_tl + \__cdhh_typeset_input:N \l__cdhh_input_tl \group_end: } } -\cs_new_protected:Npn \__codehigh_typeset_input:N #1 +\cs_new_protected:Npn \__cdhh_typeset_input:N #1 { - \seq_set_split:NVV \l__codehigh_input_seq \g__codehigh_eol_eol_tl #1 - \seq_map_inline:Nn \l__codehigh_input_seq + \seq_set_split:NVV \l__cdhh_input_seq \c__cdhh_nl_nl_tl #1 + \seq_map_inline:Nn \l__cdhh_input_seq { - \tl_gset:Nn \g__codehigh_code_tl {##1} - \__codehigh_typeset_comment:N \g__codehigh_code_tl - \tl_if_blank:VF \g__codehigh_code_tl + \tl_gset:Nn \g__cdhh_code_tl {##1} + \__cdhh_typeset_comment:N \g__cdhh_code_tl + \tl_if_blank:VF \g__cdhh_code_tl { - \__codehigh_typeset_code: + \__cdhh_typeset_code: \par \medskip } } } -\regex_const:Nn \l__codehigh_comment_regex { ^ \% \% ( [\%>] ) ( [^\r]+ ) \r } -\tl_new:N \l__codehigh_comment_tl % comment lines that need to be typeset -\bool_new:N \l__codehigh_comment_bool +\regex_const:Nn \l__cdhh_comment_regex { ^ \% \% ( [\%>] ) ( [^\n]+ ) \n } +\tl_new:N \l__cdhh_comment_tl % comment lines that need to be typeset +\bool_new:N \l__cdhh_comment_bool %% remove lines starting with %%%, and typeset lines starting with %%> -\cs_new_protected:Npn \__codehigh_typeset_comment:N #1 +\cs_new_protected:Npn \__cdhh_typeset_comment:N #1 { \tl_set_eq:NN \l_tmpa_tl #1 - \tl_put_right:NV \l_tmpa_tl \g__codehigh_eol_tl - \tl_clear:N \l__codehigh_comment_tl - \bool_set_false:N \l__codehigh_comment_bool - \bool_do_until:Nn \l__codehigh_comment_bool + \tl_put_right:NV \l_tmpa_tl \c__cdhh_nl_tl + \tl_clear:N \l__cdhh_comment_tl + \bool_set_false:N \l__cdhh_comment_bool + \bool_do_until:Nn \l__cdhh_comment_bool { %% Unfortunately we need both \regex_extract_once and \regex_replace_once - \regex_extract_once:NVNTF \l__codehigh_comment_regex \l_tmpa_tl \l_tmpa_seq + \regex_extract_once:NVNTF \l__cdhh_comment_regex \l_tmpa_tl \l_tmpa_seq { - \regex_replace_once:NnN \l__codehigh_comment_regex {} \l_tmpa_tl + \regex_replace_once:NnN \l__cdhh_comment_regex {} \l_tmpa_tl \str_if_eq:enT { \seq_item:Nn \l_tmpa_seq {2} } {>} { - \tl_put_right:Nx \l__codehigh_comment_tl + \tl_put_right:Nx \l__cdhh_comment_tl { \seq_item:Nn \l_tmpa_seq {3} } } } - { \bool_set_true:N \l__codehigh_comment_bool } + { \bool_set_true:N \l__cdhh_comment_bool } } - \exp_args:NV \scantokens \l__codehigh_comment_tl + \exp_args:NV \scantokens \l__cdhh_comment_tl \tl_gset_eq:NN #1 \l_tmpa_tl } @@ -217,55 +222,53 @@ %%> \section{Typeset CodeHigh Code} %%% ------------------------------------------------------- -\dim_new:N \l__codehigh_main_boxsep_dim +\dim_new:N \l__cdhh_main_boxsep_dim \keys_define:nn {codehigh} { - boxsep .dim_set:N = \l__codehigh_main_boxsep_dim, + boxsep .dim_set:N = \l__cdhh_main_boxsep_dim, boxsep .initial:n = 3pt, } -\box_new:N \g__codehigh_code_box +\box_new:N \g__cdhh_code_box -\cs_new_protected:Npn \__codehigh_typeset_code: +\cs_new_protected:Npn \__cdhh_typeset_code: { \par\addvspace{0.5em}\noindent - \bool_if:NTF \l__codehigh_long_bool - {\__codehigh_typeset_code_text:} {\__codehigh_typeset_code_box:} + \bool_if:NTF \l__cdhh_long_bool + {\__cdhh_typeset_code_text:} {\__cdhh_typeset_code_box:} \par\addvspace{0.5em} } -\cs_new_protected:Npn \__codehigh_typeset_code_text: +\cs_new_protected:Npn \__cdhh_typeset_code_text: { - \__codehigh_prepare_code:N \l_tmpa_tl - \__codehigh_get_code_text:n \l_tmpa_tl + \__cdhh_prepare_code:N \l_tmpa_tl + \__cdhh_get_code_text:n \l_tmpa_tl } -\cs_new_protected:Npn \__codehigh_typeset_code_box: +\cs_new_protected:Npn \__cdhh_typeset_code_box: { - \__codehigh_build_code: - \__codehigh_put_code_box: + \__cdhh_build_code: + \__cdhh_put_code_box: } -\cs_new_protected:Npn \__codehigh_build_code: +\cs_new_protected:Npn \__cdhh_build_code: { - \__codehigh_prepare_code:N \l_tmpa_tl - \__codehigh_get_code_box:nN \l_tmpa_tl \g__codehigh_code_box + \__cdhh_prepare_code:N \l_tmpa_tl + \__cdhh_get_code_box:nN \l_tmpa_tl \g__cdhh_code_box } -\cs_new_protected:Npn \__codehigh_prepare_code:N #1 +\cs_new_protected:Npn \__cdhh_prepare_code:N #1 { - \tl_set_eq:NN #1 \g__codehigh_code_tl - \regex_replace_once:nnN {^ \r} {} #1 - \regex_replace_once:nnN {\r $} {} #1 - \regex_replace_all:nnN { . } { \c{string} \0 } #1 - \tl_set:Nx #1 { #1 } - \__codehigh_tracing:nn {code} {\__codehigh_log:N #1} + \tl_set_eq:NN #1 \g__cdhh_code_tl + \regex_replace_once:nnN {^ \n} {} #1 + \regex_replace_once:nnN {\n $} {} #1 + \__cdhh_tracing:nn {code} {\__cdhh_log:N #1} } -\cs_new_protected:Npn \__codehigh_put_code_box: +\cs_new_protected:Npn \__cdhh_put_code_box: { - \setlength \fboxsep {\l__codehigh_main_boxsep_dim} + \setlength \fboxsep {\l__cdhh_main_boxsep_dim} \GetCodeHighStyle{main} \colorbox{codehigh@bg} { @@ -273,32 +276,32 @@ { \GetCodeHighStyle{code} \colorbox{codehigh@bg} - {\box_use:N \g__codehigh_code_box} + {\box_use:N \g__cdhh_code_box} \hfill } } } %% #1: text to parse; #2: resulting box -\cs_new_protected:Npn \__codehigh_get_code_box:nN #1 #2 +\cs_new_protected:Npn \__cdhh_get_code_box:nN #1 #2 { \hbox_gset:Nn #2 { \begin{varwidth}{\linewidth} - \__codehigh_get_code_text:n {#1} + \__cdhh_get_code_text:n {#1} \end{varwidth} } } -\cs_new_protected:Npn \__codehigh_get_code_text:n #1 +\cs_new_protected:Npn \__cdhh_get_code_text:n #1 { \group_begin: \setlength \parindent {0pt} \linespread {1} \ttfamily - \bool_if:NTF \l__codehigh_lite_bool - {\__codehigh_parse_code_lite:N #1} - {\__codehigh_parse_code:VN \l__codehigh_language_name_tl #1} + \bool_if:NTF \l__cdhh_lite_bool + {\__cdhh_parse_code_lite:N #1} + {\__cdhh_parse_code:VN \l__cdhh_language_name_tl #1} \group_end: } @@ -306,18 +309,18 @@ %%> \section{Typeset CodeHigh Demo} %%% ------------------------------------------------------- -\box_new:N \g__codehigh_demo_box +\box_new:N \g__cdhh_demo_box -\cs_new_protected:Npn \__codehigh_typeset_demo: +\cs_new_protected:Npn \__cdhh_typeset_demo: { - \__codehigh_build_code: - \__codehigh_build_demo: - \dim_set:Nn \l_tmpa_dim { \box_wd:N \g__codehigh_code_box } - \dim_set:Nn \l_tmpb_dim { \box_wd:N \g__codehigh_demo_box } - \__codehigh_tracing:nn {demo} + \__cdhh_build_code: + \__cdhh_build_demo: + \dim_set:Nn \l_tmpa_dim { \box_wd:N \g__cdhh_code_box } + \dim_set:Nn \l_tmpb_dim { \box_wd:N \g__cdhh_demo_box } + \__cdhh_tracing:nn {demo} { \tl_log:x { \dim_use:N \l_tmpa_dim + \dim_use:N \l_tmpb_dim } } \par\addvspace{0.5em}\noindent - \setlength \fboxsep {\l__codehigh_main_boxsep_dim} + \setlength \fboxsep {\l__cdhh_main_boxsep_dim} \GetCodeHighStyle{main} \colorbox{codehigh@bg} { @@ -327,45 +330,47 @@ { \dim_set:Nn \hsize {\linewidth-2\fboxsep} \noindent\GetCodeHighStyle{code} - \colorbox{codehigh@bg}{\box_use:N \g__codehigh_code_box} + \colorbox{codehigh@bg}{\box_use:N \g__cdhh_code_box} \par \noindent\GetCodeHighStyle{demo} - \colorbox{codehigh@bg}{\box_use:N \g__codehigh_demo_box} + \colorbox{codehigh@bg}{\box_use:N \g__cdhh_demo_box} } } { \hbox_to_wd:nn {\linewidth-2\fboxsep} { \GetCodeHighStyle{code} - \colorbox{codehigh@bg}{\box_use:N \g__codehigh_code_box} + \colorbox{codehigh@bg}{\box_use:N \g__cdhh_code_box} \hfill \GetCodeHighStyle{demo} - \colorbox{codehigh@bg}{\box_use:N \g__codehigh_demo_box} + \colorbox{codehigh@bg}{\box_use:N \g__cdhh_demo_box} } } } \par\addvspace{0.5em} } -\cs_new_protected:Npn \__codehigh_build_demo: +\cs_new_protected:Npn \__cdhh_build_demo: { - \tl_set_eq:NN \l_tmpb_tl \g__codehigh_code_tl + \tl_set_eq:NN \l_tmpb_tl \g__cdhh_code_tl \tl_set_rescan:NnV \l_tmpb_tl { + %% \tl_set_rescan has set \newlinechar = \endlinechar + \newlinechar = `\^^J \catcode `\% = 14 \relax \catcode `\^^M = 10 \relax } \l_tmpb_tl - \__codehigh_tracing:nn {demo} { \tl_log:N \l_tmpb_tl } - \__codehigh_get_demo_box:nN \l_tmpb_tl \g__codehigh_demo_box + \__cdhh_tracing:nn {demo} { \tl_log:N \l_tmpb_tl } + \__cdhh_get_demo_box:nN \l_tmpb_tl \g__cdhh_demo_box } %% #1: text to typeset; #2: resulting box -\cs_new_protected:Npn \__codehigh_get_demo_box:nN #1 #2 +\cs_new_protected:Npn \__cdhh_get_demo_box:nN #1 #2 { \hbox_gset:Nn #2 { - \dim_set:Nn \linewidth {\linewidth-4\l__codehigh_main_boxsep_dim} + \dim_set:Nn \linewidth {\linewidth-4\l__cdhh_main_boxsep_dim} \begin{varwidth}{\linewidth} \setlength { \parindent } { 0pt } \linespread {1} @@ -380,22 +385,22 @@ \keys_define:nn {codehigh} { - language .tl_set:N = \l__codehigh_language_name_tl, + language .tl_set:N = \l__cdhh_language_name_tl, language .initial:n = latex, } %% #1: language name; #2: rule type; #3: rule name; #4: rule regex \NewDocumentCommand \AddCodeHighRule {O{latex} m m m} { - \int_if_exist:cF {l__codehigh_#1_rule_count_int} - {\int_new:c {l__codehigh_#1_rule_count_int}} - \int_incr:c {l__codehigh_#1_rule_count_int} + \int_if_exist:cF {l__cdhh_#1_rule_count_int} + {\int_new:c {l__cdhh_#1_rule_count_int}} + \int_incr:c {l__cdhh_#1_rule_count_int} \tl_set:cn - {l__codehigh_#1_ \int_use:c {l__codehigh_#1_rule_count_int} _type_tl} {#2} + {l__cdhh_#1_ \int_use:c {l__cdhh_#1_rule_count_int} _type_tl} {#2} \tl_set:cn - {l__codehigh_#1_ \int_use:c {l__codehigh_#1_rule_count_int} _name_tl} {#3} + {l__cdhh_#1_ \int_use:c {l__cdhh_#1_rule_count_int} _name_tl} {#3} \regex_set:cn - {l__codehigh_#1_ \int_use:c {l__codehigh_#1_rule_count_int} _regex} {#4} + {l__cdhh_#1_ \int_use:c {l__cdhh_#1_rule_count_int} _regex} {#4} } \AddCodeHighRule[latex]{1}{Package} {\\(documentclass|usepackage)} @@ -406,7 +411,7 @@ \AddCodeHighRule[latex]{2}{Command} {\\[A-Za-z]+} \AddCodeHighRule[latex]{7}{Brace} {[\{\}]} \AddCodeHighRule[latex]{8}{MathMode} {\$} -\AddCodeHighRule[latex]{9}{Comment} {\%.*?\r} +\AddCodeHighRule[latex]{9}{Comment} {\%.*?\n} \AddCodeHighRule[latex/math]{6}{LeftRight} {\\(left|right)} \AddCodeHighRule[latex/math]{2}{Command} {\\[A-Za-z]+} @@ -416,7 +421,7 @@ \AddCodeHighRule[latex/math]{1}{Brace} {[\{\}]} \AddCodeHighRule[latex/math]{7}{Bracket} {[\[\]]} \AddCodeHighRule[latex/math]{3}{Parenthesis}{[\(\)]} -\AddCodeHighRule[latex/math]{9}{Comment} {\%.*?\r} +\AddCodeHighRule[latex/math]{9}{Comment} {\%.*?\n} \AddCodeHighRule[latex/table]{8}{Newline} {\\\\} \AddCodeHighRule[latex/table]{1}{Alignment}{\&} @@ -424,7 +429,7 @@ \AddCodeHighRule[latex/table]{4}{Command} {\\[A-Za-z]+} \AddCodeHighRule[latex/table]{2}{Brace} {[\{\}]} \AddCodeHighRule[latex/table]{3}{Bracket} {[\[\]]} -\AddCodeHighRule[latex/table]{9}{Comment} {\%.*?\r} +\AddCodeHighRule[latex/table]{9}{Comment} {\%.*?\n} \AddCodeHighRule[latex/latex2]{1}{Argument} {\#+\d} \AddCodeHighRule[latex/latex2]{6}{NewCommand}{\\(|e|g|x)def} @@ -433,7 +438,7 @@ \AddCodeHighRule[latex/latex2]{3}{Command} {\\[A-Za-z]+} \AddCodeHighRule[latex/latex2]{2}{Brace} {[\{\}]} \AddCodeHighRule[latex/latex2]{7}{Bracket} {[\[\]]} -\AddCodeHighRule[latex/latex2]{9}{Comment} {\%.*?\r} +\AddCodeHighRule[latex/latex2]{9}{Comment} {\%.*?\n} \AddCodeHighRule[latex/latex3]{1}{Argument} {\#+\d} \AddCodeHighRule[latex/latex3]{2}{PrivateVar}{\\[cgl]__[A-Za-z_:@]+} @@ -442,7 +447,7 @@ \AddCodeHighRule[latex/latex3]{6}{PublicFun} {\\[A-Za-z_:@]+} \AddCodeHighRule[latex/latex3]{8}{Brace} {[\{\}]} \AddCodeHighRule[latex/latex3]{3}{Bracket} {[\[\]]} -\AddCodeHighRule[latex/latex3]{9}{Comment} {\%.*?\r} +\AddCodeHighRule[latex/latex3]{9}{Comment} {\%.*?\n} %%% ------------------------------------------------------- %%> \section{Add CodeHigh Themes} @@ -450,7 +455,7 @@ \keys_define:nn {codehigh} { - theme .tl_set:N = \l__codehigh_theme_name_tl, + theme .tl_set:N = \l__cdhh_theme_name_tl, theme .initial:n = default, style/main .code:n = \SetCodeHighStyle{main}{#1}, style/code .code:n = \SetCodeHighStyle{code}{#1}, @@ -460,12 +465,12 @@ %% #1: theme name; #2: rule type; #3: sytles \NewDocumentCommand \SetCodeHighStyle {O{default} m m} { - \tl_set:cn {l__codehigh_style_#1_#2_tl} {#3} + \tl_set:cn {l__cdhh_style_#1_#2_tl} {#3} } \NewDocumentCommand \GetCodeHighStyle {O{default} m} { - \colorlet{codehigh@bg}{\tl_use:c {l__codehigh_style_#1_#2_tl}} + \colorlet{codehigh@bg}{\tl_use:c {l__cdhh_style_#1_#2_tl}} } \SetCodeHighStyle[default]{main}{gray9} @@ -487,73 +492,73 @@ %%> \section{Parse and Highlight Code} %%% ------------------------------------------------------- -\int_new:N \l__codehigh_item_count_int -\tl_new:N \l__codehigh_code_to_parse_tl -\tl_new:N \l__codehigh_regex_match_type_tl -\tl_new:N \l__codehigh_regex_match_text_tl -\tl_new:N \l__codehigh_regex_before_text_tl +\int_new:N \l__cdhh_item_count_int +\tl_new:N \l__cdhh_code_to_parse_tl +\tl_new:N \l__cdhh_regex_match_type_tl +\tl_new:N \l__cdhh_regex_match_text_tl +\tl_new:N \l__cdhh_regex_before_text_tl -\cs_new_protected:Npn \__codehigh_parse_code:nN #1 #2 +\cs_new_protected:Npn \__cdhh_parse_code:nN #1 #2 { \legacy_if:nTF {LuaTeX} - { \__codehigh_parse_code_luatex:nN {#1} #2 } - { \__codehigh_parse_code_normal:nN {#1} #2 } + { \__cdhh_parse_code_luatex:nN {#1} #2 } + { \__cdhh_parse_code_normal:nN {#1} #2 } } -\cs_generate_variant:Nn \__codehigh_parse_code:nN {VN} +\cs_generate_variant:Nn \__cdhh_parse_code:nN {VN} -\cs_new_protected:Npn \__codehigh_parse_code_normal:nN #1 #2 +\cs_new_protected:Npn \__cdhh_parse_code_normal:nN #1 #2 { - \tl_set_eq:NN \l__codehigh_code_to_parse_tl #2 - \bool_do_until:nn {\tl_if_empty_p:N \l__codehigh_code_to_parse_tl} + \tl_set_eq:NN \l__cdhh_code_to_parse_tl #2 + \bool_do_until:nn {\tl_if_empty_p:N \l__cdhh_code_to_parse_tl} { - \__codehigh_parse_code_once:nN {#1} \l__codehigh_code_to_parse_tl - \int_compare:nNnTF {\l__codehigh_item_count_int} = {-1} + \__cdhh_parse_code_once:nN {#1} \l__cdhh_code_to_parse_tl + \int_compare:nNnTF {\l__cdhh_item_count_int} = {-1} { - \__codehigh_typeset_text:nN {0} \l__codehigh_code_to_parse_tl - \tl_clear:N \l__codehigh_code_to_parse_tl + \__cdhh_typeset_text:nN {0} \l__cdhh_code_to_parse_tl + \tl_clear:N \l__cdhh_code_to_parse_tl } { - \tl_concat:NNN \l__codehigh_a_tl - \l__codehigh_regex_before_text_tl \l__codehigh_regex_match_text_tl - \str_remove_once:NV \l__codehigh_code_to_parse_tl \l__codehigh_a_tl - \__codehigh_tracing:nn {parser} - {\tl_log:N \l__codehigh_code_to_parse_tl} - \__codehigh_typeset_text:nN {0} - \l__codehigh_regex_before_text_tl - \__codehigh_typeset_text:VN \l__codehigh_regex_match_type_tl - \l__codehigh_regex_match_text_tl + \tl_concat:NNN \l__cdhh_a_tl + \l__cdhh_regex_before_text_tl \l__cdhh_regex_match_text_tl + \str_remove_once:NV \l__cdhh_code_to_parse_tl \l__cdhh_a_tl + \__cdhh_tracing:nn {parser} + {\tl_log:N \l__cdhh_code_to_parse_tl} + \__cdhh_typeset_text:nN {0} + \l__cdhh_regex_before_text_tl + \__cdhh_typeset_text:VN \l__cdhh_regex_match_type_tl + \l__cdhh_regex_match_text_tl } } } -\cs_new_protected:Npn \__codehigh_parse_code_once:nN #1 #2 +\cs_new_protected:Npn \__cdhh_parse_code_once:nN #1 #2 { - \int_set:Nn \l__codehigh_item_count_int { -1 } - \tl_clear:N \l__codehigh_regex_match_text_tl - \tl_clear:N \l__codehigh_regex_before_text_tl - \int_step_inline:nn {\cs:w l__codehigh_#1_rule_count_int \cs_end:} + \int_set:Nn \l__cdhh_item_count_int { -1 } + \tl_clear:N \l__cdhh_regex_match_text_tl + \tl_clear:N \l__cdhh_regex_before_text_tl + \int_step_inline:nn {\cs:w l__cdhh_#1_rule_count_int \cs_end:} { - \regex_extract_once:cVNT {l__codehigh_#1_##1_regex} #2 \l_tmpa_seq + \regex_extract_once:cVNT {l__cdhh_#1_##1_regex} #2 \l_tmpa_seq { - \seq_get:NN \l_tmpa_seq \l__codehigh_m_tl - \regex_split:cVNT { l__codehigh_#1_##1_regex } #2 \l_tmpb_seq + \seq_get:NN \l_tmpa_seq \l__cdhh_m_tl + \regex_split:cVNT { l__cdhh_#1_##1_regex } #2 \l_tmpb_seq { - \seq_get:NN \l_tmpb_seq \l__codehigh_b_tl - \tl_set:Nx \l__codehigh_c_tl {\str_count:N \l__codehigh_b_tl} + \seq_get:NN \l_tmpb_seq \l__cdhh_b_tl + \tl_set:Nx \l__cdhh_c_tl {\str_count:N \l__cdhh_b_tl} \bool_lazy_or:nnT - { \int_compare_p:nNn {\l__codehigh_item_count_int} = {-1} } + { \int_compare_p:nNn {\l__cdhh_item_count_int} = {-1} } { \int_compare_p:nNn - {\l__codehigh_item_count_int} > {\l__codehigh_c_tl} + {\l__cdhh_item_count_int} > {\l__cdhh_c_tl} } { - \int_set:Nn \l__codehigh_item_count_int {\l__codehigh_c_tl} - \tl_set_eq:NN \l__codehigh_regex_before_text_tl - \l__codehigh_b_tl - \tl_set_eq:NN \l__codehigh_regex_match_text_tl - \l__codehigh_m_tl - \tl_set_eq:Nc \l__codehigh_regex_match_type_tl - {l__codehigh_#1_##1_type_tl} + \int_set:Nn \l__cdhh_item_count_int {\l__cdhh_c_tl} + \tl_set_eq:NN \l__cdhh_regex_before_text_tl + \l__cdhh_b_tl + \tl_set_eq:NN \l__cdhh_regex_match_text_tl + \l__cdhh_m_tl + \tl_set_eq:Nc \l__cdhh_regex_match_type_tl + {l__cdhh_#1_##1_type_tl} } } } @@ -562,40 +567,62 @@ \legacy_if:nT {LuaTeX} { \directlua{require("codehigh.lua")} } -\cs_new_protected:Npn \__codehigh_parse_code_luatex:nN #1 #2 +\cs_new_protected:Npn \__cdhh_parse_code_luatex:nN #1 #2 { \directlua{ParseCode(token.scan_argument(), token.scan_argument())}{#1}{#2} - \__codehigh_tracing:nn {parser} - {\tl_log:N \l__codehigh_parse_code_count_tl} - \int_step_inline:nn {\l__codehigh_parse_code_count_tl} + \__cdhh_tracing:nn {parser} + {\tl_log:N \l__cdhh_parse_code_count_tl} + \int_step_inline:nn {\l__cdhh_parse_code_count_tl} { - \__codehigh_typeset_text:vc - {l__codehigh_parse_style_##1_tl} {l__codehigh_parse_code_##1_tl} + \__cdhh_typeset_text:vc + {l__cdhh_parse_style_##1_tl} {l__cdhh_parse_code_##1_tl} } } +%% Split tl #3 into items separated by tl #2, and store the result in seq #1. +%% Spaces on both side of each item and outer braces around each item are kept. +%% We insert \prg_do_nothing: before each item to avoid losing outermost braces. +\cs_new_protected:Npn \__cdhh_seq_set_split:Nnn #1 #2 #3 + { + \seq_clear:N #1 + \cs_set_protected:Npn \__cdhh_seq_set_split_aux:Nw ##1 ##2 #2 + { + \tl_if_eq:nnF { \prg_do_nothing: \c_novalue_tl } { ##2 } + { + \seq_put_right:No ##1 { ##2 } + \__cdhh_seq_set_split_aux:Nw ##1 \prg_do_nothing: + } + } + \__cdhh_seq_set_split_aux:Nw #1 \prg_do_nothing: #3 #2 \c_novalue_tl #2 + } +\cs_generate_variant:Nn \__cdhh_seq_set_split:Nnn { NnV } + +\seq_new:N \l__cdhh_typeset_text_seq + %% #1: rule type, #2: text -\cs_new_protected:Npn \__codehigh_typeset_text:nN #1 #2 +\cs_new_protected:Npn \__cdhh_typeset_text:nN #1 #2 { - \__codehigh_tracing:nn {parser} { \tl_log:e { type: #1; ~ text: #2 } } - \group_begin: - \regex_replace_all:nnN { \r } { \c{par} \c{leavevmode} } #2 - \legacy_if:nF {LuaTeX} - { \regex_replace_all:nnN { \ } { \c{leavevmode} \c{space} } #2 } - \color{\tl_use:c {l__codehigh_style_ \l__codehigh_theme_name_tl _#1_tl}} - %\obeyspaces - #2 - \group_end: + \__cdhh_tracing:nn {parser} { \tl_log:e { type: #1; ~ text: #2 } } + \sys_if_engine_luatex:T + { \tl_replace_all:Nnn #2 { ~ } { \leavevmode \space } } + \__cdhh_seq_set_split:NnV \l__cdhh_typeset_text_seq {^^J} #2 + \seq_map_indexed_inline:Nn \l__cdhh_typeset_text_seq + { + \int_compare:nNnT {##1} > {1} { \par \leavevmode } + \textcolor + { \tl_use:c { l__cdhh_style_ \l__cdhh_theme_name_tl _#1_tl } } + { ##2 } + } } -\cs_generate_variant:Nn \__codehigh_typeset_text:nN { VN, vc } +\cs_generate_variant:Nn \__cdhh_typeset_text:nN { VN, vc } %%% ------------------------------------------------------- %%> \section{Don't Highlight Code} %%% ------------------------------------------------------- -\cs_new_protected:Npn \__codehigh_parse_code_lite:N #1 +\cs_new_protected:Npn \__cdhh_parse_code_lite:N #1 { - \regex_replace_all:nnN { \r } { \c{par} \c{leavevmode} } #1 + \regex_replace_all:nnN { \n } { \c{par} \c{leavevmode} } #1 \regex_replace_all:nnN { \ } { \c{relax} \c{space} } #1 \tl_use:N #1 } @@ -604,7 +631,7 @@ %%> \section{Fake Verbatim Command} %%% ------------------------------------------------------- -\tl_const:Nn \c__codehigh_fake_escape_tl { \\\{\}\#\^\ \% } +\tl_const:Nn \c__cdhh_fake_escape_tl { \\\{\}\#\^\ \% } \NewDocumentCommand \fakeverb { +m } { @@ -615,7 +642,7 @@ { \int_compare:nNnTF {##2} = { -1 } { - \exp_args:NNo \tl_if_in:NnTF \c__codehigh_fake_escape_tl {##1} + \exp_args:NNo \tl_if_in:NnTF \c__cdhh_fake_escape_tl {##1} { \exp_after:wN \cs_to_str:N ##1 } { \exp_after:wN \token_to_str:N ##1 } } @@ -635,46 +662,42 @@ \keys_set:nn { codehigh-set-tracing } {#1} } -\bool_new:N \g__codehigh_tracing_code_bool -\bool_new:N \g__codehigh_tracing_demo_bool -\bool_new:N \g__codehigh_tracing_parser_bool +\bool_new:N \g__cdhh_tracing_code_bool +\bool_new:N \g__cdhh_tracing_demo_bool +\bool_new:N \g__cdhh_tracing_parser_bool \keys_define:nn { codehigh-set-tracing } { - +code .code:n = \bool_gset_true:N \g__codehigh_tracing_code_bool, - -code .code:n = \bool_gset_false:N \g__codehigh_tracing_code_bool, - +demo .code:n = \bool_gset_true:N \g__codehigh_tracing_demo_bool, - -demo .code:n = \bool_gset_false:N \g__codehigh_tracing_demo_bool, - +parser .code:n = \bool_gset_true:N \g__codehigh_tracing_parser_bool, - -parser .code:n = \bool_gset_false:N \g__codehigh_tracing_parser_bool, - all .code:n = \__codehigh_enable_all_tracings:, - none .code:n = \__codehigh_disable_all_tracings:, + +code .code:n = \bool_gset_true:N \g__cdhh_tracing_code_bool, + -code .code:n = \bool_gset_false:N \g__cdhh_tracing_code_bool, + +demo .code:n = \bool_gset_true:N \g__cdhh_tracing_demo_bool, + -demo .code:n = \bool_gset_false:N \g__cdhh_tracing_demo_bool, + +parser .code:n = \bool_gset_true:N \g__cdhh_tracing_parser_bool, + -parser .code:n = \bool_gset_false:N \g__cdhh_tracing_parser_bool, + all .code:n = \__cdhh_enable_all_tracings:, + none .code:n = \__cdhh_disable_all_tracings:, } -\cs_new_protected_nopar:Npn \__codehigh_enable_all_tracings: +\cs_new_protected_nopar:Npn \__cdhh_enable_all_tracings: { - \bool_gset_true:N \g__codehigh_tracing_code_bool - \bool_gset_true:N \g__codehigh_tracing_demo_bool - \bool_gset_true:N \g__codehigh_tracing_parser_bool + \bool_gset_true:N \g__cdhh_tracing_code_bool + \bool_gset_true:N \g__cdhh_tracing_demo_bool + \bool_gset_true:N \g__cdhh_tracing_parser_bool } -\cs_new_protected_nopar:Npn \__codehigh_disable_all_tracings: +\cs_new_protected_nopar:Npn \__cdhh_disable_all_tracings: { - \bool_gset_false:N \g__codehigh_tracing_code_bool - \bool_gset_false:N \g__codehigh_tracing_demo_bool - \bool_gset_false:N \g__codehigh_tracing_parser_bool + \bool_gset_false:N \g__cdhh_tracing_code_bool + \bool_gset_false:N \g__cdhh_tracing_demo_bool + \bool_gset_false:N \g__cdhh_tracing_parser_bool } -\cs_new_protected:Npn \__codehigh_tracing:nn #1 #2 +\cs_new_protected:Npn \__cdhh_tracing:nn #1 #2 { - \bool_if:cT { g__codehigh_tracing_ #1 _bool } {#2} + \bool_if:cT { g__cdhh_tracing_ #1 _bool } {#2} } -\group_begin: - \char_set_catcode_active:N \^^M - \cs_new_protected:Npn \__codehigh_log:N #1 - { - \tl_replace_all:Nnn #1 {^^M} {^^J} - \tl_log:N #1 - } -\group_end: +\cs_new_protected:Npn \__cdhh_log:N #1 + { + \tl_log:N #1 + } diff --git a/macros/latex/contrib/codehigh/codehigh.tex b/macros/latex/contrib/codehigh/codehigh.tex index 057848150a..4facd39117 100644 --- a/macros/latex/contrib/codehigh/codehigh.tex +++ b/macros/latex/contrib/codehigh/codehigh.tex @@ -2,7 +2,7 @@ \documentclass[oneside]{book} \usepackage[a4paper,margin=2cm]{geometry} -\newcommand*{\myversion}{2025A} +\newcommand*{\myversion}{2025B} \newcommand*{\mydate}{Version \myversion\ (\the\year-\mylpad\month-\mylpad\day)} \newcommand*{\mylpad}[1]{\ifnum#1<10 0\the#1\else\the#1\fi} diff --git a/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md b/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md index 02ac42b9da..dfdfc46cc4 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md +++ b/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md @@ -5,6 +5,10 @@ first release 0.95a, 2021-02-23 will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), this project uses date-based 'snapshot' version identifiers. +## [2025-02-15] + +- l3backend-testphase: use \directlua for the page resources, issue #85 + ## [2024-12-20] Version: 2024-12-20 v0.96o diff --git a/macros/latex/contrib/pdfmanagement-testphase/README.md b/macros/latex/contrib/pdfmanagement-testphase/README.md index 331b39939f..376c9b53da 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/README.md +++ b/macros/latex/contrib/pdfmanagement-testphase/README.md @@ -1,6 +1,6 @@ # LaTeX PDF management testphase bundle -Version: 0.96o, 2024-12-20 +Version: 0.96p, 2025-02-15 This package is used during a test phase to load the new PDF management code of LaTeX. @@ -31,7 +31,7 @@ For manual installation: unpack by compiling the .ins, then move all ## Copyright (C) -* 2021-2024 The LaTeX Project +* 2021-2025 The LaTeX Project ## License LaTeX Project Public License, version 1.3c or later. diff --git a/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty index 7dbb99bc1f..7fe3f5e050 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty +++ b/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty @@ -24,7 +24,7 @@ %% This file has the LPPL maintenance status "maintained". %% \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesPackage{color-ltx}[2024-12-20 v0.96o +\ProvidesPackage{color-ltx}[2025-02-15 v0.96p Standard LaTeX Color (patched for l3color, part of pdfmanagement-testphase, original version 2022/01/06 v1.3d) (DPC)] \edef\Gin@codes{% \catcode`\noexpand\^^A\the\catcode`\^^A\relax diff --git a/macros/latex/contrib/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty index c0a4cf94ad..7b1fa6e088 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty +++ b/macros/latex/contrib/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty @@ -19,7 +19,7 @@ % % for those people who are interested. \NeedsTeXFormat{LaTeX2e}[2020/10/01] -\ProvidesExplPackage{colorspace-patches-tmp-ltx}{2024-12-20}{0.96o} +\ProvidesExplPackage{colorspace-patches-tmp-ltx}{2025-02-15}{0.96p} {temporary patches for the colorspace package to test pdfresource management ... UF} diff --git a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx index 9284eb32f6..fa1aa522fc 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx @@ -2,7 +2,7 @@ % %% File: hyperref-generic.dtx % -% Copyright (C) 2021-2024 The LaTeX Project +% Copyright (C) 2021-2025 The LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -82,7 +82,7 @@ % }^^A % } % -% \date{Version 0.96o, released 2024-12-20} +% \date{Version 0.96p, released 2025-02-15} % % \maketitle % \begin{documentation} @@ -965,7 +965,7 @@ %<@@=hyp> % \end{macrocode} % \begin{macrocode} -\ProvidesFile{hgeneric-testphase.def}[2024-12-20 v0.96o % +\ProvidesFile{hgeneric-testphase.def}[2025-02-15 v0.96p % generic Hyperref driver for the LaTeX PDF management testphase bundle] \RequirePackage{etoolbox} %why? diff --git a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf Binary files differindex 3fb0f4b621..7e392d9598 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf +++ b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx index 01db341f39..d841744042 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx @@ -2,7 +2,7 @@ % %% File: l3backend-testphase.dtx % -% Copyright (C) 2019-2024 The LaTeX Project +% Copyright (C) 2019-2025 The LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -45,7 +45,7 @@ % }^^A % } % -% \date{Version 0.96o, released 2024-12-20} +% \date{Version 0.96p, released 2025-02-15} % % \maketitle % @@ -56,27 +56,27 @@ % \begin{macrocode} %<drivers>\ProvidesExplFile %<*dvipdfmx> - {l3backend-testphase-dvipdfmx.def}{2024-12-20}{} + {l3backend-testphase-dvipdfmx.def}{2025-02-15}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvipdfmx} %</dvipdfmx> %<*dvips> - {l3backend-testphase-dvips.def}{2024-12-20}{} + {l3backend-testphase-dvips.def}{2025-02-15}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvips} %</dvips> %<*dvisvgm> - {l3backend-testphase-dvisvgm.def}{2024-12-20}{} + {l3backend-testphase-dvisvgm.def}{2025-02-15}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvisvgm} %</dvisvgm> %<*luatex> - {l3backend-testphase-luatex.def}{2024-12-20}{} + {l3backend-testphase-luatex.def}{2025-02-15}{} {LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (LuaTeX)} %</luatex> %<*pdftex> - {l3backend-testphase-pdftex.def}{2024-12-20}{} + {l3backend-testphase-pdftex.def}{2025-02-15}{} {LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (pdfTeX)} %</pdftex> %<*xdvipdfmx> - {l3backend-testphase-xetex.def}{2024-12-20}{} + {l3backend-testphase-xetex.def}{2025-02-15}{} {LaTeX~PDF~management~testphase~bundle~backend~support: XeTeX} %</xdvipdfmx> % \end{macrocode} @@ -684,8 +684,8 @@ \cs_new_protected:Npn \@@_backend_PageResources_gput:nnn #1 #2 #3 { \pdfdict_gput:nnn {g_@@_Core/Page/Resources/#1} { #2 }{ #3 } - \tex_latelua:D{ltx.@@.Page.Resources.#1=true} - \tex_latelua:D + \tex_directlua:D{ltx.@@.Page.Resources.#1=true} + \tex_directlua:D { ltx.pdf.Page_Resources_gpush(tex.count["g_shipout_readonly_int"]) } @@ -1282,8 +1282,11 @@ % the link. We add here backend support for this. % \begin{macrocode} %<*drivers> -\cs_new_protected:Npn \@@_backend_link_off:{} -\cs_new_protected:Npn \@@_backend_link_on: {} +\cs_if_free:NT \@@_backend_link_off: + { + \cs_new_protected:Npn \@@_backend_link_off:{} + \cs_new_protected:Npn \@@_backend_link_on: {} + } %</drivers> %<*pdftex> \cs_if_exist:NT \pdfrunninglinkoff diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf Binary files differindex a2a4a98c79..123775ef17 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf +++ b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx index 0b972eb1a8..bc6d3eb01d 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx @@ -2,7 +2,7 @@ % %% File: l3pdfannot.dtx % -% Copyright (C) 2021-2024 The LaTeX Project +% Copyright (C) 2021-2025 The LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -48,7 +48,7 @@ % }^^A % } % -% \date{Version 0.96o, released 2024-12-20} +% \date{Version 0.96p, released 2025-02-15} % % \maketitle % \begin{documentation} @@ -432,7 +432,7 @@ % \begin{macrocode} %<@@=pdfannot> %<*header> -\ProvidesExplPackage{l3pdfannot}{2024-12-20}{0.96o} +\ProvidesExplPackage{l3pdfannot}{2025-02-15}{0.96p} {PDF-annotations} \RequirePackage{l3pdfdict} %</header> @@ -612,8 +612,11 @@ % % \subsection{Interruption of links} % \begin{macrocode} -\cs_new_protected:Nn \pdfannot_link_off: { \__pdf_backend_link_off: } -\cs_new_protected:Nn \pdfannot_link_on: { \__pdf_backend_link_on: } +\cs_if_free:NT \pdfannot_link_off: + { + \cs_new_protected:Nn \pdfannot_link_off: { \__pdf_backend_link_off: } + \cs_new_protected:Nn \pdfannot_link_on: { \__pdf_backend_link_on: } + } % \end{macrocode} % % diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf Binary files differindex 8ddfb1df3c..d7d030f9be 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx index 5578e53cad..29ee30f5e0 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx @@ -2,7 +2,7 @@ % %% File: l3pdfdict.dtx % -% Copyright (C) 2018-2024 The LaTeX Project +% Copyright (C) 2018-2025 The LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Version 0.96o, released 2024-12-20} +% \date{Version 0.96p, released 2025-02-15} % % \maketitle % \begin{documentation} @@ -208,7 +208,7 @@ % \begin{macrocode} %<@@=pdfdict> %<*header> -\ProvidesExplPackage{l3pdfdict}{2024-12-20}{0.96o} +\ProvidesExplPackage{l3pdfdict}{2025-02-15}{0.96p} {Tools for PDF dictionaries (LaTeX PDF management testphase bundle)} %</header> % \end{macrocode} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf Binary files differindex 3713012c7e..1bd587ad51 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.dtx index 9b2efa96e1..6b3dc1a6c9 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.dtx @@ -2,7 +2,7 @@ % %% File: l3pdfpdffield-action.dtx % -% Copyright (C) 2021-2024 The LaTeX Project +% Copyright (C) 2021-2025 The LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Version 0.96o, released 2024-12-20} +% \date{Version 0.96p, released 2025-02-15} % % \maketitle % \begin{documentation} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf Binary files differindex 379a9c1d81..d117539339 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.dtx index 3b8af9603f..14a857428a 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.dtx @@ -2,7 +2,7 @@ % %% File: l3pdfpdffield-checkbox.dtx % -% Copyright (C) 2021-2024 The LaTeX Project +% Copyright (C) 2021-2025 The LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -64,7 +64,7 @@ % }^^A % } % -% \date{Version 0.96o, released 2024-12-20} +% \date{Version 0.96p, released 2025-02-15} % % \maketitle % \begin{documentation} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf Binary files differindex f75dce35f0..da1f8c99e1 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.dtx index 00294fb8a9..cddae64c6a 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.dtx @@ -2,7 +2,7 @@ % %% File: l3pdfpdffield-choice.dtx % -% Copyright (C) 2021-2024 The LaTeX Project +% Copyright (C) 2021-2025 The LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Version 0.96o, released 2024-12-20} +% \date{Version 0.96p, released 2025-02-15} % % \maketitle % \begin{documentation} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf Binary files differindex 7526342745..9bf186677a 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.dtx index 05dfabdeb1..365a7fe483 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.dtx @@ -2,7 +2,7 @@ % %% File: l3pdfpdffield-pushbutton.dtx % -% Copyright (C) 2021-2024 The LaTeX Project +% Copyright (C) 2021-2025 The LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -55,7 +55,7 @@ % }^^A % } % -% \date{Version 0.96o, released 2024-12-20} +% \date{Version 0.96p, released 2025-02-15} % % \maketitle % \begin{documentation} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf Binary files differindex 8b166ca7c5..b201731980 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.dtx index 0a81bee046..b738aa4f7e 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.dtx @@ -2,7 +2,7 @@ % %% File: l3pdfpdffield-radiobutton.dtx % -% Copyright (C) 2021-2024 The LaTeX Project +% Copyright (C) 2021-2025 The LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -83,7 +83,7 @@ % }^^A % } % -% \date{Version 0.96o, released 2024-12-20} +% \date{Version 0.96p, released 2025-02-15} % % \maketitle % \begin{documentation} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf Binary files differindex f75d76138d..bf180821a4 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.dtx index a4d8f2872f..77333a9f9e 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.dtx @@ -2,7 +2,7 @@ % %% File: l3pdfpdffield-textfield.dtx % -% Copyright (C) 2021-2024 The LaTeX Project +% Copyright (C) 2021-2025 The LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Version 0.96o, released 2024-12-20} +% \date{Version 0.96p, released 2025-02-15} % % \maketitle % \begin{documentation} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf Binary files differindex fd05048ee9..bd3efd3c53 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx index f51a8cf933..adec24e75a 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx @@ -2,7 +2,7 @@ % %% File: l3pdffield.dtx % -% Copyright (C) 2021-2024 The LaTeX Project +% Copyright (C) 2021-2025 The LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -69,7 +69,7 @@ % }^^A % } % -% \date{Version 0.96o, released 2024-12-20} +% \date{Version 0.96p, released 2025-02-15} % % \maketitle % \begin{documentation} @@ -972,7 +972,7 @@ %<*package> %<@@=pdffield> \NeedsTeXFormat{LaTeX2e} -\ProvidesExplPackage{l3pdffield-testphase}{2024-12-20}{0.96o}% +\ProvidesExplPackage{l3pdffield-testphase}{2025-02-15}{0.96p}% {form fields} % \end{macrocode} % \subsection{hyperref specific command} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf Binary files differindex eaf13223a6..45e9cfd6c8 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx index 85aaa2ca86..00ea0f2abd 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx @@ -2,7 +2,7 @@ % %% File: l3pdffile.dtx % -% Copyright (C) 2018-2024 The LaTeX Project +% Copyright (C) 2018-2025 The LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Version 0.96o, released 2024-12-20} +% \date{Version 0.96p, released 2025-02-15} % % \maketitle % \begin{documentation} @@ -423,7 +423,7 @@ % % \begin{macrocode} %<*header> -\ProvidesExplPackage{l3pdffile}{2024-12-20}{0.96o} +\ProvidesExplPackage{l3pdffile}{2025-02-15}{0.96p} {embedding and referencing files in PDF---LaTeX PDF management testphase bundle} \RequirePackage{l3pdftools} %temporarily!! %</header> diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf Binary files differindex 0fbd0ec55e..256f425a13 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx index f51b389ac7..5dea6d19ed 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx @@ -2,7 +2,7 @@ % %% File: l3pdfmanagement.dtx % -% Copyright (C) 2018-2024 The LaTeX Project +% Copyright (C) 2018-2025 The LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -57,7 +57,7 @@ % }^^A % } % -% \date{Version 0.96o, released 2024-12-20} +% \date{Version 0.96p, released 2025-02-15} % % \maketitle % \begin{documentation} @@ -635,7 +635,7 @@ %<@@=pdfmanagement> %<*header> % -\ProvidesExplPackage{l3pdfmanagement}{2024-12-20}{0.96o} +\ProvidesExplPackage{l3pdfmanagement}{2025-02-15}{0.96p} {Management of core PDF dictionaries (LaTeX PDF management testphase bundle)} %</header> % \end{macrocode} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf Binary files differindex e72ef9c6bd..c13f961da8 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx index 8d9e64b466..0da8174bd0 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx @@ -2,7 +2,7 @@ % %% File: l3pdfmeta.dtx % -% Copyright (C) 2018-2024 The LaTeX Project +% Copyright (C) 2018-2025 The LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Version 0.96o, released 2024-12-20} +% \date{Version 0.96p, released 2025-02-15} % % \maketitle % \begin{documentation} @@ -671,7 +671,7 @@ % \begin{macrocode} %<@@=pdfmeta> %<*header> -\ProvidesExplPackage{l3pdfmeta}{2024-12-20}{0.96o} +\ProvidesExplPackage{l3pdfmeta}{2025-02-15}{0.96p} {PDF-Standards---LaTeX PDF management testphase bundle} %</header> % \end{macrocode} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf Binary files differindex 1f39fd7ea6..251be1a557 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfoutline.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfoutline.pdf Binary files differdeleted file mode 100644 index 5d40c31cf9..0000000000 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfoutline.pdf +++ /dev/null diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx index 9e089b8f84..6b27a2c6bc 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx @@ -2,7 +2,7 @@ % %% File: l3pdftools.dtx % -% Copyright (C) 2018-2024 The LaTeX Project +% Copyright (C) 2018-2025 The LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Version 0.96o, released 2024-12-20} +% \date{Version 0.96p, released 2025-02-15} % % \maketitle % \begin{documentation} @@ -238,7 +238,7 @@ % % \begin{macrocode} %<*header> -\ProvidesExplPackage{l3pdftools}{2024-12-20}{0.96o} +\ProvidesExplPackage{l3pdftools}{2025-02-15}{0.96p} {candidate commands for l3pdf---LaTeX PDF management testphase bundle} %</header> % \end{macrocode} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf Binary files differindex 82e210bf55..e142d9e2cf 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx index 5dd7f5cb96..166157a6c6 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx @@ -2,7 +2,7 @@ % %% File: l3pdfxform.dtx % -% Copyright (C) 2018-2024 The LaTeX Project +% Copyright (C) 2018-2025 The LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -48,7 +48,7 @@ % }^^A % } % -% \date{Version 0.96o, released 2024-12-20} +% \date{Version 0.96p, released 2025-02-15} % % \maketitle % \begin{documentation} @@ -132,7 +132,7 @@ % \begin{macrocode} %<@@=pdf> %<*header> -\ProvidesExplPackage{l3pdfxform}{2024-12-20}{0.96o} +\ProvidesExplPackage{l3pdfxform}{2025-02-15}{0.96p} {command to create xforms (beta)---LaTeX PDF management testphase bundle} %</header> % \end{macrocode} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf Binary files differindex 1d3bc37061..b4755e1084 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf diff --git a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx index 692724cc35..3c5add05bf 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx @@ -2,7 +2,7 @@ % %% File: ltdocinit.dtx % -% Copyright (C) 2018-2024 The LaTeX Project +% Copyright (C) 2018-2025 The LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -47,7 +47,7 @@ % }^^A % } % -% \date{Version 0.96o, released 2024-12-20} +% \date{Version 0.96p, released 2025-02-15} % % \maketitle % \begin{documentation} @@ -169,7 +169,7 @@ % \begin{macrocode} %<@@=pdfmanagement> %<*header> -\ProvidesExplPackage{ltdocinit}{2024-12-20}{0.96o} +\ProvidesExplPackage{ltdocinit}{2025-02-15}{0.96p} {Initialize document metadata} %</header> % \end{macrocode} diff --git a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf Binary files differindex 14426ae5dd..50ef9d6f42 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf +++ b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx index 5dc0e4b3be..204ec5ff31 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx @@ -2,7 +2,7 @@ % %% File: pdfmanagement-firstaid.dtx % -% Copyright (C) 2018-2024 The LaTeX Project +% Copyright (C) 2018-2025 The LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -47,7 +47,7 @@ % }^^A % } % -% \date{Version 0.96o, released 2024-12-20} +% \date{Version 0.96p, released 2025-02-15} % % \maketitle % \begin{documentation} @@ -63,7 +63,7 @@ % |debug={firstaidoff={name1,name2,...},...}|. % \begin{macrocode} %<*package> -\ProvidesExplPackage{pdfmanagement-firstaid}{2024-12-20}{0.96o} +\ProvidesExplPackage{pdfmanagement-firstaid}{2025-02-15}{0.96p} {LaTeX PDF management testphase bundle / firstaid-patches} %<@@=pdfmanagement> diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf Binary files differindex 3548eb40b9..ba20450f89 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf +++ b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx index 5adb3d9826..5c8e7049b4 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx @@ -2,7 +2,7 @@ % %% File: pdfmanagement-testphase.dtx % -% Copyright (C) 2019-2024 The LaTeX Project +% Copyright (C) 2019-2025 The LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -47,7 +47,7 @@ % }^^A % } % -% \date{Version 0.96o, released 2024-12-20} +% \date{Version 0.96p, released 2025-02-15} % % \maketitle % \begin{documentation} @@ -394,7 +394,7 @@ % \begin{macrocode} %<@@=pdf> %<*package> -\ProvidesExplPackage{pdfmanagement-testphase}{2024-12-20}{0.96o} +\ProvidesExplPackage{pdfmanagement-testphase}{2025-02-15}{0.96p} {LaTeX PDF management testphase bundle} \providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} \IfFormatAtLeastTF{2020-10-01}{}{ @@ -422,7 +422,7 @@ % to allow to set it in the document. % \begin{macrocode} %<*header> -\ProvidesExplFile{pdfmanagement-testphase.ltx}{2024-12-20}{0.96o} +\ProvidesExplFile{pdfmanagement-testphase.ltx}{2025-02-15}{0.96p} {PDF~management~code~(testphase)} % \end{macrocode} % We define a boolean for the new delayed shipout. This is temporary. At some diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf Binary files differindex 3a8efa4a73..27ee8dcf53 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf +++ b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf diff --git a/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty index 421ee2f344..6530344a05 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty +++ b/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty @@ -1,6 +1,6 @@ %% LaTeX2e file `xcolor-patches-tmp-ltx.sty' %% -\ProvidesPackage{xcolor-patches-tmp-ltx}[2024-12-20 v0.96o patch xcolor for l3color] +\ProvidesPackage{xcolor-patches-tmp-ltx}[2025-02-15 v0.96p patch xcolor for l3color] \@ifundefined{color_set:nn}{\RequirePackage{l3color}}{} \ExplSyntaxOn diff --git a/macros/luatex/generic/penlightplus/penlightplus.lua b/macros/luatex/generic/penlightplus/penlightplus.lua index b982d45a0a..21596fac07 100644 --- a/macros/luatex/generic/penlightplus/penlightplus.lua +++ b/macros/luatex/generic/penlightplus/penlightplus.lua @@ -1,5 +1,5 @@ --% Kale Ewasiuk (kalekje@gmail.com) ---% 2025-02-11 +--% 2025-02-14 --% Copyright (C) 2021-2025 Kale Ewasiuk --% --% Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/macros/luatex/generic/penlightplus/penlightplus.pdf b/macros/luatex/generic/penlightplus/penlightplus.pdf Binary files differindex 0b5b2744dd..7544f0d5cf 100644 --- a/macros/luatex/generic/penlightplus/penlightplus.pdf +++ b/macros/luatex/generic/penlightplus/penlightplus.pdf diff --git a/macros/luatex/generic/penlightplus/penlightplus.sty b/macros/luatex/generic/penlightplus/penlightplus.sty index f50ac14faf..7e33fbce93 100644 --- a/macros/luatex/generic/penlightplus/penlightplus.sty +++ b/macros/luatex/generic/penlightplus/penlightplus.sty @@ -1,5 +1,5 @@ % Kale Ewasiuk (kalekje@gmail.com) -% 2025-02-11 +% 2025-02-14 % Copyright (C) 2021-2025 Kale Ewasiuk % % Permission is hereby granted, free of charge, to any person obtaining a copy @@ -22,7 +22,7 @@ % OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE % OR OTHER DEALINGS IN THE SOFTWARE. -\ProvidesPackage{penlightplus}[2025-02-11] +\ProvidesPackage{penlightplus}[2025-02-14] \RequirePackage{luacode} \RequirePackage{luakeys} @@ -44,10 +44,10 @@ \NewDocumentCommand{\writePDFmetadatakv}{ s O{f} m }{% \MakeluastringCommands[f]{#2}% -\IfBooleanTF{#1}{% if *, overwrite everything +\IfBooleanTF{#1}{% if *, delete existing data \luadirect{ __PDFmetadata__ = penlight.tex.makePDFtablekv(\plluastringA{#3}) - }}{ + }}{ % if no star, update \luadirect{ __PDFmetadata__ = __PDFmetadata__ or {} penlight.tablex.update(__PDFmetadata__, penlight.tex.makePDFtablekv(\plluastringA{#3})) @@ -73,8 +73,6 @@ %\gdef\luastringE#1{\begin{luastringeenv#1\endluastringeenv} - - % allow control over expansion of arguments to a latex function \NewDocumentCommand{\MakeluastringCommands}{O{} m }{% #1 the desired commands #2 defaults \luadirect{penlight.tex.aliasluastring(\luastring{#2},\luastring{#1})}% @@ -85,25 +83,17 @@ - - %%%% \newtoggle{luaexpr}\togglefalse{luaexpr} - - -\NewDocumentCommand{\ifluax}{m m O{}}{% if lua expression is true do {m} if not [o] - \luadirect{penlight.toggle_luaexpr(#1)}% +\NewDocumentCommand{\ifluax}{m +m +O{}}{% if lua expression is true do {m} if not [o] + \luadirect{penlight.toggle_luaexpr(\expanded{#1})}% \iftoggle{luaexpr}{#2}{#3}% \togglefalse{luaexpr}% safety set to false } -\NewDocumentCommand{\ifluaxv}{m m O{}}{\ifluax{penlight.hasval(#1)}{#2}[#3]}% if lua expression is truthy do {m} else [o] - - - - +\NewDocumentCommand{\ifluaxv}{m +m +O{}}{\ifluax{penlight.hasval(#1)}{#2}[#3]}% if lua expression is truthy do {m} else [o] \NewDocumentCommand{\caseswitch}{s m +m}{\ignorespaces\luadirect{penlight.caseswitch(\luastring{#1},\luastring{#2},\luastringN{#3})}\unskip} diff --git a/macros/luatex/generic/penlightplus/penlightplus.tex b/macros/luatex/generic/penlightplus/penlightplus.tex index 09d63fbca5..78b5ee846a 100644 --- a/macros/luatex/generic/penlightplus/penlightplus.tex +++ b/macros/luatex/generic/penlightplus/penlightplus.tex @@ -1,5 +1,5 @@ % Kale Ewasiuk (kalekje@gmail.com) -% 2025-02-11 +% 2025-02-14 % Copyright (C) 2021-2025 Kale Ewasiuk % % Permission is hereby granted, free of charge, to any person obtaining a copy @@ -24,6 +24,7 @@ \documentclass[11pt,parskip=half]{scrartcl} +\usepackage[default]{lato} \setlength{\parindent}{0ex} \newcommand{\llcmd}[1]{\leavevmode\llap{\texttt{\detokenize{#1}}}} \newcommand{\cmd}[1]{\texttt{\detokenize{#1}}} @@ -133,7 +134,7 @@ Some functionality is added to penlight and Lua. \llcmd{pl.utils.}\cmd{filterfiles}\cmd{(dir,filt,rec)} Get files from dir and apply glob-like filters. Set rec to \cmd{true} to include sub directories\\ -\llcmd{pl.}{trysplitcomma(s)} will try to split a string on comma (and strip), but if is a table, leave it +\llcmd{pl.}\cmd{trysplitcomma(s)} will try to split a string on comma (and strip), but if is a table, leave it \llcmd{pl.}\cmd{findfiles{}} or \cmd{findfiles'kv'} is an updated version of \cmd{filterfiles}. Pass a table or a luakeys kv string as the only argument. Valid table options are: \cmd{fn, dir, ext, sub}. @@ -379,7 +380,9 @@ Use \_\_ as a placeholder for a case that isn't matched. The case is fully expan \subsection*{PDF meta data (for pdfx package)} -\cmd{\writePDFmetadatakv*[x]{kv}} Take a key-value string (eg. \cmd{title=whatever, author=me}) and then writes to the \cmd{jobname.xmpdata} file, which is used by pdfx. \cmd{*} will first clear \cmd{__PDFmetadata__} which contains the metadata. The un-starred version updates that table. +\cmd{\writePDFmetadatakv*[x]{kv}} Take a key-value string (eg. \cmd{title=whatever, author=me}) and then writes to the \cmd{jobname.xmpdata} file, which is used by pdfx. +\cmd{*} will first clear \cmd{__PDFmetadata__} which is the table variable that stores the metadata. +The un-starred version updates that table. You can control the expansion of the key-val argument with \cmd{[x]}, which is fully expanded by default. Command sequences are ultimately stripped from the values, except for \cmd{\and} is converted to \cmd{\sep} for pdfx usage (\url{https://texdoc.org/serve/pdfx/0}). \\ diff --git a/macros/luatex/latex/luatbls/luatbls.lua b/macros/luatex/latex/luatbls/luatbls.lua index 5cb1e29ab3..1904b814d3 100644 --- a/macros/luatex/latex/luatbls/luatbls.lua +++ b/macros/luatex/latex/luatbls/luatbls.lua @@ -1,5 +1,5 @@ --% Kale Ewasiuk (kalekje@gmail.com) ---% 2025-01-05 +--% 2025-02-14 --% Copyright (C) 2025 Kale Ewasiuk --% --% Permission is hereby granted, free of charge, to any person obtaining a copy @@ -150,6 +150,16 @@ function luatbls._check_recent_tbl_undefault() end end +function luatbls._check_choices(k, csv) + local csv = penlight.List(luatbls._luakeys.parse(csv,{naked_as_value=true})) + local v = luatbls._get_tbl_item(k) + if not csv:contains(v) then + penlight.tex.pkgerror('luatbls', 'Invalid choice "'..v..'" given to tbl.key "'..k..'". Allowed choices are: '.. + (', '):join(csv)) + end +end + + function luatbls._make_alpha_key(k) if tonumber(k) ~= nil then k = penlight.Char(tonumber(k)) diff --git a/macros/luatex/latex/luatbls/luatbls.pdf b/macros/luatex/latex/luatbls/luatbls.pdf Binary files differindex c9c25d8c4a..e3d7d89042 100644 --- a/macros/luatex/latex/luatbls/luatbls.pdf +++ b/macros/luatex/latex/luatbls/luatbls.pdf diff --git a/macros/luatex/latex/luatbls/luatbls.sty b/macros/luatex/latex/luatbls/luatbls.sty index f52facd7df..c11c47118b 100644 --- a/macros/luatex/latex/luatbls/luatbls.sty +++ b/macros/luatex/latex/luatbls/luatbls.sty @@ -1,5 +1,5 @@ % Kale Ewasiuk (kalekje@gmail.com) -% 2025-01-05 +% 2025-02-14 % Copyright (C) 2025 Kale Ewasiuk % % Permission is hereby granted, free of charge, to any person obtaining a copy @@ -41,13 +41,13 @@ }} \NewDocumentCommand{\tblfrkv}{m +m O{}}{\luadirect{% parse a tbl from key-vals, naked are set to boolean - luatbls._rec_tbl_opts = luatbls._luakeys.parse(\luastring{#3}) + luatbls._rec_tbl_opts = luatbls._luakeys.parse(\luastring{#3}, {naked_as_value=true}) luatbls[\luastring{#1}] = luatbls._luakeys.parse(string.subpar(\luastring{#2}), luatbls._rec_tbl_opts) luatbls._rec_tbl = \luastring{#1} }} \NewDocumentCommand{\tblfrkvN}{m +m O{}}{\luadirect{% - luatbls._rec_tbl_opts = luatbls._luakeys.parse(\luastring{#3}) + luatbls._rec_tbl_opts = luatbls._luakeys.parse(\luastring{#3}, {naked_as_value=true}) luatbls[\luastring{#1}] = luatbls._luakeys.parse(string.subpar(\luastringN{#2}), luatbls._rec_tbl_opts) luatbls._rec_tbl = \luastring{#1} }} @@ -58,6 +58,9 @@ \NewDocumentCommand{\tblkvundefcheck}{}{\luadirect{luatbls._check_recent_tbl_undefault()}}% check defaults list and throw error if foreign keys were used +\NewDocumentCommand{\tblenforcechoices}{m m}{\luadirect{luatbls._check_choices(\luastring{#1},\luastring{#2})}} + + \NewDocumentCommand{\tblapp}{m m}{\luadirect{% append to a table (ie using integer index) with a value (second arg) @@ -134,18 +137,20 @@ \NewDocumentCommand{\tblsetE}{m m}{\luadirect{luatbls.#1 = #2}}% set item with {value} -\NewDocumentCommand{\tblif}{ m m O{}}{\ifluax{luatbls._get_tbl_item(\luastring{#1})}{#2}[#3]} +\NewDocumentCommand{\tblif}{ m +m +O{}}{\ifluax{luatbls._get_tbl_item(\luastring{#1})}{#2}[#3]} -\NewDocumentCommand{\tblifv}{m m O{}}{\ifluaxv{luatbls._get_tbl_item(\luastring{#1})}{#2}[#3]} +\NewDocumentCommand{\tblifv}{m +m +O{}}{\ifluaxv{luatbls._get_tbl_item(\luastring{#1})}{#2}[#3]} -\NewDocumentCommand{\tblifeq}{m m m O{}}{\ifluax{luatbls._get_tbl_item(\luastring{#1}) == #2}{#3}[#4]} +\NewDocumentCommand{\tblifeq}{m m +m +O{}}{\ifluax{luatbls._get_tbl_item(\luastring{#1}) == \expanded{#2}}{#3}[#4]} +\NewDocumentCommand{\tblifeqstr}{m m +m +O{}}{\ifluax{luatbls._get_tbl_item(\luastring{#1}) == \luastring{#2}}{#3}[#4]} -\NewDocumentCommand{\tblfor}{ m m }{\luadirect{luatbls._for_tbl(\luastring{#1}, \luastring{#2})}} -\NewDocumentCommand{\tblforN}{ m m }{\luadirect{luatbls._for_tbl(\luastring{#1}, \luastringN{#2})}} -\NewDocumentCommand{\tblforE}{ m m }{\luadirect{luatbls._for_tbl_e(luatbls.#1, \luastring{#2})}} -\NewDocumentCommand{\tblforEN}{ m m }{\luadirect{luatbls._for_tbl_e(luatbls.#1, \luastringN{#2})}} +\NewDocumentCommand{\tblfor}{ m +m }{\luadirect{luatbls._for_tbl(\luastring{#1}, \luastring{#2})}} +\NewDocumentCommand{\tblforN}{ m +m }{\luadirect{luatbls._for_tbl(\luastring{#1}, \luastringN{#2})}} + +\NewDocumentCommand{\tblforE}{ m +m }{\luadirect{luatbls._for_tbl_e(luatbls.#1, \luastring{#2})}} +\NewDocumentCommand{\tblforEN}{ m +m }{\luadirect{luatbls._for_tbl_e(luatbls.#1, \luastringN{#2})}} \NewDocumentCommand{\tbldef}{ m o }{\luadirect{luatbls._def_tbl(\luastring{#1}, \luastring{#2})}} @@ -158,7 +163,6 @@ \ProvideDocumentCommand{\providenewlength}{ m }{\ifdeflength{#1}{}{\newlength{#1}}} - \NewDocumentCommand{\tblmaketoggle}{ m o }{\luadirect{luatbls._make_toggle_tbl(\luastring{#1}, \luastring{#2})}} \NewDocumentCommand{\tblmakegtoggle}{ m o }{\luadirect{luatbls._make_toggle_tbl(\luastring{#1}, \luastring{#2}, '\\global')}} diff --git a/macros/luatex/latex/luatbls/luatbls.tex b/macros/luatex/latex/luatbls/luatbls.tex index ff807d013b..391e1111c8 100644 --- a/macros/luatex/latex/luatbls/luatbls.tex +++ b/macros/luatex/latex/luatbls/luatbls.tex @@ -1,5 +1,5 @@ % Kale Ewasiuk (kalekje@gmail.com) -% 2025-01-05 +% 2025-02-14 % Copyright (C) 2025 Kale Ewasiuk % % Permission is hereby granted, free of charge, to any person obtaining a copy @@ -23,7 +23,9 @@ % OR OTHER DEALINGS IN THE SOFTWARE. + \documentclass[11pt,parskip=half]{scrartcl} +\usepackage[default]{lato} \usepackage[left=0.75in,right=0.75in,top=1in,bottom=1in]{geometry} \setlength{\parindent}{0ex} \newcommand{\llcmd}[1]{\leavevmode\llap{\texttt{\detokenize{#1}}}} @@ -97,7 +99,7 @@ In this documentation, arguments are represented as follows:\\ \llcmd{opts }: options for \cmd{luakeys.parse()}.\\ \llcmd{cstemp }: a template for command-sequences, lengths, or toggles. By default is \cmd{ltbl<t><k>}.\\ -There are a few ways to use the index (placeholder \cmd{i}.\\ +There are a few ways to use the index (placeholder \cmd{i}).\\ \cmd{t.k} where \cmd{t} is the table name and \cmd{k} is a string key (i.e. uses \cmd{luatbls.t.k}),\\ \cmd{t/n} where \cmd{n} is an integer index (i.e. uses \cmd{t.k[n]}); note that negative indexes are allowed where -1 is the last element. Alternatively, \cmd{t} and the symbol can be omitted, and simply pass the element without the table name as a prefix, @@ -140,13 +142,16 @@ which will not expand the \cmd{v}, \cmd{keyval}, or \cmd{csv} args. \cmd{\tblchg{t}} changes the 'recent' table\\ \\ \cmd{\tblfrkv{t}{keyval}[opts]} new table from key-vals using \cmd{luakeys} \\ -\cmd{\tblfrkvN{t}{keyval}[opts]} does not expand key-val string \cmd{luakeys} \\ - -\cmd{\tblkvundefcheck} will throw an error if you use define a table from key-values -and use a key that was not specified in the luakeys parse options via \cmd{opts.defaults} or \cmd{opts.defs}.\\ +\cmd{\tblfrkvN{t}{keyval}[opts]} does not expand key-val string \cmd{luakeys}. Note: +\cmd{opts} are parsed using luakeys with the \cmd{naked_as_value=true}, so booleans must be explicitly set.\\ \\ \cmd{\tblfrcsv{t}{csv}[opts]} a shorthand \cmd{\tblfrkv{t}{csv}[naked_as_value=true,opts]}, a good way to convert a comma-separated list to an array\\ \cmd{\tblfrcsvN{t}{csv}[opts]} same as above, but the csv is not expanded.\\ +\\ +\cmd{\tblkvundefcheck} will throw an error if you use define a table from key-values +and use a key that was not specified in the luakeys parse options via \cmd{opts.defaults} or \cmd{opts.defs}.\\ +\\ +\cmd{\tblenforcechoices{i}{csv}} will throw an error if the value of item \cmd{i} is not in the provided \cmd{csv} \subsection*{Setting, getting, and modifying} @@ -204,16 +209,23 @@ The validity of table names and keys are not checked.\\ \cmd{\tblif{i}{tr}[fa]} runs code \cmd{tr} if the item is true else \cmd{fa}\\ \cmd{\tblifv{i}{tr}[fa]} runs code \cmd{tr} if the item is truth-y (using \cmd{pl.hasval}) else \cmd{fa}\\ -\cmd{\tblifeq{i}{v}{tr}[fa]} checks the equivalency of to a user-specified value. Quotes must be used to indicate strings. +\cmd{\tblifeq{i}{v}{tr}[fa]} checks the equivalency of to a user-specified value. +The value is fully expanded. Quotes must be used to indicate strings.\\ +\cmd{\tblifeqstr{i}{v}{tr}[fa]} checks the equivalency of to a user-specified value to a string (uses luastring). \begin{LTXexample} + \def\JJ{1} \tblfrcsv{x}{n=false,y=true, - k0="",kv=val,k2=6} + k0="",kv=val,k2=6, + k1=1,k11="1", +} \tblif{n}{tr}[FA]\\ \tblif{k0}{TR}[fa]\\ \tblifv{k0}{tr}[FA]\\ \tblifeq{kv}{'val'}{TR}[fa]\\ \tblifeq{k2}{6}{TR}[fa]\\ +\tblifeq{k1}{\JJ}{Tr} +\tblifeqstr{k11}{\JJ}{Tr} \end{LTXexample} @@ -294,7 +306,7 @@ plain numbers are found, \cmd{sp} units are used (in case the \cmd{convert_dimen \begin{LTXexample} - \tblfrkv{ex}{alen=1cm,blen=2cm,clen=10mm*2+2cm}[convert_dimensions] + \tblfrkv{ex}{alen=1cm,blen=2cm,clen=10mm*2+2cm}[convert_dimensions=true] \tblmakelengths{}[<k>] I\hspace{\alen}I\\ I\hspace{\blen}I\\ |