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

Option no-math of package fontspec causes \degree to print nothing #505

Closed
mrpiggi opened this issue Jul 14, 2021 · 4 comments
Closed

Option no-math of package fontspec causes \degree to print nothing #505

mrpiggi opened this issue Jul 14, 2021 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@mrpiggi
Copy link

mrpiggi commented Jul 14, 2021

\degree prints nothing with v3 and no-math passed to fontspec (new issue from #351 (comment))

\documentclass{article}
\usepackage[no-math]{fontspec}
\usepackage{siunitx}
\begin{document}
ang: \ang{180}
degree: \SI{180}{\degree}?
Celsius: \SI{180}{\celsius}?
\end{document}
@josephwright josephwright self-assigned this Jul 14, 2021
@josephwright josephwright added the bug Something isn't working label Jul 14, 2021
@josephwright
Copy link
Owner

This is happening as I've tried as far as possible to leave unit definitions with 'just the characters'. For the degree symbol, I know that doesn't work for classical LaTeX, so I swap out for \text{\textdegree}, which does work in all cases. However, I'd left the fontspec case alone as usually it can print a math mode degree symbol. I'll go with the easiest fix: just use the same setup for fontspec as without it (there's currently no public test for the no-math option, and it doesn't really seem worth asking for one here as it's something that can be fixed another way).

@josephwright
Copy link
Owner

Is a fix urgent, BTW? You should be fine with

\DeclareSIUnit[quantity-product = ]\degree{\text{\textdegree}}
\DeclareSIUnit\degreeCelsius{\text{\textdegree}C}

until I do the next release.

@mrpiggi
Copy link
Author

mrpiggi commented Jul 15, 2021

Since a workaround exists, there is no urgency.

@josephwright
Copy link
Owner

@mrpiggi OK, I'll wait a few days to see if there is anything else at the moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants