Comprimentos de curva horizontal dentro do blkarray

Comprimentos de curva horizontal dentro do blkarray

Considere o seguinte MWE usando o blkarraypacote:

\documentclass[11pt]{article}
\usepackage{lmodern}
\usepackage{blkarray}

\begin{document}
\[
\begin{blockarray}{[ccc|ccc|cc]c}
\mathsf{x} & \mathsf{x} & \mathsf{x} & \mathsf{x} & 
\mathsf{x} & \mathsf{x} & \mathsf{x} & \mathsf{x} \\
\mathsf{x} & \mathsf{x} & \mathsf{x} & \mathsf{x} & \mathsf{x} & 
\mathsf{x} & \mathsf{x} & \mathsf{x} \\
& \mathsf{x} & \mathsf{x} & \mathsf{x} & \mathsf{x} & 
\mathsf{x} & \mathsf{x} & \mathsf{x} \\ \cline{1-8}
&            &            & \mathsf{x} & \mathsf{x} & 
\mathsf{x} & \mathsf{x} & \mathsf{x} & p \\
&            &            & \mathsf{x} & \mathsf{x} & 
\mathsf{x} & \mathsf{x} & \mathsf{x} \\
&            &            &            & \mathsf{x} & 
\mathsf{x} & \mathsf{x} & \mathsf{x} \\\cline{1-8}
&            &            &            &            & 
& \mathsf{x} & \mathsf{x} & q \\   
&            &            &            &            & 
&            & \mathsf{x} \\   
\end{blockarray}
\]
\end{document}

onde os dois \clines podem ser vistos se cruzando com as chaves. Qual é a melhor maneira de apará-los? O \cmidrulecomando from booktabsfaz aproximadamente isso, mas tem uma interação negativa com as duas linhas verticais.

Além disso, em comparação com um equivalente, bmatrixparece que os colchetes estão um pouco mais próximos dos elementos da matriz do que o normal.

Responder1

Não há interação com as linhas verticais se você remover localmente o preenchimento das regras booktabs, que dependem dos valores de \aboverulesep(default: 0.605mmor 0.4ex) e \belowrulesep{<width>}(default: 0.984mmor 0.65ex) :

\documentclass[11pt]{article}
\usepackage{lmodern}
\usepackage{blkarray, bigstrut}
\usepackage{booktabs} 

\begin{document}
\[ \setlength\aboverulesep{0pt}\setlength\belowrulesep{0pt}
    \setlength\cmidrulewidth{0.5pt}
\begin{blockarray}{[ccc|ccc|cc]c}
\bigstrut[t]\mathsf{x} & \mathsf{x} & \mathsf{x} & \mathsf{x} &
\mathsf{x} & \mathsf{x} & \mathsf{x} & \mathsf{x} \\
\mathsf{x} & \mathsf{x} & \mathsf{x} & \mathsf{x} & \mathsf{x} &
\mathsf{x} & \mathsf{x} & \mathsf{x} \\
& \mathsf{x} & \mathsf{x} & \mathsf{x} & \mathsf{x} &
\mathsf{x} & \mathsf{x} & \mathsf{x} \\ 
\cmidrule(lr){1-8}
& & & \mathsf{x} & \mathsf{x} &
\mathsf{x} & \mathsf{x} & \mathsf{x} & p \\
& & & \mathsf{x} & \mathsf{x} &
\mathsf{x} & \mathsf{x} & \mathsf{x} \\
& & & & \mathsf{x} &
\mathsf{x} & \mathsf{x} & \mathsf{x} \\%\cline{1-8}
\cmidrule(lr){1-8} & & & & && \mathsf{x} & \mathsf{x} & q \\
    & & & & & & & \mathsf{x}\bigstrut[b] \\
\end{blockarray}
\]

\end{document} 

insira a descrição da imagem aqui

informação relacionada