diff options
Diffstat (limited to 'web2c')
-rw-r--r-- | web2c/context.cnf | 84 | ||||
-rw-r--r-- | web2c/contextcnf.lua | 169 |
2 files changed, 163 insertions, 90 deletions
diff --git a/web2c/context.cnf b/web2c/context.cnf index 1263aaf4f..be2fe4d5c 100644 --- a/web2c/context.cnf +++ b/web2c/context.cnf @@ -12,22 +12,23 @@ progname = unsetprogname engine = unsetengine backend = unsetbackend +TEXMFOS = $SELFAUTODIR +TEXMFSYSTEM = $SELFAUTOPARENT/texmf-$SELFAUTOSYSTEM TEXMFMAIN = $SELFAUTOPARENT/texmf TEXMFLOCAL = $SELFAUTOPARENT/texmf-local TEXMFFONTS = $SELFAUTOPARENT/texmf-fonts -TEXMFEXTRA = $SELFAUTOPARENT/texmf-extra TEXMFPROJECT = $SELFAUTOPARENT/texmf-project +TEXMFCONTEXT = $SELFAUTOPARENT/texmf-context VARTEXMF = $SELFAUTOPARENT/texmf-var -HOMETEXMF = /nonexist -TEXMF = {!!$TEXMFPROJECT,!!$TEXMFFONTS,!!$TEXMFLOCAL,!!$TEXMFEXTRA,!!$TEXMFMAIN} -SYSTEXMF = $TEXMF +HOMETEXMF = $HOME/texmf -TEXMFCACHE = $TMP;$TEMP;$TMPDIR;$TEMPDIR;$HOME;$TEXMFVAR;$VARTEXMF;. +TEXMF = {$TEXMFHOME,!!$TEXMFPROJECT,!!$TEXMFFONTS,!!$TEXMFLOCAL,!!$TEXMFCONTEXT,!!$TEXMFSYSTEM,!!$TEXMFMAIN} +SYSTEXMF = $TEXMF TEXMFCNF = .;$TEXMF/texmf{-local,}/web2c TEXMFDBS = $TEXMF;$VARTEXFONTS -VARTEXFONTS = $TEMPFONTPATH/varfonts +VARTEXFONTS = $VARTEXMF/varfonts % In the case of an multi-os setup, this one can be set % by the environment. watch out, lowercase engine ! @@ -60,10 +61,10 @@ TEXFONTMAPS = .;$TEXMF/fonts/{data,map}/{$progname,$engine,pdftex,dvips,}//;$T VFFONTS = $TEXMF/fonts/{data,vf}// TFMFONTS = $TEXMF/fonts/{data,tfm}// -T1FONTS = $TEXMF/fonts/{data,type1,pfb}//;$TEXMF/fonts/misc/hbf//;$OSFONTDIR; -AFMFONTS = $TEXMF/fonts/{data,afm}//;$OSFONTDIR; +T1FONTS = $TEXMF/fonts/{data,type1,pfb}//;$TEXMF/fonts/misc/hbf//;$OSFONTDIR +AFMFONTS = $TEXMF/fonts/{data,afm}//;$OSFONTDIR LIGFONTS = $TEXMF/fonts/lig// -TTFONTS = $TEXMF/fonts/{data,truetype,ttf}//;$OSFONTDIR; +TTFONTS = $TEXMF/fonts/{data,truetype,ttf}//;$OSFONTDIR TTF2TFMINPUTS = $TEXMF/ttf2pk// T42FONTS = $TEXMF/fonts/type42// MISCFONTS = $TEXMF/fonts/misc// @@ -77,61 +78,36 @@ FONTFEATURES = $TEXMF/fonts/fea//;$OPENTYPEFONTS;$TTFONTS;$T1FONTS;$AFMFONTS FONTCIDMAPS = $TEXMF/fonts/cid//;$OPENTYPEFONTS;$TTFONTS;$T1FONTS;$AFMFONTS OFMFONTS = $TEXMF/fonts/{data,ofm,tfm}// -OPLFONTS = $TEXMF/fonts/opl//; +OPLFONTS = $TEXMF/fonts/{data,opl}// OVFFONTS = $TEXMF/fonts/{data,ovf,vf}// -OVPFONTS = $TEXMF/fonts/ovp//; +OVPFONTS = $TEXMF/fonts/{data,ovp}// OTPINPUTS = $TEXMF/omega/otp// OCPINPUTS = $TEXMF/omega/ocp// OTFFONTS = $TEXMF/fonts/otf/{data,xetex,}//;$OSFONTDIR % configurations -% resource paths, can be used in paranoid situations (can be env vars) - -TXRESOURCES=unset -MPRESOURCES=$TXRESOURCES -MFRESOURCES=$MPRESOURCES - -% some extra paths for development trees (can be env vars) - -CTXDEVTXPATH=unset -CTXDEVMPPATH=unset -CTXDEVMFPATH=unset - -TEXINPUTS = .;{$TXRESOURCES}//;{$CTXDEVTXPATH};$TEXMF/tex/{$progname,plain,generic,}// -TEXINPUTS.context = .;{$TXRESOURCES}//;{$CTXDEVTXPATH};$TEXMF/tex/{context,plain/base,generic}// -MPINPUTS = .;{$MFRESOURCES}//;{$CTXDEVMPPATH};$TEXMF/metapost/{context,base,}// -MFINPUTS = .;{$MPRESOURCES}//;{$CTXDEVMFPATH};$TEXMF/metafont/{context,base,}//;$TEXMF/fonts/source// -BSTINPUTS = .;{$TXRESOURCES}//;{$CTXDEVTXPATH};$TEXMF/bibtex/bst// +TEXINPUTS = .;$TEXMF/tex/{$progname,plain,generic,}// +TEXINPUTS.context = .;$TEXMF/tex/{context,plain/base,generic}// +MPINPUTS = .;$TEXMF/metapost/{context,base,}// +MFINPUTS = .;$TEXMF/metafont/{context,base,}//;$TEXMF/fonts/source// +BSTINPUTS = .;$TEXMF/bibtex/bst// +BIBINPUTS = .;$TEXMF/bibtex/bib// TEXCONFIG = $TEXMF/{fonts/map,dvips,pdftex,dvipdfmx,dvipdfm}// PDFTEXCONFIG = $TEXMF/pdftex/{$progname,}// DVIPDFMINPUTS = $TEXMF/{fonts/{map,enc,lig}/dvipdfm,fonts/type1,dvips,pdftex,dvipdfmx,dvipdfm}// -% this way we can hook in development paths - -CTXDEVPLPATH=unset -CTXDEVPYPATH=unset -CTXDEVRBPATH=unset -CTXDEVJVPATH=unset - % some old paths; we restrict the search to context paths; new ones as well as old ones -PERLINPUTS = .;$CTXDEVPLPATH;$TEXMF/scripts/context/perl -PYTHONINPUTS = .;$CTXDEVPYPATH;$TEXMF/scripts/context/python -RUBYINPUTS = .;$CTXDEVRBPATH;$TEXMF/scripts/context/ruby -% LUAINPUTS = .;$CTXDEVLUPATH;$TEXMF/scripts/context/lua -JAVAINPUTS = .;$CTXDEVJVPATH;$TEXMF/scripts/context/java - -% LUAINPUTS = .;$TEXINPUTS;$TEXMFSCRIPTS -LUAINPUTS = .;$CTXDEVLUPATH;$TEXINPUTS;$TEXMF/scripts/context/lua// -TEXMFSCRIPTS = .;$CTXDEVLUPATH;$TEXINPUTS;$CTXDEVRBPATH;$CTXDEVPLPATH;$TEXMF/scripts/context/{lua,ruby,perl}// +PERLINPUTS = .;$TEXMF/scripts/context/perl +PYTHONINPUTS = .;$TEXMF/scripts/context/python +RUBYINPUTS = .;$TEXMF/scripts/context/ruby +% LUAINPUTS = .;$TEXMF/scripts/context/lua +JAVAINPUTS = .;$TEXMF/scripts/context/java -% RUBYINPUTS = .;$CTXDEVPLPATH;$TEXMF/scripts/{$progname,$engine,}/ruby -% LUAINPUTS = .;$CTXDEVPYPATH;$TEXMF/scripts/{$progname,$engine,}/lua -% PYTHONINPUTS = .;$CTXDEVRBPATH;$TEXMF/scripts/{$progname,$engine,}/python -% PERLINPUTS = .;$CTXDEVJVPATH;$TEXMF/scripts/{$progname,$engine,}/perl -% JAVAINPUTS = .;$CTXDEVJVPATH;$TEXMF/scripts/{$progname,$engine,}/java +LUAINPUTS = .;$TEXINPUTS;$TEXMF/scripts/context/lua// +TEXMFSCRIPTS = .;$TEXINPUTS;$TEXMF/scripts/context/{lua,ruby,perl}// CLUAINPUTS = .;$SELFAUTOLOC/lib/{$progname,$engine,}/lua// @@ -244,9 +220,9 @@ max_print_line.metafun = 255 extra_mem_top.mptopdf = 1000000 extra_mem_bot.mptopdf = 1000000 -% ocp_buf_size = 500000 -% ocp_stack_size = 10000 -% ocp_list_size = 1000 +% ocp_buf_size = 500000 +% ocp_stack_size = 10000 +% ocp_list_size = 1000 ocp_buf_size = 1 ocp_stack_size = 1 @@ -255,5 +231,5 @@ ocp_list_size = 1 % Just for xetex: FONTCONFIG_FILE = fonts.conf -FONTCONFIG_PATH = $TEXMFLOCAL/fonts/conf -FC_CACHEDIR = $TEXMFLOCAL/fonts/cache +FONTCONFIG_PATH = $TEXMFSYSTEM/fonts/conf +FC_CACHEDIR = $TEXMFSYSTEM/fonts/cache diff --git a/web2c/contextcnf.lua b/web2c/contextcnf.lua index 166a7504e..de192ec0a 100644 --- a/web2c/contextcnf.lua +++ b/web2c/contextcnf.lua @@ -1,38 +1,135 @@ --- filename : texmfcnf.lua --- comment : companion to luatex/mkiv --- authors : Hans Hagen & Taco Hoekwater --- copyright: not relevant --- license : not relevant - --- This file is read bij luatools, mtxrun and context mkiv. This is still --- somewhat experimental and eventually we will support booleans instead --- of the 't' strings. The content is similar to that of texmf.cnf. Both --- namespaces strings --- --- TEXINPUT.context = "..." --- --- and subtables ( --- --- context = { TEXINPUT = ".." } --- --- are supported with the later a being the way to go. You can test settings --- with: --- --- luatools --expand-var TEXMFBOGUS --- --- which should return --- --- It works! --- --- We first read the lua configuration file(s) and then do a first variable --- expansion pass. Next we read the regular cnf files. These are cached --- in the mkiv cache for faster loading. The lua configuration files are --- not cached. - return { --- LUACSTRIP = 'f', -- don't strip luc files (only use this for debugging, otherwise slower loading and bigger cache) --- CACHEINTDS = 't', -- keep filedatabase and configuration in tds tree --- PURGECACHE = 't', -- this saves disk space - TEXMFCACHE = 'c:/temp', -- installers can change this --- TEXMFBOGUS = 'It works!', -- a test string + + type = "configuration", + version = "1.0.2", + date = "2010-06-07", + time = "14:49:00", + comment = "ConTeXt MkIV configuration file", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + + content = { + + -- LUACSTRIP = 'f', + -- PURGECACHE = 't', + + TEXMFCACHE = "$SELFAUTOPARENT/texmf-cache", + + TEXMFOS = "$SELFAUTODIR", + TEXMFSYSTEM = "$SELFAUTOPARENT/texmf-$SELFAUTOSYSTEM", + TEXMFMAIN = "$SELFAUTOPARENT/texmf", + TEXMFCONTEXT = "$SELFAUTOPARENT/texmf-context", + TEXMFLOCAL = "$SELFAUTOPARENT/texmf-local", + TEXMFFONTS = "$SELFAUTOPARENT/texmf-fonts", + TEXMFPROJECT = "$SELFAUTOPARENT/texmf-project", + + -- I don't like this texmf under home and texmf-home would make more + -- sense. One never knows what installers put under texmf anywhere and + -- sorting out problems will be a pain. + + TEXMFHOME = "$HOME/texmf", -- "tree:///$HOME/texmf + + -- We need texmfos for a few rare files but as I have a few more bin trees + -- a hack is needed. Maybe other users also have texmf-platform-new trees. + + TEXMF = "{$TEXMFHOME,!!$TEXMFPROJECT,!!$TEXMFFONTS,!!$TEXMFLOCAL,!!$TEXMFCONTEXT,!!$TEXMFSYSTEM,!!$TEXMFMAIN}", + + TEXFONTMAPS = ".;$TEXMF/fonts/{data,map}/{pdftex,dvips}//", + ENCFONTS = ".;$TEXMF/fonts/{data,enc}/{dvips,pdftex}//", + VFFONTS = ".;$TEXMF/fonts/{data,vf}//", + TFMFONTS = ".;$TEXMF/fonts/{data,tfm}//", + T1FONTS = ".;$TEXMF/fonts/{data,type1,pfb}//;$OSFONTDIR", + AFMFONTS = ".;$TEXMF/fonts/{data,afm}//;$OSFONTDIR", + TTFONTS = ".;$TEXMF/fonts/{data,truetype,ttf}//;$OSFONTDIR", + OPENTYPEFONTS = ".;$TEXMF/fonts/{data,opentype}//;$OSFONTDIR", + CMAPFONTS = ".;$TEXMF/fonts/cmap//", + FONTFEATURES = ".;$TEXMF/fonts/{data,fea}//;$OPENTYPEFONTS;$TTFONTS;$T1FONTS;$AFMFONTS", + FONTCIDMAPS = ".;$TEXMF/fonts/{data,cid}//;$OPENTYPEFONTS;$TTFONTS;$T1FONTS;$AFMFONTS", + OFMFONTS = ".;$TEXMF/fonts/{data,ofm,tfm}//", + OVFFONTS = ".;$TEXMF/fonts/{data,ovf,vf}//", + + TEXINPUTS = ".;$TEXMF/tex/{context,plain/base,generic}//", + MPINPUTS = ".;$TEXMF/metapost/{context,base,}//", + + -- In the next variable the inputs path will go away. + + TEXMFSCRIPTS = ".;$TEXMF/scripts/context/{lua,ruby,python,perl}//;$TEXINPUTS", + PERLINPUTS = ".;$TEXMF/scripts/context/perl", + PYTHONINPUTS = ".;$TEXMF/scripts/context/python", + RUBYINPUTS = ".;$TEXMF/scripts/context/ruby", + LUAINPUTS = ".;$TEXINPUTS;$TEXMF/scripts/context/lua//", + CLUAINPUTS = ".;$SELFAUTOLOC/lib/{$progname,$engine,}/lua//", + + -- Not really used by MkIV so they might go away. + + BIBINPUTS = ".;$TEXMF/bibtex/bib//", + BSTINPUTS = ".;$TEXMF/bibtex/bst//", + + -- Sort of obsolete. + + OTPINPUTS = ".;$TEXMF/omega/otp//", + OCPINPUTS = ".;$TEXMF/omega/ocp//", + + -- A few special ones that will change some day. + + FONTCONFIG_FILE = "fonts.conf", + FONTCONFIG_PATH = "$TEXMFSYSTEM/fonts/conf", + FC_CACHEDIR = "$TEXMFSYSTEM/fonts/cache", -- not needed + + -- Some of the following parameters will disappear. Also, some are + -- not used at all as we disable the ocp mechanism. At some point + -- it makes more sense then to turn then into directives. + + context = { + + hash_extra = "100000", + nest_size = "500", + param_size = "10000", + save_size = "50000", + stack_size = "10000", + expand_depth = "10000", + max_print_line = "10000", + max_in_open = "256", + + ocp_stack_size = "10000", + ocp_list_size = "1000", + + buf_size = "4000000", -- obsolete + ocp_buf_size = "500000", -- obsolete + + }, + + -- We have a few reserved subtables. These control runtime behaviour. The + -- keys have names like 'foo.bar' which means that you have to use keys + -- like ['foo.bar'] so for convenience we also support 'foo_bar'. + + directives = { + -- system_checkglobals = "10", + -- system.nostatistics = "yes", + system_errorcontext = "10", + }, + + experiments = { + + }, + + trackers = { + + }, + + -- The io modes are similar to the traditional ones. Possible values + -- are all, paranoid and restricted. + + output_mode = "restricted", + input_mode = "any", + + -- The following variable is under consideration. We do have protection + -- mechanims but it's not enabled by default. + + command_mode = "any", -- any none list + command_list = "mtxrun, convert, inkscape, gs, imagemagick, curl, bibtex, pstoedit", + + }, + + TEXMFCACHE = "$SELFAUTOPARENT/texmf-cache", -- for old times sake + } |