1

Unfortunately, the package soul does not coexist well with glossaries. From this answer it seems that to get both packages to work within the same document one must make use of the \soulregister command.

This seems to be a viable workaround for \gls, as the following example demonstrates:

\documentclass{article}
\usepackage[nonumberlist]{glossaries}
\usepackage{soul}

\soulregister \gls7 \newglossaryentry{test}{ name=test, description=test }

\begin{document} \ul{\gls{test}} \clearpage \printglossary \end{document}

If, by the same token, I try to add \glsdisp to the \soulregister, my .tex file does not compile:

\documentclass{article}
\usepackage[nonumberlist]{glossaries}
\usepackage{soul}
\soulregister \glsdisp7
\newglossaryentry{test}{
  name=test,
  description=test
  }

\begin{document} \ul{\glsdisp{test}{testing}} \clearpage \printglossary \end{document}

If I compile the above, I get the following error for line 11:

Missing number, treated as zero.

How do I get glsdisp to behave with soul?

user32882
  • 1,594

0 Answers0