Questions tagged [nicematrix]

The package nicematrix is a LaTeX package which provides tools to create tabulars, arrays and matrices (ctan.org/pkg/nicematrix).

This package provides environments {NiceTabular}, {NiceArray}, {NiceMatrix}, {pNiceMatrix}, etc. similar to the well-known environments of the packages array and amsmath but with more functionalities. This package uses PGF to create PGF/Tikz nodes under the cells of the arrays and uses these nodes for the new functionalities (see the package on CTAN).

288 questions
7
votes
2 answers

Infinite size nicematrix

I am trying to write a nicematrix version of this tridiagonal (infinite size) matrix, as the pmatrix environment renders a very ugly version \begin{equation} \begin{pmatrix} -\lambda & \lambda & 0 & 0 & \dots…
6
votes
3 answers

Q: baseline doesn't perfectly align in pNiceMatrix/bNiceMatrix

Is it possible to perfectly align the baseline of p/bNiceMatrix? (The misalignment is quite obvious when you have a big matrix...) MWE \documentclass{article} \usepackage{nicematrix} \begin{document} \begin{equation} …
yzhang
  • 205
5
votes
1 answer

Table of Eratosthenes' sieve

The code below produces the following output where the elements in the last column are incorrectly placed. Is this easy to fix? \documentclass{article} \usepackage{nicematrix} \ExplSyntaxOn \NewDocumentCommand\eratosthenes{ m }{ …
projetmbc
  • 13,315
5
votes
2 answers

`nicematrix` NiceTabularX alignment

I am trying to save horizontal space in a nicematrix NiceTabularX table as the report my table is going in has a page limit (the table is half a page long). I desire using nicematrix as I use tikz, \tabularnote{} and a coloured header which doesn't…
JamesT
  • 3,169
5
votes
1 answer

NiceMatrix, arraystretch and blocks

I have noticed a strange behaviour of values of arraystretch between 0 and 1, on specific rows in a NiceTabular environment, as soon as such row has a \Block{k-n} when k takes any value, but n is strictly greater than one. Indeed, I have a table,…
Simon
  • 245
5
votes
2 answers

Add curved arrow to a NiceTabular

I failed to add the red curved arrows to a tabular using TikZ. I feel ashamed... :-) I am not looking for an automated solution. Here is the code just for the table. \documentclass[a4paper,…
projetmbc
  • 13,315
5
votes
2 answers

latex nicematrix -- access generated nodes from tikz

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} …
atticus
  • 557
4
votes
1 answer

nicematrix — override column separator @{} in \Block

The following code: \documentclass{article} \usepackage{nicematrix} \begin{document} \begin{NiceTabular}{r@{---}l} 1 & 2 \\ 10 & 20 \\ \Block{1-2}{100} \end{NiceTabular} \end{document} produces this table The problem is that column separator…
antshar
  • 4,238
  • 9
  • 30
4
votes
2 answers

nicematrix: How to avoid the automatic numbering of first row?

\documentclass{article} \usepackage{nicematrix} \begin{document} \begin{NiceTabular}{>{\arabic{iRow}}cc>{\alph{iRow}}cc}[first-row] \multicolumn{1}{c}{}\Block{1-2}{Name} && \Block{1-2}{Country} & \\ & George && France \\ & John && Hellas…
polyn
  • 5,614
4
votes
1 answer

How to set vertical alignment for NiceMatrix block?

In NiceMatrix, is there a way to set the vertical position of a block? For example, \documentclass{standalone} \usepackage{nicematrix} \begin{document} \begin{NiceTabular}{ccc} \Block{3-2}{A} & & 0 \\ & & 0 \\ & & 0 \\ 0 & 0 &…
Alan
  • 117
  • 4
4
votes
3 answers

Picture of print order of pages of a large tabular

I need to explain the order of pages of an excel sheet, which takes in print as PDF eight pages. To this end I'd like to provide a picture of these eight pages and add text. The tabular cells need to have the aspect ratio of a page, more or less. My…
Keks Dose
  • 30,892
4
votes
2 answers

Can't set table width correctly with NiceTabular* environment in NiceMatrix package

The sample codes: \documentclass{article} \usepackage{nicematrix} \begin{document} \noindent \begin{NiceTabular*}{\textwidth}{XX}[hvlines] X & X \\ \end{NiceTabular*} \end{document} The output: I replace {XX} by {CC}, and the output:
4
votes
1 answer

nicematrix matrix vs array - alignment specification

I recently found the nicematrix package, and I am using it to for scripting. Since my goal is to have a macro/environment which makes an augmented matrix (vertical line before the last column in my case), I was searching for a way to pass something…
atticus
  • 557
3
votes
1 answer

Nicematrix version 6.26d not backward compatible?

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) This is the result when using 6.26d of nicematrix.sty This is the…
Konne
  • 624
3
votes
1 answer

Column matrices using nicematrix do not display properly

nicematrix seems not to display column matrices correctly. Is there a way to fix this, so that one doesn't have to change all files to use NiceArray? I also use [renew-dots,renew-matrix], so that matrices typeset using the amsmath matrix…
1
2 3 4