ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Tikz calendar problem.
@ 2023-09-05  2:35 Fabrice L
  2023-09-05  8:21 ` [NTG-context] " Aditya Mahajan
  0 siblings, 1 reply; 3+ messages in thread
From: Fabrice L @ 2023-09-05  2:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 885 bytes --]

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. 


Thanks for any help,
Fabrice. 

[-- Attachment #1.2: Type: text/html, Size: 6024 bytes --]

[-- Attachment #2: Type: text/plain, Size: 495 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [NTG-context] Re: Tikz calendar problem.
  2023-09-05  2:35 [NTG-context] Tikz calendar problem Fabrice L
@ 2023-09-05  8:21 ` Aditya Mahajan
  2023-09-05 11:12   ` Fabrice L
  0 siblings, 1 reply; 3+ messages in thread
From: Aditya Mahajan @ 2023-09-05  8:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 2513 bytes --]

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 #2: m-tikz-pgfcalendar.tex --]
[-- Type: application/x-tex, Size: 207 bytes --]

[-- Attachment #3: Type: text/plain, Size: 495 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [NTG-context] Re: Tikz calendar problem.
  2023-09-05  8:21 ` [NTG-context] " Aditya Mahajan
@ 2023-09-05 11:12   ` Fabrice L
  0 siblings, 0 replies; 3+ messages in thread
From: Fabrice L @ 2023-09-05 11:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2916 bytes --]

Dear Aditya,

> 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
> 
>    \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.
> 

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.



[-- Attachment #1.2: Type: text/html, Size: 23598 bytes --]

[-- Attachment #2: Type: text/plain, Size: 495 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-05 11:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-05  2:35 [NTG-context] Tikz calendar problem Fabrice L
2023-09-05  8:21 ` [NTG-context] " Aditya Mahajan
2023-09-05 11:12   ` Fabrice L

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).