diff options
author | Hans Hagen <pragma@wxs.nl> | 2009-11-02 21:31:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2009-11-02 21:31:00 +0100 |
commit | f903426253431aaaf98c55ba9567d67a0193df65 (patch) | |
tree | be9f2f1a24dc802a9d439eefbaf1dbc5697a15fe /tex | |
parent | e13c1d71259b390bbacfdbe45262091754bd71bc (diff) | |
download | context-f903426253431aaaf98c55ba9567d67a0193df65.tar.gz |
beta 2009.11.02 21:31
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/catc-ini.mkiv | 17 | ||||
-rw-r--r-- | tex/context/base/colo-ext.mkiv | 13 | ||||
-rw-r--r-- | tex/context/base/colo-ini.lua | 27 | ||||
-rw-r--r-- | tex/context/base/cont-new.tex | 2 | ||||
-rw-r--r-- | tex/context/base/context.tex | 2 | ||||
-rw-r--r-- | tex/context/base/font-otf.lua | 9 | ||||
-rw-r--r-- | tex/context/base/font-otn.lua | 2 | ||||
-rw-r--r-- | tex/context/base/math-vfu.lua | 61 | ||||
-rw-r--r-- | tex/context/base/meta-ini.mkiv | 4 | ||||
-rw-r--r-- | tex/context/base/strc-des.mkiv | 182 | ||||
-rw-r--r-- | tex/context/base/strc-lst.lua | 5 | ||||
-rw-r--r-- | tex/context/base/strc-not.mkiv | 34 | ||||
-rw-r--r-- | tex/context/base/type-otf.mkiv | 32 | ||||
-rw-r--r-- | tex/context/base/type-otf.tex | 10 | ||||
-rw-r--r-- | tex/generic/context/luatex-fonts-merged.lua | 13 |
15 files changed, 276 insertions, 137 deletions
diff --git a/tex/context/base/catc-ini.mkiv b/tex/context/base/catc-ini.mkiv index 668a55d3b..311f0526e 100644 --- a/tex/context/base/catc-ini.mkiv +++ b/tex/context/base/catc-ini.mkiv @@ -107,7 +107,9 @@ %D The next command can be defined in a cleaner way in the %D Mk IV file but we want to have a fast one with a minimal -%D chance for interference. +%D chance for interference. Do we still need this complex +%D mechanism? Future versions of \MKIV\ might only use +%D active characters for very special cases. \chardef\activehackcode=`\~ @@ -128,7 +130,7 @@ \def\letcatcodecommandc % only first time {\expandafter\gdef\csname CCL:\number\cctcountera:\number\cctcounterb\expandafter\endcsname\expandafter {\expandafter\let\csname CCC:\number\cctcountera:\number\cctcounterb\endcsname}% - \reinstatecatcodecommanda + \reinstatecatcodecommandua % unexpanded \csname CCL:\number\cctcountera:\number\cctcounterb\endcsname} % expandable def @@ -165,8 +167,8 @@ \def\uedcatcodecommandc % only first time {\expandafter\gdef\csname CCU:\number\cctcountera:\number\cctcounterb\expandafter\endcsname \expandafter##\expandafter1\expandafter - {\expandafter\unexpanded\expandafter\def\csname CCC:\number\cctcountera:\number\cctcounterb\endcsname{##1}}% - \reinstatecatcodecommanda + {\expandafter\normalprotected\expandafter\def\csname CCC:\number\cctcountera:\number\cctcounterb\endcsname{##1}}% + \reinstatecatcodecommandua % unexpanded \csname CCU:\number\cctcountera:\number\cctcounterb\endcsname} \def\reinstatecatcodecommand{\afterassignment\reinstatecatcodecommanda\cctcounterb} @@ -178,6 +180,13 @@ \uppercase{\xdef~{\noexpand\catcodecommand{\number\cctcounterb}}}% \egroup} +\def\reinstatecatcodecommandua % can be used when a direct definition has been done + {\bgroup % and the selector has been lost + \uccode\activehackcode\cctcounterb + \catcode\uccode\activehackcode\activecatcode + \uppercase{\normalprotected\xdef~{\noexpand\catcodecommand{\number\cctcounterb}}}% + \egroup} + \chardef\defaultcatcodetable\zerocount \def\catcodecommand#1% diff --git a/tex/context/base/colo-ext.mkiv b/tex/context/base/colo-ext.mkiv index f973af73a..3483c1536 100644 --- a/tex/context/base/colo-ext.mkiv +++ b/tex/context/base/colo-ext.mkiv @@ -86,15 +86,12 @@ % test {\mycolorb OEPS} test % \stoptext -\def\defineintermediatecolor - {\dodoubleempty\dodefineintermediatecolor} - -\def\dodefineintermediatecolor[#1][#2,#3,#4]% -- no checking +\def\defineintermediatecolor[#1]#2[#3,#4,#5]#6[#7]% no checking: \dotripleempty adds {} inside [] {\ifconditional\collectcolorsinlist\collectcolorinlist{#1}\fi - \ctxlua{colors.defineintermediate("#1",0#2, - \thecolorattribute{#3},\thecolorattribute{#4}, - \thetransparencyattribute{#3},\thetransparencyattribute{#4}, - \iffreezecolors true\else false\fi)}% + \ctxlua{colors.defineintermediatecolor("#1",0#3, + \thecolorattribute{#4},\thecolorattribute{#5}, + \thetransparencyattribute{#4},\thetransparencyattribute{#5}, + "#7",false,\iffreezecolors true\else false\fi)}% not global \dodefinecolorcommand\setvalue{#1}} \protect \endinput diff --git a/tex/context/base/colo-ini.lua b/tex/context/base/colo-ini.lua index 8797b85f5..2aeefb6c6 100644 --- a/tex/context/base/colo-ini.lua +++ b/tex/context/base/colo-ini.lua @@ -410,24 +410,31 @@ end -- experiment (a bit of a hack, as we need to get the attribute number) -local min = math.min +local min, abs = math.min, math.abs local function f(one,two,i,fraction) - return min(fraction*(one[i]+two[i]),1) + local a, b = one[i], two[i] + if a > b then + return min(fraction*(a+b),1) + else + return min(1-fraction*(a+b),1) + end end -function colors.defineintermediate(name,fraction,c_one,c_two,a_one,a_two,global,freeze) +function colors.defineintermediatecolor(name,fraction,c_one,c_two,a_one,a_two,specs,global,freeze) local one, two = colors.value(c_one), colors.value(c_two) if one and two then local csone, cstwo = one[1], two[1] if csone == cstwo then + -- actually we can set all 8 values at once here but this is cleaner as we avoid + -- problems with weighted gray conversions and work with original values local ca if csone == 2 then ca = colors.register(name,'gray',f(one,two,2,fraction)) elseif csone == 3 then ca = colors.register(name,'rgb',f(one,two,3,fraction),f(one,two,4,fraction),f(one,two,5,fraction)) elseif csone == 4 then - ca = colors.register(name,'rgb',f(one,two,6,fraction),f(one,two,7,fraction),f(one,two,8,fraction),f(one,two,9,fraction)) + ca = colors.register(name,'cmyk',f(one,two,6,fraction),f(one,two,7,fraction),f(one,two,8,fraction),f(one,two,9,fraction)) else ca = colors.register(name,'gray',f(one,two,2,fraction)) end @@ -435,11 +442,11 @@ function colors.defineintermediate(name,fraction,c_one,c_two,a_one,a_two,global, end end local one, two = transparencies.value(a_one), transparencies.value(a_two) - if one and two then - local tsone, tstwo = one[1], two[1] - if tsone == tstwo then - local ta = transparencies.register(name,tsone,f(one,two,2,fraction)) - definetransparent(name,ta,global) - end + local t = settings_to_hash_strict(specs) + local ta = (t and t.a) or (one and one[1]) or (two and two[1]) + local tt = (t and t.t) or (one and two and f(one,two,2,fraction)) +--~ print(t,table.serialize(t),ta,tt) + if ta and tt then + definetransparent(name,transparencies.register(name,ta,tt),global) end end diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex index b355e5713..5ba393a5c 100644 --- a/tex/context/base/cont-new.tex +++ b/tex/context/base/cont-new.tex @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2009.11.01 21:24} +\newcontextversion{2009.11.02 21:31} %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.tex b/tex/context/base/context.tex index 7339ec263..3fd243b7c 100644 --- a/tex/context/base/context.tex +++ b/tex/context/base/context.tex @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2009.11.01 21:24} +\edef\contextversion{2009.11.02 21:31} %D For those who want to use this: diff --git a/tex/context/base/font-otf.lua b/tex/context/base/font-otf.lua index be1873898..55a77ad7d 100644 --- a/tex/context/base/font-otf.lua +++ b/tex/context/base/font-otf.lua @@ -363,7 +363,14 @@ otf.enhancers["reorganize mark classes"] = function(data,filename) for name, class in next, data.mark_classes do local t = { } for s in gmatch(class,"[^ ]+") do - t[unicodes[s]] = true + local us = unicodes[s] + if type(us) == "table" then + for u=1,#us do + t[us[u]] = true + end + else + t[us] = true + end end reverse[name] = t end diff --git a/tex/context/base/font-otn.lua b/tex/context/base/font-otn.lua index 6c6e7ed24..f32531c9a 100644 --- a/tex/context/base/font-otn.lua +++ b/tex/context/base/font-otn.lua @@ -10,6 +10,8 @@ if not modules then modules = { } end modules ['font-otn'] = { -- much functionality could only be implemented thanks to the husayni font -- of Idris Samawi Hamid to who we dedicate this module. +-- some day when we can jit this, we can use more functions + -- we can use more lpegs when lpeg is extended with function args and so -- resolving to unicode does not gain much diff --git a/tex/context/base/math-vfu.lua b/tex/context/base/math-vfu.lua index 908bcdf53..0300bb07f 100644 --- a/tex/context/base/math-vfu.lua +++ b/tex/context/base/math-vfu.lua @@ -7,7 +7,8 @@ if not modules then modules = { } end modules ['math-vfu'] = { } -- All these math vectors .. thanks to Aditya and Mojca they become --- better and better. +-- better and better. If you have problems with math fonts or miss +-- characters report it to the ConTeXt mailing list. local type, next = type, next @@ -673,6 +674,10 @@ fonts.enc.math["tex-mr"] = { -- [0x000A8] = 0x7F, -- [math]ddot } +fonts.enc.math["tex-mr-missing"] = { + [0x02236] = 0x3A, -- colon +} + fonts.enc.math["tex-mi"] = { [0x1D6E4] = 0x00, -- Gamma [0x1D6E5] = 0x01, -- Delta @@ -1335,7 +1340,7 @@ fonts.vf.math.set_digits (fonts.enc.math, "tex-bf", 0x1D7CE) mathematics.make_font ( "lmroman5-math", { { name = "lmroman5-regular.otf", features = "virtualmath", main = true }, - -- { name = "rm-lmr5.tfm", vector = "tex-mr" } , + { name = "rm-lmr5.tfm", vector = "tex-mr-missing" } , { name = "lmmi5.tfm", vector = "tex-mi", skewchar=0x7F }, { name = "lmsy5.tfm", vector = "tex-sy", skewchar=0x30, parameters = true } , { name = "lmex10.tfm", vector = "tex-ex", extension = true } , @@ -1356,7 +1361,7 @@ mathematics.make_font ( "lmroman5-math", { mathematics.make_font ( "lmroman6-math", { { name = "lmroman6-regular.otf", features = "virtualmath", main = true }, - -- { name = "rm-lmr6.tfm", vector = "tex-mr" } , + { name = "rm-lmr6.tfm", vector = "tex-mr-missing" } , { name = "lmmi6.tfm", vector = "tex-mi", skewchar=0x7F }, { name = "lmsy6.tfm", vector = "tex-sy", skewchar=0x30, parameters = true } , { name = "lmex10.tfm", vector = "tex-ex", extension = true } , @@ -1380,7 +1385,7 @@ mathematics.make_font ( "lmroman6-math", { mathematics.make_font ( "lmroman7-math", { { name = "lmroman7-regular.otf", features = "virtualmath", main = true }, - -- { name = "rm-lmr7.tfm", vector = "tex-mr" } , + { name = "rm-lmr7.tfm", vector = "tex-mr-missing" } , { name = "lmmi7.tfm", vector = "tex-mi", skewchar=0x7F }, { name = "lmsy7.tfm", vector = "tex-sy", skewchar=0x30, parameters = true } , { name = "lmex10.tfm", vector = "tex-ex", extension = true } , @@ -1402,7 +1407,7 @@ mathematics.make_font ( "lmroman7-math", { mathematics.make_font ( "lmroman8-math", { { name = "lmroman8-regular.otf", features = "virtualmath", main = true }, - -- { name = "rm-lmr8.tfm", vector = "tex-mr" } , + { name = "rm-lmr8.tfm", vector = "tex-mr-missing" } , { name = "lmmi8.tfm", vector = "tex-mi", skewchar=0x7F }, { name = "lmsy8.tfm", vector = "tex-sy", skewchar=0x30, parameters = true } , { name = "lmex10.tfm", vector = "tex-ex", extension = true } , @@ -1424,7 +1429,7 @@ mathematics.make_font ( "lmroman8-math", { mathematics.make_font ( "lmroman9-math", { { name = "lmroman9-regular.otf", features = "virtualmath", main = true }, - -- { name = "rm-lmr9.tfm", vector = "tex-mr" } , + { name = "rm-lmr9.tfm", vector = "tex-mr-missing" } , { name = "lmmi9.tfm", vector = "tex-mi", skewchar=0x7F }, { name = "lmsy9.tfm", vector = "tex-sy", skewchar=0x30, parameters = true } , { name = "lmex10.tfm", vector = "tex-ex", extension = true } , @@ -1449,7 +1454,7 @@ mathematics.make_font ( "lmroman9-math", { mathematics.make_font ( "lmroman10-math", { { name = "lmroman10-regular.otf", features = "virtualmath", main = true }, - -- { name = "rm-lmr10.tfm", vector = "tex-mr" } , + { name = "rm-lmr10.tfm", vector = "tex-mr-missing" } , { name = "lmmi10.tfm", vector = "tex-mi", skewchar=0x7F }, { name = "lmsy10.tfm", vector = "tex-sy", skewchar=0x30, parameters = true } , { name = "lmex10.tfm", vector = "tex-ex", extension = true } , @@ -1466,7 +1471,7 @@ mathematics.make_font ( "lmroman10-math", { mathematics.make_font ( "lmroman10-boldmath", { { name = "lmroman10-bold.otf", features = "virtualmath", main = true }, - -- { name = "rm-lmr10.tfm", vector = "tex-mr" } , + { name = "rm-lmr10.tfm", vector = "tex-mr-missing" } , { name = "lmmib10.tfm", vector = "tex-mi", skewchar=0x7F }, { name = "lmbsy10.tfm", vector = "tex-sy", skewchar=0x30, parameters = true } , { name = "lmex10.tfm", vector = "tex-ex", extension = true } , @@ -1488,7 +1493,7 @@ mathematics.make_font ( "lmroman10-boldmath", { mathematics.make_font ( "lmroman12-math", { { name = "lmroman12-regular.otf", features = "virtualmath", main = true }, - -- { name = "rm-lmr12.tfm", vector = "tex-mr" } , + { name = "rm-lmr12.tfm", vector = "tex-mr-missing" } , { name = "lmmi12.tfm", vector = "tex-mi", skewchar=0x7F }, { name = "lmsy10.tfm", vector = "tex-sy", skewchar=0x30, parameters = true } , { name = "lmex10.tfm", vector = "tex-ex", extension = true } , @@ -1507,7 +1512,7 @@ mathematics.make_font ( "lmroman12-math", { mathematics.make_font ( "lmroman17-math", { { name = "lmroman17-regular.otf", features = "virtualmath", main = true }, - -- { name = "rm-lmr12.tfm", vector = "tex-mr" } , + { name = "rm-lmr12.tfm", vector = "tex-mr-missing" } , { name = "lmmi12.tfm", vector = "tex-mi", skewchar=0x7F }, { name = "lmsy10.tfm", vector = "tex-sy", skewchar=0x30, parameters = true } , { name = "lmex10.tfm", vector = "tex-ex", extension = true } , @@ -1544,6 +1549,42 @@ mathematics.make_font ( "tx-math", { { name = "txsyb.tfm", vector = "tex-mb" }, } ) +mathematics.make_font ( "antykwa-math", { + { name = "file:AntykwaTorunska-Regular", features = "virtualmath", main = true }, + { name = "mi-anttri.tfm", vector = "tex-mi", skewchar=0x7F }, + { name = "sy-anttrz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true } , + { name = "ex-anttr.tfm", vector = "tex-ex", extension = true } , + { name = "msam10.tfm", vector = "tex-ma" }, + { name = "msbm10.tfm", vector = "tex-mb" }, +} ) + +mathematics.make_font ( "antykwa-light-math", { + { name = "file:AntykwaTorunskaLight-Regular", features = "virtualmath", main = true }, + { name = "mi-anttli.tfm", vector = "tex-mi", skewchar=0x7F }, + { name = "sy-anttlz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true } , + { name = "ex-anttl.tfm", vector = "tex-ex", extension = true } , + { name = "msam10.tfm", vector = "tex-ma" }, + { name = "msbm10.tfm", vector = "tex-mb" }, +} ) + +mathematics.make_font ( "antykwa-cond-math", { + { name = "file:AntykwaTorunskaCond-Regular", features = "virtualmath", main = true }, + { name = "mi-anttcri.tfm", vector = "tex-mi", skewchar=0x7F }, + { name = "sy-anttcrz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true } , + { name = "ex-anttcr.tfm", vector = "tex-ex", extension = true } , + { name = "msam10.tfm", vector = "tex-ma" }, + { name = "msbm10.tfm", vector = "tex-mb" }, +} ) + +mathematics.make_font ( "antykwa-lightcond-math", { + { name = "file:AntykwaTorunskaCondLight-Regular", features = "virtualmath", main = true }, + { name = "mi-anttcli.tfm", vector = "tex-mi", skewchar=0x7F }, + { name = "sy-anttclz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true } , + { name = "ex-anttcl.tfm", vector = "tex-ex", extension = true } , + { name = "msam10.tfm", vector = "tex-ma" }, + { name = "msbm10.tfm", vector = "tex-mb" }, +} ) + mathematics.make_font ( "iwona-math", { { name = "file:Iwona-Regular", features = "virtualmath", main = true }, { name = "mi-iwonari.tfm", vector = "tex-mi", skewchar=0x7F }, diff --git a/tex/context/base/meta-ini.mkiv b/tex/context/base/meta-ini.mkiv index 9603680c5..53c88e907 100644 --- a/tex/context/base/meta-ini.mkiv +++ b/tex/context/base/meta-ini.mkiv @@ -1058,11 +1058,13 @@ %D \macros %D {startMPcolor} -\long\def\startMPcolor#1\stopMPcolor +\long\unexpanded\def\startMPcolor#1\stopMPcolor {\writestatus \m!metapost % eventually this placeholder will go away {\string\startMPcolor...\stopMPcolor\space is obsolete,\space use \string\defineintermediatecolor\space instead}} +\let\stopMPcolor\relax + %D New: \definelayerpreset % no dx,dy - else nasty non-mp placement diff --git a/tex/context/base/strc-des.mkiv b/tex/context/base/strc-des.mkiv index 779cf38c9..a802adcb0 100644 --- a/tex/context/base/strc-des.mkiv +++ b/tex/context/base/strc-des.mkiv @@ -67,6 +67,17 @@ \def\dodescriptionparentparameter#1#2% {\ifx#1\relax\s!empty\else\dodescriptionparameter#1#2\fi} +\def\descriptionlocationparameter#1{\csname\dodescriptionlocationparameter{\??dd\currentdescription}#1\endcsname} + +\def\dodescriptionlocationparameter#1#2% + {\ifcsname#1#2:\descriptionparameter\c!location\endcsname + #1#2:\descriptionparameter\c!location + \else\ifcsname#1\s!parent\endcsname + \expandafter\dodescriptionlocationparameter\csname#1\s!parent\endcsname#2% + \else + \dodescriptionparameter{\??dd\currentdescription}#2% + \fi\fi} + % description hashes (needed for style/color) \def\descriptionparameterhash #1{\dodescriptionparameterhash{\??dd\currentdescription }#1} @@ -136,17 +147,17 @@ \noindent \llap {\@@makedescriptionpurebox\raggedright - \hbox to \descriptionparameter\c!width{\copy\descriptionheadbox\hss}% - \hskip\descriptionparameter\c!distance}% + \hbox to \descriptionsheadwidth{\copy\descriptionheadbox\hss}% + \hskip\descriptionsheaddistance}% \@@dodescription} \def\@@descriptionrightmargin % whatever this means {\def\\{\crlf}% \noindent \rlap - {\hskip\descriptionparameter\c!distance + {\hskip\descriptionsheaddistance \@@makedescriptionpurebox\raggedright - \hbox to \descriptionparameter\c!width{\copy\descriptionheadbox\hss}}% + \hbox to \descriptionsheadwidth{\copy\descriptionheadbox\hss}}% \@@dodescription} \def\@@makedescriptionpurebox#1% @@ -256,7 +267,7 @@ \setvalue{@@description\v!serried}% {\processaction - [\descriptionparameter\c!width] + [\descriptionlocationparameter\c!width] [ \v!fit=>\let\next\v!fit, \v!broad=>\let\next\v!broad, \s!unknown=>\let\next\v!wide, @@ -309,33 +320,27 @@ \begingroup \doadaptleftskip{\descriptionparameter\c!margin}% \showcomposition - \descriptionsheaddistance\descriptionparameter\c!distance\relax + \setlocalhsize % so we can use \localhsize in width assignments + \descriptionsheaddistance\descriptionlocationparameter\c!distance\relax \ifdim\descriptionsheaddistance=\zeropoint\relax - \doif{\descriptionparameter\c!width}\v!broad{\descriptionsheaddistance=1em}% + \doif{\descriptionlocationparameter\c!width}\v!broad{\descriptionsheaddistance=1em}% \fi \setbox\descriptionheadbox\hbox {\forgetall\dontcomplain \trialtypesettingtrue \doifelsenothing{\descriptionparameter\c!sample} - {\dodescriptionhandler - {\begstrut\descriptionparameter\c!text\ignorespaces\currentdescriptiontext\endstrut}}% - {\dodescriptionhandler - {\begstrut\descriptionparameter\c!text\descriptionparameter\c!sample\endstrut}}}% + {\dodescriptionhandler\currentdescriptiontext}% + {\dodescriptionhandler\currentdescriptionsample}}% \assignwidth \descriptionsheadwidth - {\descriptionparameter\c!width} + {\descriptionlocationparameter\c!width} {\unhcopy\descriptionheadbox} \descriptionsheaddistance \setbox\descriptionheadbox\hbox {\forgetall\dontcomplain \doifelse{\descriptionparameter\c!location}\v!serried % brrr, hack - {\dodescriptionhandler - {\begstrut\descriptionparameter\c!text\currentdescriptiontext\endstrut}} - {\dodescriptionhandler - {\vtop - {\hsize\dimexpr\descriptionsheadwidth-\descriptionsheaddistance\relax - \doifsomething{\descriptionparameter\c!headalign}{\setupalign[\descriptionparameter\c!headalign]}% - \begstrut\descriptionparameter\c!text\ignorespaces\currentdescriptiontext\endstrut}}}}% + {\dodescriptionhandler\currentdescriptiontext} + {\dodescriptionhandler{\boxeddescriptionhead\currentdescriptiontext}}}% \doifelse{\descriptionparameter\c!aligntitle}\v!no {\leftdescriptionskip\leftskip\rightdescriptionskip\rightskip} {\ifcase\nesteddescriptionstate\leftdescriptionskip\leftskip\rightdescriptionskip\rightskip\fi}% @@ -349,6 +354,13 @@ \fi % now happens elsewhere : \noindent\ignorespaces \@@resetdescriptionclosesymbol} +\def\boxeddescriptionhead#1% + {\vtop + %{\hsize\dimexpr\descriptionsheadwidth-\descriptionsheaddistance\relax + {\hsize\descriptionsheadwidth + \doifsomething{\descriptionparameter\c!headalign}{\setupalign[\descriptionparameter\c!headalign]}% + #1}} + \def\@@stopdescription {\@@placedescriptionclosesymbol \par % else we loose @@ -467,9 +479,14 @@ \def\dodescriptionstart #1{\dodescriptioninit{#1}\dosingleempty\@@startdescription} \def\dodescriptionstop #1{\dodescriptioninit{#1}\@@stopdescription} -\def\dodescriptionhandler {\csname\??dd:\descriptionparameter\s!handler:\s!handler \endcsname} -\def\dohandledescriptiondo {\csname\??dd:\descriptionparameter\s!handler:\s!handler:\s!do \endcsname} -\def\dohandledescriptionstart{\csname\??dd:\descriptionparameter\s!handler:\s!handler:\s!start\endcsname} +\def\dodescriptiontext {\csname\??dd:\descriptionparameter\s!handler:\s!handler:\s!text \endcsname} +\def\dodescriptionnumber {\csname\??dd:\descriptionparameter\s!handler:\s!handler:\s!number\endcsname} +\def\dodescriptionhandler {\csname\??dd:\descriptionparameter\s!handler:\s!handler \endcsname} +\def\dohandledescriptiondo {\csname\??dd:\descriptionparameter\s!handler:\s!handler:\s!do \endcsname} +\def\dohandledescriptionstart{\csname\??dd:\descriptionparameter\s!handler:\s!handler:\s!start \endcsname} + +\def\currentdescriptiontext {\begstrut\dodescriptiontext\endstrut} +\def\currentdescriptionsample{\begstrut\descriptionparameter\c!text\descriptionparameter\c!sample\endstrut} % implementation @@ -478,23 +495,28 @@ \newtoks \everydescription +\setvalue{\??dd:\v!description:\s!handler:\s!text }{\@@dodescriptiontext} \setvalue{\??dd:\v!description:\s!handler }{\@@dodescriptionhandler} \setvalue{\??dd:\v!description:\s!handler:\s!do }{\@@somedescription} \setvalue{\??dd:\v!description:\s!handler:\s!start}{\@@startsomedescription} \def\@@dodescriptionhandler#1% - {\strut - \dodescriptionheadtext{#1}% - \iftrialtypesetting \else + {\iftrialtypesetting \else + \begingroup \currentdescriptionsynchronize - \dosetattribute{destination}\currentdescriptionattribute % todo - \fi} + \dosetattribute{destination}\currentdescriptionattribute % todo, whole text + \forcecolorhack + \endgroup + \fi#1} -\def\dodescriptionheadtext#1% title +\def\@@dododescriptiontext + {\ctxlua{structure.lists.savedtitle("\currentdescriptionmain",\currentdescriptionnumberentry)}} + +\def\@@dodescriptiontext {\begingroup \dosetdescriptionattributes\c!headstyle\c!headcolor \the\everydescription - \descriptionparameter\c!command{\strut#1}% probably incomplete + \descriptionparameter\c!command{\strut\descriptionparameter\c!text\ignorespaces\@@dododescriptiontext}% probably incomplete \endgroup} % setup enumerations @@ -603,32 +625,61 @@ \letvalue{\??dd:\c!couplingway:\v!local }\plusone \letvalue{\??dd:\c!couplingway:\v!global}\plustwo -\setvalue{\??dd:\v!enumeration:\s!handler }{\@@doenumerationhandler} -\setvalue{\??dd:\v!enumeration:\s!handler:\s!do }{\@@somedescription} -\setvalue{\??dd:\v!enumeration:\s!handler:\s!start}{\@@startsomedescription} +\setvalue{\??dd:\v!enumeration:\s!handler:\s!number}{\@@doenumerationnumber} +\setvalue{\??dd:\v!enumeration:\s!handler:\s!text }{\@@doenumerationtext} +\setvalue{\??dd:\v!enumeration:\s!handler }{\@@doenumerationhandler} +\setvalue{\??dd:\v!enumeration:\s!handler:\s!do }{\@@somedescription} +\setvalue{\??dd:\v!enumeration:\s!handler:\s!start }{\@@startsomedescription} -\def\@@doenumerationhandler#1% - {\strut - \iftrialtypesetting \else - \begingroup - \currentdescriptionsynchronize - \dosetattribute{destination}\currentdescriptionattribute % todo, whole text - \forcecolorhack - \endgroup - \fi - \ifconditional\enumerationnumberenabled +\let\@@doenumerationhandler\@@dodescriptionhandler + +% \def\currentenumerationfullnumber +% {\ctxlua{structure.lists.savedprefixednumber("\currentdescriptionmain",\currentdescriptionnumberentry)}} + +\def\@@doenumerationnumber + {\ctxlua{structure.lists.savedprefixednumber("\currentdescriptionmain",\currentdescriptionnumberentry)}} + +\def\@@dodoenumerationtext + {\ctxlua{structure.lists.savedtitle("\currentdescriptionmain",\currentdescriptionnumberentry)}} + +\def\doenumerationnumber + {\descriptionparameter\c!left + \dodescriptionnumber + \descriptionparameter\c!stopper + \descriptionparameter\c!right} + +\def\@@doenumerationtext + {\ifconditional\enumerationnumberenabled \iftrialtypesetting - \doenumerationfullnumber\showdntext{#1}% + \doenumerationfullnumber\showdntext \doenumerationcouplingsymbol \else \doenumerationregistercoupling - \doenumerationfullnumber\showdntext{#1}% + \doenumerationfullnumber\showdntext \doenumerationcouplingsymbol \fi \else - \doenumerationfullnumber\showdnpuretext{#1}% + \doenumerationfullnumber\showdnpuretext \fi} +\def\doenumerationfullnumber#1% text, title + {\begingroup + \dosetdescriptionattributes\c!headstyle\c!headcolor + \the\everyenumeration + \descriptionparameter\c!command{\strut#1\doenumerationnumber\doenumerationextratext}% + \endgroup} + +\def\doenumerationextratext + {\doif{\descriptionparameter\c!title}\v!yes + {\begingroup + \dosetdescriptionattributes\c!titlestyle\c!titlecolor + \hskip\descriptionparameter\c!titledistance + \descriptionparameter\c!titlecommand + {\descriptionparameter\c!titleleft + \begstrut\@@dodoenumerationtext\endstrut + \descriptionparameter\c!titleright}% + \endgroup}} + \def\doenumerationsavecounter {\savestructurecounter[\currentdescriptionnumber]} \def\doenumerationrestorecounter {\restorestructurecounter[\currentdescriptionnumber]} \def\doenumerationincrementcounter{\doincrementsubstructurecounter[\currentdescriptionnumber][\currentdescriptionlevel]} @@ -660,38 +711,6 @@ % todo \fi\fi} -\def\currentdescriptiontext - {\ctxlua{structure.lists.savedtitle("\currentdescriptionmain",\currentdescriptionnumberentry)}} - -\def\currentenumerationfullnumber -% {\ctxlua{structure.lists.savednumber("\currentdescriptionmain",\currentdescriptionnumberentry)}} - {\ctxlua{structure.lists.savedprefixednumber("\currentdescriptionmain",\currentdescriptionnumberentry)}} - -\def\doenumerationfullnumber#1#2% text, title - {\begingroup - \dosetdescriptionattributes\c!headstyle\c!headcolor - \the\everyenumeration - \descriptionparameter\c!command - {\strut - #1% - \descriptionparameter\c!left - \currentenumerationfullnumber - % save cq. treat expansion etc - \doiftext{#2} % always true anyway - {\doif{\descriptionparameter\c!title}\v!yes - {\begingroup - \dosetdescriptionattributes\c!titlestyle\c!titlecolor - \hskip\descriptionparameter\c!titledistance - \descriptionparameter\c!titlecommand - {\descriptionparameter\c!titleleft - \begstrut#2\endstrut - \descriptionparameter\c!titleright}% - \endgroup}}% - % - \descriptionparameter\c!stopper - \descriptionparameter\c!right}% - \endgroup} - \def\showdnpuretext{\strut\descriptionparameter\c!text} % geen spatie \def\showdnlisttext{\descriptionparameter\c!listtext} % space in default \def\showdntext {\doifsomething{\descriptionparameter\c!text}{\descriptionparameter\c!text\removeunwantedspaces\fixedspace}} @@ -1027,6 +1046,15 @@ \s!catcodes=, \c!saveinlist=\v!yes] +\setupdescriptions + [\c!width=7em, + \c!distance=1em] + +\setupdescriptions[\c!width:\c!top=\localhsize] % undocumented, only width and distance +% \setupdescriptions[\c!width:\c!left=7em,\c!distance=1em] +% \setupdescriptions[\c!width:\c!right=7em,\c!distance=1em] + + \setuplabels [\s!parent=\??dn] diff --git a/tex/context/base/strc-lst.lua b/tex/context/base/strc-lst.lua index df443b60a..fbb502d1a 100644 --- a/tex/context/base/strc-lst.lua +++ b/tex/context/base/strc-lst.lua @@ -279,7 +279,10 @@ local function filter_collected(names, criterium, number, collected) -- now same as register local depth = sections.getlevel(criterium) local number = tonumber(number) or sections.number_at_depth(depth) or 0 - detail = format("depth: %s, number: %s, numbers: %s",depth,number,concat(sections.numbers(),".",1,depth)) + if trace_lists then + local t = sections.numbers() + detail = format("depth: %s, number: %s, numbers: %s",depth,number,(#t>0 and concat(t,".",1,depth)) or "?") + end if number > 0 then for i=1,#collected do local v = collected[i] diff --git a/tex/context/base/strc-not.mkiv b/tex/context/base/strc-not.mkiv index 7a1d97852..c314fda9c 100644 --- a/tex/context/base/strc-not.mkiv +++ b/tex/context/base/strc-not.mkiv @@ -497,21 +497,25 @@ \newif\ifnotesymbol \notesymboltrue +\newconditional\skipnoteplacement + \def\setnote [#1]{\getvalue{#1}} \def\setnotetext[#1]{\global\settrue\skipnoteplacement\getvalue{#1}} \def\domovednote#1#2#3#4% {\ifcase\ctxlua{structure.notes.deltapage("#1",#2)}\or\symbol[#3]\or\symbol[#4]\fi} -\setvalue{\??dd:\v!note:\s!handler }{\@@doenumerationhandler} -\setvalue{\??dd:\v!note:\s!handler:\s!do }{\@@somenotedescription} -\setvalue{\??dd:\v!note:\s!handler:\s!start}{\@@startsomenotedescription} +\setvalue{\??dd:\v!note:\s!handler:\s!text }{\@@donotetext} +\setvalue{\??dd:\v!note:\s!handler:\s!number}{\@@donotenumber} +\setvalue{\??dd:\v!note:\s!handler }{\@@donotehandler} +\setvalue{\??dd:\v!note:\s!handler:\s!do }{\@@somenotedescription} +\setvalue{\??dd:\v!note:\s!handler:\s!start }{\@@startsomenotedescription} + +\let\@@donotehandler\@@dodescriptionhandler \def\@@somenotedescription {\@@notemakedescription} \def\@@startsomenotedescription{\@@notemakedescription} -\newconditional\skipnoteplacement - \def\@@notemakedescription[#1]#2#3% todo ... proper [key=value] etc {\ifnotesenabled \begingroup @@ -568,7 +572,22 @@ \def\currentnotedescriptiontext % todo: can be other number {\ctxlua{structure.notes.title("\currentnote",\currentdescriptionnumberentry)}} -\def\currentnoteenumerationfullnumber +\def\@@donotetext + {\ifconditional\enumerationnumberenabled + \iftrialtypesetting + \doenumerationfullnumber\showdntext + \doenumerationcouplingsymbol + \else + \doenumerationregistercoupling + \doenumerationfullnumber\showdntext + \doenumerationcouplingsymbol + \fi + \else + \doenumerationfullnumber\showdnpuretext + \fi} + +% \def\currentnoteenumerationfullnumber +\def\@@donotenumber {\doifelse{\noteparameter\c!interaction}\v!no {\docurrentnoteenumerationfullnumber}% {\directgotobox @@ -598,8 +617,7 @@ {\edef\currentdescription{#1}% \edef\currentnote{#1}% \edef\currentdescriptionnumberentry{#2}% - \let\currentdescriptiontext\currentnotedescriptiontext - \let\currentenumerationfullnumber\currentnoteenumerationfullnumber +% \let\currentenumerationfullnumber\currentnoteenumerationfullnumber \dostartstoreddescription\begstrut\currentnotedescriptiontext\endstrut\dostopstoreddescription} \def\dostartstoreddescription diff --git a/tex/context/base/type-otf.mkiv b/tex/context/base/type-otf.mkiv index 0a29ba3d3..983e197de 100644 --- a/tex/context/base/type-otf.mkiv +++ b/tex/context/base/type-otf.mkiv @@ -225,6 +225,22 @@ \definefontsynonym [AntykwaTorunska-CondMedItalicCap] [file:AntykwaTorunskaCondMed-Italic] [features=smallcaps] \stoptypescript +\starttypescript [math][antykwa-torunska][all] + \definefontsynonym[MathRoman][antykwamath@antykwa-math] +\stoptypescript + +\starttypescript [math][antykwa-torunska-light][all] + \definefontsynonym[MathRoman][antykwalightmath@antykwa-light-math] +\stoptypescript + +\starttypescript [math][antykwa-torunska-cond][all] + \definefontsynonym[MathRoman][antykwacondmath@antykwa-cond-math] +\stoptypescript + +\starttypescript [math][antykwa-torunska-lightcond][all] + \definefontsynonym[MathRoman][antykwalightcondmath@antykwa-lightcond-math] +\stoptypescript + % \starttypescript [math] [antykwa-torunska] [default] % \definefontsynonym [AntykwaTorunska-Math-Letters-Regular] [rm-anttr] % \definefontsynonym [AntykwaTorunska-Math-Letters-Italic] [mi-anttri] @@ -252,14 +268,14 @@ % \definefontsynonym [AntykwaTorunska-Math-Symbols-CondLight] [sy-anttclz] % \definefontsynonym [AntykwaTorunska-Math-Extension-CondLight] [ex-anttcl] % \stoptypescript -% -% \starttypescript [math] [antykwa-torunska,antykwa-torunska-light,antykwa-torunska-cond,antykwa-torunska-lightcond] -% \usemathcollection[default] -% \loadmapfile[antt-rm.map] -% \loadmapfile[antt-mi.map] -% \loadmapfile[antt-sy.map] -% \loadmapfile[antt-ex.map] -% \stoptypescript + +\starttypescript [math] [antykwa-torunska,antykwa-torunska-light,antykwa-torunska-cond,antykwa-torunska-lightcond] + \usemathcollection[default] + \loadmapfile[antt-rm.map] + \loadmapfile[antt-mi.map] + \loadmapfile[antt-sy.map] + \loadmapfile[antt-ex.map] +\stoptypescript % Antykwa Poltawskiego (GUST) diff --git a/tex/context/base/type-otf.tex b/tex/context/base/type-otf.tex index bc296976b..f6b838981 100644 --- a/tex/context/base/type-otf.tex +++ b/tex/context/base/type-otf.tex @@ -84,11 +84,11 @@ \quittypescriptscanning \stoptypescript -\starttypescript [antykwa-torunska] - \definetypeface[antykwa][rm][serif][antykwa-torunska] [default] - \definetypeface[antykwa][ss][sans] [modern] [default] [rscale=1.05] - \definetypeface[antykwa][tt][mono] [modern] [default] [rscale=1.1] - \definetypeface[antykwa][mm][math] [antykwa-torunska] [default] +\starttypescript [antykwa-torunska,antykwa-torunska-light,antykwa-torunska-cond,antykwa-torunska-lightcond] + \definetypeface[antykwa][rm][serif][\typescriptone] [default] + \definetypeface[antykwa][ss][sans] [modern] [default,rscale=1.05] + \definetypeface[antykwa][tt][mono] [modern] [default,rscale=1.05] + \definetypeface[antykwa][mm][math] [\typescriptone] [default] \quittypescriptscanning \stoptypescript diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index 0b823a206..080f31744 100644 --- a/tex/generic/context/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts.lua --- merge date : 11/01/09 21:29:22 +-- merge date : 11/02/09 21:36:28 do -- begin closure to overcome local limits and interference @@ -5559,7 +5559,14 @@ otf.enhancers["reorganize mark classes"] = function(data,filename) for name, class in next, data.mark_classes do local t = { } for s in gmatch(class,"[^ ]+") do - t[unicodes[s]] = true + local us = unicodes[s] + if type(us) == "table" then + for u=1,#us do + t[us[u]] = true + end + else + t[us] = true + end end reverse[name] = t end @@ -7361,6 +7368,8 @@ if not modules then modules = { } end modules ['font-otn'] = { -- much functionality could only be implemented thanks to the husayni font -- of Idris Samawi Hamid to who we dedicate this module. +-- some day when we can jit this, we can use more functions + -- we can use more lpegs when lpeg is extended with function args and so -- resolving to unicode does not gain much |