Wie entferne ich den vertikalen Abstand zwischen zwei Tikz-Matrixzeilen?

Wie entferne ich den vertikalen Abstand zwischen zwei Tikz-Matrixzeilen?

Ich habe folgende Matrix in TikZ:

Beispiel für unnötigen vertikalen Raum

Hier ist der Code:

\documentclass{article}
\usepackage{tikz,amssymb}
\usetikzlibrary{matrix,calc,fit}
\begin{document}

\tikzset{
    circled/.style={draw,circle,inner sep=0pt},
    highrow/.style={minimum height=.9cm},
}
\begin{tikzpicture}
  \node[matrix of nodes] (tcm) {
    {}  &
    $a_{00}$  &  $\leqslant$  &
    $a_{10}$  &  $\leqslant$  &
    $a_{20}$  &  $\leqslant$  &
    $\cdots$  &  $\leqslant$  &
    $\lim\limits_{n\to\infty} a_{n0}$  \\
    {}  &
    $a_{01}$  &  $\leqslant$  &
    $a_{11}$  &  $\leqslant$  &
    $a_{21}$  &  $\leqslant$  &
    $\cdots$  &  $\leqslant$  &
    $\lim\limits_{n\to\infty} a_{n1}$ \\
    {}  &
    $a_{02}$  &  $\leqslant$  &
    $a_{12}$  &  $\leqslant$  &
    $a_{22}$  &  $\leqslant$  &
    $\cdots$  &  $\leqslant$  &
    $\lim\limits_{n\to\infty} a_{n2}$  \vspace{-5cm}\\
    |[circled]| $+$  &
    |[highrow]| $\vdots$  &  {}  &
    $\vdots$  &  {}  &
    $\vdots$  &  {}  &
    $\ddots$  &  {}  &
    $\vdots$  \\
    {}  &
    $\sum\limits_{m=0}^\infty a_{0m}$  &  {}  &
    $\sum\limits_{m=0}^\infty a_{1m}$  &  {}  &
    $\sum\limits_{m=0}^\infty a_{2m}$  &  {}  &
    $\cdots$                           &  {}  &
    $\sum\limits_{m=0}^\infty \lim\limits_{n\to\infty} a_{nm}$  \\
  };
  \node[fit=(tcm-5-1) (tcm-5-2) (tcm-5-3) (tcm-5-4) (tcm-5-5) (tcm-5-6) (tcm-5-7) (tcm-5-8) (tcm-5-9) (tcm-5-10),inner sep=0pt] (R5) {};
  \draw (R5.north -| tcm.west) -- (R5.north -| tcm.east);
\end{tikzpicture}

\end{document}

Der vertikale Abstand zwischen der dritten und vierten Reihe stört mich. Die vierte Reihe (die Reihe, die auf das eingekreiste Pluszeichen folgt) hat oben viel vertikalen Abstand, und ich kann ihn nicht entfernen. Soweit ich weiß, row sepfunktioniert das nur für alle Reihen gleichzeitig – ich kann es nicht nur in der vierten Reihe verwenden.

OBS: Die Ursache des Problems liegt nicht beim minimum heighteingekreisten Pluszeichen. Wenn diese Mindesthöhe auf Null gesetzt ist, weist die vierte Zeile einen ungewöhnlich großen vertikalen Abstand darüber auf.

Antwort1

Die „Standard“ -Anpassungen funktionieren so, dass Sie beispielsweise tabularverwenden können , um den Abstand zwischen zwei aufeinanderfolgenden Zeilen zu verringern. In ähnlicher Weise wird von Abstand hinzugefügt . Wenn Sie dies tun, wird Ihr Diagramm:\\[-4mm]\\[3em]3em

Bildbeschreibung hier eingeben

Hier ist der vollständige Code (der des OP mit dieser einzelnen Anpassung):

\documentclass{article}
\usepackage{tikz,amssymb}
\usetikzlibrary{matrix,calc,fit}
\begin{document}

\tikzset{
    circled/.style={draw,circle,inner sep=0pt},
    highrow/.style={minimum height=.9cm},
}
\begin{tikzpicture}
  \node[matrix of nodes] (tcm) {
    {}  &
    $a_{00}$  &  $\leqslant$  &
    $a_{10}$  &  $\leqslant$  &
    $a_{20}$  &  $\leqslant$  &
    $\cdots$  &  $\leqslant$  &
    $\lim\limits_{n\to\infty} a_{n0}$  \\
    {}  &
    $a_{01}$  &  $\leqslant$  &
    $a_{11}$  &  $\leqslant$  &
    $a_{21}$  &  $\leqslant$  &
    $\cdots$  &  $\leqslant$  &
    $\lim\limits_{n\to\infty} a_{n1}$ \\
    {}  &
    $a_{02}$  &  $\leqslant$  &
    $a_{12}$  &  $\leqslant$  &
    $a_{22}$  &  $\leqslant$  &
    $\cdots$  &  $\leqslant$  &
    $\lim\limits_{n\to\infty} a_{n2}$  \\[-4mm]
    |[circled]| $+$  &
    |[highrow]| $\vdots$  &  {}  &
    $\vdots$  &  {}  &
    $\vdots$  &  {}  &
    $\ddots$  &  {}  &
    $\vdots$  \\
    {}  &
    $\sum\limits_{m=0}^\infty a_{0m}$  &  {}  &
    $\sum\limits_{m=0}^\infty a_{1m}$  &  {}  &
    $\sum\limits_{m=0}^\infty a_{2m}$  &  {}  &
    $\cdots$                           &  {}  &
    $\sum\limits_{m=0}^\infty \lim\limits_{n\to\infty} a_{nm}$  \\
  };
  \node[fit=(tcm-5-1) (tcm-5-2) (tcm-5-3) (tcm-5-4) (tcm-5-5) (tcm-5-6) (tcm-5-7) (tcm-5-8) (tcm-5-9) (tcm-5-10),inner sep=0pt] (R5) {};
  \draw (R5.north -| tcm.west) -- (R5.north -| tcm.east);
\end{tikzpicture}

\end{document}

Antwort2

Der zusätzliche vertikale Raum ergibt sich aus der Höhe von \vdotsund \ddotswie Sie sehen können mit

\documentclass[tikz]{standalone}
\begin{document}
\tikz\node[inner sep=0pt,draw]{$\vdots$};
\end{document}

Bildbeschreibung hier eingeben

Daher würde ich $\smash{\vdots}$die Höhe der Punkte ausblenden und einen Stil verwenden strutsize/.style={text height=\ht\strutbox,text depth=\dp\strutbox}, um den benötigten vertikalen Raum zu reservieren.

Bildbeschreibung hier eingeben

\documentclass{article}
\usepackage{tikz,amssymb}
\usetikzlibrary{matrix,calc,fit}
\begin{document}

\tikzset{
    circled/.style={draw,circle,inner sep=0pt},
    highrow/.style={minimum height=.9cm},
    strutsize/.style={text height=\ht\strutbox,text depth=\dp\strutbox}
}
\begin{tikzpicture}
  \node[matrix of nodes] (tcm) {
    {}  &
    $a_{00}$  &  $\leqslant$  &
    $a_{10}$  &  $\leqslant$  &
    $a_{20}$  &  $\leqslant$  &
    $\cdots$  &  $\leqslant$  &
    $\lim\limits_{n\to\infty} a_{n0}$  \\
    {}  &
    $a_{01}$  &  $\leqslant$  &
    $a_{11}$  &  $\leqslant$  &
    $a_{21}$  &  $\leqslant$  &
    $\cdots$  &  $\leqslant$  &
    $\lim\limits_{n\to\infty} a_{n1}$ \\
    {}  &
    $a_{02}$  &  $\leqslant$  &
    $a_{12}$  &  $\leqslant$  &
    $a_{22}$  &  $\leqslant$  &
    $\cdots$  &  $\leqslant$  &
    $\lim\limits_{n\to\infty} a_{n2}$ \\
    |[circled]| $+$  &
    |[strutsize]| $\smash{\vdots}$  &  {}  &
    $\smash{\vdots}$  &  {}  &
    $\smash{\vdots}$  &  {}  &
    $\smash{\ddots}$  &  {}  &
    $\smash{\vdots}$  \\
    {}  &
    $\sum\limits_{m=0}^\infty a_{0m}$  &  {}  &
    $\sum\limits_{m=0}^\infty a_{1m}$  &  {}  &
    $\sum\limits_{m=0}^\infty a_{2m}$  &  {}  &
    $\cdots$                           &  {}  &
    $\sum\limits_{m=0}^\infty \lim\limits_{n\to\infty} a_{nm}$  \\
  };
  \node[fit=(tcm-5-1) (tcm-5-2) (tcm-5-3) (tcm-5-4) (tcm-5-5) (tcm-5-6) (tcm-5-7) (tcm-5-8) (tcm-5-9) (tcm-5-10),inner sep=0pt] (R5) {};
  \draw (R5.north -| tcm.west) -- (R5.north -| tcm.east);
\end{tikzpicture}

\end{document}

verwandte Informationen