From cc6d486ffa3fad4ffb698ad5ccbd5c5f4ebc6a00 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Fri, 5 May 2023 19:33:15 +0200 Subject: 2023-05-05 18:39:00 --- tex/context/base/mkii/cont-new.mkii | 2 +- tex/context/base/mkii/context.mkii | 2 +- tex/context/base/mkiv/cont-new.mkiv | 2 +- tex/context/base/mkiv/context.mkiv | 2 +- tex/context/base/mkiv/lang-def.mkiv | 5 +- tex/context/base/mkiv/lang-txt.lua | 363 +++++++----- tex/context/base/mkiv/phys-dim.lua | 8 +- tex/context/base/mkiv/publ-imp-apa.lua | 35 +- tex/context/base/mkiv/publ-imp-apa.mkvi | 65 +- tex/context/base/mkiv/status-files.pdf | Bin 24650 -> 24657 bytes tex/context/base/mkiv/status-lua.pdf | Bin 271361 -> 271357 bytes tex/context/base/mkiv/util-sac.lua | 12 +- tex/context/base/mkiv/util-sbx.lua | 2 +- tex/context/base/mkxl/cont-new.mkxl | 2 +- tex/context/base/mkxl/context.mkxl | 2 +- tex/context/base/mkxl/data-sch.lmt | 312 ++++++++++ tex/context/base/mkxl/data-vir.lmt | 29 +- tex/context/base/mkxl/lang-def.mkxl | 2 +- tex/context/base/mkxl/lpdf-img.lmt | 12 + tex/context/base/mkxl/luat-lib.mkxl | 4 +- tex/context/base/mkxl/math-ini.mkxl | 4 +- tex/context/base/mkxl/phys-dim.lmt | 4 +- tex/context/base/mkxl/util-sbx.lmt | 658 +++++++++++++++++++++ tex/context/modules/mkxl/m-tikz.mkxl | 42 +- tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 25 files changed, 1372 insertions(+), 199 deletions(-) create mode 100644 tex/context/base/mkxl/data-sch.lmt create mode 100644 tex/context/base/mkxl/util-sbx.lmt (limited to 'tex') diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index 1b418833b..b19283ff1 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{2023.04.27 16:54} +\newcontextversion{2023.05.05 18:36} %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 5f1fbaa04..f5ef6f059 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{2023.04.27 16:54} +\edef\contextversion{2023.05.05 18:36} %D For those who want to use this: diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index cbe448fc7..a3bc4164e 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{2023.04.27 16:54} +\newcontextversion{2023.05.05 18:36} %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 7c3567153..1ef4503ab 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -49,7 +49,7 @@ %D {YYYY.MM.DD HH:MM} format. \edef\contextformat {\jobname} -\edef\contextversion{2023.04.27 16:54} +\edef\contextversion{2023.05.05 18:36} %D Kind of special: diff --git a/tex/context/base/mkiv/lang-def.mkiv b/tex/context/base/mkiv/lang-def.mkiv index 19f431ebf..7ec4b722e 100644 --- a/tex/context/base/mkiv/lang-def.mkiv +++ b/tex/context/base/mkiv/lang-def.mkiv @@ -273,7 +273,7 @@ [\s!hy] [\c!spacing=\v!packed, \c!leftsentence=\endash, % *sentences not confirmed - \c!rightsentence=\endash, + \c!rightsentence=\endash, \c!leftsubsentence=\endash, \c!rightsubsentence=\endash, \c!leftquote=\guilsingleleft, @@ -781,7 +781,8 @@ \c!rightquote=\upperrightsingleninequote, \c!leftquotation=\upperleftdoublesixquote, \c!rightquotation=\upperrightdoubleninequote, - \c!date={\v!year,\space,\v!month,\space,\v!day}] + \c!date={\v!day,\space,\v!month,\space,\v!year}] + \installlanguage[\s!pt-br][\c!default=\s!pt] % Brazil \installlanguage[\s!es-es][\c!default=\s!es] % Spain diff --git a/tex/context/base/mkiv/lang-txt.lua b/tex/context/base/mkiv/lang-txt.lua index 668d48eb6..c41936dac 100644 --- a/tex/context/base/mkiv/lang-txt.lua +++ b/tex/context/base/mkiv/lang-txt.lua @@ -49,14 +49,14 @@ if not modules then modules = { } end modules ['lang-txt'] = { -- nn Norwegian Hans Fredrik Nordhaug, ... -- nl Dutch Hans Hagen -- pl Polish Grzegorz Sapijaszko (2011) --- pt Portuguese Pedro F. M. Mendonça +-- pt Portuguese Pedro F. M. Mendonça; additions Joana Sophia Bogas Carneiro (2023) -- ro Romanian Dan Seracu, ... -- ru Russian Olga Briginets, Alexander Bokovoy, Victor Figurnov, ... -- sk Slovak Tomáš Hála (2012, 2022) -- sl Slovenian Mojca Miklavec -- sr Serbian Ivan Pešić (2020) -- sr-latn Serbian Ivan Pešić (2020) --- sv Swedish ... +-- sv Swedish ...; additions Edith and Mikael Sundqvist (2023) -- tk Turkish Tobias Burnus -- tr Turkmen Nazar Annagurban -- ua Ukrainian Olga Briginets, Alexander Bokovoy, Victor Figurnov, ... @@ -69,6 +69,11 @@ if not modules then modules = { } end modules ['lang-txt'] = { -- thinspace == sixperemspace = 0x2006 -- print("!"..utf.char(0x2006).."!") +-- Will be done when needed: +-- (TH) editor|editors:mnem missing +-- (HH) save memory at functions +-- (MS) btx settings for sv + languages = languages or { } local languages = languages @@ -84,7 +89,7 @@ data.labels={ ["be"]="У", ["bg"]="в", ["ca"]="En", - ["cs"]={ "In", "V" }, + ["cs"]="In", ["de"]="In", ["en"]="In", ["eo"]="En", @@ -93,7 +98,7 @@ data.labels={ ["fr"]="Dans", ["hy"]="Մեջ", ["mk"]="во", - ["sk"]={ "In", "V" }, + ["sk"]="In", ["sr"]="У", ["sr-latn"]="U", }, @@ -113,6 +118,7 @@ data.labels={ ["hy"]="Համար", ["mk"]="Број", ["nl"]="Nummer", + ["pt"]="Numero", ["sk"]="Číslo", ["sr"]="Број", ["sr-latn"]="Broj", @@ -134,6 +140,7 @@ data.labels={ ["hy"]="Ծավալ", ["mk"]="Том", ["nl"]="Deel", + ["pt"]="Volume", ["sk"]="Zväzok", ["sr"]="Том", ["sr-latn"]="Tom", @@ -156,6 +163,7 @@ data.labels={ ["it"]="e", ["mk"]="и", ["nl"]="en", + ["pt"]="e", ["sk"]="a", ["sr"]="и", ["sr-latn"]="i", @@ -166,7 +174,7 @@ data.labels={ ["be"]="Выданне", ["bg"]="издание", ["ca"]="Edició", - ["cs"]="Vydání", + ["cs"]="vydání", ["de"]="Auflage", ["en"]="edition", ["eo"]="eldono", @@ -179,17 +187,18 @@ data.labels={ ["it"]="edizione", ["mk"]="издание", ["nl"]="editie", - ["sk"]="Vydanie", + ["pt"]="edicao", + ["sk"]="vydanie", ["sr"]="издање", ["sr-latn"]="izdanje", }, }, ["editor"]={ ["labels"]={ - ["be"]="Рэдактар", + ["be"]="реэдактар", ["bg"]="редактор", - ["ca"]="Editor", - ["cs"]="Editor", + ["ca"]="editor", + ["cs"]="editor", ["de"]="Herausgeber", ["en"]="editor", ["eo"]="eldonisto", @@ -200,29 +209,24 @@ data.labels={ ["hy"]="խմբագիր", ["it"]="a cura di", ["mk"]="уредник", - ["sk"]="Editor", + ["pt"]="editor", + ["sk"]="editor", ["sr"]="уредник", ["sr-latn"]="urednik", }, }, ["editor:f"]={ ["labels"]={ - ["cs"]="Editorka", - ["sk"]="Editorka", - }, - }, - ["editor:m"]={ - ["labels"]={ - ["cs"]="Editor", - ["sk"]="Editor", + ["cs"]="editorka", + ["sk"]="editorka", }, }, ["editors"]={ ["labels"]={ - ["be"]="Рэдактары", + ["be"]="рэдактары", ["bg"]="редактори", - ["ca"]="Editors", - ["cs"]="Editoři", + ["ca"]="editors", + ["cs"]="editoři", ["de"]="Herausgeber", ["en"]="editors", ["eo"]="eldonistoj", @@ -232,21 +236,16 @@ data.labels={ ["hy"]="խմբագիրներ", ["it"]="a cura di", ["mk"]="уредници", - ["sk"]="Editori", + ["pt"]="editores", + ["sk"]="editori", ["sr"]="уредници", ["sr-latn"]="urednici", }, }, ["editors:f"]={ ["labels"]={ - ["cs"]="Editorky", - ["sk"]="Editorky", - }, - }, - ["editors:m"]={ - ["labels"]={ - ["cs"]="Editoři", - ["sk"]="Editori", + ["cs"]="editorky", + ["sk"]="editorky", }, }, ["in"]={ @@ -263,6 +262,7 @@ data.labels={ ["fr"]="dans", ["hy"]="մեջ", ["mk"]="во", + ["pt"]="em", ["sk"]="v", ["sr"]="у", ["sr-latn"]="u", @@ -286,6 +286,7 @@ data.labels={ ["it"]="Tesi di laurea", ["mk"]="Магистерска дисертација", ["nl"]="Masterproef", + ["pt"]="Tese de mestrado", ["sk"]="Diplomová práca", ["sr"]="Мастер дисертација", ["sr-latn"]="Master disertacija", @@ -307,6 +308,7 @@ data.labels={ ["hy"]="համար", ["mk"]="број", ["nl"]="nummer", + ["pt"]="numero", ["sk"]="číslo", ["sr"]="број", ["sr-latn"]="broj", @@ -326,6 +328,7 @@ data.labels={ ["hy"]="-ից", ["mk"]="од", ["nl"]="van", + ["pt"]="de", ["sk"]="z", ["sr"]="од", ["sr-latn"]="od", @@ -334,7 +337,7 @@ data.labels={ ["others"]={ ["labels"]={ ["ca"]="et al.", - ["cs"]={ "a~kol.", "et al."}, + ["cs"]="a~kol.", ["de"]="et al.", ["en"]="et al.", ["eo"]="aliaj", @@ -343,7 +346,8 @@ data.labels={ ["fr"]="et al.", ["hy"]="եւ այլն", ["mk"]="и др.", - ["sk"]={ "a~kol.", "et al."}, + ["pt"]="etc", + ["sk"]="a~kol.", ["sr"]="и др.", ["sr-latn"]="i dr.", }, @@ -362,6 +366,7 @@ data.labels={ ["fr"]="p.", ["hy"]="էջ", ["mk"]="стр.", + ["pt"]="p", ["sk"]="s.", ["sr"]="стр.", ["sr-latn"]="str.", @@ -384,6 +389,7 @@ data.labels={ ["hy"]="էջեր", ["mk"]="страници", ["nl"]="paginas", + ["pt"]="paginas", ["sk"]="strany", ["sr"]="страницa", ["sr-latn"]="stranica", @@ -406,6 +412,7 @@ data.labels={ ["it"]="Brevetto", ["mk"]="Патент", ["nl"]="Octrooi", + ["pt"]="Patente", ["sk"]="Patent", ["sr"]="Патент", ["sr-latn"]="Patent", @@ -428,6 +435,7 @@ data.labels={ ["it"]="Tesi di dottorato", ["mk"]="Докторска дисертација", ["nl"]="Proefschrift", + ["pt"]="Tese de douturamento", ["sk"]="Dizertačná práca", ["sr"]="Докторска дисертација", ["sr-latn"]="Doktorska disertacija", @@ -445,6 +453,7 @@ data.labels={ ["fa"]="صص", ["hy"]="էջ", ["mk"]="стр.", + ["pt"]="pp", ["sk"]="s.", ["sr"]="стр.", ["sr-latn"]="str.", @@ -468,6 +477,7 @@ data.labels={ ["it"]="Relazione tecnica", ["mk"]="Технички извештај", ["nl"]="Technisch rapport", + ["pt"]="Reporte tecnico", ["sk"]="Technická zpráva", ["sr"]="Технички извештај", ["sr-latn"]="Tehnički izveštaj", @@ -489,6 +499,7 @@ data.labels={ ["hy"]="ծավալ", ["mk"]="том", ["nl"]="deel", + ["pt"]="volume", ["sk"]="zväzok", ["sr"]="том", ["sr-latn"]="tom", @@ -511,6 +522,7 @@ data.labels={ ["it"]="con", ["mk"]="со", ["nl"]="met", + ["pt"]="com", ["sk"]="s", ["sr"]="са", ["sr-latn"]="sa", @@ -527,9 +539,11 @@ data.labels={ ["es"]="Pr", ["hy"]="P", ["mk"]="P", + ["pt"]="Pr", ["sk"]="P", ["sr"]="P", ["sr-latn"]="P", + ["sv"]="Pr", }, }, ["arccos"]={ @@ -543,9 +557,11 @@ data.labels={ ["hy"]="arccos", ["mk"]="arccos", ["pl"]="arc\\sixperemspace cos", + ["pt"]="arccos", ["sk"]="arccos", ["sr"]="arccos", ["sr-latn"]="arccos", + ["sv"]="arccos", }, }, ["arccosh"]={ @@ -559,9 +575,11 @@ data.labels={ ["hy"]="arccosh", ["mk"]="arccosh", ["pl"]="arc\\sixperemspace cosh", + ["pt"]="arccosh", ["sk"]="arccosh", ["sr"]="arccosh", ["sr-latn"]="arccosh", + ["sv"]="arcosh", }, }, ["arccot"]={ @@ -575,9 +593,11 @@ data.labels={ ["hy"]="arcctg", ["mk"]="arccotg", ["pl"]="arc\\sixperemspace ctg", + ["pt"]="arccot", ["sk"]="arccotg", ["sr"]="arcctg", ["sr-latn"]="arcctg", + ["sv"]="arccot", }, }, ["arcsin"]={ @@ -591,9 +611,11 @@ data.labels={ ["hy"]="arcsin", ["mk"]="arcsin", ["pl"]="arc\\sixperemspace sin", + ["pt"]="arcsin", ["sk"]="arcsin", ["sr"]="arcsin", ["sr-latn"]="arcsin", + ["sv"]="arcsin", }, }, ["arcsinh"]={ @@ -607,9 +629,11 @@ data.labels={ ["hy"]="arcsinh", ["mk"]="arcsinh", ["pl"]="arc\\sixperemspace sinh", + ["pt"]="arcsinh", ["sk"]="arcsinh", ["sr"]="arcsinh", ["sr-latn"]="arcsinh", + ["sv"]="arsinh", }, }, ["arctan"]={ @@ -623,9 +647,11 @@ data.labels={ ["hy"]="arctan", ["mk"]="arctg", ["pl"]="arc\\sixperemspace tg", + ["pt"]="arctan", ["sk"]="arctg", ["sr"]="arctg", ["sr-latn"]="arctg", + ["sv"]="arctan", }, }, ["arctanh"]={ @@ -639,9 +665,11 @@ data.labels={ ["hy"]="arctanh", ["mk"]="arctgh", ["pl"]="arc\\sixperemspace tgh", + ["pt"]="arctanh", ["sk"]="arctgh", ["sr"]="arctgh", ["sr-latn"]="arctgh", + ["sv"]="artanh", }, }, ["arg"]={ @@ -653,9 +681,11 @@ data.labels={ ["es"]="arg", ["hy"]="arg", ["mk"]="arg", + ["pt"]="arg", ["sk"]="arg", ["sr"]="arg", ["sr-latn"]="arg", + ["sv"]="arg", }, }, ["cos"]={ @@ -667,9 +697,11 @@ data.labels={ ["es"]="cos", ["hy"]="cos", ["mk"]="cos", + ["pt"]="cos", ["sk"]="cos", ["sr"]="cos", ["sr-latn"]="cos", + ["sv"]="cos", }, }, ["cosh"]={ @@ -681,9 +713,11 @@ data.labels={ ["es"]="cosh", ["hy"]="cosh", ["mk"]="cosh", + ["pt"]="cosh", ["sk"]="cosh", ["sr"]="cosh", ["sr-latn"]="cosh", + ["sv"]="cosh", }, }, ["cot"]={ @@ -697,9 +731,11 @@ data.labels={ ["hy"]="cot", ["mk"]="ctg", ["pl"]="ctg", + ["pt"]="cot", ["sk"]="cotg", ["sr"]="ctg", ["sr-latn"]="ctg", + ["sv"]="cot", }, }, ["coth"]={ @@ -711,9 +747,11 @@ data.labels={ ["es"]="coth", ["hy"]="coth", ["mk"]="ctgh", + ["pt"]="coth", ["sk"]="cotgh", ["sr"]="ctgh", ["sr-latn"]="ctgh", + ["sv"]="coth", }, }, ["csc"]={ @@ -725,28 +763,13 @@ data.labels={ ["es"]="csc", ["hy"]="csc", ["mk"]="cosec", + ["pt"]="csc", ["sk"]="cosec", ["sr"]="cosec", ["sr-latn"]="cosec", + ["sv"]="csc", }, }, ---[[ ["ctg"]={ - ["labels"]={ - ["ca"]="cot", - ["cs"]="cotg", - ["en"]="cot", - ["eo"]="cotan", - ["es"]="cot", - ["hr"]="ctg", - ["hy"]="cot", - ["mk"]="ctg", - ["pl"]="ctg", - ["sk"]="cotg", - ["sr"]="ctg", - ["sr-latn"]="ctg", - }, - }, ---]] ["deg"]={ ["labels"]={ ["ca"]="gr", @@ -756,9 +779,11 @@ data.labels={ ["es"]="gr", ["hy"]="deg", ["mk"]="deg", + ["pt"]="deg", ["sk"]="deg", ["sr"]="deg", ["sr-latn"]="deg", + ["sv"]="deg", }, }, ["det"]={ @@ -769,9 +794,11 @@ data.labels={ ["eo"]="det", ["es"]="det", ["hy"]="det", + ["pt"]="det", ["sk"]="det", ["sr"]="det", ["sr-latn"]="det", + ["sv"]="det", }, }, ["diff"]={ @@ -781,7 +808,9 @@ data.labels={ ["en"]="d", ["eo"]="dif", ["hy"]="d", + ["pt"]="d", ["sk"]="d", + ["sv"]="d", }, }, ["dim"]={ @@ -793,9 +822,11 @@ data.labels={ ["es"]="dim", ["hy"]="dim", ["mk"]="dim", + ["pt"]="dim", ["sk"]="dim", ["sr"]="dim", ["sr-latn"]="dim", + ["sv"]="dim", }, }, ["exp"]={ @@ -806,9 +837,11 @@ data.labels={ ["eo"]="eksp", ["es"]="exp", ["hy"]="exp", + ["pt"]="exp", ["sk"]="exp", ["sr"]="exp", ["sr-latn"]="exp", + ["sv"]="exp", }, }, ["gcd"]={ @@ -823,9 +856,11 @@ data.labels={ ["hy"]="ԱԸԲ", ["mk"]="НЗД", ["nl"]="ggd", + ["pt"]="gcd", ["sk"]="NSD", ["sr"]="НЗД", ["sr-latn"]="NZD", + ["sv"]="sgd", }, }, ["hom"]={ @@ -836,7 +871,9 @@ data.labels={ ["eo"]="hom", ["es"]="hom", ["hy"]="հոմ", + ["pt"]="hom", ["sk"]="Hom", + ["sv"]="hom", }, }, ["inf"]={ @@ -848,9 +885,11 @@ data.labels={ ["es"]="inf", ["hy"]="inf", ["mk"]="inf", + ["pt"]="inf", ["sk"]="inf", ["sr"]="inf", ["sr-latn"]="inf", + ["sv"]="inf", }, }, ["injlim"]={ @@ -861,9 +900,11 @@ data.labels={ ["eo"]="", ["es"]="lím\\sixperemspace iny", ["hy"]="inj\\sixperemspace lim", + ["pt"]="inj\\sixperemspace lim", ["sk"]="inj\\sixperemspace lim", ["sr"]="inj\\sixperemspace lim", ["sr-latn"]="inj\\sixperemspace lim", + ["sv"]="inj\\sixperemspace lim", }, }, ["inv"]={ @@ -875,9 +916,11 @@ data.labels={ ["es"]="inv", ["hy"]="inv", ["mk"]="inv", + ["pt"]="inv", ["sk"]="inv", ["sr"]="inv", ["sr-latn"]="inv", + ["sv"]="inv", }, }, ["ker"]={ @@ -888,9 +931,11 @@ data.labels={ ["eo"]="", ["es"]="Ker", ["hy"]="ker", + ["pt"]="ker", ["sk"]="ker", ["sr"]="ker", ["sr-latn"]="ker", + ["sv"]="ker", }, }, ["lcm"]={ @@ -905,9 +950,11 @@ data.labels={ ["hy"]="աըբ", ["mk"]="НЗС", ["nl"]="kgv", + ["pt"]="lcm", ["sk"]="NSN", ["sr"]="НЗС", ["sr-latn"]="NZS", + ["sv"]="lcm", }, }, ["lg"]={ @@ -921,9 +968,11 @@ data.labels={ ["fr"]="log", ["hy"]="lg", ["mk"]="lg", + ["pt"]="lg", ["sk"]="log", ["sr"]="lg", ["sr-latn"]="lg", + ["sv"]="lg", }, }, ["lim"]={ @@ -935,9 +984,11 @@ data.labels={ ["es"]="lím", ["hy"]="lim", ["mk"]="lim", + ["pt"]="lim", ["sk"]="lim", ["sr"]="lim", ["sr-latn"]="lim", + ["sv"]="lim", }, }, ["liminf"]={ @@ -949,9 +1000,11 @@ data.labels={ ["es"]="lím\\sixperemspace inf", ["hy"]="lim\\sixperemspace infs", ["mk"]="lim\\sixperemspace inf", + ["pt"]="lim\\sixperemspace inf", ["sk"]="lim\\sixperemspace inf", ["sr"]="lim\\sixperemspace inf", ["sr-latn"]="lim\\sixperemspace inf", + ["sv"]="lim\\sixperemspace inf", }, }, ["limsup"]={ @@ -963,9 +1016,11 @@ data.labels={ ["es"]="lím\\sixperemspace sup", ["hy"]="lim\\sixperemspace sup", ["mk"]="lim\\sixperemspace sup", + ["pt"]="lim\\sixperemspace sup", ["sk"]="lim\\sixperemspace sup", ["sr"]="lim\\sixperemspace sup", ["sr-latn"]="lim\\sixperemspace sup", + ["sv"]="lim\\sixperemspace sup", }, }, ["ln"]={ @@ -977,9 +1032,11 @@ data.labels={ ["es"]="ln", ["hy"]="ln", ["mk"]="ln", + ["pt"]="ln", ["sk"]="ln", ["sr"]="ln", ["sr-latn"]="ln", + ["sv"]="ln", }, }, ["log"]={ @@ -991,9 +1048,11 @@ data.labels={ ["es"]="log", ["hy"]="log", ["mk"]="log", + ["pt"]="log", ["sk"]="log", ["sr"]="log", ["sr-latn"]="log", + ["sv"]="log", }, }, ["max"]={ @@ -1006,15 +1065,17 @@ data.labels={ ["fi"]="max", ["hy"]="max", ["mk"]="max", + ["pt"]="max", ["sk"]="max", ["sr"]="max", ["sr-latn"]="max", + ["sv"]="max", }, }, ["median"]={ ["labels"]={ + ["comment"]=[[ cs+sk: \tilde won't work]], ["ca"]="mitjana", - -- ["cs"]="\\tilde", -- won't work ["cs"]="Me", ["en"]="median", ["eo"]="mediano", @@ -1022,10 +1083,11 @@ data.labels={ ["fi"]="mediaani", ["fr"]="médiane", ["hy"]="միջին", - -- ["sk"]="\\tilde", -- won't work + ["pt"]="median", ["sk"]="Med", ["sr"]="median", ["sr-latn"]="median", + ["sv"]="median", }, }, ["min"]={ @@ -1038,9 +1100,11 @@ data.labels={ ["fi"]="min", ["hy"]="min", ["mk"]="min", + ["pt"]="min", ["sk"]="min", ["sr"]="min", ["sr-latn"]="min", + ["sv"]="min", }, }, ["mod"]={ @@ -1053,9 +1117,11 @@ data.labels={ ["fi"]="mod", ["hy"]="mod", ["mk"]="mod", + ["pt"]="mod", ["sk"]="mod", ["sr"]="mod", ["sr-latn"]="mod", + ["sv"]="mod", }, }, ["projlim"]={ @@ -1066,9 +1132,11 @@ data.labels={ ["eo"]="", ["es"]="lím\\sixperemspace proy", ["hy"]="proj\\sixperemspace lim", + ["pt"]="proj\\sixperemspace lim", ["sk"]="proj\\sixperemspace lim", ["sr"]="proj\\sixperemspace lim", ["sr-latn"]="proj\\sixperemspace lim", + ["sv"]="proj\\sixperemspace lim", }, }, ["sec"]={ @@ -1081,9 +1149,11 @@ data.labels={ ["fi"]="sek", ["hy"]="sec", ["mk"]="sec", + ["pt"]="sec", ["sk"]="sec", ["sr"]="sec", ["sr-latn"]="sec", + ["sv"]="sec", }, }, ["sin"]={ @@ -1096,9 +1166,11 @@ data.labels={ ["fi"]="sin", ["hy"]="sin", ["mk"]="sin", + ["pt"]="sen", ["sk"]="sin", ["sr"]="sin", ["sr-latn"]="sin", + ["sv"]="sin", }, }, ["sinh"]={ @@ -1110,9 +1182,11 @@ data.labels={ ["es"]="senh", ["hy"]="sinh", ["mk"]="sinh", + ["pt"]="sinh", ["sk"]="sinh", ["sr"]="sinh", ["sr-latn"]="sinh", + ["sv"]="sinh", }, }, ["sup"]={ @@ -1123,9 +1197,11 @@ data.labels={ ["es"]="sup", ["hy"]="sup", ["mk"]="sup", + ["pt"]="sup", ["sk"]="sup", ["sr"]="sup", ["sr-latn"]="sup", + ["sv"]="sup", }, }, ["tan"]={ @@ -1138,9 +1214,11 @@ data.labels={ ["hy"]="tan", ["mk"]="tg", ["pl"]="tg", + ["pt"]="tan", ["sk"]="tg", ["sr"]="tg", ["sr-latn"]="tg", + ["sv"]="tan", }, }, ["tanh"]={ @@ -1151,18 +1229,15 @@ data.labels={ ["es"]="tanh", ["hy"]="tanh", ["mk"]="tgh", + ["pt"]="tanh", ["sk"]="tgh", ["sr"]="tgh", ["sr-latn"]="tgh", + ["sv"]="tanh", }, }, }, ["texts"]={ - ["demo-texts"]={ - ["labels"]={ - ["en"]={ "demo-1", "demo-2" }, - }, - }, ["and"]={ ["labels"]={ ["af"]="", @@ -1189,13 +1264,13 @@ data.labels={ ["nl"]=" en ", ["nn"]="", ["pl"]=" i ", - ["pt"]="", + ["pt"]=" e ", ["ro"]="", ["ru"]="", ["sk"]=" a ", ["sl"]="", ["sr"]=" и ", - ["sv"]="", + ["sv"]=" och ", ["tk"]="", ["tr"]="", ["ua"]="", @@ -1207,18 +1282,18 @@ data.labels={ ["labels"]={ ["af"]="Bylae ", ["ar"]="ملحق ", - ["be"]="Апендыцыт", + ["be"]="Апендыцыт ", ["ca"]="Apèndix ", ["cn"]="附录 ", ["cs"]="Příloha ", ["da"]="Bilag ", ["de"]="Anhang ", ["en"]="Appendix ", - ["eo"]="Anekso", + ["eo"]="Anekso ", ["es"]="Apéndice ", ["et"]="Lisa ", ["fa"]="پیوست ", - ["fi"]="liite", + ["fi"]="Liite ", ["fr"]="Annexe ", ["gr"]="Παράρτημα ", ["hr"]="Dodatak ", @@ -1234,14 +1309,14 @@ data.labels={ ["nl"]="", ["nn"]="Tillegg ", ["pl"]="Dodatek ", - ["pt"]="", + ["pt"]="Apendice ", ["ro"]="", ["ru"]="", ["sk"]="Príloha ", ["sl"]="Dodatek ", ["sr"]="Додатак ", ["sr-latn"]="Dodatak ", - ["sv"]="", + ["sv"]="Bilaga ", ["tk"]="Goşmaça ", ["tr"]="", ["ua"]="", @@ -1348,16 +1423,16 @@ data.labels={ ["labels"]={ ["af"]="", ["ar"]="في صفحة ", - ["ca"]="a la pagina", + ["ca"]="a la pagina ", ["cs"]="na straně ", ["da"]="på side ", ["de"]="auf Seite ", ["en"]="at page ", - ["eo"]="je paĝo", + ["eo"]="je paĝo ", ["es"]="en la página ", ["et"]="leheküljel ", ["fa"]="در صفحه ", - ["fi"]="sivulla", + ["fi"]="sivulla ", ["fr"]="à la page ", ["gr"]="", ["hr"]="na stranici ", @@ -1371,7 +1446,7 @@ data.labels={ ["nl"]="op pagina ", ["nn"]="på side ", ["pl"]="na stronie ", - ["pt"]="", + ["pt"]="na pagina", ["ro"]="", ["ru"]="на странице ", ["sk"]="na strane ", @@ -1495,13 +1570,13 @@ data.labels={ ["da"]="", ["de"]="Kapitel ", ["en"]="Chapter ", - ["eo"]="Ĉapitro", + ["eo"]="Ĉapitro ", ["es"]="Capítulo ", ["et"]="Peatükk ", ["fa"]="فصل ", ["fi"]="luku", ["fr"]="Chapitre ", - ["gr"]="Κεφάλαιο", + ["gr"]="Κεφάλαιο ", ["hr"]="Poglavlje ", ["hu"]={ "", " fejezet" }, ["hy"]="Գլուխ ", @@ -1515,15 +1590,15 @@ data.labels={ ["nl"]="", ["nn"]="", ["pl"]="Rozdział ", - ["pt"]="", + ["pt"]="Capitulo ", ["ro"]="", ["ru"]="", ["sk"]="Kapitola ", ["sl"]="Poglavje ", ["sr"]="Глава ", ["sr-latn"]="Glava ", - ["sv"]="", - ["tk"]="Bap", + ["sv"]="Kapitel ", + ["tk"]="Bap ", ["tr"]="", ["ua"]="", ["vi"]="Chương ", @@ -1557,25 +1632,31 @@ data.labels={ ["nl"]=" (vervolgd)", ["nn"]="", ["pl"]="", - ["pt"]="", + ["pt"]=" (continua)", ["ro"]="", ["ru"]="", ["sk"]=" (pokračovanie)", ["sl"]="", ["sr"]=" (наставак)", ["sr-latn"]=" (nastavak)", - ["sv"]="", + ["sv"]=" (forts.)", ["tk"]="", ["tr"]="", ["ua"]="", ["vi"]="", }, }, + ["day:genetiv"]={ + ["labels"]={ + ["cs"]="dne", + ["sk"]="dňa", + }, + }, ["day"]={ ["labels"]={ ["bg"]="ден", ["ca"]="dia", - ["cs"]="den", -- {"den", "dne" } + ["cs"]="den", ["de"]="Tag", ["en"]="day", ["eo"]="tago", @@ -1587,9 +1668,11 @@ data.labels={ ["kr"]="일", ["mk"]="ден", ["nl"]="dag", - ["sk"]="deň", -- {"deň", "dňa" } + ["pt"]="dia", + ["sk"]="deň", ["sr"]="дан", ["sr-latn"]="dan", + ["sv"]="dag", }, }, ["december"]={ @@ -1788,8 +1871,8 @@ data.labels={ ["labels"]={ ["af"]="Figuur ", ["ar"]="شكل ", - ["be"]="Малюнак", - ["bg"]="Фигура", + ["be"]="Малюнак ", + ["bg"]="Фигура ", ["ca"]="Figura ", ["cn"]="图 ", ["cs"]="Obrázek ", @@ -1802,7 +1885,7 @@ data.labels={ ["fa"]="شکل ", ["fi"]="Kuva ", ["fr"]="Figure ", - ["gr"]="Σχήμα", + ["gr"]="Σχήμα ", ["hr"]="Slika ", ["hu"]={ "", " ábra" }, ["hy"]="Նկար ", @@ -1824,7 +1907,7 @@ data.labels={ ["sr"]="Слика ", ["sr-latn"]="Slika ", ["sv"]="Figur ", - ["tk"]="Surat", + ["tk"]="Surat ", ["tr"]="Şekil ", ["ua"]="Малюнок ", ["vi"]="Hình ", @@ -1838,7 +1921,9 @@ data.labels={ ["eo"]="sekvv", ["fr"]=hairspace .. "sqq", ["hy"]="ff.", + ["pt"]="seg", ["sk"]="násl.", + ["sv"]="ff.", }, }, ["following:singular"]={ @@ -1849,7 +1934,9 @@ data.labels={ ["eo"]="sekv", ["fr"]=hairspace .. "sq", ["hy"]="f.", + ["pt"]="seg", ["sk"]="násl.", + ["sv"]="f.", }, }, ["followingpage"]={ @@ -1867,9 +1954,11 @@ data.labels={ ["hy"]="Հաջորդ էջում", ["mk"]="на следната страница", ["nl"]="op een volgende bladzijde", + ["pt"]="pagina seguinte", ["sk"]="na nasledujúcej strane", ["sr"]="на следећој страници", ["sr-latn"]="na sledećoj stranici", + ["sv"]="på nästa sida", }, }, ["friday"]={ @@ -1947,16 +2036,16 @@ data.labels={ ["da"]="Grafik ", ["de"]="Grafik ", ["en"]="Graphic ", - ["eo"]="Grafiko", + ["eo"]="Grafiko ", ["es"]="Gráfico ", ["et"]="Pilt ", ["fa"]="طرح ", ["fi"]="Grafiikka ", ["fr"]="Illustration ", - ["gr"]="Γραφικό", + ["gr"]="Γραφικό ", ["hr"]="Slika ", ["hu"]={ "", " kép" }, - ["hy"]="Գրաֆ", + ["hy"]="Գրաֆ ", ["it"]="Grafico ", ["ja"]="イラスト", ["la"]="Typus ", @@ -1974,10 +2063,10 @@ data.labels={ ["sr"]="График ", ["sr-latn"]="Grafik ", ["sv"]="Grafik ", - ["tk"]="Grafik", - ["tr"]="Grafik", + ["tk"]="Grafik ", + ["tr"]="Grafik ", ["ua"]="График ", - ["vi"]="Đồ thị", + ["vi"]="Đồ thị ", }, }, ["hencefore"]={ @@ -1986,10 +2075,10 @@ data.labels={ ["ar"]="كما وضحنا سابقا", ["be"]="гл. вышэй", ["bg"]="виж по-горе", - ["ca"]="com es mostra dalt ", + ["ca"]="com es mostra dalt", ["cs"]="viz výše", ["da"]="se foroven", - ["de"]="siehe oben", -- better "oben"? + ["de"]="siehe oben", ["en"]="as we show above", ["eo"]="laŭsupre", ["es"]="como se muestra arriba", @@ -2010,7 +2099,7 @@ data.labels={ ["nl"]="hierboven", ["nn"]="som vist over", ["pl"]="jak pokazano wyżej", - ["pt"]="", + ["pt"]="como mostrado em cima", ["ro"]="", ["ru"]="см. выше", ["sk"]="pozri hore", @@ -2033,7 +2122,7 @@ data.labels={ ["ca"]="com es mostra baix", ["cs"]="viz níže", ["da"]="se forneden", - ["de"]="siehe unten", -- better "nachstehend"? + ["de"]="siehe unten", ["en"]="as we show below", ["eo"]="laŭsube", ["es"]="como se muestra abajo", @@ -2054,7 +2143,7 @@ data.labels={ ["nl"]="hieronder", ["nn"]="som vist under", ["pl"]="jak pokazano niżej", - ["pt"]="", + ["pt"]="como mostrado em baixo", ["ro"]="", ["ru"]="см. ниже", ["sk"]="pozri ďalej", @@ -2080,15 +2169,15 @@ data.labels={ ["da"]="Intermezzo ", ["de"]="Intermezzo ", ["en"]="Intermezzo ", - ["eo"]="Intermezo", + ["eo"]="Intermezo ", ["es"]="Intermedio ", ["et"]="Vahemäng ", ["fi"]="Intermezzo ", ["fr"]="Intermède ", - ["gr"]="Παύση", + ["gr"]="Παύση ", ["hr"]="Intermeco ", ["hu"]={ "", " intermezzo" }, - ["hy"]="Ինտերմեցո", + ["hy"]="Ինտերմեցո ", ["it"]="Intermezzo ", ["ja"]="間奏曲", ["kr"]="간주곡", @@ -2107,10 +2196,10 @@ data.labels={ ["sr"]="Дигресија ", ["sr-latn"]="Digresija ", ["sv"]="Intermezzo ", - ["tk"]="Arakesme", + ["tk"]="Arakesme ", ["tr"]="", ["ua"]="Вставка ", - ["vi"]="intermezzo", + ["vi"]="Intermezzo ", }, }, ["january"]={ @@ -2423,7 +2512,7 @@ data.labels={ ["fa"]="سطر ", ["fi"]="rivi ", ["fr"]="ligne ", - ["gr"]="Γραμμή", + ["gr"]="Γραμμή ", ["hr"]="redak ", ["hu"]={ "", " sor" }, ["hy"]="Տող ", @@ -2445,7 +2534,7 @@ data.labels={ ["sr"]="линија ", ["sr-latn"]="linija ", ["sv"]="rad ", - ["tk"]="setir", + ["tk"]="setir ", ["tr"]="satır ", ["ua"]="рядок ", ["vi"]="dòng ", @@ -2469,7 +2558,7 @@ data.labels={ ["fa"]="سطرهای ", ["fi"]="rivie ", ["fr"]="lignes ", - ["gr"]="Γραμμές", + ["gr"]="Γραμμές ", ["hr"]="retci ", ["hu"]="sorok ", ["hy"]="Տողեր ", @@ -2491,7 +2580,7 @@ data.labels={ ["sr"]="линије ", ["sr-latn"]="linije ", ["sv"]="rader ", - ["tk"]="setirler", + ["tk"]="setirler ", ["tr"]="satırlar ", ["ua"]="рядки ", ["vi"]="dòng ", @@ -2759,6 +2848,7 @@ data.labels={ ["be"]="месяц", ["bg"]="месец", ["ca"]="mes", + ["cs"]="měsíc", ["de"]="Monat", ["en"]="month", ["eo"]="monato", @@ -2771,8 +2861,11 @@ data.labels={ ["kr"]="월", ["mk"]="месец", ["nl"]="maand", + ["pt"]="mes", + ["sk"]="mesiac", ["sr"]="месец", ["sr-latn"]="mesec", + ["sv"]="månad", }, }, ["november"]={ @@ -2973,7 +3066,7 @@ data.labels={ ["af"]="", ["ar"]="صفحة ", ["be"]="старонка ", - ["bg"]="страна", + ["bg"]="страна ", ["ca"]="pagina ", ["cs"]="strana ", ["da"]="Side ", @@ -2983,7 +3076,7 @@ data.labels={ ["es"]="página ", ["et"]="lehekülg ", ["fa"]="صفحه ", - ["fi"]="Sivu", + ["fi"]="Sivu ", ["fr"]="page ", ["gr"]="", ["hr"]="stranica ", @@ -2998,7 +3091,7 @@ data.labels={ ["nl"]="pagina ", ["nn"]="side ", ["pl"]="strona ", - ["pt"]="", + ["pt"]="pagina ", ["ro"]="", ["ru"]="страница ", ["sk"]="strana ", @@ -3030,7 +3123,7 @@ data.labels={ ["fa"]="قسمت ", ["fi"]="Osa ", ["fr"]="Partie ", - ["gr"]="Μέρος", + ["gr"]="Μέρος ", ["hr"]="Dio ", ["hu"]={ "", " rész" }, ["hy"]="Մաս ", @@ -3039,10 +3132,9 @@ data.labels={ ["kr"]={ "제", "부" }, ["la"]="Pars ", ["lt"]={ "", " dalis" }, - ["mk"]="Дел ", ["nb"]="Del ", ["nl"]="Deel ", - ["nn"]="Del", + ["nn"]="Del ", ["pl"]="Część ", ["pt"]="Parte ", ["ro"]="Partea ", @@ -3052,7 +3144,7 @@ data.labels={ ["sr"]="Део ", ["sr-latn"]="Deo ", ["sv"]="Del ", - ["tk"]="Bölüm", + ["tk"]="Bölüm ", ["tr"]="Cilt ", ["ua"]="Частина ", ["vi"]="Phần ", @@ -3060,9 +3152,10 @@ data.labels={ }, ["precedingpage"]={ ["labels"]={ + ["comment"]=[[ "auf der vorigen Seite" ok, but not "auf einer vorigen Seite" ]], ["ca"]="en una pagina anterior", ["cs"]="na předchozí straně", - ["de"]="oben", -- "auf der vorigen Seite" ok, but not "auf einer vorigen Seite" + ["de"]="oben", ["en"]="on a preceding page", ["eo"]="sur antaŭa paĝo", ["es"]="en la pagina anterior", @@ -3073,9 +3166,11 @@ data.labels={ ["hy"]="նախորդ էջ", ["mk"]="на претходната страница", ["nl"]="op een voorgaande bladzijde", + ["pt"]="na seguinte pagina", ["sk"]="na predchádzajúcej strane", ["sr"]="на претходној страници", ["sr-latn"]="na prethodnoj stranici", + ["sv"]="på föregående sida", }, }, ["saturday"]={ @@ -3151,14 +3246,14 @@ data.labels={ ["cs"]="Sekce ", ["da"]="", ["de"]="Abschnitt ", - ["en"]="Section", + ["en"]="Section ", ["eo"]="Sekcio ", ["es"]="Sección ", ["et"]="jaos ", ["fa"]="بخش ", - ["fi"]="Osio", + ["fi"]="Osio ", ["fr"]="Section ", - ["gr"]="Ενότητα", + ["gr"]="Ενότητα ", ["hr"]="Odjeljak ", ["hu"]="Fejezet ", ["hy"]="Բաժին ", @@ -3179,7 +3274,7 @@ data.labels={ ["sl"]="", ["sr"]="Одељак ", ["sr-latn"]="Odeljak ", - ["sv"]="", + ["sv"]="Avsnitt", ["tk"]="", ["tr"]="", ["ua"]="", @@ -3191,7 +3286,7 @@ data.labels={ ["af"]="", ["ar"]="انظر ", ["be"]="гл. ", - ["bg"]="погледни", + ["bg"]="погледни ", ["ca"]="vore ", ["cs"]="viz ", ["da"]="se ", @@ -3201,7 +3296,7 @@ data.labels={ ["es"]="ver: ", ["et"]="vaadake ", ["fa"]="نگاه کنید به ", - ["fi"]="Katso", + ["fi"]="katso ", ["fr"]="cf. ", ["gr"]="", ["hr"]="vidi ", @@ -3216,7 +3311,7 @@ data.labels={ ["nl"]="zie ", ["nn"]="sjå ", ["pl"]="patrz ", - ["pt"]="", + ["pt"]="ver ", ["ro"]="", ["ru"]="см. ", ["sk"]="pozri ", @@ -3337,14 +3432,14 @@ data.labels={ ["cs"]="Podsekce ", ["da"]="", ["de"]="Unterabschnitt ", - ["en"]="Subsection", + ["en"]="Subsection ", ["eo"]="Subsekcio ", ["es"]="Subsección ", ["et"]="alajaotis ", ["fa"]="زیربخش ", ["fi"]="Alajakso", ["fr"]="Soussection ", - ["gr"]="Υπόενότητα", + ["gr"]="Υπόενότητα ", ["hr"]="Pododjeljak ", ["hu"]="Alfejezet ", ["hy"]=" Ենթաբաժին ", @@ -3357,14 +3452,14 @@ data.labels={ ["nl"]="", ["nn"]="", ["pl"]="Podpodrozdział ", - ["pt"]="", + ["pt"]="Subsecçao ", ["ro"]="", ["ru"]="", ["sk"]="Podsekcia ", ["sl"]="", ["sr"]="Пододељак ", ["sr-latn"]="Pododeljak ", - ["sv"]="", + ["sv"]="Underavsnitt", ["tk"]="", ["tr"]="", ["ua"]="", @@ -3382,12 +3477,12 @@ data.labels={ ["cs"]="Podpodsekce ", ["da"]="", ["de"]="Unterunterabschnitt ", - ["en"]="Subsubsection", + ["en"]="Subsubsection ", ["eo"]="Subsubsekcio ", ["es"]="Subsubsección ", ["et"]="alamjaotis ", ["fa"]="زیرزیربخش ", - ["fi"]="Alakohta", + ["fi"]="Alakohta ", ["fr"]="Soussoussection ", ["gr"]="", ["hr"]="Podpododjeljak ", @@ -3402,14 +3497,14 @@ data.labels={ ["nl"]="", ["nn"]="", ["pl"]="", - ["pt"]="", + ["pt"]="Subsubsecçao ", ["ro"]="", ["ru"]="", ["sk"]="Podpodsekcia ", ["sl"]="", ["sr"]="Подпододељак ", ["sr-latn"]="Podpododeljak ", - ["sv"]="", + ["sv"]="Underunderavsnitt", ["tk"]="", ["tr"]="", ["ua"]="", @@ -3426,13 +3521,13 @@ data.labels={ ["cn"]="", ["cs"]="Podpodpodsekce ", ["da"]="", - ["de"]="Unterunterunterabschnitt", - ["en"]="Subsubsubsection", + ["de"]="Unterunterunterabschnitt ", + ["en"]="Subsubsubsection ", ["eo"]="Subsubsubsekcio ", ["es"]="Subsubsubsección ", ["et"]="", ["fa"]="زیرزیرزیربخش ", - ["fi"]="Ala-alakohta", + ["fi"]="Ala-alakohta ", ["fr"]="Soussoussoussection ", ["gr"]="", ["hr"]="Podpodpododjeljak ", @@ -3447,7 +3542,7 @@ data.labels={ ["nl"]="", ["nn"]="", ["pl"]="", - ["pt"]="", + ["pt"]="Subsubsubsecçao ", ["ro"]="", ["ru"]="", ["sk"]="Podpodpodsekcia ", @@ -3541,7 +3636,7 @@ data.labels={ ["fa"]="جدول ", ["fi"]="Taulukko ", ["fr"]="Tableau ", - ["gr"]="Πίνακας", + ["gr"]="Πίνακας ", ["hr"]="Tablica ", ["hu"]={ "", " táblázat" }, ["hy"]="Աղյուսակ ", @@ -3563,7 +3658,7 @@ data.labels={ ["sr"]="Табела ", ["sr-latn"]="Tabela ", ["sv"]="Tabell ", - ["tk"]="Tablisa", + ["tk"]="Tablisa ", ["tr"]="Tablo ", ["ua"]="Таблиця ", ["vi"]="Bảng ", @@ -3775,9 +3870,11 @@ data.labels={ ["kr"]="년", ["mk"]="година", ["nl"]="jaar", + ["pt"]="ano", ["sk"]="rok", ["sr"]="година", ["sr-latn"]="godina", + ["sv"]="år", }, }, }, @@ -3790,7 +3887,7 @@ data.labels={ ["bg"]="Съкращения", ["ca"]="Abreviacions", ["cn"]="缩略语", - ["cs"]="Seznam zkratek", --"Zkratky" + ["cs"]="Seznam zkratek", ["da"]="Forkortelser", ["de"]="Abkürzungen", ["en"]="Abbreviations", @@ -3817,7 +3914,7 @@ data.labels={ ["pt"]="Abreviaturas", ["ro"]="Abrevieri", ["ru"]="Список сокращений", - ["sk"]="Zoznam skratiek", -- "Skratky" + ["sk"]="Zoznam skratiek", ["sl"]="Kratice", ["sr"]="Скраћенице", ["sr-latn"]="Skraćenice", @@ -4129,14 +4226,14 @@ data.labels={ ["nl"]="Literatuur", ["nn"]="", ["pl"]="Bibliografia", - ["pt"]="", + ["pt"]="Referencias", ["ro"]="", ["ru"]="", ["sk"]="Literatúra", ["sl"]="Literatura", ["sr"]="Литература", ["sr-latn"]="Literatura", - ["sv"]="", + ["sv"]="Litteraturförteckning", ["tk"]="", ["tr"]="", ["ua"]="", diff --git a/tex/context/base/mkiv/phys-dim.lua b/tex/context/base/mkiv/phys-dim.lua index 91803e4fd..fa9f3f308 100644 --- a/tex/context/base/mkiv/phys-dim.lua +++ b/tex/context/base/mkiv/phys-dim.lua @@ -452,7 +452,7 @@ local short_units = { -- I'm not sure about casing s = "second", g = "gram", n = "newton", - v = "volt", + V = "volt", t = "tonne", l = "liter", -- w = "watt", @@ -460,6 +460,12 @@ local short_units = { -- I'm not sure about casing -- a = "ampere", A = "ampere", + Ω = "ohm", + +-- C = "coulomb", -- needs checking with (c)enti +-- K = "kelvin", -- needs checking with (k)ilo +-- N = "newton", -- needs checking with (n)ewton + min = "minute", [utfchar(0x2103)] = "celsius", diff --git a/tex/context/base/mkiv/publ-imp-apa.lua b/tex/context/base/mkiv/publ-imp-apa.lua index 65dee0717..6e0520e10 100644 --- a/tex/context/base/mkiv/publ-imp-apa.lua +++ b/tex/context/base/mkiv/publ-imp-apa.lua @@ -95,14 +95,11 @@ categories.article = { "year", "subtitle", "type", "file", "journal", "volume", "number", "pages", - "doi", "note", + "doi", "issn", "note", -- APA ignores this: -- -- "month", -- - -- fields defined in jabref but presently ignored: - -- - -- "issn", }, } @@ -120,7 +117,7 @@ categories.magazine = { "subtitle", "type", "file", "number", "month", "day", - "doi", "note", + "doi", "issn", "note", }, } @@ -142,7 +139,7 @@ categories.periodical = { "subtitle", "file", "series", "volume", "number", "month", "organization", - "doi", "note", + "doi", "issn", "note", }, } @@ -157,7 +154,7 @@ categories.standard = { "author", "year", "title", "subtitle", - "doi", "note", + "doi", "isbn", "note", }, optional = { "withauthor", "translator", @@ -181,7 +178,7 @@ categories.book = { "subtitle", "type", "file", "editionset", "series", "address", - "doi", "note", + "doi", "isbn", "note", "abstract", }, } @@ -208,7 +205,7 @@ categories.inbook = { "editionset", "series", "month", "address", - "doi", "note", + "doi", "isbn", "note", }, } @@ -236,7 +233,7 @@ categories.incollection = { -- APA ignores this: "chapter", "month", "address", - "doi", "note", + "doi", "isbn", "note", }, } @@ -257,7 +254,7 @@ categories.booklet = { "year", "month", "subtitle", "type", "file", "address", - "doi", "note", + "doi", "isbn", "note", }, } @@ -281,7 +278,7 @@ categories.proceedings = { "editionset", "series", "month", "address", - "doi", "note", + "doi", "isbn", "note", }, } @@ -296,7 +293,7 @@ categories.inproceedings = { "month", "edition", "series", "address", "organization", - "doi", "note", + "doi", "isbn", "note", }, } @@ -320,7 +317,7 @@ categories.thesis = { "subtitle", "file", "month", "address", - "doi", "note", + "doi", "isbn", "note", }, } @@ -338,7 +335,7 @@ categories.mastersthesis = { "subtitle", "file", "month", "address", - "doi", "note", + "doi", "isbn", "note", }, } categories.phdthesis = categories.mastersthesis @@ -365,7 +362,7 @@ categories.techreport = { "subtitle", "file", "editionset", "month", - "doi", "note", + "doi", "isbn", "note", }, } @@ -387,7 +384,7 @@ categories.manual = { "address", "subtitle", "file", "editionset", "month", "year", - "doi", "note", + "doi", "isbn", "note", -- "abstract", }, } @@ -515,7 +512,7 @@ categories.misc = { "title", "subtitle", "file", "year", "month", "howpublished", - "doi", "note", + "doi", "isbn", "note", }, } @@ -533,7 +530,7 @@ categories.other = { optional = { "withauthor", "translator", "subtitle", "file", - "doi", "note", + "doi", "isbn", "note", }, } diff --git a/tex/context/base/mkiv/publ-imp-apa.mkvi b/tex/context/base/mkiv/publ-imp-apa.mkvi index c4ea0a7f0..b8038bd96 100644 --- a/tex/context/base/mkiv/publ-imp-apa.mkvi +++ b/tex/context/base/mkiv/publ-imp-apa.mkvi @@ -112,6 +112,14 @@ [apa:\s!list:doi] [apa:\s!list] +\definebtx + [apa:\s!list:isbn] + [apa:\s!list] + +\definebtx + [apa:\s!list:issn] + [apa:\s!list] + \definebtx [apa:\s!list:\s!page] [apa:\s!list] @@ -520,6 +528,14 @@ [apa:\s!cite:doi] [apa:\s!cite:url] +\definebtx + [apa:\s!cite:isbn] + [apa:\s!cite] + +\definebtx + [apa:\s!cite:issn] + [apa:\s!cite] + \definebtx [apa:\s!cite:num] [apa:\s!cite] @@ -879,6 +895,11 @@ \endgroup % which namespace? %\doif{\btxparameter{translate}}\v!yes { + % + % An option is unnecessary because the translated title + % only gets placed if the user includes a title:xx field + % for the entry - not standard for bibtex... + % \texdefinition{btx:apa:translated-title}{#title} %} \btxstopstyleandcolor @@ -888,7 +909,7 @@ \setmode{btx:apa:title-placed} % we make the title active, opening "file" \btxdoifelse {file} { - \texdefinition{btx:format:goto} + \texdefinition{btx:format:inject} {url(file:\btxflush{file})} { \texdefinition{btx:apa:composed-title}{title} @@ -1050,7 +1071,8 @@ \starttexdefinition mutable protected btx:apa:authoryear % we make the authoryear active, pointing to the citation - \texdefinition{btx:format:gotointernal} + \texdefinition{btx:format:inject} + {internal(\currentbtxinternal)} { \doifelsesetups{apa:list:sameauthor} { \btxdoifelsesameasprevious {author} { @@ -1139,7 +1161,12 @@ } \btxdoif {edition} { \texdefinition{btx:apa:leftparenthesis-or-comma} - \btxflush{edition} + % the edition= field is often language-dependent + % (i.e. second, 2nd, revised, etc.) + % so we handle an optional edition:xx= field: + \btxdoifelse {edition:\mainbtxlanguage} + {\btxflush{edition:\mainbtxlanguage}} + {\btxflush{edition}} \btxspace \btxlabeltext{apa:edition} } @@ -1260,11 +1287,15 @@ \starttexdefinition mutable protected btx:apa:url \begingroup \setbreakpoints[doi] - \texdefinition {btx:format:goto} { - url(\btxflush{url}) - } { + \ifconditional\btxinteractive + \goto { + \hyphenatedurl{\btxflush{url}} + } [ + url(\btxflush{url}) + ] + \else \hyphenatedurl{\btxflush{url}} - } + \fi \endgroup \stoptexdefinition @@ -1273,11 +1304,15 @@ \starttexdefinition mutable protected btx:apa:doi \begingroup \setbreakpoints[doi] - \texdefinition {btx:format:goto} { - url(http://dx.doi.org/\btxflush{doi}) - } { + \ifconditional\btxinteractive + \goto { + \hyphenatedurl{doi:\btxflush{doi}} + } [ + url(http://dx.doi.org/\btxflush{doi}) + ] + \else \hyphenatedurl{doi:\btxflush{doi}} - } + \fi \endgroup \stoptexdefinition @@ -1300,6 +1335,14 @@ \btxspace \texdefinition{btx:apa:doi} } + \btxdoif {issn} { + \btxspace + issn\colon\btxflush{issn} + } + \btxdoif {isbn} { + \btxspace + isbn\colon\btxflush{isbn} + } \texdefinition{btx:apa:note} \removeunwantedspaces \stoptexdefinition diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf index dddda9577..d4b423224 100644 Binary files a/tex/context/base/mkiv/status-files.pdf and b/tex/context/base/mkiv/status-files.pdf differ diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf index 087e77bf3..ee377dae7 100644 Binary files a/tex/context/base/mkiv/status-lua.pdf and b/tex/context/base/mkiv/status-lua.pdf differ diff --git a/tex/context/base/mkiv/util-sac.lua b/tex/context/base/mkiv/util-sac.lua index 36daef816..9d2e8356d 100644 --- a/tex/context/base/mkiv/util-sac.lua +++ b/tex/context/base/mkiv/util-sac.lua @@ -551,14 +551,14 @@ if bit32 and not streams.tocardinal1 then local char = string.char streams.tocardinal1 = char - function streams.tocardinal2(n) return char(extract( 8,8),extract( 0,8)) end - function streams.tocardinal3(n) return char(extract(16,8),extract( 8,8),extract(0,8)) end - function streams.tocardinal4(n) return char(extract(24,8),extract(16,8),extract(8,8),extract(0,8)) end + function streams.tocardinal2(n) return char(extract(n, 8,8),extract(n, 0,8)) end + function streams.tocardinal3(n) return char(extract(n,16,8),extract(n, 8,8),extract(n,0,8)) end + function streams.tocardinal4(n) return char(extract(n,24,8),extract(n,16,8),extract(n,8,8),extract(n,0,8)) end streams.tocardinal1le = char - function streams.tocardinal2le(n) return char(extract(0,8),extract(8,8)) end - function streams.tocardinal3le(n) return char(extract(0,8),extract(8,8),extract(16,8)) end - function streams.tocardinal4le(n) return char(extract(0,8),extract(8,8),extract(16,8),extract(24,8)) end + function streams.tocardinal2le(n) return char(extract(n,0,8),extract(n,8,8)) end + function streams.tocardinal3le(n) return char(extract(n,0,8),extract(n,8,8),extract(n,16,8)) end + function streams.tocardinal4le(n) return char(extract(n,0,8),extract(n,8,8),extract(n,16,8),extract(n,24,8)) end end diff --git a/tex/context/base/mkiv/util-sbx.lua b/tex/context/base/mkiv/util-sbx.lua index 066ca3023..65f6703ae 100644 --- a/tex/context/base/mkiv/util-sbx.lua +++ b/tex/context/base/mkiv/util-sbx.lua @@ -394,7 +394,7 @@ local runners = { if trace then report("resultof: %s",command) end - local handle = iopopen(command,"r") -- already has flush + local handle = iopopen(command,"rb") -- already has flush if handle then local result = handle:read("*all") or "" handle:close() diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl index 23dc6bbef..030a373aa 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{2023.04.27 16:54} +\newcontextversion{2023.05.05 18:36} %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 9ee1d3803..4cfa73091 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{2023.04.27 16:54} +\immutable\edef\contextversion{2023.05.05 18:36} %overloadmode 1 % check frozen / warning %overloadmode 2 % check frozen / error diff --git a/tex/context/base/mkxl/data-sch.lmt b/tex/context/base/mkxl/data-sch.lmt new file mode 100644 index 000000000..36f89040c --- /dev/null +++ b/tex/context/base/mkxl/data-sch.lmt @@ -0,0 +1,312 @@ +if not modules then modules = { } end modules ['data-sch'] = { + 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 load, tonumber, require = load, tonumber, require +local gsub, format = string.gsub, string.format +local savedata = io.savedata +local sortedhash, concat = table.sortedhash, table.concat +local finders, openers, loaders = resolvers.finders, resolvers.openers, resolvers.loaders +local addsuffix, suffix, splitbase = file.addsuffix, file.suffix, file.splitbase +local md5hex = md5.hex +local removefile, renamefile, fileexists = os.remove, os.rename, io.exists + +-- todo: more locals + +local trace_schemes = false trackers.register("resolvers.schemes",function(v) trace_schemes = v end) +local report_schemes = logs.reporter("resolvers","schemes") + +local http = require("socket.http") +local ltn12 = require("ltn12") + +if mbox then mbox = nil end -- useless and even bugged (helper overwrites lib) + +local resolvers = resolvers +local schemes = resolvers.schemes or { } +resolvers.schemes = schemes + +local cleaners = { } +schemes.cleaners = cleaners + +local threshold = 24 * 60 * 60 +local inmemory = false +local uselibrary = false + +directives.register("schemes.threshold", function(v) threshold = tonumber(v) or threshold end) +directives.register("schemes.inmemory", function(v) inmemory = v end) +directives.register("schemes.uselibrary", function(v) uselibrary = v end) + +function cleaners.none(specification) + return specification.original +end + +-- function cleaners.strip(specification) +-- -- todo: only keep suffix periods, so after the last +-- return (gsub(specification.original,"[^%a%d%.]+","-")) -- so we keep periods +-- end + +function cleaners.strip(specification) -- keep suffixes + local path, name = splitbase(specification.original) + if path == "" then + return (gsub(name,"[^%a%d%.]+","-")) + else + return (gsub((gsub(path,"%.","-") .. "-" .. name),"[^%a%d%.]+","-")) + end +end + +function cleaners.md5(specification) + return addsuffix(md5hex(specification.original),suffix(specification.path)) +end + +local cleaner = cleaners.strip + +directives.register("schemes.cleanmethod", function(v) cleaner = cleaners[v] or cleaners.strip end) + +function resolvers.schemes.cleanname(specification) + local hash = cleaner(specification) + if trace_schemes then + report_schemes("hashing %a to %a",specification.original,hash) + end + return hash +end + +local cached = { } +local loaded = { } +local reused = { } +local thresholds = { } +local handlers = { } + +local function fetcher(report) + if uselibrary then + local curl = require("curl") or require("libs-imp-curl") -- we have curl preloaded + local fetch = curl and curl.fetch + if fetch then + return function(str) + local data, message = fetch { + url = str, + followlocation = true, + sslverifyhost = false, + sslverifypeer = false, + } + if not data then + report("some error: %s",message) + end + return data + end + end + end +end + +local runner = sandbox.registerrunner { + name = "to file curl resolver", + method = "execute", + program = "curl", + template = '--silent --insecure --create-dirs --output "%cachename%" "%original%"', + internal = function(specification) + local fetch = fetcher(specification.reporter) + return fetch and function(name,program,template,checkers,defaults,variables,reporter,finalized) + local data = fetch(variables.original) + savedata(variables.cachename,data or "") + end + end, + checkers = { + cachename = "cache", + original = "url", + } +} + +local memrunner = sandbox.registerrunner { + name = "in memory curl resolver", + method = "resultof", + program = "curl", + template = '--silent --insecure "%original%"', + internal = function(specification) + local fetch = fetcher(specification.reporter) + return fetch and function(name,program,template,checkers,defaults,variables,reporter,finalized) + return fetch(variables.original) or "" + end + end, + checkers = { + original = "url", + } +} + +local function fetch(specification) + local original = specification.original + local scheme = specification.scheme + local cleanname = schemes.cleanname(specification) + if inmemory then + statistics.starttiming(schemes) + local cachename = resolvers.savers.virtualname(cleanname) + local handler = handlers[scheme] + -- if handler and not uselibrary then + if handler then -- internal sockets are twice as fast as library + if trace_schemes then + report_schemes("fetching %a, protocol %a, method %a",original,scheme,"built-in") + end + logs.flush() + handler(specification,cachename) + else + if trace_schemes then + report_schemes("fetching %a, protocol %a, method %a",original,scheme,"curl") + end + logs.flush() + local result = memrunner { + original = original, + } + resolvers.savers.directvirtual(cachename,result,true) -- persistent + end + loaded[scheme] = loaded[scheme] + 1 + statistics.stoptiming(schemes) + return cachename + else + local cachename = caches.setfirstwritablefile(cleanname,"schemes") + if not cached[original] or threshold == 0 then + statistics.starttiming(schemes) + if threshold == 0 or not fileexists(cachename) or (os.difftime(os.time(),lfs.attributes(cachename).modification) > (thresholds[protocol] or threshold)) then + -- removefile(cachename) + cached[original] = cachename + local handler = handlers[scheme] + if handler then + if trace_schemes then + report_schemes("fetching %a, protocol %a, method %a",original,scheme,"built-in") + end + logs.flush() + handler(specification,cachename) + else + if trace_schemes then + report_schemes("fetching %a, protocol %a, method %a",original,scheme,"curl") + end + logs.flush() + runner { + original = original, + cachename = cachename, + } + end + end + if fileexists(cachename) then + cached[original] = cachename + if trace_schemes then + report_schemes("using cached %a, protocol %a, cachename %a",original,scheme,cachename) + end + else + cached[original] = "" + if trace_schemes then + report_schemes("using missing %a, protocol %a",original,scheme) + end + end + loaded[scheme] = loaded[scheme] + 1 + statistics.stoptiming(schemes) + else + if trace_schemes then + report_schemes("reusing %a, protocol %a",original,scheme) + end + reused[scheme] = reused[scheme] + 1 + end + return cached[original] + end +end + +local function finder(specification,filetype) + return resolvers.methodhandler("finders",fetch(specification),filetype) +end + +local opener = openers.file +local loader = loaders.file + +local function install(scheme,handler,newthreshold) + handlers [scheme] = handler + loaded [scheme] = 0 + reused [scheme] = 0 + finders [scheme] = finder + openers [scheme] = opener + loaders [scheme] = loader + thresholds[scheme] = newthreshold or threshold +end + +schemes.install = install + +local function http_handler(specification,cachename) + if inmemory then + local result = { } + local status, message = http.request { + url = specification.original, + sink = ltn12.sink.table(result) + } + resolvers.savers.directvirtual(cachename,concat(result),true) -- persistent + else + local tempname = cachename .. ".tmp" + local handle = io.open(tempname,"wb") + local status, message = http.request { + url = specification.original, + sink = ltn12.sink.file(handle) + } + if not status then + removefile(tempname) + else + removefile(cachename) + renamefile(tempname,cachename) + end + end + return cachename +end + +install('http',http_handler) +install('https') -- see pod +install('ftp') + +statistics.register("scheme handling time", function() + local l, r, nl, nr = { }, { }, 0, 0 + for k, v in sortedhash(loaded) do + if v > 0 then + nl = nl + 1 + l[nl] = k .. ":" .. v + end + end + for k, v in sortedhash(reused) do + if v > 0 then + nr = nr + 1 + r[nr] = k .. ":" .. v + end + end + local n = nl + nr + if n > 0 then + if nl == 0 then l = { "none" } end + if nr == 0 then r = { "none" } end + return format("%s seconds, %s processed, threshold %s seconds, loaded: %s, reused: %s", + statistics.elapsedtime(schemes), n, threshold, concat(l," "), concat(l," ")) + else + return nil + end +end) + +-- We provide a few more helpers: + +----- http = require("socket.http") +local httprequest = http.request +local toquery = url.toquery + +local function fetchstring(url,data) + local q = data and toquery(data) + if q then + url = url .. "?" .. q + end + local reply = httprequest(url) + return reply -- just one argument +end + +schemes.fetchstring = fetchstring + +function schemes.fetchtable(url,data) + local reply = fetchstring(url,data) + if reply then + local s = load("return " .. reply) + if s then + return s() + end + end +end diff --git a/tex/context/base/mkxl/data-vir.lmt b/tex/context/base/mkxl/data-vir.lmt index b78211fc9..75a8c68c0 100644 --- a/tex/context/base/mkxl/data-vir.lmt +++ b/tex/context/base/mkxl/data-vir.lmt @@ -20,26 +20,42 @@ local savers = resolvers.savers local cleaners = resolvers.cleaners local data = { } +local keep = { } local n = 0 -- hm, number can be query local f_virtual_n = formatters["virtual://%s.%s"] local f_virtual_y = formatters["virtual://%s-%s.%s"] -function savers.virtual(specification,content,suffix) +local function virtualname(specification,suffix) n = n + 1 -- one number for all namespaces local path = type(specification) == "table" and specification.path or specification if type(path) ~= "string" or path == "" then path = "virtualfile" end - local filename = suffix and f_virtual_y(path,n,suffix) or f_virtual_n(path,n) + return suffix and f_virtual_y(path,n,suffix) or f_virtual_n(path,n) +end + +local function directvirtual(filename,content,persistent) + if not content then + content = "" + end if trace_virtual then - report_virtual("saver: file %a saved",filename) + report_virtual("saver: file %a saved, size %i",filename,#content) end - data[filename] = content + data[filename] = content or "" + keep[filename] = persistent return filename end +function savers.virtual(specification,content,suffix) + return directvirtual(virtualname(specification,suffix),content) +end + +savers.virtualname = virtualname +savers.directvirtual = directvirtual + function cleaners.virtual(filename) data[filename] = nil + keep[filename] = nil end local finders = resolvers.finders @@ -94,7 +110,10 @@ function loaders.virtual(specification) if trace_virtual then report_virtual("loader: file %a loaded",original) end - data[original] = nil + if not keep[original] then + data[original] = nil + keep[original] = nil + end return true, d, #d end if trace_virtual then diff --git a/tex/context/base/mkxl/lang-def.mkxl b/tex/context/base/mkxl/lang-def.mkxl index 04215a779..192c9c6f9 100644 --- a/tex/context/base/mkxl/lang-def.mkxl +++ b/tex/context/base/mkxl/lang-def.mkxl @@ -798,7 +798,7 @@ \c!rightquote=\upperrightsingleninequote, \c!leftquotation=\upperleftdoublesixquote, \c!rightquotation=\upperrightdoubleninequote, - \c!date={\v!year,\space,\v!month,\space,\v!day}] + \c!date={\v!day,\space,\v!month,\space,\v!year}] \installlanguage[\s!pt-br][\c!default=\s!pt] % Brazil \installlanguage[\s!es-es][\c!default=\s!es] % Spain diff --git a/tex/context/base/mkxl/lpdf-img.lmt b/tex/context/base/mkxl/lpdf-img.lmt index c241ccdb7..e7dc663d6 100644 --- a/tex/context/base/mkxl/lpdf-img.lmt +++ b/tex/context/base/mkxl/lpdf-img.lmt @@ -67,6 +67,7 @@ local zlibcompress = xzip.compress local zlibdecompress = xzip.decompress local trace = false +local cleanvirtual = resolvers.cleaners.virtual -- false -- for now local report_jpg = logs.reporter("graphics","jpg") local report_jp2 = logs.reporter("graphics","jp2") @@ -74,6 +75,8 @@ local report_png = logs.reporter("graphics","png") trackers.register("graphics.backend", function(v) trace = v end) +directives.register("graphics.cleanvirtuals", function(v) cleanvirtual = v and resolvers.cleaners.virtual or false end) + local injectors = { } lpdf.injectors = injectors @@ -158,6 +161,9 @@ do if trace then report_jpg("%s: width %i, height %i, colordepth %i, size %i",filename,xsize,ysize,colordepth,#content) end + if cleanvirtual then + cleanvirtual(filename) + end return createimage { bbox = { 0, 0, specification.width/xsize, specification.height/ysize }, -- mandate transform = specification.transform, @@ -197,6 +203,9 @@ do if trace then report_jp2("%s: width %i, height %i, size %i",filename,xsize,ysize,#content) end + if cleanvirtual then + cleanvirtual(filename) + end return createimage { bbox = { 0, 0, specification.width/xsize, specification.height/ysize }, -- mandate transform = specification.transform, @@ -1211,6 +1220,9 @@ do end local width = specification.width or xsize * 65536 local height = specification.height or ysize * 65536 + if cleanvirtual then + cleanvirtual(filename) + end return createimage { bbox = { 0, 0, width/xsize, height/ysize }, -- mandate transform = specification.transform, diff --git a/tex/context/base/mkxl/luat-lib.mkxl b/tex/context/base/mkxl/luat-lib.mkxl index cb161cafa..d701fd293 100644 --- a/tex/context/base/mkxl/luat-lib.mkxl +++ b/tex/context/base/mkxl/luat-lib.mkxl @@ -34,7 +34,7 @@ \registerctxluafile{util-sta}{} -\registerctxluafile{util-sbx}{} % needs tracker and templates +\registerctxluafile{util-sbx}{autosuffix} % needs tracker and templates \registerctxluafile{util-soc-imp-reset} {} \registerctxluafile{util-soc-imp-socket} {} @@ -66,7 +66,7 @@ \registerctxluafile{data-dec}{} \registerctxluafile{data-tar}{} %registerctxluafile{data-crl}{} -\registerctxluafile{data-sch}{} +\registerctxluafile{data-sch}{autosuffix} \registerctxluafile{data-tre}{} \registerctxluafile{data-lua}{} \registerctxluafile{data-ctx}{} diff --git a/tex/context/base/mkxl/math-ini.mkxl b/tex/context/base/mkxl/math-ini.mkxl index 2529890d7..f9b733d9c 100644 --- a/tex/context/base/mkxl/math-ini.mkxl +++ b/tex/context/base/mkxl/math-ini.mkxl @@ -4587,8 +4587,8 @@ \def\math_axis_inject_indeed#1% {\srule - \s!height \dimexpr\scratchdimentwo+\scratchdimenone\relax - \s!depth -\dimexpr\scratchdimentwo-\scratchdimenone\relax + \s!height \dimexpr(\scratchdimentwo+\scratchdimenone)*\c_math_m_scaled/\plusthousand\relax + \s!depth -\dimexpr(\scratchdimentwo-\scratchdimenone)*\c_math_m_scaled/\plusthousand\relax \s!attr \mathaxisattribute#1% \relax} diff --git a/tex/context/base/mkxl/phys-dim.lmt b/tex/context/base/mkxl/phys-dim.lmt index 8575962e9..d3b6f80ba 100644 --- a/tex/context/base/mkxl/phys-dim.lmt +++ b/tex/context/base/mkxl/phys-dim.lmt @@ -464,7 +464,7 @@ local short_units = { -- I'm not sure about casing s = "second", g = "gram", n = "newton", - v = "volt", + V = "volt", t = "tonne", l = "liter", -- w = "watt", @@ -472,6 +472,8 @@ local short_units = { -- I'm not sure about casing -- a = "ampere", A = "ampere", + Ω = "ohm", + -- C = "coulomb", -- needs checking with (c)enti -- K = "kelvin", -- needs checking with (k)ilo -- N = "newton", -- needs checking with (n)ewton diff --git a/tex/context/base/mkxl/util-sbx.lmt b/tex/context/base/mkxl/util-sbx.lmt new file mode 100644 index 000000000..b48d4a9f6 --- /dev/null +++ b/tex/context/base/mkxl/util-sbx.lmt @@ -0,0 +1,658 @@ +if not modules then modules = { } end modules ['util-sbx'] = { + 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" +} + +-- Note: we use expandname and collapsepath and these use chdir which is overloaded +-- so we need to use originals there. Just something to keep in mind. This is old +-- code that I might need to upgrade to fit lmtx better. I'll stepwise also try to +-- integrate e.g. curl and graphicmagick a bit more natural. Some code below can +-- be simplified because we don't share any longer with luatex. + +if not sandbox then require("l-sandbox") end -- for testing + +local next, type = next, type + +local replace = utilities.templates.replace +local collapsepath = file.collapsepath +local expandname = dir.expandname +local sortedhash = table.sortedhash +local lpegmatch = lpeg.match +local platform = os.type +local P, S, C = lpeg.P, lpeg.S, lpeg.C +local gsub = string.gsub +local lower = string.lower +local find = string.find +local concat = string.concat +local unquoted = string.unquoted +local optionalquoted = string.optionalquoted +local basename = file.basename +local nameonly = file.nameonly + +local sandbox = sandbox +local validroots = { } +local validrunners = { } +local validbinaries = true -- all permitted +local validlibraries = true -- all permitted +local validators = { } +local finalized = nil +local trace = false + +local p_validroot = nil +local p_split = lpeg.firstofsplit(" ") + +local report = logs.reporter("sandbox") + +trackers.register("sandbox",function(v) trace = v end) -- often too late anyway + +sandbox.setreporter(report) + +sandbox.finalizer { + category = "files", + action = function() + finalized = true + end +} + +local function registerroot(root,what) -- what == read|write + if finalized then + report("roots are already finalized") + else + if type(root) == "table" then + root, what = root[1], root[2] + end + if type(root) == "string" and root ~= "" then + root = collapsepath(expandname(root)) + if what == "r" or what == "ro" or what == "readable" then + what = "read" + elseif what == "w" or what == "wo" or what == "writable" then + what = "write" + end + -- true: read & write | false: read + validroots[root] = what == "write" or false + end + end +end + +sandbox.finalizer { + category = "files", + action = function() -- initializers can set the path + if p_validroot then + report("roots are already initialized") + else + sandbox.registerroot(".","write") -- always ok + -- also register texmf as read + for name in sortedhash(validroots) do + if p_validroot then + p_validroot = P(name) + p_validroot + else + p_validroot = P(name) + end + end + p_validroot = p_validroot / validroots + end + end +} + +local function registerbinary(name) + if finalized then + report("binaries are already finalized") + elseif type(name) == "string" and name ~= "" then + if not validbinaries then + return + end + if validbinaries == true then + validbinaries = { [name] = true } + else + validbinaries[name] = true + end + elseif name == true then + validbinaries = { } + end +end + +local function registerlibrary(name) + if finalized then + report("libraries are already finalized") + elseif type(name) == "string" and name ~= "" then + if not validlibraries then + return + end + if validlibraries == true then + validlibraries = { [nameonly(name)] = true } + else + validlibraries[nameonly(name)] = true + end + elseif name == true then + validlibraries = { } + end +end + +-- begin of validators + +local p_write = S("wa") p_write = (1 - p_write)^0 * p_write +local p_path = S("\\/~$%:") p_path = (1 - p_path )^0 * p_path -- be easy on other arguments + +local function normalized(name) -- only used in executers + if platform == "windows" then + name = gsub(name,"/","\\") + end + return name +end + +function sandbox.possiblepath(name) + return lpegmatch(p_path,name) and true or false +end + +local filenamelogger = false + +function sandbox.setfilenamelogger(l) + filenamelogger = type(l) == "function" and l or false +end + +local function validfilename(name,what) + if p_validroot and type(name) == "string" and lpegmatch(p_path,name) then + local asked = collapsepath(expandname(name)) + -- if platform == "windows" then + -- asked = lower(asked) -- we assume ascii names + -- end + local okay = lpegmatch(p_validroot,asked) + if okay == true then + -- read and write access + if filenamelogger then + filenamelogger(name,"w",asked,true) + end + return name + elseif okay == false then + -- read only access + if not what then + -- no further argument to io.open so a readonly case + if filenamelogger then + filenamelogger(name,"r",asked,true) + end + return name + elseif lpegmatch(p_write,what) then + if filenamelogger then + filenamelogger(name,"w",asked,false) + end + return -- we want write access + else + if filenamelogger then + filenamelogger(name,"r",asked,true) + end + return name + end + elseif filenamelogger then + filenamelogger(name,"*",name,false) + end + else + return name + end +end + +local function readable(name,finalized) +-- if platform == "windows" then -- yes or no +-- name = lower(name) -- we assume ascii names +-- end + return validfilename(name,"r") +end + +local function normalizedreadable(name,finalized) +-- if platform == "windows" then -- yes or no +-- name = lower(name) -- we assume ascii names +-- end + local valid = validfilename(name,"r") + if valid then + return normalized(valid) + end +end + +local function writeable(name,finalized) +-- if platform == "windows" then +-- name = lower(name) -- we assume ascii names +-- end + return validfilename(name,"w") +end + +local function normalizedwriteable(name,finalized) +-- if platform == "windows" then +-- name = lower(name) -- we assume ascii names +-- end + local valid = validfilename(name,"w") + if valid then + return normalized(valid) + end +end + +validators.readable = readable +validators.writeable = normalizedwriteable +validators.normalizedreadable = normalizedreadable +validators.normalizedwriteable = writeable +validators.filename = readable + +table.setmetatableindex(validators,function(t,k) + if k then + t[k] = readable + end + return readable +end) + +-- function validators.verbose(s) +-- return s +-- end + +function validators.string(s,finalized) + -- can be used to prevent filename checking (todo: only when registered) + if finalized and suspicious(s) then + return "" + else + return s + end +end + +function validators.cache(s) + if finalized then + return basename(s) + else + return s + end +end + +function validators.url(s) + if finalized and find("^file:") then + return "" + else + return s + end +end + +-- end of validators + +local function filehandlerone(action,one,...) + local checkedone = validfilename(one) + if checkedone then + return action(one,...) + else + -- report("file %a is unreachable",one) + end +end + +local function filehandlertwo(action,one,two,...) + local checkedone = validfilename(one) + if checkedone then + local checkedtwo = validfilename(two) + if checkedtwo then + return action(one,two,...) + else + -- report("file %a is unreachable",two) + end + else + -- report("file %a is unreachable",one) + end +end + +local function iohandler(action,one,...) + if type(one) == "string" then + local checkedone = validfilename(one) + if checkedone then + return action(one,...) + end + elseif one then + return action(one,...) + else + return action() + end +end + +-- runners can be strings or tables +-- +-- os.execute : string +-- os.exec : string or table with program in [0|1] -- no longer there +-- os.spawn : string or table with program in [0|1] -- no longer there +-- +-- our execute: registered program with specification + +local osexecute = sandbox.original(os.execute) +local iopopen = sandbox.original(io.popen) +local reported = { } + +local function validcommand(name,program,template,checkers,defaults,variables,reporter,strict) + if validbinaries ~= false and (validbinaries == true or validbinaries[program]) then + local binpath = nil + if variables then + for variable, value in next, variables do + local chktype = checkers[variable] + if chktype == "verbose" then + -- for now, we will have a "flags" checker + else + local checker = validators[chktype] + if checker and type(value) == "string" then + value = checker(unquoted(value),strict) + if value then + variables[variable] = optionalquoted(value) + else + report("variable %a with value %a fails the check",variable,value) + return + end + else + report("variable %a has no checker",variable) + return + end + end + end + for variable, default in next, defaults do + local value = variables[variable] + if not value or value == "" then + local chktype = checkers[variable] + if chktype == "verbose" then + -- for now, we will have a "flags" checker + elseif type(default) == "string" then + local checker = validators[chktype] + if checker then + default = checker(unquoted(default),strict) + if default then + variables[variable] = optionalquoted(default) + else + report("variable %a with default %a fails the check",variable,default) + return + end + end + end + end + end + binpath = variables.binarypath + end + if type(binpath) == "string" and binpath ~= "" then + -- this works on the console but not from e.g. scite + -- program = '"' .. binpath .. "/" .. program .. '"' + program = binpath .. "/" .. program + end + local command = program .. " " .. replace(template,variables) + if reporter then + reporter("executing runner %a: %s",name,command) + elseif trace then + report("executing runner %a: %s",name,command) + end + return command + elseif not reported[name] then + report("executing program %a of runner %a is not permitted",program,name) + reported[name] = true + end +end + +local runners = { + -- + -- name,program,template,checkers,variables,reporter + -- + resultof = function(...) + local command = validcommand(...) + if command then + if trace then + report("resultof: %s",command) + end + local handle = iopopen(command,"rb") -- already has flush + if handle then + local result = handle:read("*all") or "" + handle:close() + return result + end + end + end, + execute = function(...) + local command = validcommand(...) + if command then + if trace then + report("execute: %s",command) + end + local okay = osexecute(command) + return okay + end + end, + pipeto = function(...) + local command = validcommand(...) + if command then + if trace then + report("pipeto: %s",command) + end + return iopopen(command,"w") -- already has flush + end + end, +} + +function sandbox.registerrunner(specification) + if type(specification) == "string" then + local wrapped = validrunners[specification] + inspect(table.sortedkeys(validrunners)) + if wrapped then + return wrapped + else + report("unknown predefined runner %a",specification) + return + end + end + if type(specification) ~= "table" then + report("specification should be a table (or string)") + return + end + local name = specification.name + if type(name) ~= "string" then + report("invalid name, string expected",name) + return + end + if validrunners[name] then + report("invalid name, runner %a already defined",name) + return + end + local program = specification.program + if type(program) == "string" then + -- common for all platforms + elseif type(program) == "table" then + program = program[platform] or program.default or program.unix + end + if type(program) ~= "string" or program == "" then + report("invalid runner %a specified for platform %a",name,platform) + return + end + local template = specification.template + if not template then + report("missing template for runner %a",name) + return + end + local method = specification.method or "execute" + local checkers = specification.checkers or { } + local defaults = specification.defaults or { } + local internal = specification.internal + local runner = runners[method] + if runner then + local finalized = finalized -- so, the current situation is frozen + local internalized = false + local wrapped = function(variables) + if internal and not internalized then + -- So internal returns a function but can also just return false in which + -- case we fallback in the runner; this permits optional library support. + internal = internal(specification) + if type(internal) ~= "function" then + internal = false + end + internalized = true + end + return (internal or runner)(name,program,template,checkers,defaults,variables,specification.reporter,finalized) + end + validrunners[name] = wrapped + return wrapped + else + validrunners[name] = nil + report("invalid method for runner %a",name) + end +end + +function sandbox.getrunner(name) + return name and validrunners[name] +end + +local function suspicious(str) + return (find(str,"[/\\]") or find(command,"..",1,true)) and true or false +end + +local function binaryrunner(action,command,...) + if validbinaries == false then + -- nothing permitted + report("no binaries permitted, ignoring command: %s",command) + return + end + if type(command) ~= "string" then + -- we only handle strings, maybe some day tables + report("command should be a string") + return + end + local program = lpegmatch(p_split,command) + if not program or program == "" then + report("unable to filter binary from command: %s",command) + return + end + if validbinaries == true then + -- everything permitted + elseif not validbinaries[program] then + report("binary not permitted, ignoring command: %s",command) + return + elseif suspicious(command) then + report("/ \\ or .. found, ignoring command (use sandbox.registerrunner): %s",command) + return + end + return action(command,...) +end + +local function dummyrunner(action,command,...) + if type(command) == "table" then + command = concat(command," ",command[0] and 0 or 1) + end + report("ignoring command: %s",command) +end + +sandbox.filehandlerone = filehandlerone +sandbox.filehandlertwo = filehandlertwo +sandbox.iohandler = iohandler + +do + + local library = optional.library + local foreign = optional.foreign + local reported = { } + local libraryload = library.load + local foreignload = foreign.load + + function library.load(name,...) + if validlibraries == false then + -- all blocked + elseif validlibraries == true then + -- all permitted + return libraryload(name,...) + elseif validlibraries[nameonly(name)] then + -- 'name' permitted + return libraryload(name,...) + else + -- 'name' not permitted + end + if not reported[name] then + report("using library %a is not permitted",name) + reported[name] = true + end + return nil + end + + function foreign.load(name,...) + if validlibraries == false then + -- all blocked + elseif validlibraries == true then + -- all permitted + return foreignload(name,...) + elseif validlibraries[nameonly(name)] then + -- 'name' permitted + return foreignload(name,...) + else + -- 'name' not permitted + end + if not reported[name] then + report("using foreign %a is not permitted",name) + reported[name] = true + end + return nil + end + + -- we can do this in the engine: a one time flag + + function sandbox.disablelibraries() + validlibraries = false + library.load = function() end + foreign.load = function() end + end + + function sandbox.disablerunners() + validbinaries = false + end + +end + +------------------- + +local overload = sandbox.overload +local register = sandbox.register + + overload(loadfile, filehandlerone,"loadfile") -- todo + +if io then + overload(io.open, filehandlerone,"io.open") + overload(io.popen, binaryrunner, "io.popen") + overload(io.input, iohandler, "io.input") + overload(io.output, iohandler, "io.output") + overload(io.lines, filehandlerone,"io.lines") +end + +if os then + overload(os.execute, binaryrunner, "os.execute") + overload(os.spawn, dummyrunner, "os.spawn") -- no longer there + overload(os.exec, dummyrunner, "os.exec") -- no longer there + overload(os.resultof, binaryrunner, "os.resultof") + overload(os.pipeto, binaryrunner, "os.pipeto") + overload(os.rename, filehandlertwo,"os.rename") + overload(os.remove, filehandlerone,"os.remove") +end + +if lfs then + overload(lfs.chdir, filehandlerone,"lfs.chdir") + overload(lfs.mkdir, filehandlerone,"lfs.mkdir") + overload(lfs.rmdir, filehandlerone,"lfs.rmdir") + overload(lfs.isfile, filehandlerone,"lfs.isfile") + overload(lfs.isdir, filehandlerone,"lfs.isdir") + overload(lfs.attributes, filehandlerone,"lfs.attributes") + overload(lfs.dir, filehandlerone,"lfs.dir") + overload(lfs.lock_dir, filehandlerone,"lfs.lock_dir") + overload(lfs.touch, filehandlerone,"lfs.touch") + overload(lfs.link, filehandlertwo,"lfs.link") + overload(lfs.setmode, filehandlerone,"lfs.setmode") + overload(lfs.readlink, filehandlerone,"lfs.readlink") + overload(lfs.shortname, filehandlerone,"lfs.shortname") + overload(lfs.symlinkattributes,filehandlerone,"lfs.symlinkattributes") +end + +-- these are used later on + +if zip then + zip.open = register(zip.open, filehandlerone,"zip.open") +end + +sandbox.registerroot = registerroot +sandbox.registerbinary = registerbinary +sandbox.registerlibrary = registerlibrary +sandbox.validfilename = validfilename + +-- not used in a normal mkiv run : os.spawn = os.execute +-- not used in a normal mkiv run : os.exec = os.exec + +-- print(io.open("test.log")) +-- sandbox.enable() +-- print(io.open("test.log")) +-- print(io.open("t:/test.log")) diff --git a/tex/context/modules/mkxl/m-tikz.mkxl b/tex/context/modules/mkxl/m-tikz.mkxl index e79806ca9..29ef764c9 100644 --- a/tex/context/modules/mkxl/m-tikz.mkxl +++ b/tex/context/modules/mkxl/m-tikz.mkxl @@ -36,17 +36,36 @@ \protect \fi +\newcatcodetable \tikzcatcodes + +\startcatcodetable \tikzcatcodes + \catcode\tabasciicode \spacecatcode + \catcode\endoflineasciicode \endoflinecatcode + \catcode\formfeedasciicode \endoflinecatcode + \catcode\spaceasciicode \spacecatcode + \catcode\endoffileasciicode \ignorecatcode + \catcode\circumflexasciicode \superscriptcatcode + \catcode\underscoreasciicode \subscriptcatcode + \catcode\ampersandasciicode \alignmentcatcode + \catcode\backslashasciicode \escapecatcode + \catcode\leftbraceasciicode \begingroupcatcode + \catcode\rightbraceasciicode \endgroupcatcode + \catcode\dollarasciicode \mathshiftcatcode + \catcode\hashasciicode \parametercatcode + \catcode\commentasciicode \commentcatcode + \catcode\atsignasciicode \lettercatcode + \catcode\exclamationmarkasciicode \othercatcode + \catcode\questionmarkasciicode \lettercatcode + \catcode\tildeasciicode \activecatcode + \catcode\barasciicode \othercatcode +\stopcatcodetable + \permanent\protected\def\starttikzinput {\pushoverloadmode \pushcatcodetable - \setcatcodetable\texcatcodes + \setcatcodetable\tikzcatcodes \pushmacro\meaning \let\meaning\meaningless - \catcode`\@=11\relax - \catcode`\|=13\relax % was 12 < texlive 2023 - \catcode`\!=12\relax - \catcode`\~=13\relax % needed >= texlive 2023 - % \catcode`\$= 3\relax \autoparagraphmode\zerocount} \permanent\protected\def\stoptikzinput @@ -89,6 +108,7 @@ \permanent\protected\def\starttikzpicture {\dontleavehmode \hcontainer\bgroup + \setcatcodetable\tikzcatcodes \the\everytikzpicture \autoparagraphmode\zerocount \pushmacro\meaning @@ -125,8 +145,9 @@ \let\startpgfinterruptpicture \pgfinterruptpicture \let\stoppgfinterruptpicture \endpgfinterruptpicture \let\startpgfinterruptboundingbox\pgfinterruptboundinbox \let\stoppgfinterruptboudingbox\endpgfinterruptboundingbox -\let\normalusepgfmodule\usepgfmodule -\let\normalusepgflibrary\usepgflibrary +\let\normalusepgfmodule \usepgfmodule +\let\normalusepgflibrary \usepgflibrary +\let\normalusetikzlibrary\usetikzlibrary \tolerant\protected\def\usepgfmodule[#1]#;#2% somehow both variants are used {\starttikzinput @@ -138,6 +159,11 @@ \normalusepgflibrary[#1#2]% \stoptikzinput} +\tolerant\protected\def\usetikzlibrary[#1]#;#2% somehow both variants are used + {\starttikzinput + \normalusetikzlibrary[#1#2]% + \stoptikzinput} + \usepgfmodule[shapes] \usepgfmodule[plot] \usepgfmodule[matrix] diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 917ab1b94..5441fa004 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 : 2023-04-27 16:54 +-- merge date : 2023-05-05 18:36 do -- begin closure to overcome local limits and interference -- cgit v1.2.3