1

This error seems to occur since I updated the TeX Live 2017 packages. When I try to use \mathrm in a \newglossaryentry, it results in in two errors:

! Missing { inserted. __um_group_begin: l.83 \gls{sFSW} \gls{HIL} A left brace was mandatory here, so I've put one in. You might want to delete and/or insert some corrections so that I will find a matching right brace soon. If you're confused by all this, try typing `I}' now.

! Missing } inserted. } l.83 \gls{sFSW} \gls{HIL} I've inserted something that you may have forgotten. (See the above.) With luck, this will get me unwedged. But if you really didn't forget anything, try typing `2' now; then my insertion and my current dilemma will both disappear.

Also, using e.g. $F_\mathrm{SW}$ within the document results in the same errors.

Without the unicode-math package or when not using \mathrm in the glossary entry, I receive no errors.

(Almost) MWE:

\documentclass[
a4paper,                            % alle weiteren Papierformate einste
headsepline,                        % Trennline zum Seitenkopf  
headings=normal,                
listof=totoc, version=first,        % Abb.- und Tab.verzeichnis im Inhalt
bibliography=totoc, version=first,  % Literaturverzeichnis im Inhalt
numbers=noenddot,                   % Keine Endpunkte wie 1.2. sondern 1.2
]
{scrbook}


\usepackage{fontspec}
\usepackage{mathtools}      % includes: \usepackage{amsmath} (-> needed e.g. for bmatrix) !! load BEFORE \usepackage{unicode-math}
\usepackage{unicode-math}   % Unicode mathematics support for X∃TEX and LuaTEX

% Set font 
%\setromanfont{Cambria}
%\setsansfont{Calibri}
%\setmonofont{Consolas}
%\setmathfont{Cambria Math}

\usepackage[  %Paket Glossaries laden, muss nach Hyperref geladen werden!
xindy,
nonumberlist, % keine Seitenzahlen anzeigen           
acronym,      % ein Abkürzungsverzeichnis erstellen
toc           % Einträge im Inhaltsverzeichnis
] 
{glossaries}

\newglossary[slg]{symbolslist}{syi}{syg}{Table of Symbols}
\renewcommand*{\glspostdescription}{}

%Glossar-Befehle anschalten
\makeglossaries

\newglossaryentry{sFSW}{
    name=\ensuremath{{F_\mathrm{SW}}},
    description={Driver force, generated by steering wheel moment, acting on the gear rack.},
    sort=FSW, type=symbolslist
}  
% Acronyms
\newacronym{HIL}{HIL}{Hardware-in-the-Loop}

\begin{document}
\pagenumbering{Roman}
\printglossary[type=symbolslist,style=long]
\printglossary[type=\acronymtype, title=Acronyms, nonumberlist=true, toctitle=Acronyms]

\mainmatter                     % Hauptteil
\pagenumbering{arabic}

    \chapter{Test}
    \gls{sFSW} \gls{HIL}

    $F_\mathrm{SW}$

\end{document}
2

The syntax F_\mathrm{SW} is wrong and it happens to work with pdflatex just by chance.

The correct syntax is, and always has been, F_{\mathrm{SW}}.

So just do

\newglossaryentry{sFSW}{
  name=\ensuremath{F_{\mathrm{SW}}},
  description={Driver force, generated by steering wheel moment, acting on the gear rack.},
    sort=FSW, type=symbolslist
}  

and your problem will be solved.


The apparent success of F_\mathrm{SW} is due to how \mathrm is implemented in the LaTeX kernel. However, unicode-math must implement it in a different way, which makes the unsupported syntax to fail.

  • I did not know this and always used it wrong. Thank you! – Konne Feb 27 '18 at 13:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.