On Wed Aug 24, 2022 at 11:32 PM CEST, Hans Hagen wrote:
On 8/24/2022 10:21 PM, Michal Vlasák via ntg-context wrote:
Or rather no solution would be needed at all, since the "mtxrun" and "context" wrapper commands and "texmfcnf.lua" files will be probably specific for each packaging target (different directories on different distros, and Unix vs Windows), and thus the matter of packagers. And copying a binary and a directory with runtime files is the usual task of an install step of "package descriptions", so maybe even a Makefile like I had wouldn't be needed.
just a note: the mtxrun[.exe] and context[.exe] commands are not really wrappers but symlinks to the binary luametatex[.exe] (i didn't test if mtxrun.lua and context.lua can be symlinks but that are to be in the same path in order to be seen)
Yes, sorry I should have been clearer. What is necessary for luametatex to run a Lua script is to run it with another name (argv[0]). This can be done with symlinks, or with `exec -a mtxrun luametatex`. And even mtxrun.lua and context.lua can be symlinks, it works, I used it.
one can actually use the default texmf.cnf if one sets TEXMF or one of its companions .. they default to be autoparent which is natural for tds
Thanks, indeed the config file sets the paths nicely, so it isn't necessary to have another file if one sets TEXMF, very nice! One addition I had was the use of $TEXMFDOTDIR instead of "." as the first path in most variables, e.g.: TEXINPUTS = "$TEXMFDOTDIR;$TEXMF/tex/{context,plain/base,generic}//", instead of TEXINPUTS = ".;$TEXMF/tex/{context,plain/base,generic}//", I quite like it for adding directories with my macros / bib files etc. that are not structured as TDS tree, but rather are "flat". It's originally from TeX Live: https://github.com/TeX-Live/texlive-source/commit/f1dfa7b7670fa28451c386fb08... It lists ".//" as another possible use. Could you also add it? I updated the repo: https://github.com/vlasakm/context Now also `context` is an executable (two more symlinks, so now 4 symlinks and one binary in total). There is no longer a configuration file by me (the fallback contextcnf.lua gets used or user provides one), the drawback being that I set some variables in the environment and the user now can't override them from config file only from environment, AFAIK. Also mtxrun --variables doesn't work now (maybe other things) though I won't investigate further for now. Anyway, thanks for the clarifications and suggestions! Michal