# Automating custom entry names in glossary

I've been trying to get used to the glossary package but I'm having quite some problem as I'm probably doing some mistakes as I've always to manually edit .gls file.

\newglossaryentry{cars}{name=cars, description={Something you can drive}}
\newglossaryentry{apples}{name=apples, description={Something you can eat}}
\makeglossaries


with references

\gls{cars} .... \gls{apples}


Doing this will leave my text correct but will add the plural form of the words in the glossary, while trying to put in either the first brackets or as name value the singular version will solve the problem in the glossary but put the singular form in the text. Of course I've solved myself manually editing the .gls file but it doesn't seem the right way to do it to me, am I missing anything ? (I'm using xindy and toc, I don't know if it counts )

• Sorry for asking, but do you run makeglossaries without problems? – Chris Oct 31 '13 at 11:39
• yes, 0 warnings too – Eit Oct 31 '13 at 12:22
• As a side note, there's a missing comma in \newglossaryentry{apples} after the name. – karlkoeller Oct 31 '13 at 15:55
• sorry, it was a mistake in the example, the real document has the correct syntax since I don't have any errors or warnings – Eit Oct 31 '13 at 16:47

You should be putting the singular word in to the glossary. If you need the plural in the text then use \glspl instead of \gls:

\documentclass{article}

\usepackage{glossaries}
\newglossaryentry{car}{name=car, description={Something you can drive}}
\newglossaryentry{apple}{name=apple, description={Something you can eat}}
\makeglossaries

\begin{document}

One \gls{car} and many \glspl{car}.

\printglossaries

\end{document}

• This can fix it, but what if it doesn't have the uppercase letter in the text but I want it in the glossary, is there something similar and can I combine plurals and lowercase letters words ? – Eit Nov 2 '13 at 9:21
• On a side note, even it OT, glspl does not work correctly with glossary entries with including more words like \glspl{data breach} should I declare this type of entries differently ? – Eit Nov 2 '13 at 9:29
• You can define the plural version of an entry on declaration by adding plural=data breaches in the second argument of \newglossaryentry. – Andrew Swann Nov 2 '13 at 10:17
• name=Car,text=car will produce a capitalised entry in the glossary, but lower case in text with \gls. The capitalised version is obtained with \Gls. – Andrew Swann Nov 2 '13 at 10:26