Scott Pakin
2017-07-20 16:26:20 UTC
After wracking my brain trying to figure out why none of the examples
I found on the Web of pgfgantt's vgrid option worked, I finally
determined that there's a conflict between pgfgantt and mathtools.
Here's an MWE:
\documentclass{article}
\usepackage{mathtools}
\usepackage{pgfgantt}
\begin{document}
\begin{ganttchart}[
vgrid={*2{red}, *1{green}, *{10}{blue, dashed}}
]{1}{20}
\gantttitle{Title 1}{20} \\
\ganttbar{}{1}{8} \\
\ganttbar{}{9}{20}
\end{ganttchart}
\end{document}
and here's what I get when I build that on an up-to-date TeX Live
2017:
$ pdflatex gantt
...
! Package pgfkeys Error: I do not know the key '/tikz/*1{green}' and I am going
to ignore it. Perhaps you misspelled it.
See the pgfkeys package documentation for explanation.
Type H <return> for immediate help.
...
l.12 \end{ganttchart}
?
Any suggestions for a workaround would be welcome. My guess is that
my real document, which is 60 pages long and was written by a number
of authors, is not especially mathtools-heavy so I _might_ be able to
replace mathtools usage with raw LaTeX, but I haven't yet investigated
that option.
-- Scott
I found on the Web of pgfgantt's vgrid option worked, I finally
determined that there's a conflict between pgfgantt and mathtools.
Here's an MWE:
\documentclass{article}
\usepackage{mathtools}
\usepackage{pgfgantt}
\begin{document}
\begin{ganttchart}[
vgrid={*2{red}, *1{green}, *{10}{blue, dashed}}
]{1}{20}
\gantttitle{Title 1}{20} \\
\ganttbar{}{1}{8} \\
\ganttbar{}{9}{20}
\end{ganttchart}
\end{document}
and here's what I get when I build that on an up-to-date TeX Live
2017:
$ pdflatex gantt
...
! Package pgfkeys Error: I do not know the key '/tikz/*1{green}' and I am going
to ignore it. Perhaps you misspelled it.
See the pgfkeys package documentation for explanation.
Type H <return> for immediate help.
...
l.12 \end{ganttchart}
?
Any suggestions for a workaround would be welcome. My guess is that
my real document, which is 60 pages long and was written by a number
of authors, is not especially mathtools-heavy so I _might_ be able to
replace mathtools usage with raw LaTeX, but I haven't yet investigated
that option.
-- Scott