From 6763e3954714b12c9e3cc95b557ec0cf48183fdd Mon Sep 17 00:00:00 2001 From: Marius Date: Fri, 11 Feb 2011 14:20:11 +0200 Subject: beta 2011.02.11 12:50 --- 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/meta-tex.mkiv | 89 ++++++++++++++++++++++++---- tex/context/base/sort-ini.lua | 7 +-- tex/context/base/sort-lan.lua | 13 ++-- tex/context/base/status-files.pdf | Bin 23205 -> 23209 bytes tex/generic/context/luatex-fonts-merged.lua | 2 +- 9 files changed, 90 insertions(+), 29 deletions(-) diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index 2c1c51610..73c197eb3 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.02.11 12:23} +\newcontextversion{2011.02.11 12:50} %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 39ef95f46..06ab14dd7 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.02.11 12:23} +\newcontextversion{2011.02.11 12:50} %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 ddac76db0..6e814f1a2 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.02.11 12:23} +\edef\contextversion{2011.02.11 12:50} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 12c5d718a..925f05c3a 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.02.11 12:23} +\edef\contextversion{2011.02.11 12:50} %D For those who want to use this: diff --git a/tex/context/base/meta-tex.mkiv b/tex/context/base/meta-tex.mkiv index bc2f354b8..a6c785094 100644 --- a/tex/context/base/meta-tex.mkiv +++ b/tex/context/base/meta-tex.mkiv @@ -64,16 +64,16 @@ % \stopMPcode % a tex one: -% -% \unexpanded\def\definetextext [#1]#2{\setvalue{@@st@@#1}{#2}} -% \def\sometxt #1#{\dosometxt{#1}} -% \def\dosometxt #1#2{textext.drt("\dodosometxt#1{#2}")} -% -% \unexpanded\def\dodosometxt {\doifnextoptionalelse\dododosometxt\relax} -% \def\dododosometxt [#1]{\dodododosometxt{#1}} -% \def\dodododosometxt #1{\doifnextoptionalelse{\dododododosometxt{#1}}{\getsometxt{#1}}} -% \def\dododododosometxt#1[#2]{\switchtobodyfont[#2]\getsometxt{#1}} -% \def\getsometxt #1#2{\csname @@st@@#1\endcsname{#2}} + +\unexpanded\def\definetextext [#1]#2{\setvalue{@@st@@#1}{#2}} + \def\sometxt #1#{\dosometxt{#1}} + \def\dosometxt #1#2{textext.drt("\dodosometxt#1{#2}")} + +%unexpanded\def\dodosometxt {\doifnextoptionalelse\dododosometxt\relax} +% \def\dododosometxt [#1]{\dodododosometxt{#1}} +% \def\dodododosometxt #1{\doifnextoptionalelse{\dododododosometxt{#1}}{\getsometxt{#1}}} +% \def\dododododosometxt #1[#2]{\switchtobodyfont[#2]\getsometxt{#1}} +% \def\getsometxt #1#2{\csname @@st@@#1\endcsname{#2}} % % or: @@ -88,10 +88,75 @@ \def\dododosometxtA[#1][#2]#3{\getsometxt{#1}{\switchtobodyfont[#2]#3}} \def\dododosometxtB[#1][#2]#3{\getsometxt{#1}{#3}} \def\dododosometxtC[#1][#2]#3{#3} - \def\getsometxt #1#2{\csname @@st@@#1\endcsname{#2}} + \def\getsometxt #1#2{\csname @@st@@#1\endcsname{#2}} -% a lua one: +% a variant ... if m likes it: +% +% \unexpanded\def\definetextext[#1]% +% {\def\currenttextext{#1}% +% \dosingleempty\dodefinetextext} +% +% \def\dodefinetextext +% {\iffirstargument +% \expandafter\dodefinetextextone +% \else +% \expandafter\dodefinetextextzero +% \fi} +% +% \def\dodefinetextextone {\setvalue{@@st@@one\currenttextext}} +% \def\dodefinetextextzero[#1]{\setvalue{@@st@@zero\currenttextext}} +% +% \def\sometxt#1#% +% {\dosometxt{#1}} +% +% \def\dosometxt#1#2% +% {textext.drt("\dodosometxt#1{#2}")} +% +% \unexpanded\def\dodosometxt +% {\dosingleempty\dododosometxt} +% +% \def\dododosometxt +% {\iffirstargument +% \expandafter\dosometxtsome +% \else +% \expandafter\dosometxtzero +% \fi} +% +% \def\dosometxtsome[#1]% +% {\def\currenttextext{#1}% +% \csname @@st@@% +% \ifcsname @@st@@one#1\endcsname one\else +% \ifcsname @@st@@zero#1\endcsname zero\else +% none\fi\fi +% \endcsname} +% +% \def\dosometxtzero[#1]% +% {} +% +% \def\@@st@@one {\dosingleempty\do@@st@@one} +% \def\do@@st@@one{\csname @@st@@one\currenttextext\endcsname} +% \def\@@st@@zero {\csname @@st@@zero\currenttextext\endcsname} +% \def\@@st@@none {} +% +% \protect +% +% \definetextext[framed][#1]#2{\framed[width=4cm]{\switchtobodyfont[#1]#2}} +% \definetextext[simple]{\framed[width=8cm]} +% +% \starttext +% +% \startMPcode +% draw \sometxt{This is for} rotated 45 ; +% draw \sometxt [framed] [ss,16pt] {Mojca's}; +% draw \sometxt[framed]{eyes only!} rotated -45 ; +% draw \sometxt[simple]{Indeed!} rotated 180 ; +% \stopMPcode +% +% \stoptext + +% a lua one: +% % \unexpanded\def\definetextext[#1]#2{\setvalue{@@st@@#1}{#2}} % % \long\def\sometxt #1#{\dosometxt{#1}} % grab optional [args] diff --git a/tex/context/base/sort-ini.lua b/tex/context/base/sort-ini.lua index 1091bfbfb..f08ba0e26 100644 --- a/tex/context/base/sort-ini.lua +++ b/tex/context/base/sort-ini.lua @@ -423,12 +423,11 @@ local function firstofsplit(entry) else split = split.ch end + local first = split and split[1] or "" if thefirstofsplit then - return thefirstofsplit(entry,split) + return thefirstofsplit(first,data,entry) -- normally the first one is needed else - local entry = split and split[1] or "" - local tag = entries[entry] or "\000" - return entry, tag + return first, entries[first] or "\000" -- tag end end diff --git a/tex/context/base/sort-lan.lua b/tex/context/base/sort-lan.lua index 44b92d2b0..0c3ece223 100644 --- a/tex/context/base/sort-lan.lua +++ b/tex/context/base/sort-lan.lua @@ -860,14 +860,11 @@ definitions["et"] = { --- Korean -local first = languages.firstcharacters.korean - -function firstofsplit(entries,split) - first = first or languages.firstcharacters.korean - local entry = split and split[1] or "" - local entry = utfchar(first(utfbyte(entry))) - local tag = entry - return entry, tag +local firstcharacter = languages.firstcharacters.korean + +function firstofsplit(first) + first = utfchar(firstcharacter(utfbyte(first))) + return first, first -- entry, tag end definitions["kr"] = { diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index d535b32f7..fb5fa6315 100644 Binary files a/tex/context/base/status-files.pdf and b/tex/context/base/status-files.pdf differ diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index 0563456d0..53709dcca 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 : 02/11/11 12:23:06 +-- merge date : 02/11/11 12:50:43 do -- begin closure to overcome local limits and interference -- cgit v1.2.3