From eefbee47c0b7ac3a179e1e7fcd2e6ea1af990676 Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Fri, 17 Jun 2016 00:39:30 +0200 Subject: 2016-06-16 23:53:00 --- doc/context/documents/general/manuals/luatex.pdf | Bin 1007678 -> 1006864 bytes doc/context/scripts/mkiv/mtx-dvi.html | 48 +++ doc/context/scripts/mkiv/mtx-dvi.man | 27 ++ doc/context/scripts/mkiv/mtx-dvi.xml | 15 + scripts/context/lua/mtx-dvi.lua | 411 +++++++++++++++++++++ scripts/context/lua/mtxrun.lua | 23 +- scripts/context/stubs/mswin/mtxrun.lua | 23 +- scripts/context/stubs/unix/mtxrun | 23 +- scripts/context/stubs/win64/mtxrun.lua | 23 +- tex/context/base/context-version.pdf | Bin 4254 -> 4253 bytes tex/context/base/mkiv/cont-new.mkiv | 2 +- tex/context/base/mkiv/context.mkiv | 2 +- tex/context/base/mkiv/font-otn.lua | 2 +- tex/context/base/mkiv/math-ali.mkiv | 2 +- tex/context/base/mkiv/math-ini.mkiv | 2 +- tex/context/base/mkiv/status-files.pdf | Bin 9090 -> 9090 bytes tex/context/base/mkiv/status-lua.pdf | Bin 269068 -> 269052 bytes tex/context/base/mkiv/tabl-tsp.mkiv | 2 +- tex/context/base/mkiv/util-fil.lua | 23 +- tex/context/interface/mkiv/i-context.pdf | Bin 821075 -> 821076 bytes tex/context/interface/mkiv/i-readme.pdf | Bin 60787 -> 60787 bytes tex/generic/context/luatex/luatex-fonts-merged.lua | 19 +- tex/generic/context/luatex/luatex-plain.tex | 8 +- 23 files changed, 609 insertions(+), 46 deletions(-) create mode 100644 doc/context/scripts/mkiv/mtx-dvi.html create mode 100644 doc/context/scripts/mkiv/mtx-dvi.man create mode 100644 doc/context/scripts/mkiv/mtx-dvi.xml create mode 100644 scripts/context/lua/mtx-dvi.lua diff --git a/doc/context/documents/general/manuals/luatex.pdf b/doc/context/documents/general/manuals/luatex.pdf index 9510d49d2..ccb6b07a4 100644 Binary files a/doc/context/documents/general/manuals/luatex.pdf and b/doc/context/documents/general/manuals/luatex.pdf differ diff --git a/doc/context/scripts/mkiv/mtx-dvi.html b/doc/context/scripts/mkiv/mtx-dvi.html new file mode 100644 index 000000000..97ca9fed5 --- /dev/null +++ b/doc/context/scripts/mkiv/mtx-dvi.html @@ -0,0 +1,48 @@ + + + + + + + + + + + ConTeXt DVI Helpers 0.10 + + + + + +
+
ConTeXt DVI Helpers 0.10
+
+
+
+
wiki: http://contextgarden.net | mail: ntg-context@ntg.nl | website: http://www.pragma-ade.nl
+
+
+
+ +
+
+

Command line options

