'create-large-nodes' 和 'name suffix=-large' 选项在 nicematrix latex 包中不起作用

'create-large-nodes' 和 'name suffix=-large' 选项在 nicematrix latex 包中不起作用

我一直在使用create-large-nodes nicematrix环境选项与 的组合name suffix=-large,其用法类似于tikz选项,在code-after nicematrix,就像在nicematrix 包文档但它返回以下错误消息:

​! 包 pgf 错误:没有已知名为 nm-1-1-1-large-large 的形状。

看来这些nicematrix选项无法正常工作。有人知道发生了什么吗?

MWE 如下。

\documentclass{article}


\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{nicematrix}
\usetikzlibrary{matrix}


\begin{document}


\begin{small}           
    \begingroup
    \allowdisplaybreaks
    \begin{align}
        \boldsymbol{\mathcal{F}}^{i} = & %
        \begin{bNiceArray}{CCCCCC}[%
        create-large-nodes, 
        margin,
        extra-margin=2pt,
        code-after={\tikz[name suffix=-large]{\node (a) at (1-4) {$a$};}},
        ]
        \Block{3-3}{\tikz{\node(FAlephNode){$\boldsymbol{\mathcal{F}}_{\boldsymbol{\aleph}}^{i}$};}}  &  &           & \mathtt{f}_{1\,(\varpi+1)}          & \cdots & \mathtt{f}_{1\,\eta} %
        \\
        &  &           & \vdots                              & \vdots & \vdots               %  
        \\
        &  &           & \mathtt{f}_{\varpi\,(\varpi+1)}     & \cdots & \mathtt{f}_{\varpi\,\eta} %
        \\
        \mathtt{f}_{(\varpi+1)\,1} & \cdots & \mathtt{f}_{(\varpi+1)\,\varpi} & \mathtt{f}_{(\varpi+1)\,(\varpi+1)} & \cdots & \mathtt{f}_{(\varpi+1)\,\eta} %
        \\
        \vdots                     & \vdots & \vdots                          & \vdots                              & \ddots & \vdots               %
        \\
        \mathtt{f}_{\eta\,1}       & \cdots & \mathtt{f}_{\eta\,\varpi}       & \mathtt{f}_{\eta\,(\varpi+1)}       & \cdots & \mathtt{f}_{\eta\,\eta} %
        \end{bNiceArray}%
        \label{eq:someequation}
    \end{align}
    \endgroup
\end{small}



\end{document}

答案1

1-1该命令在单元格中创建的块\Block的名称1-1nicematrix(这在的文档中没有明确说明nicematrix:我可能会更改这一点)。

因此,您可以使用它在该块上添加支架(我们不需要“大节点”):

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{nicematrix}
\usetikzlibrary{decorations.pathreplacing}

\begin{document}
\begin{small}           
\begin{align}
\boldsymbol{\mathcal{F}}^{i} = & %
\begin{bNiceArray}{CCCCCC}[%
margin,
extra-margin=2pt,
code-after = 
     { \begin{tikzpicture}
         \draw [decorate,decoration = brace]
              ([yshift=1.5mm]1-1.north west) to  
              ([yshift=1.5mm]1-1.north east) ;
       \end{tikzpicture} } ]
\Block{3-3}{\boldsymbol{\mathcal{F}}_{\boldsymbol{\aleph}}^{i}}  &  & & \mathtt{f}_{1\,(\varpi+1)} & \cdots & \mathtt{f}_{1\,\eta} %
\\
&  &           & \vdots                              & \vdots & \vdots               %  
\\
&  &           & \mathtt{f}_{\varpi\,(\varpi+1)}     & \cdots & \mathtt{f}_{\varpi\,\eta} %
\\
\mathtt{f}_{(\varpi+1)\,1} & \cdots & \mathtt{f}_{(\varpi+1)\,\varpi} & \mathtt{f}_{(\varpi+1)\,(\varpi+1)} & \cdots & \mathtt{f}_{(\varpi+1)\,\eta} %
\\
\vdots                     & \vdots & \vdots                          & \vdots                              & \ddots & \vdots               %
\\
\mathtt{f}_{\eta\,1}       & \cdots & \mathtt{f}_{\eta\,\varpi}       & \mathtt{f}_{\eta\,(\varpi+1)}       & \cdots & \mathtt{f}_{\eta\,\eta} %
\end{bNiceArray}%
\end{align}
\end{small}
\end{document}

上述代码的结果

答案2

我发现了这个问题的根源:我的 MikTeX 版本太旧了。更新后,这段代码可以正常工作。

相关内容