Linux User Installation

From ConTeXt wiki

Jump to: navigation, search

This is a simple guide to installing a working ConTeXt setup with the minimum amount of work necessary - especially if you are a user without super-user capabilities. This article assumes you have a Sh-compatible shell.

[edit] The Setup

At first, you have to choose where you want to install your local copy of ConTeXt. I'll call it context-installation-directory throughout. Create that directory and cd to it:

mkdir context-installation-directory
cd context-installation-directory

Then, download justtex.zip and linuxtex.zip from the pragma-ade web site:

wget http://pragma-ade.com/context/install/justtex.zip \
     http://pragma-ade.com/context/install/linuxtex.zip

Careful: If you are updating to a new minimal installation and already have these zip files, then wget will not overwrite them. Instead it will add .1 to the names, and the unzip in the next paragraph will not see them. So delete old versions of these .zip files before downloading.

Once the two files are downloaded, unzip them:

for f in justtex.zip linuxtex.zip; do unzip $f; done;

You'll be asked if you want to overwrite three files. Answer yes.

Now you have to set up your environment, and make it so that it gets set up every time you log in. The setuptex script provided with the zip files does most of the work:

echo '#!/bin/bash' > ~/.context_env
cat tex/setuptex >> ~/.context_env
chmod 755 ~/.context_env
echo "source .context_env $PWD/tex" >> ~/.bashrc

Run the script once, and begin the install proper:

source ~/.context_env $PWD/tex
mktexlsr
texexec --make --alone

[edit] Verifiying and Testing The Installation

Try running the following command:

texexec --version

The output should look like this:

TeXExec | version 6.2.0 - 1997-2006 - PRAGMA ADE/POD

To test that everything runs fine, run:

texexec --check

This will give you a lot of lines of output including the versions of various scripts, the version of pdftex and the version of ConTeXt. It will also generate a test file and run it through ConTeXt. You should get a pdf file called texexec.pdf with the word "Test".


You can now try compiling your first document:

cat > first.tex <<EOF
\starttext
Hello, world!
\stoptext
EOF
texexec first.tex

At this point, you should have a first.pdf file and a working copy of ConTeXt.

Personal tools
Toolbox