TikZ カレンダーの日付リスト(ラベル付き)

TikZ カレンダーの日付リスト(ラベル付き)

特定の日付のタスクをリストした縦型カレンダーを作成したいと考えています。たとえば、以下のコードで 2 月 19 日のタスクをリストするにはどうすればよいでしょうか。

\documentclass{article}

\usepackage[top=15mm, bottom=15mm, left=15mm, right=15mm]{geometry}
\usepackage{tikz}

\usetikzlibrary{calendar}

\begin{document}

\begin{tikzpicture}
    \calendar [dates=2016-02-01 to 2016-02-29, day list downward, month label left]
    if (weekend) [black!25]
;
\end{tikzpicture}

\end{document}

答え1

まず、オプション を使用してカレンダーに名前を付ける必要がありますname=mycalendar。その後、日付を参照できます。例では を使用していますmycalendar-2016-02-19。この名前を使用して、ノードを配置できます。

\documentclass{article}

\usepackage[top=15mm, bottom=15mm, left=15mm, right=15mm]{geometry}
\usepackage{tikz}

\usetikzlibrary{calendar}

\begin{document}

\begin{tikzpicture}
    \calendar [dates=2016-02-01 to 2016-02-29, day list downward, month label left, name=mycalendar]
    if (weekend) [black!25];
    \node [anchor=base west] at (mycalendar-2016-02-19.base east) {\textbf{My Task}};
\end{tikzpicture}

\end{document}

出力:

カレンダー

関連情報