2

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

1 Answer 1

3

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*{5\baselineskip}

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}
1
  • Thank you very much, I was aware of a recent update that involved the use of \cdots instead of \Cdots but I think I forgot. Thank you once more I will be more aware next time :) May 9, 2021 at 15:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .