
Considere el siguiente MWE usando el blkarray
paquete:
\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}
\cline
donde se puede ver que las dos s se cruzan con las llaves. ¿Cuál es la mejor manera de recortarlos? El \cmidrule
comando from booktabs
hace aproximadamente esto, pero tiene una interacción negativa con las dos líneas verticales.
Además, en comparación con un equivalente, bmatrix
me parece como si las llaves estuvieran algo más cerca de los elementos de la matriz de lo habitual.
Respuesta1
No hay interacción con las líneas verticales si elimina localmente el relleno de las reglas de las pestañas de libros, que dependen de los valores de \aboverulesep
(predeterminado: 0.605mm
o 0.4ex
) y \belowrulesep{<width>}
(predeterminado: 0.984mm
o 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}