流程图的方向问题

流程图的方向问题

我有以下流程图

\begin{figure}[ht]
\centering
\setlength\abovedisplayskip{2pt}%
    \begin{forest}
for tree = {
    draw,
    text width=54mm,
    font=\scriptsize,
    %
    grow = south,
    forked edge,  
    s sep = 6mm,  
    l sep = 4mm,  
 fork sep = 2mm,
if level<= 2{text centered}{},
tier/.option = level, % for aligning nodes to levels  
    %
edge = {-{Stealth[length=3pt]}, semithick},
            }
[Feynman Integral
    [Schwinger  Parametrization
%%%% left branch
        [Original Method of Brackets
            [\textbf{Rule 1}: \underline{Expanding Exponential}
             \[{e^{-A} = \sum_{n=0}^{\infty}\mfrac{(-1)^n A^n}{\Gamma(1+n)}}\]   
                [\textbf{Rule 2}:\underline{ Expanding Multinomials}
                    {\begin{multline*}
                        (a_1 + a_2 +\dotsm+ a_r)^{\alpha}= \\
                            \sum_{\mathclap{m_1,\dotsc,m_r}} \phi_{m_1,\dotsc,m_r}
                            a_{1}^{m_1}\dotsm a_{r}^{m_r}\\
                                \mfrac{\langle -\alpha+m_1+\dotsm+m_r\rangle}{\Gamma(-\alpha)}
                    \end{multline*}} 
                    [\textbf{Rule 3}: \underline{Introduce Bracket}
                         \[ {\int_{0}^{\infty}x^{l-1}= \langle l\rangle}    \]  
                        [\textbf{Rule 4}: \underline{Eliminate Bracket}\\
                      An expression of the form
                             {\begin{multline*}
                        \sum_{\mathclap{n_1,\dotsc,n_r}}\phi_{1,\dotsc,r}f(n_1,\dotsc.,n_r)\\
                            \langle a_{11}n_{1}+\dotsm+a_{1r}n_{r}+c{1}\rangle\\
                               \cdots \langle a_{s1}n_{1}+\dotsm+a_{sr}n_{r}+c{1}\rangle
                             \end{multline*}}
                        is written as 
                        {\begin{align*}
                        &\mfrac{1}{|detA|}\sum_{n_{s+1}\cdots n_{r}} f(n_{1}^{*},\cdot\cdot,n_{s}^{*},n_{s+1},\cdot\cdot,n_{r})  \\
                        &\cdot\Gamma(-n_{1}^{*})\dotsm\Gamma(-n_{s}^{*})\Gamma(-n_{s+1})\dotsm\Gamma(-n_{r})
                        \end{align*}}
                         provided $det\;A$ is not zero
                        ]
                    ]
                ]
            ]
        ]
        [Modified Method of Brackets
            [\textbf{Rule 1}: \underline{Expanding Exponential}
                {\begin{equation*}
        e^{-A} = \oint \mathrm{\frac{dz}{2\pi i}} (A)^z\Gamma(-z)
                \end{equation*}}
                [\textbf{Rule 2}: \underline{Expanding Multinomials}
                    {\begin{multline*}
                (a_1 + a_2 +\dotsm + a_r)^{\alpha} = \\
                \oint\frac{dz_1}{2 \pi i}\dots\oint\frac{dz_r}{2 \pi i} a_{1}^{z_1}...a_{r}^{z_r}\\
                \langle -\alpha+z_1+\dotsm + z_r\rangle\frac{\Gamma(-z_1)\dotsm\Gamma(-z_2)}{\Gamma(-\alpha)}
                    \end{multline*}}
                    [\textbf{Rule 3}: \underline{Introduce Bracket}
                     \[ {\int_{0}^{\infty}x^{l-1}= \langle l\rangle}  \]
                        [\textbf{Rule 4}: \underline{Eliminate Bracket}\\
                      An expression of the form
                             {\begin{multline*}
                        \oint\frac{dz_{1}}{2 \pi i}\cdots \oint\frac{dz_{r}}{2 \pi i}f(z_1,\dotsc,z_r)\\
                            \langle a_{11}z_{1}+\dotsm+a_{1r}z_{r}+c_{1}\rangle\\
                               \cdots \langle a_{s1}z_{1}+\dotsm+a_{sr}z_{r}+c_{r}\rangle
                             \end{multline*}}
                       is written as 
                       {\begin{align*}
                       & \mfrac{1}{|detA|}\prod_{i=s+1}^r\oint\frac{dz_i}{2 \pi i}f(z_{1}^{*},\cdot\cdot,z_{s}^{*},z_{s+1},\cdot\cdot,z_{r})
                   \\  &\cdot  \Gamma(-z_{1}^{*})\dotsm\Gamma(-z_{s}^{*})\Gamma(-z_{s+1})\dotsm\Gamma(-z_{r})
                       \end{align*}}
                        provided $det\;A$ is not zero
                        ]                     
                    ]
                ]
            ]
        ]
    ]
]
    \end{forest}
