tikz 中的左对齐和居中对齐

tikz 中的左对齐和居中对齐

我怎样才能将 i)、ii) 和 iii) 全部对齐到左侧,非常感谢

\documentclass{article}
\usepackage{tikz, ulem}
\usetikzlibrary{shapes,shadows,arrows}
\begin{document}
    \tikzstyle{decision} = [diamond, draw, fill = white, font=\small,text centered, minimum height = 7mm, text width = 10em, minimum width=1.5cm,text width = 7em, node distance = 12em]
    \tikzstyle{line} = [draw, -stealth', thick, font=\small]
    \tikzstyle{elli} = [draw, ellipse, fill = white, text centered, minimum height = 7mm, text width = 9em,  minimum width=1.5cm, font=\small,
    node distance = 15em]
    \tikzstyle{box}=[draw,rectangle, fill = white, font=\small, minimum width=1.5cm,
    text width = 12em, minimum height = 8mm, text centered, node distance = 15em]

    \begin{figure}
        \centering  
        %\begin{center}
        \begin{tikzpicture}[thick,scale = 0.4, every node /.style ={scale=0.4}] %
        \node[elli](step1){ \textbf{\uline{Step 1}} \\ 
            Objectives};
        \node[elli, right of= step1](step2){ \textbf {\uline{Step 2}} \\ Bibliometric Analysis};
        \node[elli, right of= step2](step3){\textbf  {\uline{Step 3}} \\ Contribution of Study};
        \node[box, below of= step1, yshift = +10em](step11){\textbf{Step 1.1} \\
            i) Infuluantial aspects of Determinants of Credit.\\
            ii) Key research flow.\\
            iii) Future research flow?}; 

    \draw [->, thick] (step1) to [out=30,in=150] (step2);
    \draw [->, thick] (step2) to [out=30,in=150] (step3);
    \path[line](step1)--(step11);


        %\end{scope}
        \end{tikzpicture}
        \caption{Methodological workflow}
        %\end{center}
    \end{figure}
\end{document}

答案1

例如,您可以从样式text centered中删除box,然后{\centering Step 1.1\par}在节点文本中写入。

在下面的代码中,我还添加了positioning库,并将 allright of=和 similar更改为right=of,并从样式中删除了yshift和 all node distance。我认为前一种语法已被弃用,而后一种语法的好处是计算的是节点边缘之间的距离,而不是节点中心之间的距离,这意味着不需要各种移位和节点距离。

在此处输入图片描述

\documentclass{article}
\usepackage{tikz, ulem}
\usetikzlibrary{shapes,shadows,arrows,positioning} % <-- added positioning
\tikzset{
decision/.style={diamond, draw, fill = white, font=\small,text centered, minimum height = 7mm, text width = 10em, minimum width=1.5cm,text width = 7em},
line/.style={draw, -stealth', thick, font=\small},
elli/.style={draw, ellipse, fill = white, text centered, minimum height = 7mm, text width = 9em,  minimum width=1.5cm, font=\small},
box/.style={draw,rectangle, fill = white, font=\small, minimum width=1.5cm,
    text width = 12em, minimum height = 8mm}
}
\begin{document}
    \begin{figure}
        \centering  
        \begin{tikzpicture}[
             thick,scale = 0.4, every node /.style ={scale=0.4},
             node distance=4mm % <-- added, default is 1cm
             ] %
        \node[elli](step1){ \textbf{\uline{Step 1}} \\ 
            Objectives};
        \node[elli, right=of step1](step2){ \textbf {\uline{Step 2}} \\ Bibliometric Analysis};
        \node[elli, right=of step2](step3){\textbf  {\uline{Step 3}} \\ Contribution of Study};
        \node[box, below=of step1](step11){{\centering\textbf{Step 1.1} \par}
            i) Influential aspects of Determinants of Credit.\\
            ii) Key research flow.\\
            iii) Future research flow?}; 

    \draw [->, thick] (step1) to [out=30,in=150] (step2);
    \draw [->, thick] (step2) to [out=30,in=150] (step3);
    \path[line](step1)--(step11);


        \end{tikzpicture}
        \caption{Methodological workflow}
    \end{figure}
\end{document}

相关内容