2

I'm trying to use pgfgantt 4.0 but I encounter a rather strange problem.

Here's my MWE:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{pgfgantt}

\begin{document}

\begin{ganttchart}{24}
\gantttitle{Y1}{12} \\
\gantttitle{Y2}{12} \\
\end{ganttchart}


\end{document}

The problem I encounter with this example is the \gantttitle macro reporting the following error: ! Missing number, treated as zero.

Yet, if I remember correctly, \gantttitle does need only two arguments. Furthermore, I tested a pgfgantt example that worked correctly on an older machine, and it produced the same errors.

I encounter this problem on several configurations, which are the following:

  1. Windows Miktek 2.9 up-to-date, pgfgantt automatically downloaded by miktek if I remember well. Used to work on an older machine.

  2. Linux texlive 2009 Debian, pgfgantt downloaded from CTAN as the tlmgr seems missing.

I don't have the root access on either machine.

If I ignore the initial gantttitle error, I get many other errors such as "illegal unit of measure", "you can't use \edef after \advance" or "dimension too large". The resulting file does not look like it is horizontally stretched. I don't understand what happens.

dureuill
  • 123
  • 6

1 Answers1

1

It seems that the ganttchart environment requires two mandatory arguments, and you gave it only one argument in your example.

Franck Pastor
  • 18,756
  • That's it... So it was a missing argument, after all. Just NOT on gantttitle. Did ganttchart use to require only one arguments, as my old examples are broken? The example in http://texdoc.net/texmf-dist/doc/latex/pgfgantt/pgfgantt.pdf look broken... – dureuill Mar 04 '14 at 15:03
  • 1
    The version of pgfgantt in my distribution (TeX Live 2013, recently updated) is 4.0. Your link points to version 3.0. What is the version you are currently using? As it is stated in the documentations of both versions, pgfgantt is not fully downwards compatible. – Franck Pastor Mar 04 '14 at 15:15
  • The docs for the current version state clearly (in red text): "Furthermore, pgfgantt 4.0 and above is not fully downwards compatible." – Paul Gessler Mar 04 '14 at 15:15
  • @fpast I'm using V4.0 and looking at the V3.0 of the doc. Hence my problem. Thank you for pointing it out. I feel silly now... – dureuill Mar 04 '14 at 15:23