尝试使用 pgfgantt 重现示例时出错

尝试使用 pgfgantt 重现示例时出错

当我尝试重现 pgfgantt 手册上的示例时,我总是收到错误。这是最后一个;

这是我得到的错误

Package pgfkeys Error: I do not know the key '/pgfgantt/? today' and I am going to ignore it. Perhaps you misspelled it.

当尝试使用以下代码时:

% testing_gantt
\documentclass[12pt,a4paper,landscape]{report}
\usepackage{pgfgantt}

\begin{document}






\definecolor{barblue}{RGB}{153,204,254}
\definecolor{groupblue}{RGB}{51,102,254}
\definecolor{linkred}{RGB}{165,0,33}
\renewcommand\sfdefault{phv}
\renewcommand\mddefault{mc}
\renewcommand\bfdefault{bc}
\setganttlinklabel{s-s}{START-TO-START}
\setganttlinklabel{f-s}{FINISH-TO-START}
\setganttlinklabel{f-f}{FINISH-TO-FINISH}
\sffamily
\begin{ganttchart}[
    canvas/.append style={fill=none, draw=black!5, line width=.75pt},
hgrid style/.style={draw=black!5, line width=.75pt},
vgrid={*1{draw=black!5, line width=.75pt}},
  today=7,
  today rule/.style={
    draw=black!64,
    dash pattern=on 3.5pt off 4.5pt,
    line width=1.5pt
  },
  today label font=\small\bfseries,
  title/.style={draw=none, fill=none},
  title label font=\bfseries\footnotesize,
  title label node/.append style={below=7pt},
  include title in canvas=false,
  bar label font=\mdseries\small\color{black!70},
  bar label node/.append style={left=2cm},
  bar/.append style={draw=none, fill=black!63},
  bar incomplete/.append style={fill=barblue},
  bar progress label font=\mdseries\footnotesize\color{black!70},
  group incomplete/.append style={fill=groupblue},
  group left shift=0,
  group right shift=0,
  group height=.5,
  group peaks tip position=0,
  group label node/.append style={left=.6cm},
  group progress label font=\bfseries\small,
  link/.style={-latex, line width=1.5pt, linkred},
  link label font=\scriptsize\bfseries,
  link label node/.append style={below left=-2pt and 0pt}
]{1}{13}
\gantttitle[
  title label node/.append style={below left=7pt and -3pt}
]{WEEKS:\quad1}{1}
\gantttitlelist{2,...,13}{1} \\
\ganttgroup[progress=57]{WBS 1 Summary Element 1}{1}{10} \\
\ganttbar[
  progress=75,
  name=WBS1A
]{\textbf{WBS 1.1} Activity A}{1}{8} \\
\ganttbar[
  progress=67,
  name=WBS1B
]{\textbf{WBS 1.2} Activity B}{1}{3} \\
\ganttbar[
  progress=50,
  name=WBS1C
]{\textbf{WBS 1.3} Activity C}{4}{10} \\
\ganttbar[
progress=0,
  name=WBS1D
]{\textbf{WBS 1.4} Activity D}{4}{10} \\[grid]
\ganttgroup[progress=0]{WBS 2 Summary Element 2}{4}{10} \\
\ganttbar[progress=0]{\textbf{WBS 2.1} Activity E}{4}{5} \\
\ganttbar[progress=0]{\textbf{WBS 2.2} Activity F}{6}{8} \\
\ganttbar[progress=0]{\textbf{WBS 2.3} Activity G}{9}{10}
\ganttlink[link type=s-s]{WBS1A}{WBS1B}
\ganttlink[link type=f-s]{WBS1B}{WBS1C}
\ganttlink[
  link type=f-f,
link label node/.append style=left
  ]{WBS1C}{WBS1D}
\end{ganttchart}

\end{document}

你知道我哪里做错了吗?非常感谢

相关内容