2

By using nicematrix package and command \Block, I'm struggling to reduce the width and height of block colors, separately. Any hint? Below, find the code:

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

\begin{document}
\begin{equation*}
    \begin{bNiceArray}{cccc|c}[columns-width=5pt,margin]
      \Block[fill=red]{2-4}{} a_{11} & a_{12} & a_{13} & a_{14} & \Block[fill=yellow]{3-1}{} a_{15} \\
      a_{21} & a_{22} & a_{23} & a_{24} & a_{25} \\
      a_{31} & a_{32} & a_{33} & a_{34} & a_{35}
    \end{bNiceArray}
\end{equation*}

\end{document}

enter image description here

1 Answer 1

4

Here is a suggestion:

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

\begin{document}
\begin{equation*}
    \begin{bNiceArray}{cccc|c}[columns-width=5pt,margin]
      \Block[tikz={fill=red,offset=1.5pt}]{2-4}{} a_{11} & a_{12} & a_{13} & a_{14} 
        & \Block[tikz={fill=yellow,offset=1pt}]{3-1}{} a_{15} \\
      a_{21} & a_{22} & a_{23} & a_{24} & a_{25} \\
      a_{31} & a_{32} & a_{33} & a_{34} & a_{35}
    \end{bNiceArray}
\end{equation*}

\end{document}

Output of the above code

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.