summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--context/data/scite/scite-context-visual.pdfbin0 -> 19869 bytes
-rw-r--r--context/data/scite/scite-context-visual.pngbin0 -> 213032 bytes
-rw-r--r--context/data/scite/scite-context-visual.tex47
-rw-r--r--tex/context/base/cont-new.mkii2
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4095 -> 4096 bytes
-rw-r--r--tex/context/base/context-version.pngbin105577 -> 105871 bytes
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/font-con.lua25
-rw-r--r--tex/context/base/font-def.lua17
-rw-r--r--tex/context/base/font-otf.lua4
-rw-r--r--tex/context/base/font-otn.lua6
-rw-r--r--tex/context/base/font-ott.lua6
-rw-r--r--tex/context/base/m-steps.tex2
-rw-r--r--tex/context/base/math-act.lua2
-rw-r--r--tex/context/base/status-files.pdfbin23926 -> 23935 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin163152 -> 163154 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua54
19 files changed, 122 insertions, 49 deletions
diff --git a/context/data/scite/scite-context-visual.pdf b/context/data/scite/scite-context-visual.pdf
new file mode 100644
index 000000000..e7fffdfb7
--- /dev/null
+++ b/context/data/scite/scite-context-visual.pdf
Binary files differ
diff --git a/context/data/scite/scite-context-visual.png b/context/data/scite/scite-context-visual.png
new file mode 100644
index 000000000..aaf35e5e2
--- /dev/null
+++ b/context/data/scite/scite-context-visual.png
Binary files differ
diff --git a/context/data/scite/scite-context-visual.tex b/context/data/scite/scite-context-visual.tex
new file mode 100644
index 000000000..e4f22ea36
--- /dev/null
+++ b/context/data/scite/scite-context-visual.tex
@@ -0,0 +1,47 @@
+% language=uk
+
+\defineframedtext
+ [entry]
+
+\starttext
+
+\startchapter[title=Some fancy title]
+
+ \startluacode
+ local entries = { -- there can be more
+ { text = "The third entry!" },
+ { text = "The fourth entry!" },
+ }
+
+ for i=1,#entries do
+ context.startentry()
+ context(entries[i].text)
+ context.stopentry()
+ end
+ \stopluacode
+
+ This is just some text to demonstrate the realtime spellchecker
+ in combination with the embedded lua and metapost lexers and
+ inline as well as display \ctxlua{context("lua code")}.
+
+ \startlinecorrection
+ \startMPcode
+ for i=1 upto 100 :
+ draw fullcircle scaled (i*mm) ;
+ endfor ;
+ \stopMPcode
+ \stoplinecorrection
+
+ \iftrue
+ \def\crap{some text} % who cares
+ \else
+ \def\crap{some crap} % about this
+ \fi
+
+ \blank[2*big]
+
+ \crap
+
+\stopchapter
+
+\stoptext
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index 3991691fa..dd28de9dc 100644
--- a/tex/context/base/cont-new.mkii
+++ b/tex/context/base/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2011.10.05 23:53}
+\newcontextversion{2011.10.07 00:40}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index b5024f9d8..2184d8623 100644
--- a/tex/context/base/cont-new.mkiv
+++ b/tex/context/base/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2011.10.05 23:53}
+\newcontextversion{2011.10.07 00:40}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index 220bb77f4..5a88cfe5e 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png
index e7550b292..ba529163d 100644
--- a/tex/context/base/context-version.png
+++ b/tex/context/base/context-version.png
Binary files differ
diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii
index 504b133b9..91b1bedbd 100644
--- a/tex/context/base/context.mkii
+++ b/tex/context/base/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2011.10.05 23:53}
+\edef\contextversion{2011.10.07 00:40}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index add1251f3..7bcfbcdae 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2011.10.05 23:53}
+\edef\contextversion{2011.10.07 00:40}
%D For those who want to use this:
diff --git a/tex/context/base/font-con.lua b/tex/context/base/font-con.lua
index f6b415bc7..18123ed1e 100644
--- a/tex/context/base/font-con.lua
+++ b/tex/context/base/font-con.lua
@@ -146,7 +146,13 @@ function constructors.calculatescale(tfmdata,scaledpoints)
return scaledpoints, scaledpoints / (parameters.units or 1000) -- delta
end
-function constructors.assignmathparameters(target,original) -- dumb version, not used in context
+local unscaled = {
+ ScriptPercentScaleDown = true,
+ ScriptScriptPercentScaleDown = true,
+ RadicalDegreeBottomRaisePercent = true
+}
+
+function constructors.assignmathparameters(target,original) -- simple variant, not used in context
-- when a tfm file is loaded, it has already been scaled
-- and it never enters the scaled so this is otf only and
-- even then we do some extra in the context math plugins
@@ -157,18 +163,18 @@ function constructors.assignmathparameters(target,original) -- dumb version, not
local targetmathparameters = { }
local factor = targetproperties.math_is_scaled and 1 or targetparameters.factor
for name, value in next, mathparameters do
- if name == "RadicalDegreeBottomRaisePercent" then
+ if unscaled[name] then
targetmathparameters[name] = value
else
targetmathparameters[name] = value * factor
end
end
- -- if not targetmathparameters.FractionDelimiterSize then
- -- targetmathparameters.FractionDelimiterSize = 0
- -- end
- -- if not mathparameters.FractionDelimiterDisplayStyleSize then
- -- targetmathparameters.FractionDelimiterDisplayStyleSize = 0
- -- end
+ if not targetmathparameters.FractionDelimiterSize then
+ targetmathparameters.FractionDelimiterSize = 1.01 * targetparameters.size
+ end
+ if not mathparameters.FractionDelimiterDisplayStyleSize then
+ targetmathparameters.FractionDelimiterDisplayStyleSize = 2.40 * targetparameters.size
+ end
target.mathparameters = targetmathparameters
end
end
@@ -1122,6 +1128,9 @@ function constructors.collectprocessors(what,tfmdata,features,trace,report)
end
end
end
+ else
+ report("no feature processors for mode %s for font %s",
+ mode or 'unknown', tfmdata.properties.fullname or 'unknown')
end
end
return processes
diff --git a/tex/context/base/font-def.lua b/tex/context/base/font-def.lua
index e3f564f24..63d3e2c9e 100644
--- a/tex/context/base/font-def.lua
+++ b/tex/context/base/font-def.lua
@@ -170,13 +170,14 @@ end
function resolvers.name(specification)
local resolve = fonts.names.resolve
if resolve then
- local resolved, sub = fonts.names.resolve(specification.name,specification.sub)
- specification.resolved, specification.sub = resolved, sub
+ local resolved, sub = resolve(specification.name,specification.sub,specification) -- we pass specification for overloaded versions
if resolved then
+ specification.resolved = resolved
+ specification.sub = sub
local suffix = file.suffix(resolved)
if fonts.formats[suffix] then
specification.forced = suffix
- specification.name = file.removesuffix(resolved)
+ specification.name = file.removesuffix(resolved)
else
specification.name = resolved
end
@@ -189,10 +190,12 @@ end
function resolvers.spec(specification)
local resolvespec = fonts.names.resolvespec
if resolvespec then
- specification.resolved, specification.sub = fonts.names.resolvespec(specification.name,specification.sub)
- if specification.resolved then
- specification.forced = file.extname(specification.resolved)
- specification.name = file.removesuffix(specification.resolved)
+ local resolved, sub = resolvespec(specification.name,specification.sub,specification) -- we pass specification for overloaded versions
+ if resolved then
+ specification.resolved = resolved
+ specification.sub = sub
+ specification.forced = file.extname(resolved)
+ specification.name = file.removesuffix(resolved)
end
else
resolvers.name(specification)
diff --git a/tex/context/base/font-otf.lua b/tex/context/base/font-otf.lua
index 83b961e28..6a75a0c5c 100644
--- a/tex/context/base/font-otf.lua
+++ b/tex/context/base/font-otf.lua
@@ -345,8 +345,8 @@ function otf.load(filename,format,sub,featurefile)
local attr = lfs.attributes(name)
featurefiles[#featurefiles+1] = {
name = name,
- size = size,
- time = time,
+ size = attr and attr.size or 0,
+ time = attr and attr.modification or 0,
}
end
end
diff --git a/tex/context/base/font-otn.lua b/tex/context/base/font-otn.lua
index a972d50e7..ebdeb75a6 100644
--- a/tex/context/base/font-otn.lua
+++ b/tex/context/base/font-otn.lua
@@ -1984,11 +1984,11 @@ local function featuresprocessor(head,font,attr)
local datasets = otf.dataset(tfmdata,sequences,font,attr)
for s=1,#sequences do
- local pardir, txtdir, success = 0, { }, false -- we could reuse txtdir and use a top pointer
- local sequence = sequences[s]
- local dataset = datasets[s] -- cache
+ local dataset = datasets[s] -- cache -- s?
featurevalue = dataset and dataset[1] -- todo: pass to function instead of using a global
if featurevalue then
+ local sequence = sequences[s]
+ local pardir, txtdir, success = 0, { }, false -- we could reuse txtdir and use a top pointer
local attribute, chain, typ, subtables = dataset[2], dataset[3], sequence.type, sequence.subtables
if chain < 0 then
-- this is a limited case, no special treatments like 'init' etc
diff --git a/tex/context/base/font-ott.lua b/tex/context/base/font-ott.lua
index c13a20246..6c671d76f 100644
--- a/tex/context/base/font-ott.lua
+++ b/tex/context/base/font-ott.lua
@@ -778,14 +778,14 @@ local checkers = {
function otf.features.normalize(features) -- no longer 'lang'
if features then
local h = { }
- for k,v in next, features do
+ for k, v in next, features do
k = lower(k)
if k == "language" then
v = gsub(lower(v),"[^a-z0-9]","")
- h.language = rawget(verboselanguages,v) or languages[v] or "dflt" -- auto adds
+ h.language = rawget(verboselanguages,v) or (languages[v] and v) or "dflt" -- auto adds
elseif k == "script" then
v = gsub(lower(v),"[^a-z0-9]","")
- h.script = rawget(verbosescripts,v) or scripts[v] or "dflt" -- auto adds
+ h.script = rawget(verbosescripts,v) or (scripts[v] and v) or "dflt" -- auto adds
else
if type(v) == "string" then
local b = is_boolean(v)
diff --git a/tex/context/base/m-steps.tex b/tex/context/base/m-steps.tex
index 74a88e176..7bc92d456 100644
--- a/tex/context/base/m-steps.tex
+++ b/tex/context/base/m-steps.tex
@@ -832,6 +832,6 @@
\startnarrower \getbuffer \stopnarrower
-\placefigure[left]{}{} \getbuffer
+\placefigure[left]{}{\getbuffer}
\stoptext
diff --git a/tex/context/base/math-act.lua b/tex/context/base/math-act.lua
index 5b87fe69f..061da0519 100644
--- a/tex/context/base/math-act.lua
+++ b/tex/context/base/math-act.lua
@@ -43,6 +43,8 @@ sequencers.appendaction(mathactions,"system","mathematics.initializeparameters")
local how = {
-- RadicalKernBeforeDegree = "horizontal",
-- RadicalKernAfterDegree = "horizontal",
+ ScriptPercentScaleDown = "unscaled",
+ ScriptScriptPercentScaleDown = "unscaled",
RadicalDegreeBottomRaisePercent = "unscaled"
}
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index e9cbfaa7b..aa14184b0 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf
index 8e1d9e7c6..f9a664b66 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 4300963b5..5b610c906 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 : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 10/05/11 23:53:43
+-- merge date : 10/07/11 00:40:15
do -- begin closure to overcome local limits and interference
@@ -3263,7 +3263,13 @@ function constructors.calculatescale(tfmdata,scaledpoints)
return scaledpoints, scaledpoints / (parameters.units or 1000) -- delta
end
-function constructors.assignmathparameters(target,original) -- dumb version, not used in context
+local unscaled = {
+ ScriptPercentScaleDown = true,
+ ScriptScriptPercentScaleDown = true,
+ RadicalDegreeBottomRaisePercent = true
+}
+
+function constructors.assignmathparameters(target,original) -- simple variant, not used in context
-- when a tfm file is loaded, it has already been scaled
-- and it never enters the scaled so this is otf only and
-- even then we do some extra in the context math plugins
@@ -3274,18 +3280,18 @@ function constructors.assignmathparameters(target,original) -- dumb version, not
local targetmathparameters = { }
local factor = targetproperties.math_is_scaled and 1 or targetparameters.factor
for name, value in next, mathparameters do
- if name == "RadicalDegreeBottomRaisePercent" then
+ if unscaled[name] then
targetmathparameters[name] = value
else
targetmathparameters[name] = value * factor
end
end
- -- if not targetmathparameters.FractionDelimiterSize then
- -- targetmathparameters.FractionDelimiterSize = 0
- -- end
- -- if not mathparameters.FractionDelimiterDisplayStyleSize then
- -- targetmathparameters.FractionDelimiterDisplayStyleSize = 0
- -- end
+ if not targetmathparameters.FractionDelimiterSize then
+ targetmathparameters.FractionDelimiterSize = 1.01 * targetparameters.size
+ end
+ if not mathparameters.FractionDelimiterDisplayStyleSize then
+ targetmathparameters.FractionDelimiterDisplayStyleSize = 2.40 * targetparameters.size
+ end
target.mathparameters = targetmathparameters
end
end
@@ -4239,6 +4245,9 @@ function constructors.collectprocessors(what,tfmdata,features,trace,report)
end
end
end
+ else
+ report("no feature processors for mode %s for font %s",
+ mode or 'unknown', tfmdata.properties.fullname or 'unknown')
end
end
return processes
@@ -5367,8 +5376,8 @@ function otf.load(filename,format,sub,featurefile)
local attr = lfs.attributes(name)
featurefiles[#featurefiles+1] = {
name = name,
- size = size,
- time = time,
+ size = attr and attr.size or 0,
+ time = attr and attr.modification or 0,
}
end
end
@@ -10129,11 +10138,11 @@ local function featuresprocessor(head,font,attr)
local datasets = otf.dataset(tfmdata,sequences,font,attr)
for s=1,#sequences do
- local pardir, txtdir, success = 0, { }, false -- we could reuse txtdir and use a top pointer
- local sequence = sequences[s]
- local dataset = datasets[s] -- cache
+ local dataset = datasets[s] -- cache -- s?
featurevalue = dataset and dataset[1] -- todo: pass to function instead of using a global
if featurevalue then
+ local sequence = sequences[s]
+ local pardir, txtdir, success = 0, { }, false -- we could reuse txtdir and use a top pointer
local attribute, chain, typ, subtables = dataset[2], dataset[3], sequence.type, sequence.subtables
if chain < 0 then
-- this is a limited case, no special treatments like 'init' etc
@@ -12013,13 +12022,14 @@ end
function resolvers.name(specification)
local resolve = fonts.names.resolve
if resolve then
- local resolved, sub = fonts.names.resolve(specification.name,specification.sub)
- specification.resolved, specification.sub = resolved, sub
+ local resolved, sub = resolve(specification.name,specification.sub,specification) -- we pass specification for overloaded versions
if resolved then
+ specification.resolved = resolved
+ specification.sub = sub
local suffix = file.suffix(resolved)
if fonts.formats[suffix] then
specification.forced = suffix
- specification.name = file.removesuffix(resolved)
+ specification.name = file.removesuffix(resolved)
else
specification.name = resolved
end
@@ -12032,10 +12042,12 @@ end
function resolvers.spec(specification)
local resolvespec = fonts.names.resolvespec
if resolvespec then
- specification.resolved, specification.sub = fonts.names.resolvespec(specification.name,specification.sub)
- if specification.resolved then
- specification.forced = file.extname(specification.resolved)
- specification.name = file.removesuffix(specification.resolved)
+ local resolved, sub = resolvespec(specification.name,specification.sub,specification) -- we pass specification for overloaded versions
+ if resolved then
+ specification.resolved = resolved
+ specification.sub = sub
+ specification.forced = file.extname(resolved)
+ specification.name = file.removesuffix(resolved)
end
else
resolvers.name(specification)