Difference between revisions of "Running Mark IV"

From Wiki
Jump to navigation Jump to search
(preliminary content (more to come))
(No difference)

Revision as of 10:52, 10 July 2008

Introduction

Context Mark IV does not use the kpathsea library to find files and configuration settings. It follows that running mktexlsr or fmtutil has no effect. This page explains the details of installing and maintaining Mark IV.


Quickstart

 luatools --generate

is the replacement for mktexlsr

 context --make --compile 

is the replacement for fmtutil

 mtxrun --script fonts --reload

is needed if you want to use fonts by font name (as opposed to file names)


Filename and Configuration databases

Introduction

When you run

 context myfile

both the script 'context' and the Mark IV code inside the format have to find various files. To make this happen as fast as possible, a file name database is used. There is also some configuration information and some generated font data is cached because extracting the OpenType information is a relatively lengthy and memory-consuming process.

All of this data stored inside the 'texmf cache'.

Cache location

When

 luatools --generate

is run, it creates the file name database. To prevent duplication of settings as much as possible, it parses texmf.cnf as the source for discovering at what directory trees need to be indexed in the database. This ensures that while Mark IV does not actually use kpathsea, it is still compatible with how kpathsea handles things.

But there is a catch: luatools has to decide where on the harddisk the file name database should be stored. This needs extra care, because a runtime command like 'context myfile' does not look at texmf.cnf.

The logic used for finding the cache location is as follows:

  • If there is an environment variable named TEXMFCACHE, this will point to the desired harddisk location
  • Otherwise, if the web2c configuration directory contains a file named texmfcnf.lua, this file is read and used to discover the desired location (see below)
  • If that doesn't work either, a list of 'likely' environment variables is tested, and the first variable that is set is assumed to point to the correct location. This list is currently:
 TMPDIR, TEMPDIR, TMP, TEMP, HOME, HOMEPATH

but there have been variants forms