# How can I put a symbol inside a glossary description

I have to make a glossary for a work assignment, and I have ran into some trouble with the description key. I have looked all over google and cannot seem to find an answer for how to put a symbol inside the description key of the glossary term. Basically I have to make definitions that have alphas and mus etc inside the definition itself.

My example is:

%% glossary.tex %%

\documentclass{exam}

%%% Set Up Glossary Options in Global Preamble %%%
\usepackage[nonumberlist]{glossaries}
\setacronymstyle{long-short}
\makenoidxglossaries
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Load Glossary from external file

\begin{document}

% Option to print all terms in glossary even when they are unused

% Actually print the glossary
\printnoidxglossaries

\end{document}


The actual glossary is here:

%% entries.tex %%

%%% Glossary Entries

\newglossaryentry{hello}{
name = hello,
description = {The mean is mu},
sort = hello
}


I would like the 'mu' to be replaced with the greek letter mu. Being somewhat new to LaTex, any help would be very much appreciated. Thanks!

• Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Symbol 1 Aug 6 '15 at 3:02

I suggest to use logical markup with a command \meansymbol, which is set to \mu here, which prints the usual italic version of the greek letter mu. This way, it's easy to make a consistent notation throughout the document.

Additionally, I provided the upshape version, \upmu in the \meanupsymbol -- this requires \usepackage{upgreek} then. (Of course, \upmu can be used in \meansymbol too ;-)

Both versions require the switch to math mode, i.e. $\mu$ or $\upmu$

The alpha letter would be \alpha then, beta is achieved with \beta etc.

\documentclass{exam}

%%% Set Up Glossary Options in Global Preamble %%%
\usepackage{upgreek}
\usepackage[nonumberlist]{glossaries}
\setacronymstyle{long-short}
\makenoidxglossaries

\newcommand{\meansymbol}{\mu}
\newcommand{\meanupsymbol}{\upmu}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Load Glossary from external file

\begin{document}

% Option to print all terms in glossary even when they are unused

% Actually print the glossary
\printnoidxglossaries

\end{document}


The entries.tex contains

\newglossaryentry{hello}{
name = hello,
description = {The mean is $\meansymbol$},
sort = hello
}

\newglossaryentry{uphello}{
name = uphello,
description = {The upshape version of mean is $\meanupsymbol$},
sort = uphello
}