Installing & Updating ConTeXt Standalone
Serge Y. Stroobandt
Copyright 2014–2015, licensed under Creative Commons BY-NC-SA
Introduction
The text below is a compilation of heavily edited excerpts from the pages entitled “ConTeXt Standalone” and “Ubuntu,” over at the contextgarden.net wiki. Both pages are licensed under the GNU Free Document License. Only information relevant to the system-wide GNU/Linux installation has been copied here. I have also added a bit of my own sed
spice to enhance its digestion…
System-wide installation
A system wide installation is one which is located in /opt/context
. At present, in order to use ConTeXt MkIV, write permissions are required1 in the installation directory.2
$ sudo mkdir /opt/context
$ sudo chown $USER /opt/context
$ cd /opt/context
$ wget http://minimals.contextgarden.net/setup/first-setup.sh
$ sh ./first-setup.sh --modules=all
$ ./tex/setuptex
The last step installs ConTeXt MkIV beta, including all modules and other third party content. This may take a considerable amount of time to complete.
Compared to LaTeX 2ε, ConTeXt MkIV is relatively new and still in active development. However, as a development version, ConTeXt MkIV beta is very stable and should not be feared for everyday use. It is not as “bleeding edge” as the nightly build of Context MkIV, available as a PPA elsewhere. If instead the stable version of ConTeXt MkIV is preferred, use:
Cache
To create the required cache directory:
$ sudo mkdir /var/cache/context
$ sudo mkdir /var/cache/context/texmf-cache
$ sudo chmod 777 /var/cache/context/texmf-cache
$ sed -i 's|TEXMFCACHE\(.*\)".*"|TEXMFCACHE\1"/var/cache/context/texmf-cache"|' /opt/context/tex/texmf/web2c/texmfcnf.lua
The last line changes the value of TEXMFCACHE
to "/var/cache/context/texmf-cache"
.
bashrc
Add these four lines to ~/.bashrc
:
# ConTeXt
export OSFONTDIR=/usr/share/fonts/:$HOME/.fonts
export TEXROOT=/opt/context/tex
PATH="/opt/context/tex/texmf-linux-64/bin:/opt/context/bin:$PATH"
On 32-bit systems, just drop the -64
from the last line. Note that the order of items in PATH
is significant. Putting /usr/local/context/bin
first, would produce an error at run time. Finally, in order to have the changes take effect in your current shell, issue:
Version checking
$ context --version
mtx-context | ConTeXt Process Management 0.60
mtx-context |
mtx-context | main context file: /opt/context/tex/texmf-context/tex/context/base/context.mkiv
mtx-context | current version: 2014.02.01 14:22
Updating
Updating ConTeXt to the latest version is really easy.
For convenience, a bash script called update-context
is created:
# !/bin/bash
cd /opt/context
wget http://minimals.contextgarden.net/setup/first-setup.sh
./first-setup.sh --modules=all
From now on, just call sbin/update-context
to put ConTeXt up to date.
This work is licensed under a Creative Commons Attribution‑NonCommercial‑ShareAlike 4.0 International License.
Other licensing available on request.
Unless otherwise stated, all originally authored software on this site is licensed under the terms of GNU GPL version 3.
This static web site has no backend database.
Hence, no personal data is collected and GDPR compliance is met.
Moreover, this domain does not set any first party cookies.
All Google ads shown on this web site are, irrespective of your location,
restricted in data processing to meet compliance with the CCPA and GDPR.
However, Google AdSense may set third party cookies for traffic analysis and
use JavaScript to obtain a unique set of browser data.
Your browser can be configured to block third party cookies.
Furthermore, installing an ad blocker like EFF's Privacy Badger
will block the JavaScript of ads.
Google's ad policies can be found here.
transcoded by to make it run as secure JavaScript in the browser.