Le 5 sept. 2023 à 04:21, Aditya Mahajan <adityam@umich.edu> a écrit :
On Mon, 4 Sep 2023, Fabrice L wrote:Dear list,
I have a problem with tikzCalendar on a recent installation. This minimal example :
8< ————————
\usemodule[tikz]
\usetikzlibrary[calendar]
\starttext
This should works:
\blank
\tikz \calendar[dates=2000-01-01 to 2000-01-31,week list];
\blank
but this does not !
\stoptext
8< ————————
should work, but does not. The problem seems to be here:
open source > level 2, order 61, name 'tikzlibrarycalendar.code.tex'
modules > 'pgfcalendar' is not found
close source > level 2, order 61, name ‘tikzlibrarycalendar.code.tex'
The file « tikzlibrarycalendar.code.tex » is read, but the file « pgfcalendar » seems missing. I have reinstall a new standalone version of ConTeXt, with all the modules (with the new script from ConTeXt Garden), but nothing works.
Here is what is going on:`tikzlibrarycalendar.code.tex` contains the line: \pgfutil@usemodule{pgfcalendar}In `generic/pgf/utilities/pgfutil-context.def`, \pgfutil@usemodule is defined as: \def\pgfutil@usemodule#1{\usemodule[#1]}which is supposed to load the file `plain/pgf/utilities/pgfcalendar.tex` which just a wrapper to load `pgfcalendar.code.tex`: \edef\pgfcalendaratcode{\the\catcode`\@} \catcode`\@=11 \input pgfrcs.tex \input pgfcalendar.code.tex \catcode`\@=\pgfcalendaratcode \endinputNow, the reason that this is not working is that the new module installer for tikz removes all the files from `tex/plain`. It appears that tikz is at fault here. If the file `pgfcalendar.tex` is supposed to used by both plain and context, then it should be in `tex/generic` directory rather than `tex/plain` directory. However, moving the file to `tex/generic` will not fix the issue directly loading the above `pgfcalendar.code.tex` in context is surely going to fail because of the manual catcode changes that are being done by pgfcalendar. So, I propose that we add a file `m-tikz-pgfcalendar.tex` as a wrapper around `pgfcalendar.code.tex` and in `m-tikz.mk(xl|iv)` add \definefilesynonym [pgfcalendar] [tikz-pgfcalendar]I am attaching `m-tikz-calendar` which causes the original example to compile (provided one adds the definefilesynonym before calling \usetikzlibrary[calendar]). Can you please test if other features of pgfcalendar are working with this file.
This is working, thanks ! I tested some features of the calendar, and everything seems in order. I will continue today to work on this (a course syllabus).
Aditya
Thanks again, you are a life saver !
Fabrice.