2

This is a followup to this question.

MWE (given by Henri Menke in the linked post):

\documentclass{article} \usepackage{blkarray} \begin{document} \[ \left[ \begin{blockarray}{ccccccc} \begin{block}{[ccc]cccc} I_p \\ & \ddots \\ & & I_p \\ \end{block} \begin{block}{c[ccc]ccc} & I_p \\ & & \ddots \\ & & & I_p \\ \end{block} & & & \vdots & \ddots \\ & & & \ddots & \vdots \\ \begin{block}{cccc[ccc]} & & & & I_p \\ & & & & & \ddots \\ & & & & & & I_p \\ \end{block} \end{blockarray} \right] \] \end{document} 

This produces this: enter image description here

This is almost what I want, except the brackets produced by \left[ and \right are too long on the bottom. I feel like there must be a way to do this exclusively in a blockarray, but the documentation for the package is not extensive enough that it has quickly led me to such a solution.

2 Answers 2

2

blkarray is so weird....

enter image description here

\documentclass{article} \usepackage{blkarray} \addtolength\textwidth{25pt} \begin{document} \[ \left[ \begin{blockarray}{ccccccc} \begin{block}{[ccc]cccc} I_p \\ & \ddots \\ & & I_p \\ \end{block} \begin{block}{c[ccc]ccc} & I_p \\ & & \ddots \\ & & & I_p \\ \end{block} & & & \vdots & \ddots \\ & & & \ddots & \vdots \\ \begin{block}{cccc[ccc]} & & & & I_p \\ & & & & & \ddots \\ & & & & & & I_p \\ \end{block} \end{blockarray} \right] + \left[ \begin{blockarray}{ccccccc} \begin{block}{[ccc]cccc} I_p \\ & \ddots \\ & & I_p \\ \end{block} \begin{block}{c[ccc]ccc} & I_p \\ & & \ddots \\ & & & I_p \\ \end{block} & & & \vdots & \ddots \\ & & & \ddots & \vdots \\ \begin{block}{cccc[ccc]} & & & & I_p \\ & & & & & \ddots \\ & & & & & & I_p \\ \end{block} \BAnoalign{\vspace{-20pt}} \end{blockarray} \right] \] \end{document} 
1
  • You should contact the author of blkarray about this. ;) Commented Feb 22, 2019 at 23:19
0

With {NiceArray} of nicematrix.

\documentclass{article} \usepackage{nicematrix} \begin{document} Without modification of \verb|\delimiterfactor|. % \[ \left[\begin{NiceArray}{ccccccc}[margin] I_p \\ & \ddots \\ & & I_p \\ & I_p \\ & & \ddots \\ & & & I_p \\ & & & \vdots & \ddots \\ & & & \ddots & \vdots \\ & & & & I_p \\ & & & & & \ddots \\ & & & & & & I_p \\ \CodeAfter \SubMatrix[{1-1}{3-3}] \SubMatrix[{4-2}{6-4}] \SubMatrix[{9-5}{11-7}] \end{NiceArray}\right]\] % With \verb|\delimiterfactor=1050| and \verb|\delimiterfactor=901| back in the \verb|\CodeAfter|. % \[\delimiterfactor=1050 \left[\begin{NiceArray}{ccccccc}[margin] I_p \\ & \ddots \\ & & I_p \\ & I_p \\ & & \ddots \\ & & & I_p \\ & & & \vdots & \ddots \\ & & & \ddots & \vdots \\ & & & & I_p \\ & & & & & \ddots \\ & & & & & & I_p \\ \CodeAfter \delimiterfactor=901 % default value \SubMatrix[{1-1}{3-3}] \SubMatrix[{4-2}{6-4}] \SubMatrix[{9-5}{11-7}] \end{NiceArray}\right]\] \end{document} 

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

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.