diff options
author | Marius <mariausol@gmail.com> | 2010-10-22 18:00:11 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2010-10-22 18:00:11 +0300 |
commit | f56f0054360a9bdfb57de9abcf0d81a2766c22b9 (patch) | |
tree | 9d89e483645db1382999ff154c6355eca7af1308 | |
parent | b859917cf85177a96d3f0226f13618fe1593eb06 (diff) | |
download | context-f56f0054360a9bdfb57de9abcf0d81a2766c22b9.tar.gz |
beta 2010.10.22 16:46
-rw-r--r-- | scripts/context/lua/mtxrun.lua | 4 | ||||
-rw-r--r-- | scripts/context/stubs/mswin/mtxrun.lua | 4 | ||||
-rw-r--r-- | scripts/context/stubs/unix/mtxrun | 4 | ||||
-rw-r--r-- | tex/context/base/bibl-tra.lua | 6 | ||||
-rw-r--r-- | tex/context/base/bibl-tra.mkiv | 18 | ||||
-rw-r--r-- | tex/context/base/cont-new.tex | 2 | ||||
-rw-r--r-- | tex/context/base/context.tex | 2 | ||||
-rw-r--r-- | tex/context/base/lxml-ini.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/lxml-tex.lua | 16 | ||||
-rw-r--r-- | tex/context/base/m-steps.mkiv | 20 | ||||
-rw-r--r-- | tex/context/base/mult-chk.lua | 4 | ||||
-rw-r--r-- | tex/context/base/strc-des.mkiv | 9 | ||||
-rw-r--r-- | tex/context/base/util-prs.lua | 4 | ||||
-rw-r--r-- | tex/context/base/x-steps.mkii (renamed from tex/context/base/m-steps.mkii) | 2 | ||||
-rw-r--r-- | tex/context/base/x-steps.mkiv | 99 | ||||
-rw-r--r-- | tex/generic/context/luatex-fonts-merged.lua | 2 |
16 files changed, 164 insertions, 34 deletions
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua index 60a44bd2a..d091fa405 100644 --- a/scripts/context/lua/mtxrun.lua +++ b/scripts/context/lua/mtxrun.lua @@ -3552,6 +3552,10 @@ local function set(key,value) -- using Carg is slower here hash[key] = value end +local function set(key,value) -- using Carg is slower here + hash[key] = value +end + local pattern_a_s = (pattern_a/set)^1 local pattern_b_s = (pattern_b/set)^1 local pattern_c_s = (pattern_c/set)^1 diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua index 60a44bd2a..d091fa405 100644 --- a/scripts/context/stubs/mswin/mtxrun.lua +++ b/scripts/context/stubs/mswin/mtxrun.lua @@ -3552,6 +3552,10 @@ local function set(key,value) -- using Carg is slower here hash[key] = value end +local function set(key,value) -- using Carg is slower here + hash[key] = value +end + local pattern_a_s = (pattern_a/set)^1 local pattern_b_s = (pattern_b/set)^1 local pattern_c_s = (pattern_c/set)^1 diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun index 60a44bd2a..d091fa405 100644 --- a/scripts/context/stubs/unix/mtxrun +++ b/scripts/context/stubs/unix/mtxrun @@ -3552,6 +3552,10 @@ local function set(key,value) -- using Carg is slower here hash[key] = value end +local function set(key,value) -- using Carg is slower here + hash[key] = value +end + local pattern_a_s = (pattern_a/set)^1 local pattern_b_s = (pattern_b/set)^1 local pattern_c_s = (pattern_c/set)^1 diff --git a/tex/context/base/bibl-tra.lua b/tex/context/base/bibl-tra.lua index f901b1f0a..afc42a610 100644 --- a/tex/context/base/bibl-tra.lua +++ b/tex/context/base/bibl-tra.lua @@ -100,6 +100,12 @@ function hacks.flush(sortvariant) end end +function hacks.filterall() + for i=1,#registered do + list[i] = { registered[i], i } + end +end + function hacks.registerplaced(str) used[str] = true end diff --git a/tex/context/base/bibl-tra.mkiv b/tex/context/base/bibl-tra.mkiv index a0ef32c82..fba750d82 100644 --- a/tex/context/base/bibl-tra.mkiv +++ b/tex/context/base/bibl-tra.mkiv @@ -816,16 +816,20 @@ \def\doprocessbibtexentry#1{\typesetapublication{#1}} \def\typesetpubslist - {\dobeginoflist + {\preloadbiblist + \dobeginoflist % \the\initializebibdefinitions % COMMENTED \edef\currentlist{pubs}% - \doif{\listparameter\c!criterium}\v!cite{\setuplist[pubs][\c!criterium=\v!here]}% \ctxlua{bibtex.hacks.reset(\number\bibtexoncemode)}% - \placestructurelist - {pubs}% - {\listparameter\c!criterium}% - {\listparameter\c!number}% - {\listparameter\c!extras}% + \doifelse{\listparameter\c!criterium}\v!all + {\ctxlua{bibtex.hacks.filterall()}} + {\doif{\listparameter\c!criterium}\v!cite + {\setuplist[pubs][\c!criterium=\v!here]}% + \placestructurelist + {pubs}% + {\listparameter\c!criterium}% + {\listparameter\c!number}% + {\listparameter\c!extras}}% \ctxlua{bibtex.hacks.flush("\@@pbsorttype")}% \doendoflist} diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex index c56403015..f429b372f 100644 --- a/tex/context/base/cont-new.tex +++ b/tex/context/base/cont-new.tex @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2010.10.22 10:10} +\newcontextversion{2010.10.22 16:46} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex index ffa707bd2..3ec7d4bc8 100644 --- a/tex/context/base/context.tex +++ b/tex/context/base/context.tex @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2010.10.22 10:10} +\edef\contextversion{2010.10.22 16:46} %D For those who want to use this: diff --git a/tex/context/base/lxml-ini.mkiv b/tex/context/base/lxml-ini.mkiv index fc6381b3a..041a2017e 100644 --- a/tex/context/base/lxml-ini.mkiv +++ b/tex/context/base/lxml-ini.mkiv @@ -91,6 +91,8 @@ \def\xmlloaddirectives #1{\ctxlua{lxml.directives.load("any:///#1")}} \def\xmlpos #1{\ctxlua{lxml.pos("#1")}} +\def\xmltoparameters #1{\ctxlua{lxml.toparameters("#1")}} + % kind of special: \def\xmlstartraw{\ctxlua{lxml.startraw()}} diff --git a/tex/context/base/lxml-tex.lua b/tex/context/base/lxml-tex.lua index 407d5eda8..0bf488342 100644 --- a/tex/context/base/lxml-tex.lua +++ b/tex/context/base/lxml-tex.lua @@ -1444,3 +1444,19 @@ end --~ end --~ end --~ end + +function lxml.toparameters(id) + local e = getid(id) + if e then + local a = e.at + if a and next(a) then + local setups = { } + for k, v in next, a do + setups[#setups+1] = k .. "=" .. v + end + setups = concat(setups,",") + -- tracing + context(setups) + end + end +end diff --git a/tex/context/base/m-steps.mkiv b/tex/context/base/m-steps.mkiv deleted file mode 100644 index 9bb56c532..000000000 --- a/tex/context/base/m-steps.mkiv +++ /dev/null @@ -1,20 +0,0 @@ -%D \module -%D [ file=m-steps, -%D version=2001.05.28, -%D title=\CONTEXT\ Modules, -%D subtitle=Step Charts \& Tables, -%D author=Hans Hagen, -%D date=\currentdate, -%D copyright={PRAGMA ADE / Hans Hagen \& Ton Otten}] -%C -%C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. - -%D The \XML\ interface: - -\unprotect - -\writestatus\m!systems{The steps mkiv xml interface is not yet defined!} - -\protect \endinput diff --git a/tex/context/base/mult-chk.lua b/tex/context/base/mult-chk.lua index 5df2efd79..2d20aa16b 100644 --- a/tex/context/base/mult-chk.lua +++ b/tex/context/base/mult-chk.lua @@ -46,13 +46,15 @@ function interfaces.addvalidkeys(kind,list) end end +-- weird code, looks incomplete ... probbably an experiment + local prefix, kind, keys local function set(key,value) if keys and not keys[key] then interfaces.invalidkey(kind,key) else - texsprint(ctxcatcodes,format("\\setsomevalue{%s}{%s}{%s}",prefix,key,value)) + context.setsomevalue(prefix,key,value) end end diff --git a/tex/context/base/strc-des.mkiv b/tex/context/base/strc-des.mkiv index 5f25ac60d..06e4c2534 100644 --- a/tex/context/base/strc-des.mkiv +++ b/tex/context/base/strc-des.mkiv @@ -615,9 +615,12 @@ \def\dodefineenumerationcommands#1#2#3#4% since we use \currentdescription, we need an edef {\setevalue{\??dd#3#1\s!parent}{#4}% - \setuevalue {#3#1}{\noexpand\doenumerationcommand{#1}{#2}{#3}}% - \setuevalue{\e!start#3#1}{\noexpand\doenumerationstart {#1}{#2}{#3}}% - \setuevalue{\e!stop #3#1}{\noexpand\doenumerationstop {#1}{#2}{#3}}} + \setuevalue {#3#1}{\noexpand\doenumerationcommand {#1}{#2}{#3}}% + \setuevalue{\c!reset#3#1}{\noexpand\doresetenumerationnumber{#1}{#2}{#3}}% + %setuevalue{\c!set #3#1}{\noexpand\dosetenumerationnumber {#1}{#2}{#3}}% + \setuevalue{\e!next #3#1}{\noexpand\donextenumerationnumber {#1}{#2}{#3}}% + \setuevalue{\e!start#3#1}{\noexpand\doenumerationstart {#1}{#2}{#3}}% + \setuevalue{\e!stop #3#1}{\noexpand\doenumerationstop {#1}{#2}{#3}}} % handle enumeration diff --git a/tex/context/base/util-prs.lua b/tex/context/base/util-prs.lua index a42715d0d..e1a2ebbed 100644 --- a/tex/context/base/util-prs.lua +++ b/tex/context/base/util-prs.lua @@ -50,6 +50,10 @@ local function set(key,value) -- using Carg is slower here hash[key] = value end +local function set(key,value) -- using Carg is slower here + hash[key] = value +end + local pattern_a_s = (pattern_a/set)^1 local pattern_b_s = (pattern_b/set)^1 local pattern_c_s = (pattern_c/set)^1 diff --git a/tex/context/base/m-steps.mkii b/tex/context/base/x-steps.mkii index 3e1f86312..408a7e191 100644 --- a/tex/context/base/m-steps.mkii +++ b/tex/context/base/x-steps.mkii @@ -13,6 +13,8 @@ %D The \XML\ interface: +\usemodule[m][steps] + \unprotect \defineXMLdirective [stepchart] [charts] \setupSTEPcharts diff --git a/tex/context/base/x-steps.mkiv b/tex/context/base/x-steps.mkiv new file mode 100644 index 000000000..616818809 --- /dev/null +++ b/tex/context/base/x-steps.mkiv @@ -0,0 +1,99 @@ +%D \module +%D [ file=m-steps, +%D version=2001.05.28, +%D title=\CONTEXT\ Modules, +%D subtitle=Step Charts \& Tables, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D The \XML\ interface. This module can be made way more efficient +%D in \MKIV\ using textext but it makes only sense to do this when +%D I really need it in a demanding application. Probably half of the +%D code in m-steps.tex can go. + +\usemodule[m][steps] + +\unprotect + +\def\xmlstepchartdirective#1{\executeifdefined{@@stepchart@@#1}\gobbletwoarguments} % {#2}{#3} +\def\xmlsteptabledirective#1{\executeifdefined{@@steptable@@#1}\gobbletwoarguments} % {#2}{#3} + +\setvalue{@@stepchart@@charts}{\setsomevalue\@@STPC} +\setvalue{@@stepchart@@cells}{\setsomevalue\@@STEC} +\setvalue{@@stepchart@@texts}{\setsomevalue\@@STET} +\setvalue{@@stepchart@@lines}{\setsomevalue\@@STEL} + +\setvalue{@@steptable@@tables}{\setsomevalue\@@STPT} +\setvalue{@@steptable@@cells}{\setsomevalue\@@STEC} +\setvalue{@@steptable@@texts}{\setsomevalue\@@STET} +\setvalue{@@steptable@@lines}{\setsomevalue\@@STEL} + +\startxmlsetups xml:ct:define + \xmlsetsetup {#1} {ct:*} {xml:ct:*} + \xmlsetsetup {#1} {ct:stepaligntable/cells} {xml:ct:stepaligntable:cells} + \xmlsetsetup {#1} {ct:stepaligntable/lines} {xml:ct:stepaligntable:lines} +\stopxmlsetups + +\xmlregisterns{ct}{stepcharts} + +\xmlregistersetup{xml:ct:define} + +\startxmlsetups xml:ct:prep + \expanded{\prep[\xmltoparameters{#1}]}{\xmlflush{#1}} +\stopxmlsetups + +\startxmlsetups xml:ct:text + \expanded{\text[\xmltoparameters{#1}]}{\xmlflush{#1}} +\stopxmlsetups + +\startxmlsetups xml:ct:texts + \expanded{\texts[\xmltoparameters{#1}]}{\xmltext{#1}{/top}} {\xmltext{#1}{/bot}} +\stopxmlsetups + +\startxmlsetups xml:ct:cell + \expanded{\cell[\xmltoparameters{#1}]}{\xmlflush{#1}} +\stopxmlsetups + +\startxmlsetups xml:ct:cells + \expanded{\cells[\xmltoparameters{#1}]}{\xmltext{#1}{/top}} {\xmltext{#1}{/bot}} +\stopxmlsetups + +\startxmlsetups xml:ct:lines + \expanded{\startlines[\xmltoparameters{#1}]} + \xmlflush{#1} + \stoplines +\stopxmlsetups + +\startxmlsetups xml:ct:steptable + \expanded{\startSTEPtable[\xmltoparameters{#1}]} + \xmlflush{#1} + \stopSTEPtable +\stopxmlsetups + +\startxmlsetups xml:ct:stepchart + \expanded{\startSTEPchart[\xmltoparameters{#1}]} + \xmlflush{#1} + \stopSTEPchart +\stopxmlsetups + +\startxmlsetups xml:ct:stepaligntable + \expanded{\startSTEPaligntable[\xmltoparameters{#1}]} + \xmlflush{#1} + \stopSTEPaligntable +\stopxmlsetups + +\startxmlsetups xml:ct:stepaligntable:cells + \expanded{\cells[\xmltoparameters{#1}]} {\xmltext{#1}{/ct:c1}} {\xmltext{#1}{/ct:c2}} {\xmltext{#1}{/ct:c3}} +\stopxmlsetups + +\startxmlsetups xml:ct:stepaligntable:lines + \expanded{\setupSTEPlines[\xmltoparameters{#1}]} + \xmlflush{#1} +\stopxmlsetups + +\protect \endinput diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index 45d048876..fdf07d31c 100644 --- a/tex/generic/context/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 10/22/10 10:10:20 +-- merge date : 10/22/10 16:46:39 do -- begin closure to overcome local limits and interference |