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
45 views

Overleaf - \begin{strip}, \end{strip} fails to work with nicematrix

In the MWE below there are two matrices. The first one works fine w/ \begin{strip}, \end{strip} enclosing the \begin{nicematrix}, \end{nicematrix} so as to create one column equation. But if I enable ...
user avatar
  • 21
1 vote
2 answers
45 views

Problems about creating tables

I want to create a table like this However, what I can get is one like this In the table I created, there are two problems existing, which are the middle vertical line is too short to reach the top ...
user avatar
  • 15
0 votes
1 answer
39 views

NiceArray unknown issue

I'm trying to compile the simplest MWE with NiceArray environment from nicematrix package \documentclass{article} \usepackage{nicematrix} \begin{document} \[ \begin{NiceArray}{ccc} 1 & 2 & 3 ...
user avatar
  • 2,345
1 vote
1 answer
82 views

Fitting caption width to table width using nicematrix package

I'm very much a LaTeX beginner and searching for possibilities to include footnotes below tables, I came across the nicematrix package. This package combines basically everthing I need to generate ...
user avatar
  • 13
1 vote
2 answers
31 views

Nicematrix \cdashline alternative

Is there an equivalent of arydshln's cdashline in nicematrix package? I am aware of \hdottedline, but I need to add dotted horizontal lines in some columns.
user avatar
3 votes
0 answers
44 views

nicematrix and unicode-math compatibility [duplicate]

I need the unicode-math package for LucidaBrightMathOT fonts. However, this seems to have some undesirable effects on the nicematrix package, eg. brackets and vertical lines. \documentclass{article} \...
user avatar
2 votes
2 answers
63 views

How to clear cellcolor for a specific cell in NiceTabular?

Assume I have a table like this: \begin{NiceTabular}{p{3.8cm}p{3.8cm}} \CodeBefore \rowcolors{2}{white}{gray!30} \Body A & B \\ C & D \\ \end{NiceTabular} \rowcolors gives the row ...
user avatar
  • 1,991
0 votes
2 answers
70 views

Writing a form-style table

I would like to print the following table in latex: Any hint is wellcome!
user avatar
  • 103
0 votes
1 answer
33 views

\CodeBefore isn't recognized in the pNiceMatrix environment

