1

For the following equation, an error shows up

TeX capacity exceeded, sorry [semantic nest size=500]. ...(\vm\right) & a_2\left(\vm\right) & \cdots &

while removing some elements from the array eliminates the error.

\RequirePackage{luatex85}
\documentclass{scrbook}
\usepackage[tuenc,no-math]{fontspec}
\usepackage{unicode-math,mathtools}
\newcommand\vm{\symup{x}}

\begin{document}
\begin{equation}
\mathbf{a\left(x\right)}^T=
\{
\begin{array}{c c c c}
a_1\left(\vm\right) & a_2\left(\vm\right) & \cdots & a_m\left(\vm\right)
\end{array}%
\}
\end{equation}
\end{document}

For the same equation, if unicode-math is removed, and the code changes accordingly, the error doesn't show up.

\RequirePackage{luatex85}
\documentclass{scrbook}
\usepackage[tuenc,no-math]{fontspec}
\usepackage{mathtools}
\newcommand\vm{\mathrm{x}}

\begin{document}
\begin{equation}
\mathbf{a\left(x\right)}^T=
\{
\begin{array}{c c c c}
a_1\left(\vm\right) & a_2\left(\vm\right) & \cdots & a_m\left(\vm\right)
\end{array}%
\}
\end{equation}
\end{document}

1 Answer 1

1

Load mathtools first.

\RequirePackage{luatex85}
\documentclass{scrbook}
\usepackage{mathtools}
\usepackage[tuenc,no-math]{fontspec}
\usepackage{unicode-math}
\newcommand\vm{\symup{x}}

\begin{document}
\begin{equation}
  \mathbf{a\left(x\right)}^T=
  \{
  \begin{array}{c c c c}
    a_1\left(\vm\right) & a_2\left(\vm\right) & \cdots & a_m\left(\vm\right)
  \end{array}%
  \}
\end{equation}
\end{document}
4
  • More precisely, amsmath should be loaded before unicode-math. Note that \left and \right are wrong here.
    – egreg
    Aug 11, 2017 at 8:08
  • @egreg I thought \left and \right seemed wrong here, too. That is, it is not how I would have done it. But I wasn't sure it was wrong and not just different - I just don't know enough about typesetting maths. (But I guess I would think it wrong in logic, so probably that's the same?)
    – cfr
    Aug 11, 2017 at 15:08
  • @egreg May I know the proper way to use \left and \right, and why my way is wrong? Thanks
    – Diaa
    Aug 11, 2017 at 22:17
  • 2
    @DiaaAbidou If you compare with and without \left and \right, you'll see that the spacing is different (and the additional space isn't wanted in general), but the size of the delimiters is the same.
    – egreg
    Aug 12, 2017 at 8:51

You must log in to answer this question.

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