5

I just installed TeXLive 2013 in favor of TeXLive 2012, and there seems to be a backwards incompatibility with the way milestones are rendered in pgfgantt. In TeXLive 2012, my Gantt chart code is rendered as follows:

enter image description here

However, in TeXLive 2013, after fixing some apparently deprecated attributes (such as milestone width), it is rendered as follows:

enter image description here

I like the original milestone signs much better, but I haven't been able to figure out how to get back the original milestone style. Does anyone know how to do this?

The code is essentially: (I've stripped it down to a MWE)

\documentclass{standalone}

\usepackage{tikz}
\usepackage{pgfgantt}

\begin{document}
\begin{ganttchart}[inline,vgrid]{1}{17}
  \gantttitlelist{1,...,17}{1} \\
  \ganttbar{$(1,2)$}{1}{15} 
  \ganttbar{$(1,3)$}{1}{10} 
  \ganttbar{$(4,6)$}{11}{13}
  \ganttbar{$(1,4)$}{1}{8}
  \ganttbar{$(4,5)$}{9}{14} \\
  \ganttmilestone{$1$}{0}
  \ganttmilestone{$4$}{8}
  \ganttmilestone{$2$}{15}
\end{ganttchart}
\end{document}
0

1 Answer 1

4
+150

Just for reference, this is what your MWE produces:

Compiling with TexLive 2012 (which uses pgfgantt 2012/01/25 v3.0):

2012

Compiling with TexLive 2013 (which uses pgfgantt 2013/06/01 v4.0):

enter image description here

As you can see, the milestones have the same shape, and apparently the only difference is the background grid. So, either your previous version of pgfgantt was even older, or you reduced too much the MWE and eliminated some code which affected the milestone shapes.

Anyway, I compared the code of pgfgantt.sty for both versions, and saw that it completely changed the way it deals with these kind of shapes. In the new version, proper tikz node shapes are created, and lots of tiny details are managed through pgf keys.

Using these keys, you can recover your previous milestones by simply adding to your preamble:

 \pgfkeys{
   /pgfgantt/milestone inline label node/.style={
       shape=rectangle, draw=black, fill=white, anchor=north
       }
 }

and get:

Result

3
  • I fear that manual changes to the .sty file is present in Yori's case.
    – percusse
    Commented May 23, 2014 at 9:11
  • @percusse: not sure what you mean here, but adding this line fixes my problem.
    – yori
    Commented May 23, 2014 at 10:20
  • @JLDiaz: Brilliant idea to compare sources (why did that not occur to me?) I was looking at this the wrong way: I thought that this rectangle + arrow was one shape, but now I realize that it is really a diamond with a rectangle superimposed on it. Anyway, you rock! Thanks so much for this. You receive a well deserved bounty (in 21 hours apparently).
    – yori
    Commented May 23, 2014 at 10:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .