summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-03-14 00:00:16 +0200
committerMarius <mariausol@gmail.com>2013-03-14 00:00:16 +0200
commit660cef836abefb5cb3256ce80532e5c4abc5af7f (patch)
treea4622bb5be49cbe33370971c178e2f3ebd73c1bf /tex
parentcd8765990d61b170217b7f94ec413ea681c315e4 (diff)
downloadcontext-660cef836abefb5cb3256ce80532e5c4abc5af7f.tar.gz
beta 2013.03.13 22:42
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/cldf-ini.lua48
-rw-r--r--tex/context/base/cont-new.mkii2
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4133 -> 4137 bytes
-rw-r--r--tex/context/base/context-version.pngbin40466 -> 40498 bytes
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/math-ini.mkiv54
-rw-r--r--tex/context/base/math-noa.lua4
-rw-r--r--tex/context/base/status-files.pdfbin24745 -> 24738 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin210066 -> 209990 bytes
-rw-r--r--tex/context/base/util-str.lua4
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua6
13 files changed, 82 insertions, 42 deletions
diff --git a/tex/context/base/cldf-ini.lua b/tex/context/base/cldf-ini.lua
index 2e2283d90..df203b01e 100644
--- a/tex/context/base/cldf-ini.lua
+++ b/tex/context/base/cldf-ini.lua
@@ -29,7 +29,7 @@ context = context or { }
local context = context
local format, gsub, validstring = string.format, string.gsub, string.valid
-local next, type, tostring, tonumber, setmetatable = next, type, tostring, tonumber, setmetatable
+local next, type, tostring, tonumber, setmetatable, unpack, select = next, type, tostring, tonumber, setmetatable, unpack, select
local insert, remove, concat = table.insert, table.remove, table.concat
local lpegmatch, lpegC, lpegS, lpegP, lpegCc, patterns = lpeg.match, lpeg.C, lpeg.S, lpeg.P, lpeg.Cc, lpeg.patterns
local formatters = string.formatters -- using formatteds is slower in this case
@@ -160,12 +160,6 @@ context.popcatcodes = popcatcodes
-- -- --
---~ local capture = (
---~ space^0 * newline^2 * lpeg.Cc("") / texprint +
---~ space^0 * newline * space^0 * lpeg.Cc(" ") / texsprint +
---~ content / texsprint
---~ )^0
-
local newline = patterns.newline
local space = patterns.spacer
local spacing = newline * space^0
@@ -359,7 +353,7 @@ function context.viafile(data,tag)
end
end
--- -- --
+-- -- -- "{" .. ti .. "}" is somewhat slower in a cld-mkiv run than "{",ti,"}"
local containseol = patterns.containseol
@@ -853,6 +847,44 @@ local function caller(parent,...) -- todo: nodes
end
end
+-- local function indexer(parent,k)
+-- local f = function(a,...)
+-- if not a then
+-- return function()
+-- return context[k]()
+-- end
+-- elseif select("#",...) == 0 then
+-- return function()
+-- return context[k](a)
+-- end
+-- elseif a then
+-- local t = { ... }
+-- return function()
+-- return context[k](a,unpack(t))
+-- end
+-- end
+-- end
+-- parent[k] = f
+-- return f
+-- end
+--
+-- local function caller(parent,a,...) -- todo: nodes
+-- if not a then
+-- return function()
+-- return context()
+-- end
+-- elseif select("#",...) == 0 then
+-- return function()
+-- return context(a)
+-- end
+-- elseif a then
+-- local t = { ... }
+-- return function()
+-- return context(a,unpack(t))
+-- end
+-- end
+-- end
+
setmetatable(delayed, { __index = indexer, __call = caller } )
-- context.nested (todo: lines)
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index 414045219..3a74876fc 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{2013.03.13 21:00}
+\newcontextversion{2013.03.13 22:42}
%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 a15d412dc..c604b9fc7 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{2013.03.13 21:00}
+\newcontextversion{2013.03.13 22:42}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index c4a26fb35..4aaa7290f 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png
index 8233a3a6b..83eac487a 100644
--- a/tex/context/base/context-version.png
+++ b/tex/context/base/context-version.png
Binary files differ
diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii
index f5ead3921..dbf11ad1f 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{2013.03.13 21:00}
+\edef\contextversion{2013.03.13 22:42}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 168537466..55193ca3a 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -25,7 +25,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2013.03.13 21:00}
+\edef\contextversion{2013.03.13 22:42}
%D For those who want to use this:
diff --git a/tex/context/base/math-ini.mkiv b/tex/context/base/math-ini.mkiv
index 823ffaabd..957dda529 100644
--- a/tex/context/base/math-ini.mkiv
+++ b/tex/context/base/math-ini.mkiv
@@ -119,18 +119,20 @@
\let\mathgreeknormal\mathgreekupright
\let\mathgreeknone \mathgreekdefault
-\unexpanded\def\setmathattribute#1#2{\ifmmode\ctxcommand{setmathattribute("#1","#2")}\fi}
-\unexpanded\def\setmathalphabet #1{\ifmmode\ctxcommand{setmathalphabet("#1")}\fi}
-\unexpanded\def\setmathstyle #1{\ifmmode\ctxcommand{setmathstyle("#1")}\fi}
-\unexpanded\def\setmathalternate #1{\ifmmode\ctxcommand{setmathalternate(\number\defaultmathfamily,"#1")}\fi}
+% these commands are semi-public but should not be used directly (lua names wil change)
+
+\unexpanded\def\math_set_attribute #1#2{\ifmmode\ctxcommand{setmathattribute("#1","#2")}\fi}
+\unexpanded\def\math_set_alphabet #1{\ifmmode\ctxcommand{setmathalphabet("#1")}\fi}
+\unexpanded\def\math_set_font_style #1{\ifmmode\ctxcommand{setmathstyle("#1")}\fi}
+\unexpanded\def\math_set_font_alternate#1{\ifmmode\ctxcommand{setmathalternate(\number\defaultmathfamily,"#1")}\fi}
\installcorenamespace{mathstylealternate} % might become a setuphandler
-\unexpanded\def\setmathstylealterternate#1%
+\unexpanded\def\math_set_font_style_alterternate#1%
{\ifcsname\??mathstylealternate\fontclass:#1\endcsname
- \expandafter\setmathalternate\csname\??mathstylealternate\fontclass:#1\endcsname
+ \expandafter\math_set_font_alternate\csname\??mathstylealternate\fontclass:#1\endcsname
\else\ifcsname\??mathstylealternate#1\endcsname
- \expandafter\setmathalternate\csname\??mathstylealternate#1\endcsname
+ \expandafter\math_set_font_alternate\csname\??mathstylealternate#1\endcsname
\fi\fi}
\unexpanded\def\setupmathrendering % the name might change
@@ -143,27 +145,33 @@
\getparameters[\??mathstylealternate][#1]%
\fi}
-\unexpanded\def\mathaltcal{\setmathalternate{cal}\cal} % ss01 in xits
+\unexpanded\def\mathaltcal{\math_set_font_alternate{cal}\cal} % ss01 in xits
+
+\let\setmathattribute \math_set_attribute
+\let\setmathalphabet \math_set_alphabet
+\let\setmathfontstyle \math_set_font_style
+\let\setmathfontalternate \math_set_font_alternate
+\let\setmathfontstylealterternate\math_set_font_style_alterternate
-\let\mathalternate\setmathalternate % obsolete
+\let\mathalternate \math_set_font_alternate % obsolete
-\unexpanded\def\mathupright {\setmathattribute\s!regular\s!tf\setmathstylealterternate\s!tf}
-\unexpanded\def\mathdefault {\setmathattribute\s!regular\s!it\setmathstylealterternate\s!it}
-\unexpanded\def\mathscript {\setmathalphabet \s!script \setmathstylealterternate\s!script}
-\unexpanded\def\mathfraktur {\setmathalphabet \s!fraktur \setmathstylealterternate\s!fraktur}
-\unexpanded\def\mathblackboard{\setmathalphabet \s!blackboard \setmathstylealterternate\s!blackboard}
+\unexpanded\def\mathupright {\math_set_attribute\s!regular\s!tf\math_set_font_style_alterternate\s!tf}
+\unexpanded\def\mathdefault {\math_set_attribute\s!regular\s!it\math_set_font_style_alterternate\s!it}
+\unexpanded\def\mathscript {\math_set_alphabet \s!script \math_set_font_style_alterternate\s!script}
+\unexpanded\def\mathfraktur {\math_set_alphabet \s!fraktur \math_set_font_style_alterternate\s!fraktur}
+\unexpanded\def\mathblackboard{\math_set_alphabet \s!blackboard \math_set_font_style_alterternate\s!blackboard}
-\unexpanded\def\mathrm {\setmathattribute\s!rm\s!tf \setmathstylealterternate\s!tf}
-\unexpanded\def\mathss {\setmathattribute\s!ss\s!tf \setmathstylealterternate\s!tf}
-\unexpanded\def\mathtt {\setmathattribute\s!tt\s!tf \setmathstylealterternate\s!tf}
+\unexpanded\def\mathrm {\math_set_attribute\s!rm\s!tf \math_set_font_style_alterternate\s!tf}
+\unexpanded\def\mathss {\math_set_attribute\s!ss\s!tf \math_set_font_style_alterternate\s!tf}
+\unexpanded\def\mathtt {\math_set_attribute\s!tt\s!tf \math_set_font_style_alterternate\s!tf}
-\unexpanded\def\mathtf {\setmathstyle\s!tf \setmathstylealterternate\s!tf}
-\unexpanded\def\mathsl {\setmathstyle\s!it \setmathstylealterternate\s!it} % no sl
-\unexpanded\def\mathit {\setmathstyle\s!it \setmathstylealterternate\s!it}
+\unexpanded\def\mathtf {\math_set_font_style\s!tf \math_set_font_style_alterternate\s!tf}
+\unexpanded\def\mathsl {\math_set_font_style\s!it \math_set_font_style_alterternate\s!it} % no sl
+\unexpanded\def\mathit {\math_set_font_style\s!it \math_set_font_style_alterternate\s!it}
-\unexpanded\def\mathbf {\setmathstyle\s!bf \setmathstylealterternate\s!bf}
-\unexpanded\def\mathbs {\setmathstyle\s!bi \setmathstylealterternate\s!bi} % no sl
-\unexpanded\def\mathbi {\setmathstyle\s!bi \setmathstylealterternate\s!bi}
+\unexpanded\def\mathbf {\math_set_font_style\s!bf \math_set_font_style_alterternate\s!bf}
+\unexpanded\def\mathbs {\math_set_font_style\s!bi \math_set_font_style_alterternate\s!bi} % no sl
+\unexpanded\def\mathbi {\math_set_font_style\s!bi \math_set_font_style_alterternate\s!bi}
\let\tfmath\mathtf % maybe a grouped command
\let\slmath\mathsl
diff --git a/tex/context/base/math-noa.lua b/tex/context/base/math-noa.lua
index 1656f79f6..2f2f73ea2 100644
--- a/tex/context/base/math-noa.lua
+++ b/tex/context/base/math-noa.lua
@@ -235,11 +235,11 @@ families[math_char] = function(pointer)
pointer[a_exportstatus] = char
pointer.char = bold
if trace_families then
- report_families("replacing %C by bold %C, family %s with remap %s becomes %s with remap %s",char,bold,a,familymap[a],newa,familymap[newa])
+ report_families("replacing %C by bold %C, family %s with remap %s becomes %s with remap %s",char,bold,a,familymap[a],newa,familymap[newa])
end
else
if trace_families then
- report_families("no bold replacement for %C, family %s with remap %s becomes %s with remap %s",char,a,familymap[a],newa,familymap[newa])
+ report_families("no bold replacement for %C, family %s with remap %s becomes %s with remap %s",char,a,familymap[a],newa,familymap[newa])
end
end
pointer.fam = newa
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 5470918d6..6101bb979 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf
index 43f003c6b..5f226e134 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/util-str.lua b/tex/context/base/util-str.lua
index 965eff46d..cc21fb4d5 100644
--- a/tex/context/base/util-str.lua
+++ b/tex/context/base/util-str.lua
@@ -247,10 +247,10 @@ strings.tracers = tracedchars
function string.tracedchar(b)
-- todo: table
if type(b) == "number" then
- return tracedchars[b] or (utfchar(b) .. " (U+" .. format('%%05X',b) .. ")")
+ return tracedchars[b] or (utfchar(b) .. " (U+" .. format('%05X',b) .. ")")
else
local c = utfbyte(b)
- return tracedchars[c] or (b .. " (U+" .. format('%%05X',c) .. ")")
+ return tracedchars[c] or (b .. " (U+" .. format('%05X',c) .. ")")
end
end
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 6e66837f0..d7f83cb87 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 : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 03/13/13 21:00:05
+-- merge date : 03/13/13 22:42:27
do -- begin closure to overcome local limits and interference
@@ -2654,10 +2654,10 @@ string.tracedchars=tracedchars
strings.tracers=tracedchars
function string.tracedchar(b)
if type(b)=="number" then
- return tracedchars[b] or (utfchar(b).." (U+"..format('%%05X',b)..")")
+ return tracedchars[b] or (utfchar(b).." (U+"..format('%05X',b)..")")
else
local c=utfbyte(b)
- return tracedchars[c] or (b.." (U+"..format('%%05X',c)..")")
+ return tracedchars[c] or (b.." (U+"..format('%05X',c)..")")
end
end
function number.signed(i)