Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set mode for fonts used in math #460

Open
2 of 4 tasks
zauguin opened this issue Apr 20, 2022 · 0 comments
Open
2 of 4 tasks

Set mode for fonts used in math #460

zauguin opened this issue Apr 20, 2022 · 0 comments

Comments

@zauguin
Copy link
Member

zauguin commented Apr 20, 2022

Description

Currently fontspec sets the current text fonts as default fonts for \mathrm (...). Since the current
text fonts typically uses the node or harf shaper in LuaLaTeX this uses such fonts in math mode which
doesn't actually work since math mode is not processed by these shapers.

Can fontspec (at least for LuaTeX) automatically set \mathrm (...) to equivalent fonts with mode=base?

Check/indicate

  • Relevant for XeTeX
  • Relevant for LuaTeX
  • Issue tracker has been searched for similar issues?
  • Links to <tex.stackexchange.com> discussion if appropriate

Minimal example demonstrating the issue

\documentclass{article}
\usepackage{fontspec}
\setmainfont{texgyrepagella}
\begin{document}
$\mathrm{H}H$
\typeout{\string\mathrm: \fontname\textfont0}
\end{document}

shows that \mathrm has mode=node instead of mode=base.

Further details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant