summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-02-17 23:01:45 +0000
committerKarl Berry <karl@freefriends.org>2019-02-17 23:01:45 +0000
commitcbd4018bd78f522ae48bf07d66256fcc09fd2436 (patch)
tree817ae1f3928a4e3317ad2dee3703dd72e6d926e0 /Master
parent504fe273e928d794b6d3f78a106116142faca8f7 (diff)
acro (17feb19)
git-svn-id: svn://tug.org/texlive/trunk@50045 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/acro/README6
-rw-r--r--Master/texmf-dist/doc/latex/acro/acro_en.pdfbin567199 -> 567835 bytes
-rw-r--r--Master/texmf-dist/doc/latex/acro/acro_en.tex25
-rw-r--r--Master/texmf-dist/tex/latex/acro/acro.sty63
4 files changed, 74 insertions, 20 deletions
diff --git a/Master/texmf-dist/doc/latex/acro/README b/Master/texmf-dist/doc/latex/acro/README
index 944b5599eee..89f9d59cdf2 100644
--- a/Master/texmf-dist/doc/latex/acro/README
+++ b/Master/texmf-dist/doc/latex/acro/README
@@ -1,15 +1,15 @@
--------------------------------------------------------------------------
-the ACRO package v2.8
+the ACRO package v2.9
Typeset Acronyms
-2018/01/30
+2019/02/17
--------------------------------------------------------------------------
Clemens Niederberger
Web: https://bitbucket.org/cgnieder/acro
E-Mail: contact@mychemistry.eu
--------------------------------------------------------------------------
-Copyright 2012--2018 Clemens Niederberger
+Copyright 2012--2019 Clemens Niederberger
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
diff --git a/Master/texmf-dist/doc/latex/acro/acro_en.pdf b/Master/texmf-dist/doc/latex/acro/acro_en.pdf
index 5efc017203b..a0cd8ab700d 100644
--- a/Master/texmf-dist/doc/latex/acro/acro_en.pdf
+++ b/Master/texmf-dist/doc/latex/acro/acro_en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/acro/acro_en.tex b/Master/texmf-dist/doc/latex/acro/acro_en.tex
index 2c03279c280..ad807a43d01 100644
--- a/Master/texmf-dist/doc/latex/acro/acro_en.tex
+++ b/Master/texmf-dist/doc/latex/acro/acro_en.tex
@@ -13,7 +13,7 @@
% Web: http://www.mychemsitry.eu/forums/forum/acro/
% E-Mail: contact@mychemistry.eu
% --------------------------------------------------------------------------
-% Copyright 2011--2018 Clemens Niederberger
+% Copyright 2011--2019 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -318,6 +318,13 @@ documentation.
\keyval{alt-plural-form}{text}
The\sinceversion{2.0} plural alternative form of the acronym; replaces the
alternative form when used instead of appending the plural ending.
+ %% foreign-plural
+ \keyval{foreign-plural}{text}\Default{s}
+ The\sinceversion{2.9} plural ending appended to the foreign form.
+ %% foreign-plural-form
+ \keyval{long-plural-form}{text}
+ Plural\sinceversion{2.9} lforeign form of the acronym; replaces the
+ foreign form when used instead of appending the plural ending.
%% list
\keyval{list}{text}
If specified this will be written in the list as description instead of
@@ -1130,6 +1137,11 @@ There are a few options which change the general behaviour of \acro.
\keyis{group-citation}{true}. Each citation command that takes the cite
key as argument is valid, for example \pkg*{biblatex}'s \cs*{footcite}.
%%
+ \keyval{group-cite-connect}{code}\Default{\code{,\cs*{nobreakspace}}}
+ \sinceversion{2.0}When \keyis{group-citation}{true} this is inserted
+ between the long/short form of the acronym and the citation within the
+ parentheses.
+ %%
\keybool{index}\Default{false}
If set to \code{true} an index entry will be recorded every time an
\emph{unstarred} acronym command is used for the corresponding acronym.
@@ -1731,8 +1743,9 @@ The command's syntax and what it does is as follows:
\begin{itemize}
\item \option*{\meta{name}-ending},
\item \option*{short-\meta{name}-ending},
- \item \option*{alt-\meta{name}-ending} and
- \item \option*{long-\meta{name}-ending}.
+ \item \option*{alt-\meta{name}-ending},
+ \item \option*{long-\meta{name}-ending} and
+ \item \option*{foreign-\meta{name}-ending}.
\end{itemize}
It also defines the acronym properties
\begin{itemize}
@@ -1740,8 +1753,10 @@ The command's syntax and what it does is as follows:
\item \option*{short-\meta{name}-form},
\item \option*{alt-\meta{name}},
\item \option*{alt-\meta{name}-form},
- \item \option*{long-\meta{name}} and
- \item \option*{long-\meta{name}-form}.
+ \item \option*{long-\meta{name}},
+ \item \option*{long-\meta{name}-form},
+ \item \option*{foreign-\meta{name}} and
+ \item \option*{foreign-\meta{name}-form}.
\end{itemize}
Additionally it defines a setup macro as
described in section~\vref{sec:defining-own-acronym},
diff --git a/Master/texmf-dist/tex/latex/acro/acro.sty b/Master/texmf-dist/tex/latex/acro/acro.sty
index acd2c62150b..21f721615e9 100644
--- a/Master/texmf-dist/tex/latex/acro/acro.sty
+++ b/Master/texmf-dist/tex/latex/acro/acro.sty
@@ -8,7 +8,7 @@
% Web: https://bitbucket.org/cgnieder/acro/
% E-Mail: contact@mychemistry.eu
% --------------------------------------------------------------------------
-% Copyright 2011--2018 Clemens Niederberger
+% Copyright 2011--2019 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -31,8 +31,8 @@
\RequirePackage{expl3,xparse,l3keys2e,xtemplate,etoolbox}
\ProvidesExplPackage
{acro}
- {2017/01/30}
- {2.8}
+ {2019/02/17}
+ {2.9}
{Typeset Acronyms}
% --------------------------------------------------------------------------
@@ -144,6 +144,8 @@
| \__acro_write_log_property:nnn {#1} {long-#2-form} {long_#2_form} \\
| \__acro_write_log_property:nnn {#1} {alt-#2} {alt_#2} \\
| \__acro_write_log_property:nnn {#1} {alt-#2-form} {alt_#2_form} \\
+ | \__acro_write_log_property:nnn {#1} {foreign-#2} {foreign_#2} \\
+ | \__acro_write_log_property:nnn {#1} {foreign-#2-form} {foreign_#2_form} \\
}
\msg_new:nnn {acro} {log-acronym-verbose}
@@ -309,6 +311,7 @@
\bool_new:N \l__acro_use_hyperref_bool
\bool_new:N \l__acro_xspace_bool
\bool_new:N \l__acro_custom_format_bool
+\bool_new:N \l__acro_custom_long_format_bool
\bool_new:N \l__acro_strict_bool
\bool_new:N \l__acro_create_macros_bool
\bool_new:N \l__acro_first_upper_bool
@@ -814,7 +817,10 @@
!\l__acro_first_only_short_bool &&
!\l__acro_first_only_long_bool
}
- { \acro_write_foreign:n {#1} }
+ {
+ \acro_write_foreign:n {#1}
+ \acro_endings:nn {#1} {foreign}
+ }
}
\cs_new_protected:Npn \__acro_print_citation:n #1
@@ -2033,6 +2039,7 @@
\__acro_set_ending_for:nnn {#1} {#2} {short}
\__acro_set_ending_for:nnn {#1} {#2} {alt}
\__acro_set_ending_for:nnn {#1} {#2} {long}
+ \__acro_set_ending_for:nnn {#1} {#2} {foreign} % XXX
}
}
@@ -2152,6 +2159,8 @@
\acro_set_ending_variables:nnn {alt} {#1} {#2}
% long variables
\acro_set_ending_variables:nnn {long} {#1} {#3}
+ % foreign variables % XXX
+ \acro_set_ending_variables:nnn {foreign} {#1} {#3}
}
{
% registering:
@@ -2165,6 +2174,8 @@
\acro_define_and_set_ending_variables:nnn {alt} {#1} {#2}
% long variables
\acro_define_and_set_ending_variables:nnn {long} {#1} {#3}
+ % foreign variables % XXX
+ \acro_define_and_set_ending_variables:nnn {foreign} {#1} {#3}
% define setup command:
\tl_set:Nn \l__acro_tmpa_tl {#1}
\tl_replace_all:Nnn \l__acro_tmpa_tl {-} {_}
@@ -2211,10 +2222,21 @@
\prop_put:cnn {l__acro_long_#1_form_prop} {##1} { \c_true_bool }
\prop_put:cnn {l__acro_long_#1_prop} {##1} {##2}
}
+ % foreign-<ending>: % XXX
+ \acro_declare_property:nnn {foreign_#1} {foreign-#1}
+ { \prop_put:cnn {l__acro_foreign_#1_form_prop} {##1} { \c_false_bool } }
+ % foreign-<ending>-form: % XXX
+ \acro_declare_property_generic:nnn {foreign_#1_form} {foreign-#1-form}
+ {
+ \__acro_property_check:nn {##1} {foreign-#1-form}
+ \prop_put:cnn {l__acro_foreign_#1_form_prop} {##1} { \c_true_bool }
+ \prop_put:cnn {l__acro_foreign_#1_prop} {##1} {##2}
+ }
% options:
% short-<ending>-ending
% alt-<ending>-ending
% long-<ending>-ending
+ % foreign-<ending>-ending % XXX
% <ending>-ending
\keys_define:nn {acro}
{
@@ -2229,7 +2251,11 @@
long-#1-ending .code:n =
\bool_if:NT \g__acro_first_acronym_declared_bool
{ \acro_serious_message:n {ending-before-acronyms} }
- \tl_set:cn {l__acro_default_long_#1_tl} {##1},
+ \tl_set:cn {l__acro_default_long_#1_tl} {##1} ,
+ foreign-#1-ending .code:n =
+ \bool_if:NT \g__acro_first_acronym_declared_bool
+ { \acro_serious_message:n {ending-before-acronyms} }
+ \tl_set:cn {l__acro_default_foreign_#1_tl} {##1} ,
#1-ending .code:n =
\bool_if:NT \g__acro_first_acronym_declared_bool
{ \acro_serious_message:n {ending-before-acronyms} }
@@ -2289,8 +2315,14 @@
\acro_set_ending_variables:nnn {short} {#1} {#2}
\acro_set_ending_variables:nnn {alt} {#1} {#2}
\tl_if_blank:nTF {#4}
- { \acro_set_ending_variables:nnn {long} {#1} {#3} }
- { \acro_set_ending_variables:nnn {long} {#1} {#2} }
+ {
+ \acro_set_ending_variables:nnn {long} {#1} {#3}
+ \acro_set_ending_variables:nnn {foreign} {#1} {#3} % XXX
+ }
+ {
+ \acro_set_ending_variables:nnn {long} {#1} {#2}
+ \acro_set_ending_variables:nnn {foreign} {#1} {#2}
+ }
}
\NewDocumentCommand \ProvideAcroEnding {mmm}
@@ -2553,9 +2585,10 @@
\cs_new_protected:Npn \acro_get_foreign:n #1
{
- \prop_get:NnNT \l__acro_foreign_prop {#1} \l__acro_foreign_tl
+ \prop_if_in:NnT \l__acro_foreign_prop {#1}
{
\tl_use:N \l__acro_foreign_sep_tl
+ \prop_get:NnN \l__acro_foreign_prop {#1} \l__acro_foreign_tl
\group_begin:
\tl_use:N \l__acro_foreign_list_format_tl
{
@@ -2962,7 +2995,7 @@
\acro_strcmp:nn
{ \str_fold_case:n {##1} }
{ \str_fold_case:n {##2} }
- = \c_minus_one
+ = - \c_one
}
{ \sort_return_same: }
{ \sort_return_swapped: }
@@ -3627,15 +3660,17 @@
% long:
\acro_declare_property:nnn {long} {long}
{
- \acro_for_endings_do:n
- { \prop_put:cnn {l__acro_long_##1_form_prop} {#1} { \c_false_bool } }
\prop_put:NnV \l__acro_long_indefinite_prop
{#1}
\l__acro_default_indefinite_tl
\acro_for_endings_do:n
{
+ \prop_put:cnn {l__acro_long_##1_form_prop} {#1} { \c_false_bool }
\bool_if:cF {l__acro_#1_long-##1_set_bool}
{ \prop_put:cnv {l__acro_long_##1_prop} {#1} {l__acro_default_long_##1_tl} }
+ \prop_put:cnn {l__acro_foreign_##1_form_prop} {#1} { \c_false_bool }
+ \bool_if:cF {l__acro_#1_foreign-##1_set_bool}
+ { \prop_put:cnv {l__acro_foreign_##1_prop} {#1} {l__acro_default_foreign_##1_tl} }
}
}
@@ -3690,7 +3725,7 @@
% foreign:
\acro_declare_simple_property:n {foreign}
-% foreign:
+% foreign-lang:
\acro_declare_simple_property:n {foreign-lang}
% format:
@@ -4651,6 +4686,10 @@
- new property `post'
- \aciffirst
- resolve issue #95
+2019/02/17 v2.9 - small redefinition of \acro_get_foreign:n which allows
+ `foreign-sep' to be a &
+ - fix issue #116
+ - implemented issue #112
% --------------------------------------------------------------------------
% TODO: