Debian Codegraph @

texmf-dist/web2c/texmfcnf.lua

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 -- ConTeXt Packaging Scripts
2 -- https://github.com/gucci-on-fleek/context-packaging
3 -- SPDX-License-Identifier: GPL-2.0-or-later
4 -- SPDX-FileCopyrightText: 2024 Hans Hagen
5 -- SPDX-FileCopyrightText: 2025 Max Chernoff
6
7 -- Note that this file will be overwritten on upgrades, so users should place
8 -- any modifications in another location!
9
10 -- It is recommended that downstream distributors only modify the variables in
11 -- the following section (although you can modify any other section if you know
12 -- what you are doing).
13
14 --- BEGIN RECOMMENDED MODIFICATIONS SECTION ---
15 -- The location of the distribution's TEXMF tree. The contents stored in this
16 -- path should not be modified by users.
17 local distribution = "selfautoparent:texmf-dist"
18
19 -- Where ConTeXt should store any caches.
20 local system_cache = "selfautoparent:"
21 local user_cache = "home:.texlive2025"
22
23 -- Where ConTeXt should search for custom files.
24 local system_data = "selfautoparent:../texmf-local"
25 local user_data = "home:texmf"
26
27 -- The location of non-TeX files optionally used by ConTeXt.
28 local nontex_fonts, nontex_colors
29 if os.type == "windows" then
30 nontex_fonts = "\z
31 home:AppData/Local/Microsoft/Windows/Fonts;\z
32 C:/Windows/Fonts;\z
33 "
34 nontex_colors = "" -- No idea where this is on Windows; patches welcome
35 elseif os.name == "macosx" then
36 nontex_fonts = "\z
37 home:Library/Fonts;\z
38 /Library/Fonts;\z
39 /System/Library/Fonts;\z
40 "
41 nontex_colors = "" -- No idea where this is on macOS; patches welcome
42 else -- Linux, BSD, etc.
43 nontex_fonts = "\z
44 home:.local/share/fonts;\z
45 /usr/local/share/fonts//;\z
46 /usr/share/fonts//;\z
47 "
48 nontex_colors = "\z
49 home:.local/share/icc//;\z
50 /usr/local/share/color/icc//;\z
51 /usr/share/color/icc//;\z
52 "
53 end
54
55 -- Programs that should be allowed to run in restricted mode. Note that this is
56 -- provided as a convenience feature only, and is **NOT** a security feature.
57 -- Users must not compile untrusted ConTeXt documents without using external
58 -- sandboxing mechanisms (Docker, Bubblewrap, systemd-run, etc.).
59 local allowed_programs = table.concat({
60 "bibtex",
61 "bibtex8",
62 "extractbb",
63 "gregorio",
64 "kpsewhich",
65 "l3sys-query",
66 "latexminted",
67 "makeindex",
68 "memoize-extract.pl",
69 "memoize-extract.py",
70 "r-mpost",
71 "repstopdf",
72 "texosquery-jre8",
73 }, ",")
74 --- END RECOMMENDED MODIFICATIONS SECTION ---
75
76 return {
77 type = "configuration",
78 version = "1.1.3",
79 date = "2024-02-10",
80 time = "14:59:00",
81 comment = "ConTeXt MkIV and LMTX configuration file",
82 author = "Hans Hagen & Max Chernoff",
83 target = "texlive",
84
85 content = {
86 variables = {
87 -- System trees
88 TEXMFDIST = distribution,
89 TEXMFLOCAL = system_data,
90 TEXMFSYSCONFIG = system_cache .. "/texmf-config",
91 TEXMFSYSVAR = system_cache .. "/texmf-var",
92
93 -- User trees
94 TEXMFCONFIG = user_cache .. "/texmf-config",
95 TEXMFVAR = user_cache .. "/texmf-var",
96 TEXMFHOME = user_data,
97
98 -- Search paths
99 TEXMFCACHE = "$TEXMFSYSVAR;$TEXMFVAR",
100 TEXMF = "{\z
101 $TEXMFCONFIG,\z
102 $TEXMFHOME,\z
103 !!$TEXMFSYSCONFIG,\z
104 !!$TEXMFSYSVAR,\z
105 !!$TEXMFLOCAL,\z
106 !!$TEXMFDIST\z
107 }",
108
109 -- Input locations: TeX
110 TEXINPUTS = ".;$TEXMF/tex/{context,generic,luatex}//",
111
112 -- Input locations: Fonts
113 TTFONTS = ".;" .. nontex_fonts ..
114 "$TEXMF/fonts/truetype//;$OSFONTDIR",
115 OPENTYPEFONTS = ".;" .. nontex_fonts ..
116 "$TEXMF/fonts/opentype//;$OSFONTDIR",
117 FONTCONFIG_PATH = "$TEXMFSYSVAR/fonts/conf",
118
119 -- Input locations: Lua
120 TEXMFSCRIPTS = ".;$TEXMF/scripts/context//;$TEXINPUTS",
121 LUAINPUTS = ".;$TEXINPUTS;$TEXMF/scripts/context/lua//",
122 CLUAINPUTS = "$SELFAUTOLOC/lib/$engine//", -- No "."; insecure
123
124 -- Input locations: Other
125 MPINPUTS = ".;$TEXMF/metapost//",
126 BIBINPUTS = ".;$TEXMF/bibtex/bib//;$TEXMF/tex/context/bib//",
127 ICCPROFILES = ".;" .. nontex_colors ..
128 "$TEXMF/tex/context/colors//;$OSCOLORDIR",
129 },
130
131 -- Copied from the original ConTeXt file; don't change these unless you
132 -- know what you are doing!
133 directives = {
134 -- LuaMetaTeX engine parameters
135 ["luametatex.errorlinesize"] = { size = 250 }, -- max = 255
136 ["luametatex.halferrorlinesize"] = { size = 250 }, -- max = 255
137 ["luametatex.expandsize"] = { size = 10000 }, -- max = 1000000
138 ["luametatex.stringsize"] = { size = 500000, step = 100000 }, -- max = 2097151 -- number of strings
139 ["luametatex.poolsize"] = { size = 10000000, step = 1000000 }, -- max = 100000000 -- chars in string
140 ["luametatex.hashsize"] = { size = 250000, step = 100000 }, -- max = 2097151
141 ["luametatex.nodesize"] = { size = 50000000, step = 500000 }, -- max = 50000000
142 ["luametatex.tokensize"] = { size = 10000000, step = 250000 }, -- max = 10000000
143 ["luametatex.buffersize"] = { size = 10000000, step = 1000000 }, -- max = 100000000
144 ["luametatex.inputsize"] = { size = 100000, step = 10000 }, -- max = 100000 -- aka stack
145 ["luametatex.filesize"] = { size = 2000, step = 200 }, -- max = 2000
146 ["luametatex.nestsize"] = { size = 10000, step = 1000 }, -- max = 10000
147 ["luametatex.parametersize"] = { size = 100000, step = 10000 }, -- max = 100000
148 ["luametatex.savesize"] = { size = 500000, step = 10000 }, -- max = 500000
149 ["luametatex.fontsize"] = { size = 100000, step = 250 }, -- max = 100000
150 ["luametatex.languagesize"] = { size = 250, step = 250 }, -- max = 10000
151 ["luametatex.marksize"] = { size = 250, step = 50 }, -- max = 10000
152 ["luametatex.insertsize"] = { size = 250, step = 25 }, -- max = 250
153
154 -- LuaTeX engine parameters
155 ["luatex.errorline"] = 250,
156 ["luatex.halferrorline"] = 125,
157 ["luatex.expanddepth"] = 10000,
158 ["luatex.hashextra"] = 100000,
159 ["luatex.nestsize"] = 1000,
160 ["luatex.maxinopen"] = 500,
161 ["luatex.maxprintline"] = 10000,
162 ["luatex.maxstrings"] = 500000,
163 ["luatex.paramsize"] = 25000,
164 ["luatex.savesize"] = 100000,
165 ["luatex.stacksize"] = 100000,
166
167 -- mtxrun parameters
168 ["system.errorcontext"] = "10",
169 ["system.compile.cleanup"] = "no", -- remove tma files
170 ["system.compile.strip"] = "yes", -- strip tmc files
171
172 -- I/O restrictions
173 ["system.outputmode"] = "restricted",
174 ["system.inputmode"] = "any",
175
176 -- Execution restrictions
177 ["system.commandmode"] = "list", -- none | list | all
178 ["system.executionmode"] = "list", -- none | list | all
179 ["system.commandlist"] = allowed_programs,
180 ["system.executionlist"] = allowed_programs,
181 ["system.librarymode"] = "none", -- none | list | all
182
183 -- Metapost
184 ["mplib.texerrors"] = "yes",
185 },
186 },
187
188 }