diff options
Diffstat (limited to 'web2c')
-rw-r--r-- | web2c/contextcnf.lua | 224 |
1 files changed, 119 insertions, 105 deletions
diff --git a/web2c/contextcnf.lua b/web2c/contextcnf.lua index ba6597bf3..8c1458a5a 100644 --- a/web2c/contextcnf.lua +++ b/web2c/contextcnf.lua @@ -1,26 +1,27 @@ +-- winmerge e:\tex-context\tex\texmf-mine\web2c\contextcnf.lua e:\tex-context\tex\texmf-context\web2c\contextcnf.lua e:\tex-context\tex\texmf\web2c\texmfcnf.lua + return { type = "configuration", - version = "1.1.1", - date = "2011-06-02", + version = "1.1.2", -- "1.1.1", + date = "2021-05-12", -- "2011-06-02" time = "14:59:00", - comment = "ConTeXt MkIV configuration file", + comment = "ConTeXt MkIV and LMTX configuration file", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", content = { - -- Originally there was support for engines and progname but I don't expect - -- other engines to use this file, so first engines were removed. After that - -- if made sense also to get rid of progname. At some point specific formats - -- will be supported but then as a subtable with fallbacks, which sounds more - -- natural. Also, at some point the paths will become tables. For the moment - -- I don't care too much about it as extending is easy. + -- Originally there was support for engines and progname but I don't expect other engines to + -- use this file, so first engines were removed. After that if made sense also to get rid of + -- progname. In principle we could support multiple formats here (using subtables) but time + -- has demonstrated that we only have one format (the original ideas was to make a base layer + -- but I don't see it being used to it would be waste of time). So, after a decade it was + -- time to prune and update this file, also because LMTX has a few more features. variables = { - -- The following variable is predefined (but can be overloaded) and in - -- most cases you can leave this one untouched. The built-in definition - -- permits relocation of the tree. + -- The following variable is predefined (but can be overloaded) and in most cases you can + -- leave this one untouched. The built-in definition permits relocation of the tree. -- -- if this_is_texlive then -- resolvers.luacnfspec = 'selfautodir:;selfautoparent:;{selfautodir:,selfautoparent:}{/share,}/texmf{-local,}/web2c' @@ -37,36 +38,23 @@ return { -- "selfautoparent:texmf/web2c", -- } - -- One problem is that DEFAULT_TEXMFCNF is hardcoded in kpse so in fact we should - -- have access to it without the need to initialize kpse. - - -- We have only one cache path but there can be more. The first writable one - -- will be chose but there can be more readable paths. - -- - -- Keep in mind that MkIV does not run at all on older texlives so when using - -- that you don't need to worry about ancient and obsolete configuration paths, - -- simply because no configuration will be found there. + -- We have only one cache path but there can be more. The first writable one will be taken + -- but there can be more readable paths. TEXMFCACHE = "$SELFAUTOPARENT/texmf-cache", - -- not used by context at all - - TEXMFSYSVAR = "$TEXMFCACHE", - TEXMFVAR = "$TEXMFCACHE", - - -- 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. But on the other hand ... home - -- mess is normally under the users own responsibility. + -- 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. But on + -- the other hand ... home mess is normally the users own responsibility. -- - -- By using prefixes we don't get expanded paths in the cache __path__ - -- entry. This makes the tex root relocatable. + -- By using prefixes we don't get expanded paths in the cache __path__ entry. This makes the + -- tex root relocatable. TEXMFOS = "selfautodir:", TEXMFSYSTEM = "selfautoparent:texmf-$SELFAUTOSYSTEM", TEXMFMAIN = "selfautoparent:texmf", - TEXMFDIST = "selfautoparent:texmf-dist", TEXMFCONTEXT = "selfautoparent:texmf-context", + TEXMFMODULES = "selfautoparent:texmf-modules", TEXMFLOCAL = "selfautoparent:texmf-local", TEXMFFONTS = "selfautoparent:texmf-fonts", TEXMFPROJECT = "selfautoparent:texmf-project", @@ -74,10 +62,10 @@ return { TEXMFHOME = "home:texmf", -- TEXMFHOME = os.name == "macosx" and "home:Library/texmf" or "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. + -- 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, but so far I've never heard of it. - TEXMF = "{$TEXMFHOME,!!$TEXMFPROJECT,!!$TEXMFFONTS,!!$TEXMFLOCAL,!!$TEXMFCONTEXT,!!$TEXMFSYSTEM,!!$TEXMFDIST,!!$TEXMFMAIN}", + TEXMF = "{$TEXMFHOME,!!$TEXMFPROJECT,!!$TEXMFFONTS,!!$TEXMFLOCAL,!!$TEXMFMODULES,!!$TEXMFCONTEXT,!!$TEXMFSYSTEM,!!$TEXMFMAIN}", TEXFONTMAPS = ".;$TEXMF/fonts/data//;$TEXMF/fonts/map/{pdftex,dvips}//", ENCFONTS = ".;$TEXMF/fonts/data//;$TEXMF/fonts/enc/{dvips,pdftex}//", @@ -102,13 +90,8 @@ return { PERLINPUTS = ".;$TEXMF/scripts/context/perl", PYTHONINPUTS = ".;$TEXMF/scripts/context/python", RUBYINPUTS = ".;$TEXMF/scripts/context/ruby", - LUAINPUTS = ".;$TEXINPUTS;$TEXMF/scripts/context/lua//;$TEXMF", - CLUAINPUTS = ".;$SELFAUTOLOC/lib/$engine//", - - -- texmf-local/tex/generic/example/foo : - -- - -- package.helpers.trace = true - -- require("example.foo.bar") + LUAINPUTS = ".;$TEXINPUTS;$TEXMF/scripts/context/lua//", + CLUAINPUTS = ".;$SELFAUTOLOC/lib/$engine/lua//", -- Not really used by MkIV so they might go away. @@ -124,30 +107,55 @@ return { FONTCONFIG_FILE = "fonts.conf", FONTCONFIG_PATH = "$TEXMFSYSTEM/fonts/conf", - -- EXTRAFONTS = ".;e:/tmp//", - - -- we now have a different subsystem for this, - }, - -- 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'. + -- We have a few reserved subtables. These control runtime behaviour. Some are frozen at + -- at startup time, others can be changed any time. directives = { - -- There are a few variables that determine the engines - -- limits. Most will fade away when we close in on version 1. - - ["luatex.expanddepth"] = "10000", -- 10000 - ["luatex.hashextra"] = "100000", -- 0 - ["luatex.nestsize"] = "1000", -- 50 - ["luatex.maxinopen"] = "1000", -- 15 - ["luatex.maxprintline"] = " 10000", -- 79 - ["luatex.maxstrings"] = "500000", -- 15000 -- obsolete - ["luatex.paramsize"] = "25000", -- 60 - ["luatex.savesize"] = "100000", -- 4000 - ["luatex.stacksize"] = "100000", -- 300 + -- The default settings are actually set at startup so the values below overload + -- them. You can also specify a plus field which will bump a value and in LMTX a + -- step field that sets the incremental allocation of memory (because there we don't + -- allocate all at once). + + -- texconfig.max_print_line = 100000 + -- texconfig.function_size = 32768 + -- texconfig.properties_size = 10000 + + -- These are for metaluatex: + + ["luametatex.errorlinesize"] = { size = 250 }, -- max = 255 + ["luametatex.halferrorlinesize"] = { size = 250 }, -- max = 255 + ["luametatex.expandsize"] = { size = 10000 }, -- max = 1000000 + ["luametatex.stringsize"] = { size = 500000, step = 100000 }, -- max = 2097151 -- number of strings + ["luametatex.poolsize"] = { size = 10000000, step = 1000000 }, -- max = 100000000 -- chars in string + ["luametatex.hashsize"] = { size = 250000, step = 100000 }, -- max = 2097151 + ["luametatex.nodesize"] = { size = 50000000, step = 500000 }, -- max = 50000000 + ["luametatex.tokensize"] = { size = 10000000, step = 250000 }, -- max = 10000000 + ["luametatex.buffersize"] = { size = 10000000, step = 1000000 }, -- max = 100000000 + ["luametatex.inputsize"] = { size = 100000, step = 10000 }, -- max = 100000 -- aka stack + ["luametatex.filesize"] = { size = 2000, step = 200 }, -- max = 2000 + ["luametatex.nestsize"] = { size = 10000, step = 1000 }, -- max = 10000 + ["luametatex.parametersize"] = { size = 100000, step = 10000 }, -- max = 100000 + ["luametatex.savesize"] = { size = 500000, step = 10000 }, -- max = 500000 + ["luametatex.fontsize"] = { size = 250, step = 250 }, -- max = 100000 + ["luametatex.languagesize"] = { size = 250, step = 250 }, -- max = 10000 + ["luametatex.marksize"] = { size = 50, step = 50 }, -- max = 10000 + + -- These are for luatex: + + ["luatex.errorline"] = 250, + ["luatex.halferrorline"] = 125, + ["luatex.expanddepth"] = 10000, + ["luatex.hashextra"] = 100000, + ["luatex.nestsize"] = 1000, + ["luatex.maxinopen"] = 500, + ["luatex.maxprintline"] = 10000, + ["luatex.maxstrings"] = 500000, + ["luatex.paramsize"] = 25000, + ["luatex.savesize"] = 100000, + ["luatex.stacksize"] = 100000, -- A few process related variables come next. @@ -157,42 +165,25 @@ return { ["system.compile.cleanup"] = "no", -- remove tma files ["system.compile.strip"] = "yes", -- strip tmc files - -- sandboxing (these only kick in when --sandbox is given) .. the examples - -- below are just that, examples, as sandboxing is off by default ... when - -- turned on, restrictions kick in, and programs registered at runtime have - -- (even) more restrictions than already registered ones - - -- ["system.rootlist"] = { "/data" }, -- { { "/data", "read" }, ... } - -- - -- ["system.executionmode"] = "list", -- none | list | all - -- ["system.executionlist"] = { - -- "context", - -- "bibtex", "mlbibcontext", - -- "curl", - -- "gswin64c", "gswin32c", "gs", - -- "gm", "graphicmagick", "imagemagick", - -- "pdftops", - -- "pstoedit", - -- "inkscape", - -- "woff2_decompress", - -- "hb-shape", - -- }, - -- - -- ["system.librarymode"] = "list", -- none | list | all - -- ["system.librarylist"] = { - -- "mysql", - -- "sqlite3", - -- "libharfbuzz", "libharfbuzz-0", - -- } - - -- The mplib library support mechanisms have their own - -- configuration. Normally these variables can be left as - -- they are. + -- The io modes are similar to the traditional ones. Possible values are all, paranoid + -- and restricted. + + ["system.outputmode"] = "restricted", + ["system.inputmode"] = "any", + + -- The following variable is under consideration. We do have protection mechanims but + -- it's not enabled by default. + + ["system.commandmode"] = "any", -- any none list + ["system.commandlist"] = "mtxrun, convert, inkscape, gs, imagemagick, curl, bibtex, pstoedit", + + -- The mplib library support mechanisms have their own configuration. Normally these + -- variables can be left as they are. ["mplib.texerrors"] = "yes", - -- Normally you can leave the font related directives untouched - -- as they only make sense when testing. + -- Normally you can leave the font related directives untouched as they only make sense + -- when testing. -- ["fonts.autoreload"] = "no", -- ["fonts.otf.loader.cleanup"] = "0", -- 0 1 2 3 @@ -202,15 +193,40 @@ return { -- ["pdfview.method"] = "sumatra", + -- ["system.engine"] = "luajittex", -- ["fonts.usesystemfonts"] = false, - - -- You can permit loading modules with no prefix: - - -- ["modules.permitunprefixed"] = "no", - - -- You can permit loading files from anywhere in the TDS tree: - - -- ["resolvers.otherwise"] = "no", + -- ["modules.permitunprefixed"] = false, + -- ["resolvers.otherwise"] = false, + + -- Sandboxing has been available for a while but is probably never used to maybe that mechanism + -- should be removed some day. Normally you will configure this in a local configuration file. By + -- default we are rather permissive. The next list comes from my machine: + + -- ["system.rootlist"] = { "/data" }, -- { { "/data", "read" }, ... } + + -- ["system.executionmode"] = "list", -- none | list | all + -- ["system.executionlist"] = { + -- "context", + -- "bibtex", "mlbibcontext", + -- "curl", + -- "gswin64c", "gswin32c", "gs", + -- "gm", "graphicmagick", + -- "pdftops", + -- "pstoedit", + -- "inkscape", + -- "woff2_decompress", + -- "hb-shape", + -- }, + -- + -- ["system.librarymode"] = "list", -- none | list | all + -- ["system.librarylist"] = { + -- "mysql", + -- "sqlite3", + -- "libharfbuzz", "libharfbuzz-0", + -- }, + -- -- ["system.librarynames"] = { + -- -- ["libcurl"] = { "libcurl", "libcurl-4" }, + -- -- }, }, @@ -223,6 +239,4 @@ return { }, - -- TEXMFCACHE = "$SELFAUTOPARENT/texmf-cache", -- for old times sake - } |