Upgrading CONTEXT

2010-04-03

For some time ago (in fact, since I initially upgraded Texlive to the 2009th grinding) I was stucked by repeated failures to “properly” compile tex documents with embedded metapost background. Properly here means that the compilation went fine but the colored backgrounds weren’t there. After googling for a possible Metapost bug with the newly released ConTeX engine, I just realized that the Texlive2009 distribution does not actually include a useable Mark IV engine.

The most important motivation for this page is that the TeX Live 2008 edition contains Mark IV, but it is only copied to the installed system, no post-install setup takes place at all. For this Tex Live release, the post-install setup has to be done manually. TeX Live 2009 does not come with a usable Mark IV at all because the luatex on the 2009 editions is too old. Instructions on how to deal with TeX Live 2009 will be added soon. contextgarden.net

Well, Mark IV is the core of LuaTeX processing within ConTeX, which explains why most of my code fails. I follow the recommendation to upgrade the TDS, but after having upgraded the ConTeX tree the rough way (i.e., directly using with rsync in the TDS), most of the executables listed in /usr/texbin were out. I decide to follow the other instructions on ConTeX wiki and to install the beta version of ConTeX in my /usr/local. It happens to be a children’s game and I just need to configure my .profile (a little bit messy, I must admit). So in short, the procedure is as follows:

$ sudo mkdir /usr/local/context
$ chown `whoami` /usr/local/context
$ cd /usr/local/context
$ curl -o first-setup.sh http://minimals.contextgarden.net/setup/first-setup.sh
$ chmod +x first-setup.sh
$ ./first-setup.sh

To set up the path permanently, add to your bash configuration file

$ echo ‘source ~/context/tex/setuptex’ >> .bash_profile

Next, you can upgrade all package with TLMGR GUI (installed with Texlive) or directly as

$ tlmgr -location http://minimals.contextgarden.net/texlive/beta update —all

It is suggested that there is no need to remake formats. However, if necessary, simply run:

$ mktexlsr 
$ texexec —make —all 
$ mktexlsr 
$ texexec —make —xtx —all 
$ luatools —selfupdate 
$ mtxrun —selfupdate 
$ luatools —generate 
$ context —make

Now, I am able to incorporate MP background again, although I noticed other problem, especially with dvipdfmx and hyperref when using biblatex and xelatex. As I am sometimes using Texmate for texying my files, I need to add this new path to the shell variables since non-CLI applications don’t have access to the unix PATH variable (and it is borrying to set up an environment variable in ~/.MacOSX/environment.plist).

---

Articles with the same tag(s):

Collecting email usage statistics from mu
Data science at the command-line
From Beamer to Deckset
Interacting with Weka from Jython
CoffeeScript or how to avoid typing ugly Javascript code
Workflow for statistical data analysis
Weaving Stata documents
Playing with Julia
Easier literate programming with R
Happy texying

---