0

I would like to customize the array environment in such a way that I can write arrays with dashed delimiters that are internal to the arrays as in the figure below.

enter image description here

Question. How do I place the vertical and horizontal delimiters on the inside of the arrays? Is it possible to have control over the customization of the delimiters? Like can I control the delimiters so that they are dashed or continuous or colored?

Thanks in advance.

My attempt. The best I got was using the code below.

    \begin{center}
    \left[\begin{array}{c|c|c}
    \underline{\displaystyle{A}_{\vspace{5mm}}} 
    & 
    \underline{\displaystyle{B}_{\vspace{5mm}}} 
    & 
    \underline{\displaystyle{E}_{\vspace{5mm}}} 
    \\ 
    \underline{\displaystyle{C}_{\vspace{5mm}}}
    & 
    \underline{\displaystyle{D}_{\vspace{5mm}}}
    & 
    \underline{\displaystyle{F}_{\vspace{5mm}}}
    \\
    \underline{\displaystyle{G}_{\vspace{5mm}}}
    &
    \underline{\displaystyle{H}_{\vspace{5mm}}}
    & 
    \underline{\displaystyle{L}_{\vspace{5mm}}}
    \end{array}\right]
    \end{center}

And the result was somewhat unsatisfactory as can be seen in the figure below.

enter image description here

MathOverview
  • 2,921

1 Answers1

2

As from suggestion of the creator F. Pantigny of nicematrix package, I add the differents output considering also the comments.

\documentclass[a4paper,12pt]{article}
\usepackage{amssymb}
\usepackage{nicematrix}
\usepackage{arydshln}

\begin{document} \setlength{\extrarowheight}{1mm} \renewcommand{\arraystretch}{1} [\left[,\begin{NiceArray}{c:c:c} A & B & C \ \hdashline D & E & F \ \hdashline G & H & O \end{NiceArray},\right] ]

[\left[,\begin{NiceArray}{c:c} A & B \ \hdashline D & E \ \end{NiceArray},\right] ]

[\left[,\begin{NiceArray}{c} A \ \hdashline D \ \end{NiceArray},\right] ]

[\left[\begin{NiceArray}{c:c} A & V\ \end{NiceArray}\right] ]

\end{document}

enter image description here

Sebastiano
  • 54,118