summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/acro/README2
-rw-r--r--Master/texmf-dist/doc/latex/acro/acro-manual.pdfbin882709 -> 884055 bytes
-rw-r--r--Master/texmf-dist/doc/latex/acro/acro-manual.tex34
-rw-r--r--Master/texmf-dist/tex/latex/acro/acro.sty122
4 files changed, 119 insertions, 39 deletions
diff --git a/Master/texmf-dist/doc/latex/acro/README b/Master/texmf-dist/doc/latex/acro/README
index 3e20b3aa537..8f09cc322b6 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.3 2020/11/21
+the ACRO package v3.4 2020/12/25
Typeset Acronyms
diff --git a/Master/texmf-dist/doc/latex/acro/acro-manual.pdf b/Master/texmf-dist/doc/latex/acro/acro-manual.pdf
index 1e926092698..24026d28a35 100644
--- a/Master/texmf-dist/doc/latex/acro/acro-manual.pdf
+++ b/Master/texmf-dist/doc/latex/acro/acro-manual.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/acro/acro-manual.tex b/Master/texmf-dist/doc/latex/acro/acro-manual.tex
index 357d3b2d94d..4f2a5d2442a 100644
--- a/Master/texmf-dist/doc/latex/acro/acro-manual.tex
+++ b/Master/texmf-dist/doc/latex/acro/acro-manual.tex
@@ -328,11 +328,11 @@ section~\ref{sec:load-time-options} have to be set up either with this command
All of the above is probably clear from an example (using real options):
\begin{sourcecode}
\acsetup{
- make-links = true , % boolean
- index , % boolean
- format = \emph , % standard
- list / local , % boolean option of the list module
- list/display = all % choice option of the list module
+ make-links = true , % boolean
+ index , % boolean
+ format = \emph , % standard
+ list / local , % boolean option of the list module
+ list / display = all % choice option of the list module
}
\end{sourcecode}
@@ -511,6 +511,10 @@ the same. In that case you can use
\propchoice{first-style}{long-short,short-long,short,long,footnote}\Default
The style of the first appearance of the acronym, see also
section~\vref{sec:first-or-full}.
+ %% first-style
+ \propchoice{subsequent-style}{long-short,short-long,short,long,footnote}\Default
+ \sinceversion{3.4}The style of the appearance of the acronym after the
+ first time.
%% single-style
\propchoice{single-style}{long-short,short-long,short,long,footnote}\Default
The style of a single appearance of the acronym, see also
@@ -701,6 +705,12 @@ The first or full appearance of an acronym is determined by this option:
appearance for all acronyms. Available options in reality are the names
of all defined templates of the type \code{acronym}. All pre-defined
templates can be found in section~\vref{sec:pre-defin-templ}.
+ \keychoice{subsequent-style}{long-short,short-long,short,long,footnote}\Default{short}
+ \sinceversion{3.4}The style of the appearance of the acronym after the
+ first time. This options sets the appearance for all acronyms. Available
+ options in reality are the names of all defined templates of the type
+ \code{acronym}. All pre-defined templates can be found in
+ section~\vref{sec:pre-defin-templ}.
\end{options}
It might be desirable to set the first appearance of an acronym
individually. This is possible by setting the corresponding property:
@@ -816,8 +826,11 @@ The options controlling the list are these:
Set a list of tags to exclude from the list. Only acronyms not
belonging to one of these tags will be included.
\keyval{include}{csv list of tags}\Module{list}\Default
- Set a list of tags to include in the list. Only acronyms belonging to
+ Set a list of tags to include in the list. Only acronyms belonging to
one of these tags will be included.
+ \keybool{add}\Module{list}\Default
+ \sinceversion{3.4}Set a list of tags to include in the list. These
+ acronyms will be included in any case.
\keychoice{heading}{none,section,section*,chapter,chapter*}\Module{list}
Choose the heading template for the list of acronyms.
@@ -1472,7 +1485,7 @@ This works because the template \code{long-short}\footnote{The template that
is used by default for the first appearance.} uses \cs{acspace} at the
appropriate place and the manual setup does
\begin{sourcecode}
- \acsetup{activate-trailing-tokens = dash}
+ \acsetup{trailing/activate = dash}
\end{sourcecode}
\cs{acspace} looks ahead for a trailing dash and adds a space it it doesn't
find it.
@@ -1922,7 +1935,7 @@ examples for their usage.
\subsection{Commands to be used in template definitions}
\acro\ provides and uses a large number of commands that are meant to be used
-in temmplate definitions and that often are useless or will raise errors if
+in template definitions and that often are useless or will raise errors if
used outside. Depending on their purpose the commands can be used in
different types of templates or only in certain types of templates.
@@ -2011,6 +2024,9 @@ and \cs*{acroifF} each have an argument less than \cs*{acroifTF}.
\command{acronopagerange}
This disables page ranges. Used in the \template{toc} and \template{lof}
templates.
+ \command{acroneedpages}
+ \sinceversion{3.4}This enables the page number displayed. Used in the
+ \template{toc} and \template{lof} templates.
\command{acropagefill}
If \cs{acroifpages\TF} would be \meta{false} this would do
nothing. Otherwise it prints whatever is set by
@@ -2100,7 +2116,7 @@ First the \template{description} template:
}
\end{sourcecode}
-The following shows how to define templates using tome kind of table
+The following shows how to define templates using some kind of table
environment. Special care is necessary due to the way \LaTeX\ tables work:
first the table body is built and only then the table itself is printed:
\begin{sourcecode}
diff --git a/Master/texmf-dist/tex/latex/acro/acro.sty b/Master/texmf-dist/tex/latex/acro/acro.sty
index d3ab51cf9b5..8efd343d1dd 100644
--- a/Master/texmf-dist/tex/latex/acro/acro.sty
+++ b/Master/texmf-dist/tex/latex/acro/acro.sty
@@ -22,14 +22,14 @@
%
% The Current Maintainer of this work is Clemens Niederberger.
% --------------------------------------------------------------------------
-\RequirePackage{expl3,xparse,l3keys2e}
+\RequirePackage{l3keys2e}
\ExplSyntaxOn
% setup package:
\tl_const:Nn \c_acro_package_name_tl {acro}
-\tl_const:Nn \c_acro_date_tl {2020/11/21}
+\tl_const:Nn \c_acro_date_tl {2020/12/25}
\tl_const:Nn \c_acro_version_major_number_tl {3}
-\tl_const:Nn \c_acro_version_minor_number_tl {3}
+\tl_const:Nn \c_acro_version_minor_number_tl {4}
\tl_const:Nn \c_acro_version_subrelease_tl {}
\tl_const:Nx \c_acro_version_number_tl
{
@@ -54,8 +54,8 @@
\tl_new:N \g_acro_end_document_hook_tl
\tl_new:N \g_acro_begin_document_hook_tl
-\AtBeginDocument { \tl_use:N \g_acro_begin_document_hook_tl }
-\AtEndDocument { \tl_use:N \g_acro_end_document_hook_tl }
+\hook_gput_code:nnn {begindocument} {acro} { \tl_use:N \g_acro_begin_document_hook_tl }
+\hook_gput_code:nnn {enddocument} {acro} { \tl_use:N \g_acro_end_document_hook_tl }
\cs_new_protected:Npn \acro_at_begin_document:n #1
{ \tl_gput_right:Nn \g_acro_begin_document_hook_tl {#1} }
@@ -923,6 +923,9 @@
\NewDocumentCommand \acronopagerange {}
{ \acro_no_page_ranges:e { \AcroTemplateName } }
+\NewDocumentCommand \acroneedpages {}
+ { \acro_need_pages: }
+
\NewDocumentCommand \acropagefill {}
{ \acro_if_pages:eT { \AcronymID } { \tl_use:N \l__acro_pages_fill_tl } }
@@ -1725,6 +1728,7 @@
\DeclareAcroProperty {post}
\DeclareAcroProperty {long-post}
\DeclareAcroProperty {first-style}
+\DeclareAcroProperty {subsequent-style}
\DeclareAcroProperty {single-style}
% formatting:
@@ -1775,8 +1779,10 @@
\keys_define:nn {acro}
{
- first-style .tl_set:N = \l__acro_first_style_tl ,
- first-style .initial:n = long-short
+ first-style .tl_set:N = \l__acro_first_style_tl ,
+ first-style .initial:n = long-short ,
+ subsequent-style .tl_set:N = \l__acro_subsequent_tl ,
+ subsequent-style .initial:n = short
}
\cs_new_protected:Npn \acro_declare_acronym:nn #1#2
@@ -1852,6 +1858,7 @@
{
\acro_property_set:nnn {#1} {used} {true}
\acro_step:n {#1}
+ \acro_record_barrier:n {#1}
}
}
@@ -2146,6 +2153,15 @@
}
}
+\cs_new_protected:Npn \acro_disable_endings:
+ {
+ \tl_map_tokens:Nn \l__acro_endings_tl
+ { \__acro_disable_ending:n }
+ }
+
+\cs_new_protected:Npn \__acro_disable_ending:n #1
+ { \bool_set_false:c {l__acro_ending_#1_bool} }
+
% #1: id
% #2: short|long
\cs_new_protected:Npn \__acro_set_endings:nn #1#2
@@ -2229,7 +2245,13 @@
{
\int_compare:nNnTF
{
- \bool_if:NTF \l__acro_usage_local_bool
+ \bool_lazy_or:nnTF
+ { \l__acro_usage_local_bool }
+ {
+ \bool_lazy_and_p:nn
+ { \l__acro_list_bool }
+ { \l__acro_list_local_bool }
+ }
{ \acro_barrier_usage:n {#1} }
{ \acro_property_get:nn {#1} {usage} }
}
@@ -2578,9 +2600,24 @@
}
}
+\int_new:N \l__acro_nest_int
+\bool_new:N \g__acro_nested_bool
+
+\prg_new_conditional:Npnn \acro_if_nested: {p,T,F,TF}
+ {
+ \bool_lazy_and:nnTF
+ { \int_compare_p:n { \l__acro_nest_int = 1 } }
+ { \g__acro_nested_bool }
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+
\cs_new_protected:Npn \acro_begin:
{
\group_begin:
+ \int_compare:nNnT \l__acro_nest_int > 0
+ { \bool_gset_true:N \g__acro_nested_bool }
+ \int_incr:N \l__acro_nest_int
\__acro_check_after_end:w
}
@@ -2599,6 +2636,7 @@
\cs_new_protected:Npn \acro_end:
{
+ \acro_if_nested:T { \bool_gset_false:N \g__acro_nested_bool }
\bool_if:NT \g__acro_gobble_trail_bool
{
\bool_gset_false:N \g__acro_gobble_trail_bool
@@ -2990,7 +3028,9 @@
\acro_locale:nnn {#1} {#2}
{
\__acro_write:nn {#1} {#2}
- \bool_if:NT \l__acro_include_endings_bool
+ \bool_lazy_and:nnT
+ { !\acro_if_nested_p: }
+ { \l__acro_include_endings_bool }
{
\acro_if_ending_form:nnF {#1} {#2}
{ \__acro_ending:nn {#1} {#2} }
@@ -2998,9 +3038,11 @@
}
}
\group_end:
- \acro_if_ending_form:nnF {#1} {#2}
+ \bool_lazy_or:nnF
+ { \acro_if_nested_p: }
+ { \l__acro_include_endings_bool }
{
- \bool_if:NF \l__acro_include_endings_bool
+ \acro_if_ending_form:nnF {#1} {#2}
{ \__acro_ending:nn {#1} {#2} }
}
\acro_property_if_eq:nnT {#2} {long}
@@ -3050,7 +3092,7 @@
{
\acro_use:n {#2}
\acro_record_page:n {#2}
- \acro_record_barrier:n {#2}
+ % \acro_record_barrier:n {#2}
\acro_index:n {#2}
}
}
@@ -3268,7 +3310,7 @@
\cs_new_protected:Npn \__acro_template_stop:nn #1#2
{ \group_end: \__acro_clear_template_setup:nn {#1} {#2} }
-% typesetting the first appearance of acronym: pseude template `first'
+% typesetting the first appearance of acronym: pseudo template `first'
% #1: parameter number
% #2: template type
@@ -3314,7 +3356,14 @@
}
{ \tl_set_eq:NN \l__acro_tmpa_tl \l__acro_first_style_tl }
}
- { \tl_set:Nn \l__acro_tmpa_tl {short} }
+ {
+ \acro_property_if_set:VnTF \l_acro_id_tl {subsequent-style}
+ {
+ \tl_set:Ne \l__acro_tmpa_tl
+ { \acro_property_get:Vn \l_acro_id_tl {subsequent-style} }
+ }
+ { \tl_set_eq:NN \l__acro_tmpa_tl \l__acro_subsequent_tl }
+ }
}
}
{single} {
@@ -3457,6 +3506,7 @@
\clist_new:N \l__acro_tag_include_clist
\clist_new:N \l__acro_tag_exclude_clist
+\clist_new:N \l__acro_tag_add_clist
\cs_new_protected:Npn \acro_list_choose_set:
{
@@ -3466,7 +3516,19 @@
\seq_gclear:N \g__acro_list_seq
\seq_map_inline:Nn \g__acro_acronyms_seq
{
- \acro_if_single:nF {##1}
+ \acro_if_single:nTF {##1}
+ {
+ \clist_set:Ne \l__acro_tmpa_clist
+ { \acro_property_get:nn {##1} {tag} }
+ \clist_map_inline:Nn \l__acro_tmpa_clist
+ {
+ \clist_if_in:NnT \l__acro_tag_add_clist {####1}
+ {% acronym is included
+ \seq_gput_right:Nn \g__acro_list_seq {##1}
+ \clist_map_break:
+ }
+ }
+ }
{ \seq_gput_right:Nn \g__acro_list_seq {##1} }
}
}
@@ -3488,7 +3550,7 @@
{ \l__acro_list_local_bool }
{
\int_compare_p:nNn
- { \intarray_count:c {g__acro_##1_barriers_intarray} } > 0
+ { \intarray_count:c {g__acro_##1_barriers_intarray} } > 0
}
{
\bool_set_false:N \l__acro_tmpb_bool
@@ -3596,6 +3658,7 @@
display .initial:n = used ,
include .clist_set:N = \l__acro_tag_include_clist ,
exclude .clist_set:N = \l__acro_tag_exclude_clist ,
+ add .clist_set:N = \l__acro_tag_add_clist ,
local .bool_set:N = \l__acro_list_local_bool ,
heading .tl_set:N = \l__acro_heading_tl ,
preamble .tl_set:N = \l__acro_preamble_tl ,
@@ -3626,8 +3689,10 @@
% record page numbers:
\RequirePackage {zref-abspage}
-\msg_new:nnn {acro} {label}
- { The~ list~ template~ `#1'~ needs~ the~ option~ `labels'~ activated. }
+\msg_new:nnn {acro} {no-page-range}
+ {
+ The~ list~ template~ `#1'~ cannot~ display~ a~ page~ range.
+ }
\msg_new:nnn {acro} {threshold}
{ The~ sequentes~ threshold~ needs~ to~ be~ at~ least~ 3. }
@@ -3863,23 +3928,18 @@
}
\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 }
-% }
-
% #1: style name
\cs_new_protected:Npn \acro_no_page_ranges:n #1
{
- \bool_if:NF \l__acro_label_bool
- { \msg_warning:nnn {acro} {label} {#1} }
+ \bool_if:NT \l__acro_pages_all_bool
+ { \msg_warning:nnn {acro} {no-page-range} {#1} }
\bool_set_false:N \l__acro_pages_all_bool
}
\cs_generate_variant:Nn \acro_no_page_ranges:n {e}
+\cs_new_protected:Npn \acro_need_pages:
+ { \bool_set_true:N \l__acro_pages_display_bool }
+
\tl_new:N \l__acro_pages_fill_tl
\tl_new:N \l__acro_pages_sep_tl
\tl_new:N \l__acro_pages_seq_pre_tl
@@ -5179,13 +5239,15 @@
\AcronymTable
\end {supertabular}
}
+
+\let\l@acro\l@figure
\NewAcroTemplate [list] {lof}
{
\acroheading
\acropreamble
\acronopagerange
- \let\l@acro\l@figure
+ \acroneedpages
\acronymsmapF
{
\contentsline {acro}
@@ -5212,6 +5274,7 @@
\acroheading
\acropreamble
\acronopagerange
+ \acroneedpages
\acronymsmapF
{
\contentsline { \acroifchapterTF {chapter} {section} }
@@ -5596,6 +5659,7 @@
first-long-format .code:n =
\acro_deprecate_option:nn {format/first-long} {#1} ,
list-short-format .code:n = \acro_remove_option: ,
+ list-short-width .code:n = \acro_remove_option: ,
list-long-format .code:n =
\acro_deprecate_option:nn {format/list} {#1} ,
list-foreign-format .code:n = \acro_remove_option: ,