latex3 / unicode-math

XeLaTeX/LuaLaTeX package for using unicode/OpenType maths fonts
http://ctan.org/pkg/unicode-math
LaTeX Project Public License v1.3c
239 stars 28 forks source link

\it with \bar internal error when using latin modern font for italic letters. #610

Open libinxu01 opened 1 year ago

libinxu01 commented 1 year ago

Description

I declare latin modern font for italic letters, but when I use single letter with \it and \bar, it results in internal error. I wonder how to resolve it ? error

I found it's weird that \bar{\it{v}} is wrong, but \bar{\it{vv}} is right.

Add info or delete as appropriate:

Minimal example demonstrating the issue

\documentclass{book}

\usepackage[bold-style=ISO, mathbf=sym]{unicode-math}
\setmathfont{TeX Gyre Termes Math}
\AtBeginDocument{\DeclareMathAlphabet{\mathit}{OML}{lm}{m}{it}}

\begin{document}
    $ \it{v} $\par
    $ \mathit{v} $\par
    $ \bar{\it{v}} $\par
\end{document}