3 -- ConTeXt needs a properly expanded TEXMFLOCAL, so here is a
4 -- bit of lua code to make that happen
6 local texmflocal
= resolvers
.prefixes
.selfautoparent();
7 texmflocal
= string.gsub(texmflocal
, "20%d%d$", "texmf-local");
11 type = "configuration",
15 comment
= "ConTeXt MkIV configuration file",
16 author
= "Hans Hagen, PRAGMA-ADE, Hasselt NL",
20 -- Originally there was support for engines and progname but I don't expect
21 -- other engines to use this file, so first engines were removed. After that
22 -- if made sense also to get rid of progname. At some point specific formats
23 -- will be supported but then as a subtable with fallbacks, which sounds more
24 -- natural. Also, at some point the paths will become tables. For the moment
25 -- I don't care too much about it as extending is easy.
29 -- The following variable is predefined (but can be overloaded) and in
30 -- most cases you can leve this one untouched. The built-in definition
31 -- permits relocation of the tree.
33 -- TEXMFCNF = "{selfautodir:,selfautoparent:}{,{/share,}/texmf{-local,}/web2c}"
35 -- more readable than "selfautoparent:{/texmf{-local,}{,/web2c},}}" is:
38 -- "selfautoparent:/texmf-local",
39 -- "selfautoparent:/texmf-local/web2c",
40 -- "selfautoparent:/texmf-dist",
41 -- "selfautoparent:/texmf/web2c",
45 -- only used for FONTCONFIG_PATH & TEXMFCACHE in TeX Live
47 TEXMFSYSVAR
= "/var/lib/texmf",
48 TEXMFVAR
= "home:.texlive/texmf-var",
50 -- We have only one cache path but there can be more. The first writable one
51 -- will be chosen but there can be more readable paths.
53 TEXMFCACHE
= "$TEXMFSYSVAR;$TEXMFVAR",
54 TEXMFCONFIG
= "home:.texlive/texmf-config",
56 -- I don't like this texmf under home and texmf-home would make more
57 -- sense. One never knows what installers put under texmf anywhere and
58 -- sorting out problems will be a pain. But on the other hand ... home
59 -- mess is normally under the users own responsibility.
61 -- By using prefixes we don't get expanded paths in the cache __path__
62 -- entry. This makes the tex root relocatable.
64 TEXMFOS
= "selfautodir:share",
65 TEXMFDIST
= "selfautodir:share/texmf-dist",
67 TEXMFLOCAL
= texmflocal
,
68 TEXMFSYSCONFIG
= "/etc/texmf",
69 TEXMFFONTS
= "selfautoparent:texmf-fonts",
70 TEXMFPROJECT
= "selfautoparent:texmf-project",
72 TEXMFHOME
= "home:texmf",
73 -- TEXMFHOME = os.name == "macosx" and "home:Library/texmf" or "home:texmf",
75 -- We need texmfos for a few rare files but as I have a few more bin trees
76 -- a hack is needed. Maybe other users also have texmf-platform-new trees.
78 TEXMF
= "{$TEXMFCONFIG,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFPROJECT,!!$TEXMFFONTS,!!$TEXMFLOCAL,!!$TEXMFDIST}",
80 TEXFONTMAPS
= ".;$TEXMF/fonts/data//;$TEXMF/fonts/map/{pdftex,dvips}//",
81 ENCFONTS
= ".;$TEXMF/fonts/data//;$TEXMF/fonts/enc/{dvips,pdftex}//",
82 VFFONTS
= ".;$TEXMF/fonts/{data,vf}//",
83 TFMFONTS
= ".;$TEXMF/fonts/{data,tfm}//",
84 T1FONTS
= ".;$TEXMF/fonts/{data,type1}//;$OSFONTDIR",
85 AFMFONTS
= ".;$TEXMF/fonts/{data,afm}//;$OSFONTDIR",
86 TTFONTS
= ".;$TEXMF/fonts/{data,truetype}//;$OSFONTDIR",
87 OPENTYPEFONTS
= ".;$TEXMF/fonts/{data,opentype}//;$OSFONTDIR",
88 CMAPFONTS
= ".;$TEXMF/fonts/cmap//",
89 FONTFEATURES
= ".;$TEXMF/fonts/{data,fea}//;$OPENTYPEFONTS;$TTFONTS;$T1FONTS;$AFMFONTS",
90 FONTCIDMAPS
= ".;$TEXMF/fonts/{data,cid}//",
91 OFMFONTS
= ".;$TEXMF/fonts/{data,ofm,tfm}//",
92 OVFFONTS
= ".;$TEXMF/fonts/{data,ovf,vf}//",
94 TEXINPUTS
= ".;$TEXMF/tex/{context,plain/base,generic}//",
95 MPINPUTS
= ".;$TEXMF/metapost/{context,base,}//",
97 -- In the next variable the inputs path will go away.
99 TEXMFSCRIPTS
= ".;$TEXMF/scripts/context/{lua,ruby,python,perl}//;$TEXINPUTS",
100 PERLINPUTS
= ".;$TEXMF/scripts/context/perl",
101 PYTHONINPUTS
= ".;$TEXMF/scripts/context/python",
102 RUBYINPUTS
= ".;$TEXMF/scripts/context/ruby",
103 LUAINPUTS
= ".;$TEXINPUTS;$TEXMF/scripts/context/lua//",
104 CLUAINPUTS
= ".;$SELFAUTOLOC/lib/{context,luatex,}/lua//",
106 -- Not really used by MkIV so they might go away.
108 BIBINPUTS
= ".;$TEXMF/bibtex/bib//",
109 BSTINPUTS
= ".;$TEXMF/bibtex/bst//",
113 ICCPROFILES
= ".;$TEXMF/tex/context/colors/{icc,profiles}//;$OSCOLORDIR",
115 -- A few special ones that will change some day.
117 FONTCONFIG_FILE
= "fonts.conf",
118 FONTCONFIG_PATH
= "$TEXMFSYSVAR/fonts/conf",
122 -- We have a few reserved subtables. These control runtime behaviour. The
123 -- keys have names like 'foo.bar' which means that you have to use keys
124 -- like ['foo.bar'] so for convenience we also support 'foo_bar'.
128 -- There are a few variables that determine the engines
129 -- limits. Most will fade away when we close in on version 1.
131 ["luatex.expanddepth"] = "10000", -- 10000
132 ["luatex.hashextra"] = "100000", -- 0
133 ["luatex.nestsize"] = "1000", -- 50
134 ["luatex.maxinopen"] = "500", -- 15
135 ["luatex.maxprintline"] = " 10000", -- 79
136 ["luatex.maxstrings"] = "500000", -- 15000 -- obsolete
137 ["luatex.paramsize"] = "25000", -- 60
138 ["luatex.savesize"] = "50000", -- 4000
139 ["luatex.stacksize"] = "10000", -- 300
141 -- A few process related variables come next.
143 -- ["system.checkglobals"] = "10",
144 -- ["system.nostatistics"] = "yes",
145 ["system.errorcontext"] = "10",
146 ["system.compile.cleanup"] = "no", -- remove tma files
147 ["system.compile.strip"] = "yes", -- strip tmc files
149 -- The io modes are similar to the traditional ones. Possible values
150 -- are all, paranoid and restricted.
152 ["system.outputmode"] = "restricted",
153 ["system.inputmode"] = "any",
155 -- The following variable is under consideration. We do have protection
156 -- mechanims but it's not enabled by default.
158 ["system.commandmode"] = "any", -- any none list
159 ["system.commandlist"] = "mtxrun, convert, inkscape, gs, imagemagick, curl, bibtex, pstoedit",
161 -- The mplib library support mechanisms have their own
162 -- configuration. Normally these variables can be left as
165 ["mplib.texerrors"] = "yes",
167 -- Normally you can leave the font related directives untouched
168 -- as they only make sense when testing.
170 -- ["fonts.autoreload"] = "no",
171 -- ["fonts.otf.loader.method"] = "table", -- table mixed sparse
172 -- ["fonts.otf.loader.cleanup"] = "0", -- 0 1 2 3
174 -- In an edit cycle it can be handy to launch an editor. The
175 -- preferred one can be set here.
177 -- ["pdfview.method"] = "okular", -- default (often acrobat) xpdf okular
182 ["fonts.autorscale"] = "yes",