
我是 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}