0

I'm fairly new to latex and while using pgfgantt package to create a gantt chart, I ran into a compilation issue I can't seem to figure out.

There's no error message or anything, but the code won't stop building for a long time that I eventually have to stop the process. I'm using texmaker on Mac environment. I think there might be an issue with where I unzipped the .sty files? I had to create texmf folder in my ~/Library directory, and all the packages are within ~/Library/texmf/tex/latex/gantclass. I have a folder that I don't remember creating called texlive. Was I supposed to put the files in there instead?

My code is as follows:

\subsection*{Timeline}
    \begin{ganttchart}{1}{14}
        \gantttitle{Two-Week Project Timeline} \\
        \gantttitlelist{1,...,14}{1} \\
        \ganttbar{Gather Tweets}{1}{2} \\
        \ganttlinkedbar{Curate Comments}{3}{7} \\
        \ganttmilestone{Milestone}{7}
        \ganttbar{Implement Naive Bayes}{6}{11} \\
        \ganttlinkedbar{Train}{9}{11} \\
        \ganttmilestone{Milestone}{11} \\
        \ganttbar{Evaluate}{11}{13} \\
        \ganttmilestone{Milestone}{13} \\
        \ganttbar{Test}{14} \\
    \end{ganttchart}    

Any help would be appreciated. Thank you!

  • 1
    Welcome to LaTeX Stack Exchange! Welcome to TeX.SX! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – someonr Nov 26 '13 at 19:01
2

I could reproduce the error. You forgot an argument for \gantttitle and one for \ganttbar. Take a look at this code (the comments indicate the fixes):

\documentclass{article}


\usepackage{pgfgantt}

\begin{document}
\subsection*{Timeline}
    \begin{ganttchart}{1}{15}
        \gantttitle{Two-Week Project Timeline}{15} \\ %missing number of time slots
        \gantttitlelist{1,...,14}{1} \\
        \ganttbar{Gather Tweets}{1}{2} \\
        \ganttlinkedbar{Curate Comments}{3}{7} \\
        \ganttmilestone{Milestone}{7}
        \ganttbar{Implement Naive Bayes}{6}{11} \\
        \ganttlinkedbar{Train}{9}{11} \\
        \ganttmilestone{Milestone}{11} \\
        \ganttbar{Evaluate}{11}{13} \\
        \ganttmilestone{Milestone}{13} \\
        \ganttbar{Test}{14}{15} \\%missing end slot
    \end{ganttchart}  
\end{document}
  • yes, that was it! thank you! For some reason, I thought that if it was a syntax issue, the compiler would tell me instead of running forever... : ) thanks for the answer! – viviboox3 Nov 27 '13 at 12:18

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.