When I try the following M(n)WE (copied almost verbatim from the nicematrix manual): \documentclass{article} \usepackage[table]{xcolor} \usepackage{nicematrix} \begin{document} \[ \begin{...
user avatar
  • 147
5 votes
5 answers
614 views

Typeset sudoku grid using tabular syntax

This is a sort-of follow-up to the question Create environment whose contents are passed to TikZ matrix, which did not reveal any solution to the specific question (but did make me aware of another ...
user avatar
  • 1,373
4 votes
2 answers
159 views

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-...
user avatar
  • 3,874
1 vote
2 answers
57 views

`nicematrix`: \Block is not conforming to mono-column width constraint

The nicematrix documentation has this to say about "mono-column" blocks (blocks where the column span is 1): The natural width of the contents of these blocks is taken into account for the ...
user avatar
5 votes
1 answer
74 views

Can I have solid lines instead of Cdots/Vdots in nicematrix?

Loading the nicematrix package, the code \begin{bNiceMatrix}[last-col,nullify-dots, margin] & & & \\ \Cdots & A_j & \Cdots & i\\ & & & \end{bNiceMatrix} ...
user avatar
  • 297
3 votes
1 answer
78 views

vertical alignment of different units with siunitx

I am trying to align the comma, but I am not able to. I have already looked for the solutions on the forum but I just can not find a working solution. There must be something I am overlooking. Also ...
user avatar
  • 249
1 vote
1 answer
64 views

How to color an inner column in bNiceMatrix

I would like to color the first column of the matrix (not the first row with the column indices). Any way to do this? \begin{bNiceMatrix}[first-row, first-col] & 1 & \cdots &...
user avatar
  • 127
3 votes
4 answers
180 views

Vertical rule with NiceTabular

I’m trying to draw a vertical line with thickness 1pt with nicematrix package, but I obtain error compilation... any help is welcome. Here is my code \documentclass{report} \usepackage{nicematrix} \...
user avatar
1 vote
0 answers
33 views

Problem with nicematrix environnement [closed]

I just came to receive a solution from a member in S of a table. The solution worked very well and I really thank him for what he shared with me to overcome this issue. However, I have seen an ...
user avatar
3 votes
1 answer
74 views

Problem with inserting image inside a Table

I am now preparing for a Final Project of Master's degree and I am facing an issue with Table environement. I have a table made with Microsoft Word showing a list and an image Inside of table. I ...
user avatar
3 votes
1 answer
100 views

bNiceArray doesn’t show first-row

I have the following bNiceArray environment: \begin{equation} \mathbf{S}_{Mi} = \begin{bNiceArray}{cccccccccccc}[first-row,first-col,code-for-first-col=\mathbf{\arabic{iRow}},code-for-first-row=\...
user avatar
2 votes
2 answers
64 views

Strikeout of a table row and caption two tables separately

First question. I want to organize these two tabular as subtables (a) and (b) of a main table and share a single caption. Second question. I want to cross out the second row of the first subtable ...
user avatar
1 vote
1 answer
51 views

How to enable math coloring with NiceTabularX environment?

I want to color all math inside tables with custom color. However, it seems that the command \RowStyle{\colorInlinedMath} does not work in the preamble option when using @ The definition of \...
user avatar
1 vote
1 answer
57 views

nicematrix: How to refer to the same \tabularnote without creating a new one?

Consider following latex fragment: \begin{table}[H] \centering \caption{A caption.} \begin{NiceTabular}{lccc}\toprule \textbf{Titel 1} &\textbf{Titel 2} &\textbf{Titel 3}&\textbf{Titel ...
user avatar
  • 13
5 votes
2 answers
151 views

Difficulty while making a Table using itemize

I am facing a little Problem here. I am trying to make the table show in the picture below . I made this Table in a separate Project and and then pasted its code in my original project. ( I am using a ...
user avatar
17 votes
2 answers
721 views

Is there a way to find out the correct order to load packages?

I recently made some extension to an old document of mine, and it stopped compiling. Luckily I am aware of the package ordering issue, especially with the notorious hyperref package. However, I am not ...
user avatar
  • 513
2 votes
2 answers
50 views

How to increase space between text and the line-box when using NiceTabular environment in the nicematrix package?

When using the NiceTabular environment in the nicematrix package, how do I increase the space between the text and the tikz-drawn line-box on all sides of the text when using type V columns defined by ...
user avatar
1 vote
1 answer
64 views

Controlling vertical rules in NiceTabular (NiceMatrix)

Is there a way to have finer-grained control of vertical rules (along the lines of what cline permits for horizontal rules) in a NiceTabular environment? E.g., I would like to eliminate the vertical ...
user avatar
  • 87
1 vote
1 answer
43 views

Line break and vertical alignment of other cells in NiceMatrix

I want to have both rows bottom aligned, using NiceMatrix package, specifying linebreak in one of the cells. If I only have a long text in the first column, without further specification, then by ...
user avatar
  • 215
0 votes
2 answers
45 views

Table of uni courses, template not optimale for a standing A4 page

I need to submit a self-assessment of my prior courses in my master's application. I have used a template I like, but I can't manage to make in optimal for a standing A4 page. Furthermore, I have ...
user avatar
  • 61
2 votes
1 answer
98 views

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} & &...
user avatar
  • 87
2 votes
3 answers
168 views

Remove unwanted vertical space before and after math (and other) environments in tabular cells

I want to remove vertical space before and after math and other environments like description, so they look tight and with even space at the top and bottom like Row 1. As you can see, I already test ...
user avatar
4 votes
2 answers
120 views

How to middle align contents of a single column only?

I am trying to use nicematrix to provide good illustration of presented material with good alignment of entries explained. I want the contents of p1, p2, p3 to remain top aligned as shown. However, ...
user avatar
1 vote
2 answers
43 views

Alignment and continuity of points in a matrix

Here is what I want to do: I want to be able to extend the horizontal dots so that they fill the entire line and the spacing between the dots and the x^n is the same as between the dots and x^2. In ...
user avatar
  • 189
2 votes
1 answer
129 views

NiceMatrix, rotated cells and row height

I am trying to create a table in the NiceTabularX environment, with cells in the first row rotated using the \rotate command. However, it seems that the height of the rotated row does not depend on ...
user avatar
  • 215
1 vote
1 answer
35 views

\rotate in NiceTabularX inserts too much space above the contents

I am trying to use \rotate inside \RowStyle to rotate elements of first row, but it seems too much space is inserted above the contents. How to remove it? My MWE \documentclass[aspectratio=169, t]{...
user avatar
1 vote
1 answer
72 views

NiceMatrix and alignment of cells

I am building a table in a NiceTabularX environment, and I have a small alignment issue. In one of my rows, I would like to have the content rotated by 90° (direct), centered horizontally and bottom-...
user avatar
  • 215
4 votes
1 answer
121 views

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 ...
user avatar
  • 215
3 votes
1 answer
59 views

How to insert a space inside NiceArray while maintain alignment of \Block with \SubMatrix

I am trying to align multiple math equations with braces using nicematrix The result above is as desired but I would like to Add small space after the third row. However, this causes the contents of ...
user avatar
1 vote
0 answers
41 views

Interaction between Beamer, Nicematrix and Polyglossia

I have run into a curious interaction between Nicematrix and Polyglossia when used in Beamer, specifically in connection with the command \Block. The code shown compiles perfectly in XeLaTeX if the ...
user avatar
3 votes
2 answers
158 views

Strange interline spacing with arraystretch in a NiceTabular

Good evening to all, and all the best for this new year. I am trying to get a NiceTabular (of the NiceMatrix package) with some text in it, and as I would like it to be more airy than normal, I use \...
user avatar
  • 215
1 vote
1 answer
52 views

How can I create a matrix with row labels on the outside (left and right) and a vertical line inside?

I'm trying to achieve something like the picture below, I am currently using {pNiceMatrix} and can achieve the labels but cannot seem to find a way to put a vertical line in. Any suggestions? My ...
user avatar
2 votes
1 answer
28 views

The spacing when using arabic counter as the tabularnote index

Is there a way to let arabic counter have the same spacing as with alph? MWE \documentclass{article} \usepackage{enumitem} \usepackage{nicematrix} \begin{document} { \NiceMatrixOptions{ notes={ ...
user avatar
4 votes
2 answers
176 views

Fill Two Nicematrices with Different Background Colours Using Tikzpicture

I want to fill these two(2) matrices with two different background colours. \documentclass[xcolor=dvipsnames,svgnames]{beamer} \usetheme{Madrid} \usepackage{tikz} \usetikzlibrary{shapes.geometric,...
user avatar
1 vote
1 answer
96 views

How to avoid color gradient in table cell that is split in 2 colors?

I adapted a solution from post Multi-colored cell background using Overleaf. The code I use is the following: %%% This code comes from https://tex.stackexchange.com/questions/348933/multi-colored-cell-...
user avatar
3 votes
2 answers
480 views

How to draw a vertical line in a table?

How do I draw a vertical line in the following table: \documentclass{article} \usepackage{booktabs} \begin{document} \noindent\begin{tabular}{lp{1.5in}lp{1.5in}} \toprule Parameter & Description &...
user avatar
  • 619
1 vote
0 answers
33 views

Generated Table Format Issue [duplicate]

I wrote a simple code to generate a simple table. Here is my code: \documentclass[a4paper,11pt,english]{report} \usepackage{nicematrix} \begin{document} \begin{table} \begin{NiceTabular}{| p{0.2\...
user avatar
  • 327
1 vote
1 answer
54 views

The option shorten (from nicematrix) does not seem to work for OverBrace command

I am trying to use the option shorten with \OverBrace and \UnderBrace commands from nicematrix. it appears to me, however, that it works only for \UnderBrace My MWE \documentclass{book} \usepackage[...
user avatar
1 vote
1 answer
105 views

Spacing issues when using NiceMatrix in Manim

I am trying to incorporate nicematrix objects in a Manim video and I am getting some spacing issues. The code from manim import * class Chap8_Recap36b(Scene): def construct(self): # self....
user avatar
  • 197
0 votes
0 answers
139 views

`nicematrix` does not update successfully to v6.4

I am using a MiKTeX distribution for LaTeX. I tried to check for updates to download nicematrix v6.4. However, the update is not really visible (i.e., even tough I have v6.3, MiKTeX console does not ...
user avatar
6 votes
2 answers
147 views

Is it possible to typeset over and underbraces in NiceMatrix?

I am trying to draw matrices with overbraces and underbraces. This may be done with the assistance of node numbering and \tikzset to process a few options for the calligraphic braces. According to how ...
user avatar
5 votes
3 answers
164 views

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}...
user avatar

1
2 3 4 5