summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2009-06-07 13:11:00 +0200
committerHans Hagen <pragma@wxs.nl>2009-06-07 13:11:00 +0200
commit5b6956e57c33bd35c0ac1e4118cdb1b183d77499 (patch)
treea1b9df0b29db98293962b2cc304a7ca5d58f99ff /tex
parent2ccf824cf6614b771c4dd47bd09e7d4f1a59f271 (diff)
downloadcontext-5b6956e57c33bd35c0ac1e4118cdb1b183d77499.tar.gz
beta 2009.06.07 13:11
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/char-def.lua2
-rw-r--r--tex/context/base/char-ini.lua12
-rw-r--r--tex/context/base/cont-new.tex2
-rw-r--r--tex/context/base/context.mkiv1
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/core-job.mkii10
-rw-r--r--tex/context/base/core-job.mkiv9
-rw-r--r--tex/context/base/meta-fun.lua55
-rw-r--r--tex/context/base/meta-fun.mkiv20
-rw-r--r--tex/context/base/page-app.tex5
-rw-r--r--tex/context/base/s-abr-01.tex1
-rw-r--r--tex/context/base/x-mathml.mkiv10
-rw-r--r--tex/generic/context/luatex-fonts-merged.lua2
13 files changed, 120 insertions, 11 deletions
diff --git a/tex/context/base/char-def.lua b/tex/context/base/char-def.lua
index 205c84bc0..2cc7eee39 100644
--- a/tex/context/base/char-def.lua
+++ b/tex/context/base/char-def.lua
@@ -523,7 +523,7 @@ characters.data={
linebreak="is",
--~ mathclass="punctuation",
mathclass="relation",
- mathname="colon",
+-- mathname="colon",
unicodeslot=0x003A,
},
{
diff --git a/tex/context/base/char-ini.lua b/tex/context/base/char-ini.lua
index 974366b7a..ff42d91ee 100644
--- a/tex/context/base/char-ini.lua
+++ b/tex/context/base/char-ini.lua
@@ -401,7 +401,8 @@ function characters.define(tobelettered, tobeactivated) -- catcodetables
-- we can use a macro instead of direct settings
local fallback = chr.fallback
if fallback then
- texprint("{\\catcode",u,"=13\\unexpanded\\gdef ",utfchar(u),"{\\checkedchar{",u,"}{",fallback,"}}}")
+ -- texprint(format("{\\catcode %s=13\\unexpanded\\gdef %s{\\checkedchar{%s}{%s}}}",u,utfchar(u),u,fallback))
+ texsprint("{\\catcode",u,"=13\\unexpanded\\gdef ",utfchar(u),"{\\checkedchar{",u,"}{",fallback,"}}}") -- no texprint
activated[#activated+1] = "\\c"..u.."\\a"
else
local contextname = chr.contextname
@@ -411,15 +412,18 @@ function characters.define(tobelettered, tobeactivated) -- catcodetables
-- by this time, we're still in normal catcode mode
-- subtle: not "\\",contextname but "\\"..contextname
if chr.unicodeslot < 128 then
- texprint(ctxcatcodes, "\\chardef\\"..contextname,"=",u)
+ -- texprint(ctxcatcodes, "\\chardef\\"..contextname,"=",u)
+ texprint(ctxcatcodes,format("\\chardef\\%s=%s",contextname,u))
else
- texprint(ctxcatcodes, "\\let\\"..contextname,"=",utfchar(u))
+ -- texprint(ctxcatcodes, "\\let\\"..contextname,"=",utfchar(u))
+ texprint(ctxcatcodes,format("\\let\\%s=%s",contextname,utfchar(u)))
if is_letter[category] then
lettered[#lettered+1] = "\\c"..u.."\\l"
end
end
elseif is_command[category] then
- texprint("{\\catcode",u,"=13\\unexpanded\\gdef ",utfchar(u),"{\\"..contextname,"}}")
+ -- texprint(format("{\\catcode %s=13\\unexpanded\\gdef %s{\\%s}}",u,utfchar(u),contextname))
+ texsprint("{\\catcode",u,"=13\\unexpanded\\gdef ",utfchar(u),"{\\"..contextname,"}}") -- no texprint
activated[#activated+1] = "\\c"..u.."\\a"
end
elseif is_letter[category] then
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 6525a9a0c..effac4b79 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.06.04 22:20}
+\newcontextversion{2009.06.07 13:11}
%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.mkiv b/tex/context/base/context.mkiv
index 14df1c300..7473b39b3 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -248,6 +248,7 @@
\loadmarkfile{meta-ini}
\loadmarkfile{meta-tex}
\loadmarkfile{meta-pdf}
+\loadmarkfile{meta-fun}
\loadcorefile{meta-pag.tex}
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex
index 22bd4228b..2889cf196 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.06.04 22:20}
+\edef\contextversion{2009.06.07 13:11}
%D For those who want to use this:
diff --git a/tex/context/base/core-job.mkii b/tex/context/base/core-job.mkii
index 59d8552df..a8a753e0d 100644
--- a/tex/context/base/core-job.mkii
+++ b/tex/context/base/core-job.mkii
@@ -203,6 +203,16 @@
\expandafter\finalend
\fi}
+
+\let\autostoptext\relax
+
+\def\autostarttext
+ {\ifcase\textlevel
+ \starttext
+ \writestatus\m!systems{auto \string\starttext..\string\stoptext}%
+ \let\autostoptext\stoptext
+ \fi}
+
\def\finalend
{\ifnum\textlevel>\zerocount \else
\the\everybye
diff --git a/tex/context/base/core-job.mkiv b/tex/context/base/core-job.mkiv
index cdb1564f4..84877eb3f 100644
--- a/tex/context/base/core-job.mkiv
+++ b/tex/context/base/core-job.mkiv
@@ -146,6 +146,15 @@
\expandafter\finalend
\fi}
+\let\autostoptext\relax
+
+\def\autostarttext
+ {\ifcase\textlevel
+ \starttext
+ \writestatus\m!systems{auto \string\starttext..\string\stoptext}%
+ \let\autostoptext\stoptext
+ \fi}
+
\def\finalend
{\ifnum\textlevel>\zerocount \else
\the\everybye
diff --git a/tex/context/base/meta-fun.lua b/tex/context/base/meta-fun.lua
new file mode 100644
index 000000000..84d4afb19
--- /dev/null
+++ b/tex/context/base/meta-fun.lua
@@ -0,0 +1,55 @@
+if not modules then modules = { } end modules ['meta-fun'] = {
+ version = 1.001,
+ comment = "companion to meta-fun.tex",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+-- very experimental, actually a joke ... see metafun manual for usage
+
+local format, loadstring, type = string.format, loadstring, type
+local texwrite = tex.write
+
+metafun = metafun or { }
+
+function metafun.topath(t,connector)
+ tex.write("(")
+ if #t > 0 then
+ for i=1,#t do
+ if i > 1 then
+ texwrite(connector or "..")
+ end
+ local ti = t[i]
+ if type(ti) == "string" then
+ texwrite(ti)
+ else
+ texwrite(format("(%s,%s)",ti.x or ti[1] or 0,ti.y or ti[2] or 0))
+ end
+ end
+ else
+ texwrite("origin")
+ end
+ texwrite(")")
+end
+
+function metafun.interpolate(f,b,e,s,c)
+ local done = false
+ tex.write("(")
+ for i=b,e,(e-b)/s do
+ local d = loadstring(format("return function(x) return %s end",f))
+ if d then
+ d = d()
+ if done then
+ texwrite(c or "...")
+ else
+ done = true
+ end
+ texwrite(format("(%s,%s)",i,d(i)))
+ end
+ end
+ if not done then
+ texwrite("origin")
+ end
+ texwrite(")")
+end
diff --git a/tex/context/base/meta-fun.mkiv b/tex/context/base/meta-fun.mkiv
new file mode 100644
index 000000000..a43ffefff
--- /dev/null
+++ b/tex/context/base/meta-fun.mkiv
@@ -0,0 +1,20 @@
+%D \module
+%D [ file=meta-fun,
+%D version=2009.06.02,
+%D title=\METAPOST\ Graphics,
+%D subtitle=Goodies,
+%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.
+
+\writestatus{loading}{MetaPost Graphics / Goodies}
+
+\registerctxluafile{meta-fun}{1.001}
+
+\unprotect
+
+\protect \endinput
diff --git a/tex/context/base/page-app.tex b/tex/context/base/page-app.tex
index 005ea6dd4..e5c149aa0 100644
--- a/tex/context/base/page-app.tex
+++ b/tex/context/base/page-app.tex
@@ -35,8 +35,10 @@
\c!rightmargin=\!!zeropoint,\c!rightedge=\!!zeropoint,
\c!header=\!!zeropoint,\c!footer=\!!zeropoint]
+
\def\dostartfittingpage[#1][#2]%
{\page % this is kind of tricky! there can be preceding page refs
+ \autostarttext
\bgroup % resulting in a zero height page; test fig-make !
\def\currentfittingpage{#1}%
\dontcomplain
@@ -87,7 +89,8 @@
\centerbox{\box\scratchbox}%
\stopmakeup
\stoplocallayout
- \egroup}
+ \egroup
+ \autostoptext}
%D \TEX\ pages (for \METAPOST\ pages, see \type {meta-fig}):
diff --git a/tex/context/base/s-abr-01.tex b/tex/context/base/s-abr-01.tex
index 5f15ecbe6..45bca44f2 100644
--- a/tex/context/base/s-abr-01.tex
+++ b/tex/context/base/s-abr-01.tex
@@ -204,6 +204,7 @@
\logo [SGML] {sgml}
\logo [SI] {si}
\logo [SQL] {sql}
+\logo [SVG] {svg}
\logo [TABLE] {\TaBlE}
\logo [TCPIP] {tcp/ip}
\logo [TDS] {tds} % no sc te
diff --git a/tex/context/base/x-mathml.mkiv b/tex/context/base/x-mathml.mkiv
index 6630a4901..649798c9f 100644
--- a/tex/context/base/x-mathml.mkiv
+++ b/tex/context/base/x-mathml.mkiv
@@ -1552,11 +1552,17 @@
} {
\mathopnolimits{log}_{\xmlfirst{#1}{/mml:logbase}}
}
+% \MMLcreset
+ \xmlfirst{#1}{/(mml:apply\string|mml:reln\string|mml:ci\string|mml:cn)}
+% \xmlsetup{#1}{mml:function} % todo, we start elsewhere
+% \mmlthird{#1}
} {
\mathopnolimits{log}
+% \MMLcreset
+% \xmlsetup{#1}{mml:function} % todo, we start elsewhere
+ \xmlfirst{#1}{/(mml:apply\string|mml:reln\string|mml:ci\string|mml:cn)}
+% \mmlsecond{#1}
}
- \MMLcreset
- \xmlsetup{#1}{mml:function}
\stopxmlsetups
\startxmlsetups mml:ln
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua
index bc21e8ed3..08b079f9e 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 : 06/04/09 22:22:55
+-- merge date : 06/07/09 13:14:18
do -- begin closure to overcome local limits and interference