diff options
author | Karl Berry <karl@freefriends.org> | 2022-01-27 21:40:26 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-01-27 21:40:26 +0000 |
commit | 25f1ee5dbdb9d8c6e081c552e05bec712b9f2516 (patch) | |
tree | 097355462b26beecc365378c02bd3cbd126b44c4 /Master/texmf-dist/tex/latex/acro/acro.sty | |
parent | ad0fd9fb6ce74369bba2e59251d112c8996e7e1b (diff) |
acro (27jan22)
git-svn-id: svn://tug.org/texlive/trunk@61762 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/acro/acro.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/acro/acro.sty | 80 |
1 files changed, 43 insertions, 37 deletions
diff --git a/Master/texmf-dist/tex/latex/acro/acro.sty b/Master/texmf-dist/tex/latex/acro/acro.sty index 140b54ad8f0..e53c01b014c 100644 --- a/Master/texmf-dist/tex/latex/acro/acro.sty +++ b/Master/texmf-dist/tex/latex/acro/acro.sty @@ -27,9 +27,9 @@ % setup package: \tl_const:Nn \c_acro_package_name_tl {acro} -\tl_const:Nn \c_acro_date_tl {2022/01/04} +\tl_const:Nn \c_acro_date_tl {2022/01/27} \tl_const:Nn \c_acro_version_major_number_tl {3} -\tl_const:Nn \c_acro_version_minor_number_tl {6} +\tl_const:Nn \c_acro_version_minor_number_tl {7} \tl_const:Nn \c_acro_version_subrelease_tl {} \tl_const:Nx \c_acro_version_number_tl { @@ -1271,7 +1271,7 @@ } \bool_if:NT \l__acro_property_define_static_bool { - \AtEndDocument { \__acro_auxlist_update:n {#2} } + \hook_gput_code:nnn {enddocument} {acro} { \__acro_auxlist_update:n {#2} } \acro_at_begin_document:n { \__acro_property_set_from_auxlist:n {#2} } } @@ -2850,27 +2850,7 @@ % ---------------------------------------------------------------------------- % sorting the list: -% the following code is an adaption of expl3 code used for \str_if_eq:NN(TF) -\sys_if_engine_luatex:TF - { - \cs_new_protected:Npn \__acro_strcmp:nn #1#2 - { - \lua_now:e - { - l3kernel.strcmp - ( - " \__acro_escape_x:n {#1} " , - " \__acro_escape_x:n {#2} " - ) - } - } - \cs_new:Npn \__acro_escape_x:n #1 - { - \lua_escape:e - { \tex_detokenize:D \use:e { {#1} } } - } - } - { \cs_new_eq:NN \__acro_strcmp:nn \tex_strcmp:D } +\cs_new_eq:NN \__acro_strcmp:nn \tex_strcmp:D \cs_new_protected:Npn \acro_list_sort: { @@ -3367,6 +3347,12 @@ \AcroModuleEnd \AcroModule{templates}{templates for typesetting exercises} +\msg_new:nnn {acro} {template-exists} + { + The~ template~ `#1'~ (template~ type~ `#2')~ \msg_line_context: \ + already~ is~ defined. + } + \msg_new:nnn {acro} {unknown-template} { The~ template~ `#1'~ (template~ type~ `#2')~ \msg_line_context: \ @@ -3401,9 +3387,13 @@ % #3: code \cs_new_protected:Npn \__acro_template_add:nnn #1#2#3 { - \tl_new:c {l__acro_template_#1_#2_setup_tl} - \tl_new:c {l__acro_next_template_#1_#2_setup_tl} - \acro_attribute_set:nnn {template::#1} {#2} {#3} + \acro_template_if_exist:nnTF {#1} {#2} + { \msg_error:nnnn {acro} {template-exists} {#2} {#1} } + { + \tl_new:c {l__acro_template_#1_#2_setup_tl} + \tl_new:c {l__acro_next_template_#1_#2_setup_tl} + \acro_attribute_set:nnn {template::#1} {#2} {#3} + } } % #1: template type @@ -3829,14 +3819,14 @@ exclude .clist_set:N = \l__acro_tag_exclude_clist , add .clist_set:N = \l__acro_tag_add_clist , local .bool_set:N = \l__acro_list_local_bool , - heading .tl_set:N = \l__acro_heading_tl , - preamble .tl_set:N = \l__acro_preamble_tl , - preamble .initial:n = , - postamble .tl_set:N = \l__acro_postamble_tl , - postamble .initial:n = , - name .tl_set:N = \l__acro_list_name_tl , - name .initial:n = \acro_translate:n {list-name} , - pages .meta:nn = {acro/pages} {#1} + heading .tl_set:N = \l__acro_heading_tl , + preamble .tl_set:N = \l__acro_preamble_tl , + preamble .initial:n = , + postamble .tl_set:N = \l__acro_postamble_tl , + postamble .initial:n = , + name .tl_set:N = \l__acro_list_name_tl , + name .initial:n = \acro_translate:n {list-name} , + pages .meta:nn = {acro/pages} {#1} } \acro_if_komascript:TF @@ -5058,8 +5048,9 @@ \acro_new_patch:n {ltxtable} \acro_new_patch:n {caption} \acro_new_patch:n {maketitle} +\acro_new_patch:n {longtable} -\AtEndPreamble +\hook_gput_code:nnn {begindocument/before} {acro} { % maketitle: \acro_if_patch:nT {maketitle} @@ -5125,6 +5116,18 @@ \cs_if_exist:NT \caption@prepareslc { \tl_gput_right:Nn \caption@prepareslc { \acswitchoff } } } + % longtable pakage: + \acro_if_patch:nT {longtable} + { + \cs_if_exist:NT \endlongtable + { + \patchcmd \endlongtable + { \ifx \LT@save@row \LT@@save@row \else } + { \ifx \LT@save@row \LT@@save@row \else \acswitchoff } + {} + { \msg_error:nnn {acro} {patch} {longtable} } + } + } } \AcroModuleEnd @@ -5251,10 +5254,13 @@ \acroifT {foreign} { \acrowrite {foreign} ,~ } \acrowrite {long} \acrogroupcite + \acroendfootnote } } } +\ProvideDocumentCommand \acroendfootnote {} {} + \NewAcroTemplate {long} { \acrowrite {long} } @@ -5948,6 +5954,6 @@ % ---------------------------------------------------------------------------- \AcroModuleEnd % finish package: -\AtEndDocument { \acro_close_aux: \acro_do_rerun: } +\hook_gput_code:nnn {enddocument} {acro} { \acro_close_aux: \acro_do_rerun: } %---------------------------------------------------------------------------- \file_input_stop: |