我正在使用 TexMaker 在 Ubuntu 13.10 中为 FYP 撰写报告,使用文档类并使用不同的文件用于章节。我在 chapter1.tex 中编写以下代码来绘制甘特图
\documentclass{Thesis}
\usepackage{gantt}
\usepackage{pdflscape}
\begin{document}
\begin{landscape}
\scalebox{0.6}{
\begin{gantt}[xunitlength=1cm,fontsize=\large,titlefontsize=\large,drawledgerline=true]{13}{32}
\begin{ganttitle}
\titleelement{\Large \textbf{September}}{4}
\titleelement{\Large \textbf{October}}{4}
\titleelement{\Large \textbf{November}}{4}
\titleelement{\Large \textbf{December}}{4}
\titleelement{\Large \textbf{January - 14}}{4}
\titleelement{\Large \textbf{February}}{4}
\titleelement{\Large \textbf{March}}{4}
\titleelement{\Large \textbf{April}}{4}
\end{ganttitle}
\begin{ganttitle}
\titleelement{\LARGE \textbf{Weeks}}{32}
\end{ganttitle}
\begin{ganttitle}
\numtitle{1}{1}{4}{1}
\numtitle{1}{1}{4}{1}
\numtitle{1}{1}{4}{1}
\numtitle{1}{1}{4}{1}
\numtitle{1}{1}{4}{1}
\numtitle{1}{1}{4}{1}
\numtitle{1}{1}{4}{1}
\numtitle{1}{1}{4}{1}
\end{ganttitle}
\ganttbar{Litreature Review}{2}{17}
\ganttbar{Project Plan}{5}{10}
\ganttbar{Field Survey}{15}{3}
\ganttbar{Data Collection}{20}{3}
\ganttbar{Database Design}{15}{5}
\ganttbar{Framework Design}{}{}
\ganttbar{Prototype}{}{}
\ganttbar{Implementation}{}{}
\ganttbar{Testing}{}{}
\ganttbar{Deployment}{}{}
\end{gantt}
}
\end{landscape}
\end{document}
我在 main.tex 文件中使用了包,但是在运行 main.tex 文件时出现了这些错误,
! LaTeX Error: Environment gantt undefined.