texlive[46492] Master/texmf-dist: acro (30jan18)
commits+karl at tug.org
commits+karl at tug.org
Tue Jan 30 22:04:11 CET 2018
Revision: 46492
http://tug.org/svn/texlive?view=revision&revision=46492
Author: karl
Date: 2018-01-30 22:04:11 +0100 (Tue, 30 Jan 2018)
Log Message:
-----------
acro (30jan18)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/acro/README
trunk/Master/texmf-dist/doc/latex/acro/acro_en.pdf
trunk/Master/texmf-dist/doc/latex/acro/acro_en.tex
trunk/Master/texmf-dist/tex/latex/acro/acro.sty
Modified: trunk/Master/texmf-dist/doc/latex/acro/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/acro/README 2018-01-30 21:03:57 UTC (rev 46491)
+++ trunk/Master/texmf-dist/doc/latex/acro/README 2018-01-30 21:04:11 UTC (rev 46492)
@@ -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 at 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
Modified: trunk/Master/texmf-dist/doc/latex/acro/acro_en.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/acro/acro_en.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/acro/acro_en.tex 2018-01-30 21:03:57 UTC (rev 46491)
+++ trunk/Master/texmf-dist/doc/latex/acro/acro_en.tex 2018-01-30 21:04:11 UTC (rev 46492)
@@ -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 at 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 @@
\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 @@
\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 @@
\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 @@
\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
Modified: trunk/Master/texmf-dist/tex/latex/acro/acro.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/acro/acro.sty 2018-01-30 21:03:57 UTC (rev 46491)
+++ trunk/Master/texmf-dist/tex/latex/acro/acro.sty 2018-01-30 21:04:11 UTC (rev 46492)
@@ -8,7 +8,7 @@
% Web: https://bitbucket.org/cgnieder/acro/
% E-Mail: contact at 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:
More information about the tex-live-commits
mailing list