I am trying to draw a rule under the node of each sundays in my calendar. Therefor I use if (Sunday) {\draw (<current_node>) -- +(0,-4cm);}
.
However, I don't know how to access the positionning of current node.
I've tried (\pgfcalendarsuggestedname)
or even to emulate the node name (that is calendar_prefix-YYYY-MM-DD
) via \def\thisday{\pgfcalendarprefix-\pgfcalendarcurrentyear-\pgfcalendarcurrentmonth-\pgfcalendarcurrentyear}
and then using (\thisday)
as coordinate... but (of course?!) it doesn't work.
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{calendar}
%\def\thisday{\pgfcalendarprefix-\pgfcalendarcurrentyear-\pgfcalendarcurrentmonth-\pgfcalendarcurrentyear}
\begin{document}
\begin{tikzpicture}
\calendar (cal) [%
day list right,
dates=2016-08-01 to 2016-10-last,
day xshift=1.5em,
month xshift=1pt,
month label above left,
]
if (weekend) [text=black!25];
if (Sunday) {\draw (\pgfcalendarsuggestedname) -- +(0,-4cm);}
\end{tikzpicture}
\end{document}