I tried the example given here.
\documentclass{article}
\usepackage{pgfgantt}
\begin{document}
\begin{figure}[ftbp]
\begin{center}
\begin{ganttchart}[y unit title=0.4cm,
y unit chart=0.5cm,
vgrid,hgrid,
title label anchor/.style={below=-1.6ex},
title left shift=.05,
title right shift=-.05,
title height=1,
bar/.style={fill=gray!50},
incomplete/.style={fill=white},
progress label text={},
bar height=0.7,
group right shift=0,
group top shift=.6,
group height=.3,
group peaks={}{}{.2}]{24}
%labels
\gantttitle{Week}{24} \\
\gantttitle{Monday}{4}
\gantttitle{Tuesday}{4}
\gantttitle{Wednesday}{4}
\gantttitle{Thursday}{4}
\gantttitle{Friday}{4}
\gantttitle{Saturday}{4} \\
%tasks
\ganttbar{first task}{1}{2} \\
\ganttbar{task 2}{3}{8} \\
\ganttbar{task 3}{9}{10} \\
\ganttbar{task 4}{11}{15} \\
\ganttbar[progress=33]{task 5}{20}{22} \\
\ganttbar{task 6}{18}{19} \\
\ganttbar{task 7}{16}{18} \\
\ganttbar[progress=0]{task 8}{21}{24}
%relations
\ganttlink{elem0}{elem1}
\ganttlink{elem0}{elem3}
\ganttlink{elem1}{elem2}
\ganttlink{elem3}{elem4}
\ganttlink{elem1}{elem5}
\ganttlink{elem3}{elem5}
\ganttlink{elem2}{elem6}
\ganttlink{elem3}{elem6}
\ganttlink{elem5}{elem7}
\end{ganttchart}
\end{center}
\caption{Gantt Chart}
\end{figure}
\end{document}
I probably forgot to install a package but Tex Live shows that pgfgantt is installed. I get a lot of errors. The first two are:
! LaTeX Error: Unknown float option `f'.
! Package pgfkeys Error: I do not know the key '/pgfgantt/group peaks', to whic h you passed '{}{}{.2}', and I am going to ignore it. Perhaps you misspelled it . See the pgfkeys package documentation for explanation. Type H <return> for immediate help.... \gantttitle
Could you help me? Thanks in advance.
Best Answer
There is no option
f
for the environmentfloat
, remove it.The example you are trying uses an old version of
pgfgantt
. For the current version, 5.0, you have to change three things.group peaks={}{}{.2}
from the options ofganttchart
.{24}
of theganttchart
environment by{1}{24}
.incomplete
changed tobar incomplete
. In the example below, I removed the key, as the current default settings might be what you want anyway.