8

What i have is this:

\documentclass[a4paper]{article}
\usepackage{pgfgantt}
\usepackage{pgfcalendar}
\usepackage[a4paper,landscape,left=1cm,top=1cm,%
bottom=1.5cm,right=1cm]{geometry}
\begin{document}
\begin{ganttchart}[vgrid, hgrid]{42}
\gantttitle{Title}{42} \\
\gantttitlelist[title list options={var=\y, evaluate=\y as \x using "\pgfcalendarweekdayshortname{\y}"}]{5,6,0,1,2,3,4}{6}
\ganttgroup{x}{1}{42} \\
\ganttbar{l}{1}{3} \\
\ganttgroup{y}{1}{42} \\
\ganttbar{l}{1}{3} \\
\ganttgroup{z}{1}{42} \\
\ganttbar{l}{1}{3} 
\end{ganttchart}
\end{document}

But i want the dates of these shortnames also be printed, seperated by a comma each day. Just like for example: Sat, 17.11.12 .. . .. . . . . Fri, 23.11.12. I searched a little but so much information seems like overwhelming. Thanks for your help.

1 Answer 1

13

This seems to work

enter image description here

\documentclass[a4paper]{article}
\usepackage{pgfgantt}
\usepackage{pgfcalendar}
\usepackage[a4paper,landscape,left=1cm,top=1cm,%
bottom=1.5cm,right=1cm]{geometry}
\begin{document}
\newcount\startdate
\pgfcalendardatetojulian{2012-011-03}{\startdate}

\protected\def\zzz{\ {\pgfcalendarjuliantodate{\numexpr\startdate\relax}{\year}{\month}{\day}\year--\month--\day\global\advance\startdate1}}
\begin{ganttchart}[vgrid, hgrid]{42}
\gantttitle{Title}{42} \\
\gantttitlelist[title list options={var=\y, evaluate=\y as \x using "\pgfcalendarweekdayshortname{\y}\zzz"}]{5,6,0,1,2,3,4}{6}
\ganttgroup{x}{1}{42} \\
\ganttbar{l}{1}{3} \\
\ganttgroup{y}{1}{42} \\
\ganttbar{l}{1}{3} \\
\ganttgroup{z}{1}{42} \\
\ganttbar{l}{1}{3} 
\end{ganttchart}
\end{document}
2
  • thank you, man why is this latex stuff so complicated. There should be something like a "Microsoft Word for all latex packages".
    – user7581
    Nov 15, 2012 at 20:17
  • 5
    I never managed to use Word:-) Nov 15, 2012 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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