使用 tikz 绘制时间轴

使用 tikz 绘制时间轴

由于我需要其他标签,我正在尝试自己在 tikz 中绘制以下图片。有没有一种智能的绘制方法? 在此处输入图片描述

谢谢您的回答。:)

答案1

OP 答案的细微变化(+1):

\documentclass[12pt,oneside,english,reqno,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{chains,
                positioning,
                shadows, shapes.symbols}
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\begin{document}
\begin{center}
    \begin{tikzpicture}[
node distance=2mm,
 start chain = going right,
arrow/.style = {shape=signal,
                signal from=west, signal to=east,
                signal pointer angle=110,
                draw, font=\small, 
                minimum height=13mm, inner xsep=5pt, align=left,
                top color=blue!80!green!80, bottom color=blue!30,
                drop shadow,
                on chain
                }
                        ]
\foreach \Smois in {Railroad\\ blocking , Train\\ scheduling , 
                    Locomotive\\ assignment , Crew\\ pairing , 
                    Crew\\ rostering }
\node[arrow] {\Smois};
    \end{tikzpicture}
\end{center}
\end{document}

其生产成果为:

在此处输入图片描述

(红线表示文本区域边框)

tikzpicture的序言,其中使用了 OP 问题中显示的上述 MWE 复制图像:

node distance= 0mm,
 start chain = going right,
arrow/.style = {shape=signal,
                signal from=west, signal to=east,
                signal pointer angle=110,
                draw, font=\small, 
                minimum height=13mm, inner xsep=5pt, align=left,
                fill=gray!30, outer sep=0pt,
                on chain
                }

在此处输入图片描述

答案2

感谢 BambOo 的评论,我能够自己做。首先是代码。它与上面的链接只有一点点不同。

\documentclass[12pt,oneside,english,reqno,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}  
\usepackage{tikz}
\usetikzlibrary{shapes}
\usetikzlibrary{chains,positioning,shapes.symbols,fadings,shadows, backgrounds}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{shapes.callouts}
\usetikzlibrary{shapes.arrows, shadings}
\usetikzlibrary{decorations.text}
\usepackage{varwidth}
\newcommand\Umbruch[2][3cm]{\begin{varwidth}{#1}\centering#2\end{varwidth}}

\begin{document}
\begin{tikzpicture}[]
    \tikzset{
        arrow/.style={
            draw,
            minimum height=1.5cm,
            minimum width=1cm,
            inner sep=2pt,
            shape=signal,
            signal from=west,
            signal to=east,
            signal pointer angle=110,
            top color=blue!80!green!90!,
            bottom color=blue!30,
            %      fill=blue!50,
            drop shadow,
        }
    }
    \begin{scope}[start chain=going right,node distance=3pt,]
    \foreach \mois / \Smois in {Railroad blocking , Train scheduling , Locomotive assignment , Crew pairing , Crew rostering }
    \node[name=\mois, arrow,on chain, xscale=.92] {\Umbruch{\small{\Smois}}};
    \end{scope}
    \end{tikzpicture}

\end{document}

编译此代码应如下所示: 在此处输入图片描述

相关内容