josephwright / siunitx

A comprehensive (SI) units package for LaTeX
LaTeX Project Public License v1.3c
361 stars 26 forks source link

Overful box with tables and unicode-math loaded #759

Open josephwright opened 1 week ago

josephwright commented 1 week ago

For example

\documentclass[draft]{article}
\usepackage{unicode-math}
\usepackage{siunitx}
\begin{document}
\begin{tabular}{S[table-format = 2.1]}
  0.0 \\
  11.2 \\
  22.2 \\
  33.3 \\
  44.4 \\
  55.5 \\
  66.6 \\
  77.7 \\
  88.8 \\
  99.9 \\
\end{tabular}

\end{document}
josephwright commented 1 week ago

This is happening as there is a kern added between 7 and . with Latin Modern Math (see discussion starting https://chat.stackexchange.com/transcript/message/66647483#66647483).

josephwright commented 1 week ago

In LuaTeX using \mathitalicsmode is a fix - for XeTeX we'd need to 'isolate' the . - doable but feels messy

josephwright commented 1 week ago

@davidcarlisle notes that the 7 in Latin Modern Math is based on the CM italic one:

(CHARACTER C 7
   (CHARWD R 0.511108)
   (CHARHT R 0.644444)
   (CHARDP R 0.194445)
   (CHARIC R 0.135556)
   )

which is weird