ConTeXt Standalone
The ConTeXt suite is a complete, up-to-date ConTeXt distribution that can be upgraded efficiently. It can also be used in parallel with existing TeX installations such as MikTeX, TeXLive, and so forth. The suite does not include LaTeX packages and binaries.
Sometimes ConTeXt beta releases have issues. The ConTeXt suite allows you to test the latest ConTeXt release without worrying whether upgrading will corrupt a critical project. Multiple ConTeXt suite installations are possible. This allows, for example, a stable version and a beta version to run in parallel on the same computer.
ConTeXt is also included in TeXlive. The ConTeXt suite is updated continuously, whereas ConTeXt in TeXlive is updated less often. In particular, luatex
and metapost
are under active development and their binaries are updated frequently. ConTeXt follows these developments, indeed often drives development. As the binaries included in the TeXlive distribution are only updated yearly, ConTeXt on TeXlive will necessarily be less current than the ConTeXt suite. (ConTeXt on TeXlive can be kept somewhat more current using the http://tlcontrib.metatex.org repository.) The ConTeXt suite is self-contained and can happily coexist alongside another installed TeX distribution.
General Information
Supported platforms
Platform | Short name | Binaries by | Notes |
---|---|---|---|
Windows | mswin | Akira Kakuto (W32TeX) | |
Linux | linux | Hans Hagen, Mojca Miklavec, Alan Braslau | compiled with glibc 2.3.6 |
Linux, 64-bit | linux-64 | Alan Braslau | |
Linux, PowerPC | linux-ppc | Piotr Kopszak | |
Linux, Arm (low end.) | linux-armel | Boris Veytsman | in progress |
Mac OS X, Intel (32-bit) | osx-intel | Richard Koch, Mojca Miklavec | |
Mac OS X, Intel (64-bit) | osx-64 | Richard Koch, Mojca Miklavec | |
Mac OS X, PowerPC | osx-ppc | Richard Koch, Mojca Miklavec | |
Mac OS X, Universal Binaries | osx-universal | Richard Koch, Mojca Miklavec | |
FreeBSD | freebsd | Alan Braslau | |
FreeBSD, 64-bit | freebsd-amd64 | Alan Braslau | |
kFreeBSD | kfreebsd-i386 | Alan Braslau | FreeBSD + glibc (Debian) |
kFreeBSD, 64-bit | kfreebsd-amd64 | Alan Braslau | FreeBSD + glibc (Debian) |
Solaris, Intel | solaris-intel | Marco Patzer | |
Solaris, Sparc | solaris-sparc | Mojca Miklavec | Solaris 10 on OpenCSW |
We need volunteers for providing binaries for other platforms. If you want to support a platform, please write to ConTeXt Mailing Lists
Dependencies
- Ruby 1.8 or newer (used for MKII)
- Rsync (The windows binary of rsync is distributed within the suite)
The following programs are not required for running ConTeXt, but their installation adds additional functionality.
- ghostscript : for converting PostScript images to PDF
- graphicsmagick : for converting GIF and TIFF images
- inkscape : for converting SVG and compressed SVG
- pstoedit : for converting PostScript to MetaPost outlines
- zint : for providing barcodes
- curl : for including remote content
- zip or 7zip : for EPUB generation
Disc space required
ConTeXt macro files are small (less than 10MB), but the suite comes with various free fonts which considerably increase the size of the distribution to around 200MB).
Standalone
- Standalone/FAQ
- Standalone/Structure
- Standalone/Implementation
- Standalone/TODO
- Standalone/Contents
- Standalone/TeX Live
- Browse the installation tree
Unix-like platforms (Linux/MacOS X/FreeBSD/Solaris)
For Mac installation see also Mac installation page.
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:
mkdir ~/context cd ~/context wget http://minimals.contextgarden.net/setup/first-setup.sh # Install the latest beta of ConTeXt # This takes a long time, so go have a coffee # Flags you can add to the first-setup.sh call: # --modules=all # Install all third-party modules # --context=current # Install latest stable version # --engine=luatex # Install only MkIV, leave out MkII # # This shrinks the install from 270 MB to 200 MB sh ./first-setup.sh --modules=all
System-wide installation
A system wide installation is recommended for users who are comfortable with the command line. Only the location of installing ConTeXt is different for a system wide installation.
- on 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 for the $TEXMFCACHE
directory. This effectively means that only one user will be able to generate the formats.
# Create the /opt/context directory -- change as appropriate or desired if you # want a different installation directory. cd /opt mkdir context # change ownership chown `whoami`:`whoami` context cd context # Fetch the install script wget http://minimals.contextgarden.net/setup/first-setup.sh # Install the latest beta of ConTeXt # This takes a long time, so go have a coffee # Flags you can add to the first-setup.sh call: # --modules=all # Install all third-party modules # --context=current # Install latest stable version # --engine=luatex # Install only MkIV, leave out MkII # # This shrinks the install from 270 MB to 200 MB sh ./first-setup.sh --modules=all
Cache
To customize the cache directory and other options, see the Custom Configuration page.
Font Directory
Add the OSOFONTDIR into ./tex/setuptex. Go to under the line:
# TODO: we could set OSFONTDIR on Mac for example
(if you don't have the line above, go to the end of the file) and add there:
export OSFONTDIR="/usr/local/share/fonts;$HOME/.fonts"
For more information: Fonts in LuaTeX
Arch Linux
There’s a PKGBUILD in the AUR, provided by Aditya [1]. Install it using your favorite AUR frontend, e.g.
yaourt -S context-minimals-git
This will get you a fresh, up-to-date Context tree in /opt/context-minimals.
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 Standalone 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
Sometimes, when behind a firewall, port 873 may be closed for outgoing TCP connections. If port 22 is open for ssh connections, a trick that can be used is to connect to a computer located somewhere outside of the firewall and to tunnel port 873 (using the program nc
).
export RSYNC_CONNECT_PROG='ssh tunnelhost nc %H 873'
where tunnelhost
is the machine outside of the firewall on which you have ssh
access. Of course, this machine must have nc
and port 873 open for outgoing TCP connections.
Usage
ConTeXt suite 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/
.
Terminal/Command line
To run context from a terminal, source setuptex
:
source /installation-dir/tex/setuptex
Exclusive usage
If you always use ConTeXt suite and never use LaTeX or plain TeX provided by another TeX distribution, you can add the following line to the startup script of your shell (For bash, the startup script is $HOME/.bashrc
; for zsh it is HOME/.zshrc
).
source /installation-dir/tex/setuptex
Then setuptex
will always be sourced in your terminal.
Integrating with an editor
The easiest way to run ConTeXt from an editor is to open a terminal, source setuptex
in the terminal, and then open your editor from the same terminal.
Another option is to add /installation-dir/tex/texmf-<platform>/bin
to the $PATH
that the editor searches. The details vary depending on the editor. See Text Editors for instructions on integrating ConTeXt with various editors.
For information about configuring Smultron and TeXShop (which are popular TeX editors on Mac) see ConTeXt Standalone/Mac Installation.
Updating
For updating the ConTeXt suite,
first update first-setup.sh
, 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://contextgarden.net/minimals/setup/first-setup.sh . sh ./first-setup.sh --modules=all
Uninstalling
ConTeXt suite 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.
mktexlsr texexec --make --all
- For making XeTeX format
mktexlsr texexec --make --xtx --all
- For making MKIV format
mtxrun --generate context --make
Windows
If you want to use ConTeXt suite alongside MikTeX/TeXLive (needed if you also run LaTeX), follow the command-line installation method.
Installation
Command line method
Download context-setup-mswin.zip or context-setup-win64.zip, 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
first-setup.bat
This takes a long time, so go have a coffee.
By default, the suite installs ConTeXt beta. If you want the stable version of ConTeXt, you can use
first-setup.bat --context=current
By default, the suite does not install modules and other third party content. If you want the modules (and have the bandwidth), you can use
first-setup.bat --modules=all
If the above installation instructions don't seem to answer your questions, see page Windows Installation: ConTeXt Suite with SciTe for more detailed information.
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.
Sometimes, when behind a firewall, port 873 may be closed for outgoing TCP connections. If port 22 is open for ssh connections, a trick that can be used is to connect to a computer located somewhere outside of the firewall and to tunnel port 873 (using the program nc
).
export RSYNC_CONNECT_PROG='ssh tunnelhost nc %H 873'
where tunnelhost
is the machine outside of the firewall on which you have ssh
access. Of course, this machine must have nc
and port 873 open for outgoing TCP connections.
Usage
Before running ConTeXt, you need to run setuptex.bat
which is provided in installation-dir\tex\
. This can be done by typing
installation-dir\tex\setuptex.bat
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 suite 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. Within the new shell you can just type context
to run ConTeXt. E.g.
C:\> context --version
to check that you are running the version you think you're running.
Use ConTeXt with Cygwin
After installing the ConTeXt suite, you can run it under Cygwin. With Cygwin, you may use gmake and other Unix tools for your automated workflow.
- Run
setuptex.bat
in DOS command prompt - In the same DOS prompt, enter Cygwin by running
cygwin.bat
(in your Cygwin installation directory) - Under Cygwin prompt, run
context.cmd test.tex
. Note that the.cmd
extension is needed under Cygwin.
Updating
If you used the command line method, just run first-setup.bat
again to update the suite. If you have third party modules installed, you should use
first-setup.bat --keep
to upgrade. See Installing third party modules for details.
Uninstallation
If you used the command-line installer, you can just delete the installation directory to uninstall the suite.
Troubleshooting
- rsync sometimes has problems with paths with uppercase letters (like
c:\Temp
orC:\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.
- If you update luaTeX occasionally you may get something like
engine mismatch (luv: This is LuaTeX, Version beta-<version>-<date1> (TeX Live 2013/dev)(rev <number1>) <> bin: This is LuaTeX, Version beta-<version>-<date1> (TeX Live 2012/W32TeX)(rev <number2>)), forcing remake
In which case your format will be remade every time you compile a file. In /texmf-mswin make sure that luatex.exe and texlua.exe have the same date; then also delete luatex.dll. This usually solves the problem.
Installing third party modules
The ConTeXt suite only comes with Taco's t-bib module. If you want to install a new module, say Wolfgang's t-letter module, you can use
first-setup.sh --modules="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 ./first-setup.sh --modules="t-letter,t-mathsets"
If you want to install all extra modules at once, do
sh ./first-setup.sh --modules=all
Reverting to an older installation
If, for some reason, you want to revert to an older installation, you can do that by
sh ./first-setup.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.
Moving the installation tree around
According to this post, http://archive.contextgarden.net/message/20101129.144331.d721372f.en.html it's safe to move the installation tree across directory or machines (say you don't have broadband access). You just have to clean and regenerate the cache (./tex/texmf-cache/luatex-cache) with mtxrun --generate
Notes
|