I need to position the calendar within a tikzpicture (this is a MWE, the original file is much more complex, containing also fading pictures etc, so I really want to do it within the tikzpicture environment). I don't understand why the text disappeares and why I can not center the calendar...
\documentclass[11pt,BCOR8mm,final,a4paper]{scrbook}
\usepackage[germanb]{babel}
\usepackage[latin1]{inputenc}
\usepackage{tikz,geometry}
\usetikzlibrary{positioning}
\usetikzlibrary{calendar}
% code von: https://tex.stackexchange.com/questions/10186/weekday-captions-with-the-tikz-library-calendar
\makeatletter%
\tikzoption{day headings}{\tikzstyle{day heading}=[#1]}
\tikzstyle{day heading}=[]
\tikzstyle{day letter headings}=[
execute before day scope={ \ifdate{day of month=1}{%
\pgfmathsetlength{\pgf@ya}{\tikz@lib@cal@yshift}%
\pgfmathsetlength\pgf@xa{\tikz@lib@cal@xshift}%
\pgftransformyshift{-\pgf@ya}
\foreach \d/\l in {0/M,1/D,2/M,3/D,4/F,5/S,6/S} {
\pgf@xa=\d\pgf@xa%
\pgftransformxshift{\pgf@xa}%
\pgftransformyshift{\pgf@ya}%
\node[every day,day heading]{\l};%
}
}{}%
}%
]
\makeatother%
\begin{document}
\begin{tikzpicture}
\node[text=black, font=\fontsize{20}{44}\selectfont] at (13,22.7) {Einladung zur Feldkampagne};
\node[text=black, font=\fontsize{20}{44}\selectfont] at (13,21) {Schulprojekt 1 / 2017};
\node[text=black, font=\fontsize{20}{44}\selectfont] at (13.0,15.) {Zeitraum:};
%\begin{center}
\tikz\calendar[dates=2017-06-01 to 2017-07-last,
week list,
month label above centered,
day xshift = 0.8cm,
day headings=blue,
if={(equals=07-10) [nodes={draw,thick}]},
if={(equals=07-11) [nodes={draw,thick}]},
if={(equals=07-12) [nodes={draw,thick}]},
if={(equals=07-19) [nodes={draw,thick}]},
if={(equals=07-20) [nodes={draw,thick}]},
if={(equals=07-21) [nodes={draw,thick}]},
day letter headings
];
%\end{center}
\end{tikzpicture}
\end{document}
\tikzstyle
is deprecated, by the way.