You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bugs described here occur when compiling a document with acronym version 1.42 of November 11, 2019.
Capitalization is not compatible with other commands or strings that do not begin with a letter (e.g. chemical names). For example, if you define the acronym \acro{4'-OH ATX}[4'-OH ATX]{4'-hydroxy atomoxetine} and output it using \Ac{4'-OH ATX}, you will get
4'-hydroxy atomoxetine
instead of
4'-Hydroxy atomoxetine.
It would, therefore, be necessary to apply the use of \MakeUppercase to the first letter instead of the first character.
In addition, no other macros can be used within the acro macros. However, it would be partly necessary to write it in italics or to put the correct quotation marks by using the \enquote command (csquotes). For chemical substance names, the \iupac command (chemmacros) would be useful. None of these works.
MWE
\documentclass{article}
% Typeset Packages\usepackage{parskip}
\usepackage[nohyperlinks, printonlyused, withpage]{acronym}
\usepackage{csquotes}
% Chemistry Packages\usepackage{chemmacros}
\begin{document}
\section*{List of acronyms}
\begin{acronym}
\acro{MTBE}[MTBE]{methyl tert-butylether}
\acro{4'-OH ATX}[4'-OH ATX]{4'-hydroxy atomoxetine}
\acro{3-APA}[3-APA]{\iupac{3-azidopropylamine}}
\end{acronym}
\section{Capitalization}
Let's use the \verb!\Ac! command to output the MTBE acronym:\\\Ac{MTBE}
Let's test the same thing with the 4'-OH ATX acronym:\\\Ac{4'-OH ATX}
As you see, the first letter of the MTBE output is, as we would expect, capitalized. For the 4'-OH ATX output, however, the output is not as expected.
\section{Use of macros}
As the last example, let's uncomment the \verb!\Ac{3-APA}! command, in order to view the error resulting from using a macro inside of the \verb!\acro! macro. Please note, that this does \textbf{not} happen with the \verb!\ac! command!
% \Ac{3-APA}\end{document}
The text was updated successfully, but these errors were encountered:
I have done some research on this and found quite a few cases where such a behaviour would lead to erroneous results, e.g. something like \acro{80s}{1780s} or \acro{80s Synth}{80s synthesizer pop} would lead to "1780S" and "80S synthesizer pop". Likewise \acro{.280 British}{7\,mm NATO} or \acro{.280 British}{7×43mm} would be "7Mm NATO" and "7X43mm", both incorrect.
So I currently see three ways to solve this from within the acronym package.
Add a new option that enables an extensive search for the first letter, but which would also produce wrong output when mixing e.g. chemicals and ammunition (sounds quite realistic to me).
Add something like \acroupper{4'-OH ATX}{4'-hydroxy atomoxetine}{4'-Hydroxy atomoxetine} which would also have to be combined with \acroindefinite, so we need at least six new commands, I think.
Provide alternate versions of all the available upper-case commands plus the starred ones; this should be around 20 new commands.
On the other hand, you could locally implement a small command that does the extensive search for the first letter, such as \Up{\ac{4'-OH ATX}} instead of \Ac{4'-OH ATX}. You can then use it at the places you consider useful.
At this point, my question is how the effort of enhancing the package relates to the benefit. In my opinion, this is definitely a niche issue and therefore I suggest to label it as wontfix. Nevertheless, I could imagine that such a command would fit well in some chemistry utility LaTeX package.
I realize that it can quickly lead to incorrect outputs, but I still think that the implementation would make sense. In my experience LaTeX is mainly used by scientists. Chemists, as well as biologists and even physicists, often have to mention chemicals in their texts. So I would not say that this is a niche. I am also critical of the suggestion to put this into a chemistry-related utility package. Here we have a package that deals with abbreviations and acronyms, so why would you put a patch for a problem of this package into another package?
Besides, the second problem mentioned remains and at least with this one you have to admit that it is not a niche problem and it cannot be moved to other packages.
The bugs described here occur when compiling a document with acronym version 1.42 of November 11, 2019.
Capitalization is not compatible with other commands or strings that do not begin with a letter (e.g. chemical names). For example, if you define the acronym
\acro{4'-OH ATX}[4'-OH ATX]{4'-hydroxy atomoxetine}
and output it using\Ac{4'-OH ATX}
, you will getinstead of
It would, therefore, be necessary to apply the use of
\MakeUppercase
to the first letter instead of the first character.In addition, no other macros can be used within the acro macros. However, it would be partly necessary to write it in italics or to put the correct quotation marks by using the
\enquote
command (csquotes
). For chemical substance names, the\iupac
command (chemmacros
) would be useful. None of these works.MWE
The text was updated successfully, but these errors were encountered: