I'm trying to write a relatively wide matrix with the package nicematrix, using the environment pNiceMatrix. I can fix the global width using the option [columns-width=xx], and if I fix it to 0mm, it will try to compact the matrix columns to the maximum. But even then, the spacing around the horizontal dots (\cdots), could be reduced. I am not able to use the options using {Wc{2mm}} - nicematrix reads the option as a string.
Here is an example that compiles:
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
\[
\begin{pNiceMatrix}[columns-width=0mm]
%nicematrix
\xi^{(\gamma,1)}_{1,1} & \cdots & \xi^{(\gamma,1)}_{1,M_{1}}, & \Cdots &, \xi^{(\gamma,1)}_{n_{Y},1} & \cdots & \xi^{(\gamma,1)}_{n_{Y},M_{n_{Y}}} \\
\Vdots & & & & & & \vdots \\
\xi^{(\gamma,N)}_{1,1} & \cdots & \xi^{(\gamma,N)}_{1,M_{1}}, & \Cdots &, \xi^{(\gamma,N)}_{n_{Y},1} & \cdots & \xi^{(\gamma,N)}_{n_{Y},M_{n_{Y}}}
\end{pNiceMatrix}
\]
\end{document}
And produces this output:
I have tried this, based on the first example in section 8 "The width of the columns" of the documentation :
\[
\begin{pNiceMatrix}{cWc{2mm}cWc{2mm}cWc{2mm}c}
%nicematrix
\xi^{(\gamma,1)}_{1,1} & \cdots & \xi^{(\gamma,1)}_{1,M_{1}}, & \Cdots &, \xi^{(\gamma,1)}_{n_{Y},1} & \cdots & \xi^{(\gamma,1)}_{n_{Y},M_{n_{Y}}} \\
\Vdots & & & & & & \vdots \\
\xi^{(\gamma,N)}_{1,1} & \cdots & \xi^{(\gamma,N)}_{1,M_{1}}, & \Cdots &, \xi^{(\gamma,N)}_{n_{Y},1} & \cdots & \xi^{(\gamma,N)}_{n_{Y},M_{n_{Y}}}
\end{pNiceMatrix}
\]
But only to get :
How can I reduce the width of the columns 2,4,6 ?
I followed the quick install tutorial for texlive so I should have the latest version of nicematrix (5.19).
NiceMatrix
supporting thec{2mm}
pNiceMatrix
environment is like thepmatrix
environment provided byamsmath
, which means it doesn't accept column specifications. The[columns-width=0mm]
tells latex that each column should have minimum width of 0mm. Try something like[columns-width=1cm]
and see if that helps your solution.pNiceMatrix
[columns-width=xx]
, and somehow, once the indicated width is smaller than the minimal possible width considering the size of the different elements, the width does not change anymore. In the actual implementation of the pMatrixEnvironment, setting columns-width to 0 ensures that it will always have the minimal size possible. But it may not be the cleanest way, and did not solve my issue.