Horizontale Klinenlängen innerhalb von Blkarray

Horizontale Klinenlängen innerhalb von Blkarray

Beachten Sie die folgenden MWE unter Verwendung des blkarrayPakets:

\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 \clines die Klammern schneiden. Wie kann man diese am besten kürzen? Der \cmidruleBefehl von booktabsmacht ungefähr dasselbe, hat aber eine negative Wechselwirkung mit den beiden vertikalen Linien.

Auch im Vergleich mit einem Äquivalent bmatrixsieht 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.605mmoder 0.4ex) und \belowrulesep{<width>}(Standard: 0.984mmoder 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} 

Bildbeschreibung hier eingeben

verwandte Informationen