2

I'm having some trouble with acronyms such as I2C, where there is a number inside. My code is like the following:

\usepackage[acronym]{glossary}
\makeglossary
\newacronym{I2C}{Inter-Integrated Circuit}{}

\begin{document}
\I2C
\end{document}
2
  • 1
    The problem is caused by the fact that commands names can't containing numbers. However, the glossary package is obsolete and has been replaced by glossaries. Commented Jan 31, 2013 at 16:13
  • Welcome to TX.SX! If you indent your code by four spaces, it will show up as code, as it can be seen now in your question. Moreover, we don't write "Thank you"'s here.
    – mafp
    Commented Jan 31, 2013 at 16:15

1 Answer 1

4

The solution is to use the optional argument:

\documentclass{article}

\usepackage[acronym]{glossary}
\makeglossary
\newacronym[IIC]{I2C}{Inter-Integrated Circuit}{}

\begin{document}
\IIC
\end{document}

However since glossary is obsolete, it's better to use the replacement glossaries package:

\documentclass{article}

\usepackage[acronym]{glossaries}
\makeglossary
\newacronym{I2C}{I2C}{Inter-Integrated Circuit}

\begin{document}
\gls{I2C}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .