5

What I've tried:

\begin{gather}
\label{eq:anm_inspecao_exemplo1}
\begin{matrix} 
    \textcolor{blue}{1} \\
    \textcolor{blue}{2} \\
    \textcolor{blue}{3} \\
    \textcolor{blue}{4} \\
    \textcolor{blue}{BCE} &
\end{matrix}
\putunder{
    \begin{bmatrix}[cccc:c]
        \rule{0in}{.16in} &   &   &   & \\
        &   &   &   & \\
        &   &   &   & \\
        &   &   &   & \\
        \\[-3ex] \hdashline
        &  &  &  & \\
    \end{bmatrix}
}{
    \begin{matrix}
        \textcolor{red}{A}
    \end{matrix}
}
.
\putunder{
    \begin{bmatrix} 
        V_1\\
        V_2 \\
        V_3 \\
        V_4 \\
        \\[-3ex] \hdashline
        I_V \\
    \end{bmatrix}
}{
    \begin{matrix} 
        \textcolor{red}{VI_X}
    \end{matrix}
}
=
\putunder{
    \begin{bmatrix}
        \\
        \\
        \\
        \\
        \\[-3ex] \hdashline
         \\
    \end{bmatrix}
}{
    \begin{matrix} 
        \textcolor{red}{IV}
    \end{matrix}
}

\end{gather}

What I got with the code above:enter image description here

I just want a matrix in a normal size, not with a crushed width. But it needs to be empty, without values, like this one:

enter image description here

1
  • 1
    One way would be to use \phantom{xx} (where xx is the approriate sized content represenitng the amount of space required) for each entry of the matrix. Commented Sep 29, 2022 at 6:26

1 Answer 1

5

Here is what you can do with nicematrix.

\documentclass{article}
\usepackage{nicematrix,tikz}

\begin{document}

\NiceMatrixOptions
  {
    custom-line = 
     {
       letter = I ,
       command = hdashedline ,
       tikz = dashed ,
       total-width = 1mm 
     }
  }

$\begin{NiceArray}{rccccIcccccc}
  & 1 & 2 & 3 & 4 & I_V &       &      & & \hspace*{2mm}  &  \\
1 &   &   &   &   &     &       & V_1  &   &    \\
2 &   &   &   &   &     &       & V_2  &   &    \\
3 &   &   &   &   &     & \cdot & V_3  & = &    \\
4 &   &   &   &   &     &       & V_4  &   &    \\
\hdashedline
\text{BCE V}  &   &   &   &   &     & & I_V  & &    \\
  & \Block{1-4}{A} &   &   &   &     & & VI_x & & IV \\
\CodeAfter
  \SubMatrix[{2-2}{6-6}]
  \SubMatrix[{2-8}{6-8}]
  \SubMatrix[{2-10}{6-10}]
\end{NiceArray}$

\end{document}

You need several compilations (because nicematrix uses PGF/Tikz nodes under the hood).

Output of the above code

2
  • Thanks ! I worked very well! I'm just trying to set a \label{eq:xyz} for this now. I've tried to do in the same way that I've done in my example with bmatrix but it didn't work. Could you help me with this? Commented Sep 29, 2022 at 21:08
  • \[.... \label{eq:xyz}\] as usual with equations... Commented Sep 30, 2022 at 5:24

You must log in to answer this question.

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