2

I was trying to make the following matrix with the nicematrix package:

\begin{equation*}
    A_c+B_c K_c=\begin{bNiceMatrix}
        0               & 1                     & 0         & \Cdots    & 0     \\
        \Vdots          & \Ddots                & \Ddots    & \Ddots    & \Vdots\\
                        &                       & \Ddots    & \Ddots    & 0     \\
        0               & \Cdots                &           & 0         & 1     \\
        -\alpha_n+k_n   & -\alpha_{n-1}+k_{n-1} & \Cdots    &           & -\alpha_1+k_1
    \end{bNiceMatrix}
\end{equation*}

The problem is that the diagonal dots don't go where I would like them to go:

enter image description here

I found out that the nicematrix package draws all the diagonal dotted lines parallel to the first one. The nicematrix documentation says to set to false the option parallelize-diags (page 23), but the compiler gives this error:

Package keyvalue Error: Unknown option 'parallelize-diags' for package (keyvalue) nicematrix.

Is there a way to fix this problem?

Thanks in advance!

3

The key parallelize-diags is available only in \NiceMatrixOptions (the scope of such a setting is the current TeX group).

Moreover, there is in your code two redundant commands \Ddots.

\documentclass{article}
\usepackage{nicematrix}

\begin{document}
\NiceMatrixOptions{parallelize-diags=false}
\begin{equation*}
    A_c+B_c K_c=\begin{bNiceMatrix}
        0               & 1                     & 0         & \Cdots    & 0     \\
        \Vdots          & \Ddots                & \Ddots    & \Ddots    & \Vdots\\
                        &                       &           &           & 0     \\
        0               & \Cdots                &           & 0         & 1     \\
        -\alpha_n+k_n   & -\alpha_{n-1}+k_{n-1} & \Cdots    &           & -\alpha_1+k_1
    \end{bNiceMatrix}
\end{equation*}
\end{document}

Result of the above code

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.