在这个例子中,即使 babel 包中加载的是法语,月份名称也以英文打印。
\documentclass{article}
%\usepackage[pdftex,active,tightpage]{preview}
%\setlength\PreviewBorder{2mm}
\usepackage[frenchb]{babel}
\usepackage{pgfgantt}
\usepackage{lscape}
\begin{document}
\begin{landscape}
\begin{tikzpicture} % optional
\begin{ganttchart}[x unit=2.5mm, time slot format=isodate]{2014-04-28}{2014-07-11}
\gantttitlecalendar{month=name} \\
\ganttbar{Task 1}{2014-04-28}{2014-05-10} \\
\end{ganttchart}
\end{tikzpicture}
\end{landscape}
\end{document}
Babel 不能与 pgfgantt 一起使用吗?
答案1
添加
\usepackage[frenchb]{translator}
在加载pgfgantt
包之前。
梅威瑟:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[frenchb]{babel}
\usepackage[frenchb]{translator}
\usepackage{pgfgantt}
\usepackage{lscape}
\begin{document}
\begin{landscape}
\begin{ganttchart}[x unit=2mm, time slot format=isodate]{2014-06-20}{2014-09-11}
\gantttitlecalendar{month=name} \\
\ganttbar{Task 1}{2014-07-28}{2014-08-10} \\
\end{ganttchart}
\end{landscape}
\end{document}