Questions tagged [nicematrix]
The package nicematrix is a LaTeX package which provides tools to create tabulars, arrays and matrices (ctan.org/pkg/nicematrix).
365 questions
7
votes
3
answers
133
views
Different column alignment of first-row
I like my matrix indices to be center-aligned while numbers within the matrix should be right-aligned for better visual clarity of scale. However, none of my attempts to achieve both have been ...
3
votes
1
answer
63
views
nicematrix, \CodeAfter and overlapping
Is there an automatic way to avoid "TikZ code after" overlap the text?
I give a real use case, and not a MWE.
\documentclass[12pt]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{...
5
votes
2
answers
147
views
nicematrix submatrix fails when \Cdots is used
The following M(not)WE fails because of the \Cdots used. Is there a quick fix of this bug?
The log file indicates the error below if I uncomment the failing sub matrix command.
Package nicematrix ...
5
votes
1
answer
135
views
Matrix with NiceMatrix
I am trying to produce a (n+1)x(n+1) matrix with
diagonal elements equal to 1
supradiagonal (one above the diagonal) a sequence from 1 to n
everything else 0
in the package NiceMatrix, and with the ...
4
votes
1
answer
102
views
nicematrix - Auto fill subblocks
I would like to factorize the code to avoid to manually type the a's, b's and m's. Is it possible?
\documentclass{standalone}
\usepackage{nicematrix}
\usepackage[svgnames]{xcolor}
\begin{document}
$...
3
votes
2
answers
80
views
Highlight certain rectangular blocks in nicematrix
I'm trying to highlight certain rectangular blocks with the nicematrix package. The problem I have is that the left and right sides of the rectangles are not in the correct positions.
Here is a MWE:
\...
6
votes
2
answers
222
views
Error with `\DocumentMetadata` and nicematrix
TexLive 2025, up to date
MWE:
\DocumentMetadata{pdfstandard=A-2b, lang=de-DE, pdfversion=1.7}
\documentclass{article}
\usepackage{nicematrix, array}
\begin{document}
\begin{NiceTabular}{p{4em}p{...
3
votes
2
answers
104
views
In NiceTabular, is it possible to add a note without a marker and have the note align with the left table edge?
I would like to use \tabularnote in a NiceTabular environment, but don't want a marker for the note and would like the note text below the table to align with the left edge of the table (as the marker ...
1
vote
3
answers
186
views
Is that possible to adjust \Vbrace and \Hbrace's position with nicematrix?
Claim: I was using nicematrix version 7.3 of nicematrix, at the date of 2025/09/30.
Here below is my code with nicematrix:
\documentclass{article}
\usepackage{fourier}
\usepackage{amsmath,amsfonts}
\...
2
votes
1
answer
123
views
visual colorful matrix illustrations
Is there a programmatic way to create visually appealing illustrations for matrix operations that look sth like this:
This example, which I am borrowing from an article, shows an example of what I am ...
4
votes
1
answer
105
views
Is that possible to tune this NiceTabular Node position?
What I want is to plot something as below:
Now I have the following code:
\documentclass{article}
\usepackage{nicematrix}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
\begin{document}
...
5
votes
2
answers
279
views
Drawing the structure of a matrix
I know that one can use the NiceMatrix and drawmatrix packages to draw regions in latex. But, the former does not seem to create "in-line" matrices, and the latter appears to be limited in ...
3
votes
1
answer
133
views
How can I insert math expressions which aren't simple strings into my lua-tikz setup?
I am building a package, part of which should be able to simply append mathematics to a picture. Unfortunately, it currently only works for simple strings.
How could I insert the following math ...
5
votes
2
answers
272
views
Cheating vertically with matrix indices
Package nicematrix allows typesetting of row and column matrices with indices as shown below:
In a recent post @egreg showed us how to cheat horizontally with matrix indices. Using a zero-width ...
4
votes
4
answers
251
views
Boxed submatrix
I have to replicate a specific matrix, with its red boxing: I am going with pNiceMatrix and SubMatrix but in no way I can make the bottom rule to "box" my block. Is there any way, or am I ...