TransWikia.com

Issue with the horizontal dotted lines in the nicematrix package

TeX - LaTeX Asked by B E I R U T on July 14, 2021

There appears to be horizontal dotted lines that are overlapping with the elements of my matrix. I encountered the same issue with the vertical lines but I managed to use Vdotsfor{1} and it worked. However, I tried to use Hdotsfor{1} for the horizontal lines but I received an error of mismatch. Therefore, I hope there is some way to fix this and I hope to know why this issue happened. Here’s the full code:

documentclass[12pt,english]{article}
usepackage{nicematrix}
NiceMatrixOptions{renew-dots}
NiceMatrixOptions{renew-matrix}

begin{bNiceMatrix}
a_{1,1}x_{1}+a_{1,2}x_{2}+cdots+a_{1,j}x_{j}+cdots+a_{1,n}x_{n}+y_{1} 
Vdotsfor{1}
a_{i,1}x_{1}+a_{i,2}x_{2}+cdots+a_{i,j}x_{j}+cdots+a_{i,n}x_{n}+y_{i} 
Vdotsfor{1}
a_{m,1}x_{1}+a_{m,2}x_{2}+cdots+a_{m,j}x_{j}+cdots+a_{m,n}x_{n}+y_{m}
end{bNiceMatrix}

end{document}

Here is what I am obtaining:

enter image description here

One Answer

You need to add the & and use Cdots and Vdots.

Or, if you use NiceMatrixOptions {renew-dots}, keep using cdots and vdots.

... them must be used alone in the cell of the array and it draws a dotted line between the first non-empty cells. (manual p.19)

d

Use this code:

documentclass[12pt,english]{article}

usepackage{nicematrix}
NiceMatrixOptions{renew-dots}
NiceMatrixOptions{renew-matrix}

begin{document}    
    
    $begin{bNiceMatrix}
        a_{1,1}x_{1}+a_{1,2}x_{2}+  &Cdots &+a_{1,j}x_{j}+ &Cdots &+a_{1,n}x_{n}+y_{1} 
                            &       &Vdots                 &       &                   
        a_{i,1}x_{1}+a_{i,2}x_{2}+  &Cdots &+a_{i,j}x_{j}+ &Cdots &+a_{i,n}x_{n}+y_{i} 
                            &       &Vdots                 &       &                   
        a_{m,1}x_{1}+a_{m,2}x_{2}+  &Cdots &+a_{m,j}x_{j}+ &Cdots &+a_{m,n}x_{n}+y_{m}
    end{bNiceMatrix}$  

vspace*{5baselineskip}

Using the  options renew-dots and renew-matrix
 bigskip

    $begin{bmatrix}
    a_{1,1}x_{1}+a_{1,2}x_{2}+  &cdots &+a_{1,j}x_{j}+ &cdots &+a_{1,n}x_{n}+y_{1} 
                                &       &vdots         &       &                   
    a_{i,1}x_{1}+a_{i,2}x_{2}+  &cdots &+a_{i,j}x_{j}+ &cdots &+a_{i,n}x_{n}+y_{i} 
                                &       &vdots         &       &                   
    a_{m,1}x_{1}+a_{m,2}x_{2}+  &cdots &+a_{m,j}x_{j}+ &cdots &+a_{m,n}x_{n}+y_{m}
end{bmatrix}$  
    
end{document}

Correct answer by Simon Dispa on July 14, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP