# Quoting or italicizing latex glossaries package acronyms on first use (full term only)

Suppose in my .tex document I invoke for the first time \gls{ip}, which based on my definition results in the text:

Internet Protocol (IP)

Is there any way to quote (or italicize) just the long form of the term, to achieve a result like:

"Internet Protocol" (IP)

I know using something like ''\gls{ip}'' I can achieve a result like:

"Internet Protocol (IP)"

...but in this case both the the long form of the term and the acronym end up inside of the quotation marks.

Since there is not much information on the setup of the glossary, I used some standard command to enquote the long term description.

\documentclass{article}

\usepackage[english]{babel}
\usepackage[babel,style=english]{csquotes}
\usepackage{glossaries}

\newcommand{\doquotes}[1]{\enquote{#1}}

\makeglossaries

\newglossaryentry{IP}{%
name={IP},
description={\doquotes{Internet Protocol}}
}%

\begin{document}

\printglossaries
\end{document}


Compile with

pdflatex foo.tex ; makeglossaries -o foo.gls foo.glo

You can simply use LaTeX quotes, e.g.

\newacronym{ip}{IP}{Internet Protocol''}


MWE:

\documentclass{article}
\usepackage[acronym]{glossaries}

\makeglossaries

\newacronym{ip}{IP}{Internet Protocol''}

\begin{document}
First use \gls{ip}

Second use \gls{ip}

\printglossaries
\end{document}


Output:

I suggest you create a new acronym style. You can do so by writing something like the following:

\documentclass{article}
\usepackage[acronym]{glossaries}
\usepackage{csquotes}

\newacronymstyle{enquote-long-short}
{%
\GlsUseAcrEntryDispStyle{long-short}%
}
{%
\GlsUseAcrStyleDefs{long-short}%
\renewcommand*{\genacrfullformat}[2]{%
\enquote{\glsentrylong{##1}##2}\space
(\glsentryshort{##1})%
}%
\renewcommand*{\Genacrfullformat}[2]{%
\enquote{\Glsentrylong{##1}##2}\space
(\glsentryshort{##1})%
}%
\renewcommand*{\genplacrfullformat}[2]{%
\enquote{\glsentrylongpl{##1}##2}\space
(\glsentryshortpl{##1})%
}%
\renewcommand*{\Genplacrfullformat}[2]{%
\enquote{\Glsentrylongpl{##1}##2}\space
(\glsentryshortpl{##1})%
}%
}

\setacronymstyle{enquote-long-short}
\makeglossaries

\newacronym{ip}{IP}{Internet Protocol}

\begin{document}
First use of \gls{ip}, second use of \gls{ip}.
\end{document}


This produces the following result:

• I think this is the best answer since it separates the style from the entry definitions. It will make it a lot easier if you decide to change the style at a later date. (Assuming you want this style for all abbreviations rather than one specific entry.) – Nicola Talbot Nov 7 '15 at 22:01