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

    \endinput

Now, 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.

Aditya

Attachment: m-tikz-calendar.tex
Description: m-tikz-pgfcalendar.tex

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

Reply via email to