diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-06-17 00:39:30 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-06-17 00:39:30 +0200 |
commit | eefbee47c0b7ac3a179e1e7fcd2e6ea1af990676 (patch) | |
tree | c626db6d3660a0117dd9533681ff34677a1d31fe | |
parent | e5f31b4b88e3f4dc2fad65156c4dff08d27f528b (diff) | |
download | context-eefbee47c0b7ac3a179e1e7fcd2e6ea1af990676.tar.gz |
2016-06-16 23:53:00
23 files changed, 609 insertions, 46 deletions
diff --git a/doc/context/documents/general/manuals/luatex.pdf b/doc/context/documents/general/manuals/luatex.pdf Binary files differindex 9510d49d2..ccb6b07a4 100644 --- a/doc/context/documents/general/manuals/luatex.pdf +++ b/doc/context/documents/general/manuals/luatex.pdf 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 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + +<!-- compare with lmx framework variant --> + +<!-- + filename : context-base.xml + comment : companion to mtx-server-ctx-startup.tex + author : Hans Hagen, PRAGMA-ADE, Hasselt NL + copyright: PRAGMA ADE / ConTeXt Development Team + license : see context related readme files +--> + +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> + <head> + <title>ConTeXt DVI Helpers 0.10</title> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <style type="text/css"> + body { color: #FFFFFF; background-color: #808080; font-family: optima, verdana, futura, "lucida sans", arial, geneva, helvetica, sans; font-size: 12px; line-height: 18px; } a:link, a:active, a:visited { color: #FFFFFF; } a.dir-view:link, a.dir-view:active, a.dir-view:visited { color: #FFFFFF; text-decoration: underline; } .valid { color: #00FF00; } .invalid { color: #FF0000; } button, .commonlink, .smallbutton { font-weight: bold; font-size: 12px; text-decoration: none; color: #000000; border-color: #7F7F7F; border-style: solid; border-width: .125ex; background-color: #FFFFFF; padding: .5ex; } .smallbutton { width: 1em; } a.commonlink:link, a.commonlink:active, a.commonlink:visited, a.smalllink:link, a.smalllink:active, a.smalllink:visited { font-weight: bold; font-size: 12px; text-decoration: none; color: #000000; } h1, .title { font-style: normal; font-weight: normal; font-size: 18px; line-height: 18px; margin-bottom: 20px; } h2, .subtitle { font-style: normal; font-weight: normal; font-size: 12px; margin-top: 18px; margin-bottom: 18px; } table { line-height: 18px; font-size: 12px; margin: 0; } th { font-weight: bold; text-align: left; padding-bottom: 6px; } .tc { font-weight: bold; text-align: left; } p, li { max-width: 60em; } .empty-line { margin-top: 4px; } .more-room { margin-right: 1.5em; } .much-more-room { margin-right: 3em; } #main { position: absolute; left: 10%; top: 10%; right: 10%; bottom: 10%; z-index: 2; width: 80%; height: 80%; padding: 0%; margin: 0%; overflow: auto; border-style: none; border-width: 0; background-color: #3F3F3F; } #main-settings { margin: 12px; x_max-width: 60em; line-height: 18px; font-size: 12px; } #left { position: absolute; top : 10%; left: 0%; bottom: 0%; right: 90%; z-index: 1; width: 10%; height: 90%; padding: 0%; margin: 0%; font-size: 16px; border-style: none; border-width: 0; background-color: #4F6F6F; } #right { position: absolute; top : 0%; left: 90%; bottom: 10%; right: 0%; z-index: 1; width: 10%; height: 90%; padding: 0%; margin: 0%; font-size: 16px; border-style: none; border-width: 0; background-color: #4F6F6F; _margin-left: -15px; } #bottom { position: absolute; left: 10%; right: 0%; top: 90%; bottom: 0%; z-index: 1; width: 90%; height: 10%; padding: 0%; margin: 0%; font-size: 16px; border-style: none; border-width: 0; background-color: #6F6F8F; } #top { position: absolute; left: 0%; right: 10%; top: 0%; bottom: 90%; z-index: 1; width: 90%; height: 10%; padding: 0%; margin: 0%; font-size: 16px; border-style: none; border-width: 0; background-color: #6F6F8F; } #top-one { position: absolute; bottom: 50%; width: 100%; buggedheight: 100%; } #top-two { position: relative; margin-bottom: -9px; margin-left: 12px; margin-right: 12px; line-height: 18px; text-align: right; vertical-align: middle; } #bottom-one { position: absolute; bottom: 50%; width: 100%; buggedheight: 100%; } #bottom-two { position: relative; margin-bottom: -9px; margin-left: 12px; margin-right: 12px; line-height: 18px; text-align: left; vertical-align: middle; } #left-one { position: absolute; width: 100%; buggedheight: 100%; } #left-two { position: relative; margin-top: 12px; line-height: 18px; text-align: center; vertical-align: top; } #right-one { display: table; height: 100%; width: 100%; } #right-two { display: table-row; height: 100%; width: 100%; } #right-three { display: table-cell; width: 100%; vertical-align: bottom; _position: absolute; _top: 100%; } #right-four { text-align: center; margin-bottom: 2ex; _position: relative; _top: -100%; } #more-top { position: absolute; top: 0%; left: 90%; bottom: 90%; right: 0%; z-index: 3; width: 10%; height: 10%; padding: 0%; margin: 0%; border-style: none; border-width: 0; } #more-top-settings { text-align: center; } #more-right-settings { margin-right: 12px; margin-left: 12px; line-height: 18px; font-size: 10px; text-align: center; } #right-safari { _display: table; width: 100%; height: 100%; } + </style> + <style type="text/css"> + </style> + </head> + <body> + <div id="top"> <div id="top-one"> + <div id="top-two">ConTeXt DVI Helpers 0.10 </div> + </div> + </div> + <div id="bottom"> <div id="bottom-one"> + <div id="bottom-two">wiki: http://contextgarden.net | mail: ntg-context@ntg.nl | website: http://www.pragma-ade.nl</div> + </div> + </div> + <div id="left"></div> + <div id="right"></div> + <div id="main"> + <div id='main-settings'> + <h1>Command line options</h1> +<table> + <tr><th style="width: 10em">flag</th><th style="width: 8em">value</th><th>description</th></tr> + <tr><th/><td/><td/></tr> + <tr><th>--list</th><td></td><td>list dvi commands</td></tr> + </table> +<br/> + </div> + </div> + </body> + </html> 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 @@ +<?xml version="1.0"?> +<application> + <metadata> + <entry name="name">mtx-dvi</entry> + <entry name="detail">ConTeXt DVI Helpers</entry> + <entry name="version">0.01</entry> + </metadata> + <flags> + <category name="basic"> + <subcategory> + <flag name="list"><short>list dvi commands</short></flag> + </subcategory> + </category> + </flags> +</application> 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 = [[ +<?xml version="1.0"?> +<application> + <metadata> + <entry name="name">mtx-dvi</entry> + <entry name="detail">ConTeXt DVI Helpers</entry> + <entry name="version">0.01</entry> + </metadata> + <flags> + <category name="basic"> + <subcategory> + <flag name="list"><short>list dvi commands</short></flag> + </subcategory> + </category> + </flags> +</application> +]] + +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 Binary files differindex 3a6cdaeb8..8bdadef12 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf 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 Binary files differindex b42440d3a..19d80b93f 100644 --- a/tex/context/base/mkiv/status-files.pdf +++ b/tex/context/base/mkiv/status-files.pdf diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf Binary files differindex 703ddfb32..ada7cf06f 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf 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 Binary files differindex 092b030ba..27ac41c42 100644 --- a/tex/context/interface/mkiv/i-context.pdf +++ b/tex/context/interface/mkiv/i-context.pdf diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf Binary files differindex b54cc006d..89d98204c 100644 --- a/tex/context/interface/mkiv/i-readme.pdf +++ b/tex/context/interface/mkiv/i-readme.pdf 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: |