My report features Abbreviations and List of symbols in the following format:

enter image description here

enter image description here

The list of symbols has been customized to have the unit column instead of the index column. When I compile everything works, but I get numerous errors of the format (with slight variations):

Missing $ inserted.

$ l.6 ...etentrycounter[]{page}\glsnumberformat{3}}} % I've inserted a begin-math/end-math symbol since I think you left one out. Proceed, with fingers crossed.

! Extra }, or forgotten $. @textcolor ...otect \leavevmode {\color #1{#2}#3}

I am using overleaf and pdfLaTeX. I suspect it has something to do with overriding the index with the unit column but have not been able to fix it.


\usepackage[colorlinks=true, allcolors=cyan, urlcolor=black, acronym=black]{hyperref}

%%% --- Customise glossaries
\renewcommand*{\glstextformat}[1]{\textcolor{black}{#1}} %hyperlink set to black
\renewcommand*{\glsnamefont}[1]{\textbf{#1}} %hyperlink set to bold
\setacronymstyle{long-short} %will spell out the first occurrence using \gls{}

%%% --- make the glossaries
%% make list of symbols
\newglossary[slg]{symbolslist}{syi}{syg}{List of symbols}

%% make abbreviations, load all glossaries
%\loadglsentries{glossary}  %avoided for MWE 

%%% ---  Define List of Symbols style
\setglossarystyle{long3col}% base this style on the list style
\renewenvironment{theglossary}{% Change the table type --> 3 columns
\renewcommand*{\glossaryheader}{%  Change the table header
  \bfseries Sign & \bfseries Description & \bfseries Unit \\
\renewcommand*{\glossentry}[2]{%  Change the displayed items
\glstarget{##1}{\glossentryname{##1}} %
& \glossentrydesc{##1}% Description
& \glsunit{##1} \tabularnewline

%%%%%%%% -------------- DOCUMENT --------------- %%%%%%%%

\newacronym{adcs}{ADCS}{Attitude Determination \& Control subsystem}
\newacronym{vleo}{VLEO}{Very Low Earth Orbit}

    name = \ensuremath{\pi},
    description = {Geometrical value},
    unit = {-},
    type = {symbolslist}
    name = \ensuremath{\mu},
    description = {Earth's gravitational parameter},
    unit = {m^3/s^2},
    type = {symbolslist}

%% sample example
\textbf{These are some abbreviations:} \gls{adcs}  \gls{vleo} \\
\textbf{These are some symbols:} \gls{symb:Pi} \gls{mu}

%% print the glossaries
\setlength\glsdescwidth{0.9\textwidth} %\textwidth-9\tabcolsep is used in the full document
\printglossary[type=symbolslist, style=symbunitlong]


I also get a hyperref package error.

Any tips on removing the errors, without changing the layout and hyperlinks?

As a side question I was also trying to store abbreviations and list of symbol entries in two separate files and use \loadglsentries twice, but that would not work, suggestions on separating them?

1 Answer 1


The issue is unrelated to glossaries. TeX is complaining about you using ^ in text mode (in the unit of mu). Putting the exponents in math mode will resolve this.

A far superior way to typeset units is using siunitx (in this case you could write \si{\cubic\meter\per\square\second} with per-mode=symbol, though \si{m^3/s^2} also works, in case you are lazy).

Also note that hyperref is complaining because it does not know the option acronym.

You must log in to answer this question.

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