%\end{center} % or use `
\end{figure}

现在,当我尝试将“规则 1”编辑为“规则 O_1”时,框的方向会扭曲。我想更改所有规则索引

答案1

在您的代码中您需要:

  • 提供文档的序言(与您的代码示例相关)
  • 删除代码中的空行
  • 在公式中以一致的方式使用花括号。例如:
{\[ e^{A} = ... \]}

在所有显示的方程式中都类似

  • “O_1” 写成数学表达式:$O_1$或文本O\_1(不清楚你喜欢这里写什么)。后面一种情况在下面的 MWE 左分支中考虑。使用它,树的方向不会改变。

考虑到您上述的代码片段,我得到:

在此处输入图片描述

上述结果通过以下方式获得:

\documentclass{article}
\usepackage{nccmath, mathtools}
\usepackage[edges]{forest}
\usetikzlibrary{arrows.meta}

\begin{document}
\begin{figure}[ht]
\centering
\setlength\abovedisplayskip{2pt}%
    \begin{forest}
for tree = {
    draw,
    text width=54mm,
    font=\scriptsize,
    %
    grow = south,
    forked edge,
    s sep = 6mm,
    l sep = 4mm,
 fork sep = 2mm,
if level<= 2{text centered}{},
tier/.option = level, % for aligning nodes to levels
    %
edge = {-{Stealth[length=3pt]}, semithick},
            }
[Feynman Integral
    [Schwinger  Parametrization
%%%% left branch
        [Original Method of Brackets
            [\textbf{Rule O\_1}: \underline{Expanding Exponential}
             {\[e^{-A} = \sum_{n=0}^{\infty}\mfrac{(-1)^n A^n}{\Gamma(1+n)}\]}
                [\textbf{Rule 2}:\underline{ Expanding Multinomials}
                    {\begin{multline*}
                        (a_1 + a_2 +\dotsm+ a_r)^{\alpha}= \\
                            \sum_{\mathclap{m_1,\dotsc,m_r}} \phi_{m_1,\dotsc,m_r}
                            a_{1}^{m_1}\dotsm a_{r}^{m_r}\\
                                \mfrac{\langle -\alpha+m_1+\dotsm+m_r\rangle}{\Gamma(-\alpha)}
                    \end{multline*}}
                    [\textbf{Rule 3}: \underline{Introduce Bracket}
                         {\[ \int_{0}^{\infty}x^{l-1}= \langle l\rangle  \]}
                        [\textbf{Rule 4}: \underline{Eliminate Bracket}\\
                      An expression of the form
                             {\begin{multline*}
                        \sum_{\mathclap{n_1,\dotsc,n_r}}\phi_{1,\dotsc,r}f(n_1,\dotsc.,n_r)\\
                            \langle a_{11}n_{1}+\dotsm+a_{1r}n_{r}+c{1}\rangle\\
                               \cdots \langle a_{s1}n_{1}+\dotsm+a_{sr}n_{r}+c{1}\rangle
                             \end{multline*}}
                        is written as
                        {\begin{align*}
                        &\mfrac{1}{|detA|}\sum_{n_{s+1}\cdots n_{r}} f(n_{1}^{*},\cdot\cdot,n_{s}^{*},n_{s+1},\cdot\cdot,n_{r})  \\
                        &\cdot\Gamma(-n_{1}^{*})\dotsm\Gamma(-n_{s}^{*})\Gamma(-n_{s+1})\dotsm\Gamma(-n_{r})
                        \end{align*}}
                         provided $\det A$ is not zero
                        ]
                    ]
                ]
            ]
        ]
        [Modified Method of Brackets
            [\textbf{Rule 1}: \underline{Expanding Exponential}
                {\[e^{-A} = \oint \mathrm{\frac{dz}{2\pi i}} (A)^z\Gamma(-z)\]}
                [\textbf{Rule 2}: \underline{Expanding Multinomials}
                    {\begin{multline*}
                (a_1 + a_2 +\dotsm + a_r)^{\alpha} = \\
                \oint\frac{dz_1}{2 \pi i}\dots\oint\frac{dz_r}{2 \pi i} a_{1}^{z_1}...a_{r}^{z_r}\\
                \langle -\alpha+z_1+\dotsm + z_r\rangle\frac{\Gamma(-z_1)\dotsm\Gamma(-z_2)}{\Gamma(-\alpha)}
                    \end{multline*}}
                    [\textbf{Rule 3}: \underline{Introduce Bracket}
                     {\[\int_{0}^{\infty}x^{l-1}= \langle l\rangle\]}  
                        [\textbf{Rule 4}: \underline{Eliminate Bracket}\\
                      An expression of the form
                             {\begin{multline*}
                        \oint\frac{dz_{1}}{2 \pi i}\cdots \oint\frac{dz_{r}}{2 \pi i}f(z_1,\dotsc,z_r)\\
                            \langle a_{11}z_{1}+\dotsm+a_{1r}z_{r}+c_{1}\rangle\\
                               \cdots \langle a_{s1}z_{1}+\dotsm+a_{sr}z_{r}+c_{r}\rangle
                             \end{multline*}}
                       is written as
                       {\begin{align*}
                       & \mfrac{1}{|detA|}\prod_{i=s+1}^r\oint\frac{dz_i}{2 \pi i} f(z_{1}^{*},\cdot\cdot,z_{s}^{*},z_{s+1},\cdot\cdot,z_{r}) \\ 
                       &\cdot \Gamma(-z_{1}^{*})\dotsm\Gamma(-z_{s}^{*})
                              \Gamma(-z_{s+1})\dotsm\Gamma(-z_{r})
                       \end{align*}}
                        provided $\det A$ is not zero
                        ]
                    ]
                ]
            ]
        ]
    ]
]
    \end{forest}
\end{figure}
\end{document}

相关内容