Install Mark IV

From ConTeXt wiki

Jump to: navigation, search

This page is an editted section of the My Way that was written at the first introduction of Mark IV.

First of all, we advise you to define an environment variable TEXMFCACHE which points to your favourite temporary path. On my machine this is

set TEXMFCACHE=c:\temp

Of course you need a recent version of LuaTeX. If you are lucky, you can download a recent executable from [1]. (just follow the most recent download link)

You need to put the binary in your path. The pool file is includes in the binary so you don't need to worry about that.

  • copy luatex(.exe) to the binary path
  • copy luatex(.exe) to the binary path as texlua(.exe)
  • copy luatex(.exe) to the binary path as texluac(.exe)

Now you should update your context macros. On a modern context installation with networking enabled and the "curl" executable installed, that is as simple as:

 ctxtools --update

If the above command doesn't work, you have to download cont-tmf.zip from the download site yourself (links are in the top-left wiki menu). After downloading, unzip cont-tmf.zip in your texmf-local tree, and since you update, make sure to remake the pdftex (and perhaps xetex) formats before continuing.

texexec --make --all --pdftex
texexec --make --all --xetex

In Mark IV, many tasks are delegated to lua scripts called luatools and mtxrun, you have to install those first.

  • Windows: copy both luatools.cmd and luatools.lua to the binary path
  • Unix/MacOs: copy luatools.lua to the binary path as luatools (no suffix), then run
chmod 755 luatools

Repeat this process for mtxrun.lua (and mtxrun.cmd on Windows).

The scripts can be found in

 texmf-local/scripts/context/lua

Now you can update the file database and generate formats for luatex:

 luatools --generate
 luatools --ini --compile --verbose cont-en

From the console you may deduce that we put file databases as well as formats in the temporary path in a tree specific location.

In the cache path you will find files with the suffix tma (LUA code, normally a table) and tmc (the byte-compiled version of the former). In you runtime path you will find tua and tuc files. These are the counterparts (and to be replacements) of the utility files (multipass data).

In order to be able to start up LuaTeX needs a LUA file. Normally, luatools will handle this. When things fail, make sure that you have set the following variables:

 TEXMFCNF=/tex/texmf-local/web2c
 TEXMF={/tex/texmf,/tex/texmf-local}

If luatools still fails, you may want to use the setuptex script from the minimal TeX distributions (mswintex.zip, linuxtex.zip, etc. at Pragma site). You have to put in the directory containing texmf, texmf-local, etc. and then type ". setuptex" on Unix / Mac OS X systems; on Windows, use setuptex.bat (don't forget the leading dot on Unix!).

To make sure the file databases have been correctly created, you can try:

luatools lmr12.afm

On Hans' system this reports:

c:/data/develop/tex/texmf-fonts/fonts/data/e-foundry/latin-modern/lmr12.afm
Personal tools
Toolbox