Skip to content

Commit

Permalink
v3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cgnieder committed Apr 29, 2020
1 parent 297f7fd commit 95b4aee
Show file tree
Hide file tree
Showing 20 changed files with 708 additions and 532 deletions.
17 changes: 13 additions & 4 deletions HISTORY
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ The acro package consists of the files
If you have any ideas, questions, suggestions or bugs to report, please
feel free to contact me.
--------------------------------------------------------------------------
2012 VERSION 0
--------------------------------------------------------------------------
2012/06/22 v0.1 - first public release
2012/06/23 v0.1a - bug fix, added `strict' and `macros' option and creation of
shortcut macros
Expand Down Expand Up @@ -63,6 +65,9 @@ feel free to contact me.
short entry) resolved
- option `xspace' added
2013/01/02 v0.6a - \acuseall
--------------------------------------------------------------------------
2013 VERSION 1
--------------------------------------------------------------------------
2013/01/16 v1.0 - new syntax of \DeclareAcronym
- new option `version'
- new `accsupp' acronym property
Expand Down Expand Up @@ -146,6 +151,9 @@ feel free to contact me.
2015/05/10 v1.6b - \ProcessKeysPackageOptions ,
- correct bug http://tex.stackexchange.com/q/236860/ :
option `pages = first' works again
--------------------------------------------------------------------------
2015 VERSION 2
--------------------------------------------------------------------------
2015/08/16 v2.0 - fix https://github.com/cgnieder/acro/issue/36
- implement https://github.com/cgnieder/acro/issue/39
- implement https://github.com/cgnieder/acro/issue/40
Expand Down Expand Up @@ -284,7 +292,8 @@ feel free to contact me.
2020/01/24 v2.11b - fix issue #147
2020/02/03 v2.11c - fix issue #76
2020/03/07 v2.11c - fix issues #149 and #150
2020/04/06 v3.0alpha - pre-release of v3.0 without proper documentation
2020/04/07 v3.0alpha-1 - upgrade module included
2020/04/13 v3.0alpha-2 - mutiple imrovements
2020/04/19 v3.0beta - ready?
--------------------------------------------------------------------------
2020 VERSION 3
--------------------------------------------------------------------------
2020/04/29 v3.0 - complete re-write of acro with new features and all open
issues resolved
9 changes: 4 additions & 5 deletions README
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--------------------------------------------------------------------------
the ACRO package v3.0beta 2020/04/20
the ACRO package v3.0 2020/04/29

Typeset Acronyms

Expand Down Expand Up @@ -29,23 +29,22 @@ The acro package consists of the code file:
The acro package consists of documentation files:

README
LICENSE
HISTORY
acro-manual.tex
acro-manual.pdf
acro-manual.cls

The acro package consists of example files -- these should be placed in a
folder examples/ in the same folder as acro-manual.pdf:

acro.example.acflike.pdf, acro.example.acflike.tex
acro.example.basic.pdf, acro.example.basic.tex
acro.example.possessive.pdf, acro.example.possessive.tex
acro.example.units.pdf, acro.example.units.tex
acro.example.issue-109.pdf, acro.example.issue-109.tex
acro.example.issue-111.pdf, acro.example.issue-111.tex
acro.example.issue-119.pdf, acro.example.issue-119.tex
acro.example.issue-154.pdf, acro.example.issue-154.tex
acro.example.possessive.pdf, acro.example.possessive.tex
acro.example.texsx-505891.pdf, acro.example.texsx-505891.tex
acro.example.texsx-507726.pdf, acro.example.texsx-507726.tex
acro.example.units.pdf, acro.example.units.tex

--------------------------------------------------------------------------
4 changes: 2 additions & 2 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- add gender property and extend article mechanism?

undocumented:
- trailing token: comma, \acgobbletrail
willingly undocumented:
- \acgobbletrail
option acro/trailing/fnpct-check
\acfootnote
- options acro/commands
Expand Down
1 change: 1 addition & 0 deletions acro.build
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ if [ "$build" == true ] ; then
$pkgname.properties.$moduleext \
$pkgname.acronyms.$moduleext \
$pkgname.formatting.$moduleext \
$pkgname.ppfixes.$moduleext \
$pkgname.tools.$moduleext \
$pkgname.commands.$moduleext \
$pkgname.templates.$moduleext \
Expand Down
94 changes: 0 additions & 94 deletions code/acro.acronyms.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -157,100 +157,6 @@
use-id-as-short .default:n = true
}

