cgnieder / acro

acronyms for LaTeX
LaTeX Project Public License v1.3c
42 stars 9 forks source link

short-format appears to be additive not replacing (as expected) #186

Closed FrankMittelbach closed 3 years ago

FrankMittelbach commented 3 years ago

From the documentation (as well as from earlier behavior) I would have expected that one can set a default with \acsetup and overwrite that on the individual acronym, but it is seem that both get applied:

\documentclass{article}

\usepackage{acro}
\acsetup{short-format=\textbf}

\DeclareAcronym{cd}{short=CD, long=Compact Disc}
\DeclareAcronym{etc}{short = etc.\@, long=et cetera,
                     short-format=\textit, first-style=short}

\begin{document}
\ac{cd}             \\
\ac{etc} --- short format overwrite not honored
\end{document}
cgnieder commented 3 years ago

This is actually mentioned in the manual (p.19):

Per default the individual formatting instructions are additive to the global ones. This can be changed through the option format/replace = true|false (Initial: false)

FrankMittelbach commented 3 years ago

hmm yes :-) has this changed recently (in the last year or so) or have I never noticed that when I made the examples originally?

cgnieder commented 3 years ago

It has changed with the upgrade to v3. I am wondering if the original behavior should be the default, though…

FrankMittelbach commented 3 years ago

difficult to say, but if you look around what other packages do then this behavior as a default is fairly unique and normally you can expect that local changes overwrite and not add to the default. would be good for me to know if you alter the default because that affects a lot of the explanation how things work.

cgnieder commented 3 years ago

Yes, I decided to revert to the old behavior. It seems to be the more intuitive alternative. I'll update acro this weekend with the new (old) behavior and the bug fixes.