How can I use ConTeXt from TeXLive2020 ?
![](https://secure.gravatar.com/avatar/5faea8b4fa0adb143383811dc94f0d22.jpg?s=120&d=mm&r=g)
Hi all, I suggested to a friend, who is using plain TeX and LaTeX, to switch to ConTeXt, and since he is using TeXShop on MacOSX with a version of TeXLive2020 (named MacTeX2020), I thought he would just typeset a simple test document with the option « ConTeXt (LuaTeX) » from the menu in TeXShop, where it does appear. Unfortunately when doing this all he gets in the log file is: /sw/bin/init.csh: No such file or directory. mtxrun | unknown script 'context.lua' or 'mtx-context.lua' and I could not help him make the format (I do not have access to his machine, and I was trying to explain what to do on the phone). He cannot (or does not want) to install a standalone version of ConTeXt, and he thinks that since ConTeXt exists in TeXLive2020 it should work out of the box, as do plain TeX and LaTeX. My opinion is that he is right… But since for the tim ebeing this is not the case, can anyone explain what to do in order to enable ConTeXt running from TeXLive2020? Thanks in advance for any help: Otared K.
![](https://secure.gravatar.com/avatar/565476157eb3895a9c928ffce26d988d.jpg?s=120&d=mm&r=g)
On 10 Aug 2020, at 12:03, Otared Kavian
wrote: Hi all,
I suggested to a friend, who is using plain TeX and LaTeX, to switch to ConTeXt, and since he is using TeXShop on MacOSX with a version of TeXLive2020 (named MacTeX2020), I thought he would just typeset a simple test document with the option « ConTeXt (LuaTeX) » from the menu in TeXShop, where it does appear.
Unfortunately when doing this all he gets in the log file is:
/sw/bin/init.csh: No such file or directory.
My guess is that this missing init.csh is supposed to set up the correct PATH environment. But that is as far as my knowledge goes… Taco
![](https://secure.gravatar.com/avatar/880e9a15b17a0bf7159f4e31030a9be2.jpg?s=120&d=mm&r=g)
Am 10.08.2020 um 12:03 schrieb Otared Kavian
: Hi all,
I suggested to a friend, who is using plain TeX and LaTeX, to switch to ConTeXt, and since he is using TeXShop on MacOSX with a version of TeXLive2020 (named MacTeX2020), I thought he would just typeset a simple test document with the option « ConTeXt (LuaTeX) » from the menu in TeXShop, where it does appear.
Unfortunately when doing this all he gets in the log file is:
/sw/bin/init.csh: No such file or directory. mtxrun | unknown script 'context.lua' or 'mtx-context.lua'
and I could not help him make the format (I do not have access to his machine, and I was trying to explain what to do on the phone).
The TeXshop engine file says: # Before using this engine, you must run the following command once in Terminal: luatools --generate I probably did this when I installed TeXLive. But I’m a little irritated by /sw/bin/. Is this a real MacTeX installation and not something like homebrew? Let’s start with the simple things: What is the result of: which context it should be: /Library/TeX/texbin/context If that doesn’t work try: which pdflatex The result is probably not /Library/TeX/texbin/pdflatex but should give some indication where to look. There may be an old installation of MacTeX without Context somewhere in the path. If this is an old TeXShop installation, the Context engine may need an update because it points to the old PATH. Simply copy the engine from ~/Library/TeXShop/Engines/inactive/ConTeXt to ~/Library/TeXShop/Engines Hope this helps Axel
![](https://secure.gravatar.com/avatar/5faea8b4fa0adb143383811dc94f0d22.jpg?s=120&d=mm&r=g)
Hi Alex, Thank you and Taco for helping. In order to help solve the problem of running ConTeXt from MacTeX, I installed MacTeX2020 (which is the same as TeXLive2020). Now if in a Terminal window I do which context the answer is: /Library/TeX/texbin/context And the answer to which pdflatex is /Library/TeX/texbin/pdflatex Also the answer to: which luatools is /Library/TeX/texbin/luatools So the binaries are in /Library/TeX/texbin, which is in fact an alias for /usr/local/texlive/2020/bin/x86_64-darwin Now, as you and the « ConTeXt (LuaTeX) » engin suggest, if I do luatools --generate then the answer is: mtxrun | unknown script 'base.lua' or 'mtx-base.lua' It is possible that the version of mtxrun or luatools scripts in TeXLive are not working. I don't remember what I did with TeXLive2019 to fix the issue, but my concern is that if including ConTeXt in TeXLive is intended for people to use it, then it SHOULD run without such tweakings which, even for someone who is a regular user of ConTeXt, are not easy to find. The solution consisting of installing a standalone tree of ConTeXt, is not a real solution because many people do not know how to do it and, even if they could, then what would be the point of doing so much work for people who include a ConTeXt tree in TeXLive? Anyway, I apologize for my acrimonius remarks, and I thank you again for your help. Best regards: Otared
On 10 Aug 2020, at 12:39, Axel Kielhorn
wrote: Am 10.08.2020 um 12:03 schrieb Otared Kavian
: Hi all,
I suggested to a friend, who is using plain TeX and LaTeX, to switch to ConTeXt, and since he is using TeXShop on MacOSX with a version of TeXLive2020 (named MacTeX2020), I thought he would just typeset a simple test document with the option « ConTeXt (LuaTeX) » from the menu in TeXShop, where it does appear.
Unfortunately when doing this all he gets in the log file is:
/sw/bin/init.csh: No such file or directory. mtxrun | unknown script 'context.lua' or 'mtx-context.lua'
and I could not help him make the format (I do not have access to his machine, and I was trying to explain what to do on the phone).
The TeXshop engine file says:
# Before using this engine, you must run the following command once in Terminal: luatools --generate
I probably did this when I installed TeXLive.
But I’m a little irritated by /sw/bin/. Is this a real MacTeX installation and not something like homebrew?
Let’s start with the simple things:
What is the result of: which context
it should be: /Library/TeX/texbin/context
If that doesn’t work try:
which pdflatex
The result is probably not
/Library/TeX/texbin/pdflatex
but should give some indication where to look.
There may be an old installation of MacTeX without Context somewhere in the path.
If this is an old TeXShop installation, the Context engine may need an update because it points to the old PATH. Simply copy the engine from ~/Library/TeXShop/Engines/inactive/ConTeXt to ~/Library/TeXShop/Engines
Hope this helps 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 ___________________________________________________________________________________
![](https://secure.gravatar.com/avatar/565476157eb3895a9c928ffce26d988d.jpg?s=120&d=mm&r=g)
On 10 Aug 2020, at 14:59, Otared Kavian
wrote: Hi Alex,
Thank you and Taco for helping. In order to help solve the problem of running ConTeXt from MacTeX, I installed MacTeX2020 (which is the same as TeXLive2020). Now if in a Terminal window I do which context the answer is: /Library/TeX/texbin/context And the answer to which pdflatex is /Library/TeX/texbin/pdflatex Also the answer to: which luatools is /Library/TeX/texbin/luatools
So the binaries are in /Library/TeX/texbin, which is in fact an alias for /usr/local/texlive/2020/bin/x86_64-darwin
Now, as you and the « ConTeXt (LuaTeX) » engin suggest, if I do luatools --generate
Does mtxrun —generate work?
![](https://secure.gravatar.com/avatar/46562c7d27388490d62e8d7a5bc960dd.jpg?s=120&d=mm&r=g)
On 8/10/2020 2:59 PM, Otared Kavian wrote:
Hi Alex,
Thank you and Taco for helping. In order to help solve the problem of running ConTeXt from MacTeX, I installed MacTeX2020 (which is the same as TeXLive2020). Now if in a Terminal window I do which context the answer is: /Library/TeX/texbin/context And the answer to which pdflatex is /Library/TeX/texbin/pdflatex Also the answer to: which luatools is /Library/TeX/texbin/luatools
So the binaries are in /Library/TeX/texbin, which is in fact an alias for /usr/local/texlive/2020/bin/x86_64-darwin
Now, as you and the « ConTeXt (LuaTeX) » engin suggest, if I do luatools --generate then the answer is: mtxrun | unknown script 'base.lua' or 'mtx-base.lua' It is possible that the version of mtxrun or luatools scripts in TeXLive are not working.
I don't remember what I did with TeXLive2019 to fix the issue, but my concern is that if including ConTeXt in TeXLive is intended for people to use it, then it SHOULD run without such tweakings which, even for someone who is a regular user of ConTeXt, are not easy to find. The solution consisting of installing a standalone tree of ConTeXt, is not a real solution because many people do not know how to do it and, even if they could, then what would be the point of doing so much work for people who include a ConTeXt tree in TeXLive?
Anyway, I apologize for my acrimonius remarks, and I thank you again for your help. The luatools script was there to offer some kpse like functionality but it has been obsolete for ages (the generate was in mtx-base at that time). Just use
mtxrun --generate or context --make which does a generate anyway (normally) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/5faea8b4fa0adb143383811dc94f0d22.jpg?s=120&d=mm&r=g)
Hi Hans and Taco, Thanks for the help! Doing context --make results in mtxrun | unknown script 'context.lua' or 'mtx-context.lua' Doing mtxrun --generate results in the lines (and much more): resolvers | resolving | variable 'SELFAUTOLOC' set to '/opt/local/libexec/texlive/binaries' resolvers | resolving | variable 'SELFAUTODIR' set to '/opt/local/libexec/texlive' resolvers | resolving | variable 'SELFAUTOPARENT' set to '/opt/local/libexec' resolvers | resolving | variable 'TEXMFCNF' set to '' resolvers | resolving | variable 'TEXMF' set to '' resolvers | resolving | variable 'TEXOS' set to 'texlive' resolvers | resolving | resolvers | resolving | using configuration specification 'home:texmf/web2c;/opt/local/etc/texmf' resolvers | resolving | resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/Users/kavian/texmf/web2c' from specification 'home:texmf/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on weird path '/opt/local/etc/texmf' from specification '/opt/local/etc/texmf' resolvers | resolving | found regular configuration file '/opt/local/etc/texmf/texmfcnf.lua' The directory /opt/local/libexec/texlive/binaries exists and contains (among other things) « context » which is a symlink to /opt/local/share/texmf-texlive/scripts/context/stubs/unix/context which does not exist… Best regards: Otared
On 10 Aug 2020, at 15:20, Hans Hagen
wrote: On 8/10/2020 2:59 PM, Otared Kavian wrote:
Hi Alex, Thank you and Taco for helping. In order to help solve the problem of running ConTeXt from MacTeX, I installed MacTeX2020 (which is the same as TeXLive2020). Now if in a Terminal window I do which context the answer is: /Library/TeX/texbin/context And the answer to which pdflatex is /Library/TeX/texbin/pdflatex Also the answer to: which luatools is /Library/TeX/texbin/luatools So the binaries are in /Library/TeX/texbin, which is in fact an alias for /usr/local/texlive/2020/bin/x86_64-darwin Now, as you and the « ConTeXt (LuaTeX) » engin suggest, if I do luatools --generate then the answer is: mtxrun | unknown script 'base.lua' or 'mtx-base.lua' It is possible that the version of mtxrun or luatools scripts in TeXLive are not working. I don't remember what I did with TeXLive2019 to fix the issue, but my concern is that if including ConTeXt in TeXLive is intended for people to use it, then it SHOULD run without such tweakings which, even for someone who is a regular user of ConTeXt, are not easy to find. The solution consisting of installing a standalone tree of ConTeXt, is not a real solution because many people do not know how to do it and, even if they could, then what would be the point of doing so much work for people who include a ConTeXt tree in TeXLive? Anyway, I apologize for my acrimonius remarks, and I thank you again for your help. The luatools script was there to offer some kpse like functionality but it has been obsolete for ages (the generate was in mtx-base at that time). Just use
mtxrun --generate
or
context --make
which does a generate anyway (normally)
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/880e9a15b17a0bf7159f4e31030a9be2.jpg?s=120&d=mm&r=g)
The luatools script was there to offer some kpse like functionality but it has been obsolete for ages (the generate was in mtx-base at that time). Just use
mtxrun --generate
Should the comment in the engine file change? Context is called with: mtxrun --script context --autogenerate --synctex=1 "$1“ Greetings Axel
![](https://secure.gravatar.com/avatar/880e9a15b17a0bf7159f4e31030a9be2.jpg?s=120&d=mm&r=g)
Am 10.08.2020 um 14:59 schrieb Otared Kavian
: It is possible that the version of mtxrun or luatools scripts in TeXLive are not working.
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 don't remember what I did with TeXLive2019 to fix the issue, but my concern is that if including ConTeXt in TeXLive is intended for people to use it, then it SHOULD run without such tweakings which, even for someone who is a regular user of ConTeXt, are not easy to find.
Well, it works here on a (relatively) clean install of 10.13.
The solution consisting of installing a standalone tree of ConTeXt, is not a real solution because many people do not know how to do it and, even if they could, then what would be the point of doing so much work for people who include a ConTeXt tree in TeXLive?
It should work.
Anyway, I apologize for my acrimonius remarks, and I thank you again for your help.
One more thing: Please look at environment variables starting with TEX and comment them, they will cause problems. 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. Greetings Axel
![](https://secure.gravatar.com/avatar/5faea8b4fa0adb143383811dc94f0d22.jpg?s=120&d=mm&r=g)
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
participants (4)
-
Axel Kielhorn
-
Hans Hagen
-
Otared Kavian
-
Taco Hoekwater