summaryrefslogtreecommitdiff
path: root/tex/generic
diff options
context:
space:
mode:
Diffstat (limited to 'tex/generic')
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua30
-rw-r--r--tex/generic/context/luatex/luatex-mplib.lua70
-rw-r--r--tex/generic/context/luatex/luatex-preprocessor.lua12
3 files changed, 48 insertions, 64 deletions
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index e885a56ed..7d9befa51 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 2023-03-20 15:42
+-- merge date : 2023-04-01 09:28
do -- begin closure to overcome local limits and interference
@@ -37807,7 +37807,7 @@ local fonts=fonts
local otf=fonts.handlers.otf
local registerotffeature=otf.features.register
local addotffeature=otf.addfeature
-local specification={
+local tlig={
type="ligature",
order={ "tlig" },
prepend=true,
@@ -37816,12 +37816,17 @@ local specification={
[0x2014]={ 0x002D,0x002D,0x002D },
},
}
-addotffeature("tlig",specification)
-registerotffeature {
- name="tlig",
- description="tex ligatures",
+local tquo={
+ type="ligature",
+ order={ "tquo" },
+ prepend=true,
+ data={
+ [0x201C]={ 0x0060,0x0060 },
+ [0x201D]={ 0x0027,0x0027 },
+ [0x201E]={ 0x002C,0x002C },
+ },
}
-local specification={
+local trep={
type="substitution",
order={ "trep" },
prepend=true,
@@ -37829,11 +37834,12 @@ local specification={
[0x0027]=0x2019,
},
}
-addotffeature("trep",specification)
-registerotffeature {
- name="trep",
- description="tex replacements",
-}
+addotffeature("trep",trep)
+addotffeature("tlig",tlig)
+addotffeature("tquo",tquo)
+registerotffeature { name="tlig",description="tex ligatures" }
+registerotffeature { name="tquo",description="tex quotes" }
+registerotffeature { name="trep",description="tex replacements" }
local anum_arabic={
[0x0030]=0x0660,
[0x0031]=0x0661,
diff --git a/tex/generic/context/luatex/luatex-mplib.lua b/tex/generic/context/luatex/luatex-mplib.lua
index 1839c44ee..99a23b03c 100644
--- a/tex/generic/context/luatex/luatex-mplib.lua
+++ b/tex/generic/context/luatex/luatex-mplib.lua
@@ -6,19 +6,14 @@ if not modules then modules = { } end modules ['luatex-mplib'] = {
license = "public domain",
}
---[[ldx--
-<p>This module is a stripped down version of libraries that are used
-by <l n='context'/>. It can be used in other macro packages and/or
-serve as an example. Embedding in a macro package is upto others and
-normally boils down to inputting <t>supp-mpl.tex</t>.</p>
---ldx]]--
+-- This module is a stripped down version of libraries that are used by ConTeXt. It
+-- can be used in other macro packages and/or serve as an example. Embedding in a
+-- macro package is upto others and normally boils down to inputting 'supp-mpl.tex'.
if metapost and metapost.version then
- --[[ldx--
- <p>Let's silently quit and make sure that no one loads it
- manually in <l n='context'/>.</p>
- --ldx]]--
+ -- Let's silently quit and make sure that no one loads it manually in
+ -- ConTeXt.
else
@@ -29,27 +24,25 @@ else
local mplib = require ('mplib')
local kpse = require ('kpse')
- --[[ldx--
- <p>We create a namespace and some variables to it. If a namespace is
- already defined it wil not be initialized. This permits hooking
- in code beforehand.</p>
+ -- We create a namespace and some variables to it. If a namespace is already
+ -- defined it wil not be initialized. This permits hooking in code beforehand.
- <p>We don't make a format automatically. After all, distributions
- might have their own preferences and normally a format (mem) file will
- have some special place in the <l n='tex'/> tree. Also, there can already
- be format files, different memort settings and other nasty pitfalls that
- we don't want to interfere with. If you want, you can define a function
- <t>metapost.make(name,mem_name) that does the job.</t></p>
- --ldx]]--
+ -- We don't make a format automatically. After all, distributions might have
+ -- their own preferences and normally a format (mem) file will have some
+ -- special place in the TeX tree. Also, there can already be format files,
+ -- different memort settings and other nasty pitfalls that we don't want to
+ -- interfere with. If you want, you can define a function
+ --
+ -- metapost.make (name,mem_name)
+ --
+ -- that does the job.
metapost = metapost or { }
metapost.version = 1.00
metapost.showlog = metapost.showlog or false
metapost.lastlog = ""
- --[[ldx--
- <p>A few helpers, taken from <t>l-file.lua</t>.</p>
- --ldx]]--
+ -- A few helpers, taken from 'l-file.lua'.
local file = file or { }
@@ -61,10 +54,7 @@ else
return (string.gsub(filename,"%.[%a%d]+$",""))
end
- --[[ldx--
- <p>We use the <l n='kpse'/> library unless a finder is already
- defined.</p>
- --ldx]]--
+ -- We use the KPSE library unless a finder is already defined.
local mpkpse = kpse.new("luatex","mpost")
@@ -76,10 +66,9 @@ else
end
end
- --[[ldx--
- <p>You can use your own reported if needed, as long as it handles multiple
- arguments and formatted strings.</p>
- --ldx]]--
+ -- You can use your own reported if needed, as long as it handles multiple
+ -- arguments and formatted strings.
+
metapost.report = metapost.report or function(...)
if logs.report then
@@ -89,11 +78,9 @@ else
end
end
- --[[ldx--
- <p>The rest of this module is not documented. More info can be found in the
- <l n='luatex'/> manual, articles in user group journals and the files that
- ship with <l n='context'/>.</p>
- --ldx]]--
+ -- The rest of this module is not documented. More info can be found in the
+ -- LuaTeX manual, articles in user group journals and the files that ship
+ -- with ConTeXt.
function metapost.resetlastlog()
metapost.lastlog = ""
@@ -329,9 +316,8 @@ else
return true -- done
end
- --[[ldx--
- <p>We removed some message and tracing code. We might even remove the flusher</p>
- --ldx]]--
+ -- We removed some message and tracing code. We might even remove the
+ -- flusher.
local function pdf_startfigure(n,llx,lly,urx,ury)
tex.sprint(format("\\startMPLIBtoPDF{%s}{%s}{%s}{%s}",llx,lly,urx,ury))
@@ -443,9 +429,7 @@ else
return t
end
- --[[ldx--
- <p>Support for specials has been removed.</p>
- --ldx]]--
+ -- Support for specials has been removed.
function metapost.flush(result,flusher)
if result then
diff --git a/tex/generic/context/luatex/luatex-preprocessor.lua b/tex/generic/context/luatex/luatex-preprocessor.lua
index 8faa0b47e..b1debcd5c 100644
--- a/tex/generic/context/luatex/luatex-preprocessor.lua
+++ b/tex/generic/context/luatex/luatex-preprocessor.lua
@@ -6,11 +6,9 @@ if not modules then modules = { } end modules ['luatex-preprocessor'] = {
license = "see context related readme files"
}
---[[ldx
-<p>This is a stripped down version of the preprocessor. In
-<l n='context'/> we have a bit more, use a different logger, and
-use a few optimizations. A few examples are shown at the end.</p>
---ldx]]
+-- This is a stripped down version of the preprocessor. In ConTeXt we have a bit
+-- more, use a different logger, and use a few optimizations. A few examples are
+-- shown at the end.
local rep, sub, gmatch = string.rep, string.sub, string.gmatch
local insert, remove = table.insert, table.remove
@@ -99,10 +97,6 @@ local parser = lpeg.Cs { "converter",
converter = (lpeg.V("definition") + anything)^1,
}
---[[ldx
-<p>We provide a few commands.</p>
---ldx]]
-
-- local texkpse
local function find_file(...)