0 Eˆ×Öæ 536˾ãE‹Å”Q¯Ò0Çß裡}ð�•Á.&ÜnæÊH$r�p1Ƴtk·6Œv¶Å]üôv s¹ ¢Æèò­ýŸÿÎïœîàgñ|´z¿ƒ×«»)X¼}5�Œì ô®?B(^ÅíFàu}„Æ3 ·¶"T×µW÷=¥ ´Z"n7e€ŒÕ"³µFW¸Y‹®æŒPwØ [²h"){*Hm­”9gS± šTüS‰ wN4£ { ›ªd£6Ö¹¡ƒNÝ5_ñÿÐÑî“"éÞ¸yÔ¶|&¥(d­ª`„ŦFg!D"SÒ ´$rí"‡€”6„&£ùG§C–7Ñ&€k–‡ðå(œÝÌÃ[ÍȆaDNkîZÍ” 6ŠŠ\0zV|ïÄ1ŒîÅ—ó†qk3“iQY¡ä£9ÄcÔL•¦"ŽõÚp}¬j%ôR5Hö¤‹Ûåx¶Š'˶$´±xÌîgý�ÑÂ5HZ Í2«ôî�vëñ\¦¦ºùö IiQp #:à¤ò7H¶r-U-�a\¡NbäD”&y’+� J™ôt £“ËÇßeÝëößïô^€î`xÝàœ0ü¼­$[Ë]ODF,£O!ܼ„Ú T¿; ‚³¨Á û/Qm­’œ4§-±jÍdÒ8SawIÆ™;Ù ñeÍß÷=ÿÍyð_üeÑa˜a´Žµ#ø+dÅ™ºå5Gˆl–Ü4ý(Ð;�½p-©‹Fÿ�þBócY¸ÈVÚ £r2ùè ƒpLµç¿äZGif not modules then modules = { } end modules ['back-res'] = { version = 1.001, comment = "companion to back-ini.mkiv", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", copyright = "PRAGMA ADE / ConTeXt Development Team", license = "see context related readme files" } local context = context local trace = false trackers.register("backend", function(v) trace = v end) local report = logs.reporter("backend") local scanners = tokens.scanners local scankeyword = scanners.keyword local scaninteger = scanners.integer local scanstring = scanners.string local scandimension = scanners.dimension local scanword = scanners.word local scanwhd = scanners.whd local implement = interfaces.implement local constants = interfaces.constants local variables = interfaces.variables -- A box resource has an index. This happens to be an object number due to the pdf -- backend but in fact it's an abstraction. This is why we have explicit fetchers. -- The internal number (as in \Fm123) is yet another number. local tex_saveboxresource = tex.saveboxresource local tex_useboxresource = tex.useboxresource local tex_getboxresourcebox = tex.getboxresourcebox local tex_getboxresourcedimensions = tex.getboxresourcedimensions updaters.register("backend.update",function() tex_saveboxresource = tex.saveboxresource tex_useboxresource = tex.useboxresource tex_getboxresourcebox = tex.getboxresourcebox tex_getboxresourcedimensions = tex.getboxresourcedimensions end) local savebox = function(...) return tex_saveboxresource(...) end local usebox = function(...) return tex_useboxresource(...) end local getbox = function(...) return tex_getboxresourcebox(...) end local getwhd = function(...) return tex_getboxresourcedimensions(...) end local boxresources = { save = savebox, use = usebox, getbox = getbox, getdimensions = getwhd, } tex.boxresources = boxresources local lastindex = 0 local function saveboxresource() local immediate = true local kind = scankeyword("type") and scaninteger() or 0 local attributes = scankeyword("attr") and scanstring() or nil local resources = scankeyword("resources") and scanstring() or nil local margin = scankeyword("margin") and scandimension() or 0 -- register local boxnumber = scaninteger() -- lastindex = savebox(boxnumber,attributes,resources,immediate,kind,margin) if trace then report("\\saveboxresource: index %i",lastindex) end end local function lastsavedboxresourceindex() if trace then report("\\lastsaveboxresource: index %i",lastindex) end context("%i",lastindex) end local function useboxresource() local width, height, depth = scanwhd() local index = scaninteger() local node = usebox(index,width,height,depth) if trace then report("\\useboxresource: index %i",index) end context(node) end implement { name = "saveboxresource", actions = saveboxresource } implement { name = "lastsavedboxresourceindex", actions = lastsavedboxresourceindex } implement { name = "useboxresource", actions = useboxresource } -- image resources local imageresources = { } local lastindex = 0 local lastpages = 1 local function saveimageresource() local width, height, depth =