diff options
Diffstat (limited to 'tex')
40 files changed, 1874 insertions, 440 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index a28d32bd4..6c083cd0b 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.02.20 16:46} +\newcontextversion{2021.02.23 17:41} %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 845a90e47..4b20c792e 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.02.20 16:46} +\edef\contextversion{2021.02.23 17:41} %D For those who want to use this: diff --git a/tex/context/base/mkiv/colo-icc.lua b/tex/context/base/mkiv/colo-icc.lua index 06a913e17..f523e870e 100644 --- a/tex/context/base/mkiv/colo-icc.lua +++ b/tex/context/base/mkiv/colo-icc.lua @@ -119,3 +119,110 @@ function colors.iccprofile(filename,verbose) report_colors("profile %a loaded",fullname) return profile, true end + +-- This is just some fun stuff I decided to check out when I was making sure that +-- the 2020 metafun manual could be processed with lmtx 2021. Color conversion has +-- been part of ConTeXt from the start but it has been extended to the less commonly +-- used color spaces. We already do some CIE but didn't have lab converters to play +-- with (although I had some MetaPost done for a friend long ago). So, when we moved +-- to lmtx it made sense to also move some into the core. When searching for info +-- I ran into some formulas for lab/xyz: http://www.easyrgb.com/en/math.php and +-- http://www.brucelindbloom.com/ are useful resources. I didn't touch existing +-- code (as it works ok). +-- +-- local illuminants = { -- 2=CIE 1931 10=CIE 1964 +-- A = { [2] = { 109.850, 100, 35.585 }, [10] = { 111.144, 100, 35.200 } }, -- incandescent/tungsten +-- B = { [2] = { 99.093, 100, 85.313 }, [10] = { 99.178, 100, 84.349 } }, -- old direct sunlight at noon +-- C = { [2] = { 98.074, 100, 118.232 }, [10] = { 97.285, 100, 116.145 } }, -- old daylight +-- D50 = { [2] = { 96.422, 100, 82.521 }, [10] = { 96.720, 100, 81.427 } }, -- icc profile pcs +-- D55 = { [2] = { 95.682, 100, 92.149 }, [10] = { 95.799, 100, 90.926 } }, -- mid-morning daylight +-- D65 = { [2] = { 95.047, 100, 108.883 }, [10] = { 94.811, 100, 107.304 } }, -- daylight, srgb, adobe-rgb +-- D75 = { [2] = { 94.972, 100, 122.638 }, [10] = { 94.416, 100, 120.641 } }, -- north sky daylight +-- E = { [2] = { 100.000, 100, 100.000 }, [10] = { 100.000, 100, 100.000 } }, -- equal energy +-- F1 = { [2] = { 92.834, 100, 103.665 }, [10] = { 94.791, 100, 103.191 } }, -- daylight fluorescent +-- F2 = { [2] = { 99.187, 100, 67.395 }, [10] = { 103.280, 100, 69.026 } }, -- cool fluorescent +-- F3 = { [2] = { 103.754, 100, 49.861 }, [10] = { 108.968, 100, 51.965 } }, -- white fluorescent +-- F4 = { [2] = { 109.147, 100, 38.813 }, [10] = { 114.961, 100, 40.963 } }, -- warm white fluorescent +-- F5 = { [2] = { 90.872, 100, 98.723 }, [10] = { 93.369, 100, 98.636 } }, -- daylight fluorescent +-- F6 = { [2] = { 97.309, 100, 60.191 }, [10] = { 102.148, 100, 62.074 } }, -- lite white fluorescent +-- F7 = { [2] = { 95.044, 100, 108.755 }, [10] = { 95.792, 100, 107.687 } }, -- daylight fluorescent, d65 simulator +-- F8 = { [2] = { 96.413, 100, 82.333 }, [10] = { 97.115, 100, 81.135 } }, -- sylvania f40, d50 simulator +-- F9 = { [2] = { 100.365, 100, 67.868 }, [10] = { 102.116, 100, 67.826 } }, -- cool white fluorescent +-- F10 = { [2] = { 96.174, 100, 81.712 }, [10] = { 99.001, 100, 83.134 } }, -- ultralume 50, philips tl85 +-- F11 = { [2] = { 100.966, 100, 64.370 }, [10] = { 103.866, 100, 65.627 } }, -- ultralume 40, philips tl84 +-- F12 = { [2] = { 108.046, 100, 39.228 }, [10] = { 111.428, 100, 40.353 } }, -- ultralume 30, philips tl83 +-- } +-- +-- local D65 = illuminants.D65 +-- local D652 = { 95.047, 100, 108.883 } +-- +-- local function labref(illuminate,observer) +-- local r = illuminants[illuminant or "D65"] or D65 +-- return r[observer or 2] or r[2] or D652 +-- end +-- +-- This is hardly useful but nice for metafun demos: + +local D652 = { 95.047, 100, 108.883 } + +local function xyztolab(x,y,z,mapping) + if not mapping then + mapping = D652 + end + x = x / mapping[1] + y = y / mapping[2] + z = z / mapping[3] + x = (x > 0.008856) and x^(1/3) or (7.787 * x) + (16/116) + y = (y > 0.008856) and y^(1/3) or (7.787 * y) + (16/116) + z = (z > 0.008856) and z^(1/3) or (7.787 * z) + (16/116) + return + 116 * y - 16, + 500 * (x - y), + 200 * (y - z) +end + +local function labtoxyz(l,a,b,mapping) + if not mapping then + mapping = D652 + end + local y = (l + 16) / 116 + local x = a / 500 + y + local z = y - b / 200 + return + mapping[1] * ((x^3 > 0.008856) and x^3 or (x - 16/116) / 7.787), + mapping[2] * ((y^3 > 0.008856) and y^3 or (y - 16/116) / 7.787), + mapping[3] * ((z^3 > 0.008856) and z^3 or (z - 16/116) / 7.787) +end + +local function xyztorgb(x,y,z) -- D65/2° + local r = (x * 3.2404542 + y * -1.5371385 + z * -0.4985314) / 100 + local g = (x * -0.9692660 + y * 1.8760108 + z * 0.0415560) / 100 + local b = (x * 0.0556434 + y * -0.2040259 + z * 1.0572252) / 100 + r = (r > 0.0031308) and (1.055 * r^(1/2.4) - 0.055) or (12.92 * r) + g = (g > 0.0031308) and (1.055 * g^(1/2.4) - 0.055) or (12.92 * g) + b = (b > 0.0031308) and (1.055 * b^(1/2.4) - 0.055) or (12.92 * b) + if r < 0 then r = 0 elseif r > 1 then r = 1 end + if g < 0 then g = 0 elseif g > 1 then g = 1 end + if b < 0 then b = 0 elseif b > 1 then b = 1 end + return r, g, b +end + +local function rgbtoxyz(r,g,b) + r = 100 * ((r > 0.04045) and ((r + 0.055)/1.055)^2.4 or (r / 12.92)) + g = 100 * ((g > 0.04045) and ((g + 0.055)/1.055)^2.4 or (g / 12.92)) + b = 100 * ((b > 0.04045) and ((b + 0.055)/1.055)^2.4 or (b / 12.92)) + return + r * 0.4124 + g * 0.3576 + b * 0.1805, + r * 0.2126 + g * 0.7152 + b * 0.0722, + r * 0.0193 + g * 0.1192 + b * 0.9505 +end + +local function labtorgb(l,a,b,mapping) + return xyztorgb(labtoxyz(l,a,b,mapping)) +end + +colors.xyztolab = xyztolab +colors.labtoxyz = labtoxyz +colors.xyztorgb = xyztorgb +colors.rgbtoxyz = rgbtoxyz +colors.labtorgb = labtorgb diff --git a/tex/context/base/mkiv/cont-log.mkiv b/tex/context/base/mkiv/cont-log.mkiv index 3dbfdc604..a6cd1cc2f 100644 --- a/tex/context/base/mkiv/cont-log.mkiv +++ b/tex/context/base/mkiv/cont-log.mkiv @@ -149,25 +149,29 @@ \def\syst_logos_meta_hyphen % there is no hyphenchar in this font {\discretionary{\vrule\s!height.33\emwidth\s!depth-.27\emwidth\s!width.33\emwidth}{}{}} -\unexpanded\def\MetaFont +\unexpanded\def\MetaFontLogo {\dontleavehmode \begingroup \setMFPfont META\syst_logos_meta_hyphen FONT% \endgroup} -% \unexpanded\def\MetaPost +\unexpanded\def\MetaPostLogo + {\dontleavehmode + \begingroup + \setMFPfont META\syst_logos_meta_hyphen POST% + \endgroup} + +% \protected\def\MetaFunLogo % {\dontleavehmode % \begingroup -% \setMFPfont META\syst_logos_meta_hyphen POST% +% \setMFPfont META\syst_logos_meta_hyphen FUN% % \endgroup} -% -% As decided on the ConText Meeting 2013 the logo has been simplified: -\unexpanded\def\MetaPost - {MetaPost} +% As decided on the ConText Meeting 2013 the logo has been simplified: -\unexpanded\def\MetaFun - {MetaFun} +\unexpanded\def\MetaFont{MetaFont} +\unexpanded\def\MetaPost{MetaPost} +\unexpanded\def\MetaFun {MetaFun} %D \macros %D {TEX, METAFONT, METAPOST, METAFUN, diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index 9569ad872..60bb0d85d 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.02.20 16:46} +\newcontextversion{2021.02.23 17:41} %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 bcb398971..b5d86869c 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.02.20 16:46} +\edef\contextversion{2021.02.23 17:41} %D Kind of special: diff --git a/tex/context/base/mkiv/data-fil.lua b/tex/context/base/mkiv/data-fil.lua index bbcc954b2..8dbc8a0d2 100644 --- a/tex/context/base/mkiv/data-fil.lua +++ b/tex/context/base/mkiv/data-fil.lua @@ -22,7 +22,7 @@ local appendhash = resolvers.appendhash local loadcachecontent = caches.loadcontent -local checkgarbage = utilities.garbagecollector and utilities.garbagecollector.check +----- checkgarbage = utilities.garbagecollector and utilities.garbagecollector.check function resolvers.locators.file(specification) local filename = specification.filename @@ -128,9 +128,9 @@ function loaders.file(specification,filetype) report_files("file loader: %a loaded",filename) end local s = f:read("*a") -- io.readall(f) is faster but we never have large files here - if checkgarbage then - checkgarbage(#s) - end + -- if checkgarbage then + -- checkgarbage(#s) + -- end f:close() if s then return true, s, #s diff --git a/tex/context/base/mkiv/data-tmp.lua b/tex/context/base/mkiv/data-tmp.lua index 9b0117c15..9a8a586cd 100644 --- a/tex/context/base/mkiv/data-tmp.lua +++ b/tex/context/base/mkiv/data-tmp.lua @@ -324,7 +324,11 @@ caches.setluanames = setluanames -- -- runtime files like fonts are written to the writable cache anyway +local checkmemory = utilities and utilities.lua and utilities.lua.checkmemory +local threshold = 100 -- MB + function caches.loaddata(readables,name,writable) + local used = checkmemory and checkmemory() if type(readables) == "string" then readables = { readables } end @@ -352,7 +356,11 @@ function caches.loaddata(readables,name,writable) end if loader then loader = loader() - collectgarbage("step") + if checkmemory then + checkmemory(used,threshold) + else -- generic + collectgarbage("step") -- option, really slows down! + end return loader end end diff --git a/tex/context/base/mkiv/lang-def.mkiv b/tex/context/base/mkiv/lang-def.mkiv index f74fb5339..85c1f3ac7 100644 --- a/tex/context/base/mkiv/lang-def.mkiv +++ b/tex/context/base/mkiv/lang-def.mkiv @@ -309,8 +309,55 @@ \c!date={\v!day,\space,\v!month,\space,\v!year}, \s!patterns=\s!uk] -\installlanguage [\s!russian] [\s!ru] -\installlanguage [\s!ukrainian] [\s!ua] +\installlanguage + [\s!be] + [\s!lefthyphenmin=2, + \s!righthyphenmin=2, + \c!spacing=\v!packed, + \c!leftsentence=\leftguillemot, + \c!rightsentence=\rightguillemot, + \c!leftsubsentence=\lowerleftdoubleninequote, + \c!rightsubsentence=\upperrightdoublesixquote, + \c!leftquote=\lowerleftdoubleninequote, + \c!rightquote=\upperrightdoublesixquote, + \c!leftquotation=\leftguillemot, + \c!rightquotation=\rightguillemot, + \c!date={\v!day,\space,\v!month,\space,\v!year}] + + \installlanguage + [\s!sr] + [\c!spacing=\v!packed, + \c!leftsentence=\hbox{\endash\space}, + \c!rightsentence=\hbox{\space\endash}, + \c!leftsubsentence=\endash, + \c!rightsubsentence=\endash, + \c!leftquote=\upperrightsingleninequote, + \c!rightquote=\upperrightsingleninequote, + \c!leftquotation=\lowerleftdoubleninequote, + \c!rightquotation=\upperleftdoubleninequote, + \c!date={\v!day,{.},\space,\v!month,\space,\v!year}] + +\installlanguage + [\s!mk] + [\c!spacing=\v!packed, + \c!leftsentence=\endash, + \c!rightsentence=\endash, + \c!leftsubsentence=\endash, + \c!rightsubsentence=\endash, + \c!leftquote=\upperleftsingleninequote, + \c!rightquote=\upperrightsinglesixquote, + \c!leftquotation=\lowerleftdoubleninequote, + \c!rightquotation=\upperrightdoublesixquote, + \c!date={\v!day,\space,\v!month,\space,\v!year}] + +\installlanguage [\s!russian] [\s!ru] +\installlanguage [\s!ukrainian] [\s!ua] +\installlanguage [\s!belarussian][\s!be] +\installlanguage [\s!serbian] [\s!sr] +\installlanguage [\s!sr-latn] [\s!sr] +\installlanguage [\s!sr-cyrl] [\s!sr] +\installlanguage [\s!macedonian] [\s!mk] + % Uralic Languages: Cheremiss, Estonian, Finnish, Karelian, Laap, % Mordvinian, Permian tongues, Hungarian, Ostyak, Vogul, Samoyed diff --git a/tex/context/base/mkiv/lang-txt.lua b/tex/context/base/mkiv/lang-txt.lua index e6ec11c32..026abbd0e 100644 --- a/tex/context/base/mkiv/lang-txt.lua +++ b/tex/context/base/mkiv/lang-txt.lua @@ -18,6 +18,8 @@ if not modules then modules = { } end modules ['lang-txt'] = { -- -- af Afrikaans ... -- ar Arabic Idris Samawi Hamid, Khaled Hosny +-- be Belarussian Darya Hryshkavets (2019) +-- bg Bulgarian Vladislav Hinkin, Aleš Ďurčanský (2019) -- ca Catalan ... -- cn Chinese Wang Lei, ... -- cs Czech Tom Hudec, Petr Sojka, Richard Gabriel @@ -25,7 +27,7 @@ if not modules then modules = { } end modules ['lang-txt'] = { -- de German Tobias Burnus, ... -- en English Hans Hagen, ... -- es Spanish Andrés Montoya, ... --- et Estonian Clyde Johnston +-- et Estonian Clyde Johnston (2018) -- fi Finish ... -- fr French Daniel Flipo, Arthur Reutenauer -- gr Greek Apostolos Syropoulos, Thomas Schmitz @@ -36,17 +38,19 @@ if not modules then modules = { } end modules ['lang-txt'] = { -- kr Korean Jeong Dalyoung -- la Latin ... -- lt Lithuanian Marius Aleknevičius --- mk Macedonian Jakub Loula, Tomáš Hála (2019), Stojan Trajanovski +-- mk Macedonian Jakub Loula, Tomáš Hála (2019), Stojan Trajanovski (2019) -- nb Norwegian Hans Fredrik Nordhaug, ... -- nn Norwegian Hans Fredrik Nordhaug, ... -- nl Dutch Hans Hagen --- pe Persian Mohammad Hossein Bateni --- pl Polish Grzegorz Sapijaszko +-- pe Persian Mohammad Hossein Bateni (2016) +-- pl Polish Grzegorz Sapijaszko (2011) -- pt Portuguese Pedro F. M. Mendonça -- ro Romanian Dan Seracu, ... -- ru Russian Olga Briginets, Alexander Bokovoy, Victor Figurnov, ... -- sk Slovak Tomáš Hála (2012) -- sl Slovenian Mojca Miklavec +-- sr Serbian Ivan Pešić (2020) +-- sr-latn Serbian Ivan Pešić (2020) -- sv Swedish ... -- tk Turkish Tobias Burnus -- tr Turkmen Nazar Annagurban @@ -71,35 +75,49 @@ data.labels={ ["btx"]={ ["In"]={ ["labels"]={ + ["be"]="У", + ["bg"]="в", ["en"]="In", ["es"]="En", ["fr"]="Dans", ["mk"]="во", ["pe"]="در", + ["sr"]="У", + ["sr-latn"]="U", }, }, ["Number"]={ ["labels"]={ + ["be"]="Нумар", + ["bg"]="номер", ["de"]="Numer", ["en"]="Number", ["fr"]="Numéro", ["mk"]="Број", ["nl"]="Nummer", ["pe"]="شماره", + ["sr"]="Број", + ["sr-latn"]="Broj", }, }, ["Volume"]={ ["labels"]={ + ["be"]="Гук", + ["bg"]="обем", ["de"]="Band", ["en"]="Volume", ["et"]="Köide", ["mk"]="Том", ["nl"]="Deel", ["pe"]="جلد", + ["sr"]="Том", + ["sr-latn"]="Tom", }, }, ["and"]={ ["labels"]={ + ["be"]="i", + ["bg"]="a", ["de"]="und", ["en"]="and", ["es"]="y", @@ -109,10 +127,14 @@ data.labels={ ["mk"]="и", ["nl"]="en", ["pe"]="و", + ["sr"]="и", + ["sr-latn"]="i", }, }, ["edition"]={ ["labels"]={ + ["be"]="Выданне", + ["bg"]="издание", ["de"]="Auflage", ["en"]="edition", ["es"]="edición", @@ -122,10 +144,14 @@ data.labels={ ["mk"]="издание", ["nl"]="editie", ["pe"]="ویرایش", + ["sr"]="издање", + ["sr-latn"]="izdanje", }, }, ["editor"]={ ["labels"]={ + ["be"]="Рэдактар", + ["bg"]="редактор", ["de"]="Herausgeber", ["en"]="editor", ["et"]="toimetaja", @@ -133,10 +159,14 @@ data.labels={ ["it"]="a cura di", ["mk"]="уредник", ["pe"]="ویراستار", + ["sr"]="уредник", + ["sr-latn"]="urednik", }, }, ["editors"]={ ["labels"]={ + ["be"]="Рэдактары", + ["bg"]="редактори", ["de"]="Herausgeber", ["en"]="editors", ["es"]="editores", @@ -144,20 +174,27 @@ data.labels={ ["fr"]="éditeurs", ["it"]="a cura di", ["mk"]="уредници", - + ["sr"]="уредници", + ["sr-latn"]="urednici", }, }, ["in"]={ ["labels"]={ + ["be"]="у", + ["bg"]="в", ["en"]="in", ["es"]="en", ["fr"]="dans", ["mk"]="во", ["pe"]="در", + ["sr"]="у", + ["sr-latn"]="u", }, }, ["mastersthesis"]={ ["labels"]={ + ["be"]="Дыпломная работа", + ["bg"]="дипломна работа", ["de"]="Masterarbeit", ["en"]="Master's thesis", ["es"]="Tesis de maestría", @@ -167,55 +204,76 @@ data.labels={ ["mk"]="Магистерска дисертација", ["nl"]="Masterproef", ["pe"]="پایاننامه کارشناسی ارشد", + ["sr"]="Мастер дисертација", + ["sr-latn"]="Master disertacija", }, }, ["number"]={ ["labels"]={ + ["be"]="нумар", + ["bg"]="номер", ["de"]="Numer", ["en"]="number", ["fr"]="numéro", ["mk"]="број", ["nl"]="nummer", ["pe"]="شماره", + ["sr"]="број", + ["sr-latn"]="broj", }, }, ["of"]={ ["labels"]={ + ["be"]="з", + ["bg"]="на", ["de"]="von", ["en"]="of", ["fr"]="de", ["mk"]="од", ["nl"]="van", + ["sr"]="од", + ["sr-latn"]="od", }, }, ["others"]={ ["labels"]={ ["en"]="et al.", ["et"]="jt", - ["mk"]="и др.", + ["mk"]="и др.", + ["sr"]="и др.", + ["sr-latn"]="i dr.", }, }, ["p"]={ ["labels"]={ + ["be"]="стар.", ["de"]="S.", ["en"]="p.", - ["mk"]="стр.", ["et"]="lk", + ["mk"]="стр.", ["pe"]="ص", + ["sr"]="стр.", + ["sr-latn"]="str.", }, }, ["pages"]={ ["labels"]={ + ["be"]="старонка", + ["bg"]="страни", ["de"]="Seiten", ["en"]="pages", ["et"]="leheküljed", ["mk"]="страници", ["nl"]="paginas", ["pe"]="صفحات", + ["sr"]="страницa", + ["sr-latn"]="stranica", }, }, ["patent"]={ ["labels"]={ + ["be"]="патэнт", + ["bg"]="патент", ["de"]="Patent", ["en"]="Patent", ["es"]="Patente", @@ -224,10 +282,14 @@ data.labels={ ["it"]="Brevetto", ["mk"]="Патент", ["nl"]="Octrooi", + ["sr"]="Патент", + ["sr-latn"]="Patent", }, }, ["phdthesis"]={ ["labels"]={ + ["be"]="Доктарская дысертацыя", + ["bg"]="дисертачна работа", ["de"]="Dissertation", ["en"]="PhD thesis", ["es"]="Tesis doctoral", @@ -237,6 +299,8 @@ data.labels={ ["mk"]="Докторска дисертација", ["nl"]="Proefschrift", ["pe"]="رساله دکتری", + ["sr"]="Докторска дисертација", + ["sr-latn"]="Doktorska disertacija", }, }, ["pp"]={ @@ -246,10 +310,14 @@ data.labels={ ["et"]="lk-d", ["mk"]="стр.", ["pe"]="صص", + ["sr"]="стр.", + ["sr-latn"]="str.", }, }, ["technicalreport"]={ ["labels"]={ + ["be"]="Тэхнічны даклад", + ["bg"]="технически доклад", ["de"]="Technischer Bericht", ["en"]="Technical report", ["es"]="Informe técnico", @@ -259,20 +327,28 @@ data.labels={ ["mk"]="Технички извештај", ["nl"]="Technisch rapport", ["pe"]="گزارش فنی", + ["sr"]="Технички извештај", + ["sr-latn"]="Tehnički izveštaj", }, }, ["volume"]={ ["labels"]={ + ["be"]="гучнасць", + ["bg"]="обем", ["de"]="Band", ["en"]="volume", ["et"]="köide", ["mk"]="том", ["nl"]="deel", ["pe"]="جلد", + ["sr"]="том", + ["sr-latn"]="tom", }, }, ["with"]={ ["labels"]={ + ["be"]="з", + ["bg"]="със", ["de"]="mit", ["en"]="with", ["es"]="con", @@ -281,177 +357,213 @@ data.labels={ ["it"]="con", ["mk"]="со", ["nl"]="met", + ["sr"]="са", + ["sr-latn"]="sa", }, }, }, ["functions"]={ ["Pr"]={ ["labels"]={ - ["cz"]="P", + ["cs"]="P", ["en"]="Pr", - ["mk"]="P", + ["mk"]="P", ["sk"]="P", + ["sr"]="P", + ["sr-latn"]="P", }, }, ["arccos"]={ ["labels"]={ - ["cz"]="arccos", + ["cs"]="arccos", ["en"]="arccos", ["es"]="arc\\sixperemspace cos", ["hr"]="arc\\sixperemspace cos", - ["mk"]="arccos", + ["mk"]="arccos", ["pl"]="arc\\sixperemspace cos", ["sk"]="arccos", + ["sr"]="arccos", + ["sr-latn"]="arccos", }, }, ["arccosh"]={ ["labels"]={ - ["cz"]="arccosh", + ["cs"]="arccosh", ["en"]="arccosh", ["es"]="arc\\sixperemspace cosh", ["hr"]="arc\\sixperemspace cosh", - ["mk"]="arccosh", + ["mk"]="arccosh", ["pl"]="arc\\sixperemspace cosh", ["sk"]="arccosh", + ["sr"]="arccosh", + ["sr-latn"]="arccosh", }, }, ["arcctg"]={ ["labels"]={ - ["cz"]="arccotg", + ["cs"]="arccotg", ["en"]="arccot", ["es"]="arc\\sixperemspace cot", ["hr"]="arc\\sixperemspace ctg", - ["mk"]="arccotg", + ["mk"]="arccotg", ["pl"]="arc\\sixperemspace ctg", ["sk"]="arccotg", + ["sr"]="arcctg", + ["sr-latn"]="arcctg", }, }, ["arcsin"]={ ["labels"]={ - ["cz"]="arcsin", + ["cs"]="arcsin", ["en"]="arcsin", ["es"]="arc\\sixperemspace sen", ["hr"]="arc\\sixperemspace sin", - ["mk"]="arcsin", + ["mk"]="arcsin", ["pl"]="arc\\sixperemspace sin", ["sk"]="arcsin", + ["sr"]="arcsin", + ["sr-latn"]="arcsin", }, }, ["arcsinh"]={ ["labels"]={ - ["cz"]="arcsinh", + ["cs"]="arcsinh", ["en"]="arcsinh", ["es"]="arc\\sixperemspace senh", ["hr"]="arc\\sixperemspace sinh", - ["mk"]="arcsinh", + ["mk"]="arcsinh", ["pl"]="arc\\sixperemspace sinh", ["sk"]="arcsinh", + ["sr"]="arcsinh", + ["sr-latn"]="arcsinh", }, }, ["arctan"]={ ["labels"]={ - ["cz"]="arctg", + ["cs"]="arctg", ["en"]="arctan", ["es"]="arc\\sixperemspace tan", ["hr"]="arc\\sixperemspace tg", - ["mk"]="arctg", + ["mk"]="arctg", ["pl"]="arc\\sixperemspace tg", ["sk"]="arctg", + ["sr"]="arctg", + ["sr-latn"]="arctg", }, }, ["arctanh"]={ ["labels"]={ - ["cz"]="arctgh", + ["cs"]="arctgh", ["en"]="arctanh", ["es"]="arc\\sixperemspace tanh", ["hr"]="arc\\sixperemspace tgh", - ["mk"]="arctgh", + ["mk"]="arctgh", ["pl"]="arc\\sixperemspace tgh", ["sk"]="arctgh", + ["sr"]="arctgh", + ["sr-latn"]="arctgh", }, }, ["arg"]={ ["labels"]={ - ["cz"]="arg", + ["cs"]="arg", ["en"]="arg", ["es"]="arg", - ["mk"]="arg", + ["mk"]="arg", ["sk"]="arg", + ["sr"]="arg", + ["sr-latn"]="arg", }, }, ["cos"]={ ["labels"]={ - ["cz"]="cos", + ["cs"]="cos", ["en"]="cos", ["es"]="cos", - ["mk"]="cos", + ["mk"]="cos", ["sk"]="cos", + ["sr"]="cos", + ["sr-latn"]="cos", }, }, ["cosh"]={ ["labels"]={ - ["cz"]="cosh", + ["cs"]="cosh", ["en"]="cosh", ["es"]="cosh", - ["mk"]="cosh", + ["mk"]="cosh", ["sk"]="cosh", + ["sr"]="cosh", + ["sr-latn"]="cosh", }, }, ["cot"]={ ["labels"]={ - ["cz"]="cotg", + ["cs"]="cotg", ["en"]="cot", ["es"]="cot", ["hr"]="ctg", - ["mk"]="ctg", + ["mk"]="ctg", ["pl"]="ctg", ["sk"]="cotg", + ["sr"]="ctg", + ["sr-latn"]="ctg", }, }, ["coth"]={ ["labels"]={ - ["cz"]="cotgh", + ["cs"]="cotgh", ["en"]="coth", ["es"]="coth", - ["mk"]="ctgh", + ["mk"]="ctgh", ["sk"]="cotgh", + ["sr"]="ctgh", + ["sr-latn"]="ctgh", }, }, ["csc"]={ ["labels"]={ - ["cz"]="cosec", + ["cs"]="cosec", ["en"]="csc", ["es"]="csc", - ["mk"]="cosec", + ["mk"]="cosec", ["sk"]="cosec", + ["sr"]="cosec", + ["sr-latn"]="cosec", }, }, ["ctg"]={ ["labels"]={ - ["cz"]="cotg", + ["cs"]="cotg", ["en"]="cot", ["es"]="cot", ["hr"]="ctg", - ["mk"]="ctg", + ["mk"]="ctg", ["pl"]="ctg", ["sk"]="cotg", + ["sr"]="ctg", + ["sr-latn"]="ctg", }, }, ["deg"]={ ["labels"]={ - ["cz"]="deg", + ["cs"]="deg", ["en"]="deg", ["es"]="gr", - ["mk"]="deg", + ["mk"]="deg", ["sk"]="deg", + ["sr"]="deg", + ["sr-latn"]="deg", }, }, ["det"]={ ["labels"]={ - ["cz"]="det", + ["cs"]="det", ["en"]="det", ["es"]="det", ["sk"]="det", + ["sr"]="det", + ["sr-latn"]="det", }, }, ["diff"]={ @@ -461,35 +573,41 @@ data.labels={ }, ["dim"]={ ["labels"]={ - ["cz"]="dim", + ["cs"]="dim", ["en"]="dim", ["es"]="dim", - ["mk"]="dim", + ["mk"]="dim", ["sk"]="dim", + ["sr"]="dim", + ["sr-latn"]="dim", }, }, ["exp"]={ ["labels"]={ - ["cz"]="exp", + ["cs"]="exp", ["en"]="exp", ["es"]="exp", ["sk"]="exp", + ["sr"]="exp", + ["sr-latn"]="exp", }, }, ["gcd"]={ ["labels"]={ - ["cz"]="NSD", + ["cs"]="NSD", ["en"]="gcd", ["es"]="mcd", ["hr"]="nzd", - ["mk"]="НЗД", + ["mk"]="НЗД", ["nl"]="ggd", ["sk"]="NSD", + ["sr"]="НЗД", + ["sr-latn"]="NZD", }, }, ["hom"]={ ["labels"]={ - ["cz"]="Hom", + ["cs"]="Hom", ["en"]="hom", ["es"]="hom", ["sk"]="Hom", @@ -497,207 +615,237 @@ data.labels={ }, ["inf"]={ ["labels"]={ - ["cz"]="inf", + ["cs"]="inf", ["en"]="inf", ["es"]="inf", - ["mk"]="inf", + ["mk"]="inf", ["sk"]="inf", + ["sr"]="inf", + ["sr-latn"]="inf", }, }, ["injlim"]={ ["labels"]={ - ["cz"]="inj\\sixperemspace lim", + ["cs"]="inj\\sixperemspace lim", ["en"]="inj\\sixperemspace lim", ["es"]="lím\\sixperemspace iny", ["sk"]="inj\\sixperemspace lim", + ["sr"]="inj\\sixperemspace lim", + ["sr-latn"]="inj\\sixperemspace lim", }, }, ["ker"]={ ["labels"]={ - ["cz"]="ker", + ["cs"]="ker", ["en"]="ker", ["es"]="Ker", ["sk"]="ker", + ["sr"]="ker", + ["sr-latn"]="ker", }, }, ["lcm"]={ ["labels"]={ - ["cz"]="NSN", + ["cs"]="NSN", ["en"]="lcm", ["es"]="MCM", ["hr"]="nzv", - ["mk"]="НЗС", + ["mk"]="НЗС", ["nl"]="kgv", ["sk"]="NSN", + ["sr"]="НЗС", + ["sr-latn"]="NZS", }, }, ["lg"]={ ["labels"]={ - ["cz"]="log", + ["cs"]="log", ["en"]="lg", ["es"]="log", - ["mk"]="lg", + ["mk"]="lg", ["sk"]="log", + ["sr"]="lg", + ["sr-latn"]="lg", }, }, ["lim"]={ ["labels"]={ - ["cz"]="lim", + ["cs"]="lim", ["en"]="lim", ["es"]="lím", - ["mk"]="lim", + ["mk"]="lim", ["sk"]="lim", + ["sr"]="lim", + ["sr-latn"]="lim", }, }, ["liminf"]={ ["labels"]={ - ["cz"]="lim\\sixperemspace inf", + ["cs"]="lim\\sixperemspace inf", ["en"]="lim\\sixperemspace inf", ["es"]="lím\\sixperemspace inf", - ["mk"]="lim\\sixperemspace inf", + ["mk"]="lim\\sixperemspace inf", ["sk"]="lim\\sixperemspace inf", + ["sr"]="lim\\sixperemspace inf", + ["sr-latn"]="lim\\sixperemspace inf", }, }, ["limsup"]={ ["labels"]={ - ["cz"]="lim\\sixperemspace sup", + ["cs"]="lim\\sixperemspace sup", ["en"]="lim\\sixperemspace sup", ["es"]="lím\\sixperemspace sup", - ["mk"]="lim\\sixperemspace sup", + ["mk"]="lim\\sixperemspace sup", ["sk"]="lim\\sixperemspace sup", + ["sr"]="lim\\sixperemspace sup", + ["sr-latn"]="lim\\sixperemspace sup", }, }, ["ln"]={ ["labels"]={ - ["cz"]="ln", + ["cs"]="ln", ["en"]="ln", ["es"]="ln", - ["mk"]="ln", + ["mk"]="ln", ["sk"]="ln", + ["sr"]="ln", + ["sr-latn"]="ln", }, }, ["log"]={ ["labels"]={ - ["cz"]="log", + ["cs"]="log", ["en"]="log", ["es"]="log", - ["mk"]="log", + ["mk"]="log", ["sk"]="log", + ["sr"]="log", + ["sr-latn"]="log", }, }, ["max"]={ ["labels"]={ - ["cz"]="max", + ["cs"]="max", ["en"]="max", ["es"]="máx", - ["mk"]="max", + ["mk"]="max", ["sk"]="max", + ["sr"]="max", + ["sr-latn"]="max", }, }, ["median"]={ ["labels"]={ - ["cz"]="\\tilde", + ["cs"]="\\tilde", ["en"]="median", ["es"]="Mediana", ["sk"]="\\tilde", + ["sr"]="median", + ["sr-latn"]="median", }, }, ["min"]={ ["labels"]={ - ["cz"]="min", + ["cs"]="min", ["en"]="min", ["es"]="mín", - ["mk"]="min", + ["mk"]="min", ["sk"]="min", + ["sr"]="min", + ["sr-latn"]="min", }, }, ["mod"]={ ["labels"]={ - ["cz"]="mod", + ["cs"]="mod", ["en"]="mod", ["es"]="mod", - ["mk"]="mod", + ["mk"]="mod", ["sk"]="mod", + ["sr"]="mod", + ["sr-latn"]="mod", }, }, ["projlim"]={ ["labels"]={ - ["cz"]="proj\\sixperemspace lim", + ["cs"]="proj\\sixperemspace lim", ["en"]="proj\\sixperemspace lim", ["es"]="lím\\sixperemspace proy", ["sk"]="proj\\sixperemspace lim", + ["sr"]="proj\\sixperemspace lim", + ["sr-latn"]="proj\\sixperemspace lim", }, }, ["sec"]={ ["labels"]={ - ["cz"]="sec", + ["cs"]="sec", ["en"]="sec", ["es"]="sec", - ["mk"]="sec", + ["mk"]="sec", ["sk"]="sec", + ["sr"]="sec", + ["sr-latn"]="sec", }, }, ["sin"]={ ["labels"]={ - ["cz"]="sin", + ["cs"]="sin", ["en"]="sin", ["es"]="sen", - ["mk"]="sin", + ["mk"]="sin", ["sk"]="sin", + ["sr"]="sin", + ["sr-latn"]="sin", }, }, ["sinh"]={ ["labels"]={ - ["cz"]="sinh", + ["cs"]="sinh", ["en"]="sinh", ["es"]="senh", - ["mk"]="sinh", + ["mk"]="sinh", ["sk"]="sinh", + ["sr"]="sinh", + ["sr-latn"]="sinh", }, }, ["sup"]={ ["labels"]={ - ["cz"]="sup", + ["cs"]="sup", ["en"]="sup", ["es"]="sup", - ["mk"]="sup", + ["mk"]="sup", ["sk"]="sup", + ["sr"]="sup", + ["sr-latn"]="sup", }, }, ["tan"]={ ["labels"]={ - ["cz"]="tg", + ["cs"]="tg", ["en"]="tan", ["es"]="tan", ["hr"]="tg", ["mk"]="tg", ["pl"]="tg", ["sk"]="tg", + ["sr"]="tg", + ["sr-latn"]="tg", }, }, ["tanh"]={ ["labels"]={ - ["cz"]="tgh", + ["cs"]="tgh", ["en"]="tanh", ["es"]="tanh", - ["mk"]="tgh", + ["mk"]="tgh", ["sk"]="tgh", + ["sr"]="tgh", + ["sr-latn"]="tgh", }, }, }, ["texts"]={ - ["following:singular"]={ - ["labels"]={ - ["en"]="f.", - ["fr"]=hairspace .. "sq", - }, - }, - ["following:plural"]={ - ["labels"]={ - ["en"]="ff.", - ["fr"]=hairspace .. "sqq", - }, - }, ["and"]={ ["labels"]={ ["af"]="", @@ -727,6 +875,7 @@ data.labels={ ["ru"]="", ["sk"]=" a ", ["sl"]="", + ["sr"]=" и ", ["sv"]="", ["tk"]="", ["tr"]="", @@ -739,6 +888,7 @@ data.labels={ ["labels"]={ ["af"]="Bylae ", ["ar"]="ملحق ", + ["be"]="Апендыцыт", ["ca"]="Apèndix ", ["cn"]="附录", ["cs"]="Příloha ", @@ -768,6 +918,8 @@ data.labels={ ["ru"]="", ["sk"]="Príloha ", ["sl"]="Dodatek ", + ["sr"]="Додатак ", + ["sr-latn"]="Dodatak ", ["sv"]="", ["tk"]="Goşmaça", ["tr"]="", @@ -781,6 +933,8 @@ data.labels={ ["ar"]="أبريل", ["ar-dz"]="أفريل", ["ar-sy"]="نيسان", + ["be"]="красавіка", + ["bg"]="април", ["ca"]="abril", ["cn"]="四月", ["cs"]="dubna", @@ -799,8 +953,8 @@ data.labels={ ["kr"]="4", ["la"]="Aprilis", ["lt"]="balandžio", - ["nb"]="april", ["mk"]="април", + ["nb"]="april", ["nl"]="april", ["nn"]="april", ["pe"]="آوریل", @@ -810,6 +964,8 @@ data.labels={ ["ru"]="апреля", ["sk"]="apríla", ["sl"]="april", + ["sr"]="aприл", + ["sr-latn"]="april", ["sv"]="april", ["tk"]="aprel", ["tr"]="nisan", @@ -851,6 +1007,8 @@ data.labels={ ["ru"]="", ["sk"]="apr.", ["sl"]="", + ["sr"]="апр.", + ["sr-latn"]="apr.", ["sv"]="", ["tk"]="", ["tr"]="", @@ -888,6 +1046,8 @@ data.labels={ ["ru"]="на странице ", ["sk"]="na strane ", ["sl"]="na strani ", + ["sr"]="на страници ", + ["sr-latn"]="na stranici ", ["sv"]="på sida ", ["tk"]="", ["tr"]="", @@ -902,6 +1062,8 @@ data.labels={ ["ar-dz"]="أوت", ["ar-ma"]="غشت", ["ar-sy"]="آب", + ["be"]="жнівня", + ["bg"]="август", ["ca"]="agost", ["cn"]="八月", ["cs"]="srpna", @@ -931,6 +1093,8 @@ data.labels={ ["ru"]="августа", ["sk"]="augusta", ["sl"]="avgust", + ["sr"]="август", + ["sr-latn"]="avgust", ["sv"]="augusti", ["tk"]="awgust", ["tr"]="ağustos", @@ -972,6 +1136,8 @@ data.labels={ ["ru"]="", ["sk"]="aug.", ["sl"]="", + ["sr"]="авг.", + ["sr-latn"]="avg.", ["sv"]="", ["tk"]="", ["tr"]="", @@ -984,6 +1150,8 @@ data.labels={ ["labels"]={ ["af"]="Hoofstuk ", ["ar"]="باب ", + ["be"]="Глава ", + ["bg"]="Eпизод ", ["ca"]="Capítol ", ["cn"]={ "第", "章" }, ["cs"]="Kapitola ", @@ -1013,6 +1181,9 @@ data.labels={ ["ru"]="", ["sk"]="Kapitola ", ["sl"]="Poglavje ", + ["sr"]="Поглавље ", + ["sr"]="Глава ", + ["sr-latn"]="Glava ", ["sv"]="", ["tk"]="Bap", ["tr"]="", @@ -1023,6 +1194,8 @@ data.labels={ ["continued"]={ ["labels"]={ ["af"]="", + ["be"]=" (працяг)", + ["bg"]=" (продължение)", ["ca"]="", ["cs"]=" (pokračování)", ["da"]="", @@ -1049,6 +1222,9 @@ data.labels={ ["ru"]="", ["sk"]=" (pokračovanie)", ["sl"]="", + ["sr"]=" (наставио)", + ["sr"]=" (наставак)", + ["sr-latn"]=" (nastavak)", ["sv"]="", ["tk"]="", ["tr"]="", @@ -1058,12 +1234,15 @@ data.labels={ }, ["day"]={ ["labels"]={ + ["bg"]="ден", ["en"]="day", ["et"]="päev", ["kr"]="일", ["mk"]="ден", ["nl"]="dag", ["pe"]="روز", + ["sr"]="дан", + ["sr-latn"]="dan", }, }, ["december"]={ @@ -1072,6 +1251,8 @@ data.labels={ ["ar"]="ديسمبر", ["ar-ma"]="دجنبر", ["ar-sy"]="كانون الأول", + ["be"]="снежня", + ["bg"]="декември", ["ca"]="desembre", ["cn"]="十二月", ["cs"]="prosince", @@ -1090,8 +1271,8 @@ data.labels={ ["kr"]="12", ["la"]="December", ["lt"]="gruodžio", - ["nb"]="desember", ["mk"]="декември", + ["nb"]="desember", ["nl"]="december", ["nn"]="desember", ["pe"]="دسامبر", @@ -1101,6 +1282,8 @@ data.labels={ ["ru"]="декабря", ["sk"]="decembra", ["sl"]="december", + ["sr"]="децембар", + ["sr-latn"]="decembar", ["sv"]="december", ["tk"]="dekabr", ["tr"]="aralık", @@ -1142,6 +1325,8 @@ data.labels={ ["ru"]="", ["sk"]="dec.", ["sl"]="", + ["sr"]="дец.", + ["sr-latn"]="dec.", ["sv"]="", ["tk"]="", ["tr"]="", @@ -1155,6 +1340,8 @@ data.labels={ ["ar"]="فبراير", ["ar-dz"]="فيفري", ["ar-sy"]="شباط", + ["be"]="лютага", + ["bg"]="февруари", ["ca"]="febrer", ["cn"]="二月", ["cs"]="února", @@ -1184,6 +1371,8 @@ data.labels={ ["ru"]="февраля", ["sk"]="februára", ["sl"]="februar", + ["sr"]="фебруар", + ["sr-latn"]="februar", ["sv"]="februari", ["tk"]="fewral", ["tr"]="Şubat", @@ -1225,6 +1414,8 @@ data.labels={ ["ru"]="", ["sk"]="feb.", ["sl"]="", + ["sr"]="феб.", + ["sr-latn"]="feb.", ["sv"]="", ["tk"]="", ["tr"]="", @@ -1236,6 +1427,8 @@ data.labels={ ["labels"]={ ["af"]="Figuur ", ["ar"]="شكل ", + ["be"]="Малюнак", + ["bg"]="Фигура", ["ca"]="Figura ", ["cn"]="图", ["cs"]="Obrázek ", @@ -1265,6 +1458,8 @@ data.labels={ ["ru"]="Рисунок ", ["sk"]="Obrázok ", ["sl"]="Slika ", + ["sr"]="Слика ", + ["sr-latn"]="Slika ", ["sv"]="Figur ", ["tk"]="Surat", ["tr"]="Şekil ", @@ -1272,6 +1467,18 @@ data.labels={ ["vi"]="Hình ", }, }, + ["following:plural"]={ + ["labels"]={ + ["en"]="ff.", + ["fr"]=hairspace .. "sqq", + }, + }, + ["following:singular"]={ + ["labels"]={ + ["en"]="f.", + ["fr"]=hairspace .. "sq", + }, + }, ["followingpage"]={ ["labels"]={ ["en"]="on a following page", @@ -1279,12 +1486,16 @@ data.labels={ ["mk"]="на следната страница", ["nl"]="op een volgende bladzijde", ["pe"]="در صفحات آینده", + ["sr"]="на следећој страници", + ["sr-latn"]="na sledećoj stranici", }, }, ["friday"]={ ["labels"]={ ["af"]="vrydag", ["ar"]="الجمعة", + ["be"]="пятніца", + ["bg"]="петък", ["ca"]="divendres", ["cn"]="星期五", ["cs"]="pátek", @@ -1314,6 +1525,8 @@ data.labels={ ["ru"]="пятница", ["sk"]="piatok", ["sl"]="petek", + ["sr"]="петак", + ["sr-latn"]="petak", ["sv"]="fredag", ["tk"]="bäşinji gün", ["tr"]="cuma", @@ -1321,10 +1534,20 @@ data.labels={ ["vi"]="thứ sáu", }, }, + ["friday:mnem"]={ + ["labels"]={ + ["de"]="Fr.", + ["en"]="fri", + ["sr"]="пет.", + ["sr-latn"]="pet.", + }, + }, ["graphic"]={ ["labels"]={ ["af"]="Grafiek ", ["ar"]="رسم ", + ["be"]="Графіка ", + ["bg"]="Графичен ", ["ca"]="Gràfica ", ["cn"]="插图", ["cs"]="Graf ", @@ -1353,6 +1576,8 @@ data.labels={ ["ru"]="График ", ["sk"]="Graf ", ["sl"]="Slika ", + ["sr"]="График ", + ["sr-latn"]="Grafik ", ["sv"]="Grafik ", ["tk"]="Grafik", ["tr"]="Grafik", @@ -1364,6 +1589,7 @@ data.labels={ ["labels"]={ ["af"]="", ["ar"]="كما وضحنا سابقا", + ["be"]="Графіка", ["ca"]="", ["cs"]="viz výše", ["da"]="se foroven", @@ -1391,6 +1617,9 @@ data.labels={ ["ru"]="см. выше", ["sk"]="pozri hore", ["sl"]="glej zgoraj", + ["sr"]="види горе", + ["sr"]="као што је показано изнад", + ["sr-latn"]="kao što je pokazano iznad", ["sv"]="se ovan", ["tk"]="", ["tr"]="", @@ -1402,6 +1631,8 @@ data.labels={ ["labels"]={ ["af"]="", ["ar"]="كما نوضح لاحقا", + ["be"]="гл. вышэй", + ["bg"]="ў далейшым", ["ca"]="", ["cs"]="viz níže", ["da"]="se forneden", @@ -1429,6 +1660,9 @@ data.labels={ ["ru"]="см. ниже", ["sk"]="pozri ďalej", ["sl"]="glej spodaj", + ["sr"]="види доле", + ["sr"]="као што је показано ниже", + ["sr-latn"]="kao što je pokazano niže", ["sv"]="se nedan", ["tk"]="", ["tr"]="", @@ -1440,6 +1674,8 @@ data.labels={ ["labels"]={ ["af"]="Intermezzo ", ["ar"]="فسحة ", + ["be"]="Устаўка", + ["bg"]="Aнтракт ", ["ca"]="Intermedi ", ["cn"]="퉣", ["cs"]="Intermezzo ", @@ -1468,6 +1704,9 @@ data.labels={ ["ru"]="Вставка ", ["sk"]="Intermezzo ", ["sl"]="Intermezzo ", + ["sr"]="Интермеззо ", + ["sr"]="Дигресија ", + ["sr-latn"]="Digresija ", ["sv"]="Intermezzo ", ["tk"]="Arakesme", ["tr"]="", @@ -1481,6 +1720,8 @@ data.labels={ ["ar"]="يناير", ["ar-dz"]="جانفي", ["ar-sy"]="كانون الثاني", + ["be"]="студзеня", + ["bg"]="януари", ["ca"]="gener", ["cn"]="一月", ["cs"]="ledna", @@ -1510,6 +1751,8 @@ data.labels={ ["ru"]="января", ["sk"]="januára", ["sl"]="januar", + ["sr"]="јануар", + ["sr-latn"]="januar", ["sv"]="januari", ["tk"]="ýanwar", ["tr"]="ocak", @@ -1551,6 +1794,8 @@ data.labels={ ["ru"]="", ["sk"]="jan.", ["sl"]="", + ["sr"]="јан.", + ["sr-latn"]="jan.", ["sv"]="", ["tk"]="", ["tr"]="", @@ -1565,6 +1810,8 @@ data.labels={ ["ar-dz"]="جويلة", ["ar-ma"]="يوليوز", ["ar-sy"]="تموز", + ["be"]="ліпня", + ["bg"]="юли", ["ca"]="juliol", ["cn"]="七月", ["cs"]="července", @@ -1594,6 +1841,8 @@ data.labels={ ["ru"]="июля", ["sk"]="júla", ["sl"]="julij", + ["sr"]="jул", + ["sr-latn"]="jul", ["sv"]="juli", ["tk"]="iýul", ["tr"]="temmuz", @@ -1635,6 +1884,8 @@ data.labels={ ["ru"]="", ["sk"]="júla", ["sl"]="", + ["sr"]="јул.", + ["sr-latn"]="jul.", ["sv"]="", ["tk"]="", ["tr"]="", @@ -1648,6 +1899,8 @@ data.labels={ ["ar"]="يونيو", ["ar-dz"]="جوان", ["ar-sy"]="حزيران", + ["be"]="чэрвня", + ["bg"]="юни", ["ca"]="juny", ["cn"]="六月", ["cs"]="června", @@ -1677,6 +1930,8 @@ data.labels={ ["ru"]="июня", ["sk"]="júna", ["sl"]="junij", + ["sr"]="јун", + ["sr-latn"]="jun", ["sv"]="juni", ["tk"]="iýun", ["tr"]="haziran", @@ -1718,6 +1973,8 @@ data.labels={ ["ru"]="", ["sk"]="júna", ["sl"]="", + ["sr"]="јун", + ["sr-latn"]="jun", ["sv"]="", ["tk"]="", ["tr"]="", @@ -1729,6 +1986,8 @@ data.labels={ ["labels"]={ ["af"]="reël ", ["ar"]="سطر ", + ["be"]="радок ", + ["bg"]="ред ", ["ca"]="línia ", ["cn"]="行", ["cs"]="řádek ", @@ -1758,6 +2017,8 @@ data.labels={ ["ru"]="строка ", ["sk"]="riadok ", ["sl"]="vrstica ", + ["sr"]="линија ", + ["sr-latn"]="linija ", ["sv"]="rad ", ["tk"]="setir", ["tr"]="satır ", @@ -1769,6 +2030,8 @@ data.labels={ ["labels"]={ ["af"]="reëls ", ["ar"]="السطور ", + ["be"]="радкi ", + ["bg"]="редове ", ["ca"]="línies ", ["cn"]="行", ["cs"]="řádky ", @@ -1798,6 +2061,8 @@ data.labels={ ["ru"]="строки ", ["sk"]="riadky ", ["sl"]="vrstice ", + ["sr"]="линије ", + ["sr-latn"]="linije ", ["sv"]="rader ", ["tk"]="setirler", ["tr"]="satırlar ", @@ -1810,6 +2075,8 @@ data.labels={ ["af"]="maart", ["ar"]="مارس", ["ar-sy"]="آذار", + ["be"]="сакавіка", + ["bg"]="март", ["ca"]="març", ["cn"]="三月", ["cs"]="března", @@ -1839,6 +2106,8 @@ data.labels={ ["ru"]="марта", ["sk"]="marca", ["sl"]="marec", + ["sr"]="март", + ["sr-latn"]="mart", ["sv"]="mars", ["tk"]="mart", ["tr"]="mart", @@ -1880,6 +2149,8 @@ data.labels={ ["ru"]="", ["sk"]="mar.", ["sl"]="", + ["sr"]="мар.", + ["sr-latn"]="mar.", ["sv"]="", ["tk"]="", ["tr"]="", @@ -1894,6 +2165,8 @@ data.labels={ ["ar-dz"]="ماي", ["ar-ma"]="ماي", ["ar-sy"]="أيار", + ["be"]="мая", + ["bg"]="маӣ", ["ca"]="maig", ["cn"]="五月", ["cs"]="května", @@ -1923,6 +2196,8 @@ data.labels={ ["ru"]="мая", ["sk"]="mája", ["sl"]="maj", + ["sr"]="мај", + ["sr-latn"]="maj", ["sv"]="maj", ["tk"]="maý", ["tr"]="mayıs", @@ -1964,6 +2239,8 @@ data.labels={ ["ru"]="", ["sk"]="mája", ["sl"]="", + ["sr"]="мај", + ["sr-latn"]="maj", ["sv"]="", ["tk"]="", ["tr"]="", @@ -1971,52 +2248,12 @@ data.labels={ ["vi"]="", }, }, - ["monday:mnem"]={ - ["labels"]={ - ["en"]="mon", - ["de"]="Mo.", - }, - }, - ["tuesday:mnem"]={ - ["labels"]={ - ["en"]="tue", - ["de"]="Di.", - }, - }, - ["wednesday:mnem"]={ - ["labels"]={ - ["en"]="wed", - ["de"]="Mi.", - }, - }, - ["thursday:mnem"]={ - ["labels"]={ - ["en"]="thu", - ["de"]="Do.", - }, - }, - ["friday:mnem"]={ - ["labels"]={ - ["en"]="fri", - ["de"]="Fr.", - }, - }, - ["saturday:mnem"]={ - ["labels"]={ - ["en"]="sat", - ["de"]="Sa.", - }, - }, - ["sunday:mnem"]={ - ["labels"]={ - ["en"]="sun", - ["de"]="So.", - }, - }, ["monday"]={ ["labels"]={ ["af"]="maandag", ["ar"]="الاثنين", + ["be"]="панядзелак", + ["bg"]="понеделник", ["ca"]="dilluns", ["cn"]="星期一", ["cs"]="pondělí", @@ -2046,6 +2283,8 @@ data.labels={ ["ru"]="понедельник", ["sk"]="pondelok", ["sl"]="ponedeljek", + ["sr"]="понедељак", + ["sr-latn"]="ponedeljak", ["sv"]="måndag", ["tk"]="birinji gün", ["tr"]="pazartesi", @@ -2053,14 +2292,26 @@ data.labels={ ["vi"]="thứ hai", }, }, + ["monday:mnem"]={ + ["labels"]={ + ["de"]="Mo.", + ["en"]="mon", + ["sr"]="пон.", + ["sr-latn"]="pon.", + }, + }, ["month"]={ ["labels"]={ + ["be"]="месяц", + ["bg"]="месец", ["en"]="month", ["et"]="kuu", ["kr"]="월", ["mk"]="месец", ["nl"]="maand", ["pe"]="ماه", + ["sr"]="месец", + ["sr-latn"]="mesec", }, }, ["november"]={ @@ -2069,6 +2320,8 @@ data.labels={ ["ar"]="نوفمبر", ["ar-ma"]="نونبر", ["ar-sy"]="تشرين الثاني", + ["be"]="лістапада", + ["bg"]="ноември", ["ca"]="novembre", ["cn"]="十一月", ["cs"]="listopadu", @@ -2098,6 +2351,8 @@ data.labels={ ["ru"]="ноября", ["sk"]="novembra", ["sl"]="november", + ["sr"]="новембар", + ["sr-latn"]="novembar", ["sv"]="november", ["tk"]="noýabr", ["tr"]="kasım", @@ -2139,6 +2394,8 @@ data.labels={ ["ru"]="", ["sk"]="nov.", ["sl"]="", + ["sr"]="нов.", + ["sr-latn"]="nov.", ["sv"]="", ["tk"]="", ["tr"]="", @@ -2151,6 +2408,8 @@ data.labels={ ["af"]="oktober", ["ar"]="أكتوبر", ["ar-sy"]="تشرين الأول", + ["be"]="кастрычніка", + ["bg"]="октомври", ["ca"]="octubre", ["cn"]="十月", ["cs"]="října", @@ -2180,6 +2439,8 @@ data.labels={ ["ru"]="октября", ["sk"]="októbra", ["sl"]="oktober", + ["sr"]="октобар", + ["sr-latn"]="oktobar", ["sv"]="oktober", ["tk"]="oktýabr", ["tr"]="ekim", @@ -2221,6 +2482,8 @@ data.labels={ ["ru"]="", ["sk"]="okt.", ["sl"]="", + ["sr"]="окт.", + ["sr-latn"]="okt.", ["sv"]="", ["tk"]="", ["tr"]="", @@ -2232,6 +2495,8 @@ data.labels={ ["labels"]={ ["af"]="", ["ar"]="صفحة ", + ["be"]="старонка ", + ["bg"]="страна", ["ca"]="", ["cs"]="strana ", ["da"]="Side ", @@ -2259,6 +2524,8 @@ data.labels={ ["ru"]="страница ", ["sk"]="strana ", ["sl"]="stran ", + ["sr"]="страница ", + ["sr-latn"]="stranica ", ["sv"]="Sida ", ["tk"]="", ["tr"]="", @@ -2270,6 +2537,8 @@ data.labels={ ["labels"]={ ["af"]="Deel ", ["ar"]="جزء ", + ["be"]="Частка ", + ["bg"]="Частка ", ["ca"]="Part ", ["cn"]={ "第", "部分" }, ["cs"]="Část ", @@ -2299,6 +2568,8 @@ data.labels={ ["ru"]="Часть ", ["sk"]="Časť ", ["sl"]="Del ", + ["sr"]="Део ", + ["sr-latn"]="Deo ", ["sv"]="Del ", ["tk"]="Bölüm", ["tr"]="Cilt ", @@ -2313,12 +2584,16 @@ data.labels={ ["mk"]="на претходната страница", ["nl"]="op een voorgaande bladzijde", ["pe"]="در صفحات گذشته", + ["sr"]="на претходној страници", + ["sr-latn"]="na prethodnoj stranici", }, }, ["saturday"]={ ["labels"]={ ["af"]="saterdag", ["ar"]="السبت", + ["be"]="субота", + ["bg"]="сряда", ["ca"]="dissabte", ["cn"]="星期六", ["cs"]="sobota", @@ -2348,6 +2623,8 @@ data.labels={ ["ru"]="суббота", ["sk"]="sobota", ["sl"]="sobota", + ["sr"]="субота", + ["sr-latn"]="subota", ["sv"]="lördag", ["tk"]="altynjy gün", ["tr"]="cumartesi", @@ -2355,11 +2632,20 @@ data.labels={ ["vi"]="thứ bảy", }, }, + ["saturday:mnem"]={ + ["labels"]={ + ["de"]="Sa.", + ["en"]="sat", + ["sr"]="суб.", + ["sr-latn"]="sub.", + }, + }, ["section"]={ ["hidden"]=true, ["labels"]={ ["af"]="Paragraaf ", ["ar"]="فصل ", + ["bg"]="Cекция ", ["ca"]="Secció ", ["cn"]={ "第", "节" }, ["cs"]="Sekce ", @@ -2378,8 +2664,8 @@ data.labels={ ["kr"]={ "제", "절" }, ["la"]="", ["lt"]="", - ["nb"]="", ["mk"]="Поглавје ", + ["nb"]="", ["nl"]="", ["nn"]="", ["pe"]="بخش ", @@ -2389,6 +2675,8 @@ data.labels={ ["ru"]="", ["sk"]="Sekcia ", ["sl"]="", + ["sr"]="Одељак ", + ["sr-latn"]="Odeljak ", ["sv"]="", ["tk"]="", ["tr"]="", @@ -2400,6 +2688,8 @@ data.labels={ ["labels"]={ ["af"]="", ["ar"]="انظر ", + ["be"]="гл. ", + ["bg"]="погледни", ["ca"]="", ["cs"]="viz ", ["da"]="se ", @@ -2427,6 +2717,8 @@ data.labels={ ["ru"]="см. ", ["sk"]="pozri ", ["sl"]="glej ", + ["sr"]="види ", + ["sr-latn"]="vidi ", ["sv"]="se ", ["tk"]="", ["tr"]="", @@ -2440,6 +2732,8 @@ data.labels={ ["ar"]="سبتمبر", ["ar-ma"]="شتنبر", ["ar-sy"]="أيلول", + ["be"]="верасня", + ["bg"]="септември", ["ca"]="setembre", ["cn"]="九月", ["cs"]="září", @@ -2469,6 +2763,8 @@ data.labels={ ["ru"]="сентября", ["sk"]="septembra", ["sl"]="september", + ["sr"]="септембар", + ["sr-latn"]="septembar", ["sv"]="september", ["tk"]="sentýabr", ["tr"]="eylül", @@ -2510,6 +2806,8 @@ data.labels={ ["ru"]="", ["sk"]="sept.", ["sl"]="", + ["sr"]="сеп.", + ["sr-latn"]="sep.", ["sv"]="", ["tk"]="", ["tr"]="", @@ -2522,6 +2820,7 @@ data.labels={ ["labels"]={ ["af"]="", ["ar"]="فصل أدنى ", + ["bg"]="Подсекция ", ["ca"]="Subsecció ", ["cn"]="", ["cs"]="Podsekce ", @@ -2550,6 +2849,8 @@ data.labels={ ["ru"]="", ["sk"]="Podsekcia ", ["sl"]="", + ["sr"]="Пододељак ", + ["sr-latn"]="Pododeljak ", ["sv"]="", ["tk"]="", ["tr"]="", @@ -2562,6 +2863,7 @@ data.labels={ ["labels"]={ ["af"]="", ["ar"]="فصل أدنى أدنى ", + ["bg"]="Подподсекция ", ["ca"]="Subsubsecció ", ["cn"]="", ["cs"]="Podpodsekce ", @@ -2590,6 +2892,8 @@ data.labels={ ["ru"]="", ["sk"]="Podpodsekcia ", ["sl"]="", + ["sr"]="Подпододељак ", + ["sr-latn"]="Podpododeljak ", ["sv"]="", ["tk"]="", ["tr"]="", @@ -2602,6 +2906,7 @@ data.labels={ ["labels"]={ ["af"]="", ["ar"]="فصل أدنى أدنى أدنى ", + ["bg"]="Подподподсекция ", ["ca"]="Subsubsubsecció ", ["cn"]="", ["cs"]="Podpodpodsekce ", @@ -2630,6 +2935,8 @@ data.labels={ ["ru"]="", ["sk"]="Podpodpodsekcia ", ["sl"]="", + ["sr"]="Подподпододељак ", + ["sr-latn"]="Podpodpododeljak ", ["sv"]="", ["tk"]="", ["tr"]="", @@ -2641,6 +2948,8 @@ data.labels={ ["labels"]={ ["af"]="sondag", ["ar"]="الأحد", + ["be"]="нядзеля", + ["bg"]="неделя", ["ca"]="diumenge", ["cn"]="星期日", ["cs"]="neděle", @@ -2670,6 +2979,8 @@ data.labels={ ["ru"]="воскресенье", ["sk"]="nedeľa", ["sl"]="nedelja", + ["sr"]="недеља", + ["sr-latn"]="nedelja", ["sv"]="söndag", ["tk"]="dynç gün", ["tr"]="pazar", @@ -2677,10 +2988,20 @@ data.labels={ ["vi"]="chủ nhật", }, }, + ["sunday:mnem"]={ + ["labels"]={ + ["de"]="So.", + ["en"]="sun", + ["sr"]="нед.", + ["sr-latn"]="ned.", + }, + }, ["table"]={ ["labels"]={ ["af"]="Tabel", ["ar"]="جدول ", + ["be"]="Табліца ", + ["bg"]="Таблица ", ["ca"]="Taula ", ["cn"]="表", ["cs"]="Tabulka ", @@ -2710,6 +3031,8 @@ data.labels={ ["ru"]="Таблица ", ["sk"]="Tabuľka ", ["sl"]="Tabela ", + ["sr"]="Табела ", + ["sr-latn"]="Tabela ", ["sv"]="Tabell ", ["tk"]="Tablisa", ["tr"]="Tablo ", @@ -2721,6 +3044,8 @@ data.labels={ ["labels"]={ ["af"]="donderdag", ["ar"]="الخميس", + ["be"]="чацвер", + ["bg"]="четвъртък", ["ca"]="dijous", ["cn"]="星期四", ["cs"]="čtvrtek", @@ -2750,6 +3075,8 @@ data.labels={ ["ru"]="четверг", ["sk"]="štvrtok", ["sl"]="četrtek", + ["sr"]="четвртак", + ["sr-latn"]="četvrtak", ["sv"]="torsdag", ["tk"]="dördünji gün", ["tr"]="perşembe", @@ -2757,10 +3084,20 @@ data.labels={ ["vi"]="thứ năm", }, }, + ["thursday:mnem"]={ + ["labels"]={ + ["de"]="Do.", + ["en"]="thu", + ["sr"]="чет.", + ["sr-latn"]="čet.", + }, + }, ["tuesday"]={ ["labels"]={ ["af"]="dinsdag", ["ar"]="الثلاثاء", + ["be"]="аўторак", + ["bg"]="вторник", ["ca"]="dimarts", ["cn"]="星期二", ["cs"]="úterý", @@ -2790,6 +3127,8 @@ data.labels={ ["ru"]="вторник", ["sk"]="utorok", ["sl"]="torek", + ["sr"]="уторак", + ["sr-latn"]="utorak", ["sv"]="tisdag", ["tk"]="ikinji gün", ["tr"]="salı", @@ -2797,10 +3136,20 @@ data.labels={ ["vi"]="thứ ba", }, }, + ["tuesday:mnem"]={ + ["labels"]={ + ["de"]="Di.", + ["en"]="tue", + ["sr"]="уто.", + ["sr-latn"]="uto.", + }, + }, ["wednesday"]={ ["labels"]={ ["af"]="woensdag", ["ar"]="الأربعاء", + ["be"]="серада", + ["bg"]="сряда", ["ca"]="dimecres", ["cn"]="星期三", ["cs"]="středa", @@ -2830,6 +3179,8 @@ data.labels={ ["ru"]="среда", ["sk"]="streda", ["sl"]="sreda", + ["sr"]="среда", + ["sr-latn"]="sreda", ["sv"]="onsdag", ["tk"]="üçünji", ["tr"]="çarşamba", @@ -2837,14 +3188,25 @@ data.labels={ ["vi"]="thứ tư", }, }, + ["wednesday:mnem"]={ + ["labels"]={ + ["de"]="Mi.", + ["en"]="wed", + ["sr"]="сре.", + ["sr-latn"]="sre.", + }, + }, ["year"]={ ["labels"]={ + ["bg"]="година", ["en"]="year", ["et"]="aasta", ["kr"]="년", ["mk"]="година", ["nl"]="jaar", ["pe"]="سال", + ["sr"]="година", + ["sr-latn"]="godina", }, }, }, @@ -2853,6 +3215,8 @@ data.labels={ ["labels"]={ ["af"]="Afkortings", ["ar"]="الاختصارات", + ["be"]="Спіс скарачэнняў", + ["bg"]="Съкращения", ["ca"]="Abreviacions", ["cn"]="缩略语", ["cs"]="Zkratky", @@ -2882,6 +3246,8 @@ data.labels={ ["ru"]="Список сокращений", ["sk"]="Skratky", ["sl"]="Kratice", + ["sr"]="Скраћенице", + ["sr-latn"]="Skraćenice", ["sv"]="Förkortningar", ["tk"]="Gysgaltmalar", ["tr"]="Kısaltmalar", @@ -2893,6 +3259,8 @@ data.labels={ ["labels"]={ ["af"]="Inhoud", ["ar"]="المحتويات", + ["be"]="Змест", + ["bg"]="Съдържание", ["ca"]="Índex de continguts", ["cn"]="目录", ["cs"]="Obsah", @@ -2922,6 +3290,8 @@ data.labels={ ["ru"]="Содержание", ["sk"]="Obsah", ["sl"]="Kazalo", + ["sr"]="Садржај", + ["sr-latn"]="Sadržaj", ["sv"]="Innehåll", ["tk"]="Mazmuny", ["tr"]="Fihrist", @@ -2933,6 +3303,7 @@ data.labels={ ["labels"]={ ["af"]="Figure", ["ar"]="الأشكال", + ["be"]="Спіс ілюстрацый", ["ca"]="Figures", ["cn"]="图形", ["cs"]="Seznam obrázků", @@ -2962,6 +3333,8 @@ data.labels={ ["ru"]="Список иллюстраций", ["sk"]="Zoznam obrázkov", ["sl"]="Slike", + ["sr"]="Слике", + ["sr-latn"]="Slike", ["sv"]="Figurer", ["tk"]="Suratlar", ["tr"]="Şekiller", @@ -2973,6 +3346,7 @@ data.labels={ ["labels"]={ ["af"]="Grafieke", ["ar"]="الرسوم", + ["be"]="Графiка", ["ca"]="Gràfiques", ["cn"]="图", ["cs"]="Seznam grafů", @@ -3002,6 +3376,8 @@ data.labels={ ["ru"]="Список графиков", ["sk"]="Zoznam grafov", ["sl"]="Slike", + ["sr"]="Графици", + ["sr-latn"]="Grafici", ["sv"]="Grafik", ["tk"]="Grafikler", ["tr"]="Grafikler", @@ -3013,6 +3389,8 @@ data.labels={ ["labels"]={ ["af"]="Indeks", ["ar"]="الفهرس", + ["be"]="Алфавітны паказальнік", + ["bg"]="Индэкс", ["ca"]="Índex alfabètic", ["cn"]="索引", ["cs"]="Rejstřík", @@ -3042,6 +3420,9 @@ data.labels={ ["ru"]="Алфавитный указатель", ["sk"]="Zoznam", ["sl"]="Stvarno kazalo", + ["sr"]="Индекс", + ["sr"]="Индекс појмова", + ["sr-latn"]="Indeks pojmova", ["sv"]="Sakregister", ["tk"]="Indeks", ["tr"]="İndex", @@ -3053,6 +3434,7 @@ data.labels={ ["labels"]={ ["af"]="Intermezzos", ["ar"]="فسح", + ["be"]="Спіс уставак", ["ca"]="Intermedis", ["cn"]="퉣", ["cs"]="Intermezza", @@ -3081,6 +3463,9 @@ data.labels={ ["ru"]="Список вставок", ["sk"]="Intermezzá", ["sl"]="Intermezzi", + ["sr"]="Интермеззи", + ["sr"]="Списак дигресија", + ["sr-latn"]="Spisak digresija", ["sv"]="Intermezzon", ["tk"]="Arakesmeler", ["tr"]="", @@ -3092,6 +3477,8 @@ data.labels={ ["labels"]={ ["af"]="Logos", ["ar"]="الشعارات", + ["be"]="Лагатыпы", + ["bg"]="Логотипи", ["ca"]="Logotips", ["cn"]="徽贬", ["cs"]="Loga", @@ -3121,6 +3508,8 @@ data.labels={ ["ru"]="Логотипы", ["sk"]="Logá", ["sl"]="Logotipi", + ["sr"]="Логотипи", + ["sr-latn"]="Logotipi", ["sv"]="Loggor", ["tk"]="Logolar", ["tr"]="Logolar", @@ -3158,6 +3547,8 @@ data.labels={ ["ru"]="", ["sk"]="Literatúra", ["sl"]="Literatura", + ["sr"]="Литература", + ["sr-latn"]="Literatura", ["sv"]="", ["tk"]="", ["tr"]="", @@ -3169,6 +3560,7 @@ data.labels={ ["labels"]={ ["af"]="Tabelle", ["ar"]="الجداول", + ["be"]="Спіс табліц", ["ca"]="Taules", ["cn"]="表格", ["cs"]="Seznam tabulek", @@ -3198,6 +3590,8 @@ data.labels={ ["ru"]="Список таблиц", ["sk"]="Zoznam tabuliek", ["sl"]="Tabele", + ["sr"]="Табеле", + ["sr-latn"]="Tabele", ["sv"]="Tabeller", ["tk"]="Tablisalar", ["tr"]="Tablolar", @@ -3209,6 +3603,8 @@ data.labels={ ["labels"]={ ["af"]="Eenhede", ["ar"]="الوحدات", + ["be"]="Адзінкі вымярэння", + ["bg"]="Адзінкі", ["ca"]="Unitats", ["cn"]="计量单位", ["cs"]="Jednotky", @@ -3238,6 +3634,8 @@ data.labels={ ["ru"]="Единицы измерения", ["sk"]="Jednotky", ["sl"]="Enote", + ["sr"]="Јединице", + ["sr-latn"]="Jedinice", ["sv"]="Enheter", ["tk"]="Birlikler", ["tr"]="Birimler", diff --git a/tex/context/base/mkiv/luat-cbk.lua b/tex/context/base/mkiv/luat-cbk.lua index d3184e1af..9fd55f3ec 100644 --- a/tex/context/base/mkiv/luat-cbk.lua +++ b/tex/context/base/mkiv/luat-cbk.lua @@ -333,7 +333,7 @@ nodes (in this case 121049).</p> <p>The following code is kind of experimental. In the documents that describe the development of <l n='luatex'/> we report -on speed tests. One observation is thta it sometimes helps to +on speed tests. One observation is that it sometimes helps to restart the collector. Okay, experimental code has been removed, because messing aroudn with the gc is too unpredictable.</p> --ldx]]-- @@ -347,6 +347,8 @@ local garbagecollector = utilities.garbagecollector garbagecollector.enabled = false -- could become a directive garbagecollector.criterium = 4*1024*1024 +-- garbagecollector.enabled = true + -- Lua allocates up to 12 times the amount of memory needed for -- handling a string, and for large binary chunks (like chinese otf -- files) we get a prominent memory consumption. Even when a variable diff --git a/tex/context/base/mkiv/luat-sto.lua b/tex/context/base/mkiv/luat-sto.lua index bd52e9fe5..feb546400 100644 --- a/tex/context/base/mkiv/luat-sto.lua +++ b/tex/context/base/mkiv/luat-sto.lua @@ -94,22 +94,6 @@ if environment.initex then end --- to be tested with otf caching: - -function lua.collectgarbage(threshold) - local current = collectgarbage("count") - local threshold = threshold or 256 * 1024 - while true do - collectgarbage("collect") - local previous = collectgarbage("count") - if current - previous < threshold then - break - else - current = previous - end - end -end - statistics.register("stored bytecode data", function() local nofbytecodes = CONTEXTLMTXMODE > 0 and status.luastate.bytecodes or status.luabytecodes local nofmodules = (storage.nofmodules > 0 and storage.nofmodules) or (nofbytecodes - lua.firstbytecode - 1) diff --git a/tex/context/base/mkiv/meta-imp-txt.mkiv b/tex/context/base/mkiv/meta-imp-txt.mkiv index c814d2cb0..2c28acf72 100644 --- a/tex/context/base/mkiv/meta-imp-txt.mkiv +++ b/tex/context/base/mkiv/meta-imp-txt.mkiv @@ -80,16 +80,17 @@ \unexpanded\def\adaptparshape {\def\docommand##1% - {\ifcase\scratchcounter - \expandafter\appendtoks\space##1 \to\scratchtoks - \else - \advance\scratchcounter\minusone - \fi}% + {\doifsomething{##1}% + {\ifcase\scratchcounter\relax + \expandafter\appendtoks\space##1 \to\scratchtoks + \else + \advance\scratchcounter\minusone + \fi}}% \scratchcounter\prevgraf \doglobal\decrement(\totalparlines,\scratchcounter)% \multiply\scratchcounter\plustwo \scratchtoks\emptytoks - \expanded{\processseparatedlist[\the\partoks][\space]}\docommand + \expanded{\processseparatedlist[\the\partoks][\space]}\docommand % we can have two spaces \global\partoks\scratchtoks \parshape\totalparlines\the\partoks\relax} diff --git a/tex/context/base/mkiv/mult-sys.mkiv b/tex/context/base/mkiv/mult-sys.mkiv index b4c006234..7e9792720 100644 --- a/tex/context/base/mkiv/mult-sys.mkiv +++ b/tex/context/base/mkiv/mult-sys.mkiv @@ -34,6 +34,7 @@ \definesystemconstant {hans} \definesystemconstant {taco} +\definesystemconstant {wolfgang} %D First we define some system constants used for both the multi||lingual %D interface and multi||linguag typesetting. @@ -46,6 +47,7 @@ \definesystemconstant {ancientgreek} \definesystemconstant {agr} \definesystemconstant {ancientlatin} \definesystemconstant {ala} \definesystemconstant {arabic} \definesystemconstant {ar} +\definesystemconstant {belarussian} \definesystemconstant {be} \definesystemconstant {bokmal} \definesystemconstant {nb} \definesystemconstant {catalan} \definesystemconstant {ca} \definesystemconstant {chinese} \definesystemconstant {cn} @@ -71,6 +73,7 @@ \definesystemconstant {latin} \definesystemconstant {la} \definesystemconstant {lithuanian} \definesystemconstant {lt} \definesystemconstant {malayalam} \definesystemconstant {ml} +\definesystemconstant {macedonian} \definesystemconstant {mk} \definesystemconstant {norwegian} \definesystemconstant {no} \definesystemconstant {nynorsk} \definesystemconstant {nn} \definesystemconstant {persian} \definesystemconstant {pe} @@ -80,6 +83,7 @@ \definesystemconstant {russian} \definesystemconstant {ru} \definesystemconstant {slovak} \definesystemconstant {sk} \definesystemconstant {slovenian} \definesystemconstant {sl} +\definesystemconstant {serbian} \definesystemconstant {sr} \definesystemconstant {spanish} \definesystemconstant {es} \definesystemconstant {swedish} \definesystemconstant {sv} \definesystemconstant {thai} \definesystemconstant {th} % mojca mentioned it at BT2013 but we need more info diff --git a/tex/context/base/mkiv/node-nut.lua b/tex/context/base/mkiv/node-nut.lua index c73397305..9909194e7 100644 --- a/tex/context/base/mkiv/node-nut.lua +++ b/tex/context/base/mkiv/node-nut.lua @@ -200,7 +200,6 @@ nuts.unset_attribute = direct.unset_attribute nuts.usedlist = direct.usedlist nuts.uses_font = direct.uses_font nuts.vpack = direct.vpack -nuts.writable_spec = direct.writable_spec nuts.write = direct.write nuts.mlist_to_hlist = direct.mlist_to_hlist nuts.has_dimensions = direct.has_dimensions diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf Binary files differindex ac7f9a639..b1533b02b 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 6d34b7e13..a2c0ea9a5 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf diff --git a/tex/context/base/mkiv/syst-aux.lua b/tex/context/base/mkiv/syst-aux.lua index 2e50a9e5c..85604a232 100644 --- a/tex/context/base/mkiv/syst-aux.lua +++ b/tex/context/base/mkiv/syst-aux.lua @@ -130,115 +130,14 @@ local sentinel = spaces * (nohash^1 / "\\%0") local sargument = (single * digit)^1 local dargument = (double * digit)^1 --- first variant: --- --- local texpreamble = nil --- local usespaces = nil --- --- local pattern = Cs( -- ^-1 --- ( P("spaces") / function() usespaces = true return "" end )^0 --- * spaces --- * ( P("nospaces") / function() usespaces = false return "" end )^0 --- * spaces --- * ( P("global") / "\\global" )^0 --- * spaces --- * ( P("unexpanded") / "\\unexpanded" )^0 --- * spaces --- * Cc("\\expandafter\\") --- * spaces --- * ( P("expanded") / "e" )^0 --- * spaces --- * ( P((1-S(" #"))^1) / "def\\csname %0\\endcsname" ) --- * spaces --- * ( --- -- (double * digit)^1 * sentinel^-1 * double^-1 --- -- + (single * digit)^1 * sentinel^-1 * single^-1 --- ( P("[") * dargument * P("]") + dargument)^1 * sentinel^-1 * double^-1 --- + ( P("[") * sargument * P("]") + sargument)^1 * sentinel^-1 * single^-1 --- + sentinel^-1 * (double+single)^-1 --- ) --- ) --- --- local ctx_dostarttexdefinition = context.dostarttexdefinition --- --- local function texdefinition_one(str) --- usespaces = nil --- texpreamble = lpegmatch(pattern,str) --- if usespaces == true then --- setcatcode(32,10) -- space --- setcatcode(13, 5) -- endofline --- elseif usespaces == false then --- setcatcode(32, 9) -- ignore --- setcatcode(13, 9) -- ignore --- else --- -- this is default --- -- setcatcode(32,10) -- space --- -- setcatcode(13, 9) -- ignore --- end --- ctx_dostarttexdefinition() --- end --- --- local function texdefinition_two() --- context(texpreamble) --- end - --- second variant: --- --- -- default: --- -- --- -- setcatcode(32,10) -- space --- -- setcatcode(13, 9) -- ignore --- --- local function catcodes_s() --- setcatcode(32,10) -- space --- setcatcode(13, 5) -- endofline --- return "" --- end --- --- local function catcodes_n() --- setcatcode(32, 9) -- ignore --- setcatcode(13, 9) -- ignore --- return "" --- end --- --- local pattern = Cs( -- ^-1 --- ( P("spaces") * space / catcodes_s )^0 --- * spaces * ( P("nospaces") * space / catcodes_n )^0 --- * spaces * ( P("global") * space / "\\global" )^0 --- * spaces * ( P("unexpanded") * space / "\\unexpanded" )^0 --- * spaces * Cc("\\expandafter\\") --- * spaces * ( P("expanded") / "e" )^0 --- * spaces * ( P((1-S(" #["))^1) / "def\\csname %0\\endcsname" ) --- * spaces * ( --- -- (double * digit)^1 * sentinel^-1 * double^-1 --- -- + (single * digit)^1 * sentinel^-1 * single^-1 --- ( P("[") * dargument * P("]") + dargument)^1 * sentinel^-1 * double^-1 --- + ( P("[") * sargument * P("]") + sargument)^1 * sentinel^-1 * single^-1 --- + sentinel^-1 * (double+single)^-1 --- ) --- ) --- --- local texpreamble = nil --- --- local ctx_dostarttexdefinition = context.dostarttexdefinition --- --- local function texdefinition_one(str) --- texpreamble = lpegmatch(pattern,str) --- ctx_dostarttexdefinition() --- end --- --- local function texdefinition_two() --- context(texpreamble) --- end - -- third variant: -local global = nil -local unexpanded = nil -local expanded = nil -local optional = nil -local csname = nil -local rest = nil +local global = nil +local protected = nil +local expanded = nil +local optional = nil +local csname = nil +local rest = nil local function catcodes_s() setcatcode(32,10) -- space @@ -262,28 +161,6 @@ local option = ( + P("sixtuple") ) * (P("empty") + P("argument")) --- local pattern = ( --- ( P("spaces") * space / catcodes_s )^0 --- * spaces * ( P("nospaces") * space / catcodes_n )^0 --- * spaces * ( P("global") * space * Cc(true) + Cc(false) ) --- * spaces * ( P("unexpanded") * space * Cc(true) + Cc(false) ) --- * spaces * ( P("expanded") * space * Cc(true) + Cc(false) ) --- * spaces * ( C(option) * space + Cc(false) ) --- * spaces * ( C((1-S(" #["))^1) ) --- * spaces * Cs( --- ( P("[") * dargument * P("]") + dargument)^1 * sentinel^-1 * double^-1 --- + ( P("[") * sargument * P("]") + sargument)^1 * sentinel^-1 * single^-1 --- + sentinel^-1 * (double+single)^-1 --- ) --- ) --- --- local ctx_dostarttexdefinition = context.dostarttexdefinition --- --- local function texdefinition_one(str) --- global, unexpanded, expanded, optional, csname, rest = lpegmatch(pattern,str) --- ctx_dostarttexdefinition() --- end - local pattern = ( ( spaces * ( @@ -313,10 +190,10 @@ local pattern = ( local ctx_dostarttexdefinition = context.dostarttexdefinition local function texdefinition_one(str) - global = false - unexpanded = false - expanded = false - optional = false + global = false + protected = false + expanded = false + optional = false csname, rest = lpegmatch(pattern,str) ctx_dostarttexdefinition() end @@ -324,7 +201,7 @@ end local function texdefinition_two() if optional then context ( - (unexpanded and [[\unexpanded]] or "") .. + (protected and [[\protected]] or "") .. [[\expandafter]] .. (global and [[\xdef]] or [[\edef]]) .. [[\csname ]] .. csname .. [[\endcsname{\expandafter\noexpand\expandafter\do]] .. optional .. [[\csname _do_]] .. csname .. [[_\endcsname}\expandafter]] .. (global and [[\gdef]] or [[\edef]]) .. @@ -333,7 +210,7 @@ local function texdefinition_two() ) else context ( - (unexpanded and [[\unexpanded]] or "") .. + (protected and [[\protected]] or "") .. [[\expandafter]] .. (global and (expanded and [[\xdef]] or [[\gdef]]) or (expanded and [[\edef]] or [[\def]])) .. [[\csname ]] .. csname .. [[\endcsname ]] .. rest diff --git a/tex/context/base/mkxl/attr-col.lmt b/tex/context/base/mkxl/attr-col.lmt new file mode 100644 index 000000000..9c542a942 --- /dev/null +++ b/tex/context/base/mkxl/attr-col.lmt @@ -0,0 +1,666 @@ +if not modules then modules = { } end modules ['attr-col'] = { + version = 1.001, + comment = "companion to attr-col.mkiv", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +-- this module is being reconstructed and code will move to other places +-- we can also do the nsnone via a metatable and then also se index 0 + +-- list could as well refer to the tables (instead of numbers that +-- index into another table) .. depends on what we need + +local type, tonumber = type, tonumber +local concat = table.concat +local min, max, floor, mod = math.min, math.max, math.floor, math.mod + +local attributes = attributes +local nodes = nodes +local utilities = utilities +local logs = logs +local backends = backends +local storage = storage +local context = context +local tex = tex + +local variables = interfaces.variables +local v_yes = variables.yes +local v_no = variables.no + +local p_split_comma = lpeg.tsplitat(",") +local p_split_colon = lpeg.splitat(":") +local lpegmatch = lpeg.match + +local allocate = utilities.storage.allocate +local setmetatableindex = table.setmetatableindex + +local report_attributes = logs.reporter("attributes","colors") +local report_colors = logs.reporter("colors","support") +local report_transparencies = logs.reporter("transparencies","support") + +-- todo: document this but first reimplement this as it reflects the early +-- days of luatex / mkiv and we have better ways now + +-- nb: attributes: color etc is much slower than normal (marks + literals) but ... +-- nb. too many "0 g"s + +local states = attributes.states +local nodeinjections = backends.nodeinjections +local registrations = backends.registrations +local unsetvalue = attributes.unsetvalue + +local enableaction = nodes.tasks.enableaction +local setaction = nodes.tasks.setaction + +local registerstorage = storage.register +local formatters = string.formatters + +local interfaces = interfaces +local implement = interfaces.implement + +local texgetattribute = tex.getattribute + +-- We can distinguish between rules and glyphs but it's not worth the trouble. A +-- first implementation did that and while it saves a bit for glyphs and rules, it +-- costs more resourses for transparencies. So why bother. + +-- +-- colors +-- + +-- we can also collapse the two attributes: n, n+1, n+2 and then +-- at the tex end add 0, 1, 2, but this is not faster and less +-- flexible (since sometimes we freeze color attribute values at +-- the lua end of the game) +-- +-- we also need to store the colorvalues because we need then in mp +-- +-- This is a compromis between speed and simplicity. We used to store the +-- values and data in one array, which made in neccessary to store the +-- converters that need node constructor into strings and evaluate them +-- at runtime (after reading from storage). Think of: +-- +-- colors.strings = colors.strings or { } +-- +-- if environment.initex then +-- colors.strings[color] = "return colors." .. colorspace .. "(" .. concat({...},",") .. ")" +-- end +-- +-- registerstorage("attributes/colors/data", colors.strings, "attributes.colors.data") -- evaluated +-- +-- We assume that only processcolors are defined in the format. + +attributes.colors = attributes.colors or { } +local colors = attributes.colors + +local a_color = attributes.private('color') +local a_selector = attributes.private('colormodel') + +colors.data = allocate() +colors.values = colors.values or { } +colors.registered = colors.registered or { } +colors.weightgray = true +colors.attribute = a_color +colors.selector = a_selector +colors.default = 1 +colors.main = nil +colors.triggering = true +colors.supported = true +colors.model = "all" + +local data = colors.data +local values = colors.values +local registered = colors.registered + +local cmykrgbmode = 0 -- only for testing, already defined colors are not affected + +local numbers = attributes.numbers +local list = attributes.list + +registerstorage("attributes/colors/values", values, "attributes.colors.values") +registerstorage("attributes/colors/registered", registered, "attributes.colors.registered") + +directives.register("colors.cmykrgbmode", function(v) cmykrgbmode = tonumber(v) or 0 end) + +local f_colors = { + rgb = formatters["r:%s:%s:%s"], + cmyk = formatters["c:%s:%s:%s:%s"], + gray = formatters["s:%s"], + spot = formatters["p:%s:%s:%s:%s"], +} + +local models = { + [interfaces.variables.none] = unsetvalue, + black = unsetvalue, + bw = unsetvalue, + all = 1, + gray = 2, + rgb = 3, + cmyk = 4, +} + +local function rgbtocmyk(r,g,b) -- we could reduce + if not r then + return 0, 0, 0 + else + return 1-r, 1-g, 1-b, 0 + end +end + +local function cmyktorgb(c,m,y,k) + if not c then + return 0, 0, 0, 1 + elseif cmykrgbmode == 1 then + local d = 1.0 - k + return 1.0 - min(1.0,c*d+k), 1.0 - min(1.0,m*d+k), 1.0 - min(1.0,y*d+k) + else + return 1.0 - min(1.0,c +k), 1.0 - min(1.0,m +k), 1.0 - min(1.0,y +k) + end +end + +local function rgbtogray(r,g,b) + if not r then + return 0 + end + local w = colors.weightgray + if w == true then + return .30*r + .59*g + .11*b + elseif not w then + return r/3 + g/3 + b/3 + else + return w[1]*r + w[2]*g + w[3]*b + end +end + +local function cmyktogray(c,m,y,k) + return rgbtogray(cmyktorgb(c,m,y,k)) +end + +-- http://en.wikipedia.org/wiki/HSI_color_space +-- http://nl.wikipedia.org/wiki/HSV_(kleurruimte) + +-- h /= 60; // sector 0 to 5 +-- i = floor( h ); +-- f = h - i; // factorial part of h + +local function hsvtorgb(h,s,v) + if s > 1 then + s = 1 + elseif s < 0 then + s = 0 + elseif s == 0 then + return v, v, v + end + if v > 1 then + s = 1 + elseif v < 0 then + v = 0 + end + if h < 0 then + h = 0 + elseif h >= 360 then + h = mod(h,360) + end + local hd = h / 60 + local hi = floor(hd) + local f = hd - hi + local p = v * (1 - s) + local q = v * (1 - f * s) + local t = v * (1 - (1 - f) * s) + if hi == 0 then + return v, t, p + elseif hi == 1 then + return q, v, p + elseif hi == 2 then + return p, v, t + elseif hi == 3 then + return p, q, v + elseif hi == 4 then + return t, p, v + elseif hi == 5 then + return v, p, q + else + print("error in hsv -> rgb",h,s,v) + return 0, 0, 0 + end +end + +local function rgbtohsv(r,g,b) + local offset, maximum, other_1, other_2 + if r >= g and r >= b then + offset, maximum, other_1, other_2 = 0, r, g, b + elseif g >= r and g >= b then + offset, maximum, other_1, other_2 = 2, g, b, r + else + offset, maximum, other_1, other_2 = 4, b, r, g + end + if maximum == 0 then + return 0, 0, 0 + end + local minimum = other_1 < other_2 and other_1 or other_2 + if maximum == minimum then + return 0, 0, maximum + end + local delta = maximum - minimum + return (offset + (other_1-other_2)/delta)*60, delta/maximum, maximum +end + +local function graytorgb(s) -- unweighted + return 1-s, 1-s, 1-s +end + +local function hsvtogray(h,s,v) + return rgb_to_gray(hsv_to_rgb(h,s,v)) +end + +local function graytohsv(s) + return 0, 0, s +end + +local function hwbtorgb(hue,black,white) + local r, g, b = hsvtorgb(hue,1,.5) + local f = 1 - white - black + return f * r + white, f * g + white , f * b + white +end + +colors.rgbtocmyk = rgbtocmyk +colors.rgbtogray = rgbtogray +colors.cmyktorgb = cmyktorgb +colors.cmyktogray = cmyktogray +colors.rgbtohsv = rgbtohsv +colors.hsvtorgb = hsvtorgb +colors.hwbtorgb = hwbtorgb +colors.hsvtogray = hsvtogray +colors.graytohsv = graytohsv + +-- we can share some *data by using s, rgb and cmyk hashes, but +-- normally the amount of colors is not that large; storing the +-- components costs a bit of extra runtime, but we expect to gain +-- some back because we have them at hand; the number indicates the +-- default color space + +function colors.gray(s) + return { 2, s, s, s, s, 0, 0, 0, 1-s } +end + +function colors.rgb(r,g,b) + local s = rgbtogray(r,g,b) + local c, m, y, k = rgbtocmyk(r,g,b) + return { 3, s, r, g, b, c, m, y, k } +end + +function colors.cmyk(c,m,y,k) + local s = cmyktogray(c,m,y,k) + local r, g, b = cmyktorgb(c,m,y,k) + return { 4, s, r, g, b, c, m, y, k } +end + +--~ function colors.spot(parent,f,d,p) +--~ return { 5, .5, .5, .5, .5, 0, 0, 0, .5, parent, f, d, p } +--~ end + +function colors.spot(parent,f,d,p) + -- inspect(parent) inspect(f) inspect(d) inspect(p) + if type(p) == "number" then + local n = list[numbers.color][parent] -- hard coded ref to color number + if n then + local v = values[n] + if v then + -- the via cmyk hack is dirty, but it scales better + local c, m, y, k = p*v[6], p*v[7], p*v[8], p*v[9] + local r, g, b = cmyktorgb(c,m,y,k) + local s = cmyktogray(c,m,y,k) + return { 5, s, r, g, b, c, m, y, k, parent, f, d, p } + end + end + else + -- todo, multitone (maybe p should be a table) + local ps = lpegmatch(p_split_comma,p) + local ds = lpegmatch(p_split_comma,d) + local c, m, y, k = 0, 0, 0, 0 + local done = false + for i=1,#ps do + local p = tonumber(ps[i]) + local d = ds[i] + if p and d then + local n = list[numbers.color][d] -- hard coded ref to color number + if n then + local v = values[n] + if v then + c = c + p*v[6] + m = m + p*v[7] + y = y + p*v[8] + k = k + p*v[9] + done = true + end + end + end + end + if done then + local r, g, b = cmyktorgb(c,m,y,k) + local s = cmyktogray(c,m,y,k) + local f = tonumber(f) + return { 5, s, r, g, b, c, m, y, k, parent, f, d, p } + end + end + return { 5, .5, .5, .5, .5, 0, 0, 0, .5, parent, f, d, p } +end + +local function graycolor(...) graycolor = nodeinjections.graycolor return graycolor(...) end +local function rgbcolor (...) rgbcolor = nodeinjections.rgbcolor return rgbcolor (...) end +local function cmykcolor(...) cmykcolor = nodeinjections.cmykcolor return cmykcolor(...) end +local function spotcolor(...) spotcolor = nodeinjections.spotcolor return spotcolor(...) end + +local function extender(colors,key) + if colors.supported and key == "none" then + local d = graycolor(0) + colors.none = d + return d + end +end + +local function reviver(data,n) + if colors.supported then + local v = values[n] + local d + if not v then + local gray = graycolor(0) + d = { gray, gray, gray, gray } + report_attributes("unable to revive color %a",n) + else + local model = colors.forcedmodel(v[1]) + if model == 2 then + local gray = graycolor(v[2]) + d = { gray, gray, gray, gray } + elseif model == 3 then + local gray = graycolor(v[2]) + local rgb = rgbcolor(v[3],v[4],v[5]) + local cmyk = cmykcolor(v[6],v[7],v[8],v[9]) + d = { rgb, gray, rgb, cmyk } + elseif model == 4 then + local gray = graycolor(v[2]) + local rgb = rgbcolor(v[3],v[4],v[5]) + local cmyk = cmykcolor(v[6],v[7],v[8],v[9]) + d = { cmyk, gray, rgb, cmyk } + elseif model == 5 then + local spot = spotcolor(v[10],v[11],v[12],v[13]) + -- d = { spot, gray, rgb, cmyk } + d = { spot, spot, spot, spot } + end + end + data[n] = d + return d + end +end + +setmetatableindex(colors, extender) +setmetatableindex(colors.data, reviver) + +function colors.filter(n) + return concat(data[n],":",5) +end + +-- unweighted (flat) gray could be another model but a bit work as we need to check: +-- +-- attr-col colo-ini colo-run +-- grph-inc grph-wnd +-- lpdf-col lpdf-fmt lpdf-fld lpdf-grp +-- meta-pdf meta-pdh mlib-pps +-- +-- but as we never needed it we happily delay that. + +function colors.setmodel(name,weightgray) + if weightgray == true or weightgray == v_yes then + weightgray = true + elseif weightgray == false or weightgray == v_no then + weightgray = false + else + local r, g, b = lpegmatch(p_split_colon,weightgray) + if r and g and b then + weightgray = { r, g, b } + else + weightgray = true + end + end + local default = models[name] or 1 + + colors.model = name -- global, not useful that way + colors.default = default -- global + colors.weightgray = weightgray -- global + + -- avoid selective checking is no need for it + + local forced = colors.forced + + if forced == nil then + -- unset + colors.forced = default + elseif forced == false then + -- assumed mixed + elseif forced ~= default then + -- probably mixed + colors.forced = false + else + -- stil the same + end + return default +end + +function colors.register(name, colorspace, ...) -- passing 9 vars is faster (but not called that often) + local stamp = f_colors[colorspace](...) + local color = registered[stamp] + if not color then + color = #values + 1 + values[color] = colors[colorspace](...) + registered[stamp] = color + -- colors.reviver(color) + end + if name then + list[a_color][name] = color -- not grouped, so only global colors + end + return registered[stamp] +end + +function colors.value(id) + return values[id] +end + +attributes.colors.handler = nodes.installattributehandler { + name = "color", + namespace = colors, + initializer = states.initialize, + finalizer = states.finalize, + processor = states.selective, + resolver = function() return colors.main end, +} + +function colors.enable(value) + setaction("shipouts","attributes.colors.handler",not (value == false or not colors.supported)) +end + +function colors.forcesupport(value) -- can move to attr-div + colors.supported = value + report_colors("color is %ssupported",value and "" or "not ") + colors.enable(value) +end + +function colors.toattributes(name) + local mc = list[a_color][name] + local mm = texgetattribute(a_selector) + return (mm == unsetvalue and 1) or mm or 1, mc or list[a_color][1] or unsetvalue +end + +-- transparencies + +local a_transparency = attributes.private('transparency') + +attributes.transparencies = attributes.transparencies or { } +local transparencies = attributes.transparencies +transparencies.registered = transparencies.registered or { } +transparencies.data = allocate() +transparencies.values = transparencies.values or { } +transparencies.triggering = true +transparencies.attribute = a_transparency +transparencies.supported = true + +local registered = transparencies.registered -- we could use a 2 dimensional table instead +local data = transparencies.data +local values = transparencies.values +local f_transparency = formatters["%s:%s"] + +registerstorage("attributes/transparencies/registered", registered, "attributes.transparencies.registered") +registerstorage("attributes/transparencies/values", values, "attributes.transparencies.values") + +local function inject_transparency(...) + inject_transparency = nodeinjections.transparency + return inject_transparency(...) +end + +local function register_transparency(...) + register_transparency = registrations.transparency + return register_transparency(...) +end + +function transparencies.register(name,a,t,force) -- name is irrelevant here (can even be nil) + -- Force needed here for metapost converter. We could always force + -- but then we'd end up with transparencies resources even if we + -- would not use transparencies (but define them only). This is + -- somewhat messy. + local stamp = f_transparency(a,t) + local n = registered[stamp] + if not n then + n = #values + 1 + values[n] = { a, t } + registered[stamp] = n + if force then + register_transparency(n,a,t) + end + elseif force and not data[n] then + register_transparency(n,a,t) + end + if name then + list[a_transparency][name] = n -- not grouped, so only global transparencies + end + return registered[stamp] +end + +local function extender(transparencies,key) + if colors.supported and key == "none" then + local d = inject_transparency(0) + transparencies.none = d + return d + end +end + +local function reviver(data,n) + if n and transparencies.supported then + local v = values[n] + local d + if not v then + d = inject_transparency(0) + else + d = inject_transparency(n) + register_transparency(n,v[1],v[2]) + end + data[n] = d + return d + else + return "" + end +end + +setmetatableindex(transparencies,extender) +setmetatableindex(transparencies.data,reviver) -- register if used + +-- check if there is an identity + +function transparencies.value(id) + return values[id] +end + +attributes.transparencies.handler = nodes.installattributehandler { + name = "transparency", + namespace = transparencies, + initializer = states.initialize, + finalizer = states.finalize, + processor = states.process, +} + +function transparencies.enable(value) -- nil is enable + setaction("shipouts","attributes.transparencies.handler",not (value == false or not transparencies.supported)) +end + +function transparencies.forcesupport(value) -- can move to attr-div + transparencies.supported = value + report_transparencies("transparency is %ssupported",value and "" or "not ") + transparencies.enable(value) +end + +function transparencies.toattribute(name) + return list[a_transparency][name] or unsetvalue +end + +--- colorintents: overprint / knockout + +attributes.colorintents = attributes.colorintents or { } +local colorintents = attributes.colorintents +colorintents.data = allocate() -- colorintents.data or { } +colorintents.attribute = attributes.private('colorintent') + +colorintents.registered = allocate { + overprint = 1, + knockout = 2, +} + +local data, registered = colorintents.data, colorintents.registered + +local function extender(colorintents,key) + if key == "none" then + local d = data[2] + colorintents.none = d + return d + end +end + +local function reviver(data,n) + if n == 1 then + local d = nodeinjections.overprint() -- called once + data[1] = d + return d + elseif n == 2 then + local d = nodeinjections.knockout() -- called once + data[2] = d + return d + end +end + +setmetatableindex(colorintents, extender) +setmetatableindex(colorintents.data, reviver) + +function colorintents.register(stamp) + return registered[stamp] or registered.overprint +end + +colorintents.handler = nodes.installattributehandler { + name = "colorintent", + namespace = colorintents, + initializer = states.initialize, + finalizer = states.finalize, + processor = states.process, +} + +function colorintents.enable() + enableaction("shipouts","attributes.colorintents.handler") +end + +-- interface + +implement { name = "enablecolor", onlyonce = true, actions = colors.enable } +implement { name = "enabletransparency", onlyonce = true, actions = transparencies.enable } +implement { name = "enablecolorintents", onlyonce = true, actions = colorintents.enable } + +--------- { name = "registercolor", actions = { colors .register, context }, arguments = "string" } +--------- { name = "registertransparency", actions = { transparencies.register, context }, arguments = "string" } +implement { name = "registercolorintent", actions = { colorintents .register, context }, arguments = "string" } diff --git a/tex/context/base/mkxl/attr-col.mkxl b/tex/context/base/mkxl/attr-col.mkxl index c75f448e9..0c23f2ce3 100644 --- a/tex/context/base/mkxl/attr-col.mkxl +++ b/tex/context/base/mkxl/attr-col.mkxl @@ -13,7 +13,7 @@ \writestatus{loading}{ConTeXt Attribute Macros / Color} -\registerctxluafile{attr-col}{} +\registerctxluafile{attr-col}{autosuffix} \unprotect diff --git a/tex/context/base/mkxl/cont-log.mkxl b/tex/context/base/mkxl/cont-log.mkxl index f35c6f169..4df509f60 100644 --- a/tex/context/base/mkxl/cont-log.mkxl +++ b/tex/context/base/mkxl/cont-log.mkxl @@ -139,20 +139,27 @@ \def\syst_logos_meta_hyphen % there is no hyphenchar in this font {\discretionary{\vrule\s!height.33\emwidth\s!depth-.27\emwidth\s!width.33\emwidth}{}{}} -\frozen\instance\protected\def\MetaFont +\frozen\instance\protected\def\MetaFontLogo {\dontleavehmode \begingroup \setMFPfont META\syst_logos_meta_hyphen FONT% \endgroup} -% \protected\def\MetaPost +\protected\def\MetaPostLogo + {\dontleavehmode + \begingroup + \setMFPfont META\syst_logos_meta_hyphen POST% + \endgroup} + +% \protected\def\MetaFunLogo % {\dontleavehmode % \begingroup -% \setMFPfont META\syst_logos_meta_hyphen POST% +% \setMFPfont META\syst_logos_meta_hyphen FUN% % \endgroup} -% + % As decided on the ConText Meeting 2013 the logo has been simplified: +\instance\protected\def\MetaFont{MetaFont} \instance\protected\def\MetaPost{MetaPost} \instance\protected\def\MetaFun {MetaFun} diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl index 9447d0f35..26de0b443 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.02.20 16:46} +\newcontextversion{2021.02.23 17:41} %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 8a983dd9f..f72721c9c 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.02.20 16:46} +\immutable\edef\contextversion{2021.02.23 17:41} %overloadmode 1 % check frozen / warning %overloadmode 2 % check frozen / error diff --git a/tex/context/base/mkxl/driv-shp.lmt b/tex/context/base/mkxl/driv-shp.lmt index 945d3c963..7bbe0a8e9 100644 --- a/tex/context/base/mkxl/driv-shp.lmt +++ b/tex/context/base/mkxl/driv-shp.lmt @@ -8,7 +8,6 @@ if not modules then modules = { } end modules ['driv-shp'] = { } local type, next = type, next -local round = math.round local setmetatableindex = table.setmetatableindex local formatters = string.formatters @@ -16,7 +15,11 @@ local concat = table.concat local keys = table.keys local sortedhash = table.sortedhash local splitstring = string.split +local find = string.find +local stripstring = string.strip local idiv = number.idiv +local sequenced = table.sequenced +local round = math.round local extract = bit32.extract local nuts = nodes.nuts @@ -1312,7 +1315,8 @@ do ----- tonut = nodes.tonut local properties = nodes.properties.data - local flush = texio.write_nl + local flush = texio.write + local flushline = texio.write_nl local periods = utilities.strings.newrepeater(".") @@ -1321,12 +1325,22 @@ do if p then local done = false for k, v in sortedhash(p) do - if done then - flush("\n") - else - done = true + local t = type(v) +-- if done then +-- flushline("\n") +-- else +-- done = true +-- end + if t == "string" then + if find(v,"[\n\r]") then + v = "\n" .. stripstring(v) .. "\n" + end + elseif t == "table" then + v = sequenced(v) + elseif t ~= "number" and t ~= "boolean" then + v = "<" .. tostring(v) .. ">" end - flush(periods[l+1] .. " " .. k .. " = " .. tostring(v)) + flushline(periods[l+1] .. " " .. k .. " = " .. v) end end end @@ -1338,7 +1352,7 @@ do callback.register("show_whatsit",function(n,l) local s = nodes.whatsitcodes[n.subtype] - texio.write(" [" .. s .. "]") + flush(" [" .. s .. "]") local w = whatsittracers[s] if w then w(n,l) diff --git a/tex/context/base/mkxl/font-mps.lmt b/tex/context/base/mkxl/font-mps.lmt index d6bf888c1..8cab9cf5c 100644 --- a/tex/context/base/mkxl/font-mps.lmt +++ b/tex/context/base/mkxl/font-mps.lmt @@ -280,7 +280,7 @@ local s_nothing = "(origin scaled 10)" local sc = 10 local fc = number.dimenfactors.bp -function metapost.glyph(kind,font,char,advance,shift,ex) +local function glyph(kind,font,char,advance,shift,ex) local character = characters[font][char] if character then local index = character.index @@ -312,6 +312,8 @@ function metapost.glyph(kind,font,char,advance,shift,ex) end end +metapost.glyph = glyph + local kind = "" local buffer = { } local b = 0 @@ -323,7 +325,7 @@ end local function flushcharacter(current, pos_h, pos_v, pod_r, font, char) local char, font = isglyph(current) - local code = metapost.glyph(kind,font,char,pos_h*fc,pos_v*fc,getexpansion(current)) + local code = glyph(kind,font,char,pos_h*fc,pos_v*fc,getexpansion(current)) if code then b = b + 1 buffer[b] = code @@ -333,7 +335,7 @@ end local function flushrule(current, pos_h, pos_v, pos_r, size_h, size_v, subtype) if subtype == normalrule_code then b = b + 1 - buffer[b] = f_rule("f",pos_h*fc,pos_v*fc,size_h*fc,size_v*fc) + buffer[b] = f_rule(kind,pos_h*fc,pos_v*fc,size_h*fc,size_v*fc) elseif subtype == outlinerule_code then b = b + 1 buffer[b] = f_rule("d",pos_h*fc,pos_v*fc,size_h*fc,size_v*fc) @@ -350,11 +352,11 @@ local function flushrule(current, pos_h, pos_v, pos_r, size_h, size_v, subtype) end local function flushsimplerule(pos_h, pos_v, pos_r, size_h, size_v) - flush_rule(false,pos_h,pos_v,pos_r,size_h,size_v,normalrule_code) + flushrule(false,pos_h,pos_v,pos_r,size_h,size_v,normalrule_code) end local function flushspecialrule(pos_h, pos_v, pos_r, w, h, d, l, outline) - flush_rule(false,pos_h,pos_v-d,pos_r,w,h+d,outline and outlinerule_code or normalrule_code) + flushrule(false,pos_h,pos_v-d,pos_r,w,h+d,outline and outlinerule_code or normalrule_code) end -- installer @@ -373,6 +375,7 @@ drivers.install { local ury = bb[4] * fc b = b + 1 buffer[b] = f_bounds(llx,lly,urx,ury) + -- inspect(buffer) end, }, flushers = { diff --git a/tex/context/base/mkxl/grph-trf.mkxl b/tex/context/base/mkxl/grph-trf.mkxl index 356b4a8f8..c7e0f5e2f 100644 --- a/tex/context/base/mkxl/grph-trf.mkxl +++ b/tex/context/base/mkxl/grph-trf.mkxl @@ -560,7 +560,7 @@ \def\grph_scale_fast_yes#1% {\edef\finalscaleboxxscale{\withoutpt\the\dimexpr#1\onepoint/1000\relax}% brrr \let\finalscaleboxyscale\finalscaleboxxscale - \dowithnextboxcs\grph_scale_fast_finish\hbox} + \dowithnextboxcs\grph_scale_fast_finish\hbox} % container ? \def\grph_scale_fast_finish {\grph_scale_apply @@ -571,7 +571,7 @@ {\bgroup \edef\p_sx{#1}% \edef\p_sy{#2}% - \dowithnextboxcs\grph_scale_fast_sx_xy_finish\hbox} + \dowithnextboxcs\grph_scale_fast_sx_xy_finish\hbox} % container? \def\grph_scale_fast_sx_xy_finish {\grph_scale_check_sx_sy @@ -656,13 +656,13 @@ \wd\nextbox\zeropoint \ht\nextbox\zeropoint \dp\nextbox\zeropoint - \setbox\nextbox\hcontainer + \setbox\nextbox\naturalhpack {\advance\scratchwidth \dimexpr\clippingparameter\c!leftoffset +\clippingparameter\c!rightoffset\relax \advance\scratchheight\dimexpr\clippingparameter\c!bottomoffset+\clippingparameter\c!topoffset \relax \dostartclipping{\clippingparameter\c!mp}\scratchwidth\scratchheight \box\nextbox \dostopclipping}% - \setbox\nextbox\naturalhpack + \setbox\nextbox\hcontainer {\hskip-\clippingparameter\c!leftoffset \lower \clippingparameter\c!bottomoffset \box\nextbox}% diff --git a/tex/context/base/mkxl/lang-def.mkxl b/tex/context/base/mkxl/lang-def.mkxl index f74fb5339..85c1f3ac7 100644 --- a/tex/context/base/mkxl/lang-def.mkxl +++ b/tex/context/base/mkxl/lang-def.mkxl @@ -309,8 +309,55 @@ \c!date={\v!day,\space,\v!month,\space,\v!year}, \s!patterns=\s!uk] -\installlanguage [\s!russian] [\s!ru] -\installlanguage [\s!ukrainian] [\s!ua] +\installlanguage + [\s!be] + [\s!lefthyphenmin=2, + \s!righthyphenmin=2, + \c!spacing=\v!packed, + \c!leftsentence=\leftguillemot, + \c!rightsentence=\rightguillemot, + \c!leftsubsentence=\lowerleftdoubleninequote, + \c!rightsubsentence=\upperrightdoublesixquote, + \c!leftquote=\lowerleftdoubleninequote, + \c!rightquote=\upperrightdoublesixquote, + \c!leftquotation=\leftguillemot, + \c!rightquotation=\rightguillemot, + \c!date={\v!day,\space,\v!month,\space,\v!year}] + + \installlanguage + [\s!sr] + [\c!spacing=\v!packed, + \c!leftsentence=\hbox{\endash\space}, + \c!rightsentence=\hbox{\space\endash}, + \c!leftsubsentence=\endash, + \c!rightsubsentence=\endash, + \c!leftquote=\upperrightsingleninequote, + \c!rightquote=\upperrightsingleninequote, + \c!leftquotation=\lowerleftdoubleninequote, + \c!rightquotation=\upperleftdoubleninequote, + \c!date={\v!day,{.},\space,\v!month,\space,\v!year}] + +\installlanguage + [\s!mk] + [\c!spacing=\v!packed, + \c!leftsentence=\endash, + \c!rightsentence=\endash, + \c!leftsubsentence=\endash, + \c!rightsubsentence=\endash, + \c!leftquote=\upperleftsingleninequote, + \c!rightquote=\upperrightsinglesixquote, + \c!leftquotation=\lowerleftdoubleninequote, + \c!rightquotation=\upperrightdoublesixquote, + \c!date={\v!day,\space,\v!month,\space,\v!year}] + +\installlanguage [\s!russian] [\s!ru] +\installlanguage [\s!ukrainian] [\s!ua] +\installlanguage [\s!belarussian][\s!be] +\installlanguage [\s!serbian] [\s!sr] +\installlanguage [\s!sr-latn] [\s!sr] +\installlanguage [\s!sr-cyrl] [\s!sr] +\installlanguage [\s!macedonian] [\s!mk] + % Uralic Languages: Cheremiss, Estonian, Finnish, Karelian, Laap, % Mordvinian, Permian tongues, Hungarian, Ostyak, Vogul, Samoyed diff --git a/tex/context/base/mkxl/luat-cbk.lmt b/tex/context/base/mkxl/luat-cbk.lmt new file mode 100644 index 000000000..744d12e27 --- /dev/null +++ b/tex/context/base/mkxl/luat-cbk.lmt @@ -0,0 +1,287 @@ +if not modules then modules = { } end modules ['luat-cbk'] = { + version = 1.001, + comment = "companion to luat-lib.mkiv", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +local insert, remove, concat = table.insert, table.remove, table.concat +local find, format = string.find, string.format +local collectgarbage, type, next = collectgarbage, type, next +local round = math.round +local sortedhash, sortedkeys, tohash = table.sortedhash, table.sortedkeys, table.tohash + +--[[ldx-- +<p>Callbacks are the real asset of <l n='luatex'/>. They permit you to hook +your own code into the <l n='tex'/> engine. Here we implement a few handy +auxiliary functions.</p> +--ldx]]-- + +callbacks = callbacks or { } +local callbacks = callbacks + +--[[ldx-- +<p>When you (temporarily) want to install a callback function, and after a +while wants to revert to the original one, you can use the following two +functions. This only works for non-frozen ones.</p> +--ldx]]-- + +local trace_callbacks = false trackers.register("system.callbacks", function(v) trace_callbacks = v end) +local trace_calls = false -- only used when analyzing performance and initializations +local trace_checking = false trackers.register("memory.checking", function(v) trace_checking = v end) + +local report_system = logs.reporter("system") +local report_callbacks = logs.reporter("system","callbacks") +local report_memory = logs.reporter("system","memory") + +local register_callback = callback.register +local find_callback = callback.find +local list_callbacks = callback.list +local register_usercall = false +local original_register = register_callback + +local frozen = { } +local stack = { } +local list = callbacks.list +local permit_overloads = false +local block_overloads = false + +--[[ldx-- +<p>By now most callbacks are frozen and most provide a way to plug in your own code. For instance +all node list handlers provide before/after namespaces and the file handling code can be extended +by adding schemes and if needed I can add more hooks. So there is no real need to overload a core +callback function. It might be ok for quick and dirty testing but anyway you're on your own if +you permanently overload callback functions.</p> +--ldx]]-- + +-- This might become a configuration file only option when it gets abused too much. + +directives.register("system.callbacks.permitoverloads", function(v) + if block_overloads or permit_overloads then + -- once bad news, always bad news + elseif v then + permit_overloads = { } + report_system() + report_system("The callback system has been brought in an unprotected state. As a result of directly") + report_system("setting of callbacks subsystems of ConTeXt can stop working. There is no support for") + report_system("bugs resulting from this state. It's better to use the official extension mechanisms.") + report_system() + end +end) + +sandbox.initializer { + category = "functions", + action = function() + block_overloads = true + end +} + +if not list then -- otherwise counters get reset + + list = utilities.storage.allocate(list_callbacks()) + + local supported = { } + + for k in next, list do + list[k] = 0 + supported[k] = true + end + + callbacks.list = list + callbacks.supported = supported + +end + +local delayed = tohash { + "buildpage_filter", +} + +if trace_calls then + + local functions = { } + + register_callback = function(name,func) + if type(func) == "function" then + if functions[name] then + functions[name] = func + return find_callback(name) + else + functions[name] = func + local cnuf = function(...) + list[name] = list[name] + 1 + return functions[name](...) + end + return original_register(name,cnuf) + end + else + return original_register(name,func) + end + end + +end + +-- temporary, not public: + +callbacks.functions = { } + +-- till here + +local reported = { } + +local function register_usercall(what,name,func) + if list[name] then + if trace_callbacks or not reported[name] then + report_system() + report_system("disabling core code by %s user function into callback '%s' (reported only once)",what,name) + report_system() + reported[name] = true + end + permit_overloads[name] = true + return original_register(name,function(...) + if trace_callbacks then + report_callbacks("calling user function from '%s'",name) + end + return func(...) + end) + else + report_callbacks("not %s function into invalid callback '%s'",name) + return nil, format("unknown callback '%s'",name) + end +end + +local function frozen_callback(name) + report_callbacks("not %s frozen %a","registering",name) + return nil, format("callback '%s' is frozen",name) -- no formatter yet +end + +local function state(name) + local f = find_callback(name) + if f == false then + return "disabled" + elseif f then + return "enabled" + else + return "undefined" + end +end + +function callbacks.known(name) + return list[name] +end + +function callbacks.report() + for name, _ in sortedhash(list) do + local str = frozen[name] + if str then + report_callbacks("%s: %s -> %s",state(name),name,str) + else + report_callbacks("%s: %s",state(name),name) + end + end +end + +function callbacks.freeze(name,freeze) + if not permit_overloads then + freeze = type(freeze) == "string" and freeze + if find(name,"*",1,true) then + local pattern = name + for name, _ in next, list do + if find(name,pattern) then + frozen[name] = freeze or frozen[name] or "frozen" + end + end + else + frozen[name] = freeze or frozen[name] or "frozen" + end + end +end + +function callbacks.register(name,func,freeze) + if frozen[name] then + if permit_overloads then + return register_usercall("registering",name,func) + else + return frozen_callback(name) + end + elseif freeze then + frozen[name] = type(freeze) == "string" and freeze or "registered" + end + if delayed[name] and environment.initex then + return nil + end + return register_callback(name,func) +end + +function callback.register(name,func) -- original + if not frozen[name] then + return register_callback(name,func) + elseif permit_overloads then + return register_usercall("registering",name,func) + else + return frozen_callback(name) + end +end + +function callbacks.push(name,func) + if not frozen[name] or permit_overloads then + local sn = stack[name] + if not sn then + sn = { } + stack[name] = sn + end + insert(sn,find_callback(name)) + if permit_overloads then + register_usercall("pushing",name,func) + else + register_callback(name,func) + end + else + report_callbacks("not %s frozen %a","pushing",name) + end +end + +function callbacks.pop(name) + if not frozen[name] or permit_overloads then + local sn = stack[name] + if not sn or #sn == 0 then + -- some error + register_callback(name,nil) -- ! really needed + else + -- this fails: register_callback(name, remove(stack[name])) + local func = remove(sn) + register_callback(name,func) + end + end +end + +if trace_calls then + statistics.register("callback details", function() + local t = { } -- todo: pass function to register and quit at nil + for name, n in sortedhash(list) do + if n > 0 then + t[#t+1] = format("%s -> %s",name,n) + end + end + return concat(t," ") + end) +end + +statistics.register("callbacks overloaded by user", function() + if permit_overloads then + return concat(sortedkeys(permit_overloads)," ") + end +end) + +-- this will move to a module + +commands = commands or { } + +function commands.showcallbacks() + local NC, NR, verbatim = context.NC, context.NR, context.type + context.starttabulate { "|l|l|p|" } + for name, _ in sortedhash(list) do + NC() verbatim(name) NC() verbatim(state(name)) NC() context(frozen[name] or "") NC() NR() + end + context.stoptabulate() +end diff --git a/tex/context/base/mkxl/luat-lib.mkxl b/tex/context/base/mkxl/luat-lib.mkxl index 24020b9a6..61f9ccfd0 100644 --- a/tex/context/base/mkxl/luat-lib.mkxl +++ b/tex/context/base/mkxl/luat-lib.mkxl @@ -71,7 +71,7 @@ \registerctxluafile{data-use}{} \registerctxluafile{data-aux}{} -\registerctxluafile{luat-cbk}{} +\registerctxluafile{luat-cbk}{autosuffix} \registerctxluafile{luat-run}{} \registerctxluafile{luat-fio}{autosuffix} \registerctxluafile{luat-cnf}{} diff --git a/tex/context/base/mkxl/mlib-ctx.lmt b/tex/context/base/mkxl/mlib-ctx.lmt index 24b02f6f6..558553921 100644 --- a/tex/context/base/mkxl/mlib-ctx.lmt +++ b/tex/context/base/mkxl/mlib-ctx.lmt @@ -233,17 +233,6 @@ implement { arguments = { "integer", "integer", "integer", "integer" } } -implement { - name = "mpflushreset", - actions = function() metapost.flushreset() end -- not yet implemented -} - -implement { - name = "mpflushliteral", - actions = function(str) metapost.flushliteral(str) end, -- not yet implemented - arguments = "string", -} - -- this has to become a codeinjection function metapost.getclippath(specification) -- why not a special instance for this diff --git a/tex/context/base/mkxl/mlib-fio.lmt b/tex/context/base/mkxl/mlib-fio.lmt index 15d993d92..bc890a37d 100644 --- a/tex/context/base/mkxl/mlib-fio.lmt +++ b/tex/context/base/mkxl/mlib-fio.lmt @@ -82,14 +82,22 @@ local function findmpfile(name,ftype) return nil end -finders.file = function(specification,name,mode,ftype) - return findmpfile(name,ftype) +local function finder(name,mode,kind) + if mode == "r" then + return findmpfile(name,kind) + elseif file.is_writable(name) then + return name + else + return nil + end end -local function finder(name,mode,kind) - return findmpfile(name,kind) +finders.file = function(specification,name,mode,ftype) + -- finder(name,mode,kind) + return finder(name,mode,ftype) end + local findtexfile = resolvers.findtexfile local opentexfile = resolvers.opentexfile local splitlines = string.splitlines @@ -182,6 +190,7 @@ local function fileopener() -- report_metapost("opening terminal") return terminal elseif mode == "w" then + -- we need an extra check here for permissions local f = io.open(name,"wb") if f then -- report_metapost("opening file %a for writing",full) diff --git a/tex/context/base/mkxl/mlib-lmt.lmt b/tex/context/base/mkxl/mlib-lmt.lmt index e44674d13..b7c869c3b 100644 --- a/tex/context/base/mkxl/mlib-lmt.lmt +++ b/tex/context/base/mkxl/mlib-lmt.lmt @@ -20,6 +20,7 @@ local scannumeric = scan.numeric local scanpath = scan.path local injectpath = mp.inject.path +local injectcolor = mp.inject.color local getparameter = metapost.getparameter local registerscript = metapost.registerscript @@ -188,3 +189,11 @@ registerscript("scrutenized", function() -- injectpath(t) end) +-- A goodie, mostly a side effect of updating the metafun manual. + + +local labtorgb = attributes.colors.labtorgb + +registerscript("labtorgb", function() + injectcolor(labtorgb(scannumeric(),scannumeric(),scannumeric())) +end) diff --git a/tex/context/base/mkxl/mlib-pdf.lmt b/tex/context/base/mkxl/mlib-pdf.lmt index acd04e9e9..c383d52de 100644 --- a/tex/context/base/mkxl/mlib-pdf.lmt +++ b/tex/context/base/mkxl/mlib-pdf.lmt @@ -41,8 +41,6 @@ metapost.flushers.pdf = pdfflusher metapost.n = 0 -local experiment = true -- uses context(node) that already does delayed nodes -local savedliterals = nil -- needs checking local mpsliteral = nodes.pool.originliteral local f_f = formatters["%.6N"] @@ -89,62 +87,27 @@ function metapost.convert(specification,result) return true -- done end -function metapost.flushliteral(d) - if savedliterals then - write_node(mpsliteral(savedliterals[d])) - else - report_metapost("problem flushing literal %a",d) - end -end - -function metapost.flushreset() -- will become obsolete and internal - savedliterals = nil -end - -function pdfflusher.comment(message) +function pdfflusher.tocomment(message) if message then - message = formatters["%% mps graphic %s: %s"](metapost.n,message) - if experiment then - context(mpsliteral(message)) - elseif savedliterals then - local last = #savedliterals + 1 - savedliterals[last] = message - context.MPLIBtoPDF(last) - else - savedliterals = { message } - context.MPLIBtoPDF(1) - end + return formatters["%% mps graphic %s: %s"](metapost.n,message) + else + return formatters["%% mps graphic %s"](metapost.n) end end function pdfflusher.startfigure(n,llx,lly,urx,ury,message) - savedliterals = nil metapost.n = metapost.n + 1 context.startMPLIBtoPDF(f_f(llx),f_f(lly),f_f(urx),f_f(ury)) - if message then pdfflusher.comment(message) end end function pdfflusher.stopfigure(message) - if message then pdfflusher.comment(message) end context.stopMPLIBtoPDF() - context.MPLIBflushreset() -- maybe just at the beginning end function pdfflusher.flushfigure(pdfliterals) -- table if #pdfliterals > 0 then pdfliterals = concat(pdfliterals,"\n") - if experiment then - context(mpsliteral(pdfliterals)) - else - if savedliterals then - local last = #savedliterals + 1 - savedliterals[last] = pdfliterals - context.MPLIBtoPDF(last) - else - savedliterals = { pdfliterals } - context.MPLIBtoPDF(1) - end - end + context(mpsliteral(pdfliterals)) end end @@ -391,10 +354,6 @@ local function popproperties() metapost.properties = remove(stack) end -local function nocomment() end - -metapost.comment = nocomment - function metapost.flush(specification,result) if result then local flusher = specification.flusher @@ -412,7 +371,7 @@ function metapost.flush(specification,result) local flushfigure = flusher.flushfigure local textfigure = flusher.textfigure -- local processspecial = flusher.processspecial or metapost.processspecial - metapost.comment = flusher.comment or nocomment + local tocomment = flusher.tocomment for index=1,#figures do local figure = figures[index] local properties = pushproperties(figure) @@ -431,6 +390,9 @@ function metapost.flush(specification,result) if urx < llx then -- invalid startfigure(properties.number,0,0,0,0,"invalid",figure) + if tocomment then + result[#result+1] = tocomment("invalid") + end stopfigure() else @@ -439,6 +401,9 @@ function metapost.flush(specification,result) local groupstack = { } local function processfigure() + if tocomment then + result[#result+1] = tocomment("begin") + end result[#result+1] = "q" if objects then -- resetplugins(result) -- we should move the colorinitializer here @@ -687,6 +652,9 @@ function metapost.flush(specification,result) end end result[#result+1] = "Q" + if tocomment then + result[#result+1] = tocomment("end") + end flushfigure(result) end startfigure(properties.number,llx,lly,urx,ury,"begin",figure) @@ -696,7 +664,6 @@ function metapost.flush(specification,result) processfigure() end stopfigure("end") - end if askedfig ~= "all" then break @@ -704,7 +671,6 @@ function metapost.flush(specification,result) end popproperties() end - metapost.comment = nocomment resetplugins(result) -- we should move the colorinitializer here end end diff --git a/tex/context/base/mkxl/mlib-pdf.mkxl b/tex/context/base/mkxl/mlib-pdf.mkxl index 03bc44f79..6ded23514 100644 --- a/tex/context/base/mkxl/mlib-pdf.mkxl +++ b/tex/context/base/mkxl/mlib-pdf.mkxl @@ -88,8 +88,6 @@ % MPLIB specific: -\permanent\def\MPLIBtoPDF{\clf_mpflushliteral} % expanded - \permanent\protected\def\startMPLIBtoPDF#1#2#3#4% {\meta_process_graphic_figure_start \dostarttagged\t!mpgraphic\empty @@ -108,9 +106,6 @@ \dostoptagged \meta_process_graphic_figure_stop} -\permanent\protected\def\MPLIBflushreset % This can (will) move to the Lua end. - {\clf_mpflushreset} - %D Kind of special: % % test.mp: diff --git a/tex/context/base/mkxl/mult-sys.mkxl b/tex/context/base/mkxl/mult-sys.mkxl index 4a86fb21e..64cedbfad 100644 --- a/tex/context/base/mkxl/mult-sys.mkxl +++ b/tex/context/base/mkxl/mult-sys.mkxl @@ -47,6 +47,7 @@ \definesystemconstant {ancientgreek} \definesystemconstant {agr} \definesystemconstant {ancientlatin} \definesystemconstant {ala} \definesystemconstant {arabic} \definesystemconstant {ar} +\definesystemconstant {belarussian} \definesystemconstant {be} \definesystemconstant {bokmal} \definesystemconstant {nb} \definesystemconstant {catalan} \definesystemconstant {ca} \definesystemconstant {chinese} \definesystemconstant {cn} @@ -72,6 +73,7 @@ \definesystemconstant {latin} \definesystemconstant {la} \definesystemconstant {lithuanian} \definesystemconstant {lt} \definesystemconstant {malayalam} \definesystemconstant {ml} +\definesystemconstant {macedonian} \definesystemconstant {mk} \definesystemconstant {norwegian} \definesystemconstant {no} \definesystemconstant {nynorsk} \definesystemconstant {nn} \definesystemconstant {persian} \definesystemconstant {pe} @@ -81,6 +83,7 @@ \definesystemconstant {russian} \definesystemconstant {ru} \definesystemconstant {slovak} \definesystemconstant {sk} \definesystemconstant {slovenian} \definesystemconstant {sl} +\definesystemconstant {serbian} \definesystemconstant {sr} \definesystemconstant {spanish} \definesystemconstant {es} \definesystemconstant {swedish} \definesystemconstant {sv} \definesystemconstant {thai} \definesystemconstant {th} % mojca mentioned it at BT2013 but we need more info diff --git a/tex/context/base/mkxl/node-fin.lmt b/tex/context/base/mkxl/node-fin.lmt index 3f88c59fe..2ca7491a1 100644 --- a/tex/context/base/mkxl/node-fin.lmt +++ b/tex/context/base/mkxl/node-fin.lmt @@ -199,6 +199,7 @@ local function process(attribute,head,inheritance,default) -- one attribute local outer if subtype == container_code then check = true +current = 0 end if getorientation(stack) then outer = getattr(stack,attribute) @@ -315,6 +316,7 @@ local function simple(attribute,head) elseif id == hlist_code or id == vlist_code then if subtype == container_code then check = true +current = 0 end if getorientation(stack) then local outer = getattr(stack,attribute) @@ -394,6 +396,7 @@ end -- -- tricky checking -- if subtype == container_code then -- check = true +-- current = 0 -- end -- local outer -- if getorientation(stack) then @@ -519,6 +522,7 @@ local function selective(attribute,head,inheritance,default) -- two attributes -- tricky checking if subtype == container_code then check = true +current = 0 end local outer, s if getorientation(stack) then @@ -658,6 +662,7 @@ local function stacked(attribute,head,default) -- no triggering, no inheritance, local list if subtype == container_code then check = true +current = 0 end if nslistwise then local a = getattr(stack,attribute) @@ -749,6 +754,7 @@ end -- local list -- if subtype == container_code then -- check = true +-- current = 0 -- end -- if nslistwise then -- local a = getattr(current,attribute) @@ -843,6 +849,7 @@ local function stacker(attribute,head,default) -- no triggering, no inheritance, local list if subtype == container_code then check = true +-- attrib = default or unsetvalue -- or just umsetvalue end if nslistwise then local a = getattr(current,attribute) diff --git a/tex/context/base/mkxl/node-nut.lmt b/tex/context/base/mkxl/node-nut.lmt index 5a487eaea..7ef087178 100644 --- a/tex/context/base/mkxl/node-nut.lmt +++ b/tex/context/base/mkxl/node-nut.lmt @@ -241,7 +241,6 @@ local nuts = { usedlist = direct.usedlist, uses_font = direct.uses_font, vpack = direct.vpack, - writable_spec = direct.writable_spec, write = direct.write, append = direct.append, has_glyph_option = direct.has_glyph_option, diff --git a/tex/context/base/mkxl/strc-sec.mkxl b/tex/context/base/mkxl/strc-sec.mkxl index 8648848bc..7c4a8fc24 100644 --- a/tex/context/base/mkxl/strc-sec.mkxl +++ b/tex/context/base/mkxl/strc-sec.mkxl @@ -473,8 +473,8 @@ \to \everyredefinehead \appendtoks - \frozen\instance\setuevalue{\e!start\currenthead}{\strc_sectioning_start[\currenthead]}% - \frozen\instance\setuevalue{\e!stop \currenthead}{\strc_sectioning_stop [\currenthead]}% + \frozen\instance\protected\edefcsname\e!start\currenthead\endcsname{\strc_sectioning_start[\currenthead]}% + \frozen\instance\protected\edefcsname\e!stop \currenthead\endcsname{\strc_sectioning_stop [\currenthead]}% \to \everydefinehead % so \subject as well as \section will need two commands when ownnumber @@ -484,8 +484,8 @@ \appendtoks \ifempty\currenthead \else \doifelse{\headparameter\c!ownnumber}\v!yes - {\instance\setuevalue\currenthead{\strc_sectioning_handle_own[\currenthead]}} - {\instance\setuevalue\currenthead{\strc_sectioning_handle_nop[\currenthead]}}% + {\instance\protected\edefcsname\currenthead\endcsname{\strc_sectioning_handle_own[\currenthead]}} + {\instance\protected\edefcsname\currenthead\endcsname{\strc_sectioning_handle_nop[\currenthead]}}% \fi \to \everysetuphead @@ -543,10 +543,10 @@ \permanent\def\xthenamedheadlevel#1% {\namedsectionlevel{#1}{\sectionheadsection{\sectionheadcoupling{#1}}}} -\setvalue{\??headlevel\v!block}{0} -\setvalue{\??headlevel\v!none }{-1} -\setvalue{\??headlevel\v!text }{-2} -\setvalue{\??headlevel\v!head }{-3} +\defcsname\??headlevel\v!block\endcsname{0} +\defcsname\??headlevel\v!none \endcsname{-1} +\defcsname\??headlevel\v!text \endcsname{-2} +\defcsname\??headlevel\v!head \endcsname{-3} \newtoks\everydefinesection @@ -686,10 +686,10 @@ \newconditional\headisdisplay % public \newconditional\headissomewhere % public -\setvalue{\??headincrement\v!yes }{\settrue \c_strc_sectioning_increment\settrue \c_strc_sectioning_to_list} -\setvalue{\??headincrement\v!no }{\setfalse\c_strc_sectioning_increment\setfalse\c_strc_sectioning_to_list} -\setvalue{\??headincrement\v!list }{\setfalse\c_strc_sectioning_increment\settrue \c_strc_sectioning_to_list} -\setvalue{\??headincrement\s!empty}{\settrue \c_strc_sectioning_increment\settrue \c_strc_sectioning_to_list} +\defcsname\??headincrement\v!yes \endcsname{\settrue \c_strc_sectioning_increment\settrue \c_strc_sectioning_to_list} +\defcsname\??headincrement\v!no \endcsname{\setfalse\c_strc_sectioning_increment\setfalse\c_strc_sectioning_to_list} +\defcsname\??headincrement\v!list \endcsname{\setfalse\c_strc_sectioning_increment\settrue \c_strc_sectioning_to_list} +\defcsname\??headincrement\s!empty\endcsname{\settrue \c_strc_sectioning_increment\settrue \c_strc_sectioning_to_list} \protected\def\strc_sectioning_initialize_increment {\edef\currentheadincrement{\headparameter\c!incrementnumber}% @@ -708,31 +708,31 @@ % use : \currentheadincrement as spec \fi} -\setvalue{\??headplace\v!yes}% +\defcsname\??headplace\v!yes\endcsname {\setfalse\c_strc_sectioning_empty \settrue \c_strc_sectioning_place \setfalse\c_strc_sectioning_hidden \setfalse\c_strc_sectioning_section} -\setvalue{\??headplace\v!empty}% +\defcsname\??headplace\v!empty\endcsname {\settrue \c_strc_sectioning_empty \settrue \c_strc_sectioning_place \setfalse\c_strc_sectioning_hidden \setfalse\c_strc_sectioning_section} -\setvalue{\??headplace\v!no}% +\defcsname\??headplace\v!no\endcsname {\settrue \c_strc_sectioning_empty \setfalse\c_strc_sectioning_place \setfalse\c_strc_sectioning_hidden \setfalse\c_strc_sectioning_section} -\setvalue{\??headplace\v!hidden}% +\defcsname\??headplace\v!hidden\endcsname {\settrue \c_strc_sectioning_empty \setfalse\c_strc_sectioning_place \settrue \c_strc_sectioning_hidden \setfalse\c_strc_sectioning_section} -\setvalue{\??headplace\v!section}% +\defcsname\??headplace\v!section\endcsname {\settrue \c_strc_sectioning_empty \setfalse\c_strc_sectioning_place \settrue \c_strc_sectioning_hidden @@ -1086,13 +1086,13 @@ % pagebreaks -\letvalue{\??headmarknop\v!page }\donothing -\setvalue{\??headmarknop\v!reset }{\resetcurrentstructuremarks} -\letvalue{\??headmarknop\s!unknown}\donothing +\letcsname\??headmarknop\v!page \endcsname\donothing +\defcsname\??headmarknop\v!reset \endcsname{\resetcurrentstructuremarks} +\letcsname\??headmarknop\s!unknown\endcsname\donothing -\letvalue{\??headmarkyes\v!page }\donothing % to be checked: {\resetcurrentstructuremarks} -\setvalue{\??headmarkyes\v!reset }{\resetcurrentstructuremarks} -\letvalue{\??headmarkyes\s!unknown}\donothing +\letcsname\??headmarkyes\v!page \endcsname\donothing % to be checked: {\resetcurrentstructuremarks} +\defcsname\??headmarkyes\v!reset \endcsname{\resetcurrentstructuremarks} +\letcsname\??headmarkyes\s!unknown\endcsname\donothing \def\strc_sectioning_check_layout {\edef\p_page{\headparameter\c!page}% diff --git a/tex/context/base/mkxl/supp-box.mkxl b/tex/context/base/mkxl/supp-box.mkxl index ee6ef97e6..e52ea90b8 100644 --- a/tex/context/base/mkxl/supp-box.mkxl +++ b/tex/context/base/mkxl/supp-box.mkxl @@ -1150,7 +1150,9 @@ {% we could also split in \LUA \splitatcomma{#2}\m_syst_boxes_left\m_syst_boxes_right \limitated + \ifempty\m_syst_boxes_left\else left \m_syst_boxes_left + \fi \ifempty\m_syst_boxes_right\else right \m_syst_boxes_right \fi diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 3b0a7991a..7952d615c 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-02-20 16:46 +-- merge date : 2021-02-23 17:41 do -- begin closure to overcome local limits and interference |