Skip to main content

Questions tagged [nicematrix]

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
22 views

NiceMatrix + Tikz Determinants Picture

I'm having trouble recreating a particular picture I want to use. It's a 3 x 3 determinants formula, which I'm trying to use the nodes created by NiceMatrix to create loops around the entries to ...
Xir0s's user avatar
  • 11
1 vote
1 answer
47 views

NiceMatrix and arXiv not up to date

I am trying to publish a paper on arXiv and I have realized that one of my figures yields an error when I try rendering my code using the arXiv repository. On my machine, the figure works well, ...
Ivan's user avatar
  • 73
0 votes
1 answer
39 views

Adding margin to nicematrix does not add space around cells

In the previous image, the space around V vector is provided by margin option while the space around I vector is provided with \hspace{1em} Although this is what is expected sometimes, it usually ...
Al-Motasem Aldaoudeyeh's user avatar
3 votes
1 answer
42 views

Drawing on first row and first column in nicematrix

An arrow is drawn from 1-|1 to node 5-|5 (i.e., southeast of cell 4-4). I think it should be possible to draw from 0-|0 (node for first row and first column) to 6-|6 (node for last row and last column)...
Al-Motasem Aldaoudeyeh's user avatar
2 votes
1 answer
36 views

Shortening UnderBraces by given lengths in nicematrix

\UnderBrace in nicematrix has a key shorten, to reduce the width on left and right by around 5.72pt, but it does not throw an error when specifying a custom length shorten=<length> nor does it ...
Al-Motasem Aldaoudeyeh's user avatar
1 vote
1 answer
28 views

Using v-center and m keys for \Block creates additional vertical space space

The exact height of the space is 2.25pt When setting a weight for the second column, the issue disappears For p column type the issue disappears, but if its width increases, it appears again This ...
Al-Motasem Aldaoudeyeh's user avatar
4 votes
1 answer
49 views

\SubMatrix in nicematrix causes the superscript to be colored

As you see in the image, the superscript is colored, but is expected to be of normal color \documentclass{article} \usepackage{fancyhdr} \pagestyle{empty} \usepackage{nicematrix} \begin{document} \...
Al-Motasem Aldaoudeyeh's user avatar
2 votes
0 answers
38 views

Using Block with the option [draw] in NiceMatrix, in combination with [spanish]{babel} leads to an error

I'm having trouble with NiceTabular and Babel (Spanish). The idea here is to draw a square around the letter 'A'. The draw option in Block doesn't seem to play nice with the [spanish] option in Babel. ...
Axel Graff's user avatar
1 vote
1 answer
45 views

listings keywordstyle does not work inside NiceTabular

As you see above, I customized some keywords to show up in gray. This works for tabular but not NiceTabular environment My MWE \documentclass{article} \usepackage{fancyhdr} \pagestyle{empty} \...
Al-Motasem Aldaoudeyeh's user avatar
2 votes
0 answers
67 views

Nicematrix not working version 6.28 2024-05-29 [closed]

I'm using TeX Live 2019/Debian and I did the procedure accordingly https://www.ctan.org/tex-archive/macros/latex/contrib/nicematrix. However get error nicematrix.sty: erro: 35: Undefined control ...
wccmachado's user avatar
6 votes
2 answers
100 views

NiceMatrix: no shape found

I am going sightly nuts trying to draw some lines on a nicematrix. As far as I can see, I am following the instructions in the manual, but the code below does not compile giving the error Package pgf ...
314159265358979323's user avatar
3 votes
1 answer
33 views

Nicematrix changes cases and array environment to require \cr or \\ before closing environment

I started receiving errors when I use the cases and array environments and have the [renew-dots,renew-matrix] option enabled for nicematrix. The code below used to compile without error. I found a ...
Anthony Pulido's user avatar
1 vote
1 answer
27 views

Vertically center a cell with nicematrix

