From e8f0a87bf330d7a4bbffca3f3c7b600e06a7a016 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Wed, 12 Aug 2009 23:13:00 +0200 Subject: beta 2009.08.12 23:13 --- metapost/context/base/mp-text.mp | 9 ++++--- tex/context/base/buff-ver.mkii | 2 +- tex/context/base/cont-new.tex | 2 +- tex/context/base/context.tex | 2 +- tex/context/base/core-spa.mkiv | 14 +++++------ tex/context/base/java-ini.lua | 7 ++++-- tex/context/base/lang-lab.mkiv | 37 ++++++++++++++------------- tex/context/base/math-vfu.lua | 39 +++++++++++++++++++++++++++++ tex/context/base/meta-tex.mkiv | 30 +++++++++++++++++++--- tex/context/base/s-pre-67.tex | 4 +++ tex/context/base/strc-ref.lua | 8 ++++++ tex/context/base/strc-ref.mkiv | 28 ++++++--------------- tex/context/base/type-otf.mkiv | 24 ++++++++++++++++++ tex/generic/context/luatex-fonts-merged.lua | 2 +- 14 files changed, 151 insertions(+), 57 deletions(-) diff --git a/metapost/context/base/mp-text.mp b/metapost/context/base/mp-text.mp index a76458144..efba39d7d 100644 --- a/metapost/context/base/mp-text.mp +++ b/metapost/context/base/mp-text.mp @@ -110,12 +110,13 @@ pair laboff.raw ; laboff.raw = (0,0) ; % (infinity,infinity) ; vardef thelabel@#(expr s, z) = save p ; picture p ; p = s if not picture s : infont defaultfont scaled defaultscale fi ; - if laboff@#<>laboff.origin : +% wrong, see myway textext +% if laboff@#<>laboff.origin : (p shifted (z + labeloffset*laboff@# - (labxf@#*lrcorner p + labyf@#*ulcorner p + (1-labxf@#-labyf@#)*llcorner p))) - else : - (p shifted z) - fi +% else : +% (p shifted z) +% fi enddef; def build_parshape (expr p, offset_or_path, dx, dy, diff --git a/tex/context/base/buff-ver.mkii b/tex/context/base/buff-ver.mkii index 8c2929a4b..6b3817a70 100644 --- a/tex/context/base/buff-ver.mkii +++ b/tex/context/base/buff-ver.mkii @@ -59,7 +59,7 @@ {\startnointerference \restorecatcodes % also needed when loading during \newpretty \startreadingfile % restore < and > if needed - \lowercasestring verb-\prettyidentifier.tex\to\filename + \lowercasestring verb-\prettyidentifier\to\filename \readsysfile{\filename.mkii}\donothing\donothing \stopreadingfile \stopnointerference}% diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex index 590015260..6488ee2dc 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.08.10 15:04} +\newcontextversion{2009.08.12 23:13} %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 8c85fadfd..e91847fbf 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.08.10 15:04} +\edef\contextversion{2009.08.12 23:13} %D For those who want to use this: diff --git a/tex/context/base/core-spa.mkiv b/tex/context/base/core-spa.mkiv index 71845b119..c23799be3 100644 --- a/tex/context/base/core-spa.mkiv +++ b/tex/context/base/core-spa.mkiv @@ -2983,15 +2983,15 @@ % category:4 is default -\definevspacingamount[\v!big] [\bigskipamount] [\openlineheight] -\definevspacingamount[\v!medium] [\medskipamount] [0.50\openlineheight] -\definevspacingamount[\v!small] [\smallskipamount][0.25\openlineheight] -\definevspacingamount[\v!line] [\openlineheight] [\openlineheight] -\definevspacingamount[\v!formula][\medskipamount] [0.50\openlineheight] -\definevspacingamount[\v!white] [\parskip] [\openlineheight] +\definevspacingamount[\v!big] [\bigskipamount] [\openlineheight] +\definevspacingamount[\v!medium] [\medskipamount] [0.50\openlineheight] +\definevspacingamount[\v!small] [\smallskipamount] [0.25\openlineheight] +\definevspacingamount[\v!line] [\openlineheight] [\openlineheight] +\definevspacingamount[\v!halfline][0.50\openlineheight][0.50\openlineheight] +\definevspacingamount[\v!formula] [\medskipamount] [0.50\openlineheight] +\definevspacingamount[\v!white] [\parskip] [\openlineheight] \definevspacing[\s!default] [\v!big] -\definevspacing[\v!halfline][0.5*\v!line] % fails \definevspacing[\v!samepage][penalty:10000] \definevspacing[\v!max] [category:1] \definevspacing[\v!force] [category:2] diff --git a/tex/context/base/java-ini.lua b/tex/context/base/java-ini.lua index 6dc789e71..161a1657e 100644 --- a/tex/context/base/java-ini.lua +++ b/tex/context/base/java-ini.lua @@ -99,8 +99,11 @@ function javascripts.code(name,arguments) local f = functions[name] if f then -- temporary hack, i need a more clever approach - arguments = '"' .. arguments.gsub(arguments,'%s*,%s*','"%1",') .. '"' - return format("%s(%s)",name,arguments or "") + if arguments then + return format("%s(%s)",name,'"' .. arguments.gsub(arguments,'%s*,%s*','"%1",') .. '"') + else + return format("%s()",name) + end end end diff --git a/tex/context/base/lang-lab.mkiv b/tex/context/base/lang-lab.mkiv index 0be27b4ca..61884ab50 100644 --- a/tex/context/base/lang-lab.mkiv +++ b/tex/context/base/lang-lab.mkiv @@ -94,7 +94,7 @@ \expandafter\def\csname\currenttextprefixclass\currenttextprefixtag#1\endcsname{{#2}{#3}}% \fi} -\def\doassignsometextprefixnop[#1][#2]% +\def\doassignsometextprefixnop#1[#2]% {} %D By changing the meaning of \type {\handletextprefix} we @@ -131,28 +131,31 @@ \def\dummytextprefix{\empty\empty} -\def\dogetupsomelabeltext#1% - {\ifcsname\??ml\labellanguage#1\endcsname - \expandafter\let\expandafter\thetextprefix\csname\??ml\labellanguage#1\endcsname +\def\dogetupsomelabeltext{\dodogetupsomelabeltext\labellanguage} % second argument is textlabel +\def\dogetupsomeheadtext {\dodogetupsomeheadtext \headlanguage } % second argument is headlabel + +\def\dodogetupsomelabeltext#1#2% + {\ifcsname\??ml#1#2\endcsname + \expandafter\let\expandafter\thetextprefix\csname\??ml#1#2\endcsname \else\ifcsname\??la\labellanguage\s!default\endcsname - \expandafter\dogetupsometextprefix\csname\??la\labellanguage\s!default\endcsname\??ml#1% - \else\ifcsname\??ml#1\endcsname - \expandafter\let\expandafter\thetextprefix\csname\??ml#1\endcsname - \else\ifcsname\??ml\s!en#1\endcsname - \expandafter\let\expandafter\thetextprefix\csname\??ml\s!en#1\endcsname + \expandafter\dodogetupsomelabeltext\csname\??la\labellanguage\s!default\endcsname{#2}% + \else\ifcsname\??ml#2\endcsname + \expandafter\let\expandafter\thetextprefix\csname\??ml#2\endcsname + \else\ifcsname\??ml\s!en#2\endcsname + \expandafter\let\expandafter\thetextprefix\csname\??ml\s!en#2\endcsname \else \let\thetextprefix\dummytextprefix \fi\fi\fi\fi} -\def\dogetupsomeheadtext#1% - {\ifcsname\??mh\headlanguage#1\endcsname - \expandafter\let\expandafter\thetextprefix\csname\??mh\headlanguage#1\endcsname +\def\dodogetupsomeheadtext#1#2% + {\ifcsname\??mh#1#2\endcsname + \expandafter\let\expandafter\thetextprefix\csname\??mh#1#2\endcsname \else\ifcsname\??la\headlanguage\s!default\endcsname - \expandafter\dogetupsometextprefix\csname\??la\headlanguage\s!default\endcsname\??mh#1% - \else\ifcsname\??mh#1\endcsname - \expandafter\let\expandafter\thetextprefix\csname\??mh#1\endcsname - \else\ifcsname\??mh\s!en#1\endcsname - \expandafter\let\expandafter\thetextprefix\csname\??mh\s!en#1\endcsname + \expandafter\dodogetupsomeheadtext\csname\??la\headlanguage\s!default\endcsname{#2}% + \else\ifcsname\??mh#2\endcsname + \expandafter\let\expandafter\thetextprefix\csname\??mh#2\endcsname + \else\ifcsname\??mh\s!en#2\endcsname + \expandafter\let\expandafter\thetextprefix\csname\??mh\s!en#2\endcsname \else \let\thetextprefix\dummytextprefix \fi\fi\fi\fi} diff --git a/tex/context/base/math-vfu.lua b/tex/context/base/math-vfu.lua index 0e06d3757..02e749dee 100644 --- a/tex/context/base/math-vfu.lua +++ b/tex/context/base/math-vfu.lua @@ -1560,3 +1560,42 @@ mathematics.make_font ( "mathtimes-math", { { name = "msam10.tfm", vector = "tex-ma" }, { name = "msbm10.tfm", vector = "tex-mb" }, } ) + +mathematics.make_font ( "lucida-math", { + { name = "lbr.afm", features = "virtualmath", main = true }, + { name = "hlcrim.tfm", vector = "tex-mi", skewchar=0x7F }, + { name = "hlcry.tfm", vector = "tex-sy", skewchar=0x30, parameters = true }, + { name = "hlcrv.tfm", vector = "tex-ex", extension = true }, + { name = "hlcra.tfm", vector = "tex-ma" }, + { name = "hlcrm.tfm", vector = "tex-mb" }, +} ) + +mathematics.make_font ( "charter-math", { + { name = "file:bchr8a", features = "virtualmath", main = true }, +-- { name = "md-chr7m.tfm", vector = "tex-mr" }, + { name = "md-chri7m.tfm", vector = "tex-mi", skewchar=0x7F }, + { name = "md-chr7y.tfm", vector = "tex-sy", skewchar=0x30, parameters = true }, + { name = "md-chr7v.tfm", vector = "tex-ex", extension = true }, + { name = "msam10.tfm", vector = "tex-ma" }, + { name = "msbm10.tfm", vector = "tex-mb" }, +} ) + +mathematics.make_font ( "garamond-math", { + { name = "file:ugmr8y", features = "virtualmath", main = true }, +-- { name = "md-gmr7m.tfm", vector = "tex-mr" }, + { name = "md-gmri7m.tfm", vector = "tex-mi", skewchar=0x7F }, + { name = "md-gmr7y.tfm", vector = "tex-sy", skewchar=0x30, parameters = true }, + { name = "md-gmr7v.tfm", vector = "tex-ex", extension = true }, + { name = "msam10.tfm", vector = "tex-ma" }, + { name = "msbm10.tfm", vector = "tex-mb" }, +} ) + +mathematics.make_font ( "utopia-math", { + { name = "file:putr8y", features = "virtualmath", main = true }, +-- { name = "md-utr7m.tfm", vector = "tex-mr" }, + { name = "md-utri7m.tfm", vector = "tex-mi", skewchar=0x7F }, + { name = "md-utr7y.tfm", vector = "tex-sy", skewchar=0x30, parameters = true }, + { name = "md-utr7v.tfm", vector = "tex-ex", extension = true }, + { name = "msam10.tfm", vector = "tex-ma" }, + { name = "msbm10.tfm", vector = "tex-mb" }, +} ) diff --git a/tex/context/base/meta-tex.mkiv b/tex/context/base/meta-tex.mkiv index a1d7aced0..ab4f93dae 100644 --- a/tex/context/base/meta-tex.mkiv +++ b/tex/context/base/meta-tex.mkiv @@ -13,9 +13,33 @@ \unprotect -\long\def\startTeXtexts#1\stopTeXtexts{[do we need TeXtexts in MkIV]} -\long\def\doTeXtext[#1]#2{[do we need TeXtexts in MkIV]} -\long\def\TeXtext{\dosingleempty\doTeXtext} +% Ok, we support this in MkIV because Mojca kept the pressure on. It +% looks a bit like a hack. + +\long\def\startTeXtexts#1\stopTeXtexts + {#1} + +\long\def\TeXtext + {\dosingleempty\doTeXtext} + +\long\def\doTeXtext[#1]#2#3% contrary to mkii we don't process yet but we do expand + {\long\setxvalue{@@st@@::#2}{\noexpand\dodoTeXtext{#1}{#3}}} + +\long\def\dodoTeXtext#1#2% + {\begingroup + \setbox\nextbox\hbox{\executeifdefined{textext@@#1}\firstofoneargument{#2}}% + \executeifdefined{textext::#1}{\getvalue{textext::depth}}% + \box\nextbox + \endgroup} + +\def\getTeXtext#1% + {\getvalue{@@st@@::#1}} + +\setvalue{textext::d}{\setbox\nextbox\hbox{\lower\dp\nextbox\box\nextbox}} % unchecked +\setvalue{textext::n}{} % unchecked + +\setvalue {textext::depth}{\getvalue{textext::d}} +\setvalue{textext::nodepth}{\getvalue{textext::n}} % \definetextext[framed]{\framed} % diff --git a/tex/context/base/s-pre-67.tex b/tex/context/base/s-pre-67.tex index 541955432..53c3260f5 100644 --- a/tex/context/base/s-pre-67.tex +++ b/tex/context/base/s-pre-67.tex @@ -79,6 +79,10 @@ \setupitemgroup[itemize][2][width=1em] +\setupinteraction + [state=start, + click=no] + \setuppapersize [S6][S6] diff --git a/tex/context/base/strc-ref.lua b/tex/context/base/strc-ref.lua index da5de43d6..d4896f47f 100644 --- a/tex/context/base/strc-ref.lua +++ b/tex/context/base/strc-ref.lua @@ -9,6 +9,8 @@ if not modules then modules = { } end modules ['strc-ref'] = { local format, find, gmatch, match = string.format, string.find, string.gmatch, string.match local texsprint, texwrite, texcount = tex.sprint, tex.write, tex.count +local trace_referencing = false trackers.register("structure.referencing", function(v) trace_referencing = v end) + local ctxcatcodes = tex.ctxcatcodes local variables = interfaces.variables local constants = interfaces.constants @@ -665,8 +667,14 @@ function jobreferences.filter(name) -- number page title ... filter = filter and (filter[name] or filters.generic[name]) if filter then filter(data) + elseif trace_referencing then + logs.report("referencing","no (generic) filter.name for '%s'",name) end + elseif trace_referencing then + logs.report("referencing","no metadata.kind for '%s'",name) end + elseif trace_referencing then + logs.report("referencing","no current reference for '%s'",name) end end diff --git a/tex/context/base/strc-ref.mkiv b/tex/context/base/strc-ref.mkiv index 5225fc17b..10ae4c84f 100644 --- a/tex/context/base/strc-ref.mkiv +++ b/tex/context/base/strc-ref.mkiv @@ -713,32 +713,20 @@ \def\currentreferencenumber {\ctxlua{jobreferences.filter("number")}} \def\currentreferencepage {\ctxlua{jobreferences.filter("page")}} \def\currentreferencetitle {\ctxlua{jobreferences.filter("title")}} -\def\currentreferencerealpage{\ctxlua{jobreferences.realpage()}} % there will eb a few more +\def\currentreferencerealpage{\ctxlua{jobreferences.realpage()}} -\unexpanded\def\dospecialin{\doinatreference\currentreferencenumber} -\unexpanded\def\dospecialat{\doinatreference\currentreferencepage} - -\def\doinatreference#1% - {\doifnextoptionalelse{\dodoinatreference{#1}{}}{\dodoinatreference{#1}}} - -\def\dodoinatreference#1% - {\def\dododoinatreference{\dodododoinatreference{#1}}% - \futurelet\next\dododoinatreference} - -\unexpanded\def\dospecialabout[#1]% hm, does this work? +\unexpanded\def\dospecialabout[#1]% {\dontleavehmode - \bgroup + \begingroup \let\crlf\space \let\\\space + \postponenotes \@@rfleft - \goto{\limitatetext\currentreferencetitle\@@rfwidth\unknown}[#1]% + \doifreferencefoundelse{#1} + {\goto{\limitatetext\currentreferencetitle\@@rfwidth\unknown}[#1]}% not so efficient (dup lookup) + {}% todo \@@rfright - \egroup} - -%D We arrived at the last step. Before we do the typesetting, -%D we forget all previous (paragraph bound) settings and make -%D sure that we remain in horizontal mode. Next we choose -%D among the several representations. + \endgroup} %D The previously discussed setup macro lets us specify the %D representation of references. A symbol reference does not diff --git a/tex/context/base/type-otf.mkiv b/tex/context/base/type-otf.mkiv index 7ca3e62fb..1efd54488 100644 --- a/tex/context/base/type-otf.mkiv +++ b/tex/context/base/type-otf.mkiv @@ -473,6 +473,30 @@ \quittypescriptscanning \stoptypescript +% lucida + +\starttypescript [math] [lucida,lucidanewmath] [all] + \definefontsynonym[MathRoman][lucidamath@lucida-math] + \loadmapfile[lucida.map] +\stoptypescript + +% mathdesign + +\starttypescript [math] [charter,mathdesignch] [all] + \definefontsynonym[MathRoman][chartermath@charter-math] + \loadmapfile[mdbch.map] +\stoptypescript + +\starttypescript [math] [garamond,mathdesigngm] [all] + \definefontsynonym[MathRoman][garamondmath@garamond-math] + \loadmapfile[mdugm.map] +\stoptypescript + +\starttypescript [math] [utopia,mathdesignut] [all] + \definefontsynonym[MathRoman][utopiamath@utopia-math] + \loadmapfile[mdput.map] +\stoptypescript + \stoptypescriptcollection \endinput diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index 7ad313dab..b57b88449 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 : 08/10/09 15:06:32 +-- merge date : 08/12/09 23:15:10 do -- begin closure to overcome local limits and interference -- cgit v1.2.3