diff options
author | Karl Berry <karl@freefriends.org> | 2016-01-09 22:29:28 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-01-09 22:29:28 +0000 |
commit | 5f3c1c2ceedbec84321884f8ac5a1a8f9c4ae1b5 (patch) | |
tree | 3969b54c259f29c9cacfca50a0624c8b9927296e /Master/texmf-dist/tex/latex/acro | |
parent | 49f342e07099ccf4336fb7be401f453065977aca (diff) |
acro (9jan16)
git-svn-id: svn://tug.org/texlive/trunk@39331 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/acro')
-rw-r--r-- | Master/texmf-dist/tex/latex/acro/acro.sty | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/Master/texmf-dist/tex/latex/acro/acro.sty b/Master/texmf-dist/tex/latex/acro/acro.sty index c8b8046c807..e1866756489 100644 --- a/Master/texmf-dist/tex/latex/acro/acro.sty +++ b/Master/texmf-dist/tex/latex/acro/acro.sty @@ -8,7 +8,7 @@ % Web: https://bitbucket.org/cgnieder/acro/ % E-Mail: contact@mychemistry.eu % -------------------------------------------------------------------------- -% Copyright 2011-2015 Clemens Niederberger +% Copyright 2011-2016 Clemens Niederberger % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -31,8 +31,8 @@ \RequirePackage{expl3,l3sort,xparse,l3keys2e,xtemplate,etoolbox} \ProvidesExplPackage {acro} - {2015/10/03} - {2.2} + {2016/01/07} + {2.2a} {Typeset Acronyms} % -------------------------------------------------------------------------- @@ -165,6 +165,7 @@ \cs_generate_variant:Nn \seq_gset_split:Nnn { c } \cs_generate_variant:Nn \prop_put:Nnn { NnV, cnx, cnv } \cs_generate_variant:Nn \prop_get:NnNF { cn, cnc } +\cs_generate_variant:Nn \prop_get:NnN { cnc } \cs_generate_variant:Nn \cs_generate_variant:Nn { c } \cs_generate_variant:Nn \str_case:nn { V } @@ -975,7 +976,7 @@ punct-symbol : tokenlist = {,} , brackets : boolean = false , brackets-type : tokenlist = () , - space : length = .3ex + space : length = .333em } \DeclareTemplateCode {acro-page-number} {default} {1} @@ -993,7 +994,9 @@ { \bool_if:NT \l__acro_page_punct_bool { \tl_use:N \l__acro_page_punct_tl } - \tl_use:N \c_space_tl + % \tl_use:N \c_space_tl + \dim_compare:nNnF { \l__acro_page_space_dim } = { 0pt } + { \skip_horizontal:N \l__acro_page_space_dim } \bool_if:NT \l__acro_page_brackets_bool { \tl_head:N \l__acro_page_brackets_tl } \acro_print_page_numbers:n {#1} @@ -1461,8 +1464,7 @@ \cs_new_protected:Npn \__acro_set_list_style:n #1 { \tl_set:Nn \l__acro_list_instance_tl {#1} - \tl_set:Nx \l__acro_list_type_tl - { \prop_item:Nn \l__acro_list_styles_prop {#1} } + \prop_get:NnN \l__acro_list_styles_prop {#1} \l__acro_list_type_tl } % -------------------------------------------------------------------------- @@ -1644,11 +1646,8 @@ \cs_new_protected:Npn \__acro_set_ending_for:nnn #1#2#3 { \bool_if:nTF { \prop_item:cn {l__acro_#3_#1_form_prop} {#2} } - { \prop_get:cncF {l__acro_#3_#1_prop} {#2} {l__acro_#3_tl} {} } - { - \tl_set:cx {l__acro_#3_#1_tl} - { \prop_item:cn {l__acro_#3_#1_prop} {#2} } - } + { \prop_get:cnc {l__acro_#3_#1_form_prop} {#2} {l__acro_#3_tl} } + { \prop_get:cnc {l__acro_#3_#1_prop} {#2} {l__acro_#3_#1_tl} } } \cs_new_protected:Npn \__acro_set_endings:n #1 @@ -1717,7 +1716,7 @@ { \prop_put:cnn {l__acro_short_#1_form_prop} {##1} { \c_false_bool } \prop_put:cnx {l__acro_pdfstring_short_#1_prop} - {##1} { \prop_get:Nn \l__acro_short_prop {##1} \exp_not:n {##2} } + {##1} { \prop_item:Nn \l__acro_short_prop {##1} \exp_not:n {##2} } } % short-<ending>-form: \acro_declare_key_generic:nnn {short_#1_form} {short-#1-form} @@ -1732,7 +1731,7 @@ { \prop_put:cnn {l__acro_alt_#1_form_prop} {##1} { \c_false_bool } \prop_put:cnx {l__acro_pdfstring_alt_#1_prop} - {##1} { \prop_get:Nn \l__acro_alt_prop {##1} \exp_not:n {##2} } + {##1} { \prop_item:Nn \l__acro_alt_prop {##1} \exp_not:n {##2} } } % alt-<ending>-form: \acro_declare_key_generic:nnn {alt_#1_form} {alt-#1-form} @@ -2321,11 +2320,11 @@ \cs_new_protected:Npn \acro_write_indefinite:nn #1#2 { \bool_if:NT \l__acro_indefinite_bool - { \prop_get:cn { l__acro_#2_indefinite_prop } {#1} ~ } + { \prop_item:cn { l__acro_#2_indefinite_prop } {#1} ~ } \bool_if:NT \l__acro_upper_indefinite_bool { % \bool_set_true:N \l__acro_first_upper_bool \__acro_first_upper_case:x - { \prop_get:cn { l__acro_#2_indefinite_prop } {#1} } ~ + { \prop_item:cn { l__acro_#2_indefinite_prop } {#1} } ~ } } @@ -2494,15 +2493,10 @@ \tl_map_inline:Nn \l__acro_trailing_tokens_tl { \token_if_eq_meaning:NNT \l_peek_token ##1 - { \prop_get:Nn \l__acro_trailing_actions_prop {##1} } + { \prop_item:Nn \l__acro_trailing_actions_prop {##1} } } } -% register some tokens to be checked for: -\AcroRegisterTrailing . {dot} -\AcroRegisterTrailing - {dash} -\AcroRegisterTrailing \babelhyphen {babel-hyphen} - % options for activating actions: \keys_define:nn {acro} { @@ -2513,13 +2507,20 @@ \clist_map_inline:nn {#1} { \acro_deactivate_trailing_token:n {##1} } } +% register some tokens to be checked for: +\AcroRegisterTrailing . {dot} +\AcroRegisterTrailing - {dash} +\AcroRegisterTrailing \babelhyphen {babel-hyphen} + % some user macros: -\cs_new_protected:Npn \acro_dot: { \aciftrailing {dot} {} {.\@} } -\cs_new_eq:NN \acdot \acro_dot: +\NewDocumentCommand \acdot {} + { \aciftrailing {dot} {} {.\@} } -\cs_new_protected:Npn \acro_space: +\NewDocumentCommand \acspace {} { \aciftrailing {dash,babel-hyphen} {} {\space} } -\cs_new_eq:NN \acspace \acro_space: + +\cs_new_eq:NN \acro_dot: \acdot +\cs_new_eq:NN \acro_space: \acspace % --------------------------------------------------------------------------- % reset outputs, they'll behave like the first time again (!not like the _only_ @@ -3581,6 +3582,7 @@ - \DeclareAcroListHeading - input `acro.cfg' if present - all acro commands have an optional argument: \ac*[]{} +2016/01/07 v2.2a - \prop_get:Nn => \prop_item:Nn % -------------------------------------------------------------------------- update => http://tex.stackexchange.com/questions/236362 |