Closed GregorDall closed 2 years ago
subsequent-style seems to support only long
and short
but not short-long
or long-short
OK, so I just found out that this is a package option rather than an option for the individual acronym. So this becomes a feature request. Do you think this is possible?
Hi. The property as well as the option already exists and works just fine. What you're experiencing is the definition of the long-short
template itself:
\NewAcroTemplate{long-short}{%
\acroiffirstTF{%
\acrowrite{long}%
\acspace(%
\acroifT{foreign}{\acrowrite{foreign}, }%
\acrowrite{short}%
\acroifT{alt}{ \acrotranslate{or} \acrowrite{alt}}%
\acrogroupcite
)%
}{\acrowrite{short}}%
}
It checks itself again for a first appearance and outputs things depending on it… You can either change the definition of the template or define an own template for your case:
\documentclass{article}
\usepackage{acro}
\RenewAcroTemplate{long-short}{%
\acrowrite{long}%
\acspace(%
\acroifT{foreign}{\acrowrite{foreign}, }%
\acrowrite{short}%
\acroifT{alt}{ \acrotranslate{or} \acrowrite{alt}}%
\acrogroupcite
)%
}
\DeclareAcronym{MD}{
short =MD,
long = maturity date,
first-style=short-long,
subsequent-style=long-short
}
\begin{document}
\ac{MD}
\ac{MD}
\ac{MD}
\end{document}
or
\documentclass{article}
\usepackage{acro}
\NewAcroTemplate{custom}{\acrowrite{long} (\acrowrite{short})}
\DeclareAcronym{MD}{
short =MD,
long = maturity date,
first-style=short-long,
subsequent-style=custom
}
\begin{document}
\ac{MD}
\ac{MD}
\ac{MD}
\end{document}
Both give
Looks like I was misunderstanding how this option works. Thank you for clarifying and providing support and code!
No you didn't misunderstand it. The option as well as the property work as you've understood. Only the template you chose didn't behave as you've thought :)
I was trying to use different types of of styles for various acronyms, but the
subsequent-style
option does not seem to work for me.yields: MD (maturity date) MD MD should yield: MD (maturity date) maturity date (MD) maturity date (MD)