diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/acro/README | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/acro/acro_en.pdf | bin | 565182 -> 565152 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/acro/acro_en.tex | 16 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/acro/acro.sty | 127 |
4 files changed, 114 insertions, 33 deletions
diff --git a/Master/texmf-dist/doc/latex/acro/README b/Master/texmf-dist/doc/latex/acro/README index 8cf92b23ac7..8033cec3214 100644 --- a/Master/texmf-dist/doc/latex/acro/README +++ b/Master/texmf-dist/doc/latex/acro/README @@ -1,9 +1,9 @@ -------------------------------------------------------------------------- -the ACRO package v2.5b +the ACRO package v2.6 Typeset Acronyms -2016/05/30 +2016/07/20 -------------------------------------------------------------------------- Clemens Niederberger Web: http://www.mychemistry.eu/forums/forum/acro/ diff --git a/Master/texmf-dist/doc/latex/acro/acro_en.pdf b/Master/texmf-dist/doc/latex/acro/acro_en.pdf Binary files differindex f1c99a5eff9..e7adbbbc472 100644 --- a/Master/texmf-dist/doc/latex/acro/acro_en.pdf +++ b/Master/texmf-dist/doc/latex/acro/acro_en.pdf diff --git a/Master/texmf-dist/doc/latex/acro/acro_en.tex b/Master/texmf-dist/doc/latex/acro/acro_en.tex index 1140c3a2c0f..02adea8cd85 100644 --- a/Master/texmf-dist/doc/latex/acro/acro_en.tex +++ b/Master/texmf-dist/doc/latex/acro/acro_en.tex @@ -893,6 +893,18 @@ used: \command{acuseall} Mark all acronyms as used. \end{commands} +Then there are two further commands related to using acronyms: +\begin{commands} + \command{acswitchoff} + This\sinceversion{2.6} command is for patching in certain situations. For + example some table environments like \env*{tabularx} or \env*{tabu} pass + their content two or more times for determining the width of the table + columns. Those can be patched to add \cs{acswitchoff} to their trial + phase. + \command{acswitchon} + Effectively\sinceversion{2.6} the opposite of \cs{acswitchoff} -- this + command should probably never be needed. +\end{commands} \subsection{\cs*{ac} and Friends in \acs*{pdf} Bookmarks, Accessibility Support, Tooltips} @@ -1656,6 +1668,10 @@ commands\footnote{Which is why you need to use them inside an expl3 \verbcode+#1+. \command*{acro_barrier:} The code-level version of \cs{acbarrier}. + \command*{acro_switch_off:} + The\sinceversion{2.6} expl3 version of \cs{acswitchoff}. + \command*{acro_switch_on:} + The\sinceversion{2.6} expl3 version of \cs{acswitchon}. \end{commands} \paragraph{Examples} diff --git a/Master/texmf-dist/tex/latex/acro/acro.sty b/Master/texmf-dist/tex/latex/acro/acro.sty index aee4abc2e89..c2871989966 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,l3sort,xparse,l3keys2e,xtemplate,etoolbox} \ProvidesExplPackage {acro} - {2016/05/30} - {2.5b} + {2016/07/20} + {2.6} {Typeset Acronyms} % -------------------------------------------------------------------------- @@ -341,6 +341,8 @@ \bool_new:N \g__acro_first_acronym_declared_bool \bool_new:N \l__acro_include_endings_format_bool \bool_new:N \l__acro_list_reverse_long_extra_bool +\bool_new:N \l__acro_use_acronyms_bool +\bool_set_true:N \l__acro_use_acronyms_bool \tl_new:N \l__acro_ignore_tl \tl_new:N \l__acro_short_format_tl @@ -1456,18 +1458,18 @@ % #2: included classes \prg_new_protected_conditional:Npnn \acro_if_is_included:nn #1#2 {T,F,TF} { - \bool_set_true:N \l__acro_is_included_bool - \tl_if_blank:nF {#2} + \bool_set_false:N \l__acro_is_included_bool + \tl_if_blank:nTF {#2} + { \bool_set_true:N \l__acro_is_included_bool } { \clist_map_inline:nn {#2} { - \prop_get:NnNTF \l__acro_class_prop {#1} \l__acro_tmpa_tl + \prop_get:NnNT \l__acro_class_prop {#1} \l__acro_tmpa_tl { \seq_set_split:NnV \l__acro_tmpa_seq {,} \l__acro_tmpa_tl - \seq_if_in:NnF \l__acro_tmpa_seq {##1} - { \bool_set_false:N \l__acro_is_included_bool } + \seq_if_in:NnT \l__acro_tmpa_seq {##1} + { \bool_set_true:N \l__acro_is_included_bool } } - { \bool_set_false:N \l__acro_is_included_bool } } } \bool_if:NTF \l__acro_is_included_bool @@ -2290,6 +2292,7 @@ \__acro_read_ending_settings:nww {#1} ##1// \acro_stop: } % pdfstrings: + % TODO: add long forms: \prop_new:c {l__acro_pdfstring_short_#1_prop} \cs_new:cpn {acro_pdf_string_short_#1:n} ##1 { @@ -2421,7 +2424,10 @@ \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} } } + { + % \bool_gset_true:c { g__acro_#1_used_bool } + \seq_gput_right:cn {g__acro_#1_pages_seq} { {#2}{#3}{#4} } + } } \cs_new_protected:Npn \acro@used@twice #1#2#3#4 { @@ -2994,15 +3000,15 @@ { \bool_if:NT \l__acro_sort_bool { - \cs_new_protected:Npn \acro_sort_prop:N #1 + \cs_new_protected:Npn \acro_sort_prop:NN #1#2 { \seq_clear:N \l__acro_tmpa_seq \prop_clear:N \l__acro_tmpa_prop \prop_clear:N \l__acro_tmpb_prop - \prop_map_inline:Nn \l__acro_sort_prop + \prop_map_inline:Nn #2 { - \seq_put_right:Nn \l__acro_tmpa_seq { ##2 } - \prop_put:Nnn \l__acro_tmpa_prop { ##2 } {##1} + \seq_put_right:Nn \l__acro_tmpa_seq {##2} + \prop_put:Nnn \l__acro_tmpa_prop {##1} {##2} } \seq_sort:Nn \l__acro_tmpa_seq { @@ -3018,14 +3024,14 @@ } \seq_map_inline:Nn \l__acro_tmpa_seq { - % get ID: - \prop_get:NnNF \l__acro_tmpa_prop {##1} \l__acro_tmpa_tl {} - % get prop entry of ID in #1: - \prop_get:NVNT #1 \l__acro_tmpa_tl \l__acro_tmpb_tl + \prop_map_inline:Nn \l__acro_tmpa_prop { - \prop_put:NVV \l__acro_tmpb_prop - \l__acro_tmpa_tl - \l__acro_tmpb_tl + \str_if_eq:nnT {##1} {####2} + { + \prop_get:NnN #1 {####1} \l__acro_tmpa_tl + \prop_put:NnV \l__acro_tmpb_prop {####1} + \l__acro_tmpa_tl + } } } \prop_set_eq:NN #1 \l__acro_tmpb_prop @@ -3114,11 +3120,11 @@ \cs_new_protected:Npn \aciftrailing { \acro_if_trailing_tokens:nTF } -\cs_new_protected:Npn \acro_treat_trail: +\cs_new_protected:Npn \__acro_check_trail:N #1 { \tl_map_inline:Nn \l__acro_trailing_tokens_tl { - \token_if_eq_meaning:NNT \l_peek_token ##1 + \token_if_eq_meaning:NNT #1 ##1 { \prop_item:Nn \l__acro_trailing_actions_prop {##1} } } } @@ -3281,7 +3287,7 @@ { \cs_set:Npn \__acro_execute: { - \acro_treat_trail: + \__acro_check_trail:N \l_peek_token #1 \acro_end: % this will end the group opened by \acro_begin: } @@ -3313,11 +3319,24 @@ % #2: ID \cs_new_protected:Npn \acro_check_and_mark_if:nn #1#2 { - \bool_if:nTF {#1} + \bool_if:nTF + { (#1) || !\l__acro_use_acronyms_bool } { \acro_check_acronym:nn {#2} {false} } { \acro_check_acronym:nn {#2} {true} } } +\cs_new_protected:Npn \acro_switch_off: + { \bool_set_false:N \l__acro_use_acronyms_bool } + +\cs_new_protected:Npn \acro_switch_on: + { \bool_set_true:N \l__acro_use_acronyms_bool } + +\NewDocumentCommand \acswitchoff {} + { \acro_switch_off: } + +\NewDocumentCommand \acswitchon {} + { \acro_switch_on: } + % commands for (re)defining \ac-like macros: \cs_new_protected:Npn \acro_define_new_acro_command:NN #1#2 { @@ -3618,6 +3637,16 @@ \cs_new:Npn \acpdfstringalt { \acro_pdf_string_alt:n } +\cs_new:Npn \acpdfstringlong + { \acro_pdf_string_long:n } + +\cs_new:Npn \acpdfstringfirst #1 + { \acpdfstringlong {#1} ~ ( \acpdfstring {#1} ) } + +% TODO: place this somewhere where endings are defined: +\cs_new:Npn \acpdfstringlongplural + { \acro_pdf_string_long_plural:n } + \prg_new_conditional:Npnn \acro_if_star_gobble:n #1 {TF} { \if_meaning:w *#1 @@ -3627,6 +3656,35 @@ \fi: } +\cs_new:Npn \acro_expandable_long:n #1 + { \prop_item:Nn \l__acro_long_prop {#1} } + +\cs_new:Npn \acro_expandable_long_plural:n #1 + { + \bool_if:nTF + { \prop_item:Nn \l__acro_long_plural_form_prop {#1} } + { \prop_item:Nn \l__acro_long_plural_prop {#1} } + { + \prop_item:Nn \l__acro_long_prop {#1} + \prop_item:Nn \l__acro_long_plural_prop {#1} + } + } + +\cs_new:Npn \acro_pdf_string_long:n #1 + { + \acro_if_star_gobble:nTF {#1} + { \acro_expandable_long:n } + { \acro_expandable_long:n {#1} } + } + +% TODO: place this somewhere where endings are defined: +\cs_new:Npn \acro_pdf_string_long_plural:n #1 + { + \acro_if_star_gobble:nTF {#1} + { \acro_expandable_long_plural:n } + { \acro_expandable_long_plural:n {#1} } + } + \cs_new:Npn \acro_pdf_string_short:n #1 { \acro_if_star_gobble:nTF {#1} @@ -3651,16 +3709,16 @@ \cs_set_eq:NN \ac \acpdfstring \cs_set_eq:NN \Ac \acpdfstring \cs_set_eq:NN \acs \acpdfstring - \cs_set_eq:NN \acl \acpdfstring - \cs_set_eq:NN \Acl \acpdfstring - \cs_set_eq:NN \acf \acpdfstring - \cs_set_eq:NN \Acf \acpdfstring + \cs_set_eq:NN \acl \acpdfstringlong + \cs_set_eq:NN \Acl \acpdfstringlong + \cs_set_eq:NN \acf \acpdfstringfirst + \cs_set_eq:NN \Acf \acpdfstringfirst \cs_set_eq:NN \aca \acpdfstringalt \cs_set_eq:NN \acp \acpdfstringplural \cs_set_eq:NN \Acp \acpdfstringplural \cs_set_eq:NN \acsp \acpdfstringplural - \cs_set_eq:NN \aclp \acpdfstringplural - \cs_set_eq:NN \Aclp \acpdfstringplural + \cs_set_eq:NN \aclp \acpdfstringlongplural + \cs_set_eq:NN \Aclp \acpdfstringlongplural \cs_set_eq:NN \acfp \acpdfstringplural \cs_set_eq:NN \Acfp \acpdfstringplural \cs_set_eq:NN \acap \acpdfstringaltplural @@ -4087,7 +4145,7 @@ \keys_set:nn { acro / print-acronyms } {#1} \__acro_aux_file_now:n { \acro@print@list } \bool_if:NT \l__acro_sort_bool - { \acro_sort_prop:N \l__acro_short_prop } + { \acro_sort_prop:NN \l__acro_short_prop \l__acro_sort_prop } \acro_title_instance:VV \l__acro_list_heading_cmd_tl \l__acro_list_name_tl @@ -4413,6 +4471,13 @@ - option `page-ref' replaced by option `page-style' 2016/05/26 v2.5a - bug fix: remove erroneous group in `<ending>-ending' option 2016/05/30 v2.5b - fix issue #72 +2016/07/20 v2.6 - \l__acro_use_acronyms_bool can be used to disable \ac + e.g. in the trial phase of a table like `tabu'; interface: + \acro_switch_off: and \acswitchoff + - fix issue #79 + - fix issue #74 + - fix error: acronyms with same sort entry are not + overwritten any more in the list of acronyms % -------------------------------------------------------------------------- % TODO: |