+ + + + +
flagvaluedescription
--listlist dvi commands
+
+
+
+ + diff --git a/doc/context/scripts/mkiv/mtx-dvi.man b/doc/context/scripts/mkiv/mtx-dvi.man new file mode 100644 index 000000000..600fb8097 --- /dev/null +++ b/doc/context/scripts/mkiv/mtx-dvi.man @@ -0,0 +1,27 @@ +.TH "mtx-dvi" "1" "01-01-2016" "version 0.01" "ConTeXt DVI Helpers" +.SH NAME +.B mtx-dvi +.SH SYNOPSIS +.B mtxrun --script dvi [ +.I OPTIONS ... +.B ] [ +.I FILENAMES +.B ] +.SH DESCRIPTION +.B ConTeXt DVI Helpers +.SH OPTIONS +.TP +.B --list +list dvi commands +.SH AUTHOR +More information about ConTeXt and the tools that come with it can be found at: + + +.B "maillist:" +ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context + +.B "webpage:" +http://www.pragma-ade.nl / http://tex.aanhet.net + +.B "wiki:" +http://contextgarden.net diff --git a/doc/context/scripts/mkiv/mtx-dvi.xml b/doc/context/scripts/mkiv/mtx-dvi.xml new file mode 100644 index 000000000..e27adf2f2 --- /dev/null +++ b/doc/context/scripts/mkiv/mtx-dvi.xml @@ -0,0 +1,15 @@ + + + + mtx-dvi + ConTeXt DVI Helpers + 0.01 + + + + + list dvi commands + + + + diff --git a/scripts/context/lua/mtx-dvi.lua b/scripts/context/lua/mtx-dvi.lua new file mode 100644 index 000000000..57f146ee6 --- /dev/null +++ b/scripts/context/lua/mtx-dvi.lua @@ -0,0 +1,411 @@ +if not modules then modules = { } end modules ['mtx-dvi'] = { + version = 1.001, + comment = "companion to mtxrun.lua", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +-- This is just a tool that I use for checking dvi issues in LuaTeX and it has +-- no real use otherwise. When needed (or on request) I can extend this script. +-- Speed is hardly an issue and I didn't spend much time on generalizing the +-- code either. + +local formatters = string.formatters +local byte = string.byte + +local P, R, S, C, Cc, Ct, Cmt = lpeg.P, lpeg.R, lpeg.S, lpeg.C, lpeg.Cc, lpeg.Ct, lpeg.Cmt +local lpegmatch = lpeg.match + +local readbyte = utilities.files.readbyte +local readcardinal1 = utilities.files.readcardinal1 +local readcardinal2 = utilities.files.readcardinal2 +local readcardinal3 = utilities.files.readcardinal3 +local readcardinal4 = utilities.files.readcardinal4 +local readinteger1 = utilities.files.readinteger1 +local readinteger2 = utilities.files.readinteger2 +local readinteger3 = utilities.files.readinteger3 +local readinteger4 = utilities.files.readinteger4 +local readstring = utilities.files.readstring + +local helpinfo = [[ + + + + mtx-dvi + ConTeXt DVI Helpers + 0.01 + + + + + list dvi commands + + + + +]] + +local application = logs.application { + name = "mtx-dvi", + banner = "ConTeXt DVI Helpers 0.10", + helpinfo = helpinfo, +} + +local report = application.report + +local f_set_char_fast = formatters["set char fast %C"] +local f_set_char = formatters["set char %C"] +local f_set_rule = formatters["set rule height=%p width=%p (%s %s)"] +local f_put_char = formatters["put char %C"] +local f_put_rule = formatters["put rule height=%p width=%p (%s %s)"] +local f_set_font = formatters["set font %i"] +local f_set_font_fast = formatters["set font fast %i"] +local f_right = formatters["right %p (%s)"] +local f_right_w = formatters["right w"] +local f_right_x = formatters["right x"] +local f_right_w_set = formatters["right set w %p (%s)"] +local f_right_x_set = formatters["right set x %p (%s)"] +local f_down = formatters["down %p (%s)"] +local f_down_y = formatters["down y"] +local f_down_z = formatters["down z"] +local f_down_y_set = formatters["down set y %p (%s)"] +local f_down_z_set = formatters["down set z %p (%s)"] +local f_page_begin = formatters["page begin (% t) %i"] +local f_page_end = formatters["page end"] +local f_nop = formatters["nop"] +local f_push = formatters["push %i"] +local f_pop = formatters["pop %i"] +local f_special = formatters["special %s"] +local f_preamble = formatters["preamble version=%s numerator=%s denominator=%s mag=%s comment=%s"] +local f_postamble_begin = formatters["postamble"] +local f_postamble_end = formatters["postamble end offset=%s version=%s"] +local f_define_font = formatters["define font k=%i checksum=%i scale=%p designsize=%p area=%s name=%s"] + +local currentdepth = 0 +local usedprinter = texio and texio.write_ln or print + +local handler = { } for i=0,255 do handler[i] = false end + +local function define_font(f,size) + local k = size == 1 and readcardinal1(f) + or size == 2 and readcardinal2(f) + or size == 3 and readcardinal3(f) + or readcardinal4(f) + local c = readcardinal4(f) + local s = readcardinal4(f) + local d = readcardinal4(f) + local a = readcardinal1(f) + local l = readcardinal1(f) + local a = readstring(f,a) + local l = readstring(f,l) + usedprinter(f_define_font(k,c,s,d,area,name)) +end + +handler[000] = function(f,b) + usedprinter(f_set_char_fast(b)) +end + +handler[128] = function(f) + usedprinter(f_set_char(readcardinal1(f))) +end +handler[129] = function(f) + usedprinter(f_set_char(readcardinal2(f))) +end +handler[130] = function(f) + usedprinter(f_set_char(readcardinal3(f))) +end +handler[131] = function(f) + usedprinter(f_set_char(readcardinal4(f))) +end + +handler[132] = function(f) + usedprinter(f_set_rule(readinteger4(f),readinteger4(f))) +end + +handler[133] = function(f) + usedprinter(f_put_char(readcardinal1(f))) +end +handler[134] = function(f) + usedprinter(f_put_char(readcardinal2(f))) +end +handler[135] = function(f) + usedprinter(f_put_char(readcardinal3(f))) +end +handler[136] = function(f) + usedprinter(f_put_char(readcardinal4(f))) +end + +handler[137] = function(f) + usedprinter(f_put_rule(readinteger4(f),readinteger4(f))) +end + +handler[138] = function(f) + usedprinter(f_nop()) +end + +handler[139] = function(f) + local pages = { } + for i=0,9 do + pages[i] = readinteger4(f) + end + usedprinter(f_page_begin(pages,readinteger4(f))) +end +handler[140] = function() + usedprinter(f_page_end()) +end + +handler[141] = function() + currentdepth = currentdepth + 1 + usedprinter(f_push(currentdepth)) +end +handler[142] = function() + usedprinter(f_pop(currentdepth)) + currentdepth = currentdepth - 1 +end + +handler[143] = function(f) + local d = readinteger1(f) + usedprinter(f_right(d,d)) +end +handler[144] = function(f) + local d = readinteger2(f) + usedprinter(f_right(d,d)) +end +handler[145] = function(f) + local d = readinteger3(f) + usedprinter(f_right(d,d)) +end +handler[146] = function(f) + local d = readinteger4(f) + usedprinter(f_right(d,d)) +end + +handler[147] = function() + usedprinter(f_right_w()) +end + +handler[148] = function(f) + local d = readinteger1(f) + usedprinter(f_right_w_set(d,d)) +end +handler[149] = function(f) + local d = readinteger2(f) + usedprinter(f_right_w_set(d,d)) +end +handler[150] = function(f) + local d = readinteger3(f) + usedprinter(f_right_w_set(d,d)) +end +handler[151] = function(f) + local d = readinteger4(f) + usedprinter(f_right_w_set(d,d)) +end + +handler[152] = function() + handlers.right_x() +end + +handler[153] = function(f) + local d = readinteger1(f) + usedprinter(f_right_x_set(d,d)) +end +handler[154] = function(f) + local d = readinteger2(f) + usedprinter(f_right_x_set(d,d)) +end +handler[155] = function(f) + local d = readinteger3(f) + usedprinter(f_right_x_set(d,d)) +end +handler[156] = function(f) + local d = readinteger4(f) + usedprinter(f_right_x_set(d,d)) +end + +handler[157] = function(f) + local d = readinteger1(f) + usedprinter(f_down(d,d)) +end + +handler[158] = function(f) + local d = readinteger2(f) + usedprinter(f_down(d,d)) +end +handler[159] = function(f) + local d = readinteger3(f) + usedprinter(f_down(d,d)) +end +handler[160] = function(f) + local d = readinteger4(f) + usedprinter(f_down(d,d)) +end +handler[161] = function() + usedprinter(f_down_y()) +end + +handler[162] = function(f) + local d = readinteger1(f) + usedprinter(f_down_y_set(d,d)) +end +handler[163] = function(f) + local d = readinteger2(f) + usedprinter(f_down_y_set(d,d)) +end +handler[164] = function(f) + local d = readinteger3(f) + usedprinter(f_down_y_set(d,d)) +end +handler[165] = function(f) + local d = readinteger4(f) + usedprinter(f_down_y_set(d,d)) +end + +handler[166] = function() + handlers.down_z() +end + +handler[167] = function(f) + local d = readinteger1(f) + usedprinter(f_down_z_set(d,d)) +end +handler[168] = function(f) + local d = readinteger2(f) + usedprinter(f_down_z_set(d,d)) +end +handler[169] = function(f) + local d = readinteger3(f) + usedprinter(f_down_z_set(d,d)) +end +handler[170] = function(f) + local d = readinteger4(f) + usedprinter(f_down_z_set(d,d)) +end + +handler[171] = function(f,b) + usedprinter(f_set_font_fast(b)) +end + +handler[235] = function(f) + usedprinter(f_set_font(readcardinal1(f))) +end +handler[236] = function(f) + usedprinter(f_set_font(readcardinal2(f))) +end +handler[237] = function(f) + usedprinter(f_set_font(readcardinal3(f))) +end +handler[238] = function(f) + usedprinter(f_set_font(readcardinal4(f))) +end + +handler[239] = function(f) + usedprinter(f_special(readstring(readcardinal1(f)))) +end +handler[240] = function(f) + usedprinter(f_special(readstring(readcardinal2(f)))) +end +handler[241] = function(f) + usedprinter(f_special(readstring(readcardinal3(f)))) +end +handler[242] = function(f) + usedprinter(f_special(readstring(readcardinal4(f)))) +end + +handler[243] = function(f) + define_font(f,1) +end +handler[244] = function(f) + define_font(f,2) +end +handler[245] = function(f) + define_font(f,3) +end +handler[246] = function(f) + define_font(f,4) +end + +handler[247] = function(f) + usedprinter(f_preamble( + readcardinal1(f), + readcardinal4(f), + readcardinal4(f), + readcardinal4(f), + readstring(f,readcardinal1(f)) + )) +end + +handler[248] = function(f) + usedprinter(f_postamble_begin( + readcardinal4(f), -- p + readcardinal4(f), -- num + readcardinal4(f), -- den + readcardinal4(f), -- mag + readcardinal4(f), -- l + readcardinal4(f), -- u + readcardinal2(f), -- s + readcardinal2(f) -- t + )) + while true do + local b = readbyte(f) + if b == 249 then + break + else + handler[b](f,b) + end + end + usedprinter(f_postamble_end( + readcardinal4(f), + readcardinal1(f) + )) + -- now 223's follow +end + +handler[250] = function() +end + +for i= 1,127 do handler[i] = handler[ 0] end +for i= 172,234 do handler[i] = handler[171] end +for i= 251,255 do handler[i] = handler[250] end + +scripts = scripts or { } +scripts.dvi = scripts.dvi or { } + +function scripts.dvi.list(filename,printer) + currentdepth = 0 + local f = io.open(filename) + if f then + local filesize = f:seek("end") + local position = 0 + f:seek("set",position) + local format = formatters["%0" .. #tostring(filesize) .. "i : %s"] + local flush = printer or (texio and texio.write_ln) or print + usedprinter = function(str) + flush(format(position,str)) + position = f:seek() + end + while true do + local b = readbyte(f) + if b == 223 then + return + else + handler[b](f,b) + end + end + f:close() + else + report("invalid filename %a",filename) + end +end + +local filename = environment.files[1] or "" + +if filename == "" then + application.help() +elseif environment.argument("list") then + scripts.dvi.list(filename) +elseif environment.argument("exporthelp") then + application.export(environment.argument("exporthelp"),filename) +else + application.help() +end diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua index 49867488e..14b54e05d 100644 --- a/scripts/context/lua/mtxrun.lua +++ b/scripts/context/lua/mtxrun.lua @@ -6580,7 +6580,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-fil"] = package.loaded["util-fil"] or true --- original size: 3577, stripped down to: 2870 +-- original size: 3968, stripped down to: 3038 if not modules then modules={} end modules ['util-fil']={ version=1.001, @@ -6655,7 +6655,7 @@ end function files.readinteger1(f) local n=byte(f:read(1)) if n>=0x80 then - return n-0xFF-1 + return n-0x100 else return n end @@ -6671,7 +6671,7 @@ function files.readinteger2(f) local a,b=byte(f:read(2),1,2) local n=0x100*a+b if n>=0x8000 then - return n-0xFFFF-1 + return n-0x10000 else return n end @@ -6680,6 +6680,15 @@ function files.readcardinal3(f) local a,b,c=byte(f:read(3),1,3) return 0x10000*a+0x100*b+c end +function files.readinteger3(f) + local a,b,c=byte(f:read(3),1,3) + local n=0x10000*a+0x100*b+c + if n>=0x80000 then + return n-0x1000000 + else + return n + end +end function files.readcardinal4(f) local a,b,c,d=byte(f:read(4),1,4) return 0x1000000*a+0x10000*b+0x100*c+d @@ -6688,7 +6697,7 @@ function files.readinteger4(f) local a,b,c,d=byte(f:read(4),1,4) local n=0x1000000*a+0x10000*b+0x100*c+d if n>=0x8000000 then - return n-0xFFFFFFFF-1 + return n-0x100000000 else return n end @@ -6697,7 +6706,7 @@ function files.readfixed4(f) local a,b,c,d=byte(f:read(4),1,4) local n=0x100*a+b if n>=0x8000 then - return n-0xFFFF-1+(0x100*c+d)/0xFFFF + return n-0x10000+(0x100*c+d)/0xFFFF else return n+(0x100*c+d)/0xFFFF end @@ -18747,8 +18756,8 @@ end -- of closure -- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua -- skipped libraries : - --- original bytes : 797361 --- stripped bytes : 289176 +-- original bytes : 797752 +-- stripped bytes : 289399 -- end library merge diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua index 49867488e..14b54e05d 100644 --- a/scripts/context/stubs/mswin/mtxrun.lua +++ b/scripts/context/stubs/mswin/mtxrun.lua @@ -6580,7 +6580,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-fil"] = package.loaded["util-fil"] or true --- original size: 3577, stripped down to: 2870 +-- original size: 3968, stripped down to: 3038 if not modules then modules={} end modules ['util-fil']={ version=1.001, @@ -6655,7 +6655,7 @@ end function files.readinteger1(f) local n=byte(f:read(1)) if n>=0x80 then - return n-0xFF-1 + return n-0x100 else return n end @@ -6671,7 +6671,7 @@ function files.readinteger2(f) local a,b=byte(f:read(2),1,2) local n=0x100*a+b if n>=0x8000 then - return n-0xFFFF-1 + return n-0x10000 else return n end @@ -6680,6 +6680,15 @@ function files.readcardinal3(f) local a,b,c=byte(f:read(3),1,3) return 0x10000*a+0x100*b+c end +function files.readinteger3(f) + local a,b,c=byte(f:read(3),1,3) + local n=0x10000*a+0x100*b+c + if n>=0x80000 then + return n-0x1000000 + else + return n + end +end function files.readcardinal4(f) local a,b,c,d=byte(f:read(4),1,4) return 0x1000000*a+0x10000*b+0x100*c+d @@ -6688,7 +6697,7 @@ function files.readinteger4(f) local a,b,c,d=byte(f:read(4),1,4) local n=0x1000000*a+0x10000*b+0x100*c+d if n>=0x8000000 then - return n-0xFFFFFFFF-1 + return n-0x100000000 else return n end @@ -6697,7 +6706,7 @@ function files.readfixed4(f) local a,b,c,d=byte(f:read(4),1,4) local n=0x100*a+b if n>=0x8000 then - return n-0xFFFF-1+(0x100*c+d)/0xFFFF + return n-0x10000+(0x100*c+d)/0xFFFF else return n+(0x100*c+d)/0xFFFF end @@ -18747,8 +18756,8 @@ end -- of closure -- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua -- skipped libraries : - --- original bytes : 797361 --- stripped bytes : 289176 +-- original bytes : 797752 +-- stripped bytes : 289399 -- end library merge diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun index 49867488e..14b54e05d 100644 --- a/scripts/context/stubs/unix/mtxrun +++ b/scripts/context/stubs/unix/mtxrun @@ -6580,7 +6580,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-fil"] = package.loaded["util-fil"] or true --- original size: 3577, stripped down to: 2870 +-- original size: 3968, stripped down to: 3038 if not modules then modules={} end modules ['util-fil']={ version=1.001, @@ -6655,7 +6655,7 @@ end function files.readinteger1(f) local n=byte(f:read(1)) if n>=0x80 then - return n-0xFF-1 + return n-0x100 else return n end @@ -6671,7 +6671,7 @@ function files.readinteger2(f) local a,b=byte(f:read(2),1,2) local n=0x100*a+b if n>=0x8000 then - return n-0xFFFF-1 + return n-0x10000 else return n end @@ -6680,6 +6680,15 @@ function files.readcardinal3(f) local a,b,c=byte(f:read(3),1,3) return 0x10000*a+0x100*b+c end +function files.readinteger3(f) + local a,b,c=byte(f:read(3),1,3) + local n=0x10000*a+0x100*b+c + if n>=0x80000 then + return n-0x1000000 + else + return n + end +end function files.readcardinal4(f) local a,b,c,d=byte(f:read(4),1,4) return 0x1000000*a+0x10000*b+0x100*c+d @@ -6688,7 +6697,7 @@ function files.readinteger4(f) local a,b,c,d=byte(f:read(4),1,4) local n=0x1000000*a+0x10000*b+0x100*c+d if n>=0x8000000 then - return n-0xFFFFFFFF-1 + return n-0x100000000 else return n end @@ -6697,7 +6706,7 @@ function files.readfixed4(f) local a,b,c,d=byte(f:read(4),1,4) local n=0x100*a+b if n>=0x8000 then - return n-0xFFFF-1+(0x100*c+d)/0xFFFF + return n-0x10000+(0x100*c+d)/0xFFFF else return n+(0x100*c+d)/0xFFFF end @@ -18747,8 +18756,8 @@ end -- of closure -- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua -- skipped libraries : - --- original bytes : 797361 --- stripped bytes : 289176 +-- original bytes : 797752 +-- stripped bytes : 289399 -- end library merge diff --git a/scripts/context/stubs/win64/mtxrun.lua b/scripts/context/stubs/win64/mtxrun.lua index 49867488e..14b54e05d 100644 --- a/scripts/context/stubs/win64/mtxrun.lua +++ b/scripts/context/stubs/win64/mtxrun.lua @@ -6580,7 +6580,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-fil"] = package.loaded["util-fil"] or true --- original size: 3577, stripped down to: 2870 +-- original size: 3968, stripped down to: 3038 if not modules then modules={} end modules ['util-fil']={ version=1.001, @@ -6655,7 +6655,7 @@ end function files.readinteger1(f) local n=byte(f:read(1)) if n>=0x80 then - return n-0xFF-1 + return n-0x100 else return n end @@ -6671,7 +6671,7 @@ function files.readinteger2(f) local a,b=byte(f:read(2),1,2) local n=0x100*a+b if n>=0x8000 then - return n-0xFFFF-1 + return n-0x10000 else return n end @@ -6680,6 +6680,15 @@ function files.readcardinal3(f) local a,b,c=byte(f:read(3),1,3) return 0x10000*a+0x100*b+c end +function files.readinteger3(f) + local a,b,c=byte(f:read(3),1,3) + local n=0x10000*a+0x100*b+c + if n>=0x80000 then + return n-0x1000000 + else + return n + end +end function files.readcardinal4(f) local a,b,c,d=byte(f:read(4),1,4) return 0x1000000*a+0x10000*b+0x100*c+d @@ -6688,7 +6697,7 @@ function files.readinteger4(f) local a,b,c,d=byte(f:read(4),1,4) local n=0x1000000*a+0x10000*b+0x100*c+d if n>=0x8000000 then - return n-0xFFFFFFFF-1 + return n-0x100000000 else return n end @@ -6697,7 +6706,7 @@ function files.readfixed4(f) local a,b,c,d=byte(f:read(4),1,4) local n=0x100*a+b if n>=0x8000 then - return n-0xFFFF-1+(0x100*c+d)/0xFFFF + return n-0x10000+(0x100*c+d)/0xFFFF else return n+(0x100*c+d)/0xFFFF end @@ -18747,8 +18756,8 @@ end -- of closure -- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua -- skipped libraries : - --- original bytes : 797361 --- stripped bytes : 289176 +-- original bytes : 797752 +-- stripped bytes : 289399 -- end library merge diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf index 3a6cdaeb8..8bdadef12 100644 Binary files a/tex/context/base/context-version.pdf and b/tex/context/base/context-version.pdf differ diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index 94efa3473..a60a70a72 100644 --- a/tex/context/base/mkiv/cont-new.mkiv +++ b/tex/context/base/mkiv/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2016.06.16 11:48} +\newcontextversion{2016.06.16 23:49} %D This file is loaded at runtime, thereby providing an excellent place for %D hacks, patches, extensions and new features. diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv index 8bf91ef04..670a1a683 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -39,7 +39,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2016.06.16 11:48} +\edef\contextversion{2016.06.16 23:49} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/mkiv/font-otn.lua b/tex/context/base/mkiv/font-otn.lua index 8203ee971..8c08d2c9a 100644 --- a/tex/context/base/mkiv/font-otn.lua +++ b/tex/context/base/mkiv/font-otn.lua @@ -281,7 +281,7 @@ local cursonce = true local fonthashes = fonts.hashes local fontdata = fonthashes.identifiers -local otffeatures = fonts.constructors.featuress.otf +local otffeatures = fonts.constructors.features.otf local registerotffeature = otffeatures.register local onetimemessage = fonts.loggers.onetimemessage or function() end diff --git a/tex/context/base/mkiv/math-ali.mkiv b/tex/context/base/mkiv/math-ali.mkiv index ca282aceb..b339223dc 100644 --- a/tex/context/base/mkiv/math-ali.mkiv +++ b/tex/context/base/mkiv/math-ali.mkiv @@ -1150,7 +1150,7 @@ \dontcomplain \noindentation % \dontleavehmode - \kern\d_strc_formulas_display_margin_left + \hskip\d_strc_formulas_display_margin_left % was kern but that doesn't indent \hbox to \displaywidth \bgroup \ifcase\mathnumberstatus \box\scratchbox diff --git a/tex/context/base/mkiv/math-ini.mkiv b/tex/context/base/mkiv/math-ini.mkiv index 20d4a42a0..8acdf65fe 100644 --- a/tex/context/base/mkiv/math-ini.mkiv +++ b/tex/context/base/mkiv/math-ini.mkiv @@ -84,7 +84,7 @@ \def\Umathcharslot {\cldcontext{tex.getmathcode(token.scan_int())[3]}} \fi -%D The attributes that we will use: +%D The attributes that we will use (todo: pack some into one but uglier code): \definesystemattribute[mathalphabet] [public] \definesystemattribute[mathsize] [public] diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf index b42440d3a..19d80b93f 100644 Binary files a/tex/context/base/mkiv/status-files.pdf and b/tex/context/base/mkiv/status-files.pdf differ diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf index 703ddfb32..ada7cf06f 100644 Binary files a/tex/context/base/mkiv/status-lua.pdf and b/tex/context/base/mkiv/status-lua.pdf differ diff --git a/tex/context/base/mkiv/tabl-tsp.mkiv b/tex/context/base/mkiv/tabl-tsp.mkiv index e0c3b9b74..eadcda16c 100644 --- a/tex/context/base/mkiv/tabl-tsp.mkiv +++ b/tex/context/base/mkiv/tabl-tsp.mkiv @@ -372,13 +372,13 @@ \page_split_float_process{\tsplitbeforeresult\box\tsplitresult\tsplitafterresult}% \doifnotinsidesplitfloat\tsplitafter \endgraf + \global\settrue\usesamefloatnumber % new, prevent next increment \fi \ifinsidecolumns \goodbreak % was \doifnotinsidesplitfloat\goodbreak \else \page % was \doifnotinsidesplitfloat\page \fi - \global\settrue\usesamefloatnumber % new, prevent next increment \fi} %D The next one assumes that the split takes place elsewhere. This is diff --git a/tex/context/base/mkiv/util-fil.lua b/tex/context/base/mkiv/util-fil.lua index 28c92c7c3..47d9d0316 100644 --- a/tex/context/base/mkiv/util-fil.lua +++ b/tex/context/base/mkiv/util-fil.lua @@ -90,7 +90,8 @@ end function files.readinteger1(f) -- one byte local n = byte(f:read(1)) if n >= 0x80 then - return n - 0xFF - 1 + -- return n - 0xFF - 1 + return n - 0x100 else return n end @@ -109,7 +110,8 @@ function files.readinteger2(f) local a, b = byte(f:read(2),1,2) local n = 0x100 * a + b if n >= 0x8000 then - return n - 0xFFFF - 1 + -- return n - 0xFFFF - 1 + return n - 0x10000 else return n end @@ -120,6 +122,17 @@ function files.readcardinal3(f) return 0x10000 * a + 0x100 * b + c end +function files.readinteger3(f) + local a, b, c = byte(f:read(3),1,3) + local n = 0x10000 * a + 0x100 * b + c + if n >= 0x80000 then + -- return n - 0xFFFFFF - 1 + return n - 0x1000000 + else + return n + end +end + function files.readcardinal4(f) local a, b, c, d = byte(f:read(4),1,4) return 0x1000000 * a + 0x10000 * b + 0x100 * c + d @@ -129,7 +142,8 @@ function files.readinteger4(f) local a, b, c, d = byte(f:read(4),1,4) local n = 0x1000000 * a + 0x10000 * b + 0x100 * c + d if n >= 0x8000000 then - return n - 0xFFFFFFFF - 1 + -- return n - 0xFFFFFFFF - 1 + return n - 0x100000000 else return n end @@ -139,7 +153,8 @@ function files.readfixed4(f) local a, b, c, d = byte(f:read(4),1,4) local n = 0x100 * a + b if n >= 0x8000 then - return n - 0xFFFF - 1 + (0x100 * c + d)/0xFFFF + -- return n - 0xFFFF - 1 + (0x100 * c + d)/0xFFFF + return n - 0x10000 + (0x100 * c + d)/0xFFFF else return n + (0x100 * c + d)/0xFFFF end diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf index 092b030ba..27ac41c42 100644 Binary files a/tex/context/interface/mkiv/i-context.pdf and b/tex/context/interface/mkiv/i-context.pdf differ diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf index b54cc006d..89d98204c 100644 Binary files a/tex/context/interface/mkiv/i-readme.pdf and b/tex/context/interface/mkiv/i-readme.pdf differ diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index e9434510e..aea018286 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 : c:/data/develop/context/sources/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/sources/luatex-fonts.lua --- merge date : 06/16/16 11:48:28 +-- merge date : 06/16/16 23:49:06 do -- begin closure to overcome local limits and interference @@ -4161,7 +4161,7 @@ end function files.readinteger1(f) local n=byte(f:read(1)) if n>=0x80 then - return n-0xFF-1 + return n-0x100 else return n end @@ -4177,7 +4177,7 @@ function files.readinteger2(f) local a,b=byte(f:read(2),1,2) local n=0x100*a+b if n>=0x8000 then - return n-0xFFFF-1 + return n-0x10000 else return n end @@ -4186,6 +4186,15 @@ function files.readcardinal3(f) local a,b,c=byte(f:read(3),1,3) return 0x10000*a+0x100*b+c end +function files.readinteger3(f) + local a,b,c=byte(f:read(3),1,3) + local n=0x10000*a+0x100*b+c + if n>=0x80000 then + return n-0x1000000 + else + return n + end +end function files.readcardinal4(f) local a,b,c,d=byte(f:read(4),1,4) return 0x1000000*a+0x10000*b+0x100*c+d @@ -4194,7 +4203,7 @@ function files.readinteger4(f) local a,b,c,d=byte(f:read(4),1,4) local n=0x1000000*a+0x10000*b+0x100*c+d if n>=0x8000000 then - return n-0xFFFFFFFF-1 + return n-0x100000000 else return n end @@ -4203,7 +4212,7 @@ function files.readfixed4(f) local a,b,c,d=byte(f:read(4),1,4) local n=0x100*a+b if n>=0x8000 then - return n-0xFFFF-1+(0x100*c+d)/0xFFFF + return n-0x10000+(0x100*c+d)/0xFFFF else return n+(0x100*c+d)/0xFFFF end diff --git a/tex/generic/context/luatex/luatex-plain.tex b/tex/generic/context/luatex/luatex-plain.tex index 99347ed2c..0a806c76f 100644 --- a/tex/generic/context/luatex/luatex-plain.tex +++ b/tex/generic/context/luatex/luatex-plain.tex @@ -17,7 +17,9 @@ \input luatex-pdf \relax \fi -\pdfoutput 1 +\outputmode 1 + +% \outputmode 0 \magnification\magstep5 % We set the page dimensions because otherwise the backend does weird things % when we have for instance this on a line of its own: @@ -31,8 +33,8 @@ % has to deal with the lack of a page concept on tex by some guessing. Normally % a macro package will set the dimensions to something reasonable anyway. -\pagewidth 8.5in -\pageheight 11.0in +\pagewidth 8.5truein +\pageheight 11.0truein % We load some code at runtime: -- cgit v1.2.3