绘制一个简单的 4 框流程图?

绘制一个简单的 4 框流程图?

我知道问这个问题不太好。但我没时间,也不知道该怎么开始?我的导师让我用 LaTeX 而不是文档来记录下面我在 .doc 文件中画的图。

盒子里面的文字/颜色并不重要。重要的是如何在盒子顶部写上一些文字。

在此处输入图片描述

我也希望我可以编辑如下内容:

在此处输入图片描述

在此处输入图片描述

答案1

tikz包装:

在此处输入图片描述

\documentclass[tikz, margin=3mm]{standalone}
\usetikzlibrary{chains,
                positioning}
\begin{document}
    \begin{tikzpicture}[
node distance = 0pt and 7pt,
  start chain = A going right,
  box/.style = {draw=blue, fill= blue!30, text width=24mm, minimum height=13mm,
                on chain=A, join=by {-, ultra thick, draw=blue}}
                        ]
  \node[box] {xxx xxx xxx xxx xxx};               % node name: A-1
  \node[box] {xxx xxx xxx xxx  xxx xxx xxx xx};
  \node[box] {xxx xxx xxx xxx xxx xxx xxx xxx xx};
  \node[box] {xxx xxx xxx xxx xxx xxx xxx xxx xx}; % A-4
%
\foreach \i in {1,...,4}
\node[above right=0pt of A-\i.north west, font=\footnotesize] {Experiment \i};
    \end{tikzpicture}
\end{document}

附录:

对于您的新需求,您需要稍微改变在节点上方写标签的循环:

\foreach \i [count=\j] in {Pilot stydy, Study 1, Experiment 2, Feasibile 21}
\node[above right=0pt of A-\j.north west, font=\footnotesize] {\i};

使用它,你将获得:

在此处输入图片描述

答案2

通过使用正常tabular环境的简单解决方案,

\documentclass{book}
\usepackage{xcolor}
\begin{document}

\setlength{\fboxsep}{6pt}

\setlength{\tabcolsep}{12pt}
\begin{tabular}{p{5pc}p{5pc}p{5pc}p{5pc}}
Experiment 1 &Experiment 2 &Experiment 3 &Experiment 4\\
\colorbox{blue!10}{\parbox{5pc}{
System examination, user epxerience}}
&\multicolumn{1}{@{{\color{blue!10}\rule{1pc}{3pt}}}l@{}}{\colorbox{blue!10}{\parbox{5pc}{
System examination, user epxerience}}}
&\multicolumn{1}{@{{\color{blue!10}\rule{1pc}{3pt}}}l@{}}{\colorbox{blue!10}{\parbox{5pc}{
System examination, user epxerience}}} &\multicolumn{1}{@{{\color{blue!10}\rule{1pc}{3pt}}}l}{\colorbox{blue!10}{\parbox{5pc}{
System examination, user epxerience}} }
\end{tabular}

\end{document}

输出 在此处输入图片描述

编辑

\documentclass{book}
\usepackage{xcolor}
\begin{document}

\setlength{\fboxsep}{6pt}

\setlength{\fboxrule}{3pt}

\setlength{\tabcolsep}{12pt}
\begin{tabular}{p{5pc}p{5pc}p{5pc}p{5pc}}
Experiment 1 &Experiment 2 &Experiment 3 &Experiment 4\\
\fcolorbox{black}{white}{\parbox{5pc}{
System examination, user epxerience}}
&\multicolumn{1}{@{\hskip3pt{\color{black}\rule{1pc}{3pt}}}l@{}}{\fcolorbox{black}{white}{\parbox{5pc}{
System examination, user epxerience}}}
&\multicolumn{1}{@{{\color{black}\rule{1pc}{3pt}}}l@{}}{\fcolorbox{black}{white}{\parbox{5pc}{
System examination, user epxerience}}} &\multicolumn{1}{@{{\color{black}\rule{1pc}{3pt}}}l}{\fcolorbox{black}{white}{\parbox{5pc}{
System examination, user epxerience}} }
\end{tabular}

\end{document}

在此处输入图片描述

相关内容