Debian Codegraph @

texmf-dist/web2c/texmfcnf.lua

raw symbols ◀ ▶ SCIP
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 -- adaption by Preining Norbert / Hilmar Preuße for the Debian system
85
86 content = {
87 variables = {
88 -- System trees
•89 TEXMFDIST = "/usr/share/texlive/texmf-dist",
90 TEXMFLOCAL = "/usr/local/share/texmf",
91 TEXMFDEBIAN = "/usr/share/texmf",
92 TEXMFSYSCONFIG = "/etc/texmf",
93 TEXMFSYSVAR = system_cache .. "/var/lib/texmf",
94
95 -- User trees
96 TEXMFCONFIG = user_cache .. "/texmf-config",
97 TEXMFVAR = user_cache .. "/texmf-var",
98 TEXMFHOME = user_data,
99
100 -- Search paths
101 TEXMFCACHE = "$TEXMFSYSVAR;$TEXMFVAR",
102 TEXMF = "{\z
103 $TEXMFCONFIG,\z
104 $TEXMFHOME,\z
105 !!$TEXMFSYSCONFIG,\z
106 !!$TEXMFSYSVAR,\z
107 !!$TEXMFLOCAL,\z
•108 !!$TEXMFDEBIAN,\z
109 !!$TEXMFDIST\z
110 }",
111
112 -- Input locations: TeX
113 TEXINPUTS = ".;$TEXMF/tex/{context,generic,luatex}//",
114
115 -- Input locations: Fonts
116 TTFONTS = ".;" .. nontex_fonts ..
117 "$TEXMF/fonts/truetype//;$OSFONTDIR",
118 OPENTYPEFONTS = ".;" .. nontex_fonts ..
119 "$TEXMF/fonts/opentype//;$OSFONTDIR",
120 FONTCONFIG_PATH = "$TEXMFSYSVAR/fonts/conf",
121
122 -- Input locations: Lua
123 TEXMFSCRIPTS = ".;$TEXMF/scripts/context//;$TEXINPUTS",
124 LUAINPUTS = ".;$TEXINPUTS;$TEXMF/scripts/context/lua//",
125 CLUAINPUTS = "$SELFAUTOLOC/lib/$engine//", -- No "."; insecure
126
127 -- Input locations: Other
128 MPINPUTS = ".;$TEXMF/metapost//",
129 BIBINPUTS = ".;$TEXMF/bibtex/bib//;$TEXMF/tex/context/bib//",
130 ICCPROFILES = ".;" .. nontex_colors ..
131 "$TEXMF/tex/context/colors//;$OSCOLORDIR",
132 },
133
134 -- Copied from the original ConTeXt file; don't change these unless you
135 -- know what you are doing!
136 directives = {
137 -- LuaMetaTeX engine parameters
138 ["luametatex.errorlinesize"] = { size = 250 }, -- max = 255
139 ["luametatex.halferrorlinesize"] = { size = 250 }, -- max = 255
140 ["luametatex.expandsize"] = { size = 10000 }, -- max = 1000000
141 ["luametatex.stringsize"] = { size = 500000, step = 100000 }, -- max = 2097151 -- number of strings
142 ["luametatex.poolsize"] = { size = 10000000, step = 1000000 }, -- max = 100000000 -- chars in string
143 ["luametatex.hashsize"] = { size = 250000, step = 100000 }, -- max = 2097151
144 ["luametatex.nodesize"] = { size = 50000000, step = 500000 }, -- max = 50000000
145 ["luametatex.tokensize"] = { size = 10000000, step = 250000 }, -- max = 10000000
146 ["luametatex.buffersize"] = { size = 10000000, step = 1000000 }, -- max = 100000000
147 ["luametatex.inputsize"] = { size = 100000, step = 10000 }, -- max = 100000 -- aka stack
148 ["luametatex.filesize"] = { size = 2000, step = 200 }, -- max = 2000
149 ["luametatex.nestsize"] = { size = 10000, step = 1000 }, -- max = 10000
150 ["luametatex.parametersize"] = { size = 100000, step = 10000 }, -- max = 100000
151 ["luametatex.savesize"] = { size = 500000, step = 10000 }, -- max = 500000
152 ["luametatex.fontsize"] = { size = 100000, step = 250 }, -- max = 100000
153 ["luametatex.languagesize"] = { size = 250, step = 250 }, -- max = 10000
154 ["luametatex.marksize"] = { size = 250, step = 50 }, -- max = 10000
155 ["luametatex.insertsize"] = { size = 250, step = 25 }, -- max = 250
156
157 -- LuaTeX engine parameters
158 ["luatex.errorline"] = 250,
159 ["luatex.halferrorline"] = 125,
160 ["luatex.expanddepth"] = 10000,
161 ["luatex.hashextra"] = 100000,
162 ["luatex.nestsize"] = 1000,
163 ["luatex.maxinopen"] = 500,
164 ["luatex.maxprintline"] = 10000,
165 ["luatex.maxstrings"] = 500000,
166 ["luatex.paramsize"] = 25000,
167 ["luatex.savesize"] = 100000,
168 ["luatex.stacksize"] = 100000,
169
170 -- mtxrun parameters
171 ["system.errorcontext"] = "10",
172 ["system.compile.cleanup"] = "no", -- remove tma files
173 ["system.compile.strip"] = "yes", -- strip tmc files
174
175 -- I/O restrictions
176 ["system.outputmode"] = "restricted",
177 ["system.inputmode"] = "any",
178
179 -- Execution restrictions
180 ["system.commandmode"] = "list", -- none | list | all
181 ["system.executionmode"] = "list", -- none | list | all
182 ["system.commandlist"] = allowed_programs,
183 ["system.executionlist"] = allowed_programs,
184 ["system.librarymode"] = "none", -- none | list | all
185
186 -- Metapost
187 ["mplib.texerrors"] = "yes",
188 },
189 },
190
191 }