我是 Tikz 的新手,正在致力于将 SmartArt 从 MS PowerPoint 转换为 LaTeX。我的一个图表如下所示:
我知道 smartdiagram 包,并且找到了“描述图”,它看起来与上面的有些相似。但我试图展示一个过程的步骤并描述每个步骤(因此左侧有向六边形)。有没有在 smartdiagram 中已经存在的方法可以做到这一点?还是我需要绘制自己的 tikzpicture?
答案1
或者,不使用软件包smartdiagram
:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.symbols,positioning}
\definecolor{myblue}{RGB}{79,129,189}
\tikzset{
myshape/.style={
shape=signal,
fill=myblue,
minimum height=1.5cm,
minimum width=1.5cm,
text=white,
signal pointer angle=130,
signal to=east,
signal from=west,
rotate=-90,
transform shape
},
mytext/.style={
draw=myblue,
text width=7cm,
minimum height=1.15cm,
thick,
outer sep=0pt
}
}
\newcounter{tmp}
\newcommand\MyDesc[3][]{
\stepcounter{tmp}%
\node[myshape,#1] (desc\thetmp) {};
\node[font=\color{white}] at (desc\thetmp) {#2};
\node[mytext,anchor=north west] at (desc\thetmp.north west)
{%
\parbox[t]{2em}{\hfill$\bullet$\hfill\null}%
\parbox[t]{\dimexpr\linewidth-2em\relax}{#3}%
};
}
\begin{document}
\begin{tikzpicture}[]
\MyDesc{Foo 1}{Description 1}
\MyDesc[below = 1.5cm of desc1.north]{Foo 2}{Description 2}
\MyDesc[below = 1.5cm of desc2.north]{Foo 3}{Description 3}
\end{tikzpicture}
\end{document}
答案2
使用一个小补丁,可以实现:
虽然远非完美,但看起来像参考图片。
代码:
\documentclass[12pt]{article}
\usepackage{smartdiagram}
\usetikzlibrary{shapes.symbols}
\tikzset{description title/.append style={
signal,
signal to=south,
signal from=north,
yshift=-0.65cm,
}
}
\begin{document}
\begin{center}
\smartdiagramset{description title width=2cm,
description title text width=1.75cm,
descriptive items y sep=2,
description text width=5.75cm,
module minimum height=1.25cm}
\smartdiagram[descriptive diagram]{%
{Set up,The set up operation consist of..},
{Run, {After having set up the program, you must run..}},
{Analyse, You must check what did with analytical tools like..},}
\end{center}
\end{document}