3

I have installed Texlive on a new Windows and recognised, that I now receive an error from the nicematrix package.

This is the result with the version from Overleaf (using LuaLaTeX) enter image description here

This is the result when using 6.26d of nicematrix.sty enter image description here

This is the MWE:

\documentclass{article}
\usepackage{fontspec}
\usepackage{mathtools} % includes: \usepackage{amsmath} (-> needed e.g. for bmatrix) !! load BEFORE \usepackage{unicode-math}
%\mathtoolsset{mathic=true}     % https://tex.stackexchange.com/questions/3490/bad-spacing-of-math-letters-within-italic-text
\usepackage{unicode-math}   %Unicode mathematics support for X?TEX and LuaTEX
\usepackage{nicematrix}

\title{Your Paper} \author{You}

\begin{document} \maketitle

\begin{abstract} Your abstract. \end{abstract}

\section{Introduction}

\begin{equation} \mathbfit{W}{x\star} = \begin{NiceArray}{[cccc]@{\quad\enspace}l} w{x\star,{0,1}} & w_{x\star,{0,2}} & \ldots & w_{x\star,{0,h}} & \text{bias} \ w_{x\star,{1,1}} & w_{x\star,{1,2}} & \ldots & w_{x\star,{1,h}} & \Block{4-1}{d \text{ features}} \ w_{x\star,{2,1}} & w_{x\star,{2,2}} & \ldots & w_{x\star,{2,h}}\ \vdots & \vdots & \ddots & \vdots \ w_{x\star,{d,1}} & w_{x\star,{d,2}} & \ldots & w_{x\star,{d,h}}\ \CodeAfter \UnderBrace[shorten,yshift=0pt]{last-1}{last-4}{h,,\mathrm{hidden: units}} \SubMatrix{.}{1-4}{1-4}{}}[xshift=2mm] \SubMatrix{.}{2-4}{5-4}{}}[xshift=2mm] \end{NiceArray} \end{equation}

\end{document}

If I remove [ and ] in \begin{NiceArray}{[cccc]@{\quad\enspace}l}, the error is gone, but also the brackets of the matrix.

enter image description here

Konne
  • 624
  • 4
    You are right. There is a problem. I will investigate (I'm the author of nicematrix). As a workaround, you can write \left[ and \right] instead of [ and ]. – F. Pantigny Feb 18 '24 at 19:52

1 Answers1

1

I have uploaded on CTAN a new version (v. 6.27a 2024-02-19) which solves that bug.

F. Pantigny
  • 40,250