summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/acro
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-12-31 03:00:32 +0000
committerNorbert Preining <norbert@preining.info>2019-12-31 03:00:32 +0000
commit1f9ab71f8ea4751f440072e9e4da3314edbbcf2e (patch)
tree1ac9f67dd95b7e3072b7951e6cb1590fda73ffb9 /macros/latex/contrib/acro
parent0af8a1a375250bdab8576ca414baae91122ea6a3 (diff)
CTAN sync 201912310300
Diffstat (limited to 'macros/latex/contrib/acro')
-rw-r--r--macros/latex/contrib/acro/README4
-rw-r--r--macros/latex/contrib/acro/acro.history3
-rw-r--r--macros/latex/contrib/acro/acro.sty102
-rw-r--r--macros/latex/contrib/acro/acro_en.pdfbin565833 -> 567166 bytes
-rw-r--r--macros/latex/contrib/acro/acro_en.tex10
5 files changed, 65 insertions, 54 deletions
diff --git a/macros/latex/contrib/acro/README b/macros/latex/contrib/acro/README
index 8263eb47e5..5bfe1ce016 100644
--- a/macros/latex/contrib/acro/README
+++ b/macros/latex/contrib/acro/README
@@ -1,5 +1,5 @@
--------------------------------------------------------------------------
-the ACRO package v2.10c 2019/10/12
+the ACRO package v2.10d 2019/12/30
Typeset Acronyms
@@ -23,7 +23,7 @@ This work has the LPPL maintenance status `maintained'.
The Current Maintainer of this work is Clemens Niederberger.
--------------------------------------------------------------------------
The acro package consists of the files
- - acro.sty, acro_en.tex, acro_en.pdf, README
+ - acro.sty, acro_en.tex, acro_en.pdf, README, acro.history
--------------------------------------------------------------------------
If you have any ideas, questions, suggestions or bugs to report, please
feel free to contact me.
diff --git a/macros/latex/contrib/acro/acro.history b/macros/latex/contrib/acro/acro.history
index c442d5bb52..b20f53427a 100644
--- a/macros/latex/contrib/acro/acro.history
+++ b/macros/latex/contrib/acro/acro.history
@@ -267,3 +267,6 @@
- clearer documentation of `uppercase-short'
- set the default of `uppercase-short' to `true'
2019/10/12 v2.10c - fix issue #139
+2019/12/30 v2.10d - fix issue #76
+ - fix issue #141
+ - fix issue #143
diff --git a/macros/latex/contrib/acro/acro.sty b/macros/latex/contrib/acro/acro.sty
index 4f94b1304c..03d0121d5f 100644
--- a/macros/latex/contrib/acro/acro.sty
+++ b/macros/latex/contrib/acro/acro.sty
@@ -31,8 +31,8 @@
\RequirePackage{expl3,xparse,l3keys2e,xtemplate,etoolbox}
\ProvidesExplPackage
{acro}
- {2019/10/12}
- {2.10c}
+ {2019/12/30}
+ {2.10d}
{Typeset Acronyms}
% --------------------------------------------------------------------------
@@ -109,7 +109,12 @@
% --------------------------------------------------------------------------
% logging:
-\cs_new:Npn \acro_if_log:T #1 { \use:n {#1} }
+\prg_new_conditional:Npnn \acro_if_log: {p,T,F,TF}
+ {
+ \bool_if:NTF \l__acro_log_acronyms_bool
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
\bool_new:N \l__acro_log_acronyms_bool
\bool_new:N \l__acro_log_acronyms_verbose_bool
@@ -440,12 +445,12 @@
\cs_new_protected:Npn \__acro_first_upper_case:n #1
{ \tl_upper_case:n { \tl_head:n {#1} } \tl_tail:n {#1} }
-\cs_generate_variant:Nn \__acro_first_upper_case:n { x }
-\cs_generate_variant:Nn \tl_mixed_case:n { x }
+\cs_generate_variant:Nn \__acro_first_upper_case:n {x}
+\cs_generate_variant:Nn \tl_mixed_case:n {x}
\cs_new_eq:NN \acro_first_upper_case:n \__acro_first_upper_case:n
-\NewDocumentCommand \acfirstupper { m }
+\NewDocumentCommand \acfirstupper {m}
{ \acro_first_upper_case:n {#1} }
% --------------------------------------------------------------------------
@@ -660,29 +665,30 @@
{
\bool_if:nT { \l__acro_hyperref_loaded_bool && \l__acro_use_hyperref_bool }
{
- \cs_set_eq:NN \acro_hyper_link:nn \hyperlink
+ \sys_if_engine_xetex:TF
+ {
+ \cs_set:Npn \acro_hyper_link:nn ##1##2
+ { \hyperlink { \XeTeXLinkBox {##1} } {##2} }
+ }
+ { \cs_set_eq:NN \acro_hyper_link:nn \hyperlink }
\cs_set:Npn \acro_hyper_target:nn ##1##2
- { \raisebox { 3ex } [ 0pt ] { \hypertarget {##1} { } } ##2 }
+ { \raisebox {3ex} [0pt] { \hypertarget {##1} { } } ##2 }
}
}
-% #1: tl var
-% #2: id
-% #3: text
-\cs_new_protected:Npn \__acro_make_link:Nnn #1#2#3
+% #1: id
+% #2: text
+\cs_new_protected:Npn \__acro_make_link:nn #1#2
{
\bool_if:nTF
{ \l__acro_use_hyperref_bool && \l__acro_hyperref_loaded_bool }
{
- \tl_set:Nn #1
- {
- \acro_hyper_link:nn {#2} { \phantom {#3} }
- \acro_if_is_single:nTF {#2}
- { \hbox_overlap_left:n {#3} }
- { \acro_color_link:n { \hbox_overlap_left:n {#3} } }
- }
+ \acro_hyper_link:nn {#1} { \phantom {#2} }
+ \acro_if_is_single:nTF {#1}
+ { \hbox_overlap_left:n {#2} }
+ { \acro_color_link:n { \hbox_overlap_left:n {#2} } }
}
- { \tl_set:Nn #1 {#3} }
+ {#2}
}
\cs_generate_variant:Nn \__acro_make_link:Nnn {NnV}
@@ -1426,7 +1432,7 @@
}
{ \l__acro_custom_short_format_tl }
{ \l__acro_list_short_format_tl }
- \__acro_get_property:nn {short} {#1}
+ { \__acro_get_property:nn {short} {#1} }
}
}
\group_end:
@@ -2018,26 +2024,22 @@
\bool_if:NF \l__acro_in_list_bool { \leavevmode }
\acro_activate_hyperref_support:
% short:
- \prop_get:NnNF \l__acro_short_prop {#1} \l__acro_tmpa_tl {}
- \__acro_make_link:NnV \l__acro_short_tl {#1} \l__acro_tmpa_tl
- % \acro_get_property:nn {#1} {short-format}
+ \prop_get:NnNF \l__acro_short_prop {#1} \l__acro_short_tl {}
+ % \__acro_make_link:NnV \l__acro_short_tl {#1} \l__acro_tmpa_tl
% alt:
- \prop_get:NnNTF \l__acro_alt_prop {#1} \l__acro_tmpa_tl
- { \__acro_make_link:NnV \l__acro_alt_tl {#1} \l__acro_tmpa_tl }
+ \prop_get:NnNF \l__acro_alt_prop {#1} \l__acro_alt_tl
+ % { \__acro_make_link:NnV \l__acro_alt_tl {#1} \l__acro_tmpa_tl }
{ \tl_set_eq:NN \l__acro_alt_tl \l__acro_short_tl }
% long:
\acro_get_property:nn {#1} {long}
- % \acro_get_property:nn {#1} {long-format}
% foreign:
\acro_get_property:nn {#1} {foreign}
% foreign-lang:
\acro_get_property:nn {#1} {foreign-lang}
% extra:
\acro_get_property:nn {#1} {extra}
- % \acro_get_property:nn {#1} {extra-format}
% single:
\acro_get_property:nn {#1} {single}
- % \acro_get_property:nn {#1} {single-format}
% first-style:
\acro_get_property:nn {#1} {first-style}
% formatting
@@ -2329,8 +2331,8 @@
\cs_new:cpn {acro_pdf_string_short_#1:n} ##1
{
\acro_if_star_gobble:nTF {##1}
- { \prop_item:cn {l__acro_pdfstring_short_#1_prop} }
- { \prop_item:cn {l__acro_pdfstring_short_#1_prop} {##1} }
+ { \use:e { \prop_item:cn {l__acro_pdfstring_short_#1_prop} } }
+ { \use:e {\prop_item:cn {l__acro_pdfstring_short_#1_prop} {##1} } }
}
\cs_new:cpn {acpdfstring#1} { \use:c {acro_pdf_string_short_#1:n} }
\prop_new:c {l__acro_pdfstring_alt_#1_prop}
@@ -2512,9 +2514,9 @@
{
\__acro_aux_file_now:x
{
- \token_to_str:N \acro@pages {#1}
+ \acro@pages {#1}
{ \seq_use:cn {g__acro_#1_pages_seq} {|} } ^^J
- \token_to_str:N \acro@barriers {#1}
+ \acro@barriers {#1}
{ \seq_use:cn {g__acro_#1_barriers_seq} {,} }
}
}
@@ -2561,12 +2563,15 @@
% #2: short form
\cs_new_protected:Npn \acro_write_short:nn #1#2
{
- \__acro_typeset:nn {short}
+ \__acro_make_link:nn {#1}
{
- \bool_if:nTF
- { \l__acro_first_upper_bool }
- { \exp_not:N \__acro_first_upper_case:n { \exp_not:n {#2} } }
- { \exp_not:n {#2} }
+ \__acro_typeset:nn {short}
+ {
+ \bool_if:nTF
+ { \l__acro_first_upper_bool }
+ { \exp_not:N \__acro_first_upper_case:n { \exp_not:n {#2} } }
+ { \exp_not:n {#2} }
+ }
}
}
\cs_generate_variant:Nn \acro_write_short:nn { nV , nv }
@@ -2576,12 +2581,15 @@
% #2: alt form
\cs_new_protected:Npn \acro_write_alt:nn #1#2
{
- \__acro_typeset:nn {alt}
+ \__acro_make_link:nn {#1}
{
- \bool_if:nTF
- { \l__acro_first_upper_bool && \l__acro_upper_short_bool }
- { \exp_not:N \__acro_first_upper_case:n { \exp_not:n {#2} } }
- { \exp_not:n {#2} }
+ \__acro_typeset:nn {alt}
+ {
+ \bool_if:nTF
+ { \l__acro_first_upper_bool && \l__acro_upper_short_bool }
+ { \exp_not:N \__acro_first_upper_case:n { \exp_not:n {#2} } }
+ { \exp_not:n {#2} }
+ }
}
}
\cs_generate_variant:Nn \acro_write_alt:nn { nV , nv }
@@ -3000,11 +3008,11 @@
\cs_new_protected:Npn \acro_write_indefinite:nn #1#2
{
\bool_if:NT \l__acro_indefinite_bool
- { \prop_item: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_item:cn { l__acro_#2_indefinite_prop } {#1} } ~
+ { \prop_item:cn {l__acro_#2_indefinite_prop} {#1} } ~
}
}
@@ -3321,7 +3329,7 @@
}
\cs_generate_variant:Nn \acro_if_in_barrier:nnTF {nx}
-\cs_new:Npn \acro@barriers #1#2
+\cs_new_protected:Npn \acro@barriers #1#2
{ \seq_gset_split:cnn {g__acro_#1_recorded_barriers_seq} {,} {#2} }
% --------------------------------------------------------------------------
@@ -3509,7 +3517,7 @@
\cs_new:Npn \acro_expandable_short:n #1
{ \use:e { \prop_item:Nn \l__acro_short_prop {#1} } }
-
+
\cs_new:Npn \acro_expandable_alt:n #1
{ \use:e { \prop_item:Nn \l__acro_alt_prop {#1} } }
diff --git a/macros/latex/contrib/acro/acro_en.pdf b/macros/latex/contrib/acro/acro_en.pdf
index 31e6bdb440..eee6eaed49 100644
--- a/macros/latex/contrib/acro/acro_en.pdf
+++ b/macros/latex/contrib/acro/acro_en.pdf
Binary files differ
diff --git a/macros/latex/contrib/acro/acro_en.tex b/macros/latex/contrib/acro/acro_en.tex
index 2ac8b01d65..9aaea47d3c 100644
--- a/macros/latex/contrib/acro/acro_en.tex
+++ b/macros/latex/contrib/acro/acro_en.tex
@@ -1,8 +1,8 @@
-% arara: pdflatex: { action: nonstopmode }
-% !arara: biber
-% !arara: pdflatex: { action: nonstopmode }
-% !arara: pdflatex: { action: nonstopmode }
-% !arara: pdflatex: { action: nonstopmode }
+% arara: pdflatex: { interaction: nonstopmode }
+% arara: biber
+% arara: pdflatex: { interaction: nonstopmode }
+% arara: pdflatex: { interaction: nonstopmode }
+% !arara: pdflatex: { interaction: nonstopmode }
% --------------------------------------------------------------------------
% the ACRO package
%