我正在尝试在里程碑符号内写一些文字:如此处所述(第 25 页)
\begin{ganttchart}[vgrid, hgrid]{10}
\gantttitle{Title}{10} \\
\ganttbar{Task 1}{1}{5} \\
\ganttmilestone%
[milestone label font=\color{magenta}\rotatebox{30},
milestone label text={#1 !!!}]{Milestone}{5}
\ganttmilestone[inline]{2nd}{7}
\ganttmilestone%
[inline, milestone label inline anchor/.style=below]{3rd}{9}
\end{ganttchart}
可以使用 来编写inline
。但是,这似乎不起作用。有什么帮助吗?
答案1
我修正了你的部分代码(比如%
后面的符号\ganttmilestone
)
\documentclass[12pt]{article}
\usepackage{pgfgantt}
\begin{document}
\begin{ganttchart}[vgrid,%
hgrid,
x unit=1.0cm,
y unit title=1.5cm,
y unit chart=1.0cm,
milestone label font=\tiny\itshape,
group label font=\tiny\bfseries,
bar label font=\scriptsize,
milestone/.append style={fill=orange!60},
milestone inline label node/.append style={left=-3mm}, % <<<<<<<<<<<<<<<
milestone height= 0.8,
milestone label font=\tiny\itshape,
]{1}{7}
\gantttitle{ Timeline}{7} \\
\ganttgroup{Duration}{1}{7} \\
\ganttbar{Reading}{1}{2} \\
\ganttbar{Review}{2}{3} \\
\ganttbar{Define Scope}{5}{6} \\
\ganttbar{Relevant}{4}{6} \\\
\ganttbar{Classify}{6}{7}\\
\ganttmilestone[milestone label font=\color{magenta}\scriptsize\itshape,
milestone label node/.append style={rotate=30},
milestone label text={#1 !!!}]{Milestone 1}{2}\\
\ganttmilestone[inline]{2nd}{3}\\
\ganttmilestone[inline]{3rd}{5}\\
\ganttbar{The End}{7}{7}
\end{ganttchart}
\end{document}