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

Lining numbers #598

Open uswd64 opened 1 year ago

uswd64 commented 1 year ago

Description

I've tried to use lining numbers in math with font Marco but failed.

Add info or delete as appropriate:

Minimal example demonstrating the issue

\documentclass[10pt]{article} \usepackage{amsmath} \usepackage{fontspec} \setmainfont{Marco}[ Scale = 1.0 , Extension = .otf , UprightFont = -Regular , ItalicFont = -Italic , BoldFont = -Bold , BoldItalicFont = -BoldItalic , Numbers = Uppercase ]

\usepackage{unicode-math} \setmathfont{Cambria Math} \setmathfont{Marco}[range=up/{latin,Latin,num}] \setmathfont{Marco}[range={"002C,"002E,"2026}] \setmathfont{Marco Italic}[range=it/{latin,Latin,num}] \setmathfont{XITS Math}[range=\mathrel] \setmathfont{Cambria Math}[range=\mathbb] \setoperatorfont\symup

\begin{document} $x^n+y^n\neq z^n$, wenn $n>2$ und $n, x, y, z \in \mathbb{N}$.

abg 0123456789 ABG \end{document}

Further details

Everything is replaced by Marco as expected. But because Marco uses as default figure style oldstyle numbers the "2" in "$n>2$" is in oldstyle style. The text figures are lining. I can't figure it out how I can get lining numbers in math ...

Ulrich

chapais.pdf

uswd64 commented 1 year ago

Solved: Putting \defaultfontfeatures[Marco]{Numbers = {Proportional,Lining} } above \setmainfont does work.