我制作了包含周数的甘特图,但在周数之上,我想添加相应的月份(例如,31 日至 34 日是 8 月),我该怎么做?
这是我的代码。
\documentclass[tikz]{standalone}
\usepackage{pgfgantt}
\title{Gantt Charts with the pgfgantt Package}
\begin{document}
\begin{ganttchart}{31}{53}
\gantttitle{2016}{22} \\
\gantttitlelist{31,...,52}{1} \\
\ganttgroup{Problem formulation}{31}{31} \\
\ganttbar{Literature review}{32}{35} \\
\ganttlinkedbar{Data collection}{36}{39} \ganttnewline
\ganttlinkedbar{Value chain analysis}{40}{43}
\ganttnewline
\ganttlinkedbar{Strategic framework}{44}{48}
\ganttnewline
\ganttlinkedbar{Inspect report and wrap up}{49}{52}
\ganttnewline
\ganttmilestone{Hand-in}{52}
\ganttlink{elem5}{elem6}
% \ganttlink{elem3}{elem4}
\end{ganttchart}
\end{document}
谢谢!
答案1
您可以添加更多 \gantttitle 命令:
\documentclass[tikz]{standalone}
\usepackage{pgfgantt}
\title{Gantt Charts with the pgfgantt Package}
\begin{document}
\begin{ganttchart}{31}{53}
\gantttitle{2016}{22} \\
\gantttitle[title/.style={draw=none,}]{}{3}
\gantttitle{August}{4}
\gantttitle{September}{4}\\
\gantttitlelist{31,...,52}{1} \\
\ganttgroup{Problem formulation}{31}{31} \\
\ganttbar{Literature review}{32}{35} \\
\ganttlinkedbar{Data collection}{36}{39} \ganttnewline
\ganttlinkedbar{Value chain analysis}{40}{43}
\ganttnewline
\ganttlinkedbar{Strategic framework}{44}{48}
\ganttnewline
\ganttlinkedbar{Inspect report and wrap up}{49}{52}
\ganttnewline
\ganttmilestone{Hand-in}{52}
\ganttlink{elem5}{elem6}
% \ganttlink{elem3}{elem4}
\end{ganttchart}
\end{document}