contextcnf.lua /size: 11 Kb    last modification: 2021-10-28 13:51
1-- 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
2
3return {
4
5    type    = "configuration",
6    version = "1.1.2",      -- "1.1.1",
7    date    = "2021-05-12", -- "2011-06-02"
8    time    = "14:59:00",
9    comment = "ConTeXt MkIV and LMTX configuration file",
10    author  = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
11
12    content = {
13
14        -- Originally there was support for engines and progname but I don't expect other engines to
15        -- use this file, so first engines were removed. After that if made sense also to get rid of
16        -- progname. In principle we could support multiple formats here (using subtables) but time
17        -- has demonstrated that we only have one format (the original ideas was to make a base layer
18        -- but I don't see it being used to it would be  waste of time). So, after a decade it was
19        -- time to prune and update this file, also because LMTX has a few more features.
20
21        variables = {
22
23            -- The following variable is predefined (but can be overloaded) and in most cases you can
24            -- leave this one untouched. The built-in definition permits relocation of the tree.
25            --
26            --  if this_is_texlive then
27            --      resolvers.luacnfspec = 'selfautodir:;selfautoparent:;{selfautodir:,selfautoparent:}{/share,}/texmf{-local,}/web2c'
28            --  else
29            --      resolvers.luacnfspec = 'home:texmf/web2c;selfautoparent:texmf{-local,-context,}/web2c'
30            --  end
31            --
32            -- more readable is:
33            --
34            -- TEXMFCNF     = {
35            --     "home:texmf/web2c,
36            --     "selfautoparent:texmf-local/web2c",
37            --     "selfautoparent:texmf-context/web2c",
38            --     "selfautoparent:texmf/web2c",
39            -- }
40
41            -- We have only one cache path but there can be more. The first writable one will be taken
42            -- but there can be more readable paths.
43
44            TEXMFCACHE      = "$SELFAUTOPARENT/texmf-cache",
45
46            -- I don't like this texmf under home and texmf-home would make more sense. One never knows
47            -- what installers put under texmf anywhere and sorting out problems will be a pain. But on
48            -- the other hand ... home mess is normally the users own responsibility.
49            --
50            -- By using prefixes we don't get expanded paths in the cache __path__ entry. This makes the
51            -- tex root relocatable.
52
53            TEXMFOS         = "selfautodir:",
54            TEXMFSYSTEM     = "selfautoparent:texmf-$SELFAUTOSYSTEM",
55            TEXMFMAIN       = "selfautoparent:texmf",
56            TEXMFCONTEXT    = "selfautoparent:texmf-context",
57            TEXMFMODULES    = "selfautoparent:texmf-modules",
58            TEXMFLOCAL      = "selfautoparent:texmf-local",
59            TEXMFFONTS      = "selfautoparent:texmf-fonts",
60            TEXMFPROJECT    = "selfautoparent:texmf-project",
61
62            TEXMFHOME       = "home:texmf",
63         -- TEXMFHOME       = os.name == "macosx" and "home:Library/texmf" or "home:texmf",
64
65            -- We need texmfos for a few rare files but as I have a few more bin trees a hack is needed.
66            -- Maybe other users also have texmf-platform-new trees, but so far I've never heard of it.
67
68            TEXMF           = "{$TEXMFHOME,!!$TEXMFPROJECT,!!$TEXMFFONTS,!!$TEXMFLOCAL,!!$TEXMFMODULES,!!$TEXMFCONTEXT,!!$TEXMFSYSTEM,!!$TEXMFMAIN}",
69
70            TEXFONTMAPS     = ".;$TEXMF/fonts/data//;$TEXMF/fonts/map/{pdftex,dvips}//",
71            ENCFONTS        = ".;$TEXMF/fonts/data//;$TEXMF/fonts/enc/{dvips,pdftex}//",
72            VFFONTS         = ".;$TEXMF/fonts/{data,vf}//",
73            TFMFONTS        = ".;$TEXMF/fonts/{data,tfm}//",
74            PKFONTS         = ".;$TEXMF/fonts/{data,pk}//",
75            T1FONTS         = ".;$TEXMF/fonts/{data,type1}//;$OSFONTDIR",
76            AFMFONTS        = ".;$TEXMF/fonts/{data,afm}//;$OSFONTDIR",
77            TTFONTS         = ".;$TEXMF/fonts/{data,truetype}//;$OSFONTDIR",
78            OPENTYPEFONTS   = ".;$TEXMF/fonts/{data,opentype}//;$OSFONTDIR",
79            FONTFEATURES    = ".;$TEXMF/fonts/{data,fea}//;$OPENTYPEFONTS;$TTFONTS;$T1FONTS;$AFMFONTS",
80            FONTCIDMAPS     = ".;$TEXMF/fonts/{data,cid}//",
81            OFMFONTS        = ".;$TEXMF/fonts/{data,ofm,tfm}//",
82            OVFFONTS        = ".;$TEXMF/fonts/{data,ovf,vf}//",
83
84            TEXINPUTS       = ".;$TEXMF/tex/{context,plain/base,generic}//",
85            MPINPUTS        = ".;$TEXMF/metapost/{context,base,}//",
86
87            -- In the next variable the inputs path will go away.
88
89            TEXMFSCRIPTS    = ".;$TEXMF/scripts/context/{lua,ruby,python,perl}//;$TEXINPUTS",
90            PERLINPUTS      = ".;$TEXMF/scripts/context/perl",
91            PYTHONINPUTS    = ".;$TEXMF/scripts/context/python",
92            RUBYINPUTS      = ".;$TEXMF/scripts/context/ruby",
93            LUAINPUTS       = ".;$TEXINPUTS;$TEXMF/scripts/context/lua//",
94            CLUAINPUTS      = ".;$SELFAUTOLOC/lib/$engine//",
95
96            -- Not really used by MkIV so they might go away.
97
98            BIBINPUTS       = ".;$TEXMF/bibtex/bib//;$TEXMF/tex/context//",
99            BSTINPUTS       = ".;$TEXMF/bibtex/bst//;$TEXMF/tex/context//",
100
101            -- Experimental
102
103            ICCPROFILES     = ".;$TEXMF/colors/icc/{context,profiles}//;$OSCOLORDIR",
104
105            -- A few special ones that will change some day.
106
107            FONTCONFIG_FILE = "fonts.conf",
108            FONTCONFIG_PATH = "$TEXMFSYSTEM/fonts/conf",
109
110        },
111
112        -- We have a few reserved subtables. These control runtime behaviour. Some are frozen at
113        -- at startup time, others can be changed any time.
114
115        directives = {
116
117            -- The default settings are actually set at startup so the values below overload
118            -- them. You can also specify a plus field which will bump a value and in LMTX a
119            -- step field that sets the incremental allocation of memory (because there we don't
120            -- allocate all at once).
121
122            -- texconfig.max_print_line  =   100000
123            -- texconfig.function_size   =    32768
124            -- texconfig.properties_size =    10000
125
126            -- These are for luametatex:
127
128            ["luametatex.errorlinesize"]     = { size =      250                 }, -- max =       255
129            ["luametatex.halferrorlinesize"] = { size =      250                 }, -- max =       255
130            ["luametatex.expandsize"]        = { size =    10000                 }, -- max =   1000000
131            ["luametatex.stringsize"]        = { size =   500000, step =  100000 }, -- max =   2097151 -- number of strings
132            ["luametatex.poolsize"]          = { size = 10000000, step = 1000000 }, -- max = 100000000 -- chars in string
133            ["luametatex.hashsize"]          = { size =   250000, step =  100000 }, -- max =   2097151
134            ["luametatex.nodesize"]          = { size = 50000000, step =  500000 }, -- max =  50000000
135            ["luametatex.tokensize"]         = { size = 10000000, step =  250000 }, -- max =  10000000
136            ["luametatex.buffersize"]        = { size = 10000000, step = 1000000 }, -- max = 100000000
137            ["luametatex.inputsize"]         = { size =   100000, step =   10000 }, -- max =    100000 -- aka stack
138            ["luametatex.filesize"]          = { size =     2000, step =     200 }, -- max =      2000
139            ["luametatex.nestsize"]          = { size =    10000, step =    1000 }, -- max =     10000
140            ["luametatex.parametersize"]     = { size =   100000, step =   10000 }, -- max =    100000
141            ["luametatex.savesize"]          = { size =   500000, step =   10000 }, -- max =    500000
142            ["luametatex.fontsize"]          = { size =   100000, step =     250 }, -- max =    100000
143            ["luametatex.languagesize"]      = { size =      250, step =     250 }, -- max =     10000
144            ["luametatex.marksize"]          = { size =      250, step =      50 }, -- max =     10000
145            ["luametatex.insertsize"]        = { size =      250, step =      25 }, -- max =       250
146
147            -- These are for luatex:
148
149            ["luatex.errorline"]         =    250,
150            ["luatex.halferrorline"]     =    125,
151            ["luatex.expanddepth"]       =  10000,
152            ["luatex.hashextra"]         = 100000,
153            ["luatex.nestsize"]          =   1000,
154            ["luatex.maxinopen"]         =    500,
155            ["luatex.maxprintline"]      =  10000,
156            ["luatex.maxstrings"]        = 500000,
157            ["luatex.paramsize"]         =  25000,
158            ["luatex.savesize"]          = 100000,
159            ["luatex.stacksize"]         = 100000,
160
161            -- A few process related variables come next.
162
163         -- ["system.checkglobals"]      = "10",
164         -- ["system.nostatistics"]      = "yes",
165            ["system.errorcontext"]      = "10",
166            ["system.compile.cleanup"]   = "no",    -- remove tma files
167            ["system.compile.strip"]     = "yes",   -- strip tmc files
168
169            -- The io modes are similar to the traditional ones. Possible values are all, paranoid
170            -- and restricted.
171
172            ["system.outputmode"]        = "restricted",
173            ["system.inputmode"]         = "any",
174
175            -- The following variable is under consideration. We do have protection mechanims but
176            -- it's not enabled by default.
177
178            ["system.commandmode"]       = "any", -- any none list
179            ["system.commandlist"]       = "mtxrun, convert, inkscape, gs, imagemagick, curl, bibtex, pstoedit",
180
181            -- The mplib library support mechanisms have their own configuration. Normally these
182            -- variables can be left as they are.
183
184            ["mplib.texerrors"]          = "yes",
185
186            -- Normally you can leave the font related directives untouched as they only make sense
187            -- when testing.
188
189         -- ["fonts.autoreload"]         = "no",
190         -- ["fonts.otf.loader.cleanup"] = "0",     -- 0 1 2 3
191
192            -- In an edit cycle it can be handy to launch an editor. The
193            -- preferred one can be set here.
194
195         -- ["pdfview.method"]           = "sumatra",
196
197         -- ["system.engine"]            = "luajittex",
198         -- ["fonts.usesystemfonts"]     = false,
199         -- ["modules.permitunprefixed"] = false,
200         -- ["resolvers.otherwise"]      = false,
201
202         -- Sandboxing has been available for a while but is probably never used to maybe that mechanism
203         -- should be removed some day. Normally you will configure this in a local configuration file. By
204         -- default we are rather permissive. The next list comes from my machine:
205
206         -- ["system.rootlist"]      = { "/data" }, -- { { "/data", "read" }, ... }
207
208      --    ["system.executionmode"] = "list", -- none | list | all
209      --    ["system.executionlist"] = {
210      --        "context",
211      --        "bibtex", "mlbibcontext",
212      --        "curl",
213      --        "gswin64c", "gswin32c", "gs",
214      --        "gm", "graphicmagick",
215      --        "pdftops",
216      --        "pstoedit",
217      --        "inkscape",
218      --        "woff2_decompress",
219      --        "hb-shape",
220      --    },
221      --
222      --    ["system.librarymode"]   = "list", -- none | list | all
223      --    ["system.librarylist"]   = {
224      --        "mysql",
225      --        "sqlite3",
226      --        "libharfbuzz", "libharfbuzz-0",
227      --    },
228      -- -- ["system.librarynames"]  = {
229      -- --     ["libcurl"] = { "libcurl", "libcurl-4" },
230      -- -- },
231
232        },
233
234        experiments = {
235            ["fonts.autorscale"] = "yes",
236        },
237
238        trackers = {
239        },
240
241    },
242
243}
244