Re: [NTG-context] How can I use ConTeXt from TeXLive2020 ?
Hi Adam, Thanks for your attention to my problem.
On 11 Aug 2020, at 03:44, Adam Reviczky
wrote: Hi Otared,
Not sure this will help at all, but I've seen similar errors when "texmfcnf.lua" wasn't found (alongside texmf.cnf).
Although I am not using TeXLive2020, I have the following entries for texmfcnf: -rw-r--r-- 1 root root 8272 Aug 9 13:19 /usr/share/texlive/texmf-dist/web2c/texmfcnf.lua -rw-r--r-- 1 root root 38841 Aug 9 13:19 /usr/share/texlive/texmf-dist/web2c/texmf.cnf
I don't have these files at this place, but in /opt/local/etc/texmf/ I do have /opt/local/etc/texmf/texmf.cnf /opt/local/etc/texmf/texmfcnf.lua the first one being created automatically when I tried to do mtxrun --generate after installing TeXLive2020. Ir says its content should not be modified directly and that its content is based on of the file /opt/local/etc/texmf/texmf.cnf.d The content of the above directory dates from 2019, and maybe that is why my logfile reports things being done with TeXLive2019. The content of the file /opt/local/etc/texmf/texmfcnf.lua is written by Hans in date = "2012-05-24" time = "12-12-12". Replacing /opt/local/etc/texmf/texmf.cnf with some other texmf.cnf does not help, since it is overwritten when one does mtxrun --generate So the problem remains… Maybe I have to contact people who prepare MacTeX2020 and ask for help with them. Thank you agin for your time and advices. Best regards: Otared
and the symlinks to it from: lrwxrwxrwx 1 root root 43 Aug 11 02:05 /usr/share/texmf/web2c/texmfcnf.lua -> ../../texlive/texmf-dist/web2c/texmfcnf.lua lrwxrwxrwx 1 root root 40 Aug 11 02:21 /usr/share/texmf/web2c/texmf.cnf -> ../../texlive/texmf-dist/web2c/texmf.cnf
Now, if I remove the symlink (/usr/share/texmf/web2c/texmfcnf.lua) I get the same error as you: mtxrun | unknown script 'context.lua' or 'mtx-context.lua' (With the symlink everything is fine of course.)
https://github.com/TeX-Live/texlive-source/blob/b5db9f9833e389f96a329553b9d6... % First writable tree here is used by Lua(La)TeX for the font cache. % LuaLaTeX uses the value here, while ConTeXt uses the same variable but % from texmfcnf.lua; therefore the two values should be kept in sync. % (As should everything else in texmf.cnf <-> texmfcnf.lua.)
I see from your output that context did find the texmfcnf.lua: resolvers | resolving | found regular configuration file '/opt/local/etc/texmf/texmfcnf.lua'
So maybe it is something completely different, but it does look like it's something around those configs...
Have a look and if not, then sorry for the noise.
Regards, Adam
On Mon, Aug 10, 2020 at 11:04 PM Otared Kavian
wrote: Hi Axel, On 10 Aug 2020, at 16:11, Axel Kielhorn
wrote: […] Well, one more suggestion: Use TeX Live Manager to update TeX-Live. I didn’t see any comments about context not working, but maybe the update fixes something. (You can filter for context related packages.) There has been one update to „context“ in June 2020.
I did update TeXLive with TeX Live Manager. But still I cannot run ConTeXt from TeXLive2020 (neither from TeXShop nor from Terminal).
[…] And another one: Please look into the home directory for a local .texlive2020 folder. There shouldn’t be any and it shouldn’t contain anything context related.
I checked for the existence of directories of the type .texlive2020: there is no such directory in my home directory. There were three leftover directories .texlive2008, .texlive2010 and .texlive2019, which I removed. Doing mtxrun --generate creates a .texlive2019 directory which contains some other folders which are texmf-var/luatex-cache/context/88aacfe88c3cbee9a12d5f4bec4da90b/trees/ and in the latter folder there are 10 files with suffixes .lua and .luc. Again context test.tex results in mtxrun | unknown script 'context.lua' or 'mtx-context.lua'
So the problem remains…
Best regards: Otared ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
%% This file should not be edited directly! %% %% It was automatically generated by /opt/local/libexec/texlive-update-cnf %% from the contents of /opt/local/etc/texmf/texmf.cnf.d %% on Sat Jun 13 10:08:36 CEST 2020.
Hi, A few remarks. In a mkiv luatex setup there are (on a unix system): luatex : binary mtxrun : a copy of mtxrun.lua context : a shell script starting mtxrun Now, the problem there is that these shebang lines are limited, i.e. there is no way to pass an argument and we need to start luatex in lua mode. This is why the program refered to is texlua which is a copy of or symlink to luatex and when called with that name it knows that it has to start in lua mode. On windows there are two small stubs: mtxrun.exe and context.exe an both will start luatex (no need for texlua there) with the same script etc. In a luametatex setup we have a uniform and simpler model. luametatex : binary mtxrun : a copy of luametex or symlink to it context : a copy of luametex or symlink to it mtxrun.lua : used when mtxrun is started context.lua : used when context is started So, here the 'context' link (or copy) from it's name knows to start in lua mode and load context.lua (which actually loads mtxrun.lua + mtx-context.lua). It's the same on all platforms. Now, already long ago we ditched all other stubs simply because given the amount of scripts in a tex live setup it's a recipe for clashes (scripts also have to compete with programs / scripts installed as part of the os and other programs so even more opportunity for clashes). We just use mtxrun --script ... instead (and texmfstart in a mkii setup). These models cannot be mixed, which is why in a luametatex lmtx setup we use "context --luatex" to start mkiv, where luametatex is the runner. Hans ps. I remember the times that context was considered bad because it needed a runner, read: a script was part of the deal and a tex run should not have such a depedency; the need to install perl or ruby was seen as a shortcoming. We also used scripts to generate font metric files (context didn't depend on other programs for toc and index generation and had just one auxiliary file). But times have changed and scripts are now hip and modern in the tex ecosysystem, which is why we basically limit ourselves to just 'context' and 'mtxrun' and start all the other context related scripts indirectly. ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Hi Hans, Thanks for your explanations, which clarify why sometimes ConTeXt may not work straight of TeXLive. Nevertheless I will contact the people who maintain MacTeX in order for them to be aware of the issue I encounter, so that hopefully in the future releases people would be able to use ConTeXt from MacTeX. Best regards: Otared
On 11 Aug 2020, at 17:25, Hans Hagen
wrote: Hi,
A few remarks.
In a mkiv luatex setup there are (on a unix system):
luatex : binary mtxrun : a copy of mtxrun.lua context : a shell script starting mtxrun
Now, the problem there is that these shebang lines are limited, i.e. there is no way to pass an argument and we need to start luatex in lua mode. This is why the program refered to is texlua which is a copy of or symlink to luatex and when called with that name it knows that it has to start in lua mode.
On windows there are two small stubs: mtxrun.exe and context.exe an both will start luatex (no need for texlua there) with the same script etc.
In a luametatex setup we have a uniform and simpler model.
luametatex : binary mtxrun : a copy of luametex or symlink to it context : a copy of luametex or symlink to it mtxrun.lua : used when mtxrun is started context.lua : used when context is started
So, here the 'context' link (or copy) from it's name knows to start in lua mode and load context.lua (which actually loads mtxrun.lua + mtx-context.lua). It's the same on all platforms.
Now, already long ago we ditched all other stubs simply because given the amount of scripts in a tex live setup it's a recipe for clashes (scripts also have to compete with programs / scripts installed as part of the os and other programs so even more opportunity for clashes). We just use
mtxrun --script ...
instead (and texmfstart in a mkii setup).
These models cannot be mixed, which is why in a luametatex lmtx setup we use "context --luatex" to start mkiv, where luametatex is the runner.
Hans
ps. I remember the times that context was considered bad because it needed a runner, read: a script was part of the deal and a tex run should not have such a depedency; the need to install perl or ruby was seen as a shortcoming. We also used scripts to generate font metric files (context didn't depend on other programs for toc and index generation and had just one auxiliary file). But times have changed and scripts are now hip and modern in the tex ecosysystem, which is why we basically limit ourselves to just 'context' and 'mtxrun' and start all the other context related scripts indirectly.
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Am 11.08.2020 um 16:57 schrieb Otared Kavian
: I don't have these files at this place, but in /opt/local/etc/texmf/ I do have /opt/local/etc/texmf/texmf.cnf /opt/local/etc/texmf/texmfcnf.lua the first one being created automatically when I tried to do mtxrun --generate after installing TeXLive2020. Ir says its content should not be modified directly and that its content is based on of the file /opt/local/etc/texmf/texmf.cnf.d The content of the above directory dates from 2019, and maybe that is why my logfile reports things being done with TeXLive2019.
The content of the file /opt/local/etc/texmf/texmfcnf.lua is written by Hans in date = "2012-05-24" time = "12-12-12".
Replacing /opt/local/etc/texmf/texmf.cnf with some other texmf.cnf does not help, since it is overwritten when one does mtxrun --generate
So the problem remains… Maybe I have to contact people who prepare MacTeX2020 and ask for help with them.
This looks like a Macports installation. When I call the Macports version of context I get: context --help resolvers | caches | path '/Users/axel/.texlive2020/texmf-var' created mtxrun | unknown script 'context.lua' or 'mtx-context.lua' If you want to use the Macports version of ConTeXt please install port install textlive-context after installing that I get: context --help mtx-context | ConTeXt Process Management 1.03 mtx-context | mtx-context | basic options: mtx-context | mtx-context | --run process (one or more) files (default action) mtx-context | --make create context formats mtx-context | mtx-context | --ctx=name use ctx file (process management specification) mtx-context | --noctx ignore ctx directives and flags mtx-context | --interface use specified user interface (default: en) mtx-context | mtx-context | --autopdf close pdf file in viewer and start pdf viewer afterwards mtx-context | --purge purge files either or not after a run (--pattern=...) mtx-context | --purgeall purge all files either or not after a run (--pattern=...) mtx-context | mtx-context | --usemodule=list load the given module or style, normally part of the distribution mtx-context | --environment=list load the given environment file first (document styles) mtx-context | --mode=list enable given the modes (conditional processing in styles) mtx-context | --path=list also consult the given paths when files are looked for mtx-context | --arguments=list set variables that can be consulted during a run (key/value pairs) mtx-context | --randomseed=number set the randomseed mtx-context | --result=name rename the resulting output to the given name mtx-context | --trackers=list set tracker variables (show list with --showtrackers) mtx-context | --directives=list set directive variables (show list with --showdirectives) mtx-context | --silent=list disable logcatgories (show list with --showlogcategories) mtx-context | --strip strip Lua code (only meant for production where no errors are expected) mtx-context | --errors=list show errors at the end of a run, quit when in list (also when --silent) mtx-context | --htmlerrorpage generate html error page instead (optional: =scite) mtx-context | --noconsole disable logging to the console (logfile only) mtx-context | --purgeresult purge result file before run mtx-context | mtx-context | --forcexml force xml stub mtx-context | --forcecld force cld (context lua document) stub mtx-context | --forcelua force lua stub (like texlua) mtx-context | --forcemp force mp stub mtx-context | mtx-context | --arrange run extra imposition pass, given that the style sets up imposition mtx-context | --noarrange ignore imposition specifications in the style mtx-context | mtx-context | --jit use luajittex with jit turned off (only use the faster virtual machine) mtx-context | --jiton use luajittex with jit turned on (in most cases not faster, even slower) mtx-context | mtx-context | --once only run once (no multipass data file is produced) mtx-context | --runs process at most this many times mtx-context | --forcedruns process this many times (permits for optimization trial runs) mtx-context | mtx-context | --batchmode run without stopping and do not show messages on the console mtx-context | --nonstopmode run without stopping mtx-context | mtx-context | --nosynctex never initializes synctex (for production runs) mtx-context | --synctex run with synctex enabled (better use \setupsynctex[state=start] mtx-context | mtx-context | --nodates omit runtime dates in pdf file (optional value: a number (this 1970 offset time) or string "YYYY-MM-DD HH:MM") mtx-context | --nocompression forcefully turns off compression in the backend mtx-context | --trailerid alternative trailer id (or constant one) mtx-context | mtx-context | --generate generate file database etc. (as luatools does) mtx-context | --paranoid do not descend to .. and ../.. mtx-context | --version report installed context version mtx-context | mtx-context | --global assume given file present elsewhere mtx-context | --nofile use dummy file as jobname mtx-context | mtx-context | mtx-context | More information about ConTeXt and the tools that come with it can be found at: mtx-context | mtx-context | maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context mtx-context | webpage : http://www.pragma-ade.nl / http://tex.aanhet.net mtx-context | wiki : http://contextgarden.net If you want to use MacTeX please uninstall Macports TeX Live and use the GUI installer of MacTeX. At least make sure that the /opt/local is not in your PATH when you call TeX from /Library/TeX/texbin. Greetings Axel
Dear Axel, Thank you very much for your attention and your hints, which solved my problems with ConTeXt from TeXLive2020. Indeed following your suugestion, I removed the /opt/local/etc/texmf/ directory, as well as all other tex related directories and files in /opt/local/, and then installed again MacTeX2020. In oder to be on the safe side, I rebuilt also the locate database, then rebooted my machine: after that I could run luatools --generate and now with context --version I have current version: 2020.03.10 14:44. However I don't know why I had tex related files in /opt/local/, which is used by MacPorts… I hope to be able to explain to my colleague how to run ConTeXt (LuaTeX) within TeXShop from MacTeX2020. Thanks to eveyone! Best regards: Otared
On 12 Aug 2020, at 08:26, Axel Kielhorn
wrote: Am 11.08.2020 um 16:57 schrieb Otared Kavian
: I don't have these files at this place, but in /opt/local/etc/texmf/ I do have /opt/local/etc/texmf/texmf.cnf /opt/local/etc/texmf/texmfcnf.lua the first one being created automatically when I tried to do mtxrun --generate after installing TeXLive2020. Ir says its content should not be modified directly and that its content is based on of the file /opt/local/etc/texmf/texmf.cnf.d The content of the above directory dates from 2019, and maybe that is why my logfile reports things being done with TeXLive2019.
The content of the file /opt/local/etc/texmf/texmfcnf.lua is written by Hans in date = "2012-05-24" time = "12-12-12".
Replacing /opt/local/etc/texmf/texmf.cnf with some other texmf.cnf does not help, since it is overwritten when one does mtxrun --generate
So the problem remains… Maybe I have to contact people who prepare MacTeX2020 and ask for help with them.
This looks like a Macports installation.
When I call the Macports version of context I get:
context --help resolvers | caches | path '/Users/axel/.texlive2020/texmf-var' created mtxrun | unknown script 'context.lua' or 'mtx-context.lua'
If you want to use the Macports version of ConTeXt please install
port install textlive-context
after installing that I get:
context --help mtx-context | ConTeXt Process Management 1.03 mtx-context | mtx-context | basic options: mtx-context | mtx-context | --run process (one or more) files (default action) mtx-context | --make create context formats mtx-context | mtx-context | --ctx=name use ctx file (process management specification) mtx-context | --noctx ignore ctx directives and flags mtx-context | --interface use specified user interface (default: en) mtx-context | mtx-context | --autopdf close pdf file in viewer and start pdf viewer afterwards mtx-context | --purge purge files either or not after a run (--pattern=...) mtx-context | --purgeall purge all files either or not after a run (--pattern=...) mtx-context | mtx-context | --usemodule=list load the given module or style, normally part of the distribution mtx-context | --environment=list load the given environment file first (document styles) mtx-context | --mode=list enable given the modes (conditional processing in styles) mtx-context | --path=list also consult the given paths when files are looked for mtx-context | --arguments=list set variables that can be consulted during a run (key/value pairs) mtx-context | --randomseed=number set the randomseed mtx-context | --result=name rename the resulting output to the given name mtx-context | --trackers=list set tracker variables (show list with --showtrackers) mtx-context | --directives=list set directive variables (show list with --showdirectives) mtx-context | --silent=list disable logcatgories (show list with --showlogcategories) mtx-context | --strip strip Lua code (only meant for production where no errors are expected) mtx-context | --errors=list show errors at the end of a run, quit when in list (also when --silent) mtx-context | --htmlerrorpage generate html error page instead (optional: =scite) mtx-context | --noconsole disable logging to the console (logfile only) mtx-context | --purgeresult purge result file before run mtx-context | mtx-context | --forcexml force xml stub mtx-context | --forcecld force cld (context lua document) stub mtx-context | --forcelua force lua stub (like texlua) mtx-context | --forcemp force mp stub mtx-context | mtx-context | --arrange run extra imposition pass, given that the style sets up imposition mtx-context | --noarrange ignore imposition specifications in the style mtx-context | mtx-context | --jit use luajittex with jit turned off (only use the faster virtual machine) mtx-context | --jiton use luajittex with jit turned on (in most cases not faster, even slower) mtx-context | mtx-context | --once only run once (no multipass data file is produced) mtx-context | --runs process at most this many times mtx-context | --forcedruns process this many times (permits for optimization trial runs) mtx-context | mtx-context | --batchmode run without stopping and do not show messages on the console mtx-context | --nonstopmode run without stopping mtx-context | mtx-context | --nosynctex never initializes synctex (for production runs) mtx-context | --synctex run with synctex enabled (better use \setupsynctex[state=start] mtx-context | mtx-context | --nodates omit runtime dates in pdf file (optional value: a number (this 1970 offset time) or string "YYYY-MM-DD HH:MM") mtx-context | --nocompression forcefully turns off compression in the backend mtx-context | --trailerid alternative trailer id (or constant one) mtx-context | mtx-context | --generate generate file database etc. (as luatools does) mtx-context | --paranoid do not descend to .. and ../.. mtx-context | --version report installed context version mtx-context | mtx-context | --global assume given file present elsewhere mtx-context | --nofile use dummy file as jobname mtx-context | mtx-context | mtx-context | More information about ConTeXt and the tools that come with it can be found at: mtx-context | mtx-context | maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context mtx-context | webpage : http://www.pragma-ade.nl / http://tex.aanhet.net mtx-context | wiki : http://contextgarden.net
If you want to use MacTeX please uninstall Macports TeX Live and use the GUI installer of MacTeX.
At least make sure that the /opt/local is not in your PATH when you call TeX from /Library/TeX/texbin.
Greetings Axel
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
Hello Otared,
Thank you very much for your attention and your hints, which solved my problems with ConTeXt from TeXLive2020.
Indeed following your suugestion, I removed the /opt/local/etc/texmf/ directory, as well as all other tex related directories and files in /opt/local/, and then installed again MacTeX2020. In oder to be on the safe side, I rebuilt also the locate database, then rebooted my machine: after that I could run luatools --generate and now with context --version I have current version: 2020.03.10 14:44.
However I don't know why I had tex related files in /opt/local/, which is used by MacPorts…
Some programs have dependencies on texlive. These are usually programs that create pdf via TeX. Glad I could help you. Greetings Axel
Dear Otared, On Thu, 13 Aug 2020 at 11:05, Otared Kavian wrote:
Indeed following your suugestion, I removed the /opt/local/etc/texmf/ directory, as well as all other tex related directories and files in /opt/local/, and then installed again MacTeX2020.
There is usually an easier way: just ensure that path to MacTeX comes before /opt/local/bin. What does port installed 'tex*' return? It's usually a somewhat bad idea to randomly delete a subset of files installed by a package manager. Mojca
Hi Mojca, You are correct about not removing « by hands » parts of a package… The reason for which I wen to that extremity was that I wanted absolutely to be sure to be able to run ConTeXt from TeXLive2020 in order to convince a few colleagues to experiment it with TeXShop. If I type in the Terminal port installed 'tex*' the answer is: None of the specified ports are installed. I guess this is because after having solved the problem I met with installing MacTeX2020, I had done: sudo port uninstall texlive-basic --follow-dependencies in order to uninstall ant TeX related package from Macports (I don't know how thos packages were installed, maybe when I tried to use asymptote, and since I couldn't use it from within ConTeXt I gave up…). Best regards: Otared
On 13 Aug 2020, at 16:57, Mojca Miklavec
wrote: Dear Otared,
On Thu, 13 Aug 2020 at 11:05, Otared Kavian wrote:
Indeed following your suugestion, I removed the /opt/local/etc/texmf/ directory, as well as all other tex related directories and files in /opt/local/, and then installed again MacTeX2020.
There is usually an easier way: just ensure that path to MacTeX comes before /opt/local/bin.
What does port installed 'tex*' return?
It's usually a somewhat bad idea to randomly delete a subset of files installed by a package manager.
Mojca ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
On Fri, 14 Aug 2020 at 09:43, Otared Kavian wrote:
Hi Mojca,
You are correct about not removing « by hands » parts of a package… The reason for which I wen to that extremity was that I wanted absolutely to be sure to be able to run ConTeXt from TeXLive2020 in order to convince a few colleagues to experiment it with TeXShop.
If I type in the Terminal port installed 'tex*' the answer is: None of the specified ports are installed.
I guess this is because after having solved the problem I met with installing MacTeX2020, I had done: sudo port uninstall texlive-basic --follow-dependencies in order to uninstall ant TeX related package from Macports (I don't know how thos packages were installed, maybe when I tried to use asymptote, and since I couldn't use it from within ConTeXt I gave up…).
Yes, Asymptote definitely depends on texlive. But I guess that John is open for some "bribery" to make Asymptote work better with ConTeXt :) Last time I tested (maybe that was a few years ago) it was certainly possible to set context as the "backend engine". What's missing is better integration though (to end up with almost as good integration as metapost/metafun offers), and 3D with javascript mousing support never worked either. Mojca
participants (4)
-
Axel Kielhorn
-
Hans Hagen
-
Mojca Miklavec
-
Otared Kavian