diff options
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/acro/README | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/acro/acro-manual.pdf | bin | 865976 -> 882709 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/acro/acro-manual.tex | 50 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/acro/acro.sty | 99 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/acro/acro2.sty | 6 |
5 files changed, 95 insertions, 62 deletions
diff --git a/Master/texmf-dist/doc/latex/acro/README b/Master/texmf-dist/doc/latex/acro/README index abe9d6dbcee..3e20b3aa537 100644 --- a/Master/texmf-dist/doc/latex/acro/README +++ b/Master/texmf-dist/doc/latex/acro/README @@ -1,5 +1,5 @@ -------------------------------------------------------------------------- -the ACRO package v3.2a 2020/11/08 +the ACRO package v3.3 2020/11/21 Typeset Acronyms diff --git a/Master/texmf-dist/doc/latex/acro/acro-manual.pdf b/Master/texmf-dist/doc/latex/acro/acro-manual.pdf Binary files differindex 63d5b8d77ee..1e926092698 100644 --- a/Master/texmf-dist/doc/latex/acro/acro-manual.pdf +++ b/Master/texmf-dist/doc/latex/acro/acro-manual.pdf diff --git a/Master/texmf-dist/doc/latex/acro/acro-manual.tex b/Master/texmf-dist/doc/latex/acro/acro-manual.tex index 49ea2727da0..357d3b2d94d 100644 --- a/Master/texmf-dist/doc/latex/acro/acro-manual.tex +++ b/Master/texmf-dist/doc/latex/acro/acro-manual.tex @@ -18,7 +18,7 @@ % and version 1.3c or later is part of all distributions of LaTeX % version 2008/05/04 or later. % -% This work has nce status `maintained'. +% This work has the LPPL maintenance status `maintained'. % % The Current Maintainer of this work is Clemens Niederberger. % -------------------------------------------------------------------------- @@ -499,9 +499,9 @@ the same. In that case you can use \propval{foreign-format}{code}\Default The format used for the foreign form of the acronym. %% single-format - \propval{single-format}{code}\Default={long-format} - The format used for the acronym if the acronym is only used a single - time. + % \propval{single-format}{code}\Default={long-format} + % The format used for the acronym if the acronym is only used a single + % time. %% list-format \propval{list-format}{code}\Default={long-format} The format used for the long form of the acronym in the list if the list @@ -762,13 +762,15 @@ The single appearance of an acronym is determined by this option: If you like you can also set the single appearance of an acronym individually: \begin{properties} - \propval{single}{text}\Default={long} - If provided \meta{text} will be used instead of the long form if the - acronym is only used a single time \emph{and} the option - \option{single} has been set. - \propval{single-format}{code}\Default={long-format} - The format used for the acronym if the acronym is only used a single - time. + \propval{single}{text}\Default + If provided \meta{text} will be used instead of whatever template + (\enquote{style}) has been set for the single appearance if the acronym is + only used a single time \emph{and} the option \option{single} has been + set\footnote{Actually the template \template{single} is used which + typesets the \property{single} property.}. + % \propval{single-format}{code}\Default={long-format} + % The format used for the acronym if the acronym is only used a single + % time. \propchoice{single-style}{long-short,short-long,short,long,footnote}\Default The style of the single appearance of the acronym. \end{properties} @@ -874,6 +876,11 @@ the list of acronym you can use these options: \keybool{name}\Module{pages}\Default{false} If set to true the page numbers are preceded with p.\ or pp. \end{options} +Additionally\sinceversion{3.3} to setting these options with \cs{acsetup} they +can be set as options to \cs{printacronyms}: +\begin{sourcecode} + \printacronyms[pages={display=all,seq/use=false}] +\end{sourcecode} \subsection{Filter lists using tags}\label{sec:lists-tags} With the property \property{tag} you can assign one or more tags to an @@ -1018,11 +1025,12 @@ also give each acronym its own formatting individually: The style of a single appearance of the acronym, see also section~\vref{sec:single-appe-an}. \end{properties} -Per default the individual formatting instructions are \emph{additive} to the -global ones. This can be changed through the option +Per\changedversion{3.3} default the individual formatting instructions +\emph{replace} the global ones. This can be changed through the option \begin{options} - \keybool{replace}\Module{format}\Default{false} - With this option active local options will \emph{replace} the global ones. + \keybool{replace}\Module{format}\Default{true} + With this option active local options will \emph{replace} the global + ones. \end{options} Let's see an example: @@ -1036,7 +1044,7 @@ Let's see an example: \begin{example} \acsetup{format = \itshape} \acf{pdf} \par - \acsetup{format/replace=true} + \acsetup{format/replace=false} \acf{pdf} \end{example} @@ -1381,6 +1389,8 @@ This manual is an example for the indexing feature. Each acronym from section~\vref{sec:acronyms} that has been used in this manual is also listed in the index. +%% TODO: document the label property + \section{Barriers}\label{sec:barriers} The main purpose of the concept of barriers is to be able to have \emph{local} lists of acronyms. This concept does a little bit more than that, though, @@ -1815,15 +1825,15 @@ to defines own such objects: \tmpl{long-short} A template for the first appearance where the long form is printed and the short form follows in parentheses. - \tmpl{first} - This is a \emph{pseudo} template which always displays what is - set through the \option{single-style} or the property - \property{single-style}. \tmpl{short} Display the short form of an acronym. \tmpl{short-long} A template for the first appearance where the short form is printed and the long form follows in parentheses. + \tmpl{single} + A template which is used when the property \property{single} has been set + \emph{and} the option \option{single} has been set \emph{and} if the + acronym is only used a single time. \tmpl{show} A template which writes all properties of an acronym into the log file. \end{templates} diff --git a/Master/texmf-dist/tex/latex/acro/acro.sty b/Master/texmf-dist/tex/latex/acro/acro.sty index 1e1bfb4baaf..d3ab51cf9b5 100644 --- a/Master/texmf-dist/tex/latex/acro/acro.sty +++ b/Master/texmf-dist/tex/latex/acro/acro.sty @@ -27,10 +27,10 @@ % setup package: \tl_const:Nn \c_acro_package_name_tl {acro} -\tl_const:Nn \c_acro_date_tl {2020/11/08} +\tl_const:Nn \c_acro_date_tl {2020/11/21} \tl_const:Nn \c_acro_version_major_number_tl {3} -\tl_const:Nn \c_acro_version_minor_number_tl {2} -\tl_const:Nn \c_acro_version_subrelease_tl {a} +\tl_const:Nn \c_acro_version_minor_number_tl {3} +\tl_const:Nn \c_acro_version_subrelease_tl {} \tl_const:Nx \c_acro_version_number_tl { \c_acro_version_major_number_tl . @@ -656,7 +656,7 @@ \clist_map_inline:nn {#1} { \acro_package_if_loaded:nF {##1} - { \msg_error:nnen {acro} {package-needed} { \TemplateName } {##1} } + { \msg_error:nnen {acro} {package-needed} { \AcroTemplateName } {##1} } } } @@ -921,7 +921,7 @@ { \acro_print_pages:enn { \AcronymID } {#1} {#2} } \NewDocumentCommand \acronopagerange {} - { \acro_no_page_ranges:e { \TemplateName } } + { \acro_no_page_ranges:e { \AcroTemplateName } } \NewDocumentCommand \acropagefill {} { \acro_if_pages:eT { \AcronymID } { \tl_use:N \l__acro_pages_fill_tl } } @@ -1718,7 +1718,7 @@ \DeclareAcroProperty {foreign-locale} % additional properties: -\DeclareAcroPropertyAlias {single} {long} +\DeclareAcroProperty {single} \DeclareAcroPropertyAlias {list} {long} \DeclareAcroPropertyAlias {first-long} {long} \DeclareAcroProperty {extra} @@ -1734,7 +1734,7 @@ \DeclareAcroPropertyAlias {long-format} {format} \DeclareAcroPropertyAlias {first-long-format} {long-format} \DeclareAcroProperty {foreign-format} -\DeclareAcroProperty {single-format} +% \DeclareAcroProperty {single-format} \DeclareAcroProperty {list-format} \DeclareAcroProperty {extra-format} @@ -1745,7 +1745,6 @@ \acro_list_add:nn {short} {#1-acc} } -\DeclareAcroPropertyAlias {single-acc} {long-acc} \acro_list_map:nn {long} { \DeclareAcroPropertyAlias {#1-acc} {#1} @@ -2008,10 +2007,7 @@ \cs_new_protected:Npn \acro_new_format:n #1 { \tl_new:c {l__acro_format_#1_tl} - \keys_define:nn {acro/format} - { - #1 .tl_set:c = l__acro_format_#1_tl - } + \keys_define:nn {acro/format} { #1 .tl_set:c = l__acro_format_#1_tl } } \acro_new_format:n {short} @@ -2026,7 +2022,7 @@ { format .meta:n = { format/short = #1 , format/long = #1 } , format / replace .bool_set:N = \l__acro_format_replace_bool , - format / replace .initial:n = false + format / replace .initial:n = true } % ---------------------------------------------------------------------------- @@ -2413,8 +2409,9 @@ \str_case:nnTF {#1} { {true} {} {false} {} } { \use:c {bool_set_#1:N} \l__acro_cite_group_bool } - { \msg_error:nnn {kernel} {boolean-values-only} {group} } , + { \msg_error:nnn {acro} {boolean-values-only} {cite/group} } , group .initial:n = false , + group .default:n = true , display .choice: , display/all .code:n = \bool_set_true:N \l__acro_cite_bool @@ -2432,6 +2429,12 @@ group / cmd .initial:n = \cite } +\msg_new:nnn {acro} {boolean-values-only} + { + The~ option~ `#1'~ can~ only~ receive~ boolean~ values,~ i.e.~ either~ + `true'~ or~ `false'. + } + % -------------------------------------------------------------------------- % indexing \bool_new:N \l__acro_index_bool @@ -3273,6 +3276,7 @@ \cs_new_protected:Npn \acro_template_use:nnn #1#2#3 { \bool_set_false:N \l__acro_tmpa_bool + \bool_set_false:N \l__acro_tmpb_bool \bool_lazy_and:nnT { \l__acro_use_only_first_bool } { \l__acro_use_bool } @@ -3289,12 +3293,16 @@ { !\l__acro_first_bool } { \acro_if_single_p:V \l_acro_id_tl } { - \acro_property_if_set:VnTF \l_acro_id_tl {single-style} + \acro_property_if_set:VnTF \l_acro_id_tl {single} + { \bool_set_true:N \l__acro_tmpb_bool } { - \tl_set:Ne \l__acro_tmpa_tl - { \acro_property_get:Vn \l_acro_id_tl {single-style} } + \acro_property_if_set:VnTF \l_acro_id_tl {single-style} + { + \tl_set:Ne \l__acro_tmpa_tl + { \acro_property_get:Vn \l_acro_id_tl {single-style} } + } + { \tl_set_eq:NN \l__acro_tmpa_tl \l__acro_single_tl } } - { \tl_set_eq:NN \l__acro_tmpa_tl \l__acro_single_tl } } { \acro_if_first:VTF \l_acro_id_tl @@ -3310,12 +3318,16 @@ } } {single} { - \acro_property_if_set:VnTF \l_acro_id_tl {single-style} + \acro_property_if_set:VnTF \l_acro_id_tl {single} + { \bool_set_true:N \l__acro_tmpb_bool } { - \tl_set:Ne \l__acro_tmpa_tl - { \acro_property_get:Vn \l_acro_id_tl {single-style} } + \acro_property_if_set:VnTF \l_acro_id_tl {single-style} + { + \tl_set:Ne \l__acro_tmpa_tl + { \acro_property_get:Vn \l_acro_id_tl {single-style} } + } + { \tl_set_eq:NN \l__acro_tmpa_tl \l__acro_single_tl } } - { \tl_set_eq:NN \l__acro_tmpa_tl \l__acro_single_tl } } } { \tl_set:Nn \l__acro_tmpa_tl {#3} } @@ -3328,7 +3340,9 @@ } { \tl_set_eq:NN \l__acro_tmpa_tl \l__acro_first_style_tl } } - \__acro_template_use:nnV {#1} {#2} \l__acro_tmpa_tl + \bool_if:NTF \l__acro_tmpb_bool + { \__acro_template_use:nnn {#1} {#2} {single} } + { \__acro_template_use:nnV {#1} {#2} \l__acro_tmpa_tl } } \cs_generate_variant:Nn \acro_template_use:nnn {nnV} @@ -3589,7 +3603,8 @@ postamble .tl_set:N = \l__acro_postamble_tl , postamble .initial:n = , name .tl_set:N = \l__acro_list_name_tl , - name .initial:n = \acro_translate:n {list-name} + name .initial:n = \acro_translate:n {list-name} , + pages .meta:nn = {acro/pages} {#1} } \acro_if_komascript:TF @@ -3670,13 +3685,22 @@ } { \bool_if:NT \l__acro_pages_name_display_bool {#2} - \pageref { \l_acro_label_prefix_tl #1 } + \acro_print_first_page:n {#1} } } } \cs_generate_variant:Nn \acro_print_pages:nnn {e} % #1: id +\cs_set_protected:Npn \acro_print_first_page:n #1 + { + \seq_set_split:Nnx \l__acro_tmpa_seq {|} + { \acro_property_get:nn {#1} {pages} } + \exp_last_unbraced:Ne + \__acro_page_name:w { \seq_item:Nn \l__acro_tmpa_seq {1} } \q_stop + } + +% #1: id % #2: one page % #3: more than one page \cs_set_protected:Npn \acro_print_page_ranges:nnn #1#2#3 @@ -3769,6 +3793,7 @@ } } } + \int_compare:nNnTF { \seq_count:N \l__acro_tmpb_seq } = 1 {#2} {#3} \seq_use:Nn \l__acro_tmpb_seq { \l__acro_pages_sep_tl } } @@ -3838,13 +3863,13 @@ } \prg_generate_conditional_variant:Nnn \acro_if_pages:n {e} {p,T,F,TF} -\acro_at_begin_document:n - { - \bool_lazy_and:nnT - { \l__acro_pages_display_bool } - { !\l__acro_pages_all_bool } - { \bool_set_true:N \l__acro_label_bool } - } +% \acro_at_begin_document:n +% { +% \bool_lazy_and:nnT +% { \l__acro_pages_display_bool } +% { !\l__acro_pages_all_bool } +% { \bool_set_true:N \l__acro_label_bool } +% } % #1: style name \cs_new_protected:Npn \acro_no_page_ranges:n #1 @@ -4945,11 +4970,10 @@ } \NewAcroTemplate {long} - { - \acroifTF {single} - { \acrowrite {single} } - { \acrowrite {long} } - } + { \acrowrite {long} } + +\NewAcroTemplate {single} + { \acrowrite {single} } \NewAcroTemplate {short} { \acrowrite {short} } @@ -5491,6 +5515,7 @@ \acro_removed_property:n {long-pre} \acro_removed_property:n {after-citation} \acro_removed_property:n {index-cmd} +\acro_removed_property:n {single-format} % ---------------------------------------------------------------------------- % old functions diff --git a/Master/texmf-dist/tex/latex/acro/acro2.sty b/Master/texmf-dist/tex/latex/acro/acro2.sty index bed07791229..d5c7d0b59f8 100644 --- a/Master/texmf-dist/tex/latex/acro/acro2.sty +++ b/Master/texmf-dist/tex/latex/acro/acro2.sty @@ -11,12 +11,12 @@ % Copyright 2011--2020 Clemens Niederberger % % This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 +% conditions of the LaTeX Project Public License, either version 1.3c % of this license or (at your option) any later version. % The latest version of this license is in % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. +% version 2008/05/04 or later. % % This work has the LPPL maintenance status `maintained'. % @@ -2481,8 +2481,6 @@ \cs_new_protected:Npn \acro@pages #1#2 { \tl_gset:cn {g__acro_#1_recorded_pages_tl} {#2} } - -\bool_new:N \g__acro_rerun_bool \cs_new_protected:Npn \acro@rerun@check { |