Sunday, April 25, 2010

unwanted period in Latex acronyms list

Using glossaries package, I was getting an undesired period after the definition. I was using this code:
\usepackage[acronym, nonumberlist, toc]{glossaries}
\makeglossaries
\include{acronyms/acronyms}
\printglossaries

(where the acronyms file contains the definitions). The results:

ABA Allen Mouse Brain Atlas.
AMPA α-amino-3-hydroxyl-5-methyl-4-isoxazole-propionate.
The fix:
\usepackage[acronym, nonumberlist, toc]{glossaries}

% Define new glossary style
% desired format:
% acronym is bold, no full stop after definition
\newglossarystyle{hbacro}{%
\renewcommand*{\glossaryentryfield}[5]{%
\item[\glstarget{##1}{##2}] ##3\space ##5}
}
\glossarystyle{hbacro}

\makeglossaries
\include{acronyms/acronyms}
\printglossaries


And got

ABA Allen Mouse Brain Atlas
AMPA α-amino-3-hydroxyl-5-methyl-4-isoxazole-propionate

No comments: