From 3c9c77c6de7e3cf26c042df0133dd9ce452d7fee Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 25 Sep 2013 23:12:19 +0000 Subject: acro (25sep13) git-svn-id: svn://tug.org/texlive/trunk@31765 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/acro/acro.sty | 25 ++++++++++++++----------- Master/texmf-dist/tex/latex/acro/acro1.def | 2 ++ 2 files changed, 16 insertions(+), 11 deletions(-) (limited to 'Master/texmf-dist/tex/latex/acro') diff --git a/Master/texmf-dist/tex/latex/acro/acro.sty b/Master/texmf-dist/tex/latex/acro/acro.sty index 7a7718898d7..ce2d35610d3 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/09/02} - {1.4a} + {2013/09/24} + {1.4b} {Typeset Acronyms} % -------------------------------------------------------------------------- @@ -130,7 +130,7 @@ % -------------------------------------------------------------------------- % boolean variables: \bool_new:N \l__acro_mark_as_used_bool -\bool_new:N \l__acro_mark_first_as_used_bool +\bool_new:N \g__acro_mark_first_as_used_bool \bool_new:N \l__acro_use_single_bool \bool_new:N \l__acro_print_only_used_bool \bool_set_true:N \l__acro_print_only_used_bool @@ -367,9 +367,9 @@ only-used .bool_set:N = \l__acro_print_only_used_bool , mark-as-used .choice: , mark-as-used / first .code:n = - \bool_set_true:N \l__acro_mark_first_as_used_bool , + \bool_gset_true:N \g__acro_mark_first_as_used_bool , mark-as-used / any .code:n = - \bool_set_false:N \l__acro_mark_first_as_used_bool , + \bool_gset_false:N \g__acro_mark_first_as_used_bool , plural-ending .tl_set:N = \l__acro_default_plural_tl , list-caps .bool_set:N = \l__acro_capitalize_list_bool , cite .choice: , @@ -1055,9 +1055,9 @@ \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 ) ) + || + ( !\l__acro_use_single_bool && !\l__acro_print_only_used_bool ) } { \acro_is_excluded:nnF { ##1 } { #2 } @@ -1452,10 +1452,10 @@ ( ( \bool_if_p:c { g__acro_#1_first_use_bool } && - \l__acro_mark_first_as_used_bool + \g__acro_mark_first_as_used_bool ) || - ! \l__acro_mark_first_as_used_bool + ! \g__acro_mark_first_as_used_bool ) } { @@ -1480,7 +1480,7 @@ { \bool_if:NTF \l__acro_mark_as_used_bool { - \if@filesw +% \if@filesw \iow_shipout_x:Nn \@auxout { \token_to_str:N \acro@used@once { #1 } @@ -1488,7 +1488,8 @@ { \arabic{page} } { \arabic{abspage} } } - \fi + +% \fi \bool_if:nT { !\bool_if_p:c { g__acro_#1_label_bool } && @@ -2438,6 +2439,8 @@ 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} +2013/??/?? v1.4b - bug fix: only-used=false works again for only declared but + unused acronyms (only if option single is not used) % -------------------------------------------------------------------------- % TODO: diff --git a/Master/texmf-dist/tex/latex/acro/acro1.def b/Master/texmf-dist/tex/latex/acro/acro1.def index 9d6e7a2b9dc..22f931cc59c 100644 --- a/Master/texmf-dist/tex/latex/acro/acro1.def +++ b/Master/texmf-dist/tex/latex/acro/acro1.def @@ -434,6 +434,8 @@ \bool_new:c { g__acro_#1_used_bool } \bool_new:c { g__acro_#1_label_bool } \bool_new:c { g__acro_#1_in_list_bool } + \bool_if:NF \l__acro_print_only_used_bool + { \bool_gset_true:c { g__acro_#1_in_list_bool } } \acro_create_page_records:n { #1 } \acro_define_acronym_macro:n { #1 } \tl_clear:N \l__acro_current_key_tl -- cgit v1.2.3