summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-rw-r--r--tex/context/base/mkii/mult-ro.mkii1
-rw-r--r--tex/context/base/mkiv/char-prv.lua14
-rw-r--r--tex/context/base/mkiv/cldf-stp.lua4
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv4
-rw-r--r--tex/context/base/mkiv/font-con.lua4
-rw-r--r--tex/context/base/mkiv/font-ctx.lua10
-rw-r--r--tex/context/base/mkiv/font-ini.mkvi8
-rw-r--r--tex/context/base/mkiv/font-syn.lua56
-rw-r--r--tex/context/base/mkiv/luat-cod.lua17
-rw-r--r--tex/context/base/mkiv/math-fbk.lua7
-rw-r--r--tex/context/base/mkiv/mult-def.lua4
-rw-r--r--tex/context/base/mkiv/node-ser.lua1
-rw-r--r--tex/context/base/mkiv/page-sid.mkiv27
-rw-r--r--tex/context/base/mkiv/spac-ver.mkiv19
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin25545 -> 25561 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin250920 -> 250934 bytes
-rw-r--r--tex/context/base/mkiv/strc-def.mkiv69
-rw-r--r--tex/context/base/mkiv/strc-flt.mkvi3
-rw-r--r--tex/context/base/mkiv/supp-box.lua39
-rw-r--r--tex/context/base/mkiv/trac-vis.mkiv2
-rw-r--r--tex/context/interface/mkii/keys-ro.xml1
-rw-r--r--tex/context/interface/mkiv/context-en.xml10
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin847309 -> 846988 bytes
-rw-r--r--tex/context/interface/mkiv/i-file.xml2
-rw-r--r--tex/context/interface/mkiv/i-floats.xml4
-rw-r--r--tex/context/interface/mkiv/i-fonts.xml10
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin60774 -> 60776 bytes
-rw-r--r--tex/context/modules/mkiv/m-cweb.mkiv417
-rw-r--r--tex/context/modules/mkiv/m-subsub.mkiv76
-rw-r--r--tex/context/modules/mkiv/s-evohome.mkiv11
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua4
34 files changed, 475 insertions, 355 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index fe034a5fc..ca0154089 100644
--- a/tex/context/base/mkii/cont-new.mkii
+++ b/tex/context/base/mkii/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2018.01.19 13:42}
+\newcontextversion{2018.01.24 10:47}
%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/mkii/context.mkii b/tex/context/base/mkii/context.mkii
index 0704eecb1..f9a9e1c6c 100644
--- a/tex/context/base/mkii/context.mkii
+++ b/tex/context/base/mkii/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2018.01.19 13:42}
+\edef\contextversion{2018.01.24 10:47}
%D For those who want to use this:
diff --git a/tex/context/base/mkii/mult-ro.mkii b/tex/context/base/mkii/mult-ro.mkii
index ad4e4f214..80f45102b 100644
--- a/tex/context/base/mkii/mult-ro.mkii
+++ b/tex/context/base/mkii/mult-ro.mkii
@@ -849,6 +849,7 @@
\setinterfaceconstant{headerstate}{stareantet}
\setinterfaceconstant{headlabel}{etichetatitlu}
\setinterfaceconstant{headnumber}{numartitlu}
+\setinterfaceconstant{headseparator}{headseparator}
\setinterfaceconstant{headstyle}{stiltitlu}
\setinterfaceconstant{height}{inaltime}
\setinterfaceconstant{hfactor}{hfactor}
diff --git a/tex/context/base/mkiv/char-prv.lua b/tex/context/base/mkiv/char-prv.lua
index 95aec3bb8..9a4f44dd2 100644
--- a/tex/context/base/mkiv/char-prv.lua
+++ b/tex/context/base/mkiv/char-prv.lua
@@ -106,6 +106,20 @@ characters.private={
mathname="mapsfromchar",
unicodeslot=0xFE324,
},
+ [0xFE33E]={
+ description="TOP OF 0x023E",
+ mathclass="topaccent",
+ mathextensible="r",
+ mathstretch="h",
+ unicodeslot=0xFE33E,
+ },
+ [0xFE33F]={
+ description="BOTTOM OF 0x023E",
+ mathclass="botaccent",
+ mathextensible="r",
+ mathstretch="h",
+ unicodeslot=0xFE33E,
+ },
[0xFE350]={
category="sm",
description="MATHEMATICAL DOUBLE ARROW LEFT END",
diff --git a/tex/context/base/mkiv/cldf-stp.lua b/tex/context/base/mkiv/cldf-stp.lua
index d548e6ac4..389cfb7f7 100644
--- a/tex/context/base/mkiv/cldf-stp.lua
+++ b/tex/context/base/mkiv/cldf-stp.lua
@@ -18,8 +18,8 @@ if not modules then modules = { } end modules ['cldf-stp'] = {
-- ...
-- context.step(nil|...)
-- ...
--- context.step(nil|...)
--- ...
+-- context.step(nil|...)
+-- ...
-- end)
-- ...
-- context.step(nil|...)
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 1242ca657..175a90c27 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2018.01.19 13:42}
+\newcontextversion{2018.01.24 10:47}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index ca15299f4..90b424dc9 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -41,7 +41,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2018.01.19 13:42}
+\edef\contextversion{2018.01.24 10:47}
\edef\contextkind {beta}
%D For those who want to use this:
@@ -269,7 +269,7 @@
\loadmarkfile{spac-hor}
\loadmarkfile{spac-ali}
\loadmarkfile{spac-flr}
-\loadmarkfile{spac-ver}
+\loadmarkfile{spac-ver} % beware, hooks into strc-sec
\loadmarkfile{spac-lin}
\loadmarkfile{spac-pag}
\loadmarkfile{spac-par}
diff --git a/tex/context/base/mkiv/font-con.lua b/tex/context/base/mkiv/font-con.lua
index f4fe474c3..bad4140f3 100644
--- a/tex/context/base/mkiv/font-con.lua
+++ b/tex/context/base/mkiv/font-con.lua
@@ -841,7 +841,7 @@ function constructors.scale(tfmdata,specification)
local ok = false
for i=1,#vc do
local key = vc[i][1]
- if key == "right" or key == "down" then
+ if key == "right" or key == "down" or key == "rule" then
ok = true
break
end
@@ -1044,8 +1044,6 @@ function constructors.hashfeatures(specification) -- will be overloaded
local features = specification.features
if features then
local t, n = { }, 0
--- inspect(features)
--- for category, list in next, features do
for category, list in sortedhash(features) do
if next(list) then
local hasher = hashmethods[category]
diff --git a/tex/context/base/mkiv/font-ctx.lua b/tex/context/base/mkiv/font-ctx.lua
index ec7eabb53..638cd9b3a 100644
--- a/tex/context/base/mkiv/font-ctx.lua
+++ b/tex/context/base/mkiv/font-ctx.lua
@@ -17,7 +17,7 @@ local context, commands = context, commands
local format, gmatch, match, find, lower, upper, gsub, byte, topattern = string.format, string.gmatch, string.match, string.find, string.lower, string.upper, string.gsub, string.byte, string.topattern
local concat, serialize, sort, fastcopy, mergedtable = table.concat, table.serialize, table.sort, table.fastcopy, table.merged
local sortedhash, sortedkeys, sequenced = table.sortedhash, table.sortedkeys, table.sequenced
-local settings_to_hash, hash_to_string = utilities.parsers.settings_to_hash, utilities.parsers.hash_to_string
+local settings_to_hash, hash_to_string, settings_to_array = utilities.parsers.settings_to_hash, utilities.parsers.hash_to_string, utilities.parsers.settings_to_array
local formatcolumns = utilities.formatters.formatcolumns
local mergehashes = utilities.parsers.mergehashes
local formatters = string.formatters
@@ -3086,3 +3086,11 @@ else
report_adding("adding characters to %!font:name! is not yet supported",id)
end
end
+
+implement {
+ name = "addfontpath",
+ arguments = "string",
+ actions = function(list)
+ names.addruntimepath(settings_to_array(list))
+ end
+}
diff --git a/tex/context/base/mkiv/font-ini.mkvi b/tex/context/base/mkiv/font-ini.mkvi
index 91459d18e..ee20d7b32 100644
--- a/tex/context/base/mkiv/font-ini.mkvi
+++ b/tex/context/base/mkiv/font-ini.mkvi
@@ -2832,4 +2832,12 @@
% \let\fontalternative#alternative%
% \font_helpers_synchronize_font}}
+%D \macros
+%D {addfontpath}
+%D
+%D A way to add a path at runtime (no need to generate database):
+
+\unexpanded\def\usefontpath[#1]%
+ {\clf_addfontpath{#1}}
+
\protect \endinput
diff --git a/tex/context/base/mkiv/font-syn.lua b/tex/context/base/mkiv/font-syn.lua
index 52ddf621f..4a9b81be2 100644
--- a/tex/context/base/mkiv/font-syn.lua
+++ b/tex/context/base/mkiv/font-syn.lua
@@ -16,7 +16,7 @@ if not modules then modules = { } end modules ['font-syn'] = {
local next, tonumber, type, tostring = next, tonumber, type, tostring
local sub, gsub, match, find, lower, upper = string.sub, string.gsub, string.match, string.find, string.lower, string.upper
-local concat, sort, fastcopy = table.concat, table.sort, table.fastcopy
+local concat, sort, fastcopy, tohash = table.concat, table.sort, table.fastcopy, table.tohash
local serialize, sortedhash = table.serialize, table.sortedhash
local lpegmatch = lpeg.match
local unpack = unpack or table.unpack
@@ -35,6 +35,7 @@ local splitname = file.splitname
local basename = file.basename
local nameonly = file.nameonly
local pathpart = file.pathpart
+local suffixonly = file.suffix
local filejoin = file.join
local is_qualified_path = file.is_qualified_path
local exists = io.exists
@@ -423,9 +424,10 @@ filters.list = {
-- to be considered: loop over paths per list entry (so first all otf ttf etc)
-names.fontconfigfile = "fonts.conf" -- a bit weird format, bonus feature
-names.osfontdirvariable = "OSFONTDIR" -- the official way, in minimals etc
-names.extrafontsvariable = "EXTRAFONTS" -- the official way, in minimals etc
+names.fontconfigfile = "fonts.conf" -- a bit weird format, bonus feature
+names.osfontdirvariable = "OSFONTDIR" -- the official way, in minimals etc
+names.extrafontsvariable = "EXTRAFONTS" -- the official way, in minimals etc
+names.runtimefontsvariable = "RUNTIMEFONTS" -- the official way, in minimals etc
filters.paths = { }
filters.names = { }
@@ -1515,10 +1517,54 @@ end
-- end
-- end
+local runtimefiles = { }
+local runtimedone = false
+
+local function addruntimepath(path)
+ names.load()
+ local paths = type(path) == "table" and path or { path }
+ local suffixes = tohash(filters.list)
+ for i=1,#paths do
+ local path = resolveprefix(paths[i])
+ if path ~= "" then
+ local list = dir.glob(path.."/*")
+ for i=1,#list do
+ local fullname = list[i]
+ local suffix = lower(suffixonly(fullname))
+ if suffixes[suffix] then
+ local c = cleanfilename(fullname)
+ runtimefiles[c] = fullname
+ if trace_names then
+ report_names("adding runtime filename %a for %a",c,fullname)
+ end
+ end
+ end
+ end
+ end
+end
+
+local function addruntimefiles(variable)
+ local paths = variable and resolvers.expandedpathlistfromvariable(variable)
+ if paths and #paths > 0 then
+ addruntimepath(paths)
+ end
+end
+
+names.addruntimepath = addruntimepath
+names.addruntimefiles = addruntimefiles
+
function names.getfilename(askedname,suffix) -- last resort, strip funny chars
+ if not runtimedone then
+ addruntimefiles(names.runtimefontsvariable)
+ runtimedone = true
+ end
+ local cleanname = cleanfilename(askedname,suffix)
+ local found = runtimefiles[cleanname]
+ if found then
+ return found
+ end
names.load()
local files = names.data.files
- local cleanname = cleanfilename(askedname,suffix)
local found = files and files[cleanname] or ""
if found == "" and is_reloaded() then
files = names.data.files
diff --git a/tex/context/base/mkiv/luat-cod.lua b/tex/context/base/mkiv/luat-cod.lua
index ad7f34270..5a2dc30cc 100644
--- a/tex/context/base/mkiv/luat-cod.lua
+++ b/tex/context/base/mkiv/luat-cod.lua
@@ -13,10 +13,19 @@ local texconfig, lua = texconfig, lua
-- some basic housekeeping
-texconfig.kpse_init = false
-texconfig.shell_escape = 't'
-texconfig.max_print_line = 100000
-texconfig.max_in_open = 1000
+texconfig.kpse_init = false
+texconfig.shell_escape = 't'
+
+texconfig.error_line = 79 -- frozen / large values can crash
+texconfig.expand_depth = 10000
+texconfig.half_error_line = 50 -- frozen
+texconfig.max_in_open = 1000
+texconfig.max_print_line = 100000
+texconfig.max_strings = 500000
+texconfig.nest_size = 1000
+texconfig.param_size = 25000
+texconfig.save_size = 100000
+texconfig.stack_size = 10000
-- registering bytecode chunks
diff --git a/tex/context/base/mkiv/math-fbk.lua b/tex/context/base/mkiv/math-fbk.lua
index dd3b84bd6..c10388570 100644
--- a/tex/context/base/mkiv/math-fbk.lua
+++ b/tex/context/base/mkiv/math-fbk.lua
@@ -15,6 +15,7 @@ local report_fallbacks = logs.reporter("math","fallbacks")
local formatters = string.formatters
local fastcopy = table.fastcopy
local byte = string.byte
+local sortedhash = table.sortedhash
local fallbacks = { }
mathematics.fallbacks = fallbacks
@@ -114,7 +115,7 @@ function fallbacks.apply(target,original)
}
target.mathrelation = data
--
- for k, v in next, virtualcharacters do
+ for k, v in sortedhash(virtualcharacters) do
if not characters[k] then
local tv = type(v)
local cd = nil
@@ -123,7 +124,7 @@ function fallbacks.apply(target,original)
elseif tv == "number" then
cd = characters[v]
elseif tv == "function" then
- cd = v(data)
+ cd = v(data) -- ,k
end
if cd then
characters[k] = cd
@@ -314,7 +315,7 @@ local function accent_to_extensible(target,newchr,original,oldchr,height,depth,s
local characters = target.characters
local olddata = characters[oldchr]
-- brrr ... pagella has only next
- if olddata and not olddata.commands and olddata.width > 0 then
+ if olddata and not olddata.commands then -- not: and olddata.width > 0
local addprivate = fonts.helpers.addprivate
if swap then
swap = characters[swap]
diff --git a/tex/context/base/mkiv/mult-def.lua b/tex/context/base/mkiv/mult-def.lua
index 59c2ed605..49371fee8 100644
--- a/tex/context/base/mkiv/mult-def.lua
+++ b/tex/context/base/mkiv/mult-def.lua
@@ -8202,6 +8202,10 @@ return {
["pe"]="تبدیل‌سر",
["ro"]="conversietitlu",
},
+ ["headseparator"]={
+ ["en"]="headseparator",
+ ["nl"]="kopscheider",
+ },
["header"]={
["cs"]="zahlavi",
["de"]="kopfzeile",
diff --git a/tex/context/base/mkiv/node-ser.lua b/tex/context/base/mkiv/node-ser.lua
index f1be21f84..7ed2b8d00 100644
--- a/tex/context/base/mkiv/node-ser.lua
+++ b/tex/context/base/mkiv/node-ser.lua
@@ -106,6 +106,7 @@ nodes.ignorablefields = ignore
local function astable(n,sparse) -- not yet ok, might get obsolete anyway
n = tonode(n)
local f = getfields(n)
+ local t = { }
for i=1,#f do
local v = f[i]
local d = n[v]
diff --git a/tex/context/base/mkiv/page-sid.mkiv b/tex/context/base/mkiv/page-sid.mkiv
index e8f2b03a4..46e4cd073 100644
--- a/tex/context/base/mkiv/page-sid.mkiv
+++ b/tex/context/base/mkiv/page-sid.mkiv
@@ -204,7 +204,13 @@
\def\page_sides_flush_floats_text
{\par
- \ifdim\dimexpr\d_page_sides_vsize-\d_page_sides_bottomskip-\pagetotal\relax>\zeropoint % -\pagedepth
+ \ifdim\dimexpr
+ \d_page_sides_vsize
+ \ifnum\c_anch_backgrounds_text_level>\plusone
+ -\d_page_sides_bottomskip
+ \fi
+ -\pagetotal
+ \relax>\zeropoint % -\pagedepth
\page_sides_flush_floats_progress
\page_sides_flush_floats_after_none
\fi
@@ -271,7 +277,14 @@
\forgetall
\offinterlineskip
\doloop
- {\scratchdimen\dimexpr\d_page_sides_vsize-\d_page_sides_bottomskip-\pagetotal-\pagedepth\relax
+ {\scratchdimen\dimexpr
+ \d_page_sides_vsize
+ \ifnum\c_anch_backgrounds_text_level>\plusone
+ -\d_page_sides_bottomskip
+ \fi
+ -\pagetotal
+ -\pagedepth
+ \relax
\ifdim\scratchdimen>\onepoint % good enough, if we change it it will become a threshold
\ifnum\recurselevel>\plushundred % safeguard, sort of deadcycles
\exitloop
@@ -863,10 +876,10 @@
%D We need to hook it into the other otr's. This code will be adapted once we rename
%D the callers. We use \type {\def} as they can be redefined! Some will become obsolete
-\def\checksidefloat {\page_sides_check_floats}
-\def\flushsidefloats {\page_sides_flush_floats_text}
-\def\flushsidefloatsafterpar{\page_sides_flush_floats_after_par}
-\def\forgetsidefloats {\page_sides_forget_floats}
-%def\synchronizesidefloats {\page_sides_synchronize_floats}
+\unexpanded\def\checksidefloat {\page_sides_check_floats}
+\unexpanded\def\flushsidefloats {\page_sides_flush_floats_text}
+\unexpanded\def\flushsidefloatsafterpar{\page_sides_flush_floats_after_par}
+\unexpanded\def\forgetsidefloats {\page_sides_forget_floats}
+%unexpanded\def\synchronizesidefloats {\page_sides_synchronize_floats}
\protect \endinput
diff --git a/tex/context/base/mkiv/spac-ver.mkiv b/tex/context/base/mkiv/spac-ver.mkiv
index 1e173f5e8..7c84eef45 100644
--- a/tex/context/base/mkiv/spac-ver.mkiv
+++ b/tex/context/base/mkiv/spac-ver.mkiv
@@ -2220,14 +2220,23 @@
\definevspacing[\s!default] [\v!white] % was big for a while
-% \dorecurse{10} % todo: other values < 4000
-% {\normalexpanded{\definevspacing[\v!samepage-\recurselevel][penalty:\the\numexpr4000+250*\recurselevel\relax]}}
-
\newcount\c_spac_vspacing_special_base \c_spac_vspacing_special_base = 32250 % 4000
\newcount\c_spac_vspacing_special_step \c_spac_vspacing_special_step = 10 % 250
-\dorecurse{10}
- {\normalexpanded{\definevspacing[\v!samepage-\recurselevel][penalty:\the\numexpr\c_spac_vspacing_special_base+\c_spac_vspacing_special_step*\recurselevel\relax]}}
+\unexpanded\def\spac_vspacing_define_same_page#1%
+ {\normalexpanded{\definevspacing
+ [\v!samepage-#1]%
+ [penalty:\the\numexpr\c_spac_vspacing_special_base+\c_spac_vspacing_special_step*#1\relax]}}
+
+\dorecurse{20}{\spac_vspacing_define_same_page{#1}}
+
+\ifdefined\everydefinesection
+ \appendtoks
+ \spac_vspacing_define_same_page\maxstructuredepth
+ \to \everydefinesection
+\else
+ % the order has changed so this code has to move to strf-def.mkiv then
+\fi
\definevspacing[\v!default] [\v!big] % todo: needs to adapt to \setupblank
\definevspacing[\v!before] [\v!default] % but we need to avoid circular references
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 39922f868..2cfc16874 100644
--- a/tex/context/base/mkiv/status-files.pdf
+++ b/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf
index b7a223056..c9db9f1d6 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/strc-def.mkiv b/tex/context/base/mkiv/strc-def.mkiv
index db97d8626..8d1fa371f 100644
--- a/tex/context/base/mkiv/strc-def.mkiv
+++ b/tex/context/base/mkiv/strc-def.mkiv
@@ -181,6 +181,75 @@
[\v!appendix\c!label=\v!subsubsection,
\v!bodypart\c!label=\v!subsubsection] % bijlageconversie=\Character
+% extras
+
+\definesection[\s!section-8] % subsubsubsubsubsection
+\definesection[\s!section-9] % subsubsubsubsubsubsection
+\definesection[\s!section-10] % subsubsubsubsubsubsubsection
+\definesection[\s!section-11] % subsubsubsubsubsubsubsubsection
+\definesection[\s!section-12] % subsubsubsubsubsubsubsubsubsection
+
+\definehead
+ [\v!subsubsubsubsubsection]
+ [\c!section=\s!section-8,
+ \c!default=\v!subsubsubsubsection]
+
+\definehead
+ [\v!subsubsubsubsubsubsection]
+ [\c!section=\s!section-9,
+ \c!default=\v!subsubsubsubsubsection]
+
+\definehead
+ [\v!subsubsubsubsubsubsubsection]
+ [\c!section=\s!section-10,
+ \c!default=\v!subsubsubsubsubsubsection]
+
+\definehead
+ [\v!subsubsubsubsubsubsubsubsection]
+ [\c!section=\s!section-11,
+ \c!default=\v!subsubsubsubsubsubsubsection]
+
+\definehead
+ [\v!subsubsubsubsubsubsubsubsubsection]
+ [\c!section=\s!section-12,
+ \c!default=\v!subsubsubsubsubsubsubsubsection]
+
+\definehead
+ [\v!subsubsubsubsubsubject]
+ [\c!coupling=\v!subsubsubsubsubsection,
+ \c!default=\v!subsubsubsubsubsection,
+ \c!incrementnumber=\v!no]
+
+\definehead
+ [\v!subsubsubsubsubsubsubject]
+ [\c!coupling=\v!subsubsubsubsubsubsection,
+ \c!default=\v!subsubsubsubsubsubsection,
+ \c!incrementnumber=\v!no]
+
+\definehead
+ [\v!subsubsubsubsubsubsubsubject]
+ [\c!coupling=\v!subsubsubsubsubsubsubsection,
+ \c!default=\v!subsubsubsubsubsubsubsection,
+ \c!incrementnumber=\v!no]
+
+\definehead
+ [\v!subsubsubsubsubsubsubsubsubject]
+ [\c!coupling=\v!subsubsubsubsubsubsubsubsection,
+ \c!default=\v!subsubsubsubsubsubsubsubsection,
+ \c!incrementnumber=\v!no]
+
+\definehead
+ [\v!subsubsubsubsubsubsubsubsubsubject]
+ [\c!coupling=\v!subsubsubsubsubsubsubsubsubsection,
+ \c!default=\v!subsubsubsubsubsubsubsubsubsection,
+ \c!incrementnumber=\v!no]
+
+\defineprefixset
+ [\v!all]
+ [section-1,section-2,section-3,section-4,section-5,section-6,section-7,%
+ section-8,section-9,section-10,section-11,section-12]
+ []
+
% \setuphead
\setuphead
diff --git a/tex/context/base/mkiv/strc-flt.mkvi b/tex/context/base/mkiv/strc-flt.mkvi
index 2d085b62b..78fe0b400 100644
--- a/tex/context/base/mkiv/strc-flt.mkvi
+++ b/tex/context/base/mkiv/strc-flt.mkvi
@@ -344,7 +344,8 @@
\hbox{\usefloatcaptionstyleandcolor\c!headstyle\c!headcolor\thecurrentfloatnumber}%
\ifnofloatcaption \else \ifemptyfloatcaption \else
\doifelsenothing{\floatcaptionparameter\c!spaceinbetween}
- {\scratchskip\floatcaptionparameter\c!distance\relax
+ {\floatcaptionparameter\c!headseparator\relax
+ \scratchskip\floatcaptionparameter\c!distance\relax
\dotfskip\scratchskip\emergencystretch.5\scratchskip}
{\blank[\floatcaptionparameter\c!spaceinbetween]}%
\fi \fi
diff --git a/tex/context/base/mkiv/supp-box.lua b/tex/context/base/mkiv/supp-box.lua
index 1193c30b6..664477cfc 100644
--- a/tex/context/base/mkiv/supp-box.lua
+++ b/tex/context/base/mkiv/supp-box.lua
@@ -35,6 +35,7 @@ local tonode = nuts.tonode
----- getfield = nuts.getfield
local getnext = nuts.getnext
local getprev = nuts.getprev
+local getboth = nuts.getboth
local getdisc = nuts.getdisc
local getid = nuts.getid
local getlist = nuts.getlist
@@ -80,9 +81,8 @@ local texsetdimen = tex.setdimen
local function hyphenatedlist(head,usecolor)
local current = head and tonut(head)
while current do
- local id = getid(current)
- local next = getnext(current)
- local prev = getprev(current)
+ local id = getid(current)
+ local prev, next = getboth(current)
if id == disc_code then
local pre, post, replace = getdisc(current)
if not usecolor then
@@ -99,31 +99,14 @@ local function hyphenatedlist(head,usecolor)
flush_list(replace)
end
setdisc(current)
- setboth(current)
--- local list = setlink (
--- pre and new_penalty(10000),
--- pre,
--- current,
--- post,
--- post and new_penalty(10000)
--- )
--- local tail = find_tail(list)
--- if prev then
--- setlink(prev,list)
--- end
--- if next then
--- setlink(tail,next)
--- end
- setlink (
- prev, -- there had better be one
- pre and new_penalty(10000),
- pre,
- current,
- post,
- post and new_penalty(10000),
- next
- )
- -- flush_node(current)
+ if pre then
+ setlink(prev,new_penalty(10000),pre)
+ setlink(find_tail(pre),current)
+ end
+ if post then
+ setlink(current,new_penalty(10000),post)
+ setlink(find_tail(post),next)
+ end
elseif id == vlist_code or id == hlist_code then
hyphenatedlist(getlist(current))
end
diff --git a/tex/context/base/mkiv/trac-vis.mkiv b/tex/context/base/mkiv/trac-vis.mkiv
index 922e78a7c..a6a3fa5a2 100644
--- a/tex/context/base/mkiv/trac-vis.mkiv
+++ b/tex/context/base/mkiv/trac-vis.mkiv
@@ -1,6 +1,6 @@
%D \module
%D [ file=trac-vis, % replaces supp-vis plus some s-* modules
-%D version=2112.06.23, % 1996.10.21,
+%D version=2012.06.23, % 1996.10.21,
%D title=\CONTEXT\ Tracing Macros,
%D subtitle=Visualization,
%D author=Hans Hagen,
diff --git a/tex/context/interface/mkii/keys-ro.xml b/tex/context/interface/mkii/keys-ro.xml
index 175c60ee3..71f7226cd 100644
--- a/tex/context/interface/mkii/keys-ro.xml
+++ b/tex/context/interface/mkii/keys-ro.xml
@@ -855,6 +855,7 @@
<cd:constant name='headerstate' value='stareantet'/>
<cd:constant name='headlabel' value='etichetatitlu'/>
<cd:constant name='headnumber' value='numartitlu'/>
+ <cd:constant name='headseparator' value='headseparator'/>
<cd:constant name='headstyle' value='stiltitlu'/>
<cd:constant name='height' value='inaltime'/>
<cd:constant name='hfactor' value='hfactor'/>
diff --git a/tex/context/interface/mkiv/context-en.xml b/tex/context/interface/mkiv/context-en.xml
index 9e5ae6ba4..c3b44e3ea 100644
--- a/tex/context/interface/mkiv/context-en.xml
+++ b/tex/context/interface/mkiv/context-en.xml
@@ -10190,6 +10190,9 @@
<cd:parameter name="distance">
<cd:constant type="cd:dimension"/>
</cd:parameter>
+ <cd:parameter name="headseparator">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
<cd:parameter name="inbetween">
<cd:constant type="cd:command"/>
</cd:parameter>
@@ -12924,6 +12927,13 @@
</cd:keywords>
</cd:arguments>
</cd:command>
+ <cd:command category="fonts" file="font-ini.mkvi" level="style" name="addfontpath">
+ <cd:arguments>
+ <cd:keywords list="yes">
+ <cd:constant type="cd:path"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
</cd:interface>
<cd:interface file="i-form.xml">
<cd:command category="pdf" file="scrn-fld.mkvi" level="style" name="setupforms">
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index 98476832c..7543cd36f 100644
--- a/tex/context/interface/mkiv/i-context.pdf
+++ b/tex/context/interface/mkiv/i-context.pdf
Binary files differ
diff --git a/tex/context/interface/mkiv/i-file.xml b/tex/context/interface/mkiv/i-file.xml
index bf12e5825..df649e8e0 100644
--- a/tex/context/interface/mkiv/i-file.xml
+++ b/tex/context/interface/mkiv/i-file.xml
@@ -407,4 +407,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/tex/context/interface/mkiv/i-floats.xml b/tex/context/interface/mkiv/i-floats.xml
index 977ed3aa7..92f48e0b1 100644
--- a/tex/context/interface/mkiv/i-floats.xml
+++ b/tex/context/interface/mkiv/i-floats.xml
@@ -290,6 +290,10 @@
<cd:parameter name="distance">
<cd:constant type="cd:dimension"/>
</cd:parameter>
+ <!-- headstyle headcolor headseparator -->
+ <cd:parameter name="headseparator">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
<cd:parameter name="inbetween">
<cd:constant type="cd:command"/>
</cd:parameter>
diff --git a/tex/context/interface/mkiv/i-fonts.xml b/tex/context/interface/mkiv/i-fonts.xml
index 4dfd8214d..2f9d890a9 100644
--- a/tex/context/interface/mkiv/i-fonts.xml
+++ b/tex/context/interface/mkiv/i-fonts.xml
@@ -1715,4 +1715,12 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+ <!-- question for ws: maybe move to i-file with ... level="system" category="structure" ... -->
+
+ <cd:command name="addfontpath" level="style" category="fonts" file="font-ini.mkvi">
+ <cd:arguments>
+ <cd:resolve name="keyword-path-list"/>
+ </cd:arguments>
+ </cd:command>
+
+</cd:interface>
diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf
index f321d93ea..4c03f5cb1 100644
--- a/tex/context/interface/mkiv/i-readme.pdf
+++ b/tex/context/interface/mkiv/i-readme.pdf
Binary files differ
diff --git a/tex/context/modules/mkiv/m-cweb.mkiv b/tex/context/modules/mkiv/m-cweb.mkiv
index eb2395e48..2bf4e967f 100644
--- a/tex/context/modules/mkiv/m-cweb.mkiv
+++ b/tex/context/modules/mkiv/m-cweb.mkiv
@@ -11,7 +11,8 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-%D This module has to be redone in the mkiv way. Stepwise.
+%D This module has to be redone in the mkiv way and I do that stepwise so the
+%D current code is not okay.
% todo:
%
@@ -24,26 +25,24 @@
%D \gdef\CWEBquote#1.{{\em Quote :}\ #1.} % checks the .
%D
-%D This module (re)implements the \CWEB\ macros as defined in the file
-%D \type{cwebmac.tex}.
+%D This module (re)implements the \CWEB\ macros as defined in the file \type
+%D {cwebmac.tex}. \CWEB\ uses short, often one character long, names for macros.
+%D This is no real problem because no one is supposed to read and understand the
+%D files generated by \CWEB. The standard macros are meant for \PLAIN\ \TEX\ users.
+%D In \CONTEXT\ and other macro packages however, there is a potential conflict with
+%D format specific or user defined commands. Furthermore, the \CWEB\ macros
+%D implement their own output routines. When integrating \CWEB\ documents in another
+%D environment, the \CWEB\ specific macros have to be made local. The first part of
+%D this module is dedicated to this feature.
%D
-%D \CWEB\ uses short, often one character long, names for macros. This is no real
-%D problem because no one is supposed to read and understand the files generated by
-%D \CWEB. The standard macros are meant for \PLAIN\ \TEX\ users. In \CONTEXT\ and
-%D other macro packages however, there is a potential conflict with format specific
-%D or user defined commands. Furthermore, the \CWEB\ macros implement their own
-%D output routines. When integrating \CWEB\ documents in another environment, the
-%D \CWEB\ specific macros have to be made local. The first part of this module is
-%D dedicated to this feature.
-%D
-%D Instead of using \type{\def} and \type{\let} for defining macros, we use:
+%D Instead of using \type {\def} and \type {\let} for defining macros, we use:
%D
%D \starttyping
%D \defCEBmacro arguments {meaning}
%D \letCEBmacro arguments {meaning}
%D \stoptyping
%D
-%D \CWEB files contain implicit calls to macros that generate the table of contents,
+%D \CWEB\ files contain implicit calls to macros that generate the table of contents,
%D the lists of sections and the index. Because we want to be much more flexible, we
%D implemented our own alternatives, and therefore have to bypass the original ones.
%D The next macro is used for defining these obsolete \CWEB\ macros. The dummies
@@ -57,6 +56,10 @@
%D purposes. First it enables us to activate the \CWEB\ macros, which are saved
%D under a different name, second it can be used to temporary restore the meanings,
%D for instance when the output routine builds the page.
+%D
+%D We don't provide specific formatting commands. We just assume \CONTEXT\ being
+%D used (so you can use all it provides) and|/|or that specific user macros are
+%D implemented somewhere else.
\unprotect
@@ -69,7 +72,7 @@
%D \deactivateCWEB
%D \stoptyping
%D
-%D Which are implemented as:
+%D These are implemented as:
\unexpanded\def\activateCWEB
{\let\doCWEB\activateCWEBmacro
@@ -80,7 +83,7 @@
\the\CWEBmacros}
%D The three definition macros append the name of the macro to the list. The first
-%D two macros save the meaning, the last one assigns \type{{}} to the macro and
+%D two macros save the meaning, the last one assigns \type {{}} to the macro and
%D gobbles original meaning.
\installcorenamespace{newCWEB}
@@ -99,7 +102,7 @@
\setuvalue{\??newCWEB\string#1}#2{}%
\gobbleoneargument}
-%D The macro \type{\defCWEBdummy} of course takes care of the argument. This leaves
+%D The macro \type {\defCWEBdummy} of course takes care of the argument. This leaves
%D the two (de|)|activating macros:
\unexpanded\def\CWEBmacro#1%
@@ -107,7 +110,7 @@
\unexpanded\def\activateCWEBmacro#1%
{\letvalue{\??oldCWEB\string#1}=#1%
- \unexpanded\def#1{\CWEBmacro#1}} % really \unexpanded here?
+ \unexpanded\def#1{\CWEBmacro#1}}
\unexpanded\def\deactivateCWEBmacro#1%
{\expandafter\let\expandafter#1\csname\??oldCWEB\string#1\endcsname}
@@ -130,47 +133,15 @@
%D
%D The next is based on the standard macros for CWEB listings (in addition to \type
%D {plain.tex}) Version 3.1 --- September 1994.
-%D
-%D \macros{.}{}
+
+%D \macros{.}
%D
%D \CWEBquote preserve a way to get the dot accent (all other accents will still
%D work as usual).
\letCWEBmacro\: = \.
-%D \macros{mc,sc,cmntfont,eightrm}{}
-%D
-%D The naming of the fonts in in line with those in \PLAIN\ \TEX. Although \CONTEXT\
-%D implements its own scheme, there is still support for the \PLAIN\ ones. We keep
-%D the original names, but change their meaning. That way the macros obey switching
-%D to other sizes or styles.
-
-\defCWEBmacro\mc {\tx}
-\defCWEBmacro\sc {\txx}
-\defCWEBmacro\cmntfont {\ss}
-\defCWEBmacro\eightrm {\tx}
-
-%D \macros{tentex,sevenrm,sevensy,teni}{}
-%D
-%D The next one uses a temporary solution. The \type {cmtex10} font is not part of
-%D the default mechanism. We make use of the \CONTEXT\ variables \type {\textface},
-%D \type {\scriptface} and \type {\scriptscriptface}, which hold the current sizes.
-
-\defCWEBmacro\tentex {\tttf}
-
-% \defCWEBmacro\sevenrm {\getvalue{\scriptface rmtf}}
-% \defCWEBmacro\sevensy {\getvalue{\scriptface mmsy}}
-% \defCWEBmacro\teni {\getvalue{\textface mmmi}}
-
-%D \macros{CWEBpt}{}
-%D
-%D The original macros are based on a 10~point bodyfont size. We therefore have to
-%D specify dimension in points a bit different. Specifications like .6pt are changed
-%D to \type {.06} times \type {\bodyfontsize}.
-
-\defCWEBmacro\CWEBpt {\bodyfontsize}
-
-%D \macros{CEE,UNIX,TEX,CPLUSPLUS}{}
+%D \macros{CEE,UNIX,TEX,CPLUSPLUS}
%D
%D Next come some logo's. It does not make much sense to use the \CONTEXT\ logo
%D mechanism here, so we simply say:
@@ -181,7 +152,7 @@
\defCWEBmacro\CPLUSPLUS/{{\tx C\PP\spacefactor1000}}
\defCWEBmacro \Cee{\CEE/} % for backward compatibility
-%D \macros{\ }{}
+%D \macros{\ }
%D
%D Now we come to the real work: the short commands that make up the typography.
%D
@@ -191,7 +162,7 @@
{\dontleavehmode
\hbox{\it#1\/\kern.05em}}
-%D \macros{\string|}{}
+%D \macros{\string|}
%D
%D \CWEBquote one letter identifiers look better this way.
@@ -199,7 +170,7 @@
{\dontleavehmode
\hbox{$#1$}}
-%D \macros{\string\&}{}
+%D \macros{\string\&}
%D
%D \CWEBquote boldface type for reserved words.
@@ -207,39 +178,39 @@
{\dontleavehmode
\hbox{\bf#1\/\kern.05em}}
-%D \macros{.}{}
+%D \macros{.}
%D
%D Here we use the previously saved period. This macro takes care of special
%D characters in strings.
\defCWEBmacro\.#1%
{\dontleavehmode
- \hbox
- {\tttf % typewriter type for strings
- \let\\=\BS % backslash in a string
- \let\{=\LB % left brace in a string
- \let\}=\RB % right brace in a string
- \let\~=\TL % tilde in a string
- \let\ =\SP % space in a string
- \let\_=\UL % underline in a string
- \let\&=\AM % ampersand in a string
- \let\^=\CF % circumflex in a string
- #1\kern.05em}}
-
-%D \macros{)}{}
+ \hbox
+ {\tttf % typewriter type for strings
+ \let\\=\BS % backslash in a string
+ \let\{=\LB % left brace in a string
+ \let\}=\RB % right brace in a string
+ \let\~=\TL % tilde in a string
+ \let\ =\SP % space in a string
+ \let\_=\UL % underline in a string
+ \let\&=\AM % ampersand in a string
+ \let\^=\CF % circumflex in a string
+ #1\kern.05em}}
+
+%D \macros{)}
%D
%D Some discretionary hack.
\defCWEBmacro\)%
{\discretionary{\hbox{\tttf\BS}}{}{}}
-%D \macros{AT}{}
+%D \macros{AT}
%D
%D \CWEBquote at sign for control text (not needed in versions $>=$ 2.9).
\defCWEBmacro\AT{@}
-%D \macros{ATL,postATL,NOATL}{}
+%D \macros{ATL,postATL,NOATL}
%D
%D A two step macro that handles whatever.
@@ -251,16 +222,16 @@
\postATL}
\defCWEBmacro\postATL#1 #2 %
- {\bf letter \\{\WORD{\char"#1}} tangles as \tttf "#2"%
+ {\bf letter \\{\WORD{\char"#1}} tangles as \tttf \quotation{#2}%
\egroup
\par}
\defCWEBmacro\noATL#1 #2 %
{}
-%D \macros{noatl}{}
+%D \macros{noatl}
%D
-%D \CWEBquote suppress output from \type{@l}.
+%D \CWEBquote suppress output from \type {@l}.
\defCWEBmacro\noatl
{\let\ATL\noATL}
@@ -285,24 +256,28 @@
\letCWEBmacro\CF \letterhat % circumflex character in a string
\letCWEBmacro\SP \textvisiblespace % (visible) space in a string
+%D We're in mathmode, otherwise we could have:
+%D
+%D \starttyping
+%D \defCWEBmacro\PP{\raise.15em\hbox{\tx\textplus \kern-.05em\textplus }}
+%D \defCWEBmacro\MM{\raise.15em\hbox{\tx\textminus\kern .10em\textminus}}
+%D \defCWEBmacro\MG{\raise.15em\hbox{\rightarrow}}
+%D \stoptyping
+
\defCWEBmacro\PP % symbol for ++
- {\kern.05\CWEBpt
- \raise.1\CWEBpt\hbox{$\scriptstyle+\kern-.1\CWEBpt+$}%
- \kern.05\CWEBpt}
+ {\kern.05em
+ \raise.1em\hbox{$\scriptstyle+\kern-.1em+$}%
+ \kern.05em}
\defCWEBmacro\MM % symbol for --
- {\kern.05\CWEBpt
- \raise.1\CWEBpt\hbox{$\scriptstyle-\kern-.1\CWEBpt-$}%
- \kern.05\CWEBpt}
+ {\kern.05em
+ \raise.1em\hbox{$\scriptstyle-\kern-.1em-$}%
+ \kern.05em}
\defCWEBmacro\MG
- {\kern-.2\CWEBpt
- \lower.3\CWEBpt\hbox{$\rightarrow$}%
- \kern .1\CWEBpt}
-
-% \defCWEBmacro\PP{\raise.15em\hbox{\tx\textplus \kern-.05em\textplus }} % symbol for ++
-% \defCWEBmacro\MM{\raise.15em\hbox{\tx\textminus\kern .10em\textminus}} % symbol for --
-% \defCWEBmacro\MG{\raise.15em\hbox{\rightarrow}}
+ {\kern-.2em
+ \lower.3em\hbox{$\rightarrow$}%
+ \kern .1em}
\defCWEBmacro\MRL#1%
{\mathrel{\let\K==#1}}
@@ -336,28 +311,27 @@
\defCWEBmacro\3#1% optional break within a statement
{\hfil
- \penalty#10
+ \penalty#10\relax
\hfilneg}
\defCWEBmacro\4% backspace one notch
- {\hbox to -1em{}}
+ {\hpack to -1em{}}
\defCWEBmacro\5% optional break
{\hfil
- \penalty-1
+ \penalty\minusone
\hfilneg
\kern2.5em
- \hbox to -2em{}%
+ \hpack to -2em{}%
\ignorespaces}
\defCWEBmacro\6% forced break
- {\ifmmode
- \else
+ {\ifmmode \else
\par
\hangindent\CWEBind em
\noindent
\kern\CWEBind em
- \hbox to -2em{}%
+ \hpack to -2em{}%
\ignorespaces
\fi}
@@ -372,9 +346,10 @@
\defCWEBmacro\9#1%
{}
-\newcount\gdepth % depth of current major group, plus one
-\newcount\secpagedepth
-\secpagedepth=3 % page breaks will occur for depths -1, 0, and 1
+\newcount\CWEBgdepth % depth of current major group, plus one
+\newcount\CWEBsecpagedepth
+
+\CWEBsecpagedepth=3 % page breaks will occur for depths -1, 0, and 1
\defCWEBmacro\?%
{\mathrel?}
@@ -465,27 +440,27 @@
{\theCWEByskip}
\letCWEBmacro\Z = \le
-% \letCWEBmacro\ZZ = \let % now you can \write the control sequence \ZZ
+\letCWEBmacro\ZZ = \relax
\letCWEBmacro\* = *
\defCWEBmacro\oct
{\hbox{$^\circ$\kern-.1em\it\aftergroup\?\aftergroup}}
-\defCWEBmacro\hex%
+\defCWEBmacro\hex
{\hbox{$^{\scriptscriptstyle\#}$\tt\aftergroup}}
\defCWEBmacro\vb#1%
{\dontleavehmode
\hbox
- {\kern.2\CWEBpt
+ {\kern.2em
\vrule
\vtop
{\vbox
{\hrule
- \hbox{\strut\kern.2\CWEBpt\.{#1}\kern.2\CWEBpt}}
+ \hbox{\strut\kern.2em\.{#1}\kern.2em}}
\hrule}%
\vrule
- \kern.2\CWEBpt}} % verbatim string
+ \kern.2em}} % verbatim string
\def\onmaybe
{\let\ifon=\maybe}
@@ -515,10 +490,10 @@
\defCWEBmacro\consetup#1%
{\ifcase#1 \bf % depth -1 (@**)
\or % depth 0 (@*)
- \or \hskip2em % depth 1 (@*1)
- \or \hskip4em % depth 2 (@*2)
- \or \hskip6em % depth 3 (@*3)
- \or \hskip8em % depth 4 (@*4)
+ \or \hskip 2em % depth 1 (@*1)
+ \or \hskip 4em % depth 2 (@*2)
+ \or \hskip 6em % depth 3 (@*3)
+ \or \hskip 8em % depth 4 (@*4)
\or \hskip10em % depth 5 (@*5)
\else \hskip12em
\fi} % depth 6 or more
@@ -551,55 +526,53 @@
\newif\ifCWEBnotes
-\defCWEBmacro\Q {\CWEBnotesfalse \note{This code is cited in section}} % xref for mention of a section
-\defCWEBmacro\Qs {\CWEBnotestrue \note{This code is cited in sections}} % xref for mentions of a section
+\defCWEBmacro\Q {\CWEBnotesfalse \note{This code is cited in section}} % xref for mention of a section
+\defCWEBmacro\Qs {\CWEBnotestrue \note{This code is cited in sections}} % xref for mentions of a section
-\defCWEBmacro\U {\CWEBnotesfalse \note{This code is used in section}} % xref for use of a section
-\defCWEBmacro\Us {\CWEBnotestrue \note{This code is used in sections}} % xref for uses of a section
+\defCWEBmacro\U {\CWEBnotesfalse \note{This code is used in section}} % xref for use of a section
+\defCWEBmacro\Us {\CWEBnotestrue \note{This code is used in sections}} % xref for uses of a section
-\defCWEBmacro\A {\CWEBnotesfalse \note{See also section}} % xref for doubly defined section name
-\defCWEBmacro\As {\CWEBnotestrue \note{See also sections}} % xref for multiply defined section name
+\defCWEBmacro\A {\CWEBnotesfalse \note{See also section}} % xref for doubly defined section name
+\defCWEBmacro\As {\CWEBnotestrue \note{See also sections}} % xref for multiply defined section name
-\defCWEBmacro\ET % conjunction between two section numbers
- { and~}
+\defCWEBmacro\ET { and~} % conjunction between two section numbers
+\defCWEBmacro\ETs {, and~} % conjunction between the last two of several section numbers
-\defCWEBmacro\ETs % conjunction between the last two of several section numbers
- {, and~}
+\def\processCWEBsectionnumber#1%
+ {\bgroup
+ \def\[##1]{##1}%
+ \xdef\CWEBreference{#1}%
+ \egroup
+ \CWEBcomma{\goto{#1}[web:\CWEBreference]}}
\unexpanded\def\processCWEBsectionnumbers[#1]%
{\bgroup
- \def\CWEBcomma%
- {\def\CWEBcomma{, }}%
- \def\docommand##1%
- {\bgroup
- \def\[####1]{####1}%
- \xdef\CWEBreference{##1}%
- \egroup
- \CWEBcomma{\goto{##1}[web:\CWEBreference]}}%
- \processlist{(}{)}{,}\docommand(#1)
+ \def\CWEBcomma{\def\CWEBcomma{, }}%
+ \processlist(),\processCWEBsectionnumber(#1)%
\egroup}
\unexpanded\def\processCWEBsectionnotes
{\catcode`\s=12
\doprocessCWEBsectionnotes}
+\def\doprocessCWEBsectionnote#1\ET#2#3.%
+ {\processCWEBsectionnumbers[#1]%
+ \if#2s%
+ {, and~\goto{##3}[web:#3]}%
+ \else
+ { and~\goto{##2##3}[web:#2#3]}%
+ \fi}%
+
\unexpanded\def\doprocessCWEBsectionnotes#1.%
{\ifCWEBnotes
- \def\next##1\ET##2##3.%
- {\processCWEBsectionnumbers[##1]%
- \if##2s%
- {, and~\goto{##3}[web:##3]}%
- \else
- { and~\goto{##2##3}[web:##2##3]}%
- \fi}%
- \next#1.%
+ \doprocessCWEBsectionnote#1.%
\else
\goto{#1}[web:#1]%
\fi
\afterCWEBnote % inside group!
\egroup}
-\let\afterCWEBnote=\relax
+\let\afterCWEBnote\relax
\defCWEBmacro\note#1%
{\bgroup
@@ -613,7 +586,7 @@
{\ifmmode
\gdef\XX{\null$\null}%
\else
- \gdef\XX{}%
+ \glet\XX\empty
\fi % section name
\XX$\langle\,${#2\tx\kern.5em#1}$\,\rangle$\XX}
@@ -624,7 +597,7 @@
{\ifmmode
\gdef\XX{\null$\null}%
\else
- \gdef\XX{}%
+ \glet\XX\empty
\fi % section name
\XX$\langle\,$%
{#2\tx\kern.5em\processCWEBsectionnumbers[{#1}]}%
@@ -633,10 +606,37 @@
\defCWEBmacro\X#1:#2\X%
{\newCWEBmacroX#1:#2\X}
-\definemarking[CWEBfilename]
-\definemarking[CWEBsectiontitle]
-\definemarking[CWEBsectionnumber]
-\definemarking[CWEBsectiondepth]
+%D The next code is a bit messy because there is skipping over content
+%D and we have \type {\fi}'s in the source.
+
+\let\CWEBsecno\empty
+
+\definelist[cweb]
+
+\defCWEBmacro\startsection
+ {\rightskip=0pt % get out of C mode (cf. \B)
+ \sfcode`;=1500
+ \pretolerance 200
+ \hyphenpenalty 50
+ \exhyphenpenalty 50
+ \noindent
+ \bgroup
+ \let\*=\lapstar
+ \gotoCWEBsection{\bf\CWEBsecstar.\quad}[\CWEBsecno]%
+ \egroup}
+
+\defCWEBmacro\MN#1%
+ {\par % common code for \M, \N
+ \begingroup
+ \xdef\CWEBsecstar{#1}%
+ \let\*=\empty
+ \xdef\CWEBsecno{#1}% remove \* from section name
+ \endgroup
+ \ifx\CWEBsecno\CWEBsecstar
+ \onmaybe
+ \else
+ \ontrue
+ \fi}
\defCWEBmacro\M#1%
{\MN{#1}%
@@ -648,15 +648,14 @@
\startsection
\pagereference[web:#1]%
\expanded{\marking[CWEBsectionnumber]{\secno}}%
- \expanded{\marking[CWEBsectiondepth]{\the\gdepth}}%
+ \expanded{\marking[CWEBsectiondepth]{\the\CWEBgdepth}}%
\ignorespaces}
\defCWEBmacro\N#1#2#3.%
- {\writestatus{cweb}{*\secno}% progress report
- \gdepth=#1%
+ {\CWEBgdepth=#1%
\MN{#2}% beginning of starred section
\ifon
- \ifnum#1<\secpagedepth
+ \ifnum#1<\CWEBsecpagedepth
\page
\else
\vfil
@@ -665,33 +664,16 @@
\theCWEBvskip
\fi
\fi
-% \makesectionformat % context
- \defconvertedargument\ascii{#3}%
-% \edef\next%
-% {\write\CWEBcont % write to contents file
-% {\string\ZZ{\ascii}{#1}{\secno}%
-% {\sectionformat::\noexpand\userfolio}{\noexpand\realfolio}}}%
-% \next % \ZZ{title}{depth}{sec}{page}
+ \writedatatolist[cweb][section=\CWEBsecno,title={#3},depth=#1]%
\ifon
\startsection
\pagereference[web:#2]%
\marking[CWEBsectiontitle] {#3}%
- \expanded{\marking[CWEBsectionnumber]{\secno}}%
- \expanded{\marking[CWEBsectiondepth]{\the\gdepth}}%
+ \expanded{\marking[CWEBsectionnumber]{\CWEBsecno}}%
+ \expanded{\marking[CWEBsectiondepth]{\the\CWEBgdepth}}%
{\bf#3.\quad}%
\ignorespaces}
-\defCWEBmacro\MN#1%
- {\par % common code for \M, \N
- {\xdef\secstar{#1}%
- \let\*=\empty
- \xdef\secno{#1}}% remove \* from section name
- \ifx\secno\secstar
- \onmaybe
- \else
- \ontrue
- \fi}
-
\newif\iflinktoCWEBfile
\def\setCWEBlinkfile#1%
@@ -713,22 +695,8 @@
\protect
-\defCWEBmacro\startsection
- {\rightskip=0pt % get out of C mode (cf. \B)
- \sfcode`;=1500
- \pretolerance 200
- \hyphenpenalty 50
- \exhyphenpenalty 50
- \noindent
- \bgroup
- \let\*=\lapstar
- \gotoCWEBsection{\bf\secstar.\quad}[\secno]%
- \egroup}
-
\unexpanded\def\ignoreCWEBinput
- {\let\normalinput=\input
- \def\input ##1 %
- {\let\input=\normalinput}}
+ {\def\input ##1 {\let\input\normalinput}}
\unexpanded\def\loadCWEBmacros#1%
{\let\oldN=\N
@@ -739,25 +707,19 @@
\let\N=\oldN}
\unexpanded\def\resetCWEBcontext
- {\catcode`\|=12 % used in context discretionaries
- \everypar{} % used for context indentation and floats
- \parskip=0pt % no stretch between cweb paragraphs
- \parindent=1em} % is related to cweb backspace etc
-
-\newwrite\CWEBcont
+ {\catcode`\|=\othercatcode % used in context discretionaries
+ \everypar \emptytoks % used for context indentation and floats
+ \parskip \zeropoint % no stretch between cweb paragraphs
+ \parindent \emwidth} % is related to cweb backspace etc
\unexpanded\def\processCWEBsource #1 %
{\bgroup
- \writestatus{cweb}{Source:}
\resetCWEBcontext
\activateCWEB
\ignoreCWEBinput
- \immediate\openout\CWEBcont=#1.toc
- \write\CWEBcont{\noexpand\unprotect}
+ \let\end\relax
\marking[CWEBfilename]{#1}
\ReadFile{#1.tex}\relax
- \write\CWEBcont{\noexpand\protect}
- \closeout\CWEBcont
\par
\egroup}
@@ -818,8 +780,10 @@
\unexpanded\def\theCWEBafterindex {\stopcolumns}
\unexpanded\def\processCWEBindex #1 %
- {\bgroup
- \writestatus{cweb}{Index:}
+ {\par
+ \bgroup
+ \forgetall
+ \setupalign[verytolerant,flushleft,nothyphenated]
\resetCWEBcontext
\activateCWEB
\resetCWEBindexentry
@@ -828,23 +792,16 @@
\checkCWEBindexentry{##1}%
\hangindent2em
\noindent##1:\kern1em%
- \def\next####1.%
- {\processCWEBsectionnumbers[{####1}]}%
+ \def\next####1.{\processCWEBsectionnumbers[{####1}]}%
\next}%
\def\[##1]%
{$\underline{##1}$}%
\let\*=\lapstar
- \parfillskip 0pt plus .6\hsize % try to avoid almost empty lines
-% \parskip 0pt plus .5pt
- \rightskip0pt plus 2.5em
- \tolerance 10000
- \hyphenpenalty 10000
- \parindent0pt
\marking[CWEBfilename]{#1}
\marking[CWEBsectiontitle]{index}
\marking[CWEBsectionnumber]{}
\marking[CWEBsectiondepth]{}
- \loadCWEBmacros{#1}
+% \loadCWEBmacros{#1}
\theCWEBbeforeindex
\ReadFile{#1.idx}\relax
\theCWEBafterindex
@@ -852,11 +809,12 @@
\egroup}
\unexpanded\def\processCWEBsections #1 %
- {\bgroup
- \writestatus{cweb}{Section names:}
+ {\par
+ \bgroup
+ \forgetall
\resetCWEBcontext
\activateCWEB
- \loadCWEBmacros{#1}
+ % \loadCWEBmacros{#1}
\parfillskip = 0pt plus 1fil
\parindent = 0pt
\let\topsecno=\nullsec
@@ -875,44 +833,45 @@
\marking[CWEBsectiontitle]{sections}
\marking[CWEBsectionnumber]{}
\marking[CWEBsectiondepth]{}
- \loadCWEBmacros{#1}
+% \loadCWEBmacros{#1}
\ReadFile{#1.scn}\relax
- \par
\botofcontents
\par
\egroup}
\unexpanded\def\processCWEBcontents #1 %
- {\bgroup
- \writestatus{cweb}{Table of contents:}
+ {\par
+ \bgroup
+ \forgetall
\resetCWEBcontext
\activateCWEB
- \loadCWEBmacros{#1}
- \rightskip = 0pt
- \hyphenpenalty = 50
- \tolerance = 200
- \parindent = 0pt
- \line{\hfil Section\hbox to3em{\hss Page}}
- \let\ZZ=\contentsline
\marking[CWEBfilename]{#1}
\marking[CWEBsectiontitle]{table of contents}
\marking[CWEBsectionnumber]{}
\marking[CWEBsectiondepth]{}
- \loadCWEBmacros{#1}
- \ReadFile{#1.toc}\relax
+ \forgetall
+ \placelist[cweb][criterium=all,command=\CWEBlistentry]
\par
\egroup}
-\unprotect
-
-\defCWEBmacro\contentsline#1#2#3#4#5%
- {\ifnum#2=\zerocount
- \blank[\v!small]%
- \fi
- \line{\consetup{#2}#1\rm\leaders\hbox to .5em{.\hfil}\hfil\
- {\goto{#3}[web:#3]}% below: \gotorealpage ? should be changed
- \hbox to3em{\hss\gotorealpage{}{}{#5}{\translatednumber[#4]\presetgoto}}}}
-
-\protect
+% {all}
+%
+% \structurelistuservariable
+% \rawstructurelistuservariable
+%
+% \goto{#3}[web:#3]
+
+\installstructurelistprocessor{cweb}
+ {\begingroup
+ \advance\leftskip 3em
+ \advance\rightskip3em
+ \currentlistentrydestinationattribute
+ \dontleavehmode
+ \llap{\hbox \currentlistentryreferenceattribute{number} to 3em{\structurelistuservariable{section}\hss}}%
+ \structurelistuservariable{title}%
+ \hfill
+ \rlap{\hbox \currentlistentryreferenceattribute{page} to 3em{\hss\structurelistuservariable{depth}}}%
+ \par
+ \endgroup}
\endinput
diff --git a/tex/context/modules/mkiv/m-subsub.mkiv b/tex/context/modules/mkiv/m-subsub.mkiv
index 88be11680..e0f6b1f27 100644
--- a/tex/context/modules/mkiv/m-subsub.mkiv
+++ b/tex/context/modules/mkiv/m-subsub.mkiv
@@ -12,65 +12,29 @@
\unprotect
-\definesection[\s!section-8]
-\definesection[\s!section-9]
-\definesection[\s!section-10]
-\definesection[\s!section-11]
-\definesection[\s!section-12]
+\writestatus\m!system{}
+\writestatus\m!system{\the\maxstructuredepth\space levels sections are already predefined}
+\writestatus\m!system{}
-\definehead
- [\v!subsubsubsubsubsection]
- [\c!section=\s!section-8,
- \c!default=\v!subsubsubsubsection]
+\protect
-\definehead
- [\v!subsubsubsubsubsubsection]
- [\c!section=\s!section-9,
- \c!default=\v!subsubsubsubsubsection]
+\continueifinputfile{m-subsub.mkiv}
-\definehead
- [\v!subsubsubsubsubsubsubsection]
- [\c!section=\s!section-10,
- \c!default=\v!subsubsubsubsubsubsection]
+\starttext
-\definehead
- [\v!subsubsubsubsubsubsubsubsection]
- [\c!section=\s!section-11,
- \c!default=\v!subsubsubsubsubsubsubsection]
+ % \part {level 1 part}
+ \chapter {level 2 chapter}
+ \section {level 3 section}
+ \subsection {level 4 subsection}
+ \subsubsection {level 5 subsubsection}
+ \subsubsubsection {level 6 subsubsubsection}
+ \subsubsubsubsection {level 7 subsubsubsubsection}
+ \subsubsubsubsubsection {level 8 subsubsubsubsubsection}
+ \subsubsubsubsubsubsection {level 9 subsubsubsubsubsubsection}
+ \subsubsubsubsubsubsubsection {level 10 subsubsubsubsubsubsubsection}
+ \subsubsubsubsubsubsubsubsection {level 11 subsubsubsubsubsubsubsubsection}
+ \subsubsubsubsubsubsubsubsubsection {level 12 subsubsubsubsubsubsubsubsubsection}
-\definehead
- [\v!subsubsubsubsubsubsubsubsubsection]
- [\c!section=\s!section-12,
- \c!default=\v!subsubsubsubsubsubsubsubsection]
+ In case you wonder: level 1 part.
-\definehead
- [\v!subsubsubsubsubsubject]
- [\c!coupling=\v!subsubsubsubsubsection,
- \c!default=\v!subsubsubsubsubsection,
- \c!incrementnumber=\v!no]
-
-\definehead
- [\v!subsubsubsubsubsubsubject]
- [\c!coupling=\v!subsubsubsubsubsubsection,
- \c!default=\v!subsubsubsubsubsubsection,
- \c!incrementnumber=\v!no]
-
-\definehead
- [\v!subsubsubsubsubsubsubsubject]
- [\c!coupling=\v!subsubsubsubsubsubsubsection,
- \c!default=\v!subsubsubsubsubsubsubsection,
- \c!incrementnumber=\v!no]
-
-\definehead
- [\v!subsubsubsubsubsubsubsubsubject]
- [\c!coupling=\v!subsubsubsubsubsubsubsubsection,
- \c!default=\v!subsubsubsubsubsubsubsubsection,
- \c!incrementnumber=\v!no]
-
-\definehead
- [\v!subsubsubsubsubsubsubsubsubsubject]
- [\c!coupling=\v!subsubsubsubsubsubsubsubsubsection,
- \c!default=\v!subsubsubsubsubsubsubsubsubsection,
- \c!incrementnumber=\v!no]
-
-\protect \endinput
+\stoptext
diff --git a/tex/context/modules/mkiv/s-evohome.mkiv b/tex/context/modules/mkiv/s-evohome.mkiv
index 1b1dc2c81..26abcfb59 100644
--- a/tex/context/modules/mkiv/s-evohome.mkiv
+++ b/tex/context/modules/mkiv/s-evohome.mkiv
@@ -278,7 +278,16 @@ end
presets = "c:/data/develop/domotica/evohome/evohome-presets.lua",
}
- moduledata.evohome.status (specification)
+ -- moduledata.evohome.status (specification)
+ moduledata.evohome.history(specification)
+
+ local specification = {
+ year = 2018,
+ -- month = 11,
+ presets = "c:/data/develop/domotica/evohome/evohome-presets.lua",
+ }
+
+ -- moduledata.evohome.status (specification)
moduledata.evohome.history(specification)
\stopluacode
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 4588db88f..6c57e0032 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 : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 01/19/18 13:42:33
+-- merge date : 01/24/18 10:47:11
do -- begin closure to overcome local limits and interference
@@ -8403,7 +8403,7 @@ function constructors.scale(tfmdata,specification)
local ok=false
for i=1,#vc do
local key=vc[i][1]
- if key=="right" or key=="down" then
+ if key=="right" or key=="down" or key=="rule" then
ok=true
break
end