LaTeX acronyms and \acrodef

Writing for my thesis, I found that when I used \acrodef to define (silent) acronyms produced error messages. I use \acrodef instead of \acro I don’t want a list of acronyms, I just want the first one written out full and the next acronyms written in the short form.

The error message is in the form of:

Latex Error: ./acronyms.tex:3 LaTeX Error: Something's wrong--perhaps a missing \item.

This confused me. It turned out that I should not use \acrodef inside an acronym environment. So instead of this:

\begin{acronym}
\acrodef{DOF}{Degrees Of Freedom}
\end{acronym}

I should do just this:

\acrodef{DOF}{Degrees Of Freedom}

This solved the problem (no error message anymore, and the acronyms are placed in the text as I want).

Comments are closed.