Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer 1

up vote 13 down vote accepted

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}
share|improve this answer
    
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 '12 at 20:17
3  
I never managed to use Word:-) –  David Carlisle Nov 15 '12 at 21:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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