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
37 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
  • 167
3 votes
2 answers
210 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
  • 305
3 votes
2 answers
55 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
163 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
  • 91
2 votes
2 answers
82 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
67 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
30 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
  • 963
2 votes
1 answer
49 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
31 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
86 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,316
2 votes
1 answer
75 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
114 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
  • 2,989
5 votes
2 answers
414 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
76 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
33 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
2 votes
1 answer
63 views

Nicematrix and aligned math

The following document \documentclass{article} \usepackage{nicematrix,mathtools} \begin{document} \begin{equation*} \begin{split} \alpha^{d+i}_i &=\begin{...
Bubaya's user avatar
  • 2,149
8 votes
2 answers
351 views

Nicematrix overbrace and underbrace clash with surrounding text

I am surprised that I didn't find anything on this topic here. In the following document, the contents of the braces clash with the above text even after several compilations: \documentclass{article} \...
Bubaya's user avatar
  • 2,149
3 votes
1 answer
146 views

How do I put a box around a column in a matrix in Latex?

I want to build a matrix in Latex code and wrap some components of it with a square. For terms that are on the same line I managed to do it well. But for terms of different lines I am not able to do ...
Ramos's user avatar
  • 33
1 vote
3 answers
69 views

How to draw \hline which does not cross a cell gotten by merged ones?

\begin{center} \begin{tabular}{ |c|c|c|c| } \hline col1 & col2 & col3 \\ \hline \multirow{3}{4em}{Multiple row} & cell2 & cell3 \\ & cell5 & cell6 \...
Koshchiy's user avatar
1 vote
1 answer
106 views

`NiceTabular` vertical alignment

I'm trying to split a large table (I use NiceTabular environment from nicematrix package) into two parts and arrange them side by side. At the same time, I want the tables to be vertically aligned not ...
Alexey Ismagilov's user avatar
4 votes
1 answer
63 views

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} ...
antshar's user avatar
  • 4,116
4 votes
1 answer
93 views

Possible conflict between nicematrix and gensymb (and an additional package)

I noticed an interesting conflict between several packages. I was using symbols from gensymb in math mode, but this seemed to cause problems in a very particular scenario. This seems to be the case ...
Ebbuh's user avatar
  • 43
1 vote
2 answers
109 views

Having problems wrapping text in table using NiceTabular

Edit: I have managed to resize the table to fit into one page, but for the life of me, I can't figure out why the first line is way off and gets printed into line two. I also don't understand why the ...
Ólafur Víðir Guðbjargarson's user avatar
4 votes
2 answers
147 views

