Skip to content

Commit

Permalink
v3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
cgnieder committed May 10, 2020
1 parent 1d11ad6 commit ca69cf0
Show file tree
Hide file tree
Showing 10 changed files with 159 additions and 66 deletions.
14 changes: 8 additions & 6 deletions HISTORY
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,14 @@ The Current Maintainer of this work is Clemens Niederberger.
- \acroifboolean(TF)
- add missing code in some of the list templates
- improve examples code
2020/05/?? v3.2 - fix units example
2020/05/10 v3.2 - fix units example
- prevent to early expansion of formatting instructions
- fix error in \AcroNeedPackage
- fix wrong usage of `longtabu` in the `longtable` template
- add supertabular template
- fix wrong usage of `longtabu' in the `longtable' template
- add `supertabular' template
- new: `display properties', this adds
`list/foreign/display'
- add further examples
- new: `display properties'
adds `list/foreign/display'

- \SetupAcroTemplate, \SetupNextAcroTemplate
- properly define and document \AcroTemplateName and
\AcroTemplateType
10 changes: 7 additions & 3 deletions README
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--------------------------------------------------------------------------
the ACRO package v3.1 2020/05/03
the ACRO package v3.2 2020/05/10

Typeset Acronyms

Expand All @@ -22,9 +22,10 @@ This work has the LPPL maintenance status `maintained'.

The Current Maintainer of this work is Clemens Niederberger.
--------------------------------------------------------------------------
The acro package consists of the code file:
The acro package consists of code files:

acro.sty
acro2.sty

The acro package consists of documentation files:

Expand All @@ -46,5 +47,8 @@ folder examples/ in the same folder as acro-manual.pdf:
acro.example.issue-154.pdf, acro.example.issue-154.tex
acro.example.texsx-505891.pdf, acro.example.texsx-505891.tex
acro.example.texsx-507726.pdf, acro.example.texsx-507726.tex

acro.example.texsx-513623.pdf, acro.example.texsx-513623.tex
acro.example.texsx-515295.pdf, acro.example.texsx-515295.tex
acro.example.texsx-542461.pdf, acro.example.texsx-542461.tex

