summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/acro
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-01-30 21:04:11 +0000
committerKarl Berry <karl@freefriends.org>2018-01-30 21:04:11 +0000
commit27a29325fbe6a50247f1eb60f8a9d46509c11531 (patch)
treee9bbbda3c0966fbd4a4f3490fd90215a14a59151 /Master/texmf-dist/tex/latex/acro
parentd2c05b2de7a771e9d41c10ca2bd7b8db46f0e9ff (diff)
acro (30jan18)
git-svn-id: svn://tug.org/texlive/trunk@46492 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/acro')
-rw-r--r--Master/texmf-dist/tex/latex/acro/acro.sty54
1 files changed, 43 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/latex/acro/acro.sty b/Master/texmf-dist/tex/latex/acro/acro.sty
index 8b2aac064d3..acd2c62150b 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-2017 Clemens Niederberger
+% Copyright 2011--2018 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/08/28}
- {2.7c}
+ {2017/01/30}
+ {2.8}
{Typeset Acronyms}
% --------------------------------------------------------------------------
@@ -180,7 +180,8 @@
| \__acro_write_log_property:nnn {#1} {index-sort} {index_sort} \\
| \\
| \__acro_write_log_property:nnn {#1} {long-pre} {long_pre} \\
- | \__acro_write_log_property:nnn {#1} {long-post} {long_post} \\
+ | \__acro_write_log_property:nnn {#1} {long-post} {long_post} \\
+ | \__acro_write_log_property:nnn {#1} {post} {post} \\
| \__acro_write_log_property:nnn {#1} {index-cmd} {index_cmd} \\
| \__acro_write_log_property:nnn {#1} {first-style} {first_style} \\
=================================================
@@ -615,17 +616,22 @@
\cs_new_protected:Npn \acro_first_instance:nn #1#2
{
- \tl_if_blank:VF \l__acro_first_style_tl
+ \acro_if_property:nnTF {#1} {first-style}
{
\tl_set_eq:NN
- \l__acro_first_instance_tl
+ \l__acro_tmpa_tl
\l__acro_first_style_tl
}
+ {
+ \tl_set_eq:NN
+ \l__acro_tmpa_tl
+ \l__acro_first_instance_tl
+ }
\acro_if_defined:nT {#1}
{
\use:x {
\UseInstance {acro-first}
- { \exp_not:V \l__acro_first_instance_tl }
+ { \exp_not:V \l__acro_tmpa_tl }
{ \exp_not:n {#1} }
{ \exp_not:n {#2} }
}
@@ -822,6 +828,8 @@
\bool_if:NF \l__acro_group_citation_bool
{ \acro_cite_if:nn { \l__acro_citation_first_bool } {#1} }
\acro_index_if:nn { \l__acro_addto_index_bool } {#1}
+ \acro_get_property:nnT {#1} {post}
+ { \tl_use:N \l__acro_post_tl }
}
% --------------------------------------------------------------------------
@@ -853,6 +861,7 @@
}
{
\AssignTemplateKeys
+ \bool_set_true:N \l__acro_first_instance_bool
\bool_if:NTF \l__acro_first_reversed_bool
{ % zuerst kurze Form, dann lange Form:
\__acro_print_form_and_indefinite:nnn {short} {#1} {#2}
@@ -876,6 +885,11 @@
}
}
+\bool_new:N \l__acro_first_instance_bool
+
+\NewExpandableDocumentCommand \aciffirst {+m+m}
+ { \bool_if:NTF \l__acro_first_instance_bool {#1} {#2} }
+
% template for footnotes, sidenotes, ...
\cs_new:Npn \__acro_note_command:n #1 {#1}
\DeclareTemplateInterface {acro-first} {note} {2}
@@ -2085,9 +2099,17 @@
{
\bool_if:NTF \l__acro_include_endings_format_bool
{
- \bool_if:NTF \l__acro_custom_format_bool
- { \l__acro_custom_format_tl }
- { \tl_use:c {l__acro_#2_format_tl} }
+ \str_if_eq:nnTF {long} {#2}
+ {
+ \bool_if:NTF \l__acro_custom_long_format_bool
+ { \l__acro_custom_long_format_tl }
+ { \tl_use:c {l__acro_#2_format_tl} }
+ }
+ {
+ \bool_if:NTF \l__acro_custom_format_bool
+ { \l__acro_custom_format_tl }
+ { \tl_use:c {l__acro_#2_format_tl} }
+ }
}
{ \use:n }
{
@@ -2594,10 +2616,12 @@
}
% #1: id
-\cs_new:Npn \acro_after:n #1
+\cs_new_protected:Npn \acro_after:n #1
{
\acro_cite_if:nn { \l__acro_citation_all_bool } {#1}
\acro_index_if:nn { \l__acro_addto_index_bool } {#1}
+ \acro_get_property:nnT {#1} {post}
+ { \tl_use:N \l__acro_post_tl }
}
\cs_new_protected:Npn \acro_check_single:n #1
@@ -3636,6 +3660,9 @@
% post long:
\acro_declare_simple_property:n {long-post}
+% post:
+\acro_declare_simple_property:n {post}
+
% sort:
\acro_declare_property:nnn {sort} {sort}
{
@@ -4619,6 +4646,11 @@
2017/02/09 v2.7a - adapt to integration of l3sort into l3kernel
2017/06/21 v2.7b - fix issue #93
2017/08/28 v2.7c - fix issue #96
+2018/01/30 v2.8 - fix issue #94
+ - document `format-include-endings', fix issue #99
+ - new property `post'
+ - \aciffirst
+ - resolve issue #95
% --------------------------------------------------------------------------
% TODO: