summaryrefslogtreecommitdiff
path: root/tex/context
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context')
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-rw-r--r--tex/context/base/mkii/mult-cs.mkii1
-rw-r--r--tex/context/base/mkiv/back-exp.lua29
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/meta-lua.lua2
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin25363 -> 25371 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin256166 -> 256137 bytes
-rw-r--r--tex/context/base/mkxl/back-exp.mkxl2
-rw-r--r--tex/context/base/mkxl/cont-new.mkxl2
-rw-r--r--tex/context/base/mkxl/context.mkxl2
-rw-r--r--tex/context/base/mkxl/font-fea.mklx44
-rw-r--r--tex/context/base/mkxl/meta-imp-txt.mkxl24
-rw-r--r--tex/context/base/mkxl/mlib-fio.lmt12
-rw-r--r--tex/context/base/mkxl/mlib-mpf.lmt24
-rw-r--r--tex/context/base/mkxl/typo-par.lmt103
-rw-r--r--tex/context/base/mkxl/typo-shp.lmt150
-rw-r--r--tex/context/base/mkxl/typo-shp.mkxl1
-rw-r--r--tex/context/interface/mkii/keys-cs.xml1
20 files changed, 236 insertions, 169 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 623678b40..cbbe223a9 100644
--- a/tex/context/base/mkii/cont-new.mkii
+++ b/tex/context/base/mkii/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2021.03.01 15:33}
+\newcontextversion{2021.03.02 19:17}
%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/mkii/context.mkii b/tex/context/base/mkii/context.mkii
index 9ac6432f5..88620fc90 100644
--- a/tex/context/base/mkii/context.mkii
+++ b/tex/context/base/mkii/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2021.03.01 15:33}
+\edef\contextversion{2021.03.02 19:17}
%D For those who want to use this:
diff --git a/tex/context/base/mkii/mult-cs.mkii b/tex/context/base/mkii/mult-cs.mkii
index 798779b96..0f2336d65 100644
--- a/tex/context/base/mkii/mult-cs.mkii
+++ b/tex/context/base/mkii/mult-cs.mkii
@@ -1120,6 +1120,7 @@
\setinterfaceconstant{print}{print}
\setinterfaceconstant{printable}{tisknutelne}
\setinterfaceconstant{process}{process}
+\setinterfaceconstant{processors}{processors}
\setinterfaceconstant{profile}{profile}
\setinterfaceconstant{properties}{properties}
\setinterfaceconstant{pubsep}{pubsep}
diff --git a/tex/context/base/mkiv/back-exp.lua b/tex/context/base/mkiv/back-exp.lua
index 983c6059f..700c1f040 100644
--- a/tex/context/base/mkiv/back-exp.lua
+++ b/tex/context/base/mkiv/back-exp.lua
@@ -44,6 +44,8 @@ local formatters = string.formatters
local todimen = number.todimen
local replacetemplate = utilities.templates.replace
+local addsuffix, joinfile, nameonly, basename, filesuffix = file.addsuffix, file.join, file.nameonly, file.basename, file.suffix
+
local trace_export = false trackers.register ("export.trace", function(v) trace_export = v end)
local trace_spacing = false trackers.register ("export.trace.spacing", function(v) trace_spacing = v end)
local trace_details = false trackers.register ("export.trace.details", function(v) trace_details = v end)
@@ -328,10 +330,10 @@ local styletemplate = [[
[3] = "left", ["3"] = "left", [variables.flushleft ] = "left",
}
- function wrapups.allusedstyles(basename)
+ function wrapups.allusedstyles(filename)
local result = { replacetemplate(namespacetemplate, {
what = "styles",
- filename = basename,
+ filename = filename,
namespace = contextns,
-- cssnamespaceurl = usecssnamespace and cssnamespaceurl or cssnamespacenop,
cssnamespaceurl = cssnamespaceurl,
@@ -415,27 +417,27 @@ local imagetemplate = [[
local collected = { }
local function usedname(name,page)
- if file.suffix(name) == "pdf" then
+ if filesuffix(name) == "pdf" then
-- temp hack .. we will have a remapper
if page and page > 1 then
- name = f_svgpage(file.nameonly(name),page)
+ name = f_svgpage(nameonly(name),page)
else
- name = f_svgname(file.nameonly(name))
+ name = f_svgname(nameonly(name))
end
end
local scheme = url.hasscheme(name)
if not scheme or scheme == "file" then
-- or can we just use the name ?
- return file.join("../images",file.basename(url.filename(name)))
+ return joinfile("../images",basename(url.filename(name)))
else
return name
end
end
- function wrapups.allusedimages(basename)
+ function wrapups.allusedimages(filename)
local result = { replacetemplate(namespacetemplate, {
what = "images",
- filename = basename,
+ filename = filename,
namespace = contextns,
-- cssnamespaceurl = usecssnamespace and cssnamespaceurl or "",
cssnamespaceurl = cssnamespaceurl,
@@ -3498,7 +3500,7 @@ local cssheadlink = [[
elseif cssfile == "export-example.css" then
-- ignore
elseif not done[cssfile] then
- cssfile = file.join(path,cssfile)
+ cssfile = joinfile(path,basename(cssfile))
report_export("adding css reference '%s'",cssfile)
files[#files+1] = cssfile
result[#result+1] = replacetemplate(csspreamble, { filename = cssfile })
@@ -3559,10 +3561,10 @@ local htmltemplate = [[
mixed = "inline",
}
- local function allusedelements(basename)
+ local function allusedelements(filename)
local result = { replacetemplate(namespacetemplate, {
what = "template",
- filename = basename,
+ filename = filename,
namespace = contextns,
-- cssnamespaceurl = usecssnamespace and cssnamespaceurl or "",
cssnamespaceurl = cssnamespaceurl,
@@ -3878,11 +3880,6 @@ local htmltemplate = [[
-- local cssfile = nil directives.register("backend.export.css", function(v) cssfile = v end)
- local addsuffix = file.addsuffix
- local joinfile = file.join
- local nameonly = file.nameonly
- local basename = file.basename
-
local embedfile = false directives.register("export.embed",function(v) embedfile = v end)
function structurestags.finishexport()
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 229feff8a..cea147adc 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -13,7 +13,7 @@
% \normalend % uncomment this to get the real base runtime
-\newcontextversion{2021.03.01 15:33}
+\newcontextversion{2021.03.02 19:17}
%D This file is loaded at runtime, thereby providing an excellent place for hacks,
%D patches, extensions and new features. There can be local overloads in cont-loc
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index 796f686fc..abbe41be2 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -45,7 +45,7 @@
%D {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2021.03.01 15:33}
+\edef\contextversion{2021.03.02 19:17}
%D Kind of special:
diff --git a/tex/context/base/mkiv/meta-lua.lua b/tex/context/base/mkiv/meta-lua.lua
index 42d036630..cdcd5c0a8 100644
--- a/tex/context/base/mkiv/meta-lua.lua
+++ b/tex/context/base/mkiv/meta-lua.lua
@@ -89,7 +89,7 @@ mplib.finders.mpstemplate = function(specification,name,mode,ftype)
data = errorformatter(nameonly)
end
local name = luatex.registertempfile(nameonly,true)
- local data = metapost.checktexts(data)
+-- local data = metapost.checktexts(data)
io.savedata(name,data)
return name
end
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 58cd21876..4747b2d13 100644
--- a/tex/context/base/mkiv/status-files.pdf
+++ b/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf
index 4241ea0a2..021bcf069 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/mkxl/back-exp.mkxl b/tex/context/base/mkxl/back-exp.mkxl
index 121f4bf9f..f41a8d7ba 100644
--- a/tex/context/base/mkxl/back-exp.mkxl
+++ b/tex/context/base/mkxl/back-exp.mkxl
@@ -11,6 +11,8 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+% see t:/export/todo-fonts.tex for (future) experiment
+
\writestatus{loading}{ConTeXt Backend Macros / XML export}
\registerctxluafile{back-exp}{}
diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl
index 088eb9591..dd4afb289 100644
--- a/tex/context/base/mkxl/cont-new.mkxl
+++ b/tex/context/base/mkxl/cont-new.mkxl
@@ -13,7 +13,7 @@
% \normalend % uncomment this to get the real base runtime
-\newcontextversion{2021.03.01 15:33}
+\newcontextversion{2021.03.02 19:17}
%D This file is loaded at runtime, thereby providing an excellent place for hacks,
%D patches, extensions and new features. There can be local overloads in cont-loc
diff --git a/tex/context/base/mkxl/context.mkxl b/tex/context/base/mkxl/context.mkxl
index d84bbb73c..5c1ff9888 100644
--- a/tex/context/base/mkxl/context.mkxl
+++ b/tex/context/base/mkxl/context.mkxl
@@ -29,7 +29,7 @@
%D {YYYY.MM.DD HH:MM} format.
\immutable\edef\contextformat {\jobname}
-\immutable\edef\contextversion{2021.03.01 15:33}
+\immutable\edef\contextversion{2021.03.02 19:17}
%overloadmode 1 % check frozen / warning
%overloadmode 2 % check frozen / error
diff --git a/tex/context/base/mkxl/font-fea.mklx b/tex/context/base/mkxl/font-fea.mklx
index 5d5cea23f..9f4d2119e 100644
--- a/tex/context/base/mkxl/font-fea.mklx
+++ b/tex/context/base/mkxl/font-fea.mklx
@@ -143,6 +143,8 @@
\newconstant\c_font_feature_state
+\newevery\everyfontfeatureswitch
+
% hashing at this end is slower
\permanent\tolerant\protected\def\addfeature [#1]#;#2{\edef\m_font_feature_asked{#1#2}\font_feature_add}
@@ -171,7 +173,8 @@
{\clf_addfeature{\m_font_feature_list}{\m_font_feature_asked}%
\edef\m_font_feature_list{\m_font_feature_list+\m_font_feature_asked}% also + at the lua end
\c_font_feature_state\plusone
- \let\currentfeature\m_font_feature_asked}
+ \let\currentfeature\m_font_feature_asked
+ \the\everyfontfeatureswitch}
\protected\def\font_feature_subtract
{\ifnum\c_font_feature_state=\minusone
@@ -186,7 +189,8 @@
{\clf_subtractfeature{\m_font_feature_list}{\m_font_feature_asked}%
\edef\m_font_feature_list{\m_font_feature_list-\m_font_feature_asked}% also - at the lua end
\c_font_feature_state\minusone
- \let\currentfeature\m_font_feature_asked}
+ \let\currentfeature\m_font_feature_asked
+ \the\everyfontfeatureswitch}
\protected\def\font_feature_replace
{\ifnum\c_font_feature_state=\zerocount
@@ -201,7 +205,8 @@
{\clf_replacefeature{\m_font_feature_list}{\m_font_feature_asked}%
\edef\m_font_feature_list{\m_font_feature_list=\m_font_feature_asked}% also = at the lua end
\c_font_feature_state\zerocount
- \let\currentfeature\m_font_feature_asked}
+ \let\currentfeature\m_font_feature_asked
+ \the\everyfontfeatureswitch}
\permanent\protected\def\resetfeature
{\ifx\currentfeature\s!current \else
@@ -235,25 +240,26 @@
{\clf_addfeature{\s!current}{\m_font_feature_asked}%
\edef\m_font_feature_list{\s!current+\m_font_feature_asked}% also + at the lua end
\c_font_feature_state\plusone
- \let\currentfeature\m_font_feature_asked}
+ \let\currentfeature\m_font_feature_asked
+ \the\everyfontfeatureswitch}
\installcorenamespace{featureshortcut}
-\letvalue{\??featureshortcut +}\addfeature
-\letvalue{\??featureshortcut -}\subtractfeature
-\letvalue{\??featureshortcut =}\replacefeature
-\letvalue{\??featureshortcut !}\resetandaddfeature
-\letvalue{\??featureshortcut >}\revivefeature
-\letvalue{\??featureshortcut <}\resetfeature
-
-\letvalue{\??featureshortcut\v!more }\addfeature % add set to previous set and combine with font set
-\letvalue{\??featureshortcut\v!less }\subtractfeature % subtract set from previous set and combine with font set
-\letvalue{\??featureshortcut\v!new }\replacefeature % replace font set
-\letvalue{\??featureshortcut\v!reset }\resetfeature % forget sets and revert to font set
-\letvalue{\??featureshortcut\v!default}\revivefeature % make sure the current set is used on top of the font set
-\letvalue{\??featureshortcut\v!old }\revivefeature
-\letvalue{\??featureshortcut\v!local }\resetandaddfeature
-\letvalue{\??featureshortcut\s!unknown}\empty
+\letcsname\??featureshortcut +\endcsname\addfeature
+\letcsname\??featureshortcut -\endcsname\subtractfeature
+\letcsname\??featureshortcut =\endcsname\replacefeature
+\letcsname\??featureshortcut !\endcsname\resetandaddfeature
+\letcsname\??featureshortcut >\endcsname\revivefeature
+\letcsname\??featureshortcut <\endcsname\resetfeature
+
+\letcsname\??featureshortcut\v!more \endcsname\addfeature % add set to previous set and combine with font set
+\letcsname\??featureshortcut\v!less \endcsname\subtractfeature % subtract set from previous set and combine with font set
+\letcsname\??featureshortcut\v!new \endcsname\replacefeature % replace font set
+\letcsname\??featureshortcut\v!reset \endcsname\resetfeature % forget sets and revert to font set
+\letcsname\??featureshortcut\v!default\endcsname\revivefeature % make sure the current set is used on top of the font set
+\letcsname\??featureshortcut\v!old \endcsname\revivefeature
+\letcsname\??featureshortcut\v!local \endcsname\resetandaddfeature
+\letcsname\??featureshortcut\s!unknown\endcsname\empty
% experimental bonus:
diff --git a/tex/context/base/mkxl/meta-imp-txt.mkxl b/tex/context/base/mkxl/meta-imp-txt.mkxl
index 0c3516a7b..c7586264e 100644
--- a/tex/context/base/mkxl/meta-imp-txt.mkxl
+++ b/tex/context/base/mkxl/meta-imp-txt.mkxl
@@ -214,18 +214,18 @@
\defineoverlay[test 4][\useMPgraphic{test 4}]
\startbuffer
- \startshapetext[test 1,test 2,test 3,test 4]
- \setupalign[verytolerant,stretch,normal]%
- \samplefile{douglas} % Douglas R. Hofstadter
- \stopshapetext
- \startTEXpage[offset=10pt]
- \startcombination[2*2]
- {\framed[offset=overlay,frame=off,background=test 1]{\getshapetext}} {test 1}
- {\framed[offset=overlay,frame=off,background=test 2]{\getshapetext}} {test 2}
- {\framed[offset=overlay,frame=off,background=test 3]{\getshapetext}} {test 3}
- {\framed[offset=overlay,frame=off,background=test 4]{\getshapetext}} {test 4}
- \stopcombination
- \stopTEXpage
+\startshapetext[test 1,test 2,test 3,test 4]
+ \setupalign[verytolerant,stretch,normal]%
+ \samplefile{douglas} % Douglas R. Hofstadter
+\stopshapetext
+\startTEXpage[offset=10pt]
+ \startcombination[2*2]
+ {\framed[offset=overlay,frame=off,background=test 1]{\getshapetext}} {test 1}
+ {\framed[offset=overlay,frame=off,background=test 2]{\getshapetext}} {test 2}
+ {\framed[offset=overlay,frame=off,background=test 3]{\getshapetext}} {test 3}
+ {\framed[offset=overlay,frame=off,background=test 4]{\getshapetext}} {test 4}
+ \stopcombination
+\stopTEXpage
\stopbuffer
\getbuffer
diff --git a/tex/context/base/mkxl/mlib-fio.lmt b/tex/context/base/mkxl/mlib-fio.lmt
index 2e31d56d1..cdffbfcf1 100644
--- a/tex/context/base/mkxl/mlib-fio.lmt
+++ b/tex/context/base/mkxl/mlib-fio.lmt
@@ -53,7 +53,6 @@ end
local finders = { }
mplib.finders = finders -- also used in meta-lua.lua
-
local function validftype(ftype)
if ftype == "mp" then
return "mp"
@@ -82,7 +81,7 @@ local function findmpfile(name,ftype)
return nil
end
-local function finder(name,mode,kind)
+finders.file = function(specification,name,mode,kind)
if mode == "r" then
return findmpfile(name,kind)
elseif file.is_writable(name) then
@@ -92,12 +91,13 @@ local function finder(name,mode,kind)
end
end
-finders.file = function(specification,name,mode,ftype)
- -- finder(name,mode,kind)
- return finder(name,mode,ftype)
+local function finder(name,mode,kind) -- fake message for mpost.map and metafun.mpvi
+ local specification = url.hashed(name)
+ local finder = finders[specification.scheme] or finders.file
+ local found = finder(specification,name,mode,validftype(ftype))
+ return found
end
-
local findtexfile = resolvers.findtexfile
local opentexfile = resolvers.opentexfile
local splitlines = string.splitlines
diff --git a/tex/context/base/mkxl/mlib-mpf.lmt b/tex/context/base/mkxl/mlib-mpf.lmt
index 87b6c2d4e..f24d7fde0 100644
--- a/tex/context/base/mkxl/mlib-mpf.lmt
+++ b/tex/context/base/mkxl/mlib-mpf.lmt
@@ -1065,16 +1065,28 @@ end
do
- local mppair = mp.pair
-
- function mp.textextanchor(s)
- local x, y = match(s,"tx_anchor=(%S+) (%S+)") -- todo: make an lpeg
+ -- local mppair = mp.pair
+ --
+ -- function mp.textextanchor(s)
+ -- local x, y = match(s,"tx_anchor=(%S+) (%S+)") -- todo: make an lpeg
+ -- if x and y then
+ -- x = tonumber(x)
+ -- y = tonumber(y)
+ -- end
+ -- mppair(x or 0,y or 0)
+ -- end
+
+ local injectpair = inject.pair
+ local scanstring = scan.string
+
+ metapost.registerscript("textextanchor", function()
+ local x, y = match(scanstring(),"tx_anchor=(%S+) (%S+)") -- todo: make an lpeg
if x and y then
x = tonumber(x)
y = tonumber(y)
end
- mppair(x or 0,y or 0)
- end
+ injectpair(x or 0,y or 0)
+ end)
end
diff --git a/tex/context/base/mkxl/typo-par.lmt b/tex/context/base/mkxl/typo-par.lmt
index b5751e497..005d1b32e 100644
--- a/tex/context/base/mkxl/typo-par.lmt
+++ b/tex/context/base/mkxl/typo-par.lmt
@@ -94,106 +94,3 @@ function builders.checkparcontext(where)
end
appendaction("paragraphcontext","system","builders.checkparcontext")
-
--- Another experiment: continuing parshapes with alternative definitions:
---
--- left d | right d | left d right d | both d | left d hsize d |
--- copy n | reset | repeat | done
-
-do
-
- local scanners = tokens.scanners
- local scanword = scanners.word
- local scandimen = scanners.dimen
- local scancardinal = scanners.cardinal
-
- implement {
- name = "setparagraphshape",
- protected = true,
- actions = function()
- local t = { }
- local n = 0
- local h = texget("hsize")
- while true do
- local key = scanword()
- ::AGAIN::
- if key == "left" then
- local l = scandimen()
- key = scanword()
- if key == "right" then
- n = n + 1 ; t[n] = { l, h - l - scandimen() }
- elseif key == "hsize" then
- n = n + 1 ; t[n] = { l, scandimen() }
- else
- n = n + 1 ; t[n] = { l, h }
- goto AGAIN
- end
- elseif key == "right" then
- n = n + 1 ; t[n] = { 0, h - scandimen() }
- elseif key == "both" then
- local b = scandimen()
- n = n + 1 ; t[n] = { b, h - b - b }
- elseif key == "copy" then
- local c = scancardinal()
- for i=1,c do
- local m = n + 1
- t[m] = t[n]
- n = m
- end
- elseif key == "done" then
- -- in case the user ended with "done"
- scanword()
- break
- elseif key == "repeat" then
- t["repeat"] = true
- elseif key == "reset" then
- n = n + 1 ; t[n] = { 0, h }
- break
- else
- logs.report("system","bad key %a in paragraphshape",key)
- break
- end
- end
- texset("parshape",t)
- end,
- }
-
- local NC = context.NC
- local NR = context.NR
- local VL = context.VL
-
- implement {
- name = "showparagraphshape",
- protected = true,
- public = true,
- actions = function()
- local p = texget("parshape")
- if p then
- -- only english interface (for now)
- context.inleftmargin(
- {
- align = "flushright",
- strut = "no",
- width = "0pt",
- -- voffset = "-\\lineheight"
- }, function()
- context.starttabulate {
- before = "",
- after = "",
- unit = "2pt",
- rulethickness = ".1pt",
- format = "|rb{\\smallinfofont}|lb{\\smallinfofont}|"
- }
- for i=1,#p do
- NC() context("%P",p[i][1])
- VL() context("%P",p[i][2])
- NC() NR()
- end
- context.stoptabulate()
- end
- )
- end
- end
- }
-
-end
diff --git a/tex/context/base/mkxl/typo-shp.lmt b/tex/context/base/mkxl/typo-shp.lmt
index 27cafe1bd..ffd9e556d 100644
--- a/tex/context/base/mkxl/typo-shp.lmt
+++ b/tex/context/base/mkxl/typo-shp.lmt
@@ -9,8 +9,10 @@ if not modules then modules = { } end modules ['meta-imp-txt'] = {
local setmetatableindex = table.setmetatableindex
local settings_to_array = utilities.parsers.settings_to_array
+local texget = tex.get
local texset = tex.set
local texgetcount = tex.getcount
+local texgetglue = tex.getglue
local expandmacro = token.expand_macro
@@ -115,3 +117,151 @@ implement {
context(value)
end
}
+
+-- Another experiment: continuing parshapes with alternative definitions:
+--
+-- left d | right d | left d right d | both d | left d hsize d |
+-- copy n | reset | repeat | done
+
+do
+
+ local scanners = tokens.scanners
+ local scanword = scanners.word
+ local scandimen = scanners.dimen
+ local scanstring = scanners.string
+ local scancardinal = scanners.cardinal
+
+ implement {
+ name = "setparagraphshape",
+ protected = true,
+ actions = function()
+ local t = { }
+ local n = 0
+ local h = texget("hsize")
+ local a = 0
+ while true do
+ local key = scanword()
+ ::AGAIN::
+ if key == "left" then
+ local l = scandimen()
+ key = scanword()
+ if key == "right" then
+ n = n + 1 ; t[n] = { l, a + h - l - scandimen() }
+ elseif key == "hsize" then
+ n = n + 1 ; t[n] = { l, a + scandimen() }
+ else
+ n = n + 1 ; t[n] = { l, a + h }
+ goto AGAIN
+ end
+ elseif key == "right" then
+ n = n + 1 ; t[n] = { 0, a + h - scandimen() }
+ elseif key == "both" then
+ local b = scandimen()
+ n = n + 1 ; t[n] = { b, a + h - b - b }
+ elseif key == "copy" then
+ local c = scancardinal()
+ for i=1,c do
+ local m = n + 1
+ t[m] = t[n]
+ n = m
+ end
+ elseif key == "done" then
+ -- in case the user ended with "done"
+ scanword()
+ break
+ elseif key == "metapost" then
+ local list = settings_to_array(scanstring()) -- array
+ properties = { }
+ parshapes = { }
+ for i=1,#list do
+ properties = { }
+ parshapes[i] = properties
+ expandmacro("spac_shapes_calculate","{"..list[i].."}")
+ end
+ for i=1,#parshapes do
+ local p = parshapes[i]
+ local s = p.shape
+ if s then
+ for i=1,(p.lines or #s) do
+ local si = s[i]
+ n = n + 1 ; t[n] = { si[1], a + si[2] }
+ end
+ end
+ end
+ elseif key == "repeat" then
+ t["repeat"] = true
+ elseif key == "delete" then
+ local c = scancardinal()
+ for i=1,c do
+ if n > 0 then
+ t[n] = nil
+ n = n - 1
+ else
+ break
+ end
+ end
+ elseif key == "reset" then
+ n = n + 1 ; t[n] = { 0, a + h }
+ break
+ elseif key == "absolute" then
+ local s = scanword()
+ local l = texgetglue("leftskip")
+ local r = texgetglue("rightskip")
+ if s == "left" then
+ a = l
+ elseif s == "right" then
+ a = r
+ elseif s == "both" then
+ a = l + r
+ else
+ a = l + r
+ goto AGAIN
+ end
+ else
+ logs.report("system","bad key %a in paragraphshape",key)
+ break
+ end
+ end
+ texset("parshape",t)
+ end,
+ }
+
+ local NC = context.NC
+ local NR = context.NR
+ local VL = context.VL
+
+ implement {
+ name = "showparagraphshape",
+ protected = true,
+ public = true,
+ actions = function()
+ local p = texget("parshape")
+ if p then
+ -- only english interface (for now)
+ context.inleftmargin(
+ {
+ align = "flushright",
+ strut = "no",
+ width = "0pt",
+ -- voffset = "-\\lineheight"
+ }, function()
+ context.starttabulate {
+ before = "",
+ after = "",
+ unit = "2pt",
+ rulethickness = ".1pt",
+ format = "|rb{\\smallinfofont}|lb{\\smallinfofont}|"
+ }
+ for i=1,#p do
+ NC() context("%P",p[i][1])
+ VL() context("%P",p[i][2])
+ NC() NR()
+ end
+ context.stoptabulate()
+ end
+ )
+ end
+ end
+ }
+
+end
diff --git a/tex/context/base/mkxl/typo-shp.mkxl b/tex/context/base/mkxl/typo-shp.mkxl
index 295fe3e1b..21df41bd4 100644
--- a/tex/context/base/mkxl/typo-shp.mkxl
+++ b/tex/context/base/mkxl/typo-shp.mkxl
@@ -67,6 +67,7 @@
\getdummyparameters[\c!method=,\c!list=,\c!mp=,\c!repeat=,#1]%
\edef\p_mp {\dummyparameter\c!mp}%
\edef\p_repeat{\dummyparameter\c!repeat}%
+ \setlocalhsize
\normalexpanded
{\endgroup
\ifempty\p_mp
diff --git a/tex/context/interface/mkii/keys-cs.xml b/tex/context/interface/mkii/keys-cs.xml
index 3a7c187c6..3006aa9b0 100644
--- a/tex/context/interface/mkii/keys-cs.xml
+++ b/tex/context/interface/mkii/keys-cs.xml
@@ -1126,6 +1126,7 @@
<cd:constant name='print' value='print'/>
<cd:constant name='printable' value='tisknutelne'/>
<cd:constant name='process' value='process'/>
+ <cd:constant name='processors' value='processors'/>
<cd:constant name='profile' value='profile'/>
<cd:constant name='properties' value='properties'/>
<cd:constant name='pubsep' value='pubsep'/>