TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:


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

\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};




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.

share|improve this question
up vote 8 down vote accepted

Change the line

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


\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

share|improve this answer

Your Answer


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.