diff options
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/mkii/cont-new.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/mkii/context.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/lpdf-ano.lua | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/node-ref.lua | 4 | ||||
-rw-r--r-- | tex/context/base/mkiv/node-tra.lua | 1 | ||||
-rw-r--r-- | tex/context/base/mkiv/status-files.pdf | bin | 26047 -> 26062 bytes | |||
-rw-r--r-- | tex/context/base/mkiv/status-lua.pdf | bin | 261372 -> 260515 bytes | |||
-rw-r--r-- | tex/context/base/mkiv/strc-ref.lua | 4 | ||||
-rw-r--r-- | tex/context/base/mkiv/util-str.lua | 24 | ||||
-rw-r--r-- | tex/context/interface/mkiv/i-context.pdf | bin | 844400 -> 844434 bytes | |||
-rw-r--r-- | tex/context/interface/mkiv/i-readme.pdf | bin | 61065 -> 61065 bytes |
13 files changed, 24 insertions, 19 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index c0d945f51..129b5df8c 100644 --- a/tex/context/base/mkii/cont-new.mkii +++ b/tex/context/base/mkii/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2018.06.24 18:28} +\newcontextversion{2018.06.25 12:21} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/mkii/context.mkii b/tex/context/base/mkii/context.mkii index 245d8dd30..dce51a9cb 100644 --- a/tex/context/base/mkii/context.mkii +++ b/tex/context/base/mkii/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2018.06.24 18:28} +\edef\contextversion{2018.06.25 12:21} %D For those who want to use this: diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index 618004649..f9318e0fb 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{2018.06.24 18:28} +\newcontextversion{2018.06.25 12:21} %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 bb9a949b4..7ad7586c8 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -42,7 +42,7 @@ %D has to match \type {YYYY.MM.DD HH:MM} format. \edef\contextformat {\jobname} -\edef\contextversion{2018.06.24 18:28} +\edef\contextversion{2018.06.25 12:21} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/mkiv/lpdf-ano.lua b/tex/context/base/mkiv/lpdf-ano.lua index fdbd55d55..0cadb9d61 100644 --- a/tex/context/base/mkiv/lpdf-ano.lua +++ b/tex/context/base/mkiv/lpdf-ano.lua @@ -218,7 +218,7 @@ local defaultdestination = pdfarray { 0, pdf_fit } -- fit is default (see lpdf-nod) -local destinations = { } -- to be used soon +local destinations = { } local reported = setmetatableindex("table") local function pdfregisterdestination(name,reference) diff --git a/tex/context/base/mkiv/node-ref.lua b/tex/context/base/mkiv/node-ref.lua index 287112cc8..492c65b0c 100644 --- a/tex/context/base/mkiv/node-ref.lua +++ b/tex/context/base/mkiv/node-ref.lua @@ -556,11 +556,11 @@ nodes.references = { -- todo: get rid of n (n is just a number, can be used for tracing, obsolete) -local function setreference(h,d,r) +local function setreference(h,d,r) -- h and d can be nil topofstack = topofstack + 1 -- the preroll permits us to determine samepage (but delayed also has some advantages) -- so some part of the backend work is already done here - stack[topofstack] = { r, h, d, codeinjections.prerollreference(r) } + stack[topofstack] = { r, h or false, d or false, codeinjections.prerollreference(r) } -- texsetattribute(attribute,topofstack) -- todo -> at tex end texsetcount("lastreferenceattribute",topofstack) end diff --git a/tex/context/base/mkiv/node-tra.lua b/tex/context/base/mkiv/node-tra.lua index 077506e46..2e985d1e4 100644 --- a/tex/context/base/mkiv/node-tra.lua +++ b/tex/context/base/mkiv/node-tra.lua @@ -456,6 +456,7 @@ local function numbertodimen(d,unit,fmt) end return formatters[fmt](d*dimenfactors[unit],unit) elseif not unit or unit == "pt" then +print(d,unit,fmt,f_pt(d)) return f_pt(d) else return f_un(d*dimenfactors[unit],unit) diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf Binary files differindex 3c7be3c0b..e4f2dce10 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 466bd7c4c..68df79f1a 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf diff --git a/tex/context/base/mkiv/strc-ref.lua b/tex/context/base/mkiv/strc-ref.lua index 02971c3f9..cf39a4d99 100644 --- a/tex/context/base/mkiv/strc-ref.lua +++ b/tex/context/base/mkiv/strc-ref.lua @@ -1982,7 +1982,7 @@ local function setinternalreference(specification) if reference then local prefix = specification.prefix if prefix and prefix ~= "" then - prefix = prefix .. ":" -- watch out, : here + local prefix = prefix .. ":" -- watch out, : here local function action(ref) tn = tn + 1 t[tn] = prefix .. ref @@ -2076,7 +2076,7 @@ function references.setandgetattribute(data) -- maybe do internal automatically local done = references.set(data) -- we had kind i.e .item -> full if done then attr = setinternalreference { - prefix = prefix, + prefix = rdat.prefix, reference = rdat.reference, internal = rdat.internal, view = rdat.view diff --git a/tex/context/base/mkiv/util-str.lua b/tex/context/base/mkiv/util-str.lua index 576e1f491..3ad30757b 100644 --- a/tex/context/base/mkiv/util-str.lua +++ b/tex/context/base/mkiv/util-str.lua @@ -47,7 +47,8 @@ end if not number then number = { } end -- temp hack for luatex-fonts -local stripper = patterns.stripzero +local stripzero = patterns.stripzero +local stripzeros = patterns.stripzeros local newline = patterns.newline local endofstring = patterns.endofstring local whitespace = patterns.whitespace @@ -56,12 +57,12 @@ local spaceortab = patterns.spaceortab -- local function points(n) -- n = tonumber(n) --- return (not n or n == 0) and "0pt" or lpegmatch(stripper,format("%.5fpt",n/65536)) +-- return (not n or n == 0) and "0pt" or lpegmatch(stripzeros,format("%.5fpt",n/65536)) -- end -- local function basepoints(n) -- n = tonumber(n) --- return (not n or n == 0) and "0bp" or lpegmatch(stripper,format("%.5fbp", n*(7200/7227)/65536)) +-- return (not n or n == 0) and "0bp" or lpegmatch(stripzeros,format("%.5fbp", n*(7200/7227)/65536)) -- end local ptf = 1 / 65536 @@ -79,7 +80,7 @@ local function points(n) if n % 1 == 0 then return format("%ipt",n) end - return lpegmatch(stripper,format("%.5fpt",n)) + return lpegmatch(stripzeros,format("%.5fpt",n)) -- plural as we need to keep the pt end local function basepoints(n) @@ -94,7 +95,7 @@ local function basepoints(n) if n % 1 == 0 then return format("%ibp",n) end - return lpegmatch(stripper,format("%.5fbp",n)) + return lpegmatch(stripzeros,format("%.5fbp",n)) -- plural as we need to keep the pt end number.points = points @@ -265,7 +266,7 @@ local striplinepatterns = { ["retain"] = p_retain_normal, ["retain and collapse"] = p_retain_collapse, ["retain and no empty"] = p_retain_noempty, - ["collapse"] = patterns.collapser, -- how about: stripper fullstripper + ["collapse"] = patterns.collapser, } setmetatable(striplinepatterns,{ __index = function(t,k) return p_prune_collapse end }) @@ -613,7 +614,8 @@ local sequenced=table.sequenced local formattednumber=number.formatted local sparseexponent=number.sparseexponent local formattedfloat=number.formattedfloat -local stripper=lpeg.patterns.stripzero +local stripzero=lpeg.patterns.stripzero +local stripzeros=lpeg.patterns.stripzeros ]] else @@ -641,7 +643,8 @@ else formattednumber = number.formatted, sparseexponent = number.sparseexponent, formattedfloat = number.formattedfloat, - stripper = lpeg.patterns.stripzero, + stripzero = lpeg.patterns.stripzero, + stripzeros = lpeg.patterns.stripzeros, } end @@ -917,10 +920,11 @@ end local format_N = function(f) -- strips leading and trailing zeros (also accepts string) n = n + 1 + -- stripzero (singular) as we only have a number if not f or f == "" then - return format("(((a%s > -0.0000000005 and a%s < 0.0000000005) and '0') or ((a%s %% 1 == 0) and format('%%i',a%s)) or lpegmatch(stripper,format('%%.9f',a%s)))",n,n,n,n,n) + return format("(((a%s > -0.0000000005 and a%s < 0.0000000005) and '0') or ((a%s %% 1 == 0) and format('%%i',a%s)) or lpegmatch(stripzero,format('%%.9f',a%s)))",n,n,n,n,n) else - return format("(((a%s %% 1 == 0) and format('%%i',a%s)) or lpegmatch(stripper,format('%%%sf',a%s)))",n,n,f,n) + return format("(((a%s %% 1 == 0) and format('%%i',a%s)) or lpegmatch(stripzero,format('%%%sf',a%s)))",n,n,f,n) end end diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf Binary files differindex dcf89c5c7..33a13029c 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 59f8e297a..e40d39a14 100644 --- a/tex/context/interface/mkiv/i-readme.pdf +++ b/tex/context/interface/mkiv/i-readme.pdf |