7

In optics, the "dioptre" unit's symbol is δ (lowercase delta). As long as I don't use unicode-math, the following code gives the expected result, but with it, the unit is missing in the output:

\documentclass[french]{article}
\usepackage{polyglossia}
\setdefaultlanguage{french}
\usepackage{unicode-math}
\setmathfont{STIX Two Math}

\usepackage[output-decimal-marker={,}, exponent-product=.,, group-digits=true]{siunitx}

\begin{document}
\qty{4}{\delta}
\end{document}

Is there a way to make siunitx and unicode-math play well together in this case?

1 Answer 1

5

You should define the appropriate unit name and the corresponding symbol.

\documentclass{article}
\usepackage{unicode-math}
\usepackage{polyglossia}

\setdefaultlanguage{french}
\setmathfont{STIX Two Math}

\usepackage{siunitx}

\sisetup{
  output-decimal-marker={,},
  exponent-product=.,
  group-digits=true
}
\DeclareSIUnit{\dioptre}{\ensuremath{\symup{\delta}}}

\begin{document}

\qty{4}{\dioptre}

\end{document}

enter image description here

1
  • It works perfectly, thank you!
    – Miyase
    May 2 at 22:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.