I would to know how to center vertically the cells 2-2(c) and 2-3 (d) in the following example \documentclass{article} \usepackage{nicematrix} \begin{document} \begin{NiceTabular}{ccc}[hvlines,cell-...
user1063822's user avatar
2 votes
0 answers
33 views

Long nicematrix with color and margin text [closed]

I currently would like to have a matrix that is long and includes some color on each row. However, whenever I use the & multiple times, I get an error saying I have an extra alignment tab that has ...
Ivan's user avatar
  • 73
6 votes
2 answers
131 views

Simply Adjusting the Position of Dashed Lines in Nicematrix Package

I encountered a problem with the horizontal dashed line created by the nicematrix package in LaTeX. The line is a little close to the bottom of the matrix, overlapping with the elements of the second ...
Prince Chen's user avatar
1 vote
1 answer
80 views

Upper triangular block matrix

I want to do that : It's a 3-3 matrix, with a star in the upper triangular region and a big zero in the lower. It doesn't seem possible to do that with nicematrix, because here the blocks are not ...
Louis Lascaud's user avatar
2 votes
1 answer
68 views

NiceMatrix Right Margin elements

I have been struggling to figure out what is wrong with my code. I currently have a matrix with some colors and on the margin, I would like arrows. At the moment I currently have this \documentclass{...
Ivan's user avatar
  • 73
3 votes
1 answer
58 views

{NiceTabular} - Automatic Vertical Spacing in Cells

I'm currently trying my best to set up a user manual for a system. It's working fine, except I'm continuously running into the same issue when trying to set up tables. I'd like to generate a table ...
Univac93's user avatar
3 votes
3 answers
130 views

Separate columns in matrix by bar

I would like to create something similar to this in my document. I have tried using nicematrix so far but cannot get it to work. Thanks in advance:)
Trommelpeter's user avatar
1 vote
2 answers
37 views

Augmented matrix with labeled rows at the right

I would like to write an augmented matrix with labeled rows out of the right bracket of the matrix, in such a way to enlight operations by row for Gaussian elimination procedure. I'm using this code ...
Redeldio's user avatar
  • 125
5 votes
1 answer
107 views

How can I add top (and bottom) padding to a pNiceMatrix?

I'm attempting to create a matrix where the basis I'm using appears to the top and left of the matrix, and based on online suggestions, I landed on using either the built-in \bordermatrix or the ...
Connor Mooneyhan's user avatar
3 votes
1 answer
130 views

Change column matrix in a matrix into a block matrix

Can any one help me with changing the column (a43,a53,a63,a73) to be a block $I_n$ and (a44,a54,a64,a74) to be a block $0_{N \times n}$ ? Here is the code for this version: \[ \begin{bmatrix} -I_{...
Nattapong Kongkaew's user avatar
1 vote
1 answer
58 views

Gaps between blocks in NiceTabular

Here's a starting point for my example: \begin{NiceTabular}{c c c c c c} \hline x & x & x & x & x & x \\ x & \Block[draw=black]{1-5}{thin} \\ x & x & x & x & \...
Johansson McFleppers's user avatar
2 votes
2 answers
57 views

With `floatrow`, how to put a caption in the first row of the table?

I have a big project were the package floatrow are used. I discovered that when this package are used, the caption put inside my tables are now show outside. I can't find any way of getting it back ...
Heziode's user avatar
  • 55
3 votes
1 answer
81 views

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 ...
Konne's user avatar
  • 619
0 votes
1 answer
97 views

Automatic space when typesetting block matrix

Is there an easy way to create block matrices which automatically adjust size based on their content? MWE using the nicematrix package: \documentclass{article} \usepackage{nicematrix} \begin{document}...
myca's user avatar
  • 1
0 votes
2 answers
146 views

Can a command be used to build a row in bNiceMatrix?

I want to build a bNiceMatrix by storing rows in commands. Here's a mwe. \documentclass[a5paper]{article} \usepackage{nicematrix} \begin{document} This is the matrix I want. \[ \begin{bNiceMatrix}...
Brian Fitzpatrick's user avatar
1 vote
1 answer
91 views

bNiceMatrix not compiling unless followed by another bNiceMatrix

I am trying to use Overleaf to make a matrix using nicematrix. This code seems to work and produces the following: \documentclass{article} \usepackage{nicematrix} \begin{document} $$ \begin{...
abc123's user avatar
  • 23
3 votes
1 answer
129 views

Highlighting bands of a matrix with tikz

I am trying to highlight specific band diagonals of a matrix in latex using nicematrix and tikz, but I am having trouble with fitting the bands to the matrix correctly. Does someone have an idea of ...
Mathnoob's user avatar
3 votes
1 answer
179 views

I have nicematrix, which loads some aspects of PGF, but would I benefit from using the full version of PGF?

I'm new to Stack Exchange, hope this isn't a dumb question to ask. I have the package nicematrix, which in its CTAN package description states: The package requires and loads l3keys2e, array, amsmath,...
Felix Maldonado's user avatar
7 votes
2 answers
237 views

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 ...
20-sided-dice's user avatar
3 votes
1 answer
116 views

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 ...
Anthony Pulido's user avatar
0 votes
1 answer
93 views

Ways to recreate this karnaugh map in LaTeX

I need to make karnaugh maps look like this in LaTeX. I tried, but didn't find a solution to my problem.
ruthen1um's user avatar
2 votes
1 answer
66 views

How can I use csvsimple inside NiceTabular from nicematrix package?

I´m new to Latex and a bit overwhelmed by the difficulty of getting a table that looks just as I want from a csv. I got so far to display my csv table in latex with gray and white rows using this ...
nils_toepfer's user avatar
1 vote
1 answer
603 views

Overleaf and VS Code table incompatibility

Hi there I'm fairly new to LaTeX; hence, my code might not be the most efficient and effective but it gets the job done. So far, I've been working and experimenting in Overleaft but I'm setting on ...
Matteo's user avatar
  • 323
1 vote
1 answer
58 views

How can I fix the alignment of the vertical dots in this matlab style syntax matrix?

I am trying to adapt the code from this post to allow for matlab style syntax for matrices in latex. In the MWE example, the alignment of the \vdots is incorrect (should be centered)... My MWE is... \...
user41177's user avatar
  • 375
3 votes
2 answers
239 views

How to add a column to this matrix?

I want to add a column to this matrix like this My code \documentclass[]{article} \usepackage{tikz} \usepackage{nicematrix} \begin{document} \begin{NiceMatrixBlock}[auto-columns-width] \...
Laurenso's user avatar
  • 373
3 votes
2 answers
64 views

Spacing issue when NiceMatrixBlock is inside an equation

I need to use NiceMatrixBlock inside an equation, but doing so provokes spacing issues. Is there a way to fix that? MWE: \documentclass{article} \usepackage{mathtools,nicematrix} \begin{document} ...
Bibi's user avatar
  • 1,532
3 votes
2 answers
217 views

Horizontal rules or not horizontal rules in NiceTabular [closed]

I am making a simple table with NiceTabular, one of its columns must occupy 6 rows, specifically of the second column. The problem is with the rules (is it possible?), and depend of options using the ...
Darío's user avatar
  • 471
2 votes
2 answers
141 views

Alignement and width of matrix delimiters

I would like to obtain a linear state-space equation with nicely-aligned matrices. A basic solution using array is indeed perfectible (see equation (1). Now, using nicematrix (to obtain same-width ...
Bibi's user avatar
  • 1,532
3 votes
1 answer
122 views

NiceMatrix how to split first column into three/four part

I would like to divide the first column of my matrix into four subsections. The issue is that it works when I split it into three subsections. Please take a look at the image. However, when I add ...
Babak Akbarzade's user avatar
1 vote
1 answer
65 views

Nicetabular merges blocks

I have a table in nicetabular, which has one specific problem: the columns are somehow merged? \begin{NiceTabular}[]{c | c | *{4}S[table-format=3.2] | *{4}S[table-format=3.2]} & & \Block{1-4}...
FooBar's user avatar
  • 993
2 votes
1 answer
108 views

NiceTabular and \multicolumn issue with column separators

I want to create a custom environment für typesetting chord symbols in a table with automatic column width of the widest row and they must be separated by | to mimic a bar line. Sometimes, one line in ...
KSTNR's user avatar
  • 53
3 votes
1 answer
59 views

Problem with nicematrix and footnotes

I formerly used \usepackage[footnote]{nicematrix}, but this doesn't work any more, after changing my computer and updating MiKTeX. The error is ! Undefined control sequence. <argument> \...
Jany Seytor's user avatar
3 votes
1 answer
235 views

How to put left brace in nicematrix?

I want to have a matrix, where on the left side I have left brace with n written on it. But the current code I have does not produce the desired result. The left brace is not drawn due to some issue ...
pixel's user avatar
  • 1,370
2 votes
1 answer
96 views

Two NiceTabular are not vertically aligned

\documentclass{article} \usepackage{tikz} \usepackage{nicematrix} \begin{document} Some text \begin{center} \begin{NiceTabular}[width=10cm]{X[1,l]}[hlines,vlines] \RowStyle[cell-space-top-...
user1063822's user avatar
4 votes
3 answers
148 views

How can I force a footnote mark to be within the page margin?

I am finishing off a table for a report and noticed one of the footmark marks protruding into the margin (MWE image): Footnote mark B is protruding and I do not know how to force it to be considered ...
JamesT's user avatar
  • 3,201
5 votes
2 answers
443 views

nicematrix, LaTeX3 matrix naming and for loop

The following code fails. I am looking for some advice. \documentclass{beamer} \usepackage{nicematrix} \usepackage{tikz} \NewDocumentCommand\drawstrike{ mmm } { \begin{tikzpicture}[ ...
projetmbc's user avatar
  • 13.4k
5 votes
1 answer
106 views

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 \...
projetmbc's user avatar
  • 13.4k
1 vote
1 answer
54 views

Nicematrix with \Ddots leading to empty cell

I'm trying to draw a square matrix with \Cdots, \Vdots and \Ddots, all of which need to terminate in empty cells. Two problems arise: (i) the ddots is not close to 45 degrees (I think it's calculating ...
Chrystomath's user avatar

1
2 3 4 5
7