I need to use the package unicode-math
in my document, but this makes the height of the brackets in the matrix look too short. (The matrices of order 2 seem to be normal, though.) I have tried various fonts like
- Latin Modern Math,
- NewCM Math,
- TeX Gyre Math,
- Asana Math,
- Libertinus Math, and
- Fira Math.
They all have the same problem. Here is an MWE and the output for both pdfLaTeX and LuaLaTeX.
\documentclass{article}
\usepackage{amsmath} % for 'bmatrix' environment
\usepackage{iftex}
\ifpdftex
\usepackage{lmodern}
\else
\usepackage{unicode-math}
\setmathfont{Latin Modern Math}
\fi
\begin{document}
\[
\begin{bmatrix}
\hline
a & b & c \\
d & e & f \\
g & h & i
\end{bmatrix}
\]
\end{document}
With pdfLaTeX, I get the following output:
whereas with LuaLaTeX, I get this output:
The problem arises with pmatrix
environments as well.
Any insights or solutions would be greatly appreciated.
\delimitershortfall
, for example to set it to0pt
. But that will typically change other delimiters as well. (I would be more worried about the clash one gets if one changes the lower case c to an upper case, or to a lower case f.)\delimitershortfall
.