summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkxl')
-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/libs-imp-zint.lmt5
-rw-r--r--tex/context/base/mkxl/lpdf-mis.lmt2
-rw-r--r--tex/context/base/mkxl/meta-ini.mkxl4
-rw-r--r--tex/context/base/mkxl/mlib-fio.lmt11
-rw-r--r--tex/context/base/mkxl/mlib-pdf.lmt16
-rw-r--r--tex/context/base/mkxl/page-txt.mklx7
8 files changed, 30 insertions, 19 deletions
diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl
index 974b7c4df..8c029b2e4 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.07.10 21:47}
+\newcontextversion{2021.07.16 21:58}
%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 efba80182..9b1e70180 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.07.10 21:47}
+\immutable\edef\contextversion{2021.07.16 21:58}
%overloadmode 1 % check frozen / warning
%overloadmode 2 % check frozen / error
diff --git a/tex/context/base/mkxl/libs-imp-zint.lmt b/tex/context/base/mkxl/libs-imp-zint.lmt
index a3ac97584..a7646c436 100644
--- a/tex/context/base/mkxl/libs-imp-zint.lmt
+++ b/tex/context/base/mkxl/libs-imp-zint.lmt
@@ -104,6 +104,11 @@ local function execute(specification)
if okay() then
local code = specification.code
local text = specification.text
+ --
+ if lower(code) == "isbn" then
+ specification.text = text and gsub(text,"[^%d]","") or ""
+ end
+ --
if code then
local id = mapping[code]
if id then
diff --git a/tex/context/base/mkxl/lpdf-mis.lmt b/tex/context/base/mkxl/lpdf-mis.lmt
index bd1d9990e..bf1a736c0 100644
--- a/tex/context/base/mkxl/lpdf-mis.lmt
+++ b/tex/context/base/mkxl/lpdf-mis.lmt
@@ -354,7 +354,7 @@ local pagespecs = {
[v_doublesided] = {
mode = "UseNone",
layout = "TwoColumnRight",
- fit = true,
+ fit = true,
},
[v_singlesided] = {
mode = "UseNone"
diff --git a/tex/context/base/mkxl/meta-ini.mkxl b/tex/context/base/mkxl/meta-ini.mkxl
index 8fca5d503..8abd1339a 100644
--- a/tex/context/base/mkxl/meta-ini.mkxl
+++ b/tex/context/base/mkxl/meta-ini.mkxl
@@ -686,7 +686,7 @@
\begincsname\??mpgraphic#2\endcsname\empty
\meta_end_graphic_group}
-\def\meta_uniquempgraphic_nop#=#*#=%
+\tolerant\def\meta_uniquempgraphic_nop#=#*#=%
{\meta_begin_graphic_group{#1}%
\checkmpcategoryparent
\let\currentmpcategory\currentMPgraphicname
@@ -788,7 +788,7 @@
\fi
\meta_end_graphic_group}
-\def\meta_usempgraphic_nop#=#*#=%
+\tolerant\def\meta_usempgraphic_nop#=#*#=%
{\meta_begin_graphic_group{#1}%
\ifcsname\??mpgraphic#1\endcsname
\edef\currentmpcategory{#1}%
diff --git a/tex/context/base/mkxl/mlib-fio.lmt b/tex/context/base/mkxl/mlib-fio.lmt
index 8235fdbec..d51b222cf 100644
--- a/tex/context/base/mkxl/mlib-fio.lmt
+++ b/tex/context/base/mkxl/mlib-fio.lmt
@@ -62,11 +62,16 @@ end
-- We can have a list!
+local findtexfile = resolvers.findtexfile
+local opentexfile = resolvers.opentexfile
+local splitlines = string.splitlines
+
local suffixlist = { "mpxl", "mpiv", "mp" } -- no "mf"
local function findmpfile(name,ftype)
local validtyp = validftype(ftype)
- local fullname = findfile(name,validtyp)
+ -- local fullname = findfile(name,validtyp)
+ local fullname = findtexfile(name,validtyp)
if fullname and fullname ~= "" then
return fullname
elseif suffix(name) == "" then
@@ -97,10 +102,6 @@ local function finder(name,mode,kind) -- fake message for mpost.map and metafun.
return found
end
-local findtexfile = resolvers.findtexfile
-local opentexfile = resolvers.opentexfile
-local splitlines = string.splitlines
-
local function writetoterminal(terminaldata,maxterm,d)
local t = type(d)
local n = 0
diff --git a/tex/context/base/mkxl/mlib-pdf.lmt b/tex/context/base/mkxl/mlib-pdf.lmt
index 58a1129eb..ec13ef289 100644
--- a/tex/context/base/mkxl/mlib-pdf.lmt
+++ b/tex/context/base/mkxl/mlib-pdf.lmt
@@ -193,7 +193,7 @@ local function flushnormalpath(path, t, open, tolerance)
return t
end
-local function flushconcatpath(path, t, open, tolerance)
+local function flushconcatpath(path, t, open, tolerance, transform)
local pth, ith, nt
local length = #path
if t then
@@ -202,8 +202,10 @@ local function flushconcatpath(path, t, open, tolerance)
t = { }
nt = 0
end
- nt = nt + 1
- t[nt] = f_cm(sx,rx,ry,sy,tx,ty)
+ if transform then
+ nt = nt + 1
+ t[nt] = f_cm(sx,rx,ry,sy,tx,ty)
+ end
for i=1,length do
nt = nt + 1
pth = path[i]
@@ -565,7 +567,7 @@ function metapost.flush(specification,result)
for i=1,#savedpath do
local path = savedpath[i]
if transformed then
- flushconcatpath(path,result,open,tolerance)
+ flushconcatpath(path,result,open,tolerance,i==1)
else
flushnormalpath(path,result,open,tolerance)
end
@@ -575,7 +577,7 @@ function metapost.flush(specification,result)
if flush then
-- ignore this path
elseif transformed then
- flushconcatpath(path,result,open,tolerance)
+ flushconcatpath(path,result,open,tolerance,true)
else
flushnormalpath(path,result,open,tolerance)
end
@@ -605,7 +607,7 @@ function metapost.flush(specification,result)
for i=1,#savedhtap do
local path = savedhtap[i]
if transformed then
- flushconcatpath(path,result,open,tolerance)
+ flushconcatpath(path,result,open,tolerance,i==1)
else
flushnormalpath(path,result,open,tolerance)
end
@@ -614,7 +616,7 @@ function metapost.flush(specification,result)
evenodd = true
end
if transformed then
- flushconcatpath(path,result,open,tolerance)
+ flushconcatpath(path,result,open,tolerance,true)
else
flushnormalpath(path,result,open,tolerance)
end
diff --git a/tex/context/base/mkxl/page-txt.mklx b/tex/context/base/mkxl/page-txt.mklx
index 3b46d42f9..969f0a447 100644
--- a/tex/context/base/mkxl/page-txt.mklx
+++ b/tex/context/base/mkxl/page-txt.mklx
@@ -478,13 +478,13 @@
\page_layouts_left_edge_element\c!righttext\c!rightstyle\c!rightcolor\c!rightwidth
\fi
\ifdim\leftmarginwidth>\zeropoint
- \page_layouts_left_margin_element\c!righttext\c!rightstyle\c!rightcolor\c!rightwidth\zerocount
+ \page_layouts_left_margin_element\c!righttext\c!rightstyle\c!rightcolor\c!rightwidth\plusone
\fi
\ifdim\makeupwidth>\zeropoint
\page_layouts_text_body_element_e_r_m_l
\fi
\ifdim\rightmarginwidth>\zeropoint
- \page_layouts_right_margin_element\c!lefttext\c!leftstyle\c!leftcolor\c!leftwidth\plusone
+ \page_layouts_right_margin_element\c!lefttext\c!leftstyle\c!leftcolor\c!leftwidth\zerocount
\fi
\ifdim\rightedgewidth>\zeropoint
\page_layouts_right_edge_element\c!lefttext\c!leftstyle\c!leftcolor\c!leftwidth
@@ -526,6 +526,9 @@
% margin needs checking!
+% \hbox to \leftmarginwidth{\hss\layoutelementparameter\c!margintext}%
+% \hbox to \rightmarginwidth{\layoutelementparameter\c!margintext\hss}%
+
\def\page_layouts_left_margin_element_indeed#text#style#color#width#margintoo%
{\letfromlayoutelementparameter\p_text#text%
\ifempty\p_text