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/lpdf-lmt.lmt20
-rw-r--r--tex/context/base/mkxl/math-noa.lmt2
-rw-r--r--tex/context/base/mkxl/strc-mat.lmt30
-rw-r--r--tex/context/base/mkxl/strc-mat.mkxl2
6 files changed, 52 insertions, 6 deletions
diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl
index 78ec6d63d..f693cbb59 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{2023.03.06 14:44}
+\newcontextversion{2023.03.06 23:15}
%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 24619c289..f5bf1803c 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{2023.03.06 14:44}
+\immutable\edef\contextversion{2023.03.06 23:15}
%overloadmode 1 % check frozen / warning
%overloadmode 2 % check frozen / error
diff --git a/tex/context/base/mkxl/lpdf-lmt.lmt b/tex/context/base/mkxl/lpdf-lmt.lmt
index 1d47c1620..f443632b8 100644
--- a/tex/context/base/mkxl/lpdf-lmt.lmt
+++ b/tex/context/base/mkxl/lpdf-lmt.lmt
@@ -2130,6 +2130,20 @@ local finalize do
local f_group = formatters["Gp%d"]
local f_image = formatters["Im%d"]
+ local function checkedbox(mediabox,otherbox,what)
+ if otherbox and #mediabox == 4 and #otherbox == 4 then
+ local done = false
+ if otherbox[1] < mediabox[1] then done = true ; otherbox[1] = mediabox[1] end
+ if otherbox[2] < mediabox[2] then done = true ; otherbox[2] = mediabox[2] end
+ if otherbox[3] > mediabox[3] then done = true ; otherbox[3] = mediabox[3] end
+ if otherbox[4] > mediabox[4] then done = true ; otherbox[4] = mediabox[4] end
+ if done then
+ report("limiting %a to 'MediaBox'",what)
+ end
+ end
+ return otherbox
+ end
+
finalize = function(driver,details)
if not details then
@@ -2226,9 +2240,9 @@ else
-- Indirect objects don't work in all viewers.
- if TrimBox then pageattributes.TrimBox = pdfsharedobject(TrimBox ) end
- if CropBox then pageattributes.CropBox = pdfsharedobject(CropBox ) end
- if BleedBox then pageattributes.BleedBox = pdfsharedobject(BleedBox) end
+ if TrimBox then pageattributes.TrimBox = pdfsharedobject(checkedbox(bbox,TrimBox,"TrimBox")) end
+ if CropBox then pageattributes.CropBox = pdfsharedobject(checkedbox(bbox,CropBox,"CropBox")) end
+ if BleedBox then pageattributes.BleedBox = pdfsharedobject(checkedbox(bbox,BleedBox,"BleedBox")) end
end
diff --git a/tex/context/base/mkxl/math-noa.lmt b/tex/context/base/mkxl/math-noa.lmt
index 4a0cb5744..6ccda30f3 100644
--- a/tex/context/base/mkxl/math-noa.lmt
+++ b/tex/context/base/mkxl/math-noa.lmt
@@ -2492,6 +2492,8 @@ end
do
+ -- do we need this
+
local traversehlist = nuts.traversers.hlist
local texgetdimen = tex.getdimen
diff --git a/tex/context/base/mkxl/strc-mat.lmt b/tex/context/base/mkxl/strc-mat.lmt
new file mode 100644
index 000000000..3b2458eac
--- /dev/null
+++ b/tex/context/base/mkxl/strc-mat.lmt
@@ -0,0 +1,30 @@
+if not modules then modules = { } end modules ['strc-mat'] = {
+ version = 1.001,
+ comment = "companion to strc-mat.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local structures = structures
+
+local lists = structures.lists
+local sections = structures.sections
+local helpers = structures.helpers
+----- formulas = structures.formulas --reserved
+
+function helpers.formulanumber(data,spec)
+ if data then
+ local formulanumber = data.formulanumber
+ if formulanumber then
+ sections.number(data,spec,"formulanumber","formulanumber","number")
+ end
+ end
+end
+
+function lists.formulanumber(name,n,spec)
+ local result = lists.result
+ if result then
+ helpers.formulanumber(result[n])
+ end
+end
diff --git a/tex/context/base/mkxl/strc-mat.mkxl b/tex/context/base/mkxl/strc-mat.mkxl
index 516e82190..6abc4b2cb 100644
--- a/tex/context/base/mkxl/strc-mat.mkxl
+++ b/tex/context/base/mkxl/strc-mat.mkxl
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Structure Macros / Math Numbering}
-\registerctxluafile{strc-mat}{}
+\registerctxluafile{strc-mat}{autosuffix}
% -- we have potential for captions
% -- this module will use the commandhandler