Manual Install
Jump to navigation
Jump to search
This guide is only tried and tested on GNU/ Linux, but should (hopefully) work on the other platforms. It is adjusted to some of the heuristics that context standalone uses. Words in brackets (i.e. {word}
) have to be substituted by your username or similar unique identifier.
Note that this is NOT a system wide install, but if you are reading this guide you probably know how to generalize this.
Preparations
- Create install directory (recommended name:
tex
):mkdir /home/{user}/tex
- Create the directory that houses the binaries:
mkdir -p /home/{user}/tex/texmf-linux-64/bin
- Add
/home/{user}/tex/texmf-linux-x64/bin
to yourPATH
. This depends on the specific shell you are using, for bash use the.bashrc
. Make sure the open a new shell (or logout and login again) for the change to take effect.
Fetch the files
- Clone the context archive from github into the
texmf-context
folder i.e.git clone git@github.com:contextgarden/context.git /home/{user}/tex/texmf-context
- Clone the font files into the
fonts
folder from githubgit clone git@github.com:contextgarden/context-distribution-fonts.git /home/{user}/tex/texmf/
- In order for the configuration to work:
cp /home/{user}/tex/texmf-context/web2c/contextcnf.lua /home/{user}/tex/texmf-context/web2c/texmfcnf.lua
. Check out/home/{user}/tex/texmf-context/web2c/readme.txt
to see why this is neccesary.
Compile
Execute build.sh --native
in texmf-context/source/luametatex
. The luametatex
binary will appear in the build
folder.
Install the Binary
- Copy the
luametatex
binary to/home/{user}/tex/texmf-linux-64/bin
- Symlink
context
andmtxrun
to this binary:ln -s /home/{user}/tex/texmf-linux-64/bin/luametatex /home/{user}/tex/texmf-linux-64/bin/mtxrun
andln -s /home/{user}/tex/texmf-linux-64/bin/luametatex /home/{user}/tex/texmf-linux-64/bin/context
.
- Copy the
context.lua
andmtxrun.lua
files from/home/{user}/tex/texmf-context/scripts/context
into the/home/{user}/tex/texmf-linux-x64/bin
directory. Make sure they are executable (i.e.chmod +x /home/{user}/tex/texmf-linux-x64/bin/mtxrun.lua
)
Finish the install
Run mtxrun --generate
. After that try to compile a test document to make sure it works.