使用 tikz 绘制图表

使用 tikz 绘制图表

我使用以下代码生成了一个图表:

\documentclass{article}
\usepackage{lmodern}
\usepackage[most]{tcolorbox}
\usepackage{fontawesome5}

\newtcolorbox{mybox}[4][]{%
        enhanced, width=9cm, height=2cm,
        fontupper=\small\sffamily,
        fonttitle=\large\sffamily\bfseries\slshape,
        leftupper=1.5cm,
        colback=white,
        colframe=white,
        colupper=white,
        title=#2,
        attach title to upper={\\},
        underlay={\fill[#4] (frame.north west)--([xshift=-5mm]frame.north east)--(frame.east)--([xshift=-5mm]frame.south east)-|cycle;},
        overlay={\node[circle, minimum size=2cm, line width=1mm, draw=white, fill=#4, font=\Huge, text=white] at (frame.west) {#3};},
        #1, }
    
\begin{document}
\begin{mybox}{Company Description}{\faIcon[regular]{lightbulb}}{green!50!blue}
This slide is 100\% editable. Adapt it to your needs and capture your audience's attention.
\end{mybox}
\begin{mybox}{Text Here}{\faIcon[regular]{handshake}}{gray!80!green}
This slide is 100\% editable. Adapt it to your needs and capture your audience's attention.
\end{mybox}
\begin{mybox}{Company Description}{\faIcon[regular]{cog}}{green!50!blue}
This slide is 100\% editable. Adapt it to your needs and capture your audience's attention.
\end{mybox}
\end{document}

得到下图: 在此处输入图片描述

但是我还是需要改成如下形式:

在此处输入图片描述

如何使用 tikz 完成?提前感谢您的帮助。

答案1

\documentclass[a4paper, landscape]{article}
\usepackage{lmodern}
\usepackage[most]{tcolorbox}
\usepackage{fontawesome5}
\usepackage[hmargin=2cm]{geometry}
\usetikzlibrary{shapes.symbols, positioning}

\newtcolorbox{mybox}[4][]{%
        enhanced, width=9cm, height=2cm,
        fontupper=\small\sffamily,
        fonttitle=\large\sffamily\bfseries\slshape,
        leftupper=1.5cm,
        colback=white,
        colframe=white,
        colupper=white,
        title=#2,
        attach title to upper={\\},
        underlay={\fill[#4] (frame.north west)--([xshift=-5mm]frame.north east)--(frame.east)--([xshift=-5mm]frame.south east)-|cycle;},
        overlay={\node[circle, minimum size=2cm, line width=1mm, draw=white, fill=#4, font=\Huge, text=white] at (frame.west) {#3};},
        nobeforeafter,
        left skip=1cm,
        #1, }
    
\begin{document}
\centering
\begin{tikzpicture}[every node/.style={signal, minimum height=2cm, draw=none, font=\sffamily\bfseries\large, signal pointer angle=120}]
\node[signal to=east, minimum width=9cm, fill=red!20](a){step 1};
\node[signal to=east, signal from=west, minimum width=5.2cm, fill=red!50, right=0pt of a] (b) {};
\node[signal from=west, signal to=nowhere, minimum width=9cm, fill=red!80, right=0pt of b] (c) {setp 2};
\end{tikzpicture}

\begin{mybox}{Company Description}{\faIcon[regular]{lightbulb}}{green!50!blue}
This slide is 100\% editable. Adapt it to your needs and capture your audience's attention.
\end{mybox}\hspace{4cm}%
\begin{mybox}{Company Description}{\faIcon[regular]{lightbulb}}{green!50!blue}
This slide is 100\% editable. Adapt it to your needs and capture your audience's attention.
\end{mybox}

\begin{mybox}{Text Here}{\faIcon[regular]{handshake}}{gray!80!green}
This slide is 100\% editable. Adapt it to your needs and capture your audience's attention.
\end{mybox}\hspace{4cm}%
\begin{mybox}{Text Here}{\faIcon[regular]{handshake}}{gray!80!green}
This slide is 100\% editable. Adapt it to your needs and capture your audience's attention.
\end{mybox}

\begin{mybox}{Company Description}{\faIcon[regular]{cog}}{green!50!blue}
This slide is 100\% editable. Adapt it to your needs and capture your audience's attention.
\end{mybox}\hspace{4cm}%
\begin{mybox}{Company Description}{\faIcon[regular]{cog}}{green!50!blue}
This slide is 100\% editable. Adapt it to your needs and capture your audience's attention.
\end{mybox}
\end{document}

在此处输入图片描述

相关内容