2

I am getting an error using accents package with unicode-math in xelatex. The error is 'Missing number, treated as zero.'

\documentclass{article}
\usepackage{amsmath}
\usepackage{fontspec}
\usepackage{unicode-math}
\setmathfont{latinmodern-math.otf}
\usepackage{accents}
\begin{document}
$\hat{a}$   
\end{document}

1 Answer 1

3

Load accents before unicode-math:

\documentclass{article}
\usepackage{amsmath}
\usepackage{accents}
\usepackage{fontspec}
\usepackage{unicode-math}
\setmathfont{latinmodern-math.otf}
\begin{document}

$\hat{a}\accentset{g}{a}$

\end{document}

enter image description here

1
  • Thanks. The accents package document asks for loading it after amsmath, so I loaded it after all math packages. The document may need an update.
    – Aydin
    May 18, 2017 at 11:35

You must log in to answer this question.

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