From b7a7de31716616b7a5176259e2b60349f8089615 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Fri, 21 Jan 2022 20:54:31 +0100 Subject: 2022-01-21 20:12:00 --- tex/context/base/mkii/cont-new.mkii | 2 +- tex/context/base/mkii/context.mkii | 2 +- tex/context/base/mkii/mult-ro.mkii | 2 + tex/context/base/mkiv/cont-new.mkiv | 2 +- tex/context/base/mkiv/context.mkiv | 2 +- tex/context/base/mkiv/lang-imp-indic.lua | 1362 ++++++++++++++++++-- tex/context/base/mkiv/lang-imp-serbian.lua | 8 + tex/context/base/mkiv/mult-prm.lua | 5 + tex/context/base/mkiv/status-files.pdf | Bin 24784 -> 24745 bytes tex/context/base/mkiv/status-lua.pdf | Bin 257644 -> 257662 bytes tex/context/base/mkiv/strc-enu.mkvi | 2 +- tex/context/base/mkxl/cont-new.mkxl | 2 +- tex/context/base/mkxl/context.mkxl | 2 +- tex/context/base/mkxl/font-ctx.lmt | 46 +- tex/context/base/mkxl/font-ini.mklx | 13 +- tex/context/base/mkxl/good-gen.lmt | 6 +- tex/context/base/mkxl/lang-lab.mkxl | 2 +- tex/context/base/mkxl/lang-tra.lmt | 322 +++++ tex/context/base/mkxl/lang-tra.mkxl | 42 +- tex/context/base/mkxl/lpdf-lmt.lmt | 8 +- tex/context/base/mkxl/math-act.lmt | 9 +- tex/context/base/mkxl/math-fen.mkxl | 22 +- tex/context/base/mkxl/meta-ini.mkxl | 4 +- tex/context/base/mkxl/mlib-ctx.lmt | 15 + tex/context/base/mkxl/node-syn.lmt | 82 +- tex/context/base/mkxl/pack-mrl.mkxl | 74 +- tex/context/base/mkxl/spac-hor.mkxl | 32 +- tex/context/base/mkxl/trac-deb.lmt | 20 +- tex/context/fonts/mkiv/lucida-opentype-math.lfg | 2 +- tex/context/interface/mkii/keys-ro.xml | 2 + tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 31 files changed, 1803 insertions(+), 291 deletions(-) create mode 100644 tex/context/base/mkxl/lang-tra.lmt (limited to 'tex') diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index 52c6a3e48..acb247396 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{2022.01.18 10:48} +\newcontextversion{2022.01.21 20:10} %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 e58fbe97b..e1535e159 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{2022.01.18 10:48} +\edef\contextversion{2022.01.21 20:10} %D For those who want to use this: diff --git a/tex/context/base/mkii/mult-ro.mkii b/tex/context/base/mkii/mult-ro.mkii index dbfe43067..99e44c530 100644 --- a/tex/context/base/mkii/mult-ro.mkii +++ b/tex/context/base/mkii/mult-ro.mkii @@ -993,7 +993,9 @@ \setinterfaceconstant{marstyle}{stilmarcaj} \setinterfaceconstant{mask}{mask} \setinterfaceconstant{mathclass}{mathclass} +\setinterfaceconstant{mathdenominatorstyle}{mathdenominatorstyle} \setinterfaceconstant{mathlimits}{mathlimits} +\setinterfaceconstant{mathnumeratorstyle}{mathnumeratorstyle} \setinterfaceconstant{mathstyle}{mathstyle} \setinterfaceconstant{max}{max} \setinterfaceconstant{maxdepth}{maxdepth} diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index f139b7f69..fb27e5d04 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{2022.01.18 10:48} +\newcontextversion{2022.01.21 20:10} %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 58b9315f3..1aaa77a0f 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{2022.01.18 10:48} +\edef\contextversion{2022.01.21 20:10} %D Kind of special: diff --git a/tex/context/base/mkiv/lang-imp-indic.lua b/tex/context/base/mkiv/lang-imp-indic.lua index 46af00e3b..5c766c5ef 100644 --- a/tex/context/base/mkiv/lang-imp-indic.lua +++ b/tex/context/base/mkiv/lang-imp-indic.lua @@ -1,13 +1,18 @@ +local zwj = utf.char(0x200D) + return { + name = "indic transliterations", version = "1.00", comment = "Experimental code, the name of this file might change" .. "or maybe it become a llg file in the end.", author = "kauśika and hans", copyright = "ConTeXt development team & whoever made this list", + transliterations = { - ["iast to indic"] = { - svara = { + ["iast to deva"] = { + mapping = { + --- vowels ["a"] = "अ", ["ā"] = "आ", ["i"] = "इ", @@ -24,77 +29,1230 @@ return { ["ò"] = "ऒ", ["o"] = "ओ", ["au"] = "औ", - }, - vyanjana = { - ["k"] = "क", - ["kh"] = "ख", - ["g"] = "ग", - ["gh"] = "घ", - ["ṅ"] = "ङ", - ["c"] = "च", - ["ch"] = "छ", - ["j"] = "ज", - ["jh"] = "झ", - ["ñ"] = "ञ", - ["ṭ"] = "ट", - ["ṭh"] = "ठ", - ["ḍ"] = "ड", - ["ḍh"] = "ढ", - ["ṇ"] = "ण", - ["t"] = "त", - ["th"] = "थ", - ["d"] = "द", - ["dh"] = "ध", - ["n"] = "न", - ["p"] = "प", - ["ph"] = "फ", - ["b"] = "ब", - ["bh"] = "भ", - ["m"] = "म", - ["y"] = "य", - ["r"] = "र", - ["l"] = "ल", - ["v"] = "व", - ["ś"] = "श", - ["ṣ"] = "ष", - ["s"] = "स", - ["h"] = "ह", - ["ḻ"] = "ळ", - ["x"] = "क्ष", - ["jñ"] = "ज्ञ", - }, - maatra = { - ["a"] = "", - ["ā"] = "ा", - ["i"] = "ि", - ["ī"] = "ी", - ["u"] = "ु", - ["ū"] = "ू", - ["ṛ"] = "ृ", - ["ṝ"] = "ॄ", - ["ḷ"] = "ॢ", - ["ḹ"] = "ॣ", - ["ai"] = "ै", - ["e"] = "े", - ["o"] = "ो", - ["au"] = "ौ", - }, - yogavaaha = { + --- consonant forms + ["ka"] = "क", + ["kā"] = "का", + ["ki"] = "कि", + ["kī"] = "की", + ["ku"] = "कु", + ["kū"] = "कू", + ["ke"] = "के", + ["ko"] = "को", + ["kai"] = "कै", + ["kau"] = "कौ", + ["kḷ"] = "कॢ", + ["kḹ"] = "कॣ", + ["kṛ"] = "कृ", + ["kṝ"] = "कॄ", + --- + ["kha"] = "ख", + ["khā"] = "खा", + ["khi"] = "खि", + ["khī"] = "खी", + ["khu"] = "खु", + ["khū"] = "खू", + ["khe"] = "खे", + ["kho"] = "खो", + ["khai"] = "खै", + ["khau"] = "खौ", + ["khḷ"] = "खॢ", + ["khḹ"] = "खॣ", + ["khṛ"] = "खृ", + ["khṝ"] = "खॄ", + --- + ["ga"] = "ग", + ["gā"] = "गा", + ["gi"] = "गि", + ["gī"] = "गी", + ["gu"] = "गु", + ["gū"] = "गू", + ["ge"] = "गे", + ["go"] = "गो", + ["gai"] = "गै", + ["gau"] = "गौ", + ["gḷ"] = "गॢ", + ["gḹ"] = "गॣ", + ["gṛ"] = "गृ", + ["gṝ"] = "गॄ", + --- + ["gha"] = "घ", + ["ghā"] = "घा", + ["ghi"] = "घि", + ["ghī"] = "घी", + ["ghu"] = "घु", + ["ghū"] = "घू", + ["ghe"] = "घे", + ["gho"] = "घो", + ["ghai"] = "घै", + ["ghau"] = "घौ", + ["ghḷ"] = "घॢ", + ["ghḹ"] = "घॣ", + ["ghṛ"] = "घृ", + ["ghṝ"] = "घॄ", + --- + ["ṅa"] = "ङ", + ["ṅā"] = "ङा", + ["ṅi"] = "ङि", + ["ṅī"] = "ङी", + ["ṅu"] = "ङु", + ["ṅū"] = "ङू", + ["ṅe"] = "ङे", + ["ṅo"] = "ङो", + ["ṅai"] = "ङै", + ["ṅau"] = "ङौ", + ["ṅḷ"] = "ङॢ", + ["ṅḹ"] = "ङॣ", + ["ṅṛ"] = "ङृ", + ["ṅṝ"] = "ङॄ", + --- + ["ca"] = "च", + ["cā"] = "चा", + ["ci"] = "चि", + ["cī"] = "ची", + ["cu"] = "चु", + ["cū"] = "चू", + ["ce"] = "चे", + ["co"] = "चो", + ["cai"] = "चै", + ["cau"] = "चौ", + ["cḷ"] = "चॢ", + ["cḹ"] = "चॣ", + ["cṛ"] = "चृ", + ["cṝ"] = "चॄ", + --- + ["cha"] = "छ", + ["chā"] = "छा", + ["chi"] = "छि", + ["chī"] = "छी", + ["chu"] = "छु", + ["chū"] = "छू", + ["che"] = "छे", + ["cho"] = "छो", + ["chai"] = "छै", + ["chau"] = "छौ", + ["chḷ"] = "छॢ", + ["chḹ"] = "छॣ", + ["chṛ"] = "छृ", + ["chṝ"] = "छॄ", + --- + ["ja"] = "ज", + ["jā"] = "जा", + ["ji"] = "जि", + ["jī"] = "जी", + ["ju"] = "जु", + ["jū"] = "जू", + ["je"] = "जे", + ["jo"] = "जो", + ["jai"] = "जै", + ["jau"] = "जौ", + ["jḷ"] = "जॢ", + ["jḹ"] = "जॣ", + ["jṛ"] = "जृ", + ["jṝ"] = "जॄ", + --- + ["jha"] = "झ", + ["jhā"] = "झा", + ["jhi"] = "झि", + ["jhī"] = "झी", + ["jhu"] = "झु", + ["jhū"] = "झू", + ["jhe"] = "झे", + ["jho"] = "झो", + ["jhai"] = "झै", + ["jhau"] = "झौ", + ["jhḷ"] = "झॢ", + ["jhḹ"] = "झॣ", + ["jhṛ"] = "झृ", + ["jhṝ"] = "झॄ", + --- + ["ña"] = "ञ", + ["ñā"] = "ञा", + ["ñi"] = "ञि", + ["ñī"] = "ञी", + ["ñu"] = "ञु", + ["ñū"] = "ञू", + ["ñe"] = "ञे", + ["ño"] = "ञो", + ["ñai"] = "ञै", + ["ñau"] = "ञौ", + ["ñḷ"] = "ञॢ", + ["ñḹ"] = "ञॣ", + ["ñṛ"] = "ञृ", + ["ñṝ"] = "ञॄ", + --- + ["ṭa"] = "ट", + ["ṭā"] = "टा", + ["ṭi"] = "टि", + ["ṭī"] = "टी", + ["ṭu"] = "टु", + ["ṭū"] = "टू", + ["ṭe"] = "टे", + ["ṭo"] = "टो", + ["ṭai"] = "टै", + ["ṭau"] = "टौ", + ["ṭḷ"] = "टॢ", + ["ṭḹ"] = "टॣ", + ["ṭṛ"] = "टृ", + ["ṭṝ"] = "टॄ", + --- + ["ṭha"] = "ठ", + ["ṭhā"] = "ठा", + ["ṭhi"] = "ठि", + ["ṭhī"] = "ठी", + ["ṭhu"] = "ठु", + ["ṭhū"] = "ठू", + ["ṭhe"] = "ठे", + ["ṭho"] = "ठो", + ["ṭhai"] = "ठै", + ["ṭhau"] = "ठौ", + ["ṭhḷ"] = "ठॢ", + ["ṭhḹ"] = "ठॣ", + ["ṭhṛ"] = "ठृ", + ["ṭhṝ"] = "ठॄ", + --- + ["ḍa"] = "ड", + ["ḍā"] = "डा", + ["ḍi"] = "डि", + ["ḍī"] = "डी", + ["ḍu"] = "डु", + ["ḍū"] = "डू", + ["ḍe"] = "डे", + ["ḍo"] = "डो", + ["ḍai"] = "डै", + ["ḍau"] = "डौ", + ["ḍḷ"] = "डॢ", + ["ḍḹ"] = "डॣ", + ["ḍṛ"] = "डृ", + ["ḍṝ"] = "डॄ", + --- + ["ḍha"] = "ढ", + ["ḍhā"] = "ढा", + ["ḍhi"] = "ढि", + ["ḍhī"] = "ढी", + ["ḍhu"] = "ढु", + ["ḍhū"] = "ढू", + ["ḍhe"] = "ढे", + ["ḍho"] = "ढो", + ["ḍhai"] = "ढै", + ["ḍhau"] = "ढौ", + ["ḍhḷ"] = "ढॢ", + ["ḍhḹ"] = "ढॣ", + ["ḍhṛ"] = "ढृ", + ["ḍhṝ"] = "ढॄ", + --- + ["ṇa"] = "ण", + ["ṇā"] = "णा", + ["ṇi"] = "णि", + ["ṇī"] = "णी", + ["ṇu"] = "णु", + ["ṇū"] = "णू", + ["ṇe"] = "णे", + ["ṇo"] = "णो", + ["ṇai"] = "णै", + ["ṇau"] = "णौ", + ["ṇḷ"] = "णॢ", + ["ṇḹ"] = "णॣ", + ["ṇṛ"] = "णृ", + ["ṇṝ"] = "णॄ", + --- + ["ta"] = "त", + ["tā"] = "ता", + ["ti"] = "ति", + ["tī"] = "ती", + ["tu"] = "तु", + ["tū"] = "तू", + ["te"] = "ते", + ["to"] = "तो", + ["tai"] = "तै", + ["tau"] = "तौ", + ["tḷ"] = "तॢ", + ["tḹ"] = "तॣ", + ["tṛ"] = "तृ", + ["tṝ"] = "तॄ", + --- + ["tha"] = "थ", + ["thā"] = "था", + ["thi"] = "थि", + ["thī"] = "थी", + ["thu"] = "थु", + ["thū"] = "थू", + ["the"] = "थे", + ["tho"] = "थो", + ["thai"] = "थै", + ["thau"] = "थौ", + ["thḷ"] = "थॢ", + ["thḹ"] = "थॣ", + ["thṛ"] = "थृ", + ["thṝ"] = "थॄ", + --- + ["da"] = "द", + ["dā"] = "दा", + ["di"] = "दि", + ["dī"] = "दी", + ["du"] = "दु", + ["dū"] = "दू", + ["de"] = "दे", + ["do"] = "दो", + ["dai"] = "दै", + ["dau"] = "दौ", + ["dḷ"] = "दॢ", + ["dḹ"] = "दॣ", + ["dṛ"] = "दृ", + ["dṝ"] = "दॄ", + --- + ["dha"] = "ध", + ["dhā"] = "धा", + ["dhi"] = "धि", + ["dhī"] = "धी", + ["dhu"] = "धु", + ["dhū"] = "धू", + ["dhe"] = "धे", + ["dho"] = "धो", + ["dhai"] = "धै", + ["dhau"] = "धौ", + ["dhḷ"] = "धॢ", + ["dhḹ"] = "धॣ", + ["dhṛ"] = "धृ", + ["dhṝ"] = "धॄ", + --- + ["na"] = "न", + ["nā"] = "ना", + ["ni"] = "नि", + ["nī"] = "नी", + ["nu"] = "नु", + ["nū"] = "नू", + ["ne"] = "ने", + ["no"] = "नो", + ["nai"] = "नै", + ["nau"] = "नौ", + ["nḷ"] = "नॢ", + ["nḹ"] = "नॣ", + ["nṛ"] = "नृ", + ["nṝ"] = "नॄ", + --- + ["pa"] = "प", + ["pā"] = "पा", + ["pi"] = "पि", + ["pī"] = "पी", + ["pu"] = "पु", + ["pū"] = "पू", + ["pe"] = "पे", + ["po"] = "पो", + ["pai"] = "पै", + ["pau"] = "पौ", + ["pḷ"] = "पॢ", + ["pḹ"] = "पॣ", + ["pṛ"] = "पृ", + ["pṝ"] = "पॄ", + --- + ["pha"] = "फ", + ["phā"] = "फा", + ["phi"] = "फि", + ["phī"] = "फी", + ["phu"] = "फु", + ["phū"] = "फू", + ["phe"] = "फे", + ["pho"] = "फो", + ["phai"] = "फै", + ["phau"] = "फौ", + ["phḷ"] = "फॢ", + ["phḹ"] = "फॣ", + ["phṛ"] = "फृ", + ["phṝ"] = "फॄ", + --- + ["ba"] = "ब", + ["bā"] = "बा", + ["bi"] = "बि", + ["bī"] = "बी", + ["bu"] = "बु", + ["bū"] = "बू", + ["be"] = "बे", + ["bo"] = "बो", + ["bai"] = "बै", + ["bau"] = "बौ", + ["bḷ"] = "बॢ", + ["bḹ"] = "बॣ", + ["bṛ"] = "बृ", + ["bṝ"] = "बॄ", + --- + ["bha"] = "भ", + ["bhā"] = "भा", + ["bhi"] = "भि", + ["bhī"] = "भी", + ["bhu"] = "भु", + ["bhū"] = "भू", + ["bhe"] = "भे", + ["bho"] = "भो", + ["bhai"] = "भै", + ["bhau"] = "भौ", + ["bhḷ"] = "भॢ", + ["bhḹ"] = "भॣ", + ["bhṛ"] = "भृ", + ["bhṝ"] = "भॄ", + --- + ["ma"] = "म", + ["mā"] = "मा", + ["mi"] = "मि", + ["mī"] = "मी", + ["mu"] = "मु", + ["mū"] = "मू", + ["me"] = "मे", + ["mo"] = "मो", + ["mai"] = "मै", + ["mau"] = "मौ", + ["mḷ"] = "मॢ", + ["mḹ"] = "मॣ", + ["mṛ"] = "मृ", + ["mṝ"] = "मॄ", + --- + ["ya"] = "य", + ["yā"] = "या", + ["yi"] = "यि", + ["yī"] = "यी", + ["yu"] = "यु", + ["yū"] = "यू", + ["ye"] = "ये", + ["yo"] = "यो", + ["yai"] = "यै", + ["yau"] = "यौ", + ["yḷ"] = "यॢ", + ["yḹ"] = "यॣ", + ["yṛ"] = "यृ", + ["yṝ"] = "यॄ", + --- + ["ra"] = "र", + ["rā"] = "रा", + ["ri"] = "रि", + ["rī"] = "री", + ["ru"] = "रु", + ["rū"] = "रू", + ["re"] = "रे", + ["ro"] = "रो", + ["rai"] = "रै", + ["rau"] = "रौ", + ["rḷ"] = "रॢ", + ["rḹ"] = "रॣ", + ["rṛ"] = "रृ", + ["rṝ"] = "रॄ", + --- + ["la"] = "ल", + ["lā"] = "ला", + ["li"] = "लि", + ["lī"] = "ली", + ["lu"] = "लु", + ["lū"] = "लू", + ["le"] = "ले", + ["lo"] = "लो", + ["lai"] = "लै", + ["lau"] = "लौ", + ["lḷ"] = "लॢ", + ["lḹ"] = "लॣ", + ["lṛ"] = "लृ", + ["lṝ"] = "लॄ", + --- + ["va"] = "व", + ["vā"] = "वा", + ["vi"] = "वि", + ["vī"] = "वी", + ["vu"] = "वु", + ["vū"] = "वू", + ["ve"] = "वे", + ["vo"] = "वो", + ["vai"] = "वै", + ["vau"] = "वौ", + ["vḷ"] = "वॢ", + ["vḹ"] = "वॣ", + ["vṛ"] = "वृ", + ["vṝ"] = "वॄ", + --- + ["śa"] = "श", + ["śā"] = "शा", + ["śi"] = "शि", + ["śī"] = "शी", + ["śu"] = "शु", + ["śū"] = "शू", + ["śe"] = "शे", + ["śo"] = "शो", + ["śai"] = "शै", + ["śau"] = "शौ", + ["śḷ"] = "शॢ", + ["śḹ"] = "शॣ", + ["śṛ"] = "शृ", + ["śṝ"] = "शॄ", + --- + ["ṣa"] = "ष", + ["ṣā"] = "षा", + ["ṣi"] = "षि", + ["ṣī"] = "षी", + ["ṣu"] = "षु", + ["ṣū"] = "षू", + ["ṣe"] = "षे", + ["ṣo"] = "षो", + ["ṣai"] = "षै", + ["ṣau"] = "षौ", + ["ṣḷ"] = "षॢ", + ["ṣḹ"] = "षॣ", + ["ṣṛ"] = "षृ", + ["ṣṝ"] = "षॄ", + --- + ["sa"] = "स", + ["sā"] = "सा", + ["si"] = "सि", + ["sī"] = "सी", + ["su"] = "सु", + ["sū"] = "सू", + ["se"] = "से", + ["so"] = "सो", + ["sai"] = "सै", + ["sau"] = "सौ", + ["sḷ"] = "सॢ", + ["sḹ"] = "सॣ", + ["sṛ"] = "सृ", + ["sṝ"] = "सॄ", + --- + ["ha"] = "ह", + ["hā"] = "हा", + ["hi"] = "हि", + ["hī"] = "ही", + ["hu"] = "हु", + ["hū"] = "हू", + ["he"] = "हे", + ["ho"] = "हो", + ["hai"] = "है", + ["hau"] = "हौ", + ["hḷ"] = "हॢ", + ["hḹ"] = "हॣ", + ["hṛ"] = "हृ", + ["hṝ"] = "हॄ", + --- + ["ḻa"] = "ळ", + ["ḻā"] = "ळा", + ["ḻi"] = "ळि", + ["ḻī"] = "ळी", + ["ḻu"] = "ळु", + ["ḻū"] = "ळू", + ["ḻe"] = "ळे", + ["ḻo"] = "ळो", + ["ḻai"] = "ळै", + ["ḻau"] = "ळौ", + ["ḻḷ"] = "ळॢ", + ["ḻḹ"] = "ळॣ", + ["ḻṛ"] = "ळृ", + ["ḻṝ"] = "ळॄ", + --- + ["xa"] = "क्ष", + ["xā"] = "क्षा", + ["xi"] = "क्षि", + ["xī"] = "क्षी", + ["xu"] = "क्षु", + ["xū"] = "क्षू", + ["xe"] = "क्षे", + ["xo"] = "क्षो", + ["xai"] = "क्षै", + ["xau"] = "क्षौ", + ["xḷ"] = "क्षॢ", + ["xḹ"] = "क्षॣ", + ["xṛ"] = "क्षृ", + ["xṝ"] = "क्षॄ", + --- + ["jña"] = "ज्ञ", + ["jñā"] = "ज्ञा", + ["jñi"] = "ज्ञि", + ["jñī"] = "ज्ञी", + ["jñu"] = "ज्ञु", + ["jñū"] = "ज्ञू", + ["jñe"] = "ज्ञे", + ["jño"] = "ज्ञो", + ["jñai"] = "ज्ञै", + ["jñau"] = "ज्ञौ", + ["jñḷ"] = "ज्ञॢ", + ["jñḹ"] = "ज्ञॣ", + ["jñṛ"] = "ज्ञृ", + ["jñṝ"] = "ज्ञॄ", + --- + ["k"] = "क्", + ["kh"] = "ख्", + ["g"] = "ग्", + ["gh"] = "घ्", + ["ṅ"] = "ङ्", + ["c"] = "च्", + ["ch"] = "छ्", + ["j"] = "ज्", + ["jh"] = "झ्", + ["ñ"] = "ञ्", + ["ṭ"] = "ट्", + ["ṭh"] = "ठ्", + ["ḍ"] = "ड्", + ["ḍh"] = "ढ्", + ["ṇ"] = "ण्", + ["t"] = "त्", + ["th"] = "थ्", + ["d"] = "द्", + ["dh"] = "ध्", + ["n"] = "न्", + ["p"] = "प्", + ["ph"] = "फ्", + ["b"] = "ब्", + ["bh"] = "भ्", + ["m"] = "म्", + ["y"] = "य्", + ["r"] = "र्", + ["l"] = "ल्", + ["v"] = "व्", + ["ś"] = "श्", + ["ṣ"] = "ष्", + ["s"] = "स्", + ["h"] = "ह्", + ["ḻ"] = "ळ्", + ["x"] = "क्ष्", + ["jñ"] = "ज्ञ्", + -- yogavaahas (always with phonetic) ["ṁ"] = "ं", ["ḥ"] = "ः", ["ँ"] = "ँ", - }, - viraama = { + -- punctuations ["viraama"] = "्", ["."] = "।", ["|"] = "।", ["||"] = "॥", - ["‘"] = "‘", - ["’"] = "’", + }, + }, + ["deva to iast"] = { + mapping = { + -- vowels + ["अ"] = "a", + ["आ"] = "ā", + ["इ"] = "i", + ["ई"] = "ī", + ["उ"] = "u", + ["ऊ"] = "ū", + ["ऋ"] = "ṛ", + ["ॠ"] = "ṝ", + ["ऌ"] = "ḷ", + ["ॡ"] = "ḹ", + ["ऎ"] = "è", + ["ए"] = "e", + ["ऐ"] = "ai", + ["ऒ"] = "ò", + ["ओ"] = "o", + ["औ"] = "au", + -- consonant + vowel forms + ["क"]= "ka", + ["का"] = "kā", + ["कि"] = "ki", + ["की"] = "kī", + ["कु"] = "ku", + ["कू"] = "kū", + ["के"] = "ke", + ["को"] = "ko", + ["कै"] = "kai", + ["कौ"] = "kau", + ["कॢ"] = "kḷ", + ["कॣ"] = "kḹ", + ["कृ"] = "kṛ", + ["कॄ"] = "kṝ", + --- + ["ख"]= "kha", + ["खा"] = "khā", + ["खि"] = "khi", + ["खी"] = "khī", + ["खु"] = "khu", + ["खू"] = "khū", + ["खे"] = "khe", + ["खो"] = "kho", + ["खै"] = "khai", + ["खौ"] = "khau", + ["खॢ"] = "khḷ", + ["खॣ"] = "khḹ", + ["खृ"] = "khṛ", + ["खॄ"] = "khṝ", + --- + ["ग"]= "ga", + ["गा"] = "gā", + ["गि"] = "gi", + ["गी"] = "gī", + ["गु"] = "gu", + ["गू"] = "gū", + ["गे"] = "ge", + ["गो"] = "go", + ["गै"] = "gai", + ["गौ"] = "gau", + ["गॢ"] = "gḷ", + ["गॣ"] = "gḹ", + ["गृ"] = "gṛ", + ["गॄ"] = "gṝ", + --- + ["घ"]= "gha", + ["घा"] = "ghā", + ["घि"] = "ghi", + ["घी"] = "ghī", + ["घु"] = "ghu", + ["घू"] = "ghū", + ["घे"] = "ghe", + ["घो"] = "gho", + ["घै"] = "ghai", + ["घौ"] = "ghau", + ["घॢ"] = "ghḷ", + ["घॣ"] = "ghḹ", + ["घृ"] = "ghṛ", + ["घॄ"] = "ghṝ", + --- + ["ङ"]= "ṅa", + ["ङा"] = "ṅā", + ["ङि"] = "ṅi", + ["ङी"] = "ṅī", + ["ङु"] = "ṅu", + ["ङू"] = "ṅū", + ["ङे"] = "ṅe", + ["ङो"] = "ṅo", + ["ङै"] = "ṅai", + ["ङौ"] = "ṅau", + ["ङॢ"] = "ṅḷ", + ["ङॣ"] = "ṅḹ", + ["ङृ"] = "ṅṛ", + ["ङॄ"] = "ṅṝ", + --- + ["च"]= "ca", + ["चा"] = "cā", + ["चि"] = "ci", + ["ची"] = "cī", + ["चु"] = "cu", + ["चू"] = "cū", + ["चे"] = "ce", + ["चो"] = "co", + ["चै"] = "cai", + ["चौ"] = "cau", + ["चॢ"] = "cḷ", + ["चॣ"] = "cḹ", + ["चृ"] = "cṛ", + ["चॄ"] = "cṝ", + -- + ["छ"]= "cha", + ["छा"] = "chā", + ["छि"] = "chi", + ["छी"] = "chī", + ["छु"] = "chu", + ["छू"] = "chū", + ["छे"] = "che", + ["छो"] = "cho", + ["छै"] = "chai", + ["छौ"] = "chau", + ["छॢ"] = "chḷ", + ["छॣ"] = "chḹ", + ["छृ"] = "chṛ", + ["छॄ"] = "chṝ", + -- + ["ज"]= "ja", + ["जा"] = "jā", + ["जि"] = "ji", + ["जी"] = "jī", + ["जु"] = "ju", + ["जू"] = "jū", + ["जे"] = "je", + ["जो"] = "jo", + ["जै"] = "jai", + ["जौ"] = "jau", + ["जॢ"] = "jḷ", + ["जॣ"] = "jḹ", + ["जृ"] = "jṛ", + ["जॄ"] = "jṝ", + -- + ["झ"]= "jha", + ["झा"] = "jhā", + ["झि"] = "jhi", + ["झी"] = "jhī", + ["झु"] = "jhu", + ["झू"] = "jhū", + ["झे"] = "jhe", + ["झो"] = "jho", + ["झै"] = "jhai", + ["झौ"] = "jhau", + ["झॢ"] = "jhḷ", + ["झॣ"] = "jhḹ", + ["झृ"] = "jhṛ", + ["झॄ"] = "jhṝ", + -- + ["ञ"]= "ña", + ["ञा"] = "ñā", + ["ञि"] = "ñi", + ["ञी"] = "ñī", + ["ञु"] = "ñu", + ["ञू"] = "ñū", + ["ञे"] = "ñe", + ["ञो"] = "ño", + ["ञै"] = "ñai", + ["ञौ"] = "ñau", + ["ञॢ"] = "ñḷ", + ["ञॣ"] = "ñḹ", + ["ञृ"] = "ñṛ", + ["ञॄ"] = "ñṝ", + -- + ["ट"]= "ṭa", + ["टा"] = "ṭā", + ["टि"] = "ṭi", + ["टी"] = "ṭī", + ["टु"] = "ṭu", + ["टू"] = "ṭū", + ["टे"] = "ṭe", + ["टो"] = "ṭo", + ["टै"] = "ṭai", + ["टौ"] = "ṭau", + ["टॢ"] = "ṭḷ", + ["टॣ"] = "ṭḹ", + ["टृ"] = "ṭṛ", + ["टॄ"] = "ṭṝ", + -- + ["ठ"]= "ṭha", + ["ठा"] = "ṭhā", + ["ठि"] = "ṭhi", + ["ठी"] = "ṭhī", + ["ठु"] = "ṭhu", + ["ठू"] = "ṭhū", + ["ठे"] = "ṭhe", + ["ठो"] = "ṭho", + ["ठै"] = "ṭhai", + ["ठौ"] = "ṭhau", + ["ठॢ"] = "ṭhḷ", + ["ठॣ"] = "ṭhḹ", + ["ठृ"] = "ṭhṛ", + ["ठॄ"] = "ṭhṝ", + -- + ["ड"]= "ḍa", + ["डा"] = "ḍā", + ["डि"] = "ḍi", + ["डी"] = "ḍī", + ["डु"] = "ḍu", + ["डू"] = "ḍū", + ["डे"] = "ḍe", + ["डो"] = "ḍo", + ["डै"] = "ḍai", + ["डौ"] = "ḍau", + ["डॢ"] = "ḍḷ", + ["डॣ"] = "ḍḹ", + ["डृ"] = "ḍṛ", + ["डॄ"] = "ḍṝ", + -- + ["ढ"]= "ḍha", + ["ढा"] = "ḍhā", + ["ढि"] = "ḍhi", + ["ढी"] = "ḍhī", + ["ढु"] = "ḍhu", + ["ढू"] = "ḍhū", + ["ढे"] = "ḍhe", + ["ढो"] = "ḍho", + ["ढै"] = "ḍhai", + ["ढौ"] = "ḍhau", + ["ढॢ"] = "ḍhḷ", + ["ढॣ"] = "ḍhḹ", + ["ढृ"] = "ḍhṛ", + ["ढॄ"] = "ḍhṝ", + -- + ["ण"]= "ṇa", + ["णा"] = "ṇā", + ["णि"] = "ṇi", + ["णी"] = "ṇī", + ["णु"] = "ṇu", + ["णू"] = "ṇū", + ["णे"] = "ṇe", + ["णो"] = "ṇo", + ["णै"] = "ṇai", + ["णौ"] = "ṇau", + ["णॢ"] = "ṇḷ", + ["णॣ"] = "ṇḹ", + ["णृ"] = "ṇṛ", + ["णॄ"] = "ṇṝ", + -- + ["त"]= "ta", + ["ता"] = "tā", + ["ति"] = "ti", + ["ती"] = "tī", + ["तु"] = "tu", + ["तू"] = "tū", + ["ते"] = "te", + ["तो"] = "to", + ["तै"] = "tai", + ["तौ"] = "tau", + ["तॢ"] = "tḷ", + ["तॣ"] = "tḹ", + ["तृ"] = "tṛ", + ["तॄ"] = "tṝ", + -- + ["थ"]= "tha", + ["था"] = "thā", + ["थि"] = "thi", + ["थी"] = "thī", + ["थु"] = "thu", + ["थू"] = "thū", + ["थे"] = "the", + ["थो"] = "tho", + ["थै"] = "thai", + ["थौ"] = "thau", + ["थॢ"] = "thḷ", + ["थॣ"] = "thḹ", + ["थृ"] = "thṛ", + ["थॄ"] = "thṝ", + -- + ["द"]= "da", + ["दा"] = "dā", + ["दि"] = "di", + ["दी"] = "dī", + ["दु"] = "du", + ["दू"] = "dū", + ["दे"] = "de", + ["दो"] = "do", + ["दै"] = "dai", + ["दौ"] = "dau", + ["दॢ"] = "dḷ", + ["दॣ"] = "dḹ", + ["दृ"] = "dṛ", + ["दॄ"] = "dṝ", + -- + ["ध"]= "dha", + ["धा"] = "dhā", + ["धि"] = "dhi", + ["धी"] = "dhī", + ["धु"] = "dhu", + ["धू"] = "dhū", + ["धे"] = "dhe", + ["धो"] = "dho", + ["धै"] = "dhai", + ["धौ"] = "dhau", + ["धॢ"] = "dhḷ", + ["धॣ"] = "dhḹ", + ["धृ"] = "dhṛ", + ["धॄ"] = "dhṝ", + -- + ["न"]= "na", + ["ना"] = "nā", + ["नि"] = "ni", + ["नी"] = "nī", + ["नु"] = "nu", + ["नू"] = "nū", + ["ने"] = "ne", + ["नो"] = "no", + ["नै"] = "nai", + ["नौ"] = "nau", + ["नॢ"] = "nḷ", + ["नॣ"] = "nḹ", + ["नृ"] = "nṛ", + ["नॄ"] = "nṝ", + -- + ["प"]= "pa", + ["पा"] = "pā", + ["पि"] = "pi", + ["पी"] = "pī", + ["पु"] = "pu", + ["पू"] = "pū", + ["पे"] = "pe", + ["पो"] = "po", + ["पै"] = "pai", + ["पौ"] = "pau", + ["पॢ"] = "pḷ", + ["पॣ"] = "pḹ", + ["पृ"] = "pṛ", + ["पॄ"] = "pṝ", + -- + ["फ"]= "pha", + ["फा"] = "phā", + ["फि"] = "phi", + ["फी"] = "phī", + ["फु"] = "phu", + ["फू"] = "phū", + ["फे"] = "phe", + ["फो"] = "pho", + ["फै"] = "phai", + ["फौ"] = "phau", + ["फॢ"] = "phḷ", + ["फॣ"] = "phḹ", + ["फृ"] = "phṛ", + ["फॄ"] = "phṝ", + -- + ["ब"]= "ba", + ["बा"] = "bā", + ["बि"] = "bi", + ["बी"] = "bī", + ["बु"] = "bu", + ["बू"] = "bū", + ["बे"] = "be", + ["बो"] = "bo", + ["बै"] = "bai", + ["बौ"] = "bau", + ["बॢ"] = "bḷ", + ["बॣ"] = "bḹ", + ["बृ"] = "bṛ", + ["बॄ"] = "bṝ", + -- + ["भ"]= "bha", + ["भा"] = "bhā", + ["भि"] = "bhi", + ["भी"] = "bhī", + ["भु"] = "bhu", + ["भू"] = "bhū", + ["भे"] = "bhe", + ["भो"] = "bho", + ["भै"] = "bhai", + ["भौ"] = "bhau", + ["भॢ"] = "bhḷ", + ["भॣ"] = "bhḹ", + ["भृ"] = "bhṛ", + ["भॄ"] = "bhṝ", + -- + ["म"]= "ma", + ["मा"] = "mā", + ["मि"] = "mi", + ["मी"] = "mī", + ["मु"] = "mu", + ["मू"] = "mū", + ["मे"] = "me", + ["मो"] = "mo", + ["मै"] = "mai", + ["मौ"] = "mau", + ["मॢ"] = "mḷ", + ["मॣ"] = "mḹ", + ["मृ"] = "mṛ", + ["मॄ"] = "mṝ", + -- + ["य"]= "ya", + ["या"] = "yā", + ["यि"] = "yi", + ["यी"] = "yī", + ["यु"] = "yu", + ["यू"] = "yū", + ["ये"] = "ye", + ["यो"] = "yo", + ["यै"] = "yai", + ["यौ"] = "yau", + ["यॢ"] = "yḷ", + ["यॣ"] = "yḹ", + ["यृ"] = "yṛ", + ["यॄ"] = "yṝ", + -- + ["र"]= "ra", + ["रा"] = "rā", + ["रि"] = "ri", + ["री"] = "rī", + ["रु"] = "ru", + ["रू"] = "rū", + ["रे"] = "re", + ["रो"] = "ro", + ["रै"] = "rai", + ["रौ"] = "rau", + ["रॢ"] = "rḷ", + ["रॣ"] = "rḹ", + ["रृ"] = "rṛ", + ["रॄ"] = "rṝ", + -- + ["ल"]= "la", + ["ला"] = "lā", + ["लि"] = "li", + ["ली"] = "lī", + ["लु"] = "lu", + ["लू"] = "lū", + ["ले"] = "le", + ["लो"] = "lo", + ["लै"] = "lai", + ["लौ"] = "lau", + ["लॢ"] = "lḷ", + ["लॣ"] = "lḹ", + ["लृ"] = "lṛ", + ["लॄ"] = "lṝ", + -- + ["व"]= "va", + ["वा"] = "vā", + ["वि"] = "vi", + ["वी"] = "vī", + ["वु"] = "vu", + ["वू"] = "vū", + ["वे"] = "ve", + ["वो"] = "vo", + ["वै"] = "vai", + ["वौ"] = "vau", + ["वॢ"] = "vḷ", + ["वॣ"] = "vḹ", + ["वृ"] = "vṛ", + ["वॄ"] = "vṝ", + -- + ["ष"]= "ṣa", + ["षा"] = "ṣā", + ["षि"] = "ṣi", + ["षी"] = "ṣī", + ["षु"] = "ṣu", + ["षू"] = "ṣū", + ["षे"] = "ṣe", + ["षो"] = "ṣo", + ["षै"] = "ṣai", + ["षौ"] = "ṣau", + ["षॢ"] = "ṣḷ", + ["षॣ"] = "ṣḹ", + ["षृ"] = "ṣṛ", + ["षॄ"] = "ṣṝ", + -- + ["श"]= "śa", + ["शा"] = "śā", + ["शि"] = "śi", + ["शी"] = "śī", + ["शु"] = "śu", + ["शू"] = "śū", + ["शे"] = "śe", + ["शो"] = "śo", + ["शै"] = "śai", + ["शौ"] = "śau", + ["शॢ"] = "śḷ", + ["शॣ"] = "śḹ", + ["शृ"] = "śṛ", + ["शॄ"] = "śṝ", + -- + ["स"]= "sa", + ["सा"] = "sā", + ["सि"] = "si", + ["सी"] = "sī", + ["सु"] = "su", + ["सू"] = "sū", + ["से"] = "se", + ["सो"] = "so", + ["सै"] = "sai", + ["सौ"] = "sau", + ["सॢ"] = "sḷ", + ["सॣ"] = "sḹ", + ["सृ"] = "sṛ", + ["सॄ"] = "sṝ", + -- + ["ह"]= "ha", + ["हा"] = "hā", + ["हि"] = "hi", + ["ही"] = "hī", + ["हु"] = "hu", + ["हू"] = "hū", + ["हे"] = "he", + ["हो"] = "ho", + ["है"] = "hai", + ["हौ"] = "hau", + ["हॢ"] = "hḷ", + ["हॣ"] = "hḹ", + ["हृ"] = "hṛ", + ["हॄ"] = "hṝ", + -- + ["ळ"]= "l̤a", + ["ळा"] = "l̤ā", + ["ळि"] = "l̤i", + ["ळी"] = "l̤ī", + ["ळु"] = "l̤u", + ["ळू"] = "l̤ū", + ["ळे"] = "l̤e", + ["ळो"] = "l̤o", + ["ळै"] = "l̤ai", + ["ळौ"] = "l̤au", + ["ळॢ"] = "l̤ḷ", + ["ळॣ"] = "l̤ḹ", + ["ळृ"] = "l̤ṛ", + ["ळॄ"] = "l̤ṝ", + --- + ["क्ष"]= "xa", + ["क्षा"] = "xā", + ["क्षि"] = "xi", + ["क्षी"] = "xī", + ["क्षु"] = "xu", + ["क्षू"] = "xū", + ["क्षे"] = "xe", + ["क्षो"] = "xo", + ["क्षै"] = "xai", + ["क्षौ"] = "xau", + ["क्षॢ"] = "xḷ", + ["क्षॣ"] = "xḹ", + ["क्षृ"] = "xṛ", + ["क्षॄ"] = "xṝ", + --- + ["ज्ञ"]= "jña", + ["ज्ञा"] = "jñā", + ["ज्ञि"] = "jñi", + ["ज्ञी"] = "jñī", + ["ज्ञु"] = "jñu", + ["ज्ञू"] = "jñū", + ["ज्ञे"] = "jñe", + ["ज्ञो"] = "jño", + ["ज्ञै"] = "jñai", + ["ज्ञौ"] = "jñau", + ["ज्ञॢ"] = "jñḷ", + ["ज्ञॣ"] = "jñḹ", + ["ज्ञृ"] = "jñṛ", + ["ज्ञॄ"] = "jñṝ", + -- + ["क्"]= "k", + ["ख्"] = "kh", + ["ग्"] = "g", + ["घ्"] = "gh", + ["ङ्"] = "ṅ", + ["च्"] = "c", + ["छ्"] = "ch", + ["ज्"] = "j", + ["झ्"] = "jh", + ["ञ्"] = "ñ", + ["ट्"] = "ṭ", + ["ठ्"] = "ṭh", + ["ड्"] = "ḍ", + ["ढ्"] = "ḍh", + ["ण्"] = "ṇ", + ["त्"] = "t", + ["थ्"] = "th", + ["द्"] = "d", + ["ध्"] = "dh", + ["न्"] = "n", + ["प्"] = "p", + ["फ्"] = "ph", + ["ब्"] = "b", + ["भ्"] = "bh", + ["म्"] = "m", + ["य्"] = "y", + ["र्"] = "r", + ["ल्"] = "l", + ["व्"] = "v", + ["श्"] = "ś", + ["ष्"] = "ṣ", + ["स्"] = "s", + ["ह्"] = "h", + ["ळ्"] = "l̤", + ["क्ष्"] = "kṣ", + ["ज्ञ्"] = "jñ", + -- discard virama (?!) TODO: revisit this if need arises + -- ["्"] = "", + ["।"] = ".", + ["॥"] = ".", + ["ं"] = "ṃ", + ["ः"] = "ḥ", + ["ऽ"] = "\'", + -- disputed + ["ँ"] = "ँ", + -- diactrics (combining): provided for completeness + -- warning: many fonts don't have these + ["॒"] = "॒", + -- could not test + -- ["॑"] = "̭", + ["॑"] = "॑", + ["᳚"] = "᳚", + ["᳛"] = "᳛", + ["᳡"] = "̀", + ["꣡"] = "́", + ["꣢"] = "²", + ["꣣"] = "³", + ["꣤"] = "⁴", + ["꣥"] = "⁵", + ["꣦"] = "⁶", + ["꣧"] = "⁷", + ["꣨"] = "⁸", + ["꣩"] = "⁹", + ["꣪"] = "꣪", + ["꣫"] = "꣫", + ["꣬"] = "꣬", + ["꣭"] = "꣭", + ["꣮"] = "꣮", + ["꣯"] = "꣯", + ["꣰"] = "꣰", + ["꣱"] = "꣱", }, }, ["deva to mlym"] = { - svara = { + mapping = { + -- vowels ["अ"] = "അ", ["आ"] = "ആ", ["इ"] = "ഇ", @@ -111,8 +1269,7 @@ return { ["ऒ"] = "ഒ", ["ओ"] = "ഓ", ["औ"] = "ഔ", - }, - vyanjana = { + -- consonants ["क"] = "ക", ["ख"] = "ഖ", ["ग"] = "ഗ", @@ -149,8 +1306,7 @@ return { ["ळ"] = "ള", ["क्ष"] = "ക്ഷ", ["ज्ञ"] = "ജ്ഞ", - }, - maatra = { + -- vowel marks ["ा"] = "ാ", ["ि"] = "ി", ["ी"] = "ീ", @@ -166,84 +1322,18 @@ return { ["ॊ"] = "ൊ", ["ो"] = "ോ", ["ौ"] = "ൌ", - }, - yogavaaha = { + -- always with phonetic ["ं"] = "ം", ["ः"] = "ഃ", ["ँ"] = "ഁ", - }, - viraama = { + -- punctuation marks ["्"] = "്", - ["viraama"] = "്", -- weird ["'"] = "'", ["।"] = ".", ["॥"] = ".", ["‘"] = "‘", ["’"] = "’", }, - } + }, } } - --- return { --- transliterations = { --- ["iast to indic"] = { --- mapping = { --- ["a"] = "अ", --- ["ā"] = "आ", --- ["i"] = "इ", --- ["ī"] = "ई", --- ["u"] = "उ", --- ["ū"] = "ऊ", --- ["ṛ"] = "ऋ", --- ["ṝ"] = "ॠ", --- ["ḷ"] = "ऌ", --- ["ḹ"] = "ॡ", --- ["e"] = "ए", --- ["o"] = "ओ", --- ["ṃ"] = "ं", --- ["ḥ"] = "ः", --- ["˜"] = "ँ", --- ["'"] = "ऽ", --- ["k"] = "क", --- ["c"] = "च", --- ["ṭ"] = "ट", --- ["t"] = "त", --- ["p"] = "प", --- ["g"] = "ग", --- ["j"] = "ज", --- ["ḍ"] = "ड", --- ["d"] = "द", --- ["b"] = "ब", --- ["ṅ"] = "ङ", --- ["ñ"] = "ञ", --- ["ṇ"] = "ण", --- ["n"] = "न", --- ["m"] = "म", --- ["h"] = "ह", --- ["y"] = "य", --- ["r"] = "र", --- ["l"] = "ल", --- ["v"] = "व", --- ["ś"] = "श", --- ["ṣ"] = "ष", --- ["s"] = "स", --- -- --- ["ai"] = "ऐ", --- ["au"] = "औ", --- ["kh"] = "ख", --- ["ch"] = "छ", --- ["ṭh"] = "ठ", --- ["th"] = "थ", --- ["ph"] = "फ", --- ["gh"] = "घ", --- ["jh"] = "झ", --- ["ḍh"] = "ढ", --- ["dh"] = "ध", --- ["bh"] = "भ", --- -- --- ["khā"] = "खा", --- } --- } --- } --- } diff --git a/tex/context/base/mkiv/lang-imp-serbian.lua b/tex/context/base/mkiv/lang-imp-serbian.lua index 377d6dfde..9e2cf5ce6 100644 --- a/tex/context/base/mkiv/lang-imp-serbian.lua +++ b/tex/context/base/mkiv/lang-imp-serbian.lua @@ -1,4 +1,12 @@ return { + + name = "sebian transliterations", + version = "1.00", + author = "Hans Hagen", + comment = "Experimental code, the name of this file might change" + .. "or maybe it become a llg file in the end.", + copyright = "ConTeXt development team & whoever made this list", + transliterations = { ["serbian to latin"] = { mapping = { diff --git a/tex/context/base/mkiv/mult-prm.lua b/tex/context/base/mkiv/mult-prm.lua index d53e76b10..6959944d9 100644 --- a/tex/context/base/mkiv/mult-prm.lua +++ b/tex/context/base/mkiv/mult-prm.lua @@ -314,6 +314,10 @@ return { "aliased", "alignmark", "aligntab", + "allmathstyles", + "allscriptstyles", + "allsplitstyles", + "alltextstyles", "atendofgroup", "atendofgrouped", "attribute", @@ -452,6 +456,7 @@ return { "ignorepars", "immediate", "immutable", + "inherited", "initcatcodetable", "insertbox", "insertcopy", diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf index 26bd5eedd..2675edd1b 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 d366185ed..7dea83d86 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/strc-enu.mkvi b/tex/context/base/mkiv/strc-enu.mkvi index a64a7ef54..4ad417a3e 100644 --- a/tex/context/base/mkiv/strc-enu.mkvi +++ b/tex/context/base/mkiv/strc-enu.mkvi @@ -314,7 +314,7 @@ \unexpanded\def\strc_enumerations_inject_number {\begingroup - \useconstructionstyleandcolor\c!numberstyle\c!symbolcolor + \useconstructionstyleandcolor\c!numberstyle\c!numbercolor \constructionparameter\c!left \constructionparameter\c!starter \clf_savedlistprefixednumber{\currentconstructionmain}\currentconstructionlistentry\relax diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl index e8d91be4c..77ef89d5d 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{2022.01.18 10:48} +\newcontextversion{2022.01.21 20:10} %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 1c3563ee3..ca6e796c1 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{2022.01.18 10:48} +\immutable\edef\contextversion{2022.01.21 20:10} %overloadmode 1 % check frozen / warning %overloadmode 2 % check frozen / error diff --git a/tex/context/base/mkxl/font-ctx.lmt b/tex/context/base/mkxl/font-ctx.lmt index 05cad84f0..399de7421 100644 --- a/tex/context/base/mkxl/font-ctx.lmt +++ b/tex/context/base/mkxl/font-ctx.lmt @@ -1052,23 +1052,30 @@ local sizepattern, splitpattern, specialscale do local withinparents = leftparent * (1-rightparent)^0 * rightparent local withinbraces = leftbrace * (1-rightbrace )^0 * rightbrace local value = C((withinparents + withinbraces + (1-space))^1) - -- local dimension = C((space/"" + P(1))^1) - local dimension = Cs((digit+period)^1 * (spaces/"") * (P(1)-digit)^0) --- local scaler = C((digit+period)^1) + local dimension = Cs((digit+period)^1 * (spaces/"") * (P(1)-digit-space)^0) + -- local dimension_x = C((space/"" + P(1))^1) + local dimension_x = C((1-space)^1) + -- local scaler = C((digit+period)^1) local scaler = lpeg.patterns.unsigned/function(s) return round(tonumber(s)*1000) end + C(lpeg.patterns.cardinal) local rest = C(P(1)^0) local scale_none = Cc(0) - local scale_at = (P("at") + P("@")) * Cc(1) * spaces * dimension -- dimension - local scale_sa = P("sa") * Cc(2) * spaces * dimension -- number - local scale_mo = P("mo") * Cc(3) * spaces * dimension -- number - local scale_scaled = P("scaled") * Cc(4) * spaces * dimension -- number - local scale_ht = P("ht") * Cc(5) * spaces * dimension -- dimension - local scale_cp = P("cp") * Cc(6) * spaces * dimension -- dimension + local scale_at = (P("at") + P("@")) * Cc(1) * spaces * dimension -- dimension + local scale_sa = P("sa") * Cc(2) * spaces * dimension_x -- number or string + local scale_mo = P("mo") * Cc(3) * spaces * dimension_x -- number or string + local scale_scaled = P("scaled") * Cc(4) * spaces * dimension -- number + local scale_ht = P("ht") * Cc(5) * spaces * dimension -- dimension + local scale_cp = P("cp") * Cc(6) * spaces * dimension -- dimension + local scale_sx = P("sx") * spaces * scaler -- scale + local scale_sy = P("sy") * spaces * scaler -- scale specialscale = { [5] = "ht", [6] = "cp" } - sizepattern = spaces * ((scale_at + scale_sa + scale_mo + scale_ht + scale_cp + scale_scaled) * (spaces * scaler)^0 + scale_none) + -- sizepattern = spaces * ((scale_at + scale_sa + scale_mo + scale_ht + scale_cp + scale_scaled) * (spaces * scaler)^0 + scale_none) + + scaler = spaces * ( (scale_sx + Cc(0)) * spaces * (scale_sy + Cc(0)) )^-1 + sizepattern = spaces * ((scale_at + scale_sa + scale_mo + scale_ht + scale_cp + scale_scaled) * scaler + scale_none) + splitpattern = spaces * value * spaces * rest end @@ -1112,6 +1119,12 @@ do -- else too many locals return v end) + local obey_designsize = false + + experiments.register("fonts.compact.obeydesignsize",function(v) + obey_designsize = v + end) + implement { name = "definefont_one", arguments = "string", @@ -1134,13 +1147,14 @@ do -- else too many locals end -- we can also use a count for the size if size and size ~= "" then - local mode, size, sx, sy = lpegmatch(sizepattern,size) - if mode and size and size ~= "" then + local mode, fontsize, sx, sy = lpegmatch(sizepattern,size) +-- print(size,mode,fontsize,sx,sy) + if mode and fontsize and fontsize ~= "" then texsetcount("scaledfontmode",mode) - -- ctx_setsomefontsize(size) + -- ctx_setsomefontsize(fontsize) -- We use a catcodetable, just in case it's 1.2\exheight (a corner case that showed -- up in the lmtx manual: marking that changed size in the mids of some verbatim). - setmacro(ctxcatcodes,"somefontsize",size) + setmacro(ctxcatcodes,"somefontsize",fontsize) if sx then setmacro("somefontsizex",sx) end @@ -1215,7 +1229,7 @@ do -- else too many locals local lookup, name, sub, method, detail = getspecification(str or "") -- new (todo: inheritancemode) local designsize = fontdesignsize ~= "" and fontdesignsize or classdesignsize or "" - local designname = designsizefilename(name,designsize,size) + local designname = designsizefilename(name,designsize,size,obey_designsize) if designname and designname ~= "" then if trace_defining or trace_designsize then report_defining("remapping name %a, specification %a, size %a, designsize %a",name,designsize,size,designname) @@ -1624,7 +1638,7 @@ do -- else too many locals return infofont end - -- abstract interfacing + -- abstract interfacing : we could actually do a runmacro or so implement { name = "tf", actions = function() setmacro("fontalternative","tf") end } implement { name = "bf", actions = function() setmacro("fontalternative","bf") end } diff --git a/tex/context/base/mkxl/font-ini.mklx b/tex/context/base/mkxl/font-ini.mklx index 6a926bcbd..c30a610cc 100644 --- a/tex/context/base/mkxl/font-ini.mklx +++ b/tex/context/base/mkxl/font-ini.mklx @@ -921,16 +921,15 @@ % \glyphscale \ifnum\c_font_scaled_font_mode_saved>\plusfour + % \c_font_scaled_points is set when we pass the font to the engine \numexpr\plusthousand*\dimexpr\d_font_scaled_default\relax/\c_font_scaled_points\relax \else \c_font_future_glyph_scale \fi -% \ifempty\somefontsizex\else -% \edef\somefontsizex{\glyphxscale\somefontsizex\relax}% todo: inserts relax -% \fi -% \ifempty\somefontsizey\else -% \edef\somefontsizey{\glyphyscale\somefontsizey\relax}% -% \fi + % experiment + \glyphxscale\ifempty\somefontsizex\plusthousand\else\somefontsizex\fi\relax + \glyphyscale\ifempty\somefontsizey\plusthousand\else\somefontsizey\fi\relax + % experiment \expandafter\let\expandafter\lastrawfontcall\csname#csname\endcsname \ifrelax\lastrawfontcall \let\somefontspec\empty @@ -2138,7 +2137,7 @@ \enforced\let\tx\empty \enforced\let\txx\empty} -%D This alterative is not really needed, but for old time's sake we keep it there. +%D This alternative is not really needed, but for old time's sake we keep it there. %D We can speed it up when needed. \def\font_helpers_set_current_font_x_style_alternative #alternative{\csname#alternative\endcsname\tx} diff --git a/tex/context/base/mkxl/good-gen.lmt b/tex/context/base/mkxl/good-gen.lmt index 33147260d..49b379304 100644 --- a/tex/context/base/mkxl/good-gen.lmt +++ b/tex/context/base/mkxl/good-gen.lmt @@ -197,10 +197,12 @@ function fontgoodies.designsizes.register(name,size,specification) end end -function fontgoodies.designsizes.filename(name,spec,size) -- returns nil of no match +function fontgoodies.designsizes.filename(name,spec,size,force) -- returns nil of no match local data = designdata[lower(name)] if data then - if not spec or spec == "" or spec == "default" or texconditionals["c_font_compact"] then + if not spec or spec == "" or spec == "default" then + return data.default + elseif not force and texconditionals["c_font_compact"] then return data.default elseif spec == "auto" then local ranges = data.ranges diff --git a/tex/context/base/mkxl/lang-lab.mkxl b/tex/context/base/mkxl/lang-lab.mkxl index 369049ed1..3ce9d027f 100644 --- a/tex/context/base/mkxl/lang-lab.mkxl +++ b/tex/context/base/mkxl/lang-lab.mkxl @@ -21,7 +21,7 @@ %D Left-overs: \ifdefined\sixperemspace \else - \permanent\def\sixperemspace{\normalUchar"2006} + \permanent\edef\sixperemspace{\normalUchar"2006} \fi %D In this module we deal with language dependant labels and prefixes, like in {\em diff --git a/tex/context/base/mkxl/lang-tra.lmt b/tex/context/base/mkxl/lang-tra.lmt new file mode 100644 index 000000000..b3fedc7c1 --- /dev/null +++ b/tex/context/base/mkxl/lang-tra.lmt @@ -0,0 +1,322 @@ +if not modules then modules = { } end modules ['lang-tra'] = { + version = 1.001, + comment = "companion to lang-tra.mkiv", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +-- The indic transliterations was researched by kauśika and after some experiments +-- we settled on the current approach (mappings and a more specific lpeg). + +local concat = table.concat +local utfbyte, utfchar, utfsplit, utfvalues = utf.byte, utf.char, utf.split, utf.values +local C, Cc, Cs, lpegmatch = lpeg.C, lpeg.Cc, lpeg.Cs, lpeg.match +local utfchartabletopattern = lpeg.utfchartabletopattern +local utfcharacterpattern = lpeg.patterns.utf8character + +local nuts = nodes.nuts + +local nextchar = nuts.traversers.char + +local getattr = nuts.getattr +local setchar = nuts.setchar +local getnext = nuts.getnext +local isnextchar = nuts.isnextchar + +local insertafter = nuts.insertafter +local copynode = nuts.copy +local removenode = nuts.remove + +local texsetattribute = tex.setattribute + +local transliteration = { } +languages.transliteration = transliteration + +local a_transliteration = attributes.private("transliteration") +local unsetvalue = attributes.unsetvalue + +local implement = interfaces.implement +local context = context + +local zwj = utf.char(0x200D) + +local lastmapping = 0 +local loadedmappings = { } +local loadedlibraries = { } + +local report = logs.reporter("transliteration") +local trace = false trackers.register("languages.transliteration", function(v) trace = v end) + +local converters = { +-- ["iast to deva"] = function(m) +-- local t_svara = m.svara +-- local p_svara = utfchartabletopattern(t_svara) +-- local t_vyanjana = m.vyanjana +-- local p_vyanjana = utfchartabletopattern(t_vyanjana) +-- local t_maatra = m.maatra +-- local p_maatra = utfchartabletopattern(t_maatra) +-- local t_viraama = m.viraama +-- local p_viraama = utfchartabletopattern(t_viraama) +-- local t_boundary = m.boundary +-- local p_boundary = utfchartabletopattern(t_boundary) +-- local t_yogavaaha = m.yogavaaha +-- local p_yogavaaha = utfchartabletopattern(t_yogavaaha) +-- local p_svara_boundary = 1 - p_svara - p_vyanjana - p_yogavaaha +-- local p = Cs ( ( +-- p_svara / t_svara +-- + p_vyanjana / t_vyanjana +-- + p_viraama / t_viraama +-- + p_yogavaaha / t_yogavaaha +-- + C(utfcharacterpattern) +-- )^0 ) +-- return function(s) +-- -- for now +-- -- s = zwj .. s +-- -- +-- return lpegmatch(p,s) or s +-- end +-- end, + ["mapping"] = function(m) + local t_mapping = m.mapping + if t_mapping then + local p = Cs ( ( + utfchartabletopattern(t_mapping) / t_mapping + + C(utfcharacterpattern) + )^0 ) + -- lpeg.print(p) + return function(s) + return lpegmatch(p,s) or s + end + else + return false + end + end, + ["default"] = function(m) + return function(s) + return s + end + end, +} + +function transliteration.use(library) + local lib = loadedlibraries[library] + if lib == nil then + -- todo: use library loader + local data = require("lang-imp-" .. library) + if data then + local transliterations = data.transliterations + if transliterations then + for name, d in table.sortedhash(transliterations) do + local vector = d.vector + if vector then + report("vector %a in %a is %sloaded with index %i",name,library," already",d.attribute) + else + lastmapping = lastmapping + 1 + d.vector = (converters[name] or converters.mapping or converters.default)(d) + or (converters.default)(d) + report("vector %a in set %a is %sloaded with index %i",name,library,"",lastmapping) + end + d.attribute = lastmapping + d.library = library + d.name = name + loadedmappings[name] = d + loadedmappings[lastmapping] = d + end + else + report("library %a has no transliterations",library) + end + loadedlibraries[library] = data + else + loadedlibraries[library] = false + end + end +end + +local enable = false + +enable = function() + nodes.tasks.enableaction("processors", "languages.transliteration.handler") + enable = false +end + +function transliteration.set(vector) + if enable then + enable() + end + local m = loadedmappings[vector] + local a = m and m.attribute or unsetvalue + if trace then + report("setting transliteration %s",vector) + end + texsetattribute(a_transliteration,a) +end + +function transliteration.register(vector) + if enable then + enable() + end + local m = loadedmappings[vector] + local a = m and m.attribute or unsetvalue + if trace then + report("registering transliteration %s",vector) + end + return a +end + +-- When there is need I will improve the performance of the next handler. + +function transliteration.handler(head) + local aprev = nil + local vector = nil + local current = head + local first = nil + local last = nil + local list = { } + local size = 0 + + -- we need a more clever one: run over small ranges in order to keep colors etc + + -- actually we can generalize the replacer elsewhere + + local function flush(nxt) + -- we can do some optimization here by having the split as replacement + local old = concat(list,"",1,size) + local new = vector(old) + if old ~= new then + if trace then + report("old: %s",old) + report("new: %s",new) + end + local c = first + local x = false + for s in utfvalues(new) do + if x then + head, c = insertafter(head,c,copynode(first)) + setchar(c,s) + else + setchar(c,s) + if c == last then + x = true + else + c = getnext(c) + end + end + end + if not x then + while c do + head, c = removenode(head,c,true) + if c == nxt then + break + end + end + end + end + end + + while current do + local nxt, chr, more = isnextchar(current) + if chr then + local a = getattr(current,a_transliteration) + if a then + if a ~= aprev then + if first then + flush(nxt) + first = nil + size = 0 + end + aprev = a + vector = loadedmappings[a] + if vector then + vector = vector.vector + end + end + if not first then + first = current + end + last = current + size = size + 1 + list[size] = utfchar(chr) + if not more then + flush(nxt) + first = nil + size = 0 + -- we can go ahead one next + end + else + if first then + flush(nxt) + first = nil + size = 0 + end + end + end + current = nxt + end + if first then + flush(nxt) + end + return head +end + +interfaces.implement { + name = "usetransliteration", + public = true, + protected = true, + arguments = "optional", + actions = transliteration.use, +} + +implement { + name = "settransliteration", + arguments = "string", + actions = transliteration.set, +} + +implement { + name = "registertransliteration", + arguments = "string", + actions = { transliteration.register, context }, +} + +nodes.tasks.prependaction("processors", "normalizers", "languages.transliteration.handler", nil, "nut", "disabled" ) + +local function transliterate(scheme,str) + if str and str ~= "" then + local m = loadedmappings[scheme] + local c = m and m.vector + context(c and c(str) or str) + end +end + +local getbuffer = buffers.getcontent + +implement { + name = "transliterate", + public = true, + protected = true, + arguments = { "optional", "string" }, + actions = transliterate, +} + +implement { + name = "transliteratebuffer", + public = true, + protected = true, + arguments = { "optional", "string" }, + actions = function(scheme,name) transliterate(scheme,getbuffer(name)) end, +} + +implement { + name = "transliterated", + public = true, + arguments = { "optional", "string" }, + actions = transliterate, +} + +implement { + name = "transliteratedbuffer", + public = true, + arguments = { "optional", "string" }, + actions = function(scheme,name) transliterate(scheme,getbuffer(name)) end, +} diff --git a/tex/context/base/mkxl/lang-tra.mkxl b/tex/context/base/mkxl/lang-tra.mkxl index b087832e0..96dcc7d94 100644 --- a/tex/context/base/mkxl/lang-tra.mkxl +++ b/tex/context/base/mkxl/lang-tra.mkxl @@ -13,23 +13,49 @@ \writestatus{loading}{ConTeXt Language Macros / Transliteration} -\registerctxluafile{lang-tra}{} +\registerctxluafile{lang-tra}{autosuffix} \unprotect +\installcorenamespace {transliteration} + +\installcommandhandler \??transliteration {transliteration} \??transliteration + \definesystemattribute[transliteration][public,global] -\installcorenamespace {transliteration} +% define in lua: \usetransliteration[#1] -\permanent\tolerant\protected\def\definetransliteration[#1]#*[#2]% - {\clf_definedtransliteration{#1}{#2}} +% todo: define fast attribute at the tex end do we can have a proper define -\permanent\protected\def\settransliteration[#1]% - {\clf_settransliteration{#1}} +\def\lang_transliteration_set#1% + {\ifcsname\??transliteration#1\endcsname + \c_attr_transliteration\lastnamedcs + \edef\currenttransliteration{#1}% + \usetransliterationstyleandcolor\c!style\c!color + \uselanguageparameter\transliterationparameter + \else + \clf_settransliteration{#1}% + \fi} -\permanent\protected\def\starttransliteration[#1]% +\permanent\tolerant\protected\def\settransliteration[#1]#;#2% + {\lang_transliteration_set{#1}} + +\permanent\tolerant\protected\def\starttransliteration[#1]#*[#2]% {\begingroup - \clf_settransliteration{#1}} + \ifparameter#2\or + \edef\currenttransliteration{#1}% + \setupcurrenttransliteration[#2]% + \fi + \lang_transliteration_set{#1}} + +\permanent\tolerant\protected\def\transliteration[#1]#;#2% + {\groupedcommand{\lang_transliteration_set{#1#2}}\donothing} + +\appendtoks + \expandafter\integerdef\csname\??transliteration\currenttransliteration\endcsname + \clf_registertransliteration{\transliterationparameter\c!vector}% + \relax +\to \everydefinetransliteration \permanent\protected\def\stoptransliteration {\endgroup} diff --git a/tex/context/base/mkxl/lpdf-lmt.lmt b/tex/context/base/mkxl/lpdf-lmt.lmt index 0861e0916..9bb3319d4 100644 --- a/tex/context/base/mkxl/lpdf-lmt.lmt +++ b/tex/context/base/mkxl/lpdf-lmt.lmt @@ -480,10 +480,16 @@ do local w local e = c and c[char] if e then - w = e.width or 0 +-- w = e.width or 0 +-- local a = e.advance +-- if a then +-- w = a +-- end local a = e.advance if a then w = a + else + w = e.width or 0 end end if not w then diff --git a/tex/context/base/mkxl/math-act.lmt b/tex/context/base/mkxl/math-act.lmt index 0ac497d57..48d389bf9 100644 --- a/tex/context/base/mkxl/math-act.lmt +++ b/tex/context/base/mkxl/math-act.lmt @@ -459,7 +459,14 @@ do if trace_tweaking then report_tweak("setting width of %U to %p",target,original,unicode,width) end - characters[unicode] = { width = width } + characters[unicode] = { + width = width, + -- advance = width, + unicode = unicode, + commands = { + -- { "slot", 0, 32 }, + }, + } end end end diff --git a/tex/context/base/mkxl/math-fen.mkxl b/tex/context/base/mkxl/math-fen.mkxl index 4a3144530..b8347eb66 100644 --- a/tex/context/base/mkxl/math-fen.mkxl +++ b/tex/context/base/mkxl/math-fen.mkxl @@ -63,7 +63,8 @@ \appendtoks \edef\p_command{\mathfenceparameter\c!command}% \ifx\p_command\v!yes - \setuevalue\currentmathfence{\math_fenced_fenced[\currentmathfence]}% + % \instance + \protected\edefcsname\currentmathfence\endcsname{\math_fenced_fenced[\currentmathfence]}% \fi \to \everydefinemathfence @@ -230,12 +231,15 @@ {\advance\c_math_fenced_nesting\plusone \begingroup \edef\currentmathfence{#1}% -% under test: -\c_attr_mathsize\attributeunsetvalue -\letmathfenceparameter\c!size\empty -\letmathfenceparameter\c!factor\v!auto -% so far - \ifparameter#2\or\setupcurrentmathfence[#2]\fi + % under test: + \c_attr_mathsize\attributeunsetvalue + \letmathfenceparameter\c!size\empty + \letmathfenceparameter\c!factor\v!auto + % so far + \ifparameter#2\or + \setupcurrentmathfence[#2]% + \bigmathdelimitervariant\mathfenceparameter\c!alternative\relax + \fi \math_fenced_fenced_common \edef\p_size{\mathfenceparameter\c!size}% \ifempty\p_size @@ -637,7 +641,7 @@ \bigmathdelimitervariant\mathfenceparameter\c!alternative\relax \to \everysetupmathfence -\setupmathfence[\c!method=1,\c!alternative=2] +\setupmathfence[\c!method=1,\c!alternative=1] % \protected\def\plainbigdelimiters % traditional method % {\bigmathdelimitermethod\plustwo} @@ -704,7 +708,7 @@ \fi \fi} -\permanent\protected\def\mathdelimiterstep#1#2% +\permanent\protected\def\mathdelimiterstep#1#2% not used {\begingroup \math_fenced_force_size\plusone{#1}% \math_fenced_step#2\relax diff --git a/tex/context/base/mkxl/meta-ini.mkxl b/tex/context/base/mkxl/meta-ini.mkxl index b30f4826f..6ddf4def8 100644 --- a/tex/context/base/mkxl/meta-ini.mkxl +++ b/tex/context/base/mkxl/meta-ini.mkxl @@ -168,8 +168,8 @@ \t_meta_inclusions \emptytoks % in case we redefine \to \everydefineMPinstance -\permanent\protected\def\resetMPinstance[#1]% - {\writestatus\m!metapost{reset will be implemented when needed}} +% \permanent\protected\def\resetMPinstance[#1]% +% {\writestatus\m!metapost{reset will be implemented when needed}} \def\meta_analyze_graphicname[#1]% {\normalexpanded{\meta_analyze_graphicname_indeed[#1::::]}} diff --git a/tex/context/base/mkxl/mlib-ctx.lmt b/tex/context/base/mkxl/mlib-ctx.lmt index 64225e308..8ed6b0b00 100644 --- a/tex/context/base/mkxl/mlib-ctx.lmt +++ b/tex/context/base/mkxl/mlib-ctx.lmt @@ -410,3 +410,18 @@ MP = MP or { } -- user namespace table.setmetatablecall(mp,function(t,k,...) return t[k](...) end) table.setmetatablecall(MP,function(t,k,...) return t[k](...) end) + +-- A secret option: + +implement { + name = "resetMPinstance", + protected = true, + public = true, + arguments = "optional", + actions = function(s) + if s and s ~= "" then + report_metapost("resetting instance %a",s) + metapost.reset(s) + end + end, +} diff --git a/tex/context/base/mkxl/node-syn.lmt b/tex/context/base/mkxl/node-syn.lmt index dfa1a19e8..916e85c9e 100644 --- a/tex/context/base/mkxl/node-syn.lmt +++ b/tex/context/base/mkxl/node-syn.lmt @@ -530,52 +530,6 @@ local function collect_min(head) return head end --- local function collect_min(head) --- local first = false --- local last = false --- local tag = 0 --- local line = 0 --- for current, id, subtype in nextnode, head do --- if id == glyph_code then --- local tc, lc = getsynctexfields(current) --- if tc and tc > 0 then --- if tag == 0 then --- first = current --- end --- tag = tc --- line = lc --- last = current --- elseif tag > 0 then --- head = inject(head,first,last,tag,line) --- tag = 0 --- end --- elseif id == disc_code then --- last = current --- elseif id == kern_code and subtype == fontkern_code then --- last = current --- elseif id == hlist_code or id == vlist_code then --- if tag > 0 then --- head = inject(head,first,last,tag,line) --- tag = 0 --- end --- local list = getlist(current) --- if list then --- local l = collect(list) --- if l ~= list then --- setlist(current,l) --- end --- end --- elseif tag > 0 then --- head = inject(head,first,last,tag,line) --- tag = 0 --- end --- end --- if tag > 0 then --- head = inject(head,first,last,tag,line) --- end --- return head --- end - local function inject(parent,head,first,last,tag,line) local w, h, d = getrangedimensions(parent,first,getnext(last)) if h < height then @@ -630,24 +584,24 @@ local function collect_max(head,parent) last = current end elseif id == glue_code then - if tag > 0 then - local tc, lc = getsynctexfields(current) - if tc and tc > 0 then - if tag ~= tc or line ~= lc then - head = inject(parent,head,first,last,tag,line) - tag = 0 - break - end - else - head = inject(parent,head,first,last,tag,line) - tag = 0 - break - end - else - tag = 0 - break - end - id = nil -- so no test later on + -- if tag > 0 then + -- local tc, lc = getsynctexfields(current) + -- if tc and tc > 0 then + -- if tag ~= tc or line ~= lc then + -- head = inject(parent,head,first,last,tag,line) + -- tag = 0 + -- break + -- end + -- else + -- head = inject(parent,head,first,last,tag,line) + -- tag = 0 + -- break + -- end + -- else + -- tag = 0 + -- break + -- end + -- id = nil -- so no test later on elseif id == penalty_code then -- go on (and be nice for math) else diff --git a/tex/context/base/mkxl/pack-mrl.mkxl b/tex/context/base/mkxl/pack-mrl.mkxl index ce25fe1dd..7a04f3904 100644 --- a/tex/context/base/mkxl/pack-mrl.mkxl +++ b/tex/context/base/mkxl/pack-mrl.mkxl @@ -39,32 +39,82 @@ \installsimplecommandhandler \??blackrules {blackrules} \??blackrules \permanent\protected\def\blackrule - {\hpack\bgroup + {% this was \hpack\bgroup\dontleavehmode but we want leader support + \begingroup \doifelsenextoptionalcs\pack_black_rule_pickup\pack_black_rule_indeed} \def\pack_black_rule_pickup[#1]% {\setupcurrentblackrules[#1]% \pack_black_rule_indeed} +% \def\pack_black_rule_indeed +% {\edef\p_width {\directblackrulesparameter\c!width }% +% \edef\p_height{\directblackrulesparameter\c!height}% +% \edef\p_depth {\directblackrulesparameter\c!depth }% +% \ifx\p_height\v!max +% \setstrut +% \orelse\ifx\p_depth\v!max +% \setstrut +% \fi +% \useblackrulesstyleandcolor\c!style\c!color +% \ifcsname\??blackruletype\directblackrulesparameter\c!type\endcsname +% \lastnamedcs +% \else +% \vrule +% \fi +% \ifx\p_width \v!max\s!width \emwidth\orelse\ifempty\p_width \else\s!width \p_width \fi +% \ifx\p_height\v!max\s!height\strutht\orelse\ifempty\p_height\else\s!height\p_height\fi +% \ifx\p_depth \v!max\s!depth \strutdp\orelse\ifempty\p_depth \else\s!depth \p_depth \fi +% \egroup} + \def\pack_black_rule_indeed - {\edef\p_width {\directblackrulesparameter\c!width }% - \edef\p_height{\directblackrulesparameter\c!height}% - \edef\p_depth {\directblackrulesparameter\c!depth }% + {\edef\p_width {\directblackrulesparameter\c!width}% + \edef\p_height {\directblackrulesparameter\c!height}% + \edef\p_depth {\directblackrulesparameter\c!depth}% + \edef\p_stretch{\directblackrulesparameter\c!stretch}% + \edef\p_shrink {\directblackrulesparameter\c!shrink}% \ifx\p_height\v!max \setstrut + \let\p_height\strutdp \orelse\ifx\p_depth\v!max \setstrut \fi + % \ifx\p_height\v!max + % \let\p_height\strutdp + % \fi + \ifx\p_depth\v!max + \let\p_depth\strutdp + \fi + \ifx\p_width\v!max + \let\p_width\emwidth + \fi \useblackrulesstyleandcolor\c!style\c!color + \ifempty\p_stretch + \ifempty\p_shrink + \donefalse + \else + \donetrue + \leaders + \fi + \else + \donetrue + \leaders + \fi \ifcsname\??blackruletype\directblackrulesparameter\c!type\endcsname \lastnamedcs \else \vrule \fi - \ifx\p_width \v!max\s!width \emwidth\orelse\ifempty\p_width \else\s!width \p_width \fi - \ifx\p_height\v!max\s!height\strutht\orelse\ifempty\p_height\else\s!height\p_height\fi - \ifx\p_depth \v!max\s!depth \strutdp\orelse\ifempty\p_depth \else\s!depth \p_depth \fi - \egroup} + \ifempty\p_height\else\s!height\p_height\fi + \ifempty\p_depth\else\s!depth\p_depth\fi + \ifdone + \hskip\ifempty\p_width\zeropoint\else\p_width\fi + \ifempty\p_stretch\else\s!plus\p_stretch\fi + \ifempty\p_shrink\else\s!minus\p_shrink\fi + \else + \ifempty\p_width\else\s!width\p_width\fi + \fi + \endgroup} \setupblackrules [\c!width=\emwidth, @@ -99,7 +149,7 @@ %D would probably have taken more tokens. \permanent\tolerant\protected\def\blackrules[#1]% probably never used - {\hpack\bgroup + {\hpack\bgroup % we keep this because breaking into lines breaks compatibility \ifarguments\or\setupcurrentblackrules[#1]\fi \scratchwidth \directblackrulesparameter\c!width \scratchheight \directblackrulesparameter\c!height @@ -136,15 +186,15 @@ \installcorenamespace{blackruletype} -\setvalue{\??blackruletype mp}% +\defcsname\??blackruletype mp\endcsname {\frule type {mp}% data {\includeMPgraphic{\directblackrulesparameter\c!mp}} line \dimexpr\directblackrulesparameter\c!rulethickness\relax } -\letvalue{\??blackruletype\s!no }\novrule -%letvalue{\??blackruletype\s!yes}\vrule +\letcsname\??blackruletype\s!no \endcsname\novrule +%letcsname\??blackruletype\s!yes\endcsname\vrule \setupblackrules [\c!n=3, diff --git a/tex/context/base/mkxl/spac-hor.mkxl b/tex/context/base/mkxl/spac-hor.mkxl index 245195011..c8ac4c74c 100644 --- a/tex/context/base/mkxl/spac-hor.mkxl +++ b/tex/context/base/mkxl/spac-hor.mkxl @@ -1021,22 +1021,22 @@ \overloaded\permanent\protected \def\negthickspace{\textormathspace-\thickmuskip3} \overloaded\permanent\protected\edef\medspace {\textormathspacecommand+\medmuskip{\Uchar"205F}} -% needed for unicode: - -% \protected\def\breakablethinspace {\breakabletextormathspace+\thinmuskip1} -% \protected\def\twoperemspace {\hskip\dimexpr\emwidth/2\relax} % == \enspace -% \protected\def\threeperemspace {\hskip\dimexpr\emwidth/3\relax} -% \protected\def\fourperemspace {\hskip\dimexpr\emwidth/4\relax} -% \protected\def\fiveperemspace {\hskip\dimexpr\emwidth/5\relax} % goodie -% \protected\def\sixperemspace {\hskip\dimexpr\emwidth/6\relax} -% \protected\def\figurespace {\begingroup\setbox\scratchbox\hbox{0}\hskip\wd\scratchbox\endgroup} % there is a command for this -% \protected\def\punctuationspace {\begingroup\setbox\scratchbox\hbox{.}\hskip\wd\scratchbox\endgroup} -% \protected\def\ideographicspace {\hskip\dimexpr\emwidth/1\relax} -% \protected\def\ideographichalffillspace{\hskip\dimexpr\emwidth/2\relax} -% \protected\def\nobreakspace {\penalty\plustenthousand\kern\interwordspace} -% \protected\def\narrownobreakspace {\penalty\plustenthousand\thinspace} -% \protected\def\zerowidthnobreakspace {\penalty\plustenthousand\kern\zeropoint} -% \protected\def\zerowidthspace {\hskip\zeropoint} +% maybe + +% \protected\def\breakablethinskip {\breakabletextormathspace+\thinmuskip1} +% \protected\def\twoperemskip {\hskip\dimexpr\emwidth/2\relax} % == \enspace +% \protected\def\threeperemskip {\hskip\dimexpr\emwidth/3\relax} +% \protected\def\fourperemskip {\hskip\dimexpr\emwidth/4\relax} +% \protected\def\fiveperemskip {\hskip\dimexpr\emwidth/5\relax} % goodie +% \protected\def\sixperemskip {\hskip\dimexpr\emwidth/6\relax} +% \protected\def\figureskip {\begingroup\setbox\scratchbox\hbox{0}\hskip\wd\scratchbox\endgroup} % there is a command for this +% \protected\def\punctuationskip {\begingroup\setbox\scratchbox\hbox{.}\hskip\wd\scratchbox\endgroup} +% \protected\def\ideographicskip {\hskip\dimexpr\emwidth/1\relax} +% \protected\def\ideographichalffillskip{\hskip\dimexpr\emwidth/2\relax} +% \protected\def\nobreakskip {\penalty\plustenthousand\kern\interwordspace} +% \protected\def\narrownobreakskip {\penalty\plustenthousand\thinspace} +% \protected\def\zerowidthnobreakskip {\penalty\plustenthousand\kern\zeropoint} +% \protected\def\zerowidthskip {\hskip\zeropoint} \definehspace[.5][.1250\emwidth] % hair \definehspace[1] [.1667\emwidth] % thin diff --git a/tex/context/base/mkxl/trac-deb.lmt b/tex/context/base/mkxl/trac-deb.lmt index f54e0605e..caa5464f8 100644 --- a/tex/context/base/mkxl/trac-deb.lmt +++ b/tex/context/base/mkxl/trac-deb.lmt @@ -25,6 +25,7 @@ local implement = interfaces.implement local ioflush = io.flush local ioread = io.read local ossleep = os.sleep +local osexit = os.exit local writenl = texio.writenl local write = texio.write @@ -428,14 +429,19 @@ implement { -- protected = false, -- expandable arguments = { "optional", "string" }, actions = function(t,s) - t = tonumber(t) - if t then - report("%s (sleep: %.3N)",s,t) - ioflush() - ossleep(t) - else + if t == "quit" then report(s) - ioflush() + osexit() + else + t = tonumber(t) + if t then + report("%s (sleep: %.3N)",s,t) + ioflush() + ossleep(t) + else + report(s) + ioflush() + end end end } diff --git a/tex/context/fonts/mkiv/lucida-opentype-math.lfg b/tex/context/fonts/mkiv/lucida-opentype-math.lfg index 3f5c8cff7..eff1603fb 100644 --- a/tex/context/fonts/mkiv/lucida-opentype-math.lfg +++ b/tex/context/fonts/mkiv/lucida-opentype-math.lfg @@ -10,7 +10,7 @@ local dimensions, kerns if CONTEXTLMTXMODE == 0 then dimensions = { default = { -- experimental values - [0x02044] = { xoffset = 275, width = 600 }, +-- [0x02044] = { xoffset = 275, width = 600 }, -- primes [0xFE932] = { width = 200 }, [0xFE933] = { width = 500 }, diff --git a/tex/context/interface/mkii/keys-ro.xml b/tex/context/interface/mkii/keys-ro.xml index 5656f3aad..a2aa8bdd3 100644 --- a/tex/context/interface/mkii/keys-ro.xml +++ b/tex/context/interface/mkii/keys-ro.xml @@ -999,7 +999,9 @@ + + diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index c55f95cd2..2118c8001 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 : 2022-01-18 10:48 +-- merge date : 2022-01-21 20:10 do -- begin closure to overcome local limits and interference -- cgit v1.2.3