ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: Tikz calendar problem.
Date: Tue, 5 Sep 2023 10:21:47 +0200 (CEST)	[thread overview]
Message-ID: <ss76ns30-7593-609o-27sn-r025334467o4@hzvpu.rqh> (raw)
In-Reply-To: <9F052FF1-CEBD-4899-B16B-2B596A433DB3@gmail.com>

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

  reply	other threads:[~2023-09-05  8:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-05  2:35 [NTG-context] " Fabrice L
2023-09-05  8:21 ` Aditya Mahajan [this message]
2023-09-05 11:12   ` [NTG-context] " Fabrice L

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ss76ns30-7593-609o-27sn-r025334467o4@hzvpu.rqh \
    --to=adityam@umich.edu \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).