0

I noticed the problem with the cases environment, but it is due to using braces that are bigger than \Bigg.

enter image description here

How can I make (1) to be the same style as (2)?

\documentclass{article}
\usepackage{amsmath}
\usepackage{unicode-math}
\setmathfont[]{LucidaBrightMathOT.otf}

\begin{document} \begin{equation} \begin{cases} \sum\limits_{i=1}^m & \text{if (i \neq j)} \ 1 & \text{if (i = j)} \end{cases} \end{equation}

\begin{equation} \begin{cases} \sum_{i=1}^m & \text{if (i \neq j)} \ 1 & \text{if (i = j)} \end{cases} \end{equation} \end{document}

Manuel Schmidt
  • 3,537
  • 1
  • 19
  • 33
  • 1
    luatex or xetex? It is a choice of the font designer so can't be controlled from tex, you could use the lua virtual font feature to remove the designed { and move directly to the form made from extension pieces. Or you could use a very small font size, then they would both be straight, but thin – David Carlisle Nov 06 '22 at 13:10
  • 2
    a font has a fixed number of designed { then switches to an extension form that has to be straight as it is made up of segments. Or you can use tikz to draw a { and not use a font (answers on this site somewhere) – David Carlisle Nov 06 '22 at 13:13
  • https://tex.stackexchange.com/questions/372776/appealing-braces-in-tikz – David Carlisle Nov 06 '22 at 13:44
  • I use lualatex. – Manuel Schmidt Nov 06 '22 at 15:21

1 Answers1

1

As a solution you can use braces from another math font, for example Latin Modern Math. unicode-math allows loading ranges of math characters from different fonts. The following code uses braces from Latin Modern Math while all the other symbols are taken from STIX Two Math (I don't have Lucida to use in the example):

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{STIX Two Math}
\setmathfont{Latin Modern Math}[range={"007B,"007D}]
\setmathfont{STIX Two Math}[range={}]
\begin{document}
\[
\qquad
\left\{
  \begin{matrix}
    1&0\\
    0&1
  \end{matrix}
\right\}
\qquad
\left\{
  \begin{matrix}
    1&0&0\\
    0&1&0\\
    0&0&1
  \end{matrix}
\right\}
\qquad
\left\{
  \begin{matrix}
    1&0&0&0\\
    0&1&0&0\\
    0&0&1&0\\
    0&0&0&1
  \end{matrix}
\right\}
\]
\end{document}

The result is: enter image description here

and the result without font substitution would be: enter image description here

Note that every use of \setmathfont overwrites the math font metrics, so in order to get the correct one I had to add \setmathfont{STIX Two Math}[range={}] after replacing braces.