I'm using the acro
package, and I want to use a comma in one of the acronyms. Unfortunately TeXnicCenter throws a wobbly:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! LaTeX error: "xparse/split-excess-tokens"
!
! Too many ',' tokens when trying to split argument.
!
! See the LaTeX3 documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.24 ...m{pvt}{PVT}{process, voltage, temperature}
|'''''''''''''''''''''''''''''''''''''''''''''''
| LaTeX was asked to split the input 'process, voltage, temperature' at each
| occurrence of the token ',', up to a maximum of 2 parts. There were too many
| ',' tokens.
|...............................................
My code:
\documentclass{article}
\usepackage{acro}
\acsetup{list-long-format=\capitalisewords}
\usepackage{mfirstuc}% provides \capitalisewords
\DeclareAcronym{pvt}{PVT}{process, voltage, temperature}
\begin{document}
The environmental space is known as \ac{pvt} blah blah blah
\end{document}
Clearly in its current form the only way I am going to get it to work is to remove the commas, however I'd very much like to have my cake and eat it. So how do I get it written as:
The environmental space is known as process, variation, temperature (PVT) blah blah blah…
Best Answer
version 1.*
The syntax for declaring acronyms is as follows:
Here it is more or less obvious that a comma delimits the single key/value pairs and hence a value must be written in braces if it should contain one or more commas.
version 0.*
With version 0.* the syntax of the command was different.
An acronym was declared by
but this is only a little part of the truth. More accurate and the explanation for your issue is this:
Both the
<short>
and the<long>
argument are split by a possible comma where after the comma one can add a different plural ending than the defaults
. Your entry had two commas soacro
saw the following:and then it choked as it didn't expect a second comma. Workaround: hide the commas or the whole long entry in an extra pair of braces.