texlive[74419] branches/branch2024.final/Master: tikzcalendarnotes
commits+karl at tug.org
commits+karl at tug.org
Mon Mar 3 22:21:46 CET 2025
Revision: 74419
https://tug.org/svn/texlive?view=revision&revision=74419
Author: karl
Date: 2025-03-03 22:21:46 +0100 (Mon, 03 Mar 2025)
Log Message:
-----------
tikzcalendarnotes (branch) (3mar25)
Modified Paths:
--------------
branches/branch2024.final/Master/tlpkg/libexec/ctan2tds
branches/branch2024.final/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc
Added Paths:
-----------
branches/branch2024.final/Master/texmf-dist/doc/latex/tikzcalendarnotes/
branches/branch2024.final/Master/texmf-dist/doc/latex/tikzcalendarnotes/README.md
branches/branch2024.final/Master/texmf-dist/doc/latex/tikzcalendarnotes/tikzcalendarnotes.pdf
branches/branch2024.final/Master/texmf-dist/doc/latex/tikzcalendarnotes/tikzcalendarnotes.tex
branches/branch2024.final/Master/texmf-dist/tex/latex/tikzcalendarnotes/
branches/branch2024.final/Master/texmf-dist/tex/latex/tikzcalendarnotes/tikzcalendarnotes.sty
branches/branch2024.final/Master/tlpkg/tlpsrc/tikzcalendarnotes.tlpsrc
Added: branches/branch2024.final/Master/texmf-dist/doc/latex/tikzcalendarnotes/README.md
===================================================================
--- branches/branch2024.final/Master/texmf-dist/doc/latex/tikzcalendarnotes/README.md (rev 0)
+++ branches/branch2024.final/Master/texmf-dist/doc/latex/tikzcalendarnotes/README.md 2025-03-03 21:21:46 UTC (rev 74419)
@@ -0,0 +1,72 @@
+tikzcalendarnotes
+==========
+
+This package offers a "calendar arrangement" (atop of the TikZ calendar library) and provides a set of commands aimed at highlighting/marking dates.
+
+For more details , see the documentation ,
+[tikzcalendarnotes.pdf](http://mirrors.ctan.org/graphics/pgf/contrib/tikzcalendarnotes/doc/tikzcalendarnotes.pdf)
+
+--------------
+
+## Requirements
+* none besides a fairly recent LaTeX distribution as recent as 2022/06/01
+(with the new in kernel *\ProcessKeyOptions* and *\NewDocumentCommand*).
+
+## Installation
+The stable version is available at [CTAN](https://ctan.org/pkg/tikzcalendarnotes).
+
+## Usage
+### Stable version
+Just place
+```latex
+ \usepackage{tikz}
+ \usetikzlibrary{calendar}
+ ...
+ \usepackage{tikzcalendarnotes}
+```
+
+in the preamble and compile away.
+
+## Contacting Author
+
+For bug reports and enhancement suggestions , the preferred way is to use
+[the project's issue page](https://github.com/alceu-frigeri/tikzcalendarnotes/issues).
+Please be ready to provide an example code showing the bug , if any.
+
+Please do not use the issue page for generic help on how to use the package.
+
+* git: https://github.com/alceu-frigeri/tikzcalendarnotes
+
+-------------
+Copyright 2025-present by Alceu Frigeri
+
+ This work may be distributed and/or modified under the
+ conditions of
+
+ * The [LaTeX Project Public License](http://www.latex-project.org/lppl.txt) , version 1.3c (or later) , and/or
+ * The [GNU Affero General Public License](https://www.gnu.org/licenses/agpl-3.0.html) , version 3 (or later)
+
+This work has the LPPL maintenance status *maintained*.
+
+The Current Maintainer of this work is Alceu Frigeri
+
+-------------
+## This work consist of the files
+
+* tikzcalendarnotes.sty
+ - the package itself
+
+* README.md (this file)
+ - quick introduction
+
+* tikzcalendarnotes.tex
+ - package documentation
+* tikzcalendarnotes.pdf
+ - documentation in PDF format
+
+-------------
+
+## Change log
+
+* Version 1.0 (this)
+ - Initial release by CTAN.
Property changes on: branches/branch2024.final/Master/texmf-dist/doc/latex/tikzcalendarnotes/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: branches/branch2024.final/Master/texmf-dist/doc/latex/tikzcalendarnotes/tikzcalendarnotes.pdf
===================================================================
(Binary files differ)
Index: branches/branch2024.final/Master/texmf-dist/doc/latex/tikzcalendarnotes/tikzcalendarnotes.pdf
===================================================================
--- branches/branch2024.final/Master/texmf-dist/doc/latex/tikzcalendarnotes/tikzcalendarnotes.pdf 2025-03-03 21:19:41 UTC (rev 74418)
+++ branches/branch2024.final/Master/texmf-dist/doc/latex/tikzcalendarnotes/tikzcalendarnotes.pdf 2025-03-03 21:21:46 UTC (rev 74419)
Property changes on: branches/branch2024.final/Master/texmf-dist/doc/latex/tikzcalendarnotes/tikzcalendarnotes.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: branches/branch2024.final/Master/texmf-dist/doc/latex/tikzcalendarnotes/tikzcalendarnotes.tex
===================================================================
--- branches/branch2024.final/Master/texmf-dist/doc/latex/tikzcalendarnotes/tikzcalendarnotes.tex (rev 0)
+++ branches/branch2024.final/Master/texmf-dist/doc/latex/tikzcalendarnotes/tikzcalendarnotes.tex 2025-03-03 21:21:46 UTC (rev 74419)
@@ -0,0 +1,805 @@
+% !TEX program = pdflatex
+% !TEX ext = --interaction=nonstopmode --enable-etex --enable-write18
+% !BIB program = none
+%%%==============================================================================
+%% Copyright 2024-present by Alceu Frigeri
+%%
+%% This work may be distributed and/or modified under the conditions of
+%%
+%% * The [LaTeX Project Public License](http://www.latex-project.org/lppl.txt) ,
+%% version 1.3c (or later) , and/or
+%% * The [GNU Affero General Public License](https://www.gnu.org/licenses/agpl-3.0.html) ,
+%% version 3 (or later)
+%%
+%% This work has the LPPL maintenance status *maintained*.
+%%
+%% The Current Maintainer of this work is Alceu Frigeri
+%%
+%% This is version {1.0} {2025/03/03}
+%%
+%% The list of files that compose this work can be found in the README.md file at
+%% https://ctan.org/pkg/tikzcalendarnotes
+%%
+%%%==============================================================================
+\documentclass{article}
+\RequirePackage[verbose,a4paper,marginparwidth=28mm,top=3cm,bottom=1.5cm,hmargin={45mm,25mm},marginparsep=2.5mm,columnsep=10mm,asymmetric]{geometry}
+\usepackage{codedescribe}
+\usepackage{enumitem}
+
+%\RequirePackage[verbose ,a4paper ,marginparwidth=27.5mm ,top=2.5cm ,bottom=1.5cm ,hmargin={40mm ,20mm} ,marginparsep=2.5mm ,columnsep=10mm ,asymmetric]{geometry}
+%\usepackage{codedescribe}
+%\RequirePackage[inline]{enumitem}
+%\SetEnumitemKey{miditemsep}{parsep=0ex ,itemsep=0.4ex}
+
+\RequirePackage{lmodern}
+
+
+\usepackage{tikz}
+\usetikzlibrary{calendar}
+
+\usepackage{tikzcalendarnotes}
+
+\RequirePackage[hidelinks ,hypertexnames=false]{hyperref}
+
+\begin{document}
+\tstitle{
+ author={Alceu Frigeri\footnote{\tsverb{https://github.com/alceu-frigeri/tikzcalendarnotes}}} ,
+ date={\tsdate} ,
+ title={The tikzcalendarnotes Package \break Version \PkgInfo{tikzcalendarnotes}{version}}
+ }
+
+
+\begin{typesetabstract}
+
+The \tsobj[pkg]{calendar} library from Ti\emph{k}Z is extremely flexible, but can be daunting when someone just wants a calendar with some markings. This package offers a pre-set calendar arrangement, whereas months are constructed as a block, one week per line, and layout as a matrix.
+
+Furthermore, a set of commands is offered which aim to easy the task of adding marks, highlighting some dates.
+
+\end{typesetabstract}
+
+\tableofcontents
+
+\section{Package Requirements}
+Basically, besides a fairly recent \LaTeX\ kernel (as recent as 2022/06/01), one needs to load at least
+\begin{codestore}[prereq]
+\usepackage{tikz}
+\usetikzlibrary{calendar}
+\end{codestore}
+\tscode*[codeprefix=]{prereq}
+
+Note that, not all fonts support any font size, which will affect a calendar rendering. That for, one is advised to use a font like \tsobj[pkg]{lmoderm} or use packages like \tsobj[pkg]{anyfontsize,relsize}.
+
+\newpage
+Lastly, given the possible uses of a calendar, a nice package setup would be (using the \tsobj[pkg]{preview} package)
+
+\begin{codestore}[setup]
+\usepackage{tikz}
+\usetikzlibrary{calendar}
+
+%\RequirePackage{anyfontsize}
+%\RequirePackage{relsize}
+\RequirePackage{lmodern}
+
+\usepackage{tikzcalendarnotes}
+
+\usepackage[active , tightpage]{preview}
+\PreviewEnvironment{tikzpicture}
+\setlength\PreviewBorder{5pt}
+\end{codestore}
+\tscode*[codeprefix=]{setup}
+
+
+
+\section{Introduction}
+
+Ti\emph{k}Z's \tsobj[pkg]{calendar}'s library is extremely flexible, allowing all sort of arrangements, formatting and marking of a calendar, though one has to provide (programm) the desired arrangement and set the markings/fomating using the related keys (as \tsobj[key]{if=}), and that's where it can get complicate.
+
+This package provides a set of commands ( \tsobj{\setcountingweeks,\suppresscouting,\setdates,\setranges,\sethighlightdates} ) aimed at highlighting/marking dates. And a command, \tsobj{\calendarnotes} to typeset such annotated calendar.
+
+Those markings/annotations can be organized as separate ``data sets'', so that, when producing the final calendar, one can choose/select which ``data sets'' will be active, vi\-à-viz, taken in account.
+
+In the following commands, a certain ``jargon'' is used, taking the following example (which is scaled down to the size of this doc). The text over the $14$ is called a ``remark'', whilst the red circle (could be a square) is called a ``mark''. The text below the same date is just called a ``note''. Finally, those small numbers, to the left, are ``week counters''.
+
+\begin{codestore}[demoA]
+\defnewdataset{example}
+\setdates[example]{date=2025-01-14,color=brown,remark=short one,notes=some\break long text used as a note,round,mark style=red}
+\setcountingweeks[example]{from=2025-01-01,to=2025-02-28}
+
+ \begin{tikzpicture}
+ \calendarnotes[calendar notes, day names on top, every sunday=blue]{with notes,year=2025,number of months=2, data set={example}}
+ \end{tikzpicture}
+\end{codestore}
+
+\tscode*[keywd={calendarnotes,defnewdataset,setdates,setcountingweeks},emph={day,color,round,square,names,on,top,calendar,notes,every,sunday},emph2={date,from,to,remark,mark,style}]{demoA}
+
+\tsresult*{demoA}
+
+
+\section{Package Commands}
+\begin{codedescribe}{\defnewdataset}
+\begin{codesyntax}%
+\tsmacro{\defnewdataset}{new-dataset}
+\end{codesyntax}
+This defines/create a \tsobj[marg]{dataset} for later reference. A dataset is just a ''repository'' of dates/ranges/etc. (see below)
+\end{codedescribe}
+
+\begin{tsremark}
+About dataset's names: It can be almost anything, the name can contain strings normally not allowed in a macro name, like spaces, dots, two-dots and so on, including backslashes, meaning that if someone typesets \tsobj{\XYZ} as a dataset, \tsobj{\XYZ} will be it's name: a backslash isn't an active character anymore and one can't use macros when defining a dataset's name.
+\end{tsremark}
+
+\begin{tsremark}
+When creating a new dataset, a warning is raised in case \tsobj[marg]{new-dataset} already exists.
+When selecting a dataset, an error is raised if \tsobj[marg]{dataset} doesn't exists.
+\end{tsremark}
+
+
+\begin{codedescribe}{\setdates}
+\begin{codesyntax}%
+\tsmacro{\setdates}[dataset]{key-value list}
+\end{codesyntax}
+This adds a set of dates, \tsobj[marg]{key-value list}, to be annotated (see list below). If missing, the ''default'' \tsobj[oarg]{dataset} will be used.
+\end{codedescribe}
+
+
+{Valid Keys when annotating a date:}
+\begin{describelist*}{option}
+\describe{date}{The date in ISO format (as used by the \tsobj[pkg]{calendar} library.}
+\describe{color}{The color of the day. No default}
+\describe{round}{A circle will be drawn around the date. Well, in fact a square with ``rounded corners''.}
+\describe{square}{A square will be drawn around the date.}
+\describe{mark style}{The style to be applied \emph{after} the \tsobj[key]{every mark} style.}
+\describe{remark}{A remark to be added to a date.}
+\describe{remark style}{The style to be applied \emph{after} the \tsobj[key]{every remark} style.}
+\describe{north east}{The remark, if any, will be positioned at the day's \tsobj[key]{north east} anchor.}
+\describe{north west}{The remark, if any, will be positioned at the day's \tsobj[key]{north west} anchor.}
+\describe{south east}{The remark, if any, will be positioned at the day's \tsobj[key]{south east} anchor.}
+\describe{south west}{The remark, if any, will be positioned at the day's \tsobj[key]{south west} anchor.}
+\describe{notes}{A note to be added bellow a date.}
+\describe{note style}{the style to be applied \emph{after} the \tsobj[key]{every note} style.}
+\end{describelist*}
+
+\begin{tsremark}
+\tsobj[key]{date} must be the first key, all other (optional) keys refers the previous \tsobj[key]{date}. One can define/set as many \tsobj[key]{dates} as one wishes in a single \tsobj{\setdates} call.
+\end{tsremark}
+
+\begin{tsremark}
+If not giving, the default position is \tsobj[key]{north east}.
+\end{tsremark}
+
+\begin{tsremark}
+An error is raised if \tsobj[oarg]{dataset} doesn't exists.
+\end{tsremark}
+
+\begin{codedescribe}{\setranges}
+\begin{codesyntax}%
+\tsmacro{\setranges}[dataset]{key-value list}
+\end{codesyntax}
+This adds a set of date's ranges, \tsobj[marg]{key-value list}, to be annotated (see list below). If missing, the ''default'' \tsobj[oarg]{dataset} will be used.
+\end{codedescribe}
+
+{Valid Keys when annotating a range:}
+\begin{describelist*}{option}
+\describe{from}{The starting date in ISO format (as used by the \tsobj[pkg]{calendar} library.}
+\describe{to}{The final date in ISO format (as used by the \tsobj[pkg]{calendar} library.}
+\describe{color}{The color of the day on the range \tsobj[key]{from,to}. No default}
+\describe{round}{A rounded rectangle will be drawn around the range.}
+\describe{square}{A rectangle will be drawn around the range.}
+\describe{mark style}{The style to be applied \emph{after} the \tsobj[key]{every mark} style.}
+\describe{remark}{A remark to be added to the range.}
+\describe{remark style}{The style to be applied \emph{after} the \tsobj[key]{every remark} style.}
+\describe{north east}{The remark, if any, will be positioned at the \tsobj[key]{to} day's \tsobj[key]{north east} anchor.}
+\describe{north west}{The remark, if any, will be positioned at the \tsobj[key]{from} day's \tsobj[key]{north west} anchor.}
+\describe{south east}{The remark, if any, will be positioned at the \tsobj[key]{to} day's \tsobj[key]{south east} anchor.}
+\describe{south west}{The remark, if any, will be positioned at the \tsobj[key]{from} day's \tsobj[key]{south west} anchor.}
+\end{describelist*}
+
+\begin{tsremark}
+\tsobj[key]{from,to} must be the first keys, all other (optional) keys refers the last \tsobj[key,sep=/]{from,to} pair. One can define/set as many \tsobj[key,sep=/]{from,to} ranges as one wishes in a single \tsobj{\setranges} call.
+\end{tsremark}
+
+\begin{tsremark}
+If not giving, the default position is \tsobj[key]{north east}.
+\end{tsremark}
+
+\begin{tsremark}
+An error is raised if \tsobj[oarg]{dataset} doesn't exists.
+\end{tsremark}
+
+
+\begin{codedescribe}{\sethighlightdates}
+\begin{codesyntax}%
+\tsmacro{\sethighlightdates}[dataset]{key-value list}
+\end{codesyntax}
+This adds a set of dates, \tsobj[marg]{key-value list}, to be highlighted (see list below). If missing, the ''default'' \tsobj[oarg]{dataset} will be used.
+\end{codedescribe}
+
+
+{Valid Keys when highlighting dates:}
+\begin{describelist*}{option}
+\describe{color}{The color applied to every date in the \tsobj[key]{dates} list.}
+\describe{dates}{This key assumes a \tsobj[marg]{csv-list} of dates in ISO format. Each date will be highlighted with \tsobj[key]{color}. If no previous color got defined, \tsobj[keyval]{lightgray} will be used}
+\end{describelist*}
+
+\begin{tsremark}
+One can define/set as many \tsobj[key]{dates} as one wishes in a single \tsobj{\sethighlightdates} call.
+\end{tsremark}
+
+\begin{tsremark}
+An error is raised if \tsobj[oarg]{dataset} doesn't exists.
+\end{tsremark}
+
+
+\begin{codedescribe}{\setcountingweeks}
+\begin{codesyntax}%
+\tsmacro{\setcountingweeks}[dataset]{key-value list}
+\end{codesyntax}
+A counter (of the weeks in the given range) will be added to the left of every week. If missing, the ''default'' \tsobj[oarg]{dataset} will be used.
+\end{codedescribe}
+
+
+{Valid Keys:}
+\begin{describelist*}{option}
+\describe{from}{The starting date in ISO format (as used by the \tsobj[pkg]{calendar} library.}
+\describe{to}{The final date in ISO format (as used by the \tsobj[pkg]{calendar} library.}
+\describe{color}{The color to be used. No default}
+\describe{up}{The counter will be drawn to the left, upwards.}
+\describe{down}{The counter will be drawn to the left, downwards.}
+\describe{center}{The counter will be just drawn to the left. That's the default positioning.}
+\describe{starting at}{Sets the counters initial value. Useful in the cases when the "counting period" starts before the actual calendar.}
+\end{describelist*}
+
+\begin{tsremark}
+An error is raised if \tsobj[oarg]{dataset} doesn't exists.
+\end{tsremark}
+
+\begin{tsremark}
+The \tsobj[key]{starting at} key is active only if the \tsobj[key]{keep counters} style is in use (see \ref{style:counters})
+\end{tsremark}
+
+\begin{codedescribe}{\suppresscounting}
+\begin{codesyntax}%
+\tsmacro{\suppresscounting}[dataset]{key-value list}
+\end{codesyntax}
+This will suppress/step over a few weeks when counting weeks on a \tsobj[oarg]{dataset} (for instance, Christmas and New Year's recess in a semester calendar). If missing, the ''default'' \tsobj[oarg]{dataset} will be used.
+\end{codedescribe}
+
+
+{Valid Keys:}
+\begin{describelist*}{option}
+\describe{from}{The starting date in ISO format (as used by the \tsobj[pkg]{calendar} library.}
+\describe{to}{The final date in ISO format (as used by the \tsobj[pkg]{calendar} library.}
+\end{describelist*}
+
+
+\begin{tsremark}
+Counters of other \tsobj[oarg]{dataset}'s wont be affected.
+\end{tsremark}
+
+\begin{tsremark}
+An error is raised if \tsobj[oarg]{dataset} doesn't exists.
+\end{tsremark}
+
+
+
+\begin{codedescribe}{\calendarnotes}
+\begin{codesyntax}%
+\tsmacro{\calendarnotes}[pgfkeys]{key-value list}
+\end{codesyntax}
+This will create a calendar as a (\tsobj[pkg]{tikz}) matrix, one month per cell. \tsobj[oarg]{pgfkeys} are any valid pgfkey (not just the ones added by this package).
+
+The calendar range, starting date, arrangement are set by the \tsobj[marg]{key-value list}, as below.
+\end{codedescribe}
+\begin{describelist*}{option}
+\describe{year}{The year. If not given \tsobj{\year} will be used.}
+\describe{starting at}{The calendar initial month. If not given $1$ (January) will be assumed.}
+\describe{number of months}{The number of months for the calendar. Defaults to 12.}
+\describe{per line}{How many months shall be arranged per ``line''.}
+\describe{with notes}{The notes will be typeset. Note that this will also adjust day/week spacing, accordingly.}
+\describe{without notes}{Notes won't be typeset, resulting in a more compact calendar.}
+\describe{compact}{An alias to ``\tsobj[key]{without notes}''.}
+\describe{day spacing}{Inter day spacing to be used (in pt). It defaults to 25 (\tsobj[key]{with notes}) and 15 (\tsobj[key]{without notes}).}
+\describe{week spacing}{Inter week spacing to be used (in pt). It defaults to 36 (\tsobj[key]{with notes}) and 17 (\tsobj[key]{without notes}).}
+\describe{month spacing}{Inter month spacing to be used (in pt). It defaults to 20 (\tsobj[key]{with notes}) and 5 (\tsobj[key]{without notes}).}
+\describe{data set}{A comma separated list of \tsobj[marg]{data set} to be used. Defaults to ``default''.}
+\describe{name}{The prefix name to be used by the calendar library. Defaults to ``cal''.}
+\end{describelist*}
+
+
+\begin{tsremark}
+An error is raised if \tsobj[oarg]{dataset} doesn't exists.
+\end{tsremark}
+
+\subsection{Advanced Use}
+
+
+\begin{codedescribe}{\calendarnotesprepare,\calendarnotessetifs,\calendarnotesdraw}
+\begin{codesyntax}%
+\tsmacro{\calendarnotesprepare}[pgfkeys]{key-value list}
+\tsmacro{\calendarnotessetifs}{}
+\tsmacro{\calendarnotesdraw}{}
+\end{codesyntax}
+Those are provided for the case one wants to use a different calendar arrangement, but still wants to use the underlying marking provided by this package.
+
+\tsobj{\calendarnotesprepare} will process all \tsobj[oarg]{pgfkeys} and \tsobj[marg]{key-value list} as \tsobj{\calendarnotes} does, but nothing else.
+
+\tsobj{\calendarnotessetifs} will then append the many \tsobj[key]{if=}'s (to \tsobj[key]{every calendar}).
+
+Finally, \tsobj{\calendarnotesdraw} will add the marks/remarks (and notes if the \tsobj[key]{with notes} key was used in \tsobj{\calendarnotesprepare}).
+
+Note that, the user is supposed to construct/draw the calendar between the \tsobj{\calendarnotessetifs} and \tsobj{\calendarnotesdraw} commands.
+\end{codedescribe}
+
+
+\section{Ti{\itshape k}Z Styles}\label{tikz-styles}
+A few \tsobj[pkg]{TikZ} styles are defined, to work together with the ones from the \tsobj[pkg]{calendar} library. A few of them are about ``calendar arrangement'' (see the \tsobj[pkg]{pgfmanual}), like \tsobj[key]{calendar notes, week starts on x}, others are about adding year/week list labels, like \tsobj[key]{year label , day names on top }. And others are for formatting/styling.
+
+\begin{tsremark}
+all keys are defined under the \tsobj[key]{/tikz/} ``family''. For instance \tsverb{\pgfkeys{tikz,...}} if using the \tsverb{\pgfkeys} directly.
+\end{tsremark}
+
+
+
+\begin{codedescribe}[key]{calendar notes}
+\begin{codesyntax}%
+\end{codesyntax}
+This is the \emph{main style} to be used with the \tsobj{\calendarnotes} command. Months are arranged one week per line (using the \tsobj[key]{week starts on x} style, see below). Day coordinates are ``remembered'' (\tsobj[pkg]{tikz} style \tsobj[key]{remember picture}) for later reference.
+\end{codedescribe}
+
+\begin{tsremark}[Defaults:] Besides the \tsobj[key]{remember picture}, \tsobj[key]{day text} is set to \tsobj[verb]{\%d0}, \tsobj[key]{month text} is set to \tsobj[verb]{\%mt} and \tsobj[key]{every month/.style} is set to \{ \tsobj[verb]{font = \bfseries\itshape}\}.
+\end{tsremark}
+
+\subsection{Year related ones}
+
+
+\begin{codedescribe}[key]{year label by january and start}
+This will add the calendar's year to every January, AND, to the very first month draw.
+\end{codedescribe}
+
+\begin{tsremark} Please note that ``the first month drawn'', depends on an internal flag set by this style key. Changing the scope or repeatedly calling to this style key will reset said flag, resulting in the year label being added in the following month being draw.
+\end{tsremark}
+
+\begin{tsremark}
+If the label's position isn't already set, the style \tsobj[key]{year label left} will be applied.
+\end{tsremark}
+
+\begin{tsremark}
+this is the default when using one of the \tsobj[key]{year label left/left vertical/corner}.
+\end{tsremark}
+
+\begin{codedescribe}[key]{year label by january only}
+This will add the calendar's year label to every January only.
+\end{codedescribe}
+
+\begin{tsremark}
+If the label's position isn't already set, the style \tsobj[key]{year label left} will be applied.
+\end{tsremark}
+
+
+\begin{codedescribe}[key]{year label every month}
+This will add a calendar's year label to every month draw.
+\end{codedescribe}
+
+\begin{tsremark}
+If the label's position isn't already set, the style \tsobj[key]{year label left} will be applied.
+\end{tsremark}
+
+
+\begin{codedescribe}[key]{year label left}
+\begin{codesyntax}%
+\end{codesyntax}
+The calendar's year label will added to the left of a month.
+\end{codedescribe}
+
+\begin{tsremark}
+If a year's label policy (if every month, just january or \ldots) hasn't been set, the style \tsobj[key]{year label by january and start} will be applied.
+\end{tsremark}
+
+\begin{codedescribe}[key]{year label left vertical}
+\begin{codesyntax}%
+\end{codesyntax}
+The calendar's year will be at the left of a month, rotated $90^o$
+\end{codedescribe}
+
+\begin{tsremark}
+If a year's label policy (if every month, just january or \ldots) hasn't been set, the style \tsobj[key]{year label by january and start} will be applied.
+\end{tsremark}
+
+\begin{codedescribe}[key]{year label left corner}
+The calendar's year will be at the corner left of a month, rotated $45^o$
+\end{codedescribe}
+
+\begin{tsremark}
+If a year's label policy (if every month, just january or \ldots) hasn't been set, the style \tsobj[key]{year label by january and start} will be applied.
+\end{tsremark}
+
+
+\begin{codedescribe}[key]{every year/.style,every year/.append style}
+To change the year style.\\ The default being \{ \tsobj[verb,comma]{ font = \Large\sffamily\bfseries, green!50!black } \}\\
+\end{codedescribe}
+%\begin{tsremark}
+%One can use the \tsobj[key]{every year/.append style} as well.
+%\end{tsremark}
+
+\subsection{Marks related ones}
+\begin{codedescribe}[key]{every mark/.style,every mark/.append style}
+To change the style of the calendar ``marks'' (square or round ones).\\ The default being \{ \tsobj[verb,comma]{thin , gray} \}.
+\end{codedescribe}
+
+%\begin{tsremark}
+%One can use the \tsobj[key]{every mark/.append style} as well.
+%\end{tsremark}
+%
+\subsection{Remarks related ones}
+\begin{codedescribe}[key]{every remark/.style,every remark/.append style}
+To change the style of every ``remark'' (the remark text).\\ The default being \{ \tsobj[verb,comma]{font = } \{ \tsobj[verb,comma]{ \fontsize{5}{6} \selectfont } \} \}
+\end{codedescribe}
+
+%\begin{tsremark}
+%One can use the \tsobj[key]{every remark/.append style} as well.
+%\end{tsremark}
+%
+\begin{codedescribe}[key]{remarks fontsize}
+In case one just wants to change the remarks fontsize (in pt) used and nothing else.
+\end{codedescribe}
+
+
+\subsection{Counter related ones}\label{style:counters}
+\begin{codedescribe}[key]{keep counters}
+The counters won't be reset between calls, allowing the piecewise construction of a calendar, one or more months at time.
+\end{codedescribe}
+\begin{tsremark}
+This is needed, for instance, also when using the \tsobj[key]{starting at} key (\tsobj{\setcountingweeks}).
+\end{tsremark}
+
+\begin{codedescribe}[key]{every counter/.style,every counter/.append style}
+To change the style of every ``counter'' (if using the \tsobj{\setcntweek}).\\ The default being \tsobj[key]{every remark}, meaning it will use the same style set for ``remarks''.
+\end{codedescribe}
+%\begin{tsremark}
+%One can use the \tsobj[key]{every counter/.append style} as well.
+%\end{tsremark}
+
+\subsection{Notes related ones}
+\begin{codedescribe}[key]{every note/.style,every note/.append style}
+To change the style of every ``note'' (the text below a date).\\ The default being \{ \tsobj[verb,comma]{font = } \{ \tsobj[verb,comma]{ \fontsize{7}{7.2} \selectfont } \} \}
+\end{codedescribe}
+
+%\begin{tsremark}
+%One can use the \tsobj[key]{every note/.append style} as well.
+%\end{tsremark}
+%
+\begin{codedescribe}[key]{notes fontsize}
+In case one just wants to change the notes fontsize (in pt) used and nothing else.
+\end{codedescribe}
+
+\subsection{Calendar arrangement}
+\begin{codedescribe}[key]{weeklist starts on x}
+This sets a month arrangement to be a week per line. The week might start at Sunday or Monday, the default being Sunday.
+\end{codedescribe}
+
+\begin{tsremark}
+This is the default arrangement if one uses the \tsobj[key]{calendar notes} key.
+\end{tsremark}
+
+\begin{codedescribe}[key]{week starts monday}
+If the key \tsobj[key]{weeklist starts on x} is active, the week will start by Mondays.
+\end{codedescribe}
+
+\begin{codedescribe}[key]{week starts sunday }
+If the key \tsobj[key]{weeklist starts on x} is active, the week will start by Sundays.
+\end{codedescribe}
+
+\begin{codedescribe}[key]{day names on top}
+This will add the weekday's name list (Su, Mo, Tu ... Sa) on top of each month (and below it's label, if drawn).
+\end{codedescribe}
+
+\subsection{Other styling keys}
+\begin{codedescribe}[key]{every day name/.style,every day name/.append style}
+This will set the style used when drawing the ``day's name'' list. The default being \{ \tsobj[verb,comma]{font = } \{ \tsobj[verb,comma]{ \scriptsize\itshape } \} \}
+\end{codedescribe}
+
+\begin{tsremark}
+Observe that, for each day name, first the \tsobj[key]{every day} style will be applied, than this \tsobj[key]{every day name}, and finally \tsobj[key,sep=or]{every sunday, every weekend} if Sunday or Saturday, accordingly .
+\end{tsremark}
+
+%\begin{tsremark}
+%One can use the \tsobj[key]{every day name/.append style} as well.
+%\end{tsremark}
+
+\begin{codedescribe}[key]{every sunday}
+This will set a styling for ``Sundays''. No default is set.
+\end{codedescribe}
+
+\begin{tsremark}
+This will append an ``if = (Sunday)'' associated with the \tsobj[key]{every calendar}. Besides that, this will also be appended / applied to the corresponding ``day name''.
+\end{tsremark}
+
+\begin{codedescribe}[key]{every weekend}
+This will set a styling for ``Saturdays'' and ``Sundays''. No default is set.
+\end{codedescribe}
+
+\begin{tsremark}
+This will append an ``if = (weekend)'' associated with the \tsobj[key]{every calendar}. Besides that, this will also be appended / applied to the corresponding ``day names'' (Saturday and Sunday).
+\end{tsremark}
+
+
+\subsection{Remarks/counters positioning fine tunning}
+
+\begin{codedescribe}[key]{Xshift adjust}
+A ``remark'' (or counter) position will be adjusted by shifting it along the X axis. The default is \tsobj[verb]{0} (in pt).
+\end{codedescribe}
+
+\begin{tsremark}
+A negative adjust will bring the remark closer to the reference point.
+\end{tsremark}
+
+\begin{codedescribe}[key]{Yshift adjust}
+A ``remark'' (or counter) position will be adjusted by shifting it along the Y axis. The default is \tsobj[verb]{0} (in pt).
+\end{codedescribe}
+
+\begin{tsremark}
+A negative adjust will bring the remark closer to the reference point.
+\end{tsremark}
+
+\begin{codedescribe}[key]{radius adjust}
+The ``mark'' size will be adjusted. The default is \tsobj[verb]{0} (in pt).
+\end{codedescribe}
+
+\begin{tsremark}
+A negative adjust will reduce the size of the marks, whilst a positive number will increase it.
+\end{tsremark}
+
+\newpage
+\section{An Example}
+
+
+\defnewdataset{dataset A}
+\defnewdataset{dataset B}
+\defnewdataset{dataset C}
+
+\setcountingweeks{from=2025-01-01,to=2025-12-31,down,color=gray!40!white} % deafault dataset
+
+\setcountingweeks[dataset A]{from=2025-04-07,to=2025-08-29,color=red}
+\setcountingweeks[dataset A]{from=2025-09-22,to=2026-03-23,color=brown}
+\suppresscounting[dataset A]{from=2025-07-07,to=2025-08-01} % like, summer break
+
+\setranges[dataset A]
+ {
+ from=2025-08-25,to=2025-08-29,round,remark=Exams Week!
+ }
+\sethighlightdates[dataset A]
+ {
+ dates = {01-01, 01-02, 03-01, 04-01, 2025-06-05} %some holidays,
+ }
+\setdates[dataset A]
+ {
+ date=2025-06-23, round, remark = L1 , notes= {FIS101 - cinematics} ,
+ date=2025-06-25, round, remark = L1 , notes= {MAT101 - integrals} ,
+ }
+\setdates[dataset B]
+ {
+ date=2025-03-22, round, color=brown, remark=C. Birthday,
+ date=2025-01-26, round, color=brown, remark=W. Birthday,
+ }
+\setranges[dataset C]
+ {
+ from=2025-06-06,to=2025-06-26,round,remark=Valencia!
+ }
+
+
+%% dammit scontents that creates a "special group" context...
+%% so, it is necessary to duplicate/replicate code
+%%
+\begin{codestore}[demoX]
+\defnewdataset{dataset A}
+\defnewdataset{dataset B}
+\defnewdataset{dataset C}
+
+\setcountingweeks{from=2025-01-01,to=2025-12-31,down,color=gray!40!white} % deafault dataset
+
+\setcountingweeks[dataset A]{from=2025-04-07,to=2025-08-29,color=red}
+\setcountingweeks[dataset A]{from=2025-09-22,to=2026-03-23,color=brown}
+\suppresscounting[dataset A]{from=2025-07-07,to=2025-08-01} % like, summer break
+
+\setranges[dataset A]
+ {
+ from=2025-08-25,to=2025-08-29,round,remark=Exams Week!
+ }
+\sethighlightdates[dataset A]
+ {
+ dates = {01-01, 01-02, 03-01, 04-01, 2025-06-05} %some holidays,
+ }
+\setdates[dataset A]
+ {
+ date=2025-06-23, round, remark = L1 , notes= {FIS101 - cinematics} ,
+ date=2025-06-25, round, remark = L1 , notes= {MAT101 - integrals} ,
+ }
+\setdates[dataset B]
+ {
+ date=2025-03-22, round, color=brown, remark=C. Birthday,
+ date=2025-01-26, round, color=brown, remark=W. Birthday,
+ }
+\setranges[dataset C]
+ {
+ from=2025-06-06,to=2025-06-26,round,remark=Valencia!
+ }
+\end{codestore}
+
+
+First, 3 \tsobj[meta]{data sets} are created, highlighting a few dates.
+
+
+\tscode*
+ [
+ keywd={calendarnotes,defnewdataset,setdates,setcountingweeks,sethighlightdates,setranges,suppresscounting},
+ emph={day,color,round,square,names,on,top,calendar,with,without,year,label,month,above,left,corner,centered,notes,every,sunday},
+ emph2={date,dates,from,to,remark,mark,style}
+ ]
+ {demoX}
+
+Then, for instance, one can create a calendar (\tsobj{\calendarnotes}) with only 3 \tsobj[meta]{data sets} (\tsobj[marg]{default, dataset A, dataset B}), without notes.
+
+
+\begin{codestore}[demoB]
+\begin{tikzpicture}
+ \calendarnotes
+ [
+ calendar notes,
+ month label above centered,
+ year label left corner,
+ day names on top,
+ every sunday=blue
+ ]
+ {
+ without notes,
+ data set={default, dataset A, dataset B}
+ }
+\end{tikzpicture}
+\end{codestore}
+
+
+
+\tscode*
+ [
+ keywd={calendarnotes,defnewdataset,setdates,setcountingweeks,sethighlightdates,setranges,suppresscounting},
+ emph={day,color,round,square,names,on,top,calendar,with,without,year,label,month,above,left,corner,centered,notes,every,sunday},
+ emph2={date,from,to,remark,mark,style}
+ ]
+ {demoB}
+
+
+ ~
+
+\tsresult*
+ {demoB}
+
+\newpage
+
+Likewise, one can construct a calendar piecewise, note the \tsobj[key]{keep counters} key:
+
+\begin{codestore}[demoC]
+\begin{tikzpicture}
+ \calendarnotes
+ [
+ calendar notes,
+ month label above centered,
+ %year label left corner,
+ day names on top,
+ every sunday=blue
+ ]
+ {
+ data set={default, dataset A, dataset B},
+ number of months=3,
+ per line=3
+ }
+\end{tikzpicture}
+
+Some text.
+
+
+\begin{tikzpicture}
+ \calendarnotes
+ [
+ calendar notes,
+ month label above centered,
+ %year label left corner,
+ day names on top,
+ every sunday=blue,
+ keep counters
+ ]
+ {
+ data set={default, dataset A, dataset B},
+ starting at=4 ,
+ number of months=3,
+ per line=3
+ }
+\end{tikzpicture}
+
+
+Some text.
+
+
+\begin{tikzpicture}
+ \calendarnotes
+ [
+ calendar notes,
+ month label above centered,
+ %year label left corner,
+ day names on top,
+ every sunday=blue,
+ keep counters
+ ]
+ {
+ data set={default, dataset A, dataset B},
+ starting at=7 ,
+ number of months=3,
+ per line=3
+ }
+\end{tikzpicture}
+
+
+\end{codestore}
+
+
+\tscode*
+ [
+ keywd={calendarnotes,defnewdataset,setdates,setcountingweeks,setranges,suppresscounting},
+ emph={day,color,round,square,names,on,top,calendar,with,without,year,label,month,above,left,corner,centered,notes,every,sunday},
+ emph2={date,from,to,remark,mark,style},
+ emph3={keep,counters}
+ ]
+ {demoC}
+
+~
+
+
+
+\tsresult*
+ {demoC}
+
+
+
+\newpage
+
+Lastly, in case ones wants an expanded view of a single, out of order, month you can use the \tsobj[key]{starting at} from \tsobj{\setcountingweeks}. (NB.: since the \tsobj[key]{from,to} keys are the same, it won't create a new one, but just redefine the existing one.)
+
+\begin{codestore}[demoD]
+\setcountingweeks[dataset A]{from=2025-04-07,to=2025-08-29,color=red,starting at=9}
+\begin{tikzpicture}
+ \calendarnotes
+ [
+ calendar notes,
+ month label above centered,
+ %year label left corner,
+ day names on top,
+ every sunday=blue,
+ keep counters
+ ]
+ {
+ data set={dataset A, dataset B},
+ starting at = 6 ,
+ number of months=1,
+ per line=1,
+ with notes
+ }
+\end{tikzpicture}
+
+
+\end{codestore}
+
+
+\tscode*
+ [
+ keywd={calendarnotes,defnewdataset,setdates,setcountingweeks},
+ emph={day,color,round,square,names,on,top,calendar,with,without,year,label,month,above,left,corner,centered,notes,every,sunday},
+ emph2={date,from,to,remark,mark,style},
+ emph3={keep,counters}
+ ]
+ {demoD}
+
+~
+
+\tsresult*
+ {demoD}
+
+
+\end{document}
\ No newline at end of file
Property changes on: branches/branch2024.final/Master/texmf-dist/doc/latex/tikzcalendarnotes/tikzcalendarnotes.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: branches/branch2024.final/Master/texmf-dist/tex/latex/tikzcalendarnotes/tikzcalendarnotes.sty
===================================================================
--- branches/branch2024.final/Master/texmf-dist/tex/latex/tikzcalendarnotes/tikzcalendarnotes.sty (rev 0)
+++ branches/branch2024.final/Master/texmf-dist/tex/latex/tikzcalendarnotes/tikzcalendarnotes.sty 2025-03-03 21:21:46 UTC (rev 74419)
@@ -0,0 +1,2306 @@
+%%%==============================================================================
+%% Copyright 2024-present by Alceu Frigeri
+%%
+%% This work may be distributed and/or modified under the conditions of
+%%
+%% * The [LaTeX Project Public License](http://www.latex-project.org/lppl.txt) ,
+%% version 1.3c (or later) , and/or
+%% * The [GNU Affero General Public License](https://www.gnu.org/licenses/agpl-3.0.html) ,
+%% version 3 (or later)
+%%
+%% This work has the LPPL maintenance status *maintained*.
+%%
+%% The Current Maintainer of this work is Alceu Frigeri
+%%
+%% This is version {1.0} {2025/03/03}
+%%
+%% The list of files that compose this work can be found in the README.md file at
+%% https://ctan.org/pkg/tikzcalendarnotes
+%%
+%%%==============================================================================
+\NeedsTeXFormat{LaTeX2e}[2022/06/01]
+
+\ProvidesExplPackage
+ {tikzcalendarnotes}
+ {2025/03/03}
+ {1.0}
+ {tikzcalendarnotes - calendar marks and notes}
+
+%%%%%%%
+%%%
+%%% Just an attempt of having my packages info in a regular way
+%%% Idea being: { <pck-name> / pkg info } for each and all.
+%%%
+%%%%%%%
+\keys_define:nn { tikzcalendarnotes / pkg info}
+ {
+ name .code:n = {tikzcalendarnotes} ,
+ prefix .code:n = {tikzcalendarnotes} ,
+ date .code:n = {2025/03/03} ,
+ version .code:n = {1.0} ,
+ description .code:n = {tikzcalendarnotes - calendar marks and notes}
+ }
+\cs_if_exist:NF \PkgInfo
+ {
+ \NewDocumentCommand \PkgInfo {mm} { \keys_set:nn {#1 / pkg info}{#2} }
+ \NewDocumentCommand \PkgDescription {m}
+ { \noindent Package~ \textbf{\PkgInfo{#1}{name}}~Version:~\PkgInfo{#1}{version}~ -~ \PkgInfo{#1}{date}\par \emph{\PkgInfo{#1}{description}}~\par }
+ }
+%%%%%%%
+%%% End of cut-n-paste
+%%%%%%%
+
+%\RequirePackage{etoolbox}
+
+
+
+%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%
+%%
+%%
+%%
+%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%
+
+\cs_generate_variant:Nn \msg_error:nnnn {neee ,nVne}
+
+
+\msg_new:nnnn {tikzcalendarnotes} {dataset already defined}
+ {
+ (ID:#1)~Dataset~ '#2'~already~defined!
+ }
+ {
+ You~tried~to~create~an~already~defined~Dataset:~'#2'.
+ ~Error~Code~ ID:<#1>.
+ }
+
+\msg_new:nnnn {tikzcalendarnotes} {invalid dataset}
+ {
+ (ID:#1)~Invalid~Dataset:~ '#2'
+ }
+ {
+ You~tried~to~use~an~invalid~Dataset:~'#2'.
+ ~Error~Code~ ID:<#1>.
+ }
+
+
+\msg_new:nnnn {tikzcalendarnotes} {date not set}
+ {
+ (ID:#1)~missing~date~key:~ '#2'
+ }
+ {
+ You~should~set~a~date~before:~'#2'.
+ ~Error~Code~ ID:<#1>.
+ }
+
+\msg_new:nnnn {tikzcalendarnotes} {range not set}
+ {
+ (ID:#1)~missing~from/to~keys:~ '#2'
+ }
+ {
+ You~should~set~from/to~keys~before:~'#2'.
+ ~Error~Code~ ID:<#1>.
+ }
+
+
+
+
+
+%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%
+%%
+%%
+%%
+%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%
+
+\tl_new:N \l__tikzcalendarnotes_msg_submodule_tl
+
+\seq_new:N \l__tikzcalendarnotes_dataset_seq
+\tl_new:N \l__tikzcalendarnotes_active_dataset_tl
+
+\bool_new:N \l__tikzcalendarnotes_date_set_flag_bool
+\bool_new:N \l__tikzcalendarnotes_hldates_set_flag_bool
+\bool_new:N \l__tikzcalendarnotes_from_set_flag_bool
+\bool_new:N \l__tikzcalendarnotes_to_set_flag_bool
+\bool_new:N \l__tikzcalendarnotes_date_case_bool
+\bool_new:N \l__tikzcalendarnotes_hldates_case_bool
+\bool_new:N \l__tikzcalendarnotes_range_case_bool
+\bool_new:N \l__tikzcalendarnotes_cntweek_case_bool
+\bool_new:N \l__tikzcalendarnotes_nocntweek_case_bool
+
+\bool_new:N \l__tikzcalendarnotes_keep_counters_pgfkey_bool
+
+\bool_new:N \l__tikzcalendarnotes_year_policy_set_bool
+\bool_new:N \l__tikzcalendarnotes_year_label_set_bool
+
+\tl_new:N \l__tikzcalendarnotes_dayspacing_Xshift_key_tl
+\tl_new:N \l__tikzcalendarnotes_weekspacing_Yshift_key_tl
+\tl_new:N \l__tikzcalendarnotes_inter_month_space_key_tl %matrix column spacing
+
+
+\tl_new:N \l__tikzcalendarnotes_hl_color_key_tl
+
+
+\int_new:N \l__tikzcalendarnotes_year_int
+\int_new:N \l__tikzcalendarnotes_month_int
+\int_new:N \l__tikzcalendarnotes_cnta_int
+\int_new:N \l__tikzcalendarnotes_cntb_int
+
+\tl_new:N \l__tikzcalendarnotes_tmpa_tl
+
+\tl_new:N \l__tikzcalendarnotes_begin_iso_tl
+
+
+\tl_new:N \l__tikzcalendarnotes_dateremark_tmp_tl
+\tl_new:N \l__tikzcalendarnotes_dateref_tmp_tl
+\tl_new:N \l__tikzcalendarnotes_from_key_tl
+\tl_new:N \l__tikzcalendarnotes_to_key_tl
+\tl_new:N \l__tikzcalendarnotes_cnt_ifdate_temp_tl
+\tl_new:N \l__tikzcalendarnotes_cnt_pgfcalifdate_temp_tl
+
+\bool_new:N \g__tikzcalendarnotes_firstdraw_bool
+
+\tl_new:N \l__tikzcalendarnotes_TXshift_tmp_tl
+\tl_new:N \l__tikzcalendarnotes_TYshift_tmp_tl
+
+
+\tl_new:N \l__tikzcalendarnotes_TXshift_scaled_tl
+\tl_new:N \l__tikzcalendarnotes_TYshift_scaled_tl
+
+
+\tl_new:N \l__tikzcalendarnotes_radius_tmp_tl
+\tl_new:N \l__tikzcalendarnotes_radius_scaled_tl
+\tl_new:N \l__tikzcalendarnotes_radius_adj_pgfkey_tl
+\tl_new:N \l__tikzcalendarnotes_ref_fontsize_tl
+
+
+\tl_new:N \l__tikzcalendarnotes_weeklist_starts_on_tl
+\tl_new:N \l__tikzcalendarnotes_weeklist_ends_on_tl
+\int_new:N \l__tikzcalendarnotes_weeklist_delta_int
+\int_new:N \l__tikzcalendarnotes_weeklist_starts_on_int
+
+
+
+
+\tl_new:N \l__tikzcalendarnotes_day_A_tl
+\tl_new:N \l__tikzcalendarnotes_day_B_tl
+\tl_new:N \l__tikzcalendarnotes_day_C_tl
+\tl_new:N \l__tikzcalendarnotes_day_D_tl
+\tl_new:N \l__tikzcalendarnotes_day_E_tl
+\tl_new:N \l__tikzcalendarnotes_day_F_tl
+\tl_new:N \l__tikzcalendarnotes_day_G_tl
+
+\tl_new:N \l__tikzcalendarnotes_day_A_style_tl
+\tl_new:N \l__tikzcalendarnotes_day_B_style_tl
+\tl_new:N \l__tikzcalendarnotes_day_C_style_tl
+\tl_new:N \l__tikzcalendarnotes_day_D_style_tl
+\tl_new:N \l__tikzcalendarnotes_day_E_style_tl
+\tl_new:N \l__tikzcalendarnotes_day_F_style_tl
+\tl_new:N \l__tikzcalendarnotes_day_G_style_tl
+
+
+%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%
+%%
+%%
+%%
+%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%
+
+
+
+%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%
+%%
+%%
+%%
+%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%
+
+\cs_generate_variant:Nn \dim_to_decimal:n {e}
+
+\keys_define:nn {tikzcalendarnotes }
+ {
+ year .usage:n = general ,
+ year .tl_set:N = \l__tikzcalendarnotes_year_key_tl ,
+ year .default:n = {\year} ,
+
+ starting~ at .usage:n = general ,
+ starting~ at .tl_set:N = \l__tikzcalendarnotes_starting_at_key_tl ,
+ starting~ at .default:n = {1} ,
+
+ number~ of~ months .usage:n = general ,
+ number~ of~ months .tl_set:N = \l__tikzcalendarnotes_nmonths_key_tl ,
+ number~ of~ months .default:n = {12} ,
+
+ per~ line .usage:n = general ,
+ per~ line .tl_set:N = \l__tikzcalendarnotes_perline_key_tl ,
+ per~ line .default:n = {3} ,
+
+ with~ notes .usage:n = general ,
+ with~ notes .code:n =
+ {
+ \tl_set:Nn \l__tikzcalendarnotes_dayspacing_Xshift_key_tl
+ {25} % was 14ex
+ \tl_set:Nn \l__tikzcalendarnotes_weekspacing_Yshift_key_tl
+ {36}
+ \bool_set_false:N \l__tikzcalendarnotes_compact_key_bool
+ %{\c_false_bool}
+ \tl_set:Nn \l__tikzcalendarnotes_inter_month_space_key_tl
+ {20} % was 14ex
+ } ,
+ with~ notes .value_forbidden:n = true ,
+
+ without~ notes .usage:n = general ,
+ without~ notes .code:n =
+ {
+ \tl_set:Nn \l__tikzcalendarnotes_dayspacing_Xshift_key_tl
+ {15}
+ \tl_set:Nn \l__tikzcalendarnotes_weekspacing_Yshift_key_tl
+ {17}
+ \bool_set_true:N \l__tikzcalendarnotes_compact_key_bool
+ %{\c_true_bool}
+ \tl_set:Nn \l__tikzcalendarnotes_inter_month_space_key_tl
+ {5} %was 7ex
+ } ,
+ without~ notes .value_forbidden:n = true ,
+
+ compact .usage:n = general ,
+ compact .meta:n = { without~ notes } ,
+ compact .value_forbidden:n = true ,
+
+ day~ spacing .usage:n = general ,
+ day~ spacing .tl_set:N = \l__tikzcalendarnotes_dayspacing_Xshift_key_tl ,
+ day~ spacing .value_required:n = true ,
+
+ week~ spacing .usage:n = general ,
+ week~ spacing .tl_set:N = \l__tikzcalendarnotes_weekspacing_Yshift_key_tl ,
+ week~ spacing .value_required:n = true ,
+
+ month~ spacing .usage:n = general ,
+ month~ spacing .tl_set:N = \l__tikzcalendarnotes_inter_month_space_key_tl ,
+ month~ spacing .value_required:n = true ,
+
+ data~ set .usage:n = general ,
+ data~ set .tl_set:N = \l__tikzcalendarnotes_dataset_key_tl ,
+ data~ set .default:n = {default} ,
+
+ name .usage:n = general ,
+ name .tl_set:N = \l__tikzcalendarnotes_cal_name_key_tl ,
+ name .default:n = {cal} ,
+
+ defaults .usage:n = general ,
+ defaults .meta:n =
+ {
+ year , starting~ at , number~ of~ months , per~ line , compact , data~ set ,
+ name ,
+ } ,
+ defaults .value_forbidden:n = true ,
+ }
+
+
+
+\keys_define:nn {tikzcalendarnotes / base set }
+ {
+ north~ east .usage:n = general ,
+ north~ east .code:n =
+ {
+ \__tikzcalendarnotes_keycode:nnn {keys~10}{north~east}
+ {
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {remark posref} {north~ east}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {remark anchor} {south~ west}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {TX shift} {-\l__tikzcalendarnotes_TXshift_scaled_tl}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {TY shift} {-\l__tikzcalendarnotes_TYshift_scaled_tl}
+ \prop_put:cne
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {date ref} {\l__tikzcalendarnotes_to_key_tl}
+ }
+ } ,
+ north~ east .value_forbidden:n = true ,
+
+ north~ west .usage:n = general ,
+ north~ west .code:n =
+ {
+ \__tikzcalendarnotes_keycode:nnn {keys~09}{north~west}
+ {
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {remark posref} {north~ west}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {remark anchor} {south~ east}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {TX shift} {\l__tikzcalendarnotes_TXshift_scaled_tl}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {TY shift} {-\l__tikzcalendarnotes_TYshift_scaled_tl}
+ \prop_put:cne
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {date ref} {\l__tikzcalendarnotes_from_key_tl}
+ }
+ } ,
+ north~ west .value_forbidden:n = true ,
+
+ south~ east .usage:n = general ,
+ south~ east .code:n =
+ {
+ \__tikzcalendarnotes_keycode:nnn {keys~08}{south~east}
+ {
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {remark posref} {south~ east}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {remark anchor} {north~ west}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {TX shift} {-\l__tikzcalendarnotes_TXshift_scaled_tl}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {TY shift} {\l__tikzcalendarnotes_TYshift_scaled_tl}
+ \prop_put:cne
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {date ref} {\l__tikzcalendarnotes_to_key_tl}
+ }
+ } ,
+ south~ east .value_forbidden:n = true ,
+
+ south~ west .usage:n = general ,
+ south~ west .code:n =
+ {
+ \__tikzcalendarnotes_keycode:nnn {keys~07}{south~west}
+ {
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {remark posref} {south~ west}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {remark anchor} {north~ east}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {TX shift} {\l__tikzcalendarnotes_TXshift_scaled_tl}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {TY shift} {\l__tikzcalendarnotes_TYshift_scaled_tl}
+ \prop_put:cne
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {date ref} {\l__tikzcalendarnotes_from_key_tl}
+ }
+ } ,
+ south~ west .value_forbidden:n = true ,
+
+ remark .usage:n = general ,
+ remark .code:n =
+ {
+ \__tikzcalendarnotes_keycode:nnnn {keys~06}{remark=#1}
+ {remark}{#1}
+ } ,
+ remark .value_required:n = true ,
+
+ notes .usage:n = general ,
+ notes .code:n =
+ {
+ \__tikzcalendarnotes_keycode:nnnn {keys~05}{notes=#1}
+ {notes}{#1}
+ } ,
+ notes .value_required:n = true ,
+
+ round .usage:n = general ,
+ round .code:n =
+ {
+ \__tikzcalendarnotes_keycode:nnnn {keys~04}{round}
+ {round}{round}
+ } ,
+ round .value_forbidden:n = true ,
+
+ square .usage:n = general ,
+ square .code:n =
+ {
+ \__tikzcalendarnotes_keycode:nnnn {keys~03}{square}
+ {square}{square}
+ } ,
+ square .value_forbidden:n = true ,
+
+ color .usage:n = general ,
+ color .code:n =
+ {
+ \__tikzcalendarnotes_keycode:nnnn {keys~02}{color=#1}
+ {day color}{#1}
+ } ,
+ color .value_required:n = true ,
+
+ remark~ style .usage:n = general ,
+ remark~ style .code:n =
+ {
+ \__tikzcalendarnotes_keycode:nnnn {keys~01}{remark~ style=#1}
+ {remark style}{#1}
+ } ,
+ remark~ style .value_required:n = true ,
+
+ note~ style .usage:n = general ,
+ note~ style .code:n =
+ {
+ \__tikzcalendarnotes_keycode:nnnn {keys~11}{note~ style=#1}
+ {note style}{#1}
+ } ,
+ note~ style .value_required:n = true ,
+
+ mark~ style .usage:n = general ,
+ mark~ style .code:n =
+ {
+ \__tikzcalendarnotes_keycode:nnnn {keys~00}{mark~ style=#1}
+ {draw style}{#1}
+ } ,
+ mark~ style .value_required:n = true ,
+
+ }
+
+\keys_define:nn {}
+ {
+ tikzcalendarnotes / date set .inherit:n =
+ { tikzcalendarnotes / base set }
+ }
+
+\keys_define:nn {tikzcalendarnotes / date set }
+ {
+ date .usage:n = general ,
+ date .code:n =
+ {
+ \bool_set_true:N \l__tikzcalendarnotes_date_set_flag_bool
+ %{\c_true_bool}
+ \__tikzcalendarnotes_try_insert_date:nn
+ {#1}
+ {}
+ } ,
+ date .value_required:n = true ,
+ }
+
+\keys_define:nn {tikzcalendarnotes / hl dates set }
+ {
+ dates .usage:n = general ,
+ dates .code:n =
+ {
+ \bool_set_true:N \l__tikzcalendarnotes_hldates_set_flag_bool
+ %{\c_true_bool}
+ \bool_set_true:N \l__tikzcalendarnotes_date_set_flag_bool
+ %{\c_true_bool} % for now. CHANGE IT
+
+ \clist_set:Nn \l_tmpa_clist
+ {#1}
+
+ \clist_map_inline:Nn \l_tmpa_clist
+ {
+ \__tikzcalendarnotes_try_insert_date:nV
+ {##1}
+ \l__tikzcalendarnotes_hl_color_key_tl
+ }
+ } ,
+ dates .value_required:n = true ,
+
+ color .usage:n = general ,
+ color .tl_set:N = \l__tikzcalendarnotes_hl_color_key_tl ,
+ color .value_required:n = true ,
+ }
+
+
+
+\keys_define:nn {}
+ {
+ tikzcalendarnotes / range set .inherit:n =
+ { tikzcalendarnotes / base set }
+ }
+
+\keys_define:nn {tikzcalendarnotes / range set }
+ {
+ from .usage:n = general ,
+ from .code:n =
+ {
+ \tl_set:Nn \l__tikzcalendarnotes_from_key_tl
+ {#1}
+ \bool_set_true:N \l__tikzcalendarnotes_from_set_flag_bool
+ %{\c_true_bool}
+ } ,
+ from .value_required:n = true ,
+
+ to .usage:n = general ,
+ to .code:n =
+ {
+ \tl_set:Nn \l__tikzcalendarnotes_to_key_tl
+ {#1}
+ \bool_set_true:N \l__tikzcalendarnotes_to_set_flag_bool
+ %{\c_true_bool}
+ } ,
+ to .value_required:n = true ,
+ }
+
+\keys_define:nn {tikzcalendarnotes / no cnt week set }
+ {
+ from .usage:n = general ,
+ from .code:n =
+ {
+ \tl_set:Nn \l__tikzcalendarnotes_from_key_tl
+ {#1}
+ \bool_set_true:N \l__tikzcalendarnotes_from_set_flag_bool
+ %{\c_true_bool}
+ } ,
+ from .value_required:n = true ,
+
+ to .usage:n = general ,
+ to .code:n =
+ {
+ \tl_set:Nn \l__tikzcalendarnotes_to_key_tl
+ {#1}
+ \bool_set_true:N \l__tikzcalendarnotes_to_set_flag_bool
+ %{\c_true_bool}
+ } ,
+ to .value_required:n = true ,
+ }
+
+\keys_define:nn {tikzcalendarnotes / cnt week set }
+ {
+ from .usage:n = general ,
+ from .code:n =
+ {
+ \tl_set:Nn \l__tikzcalendarnotes_from_key_tl
+ {#1}
+ \bool_set_true:N \l__tikzcalendarnotes_from_set_flag_bool
+ %{\c_true_bool}
+ } ,
+ from .value_required:n = true ,
+
+ to .usage:n = general ,
+ to .code:n =
+ {
+ \tl_set:Nn \l__tikzcalendarnotes_to_key_tl
+ {#1}
+ \bool_set_true:N \l__tikzcalendarnotes_to_set_flag_bool
+ %{\c_true_bool}
+ } ,
+ to .value_required:n = true ,
+
+ up .usage:n = general ,
+ up .code:n =
+ {
+ \__tikzcalendarnotes_keycode:nnn {keys~11}{up}
+ {
+ \__tikzcalendarnotes_try_insert_cntweek:ee
+ {\l__tikzcalendarnotes_from_key_tl}
+ {\l__tikzcalendarnotes_to_key_tl}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {cnt posref} {north~ west}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {cnt anchor} {south~ east}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {TX shift} {\l__tikzcalendarnotes_TXshift_scaled_tl}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {TY shift} {-\l__tikzcalendarnotes_TYshift_scaled_tl}
+ }
+ } ,
+ up .value_forbidden:n = true ,
+
+ down .usage:n = general ,
+ down .code:n =
+ {
+ \__tikzcalendarnotes_keycode:nnn {keys~12}{down}
+ {
+ \__tikzcalendarnotes_try_insert_cntweek:ee
+ {\l__tikzcalendarnotes_from_key_tl}
+ {\l__tikzcalendarnotes_to_key_tl}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {cnt posref} {south~ west}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {cnt anchor} {north~ east}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {TX shift} {\l__tikzcalendarnotes_TXshift_scaled_tl}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {TY shift} {\l__tikzcalendarnotes_TYshift_scaled_tl}
+ }
+ } ,
+ down .value_forbidden:n = true ,
+
+ center .usage:n = general ,
+ center .code:n =
+ {
+ \__tikzcalendarnotes_keycode:nnn {keys~13}{center}
+ {
+ \__tikzcalendarnotes_try_insert_cntweek:ee
+ {\l__tikzcalendarnotes_from_key_tl}
+ {\l__tikzcalendarnotes_to_key_tl}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {cnt posref} {west}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {cnt anchor} {east}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {TX shift} {\l__tikzcalendarnotes_TXshift_scaled_tl}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {TY shift} {0 pt}
+ }
+ } ,
+ center .value_forbidden:n = true ,
+
+ color .usage:n = general ,
+ color .code:n =
+ {
+ \__tikzcalendarnotes_keycode:nnn {keys~13}{color=#1}
+ {
+ \__tikzcalendarnotes_try_insert_cntweek:ee
+ {\l__tikzcalendarnotes_from_key_tl}
+ {\l__tikzcalendarnotes_to_key_tl}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {color} {color=#1}
+ }
+ } ,
+ color .value_required:n = true ,
+
+ starting~ at .usage:n = general ,
+ starting~ at .code:n =
+ {
+ \__tikzcalendarnotes_keycode:nnn {keys~14}{starting~ at=#1}
+ {
+ \__tikzcalendarnotes_try_insert_cntweek:ee
+ {\l__tikzcalendarnotes_from_key_tl}
+ {\l__tikzcalendarnotes_to_key_tl}
+ \int_gset:cn {g__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_from_key_tl : \l__tikzcalendarnotes_to_key_tl _cnt _int}
+ {#1 - 1}
+ }
+ } ,
+ starting~ at .value_required:n = true ,
+ }
+
+
+%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%
+%%
+%%
+%%
+%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%
+
+
+\cs_new_protected:Npn \__tikzcalendarnotes_keycode:nnnn #1#2#3#4
+ {
+ \bool_if:nTF
+ {\l__tikzcalendarnotes_date_set_flag_bool || \l__tikzcalendarnotes_from_set_flag_bool && \l__tikzcalendarnotes_to_set_flag_bool}
+ {
+ \bool_if:NT \l__tikzcalendarnotes_range_case_bool
+ {
+ \__tikzcalendarnotes_try_insert_range:ee {\l__tikzcalendarnotes_from_key_tl}{\l__tikzcalendarnotes_to_key_tl}
+ }
+ \prop_put:cnn {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {#3} {#4}
+ }
+ {
+ \msg_error:nVne {tikzcalendarnotes}{\l__tikzcalendarnotes_msg_submodule_tl}{#1}{#2}
+ }
+ }
+
+\cs_new_protected:Npn \__tikzcalendarnotes_keycode:nnn #1#2#3
+ {
+ \bool_if:nTF
+ {\l__tikzcalendarnotes_date_set_flag_bool || \l__tikzcalendarnotes_from_set_flag_bool && \l__tikzcalendarnotes_to_set_flag_bool}
+ {
+ \bool_if:NT \l__tikzcalendarnotes_range_case_bool
+ {
+ \__tikzcalendarnotes_try_insert_range:ee {\l__tikzcalendarnotes_from_key_tl}{\l__tikzcalendarnotes_to_key_tl}
+ }
+ #3
+ }
+ {
+ \msg_error:nVne {tikzcalendarnotes}{\l__tikzcalendarnotes_msg_submodule_tl}{#1}{#2}
+ }
+ }
+
+\cs_generate_variant:Nn \tl_set:Nn {Ne}
+\cs_generate_variant:Nn \tl_gset:Nn {Ne}
+
+
+\makeatletter
+\cs_new_protected:Npn \__tikzcalendarnotes_set_dim_constants:
+ {
+ \tl_set:Ne \l__tikzcalendarnotes_ref_fontsize_tl {\f at size}
+
+ \tl_set:Ne \l__tikzcalendarnotes_TXshift_scaled_tl
+ {
+ \fp_eval:n {0.6 * \l__tikzcalendarnotes_ref_fontsize_tl + 2pt} pt
+ }
+ \tl_set:Ne \l__tikzcalendarnotes_TYshift_scaled_tl
+ {
+ \fp_eval:n {0.35 * \l__tikzcalendarnotes_ref_fontsize_tl + 0.5pt} pt
+ }
+
+ \tl_set:Ne \l__tikzcalendarnotes_radius_scaled_tl
+ {
+ \fp_eval:n {(5.75pt * \l__tikzcalendarnotes_ref_fontsize_tl) / 10pt } pt
+ }
+ }
+\makeatother
+
+
+
+
+\cs_new_protected:Npn \__tikzcalendarnotes_reset_defaults:
+ {
+ \bool_set_false:N \l__tikzcalendarnotes_date_set_flag_bool
+ \bool_set_false:N \l__tikzcalendarnotes_hldates_set_flag_bool
+ \bool_set_false:N \l__tikzcalendarnotes_from_set_flag_bool
+ \bool_set_false:N \l__tikzcalendarnotes_to_set_flag_bool
+ \bool_set_false:N \l__tikzcalendarnotes_date_case_bool
+ \bool_set_false:N \l__tikzcalendarnotes_hldates_case_bool
+ \bool_set_false:N \l__tikzcalendarnotes_range_case_bool
+ \bool_set_false:N \l__tikzcalendarnotes_cntweek_case_bool
+ \bool_set_false:N \l__tikzcalendarnotes_nocntweek_case_bool
+
+ \tl_set:Nn \l__tikzcalendarnotes_hl_color_key_tl
+ {lightgray}
+ }
+
+
+
+%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%
+%%
+%%
+%%
+%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%
+
+\cs_new_protected:Npn \__tikzcalendarnotes_markdraw:nnn #1#2#3
+ {
+ \draw [#1]
+ (#3.center)
+ ++(-#2 , -#2)
+ rectangle
+ ++(2*#2 , 2*#2) ;
+ }
+
+\cs_generate_variant:Nn \__tikzcalendarnotes_markdraw:nnn {eee}
+
+\cs_new_protected:Npn \__tikzcalendarnotes_markdraw_range:nnnn #1#2#3#4
+ {
+ \draw [#1]
+ (#3.center)
+ ++(-#2 , #2) coordinate(A)
+ (#4.center)
+ ++( #2 , -#2)
+ rectangle (A) ;
+ }
+
+\cs_generate_variant:Nn \__tikzcalendarnotes_markdraw_range:nnnn {eeee}
+
+
+%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%
+%%
+%%
+%%
+%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%
+
+
+\cs_new_protected:Npn \__tikzcalendarnotes_new_dataset:n #1
+ {
+ \seq_if_exist:cTF {l__tikzcalendarnotes_ #1 _dataset_seq}
+ {
+ \msg_warning:nnne
+ {tikzcalendarnotes}{dataset already defined}
+ {new~01}{#1}
+ }
+ {
+ \seq_new:c {l__tikzcalendarnotes_ #1 _dataset_seq}
+ \seq_new:c {l__tikzcalendarnotes_ #1 _range_seq}
+ \seq_put_right:Nn \l__tikzcalendarnotes_dataset_seq {#1}
+ \seq_new:c {l__tikzcalendarnotes_ #1 _cnt week_seq}
+ \seq_new:c {l__tikzcalendarnotes_ #1 _no cntweek_seq}
+ \bool_new:c {l__tikzcalendarnotes_ #1 _cnt flag_bool} %for the 1st of every month
+ \tl_new:c {l__tikzcalendarnotes_ #1 _cnt hack_tl} %for the 1st of every month
+ }
+ }
+
+\cs_new_protected:Npn \__tikzcalendarnotes_select_dataset:n #1
+ {
+ \seq_if_exist:cTF {l__tikzcalendarnotes_ #1 _dataset_seq}
+ {
+ \tl_set:Nn \l__tikzcalendarnotes_active_dataset_tl {#1}
+ }
+ {
+ \msg_error:nnne
+ {tikzcalendarnotes}{invalid dataset}
+ {select~01}{#1}
+ }
+ }
+
+\__tikzcalendarnotes_new_dataset:n {default}
+\__tikzcalendarnotes_select_dataset:n {default}
+
+
+%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%
+%%
+%%
+%%
+%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%
+
+
+
+\cs_new_protected:Npn \__tikzcalendarnotes_try_insert_date:nn #1#2
+ {
+ \prop_if_exist:cF {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 _prop}
+ {
+ \prop_new:c {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 _prop}
+ \seq_put_right:cn
+ { l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _dataset_seq }
+ { #1 }
+%defaults
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 _prop}
+ {remark posref} {north~ east}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 _prop}
+ {remark anchor} {south~ west}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 _prop}
+ {TX shift} {-\l__tikzcalendarnotes_TXshift_scaled_tl}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 _prop}
+ {TY shift} {-\l__tikzcalendarnotes_TYshift_scaled_tl}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 _prop}
+ {date ref} {#1}
+ }
+ \tl_set:Nn \l__tikzcalendarnotes_date_tl {#1}
+
+ \tl_if_blank:nF {#2}
+ {
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ \l__tikzcalendarnotes_date_tl _prop}
+ {day color} {#2}
+ }
+
+ }
+
+\cs_generate_variant:Nn \__tikzcalendarnotes_try_insert_date:nn {nV}
+
+\cs_new_protected:Npn \__tikzcalendarnotes_try_insert_range:nn #1#2
+ {
+ \prop_if_exist:cF {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 : #2 _range _prop}
+ {
+ \prop_new:c {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 : #2 _range _prop}
+ \seq_put_right:cn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _range_seq}
+ {#1 : #2 _range}
+ \tl_set:Nn \l__tikzcalendarnotes_date_tl
+ {#1 : #2 _range}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 : #2 _range _prop}
+ {from} {#1}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 : #2 _range _prop}
+ {to} {#2}
+
+ %defaults
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 : #2 _range _prop}
+ {remark posref} {north~ east}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 : #2 _range _prop}
+ {remark anchor} {south~ west}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 : #2 _range _prop}
+ {TX shift} {-\l__tikzcalendarnotes_TXshift_scaled_tl}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 : #2 _range _prop}
+ {TY shift} {-\l__tikzcalendarnotes_TYshift_scaled_tl}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 : #2 _range _prop}
+ {date ref} {#2}
+ }
+
+ }
+
+\cs_generate_variant:Nn \__tikzcalendarnotes_try_insert_range:nn {ee}
+
+
+
+\cs_new_protected:Npn \__tikzcalendarnotes_try_insert_no_cntweek:nn #1#2
+ {
+ \prop_if_exist:cF {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 : #2 _ncnt _prop}
+ {
+ \prop_new:c {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 : #2 _ncnt _prop}
+ \seq_put_right:cn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _nocntweek_seq}
+ {#1 : #2 _ncnt }
+
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 : #2 _ncnt _prop}
+ {from} {#1}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 : #2 _ncnt _prop}
+ {to} {#2}
+ }
+ \tl_set:Nn \l__tikzcalendarnotes_date_tl
+ {#1 : #2 _ncnt }
+ }
+
+\cs_generate_variant:Nn \__tikzcalendarnotes_try_insert_no_cntweek:nn {ee}
+
+
+
+\cs_new_protected:Npn \__tikzcalendarnotes_try_insert_cntweek:nn #1#2
+ {
+ \prop_if_exist:cF {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 : #2 _cnt _prop}
+ {
+ \prop_new:c {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 : #2 _cnt _prop}
+ \seq_put_right:cn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _cntweek_seq}
+ {#1 : #2 _cnt}
+ % the counter is global because months are typed in consecutive scopes, and not in a single go...
+ \int_new:c {g__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 : #2 _cnt _int}
+
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 : #2 _cnt _prop}
+ {from} {#1}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 : #2 _cnt _prop}
+ {to} {#2}
+ % defaults: center
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 : #2 _cnt _prop}
+ {cnt posref} {west}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 : #2 _cnt _prop}
+ {cnt anchor} {east}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 : #2 _cnt _prop}
+ {TX shift} {\l__tikzcalendarnotes_TXshift_scaled_tl}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 : #2 _cnt _prop}
+ {TY shift} {0pt}
+ \prop_put:cnn
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ #1 : #2 _cnt _prop}
+ {color} {}
+ }
+ \tl_set:Nn \l__tikzcalendarnotes_date_tl
+ {#1 : #2 _cnt}
+ }
+
+\cs_generate_variant:Nn \__tikzcalendarnotes_try_insert_cntweek:nn {ee}
+
+
+
+%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%
+%%
+%%
+%%
+%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%
+
+
+\cs_new_protected:Npn \__tikzcalendarnotes_month_matrix:nnnn #1#2#3#4 %year ,first ,n months ,per line
+ {
+ \int_set:Nn \l__tikzcalendarnotes_year_int {#1}
+ \int_set:Nn \l__tikzcalendarnotes_month_int {#2}
+ \int_set:Nn \l__tikzcalendarnotes_cnta_int {0}
+ \int_set:Nn \l__tikzcalendarnotes_cntb_int {0}
+ \tl_set:Nn \l__tikzcalendarnotes_tmpa_tl {}
+
+
+ \int_while_do:nNnn {\l__tikzcalendarnotes_cnta_int} < {#3}
+ {
+ \tl_put_right:Ne \l__tikzcalendarnotes_tmpa_tl
+ {
+ \exp_not:N \calendar[
+ day~ xshift=\l__tikzcalendarnotes_dayspacing_Xshift_key_tl pt,
+ day~ yshift=\l__tikzcalendarnotes_weekspacing_Yshift_key_tl pt,
+ name=\l__tikzcalendarnotes_cal_name_key_tl ,
+ dates=\int_use:N\l__tikzcalendarnotes_year_int - \int_use:N\l__tikzcalendarnotes_month_int -01
+ ~ to ~
+ \int_use:N\l__tikzcalendarnotes_year_int - \int_use:N\l__tikzcalendarnotes_month_int -last
+ ] ;
+ }
+ \int_incr:N \l__tikzcalendarnotes_cnta_int
+ \int_compare:nNnTF {\l__tikzcalendarnotes_cnta_int} = {#3}
+ {
+ \tl_put_right:Nn \l__tikzcalendarnotes_tmpa_tl { \\ }
+ }
+ {
+ \int_incr:N \l__tikzcalendarnotes_cntb_int
+ \int_compare:nNnTF {\l__tikzcalendarnotes_cntb_int} < {#4}
+ {
+ \tl_put_right:Nn \l__tikzcalendarnotes_tmpa_tl { ~ \pgfmatrixnextcell ~ }
+ }
+ {
+ \tl_put_right:Nn \l__tikzcalendarnotes_tmpa_tl { \\ }
+ \int_set:Nn \l__tikzcalendarnotes_cntb_int {0}
+ }
+ \int_incr:N \l__tikzcalendarnotes_month_int
+ \int_compare:nNnTF {\l__tikzcalendarnotes_month_int} < {13}
+ {}
+ {
+ \int_set:Nn \l__tikzcalendarnotes_month_int {1}
+ \int_incr:N \l__tikzcalendarnotes_year_int
+ }
+ }
+ }
+
+ \l__tikzcalendarnotes_tmpa_tl
+ }
+
+
+\makeatletter
+\cs_new_eq:NN \__tikzcalendarnotes_tikz_xshift \tikz at lib@cal at xshift
+\makeatother
+
+
+\cs_new_protected:Npn \__tikzcalendarnotes_ifdate_case_counting_tl_set:Nnnnnnn #1#2#3#4#5#6#7
+ {
+ \bool_if:NF \l__tikzcalendarnotes_keep_counters_pgfkey_bool
+ { \int_gzero:c {#3} }
+
+ \tl_put_right:Nn #1
+ {
+ \ifdate{#2}
+ {
+ \int_gincr:c {#3}
+ \draw (\pgfcalendarsuggestedname.#4)
+ ++(#6)
+ node[#5](){ \int_use:c {#3} } ;
+ \tl_gput_right:cn {#7}
+ {
+ \draw (\pgfcalendarsuggestedname.#4 |- \l__tikzcalendarnotes_cal_name_key_tl - \pgfcalendarifdateyear - \pgfcalendarifdatemonth - 01.#4)
+ ++(#6)
+ node[#5](){ \int_use:c{#3} } ;
+ }
+ }
+ {}
+ }
+ }
+
+\cs_generate_variant:Nn \__tikzcalendarnotes_ifdate_case_counting_tl_set:Nnnnnnn {Neeeeee}
+
+
+
+
+
+\cs_new_protected:Npn \__tikzcalendarnotes_pgfcalifdate_case_counting_tl_set:Nnnnnnn #1#2#3#4#5#6#7
+ {
+
+ \tl_put_right:Nn #1
+ {
+ \pgfcalendarifdate{##1}{#2}
+ {
+ \int_compare:nNnT {\int_use:c{#3}} = {0}
+ { \int_gincr:c {#3} }
+ \tl_gput_right:cn {#7}
+ {
+ \draw (\pgfcalendarsuggestedname.#4 |- \l__tikzcalendarnotes_cal_name_key_tl - \pgfcalendarifdateyear - \pgfcalendarifdatemonth - 01.#4)
+ ++(#6)
+ node[#5](){ \int_use:c{#3} } ;
+ }
+ }
+ {}
+ }
+ }
+
+\cs_generate_variant:Nn \__tikzcalendarnotes_pgfcalifdate_case_counting_tl_set:Nnnnnnn {Neeeeee}
+
+
+\cs_generate_variant:Nn \use:n {V}
+
+\cs_new_protected:Npn \__tikzcalendarnotes_ifdate_case_no_tl_set:Nnn #1#2#3
+ {
+ \tl_set:Nn #1
+ {
+ \ifdate{#3}
+ {}
+ { #2 }
+ }
+ }
+
+\cs_generate_variant:Nn \__tikzcalendarnotes_ifdate_case_no_tl_set:Nnn {NVe}
+
+
+
+
+\cs_new_protected:Npn \__tikzcalendarnotes_pgfcalifdate_case_no_tl_set:Nnn #1#2#3
+ {
+ \tl_set:Nn #1
+ {
+ \pgfcalendarifdate{##1}{#3}
+ {}
+ { #2 }
+ }
+ }
+
+\cs_generate_variant:Nn \__tikzcalendarnotes_pgfcalifdate_case_no_tl_set:Nnn {NVe}
+
+
+\cs_new_protected:Npn \__tikzcalendarnotes_shift_adjust_tl_set:Nn #1#2
+ {
+ \fp_compare:nNnTF {#1} < {0}
+ {
+ \tl_set:Ne #1
+ {
+ \fp_eval:n {#1 + (#2)} pt
+ }
+ }
+ {
+ \tl_set:Ne #1
+ {
+ \fp_eval:n {#1 - (#2)} pt
+ }
+ }
+ }
+
+\cs_generate_variant:Nn \__tikzcalendarnotes_shift_adjust_tl_set:Nn {NV , Ne}
+
+\cs_new_protected:Npn \__tikzcalendarnotes_append_pgfcalifdate_test:n #1
+ {
+ \pgfkeys
+ {
+ tikz ,
+ @calnotes at cnt@if@/.append~ code = {#1} ,
+ }
+ }
+\cs_generate_variant:Nn \__tikzcalendarnotes_append_pgfcalifdate_test:n {V}
+
+
+\cs_new_protected:Npn \__tikzcalendarnotes_set_ifdate_before_day:nn #1#2
+ {
+ \pgfkeys
+ {
+ tikz,
+ @calnotes at cnt@if@/.code = {} ,
+ execute~ before~ day~ scope =
+ {
+ \ifdate{equals = #1}
+ {
+ \int_set:Nn \l_tmpa_int {\pgfcalendarcurrentweekday + #2}
+ \pgfkeys{tikz, at calnotes@cnt at if@ = {#1+ -\int_use:N \l_tmpa_int}}
+ }
+ {}
+ }
+ }
+ }
+\cs_generate_variant:Nn \__tikzcalendarnotes_set_ifdate_before_day:nn {ee}
+
+
+
+
+% #1 \l__tikzcalendarnotes_cnt_ifdate_temp_tl
+% #2 l__tikzcalendarnotes_ ##1 _cnt flag_bool
+% #3 l__tikzcalendarnotes_ ##1 _cnt hack_tl
+
+\cs_new_protected:Npn \__tikzcalendarnotes_append_tikz_ifdate_after_day:nnn #1#2#3
+ {
+ \pgfkeys
+ {tikz ,
+ execute~ after~ day~ scope=
+ {
+ \ifdate{\l__tikzcalendarnotes_weeklist_starts_on_tl}
+ {
+ \bool_if:cT {#2}
+ {
+ \tl_use:c {#3}
+ \bool_set_false:c {#2}
+ }
+ \tl_gclear:c {#3}
+ #1
+ }
+ {
+ \ifdate{day~ of~ month = 1}
+ {
+ \bool_set_true:c {#2}
+ }
+ {}
+ }
+ }
+ }
+ }
+
+\cs_generate_variant:Nn \__tikzcalendarnotes_append_tikz_ifdate_after_day:nnn {Vnn}
+
+
+
+
+\cs_new_protected:Npn \__tikzcalendarnotes_append_every_calendar_if:nn #1#2
+ {
+ \pgfkeys
+ {
+ tikz ,
+ every~ calendar/.append~ style=
+ {
+ if = { (#1) [#2] }
+ }
+ }
+
+ }
+\cs_generate_variant:Nn \__tikzcalendarnotes_append_every_calendar_if:nn {ee}
+
+
+
+
+\cs_new_protected:Npn \__tikzcalendarnotes_set_ifdates:n #1
+ {
+ \__tikzcalendarnotes_set_ifdate_before_day:ee
+ {\l__tikzcalendarnotes_begin_iso_tl}
+ {\int_use:N \l__tikzcalendarnotes_weeklist_delta_int}
+
+
+ \clist_set:Nn \l_tmpa_clist {#1}
+ \clist_map_inline:Nn \l_tmpa_clist
+ {
+ \tl_clear:N \l__tikzcalendarnotes_cnt_ifdate_temp_tl
+ \tl_clear:N \l__tikzcalendarnotes_cnt_pgfcalifdate_temp_tl
+ \__tikzcalendarnotes_select_dataset:n {##1}
+ \tl_clear:c {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _cnt hack_tl}
+ \seq_map_inline:cn { l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _dataset_seq}
+ {
+ \prop_get:cnNT
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {day color} \l__tikzcalendarnotes_daycolor_tmp_tl
+ {
+ \__tikzcalendarnotes_append_every_calendar_if:ee
+ {equals=####1}
+ {color=\l__tikzcalendarnotes_daycolor_tmp_tl}
+ }
+ }
+
+ \seq_map_inline:cn { l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _range_seq}
+ {
+ \prop_get:cnNT
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {day color} \l__tikzcalendarnotes_daycolor_tmp_tl
+ {
+ \prop_get:cnN
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {from} \l__tikzcalendarnotes_from_tmp_tl
+ \prop_get:cnN
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {to} \l__tikzcalendarnotes_to_tmp_tl
+
+ \__tikzcalendarnotes_append_every_calendar_if:ee
+ {between=\l__tikzcalendarnotes_from_tmp_tl and \l__tikzcalendarnotes_to_tmp_tl}
+ {color=\l__tikzcalendarnotes_daycolor_tmp_tl}
+ }
+ }
+
+ \seq_map_inline:cn { l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ cnt week_seq}
+ {
+ \prop_get:cnN
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {from} \l__tikzcalendarnotes_from_tmp_tl
+ \prop_get:cnN
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {to} \l__tikzcalendarnotes_to_tmp_tl
+ \prop_get:cnN
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {cnt posref} \l__tikzcalendarnotes_cntposref_tmp_tl
+ \prop_get:cnN
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {cnt anchor} \l__tikzcalendarnotes_cntanchor_tmp_tl
+ \prop_get:cnN
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {color} \l__tikzcalendarnotes_color_tmp_tl
+ \prop_get:cnN
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {TX shift} \l__tikzcalendarnotes_TXshift_tmp_tl
+
+ \__tikzcalendarnotes_shift_adjust_tl_set:NV
+ \l__tikzcalendarnotes_TXshift_tmp_tl
+ \l__tikzcalendarnotes_remark_Xshift_adj_pgfkey_tl
+
+ \prop_get:cnN
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {TY shift} \l__tikzcalendarnotes_TYshift_tmp_tl
+
+ \fp_compare:nNnF {\l__tikzcalendarnotes_TYshift_tmp_tl} = {0}
+ {
+ \__tikzcalendarnotes_shift_adjust_tl_set:NV
+ \l__tikzcalendarnotes_TYshift_tmp_tl
+ \l__tikzcalendarnotes_remark_Yshift_adj_pgfkey_tl
+ }
+
+ \__tikzcalendarnotes_ifdate_case_counting_tl_set:Neeeeee
+ \l__tikzcalendarnotes_cnt_ifdate_temp_tl
+ {between = \l__tikzcalendarnotes_from_tmp_tl+-6 and \l__tikzcalendarnotes_to_tmp_tl}
+ {g__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _int}
+ {\l__tikzcalendarnotes_cntposref_tmp_tl}
+ {anchor=\l__tikzcalendarnotes_cntanchor_tmp_tl , every~ counter , \l__tikzcalendarnotes_color_tmp_tl}
+ {0.7*\l__tikzcalendarnotes_TXshift_tmp_tl , 1.5*\l__tikzcalendarnotes_TYshift_tmp_tl}
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _cnt hack_tl}
+
+ \__tikzcalendarnotes_pgfcalifdate_case_counting_tl_set:Neeeeee
+ \l__tikzcalendarnotes_cnt_pgfcalifdate_temp_tl
+ {between = \l__tikzcalendarnotes_from_tmp_tl+-6 and \l__tikzcalendarnotes_to_tmp_tl}
+ {g__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _int}
+ {\l__tikzcalendarnotes_cntposref_tmp_tl}
+ {anchor=\l__tikzcalendarnotes_cntanchor_tmp_tl , every~ counter , \l__tikzcalendarnotes_color_tmp_tl}
+ {0.7*\l__tikzcalendarnotes_TXshift_tmp_tl , 1.5*\l__tikzcalendarnotes_TYshift_tmp_tl}
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _cnt hack_tl}
+
+ } % end of cntweek for this <dataset>
+
+ \seq_map_inline:cn { l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ no cnt week_seq}
+ {
+ \prop_get:cnN
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {from} \l__tikzcalendarnotes_from_tmp_tl
+ \prop_get:cnN
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {to} \l__tikzcalendarnotes_to_tmp_tl
+
+ \__tikzcalendarnotes_ifdate_case_no_tl_set:NVe
+ \l__tikzcalendarnotes_cnt_ifdate_temp_tl
+ \l__tikzcalendarnotes_cnt_ifdate_temp_tl
+ {between = \l__tikzcalendarnotes_from_tmp_tl+-6 and \l__tikzcalendarnotes_to_tmp_tl}
+
+ \__tikzcalendarnotes_pgfcalifdate_case_no_tl_set:NVe
+ \l__tikzcalendarnotes_cnt_pgfcalifdate_temp_tl
+ \l__tikzcalendarnotes_cnt_pgfcalifdate_temp_tl
+ {between = \l__tikzcalendarnotes_from_tmp_tl+-6 and \l__tikzcalendarnotes_to_tmp_tl}
+
+ } % end of no cntweek for this dataset
+
+ \tl_if_empty:NF \l__tikzcalendarnotes_cnt_ifdate_temp_tl
+ {
+ \__tikzcalendarnotes_append_tikz_ifdate_after_day:Vnn
+ \l__tikzcalendarnotes_cnt_ifdate_temp_tl
+ {l__tikzcalendarnotes_ ##1 _cnt flag_bool}
+ {l__tikzcalendarnotes_ ##1 _cnt hack_tl}
+
+ \__tikzcalendarnotes_append_pgfcalifdate_test:V
+ \l__tikzcalendarnotes_cnt_pgfcalifdate_temp_tl
+ }
+
+ } % end of clist <datasets>
+
+
+ }
+
+\cs_generate_variant:Nn \__tikzcalendarnotes_set_ifdates:n {e}
+
+
+%% from https://tex.stackexchange.com/questions/37709/how-can-i-know-if-a-node-is-already-defined/37713#37713
+%% yickes
+%% non portable, error prone if the underlining pgf scheme changes... :/
+%%
+\makeatletter
+\cs_new_protected:Npn \__tikzcalendarnotes_setflag_ifdatenode_exist:Nn #1#2
+ {
+ \cs_if_exist:cTF {pgf at sh@ns@ \l__tikzcalendarnotes_cal_name_key_tl - #2}
+ {
+ \tl_if_eq:cNTF {pgf at sh@pi@ \l__tikzcalendarnotes_cal_name_key_tl - #2} \pgfpictureid
+ { \bool_set_true:N #1 }
+ { \bool_set_false:N #1 }
+ }
+ { \bool_set_false:N #1 }
+ }
+\makeatother
+
+\cs_generate_variant:Nn \__tikzcalendarnotes_setflag_ifdatenode_exist:Nn {NV}
+
+
+\cs_new_protected:Npn \__tizecalendarnotes_notes_typeset:nn #1#2
+ {
+ \vcoffin_set:Nnn \l_tmpa_coffin
+ {\fp_eval:n{#1 - 0.75em}pt} {#2}
+ \coffin_typeset:Nnnnn \l_tmpa_coffin
+ {l}{t}
+ {0pt}{0pt}
+ }
+
+\cs_new_protected:Npn \__tikzcalendarnotes_draw_notes:n #1
+ {
+ \tl_set:Ne \l__tikzcalendarnotes_radius_tmp_tl
+ {
+ \fp_eval:n {\l__tikzcalendarnotes_radius_scaled_tl + \l__tikzcalendarnotes_radius_adj_pgfkey_tl} pt
+ }
+
+ \clist_set:Nn \l_tmpa_clist {#1}
+ \clist_map_inline:Nn \l_tmpa_clist
+ {
+ \__tikzcalendarnotes_select_dataset:n {##1}
+ \seq_map_inline:cn { l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _dataset_seq}
+ {
+ \__tikzcalendarnotes_setflag_ifdatenode_exist:Nn \l_tmpa_bool {####1}
+ \bool_if:NT \l_tmpa_bool
+ {
+ \prop_get:cnNF
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {draw style} \l__tikzcalendarnotes_drawstyle_tmp_tl
+ {
+ \tl_set:Nn \l__tikzcalendarnotes_drawstyle_tmp_tl {}
+ }
+
+ \prop_get:cnNT
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {round} \l_tmpa_tl
+ {
+ \__tikzcalendarnotes_markdraw:eee
+ {
+ every~ mark ,
+ rounded~ corners=\l__tikzcalendarnotes_radius_tmp_tl ,
+ \l__tikzcalendarnotes_drawstyle_tmp_tl
+ }
+ {\l__tikzcalendarnotes_radius_tmp_tl}
+ {\l__tikzcalendarnotes_cal_name_key_tl - ####1}
+ }
+
+ \prop_get:cnNT
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {square} \l_tmpa_tl
+ {
+ \__tikzcalendarnotes_markdraw:eee
+ {
+ every~ mark ,
+ \l__tikzcalendarnotes_drawstyle_tmp_tl
+ }
+ {\l__tikzcalendarnotes_radius_tmp_tl}
+ {\l__tikzcalendarnotes_cal_name_key_tl - ####1}
+ }
+
+ \prop_get:cnNT
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {remark} \l__tikzcalendarnotes_dateremark_tmp_tl
+ {
+ \prop_get:cnNF
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {remark style} \l__tikzcalendarnotes_remarkstyle_tmp_tl
+ {
+ \tl_set:Nn \l__tikzcalendarnotes_remarkstyle_tmp_tl {}
+ }
+ \prop_get:cnN %TF \prop_get:cnNTF
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {remark posref} \l__tikzcalendarnotes_remarkposref_tmp_tl
+ \prop_get:cnN
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {remark anchor} \l__tikzcalendarnotes_remarkanchor_tmp_tl
+ \prop_get:cnN
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {TX shift} \l__tikzcalendarnotes_TXshift_tmp_tl
+ \__tikzcalendarnotes_shift_adjust_tl_set:NV
+ \l__tikzcalendarnotes_TXshift_tmp_tl
+ \l__tikzcalendarnotes_remark_Xshift_adj_pgfkey_tl
+
+ \prop_get:cnN
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {TY shift} \l__tikzcalendarnotes_TYshift_tmp_tl
+ \__tikzcalendarnotes_shift_adjust_tl_set:NV
+ \l__tikzcalendarnotes_TYshift_tmp_tl
+ \l__tikzcalendarnotes_remark_Yshift_adj_pgfkey_tl
+
+ \use:e
+ {
+ \exp_not:N\draw
+ (\l__tikzcalendarnotes_cal_name_key_tl - ####1 . \l__tikzcalendarnotes_remarkposref_tmp_tl)
+ ++(\l__tikzcalendarnotes_TXshift_tmp_tl , \l__tikzcalendarnotes_TYshift_tmp_tl)
+ node
+ [anchor=\l__tikzcalendarnotes_remarkanchor_tmp_tl , every~ remark , \l__tikzcalendarnotes_remarkstyle_tmp_tl]
+ (\l__tikzcalendarnotes_cal_name_key_tl - ####1 - remark)
+ { \l__tikzcalendarnotes_dateremark_tmp_tl } ;
+ }
+ }
+
+ \bool_if:NF \l__tikzcalendarnotes_compact_key_bool
+ {
+ \prop_get:cnNT
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {notes} \l__tikzcalendarnotes_notes_tmp_tl
+ {
+ \prop_get:cnNF
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {note style} \l__tikzcalendarnotes_notestyle_tmp_tl
+ {
+ \tl_set:Nn \l__tikzcalendarnotes_notestyle_tmp_tl {}
+ }
+
+ \tl_set:Nn \l__tikzcalendarnotes_TYshift_tmp_tl
+ {\l__tikzcalendarnotes_TYshift_scaled_tl}
+
+ \__tikzcalendarnotes_shift_adjust_tl_set:NV
+ \l__tikzcalendarnotes_TYshift_tmp_tl
+ \l__tikzcalendarnotes_remark_Yshift_adj_pgfkey_tl
+
+ \use:e
+ {
+ \exp_not:N\draw
+ (\l__tikzcalendarnotes_cal_name_key_tl - ####1 . south~ west)
+ ++(0pt,\l__tikzcalendarnotes_TYshift_tmp_tl)
+ node
+ [anchor=north~ west , every~ note , \l__tikzcalendarnotes_notestyle_tmp_tl]
+ (\l__tikzcalendarnotes_cal_name_key_tl - ####1 - note)
+ {
+ \exp_not:N\__tizecalendarnotes_notes_typeset:nn
+ {
+ \l__tikzcalendarnotes_dayspacing_Xshift_key_tl
+ }
+ {\exp_not:N\noindent \l__tikzcalendarnotes_notes_tmp_tl }
+
+ } ;
+ }
+ }
+ }
+ }
+ }
+
+
+
+ \seq_map_inline:cn { l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _range_seq}
+ {
+ \prop_get:cnN
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {from} \l__tikzcalendarnotes_from_tmp_tl
+
+ \prop_get:cnN
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {to} \l__tikzcalendarnotes_to_tmp_tl
+
+ \prop_get:cnNF
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {draw style} \l__tikzcalendarnotes_drawstyle_tmp_tl
+ {
+ \tl_set:Nn \l__tikzcalendarnotes_drawstyle_tmp_tl {}
+ }
+
+ \__tikzcalendarnotes_setflag_ifdatenode_exist:NV
+ \l_tmpa_bool
+ {\l__tikzcalendarnotes_from_tmp_tl}
+
+ \__tikzcalendarnotes_setflag_ifdatenode_exist:NV
+ \l_tmpb_bool
+ {\l__tikzcalendarnotes_to_tmp_tl}
+
+ \bool_lazy_and:nnT {\l_tmpa_bool} {\l_tmpb_bool}
+ {
+ \prop_get:cnNT
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {round} \l_tmpa_tl
+ {
+ \__tikzcalendarnotes_markdraw_range:eeee
+ {
+ every~ mark ,
+ rounded~ corners=\l__tikzcalendarnotes_radius_tmp_tl ,
+ \l__tikzcalendarnotes_drawstyle_tmp_tl
+ }
+ {\l__tikzcalendarnotes_radius_tmp_tl}
+ {\l__tikzcalendarnotes_cal_name_key_tl - \l__tikzcalendarnotes_from_tmp_tl}
+ {\l__tikzcalendarnotes_cal_name_key_tl - \l__tikzcalendarnotes_to_tmp_tl}
+ }
+
+ \prop_get:cnNT
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {square} \l_tmpa_tl
+ {
+ \__tikzcalendarnotes_markdraw_range:eeee
+ {
+ every~ mark ,
+ \l__tikzcalendarnotes_drawstyle_tmp_tl
+ }
+ {\l__tikzcalendarnotes_radius_tmp_tl}
+ {\l__tikzcalendarnotes_cal_name_key_tl - \l__tikzcalendarnotes_from_tmp_tl}
+ {\l__tikzcalendarnotes_cal_name_key_tl - \l__tikzcalendarnotes_to_tmp_tl}
+ }
+ }
+%%%
+
+ \prop_get:cnN
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {date ref} \l__tikzcalendarnotes_dateref_tmp_tl
+
+ \__tikzcalendarnotes_setflag_ifdatenode_exist:NV
+ \l_tmpa_bool
+ { \l__tikzcalendarnotes_dateref_tmp_tl }
+
+ \bool_if:NT \l_tmpa_bool
+ {
+ \prop_get:cnNT
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {remark} \l__tikzcalendarnotes_dateremark_tmp_tl
+ {
+ \prop_get:cnNF
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {remark style} \l__tikzcalendarnotes_remarkstyle_tmp_tl
+ {
+ \tl_set:Nn \l__tikzcalendarnotes_remarkstyle_tmp_tl
+ {}
+ }
+
+ \prop_get:cnN
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {remark posref} \l__tikzcalendarnotes_remarkposref_tmp_tl
+
+ \prop_get:cnN
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {remark anchor} \l__tikzcalendarnotes_remarkanchor_tmp_tl
+
+ \prop_get:cnN
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {TX shift} \l__tikzcalendarnotes_TXshift_tmp_tl
+
+ \__tikzcalendarnotes_shift_adjust_tl_set:NV
+ \l__tikzcalendarnotes_TXshift_tmp_tl
+ \l__tikzcalendarnotes_remark_Xshift_adj_pgfkey_tl
+
+ \prop_get:cnN
+ {l__tikzcalendarnotes_ \l__tikzcalendarnotes_active_dataset_tl _ ####1 _prop}
+ {TY shift} \l__tikzcalendarnotes_TYshift_tmp_tl
+
+ \__tikzcalendarnotes_shift_adjust_tl_set:NV
+ \l__tikzcalendarnotes_TYshift_tmp_tl
+ \l__tikzcalendarnotes_remark_Yshift_adj_pgfkey_tl
+
+ \use:e
+ {
+ \exp_not:N\draw
+ (\l__tikzcalendarnotes_cal_name_key_tl - \l__tikzcalendarnotes_dateref_tmp_tl . \l__tikzcalendarnotes_remarkposref_tmp_tl)
+ ++(\l__tikzcalendarnotes_TXshift_tmp_tl ,\l__tikzcalendarnotes_TYshift_tmp_tl)
+ node
+ [anchor=\l__tikzcalendarnotes_remarkanchor_tmp_tl , every~ remark , \l__tikzcalendarnotes_remarkstyle_tmp_tl]
+ (\l__tikzcalendarnotes_cal_name_key_tl - \l__tikzcalendarnotes_dateref_tmp_tl - remark)
+ { \l__tikzcalendarnotes_dateremark_tmp_tl } ;
+ }
+ }
+ }
+%%%
+ }
+ }
+ }
+
+\cs_generate_variant:Nn \__tikzcalendarnotes_draw_notes:n {e}
+
+
+%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%
+%%
+%% End user's commands
+%%
+%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%
+
+
+\NewDocumentCommand{\defnewdataset}{m}
+ {
+ \__tikzcalendarnotes_new_dataset:n {#1}
+ }
+
+
+\NewDocumentCommand{\setdates}{O{default}m}
+ {
+ \__tikzcalendarnotes_reset_defaults:
+
+ \bool_set_true:N \l__tikzcalendarnotes_date_case_bool
+ \tl_set:Nn \l__tikzcalendarnotes_msg_submodule_tl
+ {date not set}
+
+ \__tikzcalendarnotes_select_dataset:n {#1}
+ \keys_set:nn
+ {tikzcalendarnotes / date set}
+ {#2}
+ }
+
+\NewDocumentCommand{\sethighlightdates}{O{default}m}
+ {
+ \__tikzcalendarnotes_reset_defaults:
+
+ \bool_set_true:N \l__tikzcalendarnotes_hldates_case_bool
+ %{\c_true_bool}
+
+ \__tikzcalendarnotes_select_dataset:n {#1}
+ \keys_set:nn
+ {tikzcalendarnotes / hl dates set}
+ {#2}
+ }
+
+
+\NewDocumentCommand{\setranges}{O{default}m}
+ {
+ \__tikzcalendarnotes_reset_defaults:
+
+ \bool_set_true:N \l__tikzcalendarnotes_range_case_bool
+ \tl_set:Nn \l__tikzcalendarnotes_msg_submodule_tl
+ {range not set}
+
+ \__tikzcalendarnotes_select_dataset:n {#1}
+ \keys_set:nn
+ {tikzcalendarnotes / range set}
+ {#2}
+ }
+
+
+
+\NewDocumentCommand{\setcountingweeks}{O{default}m}
+ {
+ \__tikzcalendarnotes_reset_defaults:
+
+ \bool_set_true:N \l__tikzcalendarnotes_cntweek_case_bool
+ \tl_set:Nn \l__tikzcalendarnotes_msg_submodule_tl
+ {range not set}
+
+ \__tikzcalendarnotes_select_dataset:n {#1}
+ \keys_set:nn
+ {tikzcalendarnotes / cnt week set}
+ {#2}
+
+ \bool_if:nT
+ {\l__tikzcalendarnotes_from_set_flag_bool && \l__tikzcalendarnotes_to_set_flag_bool}
+ {
+ \__tikzcalendarnotes_try_insert_cntweek:ee {\l__tikzcalendarnotes_from_key_tl}{\l__tikzcalendarnotes_to_key_tl}
+ }
+ }
+
+\NewDocumentCommand{\suppresscounting}{O{default}m}
+ {
+ \__tikzcalendarnotes_reset_defaults:
+ \bool_set_true:N \l__tikzcalendarnotes_nocntweek_case_bool
+ %{\c_true_bool}
+ \tl_set:Nn \l__tikzcalendarnotes_msg_submodule_tl
+ {range not set}
+
+ \__tikzcalendarnotes_select_dataset:n {#1}
+ \keys_set:nn
+ {tikzcalendarnotes / no cnt week set}
+ {#2}
+
+ \bool_if:nT
+ {\l__tikzcalendarnotes_from_set_flag_bool && \l__tikzcalendarnotes_to_set_flag_bool}
+ {
+ \__tikzcalendarnotes_try_insert_no_cntweek:ee {\l__tikzcalendarnotes_from_key_tl}{\l__tikzcalendarnotes_to_key_tl}
+ }
+ }
+
+
+\cs_new_protected:Npn \__tikzcalendarnotes_prepare_style:nn #1#2
+ {
+
+ \pgfkeys{tikz , #1}
+
+ \__tikzcalendarnotes_set_dim_constants:
+
+ \keys_set:nn
+ {tikzcalendarnotes}
+ {defaults , #2}
+
+ \tl_set:Ne \l__tikzcalendarnotes_begin_iso_tl
+ {
+ \l__tikzcalendarnotes_year_key_tl -
+ \l__tikzcalendarnotes_starting_at_key_tl - 01
+ }
+
+ }
+
+
+\NewDocumentCommand{\calendarnotesprepare}{O{}m}
+ {
+ \__tikzcalendarnotes_prepare_style:nn
+ {#1}{#2}
+ }
+
+\NewDocumentCommand{\calendarnotessetifs}{}
+ {
+ \__tikzcalendarnotes_set_ifdates:e
+ {\l__tikzcalendarnotes_dataset_key_tl}
+ }
+
+\NewDocumentCommand{\calendarnotesdraw}{}
+ {
+ \__tikzcalendarnotes_draw_notes:e
+ {\l__tikzcalendarnotes_dataset_key_tl}
+ }
+
+\NewDocumentCommand{\calendarnotesmatrix}{}
+ {
+ \matrix[column~ sep=\l__tikzcalendarnotes_inter_month_space_key_tl pt,
+ row~ sep=0.7*\l__tikzcalendarnotes_inter_month_space_key_tl pt]
+ {
+ \__tikzcalendarnotes_month_matrix:nnnn
+ {\l__tikzcalendarnotes_year_key_tl}
+ {\l__tikzcalendarnotes_starting_at_key_tl}
+ {\l__tikzcalendarnotes_nmonths_key_tl}
+ {\l__tikzcalendarnotes_perline_key_tl}
+ } ;
+ }
+
+\NewDocumentCommand{\calendarnotes}{O{}m}
+ {
+ \__tikzcalendarnotes_prepare_style:nn {#1}{#2}
+
+ \__tikzcalendarnotes_set_ifdates:e
+ {\l__tikzcalendarnotes_dataset_key_tl}
+
+ \matrix[column~ sep=\l__tikzcalendarnotes_inter_month_space_key_tl pt,
+ row~ sep=0.7*\l__tikzcalendarnotes_inter_month_space_key_tl pt]
+ {
+ \__tikzcalendarnotes_month_matrix:nnnn
+ {\l__tikzcalendarnotes_year_key_tl}
+ {\l__tikzcalendarnotes_starting_at_key_tl}
+ {\l__tikzcalendarnotes_nmonths_key_tl}
+ {\l__tikzcalendarnotes_perline_key_tl}
+ } ;
+
+ \__tikzcalendarnotes_draw_notes:e
+ {\l__tikzcalendarnotes_dataset_key_tl}
+
+ }
+
+
+%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%
+%%
+%%
+%%
+%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%
+
+
+
+\cs_new_protected:Npn \__tikzcalendarnotes_test_jan_first:
+ {
+ \int_compare:nNnT {\pgfcalendarifdateday} = {1}
+ {
+ \int_compare:nNnT {\pgfcalendarifdatemonth} = {1}
+ { \pgfcalendarmatchestrue }
+ }
+ }
+
+
+\cs_new_protected:Npn \__tikzcalendarnotes_test_year_start:
+ {
+ \bool_if:NTF \g__tikzcalendarnotes_firstdraw_bool
+ {
+ \bool_gset_false:N \g__tikzcalendarnotes_firstdraw_bool
+ \pgfcalendarmatchestrue
+ }
+ { \__tikzcalendarnotes_test_jan_first: }
+ }
+
+
+\cs_new_protected:Npn \__tikzcalendarnotes_test_week_start_or_first:n #1
+ {
+ \bool_lazy_or:nnTF
+ {
+ \int_compare_p:nNn {\pgfcalendarifdateweekday} = {#1}
+ }
+ {
+ \int_compare_p:nNn {\pgfcalendarifdateday} = {1}
+ }
+ { \pgfcalendarmatchestrue }
+ {}
+ }
+
+
+\cs_generate_variant:Nn \str_range:nnn {enn}
+
+\cs_new_protected:Npn \__tikzcalendarnotes_set_day_acro:NNn #1#2#3
+ {
+ \int_set:Nn \l_tmpa_int {#3}
+ \int_sub:Nn \l_tmpa_int {\l__tikzcalendarnotes_weeklist_delta_int}
+ \int_compare:nNnT {\l_tmpa_int} < {0}
+ {
+ \int_add:Nn \l_tmpa_int {7}
+ }
+ \tl_set:Ne #1 {\str_range:enn {\pgfcalendarweekdayname{\int_use:N \l_tmpa_int}}{1}{2}}
+ \int_compare:nNnTF {\l_tmpa_int} > {4}
+ {
+ \int_compare:nNnTF {\l_tmpa_int} = {5}
+ {
+ \tl_set:Nn #2 {@calnotes at saturday~ fmt}
+ }
+ {
+ \tl_set:Nn #2 {@calnotes at sunday~ fmt}
+ }
+ }
+ {
+ \tl_set:Nn #2 {}
+ }
+ }
+
+
+\cs_new_protected:Npn \__tikzcalendarnotes_weeklist_set:nnnn #1#2#3#4
+ {
+ \int_set:Nn \l__tikzcalendarnotes_weeklist_delta_int {#1}
+ \tl_set:Nn \l__tikzcalendarnotes_weeklist_starts_on_tl {#2}
+ \tl_set:Nn \l__tikzcalendarnotes_weeklist_ends_on_tl {#3}
+ \int_set:Nn \l__tikzcalendarnotes_weeklist_starts_on_int {#4}
+
+ \__tikzcalendarnotes_set_day_acro:NNn \l__tikzcalendarnotes_day_A_tl \l__tikzcalendarnotes_day_A_style_tl {0}
+ \__tikzcalendarnotes_set_day_acro:NNn \l__tikzcalendarnotes_day_B_tl \l__tikzcalendarnotes_day_B_style_tl {1}
+ \__tikzcalendarnotes_set_day_acro:NNn \l__tikzcalendarnotes_day_C_tl \l__tikzcalendarnotes_day_C_style_tl {2}
+ \__tikzcalendarnotes_set_day_acro:NNn \l__tikzcalendarnotes_day_D_tl \l__tikzcalendarnotes_day_D_style_tl {3}
+ \__tikzcalendarnotes_set_day_acro:NNn \l__tikzcalendarnotes_day_E_tl \l__tikzcalendarnotes_day_E_style_tl {4}
+ \__tikzcalendarnotes_set_day_acro:NNn \l__tikzcalendarnotes_day_F_tl \l__tikzcalendarnotes_day_F_style_tl {5}
+ \__tikzcalendarnotes_set_day_acro:NNn \l__tikzcalendarnotes_day_G_tl \l__tikzcalendarnotes_day_G_style_tl {6}
+
+ }
+
+%
+% make at letter needed due the many pfg variables/constants at use.
+%
+\makeatletter
+
+
+\cs_new_protected:Npn \__tikzcalendarnotes_drawyear:
+ {
+ \pgftransformxshift{-\tikz at lib@cal at xshift}
+ \tikzyearcode % \tikzyearcode is defined by default
+ \pgftransformxshift{\tikz at lib@cal at xshift}
+ }
+
+\cs_new_protected:Npn \__tikzcalendarnotes_day_xshift:
+ {
+ \int_set:Nn \l_tmpa_int {\pgfcalendarcurrentweekday + \l__tikzcalendarnotes_weeklist_delta_int}
+ \int_compare:nNnT {\l_tmpa_int} > {6}
+ { \int_sub:Nn \l_tmpa_int {7} }
+ \pgftransformxshift{ \int_use:N\l_tmpa_int * \tikz at lib@cal at xshift }
+ }
+
+
+\cs_new_protected:Npn \__tikzcalendarnodes_daynames_draw:
+ {
+ \begin{scope}
+ \node[every~ day,every~ day~ name,\l__tikzcalendarnotes_day_A_style_tl]{\l__tikzcalendarnotes_day_A_tl};
+ \pgftransformxshift{ \tikz at lib@cal at xshift }
+ \node[every~ day,every~ day~ name,\l__tikzcalendarnotes_day_B_style_tl]{\l__tikzcalendarnotes_day_B_tl};
+ \pgftransformxshift{ \tikz at lib@cal at xshift }
+ \node[every~ day,every~ day~ name,\l__tikzcalendarnotes_day_C_style_tl]{\l__tikzcalendarnotes_day_C_tl};
+ \pgftransformxshift{ \tikz at lib@cal at xshift }
+ \node[every~ day,every~ day~ name,\l__tikzcalendarnotes_day_D_style_tl]{\l__tikzcalendarnotes_day_D_tl};
+ \pgftransformxshift{ \tikz at lib@cal at xshift }
+ \node[every~ day,every~ day~ name,\l__tikzcalendarnotes_day_E_style_tl]{\l__tikzcalendarnotes_day_E_tl};
+ \pgftransformxshift{ \tikz at lib@cal at xshift }
+ \node[every~ day,every~ day~ name,\l__tikzcalendarnotes_day_F_style_tl]{\l__tikzcalendarnotes_day_F_tl};
+ \pgftransformxshift{ \tikz at lib@cal at xshift }
+ \node[every~ day,every~ day~ name,\l__tikzcalendarnotes_day_G_style_tl]{\l__tikzcalendarnotes_day_G_tl};
+ \end{scope}
+ \pgftransformyshift{ -0.85*\tikz at lib@cal at yshift}
+ }
+
+
+\pgfkeys{tikz ,
+ calendar~ notes/.style =
+ {
+ remember~ picture ,
+ every~ calendar/.style =
+ { week~ starts~ on~ x } ,
+ month~ text = {\%mt} ,
+ every~ month/.style =
+ {
+ font = \bfseries\itshape ,
+ } ,
+ day~ text =
+ { \%d0 } ,
+ } ,
+ }
+
+\pgfkeys{tikz ,
+ % 'execute before day scope' is cumulative. 'new style' needed to fully change calendar's behaviour
+ day~ names~ on~ top/.style =
+ {
+ week~ starts~ on~ x/.append~ style =
+ {
+ execute~ before~ day~ scope =
+ {
+ \ifdate{ day~ of~ month = 1 }
+ { \__tikzcalendarnodes_daynames_draw: }
+ {}
+ } ,
+ } ,
+ } ,
+ every~ day~ name/.style =
+ {
+ font = {\scriptsize\itshape}
+ } ,
+ }
+
+\pgfkeys{tikz ,
+ week~ starts~ on~ x/.style =
+ {
+ execute~ before~ day~ scope =
+ {
+ \ifdate{ day~ of~ month = 1 }
+ { % On first of month , except when first date in calendar.
+ \ifdate{ equals = \pgfcalendarbeginiso }
+ {}
+ { \pgftransformyshift{ -\tikz at lib@cal at month@yshift } }
+ }
+ {}
+ } ,
+ % glancing from the source code.
+ tikz at lib@cal at width = 7 ,
+ %
+ execute~ at~ begin~ day~ scope =
+ { \__tikzcalendarnotes_day_xshift: } ,
+ execute~ after~ day~ scope =
+ { % shift to the next line , if end of weeklist
+ \ifdate{ \l__tikzcalendarnotes_weeklist_ends_on_tl }
+ { \pgftransformyshift{ -\tikz at lib@cal at yshift } }
+ {}
+ } ,
+ } ,
+ %
+ %
+ week~ starts~ monday/.code =
+ {
+ \__tikzcalendarnotes_weeklist_set:nnnn{0}{Monday}{Sunday}{0}
+ } ,
+ week~ starts~ sunday/.code =
+ {
+ \__tikzcalendarnotes_weeklist_set:nnnn{1}{Sunday}{Saturday}{6}
+ } ,
+ week~ starts~ sunday ,
+ %
+ }
+
+\pgfkeys{tikz ,
+ @calnotes at sunday~ fmt/.style =
+ {} ,
+ %
+ every~ sunday/.style =
+ {
+ every~ calendar/.append~ style =
+ {
+ if = {(Sunday)~ [#1]}
+ } ,
+ @calnotes at sunday~ fmt/.append~ style = {#1} ,
+ } ,
+ %
+ @calnotes at saturday~ fmt/.style =
+ {} ,
+ %
+ every~ weekend/.style =
+ {
+ every~ calendar/.append~ style =
+ {
+ if = {(weekend)~ [#1]}
+ } ,
+ @calnotes at saturday~ fmt/.append~ style = {#1} ,
+ @calnotes at sunday~ fmt/.append~ style = {#1} ,
+ } ,
+ }
+
+
+
+\pgfkeys{tikz ,
+ % hidden style for drawing the year ,
+ % it draws it for January and "first month drawn" (which depends on a _bool variable)
+ /pgf/calendar/@calnotes at start~ @of~ @year/.code =
+ { \__tikzcalendarnotes_test_year_start: } ,
+ %
+
+ @calnotes at set~ firstdraw~ flag~ @true/.code =
+ {
+ \bool_gset_true:N \g__tikzcalendarnotes_firstdraw_bool
+ %{\c_true_bool}
+ } ,
+
+ @calnotes at set~ firstdraw~ flag~ @false/.code =
+ {
+ \bool_gset_false:N \g__tikzcalendarnotes_firstdraw_bool
+ %{\c_false_bool}
+ } ,
+
+ @calnotes at set~ year~ policy~ true@/.code =
+ {
+ \bool_set_true:N \l__tikzcalendarnotes_year_policy_set_bool
+ } ,
+
+ @calnotes at set~ year~ policy~ if~ not~ set@/.code =
+ {
+ \bool_if:NF \l__tikzcalendarnotes_year_policy_set_bool
+ {
+ \bool_set_true:N \l__tikzcalendarnotes_year_policy_set_bool
+ \pgfkeys{tikz,year~ label~ by~ january~ and~ start}
+ }
+ } ,
+
+ @calnotes at set~ year~ label~ true@/.code =
+ {
+ \bool_set_true:N \l__tikzcalendarnotes_year_label_set_bool
+ } ,
+
+ @calnotes at set~ year~ label~ if~ not~ set@/.code =
+ {
+ \bool_if:NF \l__tikzcalendarnotes_year_label_set_bool
+ {
+ \bool_set_true:N \l__tikzcalendarnotes_year_label_set_bool
+ \pgfkeys{tikz,year~ label~ left}
+ }
+ } ,
+
+ year~ label~ by~ january~ and~ start/.style =
+ {
+ @calnotes at set~ firstdraw~ flag~ @true ,
+ @calnotes at set~ year~ policy~ true@ ,
+ @calnotes at set~ year~ label~ if~ not~ set@ ,
+ execute~ before~ day~ scope =
+ {
+ \ifdate{@calnotes at start~ @of~ @year}
+ { \__tikzcalendarnotes_drawyear: }
+ {}
+ } ,
+ } ,
+
+ year~ label~ by~ january~ only/.style =
+ {
+ @calnotes at set~ firstdraw~ flag~ @false ,
+ @calnotes at set~ year~ policy~ true@ ,
+ @calnotes at set~ year~ label~ if~ not~ set@ ,
+ execute~ before~ day~ scope =
+ {
+ \ifdate{@calnotes at start~ @of~ @year}
+ { \__tikzcalendarnotes_drawyear: }
+ {}
+ } ,
+ } ,
+
+ % Style forcing an year label.
+ year~ label~ every~ month/.style=
+ {
+ @calnotes at set~ year~ policy~ true@ ,
+ @calnotes at set~ year~ label~ if~ not~ set@ ,
+ execute~ before~ day~ scope =
+ {
+ \ifdate{day~ of~ month = 1}
+ { \__tikzcalendarnotes_drawyear: }
+ {}
+ }
+ } ,
+
+ year~ label~ left/.style =
+ {
+ @calnotes at set~ year~ label~ true@ ,
+ @calnotes at set~ year~ policy~ if~ not~ set@ ,
+ every~ year/.append~ style =
+ {
+ anchor = north~ east ,
+ } ,
+ } ,
+
+ year~ label~ left~ vertical/.style =
+ {
+ @calnotes at set~ year~ label~ true@ ,
+ @calnotes at set~ year~ policy~ if~ not~ set@ ,
+ every~ year/.append~ style =
+ {
+ anchor = south ,
+ rotate = 90 ,
+ } ,
+ } ,
+
+ year~ label~ left~ corner/.style =
+ {
+ @calnotes at set~ year~ label~ true@ ,
+ @calnotes at set~ year~ policy~ if~ not~ set@ ,
+ every~ year/.append~ style =
+ {
+ anchor = south ,
+ rotate = 45 ,
+ } ,
+ } ,
+
+ every~ year/.style =
+ { font = \Large\sffamily\bfseries, green!50!black } ,
+ }
+
+\pgfkeys{tikz ,
+ every~ mark/.style =
+ { thin , gray } ,
+ every~ remark/.style =
+ {
+ font =
+ \fontsize{3.5}{4.2}
+ \selectfont
+ } ,
+ every~ counter/.style =
+ {
+ every~ remark
+ } ,
+ keep~ counters/.code =
+ {
+ \bool_set_true:N \l__tikzcalendarnotes_keep_counters_pgfkey_bool
+ } ,
+ @calnotes at note@fontsize/.code =
+ {
+ \tl_set:Nn \l__tikzcalendarnotes_notes_fontsize_pgfkey_tl {#1}
+ } ,
+ every~ note/.style =
+ {
+ font =
+ \fontsize{4.5}{4.95}
+ \selectfont
+ } ,
+ @calnotes at note@fontsize = 4.5 ,
+ remarks~ font size/.style =
+ {
+ every~ remark/.append~ style =
+ {
+ font =
+ \fontsize{#1}{\fp_eval:n {1.1*#1}}
+ \selectfont
+ }
+ } ,
+ remarks~ font size/.value~ required ,
+ %
+ notes~ font size/.style =
+ {
+ @calnotes at note@fontsize = {#1} ,
+ every~ note/.append~ style =
+ {
+ font =
+ \fontsize{#1}{\fp_eval:n {1.1*#1}}
+ \selectfont
+ }
+ } ,
+ notes~ font size/.value~ required ,
+ %
+ }
+
+\pgfkeys{tikz ,
+ Xshift~ adjust/.code =
+ {
+ \tl_set:Nn \l__tikzcalendarnotes_remark_Xshift_adj_pgfkey_tl {#1 pt}
+ } ,
+ Xshift~ adjust/.value~ required ,
+ %
+ Yshift~ adjust/.code =
+ {
+ \tl_set:Nn \l__tikzcalendarnotes_remark_Yshift_adj_pgfkey_tl {#1 pt}
+ } ,
+ Yshift~ adjust/.value~ required ,
+ %
+ radius~ adjust/.code =
+ {
+ \tl_set:Nn \l__tikzcalendarnotes_radius_adj_pgfkey_tl {#1 pt}
+ } ,
+ radius~ adjust/.value~ required ,
+ %
+ radius~ adjust = 0,
+ Xshift~ adjust = 0,
+ Yshift~ adjust = 0,
+ }
+
+
Property changes on: branches/branch2024.final/Master/texmf-dist/tex/latex/tikzcalendarnotes/tikzcalendarnotes.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: branches/branch2024.final/Master/tlpkg/libexec/ctan2tds
===================================================================
--- branches/branch2024.final/Master/tlpkg/libexec/ctan2tds 2025-03-03 21:19:41 UTC (rev 74418)
+++ branches/branch2024.final/Master/tlpkg/libexec/ctan2tds 2025-03-03 21:21:46 UTC (rev 74419)
@@ -1937,6 +1937,7 @@
'tikz-triminos' => '&POST_onelevel',
'tikz2d-fr' => '&POST_onelevel',
'tikz3d-fr' => '&POST_onelevel',
+ 'tikzcalendarnotes' => '&POST_onelevel',
'tikzdotncross' => '&POST_onelevel',
'tikzquads' => '&POST_onelevel',
'tikzquests' => '&POST_onelevel',
Modified: branches/branch2024.final/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc
===================================================================
--- branches/branch2024.final/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc 2025-03-03 21:19:41 UTC (rev 74418)
+++ branches/branch2024.final/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc 2025-03-03 21:21:46 UTC (rev 74419)
@@ -219,6 +219,7 @@
depend tikz2d-fr
depend tikz3d-fr
depend tikzbricks
+depend tikzcalendarnotes
depend tikzcodeblocks
depend tikzdotncross
depend tikzducks
Added: branches/branch2024.final/Master/tlpkg/tlpsrc/tikzcalendarnotes.tlpsrc
===================================================================
More information about the tex-live-commits
mailing list.