
Beachten Sie die folgenden MWE unter Verwendung des blkarray
Pakets:
\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}
wo man sehen kann, dass die beiden \cline
s die Klammern schneiden. Wie kann man diese am besten kürzen? Der \cmidrule
Befehl von booktabs
macht ungefähr dasselbe, hat aber eine negative Wechselwirkung mit den beiden vertikalen Linien.
Auch im Vergleich mit einem Äquivalent bmatrix
sieht es für mein Auge so aus, als ob die Klammern etwas näher an den Elementen der Matrix wären als üblich.
Antwort1
Es gibt keine Interaktion mit den vertikalen Linien, wenn Sie die Auffüllungsregeln für Booktabs lokal entfernen, die von den Werten von \aboverulesep
(Standard: 0.605mm
oder 0.4ex
) und \belowrulesep{<width>}
(Standard: 0.984mm
oder 0.65ex
) abhängen:
\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}