summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/acro
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-09-04 22:49:05 +0000
committerKarl Berry <karl@freefriends.org>2013-09-04 22:49:05 +0000
commitefbe9b2e9c32a3b15fdcb9041c69f3c8715927a7 (patch)
tree3b077937cf9da8397f93b86dc54c406bdf1fc8cc /Master/texmf-dist/tex/latex/acro
parentb08d240fdd125f579769dac43c75608d36262e39 (diff)
acro (3sep13)
git-svn-id: svn://tug.org/texlive/trunk@31571 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/acro')
-rw-r--r--Master/texmf-dist/tex/latex/acro/acro.sty42
-rw-r--r--Master/texmf-dist/tex/latex/acro/acro0.def7
-rw-r--r--Master/texmf-dist/tex/latex/acro/acro1.def3
3 files changed, 38 insertions, 14 deletions
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:
diff --git a/Master/texmf-dist/tex/latex/acro/acro0.def b/Master/texmf-dist/tex/latex/acro/acro0.def
index ddca2627df6..cff564c2fc3 100644
--- a/Master/texmf-dist/tex/latex/acro/acro0.def
+++ b/Master/texmf-dist/tex/latex/acro/acro0.def
@@ -44,8 +44,8 @@
\cs_new:Npn \acro_new:nnnnnnnnn #1#2#3#4#5#6#7#8#9
{
\IfBooleanTF { #1 }
- { \prop_put:Nnn \l__acro_replace_plural_prop { #2 } { \c_true_bool } }
- { \prop_put:Nnn \l__acro_replace_plural_prop { #2 } { \c_false_bool } }
+ { \prop_put:Nnn \l__acro_replace_long_plural_prop { #2 } { \c_true_bool } }
+ { \prop_put:Nnn \l__acro_replace_long_plural_prop { #2 } { \c_false_bool } }
\prop_put:Nnn \l__acro_short_prop { #2 } { #3 }
\prop_put:Nnn \l__acro_sort_prop { #2 } { #2 }
\prop_put:Nnn \l__acro_pdfstring_prop { #2 } { #3 }
@@ -74,6 +74,7 @@
{ \prop_put:Nnn \l__acro_extra_prop { #2 } { #9 } }
\bool_new:c { g__acro_#2_first_use_bool }
\bool_new:c { g__acro_#2_used_bool }
+ \bool_new:c { g__acro_#2_in_list_bool }
\bool_new:c { g__acro_#2_label_bool }
\bool_if:NT \l__acro_create_macros_bool
{
@@ -166,4 +167,4 @@
\NewDocumentCommand \printacronyms { G{}O{} }
{ \acro_print_acronyms:nn { #1 } { #2 } }
-\tex_endinput:D \ No newline at end of file
+\tex_endinput:D
diff --git a/Master/texmf-dist/tex/latex/acro/acro1.def b/Master/texmf-dist/tex/latex/acro/acro1.def
index ed3c0568b9f..9d6e7a2b9dc 100644
--- a/Master/texmf-dist/tex/latex/acro/acro1.def
+++ b/Master/texmf-dist/tex/latex/acro/acro1.def
@@ -433,6 +433,7 @@
\bool_new:c { g__acro_#1_first_use_bool }
\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 }
\acro_create_page_records:n { #1 }
\acro_define_acronym_macro:n { #1 }
\tl_clear:N \l__acro_current_key_tl
@@ -446,7 +447,7 @@
% the user command:
\NewDocumentCommand \DeclareAcronym { mm }
{ \acro_declare_acronym:nn { #1 } { #2 } }
-\@onlypreamble\DeclareAcronym
+% \@onlypreamble\DeclareAcronym
% --------------------------------------------------------------------------
% print the list: