ConTeXt Standalone

From ConTeXt wiki
Revision as of 11:56, 4 June 2010 by Patrick Gundlach (talk | contribs) (Reverted edits by Enrikem (Talk) to last version by Adam.fuller)

< Installation | Minimals/FAQ | Minimals/Tree | Minimals/Structure | Minimals/Implementation | Minimals/TODO | Minimals/Contents | Minimals/TeX Live >

The ConTeXt Minimal is a complete, up-to-date ConTeXt distribution which can be upgraded efficiently. It can be used to install either the stable or the beta version of ConTeXt. It can also be used in parallel with existing TeX installtions such as MikTeX, TeXLive, or older minimal installation. It is aimed towards ConTeXt users, so it does not include LaTeX specific packages and binaries.

NOTE: ConTeXt develops at a fast pace, and sometimes beta releases have serious bugs. ConTeXt minimals allow you to test the latest ConTeXt release without having to worry if an upgrade will mess an critical project. You can have two (or multiple) parallel ConTeXt minimals, and freeze one for your critical projects, and use the other one for experimenting.

General Information

Supported platforms

Platform Short name Binaries by Notes
Windows mswin Akira Kakuto (W32TeX)
Linux linux Hans Hagen compiled with glibc 2.3.6
Linux, 64-bit linux-64 Peter Münster might be renamed to linux-amd64
Linux, PowerPC linux-ppc Piotr Kopszak
Mac OS X, Intel (32-bit) osx-intel Mojca Miklavec
Mac OS X, Intel (64-bit) osx-64 Mojca Miklavec
Mac OS X, PowerPC osx-ppc Mojca Miklavec
Mac OS X, Universal Binaries osx-universal Mojca Miklavec not used
FreeBSD freebsd Yue Wang, Diego Depaoli might be renamed to freebsd-intel
FreeBSD, AMD64 freebsd-amd64 Michael Krauß
kFreeBSD kfreebsd-i386 Alan Braslau FreeBSD + glibc (Debian)
Solaris, Intel sunos-intel Michael Krauß not maintained
Solaris, Sparc sun Vladimir Volovich compiled on solaris 8, not maintaned

We need volunteers for providing binaries for other platforms. If you want to support a platform, please write to ConTeXt Mailing Lists


  • Ruby 1.8 or newer
  • Rsync (The windows binary of rsync are distributed with the minimals)

Disc space required

ConTeXt macro files are small (less than 10MB), but the minimals comes with various free fonts which considerable increase the size of the distribution to around 200MB).

Installation tree

Browse the installation tree

Simple instructions for installing on Unix like system (Linux/Mac OSX/FreeBSD/Solaris)

If you do not use LaTeX and want to install the minimals in your home directory, follow these instructions. Otherwise, read the more detailed instructions in the next section.

  • Open a new terminal. You're in your home folder (~) now.
  • Type the boxed sections. End every line with [Return]. Leave out the $, that's your shell prompt!
  • Create the context folder and change into it:
 $ mkdir context
 $ cd context
  • Download
 $ rsync -av rsync:// .
  • Run it and go make tea:
 $ sh ./
  • Run the path setup:
 $ source ./tex/setuptex

ConTeXt should work now (i.e. at this moment in this terminal); you need to run the path setup with every new terminal window; to automate that, you can add the setuptex command to your "profile", that's a script that gets called with every new terminal. If you are using bash you can do.

 $ cd
 $ echo '. ~/context/tex/setuptex' >> .bash_profile

For other shells, replace .bash_profile by the corresponding file for your shell.

That's it.

Detailed information on installation and use on Unix-like platforms (Linux/MacOS X/FreeBSD/Solaris)

Single user installation

Select a folder where you want to install ConTeXt. We recommend that you can use your $HOME/context directory. Create this folder. Then download and place it in $HOME/context directory. Open a terminal, then:

 cd context

Then make executable and run it to download the whole distribution and make formats:

 chmod +x
 sh ./

This takes a long time, so go have a coffee.

By default, the minimals installs ConTeXt beta. If you want the stable version of ConTeXt, you can use

sh ./ --context=current

System-wide installation

A system wide installation is only recommeded for users who are comfortable with the command line. Only the location of installing ConTeXt is different for a system wide installation. In Linux you can use /opt/context; on MacOS X you can use /Applications/ConTeXt

Note that, at present, while using MkIV, you need to have write permissions[1] in the installation directory.[2] So, if you are installing the minimals in /opt/context or /Applications/ConTeXt, run

 chown whoami -R /opt/context 


 chown whoami -R /Applications/ConTeXt

(whoami outputs your user name, you can type that directly, of course.)

In order to install the minimals, open a terminal, go to the installation directory and download

 $ rsync -av rsync:// .

Then run that script to download the whole distribution and make formats:

 sh ./

This takes a long time, so go have a coffee.

By default, the minimals installs ConTeXt beta. If you want the stable version of ConTeXt, you can use

sh ./ --context=current

The funtoo way

If you are using funtoo there are ebuilds that will make an installation as easy as installing any other package from portage. Take a look at the ConTeXt Minimals Funtoo Howto. This might also work for gentoo, but is untested right now.

Proxy settings

The installation script uses rsync to fetch the required files. So, if you are behind a proxy server, you need to tell the details to rsync. The easiest way to set this is to set RSYNC_PROXY variable in the terminal or your startup script (.bashrc or the corresponding file for your shell). Replace username, password, proxyhost and proxyport with the correct information

 export RSYNC_PROXY=username:password@proxyhost:proxyport


ConTeXt minimals works in a non-interfering manner because it does not put anything in your $PATH and does not set any system variables. This in turn means that in order to use it, you need to do some initialization. An intialization script called setuptex is provided in installation-dir/tex/.

If you run context from a terminal, source setuptex before running ConTeXt. This depends on the shell that you are using.

  • bash users can use
  source /installation-dir/tex/setuptex
  • zsh users can use
  . /installation-dir/tex/setuptex
  • (t)csh users can use
  source /installation-dir/tex/setuptex.csh

If you do not know which shell you are using, open a terminal and type

 echo $SHELL

Exclusive usage

The above method means that you always have to type source /installation-dir/tex/setuptex in a terminal before you can use typeset. If you always use ConTeXt minimals and never use LaTeX or plain TeX provided by another TeX distribution, you can add the above intialization line to the startup script of your shell. For bash, this means $HOME/.bashrc; for zsh, this means $HOME/.zshrc; for (t)csh, this means $HOME/.cshrc or $HOME/.tcshrc. Then, setuptex will always be sourced in your terminal.

Integrating with an editor

If you run ConTeXt from an editor, you need to source setuptex in a terminal and then open your editor from the same terminal. I.e. if you run your editor from the shell.

Depending on how your editor intializes, you may still need to source it in order to run ConTeXt directly from your editor, In theory, it is sufficient to add /installation-dir/tex/texmf-<platform>/bin to your PATH in order to use the minimals. You can try to add this to the paths that your editor searches.

For information about configuring Smultron and TeXShop (which are popular TeX editors on Mac) see ConTeXt Minimals/Mac Installation


For updating the ConTeXt minimals, just run again.

Or better: first update, then run it. You could also create an alias or a little script “ctx-update” with the following example contents:

cd /opt/context
rsync -ptv rsync:// .
./ --extras=all


ConTeXt minimals does not touch anything outside its installation folder. So to uninstall it, you can simply remove the installation folder.

Remaking formats

Normally, the update script should create the formats for you. If for some reason you need to recreate the formats, you can do the following:

  • For making MKII format.
texexec --make --all 
  • For making XeTeX format
texexec --make --xtx --all 
  • For making MKIV format
luatools --selfupdate
mtxrun --selfupdate
luatools --generate
context --make

Installation and use on Windows

If you want to use ConTeXt minimals alongside MikTeX/TeXLive (needed if you also run LaTeX), follow the command-line installation method. Otherwise, you can follow either the command line or GUI installation method.


Command line method

Download and unzip to a directory where you want to install ConTeXt. It is recommended that you choose a directory that does not have a space in its full path. Then open cmd.exe, go to the installation directory and run


This takes a long time, so go have a coffee.

By default, the minimals installs ConTeXt beta. If you want the stable version of ConTeXt, you can use

 first-setup.bat --context=current

GUI Installer

There is also a GUI installer made by Vyatcheslav Yatskovsky. Download and run the installer and it will ask you where to install the minimals, which distribution to use (stable or beta) and whether or not you want to make formats.

NOTE: The GUI installer asks if you want to set environmental variables globally. Click this only if you do not use MikTeX or TeXLive and do not plan to use LaTeX

You should also see the slides giving details about the GUI installer.

Proxy settings

The installation script uses rsync to fetch the required files. So, if you are behind a proxy server, you need to tell the details to rsync. The easiest way to set this is to set RSYNC_PROXY variable in the terminal as (replace username, password, proxyhost and proxyport with the correct information)

  set RSYNC_PROXY=username:password@proxyhost:proxyport

or set the variable permanently as a Windows environment variable.


If you used the GUI installer and said yes to setting the evironmental variables globally, then you can run ConTeXt from anywhere. Otherwise, before running ConTeXt, you need to run setuptex.bat which is provided in installation-dir\tex\. This can be done by typing


on cmd.exe before you run ConTeXt. To avoid always having to type this, you can create a shortcut to cmd.exe and edit the command line to read (assuming you installed the minimals in C:\Programs; otherwise replace C:\Programs\ with your installation directory)

 C:\WINDOWS\System32\cmd.exe /k C:\Programs\context\tex\setuptex.bat

This starts up a new command shell with the environment pre-loaded.

Use ConTeXt with Cygwin

After installing the ConTeXt minimals, you can run it under Cygwin. With Cygwin, you may use gmake and other Unix tools for your automated workflow.

  1. Run setuptex.bat in DOS command prompt
  2. In the same DOS prompt, enter Cygwin by running cygwin.bat
  3. Under Cygwin prompt, run context.cmd test.tex . Note that the .cmd extension is needed under Cygwin.


If you used the command line method, just run first-setup.bat again to update the minimals. If you have third party modules installed, you should use

 first-setup.bat --keep

to upgrade. See Installing third party modules for details.

If you used the GUI installer, just run the installer again.


If you used the command-line installer, you can just delete the installation directory to uninstall the minimals.

If you used the GUI installer, you can use standard windows tools for uninstallation.


  • rsync sometimes has problems with paths with uppercase letters (like c:\Temp or C:\Documents and Settings). Installing into all-lowercase paths without spaces sometimes helps.
  • Directory-name length may also have an effect, due to Windows's 8.3 filename conventions. An indicator is if running "texexec --lua" on a file produces missing-file warnings containing Windows-created 8-character directory names, such as "C:\CONTEX~1\tex", where your ConTeXt directory is really "C:\context_minimals\tex". Be conservative and choose a short name like "C:\ctm\tex". Also, this may even work when an 8-character-or-less directory name like "C:\ctexmin\tex" doesn't.
  • If you're behind firewall and rsync times out, you need to open port 873 for outgoing TCP connections.

Installing third party modules

The ConTeXt Minimals only come with Taco's t-bib module. If you want to install a new module, say Wolfgang's t-letter module, you can use --extras="t-letter"

If you want to install more than one extra module, you can separate them by commas. So, to install the t-letter and t-mathsets module, do

 sh ./ --extras="t-letter,t-mathsets"

If you want to install all extra modules at once, do

 sh ./ --extras=all

Reverting to an older installation

If, for some reason, you want to revert to an older installation, you can do that by

 sh ./ --context=date

where date is the date of one of the stable releases of ConTeXt. The complete list of old releases that are available is here.


  1. Actually, you only need write permission for $TEXMFCACHE.
  2. This effectively means that only one user will be able to generate the formats