`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, \...
JamesT's user avatar
  • 2,989
3 votes
1 answer
63 views

arXiv Submission Error with \dotfill

I have an Overleaf file which includes tables I've inserted dotted lines into using \dotfill. I have changed the Tex Live compiler to the 2020 version, and am exporting the zipped source using the ...
Layne's user avatar
  • 31
5 votes
1 answer
140 views

`nicematrix` tabularnotes, is there a way to list them one after the other horizontally?

I want to reduce space for a table in a report I am writing where I desire table footnotes using nicematrix. I am aware that using the package enumitem with the inline class option makes them so but ...
JamesT's user avatar
  • 2,989
1 vote
2 answers
65 views

NiceTabular with stretched text

Is there a way to get in a NiceTabular the text stretched up to the column width? \documentclass{beamer} \usepackage{nicematrix} \begin{document} \begin{NiceTabular}{wl{20em}} Sunt cumque voluptatem ...
user1850133's user avatar
3 votes
1 answer
114 views

NiceTabular (NiceMatrix) Empty Line without Vertical Rules

I am trying to add a small, empty line in a NiceTabular environment. The NiceMatrix manual states (Section 5.1.1 The vertical rules): In the environments of nicematrix, the vertical rules specified ...
Wasserwaage's user avatar
2 votes
2 answers
72 views

How to get \CodeAfter contents in nicematrix to typeset as background?

I am trying to post the contents in \CodeAfter in nicematrix as background. I generally want results similar to what we get with \cellcolor, but with the flexibility of tikzpicture environment In the ...
Al-Motasem Aldaoudeyeh's user avatar
5 votes
2 answers
248 views

Use of 'nicematrix' for matrices with special annotations

I generated the following image using nicematrix. Everything works fine; so there is no urgent problem at the moment. Note: The result or optics is exactly as desired. In the following I am only ...
cis's user avatar
  • 7,487
4 votes
1 answer
100 views

nicematrix: controlling column spaces

I have a code and that works well. But as a question of detail, I asked myself: I want a very small distance from the last annotation column to the right parenthesis. Is it in the sense of ...
cis's user avatar
  • 7,487
5 votes
2 answers
155 views

nicematrix: add ttfamily in the last-col

How can I get nicematrix to put the last annotation-column in \footnotsize and \ttfamily for me? Note: I usually use symbols +, -, · and Roman numerals (I, II, III,...) there. So there is no ...
cis's user avatar
  • 7,487
1 vote
1 answer
73 views

nicematrix: handle with empty cells / drawing lines into a NiceArray

I would like to add/draw lines (like the shown red one) over and under the letters A, B and D (not at the \cdots) - each to the upper and lower end of the matrix. What is nicematrix's correct method ...
cis's user avatar
  • 7,487
2 votes
1 answer
62 views

Is it possible to redefine \Block to allow for optional vertical alignment?

In How to set vertical alignment for NiceMatrix block?, a user asked as to whether it is possible to redefine \Block in such a way it aligns text vertically to the top The solution suggested by F. ...
Al-Motasem Aldaoudeyeh's user avatar
0 votes
0 answers
32 views

How to center the contents of first-row and first-col?

I got a custom code to typset nodes documentation for matrices. Such documentation is outside the brackets of a matrix The result is as desired, but I want to see if it is possible to place the ...
Al-Motasem Aldaoudeyeh's user avatar
6 votes
1 answer
151 views

What is the most optimal way to draw arrows over matrix?

I want to draw something similar to what is shown using tikz capabilities of nicematrix. Also, is it possible to control the spacing between comments and arrows tails? \documentclass[11pt, a4paper]{...
Al-Motasem Aldaoudeyeh's user avatar
1 vote
1 answer
44 views

How to change inner sep for nodes in nicematrix

With this example I want to create table of variations of a function with NiceArray env. The remaining problem is that the ends of the arrows are close to the values 0 at nodes (2-2) and (2-4) so I ...
Salim Bou's user avatar
  • 16.8k
0 votes
1 answer
42 views

Using \color in \Block causes the contents to drop below the baseline

\documentclass[11pt]{book} \usepackage[x11names]{xcolor} \usepackage{nicematrix} \NiceMatrixOptions{hvlines} \begin{document} \begin{NiceTabularX}{\linewidth}{r l X[l, t]} ...
Al-Motasem Aldaoudeyeh's user avatar
1 vote
1 answer
59 views

Using hvlines in NiceTabularX causes the last column to add tabcolsep

I think this is a bug in nicematrix. Is it possible to patch the package to get the desired result? (i.e., the letter l in Fadeel should align with text margin) \documentclass[11pt]{book} \...
Al-Motasem Aldaoudeyeh's user avatar
2 votes
2 answers
70 views

\hiderowcolors causes \noalign error

Specifically \hiderowcolors ->\noalign {\global \@rowcolorsfalse \@norowcolor } This is my current code (edited to fit requirements). I started using NiceTabular because hlines ...
Renan Andrade's user avatar
2 votes
1 answer
58 views

How to generate a numbered table with uniform distribution of numbers?

I want to generate a table for multiple choices with the following requirements Numbers are distributed uniformly on \linewidth Dot separators of numbers are aligned between rows Ability to customize ...
Al-Motasem Aldaoudeyeh's user avatar
1 vote
0 answers
45 views

How to allow for guided braces placement using nicematrix?

In a previous question (Is it possible to highlight every cell with counters iRow and jCol in NiceTabular?), I asked for easy way to highlight cell nodes. As a result of my question F. Pantigny (the ...
Al-Motasem Aldaoudeyeh's user avatar
0 votes
1 answer
63 views

Problem passing a table as an argument to my class using the environment NiceTabularX and tabularray

I'm very used to come here often to debug my code and find solutions to my problem. But it's the first time i cannot find a solution to my exact problem or something i could adapt for my case. So here ...
gjjfournier's user avatar
2 votes
1 answer
47 views

How to increase the size of \Blocks rectangles by slight predetermined margin?

I want to place some margin above and below the rectangles, but it does not seem that \Block has easy option for this One solution is to use custom command as follows \newlength{\heightbigstrut} \...
Al-Motasem Aldaoudeyeh's user avatar
3 votes
1 answer
64 views

Move LHS of equation up or down respective to `nicematrix` array

I created this rather elaborate matrix using the fantastic nicematrix package. However, since the annotation boxes below and to the right of the main matrix are technically all part of one big ...
Wasserwaage's user avatar
6 votes
2 answers
234 views

Nicematrix package conflicts with babel

I have the following code, inspired by this answer. \documentclass{article} \usepackage{nicematrix} \begin{document} \begin{table}[h] \begin{center} \begin{NiceTabular}{cccc}[hvlines] ...
sanitizedUser's user avatar
0 votes
1 answer
92 views

aligning table header with nicetabular

I would like to center the header in the table below: \documentclass[10pt]{article} \usepackage{nicematrix} \begin{document} \begin{NiceTabular}{l|Wr{2cm}|Wr{2cm}} % \RowStyle{\centering} & column ...
user357269's user avatar
4 votes
1 answer
159 views

\setmainfont cause "\scriptfont4 is undefined" error with nicematrix package

This example compiled with xelatex or lualatex give rise to this error \scriptfont4 is undefined (character 49). \c_math_toggle_token \documentclass{article} \usepackage{nicematrix} \usepackage{...
Salim Bou's user avatar
  • 16.8k
4 votes
1 answer
104 views

nicematrix & TikZ positionning

In the following output, I would like to change the start and the end of the red path: see the green arrows. Here is my code. \documentclass[12pt]{article} \usepackage{tikz} \usepackage{nicematrix} ...
projetmbc's user avatar
  • 13.4k
2 votes
2 answers
94 views

Displaying decimal divisions

Here is a way to display decimal divisions. I have indicated the problem I am facing. I suspect that the use of some calculation is needed here. I know that xlop exists, but for several reasons I am ...
projetmbc's user avatar
  • 13.4k

1
2 3 4 5 6