## LaTeX forum ⇒ MakeIndex, Nomenclature, Glossaries and Acronyms ⇒ glossaries | format for first long form of glossary entry Topic is solved

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
Aquaman
Posts: 2
Joined: Wed Aug 28, 2013 3:57 am

### glossaries | format for first long form of glossary entry

Dear Helpers,

I would like to chance how the entry will be displayed on first use in the text. I can use \defglsdisplayfirst{\emph{#1#4}} to change the format. But I don't want to emphasise the whole entry, I would like just to emphasize the long from and the short form shout appear not emphasized in brackets. Like this:
Long term (short term).

The code so far:
\documentclass{article}\usepackage{glossaries} \newacronym{sample}{short}{long}\makeglossaries \defglsdisplayfirst{\emph{#1#4}} \begin{document}   First: \gls{sample}. Next: \gls{sample}.   \printglossaries\end{document}

I also tried something like this, with no success. In this case the short form is mssing at all:

Does anybody has an idea? Thank you very much and with best regards,
Aquaman

PS: Sorry for my bad english, it is not my native language.
Last edited by Aquaman on Mon Sep 02, 2013 8:01 pm, edited 1 time in total.

Tags:

nlct
Posts: 271
Joined: Thu Nov 06, 2008 11:15 am
Contact:
It's easiest to define a custom style to do this:

\documentclass{article} \usepackage{glossaries} \makeglossaries \renewcommand*{\CustomAcronymFields}{%   name={\the\glsshorttok},% name is abbreviated form   description={\the\glslongtok},% description is long form   first={\noexpand\emph{\the\glslongtok}\space(\the\glsshorttok)},%   firstplural={\noexpand\emph{\the\glslongtok\noexpand\acrpluralsuffix}\space(\the\glsshorttok)},%   text={\the\glsshorttok},%   plural={\the\glsshorttok\noexpand\acrpluralsuffix}%} \SetCustomStyle \newacronym{sample}{short}{long} \begin{document} First: \gls{sample}. Next: \gls{sample}. \printglossaries \end{document}

Regards
Nicola Talbot

Aquaman
Posts: 2
Joined: Wed Aug 28, 2013 3:57 am
Dear Nicola,