% --------------------------------------------------------------------------
% mechanism for endings:
\tl_new:N \l__acro_endings_tl

\acro_attribute_new:n {short:endings}
\acro_attribute_new:n {long:endings}

\cs_new_protected:Npn \__acro_declare_ending_properties:n #1
{
\acro_property_declare:nnnnn
{ \c_false_bool } { \c_false_bool } { \c_false_bool } { \c_false_bool }
{#1}
\acro_property_declare:nnnnn
{ \c_false_bool } { \c_false_bool } { \c_false_bool } { \c_false_bool }
{#1-form}
}

% #1: ending
% #2: short default
% #3: long default
\cs_new_protected:Npn \acro_declare_ending:nnn #1#2#3
{
\bool_new:c {l__acro_#1_bool}
\cs_new_protected:cpn {acro_#1:} { \bool_set_true:c {l__acro_#1_bool} }
\exp_args:Nc \NewDocumentCommand {acro#1} {} { \use:c {acro_#1:} }
\prg_new_conditional:cpnn {acro_if_#1:} {p,T,F,TF}
{
\bool_if:cTF {l__acro_#1_bool}
{ \prg_return_true: }
{ \prg_return_false: }
}
\tl_put_right:Nn \l__acro_endings_tl {{#1}}
\keys_define:nn {acro}
{
short-#1-ending .code:n =
\acro_attribute_set:nnn {short:endings} {#1} {##1} ,
short-#1-ending .initial:n = #2 ,
long-#1-ending .code:n =
\acro_attribute_set:nnn {long:endings} {#1} {##1} ,
long-#1-ending .initial:n = #3
}
\__acro_declare_ending_properties:n {#1}% plural + plural-form
\acro_list_map:nn {short}
{
% short-plural + short-plural-form
\__acro_declare_ending_properties:n {##1-#1}
% short-plural = plural
\acro_property_make_alias:nn {##1-#1} {#1}
}
\acro_list_map:nn {long}
{
% long-plural + long-plural-form
\__acro_declare_ending_properties:n {##1-#1}
% long-plural = plural
\acro_property_make_alias:nn {##1-#1} {#1}
% long-plural-form = plural-form
\acro_property_make_alias:nn {##1-#1-form} {#1-form}
}
}

% #1: id
% #2: short|long
\cs_new_protected:Npn \__acro_set_endings:nn #1#2
{
\acro_list_map:nn {#2}
{
\tl_map_inline:Nn \l__acro_endings_tl
{ \__acro_set_ending:nnnn {#1} {#2} {##1} {####1} }
}
}

% #1: id
% #2: short|long
% #3: property
% #4: ending
\cs_new_protected:Npn \__acro_set_ending:nnnn #1#2#3#4
{
\acro_property_if_set:nnF {#1} {#3-#4-form}
{
\acro_property_if_set:nnF {#1} {#3-#4}
{
\__acro_property_set:nne {#1} {#3-#4}
{ \acro_attribute_get:nn {#2:endings} {#4} }
}
}
}

% #1: id
\cs_new_protected:Npn \acro_set_endings:n #1
{
\__acro_set_endings:nn {#1} {short}
\__acro_set_endings:nn {#1} {long}
}

% --------------------------------------------------------------------------
% declaration of acronyms:
\seq_new:N \g__acro_acronyms_seq
Expand Down
4 changes: 2 additions & 2 deletions code/acro.commands.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@
\bool_lazy_and:nnTF
{ \acro_property_if_eq_p:nn {#2} {long} }
{ \acro_if_first_p:n {#1} }
{ \__acro_format:nnn {#1} {first-#2} }
{ \__acro_format:nnn {#1} {#2} }
{ \acro_format:nnn {#1} {first-#2} }
{ \acro_format:nnn {#1} {#2} }
{
\__acro_upper:n
{
Expand Down
64 changes: 36 additions & 28 deletions code/acro.definitions.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -382,48 +382,59 @@
Italian = Acronimi ,
Portuguese = Acr\'onimos ,
Spanish = Siglas ,
Catalan = Sigles ,
Turkish = K\i saltmalar
Catalan = Sigles
}

% page name
\DeclareAcroTranslation {page}
{
Fallback = p. ,
English = p. ,
French = p. ,
German = S. ,
Portuguese = p.
Fallback = p\abbrdot ,
English = p\abbrdot ,
French = p\abbrdot ,
German = S\abbrdot ,
Italian = p\abbrdot ,
Portuguese = p\abbrdot ,
Spanish = p\'ag\abbrdot ,
Catalan = p\`ag\abbrdot
}

% pages name
\DeclareAcroTranslation {pages}
{
Fallback = pp. ,
English = pp. ,
French = pp. ,
German = S. ,
Portuguese = pp.
Fallback = pp\abbrdot ,
English = pp\abbrdot ,
French = pp\abbrdot ,
German = S\abbrdot ,
Italian = pp\abbrdot ,
Portuguese = pp\abbrdot ,
Spanish = p\'ags\abbrdot ,
Catalan = p\`ag\abbrdot
}

% following page
\DeclareAcroTranslation {sequens}
{
Fallback = f. ,
English = f. ,
French = sq. ,
German = f. ,
Portuguese = s.
Fallback = f\abbrdot ,
English = f\abbrdot ,
French = sq\abbrdot ,
German = f\abbrdot ,
Italian = s\abbrdot ,
Portuguese = s\abbrdot ,
Spanish = s\abbrdot ,
Catalan = seq\abbrdot
}

% following pages
\DeclareAcroTranslation {sequentes}
{
Fallback = ff. ,
English = ff. ,
French = sqq. ,
German = ff. ,
Portuguese = ss.
Fallback = ff\abbrdot ,
English = ff\abbrdot ,
French = sqq\abbrdot ,
German = ff\abbrdot ,
Italian = ss\abbrdot ,
Portuguese = ss\abbrdot ,
Spanish = ss\abbrdot ,
Catalan = et seq\abbrdot
}

% also
Expand All @@ -436,8 +447,7 @@
Italian = anche ,
Portuguese = tamb\'{e}m ,
Spanish = tambien ,
Catalan = tamb\'{e} ,
Turkish = ayr\i ca
Catalan = tamb\'{e}
}

% or
Expand All @@ -450,8 +460,7 @@
Italian = o ,
Portuguese = ou ,
Spanish = o ,
Catalan = o ,
Turkish = veya
Catalan = o
}

% and
Expand All @@ -464,8 +473,7 @@
Italian = e ,
Portuguese = e ,
Spanish = y ,
Catalan = i ,
Turkish = ve
Catalan = i
}

% --------------------------------------------------------------------------
Expand Down
37 changes: 20 additions & 17 deletions code/acro.formatting.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

% sets the format from the global option:
% #1: property
\cs_new_protected:Npn \__acro_global_format:n #1
\cs_new:Npn \__acro_global_format:n #1
{
\acro_property_if_alias:nTF {#1}
{
Expand All @@ -26,7 +26,7 @@
% #1: id
% #2: property
% #3: insert if false
\cs_new_protected:Npn \__acro_property_format:nnF #1#2#3
\cs_new:Npn \__acro_property_format:nnF #1#2#3
{
\acro_property_if_set:nnTF {#1} {#2-format}
{ \acro_property_get:nn {#1} {#2-format} }
Expand Down Expand Up @@ -56,29 +56,32 @@

% #1: id
% #1: property
\cs_new_protected:Npn \__acro_property_format:nn #1#2
\cs_new:Npn \__acro_property_format:nn #1#2
{ \__acro_property_format:nnF {#1} {#2} {} }

% sets the individual format:
% #1: id
% #2: property
% #3: text
\cs_new_protected:Npn \__acro_format:nnn #1#2#3
\cs_new:Npn \acro_format:nnn #1#2#3
{
\bool_if:NTF \l__acro_format_replace_bool
{
\__acro_property_format:nnF {#1} {#2}
{ \__acro_global_format:n {#2} }
{#3}
}
{
\__acro_global_format:n {#2}
{
\__acro_property_format:nn {#1} {#2}
{#3}
}
}
{
\bool_if:NTF \l__acro_format_replace_bool
{
\__acro_property_format:nnF {#1} {#2}
{ \__acro_global_format:n {#2} }
{#3}
}
{
\__acro_global_format:n {#2}
{
\__acro_property_format:nn {#1} {#2}
{#3}
}
}
}
}
\cs_generate_variant:Nn \acro_format:nnn {e}

% #1: property:
\cs_new_protected:Npn \acro_new_format:n #1
Expand Down
Loading

0 comments on commit 95b4aee

Please sign in to comment.