From 778f381ba6a448ab00d67994a412dd4226d43238 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Fri, 8 Oct 2021 20:46:55 +0200 Subject: 2021-10-08 20:07:00 --- tex/context/base/mkii/cont-new.mkii | 2 +- tex/context/base/mkii/context.mkii | 2 +- tex/context/base/mkii/mult-cs.mkii | 1 + tex/context/base/mkiv/char-def.lua | 2 +- tex/context/base/mkiv/cont-new.mkiv | 2 +- tex/context/base/mkiv/context.mkiv | 2 +- tex/context/base/mkiv/font-otr.lua | 3 +- tex/context/base/mkiv/math-fbk.lua | 30 +- tex/context/base/mkiv/mult-def.lua | 3 + tex/context/base/mkiv/mult-low.lua | 2 +- tex/context/base/mkiv/publ-aut.lua | 16 + tex/context/base/mkiv/status-files.pdf | Bin 24914 -> 24847 bytes tex/context/base/mkiv/status-lua.pdf | Bin 253654 -> 253894 bytes tex/context/base/mkiv/typo-drp.lua | 13 +- tex/context/base/mkiv/util-sci.lua | 19 +- tex/context/base/mkxl/cont-new.mkxl | 2 +- tex/context/base/mkxl/context.mkxl | 2 +- tex/context/base/mkxl/lang-ini.mkxl | 3 + tex/context/base/mkxl/lpdf-ini.lmt | 10 +- tex/context/base/mkxl/lpdf-pde.lmt | 225 +- tex/context/base/mkxl/mlib-lmp.lmt | 15 + tex/context/base/mkxl/mlib-pdf.lmt | 1 + tex/context/base/mkxl/page-mix.mkxl | 1 + tex/context/base/mkxl/spac-ali.mkxl | 3 +- tex/context/base/mkxl/strc-itm.mklx | 30 +- tex/context/base/mkxl/strc-mar.mkxl | 12 +- tex/context/base/mkxl/strc-not.lmt | 6 +- tex/context/base/mkxl/typo-drp.lmt | 13 +- tex/context/interface/mkii/cont-cs.xml | 10394 +------------------ tex/context/interface/mkii/keys-cs.xml | 1 + tex/context/modules/mkiv/m-scite.mkiv | 10 +- tex/context/modules/mkxl/m-openstreetmap.lmt | 127 +- tex/context/modules/mkxl/m-openstreetmap.mkxl | 50 +- tex/generic/context/luatex/luatex-fonts-merged.lua | 3 +- 34 files changed, 472 insertions(+), 10533 deletions(-) (limited to 'tex') diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index 15f593712..d43e2ccf1 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{2021.09.26 16:48} +\newcontextversion{2021.10.08 20:05} %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 4015da53a..3c7645d53 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{2021.09.26 16:48} +\edef\contextversion{2021.10.08 20:05} %D For those who want to use this: diff --git a/tex/context/base/mkii/mult-cs.mkii b/tex/context/base/mkii/mult-cs.mkii index aa936d180..2c7f8e197 100644 --- a/tex/context/base/mkii/mult-cs.mkii +++ b/tex/context/base/mkii/mult-cs.mkii @@ -188,6 +188,7 @@ \setinterfacevariable{enumeration}{vycet} \setinterfacevariable{environment}{prostredi} \setinterfacevariable{even}{sude} +\setinterfacevariable{explicit}{explicit} \setinterfacevariable{export}{export} \setinterfacevariable{external}{externi} \setinterfacevariable{extremestretch}{extremestretch} diff --git a/tex/context/base/mkiv/char-def.lua b/tex/context/base/mkiv/char-def.lua index aabcb0615..c8dac09c5 100644 --- a/tex/context/base/mkiv/char-def.lua +++ b/tex/context/base/mkiv/char-def.lua @@ -271537,4 +271537,4 @@ characters.data={ synonyms={ "vs17" }, unicodeslot=0xE0100, }, -} \ No newline at end of file +} diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index d7c2469e8..c8893eb1e 100644 --- a/tex/context/base/mkiv/cont-new.mkiv +++ b/tex/context/base/mkiv/cont-new.mkiv @@ -13,7 +13,7 @@ % \normalend % uncomment this to get the real base runtime -\newcontextversion{2021.09.26 16:48} +\newcontextversion{2021.10.08 20:05} %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/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv index 1a32832af..89e04f878 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -45,7 +45,7 @@ %D {YYYY.MM.DD HH:MM} format. \edef\contextformat {\jobname} -\edef\contextversion{2021.09.26 16:48} +\edef\contextversion{2021.10.08 20:05} %D Kind of special: diff --git a/tex/context/base/mkiv/font-otr.lua b/tex/context/base/mkiv/font-otr.lua index 3b5edebc4..286367ed9 100644 --- a/tex/context/base/mkiv/font-otr.lua +++ b/tex/context/base/mkiv/font-otr.lua @@ -1962,9 +1962,10 @@ local function getinfo(maindata,sub,platformnames,rawfamilynames,metricstoo,inst weight = weight and lower(weight), width = width and lower(width), pfmweight = metrics.weightclass or 400, -- will become weightclass - pfmwidth = metrics.widthclass or 5, -- will become widthclass + pfmwidth = metrics.widthclass or 5, -- will become widthclass panosewidth = metrics.panosewidth, panoseweight = metrics.panoseweight, + fstype = metrics.fstype or 0, -- embedding, subsetting and editing italicangle = postscript.italicangle or 0, units = fontheader.units or 0, designsize = fontdata.designsize, diff --git a/tex/context/base/mkiv/math-fbk.lua b/tex/context/base/mkiv/math-fbk.lua index f1efadc45..aecffb466 100644 --- a/tex/context/base/mkiv/math-fbk.lua +++ b/tex/context/base/mkiv/math-fbk.lua @@ -32,6 +32,7 @@ local popcommand = helpers.commands.pop local pushcommand = helpers.commands.push local virtualcharacters = { } +local virtualforced = { } local hashes = fonts.hashes local identifiers = hashes.identifiers @@ -136,7 +137,7 @@ function fallbacks.apply(target,original) local fullname = trace_fallbacks and target.properties.fullname -- for k, v in sortedhash(virtualcharacters) do - if not characters[k] then + if not characters[k] or virtualforced[k] then local tv = type(v) local cd = nil if tv == "table" then @@ -698,3 +699,30 @@ virtualcharacters[0x305] = function(data) } end +local function threedots(data,shift) + local characters = data.target.characters + local parameters = data.target.parameters + local periodchar = characters[0x002E] + local pluschar = characters[0x002B] + local period = charcommand[0x002E] + local periodwd = periodchar.width or 0 + local periodht = periodchar.height or 0 + local perioddp = periodchar.depth or 0 + local offset = 0 + if shift then + local plusht = pluschar.height or 0 + local plusdp = pluschar.depth or 0 + local axis = (plusdp + plusht)//2 - plusdp + offset = axis - periodht//2 + periodht = axis + periodht//2 + end + return { + width = 3*periodwd, + height = periodht, + depth = 0, + commands = { upcommand[offset], period, period, period } + } +end + +virtualcharacters[0x2026] = function(data) return threedots(data,false) end virtualforced[0x2026] = true +virtualcharacters[0x22EF] = function(data) return threedots(data, true) end virtualforced[0x22EF] = true diff --git a/tex/context/base/mkiv/mult-def.lua b/tex/context/base/mkiv/mult-def.lua index a06deffe5..bb3f458bf 100644 --- a/tex/context/base/mkiv/mult-def.lua +++ b/tex/context/base/mkiv/mult-def.lua @@ -17327,6 +17327,9 @@ return { ["pe"]="بدون‌آویزان‌کردن", ["ro"]="nothanging", }, + ["explicit"]={ + ["en"]="explicit", + }, ["notcollapsed"]={ ["en"]="notcollapsed", }, diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua index 4842a3571..30e1eac10 100644 --- a/tex/context/base/mkiv/mult-low.lua +++ b/tex/context/base/mkiv/mult-low.lua @@ -175,7 +175,7 @@ return { "wildcardsymbol", -- "normalhyphenationcode", "automatichyphenationcode", "explicithyphenationcode", "syllablehyphenationcode", "uppercasehyphenationcode", - "collapsehyphenationmcode", "compoundhyphenationcode", "strictstarthyphenationcode", "strictendhyphenationcode", + "collapsehyphenationcode", "compoundhyphenationcode", "strictstarthyphenationcode", "strictendhyphenationcode", "automaticpenaltyhyphenationcode", "explicitpenaltyhyphenationcode", "permitgluehyphenationcode", "permitallhyphenationcode", "permitmathreplacehyphenationcode", "forcecheckhyphenationcode", "lazyligatureshyphenationcode", "forcehandlerhyphenationcode", "feedbackcompoundhyphenationcode", "ignoreboundshyphenationcode", "partialhyphenationcode", "completehyphenationcode", diff --git a/tex/context/base/mkiv/publ-aut.lua b/tex/context/base/mkiv/publ-aut.lua index 02f4798c5..64fecb3d5 100644 --- a/tex/context/base/mkiv/publ-aut.lua +++ b/tex/context/base/mkiv/publ-aut.lua @@ -998,6 +998,22 @@ publications.sortmethods.authoryear = { }, } +publications.sortmethods.authortitle = { + sequence = { + { field = "author", default = "", unknown = "" }, + { field = "title", default = "", unknown = "" }, + { field = "booktitle", default = "", unknown = "" }, -- if this is an untitled section (e.g., introduction, foreword, preface) of a book or a review of a book + { field = "maintitle", default = "", unknown = "" }, -- if this is an untitled section or volume in a multivolume collection + { field = "volume", default = "", unknown = "" }, + { field = "part", default = "", unknown = "" }, + { field = "date", default = "9998-13-32", unknown = "9999-14-33" }, -- some specifications allow date instead of year, month, day + { field = "year", default = "9998", unknown = "9999" }, + { field = "month", default = "13", unknown = "14" }, + { field = "day", default = "32", unknown = "33" }, + { field = "index", default = "", unknown = "" }, + }, +} + implement { name = "btxremapauthor", arguments = "2 strings", diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf index 0eca85be1..c251ad6c1 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 2fe879833..50cc0ad29 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/typo-drp.lua b/tex/context/base/mkiv/typo-drp.lua index d56ba3da7..79cda3ab9 100644 --- a/tex/context/base/mkiv/typo-drp.lua +++ b/tex/context/base/mkiv/typo-drp.lua @@ -73,6 +73,7 @@ local v_default = variables.default local v_margin = variables.margin local v_auto = variables.auto local v_first = variables.first +local v_keep = variables.keep local v_last = variables.last local texget = tex.get @@ -133,6 +134,7 @@ interfaces.implement { -- a page so this has a low priority actions[v_default] = function(head,setting) + local skip = false -- begin of par local first = getnext(head) local indent = false @@ -196,6 +198,9 @@ actions[v_default] = function(head,setting) else -- keep quote etc with initial local next = getnext(first) + if next and method[v_keep] then + skip = first + end if not next then -- don't start with a quote or so return head @@ -245,7 +250,7 @@ actions[v_default] = function(head,setting) local id = getid(current) if id == kern_code then setkern(current,0) - elseif id == glyph_code then + elseif id == glyph_code and skip ~= current then local next = getnext(current) if font then setfont(current,font) @@ -301,7 +306,11 @@ actions[v_default] = function(head,setting) -- local hoffset = width + hoffset + distance + (indent and parindent or 0) for current in nextglyph, first do - setoffsets(current,-hoffset,-voffset) -- no longer - height here + if skip == current then + setoffsets(current,-hoffset,0) + else + setoffsets(current,-hoffset,-voffset) -- no longer - height here + end if current == last then break end diff --git a/tex/context/base/mkiv/util-sci.lua b/tex/context/base/mkiv/util-sci.lua index 778991ea6..67528c74e 100644 --- a/tex/context/base/mkiv/util-sci.lua +++ b/tex/context/base/mkiv/util-sci.lua @@ -23,6 +23,7 @@ do lexerroot = file.dirname(resolvers.findfile("scite-context-lexer.lua")) -- end if lfs.isdir(lexerroot) then + -- pushluapath package.extraluapath(lexerroot) package.extraluapath(lexerroot.."/themes") package.extraluapath(lexerroot.."/data") @@ -58,14 +59,14 @@ local knownlexers = { -- todo: pat/hyp ori } -lexer = nil -- main lexer, global (for the moment needed for themes) +lexers = nil -- main lexer, global (for the moment needed for themes) local function loadscitelexer() - if not lexer then - lexer = require("scite-context-lexer") - require("scite-context-theme") -- uses lexer - if lexer then - lexer.context.disablewordcheck() + if not lexers then + lexers = require("scite-context-lexer") + lexers.styles = require("scite-context-theme") -- uses lexer + if lexers then + (lexers.disablewordcheck or lexers.context.disablewordcheck)() end end return lexer @@ -74,7 +75,7 @@ end local loadedlexers = setmetatableindex(function(t,k) local l = knownlexers[k] or k loadscitelexer() - local v = lexer.load(formatters["scite-context-lexer-%s"](l)) + local v = lexers.load(formatters["scite-context-lexer-%s"](l)) t[l] = v t[k] = v return v @@ -124,7 +125,7 @@ local function exportcsslexing() return (#f == 0 and f[1] == 0) or ((f[1] == f[2]) and (f[2] == f[3]) and (f[3] == 0)) end local result, r = { }, 0 - for k, v in table.sortedhash(lexer.context.styles) do + for k, v in table.sortedhash(lexers.context.styles) do local bold = v.bold local fore = v.fore r = r + 1 @@ -149,7 +150,7 @@ local function exportwhites() end local function exportstyled(lexer,text,numbered) - local result = lexer.lex(lexer,text,0) + local result = lexers.lex(lexer,text,0) local start = 1 local whites = exportwhites() local buffer = { } diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl index 5306b33b4..e81d6cc7b 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{2021.09.26 16:48} +\newcontextversion{2021.10.08 20:05} %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 c2b8528c1..a5b9cc7f1 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{2021.09.26 16:48} +\immutable\edef\contextversion{2021.10.08 20:05} %overloadmode 1 % check frozen / warning %overloadmode 2 % check frozen / error diff --git a/tex/context/base/mkxl/lang-ini.mkxl b/tex/context/base/mkxl/lang-ini.mkxl index 336dd5d69..2b7f34ef3 100644 --- a/tex/context/base/mkxl/lang-ini.mkxl +++ b/tex/context/base/mkxl/lang-ini.mkxl @@ -481,6 +481,9 @@ \permanent\protected\def\dohyphencollapsing{\hyphenationmode\bitwiseflip\hyphenationmode \collapsehyphenationcode} \permanent\protected\def\nohyphencollapsing{\hyphenationmode\bitwiseflip\hyphenationmode-\collapsehyphenationcode} +\permanent\protected\def\doexplicithyphens{\hyphenationmode\bitwiseflip\hyphenationmode \explicithyphenationcode} +\permanent\protected\def\noexplicithyphens{\hyphenationmode\bitwiseflip\hyphenationmode-\explicithyphenationcode} + \permanent\protected\def\usehyphensparameter#1% {\edef\p_hyphens{#1\c!hyphens}% \ifx\p_hyphens\v!no diff --git a/tex/context/base/mkxl/lpdf-ini.lmt b/tex/context/base/mkxl/lpdf-ini.lmt index ce679c08e..1ce7c5adc 100644 --- a/tex/context/base/mkxl/lpdf-ini.lmt +++ b/tex/context/base/mkxl/lpdf-ini.lmt @@ -69,7 +69,7 @@ local report_objects = logs.reporter("backend","objects") local report_finalizing = logs.reporter("backend","finalizing") local report_blocked = logs.reporter("backend","blocked") -local implement = interfaces.implement +local implement = interfaces and interfaces.implement local context = context @@ -83,7 +83,7 @@ local factor = number.dimenfactors.bp local codeinjections = { } local nodeinjections = { } -local backends = backends +local backends = backends or { } local pdfbackend = { comment = "backend for directly generating pdf output", @@ -241,8 +241,8 @@ do end end - local toregime = regimes.toregime - local fromregime = regimes.fromregime + local toregime = regimes and regimes.toregime + local fromregime = regimes and regimes.fromregime local escaped = Cs(Cc("(") * (S("\\()\n\r\t\b\f")/"\\%0" + P(1))^0 * Cc(")")) topdfdoc = function(str,default) @@ -746,6 +746,8 @@ lpdf.reference = pdfreference lpdf.verbose = pdfverbose lpdf.literal = pdfliteral +if not callbacks then return lpdf end + -- three priority levels, default=2 local pagefinalizers = { { }, { }, { } } diff --git a/tex/context/base/mkxl/lpdf-pde.lmt b/tex/context/base/mkxl/lpdf-pde.lmt index 58f5723a3..4483510d0 100644 --- a/tex/context/base/mkxl/lpdf-pde.lmt +++ b/tex/context/base/mkxl/lpdf-pde.lmt @@ -85,6 +85,7 @@ local arraytotable = pdfe.arraytotable local pagestotable = pdfe.pagestotable local readwholestream = pdfe.readwholestream local getfromreference = pdfe.getfromreference +local getfromobject = pdfe.getfromobject local report_epdf = logs.reporter("epdf") @@ -119,6 +120,8 @@ encryptioncodes = allocate(swapped(encryptioncodes,encryptioncodes) pdfe.objectcodes = objectcodes pdfe.encryptioncodes = encryptioncodes +-- lpdf_epdf.objectcodes = objectcodes + local null_object_code = objectcodes.null local reference_object_code = objectcodes.reference @@ -134,47 +137,6 @@ local dictionary_object_code = objectcodes.dictionary local stream_object_code = objectcodes.stream local reference_object_code = objectcodes.reference -local checked_access -local get_flagged -- from pdfe -> lpdf - -if lpdf.dictionary then - - -- we're in context - - local pdfdictionary = lpdf.dictionary - local pdfarray = lpdf.array - local pdfconstant = lpdf.constant - local pdfstring = lpdf.string - local pdfunicode = lpdf.unicode - - get_flagged = function(t,f,k) - local tk = t[k] -- triggers resolve - local fk = f[k] - if not fk then - return tk - elseif fk == "name" then - return pdfconstant(tk) - elseif fk == "array" then - return pdfarray(tk) - elseif fk == "dictionary" then - return pdfarray(tk) - elseif fk == "rawtext" then - return pdfstring(tk) - elseif fk == "unicode" then - return pdfunicode(tk) - else - return tk - end - end - -else - - get_flagged = function(t,f,k) - return t[k] - end - -end - -- We need to convert the string from utf16 although there is no way to -- check if we have a regular string starting with a bom. So, we have -- na dilemma here: a pdf doc encoded string can be invalid utf. @@ -196,6 +158,13 @@ local some_reference local some_string = lpdf.frombytes +function lpdf_epdf.objecttype(object) + if type(object) == "table" then + local kind = object.__type__ + return kind and objectcodes[kind] + end +end + local function get_value(document,t,key) if not key then return @@ -218,22 +187,131 @@ local function get_value(document,t,key) elseif kind == dictionary_object_code then return some_dictionary(value[2],document) elseif kind == stream_object_code then - return some_stream(value,document) + return some_stream(value,value[2],document) -- needs checking elseif kind == reference_object_code then return some_reference(value,document) end return value end +local checked_access +local get_flagged -- from pdfe -> lpdf + +if lpdf.dictionary then + + -- these are used in mtx-pdf.lua + + local pdfdictionary = lpdf.dictionary + local pdfarray = lpdf.array + local pdfconstant = lpdf.constant + local pdfreference = lpdf.reference + local pdfliteral = lpdf.literal + + local copy_array, copy_dictionary + + local function copyobject(object,key,value) + if not value then + value = object.__raw__[key] + end + local t = type(value) + if t == "string" then + return pdfconstant(value) + elseif t ~= "table" then + return value + end + local kind = value[1] + if kind == name_object_code then + return pdfconstant(value[2]) + elseif kind == string_object_code then + return pdfliteral(value[2],value[3]) + elseif kind == array_object_code then + return copyarray(object[key]) + elseif kind == dictionary_object_code then + return copydictionary(object[key]) + elseif kind == null_object_code then + return pdfnull() + elseif kind == reference_object_code then + return pdfreference(value[3]) + else + -- report("weird: %s", objecttypes[kind] or "?") + end + end + + copyarray = function(object) + local target = pdfarray() + local source = object.__raw__ + for i=1,#source do + target[i] = copyobject(object,i,source[i]) + end + return target + end + + copydictionary = function(object) + local target = pdfdictionary() + local source = object.__raw__ + for key, value in sortedhash(source) do + target[key] = copyobject(object,key,value) + end + return target + end + + get_flagged = function(t,f) + local kind = t.__type__ + if kind == name_object_code then + return pdfconstant(f) + elseif kind == array_object_code then + return copyarray(t) + elseif kind == dictionary_object_code then + return copydictionary(t) + elseif kind == stream_object_code then + return copydictionary(t) + elseif kind == string_object_code then + return pdfunicode(f) + elseif kind == null_object_code then + return pdfnull() + elseif kind == reference_object_code then + return pdfreference(t[3]) + else + return f + end + end + + function lpdf_epdf.verboseobject(document,n) + if document and n then + local object = document.objects[n] + if object then + local t = { n .. " 0 obj" } + if lpdf.epdf.objecttype(object) == "stream" then + t[#t+1] = object("dictionary")() + t[#t+1] = "stream" + t[#t+1] = tostring(object(true)) + t[#t+1] = "endstream" + else + t[#t+1] = tostring(object()) + end + t[#t+1] = "endobj" + return concat(t,"\n") + end + end + end + +else + + get_flagged = function(t,f) + return t[k] -- hm + end + +end + some_dictionary = function (d,document) local f = dictionarytotable(d,true) local t = setmetatable({ __raw__ = f, __type__ = dictionary_object_code }, { - __index = function(t,k) - return get_value(document,f,k) - end, - __call = function(t,k) - return get_flagged(t,f,k) - end, + __index = function(t,k) + return get_value(document,f,k) + end, + __call = function(t) + return get_flagged(t,f) + end, } ) return t, "dictionary" end @@ -245,8 +323,8 @@ some_array = function (a,document) __index = function(t,k) return get_value(document,f,k) end, - __call = function(t,k) - return get_flagged(t,f,k) + __call = function(t) + return get_flagged(t,f) end, __len = function(t,k) return n @@ -261,8 +339,10 @@ some_stream = function(s,d,document) __index = function(t,k) return get_value(document,f,k) end, - __call = function(t,raw) - if raw == false then + __call = function(t,how) + if how == "dictionary" then + return get_flagged(t,f) + elseif how == false then return readwholestream(s,false) -- original else return readwholestream(s,true) -- uncompressed @@ -293,6 +373,20 @@ some_reference = function(r,document) return cached end +local function some_object(document,n) + local kind, object, b, c = getfromobject(document.__data__,n) + if kind == dictionary_object_code then + return some_dictionary(object,document) + elseif kind == array_object_code then + return some_array(object,document) + elseif kind == stream_object_code then + return some_stream(object,b,document) + else + -- really cache this? + return { kind, object, b, c } + end +end + local resolvers = { } lpdf_epdf.resolvers = resolvers @@ -460,12 +554,14 @@ function lpdf_epdf.load(filename,userpassword,ownerpassword,fromstring) __data__ = false end if __data__ then + local __cache__ = { } + local __xrefs__ = { } document = { filename = filename, nofcopied = 0, copied = { }, - __cache__ = { }, - __xrefs__ = { }, + __cache__ = __cache__, + __xrefs__ = __xrefs__, __fonts__ = { }, __copied__ = { }, __data__ = __data__, @@ -479,6 +575,17 @@ function lpdf_epdf.load(filename,userpassword,ownerpassword,fromstring) document.majorversion, document.minorversion = getversion(__data__) -- document.nofpages = getnofpages(__data__) + -- we could also use cached but this proxy hides it + -- setmetatableindex(__cache__,function(t,objnum) + document.objects = setmetatableindex(function(t,objnum) + local cached = __cache__[objnum] + if not cached then + cached = some_object(document,objnum) + __cache__[objnum] = cached + __xrefs__[cached] = objnum + end + return cached + end) else document = false end @@ -1173,11 +1280,11 @@ if images then do end lpdf_epdf.image = { - open = openpdf, - close = closepdf, - new = newpdf, - query = querypdf, - copy = copypage, + open = openpdf, + close = closepdf, + new = newpdf, + query = querypdf, + copy = copypage, } -- lpdf.injectors.pdf = function(specification) diff --git a/tex/context/base/mkxl/mlib-lmp.lmt b/tex/context/base/mkxl/mlib-lmp.lmt index 5608488a3..01c72e4ba 100644 --- a/tex/context/base/mkxl/mlib-lmp.lmt +++ b/tex/context/base/mkxl/mlib-lmp.lmt @@ -403,6 +403,21 @@ do registerdirect("mode", function() injectboolean(modes [scanstring()] and true or false) end) registerdirect("systemmode", function() injectboolean(systemmodes[scanstring()] and true or false) end) + -- for compatibility reasons we keep this (metafun manual): + + local modes = tex.modes + local systemmodes = tex.systemmodes + + function mp.mode(s) + injectboolean(modes[s] and true or false) + end + + function mp.systemmode(s) + injectboolean(systemmodes[s] and true or false) + end + + mp.processingmode = mp.mode + end -- for alan's nodes: diff --git a/tex/context/base/mkxl/mlib-pdf.lmt b/tex/context/base/mkxl/mlib-pdf.lmt index ec13ef289..f537743aa 100644 --- a/tex/context/base/mkxl/mlib-pdf.lmt +++ b/tex/context/base/mkxl/mlib-pdf.lmt @@ -457,6 +457,7 @@ function metapost.flush(specification,result) local object = objects[o] if stack == object.stacking then local objecttype = object.type + -- print(i,o,stack,objecttype) if objecttype == "fill" or objecttype == "outline" then -- we use an indirect table as we want to overload -- entries but this is not possible in userdata diff --git a/tex/context/base/mkxl/page-mix.mkxl b/tex/context/base/mkxl/page-mix.mkxl index 446185e43..32af22114 100644 --- a/tex/context/base/mkxl/page-mix.mkxl +++ b/tex/context/base/mkxl/page-mix.mkxl @@ -580,6 +580,7 @@ \d_page_mix_max_width\dimexpr\d_page_mix_max_width-\leftskip-\rightskip\relax \d_page_mix_leftskip \leftskip \d_page_mix_rightskip\rightskip + % \frozen ? \leftskip \zeropoint \rightskip\zeropoint % diff --git a/tex/context/base/mkxl/spac-ali.mkxl b/tex/context/base/mkxl/spac-ali.mkxl index 3ad3dcb91..d6043b4da 100644 --- a/tex/context/base/mkxl/spac-ali.mkxl +++ b/tex/context/base/mkxl/spac-ali.mkxl @@ -718,6 +718,7 @@ \defcsname\??aligncommand\v!nothyphenated \endcsname{\toksapp\t_spac_align_collected{\nohyphens}} \defcsname\??aligncommand\v!collapsed \endcsname{\toksapp\t_spac_align_collected{\dohyphencollapsing}} \defcsname\??aligncommand\v!notcollapsed \endcsname{\toksapp\t_spac_align_collected{\nohyphencollapsing}} +\defcsname\??aligncommand\v!explicit \endcsname{\toksapp\t_spac_align_collected{\nohyphens\doexplicithyphens}} \defcsname\??aligncommand\v!tolerant \endcsname{\toksapp\t_spac_align_collected{\spac_align_set_tolerant}} \defcsname\??aligncommand\v!verytolerant \endcsname{\toksapp\t_spac_align_collected{\spac_align_set_very_tolerant}} @@ -872,7 +873,7 @@ \defcsname\??alignhorizontal\v!flushright\endcsname{\enforced\let\raggedbox\spac_align_horizontal_flushright} \defcsname\??alignhorizontal\v!center \endcsname{\enforced\let\raggedbox\spac_align_horizontal_center} -% The next one can be in use so we keep it around but oen should +% The next one can be in use so we keep it around but one should % be aware of possible interference. \permanent\protected\def\setraggedskips#1#2#3#4#5#6#7% never change this name (todo: inline this one .. less tracingall) diff --git a/tex/context/base/mkxl/strc-itm.mklx b/tex/context/base/mkxl/strc-itm.mklx index efead3d83..65df80f32 100644 --- a/tex/context/base/mkxl/strc-itm.mklx +++ b/tex/context/base/mkxl/strc-itm.mklx @@ -966,12 +966,12 @@ \let\startcollectitems\relax \let\stopcollectitems \relax -\letvalue{\??itemgroupalign\v!flushleft }\relax -\letvalue{\??itemgroupalign\v!right }\relax -\letvalue{\??itemgroupalign\v!flushright}\hfill -\letvalue{\??itemgroupalign\v!left }\hfill -\letvalue{\??itemgroupalign\v!middle }\hfil -\letvalue{\??itemgroupalign\v!center }\hfil +\letcsname\??itemgroupalign\v!flushleft \endcsname\relax +\letcsname\??itemgroupalign\v!right \endcsname\relax +\letcsname\??itemgroupalign\v!flushright\endcsname\hfill +\letcsname\??itemgroupalign\v!left \endcsname\hfill +\letcsname\??itemgroupalign\v!middle \endcsname\hfil +\letcsname\??itemgroupalign\v!center \endcsname\hfil \def\strc_itemgroups_left_sym_filler {\csname\??itemgroupalign\itemgroupparameter\c!symalign\endcsname} @@ -979,10 +979,10 @@ % symbols + states \def\strc_itemgroups_store_global_symbol#symbol% - {\letgvalue{\??itemgroupglobal\currentitemgroup:\currentitemlevel}#symbol} + {\gletcsname\??itemgroupglobal\currentitemgroup:\currentitemlevel\endcsname#symbol} \def\strc_itemgroups_store_local_symbol#symbol% - {\letgvalue{\??itemgrouplocal\currentitemgroup:\currentitemlevel}#symbol} + {\gletcsname\??itemgrouplocal\currentitemgroup:\currentitemlevel\endcsname#symbol} \def\strc_itemgroups_fetch_global_symbol {\csname\??itemgroupglobal\currentitemgroup:\currentitemlevel\endcsname} @@ -1336,13 +1336,13 @@ \protected\permanent\def\stopspecialitemgroupitem % todo: frozen {\stopitemgroupitem} -\letvalue{\??itemgroupstart\v!item}\strc_itemgroups_start_do_item -\letvalue{\??itemgroupstart\v!sub }\strc_itemgroups_start_subitem -\letvalue{\??itemgroupstart\v!sym }\strc_itemgroups_start_symbol -\letvalue{\??itemgroupstart\v!ran }\strc_itemgroups_start_edge -\letvalue{\??itemgroupstart\v!its }\strc_itemgroups_start_items -\letvalue{\??itemgroupstart\v!mar }\strc_itemgroups_start_margin -\letvalue{\??itemgroupstart\v!txt }\strc_itemgroups_start_text +\letcsname\??itemgroupstart\v!item\endcsname\strc_itemgroups_start_do_item +\letcsname\??itemgroupstart\v!sub \endcsname\strc_itemgroups_start_subitem +\letcsname\??itemgroupstart\v!sym \endcsname\strc_itemgroups_start_symbol +\letcsname\??itemgroupstart\v!ran \endcsname\strc_itemgroups_start_edge +\letcsname\??itemgroupstart\v!its \endcsname\strc_itemgroups_start_items +\letcsname\??itemgroupstart\v!mar \endcsname\strc_itemgroups_start_margin +\letcsname\??itemgroupstart\v!txt \endcsname\strc_itemgroups_start_text \def\strc_itemgroups_optimize_breaks {\ifcase\c_strc_itemgroups_column_depth diff --git a/tex/context/base/mkxl/strc-mar.mkxl b/tex/context/base/mkxl/strc-mar.mkxl index 9067b4924..fcce83173 100644 --- a/tex/context/base/mkxl/strc-mar.mkxl +++ b/tex/context/base/mkxl/strc-mar.mkxl @@ -93,14 +93,20 @@ {} \tolerant\def\strc_markings_get_yes[#1]#*[#2]#*[#3]% - {\ifcstok{\namedmarkingparameter{#1}\c!state}\v!start + {\ifarguments\orelse\ifcstok{\namedmarkingparameter{#1}\c!state}\v!start \begingroup \setsystemmode\v!marking \the\everymarking \ifparameter#3\or - \clf_getmarking{#1}{#2}{#3}% + \ifcstok{#2}\v!page + \markingcommand{#1}{\csname\??markingfilter#3\endcsname{#1}}% + \else + \markingcommand{#1}{\clf_getsynchronizedmarking\begincsname\??markingclass#1\endcsname{#2}{#3}}% + \fi + \orelse\ifparameter#2\or + \markingcommand{#1}{\csname\??markingfilter#2\endcsname{#1}}% \else - \clf_getmarking{#1}{\v!page}{#2}% + \markingcommand{#1}{\csname\??markingfilter\v!default\endcsname{#1}}% \fi \endgroup \fi} diff --git a/tex/context/base/mkxl/strc-not.lmt b/tex/context/base/mkxl/strc-not.lmt index df3b00d78..e05228b2b 100644 --- a/tex/context/base/mkxl/strc-not.lmt +++ b/tex/context/base/mkxl/strc-not.lmt @@ -509,9 +509,9 @@ local function check_spacing(index,slot) local pt = pn + pi local mt = mn + mi if trace_insert then - report_insert("%s %i: %p plus %p minus %p","always ",n,gn,pn,mn) - report_insert("%s %i: %p plus %p minus %p",i > 1 and "inbetween" or "before ",n,gi,pi,mi) - report_insert("%s %i: %p plus %p minus %p","effective",n,gt,pt,mt) + report_insert("%s %i: %p plus %p minus %p","always ",index,gn,pn,mn) + report_insert("%s %i: %p plus %p minus %p",slot > 1 and "inbetween" or "before ",index,gi,pi,mi) + report_insert("%s %i: %p plus %p minus %p","effective",index,gt,pt,mt) end return gt, pt, mt end diff --git a/tex/context/base/mkxl/typo-drp.lmt b/tex/context/base/mkxl/typo-drp.lmt index de65dd55d..c62b5e718 100644 --- a/tex/context/base/mkxl/typo-drp.lmt +++ b/tex/context/base/mkxl/typo-drp.lmt @@ -73,6 +73,7 @@ local v_default = variables.default local v_margin = variables.margin local v_auto = variables.auto local v_first = variables.first +local v_keep = variables.keep local v_last = variables.last local texget = tex.get @@ -130,6 +131,7 @@ interfaces.implement { -- a page so this has a low priority actions[v_default] = function(head,setting) + local skip = false -- begin of par local first = getnext(head) local indent = false @@ -193,6 +195,9 @@ actions[v_default] = function(head,setting) else -- keep quote etc with initial local next = getnext(first) + if next and method[v_keep] then + skip = first + end if not next then -- don't start with a quote or so return head @@ -242,7 +247,7 @@ actions[v_default] = function(head,setting) local id = getid(current) if id == kern_code then setkern(current,0) - elseif id == glyph_code then + elseif id == glyph_code and skip ~= current then local next = getnext(current) if font then setfont(current,font) @@ -289,7 +294,11 @@ actions[v_default] = function(head,setting) -- local hoffset = width + hoffset + distance + (indent and parindent or 0) for current in nextglyph, first do - setoffsets(current,-hoffset,-voffset) -- no longer - height here + if skip == current then + setoffsets(current,-hoffset,0) + else + setoffsets(current,-hoffset,-voffset) -- no longer - height here + end if current == last then break end diff --git a/tex/context/interface/mkii/cont-cs.xml b/tex/context/interface/mkii/cont-cs.xml index 8da159659..fc5e5aa0d 100644 --- a/tex/context/interface/mkii/cont-cs.xml +++ b/tex/context/interface/mkii/cont-cs.xml @@ -1,10396 +1,16 @@ - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/tex/context/interface/mkii/keys-cs.xml b/tex/context/interface/mkii/keys-cs.xml index 54178696b..89702c0c7 100644 --- a/tex/context/interface/mkii/keys-cs.xml +++ b/tex/context/interface/mkii/keys-cs.xml @@ -191,6 +191,7 @@ + diff --git a/tex/context/modules/mkiv/m-scite.mkiv b/tex/context/modules/mkiv/m-scite.mkiv index 659d5f58d..a34d4921c 100644 --- a/tex/context/modules/mkiv/m-scite.mkiv +++ b/tex/context/modules/mkiv/m-scite.mkiv @@ -102,9 +102,9 @@ local function exportcolors() local function black(f) return (f[1] == f[2]) and (f[2] == f[3]) and (f[3] == 0) end --- local result, r = { f_mapping }, 1 -local result, r = { }, 0 - for k, v in table.sortedhash(lexer.context.styles) do + -- local result, r = { f_mapping }, 1 + local result, r = { }, 0 + for k, v in table.sortedhash(lexers.styles) do local fore = v.fore if fore and not black(fore) then r = r + 1 @@ -113,7 +113,7 @@ local result, r = { }, 0 end r = r + 1 result[r] = "%" - for k, v in table.sortedhash(lexer.context.styles) do + for k, v in table.sortedhash(lexers.styles) do local bold = v.bold local fore = v.fore r = r + 1 @@ -145,7 +145,7 @@ local function exportwhites() end local function exportstyled(lexer,text) - local result = lexer.lex(lexer,text,0) + local result = lexers.lex(lexer,text,0) local start = 1 local whites = exportwhites() local buffer = { } diff --git a/tex/context/modules/mkxl/m-openstreetmap.lmt b/tex/context/modules/mkxl/m-openstreetmap.lmt index 2116ae236..39a1d34d4 100644 --- a/tex/context/modules/mkxl/m-openstreetmap.lmt +++ b/tex/context/modules/mkxl/m-openstreetmap.lmt @@ -31,7 +31,7 @@ local report = logs.reporter("openstreetmap") -- -- https://github.com/openstreetmap/osm2pgsql/blob/master/docs/lua.md -- --- I'm not sure where the script is used, and there are dead linsk on these pages but some +-- I'm not sure where the script is used, and there are dead links on these pages but some -- information can be found in that file so I could combine our findings with these. There -- is a whole infrastructure out there with impressive machinery, style sheet generation -- etc. but we don't need that here. Also, we don't need to play routes. @@ -181,27 +181,71 @@ local colors = { -- these concern details: amenity = { - arts_centre = true, - bar = true, - bicycle_parking = true, - college = true, - courthouse = true, - fountain = true, - hospital = true, - kindergarten = true, - marketplace = true, - parking = true, - parking_space = true, - pharmacy = true, - place_of_worship = true, - police = true, - restaurant = true, - school = true, - shower = true, - social_facility = true, - toilets = true, - townhall = true, - university = true, + arts_centre = true, + bar = true, + bicycle_parking = true, + college = true, + courthouse = true, + fountain = true, + hospital = true, + kindergarten = true, + marketplace = true, + parking = true, + parking_space = true, + pharmacy = true, + place_of_worship = true, + police = true, + restaurant = true, + school = true, + shower = true, + social_facility = true, + toilets = true, + townhall = true, + + -- university = true, -- no, it will mark all red .. maybe some other color so we need stacking + + -- atm = true, + bank = true, + -- bbq = true, + bicycle_parking = true, + bicycle_repair_station = true, + cafe = true, + -- car_sharing = true, + car_wash = true, + -- charging_station = true, + childcare = true, + clinic = true, + -- clock = true, + clubhouse = true, + college = true, + community_centre = true, + -- compressed_air = true, + computer_lab = true, + -- drinking_water = true, + events_venue = true, + fast_food = true, + fire_station = true, + fountain = true, + fuel = true, + -- ice_cream = true, + library = true, + mailroom = true, + -- microwave = true, + -- parking_entrance = true, + -- parking_space = true, + pharmacy = true, + place_of_worship = true, + -- post_box = true, + post_office = true, + recycling = true, + research_institute = true, + -- social_facility = true, + theatre = true, + -- vending_machine = true, + -- waste_basket = true, + -- waste_disposal = true, + wellness_centre = true, + }, -- these are basic: @@ -235,6 +279,21 @@ local colors = { shed = true, townhall = true, yes = true, + + university = true, + dormitory = true, + barn = true, + bridge = true, + detached = true, + farm_auxiliary = true, + grandstand = true, + greenhouse = true, + kindergarten = true, + parking = true, + stable = true, + stadium = true, + toilets = true, + }, emergency = { designated = true, @@ -501,7 +560,8 @@ local f_nodraw_s = formatters['ND %--t;'] local f_nofill_s = formatters['NF %--t--C;'] local f_background = formatters['F %--t -- C W "osm:background";'] -local f_bounds = formatters['setbounds currentpicture to %--t--C ;'] +local f_bounds = formatters['setbounds currentpicture to %--t--C withstacking (0,250);'] +local f_clipped = formatters['clip currentpicture to %--t--C withstacking (0,250);'] -- For now no labels are printed, also because that's now what we use this for. At -- some point I will provide some hooks to put text at coordinates. @@ -622,8 +682,14 @@ function openstreetmap.convert(specification) local deg_to_rad = math.pi / 180.0 local scale = 3600 -- vertical scale: 1" = 1cm + -- local function f_pair(lon, lat) + -- return formatters("(%.3Ncm,%.3Ncm)", (lon - minlon) * scale * cos(midlat * deg_to_rad), (lat-minlat) * scale) + -- end + + local f_f_pair = formatters["(%.3Ncm,%.3Ncm)"] + local function f_pair(lon, lat) - return formatters("(%.3Ncm,%.3Ncm)", (lon - minlon) * scale * cos(midlat * deg_to_rad), (lat-minlat) * scale) + return f_f_pair((lon - minlon) * scale * cos(midlat * deg_to_rad), (lat-minlat) * scale) end local rendering = table.tohash(order) @@ -748,7 +814,7 @@ function openstreetmap.convert(specification) end end - -- There are ways and relations. Relations can have members that poitn to + -- There are ways and relations. Relations can have members that point to -- ways but also relations. My impression is that we can stick to way members -- but I'll deal with that when needed. @@ -834,7 +900,7 @@ function openstreetmap.convert(specification) -- We add a background first and clip later. Beware: There can be substantial bits -- outside the clip path (like rivers) but because paths are not that detailed we - -- don't wast time on building a cycle. We could check if points are ouside the + -- don't waste time on building a cycle. We could check if points are outside the -- boundingbox and then use the metapost buildpath macro .. some day. local boundary = { @@ -864,6 +930,8 @@ function openstreetmap.convert(specification) if collected then + local f_flush = formatters[') W "%s" L %s;'] + for stacking, colors in sortedhash(collected) do for color, bunch in next, colors do local draw = bunch.draw @@ -872,20 +940,21 @@ function openstreetmap.convert(specification) r = r + 1 result[r] = "draw image (" r = r + 1 result[r] = concat(fill) r = r + 1 result[r] = 'DF origin--cycle;' - r = r + 1 result[r] = formatters[') W "%s" L %s;'](color,stacking) ; + r = r + 1 result[r] = f_flush(color,stacking) ; end if draw and #draw > 0 then r = r + 1 result[r] = "draw image (" r = r + 1 result[r] = concat(draw) r = r + 1 result[r] = 'DD origin;' - r = r + 1 result[r] = formatters[') W "%s" L %s;'](color,stacking+1) ; + r = r + 1 result[r] = f_flush(color,stacking+1) ; end end end end - r = r + 1 result[r] = f_bounds(boundary) +-- r = r + 1 result[r] = f_bounds(boundary) + r = r + 1 result[r] = f_clipped(boundary) r = r + 1 result[r] = endmp if missing then diff --git a/tex/context/modules/mkxl/m-openstreetmap.mkxl b/tex/context/modules/mkxl/m-openstreetmap.mkxl index 677a5a04d..f663bfd36 100644 --- a/tex/context/modules/mkxl/m-openstreetmap.mkxl +++ b/tex/context/modules/mkxl/m-openstreetmap.mkxl @@ -37,6 +37,8 @@ \definecolor [osm:residential] [s=.75] \definecolor [osm:cemetery] [s=.50] +\definecolor [osm:university] [s=.85] + \definecolor [osm:boat] [b=.25] \definecolor [osm:water] [b=.75] @@ -93,7 +95,34 @@ \definecolor[osm:amenity:social_facility] [osm:building:special] \definecolor[osm:amenity:toilets] [osm:building:special] \definecolor[osm:amenity:townhall] [osm:building:special] -\definecolor[osm:amenity:university] [osm:building:special] + +\definecolor[osm:amenity:university] [osm:university] % what color ... (obscures buildings) + +\definecolor[osm-amenity:bank] [osm:building:special] +\definecolor[osm-amenity:bicycle_parking] [osm:building:special] +\definecolor[osm-amenity:bicycle_repair_station] [osm:building:special] +\definecolor[osm-amenity:cafe] [osm:building:special] +\definecolor[osm-amenity:car_wash] [osm:building:special] +\definecolor[osm-amenity:childcare] [osm:building:special] +\definecolor[osm-amenity:clinic] [osm:building:special] +\definecolor[osm-amenity:clubhouse] [osm:building:special] +\definecolor[osm-amenity:college] [osm:building:special] +\definecolor[osm-amenity:community_centre] [osm:building:special] +\definecolor[osm-amenity:computer_lab] [osm:building:special] +\definecolor[osm-amenity:events_venue] [osm:building:special] +\definecolor[osm-amenity:fast_food] [osm:building:special] +\definecolor[osm-amenity:fire_station] [osm:building:special] +\definecolor[osm-amenity:fountain] [osm:building:special] +\definecolor[osm-amenity:fuel] [osm:building:special] +\definecolor[osm-amenity:library] [osm:building:special] +\definecolor[osm-amenity:mailroom] [osm:building:special] +\definecolor[osm-amenity:pharmacy] [osm:building:special] +\definecolor[osm-amenity:place_of_worship] [osm:building:special] +\definecolor[osm-amenity:post_office] [osm:building:special] +\definecolor[osm-amenity:recycling] [osm:building:special] +\definecolor[osm-amenity:research_institute] [osm:building:special] +\definecolor[osm-amenity:theatre] [osm:building:special] +\definecolor[osm-amenity:wellness_centre] [osm:building:special] \definecolor[osm:area:yes] [osm:unknown] @@ -143,6 +172,20 @@ \definecolor[osm:building:townhall] [osm:building] \definecolor[osm:building:yes] [osm:building] +\definecolor[osm:building:university] [osm:building] +\definecolor[osm:building:dormitory] [osm:building] +\definecolor[osm:building:barn] [osm:building] +\definecolor[osm:building:bridge] [osm:building:special] +\definecolor[osm:building:detached] [osm:building] +\definecolor[osm:building:farm_auxiliary] [osm:building] +\definecolor[osm:building:grandstand] [osm:building] +\definecolor[osm:building:greenhouse] [osm:building:special] +\definecolor[osm:building:kindergarten] [osm:building] +\definecolor[osm:building:parking] [osm:building:special] +\definecolor[osm:building:stable] [osm:building] +\definecolor[osm:building:stadium] [osm:building:special] +\definecolor[osm:building:toilets] [osm:building:special] + \definecolor[osm:emergency:designated] [osm:unknown] \definecolor[osm:emergency:destination] [osm:unknown] \definecolor[osm:emergency:no] [osm:unknown] @@ -287,9 +330,10 @@ \startMPpage draw lmt_openstreetmap [ - filename = "hasselt.osm" +% filename = "hasselt.osm" + filename = "e:/tmp/map.osm" used = [ - boundary = false, + university = false, ], ] ; \stopMPpage diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index ceb9fce8c..02f89ada1 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 : 2021-09-26 16:48 +-- merge date : 2021-10-08 20:05 do -- begin closure to overcome local limits and interference @@ -12633,6 +12633,7 @@ local function getinfo(maindata,sub,platformnames,rawfamilynames,metricstoo,inst pfmwidth=metrics.widthclass or 5, panosewidth=metrics.panosewidth, panoseweight=metrics.panoseweight, + fstype=metrics.fstype or 0, italicangle=postscript.italicangle or 0, units=fontheader.units or 0, designsize=fontdata.designsize, -- cgit v1.2.3