[tldoc] suggestions for the doc section 3.4.5 context lmtx and mkiv

Carlos linguafalsa at gmail.com
Thu Feb 23 17:06:31 CET 2023


On 2/22/23 18:40, Carlos wrote:
> Hello Karl
> 
> I had some issues with the the way by which namely, context, and the 
> scripts used therein handles any call with a file.
> 
> And presumably what the devs suggest is to run
> 
> context --generate
> 
> or
> 
> context --luatex --generate
> 
> 
> The problem with the above is the following. Bare with me here.
> 
> 
> If TEXMFCACHE  is used (as it should) or as the doc states
> 
> \ConTeXt\ will read from
> all paths mentioned in \verb+TEXMFCACHE+, and write to the first
> path that is writable. While reading, the last found match will
> take precedence in the case of duplicated cache data.
> 
> then any future call is handled not necessarily elegant, but 
> surreptitiously deceiving, to say the least
> 
> Why? you may ask. if all that lua is following the TEXMF directives, right?
> 
> For the simple reason that `context ` will try to gain access not only 
> to a file but also to any subdirectories that may find in its path :(
> 
> And I tell you and can almost assure you, mtxrun --script context, looks 
> up anything under TEXMFHOME first and foremost and lo and behold, if by 
> any chance, on TEXMFCACHE/TEXMFHOME rather than TEXMFVAR. The latter 
> should be default. But it simply ignores it.
> 
> The above is very unsettling. And this is not the first time around it 
> happens. Oh no. Nope. This has been going on for a while now.
> 
> See https://bugs.gentoo.org/710154 for one of the many instances where 
> this infamous message has appeared.
> 
> mtxrun --script context
> txrun          | unknown script 'context.lua' or 'mtx-context.lua'
> 
> But it keeps happening!
> 
> TEXMFCACHE needs to be cleared up and any contents from context also 
> need to be removed, before any subsequent call or else…  context will 
> behave erratically.
> 
> mtxrun --generate would also be more appropriate afterwards, but because 
> TEXMFCACHE is prioritized, it creates all sort of problems, such as for 
> context to scan whatever may find in its path. Even trying to read files 
> and any subdirectories with read and write protected permissions. It 
> simply doesn't care.
> 
> 

Giving it a second thought,
| unknown script 'context.lua' or 'mtx-context.lua'
serves its purpose, and may very well be a clear indicator that 
something else amiss with duplicate lua cache.

But At any rate, since this has been an outgoing issue for as long as I 
can remember, I live with the conviction that lua with TeX, might have 
to end up with a helper (akin to other software implementations out 
there) to sort this whole thing out. It just can't help itself any 
longer, not only by finding paths that are writable first, — and which 
one of the two takes precedence — as the doc states, but unfortunately 
and most concerning of all insisting in reading read restricted files on 
the fly. Why? Because it can.








More information about the tldoc mailing list.