summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/buff-ver.lua24
-rw-r--r--tex/context/base/buff-ver.mkiv2
-rw-r--r--tex/context/base/catc-ini.mkii3
-rw-r--r--tex/context/base/catc-ini.mkiv19
-rw-r--r--tex/context/base/cont-new.tex2
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/grph-inc.lua3
-rw-r--r--tex/context/base/lxml-ini.mkiv2
-rw-r--r--tex/context/base/lxml-tab.lua1
-rw-r--r--tex/context/base/lxml-tex.lua11
-rw-r--r--tex/context/base/m-chart.mkiv10
-rw-r--r--tex/context/base/m-morse.mkiv114
-rw-r--r--tex/context/base/math-def.mkiv2
-rw-r--r--tex/context/base/math-ini.mkiv85
-rw-r--r--tex/context/base/math-pln.mkiv11
-rw-r--r--tex/context/base/math-scr.mkiv64
-rw-r--r--tex/context/base/supp-mat.mkiv106
-rw-r--r--tex/context/base/syst-aux.mkiv3
-rw-r--r--tex/context/base/tabl-tab.mkiv6
-rw-r--r--tex/context/base/v-default.lua3
-rw-r--r--tex/context/base/xtag-ini.tex3
-rw-r--r--tex/context/base/xtag-mmp.tex6
-rw-r--r--tex/generic/context/luatex-fonts-merged.lua2
23 files changed, 250 insertions, 234 deletions
diff --git a/tex/context/base/buff-ver.lua b/tex/context/base/buff-ver.lua
index 386feb206..958021374 100644
--- a/tex/context/base/buff-ver.lua
+++ b/tex/context/base/buff-ver.lua
@@ -13,7 +13,7 @@ local type, next, rawset, rawget, setmetatable, getmetatable = type, next, rawse
local format, lower, match, find, sub = string.format, string.lower, string.match, string.find, string.sub
local splitlines = string.splitlines
local concat = table.concat
-local C, P, R, V, Carg = lpeg.C, lpeg.P, lpeg.R, lpeg.V, lpeg.Carg
+local C, P, R, V, Carg, Cc, Cs = lpeg.C, lpeg.P, lpeg.R, lpeg.V, lpeg.Carg, lpeg.Cc, lpeg.Cs
local patterns, lpegmatch, is_lpeg = lpeg.patterns, lpeg.match, lpeg.is_lpeg
local tabtospace = utilities.strings.tabtospace
@@ -98,6 +98,15 @@ local function f_space() -- (s,settings)
doverbatimspace()
end
+local function f_signal() -- (s,settings)
+ -- we use these for special purposes
+end
+
+local signal = "\000"
+
+visualizers.signal = signal
+visualizers.signalpattern = P(signal)
+
local functions = { __index = {
emptyline = f_emptyline,
newline = f_newline,
@@ -106,6 +115,7 @@ local functions = { __index = {
space = f_space,
start = f_start,
stop = f_stop,
+ signal = f_signal,
}
}
@@ -294,9 +304,15 @@ local function defaultmethod(s,settings)
lpegmatch(getvisualizer("default"),s,1,settings)
end
+-- we can consider using a nested instead
+
local space_pattern = patterns.space^0
local name_pattern = R("az","AZ")^1
+local function hack(pattern)
+ return Cs(pattern * Cc(signal)) -- hack to retain newlines
+end
+
function visualizers.registerescapepattern(name,before,after,normalmethod,escapemethod)
local escapepattern = escapepatterns[name]
if not escapepattern then
@@ -305,7 +321,7 @@ function visualizers.registerescapepattern(name,before,after,normalmethod,escape
(before / "")
* ((1 - after)^0 / (escapemethod or texmethod))
* (after / "")
- + ((1 - before)^1) / (normalmethod or defaultmethod)
+ + hack((1 - before)^1) / (normalmethod or defaultmethod)
)^0
escapepatterns[name] = escapepattern
end
@@ -316,10 +332,10 @@ function visualizers.registerescapecommand(name,token,normalmethod,escapecommand
local escapepattern = escapepatterns[name]
if not escapepattern then
token = P(token)
- local notoken = (1 - token)^1
+ local notoken = hack((1 - token)^1)
local cstoken = name_pattern * space_pattern
escapepattern = (
- (token / "")
+ (token / "")
* (cstoken / (escapecommand or texcommand))
+ (notoken / (normalmethod or defaultmethod))
)^0
diff --git a/tex/context/base/buff-ver.mkiv b/tex/context/base/buff-ver.mkiv
index f6847f055..45b3a614f 100644
--- a/tex/context/base/buff-ver.mkiv
+++ b/tex/context/base/buff-ver.mkiv
@@ -562,7 +562,7 @@
\def\dododotypefile#1#2%
{\doifelsetypingfile{#2}
{\dodododotypefile{#1}\readfilename}
- {\reporttypingerror{#2}}}
+ {\showmessage\m!verbatims1{#2}}}
\def\doifelsetypingfile#1% sets \readfilename (we will make this proper mkiv i.e. less messy)
{\doiflocfileelse{#1}
diff --git a/tex/context/base/catc-ini.mkii b/tex/context/base/catc-ini.mkii
index 58f6a7cd7..4f80e6595 100644
--- a/tex/context/base/catc-ini.mkii
+++ b/tex/context/base/catc-ini.mkii
@@ -43,6 +43,9 @@
\chardef\formfeedasciicode = 12 % ^^L
\chardef\endoflineasciicode = 13 % ^^M somewhat messy but this can be the active \par
\chardef\endoffileasciicode = 26 % ^^Z
+\chardef\ampersandasciicode = 38
+\chardef\caretasciicode = 94
+\chardef\underscoreasciicode= 95
\chardef\spaceasciicode = 32
%chardef\barasciicode = 124
\chardef\delasciicode = 127
diff --git a/tex/context/base/catc-ini.mkiv b/tex/context/base/catc-ini.mkiv
index d454fb535..e86ee9593 100644
--- a/tex/context/base/catc-ini.mkiv
+++ b/tex/context/base/catc-ini.mkiv
@@ -37,14 +37,17 @@
\setnewconstant\activecatcode 13 \let\active\activecatcode
\setnewconstant\commentcatcode 14
-\setnewconstant\tabasciicode 9
-\setnewconstant\newlineasciicode 10 % don't confuse this one with \endoflineasciicode
-\setnewconstant\formfeedasciicode 12
-\setnewconstant\endoflineasciicode 13 % somewhat messy but this can be the active \par
-\setnewconstant\endoffileasciicode 26
-\setnewconstant\spaceasciicode 32
-%setnewconstant\barasciicode 124
-\setnewconstant\delasciicode 127
+\setnewconstant\tabasciicode 9
+\setnewconstant\newlineasciicode 10 % don't confuse this one with \endoflineasciicode
+\setnewconstant\formfeedasciicode 12
+\setnewconstant\endoflineasciicode 13 % somewhat messy but this can be the active \par
+\setnewconstant\endoffileasciicode 26
+\setnewconstant\spaceasciicode 32
+\setnewconstant\ampersandasciicode 38
+\setnewconstant\caretasciicode 94
+\setnewconstant\underscoreasciicode 95
+%setnewconstant\barasciicode 124
+\setnewconstant\delasciicode 127
\ifx\gobbleoneargument\undefined \long\def\gobbleoneargument#1{} \fi
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 92efab5c0..91cb0357f 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{2011.01.10 17:55}
+\newcontextversion{2011.01.12 10:20}
%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 97c588835..4b5c54189 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{2011.01.10 17:55}
+\edef\contextversion{2011.01.12 10:20}
%D For those who want to use this:
diff --git a/tex/context/base/grph-inc.lua b/tex/context/base/grph-inc.lua
index e4256af32..14a5bfa60 100644
--- a/tex/context/base/grph-inc.lua
+++ b/tex/context/base/grph-inc.lua
@@ -145,13 +145,14 @@ figures.cachepaths = allocate {
figures.paths = allocate(table.copy(figures.localpaths))
figures.order = allocate{
- "pdf", "mps", "jpg", "png", "jbig", "svg", "eps", "gif", "mov", "buffer", "tex", "cld",
+ "pdf", "mps", "jpg", "png", "jp2", "jbig", "svg", "eps", "gif", "mov", "buffer", "tex", "cld",
}
figures.formats = allocate{
["pdf"] = { list = { "pdf" } },
["mps"] = { patterns = { "mps", "%d+" } },
["jpg"] = { list = { "jpg", "jpeg" } },
+ ["jp2"] = { list = { "jp2" } },
["png"] = { list = { "png" } },
["jbig"] = { list = { "jbig", "jbig2", "jb2" } },
["svg"] = { list = { "svg", "svgz" } },
diff --git a/tex/context/base/lxml-ini.mkiv b/tex/context/base/lxml-ini.mkiv
index 041a2017e..7403c9f88 100644
--- a/tex/context/base/lxml-ini.mkiv
+++ b/tex/context/base/lxml-ini.mkiv
@@ -93,6 +93,8 @@
\def\xmltoparameters #1{\ctxlua{lxml.toparameters("#1")}}
+\def\xmltofile #1#2#3{\ctxlua{lxml.tofile("#1","#2","#3")}} % id pattern filename
+
% kind of special:
\def\xmlstartraw{\ctxlua{lxml.startraw()}}
diff --git a/tex/context/base/lxml-tab.lua b/tex/context/base/lxml-tab.lua
index 6a1ab85d4..19bc14464 100644
--- a/tex/context/base/lxml-tab.lua
+++ b/tex/context/base/lxml-tab.lua
@@ -1186,4 +1186,5 @@ function xml.makestandalone(root)
end
end
end
+ return root
end
diff --git a/tex/context/base/lxml-tex.lua b/tex/context/base/lxml-tex.lua
index 31de4d5d4..ffaf9cf18 100644
--- a/tex/context/base/lxml-tex.lua
+++ b/tex/context/base/lxml-tex.lua
@@ -1465,3 +1465,14 @@ function lxml.toparameters(id)
end
end
end
+
+local template = '<?xml version="1.0" ?>\n\n<!-- %s -->\n\n%s'
+
+function lxml.tofile(id,pattern,filename,comment)
+ local collected = xmlapplylpath(getid(id),pattern)
+ if collected then
+ io.savedata(filename,format(template,comment or "exported fragment",tostring(collected[1])))
+ else
+ os.remove(filename) -- get rid of old content
+ end
+end
diff --git a/tex/context/base/m-chart.mkiv b/tex/context/base/m-chart.mkiv
index e18eeb96d..eb20e0457 100644
--- a/tex/context/base/m-chart.mkiv
+++ b/tex/context/base/m-chart.mkiv
@@ -517,7 +517,7 @@
show_all_points := true ;
\stopMPdrawing,
\s!unknown=>\startMPdrawing
- show_\@@FLOWdot_points := true ;
+ show_\@@FLOWdot _points := true ;
\stopMPdrawing]%
\doglobal\newcounter\FLOWcomment
\let\startFLOWcell\startFLOWcellB
@@ -635,7 +635,7 @@
\fi
\doifnot\FLOWshape{none} % {\v!none}
{\ExpandBothAfter\doifinsetelse{\FLOWshape}{\FLOWshapes}
- {\edef\FLOWshapetag{shape_\FLOWshape}% beter \expanded
+ {\edef\FLOWshapetag{shape_ \FLOWshape}% beter \expanded
\@EA\setFLOWname\@EA\FLOWshapetag\@EA{\FLOWshapetag}}
{\doifnumberelse\FLOWshape
{\let\FLOWshapetag\FLOWshape}
@@ -726,7 +726,7 @@
\doFLOWdisplace[0#2,0,0]%
connection_line_color := \MPcolor{\@@FLOLcolor} ;
connection_line_width := \@@FLOLrulethickness ;
- connect_\cFLOWfrom_\cFLOWto (\FLOWfrom,\zFLOWfrom) (\FLOWto,\zFLOWto) ;
+ connect_\cFLOWfrom _\cFLOWto (\FLOWfrom,\zFLOWfrom) (\FLOWto,\zFLOWto) ;
\doFLOWdisplace[0,0,0]%
\stopMPdrawing
\fi
@@ -1785,7 +1785,7 @@
show_all_points := true ;
\stopMPdrawing,
\s!unknown=>\startMPdrawing
- show_\@@FLOWdot_points := true ;
+ show_\@@FLOWdot _points := true ;
\stopMPdrawing]%
\doglobal\newcounter\FLOWcomment
\let\startFLOWcell\startFLOWcellB
@@ -1994,7 +1994,7 @@
\doFLOWdisplace[0#2,0,0]%
connection_line_color := \MPcolor{\@@FLOLcolor} ;
connection_line_width := \@@FLOLrulethickness ;
- connect_\cFLOWfrom_\cFLOWto (\FLOWfrom,\zFLOWfrom) (\FLOWto,\zFLOWto) ;
+ connect_\cFLOWfrom _\cFLOWto (\FLOWfrom,\zFLOWfrom) (\FLOWto,\zFLOWto) ;
\doFLOWdisplace[0,0,0]%
\stopMPdrawing
\fi
diff --git a/tex/context/base/m-morse.mkiv b/tex/context/base/m-morse.mkiv
index b86895983..c5e927426 100644
--- a/tex/context/base/m-morse.mkiv
+++ b/tex/context/base/m-morse.mkiv
@@ -118,74 +118,82 @@ local MorseShort = context.MorseShort
local MorseSpace = context.MorseSpace
local MorseUnknown = context.MorseUnknown
-local function tomorse(str,verbose)
- if verbose then
- str = gsub(str,"%s*+%s*","+")
- str = gsub(str,"%s+"," ")
- local done = false
- for m in utfcharacters(str) do
+local function toverbose(str)
+ str = gsub(str,"%s*+%s*","+")
+ str = gsub(str,"%s+"," ")
+ local done = false
+ for m in utfcharacters(str) do
+ if done then
+ MorseBetweenCharacters()
+ end
+ if m == "·" or m == "." then
+ MorseShort()
+ done = true
+ elseif m == "—" or m == "-" then
+ MorseLong()
+ done = true
+ elseif m == " " then
if done then
MorseBetweenCharacters()
end
- if m == "·" or m == "." then
- MorseShort()
- done = true
- elseif m == "—" or m == "-" then
- MorseLong()
- done = true
- elseif m == " " then
- if done then
- MorseBetweenCharacters()
- end
- done = false
- elseif m == "+" then
+ done = false
+ elseif m == "+" then
+ MorseBetweenWords()
+ done = false
+ else
+ MorseUnknown(m)
+ end
+ end
+end
+
+local function toregular(str)
+ local inmorse = false
+ for s in utfcharacters(str) do
+ local m = codes[s]
+ if m then
+ if inmorse then
MorseBetweenWords()
- done = false
else
- MorseUnknown(m)
+ inmorse = true
end
- end
- else
- local inmorse = false
- for s in utfcharacters(str) do
- local m = codes[s]
- if m then
- if inmorse then
- MorseBetweenWords()
+ local done = false
+ for m in utfcharacters(m) do
+ if done then
+ MorseBetweenCharacters()
else
- inmorse = true
+ done = true
end
- local done = false
- for m in utfcharacters(m) do
- if done then
- MorseBetweenCharacters()
- else
- done = true
- end
- if m == "·" then
- MorseShort()
- elseif m == "—" then
- MorseLong()
- elseif m == " " then
- MorseBetweenCharacters()
- end
+ if m == "·" then
+ MorseShort()
+ elseif m == "—" then
+ MorseLong()
+ elseif m == " " then
+ MorseBetweenCharacters()
end
- inmorse = true
- elseif s == "\n" or s == " " then
- MorseSpace()
- inmorse = false
+ end
+ inmorse = true
+ elseif s == "\n" or s == " " then
+ MorseSpace()
+ inmorse = false
+ else
+ if inmorse then
+ MorseBetweenWords()
else
- if inmorse then
- MorseBetweenWords()
- else
- inmorse = true
- end
- MorseUnknown(s)
+ inmorse = true
end
+ MorseUnknown(s)
end
end
end
+local function tomorse(str,verbose)
+ if verbose then
+ toverbose(str)
+ else
+ toregular(str)
+ end
+end
+
morse.tomorse = tomorse
function morse.filetomorse(name,verbose)
diff --git a/tex/context/base/math-def.mkiv b/tex/context/base/math-def.mkiv
index fae7b4ae1..a7e0df940 100644
--- a/tex/context/base/math-def.mkiv
+++ b/tex/context/base/math-def.mkiv
@@ -22,6 +22,8 @@
mathematics.xml.registerentities()
\stopluacode
+\activatemathcharacters
+
% will be attributes
\setfalse \automathpunctuation
diff --git a/tex/context/base/math-ini.mkiv b/tex/context/base/math-ini.mkiv
index 3cf050e75..c150ffdf2 100644
--- a/tex/context/base/math-ini.mkiv
+++ b/tex/context/base/math-ini.mkiv
@@ -349,54 +349,95 @@
%D The result is as expected: the first line typesets ok, while the second
%D one triggers an error message.
+\setnewconstant\activemathcharcode "8000
+
+\newtoks\activatedmathcharacters
+
+\def\activatemathcharacter#1%
+ {\appendtoks
+ \global\mathcode#1=\activemathcharcode
+ \to \activatedmathcharacters}
+
+\def\activatemathcharacters
+ {\the\activatedmathcharacters}
+
+\setnewconstant\primeasciicode 39 % '
+
+\activatemathcharacter\caretasciicode
+\activatemathcharacter\underscoreasciicode
+\activatemathcharacter\ampersandasciicode
+\activatemathcharacter\primeasciicode
+
+% not used:
+%
+% \mathcode`\ =\activemathcharcode
+%
+% not used:
+%
+% \bgroup
+% \catcode`\_ = 13
+% \doglobal\appendtoks
+% \mathcode`\_=\activemathcharcode
+% \let_\activemathunderscore
+% \to \everymathematics
+% \egroup
+%
+% plain tex legacy:
+
+\bgroup
+ \catcode\primeasciicode\activecatcode
+ \doglobal\appendtoks
+ \let'\activemathquote
+ \to \everymathematics
+\egroup
+
\newtoks\everydonknuthmode
\newtoks\everynonknuthmode
+\newconditional \knuthmode
+
\def\nonknuthmode{\the\everynonknuthmode\let\nonknuthmode\relax}
\def\donknuthmode{\the\everydonknuthmode}
\bgroup
- \catcode`\_=\activecatcode
- \catcode`\^=\activecatcode
- \catcode`\&=\activecatcode
+ \catcode\underscoreasciicode\activecatcode
+ \catcode\caretasciicode \activecatcode
+ \catcode\ampersandasciicode \activecatcode
\global \everynonknuthmode {\appendtoks
\let_\normalsubscript
\let^\normalsuperscript
- \let&\normalmathaligntab
+ \let&\normalmathaligntab % use \def when it's \aligntab
\to \everymathematics}
\egroup
\appendtoks
- \mathcode`\_="8000
- \mathcode`\^="8000
- \mathcode`\&="8000
- \catcode`\_=\othercatcode
- \catcode`\^=\othercatcode
- \catcode`\&=\othercatcode
+ \catcode\underscoreasciicode\othercatcode
+ \catcode\caretasciicode \othercatcode
+ \catcode\ampersandasciicode \othercatcode
\to \everynonknuthmode
\appendtoks
- \catcode`\_=\subscriptcatcode
- \catcode`\^=\superscriptcatcode
- \catcode`\&=\alignmentcatcode
+ \catcode\underscoreasciicode\subscriptcatcode
+ \catcode\caretasciicode \superscriptcatcode
+ \catcode\ampersandasciicode \alignmentcatcode
\to \everydonknuthmode
\appendtoks
\startextendcatcodetable\ctxcatcodes
- \catcode`\_=\othercatcode
- \catcode`\^=\othercatcode
- \catcode`\&=\othercatcode
+ \catcode\underscoreasciicode\othercatcode
+ \catcode\caretasciicode \othercatcode
+ \catcode\ampersandasciicode \othercatcode
\stopextendcatcodetable
\to \everynonknuthmode
\appendtoks
\startextendcatcodetable\ctxcatcodes
- \catcode`\_=\subscriptcatcode
- \catcode`\^=\superscriptcatcode
- \catcode`\&=\alignmentcatcode
+ \catcode\underscoreasciicode\subscriptcatcode
+ \catcode\caretasciicode \superscriptcatcode
+ \catcode\ampersandasciicode \alignmentcatcode
\stopextendcatcodetable
\to \everydonknuthmode
@@ -419,12 +460,6 @@
\def\nulloperator{\mathortext{\mathop{\emptyhbox}}{\emptyhbox}}
-%D To be dealt with ...
-
-\mathcode`\ ="8000 % \space
-\mathcode`\'="8000 % ^\prime
-\mathcode`\_="8000 % \_
-
%D \macros
%D {setupmathematics}
%D
diff --git a/tex/context/base/math-pln.mkiv b/tex/context/base/math-pln.mkiv
index a0fd5ad51..59f582f06 100644
--- a/tex/context/base/math-pln.mkiv
+++ b/tex/context/base/math-pln.mkiv
@@ -282,17 +282,6 @@
% \appendtoks \setcatcodetable\mthcatcodes \to \everymath : spoils xml
-% tricky, but some day we will reimplement math
-
-\bgroup
- \catcode`\_ = 13
- \catcode`\' = 13
- \doglobal\appendtoks
- \let_\activemathunderscore
- \let'\activemathquote
- \to \everymathematics
-\egroup
-
% so far
\protect \endinput
diff --git a/tex/context/base/math-scr.mkiv b/tex/context/base/math-scr.mkiv
index adf0320de..e17ce42f3 100644
--- a/tex/context/base/math-scr.mkiv
+++ b/tex/context/base/math-scr.mkiv
@@ -15,67 +15,6 @@
\unprotect
-%D \macros
-%D {super, sub}
-%D
-%D \TEX\ uses \type{^} and \type{_} for entering super- and
-%D subscript mode. We want however a bit more control than
-%D normally provided, and therefore provide \type {\super}
-%D and \type{sub}.
-%D
-%D The grid snapping has been removed.
-
-\ifdefined\supersubmode \else \newcount\supersubmode \fi
-\ifdefined\newevery \else \everysupersub \EverySuperSub \fi
-
-\appendtoks \advance\supersubmode \plusone \to \everysupersub
-
-\setuptextformulas
- [\c!size=\v!normal]
-
-\def\normalsupsub#1#2%
- {\normalsuperscript{\the\everysupersub#1}\normalsubscript{\the\everysupersub#2}}
-
-\def\super#1{\normalsuperscript{\the\everysupersub#1}}
-\def\suber#1{\normalsubscript {\the\everysupersub#1}}
-\def\supsub#1#2{\super{#1}\suber{#2}}
-\def\subsup#1#2{\suber{#1}\super{#2}}
-
-%D \macros
-%D {enablesupersub,enablesimplesupersub}
-%D
-%D We can let \type {^} and \type {_} act like \type {\super}
-%D and \type {\sub} by saying \type {\enablesupersub}.
-
-% the next macro will become obsolete in mkiv
-
-\bgroup
-\catcode`\^=\activecatcode
-\catcode`\_=\activecatcode
-\gdef\enablesupersub
- {\catcode`\^=\activecatcode
- \def^{\ifmmode\expandafter\super\else\expandafter\normalsuperscript\fi}%
- \catcode`\_=\activecatcode
- \def_{\ifmmode\expandafter\suber\else\expandafter\normalsubscript \fi}}
-\egroup
-
-%D \macros
-%D {restoremathstyle}
-%D
-%D We can pick up the current math style by calling \type
-%D {\restoremathstyle}.
-
-\def\restoremathstyle
- {\ifmmode
- \ifcase\supersubmode
- \textstyle
- \or
- \scriptstyle
- \else
- \scriptscriptstyle
- \fi
- \fi}
-
%D These macros were first needed by Frits Spijker (also
%D known as Gajes) for typesetting the minus sign that is
%D keyed into scientific calculators.
@@ -131,4 +70,7 @@
%D How negative such a symbol looks is demonstrated in:
%D $\negative 10^{\negative 10^{\negative 10}}$.
+\setuptextformulas % why here
+ [\c!size=\v!normal]
+
\protect \endinput
diff --git a/tex/context/base/supp-mat.mkiv b/tex/context/base/supp-mat.mkiv
index 1adc3e0a0..48cb9ffc0 100644
--- a/tex/context/base/supp-mat.mkiv
+++ b/tex/context/base/supp-mat.mkiv
@@ -52,7 +52,7 @@
\let\normalstopimath \Ustopmath
\let\normalstartdmath \Ustartdisplaymath
\let\normalstopdmath \Ustopmath
-\def\normalmathaligntab{&} % \let\normalmathaligntab\aligntab
+\def\normalmathaligntab{&} % \let\normalmathaligntab\aligntab does to work well in a let to & (a def works ok)
\let\normalsuper \Usuperscript % obsolete
\let\normalsuber \Usubscript % obsolete
@@ -144,58 +144,58 @@
\unexpanded\def\nodimension#1%
{\unskip#1\global\let\dodimensionsignal\relax}
-%D \macros
-%D {super, suber}
-%D
-%D \TEX\ uses \type{^} and \type{_} for entering super- and
-%D subscript mode. We want however a bit more control than
-%D normally provided, and therefore provide \type {\super}
-%D and \type{\suber} (\type {\sub} is already taken).
-
-\global\let\normalsuper=\normalsuperscript % will become obsolete
-\global\let\normalsuber=\normalsubscript % will become obsolete
-
-\newcount\supersubmode
-
-\newevery\everysupersub \EverySuperSub
-
-\appendtoks \advance\supersubmode\plusone \to \everysupersub
-
-\def\super#1{\normalsuperscript{\the\everysupersub#1}}
-\def\suber#1{\normalsubscript {\the\everysupersub#1}}
-
-%D \macros
-%D {enablesupsub}
-%D
-%D We can let \type {^} and \type {_} act like \type {\super}
-%D and \type {\suber} by saying \type {\enablesupsub}.
-
-\bgroup
-\catcode`\^=\activecatcode
-\catcode`\_=\activecatcode
-\gdef\enablesupsub
- {\catcode`\^=\activecatcode
- \def^{\ifmmode\expandafter\super\else\expandafter\normalsuper\fi}%
- \catcode`\_=\activecatcode
- \def_{\ifmmode\expandafter\suber\else\expandafter\normalsuber\fi}}
-\egroup
-
-%D \macros
-%D {restoremathstyle}
-%D
-%D We can pick up the current math style by calling \type
-%D {\restoremathstyle}.
-
-\def\restoremathstyle
- {\ifmmode
- \ifcase\supsubmode
- \textstyle
- \or
- \scriptstyle
- \else
- \scriptscriptstyle
- \fi
- \fi}
+% %D \macros
+% %D {super, suber}
+% %D
+% %D \TEX\ uses \type{^} and \type{_} for entering super- and
+% %D subscript mode. We want however a bit more control than
+% %D normally provided, and therefore provide \type {\super}
+% %D and \type{\suber} (\type {\sub} is already taken).
+%
+% \global\let\normalsuper=\normalsuperscript % will become obsolete
+% \global\let\normalsuber=\normalsubscript % will become obsolete
+%
+% \newcount\supersubmode
+%
+% \newevery\everysupersub \EverySuperSub
+%
+% \appendtoks \advance\supersubmode\plusone \to \everysupersub
+%
+% \def\super#1{\normalsuperscript{\the\everysupersub#1}}
+% \def\suber#1{\normalsubscript {\the\everysupersub#1}}
+%
+% %D \macros
+% %D {enablesupsub}
+% %D
+% %D We can let \type {^} and \type {_} act like \type {\super}
+% %D and \type {\suber} by saying \type {\enablesupsub}.
+%
+% \bgroup
+% \catcode`\^=\activecatcode
+% \catcode`\_=\activecatcode
+% \gdef\enablesupsub
+% {\catcode`\^=\activecatcode
+% \def^{\ifmmode\expandafter\super\else\expandafter\normalsuper\fi}%
+% \catcode`\_=\activecatcode
+% \def_{\ifmmode\expandafter\suber\else\expandafter\normalsuber\fi}}
+% \egroup
+%
+% %D \macros
+% %D {restoremathstyle}
+% %D
+% %D We can pick up the current math style by calling \type
+% %D {\restoremathstyle}.
+%
+% \def\restoremathstyle
+% {\ifmmode
+% \ifcase\supsubmode
+% \textstyle
+% \or
+% \scriptstyle
+% \else
+% \scriptscriptstyle
+% \fi
+% \fi}
%D \macros
%D {cramped}
diff --git a/tex/context/base/syst-aux.mkiv b/tex/context/base/syst-aux.mkiv
index c82b52404..406418aea 100644
--- a/tex/context/base/syst-aux.mkiv
+++ b/tex/context/base/syst-aux.mkiv
@@ -2965,6 +2965,9 @@
\egroup
+\def\starttexcode{\unprotect}
+\def\stoptexcode {\protect}
+
%D \macros
%D {newcounter,
%D increment,decrement}
diff --git a/tex/context/base/tabl-tab.mkiv b/tex/context/base/tabl-tab.mkiv
index a4e46946f..a5597d62a 100644
--- a/tex/context/base/tabl-tab.mkiv
+++ b/tex/context/base/tabl-tab.mkiv
@@ -1360,11 +1360,11 @@
\unexpanded\def\starttable
- {\dodoubleempty\dostarttable}
+ {\bgroup
+ \dodoubleempty\dostarttable}
\unexpanded\def\dostarttable[#1][#2]% preamble optional-settings
- {\bgroup
- \ifsecondargument
+ {\ifsecondargument
\getparameters[\??ti][#2]%
\fi
\let\stoptable\dostoptable
diff --git a/tex/context/base/v-default.lua b/tex/context/base/v-default.lua
index 107c4c4ca..5da94bf3c 100644
--- a/tex/context/base/v-default.lua
+++ b/tex/context/base/v-default.lua
@@ -15,6 +15,7 @@ local grammar = { "visualizer",
-- basic
+ signal = makepattern(handler,"signal", visualizers.signalpattern),
emptyline = makepattern(handler,"emptyline",patterns.emptyline),
beginline = makepattern(handler,"beginline",patterns.beginline),
newline = makepattern(handler,"newline", patterns.newline),
@@ -30,7 +31,7 @@ local grammar = { "visualizer",
-- used
- pattern = V("line") + V("space") + V("content"),
+ pattern = V("line") + V("space") + V("signal") + V("content"),
visualizer = V("pattern")^1
}
diff --git a/tex/context/base/xtag-ini.tex b/tex/context/base/xtag-ini.tex
index 39350ef13..8da2ec3fb 100644
--- a/tex/context/base/xtag-ini.tex
+++ b/tex/context/base/xtag-ini.tex
@@ -2890,10 +2890,9 @@
\def\douseXMLfilter#1%
{\doifundefined{\c!file\f!xtagprefix#1}
{\letvalue{\c!file\f!xtagprefix#1}\empty
- \makeshortfilename[\truefilename{\f!xtagprefix#1}]%
\startreadingfile
% will be \showmessage
- \readsysfile\shortfilename{\writestatus{xml}{loading module #1}}\donothing
+ \readsysfile{\truefilename{\f!xtagprefix#1}}{\writestatus{xml}{loading module #1}}\donothing
\stopreadingfile}}
%D Temporarily here.
diff --git a/tex/context/base/xtag-mmp.tex b/tex/context/base/xtag-mmp.tex
index ef1479ee6..75167c9e9 100644
--- a/tex/context/base/xtag-mmp.tex
+++ b/tex/context/base/xtag-mmp.tex
@@ -271,14 +271,14 @@
{\firstXMLRelement#1{\secondXMLRelement}}}%
#2}
-\def\MMLpSUP#1{\MMLpSUBP^}
-\def\MMLpSUB#1{\MMLpSUBP_}
+\def\MMLpSUP#1{\MMLpSUBP ^}
+\def\MMLpSUB#1{\MMLpSUBP _}
\remapXMLsequence [msubsup] [CPA] \MMLpSUBSUP
\def\MMLpSUBSUP#1#2%
{\withnextthreeXMLRelements
- {\firstXMLRelement_{\secondXMLRelement}^{\thirdXMLRelement}}%
+ {\firstXMLRelement _{\secondXMLRelement}^{\thirdXMLRelement}}%
#2}
\remapXMLsequence [mover] [CPA] \MMLpOVER
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua
index 837952682..2f174bc11 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 : 01/10/11 17:55:44
+-- merge date : 01/12/11 10:20:47
do -- begin closure to overcome local limits and interference