5

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

3
  • This link might be of help.
    – jub0bs
    Mar 14, 2013 at 11:24
  • What have you tried so far? Have you looked at the other questions concerned with TikZ calendars on this site (like Custom Calendar Using TikZ)? Can you provide a minimal example to get started?
    – Jake
    Mar 14, 2013 at 11:25
  • Also see this.
    – user10274
    Mar 14, 2013 at 11:34

1 Answer 1

8

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}

1
  • pretty much what i want.thanks! what if now i want to use a star or any other shape for tests?
    – rethabile
    Mar 14, 2013 at 14:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .