这张甘特图是两年前编制的

这张甘特图是两年前编制的

我在两年前制作的一份文档中有一个 pgfganttchart,当时它编译得很好。但现在,在编译时,图表的内容被移到了框架的左侧。

库中有什么变化吗?我该如何修复此代码才能再次正常显示?

代码:

    \begin{ganttchart}[vgrid, hgrid, x unit=0.23cm]{48}{48}
        \gantttitlelist{2014,2015,2016,2017}{12}\\
        \gantttitlelist{1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4}{3}\\
        \ganttbar{Publiceren*}{4}{4} \ganttbar{}{9}{9} \ganttbar{}{14}{14} \ganttbar{}{21}{21} \ganttbar{}{25}{25} \ganttbar{}{30}{30} \ganttbar{}{38}{38} \ganttbar{}{43}{43} \\
        \ganttbar{Reflexen\mydagger}{1}{3} \\
        \ganttbar{Plaatsing\mydagger}{5}{8} \\
        \ganttbar{Tast\mydagger}{22}{24} \\
        \ganttmilestone{Ruw terrein\mydagger}{24} \\
        \ganttbar{Hardware}{10}{13} \\
        \ganttbar{Controle-strategie\"en}{15}{20} \\
        \ganttbar{Reflexen}{26}{29} \\
        \ganttbar{Plaatsing}{31}{37} \\
        \ganttbar{Tast}{39}{42} \\
        \ganttmilestone{Prototype}{42} \\
        \ganttbar{Proefschrift}{44}{48}

        \ganttlink{elem8}{elem9}
        \ganttlink{elem9}{elem10}
        \ganttlink{elem10}{elem11}
        \ganttlink[link mid=.11]{elem8}{elem12}
        \ganttlink{elem9}{elem12}
        \ganttlink{elem12}{elem13}
        \ganttlink{elem13}{elem14}
        \ganttlink{elem14}{elem15}
        \ganttlink{elem15}{elem16}
        \ganttlink{elem16}{elem17}

        \ganttlink[link mid=.01]{elem8}{elem14}
        \ganttlink[link mid=.01]{elem9}{elem15}
        \ganttlink[link mid=.95]{elem10}{elem16}
    \end{ganttchart}

有问题的甘特图

答案1

您的网格定义不正确。我不了解这个包,所以我无法回答您对过去更改的担忧。请阅读其手册,因为应该有文档记录。

% arara: pdflatex

\documentclass[border=2mm]{standalone}
\usepackage[dutch]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{pgfgantt}
\newcommand*{\mydagger}{\ensuremath{^\dagger}}

\begin{document}
\begin{ganttchart}[vgrid, hgrid, x unit=0.23cm]{1}{48}
    \gantttitlelist{2014,2015,2016,2017}{12}\\
    \gantttitlelist{1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4}{3}\\
    \ganttbar{Publiceren*}{4}{4} \ganttbar{}{9}{9} \ganttbar{}{14}{14} \ganttbar{}{21}{21} \ganttbar{}{25}{25} \ganttbar{}{30}{30} \ganttbar{}{38}{38} \ganttbar{}{43}{43} \\
    \ganttbar{Reflexen\mydagger}{1}{3} \\
    \ganttbar{Plaatsing\mydagger}{5}{8} \\
    \ganttbar{Tast\mydagger}{22}{24} \\
    \ganttmilestone{Ruw terrein\mydagger}{24} \\
    \ganttbar{Hardware}{10}{13} \\
    \ganttbar{Controle-strategieën}{15}{20} \\
    \ganttbar{Reflexen}{26}{29} \\
    \ganttbar{Plaatsing}{31}{37} \\
    \ganttbar{Tast}{39}{42} \\
    \ganttmilestone{Prototype}{42} \\
    \ganttbar{Proefschrift}{44}{48}

    \ganttlink{elem8}{elem9}
    \ganttlink{elem9}{elem10}
    \ganttlink{elem10}{elem11}
    \ganttlink[link mid=.11]{elem8}{elem12}
    \ganttlink{elem9}{elem12}
    \ganttlink{elem12}{elem13}
    \ganttlink{elem13}{elem14}
    \ganttlink{elem14}{elem15}
    \ganttlink{elem15}{elem16}
    \ganttlink{elem16}{elem17}

    \ganttlink[link mid=.01]{elem8}{elem14}
    \ganttlink[link mid=.01]{elem9}{elem15}
    \ganttlink[link mid=.95]{elem10}{elem16}
\end{ganttchart}    
\end{document}

在此处输入图片描述

相关内容