Tikz Matrix는 행 사이에 큰 간격이 있습니다

Tikz Matrix는 행 사이에 큰 간격이 있습니다

삽입하는 행렬의 행 사이에 매우 큰 간격이 있는 문제가 있습니다. 무슨 이유에서인지 한 줄 간격이 10.5cm 정도 되는데, 이유를 모르겠습니다. 다음 코드는 매트릭스 상자 상단이 페이지에서 벗어나는 이 이미지를 생성합니다. 볼 수 있듯이 Legend와 Facilitator 작업 노드 사이에는 상당한 차이가 있습니다. 오른쪽의 대형 매트릭스

\documentclass[a4paper,12pt]{article}

%Packages included
\usepackage[printwatermark]{xwatermark}
\usepackage{tikz}
\usepackage{xcolor}
\usepackage{sectsty}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage[margin=2cm]{geometry}
\usepackage{cite}
\usepackage{pdfpages}
\usepackage{tikz}
\usetikzlibrary{shapes, arrows, chains, positioning}
\usepackage{float}

\begin{document}
\begin{figure} [H]
\centering
    \begin{tikzpicture}[
        >=triangle 60,
        start chain=going below,
        node distance=0.6cm and 6cm,
        every join/.style={norm},
        ]

    \tikzset{
        base/.style={draw, on chain, on grid, align=center, minimum height=4ex, text=black},
        box/.style={base, rectangle, text width=10em},
        corner/.style={box, rounded corners},
        norm/.style={->, draw},
        test/.style={base, diamond, aspect=2, text width=5em},
        fac/.style={box, dotted},
        coord/.style={coordinate, on chain, on grid, node distance=0.6cm and 2cm}
        }

        \node [corner]  (start) {Start of process};
        \node [fac, join]       {Assemble expert panel};
        \node [box, join]   (stp)   {Panel review's indicators};
        \node [box, join]       {Panel provides anonymous feedback};
        \node [fac, join]       {Feedback reviewed by facilitator};
        \node [test, join]  (cons)  {Consensus reached?};
        \node [box]     (fin)   {Final indicator set compiled};
        \node [box, join]       {Indicators added to protocol, updated minimum data set added to protocol};
        \node [corner, join]        {Process finished};
        \node [fac, right =of cons] (upd)   {Indicators updated in line with feedback};
        \node [fac, left=of stp]    (ind)   {Indicators sourced from literature, best practice guidelines, etc.};

        \node [coord, right=of cons] (c1) {};

        \path (cons.south) to node [near start, xshift=0.5em] {$y$} (fin);
            \draw [*->] (cons.south) -- (fin);
        \path (cons.east) to node [near start, yshift=0.5em] {$n$} (c1);
            \draw [*->] (cons.east) -- (upd);
        \draw [->] (upd.north) |- (stp);

        \draw [->] (start.west) -| (ind);
        \draw [->] (ind.east) -- (stp);'

    \matrix [draw, above left] at (current bounding box.south east) {
        \node [box, text width=1em, color=white, label=right:\emph{Legend}] {};\\ 
        \node [fac, text width=1em, label=right:Facilitator Task] {}; \\    
    };



    \end{tikzpicture}
    \caption{Formal process for CQIs}
    \label{fig:delphi1}
\end{figure}

\end{document}

저는 현재 Latex를 처음 접하고 다양한 소스와 튜토리얼을 통해 배우고 있으므로 제 코드가 이해되지 않을 수도 있습니다.

답변1

환영! 행렬의 노드에는 에서 상속받은 키 on chain와 가 있습니다 . 이 키를 삭제해야 합니다.on gridbase

\documentclass[a4paper,12pt]{article}
\usepackage[margin=2cm]{geometry}
\usepackage{tikz}
\usetikzlibrary{shapes, arrows, chains, positioning}
%\usepackage{float}

\begin{document}
\begin{figure} [htb]
\centering
    \begin{tikzpicture}[start chain=going below,
        >=triangle 60,       
        node distance=0.6cm and 6cm,
        every join/.style={norm},
        ]

    \tikzset{
        mbase/.style={draw,   align=center, minimum height=4ex, text=black},
        base/.style={mbase,on chain,on grid},
        mbox/.style={mbase, rectangle, text width=10em},
        box/.style={base, rectangle, text width=10em},
        corner/.style={box, rounded corners},
        norm/.style={->, draw},
        test/.style={base, diamond, aspect=2, text width=5em},
        fac/.style={box, dotted},
        mfac/.style={mbox, dotted},
        coord/.style={coordinate, on chain, on grid, node distance=0.6cm and 2cm}
        }
        \node [corner]  (start) {Start of process};
        \node [fac, join]       {Assemble expert panel};
        \node [box, join]   (stp)   {Panel review's indicators};
        \node [box, join]       {Panel provides anonymous feedback};
        \node [fac, join]       {Feedback reviewed by facilitator};
        \node [test, join]  (cons)  {Consensus reached?};
        \node [box]     (fin)   {Final indicator set compiled};
        \node [box, join]       {Indicators added to protocol, updated minimum data set added to protocol};
        \node [corner, join]        {Process finished};
        \node [fac, right =of cons] (upd)   {Indicators updated in line with feedback};
        \node [fac, left=of stp]    (ind)   {Indicators sourced from literature, best practice guidelines, etc.};

        \node [coord, right=of cons] (c1) {};

        \path (cons.south) to node [near start, xshift=0.5em] {$y$} (fin);
            \draw [*->] (cons.south) -- (fin);
        \path (cons.east) to node [near start, yshift=0.5em] {$n$} (c1);
            \draw [*->] (cons.east) -- (upd);
        \draw [->] (upd.north) |- (stp);

        \draw [->] (start.west) -| (ind);
        \draw [->] (ind.east) -- (stp);'
    \matrix [draw, above left] at (current bounding box.south east) {
        \node [mbox, text width=1em, color=white, label=right:\emph{Legend}] {};\\ 
        \node [mfac, text width=1em, label=right:Facilitator Task] {}; \\    
    };



    \end{tikzpicture}
    \caption{Formal process for CQIs}
    \label{fig:delphi1}
\end{figure}

\end{document}

여기에 이미지 설명을 입력하세요

관련 정보