summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--context/data/scite/scite-context-readme.tex2
-rw-r--r--scripts/context/lua/mtx-flac.lua6
-rw-r--r--scripts/context/lua/mtx-server.lua3
-rw-r--r--tex/context/base/attr-lay.lua13
-rw-r--r--tex/context/base/cont-new.mkii2
-rw-r--r--tex/context/base/cont-new.mkiv33
-rw-r--r--tex/context/base/cont-yes.mkiv16
-rw-r--r--tex/context/base/context-version.pdfbin4149 -> 4143 bytes
-rw-r--r--tex/context/base/context-version.pngbin105868 -> 105861 bytes
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/core-ctx.mkiv1
-rw-r--r--tex/context/base/core-def.mkiv1
-rw-r--r--tex/context/base/core-sys.lua109
-rw-r--r--tex/context/base/file-job.lua4
-rw-r--r--tex/context/base/lang-ini.mkiv17
-rw-r--r--tex/context/base/lpdf-ren.lua69
-rw-r--r--tex/context/base/m-graph.mkiv64
-rw-r--r--tex/context/base/m-ipsum.mkiv14
-rw-r--r--tex/context/base/m-translate.mkiv6
-rw-r--r--tex/context/base/mult-def.mkiv2
-rw-r--r--tex/context/base/node-fin.lua11
-rw-r--r--tex/context/base/node-ser.lua1
-rw-r--r--tex/context/base/pack-com.mkiv8
-rw-r--r--tex/context/base/page-ins.mkiv29
-rw-r--r--tex/context/base/page-sid.mkiv2
-rw-r--r--tex/context/base/phys-dim.lua24
-rw-r--r--tex/context/base/phys-dim.mkiv9
-rw-r--r--tex/context/base/prop-ini.mkiv2
-rw-r--r--tex/context/base/s-abr-01.tex559
-rw-r--r--tex/context/base/s-pre-62.tex2
-rw-r--r--tex/context/base/s-pre-63.tex1
-rw-r--r--tex/context/base/s-pre-67.tex2
-rw-r--r--tex/context/base/status-files.pdfbin24591 -> 24580 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin195300 -> 195370 bytes
-rw-r--r--tex/context/base/strc-mat.mkiv33
-rw-r--r--tex/context/base/strc-not.mkvi95
-rw-r--r--tex/context/base/trac-vis.lua45
-rw-r--r--tex/context/base/trac-vis.mkiv13
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
40 files changed, 690 insertions, 514 deletions
diff --git a/context/data/scite/scite-context-readme.tex b/context/data/scite/scite-context-readme.tex
index 6221d7cde..f687c4fe1 100644
--- a/context/data/scite/scite-context-readme.tex
+++ b/context/data/scite/scite-context-readme.tex
@@ -444,7 +444,7 @@ But probably better is to use the next directive just below the
usual \XML\ marker line:
\starttyping
-<?context-xml-directive editor language uk ?>
+<?context-directive editor language uk ?>
\stoptyping
\subject{Interface selection}
diff --git a/scripts/context/lua/mtx-flac.lua b/scripts/context/lua/mtx-flac.lua
index 37f985654..cb73a6592 100644
--- a/scripts/context/lua/mtx-flac.lua
+++ b/scripts/context/lua/mtx-flac.lua
@@ -6,12 +6,6 @@ if not modules then modules = { } end modules ['mtx-flac'] = {
license = "see context related readme files"
}
--- Written with Within Temptation's "The Unforgiven" in loopmode on
--- the speakers. The following code is also used for my occasional music
--- repository cleanup session using the code below.
-
--- this can become l-flac.lua
-
local sub, match, byte, lower = string.sub, string.match, string.byte, string.lower
local readstring, readnumber = io.readstring, io.readnumber
local concat = table.concat
diff --git a/scripts/context/lua/mtx-server.lua b/scripts/context/lua/mtx-server.lua
index bb60af091..d6e8ac902 100644
--- a/scripts/context/lua/mtx-server.lua
+++ b/scripts/context/lua/mtx-server.lua
@@ -314,9 +314,6 @@ function scripts.webserver.run(configuration)
local from = client:getpeername()
report("request from: %s",tostring(from))
report("request data: %s",tostring(request))
-
-print(">>>>>>>>>>>>>",request)
-
local fullurl = string.match(request,"GET (.+) HTTP/.*$") or "" -- todo: more clever / post
if fullurl == "" then
report("no url")
diff --git a/tex/context/base/attr-lay.lua b/tex/context/base/attr-lay.lua
index 8046a43a7..5e5e81ff1 100644
--- a/tex/context/base/attr-lay.lua
+++ b/tex/context/base/attr-lay.lua
@@ -32,7 +32,6 @@ local report_viewerlayers = logs.reporter("viewerlayers")
-- nb. too many "0 g"s
-- nb: more local tables
-
attributes.viewerlayers = attributes.viewerlayers or { }
local viewerlayers = attributes.viewerlayers
@@ -116,12 +115,14 @@ local function reviver(data,n)
end
end
-setmetatableindex(viewerlayers, extender)
-setmetatableindex(viewerlayers.data, reviver)
+setmetatableindex(viewerlayers,extender)
+setmetatableindex(viewerlayers.data,reviver)
+
+-- !!!! TEST CODE !!!!
--- layerstacker.start = function(...) local f = nodeinjections.startstackedlayer layerstacker.start = f return f(...) end
--- layerstacker.stop = function(...) local f = nodeinjections.stopstackedlayer layerstacker.stop = f return f(...) end
--- layerstacker.change = function(...) local f = nodeinjections.changestackedlayer layerstacker.change = f return f(...) end
+layerstacker.start = function(...) local f = nodeinjections.startstackedlayer layerstacker.start = f return f(...) end
+layerstacker.stop = function(...) local f = nodeinjections.stopstackedlayer layerstacker.stop = f return f(...) end
+layerstacker.change = function(...) local f = nodeinjections.changestackedlayer layerstacker.change = f return f(...) end
local function initializer(...)
return states.initialize(...)
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index 7f37bf8fb..de3436ac3 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{2012.10.06 15:31}
+\newcontextversion{2012.10.15 19:10}
%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 857c6b68c..c2651e60c 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{2012.10.06 15:31}
+\newcontextversion{2012.10.15 19:10}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
@@ -20,37 +20,6 @@
\writestatus\m!system{beware: some patches loaded from cont-new.mkiv}
-\let\strc_formulas_handle_numbering_indeed \strc_formulas_handle_numbering
-\let\strc_formulas_handle_sub_numbering_indeed\strc_formulas_handle_sub_numbering
-\let\strc_formulas_handle_sub_number_indeed \strc_formulas_handle_sub_number
-
-\def\strc_formulas_handle_numbering
- {\iftrialtypesetting
- \strc_counters_save\v!formula
- \strc_formulas_handle_numbering_indeed
- \strc_counters_restore\v!formula
- \else
- \strc_formulas_handle_numbering_indeed
- \fi}
-
-\def\strc_formulas_handle_sub_numbering
- {\iftrialtypesetting
- \strc_counters_save\v!formula
- \strc_formulas_handle_sub_numbering
- \strc_counters_restore\v!formula
- \else
- \strc_formulas_handle_sub_numbering
- \fi}
-
-\def\strc_formulas_handle_sub_number % sub formulas
- {\iftrialtypesetting
- \strc_counters_save\v!formula
- \strc_formulas_handle_sub_number_indeed
- \strc_counters_restore\v!formula
- \else
- \strc_formulas_handle_sub_number_indeed
- \fi}
-
%D Maybe:
\unexpanded\def\tightvbox{\dowithnextbox{\dp\nextbox\zeropoint\box\nextbox}\vbox}
diff --git a/tex/context/base/cont-yes.mkiv b/tex/context/base/cont-yes.mkiv
index fe6a412ee..2a032fc0b 100644
--- a/tex/context/base/cont-yes.mkiv
+++ b/tex/context/base/cont-yes.mkiv
@@ -20,19 +20,11 @@
-- When a style is loaded there is a good change that we never enter
-- this code.
- local arguments = environment.arguments
+ environment.initializefilenames()
- local jobname = arguments.jobname or tex.jobname
- local fulljobname = arguments.fulljobname or jobname
- local input = arguments.input or fulljobname
- local result = arguments.result or file.removesuffix(jobname)
-
- local filename = fulljobname
- local suffix = file.suffix(filename)
-
- local filename = ctxrunner.resolve(filename) -- in case we're prepped
-
- commands.updatefilenames(jobname,fulljobname,input,result)
+ local arguments = environment.arguments
+ local suffix = environment.suffix
+ local filename = environment.filename
if suffix == "xml" or arguments.forcexml then
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index f170d90ea..1468d8749 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 3f0623a33..7c4fb75a0 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 d73fb2f3b..6a61fca48 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{2012.10.06 15:31}
+\edef\contextversion{2012.10.15 19:10}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 0c26ad3c4..d49877e41 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{2012.10.06 15:31}
+\edef\contextversion{2012.10.15 19:10}
%D For those who want to use this:
diff --git a/tex/context/base/core-ctx.mkiv b/tex/context/base/core-ctx.mkiv
index c7298187d..50b3ae4a2 100644
--- a/tex/context/base/core-ctx.mkiv
+++ b/tex/context/base/core-ctx.mkiv
@@ -23,5 +23,6 @@
\unexpanded\def\job_options_set_modes {\ctxcommand{setdocumentmodes()}}
\unexpanded\def\job_options_set_modules {\ctxcommand{setdocumentmodules()}}
\unexpanded\def\job_options_set_environments{\ctxcommand{setdocumentenvironments()}}
+\unexpanded\def\job_options_set_filenames {\ctxcommand{setdocumentfilenames()}}
\protect \endinput
diff --git a/tex/context/base/core-def.mkiv b/tex/context/base/core-def.mkiv
index a574597e6..d1c774f40 100644
--- a/tex/context/base/core-def.mkiv
+++ b/tex/context/base/core-def.mkiv
@@ -97,6 +97,7 @@
% \loadoptionfile % obsolete, but nice to keep as reference of when/how
\job_options_get_commandline % expands some commands
\job_options_get_ctxfile % might expand some commands
+ \job_options_set_filenames
\font_preloads_at_every_job
\settopskip % brrr
\initializemainlanguage
diff --git a/tex/context/base/core-sys.lua b/tex/context/base/core-sys.lua
index d68ef05d7..e25c9b8f1 100644
--- a/tex/context/base/core-sys.lua
+++ b/tex/context/base/core-sys.lua
@@ -7,43 +7,84 @@ if not modules then modules = { } end modules ['core-sys'] = {
}
local lower, format, gsub = string.lower, string.format, string.gsub
-local suffix, basename, removesuffix = file.suffix, file.basename, file.removesuffix
+local suffixonly, basename, removesuffix = file.suffix, file.basename, file.removesuffix
local environment = environment
-function commands.updatefilenames(jobname,fulljobname,inputfilename,outputfilename)
- --
- environment.jobname = jobname
- --
- local jobfilename = gsub(fulljobname or jobname or inputfilename or tex.jobname or "","%./","")
- --
- environment.jobfilename = jobfilename
- environment.jobfilesuffix = lower(suffix(environment.jobfilename))
- --
- local inputfilename = gsub(inputfilename or "","%./","")
- environment.inputfilename = inputfilename
- environment.inputfilebarename = removesuffix(basename(inputfilename))
- --
- local inputfilerealsuffix = suffix(inputfilename)
- environment.inputfilerealsuffix = inputfilerealsuffix
- --
- local inputfilesuffix = inputfilerealsuffix == "" and "tex" or lower(inputfilerealsuffix)
- environment.inputfilesuffix = inputfilesuffix
- --
- local outputfilename = outputfilename or environment.inputfilebarename or ""
- environment.outputfilename = outputfilename
- --
- local runpath = resolvers.cleanpath(lfs.currentdir())
- environment.runpath = runpath
- --
- statistics.register("running on path", function()
- return environment.runpath
- end)
- --
- statistics.register("job file properties", function()
- return format("jobname: %s, input: %s, suffix: %s",jobfilename,inputfilename,inputfilesuffix)
- end)
- --
+local report_files = logs.reporter("system","files")
+
+-- function commands.updatefilenames(jobname,fulljobname,inputfilename,outputfilename)
+-- --
+-- environment.jobname = jobname
+-- --
+-- local jobfilename = gsub(fulljobname or jobname or inputfilename or tex.jobname or "","%./","")
+-- --
+-- environment.jobfilename = jobfilename
+-- environment.jobfilesuffix = lower(suffixonly(environment.jobfilename))
+-- --
+-- local inputfilename = gsub(inputfilename or "","%./","")
+-- environment.inputfilename = inputfilename
+-- environment.inputfilebarename = removesuffix(basename(inputfilename))
+-- --
+-- local inputfilerealsuffix = suffixonly(inputfilename)
+-- environment.inputfilerealsuffix = inputfilerealsuffix
+-- --
+-- local inputfilesuffix = inputfilerealsuffix == "" and "tex" or lower(inputfilerealsuffix)
+-- environment.inputfilesuffix = inputfilesuffix
+-- --
+-- local outputfilename = outputfilename or environment.inputfilebarename or ""
+-- environment.outputfilename = outputfilename
+-- --
+-- local runpath = resolvers.cleanpath(lfs.currentdir())
+-- environment.runpath = runpath
+-- --
+-- statistics.register("running on path", function()
+-- return environment.runpath
+-- end)
+-- --
+-- statistics.register("job file properties", function()
+-- return format("jobname: %s, input: %s, suffix: %s",jobfilename,inputfilename,inputfilesuffix)
+-- end)
+-- --
+-- end
+
+function environment.initializefilenames() -- commands.updatefilenames(jobname,fulljobname,input,result)
+
+ local arguments = environment.arguments
+
+ local jobname = arguments.jobname or tex.jobname
+ local fulljobname = arguments.fulljobname or jobname
+ local inputfilename = arguments.input or fulljobname
+ local outputfilename = arguments.result or removesuffix(jobname)
+
+ local inputfilename = suffixonly(inputfilename) == "tex" and removesuffix(inputfilename) or inputfilename or ""
+
+ local filename = fulljobname
+ local suffix = suffixonly(filename)
+
+ local filename = ctxrunner.resolve(filename) -- in case we're prepped
+
+ local jobfilename = jobname or inputfilename or tex.jobname or ""
+ local inputfilename = inputfilename or ""
+
+ jobfilename = gsub(jobfilename, "^./","")
+ inputfilename = gsub(inputfilename,"^./","")
+
+ environment.jobfilename = jobfilename
+ environment.jobfilesuffix = lower(suffixonly(jobfilename))
+
+ environment.inputfilename = inputfilename
+ environment.inputfilebarename = removesuffix(basename(inputfilename))
+ environment.inputfilesuffix = lower(suffixonly(inputfilename))
+
+ environment.outputfilename = outputfilename or environment.inputfilebarename or ""
+
+ environment.filename = filename
+ environment.suffix = suffix
+
+ report_files("jobname: %s, input: %s, result: %s",jobfilename,inputfilename,outputfilename)
+
+ function environment.initializefilenames() end
end
statistics.register("result saved in file", function()
diff --git a/tex/context/base/file-job.lua b/tex/context/base/file-job.lua
index 0705b8e5a..b62944abc 100644
--- a/tex/context/base/file-job.lua
+++ b/tex/context/base/file-job.lua
@@ -89,6 +89,10 @@ function commands.allinputpaths()
context(concat(resolvers.instance.extra_paths or { },","))
end
+function commands.setdocumentfilenames()
+ environment.initializefilenames()
+end
+
function commands.usezipfile(name,tree)
if tree and tree ~= "" then
resolvers.usezipfile(format("zip:///%s?tree=%s",name,tree))
diff --git a/tex/context/base/lang-ini.mkiv b/tex/context/base/lang-ini.mkiv
index 4f560ce9d..0b155cc74 100644
--- a/tex/context/base/lang-ini.mkiv
+++ b/tex/context/base/lang-ini.mkiv
@@ -399,20 +399,27 @@
% we will also permit access by the other names
-\unexpanded\def\lang_basics_set_current[#1]%
- {\edef\askedlanguage{#1}%
- \ifx\askedlanguage\empty \else
+%D Fast switcher
+
+\def\lang_basics_switch_asked
+ {\ifx\askedlanguage\empty \else
\ifcsname\??languagelinked\askedlanguage\endcsname
\edef\askedlanguage{\csname\??languagelinked\askedlanguage\endcsname}%
\ifx\currentlanguage\askedlanguage \else
\setcurrentlanguage\currentmainlanguage\askedlanguage
\lang_basics_synchronize
\fi
- \else
- \showmessage\m!languages6{#1}%
\fi
\fi}
+\unexpanded\def\uselanguageparameter#1%
+ {\edef\askedlanguage{#1\c!language}%
+ \lang_basics_switch_asked}
+
+\unexpanded\def\lang_basics_set_current[#1]%
+ {\edef\askedlanguage{#1}%
+ \lang_basics_switch_asked}
+
\unexpanded\def\language
{\doifnextoptionalelse\lang_basics_set_current\normallanguage}
diff --git a/tex/context/base/lpdf-ren.lua b/tex/context/base/lpdf-ren.lua
index 6362d12fe..6af65f9de 100644
--- a/tex/context/base/lpdf-ren.lua
+++ b/tex/context/base/lpdf-ren.lua
@@ -10,6 +10,7 @@ if not modules then modules = { } end modules ['lpdf-ren'] = {
local tostring, tonumber, next = tostring, tonumber, next
local format, rep = string.format, string.rep
+local concat = table.concat
local settings_to_array = utilities.parsers.settings_to_array
local backends, lpdf, nodes, node = backends, lpdf, nodes, node
@@ -229,39 +230,41 @@ function nodeinjections.stoplayer()
return copy_node(stop)
end
--- experimental stacker code (slow, can be optimized):
---
--- local values = viewerlayers.values
---
--- function nodeinjections.startstackedlayer(s,t,first,last)
--- local r = { }
--- for i=first,last do
--- r[#r+1] = startlayer(values[t[i]])
--- end
--- r = concat(r," ")
--- return pdfliteral(r)
--- end
---
--- function nodeinjections.stopstackedlayer(s,t,first,last)
--- local r = { }
--- for i=last,first,-1 do
--- r[#r+1] = stoplayer()
--- end
--- r = concat(r," ")
--- return pdfliteral(r)
--- end
---
--- function nodeinjections.changestackedlayer(s,t1,first1,last1,t2,first2,last2)
--- local r = { }
--- for i=last1,first1,-1 do
--- r[#r+1] = stoplayer()
--- end
--- for i=first2,last2 do
--- r[#r+1] = startlayer(values[t2[i]])
--- end
--- r = concat(r," ")
--- return pdfliteral(r)
--- end
+-- experimental stacker code (slow, can be optimized): !!!! TEST CODE !!!!
+
+local values = viewerlayers.values
+local startlayer = codeinjections.startlayer
+local stoplayer = codeinjections.stoplayer
+
+function nodeinjections.startstackedlayer(s,t,first,last)
+ local r = { }
+ for i=first,last do
+ r[#r+1] = startlayer(values[t[i]])
+ end
+ r = concat(r," ")
+ return pdfliteral(r)
+end
+
+function nodeinjections.stopstackedlayer(s,t,first,last)
+ local r = { }
+ for i=last,first,-1 do
+ r[#r+1] = stoplayer()
+ end
+ r = concat(r," ")
+ return pdfliteral(r)
+end
+
+function nodeinjections.changestackedlayer(s,t1,first1,last1,t2,first2,last2)
+ local r = { }
+ for i=last1,first1,-1 do
+ r[#r+1] = stoplayer()
+ end
+ for i=first2,last2 do
+ r[#r+1] = startlayer(values[t2[i]])
+ end
+ r = concat(r," ")
+ return pdfliteral(r)
+end
-- transitions
diff --git a/tex/context/base/m-graph.mkiv b/tex/context/base/m-graph.mkiv
index db72927fb..45903e532 100644
--- a/tex/context/base/m-graph.mkiv
+++ b/tex/context/base/m-graph.mkiv
@@ -16,26 +16,30 @@
% the percent symbol. We also add a specifier when no one is given.
\startluacode
+ local format, gsub, find, match = string.format, string.gsub, string.find, string.match
+
local function strip(s)
- return "\\times10^{"..(s:gsub("%+*0*","")).."}"
+ s = gsub(s,"^([+-]*)0+(%d)","%1%2")
+ return format("\\times10^{%s}",s)
end
+
function metapost.format_n(fmt,str)
- fmt = fmt:gsub("@","%%")
- local initial, format, final = fmt:match("^(.-)(%%.-[%a])(.-)$")
- if format then
- str = fmt:format(str)
- str = str:gsub("e(.-)$",strip)
- str = ("%s\\mathematics{%s}%s"):format(initial,str,final)
- elseif not fmt:find("%%") then
- str = ("%"..fmt):format(str)
- str = str:gsub("e(.-)$",strip)
- str = ("\\mathematics{%s}"):format(str)
+ fmt = gsub(fmt,"@","%%")
+ local initial, hasformat, final = match(fmt,"^(.-)(%%.-[%a])(.-)$")
+ if hasformat then
+ str = format(fmt,str)
+ str = gsub(str,"e(.-)$",strip)
+ str = format("%s\\mathematics{%s}%s",initial,str,final)
+ elseif not find(fmt,"%%") then
+ str = format("%"..fmt,str)
+ str = gsub(str,"e(.-)$",strip)
+ str = format("\\mathematics{%s}",str)
end
context(str)
end
\stopluacode
-\unexpanded\long\def\MPgraphformat#1#2{\ctxlua{metapost.format_n("#1","#2")}}
+\unexpanded\def\MPgraphformat#1#2{\ctxlua{metapost.format_n("#1","#2")}}
% We could also delegate parsing using lower level plugins.
@@ -96,6 +100,23 @@
% format(f,x)
% enddef;
+ % string Autoform_x ; Autoform_x := "@.0e" ;
+ % string Autoform_y ; Autoform_y := "@.0e" ;
+
+ vardef autogrid(suffix tx, ty) text w =
+ Gneedgr_ := false ;
+ if str tx <> "" :
+ for x=auto.x :
+ tx(if known Autoform_x : Autoform_x else : Autoform fi,x) w ;
+ endfor
+ fi ;
+ if str ty <> "" :
+ for y=auto.y :
+ ty(if known Autoform_y : Autoform_y else : Autoform fi,y) w ;
+ endfor
+ fi ;
+ enddef ;
+
\stopMPinclusions
\continueifinputfile{m-graph.mkiv}
@@ -103,13 +124,26 @@
\starttext
\startMPpage
-draw begingraph(3in,2in);
- gdraw "t:/metapost/grphdata/agepop91.d";
-endgraph;
+ label(format("@g","1e-10"), (0, 0)) ;
+ label(format("@g","1e+10"), (2cm, 0)) ;
+ label(format("@g","1e-12"), (0, -0.5cm)) ;
+ label(format("@g","1e+12"), (2cm,-0.5cm)) ;
+ label(format("@g","1e-0"), (0, -1.0cm)) ;
+ label(format("@g","1e+0"), (2cm,-1.0cm)) ;
+ label(format("@g","1"), (0, -1.5cm)) ;
+ label(format("@g","1"), (2cm,-1.5cm)) ;
+ label(format("@g","1e-102"),(0, -2.0cm)) ;
+ label(format("@g","1e+102"),(2cm,-2.0cm)) ;
\stopMPpage
% \startMPpage
% draw begingraph(3in,2in);
+% gdraw "t:/metapost/grphdata/agepop91.d";
+% endgraph;
+% \stopMPpage
+
+% \startMPpage
+% draw begingraph(3in,2in);
% gdraw "agepop91.d" plot btex $\bullet$ etex;
% endgraph;
% \stopMPpage
diff --git a/tex/context/base/m-ipsum.mkiv b/tex/context/base/m-ipsum.mkiv
index 1fb482c43..1c5901d86 100644
--- a/tex/context/base/m-ipsum.mkiv
+++ b/tex/context/base/m-ipsum.mkiv
@@ -112,6 +112,9 @@ end
\setupipsum
[\c!file=lorem,
\c!alternative=\v!paragraph,
+ %\c!language=,
+ %\c!styl=,
+ %\c!color=,
\c!n=0,
\c!left=,
\c!right=,
@@ -124,6 +127,7 @@ end
\startsetups[handler:action:ipsum]
\useipsumstyleandcolor\c!style\c!color
+ \uselanguageparameter\ipsumparameter
\ctxlua{moduledata.ipsum.typeset {
alternative = "\ipsumparameter\c!alternative",
filename = "\ipsumparameter\c!file",
@@ -153,15 +157,15 @@ end
\starttext
- \ipsum[alternative=paragraph,before=\blank,after=\blank]
+ \ipsum[alternative=paragraph,before=\blank,after=\blank,language=la]
- \ipsum[alternative=lines,n=2,right=\par,before=\blank,after=\blank]
+ \ipsum[alternative=lines,n=2,right=\par,before=\blank,after=\blank,language=la]
- \ipsum[alternative=lines,n=random,before=\blank,after=\blank]
+ \ipsum[alternative=lines,n=random,before=\blank,after=\blank,language=la]
- \ipsum[alternative=lines,before=\startitemize,after=\stopitemize,left=\startitem,right=\stopitem]
+ \ipsum[alternative=lines,before=\startitemize,after=\stopitemize,left=\startitem,right=\stopitem,language=la]
- \ipsum[alternative=words,left=(,right=),inbetween=\space]
+ \ipsum[alternative=words,left=(,right=),inbetween=\space,language=la]
\page
diff --git a/tex/context/base/m-translate.mkiv b/tex/context/base/m-translate.mkiv
index da5e14d62..363f115cb 100644
--- a/tex/context/base/m-translate.mkiv
+++ b/tex/context/base/m-translate.mkiv
@@ -89,14 +89,16 @@
\continueifinputfile{m-translate.mkiv}
+
\starttext
\translateinput[Moica][Mojca]
- \translateinput[Idris][Idris (aka ادريس)]
+ % \translateinput[Idris][Idris (aka ادريس)]
+ \translateinput[Idris][Idris (aka <something arabic here>)]
\enableinputtranslation
- Well, it's not that hard to satisfy Idris and Moica.
+ Well, it's not that hard to satisfy Idris' and Moicas \TEX\ needs.
\readtranslatedfile{tufte}
diff --git a/tex/context/base/mult-def.mkiv b/tex/context/base/mult-def.mkiv
index 34ccdbd3f..4c145590d 100644
--- a/tex/context/base/mult-def.mkiv
+++ b/tex/context/base/mult-def.mkiv
@@ -34,6 +34,7 @@
% start todo:
+\def\c!language {language}
\def\c!compressseparator{compressseparator}
\def\c!renderingsetup {renderingsetup}
\def\c!filler {filler}
@@ -67,6 +68,7 @@
\def\s!ucgreek {ucgreek}
\def\s!italics {italics}
\def\s!integral {integral}
+\def\s!insert {insert} % maybe insertclass
\def\c!HL {HL}
\def\c!VL {VL}
diff --git a/tex/context/base/node-fin.lua b/tex/context/base/node-fin.lua
index eb8864bff..27793716d 100644
--- a/tex/context/base/node-fin.lua
+++ b/tex/context/base/node-fin.lua
@@ -676,7 +676,9 @@ local function stacker(namespace,attribute,head,default) -- no triggering, no in
if a ~= attrib then
local n = nsstep(a)
if n then
- head = insert_node_before(head,current,n) -- copy_node(nsdata[a]))
+ -- !!!! TEST CODE !!!!
+-- head = insert_node_before(head,current,copy_node(nsdata[tonumber(n)])) -- a
+ head = insert_node_before(head,current,n) -- a
end
attrib, done, okay = a, true, true
end
@@ -700,14 +702,11 @@ local function stacker(namespace,attribute,head,default) -- no triggering, no in
-- skip
elseif nslistwise then
local a = has_attribute(current,attribute)
--- print(a,attrib,nslistwise[a],a and attrib ~= a and nslistwise[a])
if a and attrib ~= a and nslistwise[a] then -- viewerlayer
done = true
--- print("yes+",a,nsdata[a].data)
head = insert_node_before(head,current,copy_node(nsdata[a]))
current.list = stacker(namespace,attribute,content,a)
head, current = insert_node_after(head,current,copy_node(nsnone))
--- print("yes-",a,nsnone.data)
else
local ok = false
current.list, ok = stacker(namespace,attribute,content,attrib)
@@ -729,7 +728,9 @@ local function stacker(namespace,attribute,head,default) -- no triggering, no in
if okay then
local n = nsend()
if n then
- head = insert_node_after(head,previous,n) -- copy_node(nsdata[a]))
+ -- !!!! TEST CODE !!!!
+-- head = insert_node_after(head,previous,copy_node(nsdata[tostring(n)]))
+ head = insert_node_after(head,previous,n)
end
end
return head, done
diff --git a/tex/context/base/node-ser.lua b/tex/context/base/node-ser.lua
index df68e16d5..8e999f520 100644
--- a/tex/context/base/node-ser.lua
+++ b/tex/context/base/node-ser.lua
@@ -40,6 +40,7 @@ local expand = allocate ( tohash {
"leader", -- leader_ptr
"action", -- action_ptr
"value", -- user_defined nodes with subtype 'a' en 'n'
+ "head",
} )
-- page_insert: "height", "last_ins_ptr", "best_ins_ptr"
diff --git a/tex/context/base/pack-com.mkiv b/tex/context/base/pack-com.mkiv
index 9320411ce..fbc2b2732 100644
--- a/tex/context/base/pack-com.mkiv
+++ b/tex/context/base/pack-com.mkiv
@@ -789,10 +789,10 @@
\unexpanded\def\placeontopofeachother{\bgroup\dowithnextboxcs\pack_topofeachother_one\hbox}
\unexpanded\def\placesidebyside {\bgroup\dowithnextboxcs\pack_sidebyside_one \hbox}
-\def\pack_topofeachother_one{\bgroup\setbox0\box\nextbox\dowithnextboxcs\pack_topofeach_two \hbox}
-\def\pack_sidebyside_one {\bgroup\setbox0\box\nextbox\dowithnextboxcs\pack_sidebyside_two\hbox}
+\def\pack_topofeachother_one{\bgroup\setbox0\box\nextbox\dowithnextboxcs\pack_topofeachother_two\hbox}
+\def\pack_sidebyside_one {\bgroup\setbox0\box\nextbox\dowithnextboxcs\pack_sidebyside_two \hbox}
-\def\pack_topofeachother_two{\setbox2\box\nextbox\halign{\hss####\hss\cr\box0\cr\box2\cr}\egroup\egroup}
-\def\pack_sidebyside_two {\setbox2\box\nextbox\valign{\vss####\vss\cr\box0\cr\box2\cr}\egroup\egroup}
+\def\pack_topofeachother_two{\setbox2\box\nextbox\halign{\hss##\hss\cr\box0\cr\box2\cr}\egroup\egroup}
+\def\pack_sidebyside_two {\setbox2\box\nextbox\valign{\vss##\vss\cr\box0\cr\box2\cr}\egroup\egroup}
\protect \endinput
diff --git a/tex/context/base/page-ins.mkiv b/tex/context/base/page-ins.mkiv
index 11b025ee0..a63de0b26 100644
--- a/tex/context/base/page-ins.mkiv
+++ b/tex/context/base/page-ins.mkiv
@@ -102,19 +102,24 @@
% insertion node at that end, we already know the number.
\appendtoks
- \ifcsname\??insertionnumber\currentinsertion\endcsname
- % bad news
+ \ifx\currentinsertionparent\empty
+ \ifcsname\??insertionnumber\currentinsertion\endcsname
+ % bad news
+ \else
+ \expandafter\newinsert\csname\??insertionnumber\currentinsertion\endcsname
+ \page_inserts_synchronize_registers
+ \ctxcommand{defineinsertion("\currentinsertion",{ number = \number\currentinsertionnumber })}%
+ \t_page_inserts_list\expandafter\expandafter\expandafter
+ {\expandafter\the\expandafter\t_page_inserts_list
+ \expandafter\page_inserts_process\csname\??insertionnumber\currentinsertion\endcsname}%
+ \count\currentinsertionnumber\plusthousand
+ \skip \currentinsertionnumber\zeropoint
+ \dimen\currentinsertionnumber\maxdimen
+ \fi
\else
- \expandafter\newinsert\csname\??insertionnumber\currentinsertion\endcsname
- \page_inserts_synchronize_registers
- \ctxcommand{defineinsertion("\currentinsertion",{ number = \number\currentinsertionnumber })}%
- \t_page_inserts_list\expandafter\expandafter\expandafter
- {\expandafter\the\expandafter\t_page_inserts_list
- \expandafter\page_inserts_process\csname\??insertionnumber\currentinsertion\endcsname}%
- \count\currentinsertionnumber\plusthousand
- \skip \currentinsertionnumber\zeropoint
- \dimen\currentinsertionnumber\maxdimen
- \fi
+ \expandafter\let\csname\??insertionnumber\currentinsertion\expandafter\endcsname
+ \csname\??insertionnumber\currentinsertionparent\endcsname
+ \fi
\to \everydefineinsertion
\appendtoks
diff --git a/tex/context/base/page-sid.mkiv b/tex/context/base/page-sid.mkiv
index 07388e7cf..f7a2357bf 100644
--- a/tex/context/base/page-sid.mkiv
+++ b/tex/context/base/page-sid.mkiv
@@ -762,7 +762,7 @@
% some will become obsolete
\def\checksidefloat {\page_sides_check_floats}
-%def\flushsidefloats {\page_sides_flush_floats}
+\def\flushsidefloats {\page_sides_flush_floats}
\def\flushsidefloatsafterpar{\page_sides_flush_floats_after_par}
%def\forgetsidefloats {\page_sides_forget_floats}
%def\synchronizesidefloats {\page_sides_synchronize_floats}
diff --git a/tex/context/base/phys-dim.lua b/tex/context/base/phys-dim.lua
index 62a710dd3..ef891c29e 100644
--- a/tex/context/base/phys-dim.lua
+++ b/tex/context/base/phys-dim.lua
@@ -116,6 +116,30 @@ local dnumber = (ddigitspace + ddigit)^1
-- : ; for the moment not used, maybe for invisible fraction . , when no leading number
+-- local c_p = (ddigitspace^1 * dskipcomma)^0 -- ___,
+-- * (ddigitspace^0 * ddigit * dintercomma)^0 -- _00, 000,
+-- * ddigitspace^0 * ddigit^0 -- _00 000
+-- * (
+-- dfinalperiod * ddigit -- .00
+-- + dskipperiod * dpadding^1 -- .==
+-- + dsemiperiod * ddigit -- :00
+-- + dsemiperiod * dpadding^1 -- :==
+-- )^0
+-- + ddigit -- 00
+--
+-- local p_c = (ddigitspace^1 * dskipperiod)^0 -- ___.
+-- * (ddigitspace^0 * ddigit * dinterperiod)^0 -- _00. 000.
+-- * ddigitspace^0 * ddigit^0 -- _00 000
+-- * (
+-- dfinalcomma * ddigit -- ,00
+-- + dskipcomma * dpadding^1 -- ,==
+-- + dsemicomma * ddigit -- :00
+-- + dsemicomma * dpadding^1 -- :==
+-- )^0
+-- + ddigit -- 00
+--
+-- fix by WS/SB (needs further testing)
+
local c_p = (ddigitspace^1 * dskipcomma)^0 -- ___,
* (ddigitspace^0 * ddigit * dintercomma)^0 -- _00, 000,
* ddigitspace^0 * ddigit^0 -- _00 000
diff --git a/tex/context/base/phys-dim.mkiv b/tex/context/base/phys-dim.mkiv
index ec4ac7a22..934985399 100644
--- a/tex/context/base/phys-dim.mkiv
+++ b/tex/context/base/phys-dim.mkiv
@@ -216,10 +216,15 @@
\unexpanded\def\digitsperiodsymbol {\csname\??digitsperiod\number\c_phys_digits_method\endcsname}
\unexpanded\def\digitsseparatorspace {\csname\??digitsspace \number\c_phys_digits_method\endcsname}
-\unexpanded\def\digitsfinalcomma {\digitscommasymbol } % more for tracing
+% \unexpanded\def\digitsfinalcomma {\digitscommasymbol } % more for tracing
+% \unexpanded\def\digitsfinalperiod {\digitsperiodsymbol} % more for tracing
+% \unexpanded\def\digitsintermediatecomma {\digitscommasymbol } % more for tracing
+% \unexpanded\def\digitsintermediateperiod {\digitsperiodsymbol} % more for tracing
+
+\unexpanded\def\digitsfinalcomma {\digitsperiodsymbol} % more for tracing
\unexpanded\def\digitsfinalperiod {\digitsperiodsymbol} % more for tracing
\unexpanded\def\digitsintermediatecomma {\digitscommasymbol } % more for tracing
-\unexpanded\def\digitsintermediateperiod {\digitsperiodsymbol} % more for tracing
+\unexpanded\def\digitsintermediateperiod {\digitscommasymbol } % more for tracing
%D The user macro:
diff --git a/tex/context/base/prop-ini.mkiv b/tex/context/base/prop-ini.mkiv
index d8d2ea2f4..3b1c59b24 100644
--- a/tex/context/base/prop-ini.mkiv
+++ b/tex/context/base/prop-ini.mkiv
@@ -37,7 +37,7 @@
\def\properties_define[#1][#2][#3]%
{\properties_obsolete_message
- \setevalue{\??propertytypes#1e}{#2}%
+ \setevalue{\??propertytypes#1}{#2}%
\getvalue{\??propertydefiners#2}[#1][#2][#3]}
\setvalue{\??propertystarters\v!layer }#1{\let\properties_stop\stopviewerlayer\startviewerlayer[#1]}
diff --git a/tex/context/base/s-abr-01.tex b/tex/context/base/s-abr-01.tex
index 4033560a6..87fb72863 100644
--- a/tex/context/base/s-abr-01.tex
+++ b/tex/context/base/s-abr-01.tex
@@ -19,284 +19,291 @@
\protect
-\logo [MKI] {MkI} % joke
-\logo [MKII] {MkII}
-\logo [MKIII] {MkIII} % joke
-\logo [MKIV] {MkIV}
-\logo [MKVI] {MkVI}
-\logo [MKIX] {MkIX}
-\logo [MKXI] {MkXI}
-\logo [MPII] {MpII}
-\logo [MPIV] {MpIV}
+\logo [MKI] {MkI} % joke
+\logo [MKII] {MkII}
+\logo [MKIII] {MkIII} % joke
+\logo [MKIV] {MkIV}
+\logo [MKVI] {MkVI}
+\logo [MKIX] {MkIX}
+\logo [MKXI] {MkXI}
+\logo [MKIC] {MkIC}
+\logo [MKCI] {MkCI}
+\logo [MPII] {MpII}
+\logo [MPIV] {MpIV}
-%logo [FGA] {fga}
-%logo [FGBBS] {fgbbs}
-\logo [ACROBAT] {Acro\-bat}
-\logo [AFM] {afm}
-\logo [API] {api}
-\logo [ALEPH] {Aleph} % {\mathematics{\aleph}}
-\logo [ALGOL] {ALGOL}
-\logo [AMS] {ams}
-\logo [AMSLATEX] {\AmSLaTeX}
-\logo [AMSTEX] {\AmSTeX}
-\logo [ANSI] {ansi}
-\logo [ARABTEX] {Arab\TeX}
-\logo [ASCII] {ascii}
-\logo [ASCIITEX] {ascii\TeX}
-\logo [BACHOTEX] {Bacho\TeX}
-\logo [BIBTEX] {bib\TeX}
-\logo [BLUESKY] {BlueSky}
-\logo [BMP] {bmp}
-\logo [BSD] {bsd}
-\logo [CCODE] {C}
-\logo [CPLUSPLUS] {C\high{++}}
-\logo [CALCMATH] {CalcMath}
-\logo [CD] {cd}
-\logo [CPU] {cpu}
-\logo [CDROM] {cdrom}
-\logo [CID] {cid}
-\logo [CJK] {cjk}
-\logo [CMR] {cmr}
-\logo [CLD] {cld}
-\logo [CMYK] {cmyk}
-\logo [CODHOST] {CodHost}
-\logo [CONTEXT] {\ConTeXt}
-\logo [CSS] {css}
-\logo [CTAN] {ctan}
-\logo [CTXTOOLS] {ctxtools}
-\logo [CWEB] {cweb}
-\logo [DANTE] {Dante}
-\logo [DISTILLER] {distiller}
-\logo [DRATEX] {Dra\TeX}
-\logo [DSC] {dsc}
-\logo [DTD] {dtd}
-\logo [DTK] {dtk}
-\logo [DTP] {dtp}
-\logo [DVD] {dvd}
-\logo [DVI] {dvi}
-\logo [DVIPDFM] {dvipdfm}
-\logo [DVIPDFMX] {dvipdfmx}
-\logo [DVIPOS] {dvipos}
-\logo [DVIPS] {dvips}
-\logo [DVIPSONE] {dvipsone}
-\logo [DVISCR] {dviscr}
-\logo [DVIWINDO] {dviwindo}
-\logo [EBCDIC] {ebcdic}
-\logo [EC] {ec}
-\logo [EIFFEL] {Eiffel}
-\logo [EMACS] {emacs}
-\logo [EMTEX] {em\TeX}
-\logo [ENCODING] {enc}
-\logo [ENCTEX] {enc\TeX}
-\logo [EPS] {eps}
-\logo [ETEX] {\eTeX}
+%logo [FGA] {fga}
+%logo [FGBBS] {fgbbs}
+\logo [ACROBAT] {Acro\-bat}
+\logo [AFM] {afm}
+\logo [API] {api}
+\logo [ALEPH] {Aleph} % {\mathematics{\aleph}}
+\logo [ALGOL] {ALGOL}
+\logo [AMS] {ams}
+\logo [AMSLATEX] {\AmSLaTeX}
+\logo [AMSTEX] {\AmSTeX}
+\logo [ANSI] {ansi}
+\logo [ARABTEX] {Arab\TeX}
+\logo [ASCII] {ascii}
+\logo [ASCIITEX] {ascii\TeX}
+\logo [BACHOTEX] {Bacho\TeX}
+\logo [BIBTEX] {bib\TeX}
+\logo [BLUESKY] {BlueSky}
+\logo [BMP] {bmp}
+\logo [BSD] {bsd}
+\logo [CCODE] {C}
+\logo [CPLUSPLUS] {C\high{++}}
+\logo [CALCMATH] {CalcMath}
+\logo [CD] {cd}
+\logo [CPU] {cpu}
+\logo [CDROM] {cdrom}
+\logo [CID] {cid}
+\logo [CJK] {cjk}
+\logo [CMR] {cmr}
+\logo [CLD] {cld}
+\logo [CMYK] {cmyk}
+\logo [CODHOST] {CodHost}
+\logo [CONTEXT] {\ConTeXt}
+\logo [CSS] {css}
+\logo [CTAN] {ctan}
+\logo [CTXTOOLS] {ctxtools}
+\logo [CWEB] {cweb}
+\logo [CSTUG] {cstug}
+\logo [DANTE] {Dante}
+\logo [DISTILLER] {distiller}
+\logo [DRATEX] {Dra\TeX}
+\logo [DSC] {dsc}
+\logo [DTD] {dtd}
+\logo [DTK] {dtk}
+\logo [DTP] {dtp}
+\logo [DVD] {dvd}
+\logo [DVI] {dvi}
+\logo [DVIPDFM] {dvipdfm}
+\logo [DVIPDFMX] {dvipdfmx}
+\logo [DVIPOS] {dvipos}
+\logo [DVIPS] {dvips}
+\logo [DVIPSONE] {dvipsone}
+\logo [DVISCR] {dviscr}
+\logo [DVIWINDO] {dviwindo}
+\logo [EBCDIC] {ebcdic}
+\logo [EC] {ec}
+\logo [EIFFEL] {Eiffel}
+\logo [EMACS] {emacs}
+\logo [EMTEX] {em\TeX}
+\logo [ENCODING] {enc}
+\logo [ENCTEX] {enc\TeX}
+\logo [EPS] {eps}
+\logo [ETEX] {\eTeX}
\logo [EUROBACHOTEX] {EuroBacho\TeX}
-\logo [EUROMATH] {EuroMath}
-\logo [EUROTEX] {Euro\TeX}
-\logo [EXAMPLE] {eXaMpLe}
-\logo [EXAMPLED] {exampled}
-\logo [EXAMPLEQ] {exampleq}
-\logo [EXAMPLER] {exampler}
-\logo [EXAMPLET] {examplet}
-\logo [EXAMPLEX] {examplex}
-\logo [EXIMPLE] {eXiMpLe}
-\logo [FLAC] {flac}
-\logo [FAQ] {faq}
-\logo [FDF] {fdf}
-\logo [FONTFORGE] {FontForge}
-\logo [FOXET] {foXet}
-\logo [FPTEX] {fp\TeX}
-\logo [FREEBSD] {FreeBSD}
-\logo [FTP] {ftp}
-\logo [GHOSTSCRIPT]{Ghost\-script}
-\logo [GHOSTVIEW] {Ghost\-view}
-\logo [GIF] {gif}
-\logo [GNU] {gnu}
-\logo [GNUPLOT] {gnuplot}
-\logo [GS] {Ghost\-Script}
-\logo [GUST] {Gust}
-\logo [GWTEX] {gw\TeX}
-\logo [HSB] {hsb}
-\logo [HTML] {html}
-\logo [HTTP] {http}
-\logo [HZ] {hz}
-\logo [IBM] {ibm}
-\logo [IMAGEMAGICK]{ImageMagick}
-\logo [INITEX] {ini\TeX}
-\logo [INRSTEX] {inrs\TeX}
-\logo [IO] {io}
-\logo [IRCNET] {IRCnet}
-\logo [ISO] {iso}
-\logo [JAVA] {Java}
-\logo [JAVASCRIPT] {Java\-Script}
-\logo [JPEG] {jpeg}
-\logo [JPG] {jpg}
-\logo [KPATHSEA] {kpathsea}
-\logo [KPSE] {kpse}
-\logo [KPSEWHICH] {kpsewhich}
-\logo [MKTEXLSR] {mktexlsr}
-\logo [LAMSTEX] {\LamSTeX}
-\logo [LATEX] {\LaTeX}
-\logo [LATEXTE] {\LaTeX2e}
-\logo [LATEXTN] {\LaTeX2.09}
-\logo [LCD] {lcd}
-\logo [LINUX] {linux}
-\logo [LISP] {Lisp}
-\logo [LPEG] {lpeg}
-\logo [LUA] {Lua}
-\logo [LUAJIT] {LuaJIT}
-\logo [LUATEX] {Lua\TeX}
-\logo [LUATOOLS] {luatools}
-\logo [LMX] {lmx}
-\logo [MACOSX] {MacOSX}
-\logo [MACROTEX] {Macro\TeX}
-\logo [MAKEMPY] {MakeMPY}
-\logo [MAPPING] {map}
-\logo [MAPS] {Maps}
-\logo [MATHML] {MathML}
-\logo [METAFONT] {\MetaFont}
-\logo [METAPOST] {\MetaPost}
-\logo [METATEX] {Meta\TeX}
-\logo [MIKTEX] {Mik\TeX}
-\logo [MLTEX] {ml\TeX}
-\logo [METATYPE] {MetaType1}
-\logo [MODULA] {Modula}
-\logo [MOV] {mov}
-\logo [MPS] {mps}
-\logo [MPTOPDF] {mptopdf}
-\logo [MPLIB] {mplib}
-\logo [MSDOS] {msdos}
-\logo [MICROSOFT] {Microsoft}
-\logo [MSWINDOWS] {MS~Windows}
-\logo [MSWORD] {MS~Word}
-\logo [MTXRUN] {mtxrun}
-\logo [MTXTOOLS] {mtxtools}
-\logo [NETPBM] {NetPBM}
-\logo [NTG] {ntg}
-\logo [NTS] {nts}
-\logo [OFM] {ofm}
-\logo [OMEGA] {Omega}
-\logo [OPENMATH] {OpenMath}
-\logo [OPENTYPE] {OpenType}
-\logo [OPI] {opi}
-\logo [OTEX] {Oriental \TeX}
-\logo [OTF] {otf}
-\logo [OTP] {otp}
-\logo [OVF] {ovf}
-\logo [PASCAL] {Pascal}
-\logo [PCTEX] {pc\TeX}
-\logo [PFA] {pfa}
-\logo [PFB] {pfb}
-\logo [PDF] {pdf}
-\logo [PDFETEX] {pdfe\TeX}
-\logo [PDFTEX] {pdf\TeX}
-\logo [PDFTOOLS] {pdftools}
-\logo [PDFTOPS] {pdftops}
-\logo [PERL] {Perl}
-\logo [PERLTK] {Perl/Tk}
-\logo [PICTEX] {\PiCTeX}
-\logo [PK] {pk}
-\logo [PLAIN] {Plain}
-\logo [PNG] {png}
-\logo [POSIX] {posix}
-\logo [POSTSCRIPT] {Post\-Script}
-\logo [PPCHTEX] {\PPCHTeX}
-\logo [PRAGMA] {Pragma ADE}
-\logo [PRESS] {press}
-\logo [PRIFIL] {prifil}
-\logo [PS] {Post\-Script}
-\logo [PSCHECK] {pscheck}
-\logo [PSTOEDIT] {pstoedit}
-\logo [PSTOPAGE] {pstopage}
-\logo [PSTOPDF] {pstopdf}
-\logo [PSTRICKS] {pstricks}
-\logo [RAM] {ram}
-\logo [READER] {Acro\-bat Reader}
-\logo [RELAXNG] {Relax\kern.125emNG}
-\logo [RGB] {rgb}
-\logo [RLXTOOLS] {rlxtools}
-\logo [RUBY] {Ruby}
-\logo [SCITE] {SciTE}
-\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
-\logo [TETEX] {te\TeX} % no sc te
-\logo [TEX] {\TeX}
-\logo [TEXADRES] {\TeX adress}
-\logo [TEXBASE] {\TeX base}
-\logo [TEXEDIT] {\TeX edit}
-\logo [TEXEXEC] {\TeX exec}
-\logo [TEXFONT] {\TeX font}
-\logo [TEXFORM] {\TeX form}
-\logo [TEXLIVE] {\TeX Live}
-\logo [TEXLUA] {\TeX Lua}
-\logo [TEXMF] {texmf}
-\logo [TEXMFSTART] {texmfstart}
-\logo [TEXNL] {tex-nl}
-\logo [TEXSHOW] {\TeX show}
-\logo [TEXSPELL] {\TeX spell}
-\logo [TEXGYRE] {\TeX\ Gyre}
-\logo [TEXSYNC] {texsync}
-\logo [TEXTMATE] {TextMate}
-\logo [TEXTOOLS] {\TeX tools}
-\logo [TEXUTIL] {\TeX util}
-\logo [TEXWORK] {\TeX work}
-\logo [TEXXET] {\TeX\XeT} \def\XeT{XeT}
-\logo [TFM] {tfm}
-\logo [TIF] {tif}
-\logo [TIFF] {tiff}
-\logo [TIFFINFO] {tiffinfo}
-\logo [TIFFTAGS] {tifftags}
-\logo [TMFTOOLS] {tmftools}
-\logo [TPIC] {tpic}
-\logo [TPM] {tpm}
-\logo [TRUETYPE] {TrueType}
-\logo [TTC] {ttc}
-\logo [TTF] {ttf}
-\logo [TUG] {tug}
-\logo [TUGBOAT] {Tug\-Boat}
-\logo [TUGNEWS] {Tug\-News}
-\logo [TYPEONE] {Type1}
-\logo [UCS] {ucs}
-\logo [UNICODE] {Uni\-code}
-\logo [UNIX] {Unix}
-\logo [URI] {uri}
-\logo [URL] {url}
-\logo [USA] {usa}
-\logo [USENET] {usenet}
-\logo [UTF] {utf}
-\logo [USB] {usb}
-\logo [VF] {vf}
-\logo [WDT] {wdt}
-\logo [WEB] {web}
-\logo [WEBC] {web2c}
-\logo [WIKI] {Wiki}
-\logo [WINDOWS] {Windows}
-\logo [WINNT] {WinNT}
-\logo [WINNX] {Win9x}
-\logo [WWW] {www}
-\logo [WTHREEC] {W3C}
-\logo [WYSIWYG] {wysiwyg}
-\logo [XDVI] {Xdvi}
-\logo [XETEX] {\XeTeX}
-\logo [XFDF] {xfdf}
-\logo [XHTML] {xhtml}
-\logo [XINDY] {Xindy}
-\logo [XML] {xml}
-\logo [XPATH] {xpath}
-\logo [XMLTOOLS] {xmltools}
-\logo [XPDFETEX] {xpdfe\TeX}
-\logo [XSL] {xsl}
-\logo [XSLFO] {xsl-fo}
-\logo [XSLT] {xslt}
-\logo [XSLTPROC] {xsltproc}
-\logo [XYPIC] {XYPIC} % wrong logo
-\logo [YandY] {y\&y}
-\logo [ZIP] {zip}
+\logo [EUROMATH] {EuroMath}
+\logo [EUROTEX] {Euro\TeX}
+\logo [EXAMPLE] {eXaMpLe}
+\logo [EXAMPLED] {exampled}
+\logo [EXAMPLEQ] {exampleq}
+\logo [EXAMPLER] {exampler}
+\logo [EXAMPLET] {examplet}
+\logo [EXAMPLEX] {examplex}
+\logo [EXIMPLE] {eXiMpLe}
+\logo [FLAC] {flac}
+\logo [FAQ] {faq}
+\logo [FDF] {fdf}
+\logo [FONTFORGE] {FontForge}
+\logo [FOXET] {foXet}
+\logo [FPTEX] {fp\TeX}
+\logo [FREEBSD] {FreeBSD}
+\logo [FTP] {ftp}
+\logo [GHOSTSCRIPT] {Ghost\-script}
+\logo [GHOSTVIEW] {Ghost\-view}
+\logo [GIF] {gif}
+\logo [GNU] {gnu}
+\logo [GNUPLOT] {gnuplot}
+\logo [GS] {Ghost\-Script}
+\logo [GUST] {Gust}
+\logo [GCC] {gcc}
+\logo [GWTEX] {gw\TeX}
+\logo [HSB] {hsb}
+\logo [HTML] {html}
+\logo [HTTP] {http}
+\logo [HZ] {hz}
+\logo [IBM] {ibm}
+\logo [IMAGEMAGICK] {ImageMagick}
+\logo [INITEX] {ini\TeX}
+\logo [INRSTEX] {inrs\TeX}
+\logo [IO] {io}
+\logo [IRCNET] {IRCnet}
+\logo [ISO] {iso}
+\logo [JAVA] {Java}
+\logo [JAVASCRIPT] {Java\-Script}
+\logo [JPEG] {jpeg}
+\logo [JPG] {jpg}
+\logo [KPATHSEA] {kpathsea}
+\logo [KPSE] {kpse}
+\logo [KPSEWHICH] {kpsewhich}
+\logo [MKTEXLSR] {mktexlsr}
+\logo [MYSQL] {MySQL}
+\logo [LAMSTEX] {\LamSTeX}
+\logo [LATEX] {\LaTeX}
+\logo [LATEXTE] {\LaTeX2e}
+\logo [LATEXTN] {\LaTeX2.09}
+\logo [LCD] {lcd}
+\logo [LINUX] {linux}
+\logo [LISP] {Lisp}
+\logo [LPEG] {lpeg}
+\logo [LUA] {Lua}
+\logo [LUAJIT] {LuaJIT}
+\logo [LUATEX] {Lua\TeX}
+\logo [LUATOOLS] {luatools}
+\logo [LMX] {lmx}
+\logo [MACOSX] {MacOSX}
+\logo [MACROTEX] {Macro\TeX}
+\logo [MAKEMPY] {MakeMPY}
+\logo [MAPPING] {map}
+\logo [MAPS] {Maps}
+\logo [MATHML] {MathML}
+\logo [METAFONT] {\MetaFont}
+\logo [METAPOST] {\MetaPost}
+\logo [METATEX] {Meta\TeX}
+\logo [MIKTEX] {Mik\TeX}
+\logo [MINGW] {MingW}
+\logo [MLTEX] {ml\TeX}
+\logo [METATYPE] {MetaType1}
+\logo [MODULA] {Modula}
+\logo [MOV] {mov}
+\logo [MPS] {mps}
+\logo [MPTOPDF] {mptopdf}
+\logo [MPLIB] {mplib}
+\logo [MSDOS] {msdos}
+\logo [MICROSOFT] {Microsoft}
+\logo [MSWINDOWS] {MS~Windows}
+\logo [MSWORD] {MS~Word}
+\logo [MTXRUN] {mtxrun}
+\logo [MTXTOOLS] {mtxtools}
+\logo [NETPBM] {NetPBM}
+\logo [NTG] {ntg}
+\logo [NTS] {nts}
+\logo [OFM] {ofm}
+\logo [OMEGA] {Omega}
+\logo [OPENMATH] {OpenMath}
+\logo [OPENTYPE] {OpenType}
+\logo [OPI] {opi}
+\logo [OTEX] {Oriental \TeX}
+\logo [OTF] {otf}
+\logo [OTP] {otp}
+\logo [OVF] {ovf}
+\logo [PASCAL] {Pascal}
+\logo [PCTEX] {pc\TeX}
+\logo [PFA] {pfa}
+\logo [PFB] {pfb}
+\logo [PDF] {pdf}
+\logo [PDFETEX] {pdfe\TeX}
+\logo [PDFTEX] {pdf\TeX}
+\logo [PDFTOOLS] {pdftools}
+\logo [PDFTOPS] {pdftops}
+\logo [PERL] {Perl}
+\logo [PERLTK] {Perl/Tk}
+\logo [PICTEX] {\PiCTeX}
+\logo [PK] {pk}
+\logo [PLAIN] {Plain}
+\logo [PNG] {png}
+\logo [POSIX] {posix}
+\logo [POSTSCRIPT] {Post\-Script}
+\logo [PPCHTEX] {\PPCHTeX}
+\logo [PRAGMA] {Pragma ADE}
+\logo [PRESS] {press}
+\logo [PRIFIL] {prifil}
+\logo [PS] {Post\-Script}
+\logo [PSCHECK] {pscheck}
+\logo [PSTOEDIT] {pstoedit}
+\logo [PSTOPAGE] {pstopage}
+\logo [PSTOPDF] {pstopdf}
+\logo [PSTRICKS] {pstricks}
+\logo [RAM] {ram}
+\logo [READER] {Acro\-bat Reader}
+\logo [RELAXNG] {Relax\kern.125emNG}
+\logo [RGB] {rgb}
+\logo [RLXTOOLS] {rlxtools}
+\logo [RUBY] {Ruby}
+\logo [SCITE] {SciTE}
+\logo [SGML] {sgml}
+\logo [SI] {si}
+\logo [SQL] {sql}
+\logo [SVG] {svg}
+\logo [SWIG] {swig}
+\logo [TABLE] {\TaBlE}
+\logo [TCPIP] {tcp/ip}
+\logo [TDS] {tds} % no sc te
+\logo [TETEX] {te\TeX} % no sc te
+\logo [TEX] {\TeX}
+\logo [TEXADRES] {\TeX adress}
+\logo [TEXBASE] {\TeX base}
+\logo [TEXEDIT] {\TeX edit}
+\logo [TEXEXEC] {\TeX exec}
+\logo [TEXFONT] {\TeX font}
+\logo [TEXFORM] {\TeX form}
+\logo [TEXLIVE] {\TeX Live}
+\logo [TEXLUA] {\TeX Lua}
+\logo [TEXMF] {texmf}
+\logo [TEXMFSTART] {texmfstart}
+\logo [TEXNL] {tex-nl}
+\logo [TEXSHOW] {\TeX show}
+\logo [TEXSPELL] {\TeX spell}
+\logo [TEXGYRE] {\TeX\ Gyre}
+\logo [TEXSYNC] {texsync}
+\logo [TEXTMATE] {TextMate}
+\logo [TEXTOOLS] {\TeX tools}
+\logo [TEXUTIL] {\TeX util}
+\logo [TEXWORK] {\TeX work}
+\logo [TEXXET] {\TeX\XeT} \def\XeT{XeT}
+\logo [TFM] {tfm}
+\logo [TIF] {tif}
+\logo [TIFF] {tiff}
+\logo [TIFFINFO] {tiffinfo}
+\logo [TIFFTAGS] {tifftags}
+\logo [TMFTOOLS] {tmftools}
+\logo [TPIC] {tpic}
+\logo [TPM] {tpm}
+\logo [TRUETYPE] {TrueType}
+\logo [TTC] {ttc}
+\logo [TTF] {ttf}
+\logo [TUG] {tug}
+\logo [TUGBOAT] {Tug\-Boat}
+\logo [TUGNEWS] {Tug\-News}
+\logo [TYPEONE] {Type1}
+\logo [UCS] {ucs}
+\logo [UNICODE] {Uni\-code}
+\logo [UNIX] {Unix}
+\logo [URI] {uri}
+\logo [URL] {url}
+\logo [USA] {usa}
+\logo [USENET] {usenet}
+\logo [UTF] {utf}
+\logo [USB] {usb}
+\logo [VF] {vf}
+\logo [WDT] {wdt}
+\logo [WEB] {web}
+\logo [WEBC] {web2c}
+\logo [WIKI] {Wiki}
+\logo [WINDOWS] {Windows}
+\logo [WINNT] {WinNT}
+\logo [WINNX] {Win9x}
+\logo [WWW] {www}
+\logo [WTHREEC] {W3C}
+\logo [WYSIWYG] {wysiwyg}
+\logo [XDVI] {Xdvi}
+\logo [XETEX] {\XeTeX}
+\logo [XFDF] {xfdf}
+\logo [XHTML] {xhtml}
+\logo [XINDY] {Xindy}
+\logo [XML] {xml}
+\logo [XPATH] {xpath}
+\logo [XMLTOOLS] {xmltools}
+\logo [XPDFETEX] {xpdfe\TeX}
+\logo [XSL] {xsl}
+\logo [XSLFO] {xsl-fo}
+\logo [XSLT] {xslt}
+\logo [XSLTPROC] {xsltproc}
+\logo [XYPIC] {XYPIC} % wrong logo
+\logo [YandY] {y\&y}
+\logo [ZIP] {zip}
\def\METAFUN {\MetaFun}
diff --git a/tex/context/base/s-pre-62.tex b/tex/context/base/s-pre-62.tex
index cc9762e12..a1a405c23 100644
--- a/tex/context/base/s-pre-62.tex
+++ b/tex/context/base/s-pre-62.tex
@@ -220,5 +220,5 @@
\long\def\StartTitlePage #1\StopTitlePage {\TitlePage {#1}}
\long\def\StartSubTitlePage#1\StopSubTitlePage{\SubTitlePage{#1}}
-\doifnotmode{demo} {\endinput}
+\endinput
diff --git a/tex/context/base/s-pre-63.tex b/tex/context/base/s-pre-63.tex
index 0535fc1d0..974c67a5f 100644
--- a/tex/context/base/s-pre-63.tex
+++ b/tex/context/base/s-pre-63.tex
@@ -67,6 +67,7 @@ this module is under reconstruction
\setupbodyfont[8pt] \definefont[BigFont][Normal sa 4]
\starttext
+
\StartPage
\StartPair \StartLeft ZAPF \StopLeft \StartRight \input zapf \StopRight \StopPair
\StartPair \StartLeft DAVIS \StopLeft \StartRight \input davis \StopRight \StopPair
diff --git a/tex/context/base/s-pre-67.tex b/tex/context/base/s-pre-67.tex
index 88043aa24..84ea1a66c 100644
--- a/tex/context/base/s-pre-67.tex
+++ b/tex/context/base/s-pre-67.tex
@@ -119,7 +119,7 @@
\setupwhitespace
[big]
-\def\MyCommand#1#2%
+\unexpanded\def\MyCommand#1#2%
{\setlayer[title][preset=rightbottom,x=.75cm,y=.5cm]{#2}}
\def\titlepage#1#2%
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 4b9d11360..5b6dd8af6 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 56417a2f8..46a19e3b1 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/strc-mat.mkiv b/tex/context/base/strc-mat.mkiv
index fce085916..2395a6412 100644
--- a/tex/context/base/strc-mat.mkiv
+++ b/tex/context/base/strc-mat.mkiv
@@ -177,7 +177,7 @@
\def\strc_formulas_handle_number % formulas
{\strc_formulas_check_reference\c_strc_formulas_number_mode\currentformulareference}
-\def\strc_formulas_handle_sub_number % sub formulas
+\def\strc_formulas_handle_sub_number_indeed % sub formulas
{\strc_formulas_check_reference\c_strc_formulas_sub_number_mode\currentsubformulasreference
\strc_counters_increment\v!formula
\strc_formulas_store_number
@@ -187,6 +187,15 @@
\currentsubformulassynchronize
\currentsubformulasattribute}
+\def\strc_formulas_handle_sub_number % sub formulas
+ {\iftrialtypesetting
+ \strc_counters_save\v!formula
+ \strc_formulas_handle_sub_number_indeed
+ \strc_counters_restore\v!formula
+ \else
+ \strc_formulas_handle_sub_number_indeed
+ \fi}
+
\let\strc_formulas_reference_trace\relax
\let\strc_formulas_reference_show \relax
@@ -322,18 +331,36 @@
% needs checking ... too many:
-\def\strc_formulas_handle_numbering
+\def\strc_formulas_handle_numbering_indeed
{\strc_counters_increment\v!formula
\doiftext\currentplaceformulasuffix{\strc_counters_setown_sub\v!formula\plustwo\currentplaceformulasuffix}%
\placecurrentformulanumber}
-\def\strc_formulas_handle_sub_numbering
+\def\strc_formulas_handle_numbering
+ {\iftrialtypesetting
+ \strc_counters_save\v!formula
+ \strc_formulas_handle_numbering_indeed
+ \strc_counters_restore\v!formula
+ \else
+ \strc_formulas_handle_numbering_indeed
+ \fi}
+
+\def\strc_formulas_handle_sub_numbering_indeed
{\let\strc_formulas_handle_sub_numbering\relax % else error: see math/numbering-001.tex
\doiftextelse\currentsubformulasuffix
{\strc_counters_setown_sub\v!formula\plustwo\currentsubformulasuffix}
{\strc_counters_increment_sub\v!formula\plustwo}%
\placecurrentformulanumber}
+\def\strc_formulas_handle_sub_numbering
+ {\iftrialtypesetting
+ \strc_counters_save\v!formula
+ \strc_formulas_handle_sub_numbering_indeed
+ \strc_counters_restore\v!formula
+ \else
+ \strc_formulas_handle_sub_numbering_indeed
+ \fi}
+
\def\strc_formulas_number_indeed
{\ifconditional\c_strc_formulas_handle_number
\hbox\bgroup
diff --git a/tex/context/base/strc-not.mkvi b/tex/context/base/strc-not.mkvi
index 6daf4e9ad..18289cc96 100644
--- a/tex/context/base/strc-not.mkvi
+++ b/tex/context/base/strc-not.mkvi
@@ -122,11 +122,14 @@
%D The code here is mostly the same as enumersations but we want to keep them
%D isolated and at some point we might differentiate.
+% \installcorenamespace{noteclass}
+
\unexpanded\def\strc_define_commands_notation#1#2#3% current level parent
{\doifelsenothing{#3}
{\normalexpanded{\defineconstruction[#1][\s!handler=\v!notation,\c!level=#2]}%
\setevalue{\??notation#1:\s!parent}{\??notation}}%
{\normalexpanded{\defineconstruction[#1][#3][\s!handler=\v!notation,\c!level=#2]}%
+ \setevalue{\??note#1:\s!parent}{\??note#3}% see later for \s!note
\setevalue{\??notation#1:\s!parent}{\??notation#3}}%
\setuevalue{\e!next #1}{\strc_notations_next }%
\setuevalue{\c!reset#1}{\strc_notations_reset }%
@@ -174,7 +177,6 @@
\strc_notes_setup_counter\currentnotation
\to \everydefinenotation
-
\let\p_strc_constructions_title \empty
\let\p_strc_constructions_number\empty
@@ -362,19 +364,38 @@
%D Insertions are part of notes.
-\installcorenamespace{noteinsertion}
+% \installcorenamespace{noteinsertion}
+
+\def\currentnoteinsertion {\noteparameter\s!insert}
+\def\currentnoteinsertionnumber{\namedinsertionnumber{\noteparameter\s!insert}}
+
+% \appendtoks
+% \doifinsertionelse\currentnote
+% \donothing
+% {\defineinsertion[\currentnote]% could be an option
+% \normalexpanded{\t_strc_notes{\the\t_strc_notes\noexpand\strc_notes_process_list{\currentnote}}}}%
+% \letnoteparameter\s!insert\currentnote
+% \ctxcommand{definenote("\currentnote","insert",\number\currentnoteinsertionnumber)}%
+% \ifx\currentnoteparent\empty
+% \definenotation[\currentnote][\c!type=\v!note]%
+% \else
+% \definenotation[\currentnote][\currentnoteparent][\c!type=\v!note]%
+% \fi
+% \to \everydefinenote
\appendtoks
- \defineinsertion[\currentnote]%
- \doifinsertionelse\currentnote
- {\normalexpanded{\t_strc_notes{\the\t_strc_notes\noexpand\strc_notes_process_list{\currentnote}}}}
- \donothing
- \ctxcommand{definenote("\currentnote","insert",\number\namedinsertionnumber\currentnote)}%
\ifx\currentnoteparent\empty
+ \doifinsertionelse\currentnote
+ \donothing
+ {\defineinsertion[\currentnote]% could be an option
+ \normalexpanded{\t_strc_notes{\the\t_strc_notes\noexpand\strc_notes_process_list{\currentnote}}}}%
+ \letnoteparameter\s!insert\currentnote
\definenotation[\currentnote][\c!type=\v!note]%
\else
+ \setexpandednoteparameter\s!insert{\namednoteparameter\currentnoteparent\s!insert}%
\definenotation[\currentnote][\currentnoteparent][\c!type=\v!note]%
\fi
+ \ctxcommand{definenote("\currentnote","insert",\number\currentnoteinsertionnumber)}%
\to \everydefinenote
% maybe we will share this at some point:
@@ -847,7 +868,7 @@
\ifx\p_factor\empty \else
\ifnum\p_factor<\zerocount \else
% \global
- \count\namedinsertionnumber\currentnote\p_factor % new: global
+ \count\currentnoteinsertionnumber\p_factor % new: global
\fi
\fi}
@@ -963,10 +984,10 @@
{\setfalse\c_strc_notes_delayed
\strc_notes_set_distance
\strc_notes_set_columns
- \page_inserts_set_location\currentnote\v!page % \setupinsertion[\currentnote][\c!location=\v!page]%
- \global\count\namedinsertionnumber\currentnote\numexpr\plusthousand/\c_strc_notes_columns\relax
- \global\dimen\namedinsertionnumber\currentnote\ifnotelimit\dimexpr\noteparameter\c!height*\c_strc_notes_columns\relax\else\maxdimen\fi
- \global\skip \namedinsertionnumber\currentnote\s_strc_notes_distance}
+ \page_inserts_set_location\currentnoteinsertion\v!page % \setupinsertion[\currentnote][\c!location=\v!page]%
+ \global\count\currentnoteinsertionnumber\numexpr\plusthousand/\c_strc_notes_columns\relax
+ \global\dimen\currentnoteinsertionnumber\ifnotelimit\dimexpr\noteparameter\c!height*\c_strc_notes_columns\relax\else\maxdimen\fi
+ \global\skip \currentnoteinsertionnumber\s_strc_notes_distance}
\def\strc_notes_set_location_columns
{\setfalse\c_strc_notes_delayed
@@ -975,19 +996,19 @@
\ifnum\currentnofcolumns=\zerocount
\c_strc_notes_columns\plusone
\fi
- \page_inserts_set_location\currentnote\v!columns % \setupinsertion[\currentnote][\c!location=\v!columns]%
- \global\count\namedinsertionnumber\currentnote\numexpr\plusthousand/\c_strc_notes_columns\relax
- \global\dimen\namedinsertionnumber\currentnote\ifnotelimit\dimexpr\noteparameter\c!height*\c_strc_notes_columns\relax\else\maxdimen\fi
- \global\skip \namedinsertionnumber\currentnote\s_strc_notes_distance}
+ \page_inserts_set_location\currentnoteinsertion\v!columns % \setupinsertion[\currentnote][\c!location=\v!columns]%
+ \global\count\currentnoteinsertionnumber\numexpr\plusthousand/\c_strc_notes_columns\relax
+ \global\dimen\currentnoteinsertionnumber\ifnotelimit\dimexpr\noteparameter\c!height*\c_strc_notes_columns\relax\else\maxdimen\fi
+ \global\skip \currentnoteinsertionnumber\s_strc_notes_distance}
\def\strc_notes_set_location_somecolumn#whatcolumn%
{\setfalse\c_strc_notes_delayed
\strc_notes_set_distance
\strc_notes_set_columns
- \page_inserts_set_location\currentnote#whatcolumn% \setupinsertion[\currentnote][\c!location=#whatcolumn]%
- \global\count\namedinsertionnumber\currentnote\plusthousand
- \global\dimen\namedinsertionnumber\currentnote\ifnotelimit\noteparameter\c!height\else\maxdimen\fi
- \global\skip \namedinsertionnumber\currentnote\s_strc_notes_distance}
+ \page_inserts_set_location\currentnoteinsertion#whatcolumn% \setupinsertion[\currentnote][\c!location=#whatcolumn]%
+ \global\count\currentnoteinsertionnumber\plusthousand
+ \global\dimen\currentnoteinsertionnumber\ifnotelimit\noteparameter\c!height\else\maxdimen\fi
+ \global\skip \currentnoteinsertionnumber\s_strc_notes_distance}
\def\strc_notes_set_location_firstcolumn{\strc_notes_set_location_somecolumn\v!firstcolumn}
\def\strc_notes_set_location_lastcolumn {\strc_notes_set_location_somecolumn\v!lastcolumn }
@@ -995,10 +1016,10 @@
\def\strc_notes_set_location_text % we don't use inserts anyway (e.g. endnotes)
{\settrue\c_strc_notes_delayed
\ctxcommand{setnotestate("\currentnote","store")}%
- \page_inserts_set_location\currentnote\v!text % \setupinsertion[\currentnote][\c!location=\v!text]%
- \global\count\namedinsertionnumber\currentnote\zerocount
- \global\dimen\namedinsertionnumber\currentnote\maxdimen
- \global\skip \namedinsertionnumber\currentnote\zeropoint}
+ \page_inserts_set_location\currentnoteinsertion\v!text % \setupinsertion[\currentnote][\c!location=\v!text]%
+ \global\count\currentnoteinsertionnumber\zerocount
+ \global\dimen\currentnoteinsertionnumber\maxdimen
+ \global\skip \currentnoteinsertionnumber\zeropoint}
\let\strc_notes_set_location_none\strc_notes_set_location_text
@@ -1022,7 +1043,7 @@
\newconditional\c_notes_bottom_present
\def\strc_notes_check_if_bottom_present_indeed % in otr !
- {\ifvoid\namedinsertionnumber\currentnote\else
+ {\ifvoid\currentnoteinsertionnumber\else
\strc_notes_set_position
\fi}
@@ -1143,7 +1164,7 @@
\strc_constructions_initialize{#1}%
\strc_notes_synchronize
\the\everybeforenoteinsert
- \insert\namedinsertionnumber\currentnote\bgroup
+ \insert\currentnoteinsertionnumber\bgroup
\the\everyinsidenoteinsert\relax
\doprocesslocalsetups{\noteparameter\c!setups}% experimental
\doifelse{\noteparameter\c!paragraph}\v!yes
@@ -1166,7 +1187,7 @@
\edef\currentnote{#1}%
\strc_constructions_initialize{#1}%
\strc_notes_synchronize
- \edef\currentconstructionlistentry{\ctxcommand{notelistindex("#1",#2)}}% index in list cache
+ \edef\currentconstructionlistentry{\ctxcommand{notelistindex("\currentnote",#2)}}% index in list cache
% as we can have collected notes (e.g. in tables) we need to recover
% \currentdescriptionattribute and \currentdescriptionsynchronize
%
@@ -1186,7 +1207,7 @@
% \endgroup
}
-\unexpanded\def\strc_notes_inject_text
+\unexpanded\def\strc_notes_inject_text % hm main?
{\ctxcommand{savedlisttitle("\currentconstructionmain",\currentconstructionlistentry)}}
\let\startpushnote\relax
@@ -1245,14 +1266,14 @@
\def\strc_notes_place_inserts
{\strc_notes_set_delayed % \strc_notes_synchronize % we need to know if it's delayed
\ifconditional\c_strc_notes_delayed \else
- \ifdim\ht\namedinsertionnumber\currentnote>\zeropoint % or a faster delayed test
+ \ifdim\ht\currentnoteinsertionnumber>\zeropoint % or a faster delayed test
\strc_notes_place_inserts_indeed
\fi
\fi}
\def\strc_notes_place_inserts_indeed
{\relax
- \ifdim\ht\namedinsertionnumber\currentnote>\zeropoint
+ \ifdim\ht\currentnoteinsertionnumber>\zeropoint
\endgraf
\ifvmode
\whitespace
@@ -1320,7 +1341,7 @@
{\doifelse{\noteparameter\c!paragraph}\v!yes
{\vbox
{\beginofshapebox
- \iftrialtypesetting\unvcopied\else\unvboxed\fi\namedinsertionnumber\currentnote
+ \iftrialtypesetting\unvcopied\else\unvboxed\fi\currentnoteinsertionnumber
\endofshapebox
\let\strc_notes_between_paragraphs_indeed\strc_notes_between_paragraphs_first % shape works reverse
\doreshapebox
@@ -1328,7 +1349,7 @@
\donothing \donothing \donothing % get rid of penalties etc
\innerflushshapebox
\convertvboxtohbox}}
- {\iftrialtypesetting\unvcopied\else\unvboxed\fi\namedinsertionnumber\currentnote}}
+ {\iftrialtypesetting\unvcopied\else\unvboxed\fi\currentnoteinsertionnumber}}
%D Supporting end notes is surprisingly easy. Even better, we
%D can combine this feature with solving the common \TEX\
@@ -1598,7 +1619,7 @@
\strc_notes_process\strc_notes_check_presence}
\def\strc_notes_check_presence
- {\ifdim\ht\namedinsertionnumber\currentnote>\zeropoint
+ {\ifdim\ht\currentnoteinsertionnumber>\zeropoint
\notespresenttrue
\fi}
@@ -1638,16 +1659,16 @@
\def\docalculatetotalnoteheight
{\ifcase\c_strc_notes_page_location % tricky here ! ! ! to be sorted out ! ! !
- \advance\totalnoteheight\normalexpanded{\additionaltotalnoteheight\namedinsertionnumber\currentnote}%
+ \advance\totalnoteheight\normalexpanded{\additionaltotalnoteheight\currentnoteinsertionnumber}%
\fi}
\def\docalculatetotalclevernoteheight
{\ifcase\c_strc_notes_page_location \else % tricky here ! ! ! to be sorted out ! ! !
- \advance\totalnoteheight\normalexpanded{\additionaltotalnoteheight\namedinsertionnumber\currentnote}%
+ \advance\totalnoteheight\normalexpanded{\additionaltotalnoteheight\currentnoteinsertionnumber}%
\fi}
\def\docalculatetotalpagenoteheight
- {\advance\totalnoteheight\normalexpanded{\additionaltotalnoteheight\namedinsertionnumber\currentnote}}
+ {\advance\totalnoteheight\normalexpanded{\additionaltotalnoteheight\currentnoteinsertionnumber}}
\def\calculatetotalnoteheight {\totalnoteheight\zeropoint\strc_notes_process\docalculatetotalnoteheight}
\def\calculatetotalclevernoteheight{\totalnoteheight\zeropoint\strc_notes_process\docalculatetotalclevernoteheight}
@@ -1675,7 +1696,7 @@
%D \stoptyping
% \def\dosynchronizenotes
-% {\ifvoid\namedinsertionnumber\currentnote\else\insert\namedinsertionnumber\currentnote{\unvbox\namedinsertionnumber\currentnote}\fi}
+% {\ifvoid\currentnoteinsertionnumber\else\insert\currentnoteinsertionnumber{\unvbox\currentnoteinsertionnumber}\fi}
%
% \def\synchronizenotes
% {\strc_notes_process\dosynchronizenotes}
diff --git a/tex/context/base/trac-vis.lua b/tex/context/base/trac-vis.lua
index 9349a2aac..3876d0907 100644
--- a/tex/context/base/trac-vis.lua
+++ b/tex/context/base/trac-vis.lua
@@ -25,7 +25,8 @@ local format = string.format
-- unless one is demoing.
-- We could use pdf literals and re stream codes but it's not worth the
--- trouble because we would end up in color etc mess.
+-- trouble because we would end up in color etc mess. Maybe one day I'll
+-- make a nodeinjection variant.
-- todo: global switch (so no attributes)
-- todo: maybe also xoffset, yoffset of glyph
@@ -55,6 +56,8 @@ local xspace_code = gluecodes.xspace
local leftskip_code = gluecodes.leftskip
local rightskip_code = gluecodes.rightskip
+local whatsitcodes = nodes.whatsitcodes
+
local concat_nodes = nodes.concat
local hpack_nodes = node.hpack
local vpack_nodes = node.vpack
@@ -144,10 +147,6 @@ local modes = {
user = 2048,
}
--- local modes_makeup = { "hbox", "vbox", "vtop", "kern", "glue", "penalty" }
--- local modes_boxes = { "hbox", "vbox", "vtop" }
--- local modes_all = { "hbox", "vbox", "vtop", "kern", "glue", "penalty", "fontkern", "whatsit", "glyph", "user" }
-
local modes_makeup = { "hbox", "vbox", "kern", "glue", "penalty" }
local modes_boxes = { "hbox", "vbox" }
local modes_all = { "hbox", "vbox", "kern", "glue", "penalty", "fontkern", "whatsit", "glyph", "user" }
@@ -344,13 +343,45 @@ end
local w_cache = { }
+local tags = {
+ open = "FIC",
+ write = "FIW",
+ close = "FIC",
+ special = "SPE",
+ localpar = "PAR",
+ dir = "DIR",
+ pdfliteral = "PDF",
+ pdfrefobj = "PDF",
+ pdfrefxform = "PDF",
+ pdfrefximage = "PDF",
+ pdfannot = "PDF",
+ pdfstartlink = "PDF",
+ pdfendlink = "PDF",
+ pdfdest = "PDF",
+ pdfthread = "PDF",
+ pdfstartthread = "PDF",
+ pdfendthread = "PDF",
+ pdfsavepos = "PDF",
+ pdfthreaddata = "PDF",
+ pdflinkdata = "PDF",
+ pdfcolorstack = "PDF",
+ pdfsetmatrix = "PDF",
+ pdfsave = "PDF",
+ pdfrestore = "PDF",
+ latelua = "LUA",
+ closelua = "LUA",
+ cancelboundary = "CBD",
+ userdefined = "USR",
+}
+
local function whatsit(head,current)
local what = current.subtype
local info = w_cache[what]
if info then
-- print("hit whatsit")
else
- local info = sometext(format("W:%s",what),usedfont)
+ local tag = whatsitcodes[what]
+ info = sometext(format("W:%s",tag and tags[tag] or what),usedfont)
set_attribute(info,a_layer,l_whatsit)
w_cache[what] = info
end
@@ -364,7 +395,7 @@ local function user(head,current)
if info then
-- print("hit user")
else
- local info = sometext(format("U:%s",what),usedfont)
+ info = sometext(format("U:%s",what),usedfont)
set_attribute(info,a_layer,l_user)
w_cache[what] = info
end
diff --git a/tex/context/base/trac-vis.mkiv b/tex/context/base/trac-vis.mkiv
index 70968fb35..0e4993853 100644
--- a/tex/context/base/trac-vis.mkiv
+++ b/tex/context/base/trac-vis.mkiv
@@ -48,22 +48,23 @@
\unexpanded\def\ruledhbox{\syst_visualizers_hbox attr \visualattribute \ctxcommand{visual("simplehbox")} }
\unexpanded\def\ruledvbox{\syst_visualizers_vbox attr \visualattribute \ctxcommand{visual("simplevbox")} }
\unexpanded\def\ruledvtop{\syst_visualizers_vtop attr \visualattribute \ctxcommand{visual("simplevtop")} } % special case
+\unexpanded\def\ruledtopv{\syst_visualizers_vtop attr \visualattribute \ctxcommand{visual("vtop")} }
\unexpanded\def\showmakeup
{\ctxcommand{setvisual("makeup")}%
- \let\normalvtop\ruledvtop
- \let\vtop \ruledvtop}
+ \let\normalvtop\ruledtopv
+ \let\vtop \ruledtopv}
\unexpanded\def\showallmakeup
{\ctxcommand{setvisual("all")}%
- \let\normalvtop\ruledvtop
- \let\vtop \ruledvtop
+ \let\normalvtop\ruledtopv
+ \let\vtop \ruledtopv
\showstruts}
\unexpanded\def\showboxes
{\ctxcommand{setvisual("boxes")}%
- \let\normalvtop\ruledvtop
- \let\vtop \ruledvtop}
+ \let\normalvtop\ruledtopv
+ \let\vtop \ruledtopv}
\unexpanded\def\showglyphs
{\ctxcommand{setvisual("glyph")}}
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index c2719a495..d87f182f7 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 : 10/06/12 15:31:31
+-- merge date : 10/15/12 19:10:22
do -- begin closure to overcome local limits and interference