Is it normal that I cannot access the by nicematrix
generated Tikz nodes within the same align
environment?
Example:
\begin{align*}
\begin{pNiceMatrix}[name=myMatrix]
1 & 1 & 1 \\
2 & 2 & 2 \\
\end{pNiceMatrix}
\begin{tikzpicture}[remember picture, overlay]
\draw (myMatrix-1-1) -- (myMatrix-1-2);
\end{tikzpicture}
\end{align*}
won't work, but
\begin{align*}
\begin{pNiceMatrix}[name=myMatrix]
1 & 1 & 1 \\
2 & 2 & 2 \\
\end{pNiceMatrix}
\end{align*}
\begin{tikzpicture}[remember picture, overlay]
\draw (myMatrix-1-1) -- (myMatrix-1-2);
\end{tikzpicture}
works.
This is a bit inconvenient when one wants to stay in the same align
environment after the pNiceMatrix
(otherwise there will be free space between the matrix and the next line in the same environment and writing in the same line as the matrix is not possible (at least it's difficult when writing macros).
Is there a way to "fix" this?