summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/context/lua/mtx-epub.lua18
-rw-r--r--tex/context/base/java-imp-fld.mkiv21
-rw-r--r--tex/context/base/status-files.pdfbin23572 -> 23595 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin154368 -> 154366 bytes
-rw-r--r--tex/context/fonts/px-math.lfg2
5 files changed, 25 insertions, 16 deletions
diff --git a/scripts/context/lua/mtx-epub.lua b/scripts/context/lua/mtx-epub.lua
index e345ff9fd..15282ddab 100644
--- a/scripts/context/lua/mtx-epub.lua
+++ b/scripts/context/lua/mtx-epub.lua
@@ -19,7 +19,7 @@ mtxrun --script epub --make mydocument
local application = logs.application {
name = "mtx-epub",
- banner = "ConTeXt EPUB Helpers 0.10",
+ banner = "ConTeXt EPUB Helpers 0.11",
helpinfo = helpinfo,
}
@@ -64,8 +64,15 @@ local package = [[
]]
local mimetypes = {
- xhtml = "application/xhtml+xml",
- css = "text/css",
+ xhtml = "application/xhtml+xml",
+ css = "text/css",
+ -- default = "text/plain",
+}
+
+local idmakers = {
+ ncx = function(filename) return "ncx" end,
+ css = function(filename) return "stylesheet" end,
+ default = function(filename) return file.nameonly(filename) end,
}
-- specification = {
@@ -112,13 +119,14 @@ function scripts.epub.make()
local suffix = file.suffix(filename)
local mime = mimetypes[suffix]
if mime then
+ local idmaker = idmakers[suffix] or idmakers.default
file.copy(filename,file.join(epubpath,"OPS",filename))
- used[#used+1] = format("<item id='%s' href='%s' media-type='%s'/>",i,filename,mime)
+ used[#used+1] = format("<item id='%s' href='%s' media-type='%s'/>",idmaker(filename),filename,mime)
end
end
container = format(container,epubroot)
- package = format(package,identifier,identifier,concat(used,"\n"),root)
+ package = format(package,identifier,identifier,concat(used,"\n"),file.removesuffix(root))
io.savedata(file.join(epubpath,"mimetype"),mimetype)
io.savedata(file.join(epubpath,"META-INF","container.xml"),container)
diff --git a/tex/context/base/java-imp-fld.mkiv b/tex/context/base/java-imp-fld.mkiv
index 2186368bb..9eb7d7ed5 100644
--- a/tex/context/base/java-imp-fld.mkiv
+++ b/tex/context/base/java-imp-fld.mkiv
@@ -27,7 +27,8 @@
%D different escaping of \type {\\}.
%D
%D Watch out: cf. the latest pdf specification we've changed
-%D On into Yes.
+%D On into Yes. Also, we've changed the test for the on value
+%D into !Off as we dón't know what value it gets in the reader.
\startluasetups javascript:pdfencoding
local verbatim = context.verbatim
@@ -222,7 +223,7 @@ function Field_Off(Name) {
function Toggle_Value(Name) {
var v = this.getField(Name) ;
if (v) {
- if (v.value == "Yes") {
+ if (v.value != "Off") {
v.value = "Off" ;
} else {
v.value = "Yes" ;
@@ -310,15 +311,15 @@ function Reset_Field(FieldSet, FieldName) {
function Walk_Field(FieldSet) {
var i = 1 ;
while (true) {
- v = this.getField(FieldSet+":"+i) ;
+ v = this.getField(FieldSet + ":" + i) ;
if (v) {
- if (v.value=="Yes") {
+ if (v.value != "Off") {
v.value = "Off" ;
var ii = i ;
ii++ ;
- v = this.getField(FieldSet+":"+ii) ;
- if (!v) {
- v = this.getField(FieldSet+":"+1) ;
+ v = this.getField(FieldSet + ":" + ii) ;
+ if (! v) {
+ v = this.getField(FieldSet + ":" + 1) ;
}
if (v) {
v.value = "Yes" ;
@@ -354,7 +355,7 @@ function Do_Next_Auto_Walk_Field(FieldSet) {
if (fieldset) {
var v = this.getField(FieldSet + ":" + fieldset.number) ;
if (v) {
- if (v.value == "Yes") {
+ if (v.value != "Off") {
v.value = "Off" ;
}
}
@@ -447,7 +448,7 @@ function Previous_Walk_Field(FieldSet) {
if (fieldset.number>0) {
var v = this.getField(FieldSet + ":" + fieldset.number) ;
if (v) {
- if (v.value == "Yes") {
+ if (v.value != "Off") {
v.value = "Off" ;
}
}
@@ -471,7 +472,7 @@ function Next_Walk_Field(FieldSet) {
if (v) {
var v = this.getField(FieldSet + ":" + fieldset.number) ;
if (v) {
- if (v.value == "Yes") {
+ if (v.value != "Off") {
v.value = "Off" ;
}
}
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index c7a303319..27d2d5975 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 c167a9c52..a45b4ff0a 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/context/fonts/px-math.lfg b/tex/context/fonts/px-math.lfg
index 6beb83bfd..1d18bad36 100644
--- a/tex/context/fonts/px-math.lfg
+++ b/tex/context/fonts/px-math.lfg
@@ -18,7 +18,7 @@ return {
{ name = "pxex.tfm", vector = "tex-ex", extension = true } ,
{ name = "pxsya.tfm", vector = "tex-ma" },
{ name = "pxsyb.tfm", vector = "tex-mb" },
- { name = "texgyrepagella-bold.otf", vector = "tex-bf", skewchar=0x7F } ,
+ { name = "texgyrepagella-bold.otf", vector = "tex-bf" } ,
{ name = "texgyrepagella-bolditalic.otf", vector = "tex-bi" } ,
{ name = "lmsans10-regular.otf", vector = "tex-ss", optional=true },
{ name = "lmmono10-regular.otf", vector = "tex-tt", optional=true },