From efbe9b2e9c32a3b15fdcb9041c69f3c8715927a7 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 4 Sep 2013 22:49:05 +0000 Subject: acro (3sep13) git-svn-id: svn://tug.org/texlive/trunk@31571 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/acro/acro.sty | 42 +++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 10 deletions(-) (limited to 'Master/texmf-dist/tex/latex/acro/acro.sty') diff --git a/Master/texmf-dist/tex/latex/acro/acro.sty b/Master/texmf-dist/tex/latex/acro/acro.sty index 40d3cef8a9c..7a7718898d7 100644 --- a/Master/texmf-dist/tex/latex/acro/acro.sty +++ b/Master/texmf-dist/tex/latex/acro/acro.sty @@ -31,8 +31,8 @@ \RequirePackage{expl3,xparse,l3keys2e,xtemplate} \ProvidesExplPackage {acro} - {2013/08/27} - {1.4} + {2013/09/02} + {1.4a} {Typeset Acronyms} % -------------------------------------------------------------------------- @@ -1046,10 +1046,17 @@ \acro_get:n { ##1 } \bool_if:nT { - \bool_if_p:c { g__acro_##1_used_bool } && ( - ( \l__acro_use_single_bool && \cs_if_exist_p:c { acro@##1@twice } ) || - ( !\l__acro_use_single_bool && \cs_if_exist_p:c { acro@##1@once } && \l__acro_print_only_used_bool ) || - ( !\l__acro_use_single_bool && !\l__acro_print_only_used_bool ) + \bool_if_p:c { g__acro_##1_in_list_bool } && + ( + ( \l__acro_use_single_bool && \cs_if_exist_p:c { acro@##1@twice } ) + || + ( + !\l__acro_use_single_bool && + \cs_if_exist_p:c { acro@##1@once } && + \l__acro_print_only_used_bool + ) + || + ( !\l__acro_use_single_bool && !\l__acro_print_only_used_bool ) ) } { @@ -1510,13 +1517,14 @@ % the commands for the auxiliary file: \cs_new_protected:Npn \acro@used@once #1#2#3#4 { - \expandafter\xdef\csname acro@#1@once \endcsname { #1 } + \cs_gset_nopar:cpn { acro@#1@once } { #1 } + \bool_gset_true:c { g__acro_#1_in_list_bool } \tl_if_empty:nF { #2#3#4 } { \seq_gput_right:cn { g__acro_#1_pages_seq } { {#2}{#3}{#4} } } } \cs_new_protected:Npn \acro@used@twice #1#2#3#4 { - \expandafter\xdef\csname acro@#1@twice \endcsname { #1 } + \cs_gset_nopar:cpn { acro@#1@twice } { #1 } \tl_if_empty:nF { #2#3#4 } { \seq_gput_right:cn { g__acro_#1_pages_seq } { {#2}{#3}{#4} } } } @@ -2186,11 +2194,22 @@ { \bool_gset_true:c { g__acro_#1_used_bool } \bool_gset_true:c { g__acro_#1_first_use_bool } + \bool_gset_true:c { g__acro_#1_in_list_bool } \cs_if_exist:cTF { acro@#1@once } - { \cs_gset:cpn { acro@#1@twice } { #1 } } - { \cs_gset:cpn { acro@#1@once } { #1 } } + { \cs_gset_nopar:cpn { acro@#1@twice } { #1 } } + { + \cs_gset_nopar:cpn { acro@#1@once } { #1 } + \cs_gset_nopar:cpn { acro@#1@twice } { #1 } + } + \if@filesw + \iow_shipout_x:Nn \@auxout + { \token_to_str:N \acro@used@once { #1 } {} {} {} } + \iow_shipout_x:Nn \@auxout + { \token_to_str:N \acro@used@twice { #1 } {} {} {} } + \fi } + \cs_new_protected:Npn \acro_reset_all: { \prop_map_inline:Nn \l__acro_short_prop { \acro_reset:n { ##1 } } } @@ -2416,6 +2435,9 @@ 2013/08/07 v1.3e - bug fix in the list when testing for used acronyms - new commands \acifused, \acfirstupper 2013/08/27 v1.4 - new property `list' +2013/09/02 v1.4a - bug fix: used acronyms are added to the list when the list + is printed before the use + - \DeclareAcronym may now be used after \begin{document} % -------------------------------------------------------------------------- % TODO: -- cgit v1.2.3