Installing ConTeXt LMTX on MacOS
Since April 2019, there is a new flavor of ConTeXt, named « LuaMetaTeX » meant to integrate Lua, Metapost and TeX, the latter meaning ConTeXt. It is going to be self-contained and smaller than previous versions of ConTeXt mkiv and mkii.
Since a few users have encountered difficulties in installing, and updating to, beta releases of LuaMetaTeX on MacOS, below we describe an installtion procedure for MacOS. For other platforms the procedures are more or less analogous.
Installing on MacOS
- First download http://lmtx.pragma-ade.nl/install-lmtx/context-osx-64.zip
- Put the unzipped folder « context-osx-64 « whereever you wish: for instance in your home directory. Thus the path to your future LuaMetaTeX directory will be (and below this is what we assume)
- Open a Terminal window (Terminal.app is found in /Applications/Utilities). In the Terminal window type
- Then you should be able to execute the command
- It may happen that MacOS will not allow you to execute the above shell command, in particular this happens beginning with MacOS 10.15 Catalina, where GateKeeper tries to protect you against yourself… In that case, you should open the System Préferences (from the Apple menu) and there choose Security & Privacy, and go to the General pane. There you should be able to authorize the shell script which has been blocked to be executed.
- After that, if everything goes smoothly a complete functionning tree of LuaMetaTeX, complete with dozens of manuals, will be installed in the folder
and whenever you want to update your installation of LuaMetaTeX, it is enough to go to the above directory in Terminal and do again
- If you want to use LuaMetaTeX from the Terminal interface you should add the path of your installation to $PATH by adding this to your
(or any other flavor of shell interface you are using) by adding to that file the line
(if you have installed « context-osx-64 » elsewhere, please replace the segment « ~/context-osx-64 » with the path to that folder).
- A better choice is to use TeXShop . Once TeXShop is installed, go to
and there duplicate for instance the file « ConTeXt (LuaTeX).engine » (or any other of the files « .engine »). Name the duplicate
and open it in TeXShop (or any text editor). Replace the content of the file « LuaMetaTeX.engine » with the following lines:
#!/bin/bash export PATH=~/context-osx-64/tex/texmf-osx-64/bin:~/context-osx-64/bin:~/context-osx-64/tex/texmf-osx-64/bin ~/context-osx-64/tex/texmf-osx-64/bin/mtxrun --autogenerate --script context --directives="system.showerror" --autopdf "$1" --purgeall
then save and close the file.
- If you want to use LuaMetaTeX as your default TeX typesetter in TeXShop, go to TeXShop -> Preferences, then under the tab « Typesetting » and the « Default Command » section choose the radio button « Command listed below « and below that type
- In principle, once the above PATH has been added, typing in a Terminal window
you should get the path to context binary and its version. If this is the case, then you can typeset a file named « myfile.tex » from the Terminal by typing:
- It may happen that for some reasons not everything goes smoothly and you cannot typeset any document. In that case, try typing in a Terminal window:
in order to see whether
is present or not.
- If not, the download has not been complete.
- If luametatex is present, in the Terminal type:
and see whether it says, among other things:
Functionality : level 20191206
(here 20191206 is the date stamp of luametatex, of course this will change during time). If not, there might be an issue with the files you have downloaded.
- If yes, in the folder
remove the folder « texmf-cache » and then in the Terminal run:
In principle, after that, the folder texmf-cache is present again.
- If this is the case, in the Terminal window type:
context --make --all
If everything goes nicely, you should be able to see LuaMetaTeX functionning.