Debian Codegraph @

texmf-dist/doc/latex/tikzcalendarnotes/tikzcalendarnotes.tex

raw
1 %%%==============================================================================
2 % !Mode:: "TeX:EN"
3 % Default Compile engines:
4 % !TEX program = pdflatex
5 % !PDFTeXify ext = --interaction=nonstopmode --enable-etex --restrict-write18
6 % !PDFLaTeX ext = --interaction=nonstopmode --enable-etex --restrict-write18
7 % !BIB program = biber
8 %%%==============================================================================
9 %% Copyright 2025-present by Alceu Frigeri
10 %%
11 %% This work may be distributed and/or modified under the conditions of
12 %%
13 %% * The [LaTeX Project Public License](http://www.latex-project.org/lppl.txt) ,
14 %% version 1.3c (or later) , and/or
15 %% * The [GNU Affero General Public License](https://www.gnu.org/licenses/agpl-3.0.html) ,
16 %% version 3 (or later)
17 %%
18 %% This work has the LPPL maintenance status *maintained*.
19 %%
20 %% The Current Maintainer of this work is Alceu Frigeri
21 %%
22 %% This is version {1.2} {2025/11/06}
23 %%
24 %% The list of files that compose this work can be found in the README.md file at
25 %% https://ctan.org/pkg/tikzcalendarnotes
26 %%
27 %%%==============================================================================
28 \documentclass{article}
29 \RequirePackage[verbose,a4paper,marginparwidth=28mm,top=3cm,bottom=1.5cm,hmargin={45mm,25mm},marginparsep=2.5mm,columnsep=10mm,asymmetric]{geometry}
30 \usepackage[T1]{fontenc}
31 \usepackage[utf8]{inputenc}
32 \usepackage{lmodern}
33 \usepackage[infograb]{codedescribe}
34 \usepackage{enumitem}
35
36 \RequirePackage[backend=biber]{biblatex}
37 \addbibresource{tikzcalendarnotes.bib}
38
39 %\RequirePackage[verbose ,a4paper ,marginparwidth=27.5mm ,top=2.5cm ,bottom=1.5cm ,hmargin={40mm ,20mm} ,marginparsep=2.5mm ,columnsep=10mm ,asymmetric]{geometry}
40 %\usepackage[infograb]{codedescribe}
41 %\RequirePackage[inline]{enumitem}
42 %\SetEnumitemKey{miditemsep}{parsep=0ex ,itemsep=0.4ex}
43
44 %\RequirePackage{lmodern}
45
46
47 \usepackage{tikz}
48 \usetikzlibrary{calendar}
49
50 \usepackage{tikzcalendarnotes}
51
52 \RequirePackage[hidelinks ,hypertexnames=false]{hyperref}
53
54 \begin{document}
55 \tstitle{
56 author={Alceu Frigeri\footnote{\tsverb{https://github.com/alceu-frigeri/tikzcalendarnotes}}} ,
57 date={\tsdate} ,
58 title={The tikzcalendarnotes Package \break Version \PkgInfo{tikzcalendarnotes}{version}}
59 }
60
61
62 \begin{typesetabstract}
63
64 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.
65
66 Furthermore, a set of commands is offered which aim to easy the task of adding marks, highlighting some dates.
67
68 \end{typesetabstract}
69
70 \tableofcontents
71
72 \section{Package Requirements}
73 Basically, besides a fairly recent \LaTeX\ kernel (as recent as 2022/06/01), one needs to load at least
74 \begin{codestore}[prereq]
75 \usepackage{tikz}
76 \usetikzlibrary{calendar}
77 \end{codestore}
78 \tscode*[codeprefix=]{prereq}
79
80 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}.
81
82 \newpage
83 Lastly, given the possible uses of a calendar, a nice package setup would be (using the \tsobj[pkg]{preview} package)
84
85 \begin{codestore}[setup]
86 \usepackage{tikz}
87 \usetikzlibrary{calendar}
88
89 %\RequirePackage{anyfontsize}
90 %\RequirePackage{relsize}
91 \RequirePackage{lmodern}
92
93 \usepackage{tikzcalendarnotes}
94
95 \usepackage[active , tightpage]{preview}
96 \PreviewEnvironment{tikzpicture}
97 \setlength\PreviewBorder{5pt}
98 \end{codestore}
99 \tscode*[codeprefix=]{setup}
100
101
102
103 \section{Introduction}
104
105 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.
106
107 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.
108
109 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, viz-à-viz, taken in account.
110
111 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''.
112
113 %%
114 %% setting keywords emphasis
115 %%
116 \setnewcodekey{calendar keys}
117 {
118 texcs4={calendarnotes},
119 keywd={defnewdataset,setdates,setcountingweeks,sethighlightdates,setranges,suppresscounting},
120 emph={day,color,round,square,names,on,top,calendar,with,without,year,label,month,above,left,corner,centered,notes,every,sunday},
121 emph2={date,from,to,remark,mark,style},
122 % codeprefix={}
123 }
124
125
126 \begin{codestore}[demoA]
127 \defnewdataset{example}
128 \setdates[example]{date=2025-01-14,color=brown,remark=short one,notes=some\break long text used as a note,round,mark style=red}
129 \setcountingweeks[example]{from=2025-01-01,to=2025-02-28}
130
131 \end{codestore}
132
133 \tsexec{demoA}[1]
134
135 \begin{codestore}[demoA]
136 \begin{tikzpicture}
137 \calendarnotes[calendar notes, day names on top, every sunday=blue]{with notes,year=2025,number of months=2, data set={example}}
138 \end{tikzpicture}
139 \end{codestore}
140
141 %\tsmergedcode*[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}[1],{demoA}[2]}
142 \tsmergedcode*[calendar keys]{{demoA}[1],{demoA}[2]}
143
144 \tsresult*{demoA}[2]
145
146
147 \section{Package Commands}
148 \begin{codedescribe}{\defnewdataset}
149 \begin{codesyntax}%
150 \tsmacro{\defnewdataset}{new-dataset}
151 \end{codesyntax}
152 This defines/create a \tsobj[marg]{dataset} for later reference. A dataset is just a ''repository'' of dates/ranges/etc. (see below)
153 \end{codedescribe}
154
155
156
157 \begin{tsremark}
158 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.
159 \end{tsremark}
160
161 \begin{tsremark}
162 When creating a new dataset, a warning is raised in case \tsobj[marg]{new-dataset} already exists.
163 When selecting a dataset, an error is raised if \tsobj[marg]{dataset} doesn't exist.
164 \end{tsremark}
165
166
167 \begin{codedescribe}{\setdates}
168 \begin{codesyntax}%
169 \tsmacro{\setdates}[dataset]{key-value list}
170 \end{codesyntax}
171 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.
172 \end{codedescribe}
173
174
175 Valid Keys when annotating a date:
176 \begin{describelist*}{option}
177 \describe{date}{The date in ISO format (as used by the \tsobj[pkg]{calendar} library).}
178 \describe{color}{The color of the day. No default.}
179 \describe{round}{A circle will be drawn around the date. Well, in fact a square with ``rounded corners''.}
180 \describe{square}{A square will be drawn around the date.}
181 \describe{mark style}{The style to be applied \emph{after} the \tsobj[key]{every mark} style.}
182 \describe{remark}{A remark to be added to a date.}
183 \describe{remark style}{The style to be applied \emph{after} the \tsobj[key]{every remark} style.}
184 \describe{north east}{The remark, if any, will be positioned at the day's \tsobj[key]{north east} anchor.}
185
186 \describe{north west}{The remark, if any, will be positioned at the day's \tsobj[key]{north west} anchor.}
187 \describe{south east}{The remark, if any, will be positioned at the day's \tsobj[key]{south east} anchor.}
188 \describe{south west}{The remark, if any, will be positioned at the day's \tsobj[key]{south west} anchor.}
189 \describe{notes}{A note to be added bellow a date.}
190 \describe{note style}{the style to be applied \emph{after} the \tsobj[key]{every note} style.}
191 \end{describelist*}
192 \begin{tsremark}
193 \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.
194 \end{tsremark}
195 \begin{tsremark}
196 If not giving, the default position is \tsobj[key]{north east}.
197 \end{tsremark}
198 \begin{tsremark}
199 An error is raised if \tsobj[oarg]{dataset} doesn't exist.
200 \end{tsremark}
201 \begin{codedescribe}{\setranges}
202 \begin{codesyntax}%
203 \tsmacro{\setranges}[dataset]{key-value list}
204 \end{codesyntax}
205 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.
206 \end{codedescribe}
207 Valid Keys when annotating a range:
208 \begin{describelist*}{option}
209 \describe{from}{The starting date in ISO format (as used by the \tsobj[pkg]{calendar} library.}
210 \describe{to}{The final date in ISO format (as used by the \tsobj[pkg]{calendar} library.}
211 \describe{color}{The color of the day on the range \tsobj[key]{from,to}. No default}
212 \describe{round}{A rounded rectangle will be drawn around the range.}
213 \describe{square}{A rectangle will be drawn around the range.}
214 \describe{mark style}{The style to be applied \emph{after} the \tsobj[key]{every mark} style.}
215 \describe{remark}{A remark to be added to the range.}
216 \describe{remark style}{The style to be applied \emph{after} the \tsobj[key]{every remark} style.}
217 \describe{north east}{The remark, if any, will be positioned at the \tsobj[key]{to} day's \tsobj[key]{north east} anchor.}
218 \describe{north west}{The remark, if any, will be positioned at the \tsobj[key]{from} day's \tsobj[key]{north west} anchor.}
219 \describe{south east}{The remark, if any, will be positioned at the \tsobj[key]{to} day's \tsobj[key]{south east} anchor.}
220 \describe{south west}{The remark, if any, will be positioned at the \tsobj[key]{from} day's \tsobj[key]{south west} anchor.}
221 \end{describelist*}
222
223 \begin{tsremark}
224 \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.
225 \end{tsremark}
226 \begin{tsremark}
227 If not giving, the default position is \tsobj[key]{north east}.
228 \end{tsremark}
229 \begin{tsremark}
230 An error is raised if \tsobj[oarg]{dataset} doesn't exist.
231 \end{tsremark}
232
233 \begin{codedescribe}{\sethighlightdates}
234 \begin{codesyntax}%
235 \tsmacro{\sethighlightdates}[dataset]{key-value list}
236 \end{codesyntax}
237 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.
238 \end{codedescribe}
239
240
241 {Valid Keys when highlighting dates:}
242 \begin{describelist*}{option}
243 \describe{color}{The color applied to every date in the \tsobj[key]{dates} list.}
244 \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}
245 \end{describelist*}
246
247 \begin{tsremark}
248 One can define/set as many \tsobj[key]{dates} as one wishes in a single \tsobj{\sethighlightdates} call.
249 \end{tsremark}
250
251 \begin{tsremark}
252 An error is raised if \tsobj[oarg]{dataset} doesn't exist.
253 \end{tsremark}
254
255
256 \begin{codedescribe}{\setcountingweeks}
257 \begin{codesyntax}%
258 \tsmacro{\setcountingweeks}[dataset]{key-value list}
259 \end{codesyntax}
260 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.
261 \end{codedescribe}
262
263
264 {Valid Keys:}
265 \begin{describelist*}{option}
266 \describe{from}{The starting date in ISO format (as used by the \tsobj[pkg]{calendar} library.}
267 \describe{to}{The final date in ISO format (as used by the \tsobj[pkg]{calendar} library.}
268 \describe{color}{The color to be used. No default}
269 \describe{up}{The counter will be drawn to the left, upwards.}
270 \describe{down}{The counter will be drawn to the left, downwards.}
271 \describe{center}{The counter will be just drawn to the left. That's the default positioning.}
272 \describe{starting at}{Sets the counters initial value. Useful in the cases when the "counting period" starts before the actual calendar.}
273 \end{describelist*}
274
275
276 \begin{tsremark}
277 An error is raised if \tsobj[oarg]{dataset} doesn't exist.
278 \end{tsremark}
279 \begin{tsremark}
280 The \tsobj[key]{starting at} key is active only if the \tsobj[key]{keep counters} style is in use (see \ref{style:counters})
281 \end{tsremark}
282
283 \begin{codedescribe}{\suppresscounting}
284 \begin{codesyntax}%
285 \tsmacro{\suppresscounting}[dataset]{key-value list}
286 \end{codesyntax}
287 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.
288 \end{codedescribe}
289
290
291 {Valid Keys:}
292 \begin{describelist*}{option}
293 \describe{from}{The starting date in ISO format (as used by the \tsobj[pkg]{calendar} library.}
294 \describe{to}{The final date in ISO format (as used by the \tsobj[pkg]{calendar} library.}
295 \end{describelist*}
296
297
298 \begin{tsremark}
299 Counters of other \tsobj[oarg]{dataset}s won't be affected.
300 \end{tsremark}
301 \begin{tsremark}
302 An error is raised if \tsobj[oarg]{dataset} doesn't exist.
303 \end{tsremark}
304
305
306
307 \begin{codedescribe}{\calendarnotes}
308 \begin{codesyntax}%
309 \tsmacro{\calendarnotes}[pgfkeys]{key-value list}
310 \end{codesyntax}
311 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 (see \cite{TIKZPGF:3.1}, specially section Calendar Library, under Libraries).
312
313 The calendar range, starting date, arrangement are set by the \tsobj[marg]{key-value list}, as below.
314 \end{codedescribe}
315 \begin{describelist*}{option}
316 \describe{year}{The year. If not given \tsobj{\year} will be used.}
317 \describe{starting at}{The calendar initial month. If not given $1$ (January) will be assumed.}
318 \describe{number of months}{The number of months for the calendar. Defaults to 12.}
319 \describe{per line}{How many months shall be arranged per ``line''.}
320 \describe{with notes}{The notes will be typeset. Note that this will also adjust day/week spacing, accordingly.}
321 \describe{without notes}{Notes won't be typeset, resulting in a more compact calendar.}
322 \describe{compact}{An alias for ``\tsobj[key]{without notes}''.}
323 \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}).}
324 \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}).}
325 \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}).}
326 \describe{data set}{A comma separated list of \tsobj[marg]{data set} to be used. Defaults to ``default''.}
327 \describe{name}{The prefix name to be used by the calendar library. Defaults to ``cal''.}
328 \end{describelist*}
329
330
331 \begin{tsremark}
332 An error is raised if \tsobj[oarg]{dataset} doesn't exist.
333 \end{tsremark}
334
335 \subsection{Advanced Use}
336
337
338 \begin{codedescribe}{\calendarnotesprepare,\calendarnotessetifs,\calendarnotesdraw}
339 \begin{codesyntax}%
340 \tsmacro{\calendarnotesprepare}[pgfkeys]{key-value list}
341 \tsmacro{\calendarnotessetifs}{}
342 \tsmacro{\calendarnotesdraw}{}
343 \end{codesyntax}
344
345 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.
346
347 \tsobj{\calendarnotesprepare} will process all \tsobj[oarg]{pgfkeys} and \tsobj[marg]{key-value list} as \tsobj{\calendarnotes} does, but nothing else.
348
349 \tsobj{\calendarnotessetifs} will then append the many \tsobj[key]{if=}'s (to \tsobj[key]{every calendar}).
350
351 Finally, \tsobj{\calendarnotesdraw} will add the marks/remarks (and notes if the \tsobj[key]{with notes} key was used in \tsobj{\calendarnotesprepare}).
352
353 Note that, the user is supposed to construct, draw the calendar between the commands \tsobj{\calendarnotessetifs,\calendarnotesdraw}.
354 \end{codedescribe}
355 \begin{tsremark}
356 For \tsobj{\calendarnotesdraw} to work, the \tsobj[pkg]{tikz} style \tsobj[option]{remember picture} must have been used when drawing the calendar.
357 \end{tsremark}
358
359 \section{Ti{\itshape k}Z Styles}\label{tikz-styles}
360 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'', 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. See the \tsobj[pkg]{pgfmanual} \cite{TIKZPGF:3.1} for a complete list of possible keys, under section \emph{Calendar Library}.
361
362 \begin{tsremark}
363 all keys are defined under the \tsobj[key]{/tikz/} ``family''. For instance \tsverb{\pgfkeys{tikz,...}} if using the \tsverb{\pgfkeys} directly.
364 \end{tsremark}
365
366
367
368 \begin{codedescribe}[key]{calendar notes}
369 %\begin{codesyntax}%
370 %\end{codesyntax}
371 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.
372 \end{codedescribe}
373
374 \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}\}.
375 \end{tsremark}
376
377 \subsection{Year related ones}
378
379
380 \begin{codedescribe}[key]{year label by january and start}
381 This will add the calendar's year to every January, AND, to the very first month draw.
382 \end{codedescribe}
383
384 \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.
385 \end{tsremark}
386
387 \begin{tsremark}
388 If the label's position isn't already set, the style \tsobj[key]{year label left} will be applied.
389 \end{tsremark}
390
391 \begin{tsremark}
392 this is the default when using one of the \tsobj[key,sep=or]{year label left, year label left vertical, year label left corner}.
393 \end{tsremark}
394
395 \begin{codedescribe}[key]{year label by january only}
396 This will add the calendar's year label to every January only.
397 \end{codedescribe}
398
399 \begin{tsremark}
400 If the label's position isn't already set, the style \tsobj[key]{year label left} will be applied.
401 \end{tsremark}
402
403
404 \begin{codedescribe}[key]{year label every month}
405 This will add a calendar's year label to every month draw.
406 \end{codedescribe}
407
408 \begin{tsremark}
409 If the label's position isn't already set, the style \tsobj[key]{year label left} will be applied.
410 \end{tsremark}
411
412
413 \begin{codedescribe}[key]{year label left}
414 The calendar's year label will added to the left of a month.
415 \end{codedescribe}
416
417 \begin{tsremark}
418 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.
419 \end{tsremark}
420
421 \begin{codedescribe}[key]{year label left vertical}
422 The calendar's year will be at the left of a month, rotated $90^o$
423 \end{codedescribe}
424
425 \begin{tsremark}
426 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.
427 \end{tsremark}
428
429 \begin{codedescribe}[key]{year label left corner}
430 The calendar's year will be at the corner left of a month, rotated $45^o$
431 \end{codedescribe}
432
433 \begin{tsremark}
434 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.
435 \end{tsremark}
436
437
438 \begin{codedescribe}[key]{every year/.style,every year/.append style}
439 To change the year style.\\ The default being \{ \tsobj[verb,comma]{ font = \Large\sffamily\bfseries, green!50!black } \}\\
440 \end{codedescribe}
441 %\begin{tsremark}
442 %One can use the \tsobj[key]{every year/.append style} as well.
443 %\end{tsremark}
444
445 \subsection{Marks related ones}
446 \begin{codedescribe}[key]{every mark/.style,every mark/.append style}
447 To change the style of the calendar ``marks'' (square or round ones).\\ The default being \{ \tsobj[verb,comma]{thin , gray} \}.
448 \end{codedescribe}
449
450 %\begin{tsremark}
451 %One can use the \tsobj[key]{every mark/.append style} as well.
452 %\end{tsremark}
453 %
454 \subsection{Remarks related ones}
455 \begin{codedescribe}[key]{every remark/.style,every remark/.append style}
456 To change the style of every ``remark'' (the remark text).\\ The default being \{ \tsobj[verb,comma]{font = } \{ \tsobj[verb,comma]{ \fontsize{5}{6} \selectfont } \} \}
457 \end{codedescribe}
458
459 %\begin{tsremark}
460 %One can use the \tsobj[key]{every remark/.append style} as well.
461 %\end{tsremark}
462 %
463 \begin{codedescribe}[key]{remarks fontsize}
464 In case one just wants to change the remarks fontsize (in pt) used and nothing else.
465 \end{codedescribe}
466
467
468 \subsection{Counter related ones}\label{style:counters}
469 \begin{codedescribe}[key]{keep counters}
470 The counters won't be reset between calls, allowing the piecewise construction of a calendar, one or more months at time.
471 \end{codedescribe}
472 \begin{tsremark}
473 This is needed, for instance, also when using the \tsobj[key]{starting at} key (\tsobj{\setcountingweeks}).
474 \end{tsremark}
475
476 \begin{codedescribe}[key]{every counter/.style,every counter/.append style}
477 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''.
478 \end{codedescribe}
479 %\begin{tsremark}
480 %One can use the \tsobj[key]{every counter/.append style} as well.
481 %\end{tsremark}
482
483 \subsection{Notes related ones}
484 \begin{codedescribe}[key]{every note/.style,every note/.append style}
485 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 } \} \}
486 \end{codedescribe}
487
488 %\begin{tsremark}
489 %One can use the \tsobj[key]{every note/.append style} as well.
490 %\end{tsremark}
491 %
492 \begin{codedescribe}[key]{notes fontsize}
493 In case one just wants to change the notes fontsize (in pt) used and nothing else.
494 \end{codedescribe}
495
496 \subsection{Calendar arrangement}
497 \begin{codedescribe}[key]{weeklist starts on x}
498 This sets a month arrangement to be a week per line. The week might start at Sunday or Monday, the default being Sunday.
499 \end{codedescribe}
500
501 \begin{tsremark}
502 This is the default arrangement if one uses the \tsobj[key]{calendar notes} key.
503 \end{tsremark}
504
505 \begin{codedescribe}[key]{week starts monday}
506 If the key \tsobj[key]{weeklist starts on x} is active, the week will start by Mondays.
507 \end{codedescribe}
508
509 \begin{codedescribe}[key]{week starts sunday }
510 If the key \tsobj[key]{weeklist starts on x} is active, the week will start by Sundays.
511 \end{codedescribe}
512
513 \begin{codedescribe}[key]{day names on top}
514 This will add the weekday's name list (Su, Mo, Tu ... Sa) on top of each month (and below it's label, if drawn).
515 \end{codedescribe}
516
517 \subsection{Other styling keys}
518 \begin{codedescribe}[key]{every day name/.style,every day name/.append style}
519 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 } \} \}
520 \end{codedescribe}
521
522 \begin{tsremark}
523 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 .
524 \end{tsremark}
525
526 %\begin{tsremark}
527 %One can use the \tsobj[key]{every day name/.append style} as well.
528 %\end{tsremark}
529
530 \begin{codedescribe}[key]{every sunday}
531 This will set a styling for ``Sundays''. No default is set.
532 \end{codedescribe}
533
534 \begin{tsremark}
535 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'' (Sunday).
536 \end{tsremark}
537
538 \begin{codedescribe}[key]{every weekend}
539 This will set a styling for ``Saturdays'' and ``Sundays''. No default is set.
540 \end{codedescribe}
541
542 \begin{tsremark}
543 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).
544 \end{tsremark}
545
546
547 \subsection{Remarks/counters positioning fine tunning}
548
549 \begin{codedescribe}[key]{Xshift adjust}
550 A ``remark'' (or counter) position will be adjusted by shifting it along the X axis. The default is \tsobj[verb]{0} (in pt).
551 \end{codedescribe}
552
553 \begin{tsremark}
554 A negative adjust will bring the remark closer to the reference point.
555 \end{tsremark}
556
557 \begin{codedescribe}[key]{Yshift adjust}
558 A ``remark'' (or counter) position will be adjusted by shifting it along the Y axis. The default is \tsobj[verb]{0} (in pt).
559 \end{codedescribe}
560
561 \begin{tsremark}
562 A negative adjust will bring the remark closer to the reference point.
563 \end{tsremark}
564
565 \begin{codedescribe}[key]{radius adjust}
566 The ``mark'' size will be adjusted. The default is \tsobj[verb]{0} (in pt).
567 \end{codedescribe}
568
569 \begin{tsremark}
570 A negative adjust will reduce the size of the marks, whilst a positive number will increase it.
571 \end{tsremark}
572
573 \newpage
574 \section{An Example}
575
576
577 \begin{codestore}[demoX]
578 \defnewdataset{dataset A}
579 \defnewdataset{dataset B}
580 \defnewdataset{dataset C}
581
582 \setcountingweeks{from=2025-01-01,to=2025-12-31,down,color=gray!40!white} % deafault dataset
583
584 \setcountingweeks[dataset A]{from=2025-04-07,to=2025-08-29,color=red}
585 \setcountingweeks[dataset A]{from=2025-09-22,to=2026-03-23,color=brown}
586 \suppresscounting[dataset A]{from=2025-07-07,to=2025-08-01} % like, summer break
587
588 \setranges[dataset A]
589 {
590 from=2025-08-25,to=2025-08-29,round,remark=Exams Week!
591 }
592 \sethighlightdates[dataset A]
593 {
594 dates = {01-01, 01-02, 03-01, 04-01, 2025-06-05} %some holidays,
595 }
596 \setdates[dataset A]
597 {
598 date=2025-06-23, round, remark = L1 , notes= {FIS101 - cinematics} ,
599 date=2025-06-25, round, remark = L2 , notes= {MAT101 - integrals} ,
600 }
601 \setdates[dataset B]
602 {
603 date=2025-03-22, round, color=brown, remark=C. Birthday,
604 date=2025-01-26, round, color=brown, remark=W. Birthday,
605 }
606 \setranges[dataset C]
607 {
608 from=2025-06-06,to=2025-06-26,round,remark=Valencia!
609 }
610 \end{codestore}
611
612
613 First, 3 \tsobj[meta]{data sets} are created, highlighting a few dates.
614
615 \tsexec{demoX}
616
617 \tscode*[calendar keys]
618 {demoX}
619
620
621 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.
622
623
624 \begin{codestore}[demoB]
625 \begin{tikzpicture}
626 \calendarnotes
627 [
628 calendar notes,
629 month label above centered, % standard key from the Calendar Library (see pgfmanual)
630 year label left corner,
631 day names on top,
632 every sunday=blue
633 ]
634 {
635 without notes,
636 data set={default, dataset A, dataset B}
637 }
638 \end{tikzpicture}
639 \end{codestore}
640
641
642
643 \tscode*[calendar keys]
644 {demoB}
645
646
647 ~
648
649 \tsresult*
650 {demoB}
651
652 \newpage
653
654 Likewise, one can construct a calendar piecewise, note the \tsobj[key]{keep counters} key:
655
656 \begin{codestore}[demoC]
657 \begin{tikzpicture}
658 \calendarnotes
659 [
660 calendar notes ,
661 month label above centered , % standard key from the Calendar Library (see pgfmanual)
662 %year label left corner ,
663 day names on top ,
664 every sunday=blue
665 ]
666 {
667 data set={default, dataset A, dataset B},
668 number of months=3,
669 per line=3
670 }
671 \end{tikzpicture}
672
673 Some text.
674
675
676 \begin{tikzpicture}
677 \calendarnotes
678 [
679 calendar notes ,
680 month label above centered , % standard key from the Calendar Library (see pgfmanual)
681 %year label left corner ,
682 day names on top ,
683 every sunday=blue ,
684 keep counters
685 ]
686 {
687 data set={default, dataset A, dataset B},
688 starting at=4 ,
689 number of months=3,
690 per line=3
691 }
692 \end{tikzpicture}
693
694
695 Some text.
696
697
698 \begin{tikzpicture}
699 \calendarnotes
700 [
701 calendar notes ,
702 month label above centered , % standard key from the Calendar Library (see pgfmanual)
703 %year label left corner ,
704 day names on top ,
705 every sunday=blue ,
706 keep counters
707 ]
708 {
709 data set={default, dataset A, dataset B},
710 starting at=7 ,
711 number of months=3,
712 per line=3
713 }
714 \end{tikzpicture}
715
716
717 \end{codestore}
718
719
720 \tscode*[calendar keys, emph3={keep,counters} ]
721 {demoC}
722
723
724 ~
725
726
727
728 \tsresult*
729 {demoC}
730
731
732
733 \newpage
734
735 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.)
736
737 \begin{codestore}[demoD]
738 \setcountingweeks[dataset A]{from=2025-04-07,to=2025-08-29,color=red,starting at=9}
739 \begin{tikzpicture}
740 \calendarnotes
741 [
742 calendar notes ,
743 month label above centered , % standard key from the Calendar Library (see pgfmanual)
744 %year label left corner ,
745 day names on top ,
746 every sunday=blue ,
747 keep counters,
748 ]
749 {
750 data set={dataset A, dataset B},
751 starting at = 6 ,
752 number of months=1,
753 per line=1,
754 with notes
755 }
756 \end{tikzpicture}
757
758
759 \end{codestore}
760
761
762 \tscode*[calendar keys, emph3={keep,counters} ]
763 {demoD}
764
765 ~
766
767 \tsresult*
768 {demoD}
769
770 \printbibliography
771
772
773
774 \end{document}