General\emph in acronym using glossaries package

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
lauraf
Posts: 29
Joined: Tue Jan 13, 2009 12:44 pm

\emph in acronym using glossaries package

Post by lauraf »

Hi all,

I am using the glossaries package, and have defined an acronym as follows:

Code: Select all

\newacronym[sort=SCCS]{SCCS}{\emph{SCCS}}{\emph{Standard Cross-Cultural Sample}}
\gls{SCCS} works fine, but other uses such as \glsdesc{SCCS} or similar return:
“emph –Standard Cross-Cultural Sample ̋
Obviously I am doing something wrong, but could not work out what from the manual. I don't want to redefine the font for the long form of all acronyms (as discussed in the package FAQ) because I only need the long form to be emphasized for this entry.

Many thanks!
Laura
Last edited by lauraf on Wed Jun 03, 2009 10:22 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

\emph in acronym using glossaries package

Post by nlct »

You need to switch off the automatic sanitization using the sanitize=none package option:

Code: Select all

\usepackage[sanitize=none]{glossaries}
(However, if you do this you will need to protect any fragile commands in any acronyms or glossary entries.)

Regards
Nicola Talbot
lauraf
Posts: 29
Joined: Tue Jan 13, 2009 12:44 pm

Re: \emph in acronym using glossaries package

Post by lauraf »

Thank you! And thank you for making the package available!

Best,
Laura
lauraf
Posts: 29
Joined: Tue Jan 13, 2009 12:44 pm

\emph in acronym using glossaries package

Post by lauraf »

This seems to work fine in all cases, except when I set:

Code: Select all

\subsubsection{The \glsentrydesc{SCCS}} \label{sec:introSCCS}
or similar, in which case I get the following error:
! Use of \refstepcounter@optarg doesn't match its definition.
\t@st@ic ...ed@b \expandafter =\reserved@a \relax
\ifx \reserved@b \@let@tok...
l.48 \subsubsection{The \glsentrydesc{SCCS}}
\label{sec:introSCCS}
?
Does anybody know what I am doing wrong?

Many thanks,
Laura
User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

\emph in acronym using glossaries package

Post by nlct »

You need to give some more information. The following works fine for me:

Code: Select all

\documentclass{article}

\usepackage[sanitize=none]{glossaries}
\makeglossaries

\newacronym[sort=SCCS]{SCCS}{\emph{SCCS}}{\emph{Standard Cross-Cultural Sample}}

\begin{document}
\tableofcontents

\subsubsection{The \glsentrydesc{SCCS}} \label{sec:introSCCS}

\end{document}
It's likely that you are using a package or document class that's causing a problem. Change the document class in the above code as appropriate, and add the packages you are using until you get the error. (Also change the glossaries package options as appropriate.)

Regards
Nicola Talbot
Post Reply