# Delimiter in different math font

Good day, Here we are using STIXMath-Regular for math font as per customer requirement, in STIXmath-Regular font over brace is clash with text, for alternate we plan to use STIXMathTwo font for over brace. Please suggest how to map over brace for this font.

MWE:

\documentclass{book}

\usepackage{xltxtra}
\usepackage{xunicode}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\usepackage{unicode-math}%
\usepackage{multirow}

\setmathfont{STIXMath-Regular}

\begin{document}
$\begin{array}{l} \textrm{E}=\left \{\begin{array}{l@{}} {\overbrace{{laafkj}}^{2}},\, {\overbrace{{11-31}}^{2}} {\overbrace{{1-3}}^{2}} {\overbrace{{1-3}}} {\overbrace{{R}}} {\overbrace{{RH}}^{2}} \end{array}\right \}\\ \end{array}$

\end{document}


• Just out of curiosity: Why are you encasing almost every subformula in unneeded extra pairs of curyl braces? And what's with the two nested array environments? They don't seem to serve a discernible purpose.
– Mico
Jul 17 '18 at 13:14
• Please do tell us which TeX distribution you employ and what the version of XeTeX is that's installed on your system.
– Mico
Jul 17 '18 at 13:21
• Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. Oct 12 '18 at 13:16

## 1 Answer

Short answer: \setmathfont[range=\overbrace]{Stix Two Math}.

Longer answer: The real customer requirement is XITS Math, which has the glyphs from STIX Math Regular, but a working math table, scripts and other OpenType features. STIX Math Regular doesn’t even work as the main math font any more with unicode-math v0.81. You can thank Khaled Hosny for XITS and many other great fonts.

I can’t reproduce your bug with \overbrace on TeX Live 2018, but I got a different one. (@egreg could in TeX Live 2016.) If you want to replace the overbrace because it clashes with your text font, that’s likely an XY problem. Here’s the solution you requested, anyway. Delete the line \setmathfont[range=\overbrace]{Stix Two Math} if you want to use a single math font.

I took the liberty of changing the main text font to the matching STIX family, and changing \textrm within equations to \symup so that upright math symbols will be properly set in the math font.

Finally, I removed all packages not used in this MWE and some unnecessary pairs of braces. I left in the nested \array environments for the sake of this example, but it’s not how I would write that code.

\documentclass[varwidth, preview]{standalone}
\usepackage{unicode-math}

\setmainfont{STIX-Regular}[
BoldFont=STIX-Bold,
ItalicFont=STIX-Italic,
BoldItalicFont=STIX-Bold Italic,
Ligatures={Common, TeX}]
\defaultfontfeatures{Scale=MatchUppercase}

\setmathfont{XITS Math}
\setmathfont[range=\overbrace]{STIX Two Math}

\begin{document}

\normalfont{STIX Regular E}
{\fontspec{Latin Modern Roman}Latin Modern Roman E}

$$\begin{array}{l} \symup{E}=\left\{ \begin{array}{l@{}} \overbrace{laafkj}^{2},\, \overbrace{11-31}^{2} \overbrace{1-3}^{2} \overbrace{1-3} \overbrace{R} \overbrace{RH}^{2} \end{array} \right\} \end{array}$$

\end{document}


• I can only reproduce the OP's issue with TeX Live 2016; with later releases, the call for STIXMath-Regular is silently ignored. Jul 17 '18 at 14:37
• @Davislor thanks for your answer, which has helpful for me. Jul 18 '18 at 11:56
• @RajeshKumar Glad to help. Please consider accepting it. :) Jul 18 '18 at 13:35
• Yeah! I accepting it, one more clarification is required, If I used "STIX Two Math" after "STIX Math". All the other symbols getting changed into "STIX two math". I want overbrace only in "stix two math". Please suggest how to resolve this. Thanks in advance :) Jul 20 '18 at 5:01
• @RajeshKumar If, however, you really do want to solve problem Y and not problem X, you might try \setmathfont[range="23de]{STIX Two Math} instead of \setmathfont[range=\overbrace]{STIX Two Math}. Jul 20 '18 at 8:00