From 7c7fe9c9e18355f42d0dba1b248235252728060b Mon Sep 17 00:00:00 2001 From: Marius Date: Mon, 4 Apr 2011 00:00:13 +0300 Subject: beta 2011.04.03 22:32 --- tex/context/base/colo-ini.mkiv | 14 -- tex/context/base/cont-new.mkii | 2 +- tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context.mkii | 2 +- tex/context/base/context.mkiv | 2 +- tex/context/base/core-ctx.lua | 4 +- tex/context/base/lang-txt.lua | 74 ++++---- tex/context/base/lpdf-wid.lua | 21 ++- tex/context/base/m-morse.mkiv | 264 ---------------------------- tex/context/base/m-morse.mkvi | 264 ++++++++++++++++++++++++++++ tex/context/base/m-obsolete.mkii | 5 + tex/context/base/m-obsolete.mkiv | 5 + tex/context/base/m-obsolete.tex | 5 - tex/context/base/mult-aux.lua | 12 ++ tex/context/base/mult-aux.mkiv | 1 + tex/context/base/s-fnt-25.mkiv | 2 +- tex/context/base/s-inf-01.mkvi | 2 +- tex/context/base/scrn-fld.mkvi | 37 ++-- tex/context/base/scrn-pag.mkvi | 4 +- tex/context/base/spac-ver.lua | 4 +- tex/context/base/status-files.pdf | Bin 23555 -> 23594 bytes tex/context/base/strc-not.mkiv | 10 +- tex/context/base/type-lua.mkiv | 4 +- tex/context/base/type-otf.mkiv | 2 +- tex/generic/context/luatex-fonts-merged.lua | 2 +- 25 files changed, 383 insertions(+), 361 deletions(-) delete mode 100644 tex/context/base/m-morse.mkiv create mode 100644 tex/context/base/m-morse.mkvi create mode 100644 tex/context/base/m-obsolete.mkii create mode 100644 tex/context/base/m-obsolete.mkiv delete mode 100644 tex/context/base/m-obsolete.tex diff --git a/tex/context/base/colo-ini.mkiv b/tex/context/base/colo-ini.mkiv index e4a9e4046..45fe14633 100644 --- a/tex/context/base/colo-ini.mkiv +++ b/tex/context/base/colo-ini.mkiv @@ -942,20 +942,6 @@ \appendtoks \initializemaintextcolor \to \everyjob \appendtoks \initializemaintextcolor \to \everysetupcolors -% \def\dodefinepaletcolor#1#2#3% -% {\doifassignmentelse{#3}% \definepalet[test][xx={y=.4}] -% {\definecolor[\??pa#1:#2][#3]% -% \iffreezecolors\@EA\setevalue\else\@EA\setvalue\fi{(cs:#1:#2)}{\csname(cs:\??pa#1:#2)\endcsname}% -% \iffreezecolors\@EA\setevalue\else\@EA\setvalue\fi{(ca:#1:#2)}{\csname(ca:\??pa#1:#2)\endcsname}} -% {\ifcsname(cs:#3)\endcsname % \definepalet[test][xx=green] -% \iffreezecolors\@EA\setevalue\else\@EA\setvalue\fi{(cs:#1:#2)}{\csname(cs:#3)\endcsname}% -% \iffreezecolors\@EA\setevalue\else\@EA\setvalue\fi{(ca:#1:#2)}{\csname(ca:#3)\endcsname}% -% \else -% % not entered when making format -% \localundefine{(cs:#1:#2)}% \letvalue{(cs:#1:#2)}\undefined -% \localundefine{(ca:#1:#2)}% \letvalue{(ca:#1:#2)}\undefined -% \fi}} - \def\doinheritdirectcs#1{\csname(cs:\ifcsname(cs:#1)\endcsname#1\fi)\endcsname} \def\doinheritdirectca#1{\csname(ca:\ifcsname(ca:#1)\endcsname#1\fi)\endcsname} \def\doinheritdirectts#1{\csname(ts:\ifcsname(ts:#1)\endcsname#1\fi)\endcsname} diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index a4ab5d51c..67a42198f 100644 --- a/tex/context/base/cont-new.mkii +++ b/tex/context/base/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2011.03.30 11:21} +\newcontextversion{2011.04.03 22:32} %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/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 2f9375bd0..acc44ba36 100644 --- a/tex/context/base/cont-new.mkiv +++ b/tex/context/base/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2011.03.30 11:21} +\newcontextversion{2011.04.03 22:32} %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/context.mkii b/tex/context/base/context.mkii index 70a7e00d1..dcadc7c69 100644 --- a/tex/context/base/context.mkii +++ b/tex/context/base/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2011.03.30 11:21} +\edef\contextversion{2011.04.03 22:32} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index b6d0771a7..c303419b9 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2011.03.30 11:21} +\edef\contextversion{2011.04.03 22:32} %D For those who want to use this: diff --git a/tex/context/base/core-ctx.lua b/tex/context/base/core-ctx.lua index 1ee8e9698..e6fb7bb5f 100644 --- a/tex/context/base/core-ctx.lua +++ b/tex/context/base/core-ctx.lua @@ -23,9 +23,9 @@ function commands.loadctxpreplist() islocal = xml.found(x,"ctx:preplist[@local=='yes']") --~ if trace_prepfiles then if islocal then - report_prepfiles("loading ctx log file (local)") -- todo: m!systems + report_prepfiles("loading ctx log file (local)") -- todo: m!system else - report_prepfiles("loading ctx log file (specified)") -- todo: m!systems + report_prepfiles("loading ctx log file (specified)") -- todo: m!system end --~ end for e in xml.collected(x,"ctx:prepfile") do diff --git a/tex/context/base/lang-txt.lua b/tex/context/base/lang-txt.lua index 3ba2d478c..4640ca189 100644 --- a/tex/context/base/lang-txt.lua +++ b/tex/context/base/lang-txt.lua @@ -459,13 +459,13 @@ data.labels={ pl="", pt="", ro="", - ru="наspaceстраницеspace", + ru="на странице ", sk="", sl="na strani ", sv="på sida ", tk="", tr="", - ua="наspaceсторінціspace", + ua="на сторінці ", vi="", }, }, @@ -784,13 +784,13 @@ data.labels={ pl="Ilustracja ", pt="Figura ", ro="Figura ", - ru="Рисунокspace", + ru="Рисунок ", sk="Obrázok ", sl="Slika ", sv="Figur ", tk="Surat", tr="Şekil ", - ua="Малюнокspace", + ua="Малюнок ", vi="Hình ", }, }, @@ -857,13 +857,13 @@ data.labels={ pl="Grafika ", pt="Gráfico ", ro="Graficul ", - ru="Графикspace", + ru="График ", sk="Graf ", sl="Slika ", sv="Grafik ", tk="Grafik", tr="Grafik", - ua="Графикspace", + ua="График ", vi="Đồ thị", }, }, @@ -892,13 +892,13 @@ data.labels={ pl="", pt="", ro="", - ru="см.spaceвыше", + ru="см. выше", sk="", sl="glej zgoraj", sv="se ovan", tk="", tr="", - ua="якspaceпоказаноspaceвище", + ua="як показано вище", vi="", }, }, @@ -926,13 +926,13 @@ data.labels={ pl="", pt="", ro="", - ru="см.spaceниже", + ru="см. ниже", sk="", sl="glej spodaj", sv="se nedan", tk="", tr="", - ua="якspaceпоказаноspaceнижче", + ua="як показано нижче", vi="", }, }, @@ -963,13 +963,13 @@ data.labels={ pl="Intermezzo ", pt="Intermédio ", ro="Intermezzo ", - ru="Вставкаspace", + ru="Вставка ", sk="Intermezzo ", sl="Intermezzo ", sv="Intermezzo ", tk="Arakesme", tr="", - ua="Вставкаspace", + ua="Вставка ", vi="intermezzo", }, }, @@ -1217,13 +1217,13 @@ data.labels={ pl="wiersz ", pt="linha ", ro="linia ", - ru="строкаspace", + ru="строка ", sk="riadok ", sl="vrstica ", sv="rad ", tk="setir", tr="satır ", - ua="рядокspace", + ua="рядок ", vi="dòng ", }, }, @@ -1254,13 +1254,13 @@ data.labels={ pl="wiersze ", pt="linhas ", ro="liniile ", - ru="строкиspace", + ru="строки ", sk="riadky ", sl="vrstice ", sv="rader ", tk="setirler", tr="satırlar ", - ua="рядкиspace", + ua="рядки ", vi="dòng ", }, }, @@ -1613,13 +1613,13 @@ data.labels={ pl="", pt="", ro="", - ru="страницаspace", + ru="страница ", sk="", sl="stran ", sv="Sida ", tk="", tr="", - ua="сторінкаspace", + ua="сторінка ", vi="", }, }, @@ -1650,13 +1650,13 @@ data.labels={ pl="Ustęp ", pt="Parte ", ro="Partea ", - ru="Частьspace", + ru="Часть ", sk="Časť ", sl="Del ", sv="Del ", tk="Bölüm", tr="Cilt ", - ua="Частинаspace", + ua="Частина ", vi="Phần ", }, }, @@ -1760,13 +1760,13 @@ data.labels={ pl="", pt="", ro="", - ru="см.space", + ru="см. ", sk="", sl="glej ", sv="se ", tk="", tr="", - ua="див.space", + ua="див. ", vi="", }, }, @@ -2017,13 +2017,13 @@ data.labels={ pl="Tabela ", pt="Tabela ", ro="Tabelul ", - ru="Таблицаspace", + ru="Таблица ", sk="Tabuľka ", sl="Tabela ", sv="Tabell ", tk="Tablisa", tr="Tablo ", - ua="Таблицяspace", + ua="Таблиця ", vi="Bảng ", }, }, @@ -2167,13 +2167,13 @@ data.labels={ pl="Skrócenie", pt="Abreviaturas", ro="Abrevieri", - ru="Списокspaceсокращений", + ru="Список сокращений", sk="Skratky", sl="Kratice", sv="Förkortningar", tk="Gysgaltmalar", tr="Kısaltmalar", - ua="Перелікspaceскорочень", + ua="Перелік скорочень", vi="Chữ viết tắt", }, }, @@ -2241,13 +2241,13 @@ data.labels={ pl="Ilustracje", pt="Figuras", ro="Figuri", - ru="Списокspaceиллюстраций", + ru="Список иллюстраций", sk="Obrázkov", sl="Slike", sv="Figurer", tk="Suratlar", tr="Şekiller", - ua="Перелікspaceілюстрацій", + ua="Перелік ілюстрацій", vi="Danh sách hình vẽ", }, }, @@ -2278,13 +2278,13 @@ data.labels={ pl="Grafika", pt="Gráficos", ro="Grafice", - ru="Списокspaceграфиков", + ru="Список графиков", sk="Graf", sl="Slike", sv="Grafik", tk="Grafikler", tr="Grafikler", - ua="Перелікspaceграфіков", + ua="Перелік графіков", vi="Đồ thị", }, }, @@ -2315,7 +2315,7 @@ data.labels={ pl="Indeks", pt="Índice", ro="Index", - ru="Алфавитныйspaceуказатель", + ru="Алфавитный указатель", sk="Zoznam", sl="Stvarno kazalo", sv="Sakregister", @@ -2352,13 +2352,13 @@ data.labels={ pl="Intermezza", pt="Intermédios", ro="Intermzzo", - ru="Списокspaceвставок", + ru="Список вставок", sk="Intermezzá", sl="Intermezzi", sv="Intermezzon", tk="Arakesmeler", tr="", - ua="Перелікspaceвставок", + ua="Перелік вставок", vi="Intermezzos", }, }, @@ -2459,13 +2459,13 @@ data.labels={ pl="Tabele", pt="Tabelas", ro="Tabele", - ru="Списокspaceтаблиц", + ru="Список таблиц", sk="Tabuliek", sl="Tabele", sv="Tabeller", tk="Tablisalar", tr="Tablolar", - ua="Перелікspaceтаблиць", + ua="Перелік таблиць", vi="Danh sách bảng", }, }, @@ -2496,13 +2496,13 @@ data.labels={ pl="Jednostki", pt="Unidades", ro="Unități", - ru="Единицыspaceизмерения", + ru="Единицы измерения", sk="Jednotky", sl="Enote", sv="Enheter", tk="Birlikler", tr="Birimler", - ua="Одиниціspaceвиміру", + ua="Одиниці виміру", vi="Đơn vị", }, }, diff --git a/tex/context/base/lpdf-wid.lua b/tex/context/base/lpdf-wid.lua index 48beacfd8..d986e96f6 100644 --- a/tex/context/base/lpdf-wid.lua +++ b/tex/context/base/lpdf-wid.lua @@ -228,9 +228,14 @@ function codeinjections.embedfile(specification) return nil elseif r then return r - elseif not lfs.isfile(filename) then - filestreams[filename] = false - return nil + else + local foundname = resolvers.findbinfile(filename) or "" + if foundname == "" or not lfs.isfile(foundname) then + filestreams[filename] = false + return nil + else + specification.foundname = foundname + end end end local basename = file.basename(filename) @@ -241,7 +246,8 @@ function codeinjections.embedfile(specification) f = pdfimmediateobject("stream",data,a()) specification.data = true -- signal that still data but already flushed else - f = pdfimmediateobject("streamfile",filename,a()) + local foundname = specification.foundname or filename + f = pdfimmediateobject("streamfile",foundname,a()) end local d = pdfdictionary { Type = pdfconstant("Filespec"), @@ -268,9 +274,12 @@ function nodeinjections.attachfile(specification) filename = registered specification.file = registered end - if not lfs.isfile(filename) then + local foundname = resolvers.findbinfile(filename) or "" + if foundname == "" or not lfs.isfile(foundname) then report_attachment("invalid file specification: registered '%s', filename '%s'",registered,filename) - return + return nil + else + specification.foundname = foundname end hash = filename end diff --git a/tex/context/base/m-morse.mkiv b/tex/context/base/m-morse.mkiv deleted file mode 100644 index c5e927426..000000000 --- a/tex/context/base/m-morse.mkiv +++ /dev/null @@ -1,264 +0,0 @@ -%D \module -%D [ file=m-morse, -%D version=2010.12.10, -%D title=\CONTEXT\ Extra Modules, -%D subtitle=Morse, -%D author=Hans Hagen, -%D date=\currentdate, -%D copyright=PRAGMA] -%C -%C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. - -% todo: act upon the node list -% make it a buffer operation -% nice in cld manual - -\startluacode - -moduledata.morse = moduledata.morse or { } -local morse = moduledata.morse - -local utfcharacters, gsub = string.utfcharacters, string.gsub -local ucchars, shchars = characters.ucchars, characters.shchars - -local codes = { - - ["A"] = "·—", - ["B"] = "—···", - ["C"] = "—·—·", - ["D"] = "—··", - ["E"] = "·", - ["F"] = "··—·", - ["G"] = "——·", - ["H"] = "····", - ["I"] = "··", - ["J"] = "·———", - ["K"] = "—·—", - ["L"] = "·—··", - ["M"] = "——", - ["N"] = "—·", - ["O"] = "———", - ["P"] = "·——·", - ["Q"] = "——·—", - ["R"] = "·—·", - ["S"] = "···", - ["T"] = "—", - ["U"] = "··—", - ["V"] = "···—", - ["W"] = "·——", - ["X"] = "—··—", - ["Y"] = "—·——", - ["Z"] = "——··", - - ["0"] = "—————", - ["1"] = "·————", - ["2"] = "··———", - ["3"] = "···——", - ["4"] = "····—", - ["5"] = "·····", - ["6"] = "—····", - ["7"] = "——···", - ["8"] = "———··", - ["9"] = "————·", - - ["."] = "·—·—·—", - [","] = "——··——", - [":"] = "———···", - [";"] = "—·—·—", - - ["?"] = "··——··", - ["!"] = "—·—·——", - - ["-"] = "—····—", - ["/"] = "—··—· ", - - ["("] = "—·——·", - [")"] = "—·——·—", - - ["="] = "—···—", - ["@"] = "·——·—·", - - ["'"] = "·————·", - ['"'] = "·—··—·", - - ["À"] = "·——·—", - ["Å"] = "·——·—", - ["Ä"] = "·—·—", - ["Æ"] = "·—·—", - ["Ç"] = "—·—··", - ["É"] = "··—··", - ["È"] = "·—··—", - ["Ñ"] = "——·——", - ["Ö"] = "———·", - ["Ø"] = "———·", - ["Ü"] = "··——", - ["ß"] = "··· ···", - -} - -morse.codes = codes - -setmetatable(codes, { __index = function(t,k) - if k then - local u = ucchars[k] - local v = rawget(t,u) or rawget(t,shchars[u]) or false - t[k] = v - return v - else - return false - end -end }) - -local MorseBetweenWords = context.MorseBetweenWords -local MorseBetweenCharacters = context.MorseBetweenCharacters -local MorseLong = context.MorseLong -local MorseShort = context.MorseShort -local MorseSpace = context.MorseSpace -local MorseUnknown = context.MorseUnknown - -local function toverbose(str) - str = gsub(str,"%s*+%s*","+") - str = gsub(str,"%s+"," ") - local done = false - for m in utfcharacters(str) do - if done then - MorseBetweenCharacters() - end - if m == "·" or m == "." then - MorseShort() - done = true - elseif m == "—" or m == "-" then - MorseLong() - done = true - elseif m == " " then - if done then - MorseBetweenCharacters() - end - done = false - elseif m == "+" then - MorseBetweenWords() - done = false - else - MorseUnknown(m) - end - end -end - -local function toregular(str) - local inmorse = false - for s in utfcharacters(str) do - local m = codes[s] - if m then - if inmorse then - MorseBetweenWords() - else - inmorse = true - end - local done = false - for m in utfcharacters(m) do - if done then - MorseBetweenCharacters() - else - done = true - end - if m == "·" then - MorseShort() - elseif m == "—" then - MorseLong() - elseif m == " " then - MorseBetweenCharacters() - end - end - inmorse = true - elseif s == "\n" or s == " " then - MorseSpace() - inmorse = false - else - if inmorse then - MorseBetweenWords() - else - inmorse = true - end - MorseUnknown(s) - end - end -end - -local function tomorse(str,verbose) - if verbose then - toverbose(str) - else - toregular(str) - end -end - -morse.tomorse = tomorse - -function morse.filetomorse(name,verbose) - tomorse(resolvers.loadtexfile(name),verbose) -end - -function morse.showtable() - context.starttabulate { "|l|l|" } -- { "|l|l|l|" } - for k, v in table.sortedpairs(codes) do - context.NC() context(k) - -- context.NC() context(v) - context.NC() tomorse(v,true) - context.NC() context.NR() - end - context.stoptabulate() -end - -\stopluacode - -\unprotect - -% todo: \setupmorse, but probably it's not worth the trouble. - -\def\MorseWidth {0.4em} -\def\MorseHeight {0.2em} -%def\MorseShort {\dontleavehmode\blackrule[\c!height=\MorseHeight,\c!width=\dimexpr\MorseWidth]} -%def\MorseLong {\dontleavehmode\blackrule[\c!height=\MorseHeight,\c!width=3\dimexpr\MorseWidth]} -\def\MorseShort {\dontleavehmode\vrule\!!width \dimexpr\MorseWidth\!!height\MorseHeight\!!depth\zeropoint\relax} -\def\MorseLong {\dontleavehmode\vrule\!!width3\dimexpr\MorseWidth\!!height\MorseHeight\!!depth\zeropoint\relax} -\def\MorseBetweenCharacters {\kern\MorseWidth} -\def\MorseBetweenWords {\hskip3\dimexpr\MorseWidth\relax} -\def\MorseSpace {\hskip7\dimexpr\MorseWidth\relax} -\def\MorseUnknown #1{[\detokenize{#1}]} - -\def\MorseCode #1{\ctxlua{moduledata.morse.tomorse(\!!bs#1\!!es,true)}} -\def\MorseString #1{\ctxlua{moduledata.morse.tomorse(\!!bs#1\!!es)}} -\def\MorseFile #1{\ctxlua{moduledata.morse.filetomorse("#1")}} -\def\MorseTable {\ctxlua{moduledata.morse.showtable()}} - -\let\Morse \MorseString - -\protect - -\doifnotmode{demo}{\endinput} - -\starttext - -\MorseTable - -\startlines -\MorseCode{—·—· ——— —· — · —··— —+—— —·— ·· ···—} -\MorseCode{—·—· ——— —· — · —··— — + —— —·— ·· ···—} -\Morse{ÀÁÂÃÄÅàáâãäå} -\Morse{ÆÇæç} -\Morse{ÈÉÊËèéêë} -\Morse{ÌÍÎÏìíîï} -\Morse{Ññ} -\Morse{ÒÓÔÕÖòóôõö} -\Morse{Øø} -\Morse{ÙÚÛÜùúû} -\Morse{Ýýÿ} -\Morse{ß} -\Morse{Ţţ} -\stoplines - -\Morse{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z} - -\stoptext diff --git a/tex/context/base/m-morse.mkvi b/tex/context/base/m-morse.mkvi new file mode 100644 index 000000000..d106acfde --- /dev/null +++ b/tex/context/base/m-morse.mkvi @@ -0,0 +1,264 @@ +%D \module +%D [ file=m-morse, +%D version=2010.12.10, +%D title=\CONTEXT\ Extra Modules, +%D subtitle=Morse, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright=PRAGMA] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +% todo: act upon the node list +% make it a buffer operation +% nice in cld manual + +\startluacode + +moduledata.morse = moduledata.morse or { } +local morse = moduledata.morse + +local utfcharacters, gsub = string.utfcharacters, string.gsub +local ucchars, shchars = characters.ucchars, characters.shchars + +local codes = { + + ["A"] = "·—", + ["B"] = "—···", + ["C"] = "—·—·", + ["D"] = "—··", + ["E"] = "·", + ["F"] = "··—·", + ["G"] = "——·", + ["H"] = "····", + ["I"] = "··", + ["J"] = "·———", + ["K"] = "—·—", + ["L"] = "·—··", + ["M"] = "——", + ["N"] = "—·", + ["O"] = "———", + ["P"] = "·——·", + ["Q"] = "——·—", + ["R"] = "·—·", + ["S"] = "···", + ["T"] = "—", + ["U"] = "··—", + ["V"] = "···—", + ["W"] = "·——", + ["X"] = "—··—", + ["Y"] = "—·——", + ["Z"] = "——··", + + ["0"] = "—————", + ["1"] = "·————", + ["2"] = "··———", + ["3"] = "···——", + ["4"] = "····—", + ["5"] = "·····", + ["6"] = "—····", + ["7"] = "——···", + ["8"] = "———··", + ["9"] = "————·", + + ["."] = "·—·—·—", + [","] = "——··——", + [":"] = "———···", + [";"] = "—·—·—", + + ["?"] = "··——··", + ["!"] = "—·—·——", + + ["-"] = "—····—", + ["/"] = "—··—· ", + + ["("] = "—·——·", + [")"] = "—·——·—", + + ["="] = "—···—", + ["@"] = "·——·—·", + + ["'"] = "·————·", + ['"'] = "·—··—·", + + ["À"] = "·——·—", + ["Å"] = "·——·—", + ["Ä"] = "·—·—", + ["Æ"] = "·—·—", + ["Ç"] = "—·—··", + ["É"] = "··—··", + ["È"] = "·—··—", + ["Ñ"] = "——·——", + ["Ö"] = "———·", + ["Ø"] = "———·", + ["Ü"] = "··——", + ["ß"] = "··· ···", + +} + +morse.codes = codes + +setmetatable(codes, { __index = function(t,k) + if k then + local u = ucchars[k] + local v = rawget(t,u) or rawget(t,shchars[u]) or false + t[k] = v + return v + else + return false + end +end }) + +local MorseBetweenWords = context.MorseBetweenWords +local MorseBetweenCharacters = context.MorseBetweenCharacters +local MorseLong = context.MorseLong +local MorseShort = context.MorseShort +local MorseSpace = context.MorseSpace +local MorseUnknown = context.MorseUnknown + +local function toverbose(str) + str = gsub(str,"%s*+%s*","+") + str = gsub(str,"%s+"," ") + local done = false + for m in utfcharacters(str) do + if done then + MorseBetweenCharacters() + end + if m == "·" or m == "." then + MorseShort() + done = true + elseif m == "—" or m == "-" then + MorseLong() + done = true + elseif m == " " then + if done then + MorseBetweenCharacters() + end + done = false + elseif m == "+" then + MorseBetweenWords() + done = false + else + MorseUnknown(m) + end + end +end + +local function toregular(str) + local inmorse = false + for s in utfcharacters(str) do + local m = codes[s] + if m then + if inmorse then + MorseBetweenWords() + else + inmorse = true + end + local done = false + for m in utfcharacters(m) do + if done then + MorseBetweenCharacters() + else + done = true + end + if m == "·" then + MorseShort() + elseif m == "—" then + MorseLong() + elseif m == " " then + MorseBetweenCharacters() + end + end + inmorse = true + elseif s == "\n" or s == " " then + MorseSpace() + inmorse = false + else + if inmorse then + MorseBetweenWords() + else + inmorse = true + end + MorseUnknown(s) + end + end +end + +local function tomorse(str,verbose) + if verbose then + toverbose(str) + else + toregular(str) + end +end + +morse.tomorse = tomorse + +function morse.filetomorse(name,verbose) + tomorse(resolvers.loadtexfile(name),verbose) +end + +function morse.showtable() + context.starttabulate { "|l|l|" } -- { "|l|l|l|" } + for k, v in table.sortedpairs(codes) do + context.NC() context(k) + -- context.NC() context(v) + context.NC() tomorse(v,true) + context.NC() context.NR() + end + context.stoptabulate() +end + +\stopluacode + +\unprotect + +% todo: \setupmorse, but probably it's not worth the trouble. + +\def\MorseWidth {0.4em} +\def\MorseHeight {0.2em} +%def\MorseShort {\dontleavehmode\blackrule[\c!height=\MorseHeight,\c!width=\dimexpr\MorseWidth]} +%def\MorseLong {\dontleavehmode\blackrule[\c!height=\MorseHeight,\c!width=3\dimexpr\MorseWidth]} +\def\MorseShort {\dontleavehmode\vrule\!!width \dimexpr\MorseWidth\!!height\MorseHeight\!!depth\zeropoint\relax} +\def\MorseLong {\dontleavehmode\vrule\!!width3\dimexpr\MorseWidth\!!height\MorseHeight\!!depth\zeropoint\relax} +\def\MorseBetweenCharacters {\kern\MorseWidth} +\def\MorseBetweenWords {\hskip3\dimexpr\MorseWidth\relax} +\def\MorseSpace {\hskip7\dimexpr\MorseWidth\relax} +\def\MorseUnknown #text{[\detokenize{#text}]} + +\def\MorseCode #text{\ctxlua{moduledata.morse.tomorse(\!!bs#text\!!es,true)}} +\def\MorseString #text{\ctxlua{moduledata.morse.tomorse(\!!bs#text\!!es)}} +\def\MorseFile #text{\ctxlua{moduledata.morse.filetomorse("#text")}} +\def\MorseTable {\ctxlua{moduledata.morse.showtable()}} + +\let\Morse \MorseString + +\protect + +\doifnotmode{demo}{\endinput} + +\starttext + +\MorseTable + +\startlines +\MorseCode{—·—· ——— —· — · —··— —+—— —·— ·· ···—} +\MorseCode{—·—· ——— —· — · —··— — + —— —·— ·· ···—} +\Morse{ÀÁÂÃÄÅàáâãäå} +\Morse{ÆÇæç} +\Morse{ÈÉÊËèéêë} +\Morse{ÌÍÎÏìíîï} +\Morse{Ññ} +\Morse{ÒÓÔÕÖòóôõö} +\Morse{Øø} +\Morse{ÙÚÛÜùúû} +\Morse{Ýýÿ} +\Morse{ß} +\Morse{Ţţ} +\stoplines + +\Morse{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z} + +\stoptext diff --git a/tex/context/base/m-obsolete.mkii b/tex/context/base/m-obsolete.mkii new file mode 100644 index 000000000..a97002cf6 --- /dev/null +++ b/tex/context/base/m-obsolete.mkii @@ -0,0 +1,5 @@ +\unprotect + +\writestatus\m!systems{skipping obsolete module} + +\protect \endinput diff --git a/tex/context/base/m-obsolete.mkiv b/tex/context/base/m-obsolete.mkiv new file mode 100644 index 000000000..2d4518181 --- /dev/null +++ b/tex/context/base/m-obsolete.mkiv @@ -0,0 +1,5 @@ +\unprotect + +\writestatus\m!system{skipping obsolete module} + +\protect \endinput diff --git a/tex/context/base/m-obsolete.tex b/tex/context/base/m-obsolete.tex deleted file mode 100644 index 2d4518181..000000000 --- a/tex/context/base/m-obsolete.tex +++ /dev/null @@ -1,5 +0,0 @@ -\unprotect - -\writestatus\m!system{skipping obsolete module} - -\protect \endinput diff --git a/tex/context/base/mult-aux.lua b/tex/context/base/mult-aux.lua index e16eac670..cbecd2df1 100644 --- a/tex/context/base/mult-aux.lua +++ b/tex/context/base/mult-aux.lua @@ -96,6 +96,18 @@ function namespaces.define(namespace,settings) report_namespaces("installing setup command for '%s' (multiple)",name) end end + local set = ns.set + if set == v_yes then + context.installparametersethandler(self,name) + if trace_namespaces then + report_namespaces("installing set/let/reset command for '%s' (single)",name) + end + elseif set == v_list then + context.installparametersethandler(self,name) + if trace_namespaces then + report_namespaces("installing set/let/reset command for '%s' (multiple)",name) + end + end context.protect() end diff --git a/tex/context/base/mult-aux.mkiv b/tex/context/base/mult-aux.mkiv index 4087180c0..1dfe6fb8e 100644 --- a/tex/context/base/mult-aux.mkiv +++ b/tex/context/base/mult-aux.mkiv @@ -216,6 +216,7 @@ % style=yes, % command=yes, % setup=list, +% set=yes, % parent=xy] % % \unprotect diff --git a/tex/context/base/s-fnt-25.mkiv b/tex/context/base/s-fnt-25.mkiv index 36d28bfeb..1f03bab4d 100644 --- a/tex/context/base/s-fnt-25.mkiv +++ b/tex/context/base/s-fnt-25.mkiv @@ -85,7 +85,7 @@ function document.showmathfont(id,slot) local tfmdata = fontdata[id] local characters = tfmdata.characters local sorted = (slot and { slot }) or table.sortedkeys(characters) - local virtual, names = tfmdata.properties.type == "virtual", { } + local virtual, names = tfmdata.properties.virtualized, { } if virtual then for k, v in ipairs(tfmdata.fonts) do local id = v.properties.id diff --git a/tex/context/base/s-inf-01.mkvi b/tex/context/base/s-inf-01.mkvi index 6a031a2ca..4792e739a 100644 --- a/tex/context/base/s-inf-01.mkvi +++ b/tex/context/base/s-inf-01.mkvi @@ -198,7 +198,7 @@ \stoptexdefinition \starttexdefinition StopUp - \par\nointerlineskip\blackrule[height=1pt,width=4em,depth=0pt,color=darkgray] + \par\nointerlineskip\blackrule[height=1pt,width=5em,depth=0pt,color=darkgray] \par\tttf\strut\UpName\par \egroup \ifnum\UpCounter=17 diff --git a/tex/context/base/scrn-fld.mkvi b/tex/context/base/scrn-fld.mkvi index ae2e5541f..764bf2f16 100644 --- a/tex/context/base/scrn-fld.mkvi +++ b/tex/context/base/scrn-fld.mkvi @@ -432,31 +432,38 @@ \setupfieldlabelframed [#tag][\s!parent=\??wl]% \setupfieldcontentframed[#tag][\s!parent=\??wc,#totalsettings]% \else\ifsecondargument - \definefieldcategory[#tag][\s!parent=\??wc#tag,#variant] + \definefieldcategory[#tag][\s!parent=\??wc#tag,#variant] \setupfieldtotalframed [#tag][\s!parent=\??wt]% \setupfieldlabelframed [#tag][\s!parent=\??wl]% \setupfieldcontentframed[#tag][\s!parent=\??wc,#variant]% \fi\fi\fi\fi} -\def\scrn_field_setup_fields[#tag][#totalsettings][#labelsettings][#fieldsettings] +\def\scrn_field_setup_fields[#variant][#totalsettings][#labelsettings][#fieldsettings] {\iffourthargument - \definefieldcategory[#tag][\s!parent=\??wc#tag,#fieldsettings] - \setupfieldtotalframed [#tag][\s!parent=\??wt,#totalsettings]% - \setupfieldlabelframed [#tag][\s!parent=\??wl,#labelsettings]% - \setupfieldcontentframed[#tag][\s!parent=\??wc,#fieldsettings]% + \setupfieldtotalframed [\c!alternative={#variant},#totalsettings]% + \setupfieldlabelframed [#labelsettings]% + \setupfieldcontentframed[#fieldsettings]% \else\ifthirdargument - \definefieldcategory[#tag][\s!parent=\??wc#tag,#fieldsettings] - \setupfieldtotalframed [#tag][\s!parent=\??wt,#totalsettings]% - \setupfieldlabelframed [#tag][\s!parent=\??wl]% - \setupfieldcontentframed[#tag][\s!parent=\??wc,#labelsettings]% + \setupfieldtotalframed [#variant]% + \setupfieldlabelframed [#totalsettings]% + \setupfieldcontentframed[#labelsettings]% \else\ifsecondargument - \definefieldcategory[#tag][\s!parent=\??wc#tag,#fieldsettings] - \setupfieldtotalframed [#tag][\s!parent=\??wt]% - \setupfieldlabelframed [#tag][\s!parent=\??wl]% - \setupfieldcontentframed[#tag][\s!parent=\??wc,#totalsettings]% + \setupfieldtotalframed [#variant]% + \setupfieldcontentframed[#totalsettings]% + \else + \setupfieldtotalframed [#variant]% \fi\fi\fi} -\let\resetfields\relax % no longer supported +% just to get the chain right for no category: + +\definefieldcategory [][\s!parent=\??wc] +\setupfieldtotalframed [][\s!parent=\??wt] +\setupfieldlabelframed [][\s!parent=\??wl] +\setupfieldcontentframed[][\s!parent=\??wc] + +% no longer supported: + +\let\resetfields\relax \def\scrn_field_load_scripts{\useJSscripts[fld]\globallet\scrn_field_load_scripts\relax} diff --git a/tex/context/base/scrn-pag.mkvi b/tex/context/base/scrn-pag.mkvi index a5b4d0dfd..aa1bd6999 100644 --- a/tex/context/base/scrn-pag.mkvi +++ b/tex/context/base/scrn-pag.mkvi @@ -110,7 +110,7 @@ }}% \endgroup} -\let\scrn_canvas_synchronize\scrn_canvas_synchronize_complex +\let\scrn_canvas_synchronize\scrn_canvas_synchronize_simple \appendtoks \ifproductionrun @@ -163,7 +163,7 @@ \edef\currentinteractionscreendelay{\interactionscreenparameter\c!delay}% \ctxcommand{setpagetransition{ n = "\scrn_transitions_list", - delay = "\ifx\currentinteractionscreendelay\v!none 0\else\currentinteractionscreendelay\v!none\fi" + delay = "\ifx\currentinteractionscreendelay\v!none 0\else\currentinteractionscreendelay\fi" }}% \endgroup} diff --git a/tex/context/base/spac-ver.lua b/tex/context/base/spac-ver.lua index 5d016eb7b..842dfe64a 100644 --- a/tex/context/base/spac-ver.lua +++ b/tex/context/base/spac-ver.lua @@ -257,11 +257,11 @@ local function ceiled(n) end end -local function lower(n) +local function floored(n) if n < 0 or n < 0.01 then return 0 else - return floored(n) + return floor(n) end end diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index f9dcd8e01..277169501 100644 Binary files a/tex/context/base/status-files.pdf and b/tex/context/base/status-files.pdf differ diff --git a/tex/context/base/strc-not.mkiv b/tex/context/base/strc-not.mkiv index 8d3ef7773..29fd3995d 100644 --- a/tex/context/base/strc-not.mkiv +++ b/tex/context/base/strc-not.mkiv @@ -35,11 +35,11 @@ % eraseinsertionbackup % restoreinsertionbackup -\def\savenotedata {\writestatus{todo}{save note data}} -\def\restorenotedata {\writestatus{todo}{restore note data}} -\def\savenotecontent {\writestatus{todo}{save note content}} -\def\restorenotecontent{\writestatus{todo}{restore note content}} -\def\erasenotebackup {\writestatus{todo}{erase note backup}} +\def\savenotedata {} % \writestatus{todo}{save note data}} +\def\restorenotedata {} % \writestatus{todo}{restore note data}} +\def\savenotecontent {} % \writestatus{todo}{save note content}} +\def\restorenotecontent{} % \writestatus{todo}{restore note content}} +\def\erasenotebackup {} % \writestatus{todo}{erase note backup}} % page-set: diff --git a/tex/context/base/type-lua.mkiv b/tex/context/base/type-lua.mkiv index 4abae2295..a6799671e 100644 --- a/tex/context/base/type-lua.mkiv +++ b/tex/context/base/type-lua.mkiv @@ -11,6 +11,8 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. +\unprotect + \starttypescriptcollection [luatex] \starttypescript [specserif] [all] [name] @@ -83,4 +85,4 @@ \stoptypescriptcollection -\endinput +\protect \endinput diff --git a/tex/context/base/type-otf.mkiv b/tex/context/base/type-otf.mkiv index 0fcac7dbc..224e6d980 100644 --- a/tex/context/base/type-otf.mkiv +++ b/tex/context/base/type-otf.mkiv @@ -1298,7 +1298,7 @@ \starttypescriptcollection[symbols] \starttypescript - \definefontsynonym [ZapfDingbats] [uzdr] + \definefontsynonym [ZapfDingbats] [\s!file:uzdr][goodies=dingbats] \definefontsynonym [RalfSmithFormalScript] [rsfs10] \definefontsynonym [MartinVogel] [\s!file:marvosym.ttf] \stoptypescript diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index c909d6d94..b1c147c96 100644 --- a/tex/generic/context/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 03/30/11 11:21:09 +-- merge date : 04/03/11 22:32:45 do -- begin closure to overcome local limits and interference -- cgit v1.2.3