--------------------------------------------------------------------------
6 changes: 6 additions & 0 deletions code/acro.interface.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@
\NewDocumentCommand \RenewAcroTemplate {O{acronym}m+m}
{ \use:c {acro_#1_template_renew:nn} {#2} {#3} }

\NewDocumentCommand \SetupAcroTemplate {O{acronym}m+m}
{ \acro_template_setup:nnn {#1} {#2} {#3} }

\NewDocumentCommand \SetupNextAcroTemplate {O{acronym}m+m}
{ \acro_next_template_setup:nnn {#1} {#2} {#3} }

\NewDocumentCommand \DeclareAcronym {m+m}
{ \acro_declare_acronym:nn {#1} {#2} }

Expand Down
4 changes: 2 additions & 2 deletions code/acro.start.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@

% setup package:
\tl_const:Nn \c_acro_package_name_tl {acro}
\tl_const:Nn \c_acro_date_tl {2020/05/04}
\tl_const:Nn \c_acro_date_tl {2020/05/10}
\tl_const:Nn \c_acro_version_major_number_tl {3}
\tl_const:Nn \c_acro_version_minor_number_tl {1}
\tl_const:Nn \c_acro_version_minor_number_tl {2}
\tl_const:Nn \c_acro_version_subrelease_tl {}
\tl_const:Nx \c_acro_version_number_tl
{
Expand Down
72 changes: 58 additions & 14 deletions code/acro.sty
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@

% setup package:
\tl_const:Nn \c_acro_package_name_tl {acro}
\tl_const:Nn \c_acro_date_tl {2020/05/04}
\tl_const:Nn \c_acro_date_tl {2020/05/10}
\tl_const:Nn \c_acro_version_major_number_tl {3}
\tl_const:Nn \c_acro_version_minor_number_tl {1}
\tl_const:Nn \c_acro_version_minor_number_tl {2}
\tl_const:Nn \c_acro_version_subrelease_tl {}
\tl_const:Nx \c_acro_version_number_tl
{
Expand Down Expand Up @@ -735,6 +735,12 @@
\NewDocumentCommand \RenewAcroTemplate {O{acronym}m+m}
{ \use:c {acro_#1_template_renew:nn} {#2} {#3} }

\NewDocumentCommand \SetupAcroTemplate {O{acronym}m+m}
{ \acro_template_setup:nnn {#1} {#2} {#3} }

\NewDocumentCommand \SetupNextAcroTemplate {O{acronym}m+m}
{ \acro_next_template_setup:nnn {#1} {#2} {#3} }

\NewDocumentCommand \DeclareAcronym {m+m}
{ \acro_declare_acronym:nn {#1} {#2} }

Expand Down Expand Up @@ -2608,10 +2614,10 @@

\cs_new_protected:Npn \acro_footnote:n #1
{
\tl_set:Ne \l__acro_fnpct_check_tl { \l__acro_fnpct_check_tl }
\tl_set:Ne \l__acro_tmpa_tl { \l__acro_fnpct_check_tl }
\exp_last_unbraced:Nno
\footnote {#1}
\l__acro_fnpct_check_tl
\l__acro_tmpa_tl
}

% options for activating actions:
Expand Down Expand Up @@ -3179,6 +3185,7 @@
\cs_new_protected:Npn \__acro_template_add:nnn #1#2#3
{
\tl_new:c {l__acro_template_#1_#2_setup_tl}
\tl_new:c {l__acro_next_template_#1_#2_setup_tl}
\acro_attribute_set:nnn {template::#1} {#2} {#3}
}

Expand Down Expand Up @@ -3221,28 +3228,33 @@
% #3: setup code
\cs_new_protected:Npn \acro_template_setup:nnn #1#2#3
{ \tl_set:cn {l__acro_template_#1_#2_setup_tl} {#3} }
\cs_generate_variant:Nn \acro_template_setup:nnn {nnV,nVn}

\cs_new_protected:Npn \acro_next template_setup:nnn #1#2#3
{ \tl_set:cn {l__acro_next_template_#1_#2_setup_tl} {#3} }

% #1: template type
% #2: template name
\cs_new_protected:Npn \__acro_template_setup:nn #1#2
{ \tl_use:c {l__acro_template_#1_#2_setup_tl} }
\cs_new_protected:Npn \__acro_template_do_setup:nn #1#2
{
\tl_use:c {l__acro_template_#1_#2_setup_tl}
\tl_use:c {l__acro_next_template_#1_#2_setup_tl}
}

% #1: template type
% #2: template name
\cs_new_protected:Npn \__acro_clear_template_setup:nn #1#2
{ \tl_clear:c {l__acro_template_#1_#2_setup_tl} }
{ \tl_clear:c {l__acro_next_template_#1_#2_setup_tl} }

% #1: template type
% #2: template name
\cs_new_protected:Npn \__acro_template_start:nn #1#2
{
\group_begin:
\__acro_template_setup:nn {#1} {#2}
\tl_clear_new:N \TemplateType
\tl_set:Nn \TemplateType {#1}
\tl_clear_new:N \TemplateName
\tl_set:Nn \TemplateName {#2}
\__acro_template_do_setup:nn {#1} {#2}
\tl_clear_new:N \AcroTemplateType
\tl_set:Nn \AcroTemplateType {#1}
\tl_clear_new:N \AcroTemplateName
\tl_set:Nn \AcroTemplateName {#2}
}

% #1: template type
Expand Down Expand Up @@ -5046,7 +5058,7 @@
\acropages
{ \acrotranslate {page} \nobreakspace }
{ \acrotranslate {pages} \nobreakspace }
\tabularnewline
\strut \tabularnewline
}
}
{ \AcroRerun }
Expand All @@ -5058,6 +5070,38 @@
\end {longtabu}
}

\NewAcroTemplate[list] {supertabular}
{
\AcroNeedPackage {array,supertabular}
\acronymsmapF
{
\AcroAddRow
{
\acrowrite {short}
\acroifT {alt} { / } \acrowrite {alt}
&
\acrowrite {list}
\acroifanyT {foreign,extra} {~(}
\acrowrite {foreign}
\acroifallT {foreign,extra} {,~}
\acrowrite {extra}
\acroifanyT {foreign,extra} {)}
\acropagefill
\acropages
{ \acrotranslate {page} \nobreakspace }
{ \acrotranslate {pages} \nobreakspace }
\tabularnewline
}
}
{ \AcroRerun }
\acroheading
\acropreamble
\par \noindent
\begin {supertabular} {>{\bfseries}lp{.7\linewidth}}
\AcronymTable
\end {supertabular}
}

\NewAcroTemplate [list] {lof}
{
\acroheading
Expand Down
24 changes: 15 additions & 9 deletions code/acro.templates.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
\cs_new_protected:Npn \__acro_template_add:nnn #1#2#3
{
\tl_new:c {l__acro_template_#1_#2_setup_tl}
\tl_new:c {l__acro_next_template_#1_#2_setup_tl}
\acro_attribute_set:nnn {template::#1} {#2} {#3}
}

Expand Down Expand Up @@ -77,28 +78,33 @@
% #3: setup code
\cs_new_protected:Npn \acro_template_setup:nnn #1#2#3
{ \tl_set:cn {l__acro_template_#1_#2_setup_tl} {#3} }
\cs_generate_variant:Nn \acro_template_setup:nnn {nnV,nVn}

\cs_new_protected:Npn \acro_next template_setup:nnn #1#2#3
{ \tl_set:cn {l__acro_next_template_#1_#2_setup_tl} {#3} }

% #1: template type
% #2: template name
\cs_new_protected:Npn \__acro_template_setup:nn #1#2
{ \tl_use:c {l__acro_template_#1_#2_setup_tl} }
\cs_new_protected:Npn \__acro_template_do_setup:nn #1#2
{
\tl_use:c {l__acro_template_#1_#2_setup_tl}
\tl_use:c {l__acro_next_template_#1_#2_setup_tl}
}

% #1: template type
% #2: template name
\cs_new_protected:Npn \__acro_clear_template_setup:nn #1#2
{ \tl_clear:c {l__acro_template_#1_#2_setup_tl} }
{ \tl_clear:c {l__acro_next_template_#1_#2_setup_tl} }

% #1: template type
% #2: template name
\cs_new_protected:Npn \__acro_template_start:nn #1#2
{
\group_begin:
\__acro_template_setup:nn {#1} {#2}
\tl_clear_new:N \TemplateType
\tl_set:Nn \TemplateType {#1}
\tl_clear_new:N \TemplateName
\tl_set:Nn \TemplateName {#2}
\__acro_template_do_setup:nn {#1} {#2}
\tl_clear_new:N \AcroTemplateType
\tl_set:Nn \AcroTemplateType {#1}
\tl_clear_new:N \AcroTemplateName
\tl_set:Nn \AcroTemplateName {#2}
}

% #1: template type
Expand Down
4 changes: 2 additions & 2 deletions code/acro.tools.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -426,10 +426,10 @@

\cs_new_protected:Npn \acro_footnote:n #1
{
\tl_set:Ne \l__acro_fnpct_check_tl { \l__acro_fnpct_check_tl }
\tl_set:Ne \l__acro_tmpa_tl { \l__acro_fnpct_check_tl }
\exp_last_unbraced:Nno
\footnote {#1}
\l__acro_fnpct_check_tl
\l__acro_tmpa_tl
}

% options for activating actions:
Expand Down
19 changes: 10 additions & 9 deletions doc/acro-manual.cls
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,10 @@
babelhyphen, parencite,
BeginAccSupp, EndAccSupp,
if@filesw, acro@list,
iupac, enquote,
NewDocumentCommand,
newabbreviation, printabbreviations
newabbreviation, printabbreviations,
newspecies
} ,
index-setup = {
level = \section , headers={\indexname}{\indexname} , noclearpage ,
Expand All @@ -107,9 +109,7 @@

\DeclareTranslation{English}{cnltx-toc}{Table of contents}

\newcommand*\barg{\textcolor{argument}{\code{!}}}
\newcommand*\qarg{\textcolor{argument}{\code{?}}}
\newcommand*\uarg{\textcolor{argument}{\code{|}}}
\renewcommand*\arg[1]{\textcolor{argument}{\code{#1}}}

\newidxcmd\sym{\code{#1}}[ (symbol)]

Expand Down Expand Up @@ -233,15 +233,15 @@
\renewrobustcmd*\sinceversion[1]{%
\ac@ifnew{#1}%
{\cnltx@version@note{\textcolor{red}{\ac@NEW}}}%
{\cnltx@version@note{\GetTranslation{cnltx-introduced}~#1\ac@date{#1}}}%
{\cnltx@version@note{\GetTranslation{cnltx-introduced}~v#1\ac@date{#1}}}%
}
\renewrobustcmd*\changedversion[1]{%
\cnltx@version@note{\GetTranslation{cnltx-changed}~#1\ac@date{#1}}%
\cnltx@version@note{\GetTranslation{cnltx-changed}~v#1\ac@date{#1}}%
}

\newnote*\sincechanged[2]{%
\GetTranslation{cnltx-introduced}~#1\ac@date{#1},
changed with version~#2\ac@date{#2}\ac@ifnew{#2}{ \ac@NEW}{}%
changed with ~v#2\ac@date{#2}\ac@ifnew{#2}{ \ac@NEW}{}%
}

\RenewDocumentEnvironment{commands}{}
Expand Down Expand Up @@ -652,7 +652,8 @@
\acro@add@version{2020-01-24}{2.11b}
\acro@add@version{2020-02-03}{2.11c}
% 2020: v3
\acro@add@version{2020-04-29}{v3.0}
\acro@add@version{2020-05-03}{v3.1}
\acro@add@version{2020-04-29}{3.0}
\acro@add@version{2020-05-03}{3.1}
\acro@add@version{2020-05-10}{3.2}

\endinput
Binary file modified doc/acro-manual.pdf
Binary file not shown.
Loading

0 comments on commit ca69cf0

Please sign in to comment.