[Tex/LaTex] How to customize TikZ’ calendar

calendartikz-pgf

I'm playing around with the TikZ’ calendar library to make a simple course calendar.

I want to make weekend days and days when there is a week break or something to be grayed out, lecture days to be bold face and lab days to be in italics.

\begin{minipage}[t]{.5\textwidth}
September\\ 
\begin{tikzpicture}
\calendar (mycal) [dates=2013-09-01 to 2013-09-30,week list];
\draw[black] (mycal-2013-09-04) circle (8pt);
\end{tikzpicture}
\end{minipage}
\begin{minipage}[t]{0.5\textwidth}
November\\ 
\begin{tikzpicture}
\calendar (mycal) [dates=2013-11-01 to 2013-11-30,week list];
\end{tikzpicture}
\end{minipage}\
\vskip0.5cm

calendar

Best Answer

Here is something to get you started. I have created extra keys for making dates italic or bold.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calendar,shapes.geometric}
\begin{document}

%% Extra keys for bold and italic dates.
\pgfkeys{/tikz/italic/.code =
  {
    \itshape{#1}
  }
}

\pgfkeys{/tikz/bold/.code =
  {
    \bfseries{#1}
  }
}

\begin{minipage}[t]{.5\textwidth}
  September\\ 
  \begin{tikzpicture}
    \calendar (mycal) [dates=2013-09-01 to 2013-09-last,week list]
    if (weekend,
        between=09-16 and 09-20) [gray]
    if (equals=09-03) [italic]
    if (equals=09-13) [bold];
    \draw[black] (mycal-2013-09-04) circle (8pt);
    \node [star,draw] at (mycal-2013-09-10) {};
  \end{tikzpicture}
\end{minipage}

\end{document}