2

I am using the amsmath package and fonts, but would like to import a few delimiters from stix. Following the instructions here: How to use only selected math symbols of the STIX fonts?

I can import the desired delimiters. However, I would like to automatically scale those delimiters according to the size of the interior math expression (the commands \left{ and \right} come to mind). I know I can manually change their size with commands like \bigl\lBrace, but it is important that it can happen automatically (as done with the \left and \right commands).

MWE:

\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

\DeclareFontEncoding{LS2}{}{\noaccents@}
\DeclareFontSubstitution{LS2}{stix}{m}{n}
\DeclareSymbolFont{largesymbolstix}{LS2}{stixex}{m} {n}
\DeclareMathDelimiter{\lBrace}{\mathopen}{largesymbolstix}{"E8}{largesymbols}{"0E}
\DeclareMathDelimiter{\rBrace}{\mathclose}{largesymbolstix}{"E9}{largesymbols}{"0F}
\DeclareMathDelimiter{\lbrbrak}{\mathopen}{largesymbolstix}{"EE}{largesymbols}{"14}
\DeclareMathDelimiter{\rbrbrak}{\mathclose}{largesymbolstix}{"EF}{largesymbols}{"15}
\DeclareMathDelimiter{\lParen}{\mathopen}{largesymbolstix}{"DE}{largesymbols}{"02}
\DeclareMathDelimiter{\rParen}{\mathclose}{largesymbolstix}{"DF}{largesymbols}{"03}


\begin{document}

$\left\lBrace \begin{array}{cc}x & y\\y& z\end{array} \right\rBrace$

\end{document}

If I remove the \left and \right commands, my output has the correct braces, but not appropriately sized. Any ideas?

2
  • 2
    Welcome to tex.sx. I've taken the liberty of reformatting your code. You can do this yourself by highlighting the code block (by mousing over), then clicking on the {} icon above the question box. Jul 27, 2019 at 20:54
  • 1
    You need largesymbolstix in both places of every line.
    – egreg
    Jul 27, 2019 at 21:11

1 Answer 1

1

You have to refer to largesymbolstix in both places.

\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

\makeatletter % <---- Don't forget
\DeclareFontEncoding{LS2}{}{\noaccents@}
\makeatother
\DeclareFontSubstitution{LS2}{stix}{m}{n}
\DeclareSymbolFont{largesymbolstix}{LS2}{stixex}{m} {n}
\DeclareMathDelimiter{\lBrace}{\mathopen}{largesymbolstix}{"E8}{largesymbolstix}{"0E}
\DeclareMathDelimiter{\rBrace}{\mathclose}{largesymbolstix}{"E9}{largesymbolstix}{"0F}
\DeclareMathDelimiter{\lbrbrak}{\mathopen}{largesymbolstix}{"EE}{largesymbolstix}{"14}
\DeclareMathDelimiter{\rbrbrak}{\mathclose}{largesymbolstix}{"EF}{largesymbolstix}{"15}
\DeclareMathDelimiter{\lParen}{\mathopen}{largesymbolstix}{"DE}{largesymbolstix}{"02}
\DeclareMathDelimiter{\rParen}{\mathclose}{largesymbolstix}{"DF}{largesymbolstix}{"03}

\begin{document}

$
\left\lBrace \begin{array}{cc}x & y\\y& z\end{array} \right\rBrace
\left\lbrbrak \begin{array}{cc}x & y\\y& z\end{array} \right\rbrbrak
\left\lParen \begin{array}{cc}x & y\\y& z\end{array} \right\rParen
$

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .