Difference between revisions of "Installing ConTeXt LMTX on MacOS"
NeueDarshan (talk | contribs) (Restructured & improved readability (by SublimeText.Mediawiker)) |
m (remove unnecessary 10.15 stuff) |
||
(12 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | Since a few users have encountered difficulties in installing, and updating to, beta releases of ConTeXt LMTX on macOS, below we describe an installation procedure for macOS. For other platforms the procedures are more or less analogous. | + | Since a few users have encountered difficulties in installing, and updating to, beta releases of [[Installation|ConTeXt LMTX]] on macOS, below we describe an installation procedure for macOS. For other platforms the procedures are more or less analogous. |
− | == Installing LMTX on | + | == Installing LMTX on MacOS == |
− | + | First download [http://lmtx.pragma-ade.nl/install-lmtx/context-osx-64.zip context-osx-64.zip]. Put the unzipped folder {{code|context-osx-64/}} wherever you wish—for instance, in your home directory. Thus the path to your future LMTX directory will be {{code|'''~/context-osx-64/'''}} (from now on, this is what we assume). | |
− | |||
− | First download | ||
Open a Terminal window ({{code|Terminal.app}} is found in {{code|/Applications/Utilities/}}). In the Terminal window type | Open a Terminal window ({{code|Terminal.app}} is found in {{code|/Applications/Utilities/}}). In the Terminal window type | ||
Line 11: | Line 9: | ||
Then you should be able to execute the command | Then you should be able to execute the command | ||
sh install.sh | sh install.sh | ||
− | |||
− | |||
After that, if everything goes smoothly, a complete functioning tree of LMTX, complete with dozens of manuals, will be installed in {{code|'''~/context-osx-64/'''}}. Whenever you want to update your installation of LMTX, it is enough to go to that directory in Terminal & run the installation script again: | After that, if everything goes smoothly, a complete functioning tree of LMTX, complete with dozens of manuals, will be installed in {{code|'''~/context-osx-64/'''}}. Whenever you want to update your installation of LMTX, it is enough to go to that directory in Terminal & run the installation script again: | ||
sh install.sh | sh install.sh | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Running LMTX from the Terminal == | == Running LMTX from the Terminal == | ||
− | If you want to run LMTX from the Terminal interface in any directory, you should add the path of your installation to $PATH by adding this to your {{code|.bashrc}} (or another configuration file, depending on your flavor of shell interface): | + | If you want to run LMTX from the Terminal interface in any directory, you should add the path of your installation to $PATH by adding this to your {{code|.bashrc}} (10.14 and earlier) or {{code|.zshenv}} (10.15) (or another configuration file, depending on your flavor of shell interface): |
− | export PATH=$PATH | + | export PATH=$PATH:'''~/context-osx-64/'''tex/texmf-osx-64/bin |
''Reminder: if you have installed {{code|context-osx-64/}} elsewhere, please replace the segment {{code|'''~/context-osx-64/'''}} in the above code with the path to that directory.'' | ''Reminder: if you have installed {{code|context-osx-64/}} elsewhere, please replace the segment {{code|'''~/context-osx-64/'''}} in the above code with the path to that directory.'' | ||
Line 76: | Line 51: | ||
Alternatively, you could use a TeX editor such as [https://pages.uoregon.edu/koch/texshop/obtaining.html TeXShop]. Once TeXShop is installed, go to {{code|~/Library/TeXShop/Engine/}}, create a new file named {{code|ConTeXt LMTX.engine}}, open it in your preferred text editor, and add the following lines: | Alternatively, you could use a TeX editor such as [https://pages.uoregon.edu/koch/texshop/obtaining.html TeXShop]. Once TeXShop is installed, go to {{code|~/Library/TeXShop/Engine/}}, create a new file named {{code|ConTeXt LMTX.engine}}, open it in your preferred text editor, and add the following lines: | ||
#!/bin/bash | #!/bin/bash | ||
− | export PATH=$PATH | + | export PATH=$PATH:'''~/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 | '''~/context-osx-64/'''tex/texmf-osx-64/bin/mtxrun --autogenerate --script context --directives="system.showerror" --autopdf "$1" --purgeall | ||
Line 84: | Line 59: | ||
If you want to use LMTX as your default TeX typesetter in TeXShop, go to TeXShop -> Preferences, then under the tab Typesetting, in the Default Command section, choose the radio button "Command listed below", then type {{code|ConTeXt LMTX}} below that. | If you want to use LMTX as your default TeX typesetter in TeXShop, go to TeXShop -> Preferences, then under the tab Typesetting, in the Default Command section, choose the radio button "Command listed below", then type {{code|ConTeXt LMTX}} below that. | ||
+ | ---- | ||
+ | {{Installation navbox}} | ||
+ | [[Category:Installation]] | ||
+ | [[Category:Standalone]] |
Latest revision as of 09:51, 7 July 2020
Since a few users have encountered difficulties in installing, and updating to, beta releases of ConTeXt LMTX on macOS, below we describe an installation procedure for macOS. For other platforms the procedures are more or less analogous.
Installing LMTX on MacOS
First download context-osx-64.zip. Put the unzipped folder context-osx-64/
wherever you wish—for instance, in your home directory. Thus the path to your future LMTX directory will be ~/context-osx-64/
(from now on, this is what we assume).
Open a Terminal window (Terminal.app
is found in /Applications/Utilities/
). In the Terminal window type
cd ~/context-osx-64/
Then you should be able to execute the command
sh install.sh
After that, if everything goes smoothly, a complete functioning tree of LMTX, complete with dozens of manuals, will be installed in ~/context-osx-64/
. Whenever you want to update your installation of LMTX, it is enough to go to that directory in Terminal & run the installation script again:
sh install.sh
Running LMTX from the Terminal
If you want to run LMTX from the Terminal interface in any directory, you should add the path of your installation to $PATH by adding this to your .bashrc
(10.14 and earlier) or .zshenv
(10.15) (or another configuration file, depending on your flavor of shell interface):
export PATH=$PATH:~/context-osx-64/tex/texmf-osx-64/bin
Reminder: if you have installed context-osx-64/
elsewhere, please replace the segment ~/context-osx-64/
in the above code with the path to that directory.
In principle, once your PATH has been modified, typing in a Terminal window
which context
or
context --version
you should get the path to the ConTeXt binary and its version. If this is the case, then you can typeset a file named myfile.tex
from the Terminal by typing:
context myfile.tex
It may happen that for some reason not everything goes smoothly & you cannot typeset any document. In that case, try typing in a Terminal window:
which luametatex
in order to see whether ~/context-osx-64/tex/texmf-osx-64/bin/luametatex
is present or not. If not, the download is incomplete.
If luametatex
is present, in the Terminal type:
luametatex --version
and see whether it says, among other things:
Functionality : level 20191206
(here 20191206
is the date stamp of luametatex
; this will change over time, of course). If not, there might be an issue with the files you have downloaded.
If there is no issue, in ~/context-osx-64/tex/
, remove the directory texmf-cache/
, then in the Terminal run:
mtxrun --generate
After that, in principle, the directory texmf-cache/
should be 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 LMTX functioning.
Running LMTX from TeXShop
Alternatively, you could use a TeX editor such as TeXShop. Once TeXShop is installed, go to ~/Library/TeXShop/Engine/
, create a new file named ConTeXt LMTX.engine
, open it in your preferred text editor, and add the following lines:
#!/bin/bash export PATH=$PATH:~/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
Reminder: if you have installed context-osx-64/
elsewhere, please replace the segment ~/context-osx-64/
in the above code with the path to that directory.)
Save & close the file.
If you want to use LMTX as your default TeX typesetter in TeXShop, go to TeXShop -> Preferences, then under the tab Typesetting, in the Default Command section, choose the radio button "Command listed below", then type ConTeXt LMTX
below that.
|