## LaTeX forum ⇒ MakeIndex, Nomenclature, Glossaries and Acronyms ⇒ Trouble changing glossaries style

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
LeonardLopes
Posts: 11
Joined: Mon Nov 16, 2015 7:27 pm

### Trouble changing glossaries style

I am having trouble removing an extra period from the altlist glossary style in the glossaries package. Basically, the glossaries package places a period at the end of the description. This is problematic if the description contains a reference (which has to go after the period). Here is a MWE:

\documentclass{report} \usepackage[nonumberlist,description]{glossaries} \newglossaryentry{gls:Acoustic}{   name=acoustic,   description=     {Associated with sound, or more generally with mechanical wave propagation in a      medium.\cite{Morfey2000}},} \setglossarystyle{altlist} \makeglossaries \begin{document} \glsaddall \printglossaries \bibliographystyle{abbrv}\bibliography{references} \end{document}

and the reference.bib file
@book{Morfey2000,   author={C. L. Morfey},   title={Dictionary of Acoustics},   year=2000,   address={Harcourt Place, 32 Jamestown Road, London NW1 7BY, UK},   publisher = {Academic Press}}

After running pdflatex, bibtex, makeglossaries,pdflatex,pdflatex, you get the attached, MWE.pdf. Notice the double period at the end of the glossary description. I have skimmed the glossaries documentation where they have an example of redefining the list glossary style (http://mirrors.rit.edu/CTAN/macros/latex/contrib/glossaries/glossaries-user.pdf), but to be honest this might as well be written in Chinese (which I don't understand). It seems that it would be trivial to find that dot and delete it, any help would be greatly appreciated.
Attachments
MWE.pdf
Minimum working example of extra period in altlist glossary style.
(48.29 KiB) Downloaded 149 times

Tags:

Johannes_B
Site Moderator
Posts: 4100
Joined: Thu Nov 01, 2012 4:08 pm
Once you know how LaTeX works, solving this isue is a matter of three minutes. Locate the glossaries package code, find the style file that contains the style, take a look at the specific style and notice: There is a macro \glspostdescription. Renewing this to be empty solves your issue. I haven't checked, though, if there might be other things that now work unexpected.

\documentclass{report} \usepackage[nonumberlist,description]{glossaries} \newglossaryentry{gls:Acoustic}{	name=acoustic,	description=	{Associated with sound, or more generally with mechanical wave propagation in a		medium.~\cite{doody}	},} \setglossarystyle{altlist}\renewcommand{\glspostdescription}{} \makeglossaries \begin{document}\glsaddall \printglossaries \bibliographystyle{abbrv}\bibliography{biblatex-examples} \end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

LeonardLopes
Posts: 11
Joined: Mon Nov 16, 2015 7:27 pm
Thank you. I was reluctant to modify the glossary distribution, but in my document, I placed:

\setglossarystyle{altlist} \renewcommand*{\glspostdescription}{%   \spacefactor\sfcode\. }

This is taken from the following in glossaries.sty:

\newcommand*{\glspostdescription}{%   \ifglsnopostdot\else.\spacefactor\sfcode\. \fi}

Now, the only problem I have is the acronyms are in the abbreviated form in the glossaries....

LeonardLopes
Posts: 11
Joined: Mon Nov 16, 2015 7:27 pm
I assume that I could set \glsnopostdot, but I couldn't figure out how to do that.

Johannes_B
Site Moderator
Posts: 4100
Joined: Thu Nov 01, 2012 4:08 pm
Don't fiddle with space factors.

You can also add this instead of renewing any macros: \glsnopostdottrue.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

LeonardLopes
Posts: 11
Joined: Mon Nov 16, 2015 7:27 pm
That was it! Thanks a lot, you've ended about a day of banging my head on a wall... now for the next wall...

nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am
The simplest method, which no one has mentioned so far, is to use the nopostdot package option:

\usepackage[nopostdot]{glossaries}

This setting can also be used on a per-glossary basis:

\printglossary[nopostdot]

Return to “MakeIndex, Nomenclature, Glossaries and Acronyms”

### Who is online

Users browsing this forum: No registered users and 0 guests