latex3 / unicode-math

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

range= failing for undeclared slots #381

Open davidcarlisle opened 7 years ago

davidcarlisle commented 7 years ago

I expected the middle line here to shpw a pencil


\documentclass{article}

\usepackage{unicode-math}

\setmathfont{latinmodern-math.otf}
\setmathfont{DejaVu Sans}[ range={"270E} ]

\setmainfont{DejaVu Sans}

\begin{document}

✎=abc

$✎=abc$

$\mbox{✎}=abc$

\end{document}

But the U+270E still comes from latin modern in the math case (and so is dropped as missing)

Ulrike pointed out it works if you add

\UnicodeMathSymbol{"0270E}{\pencil}{\mathord}{pencil}%

to unicode-math-table.tex but it shouldn't be necessary to define a csname should it?

wspr commented 7 years ago

It had never occurred to me… perhaps no? Would certainly make sense.

wspr commented 6 years ago

I should have put a comment here. With recent changes if you ask for an unknown slot it explicitly throws an error. I'm not entirely against an extensible system but I'm still thinking about it. In one sense I think it's better to add slots to unicode-math-table, since the number of possible unicode chars used in mathematics is finite. But my plan is to split that file into subsets, which fits into the idea of having more extensibility.