1

I am actually writing my master thesis on a latex template and I would like to make a glossary entry as "O&M". but the and symbol is not showing up. I have tried different approaches such as:

\& 
$&$
\ensuremath{&}

But none of them work. In the template I have there was the obsolete glossary package and I changed it with the more actual glossaries. There is my preamble:

\usepackage[nonumberlist,nopostdot,xindy]{glossaries}

I hope someon can fix this problem, thanks in advance!

4
  • 1
    Welcome to TeX.SE. While code snippets are useful in explanations, it is always best to compose a fully compilable MWE that reproduces the problem including the \documentclass and the appropriate packages. AFAIK, \& should work, but without a MWE , I can't really test it to make sure it works in your specific case. Commented Jul 26, 2018 at 23:33
  • @PeterGrill Though it may not work as the key for the acronym.
    – cfr
    Commented Jul 27, 2018 at 2:12
  • @cfr: Perhaps. That's what the MWE would clarify. Commented Jul 27, 2018 at 6:12
  • If your template is using a package that was made obsolete in 2007, you might want to consider using a more modern template. If even you have managed to update it to using glossaries instead, it's likely that there's other obsolete code in it. Commented Jul 30, 2018 at 14:15

1 Answer 1

1

This works fine:

\documentclass{article}

\usepackage[nonumberlist,nopostdot,xindy]{glossaries}

\makeglossaries

\newglossaryentry{O+M}{name={O\&M},description={whatever}}

\begin{document}
\gls{O+M}.

\printglossaries
\end{document}

O&M. Glossary O&M whatever

And so does this:

\documentclass{article}

\usepackage[nonumberlist,nopostdot,xindy]{glossaries}

\makeglossaries

\newacronym{O+M}{O\&M}{O and M}

\begin{document}
\gls{O+M}.

\printglossaries
\end{document}

O and M (O&M). Glossary O&M O and M

As mentioned in the comments, special characters like & can't be used in the label, so I've used + instead. The label is just an identifier and doesn't affect the display.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .