I'm trying to use LaTex to produce our family diary for next year. It's a page per week with a column for each person.
I have the basic layout working:
\documentclass[10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[a5paper, top=1cm, bottom=1cm, left=2cm, right=1cm]{geometry}
\usepackage{advdate} % Advancing/saving dates
\usepackage[dayofweek]{datetime} % Dates formatting
\usepackage{datenumber} % Counters for dates
\usepackage{tabularx}
\pagestyle{empty}
\newdateformat{mydate}{\shortdayofweekname{\day}{\month}{\year} \twodigit\THEDAY{} \shortmonthname[\THEMONTH]}
\newcommand{\headerrow}{\hline & Me & My Wife & Son & Daughter\\ \hline}
\newcommand{\dayrow}[1]{\AdvanceDate[#1] \mydate\today & & & &\\[2.2cm] \hline}
\newcommand{\weektable}{
\newpage
\begin{tabularx}{\textwidth}{|X|X|X|X|X|}
\headerrow{}
\dayrow{0}
\dayrow{1}
\dayrow{2}
\dayrow{3}
\dayrow{4}
\dayrow{5}
\dayrow{6}
\end{tabularx}
}
\SetDate[05/01/2015]
\begin{document}
\weektable{}
\end{document}
but it's ugly!!
I've tried using a loop to avoid the repetition in \weektable, but I'm falling foul of loops within tables and cannot get it to work.
I've also tried adding a parameter to \weektable so I can produce several weeks at once, but I can't work out how pass the result of a calculation into the command.
I know these are both similar to other questions but, despite reading everywhere I've found on here, I'm stuck and would appreciate some help!
Many thanks in advance.