5

As the development of stix2 seems inactive, I want to find at least a local fix for this Problem: Parentheses in bigger matrices are too big as in the following example matrices in stix2 which was compiled from the following code:

\documentclass[11pt]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}

\usepackage{stix2}
%\linespread{1.02}

\begin{document}
    \begin{equation}
        \begin{pmatrix}
            0 & 0 & 0 \\
            0 & 0 & 0 \\
            0 & 0 & 0 \\
            0 & 0 & 0 \\
            0 & 0 & 0
        \end{pmatrix}
        \begin{pmatrix}
            0 & 0 & 0 \\
            0 & 0 & 0 \\
            0 & 0 & 0 \\
            0 & 0 & 0
        \end{pmatrix}
    \end{equation}
\end{document}

It seems like the parentheses scale in steps that are too big. The right matrix has appropriately sized parentheses while the left one's parentheses are too big. Adding a little linespread of 1.02 makes matrices with 4 rows look awful too like the one on the left.

I would like to find a fix for that, but I also don't mind switching to parentheses from another math font. However I really like the smaller (up to \Bigg) sized parentheses of stix2 and I haven't found a font with parentheses that are similar in weight and shape except txfonts. Unfortunately with parentheses from txfonts LaTeX often chooses different sizes (for example \left( \hat{G} \right) produces \big in stix2 and \Big in txfonts).

Another way would be to redefine pmatrix somehow so that it uses the parentheses from txfonts which look similar for matrices with two rows or more but scale appropriately as opposed to stix2. I'd also really appreciate a way to do this.

1 Answer 1

7

Jut adjust the tolerances for stretchy delimiters:

enter image description here

\documentclass[11pt]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}

\usepackage{stix2}
%\linespread{1.02}
\delimiterfactor=900
\delimitershortfall=8pt
\begin{document}
    \begin{equation}
        \begin{pmatrix}
            0 & 0 & 0 \\
            0 & 0 & 0 \\
            0 & 0 & 0 \\
            0 & 0 & 0 \\
            0 & 0 & 0
        \end{pmatrix}
        \begin{pmatrix}
            0 & 0 & 0 \\
            0 & 0 & 0 \\
            0 & 0 & 0 \\
            0 & 0 & 0
        \end{pmatrix}
    \end{equation}
\end{document}
3
  • Thank you very much. Seems to work as expected (although the parentheses are a little too short).
    – Erik
    Commented Feb 15, 2020 at 23:05
  • 1
    @Erik your question said they were too long, so I said that they only needed to cover 90% of the content and get within 8pt of the bounds. If you think that's too aggressive, tweak the values a bit more. Commented Feb 15, 2020 at 23:06
  • Thanks for the explanation. I increased the shortfall a little so that it also works for 5 row matrices. However for matrices with 7 rows I can only choose between way to short parentheses and still to long ones. Do you know any more reliable way to do this? Maybe regarding to the last paragraph of my question? I tried \DeclareMathDelimiter{\txfontslparen}{\mathopen}{txfontsoperators}{"28}{txfontslargesymbols}{"00} but this only gives me small parentheses.
    – Erik
    Commented Feb 15, 2020 at 23:28

You must log in to answer this question.

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