Changes

Jump to navigation Jump to search
2,709 bytes removed ,  10:43, 22 September 2008
'''A note for windows users:''' the luatex executable doest not accept filenames with spaces in their name. This means that if you are on windows you will at least have to set up a texmfcnf.lua as explained below, and you likely will even have to reinstall texlive, because the default texlive installation directory itself contains spaces. [[Running_Mark_IV#File_not_found | Details]].
== Filename and Configuration databases Upgrading ConTeXt ==
=== Introduction ===Upgrading is not absolutely necessary unless you use [[MacTeX]], but most MKIV users will probably want to play with latest & greatest features.
When you runThere's a work-in-progress to create a TL repository on the garden with the latest ConTeXt and LuaTeX, so that TeX Live users should be able to upgrade ConTeXt automatically.
context myfile.tex both the script 'context' and the Mark IV code inside the actual format file 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 needed and some generated font data to be cached. All of this data stored inside the 'texmf cache'. To keep this cache up-to-date, Until then you have to (re)run   luatools --generate whenever you install or remove files from your tex installation that have to be found by Mark IV, or when you make changes to a the configuration values. Examples of moments when you need to rerun luatools are * after updating the context package* after adjusting settings can update ConTeXt in any of the texmf.cnf files* after installing font packages from [[TeX Live]] or [[CTAN]]* after adding or removing third-party context modules. Mark IV can also use the operating system's installed fonts when it is set up properlydifferent ways, but for fonts installed or removed using the operating system's installation method you do need to rerun luatools, such fonts are handled by their own subsystem (which will be explained below). === Cache location === When  luatools --generate is run for the first time, it creates the file name database, later runs do updates. To prevent unnecessary duplication of settings, luatools parses [[texmf.cnf]] as the source for discovering configuration values and which directory trees need to be indexed. This also ensures that even though Mark IV does not use kpathsea, it is still runtime-compatible example 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 (or updated). This needs extra care, because a runtime command like 'context myfile.tex' does not look at texmf.cnf at all. Therefore, the cache location is handled separately from all other configuration settings. The internal logic used for finding the cache location is as follows rsync -av rsync* If there is an environment variable named TEXMFCACHE, this will point to the desired harddisk location* Otherwise, if reading texmfcnf//contextgarden.lua results in the variable TEXMFCACHE being set, this is the desired location. '''this is the recommended approach, see below'''* If that doesn't work either, a list of likely environment variables is tested, and the first environment variable that is set is assumed to point to the correct location. * As a last resort, the local directory is used. For completeness: the list of tested environment variables is currently: TMPDIR, TEMPDIR, TMP,TEMP, HOME, HOMEPATH, but there have been quite some variations on this in the past.  === texmfcnf.lua === Files with the name texmfcnf.lua can appear anywhere on the search path where there can also be a [[texmf.cnf]] file, and multiple texmfcnf.lua files can be present.  All possible locations are tried in order, and any found texmfcnf.lua files are read in order of discovery. All texmfcnf.lua files are read before all texmf.cnf files, and none of the values defined in texmfcnf.lua file(s) cannot be overruled by texmf.cnf files. Note: net/minimals/current/context on texlive can not find texmfcnf.lua unless it is placed in '''<installationdir>texmf/web2ccurrent/ /usr/local/'''. The format of texmfcnf.lua is pretty simple: it is a Lua script that has to return a single table with keys for the variables it wants to define. If there are multiple files with duplicate keys, the first appearance of a particular key 'wins' (this is the same behaviour as for [[texmf.cnf]] variables). texmfcnf.lua could be used to set up the 'normal' texmf.cnf variables, but by far the most important key is TEXMFCACHE. Here is a simple one-line example texmfcnf.lua to set up the texmf cache to be inside your private texlive /2008 directory:  return { TEXMFCACHE = '$HOME/.texlive2008/texmf-var' } Note: Windows users should replace $HOME with $USERPROFILE. [[TeX Live]] 2008 users and users of Mark IV versions from after Jul 10, 2008 can use a tilde (~) instead of an explicit environment variable.dist/
To update LuaTeX you may use the following line (depending on your platform):
rsync -av rsync://contextgarden.net/minimals/current/bin/luatex/<i><font color="#F00">platform-garden</font></i>/bin/luatex \
/usr/local/texlive/2008/bin/<i><font color="#F00">platform-TL</font></i>/
Which resolves to one of the following lines:
rsync -av rsync://contextgarden.net/minimals/current/bin/luatex/freebsd/bin/luatex /usr/local/texlive/2008/bin/i386-freebsd/
rsync -av rsync://contextgarden.net/minimals/current/bin/luatex/linux/bin/luatex /usr/local/texlive/2008/bin/i386-linux/
rsync -av rsync://contextgarden.net/minimals/current/bin/luatex/linux-64/bin/luatex /usr/local/texlive/2008/bin/x86_64-linux/
rsync -av rsync://contextgarden.net/minimals/current/bin/luatex/osx-universal/bin/luatex /usr/local/texlive/2008/bin/universal-darwin/
== Generating and updating formats ==

Navigation menu