summaryrefslogtreecommitdiff
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
parentd2c05b2de7a771e9d41c10ca2bd7b8db46f0e9ff (diff)
acro (30jan18)
git-svn-id: svn://tug.org/texlive/trunk@46492 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/acro/README6
-rw-r--r--Master/texmf-dist/doc/latex/acro/acro_en.pdfbin565826 -> 567199 bytes
-rw-r--r--Master/texmf-dist/doc/latex/acro/acro_en.tex30
-rw-r--r--Master/texmf-dist/tex/latex/acro/acro.sty54
4 files changed, 70 insertions, 20 deletions
diff --git a/Master/texmf-dist/doc/latex/acro/README b/Master/texmf-dist/doc/latex/acro/README
index bc95e18f4bd..944b5599eee 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.7c
+the ACRO package v2.8
Typeset Acronyms
-2017/08/28
+2018/01/30
--------------------------------------------------------------------------
Clemens Niederberger
Web: https://bitbucket.org/cgnieder/acro
E-Mail: contact@mychemistry.eu
--------------------------------------------------------------------------
-Copyright 2012--2017 Clemens Niederberger
+Copyright 2012--2018 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 62ea4bb2a36..5efc017203b 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 330ba789a62..2c03279c280 100644
--- a/Master/texmf-dist/doc/latex/acro/acro_en.tex
+++ b/Master/texmf-dist/doc/latex/acro/acro_en.tex
@@ -1,8 +1,8 @@
-% !arara: pdflatex
+% !arara: pdflatex: { action: nonstopmode }
% !arara: biber
-% !arara: pdflatex
-% arara: pdflatex
-% arara: pdflatex
+% !arara: pdflatex: { action: nonstopmode }
+% arara: pdflatex: { action: nonstopmode }
+% arara: pdflatex: { action: nonstopmode }
% --------------------------------------------------------------------------
% the ACRO package
%
@@ -13,7 +13,7 @@
% Web: http://www.mychemsitry.eu/forums/forum/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
@@ -336,6 +336,10 @@ documentation.
\keyval{long-post}{text}
\meta{text} is appended to the long form in the text but not in the list
of acronyms.
+ %% long-post
+ \keyval{post}{text}
+ \meta{text}\sinceversion{2.8} is appended to the acronym in the text but
+ not in the list of acronyms.
%% alt
\keyval{alt}{text}
Alternative short form.
@@ -624,6 +628,17 @@ These acronyms now have the following plural appearances:
\acsp{MP}, \aclp{MP}
\end{example}
+In the default setting the format of the long or short form is not extended to
+the plural ending which might look strange if you choose bold weight as
+format, for example. In this case you can tell \acro\ to extend the format.
+\begin{options}
+ \keybool{format-include-endings}\Default{false}
+ Tell\sinceversion{2.8} \acro\ to use the format of the base form for the
+ endings, too.
+\end{options}
+For a more general view on endings please read section
+\vref{sec:about-plural-forms}.
+
\subsection{Alternative Short Forms}
For some acronyms it might be useful to have alternative forms. For this
\cs{DeclareAcronym} has another key:
@@ -833,6 +848,9 @@ used for the first time you can call one of these commands:
\command{acifused}[\marg{id}\marg{true}\marg{false}]
This command tests if the acronym with \ac{id} \meta{id} has already been
used and either puts \code{true} or \code{false} in the input stream.
+ \command{aciffirst}[\marg{true}\marg{false}]
+ To\sinceversion{2.8} be used inside of acronym definitions in order to
+ test if we are inside the first instance of the acronym or not.
\end{commands}
\begin{example}[side-by-side]
\acreset{ny}\ac{ny}
@@ -1699,7 +1717,7 @@ Other definitions by \acro\ are for example the following ones:
\end{sourcecode}
\section{About Plural Forms, Possessive Forms and Similar Constructs -- the
- Concept of Endings}
+ Concept of Endings}\label{sec:about-plural-forms}
\acro\ has a concept of \emph{endings}. All of \acro's plural options are
defined by saying
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: