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

Setting cdmath=false when using unicode-math package breaks typesetting of math operators #84

Open
sfo opened this issue Nov 28, 2022 · 1 comment
Assignees
Labels
Milestone

Comments

@sfo
Copy link
Contributor

sfo commented Nov 28, 2022

Setting cdmath=false as class option when using the unicode-math package leads to issues in typesetting of math operators like \ln and \exp, which are now italicized.

This MWE:

\documentclass[
  cdmath=false,
]{tudscrartcl}

\usepackage{unicode-math}

\begin{document}
Hello, Math: $x = \ln (σ) + \exp (μ)$
\end{document}

leads to:
math_wrong

This issue seems to go into the same direction as #22. The workaround is also the same:

\documentclass[
  % cdmath=false, % do NOT specify here
]{tudscrartcl}

\usepackage{unicode-math}

\begin{document}
\TUDoptions{cdmath=false} % but here

Hello, Math: $x = \ln (σ) + \exp (μ)$

\end{document}

Another observation: When using the subfiles package it's required to set \TUDoptions{cdmath=false} explicitly after \begin{document} in each file. Setting it in \AtBeginDocument{} does not work.

@mrpiggi mrpiggi self-assigned this Nov 29, 2022
@mrpiggi mrpiggi added the bug label Nov 29, 2022
@mrpiggi mrpiggi added this to the v2.07 milestone Nov 29, 2022
@mrpiggi
Copy link
Member

mrpiggi commented Nov 29, 2022

The font selection mechanism needs to be refactored in various places and an improved interaction with unicode-math is on my list. Currently, the actual font selection is delayed to the end of the preamble an especially the math font selection is done even after the begindocument hook. Maybe using \AfterEndPreamble{...} would help for the subfiles issue. Unfortunately, I do not have time to work on the next major release so please do not expect any improvements in the near future.

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

No branches or pull requests

2 participants