5

There is probably something simple I'm missing, but I have tried several variations, and I can't seem to get the following right.

This is some minimal code that demonstrates the problem:

\documentclass{article}
\usepackage[dutch]{babel}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes}
\usetikzlibrary{positioning,calendar,er}
\usetikzlibrary{decorations.markings}
\usetikzlibrary{shapes.geometric}

\newcommand{\training}{\node [anchor=base,fill=lightgray,draw=lightgray,rounded corners=0pt,inner sep=0pt,minimum size=10pt] {};}

\begin{document}
\begin{center}
\begin{tikzpicture}[every calendar/.style={week list},every day/.style={anchor=mid,day text={\%d=}}]
\calendar (juni) [dates=2012-06-01 to 2012-06-last] if (Wednesday) {\training};

\end{tikzpicture}

\end{center}

\end{document} 

which gives

enter image description here

The problem is that I can't seem to get the training-nodes and the days to properly align vertically. This is the best I can get them, but the number of the day is placed at the top of the training-node, while I want them to be centred vertically.

I've tried several combinations of anchors for the training nodes and the every day-style. Any help is greatly appreciated.

0

1 Answer 1

8

Change the line

\begin{tikzpicture}[every calendar/.style={week list},every day/.style={anchor=mid,day text={\%d=}}]

to

\begin{tikzpicture}[every calendar/.style={week list},every day/.style={anchor=center,day text={\%d=}}]

In other words, you need to change the anchor to center instead of mid.

This is the updated figure:

enter image description here

You must log in to answer this question.

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