summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2010-02-15 22:16:00 +0100
committerHans Hagen <pragma@wxs.nl>2010-02-15 22:16:00 +0100
commit3f2e64b7790558e460c65c2ea60e4eb3c6b5e0a9 (patch)
tree2db9554267e5ee0539fd6b0e708ade0b1431392b /tex
parente3f0fbded1db3addc97fe1921f4957261c8a425f (diff)
downloadcontext-3f2e64b7790558e460c65c2ea60e4eb3c6b5e0a9.tar.gz
beta 2010.02.15 22:16
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/cont-new.tex2
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/core-env.mkiv12
-rw-r--r--tex/context/base/lpdf-fld.lua1
-rw-r--r--tex/context/base/pack-rul.mkiv2
-rw-r--r--tex/context/base/page-bck.mkiv6
-rw-r--r--tex/context/base/page-lay.mkiv2
-rw-r--r--tex/context/base/page-mak.mkiv2
-rw-r--r--tex/context/base/prop-lay.mkiv2
-rw-r--r--tex/context/base/sort-ini.lua20
-rw-r--r--tex/context/base/sort-lan.lua21
-rw-r--r--tex/context/base/strc-flt.mkiv2
-rw-r--r--tex/context/base/strc-not.mkiv1
-rw-r--r--tex/context/base/strc-reg.lua5
-rw-r--r--tex/context/base/strc-reg.mkiv5
-rw-r--r--tex/context/base/syst-aux.mkiv9
-rw-r--r--tex/generic/context/luatex-fonts-merged.lua2
17 files changed, 71 insertions, 25 deletions
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 2b24141ba..51d5182ec 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.02.14 18:59}
+\newcontextversion{2010.02.15 22:16}
%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 3533e57eb..bf1ae6158 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.02.14 18:59}
+\edef\contextversion{2010.02.15 22:16}
%D For those who want to use this:
diff --git a/tex/context/base/core-env.mkiv b/tex/context/base/core-env.mkiv
index 2d717df9a..db05e8bd5 100644
--- a/tex/context/base/core-env.mkiv
+++ b/tex/context/base/core-env.mkiv
@@ -193,6 +193,18 @@
\fi
\endcsname\empty} % takes one argument
+% the next one is meant for \c!setups situations, hence the check for
+% a shortcut
+
+\def\doprocesslocalsetups#1%
+ {\edef\tobeprocessedsetups{#1}%
+ \ifx\tobeprocessedsetups\empty\else
+ \dodoprocesslocalsetups
+ \fi}
+
+\def\dodoprocesslocalsetups
+ {\@EA\processcommalist\@EA[\tobeprocessedsetups]\dosetups}
+
% \def\setupwithargument#1%
% {\csname\??su:\ifcsname\??su:#1\endcsname#1\else\letterpercent\fi\endcsname}
diff --git a/tex/context/base/lpdf-fld.lua b/tex/context/base/lpdf-fld.lua
index 62871e586..20fbd94f8 100644
--- a/tex/context/base/lpdf-fld.lua
+++ b/tex/context/base/lpdf-fld.lua
@@ -368,7 +368,6 @@ local function predefinesymbols(specification)
local symbols = aux.settings_to_array(values)
for i=1,#symbols do
local symbol = symbols[i]
-print(symbol)
local a, b = lpegmatch(splitter,symbol)
codeinjections.presetsymbol(a or symbol)
end
diff --git a/tex/context/base/pack-rul.mkiv b/tex/context/base/pack-rul.mkiv
index 13f9111c0..1afe45e5c 100644
--- a/tex/context/base/pack-rul.mkiv
+++ b/tex/context/base/pack-rul.mkiv
@@ -417,7 +417,7 @@
\setlayoutcomponentattribute\v!background\component
\fi
\let\foregroundbox\normalforegroundbox
- \hbox to \backgroundwidth \layoutcomponentboxattribute % width in case 'foreground' is used as overlay
+ \hbox \layoutcomponentboxattribute to \backgroundwidth % width in case 'foreground' is used as overlay
{\expandafter\dododobackgroundbox\framedbackground,\s!unknown,\relax % hm, messy .. look into it
\box\framebox\hss}}}
diff --git a/tex/context/base/page-bck.mkiv b/tex/context/base/page-bck.mkiv
index fae091c6a..de3cc1490 100644
--- a/tex/context/base/page-bck.mkiv
+++ b/tex/context/base/page-bck.mkiv
@@ -164,7 +164,7 @@
% \def\addsomebackground#1#2#3#4% area box width height / zero test added
% {\ifsomebackgroundfound#1\ifdim#3>\zeropoint\ifdim#4>\zeropoint
% \ifcsname\??ma#1\c!setups\endcsname % to be done
-% \doifvaluesomething{\??ma#1\c!setups}{\setups[\csname\??ma#1\c!setups\endcsname]}% should not produce funny spaces !
+% \doprocesslocalsetups{\csname\??ma#1\c!setups\endcsname}% should not produce funny spaces !
% \fi
% \setbox#2\vbox\fastlocalframed % maybe \superfastlocalframed{tag}{w}{h}
% [\??ma#1]%
@@ -175,7 +175,7 @@
\def\addsomebackground#1#2#3#4% area box width height / zero test added
{\ifsomebackgroundfound#1\ifdim#3>\zeropoint\ifdim#4>\zeropoint
\ifcsname\??ma#1\c!setups\endcsname % to be done
- \doifvaluesomething{\??ma#1\c!setups}{\setups[\csname\??ma#1\c!setups\endcsname]}% should not produce funny spaces !
+ \doprocesslocalsetups{\csname\??ma#1\c!setups\endcsname}% should not produce funny spaces !
\fi
\localbackgroundframed{#1}{#2}{#3}{#4}%
\fi\fi\fi}
@@ -375,7 +375,7 @@
\ifdim#2>\zeropoint\relax
\ifdim#1>\zeropoint\relax
\ifcsname\??ma#3#4\c!setups\endcsname % to be done
- \doifvaluesomething{\??ma#3#4\c!setups}{\setups[\csname\??ma#3#4\c!setups\endcsname]}% should not produce funny spaces !
+ \doprocesslocalsetups{\csname\??ma#3#4\c!setups\endcsname}% should not produce funny spaces !
\fi
\fastlocalframed
[\??ma#3#4]%
diff --git a/tex/context/base/page-lay.mkiv b/tex/context/base/page-lay.mkiv
index 80e2574c6..16a405c08 100644
--- a/tex/context/base/page-lay.mkiv
+++ b/tex/context/base/page-lay.mkiv
@@ -451,7 +451,7 @@
\global\topspace \layoutparameter\c!topspace
\setlayoutdimensions % the rest of the `dimensions'
\docheckgridsnapping
- \setups[\layoutparameter\c!setups]% depends on gridsnapping !
+ \doprocesslocalsetups{\layoutparameter\c!setups}% depends on gridsnapping !
\simplesetupwhitespace
\simplesetupblank
\setupinterlinespace[\v!reset]% \synchronizegloballinespecs
diff --git a/tex/context/base/page-mak.mkiv b/tex/context/base/page-mak.mkiv
index fae68b38f..fbacea844 100644
--- a/tex/context/base/page-mak.mkiv
+++ b/tex/context/base/page-mak.mkiv
@@ -130,7 +130,7 @@
\global\setbox\makeupbox\vbox to \makeupparameter\c!height
\bgroup
\doifsomething{\makeupparameter\c!color}{\startcolor[\makeupparameter\c!color]}% can be made faster
- \setups[\makeupparameter\c!setups]%
+ \doprocesslocalsetups{\makeupparameter\c!setups}%
\hsize\makeupparameter\c!width
\doifsomething{\makeupparameter\c!align}
{\setupalign[\makeupparameter\c!align]}%
diff --git a/tex/context/base/prop-lay.mkiv b/tex/context/base/prop-lay.mkiv
index 67e103ffb..a2d7dd265 100644
--- a/tex/context/base/prop-lay.mkiv
+++ b/tex/context/base/prop-lay.mkiv
@@ -120,7 +120,7 @@
\let\layoutcomponentboxattribute \empty
\def\showlayoutcomponents
- {\ctxlua{viewerlayers.enabled=true}%
+ {\ctxlua{viewerlayers.enable()}%
\let\setlayoutcomponentattribute \dosetlayoutcomponentattribute
\let\resetlayoutcomponentattribute\doresetlayoutcomponentattribute}
diff --git a/tex/context/base/sort-ini.lua b/tex/context/base/sort-ini.lua
index 80607f9ca..e59759311 100644
--- a/tex/context/base/sort-ini.lua
+++ b/tex/context/base/sort-ini.lua
@@ -14,9 +14,11 @@ if not modules then modules = { } end modules ['sort-ini'] = {
-- always expand to utf
local utf = unicode.utf8
-local gsub, rep = string.gsub, string.rep
+local gsub, rep, sort, concat = string.gsub, string.rep, table.sort, table.concat
local utfcharacters, utfvalues, strcharacters = string.utfcharacters, string.utfvalues, string.characters
+local trace_sorters = false -- true
+
sorters = { }
sorters.comparers = { }
sorters.splitters = { }
@@ -145,5 +147,19 @@ function sorters.splitters.utf(str) -- brrr, todo: language
end
function sorters.sort(entries,cmp)
- table.sort(entries,function(a,b) return cmp(a,b) == -1 end)
+ if trace_sorters then
+ sort(entries, function(a,b)
+ local r = cmp(a,b)
+ local as, bs = a.split, b.split
+ if as and bs then
+ logs.report("sorter","%s %s %s",
+ concat(as[1]), (not r and "?") or (r<0 and "<") or (r>0 and ">") or "=", concat(bs[1]))
+ end
+ return r == -1
+ end)
+ else
+ sort(entries, function(a,b)
+ return cmp(a,b) == -1
+ end)
+ end
end
diff --git a/tex/context/base/sort-lan.lua b/tex/context/base/sort-lan.lua
index 0b351b062..e84c81397 100644
--- a/tex/context/base/sort-lan.lua
+++ b/tex/context/base/sort-lan.lua
@@ -40,12 +40,21 @@ sorters.mappings['en'] = {
["p"] = 31, ["q"] = 33, ["r"] = 35, ["s"] = 37, ["t"] = 39,
["u"] = 41, ["v"] = 43, ["w"] = 45, ["x"] = 47, ["y"] = 49,
["z"] = 51,
---~ ["A"] = 2, ["B"] = 4, ["C"] = 6, ["D"] = 8, ["E"] = 10,
---~ ["F"] = 12, ["G"] = 14, ["H"] = 16, ["I"] = 18, ["J"] = 20,
---~ ["K"] = 22, ["L"] = 24, ["M"] = 26, ["N"] = 28, ["O"] = 30,
---~ ["P"] = 32, ["Q"] = 34, ["R"] = 36, ["S"] = 38, ["T"] = 40,
---~ ["U"] = 42, ["V"] = 44, ["W"] = 46, ["X"] = 48, ["Y"] = 50,
---~ ["Z"] = 52,
+ ["A"] = 1, ["B"] = 3, ["C"] = 5, ["D"] = 7, ["E"] = 9,
+ ["F"] = 11, ["G"] = 13, ["H"] = 15, ["I"] = 17, ["J"] = 19,
+ ["K"] = 21, ["L"] = 23, ["M"] = 25, ["N"] = 27, ["O"] = 29,
+ ["P"] = 31, ["Q"] = 33, ["R"] = 35, ["S"] = 37, ["T"] = 39,
+ ["U"] = 41, ["V"] = 43, ["W"] = 45, ["X"] = 47, ["Y"] = 49,
+ ["Z"] = 51,
+ --
+ -- uppercase after lowercase
+ --
+ -- ["A"] = 2, ["B"] = 4, ["C"] = 6, ["D"] = 8, ["E"] = 10,
+ -- ["F"] = 12, ["G"] = 14, ["H"] = 16, ["I"] = 18, ["J"] = 20,
+ -- ["K"] = 22, ["L"] = 24, ["M"] = 26, ["N"] = 28, ["O"] = 30,
+ -- ["P"] = 32, ["Q"] = 34, ["R"] = 36, ["S"] = 38, ["T"] = 40,
+ -- ["U"] = 42, ["V"] = 44, ["W"] = 46, ["X"] = 48, ["Y"] = 50,
+ -- ["Z"] = 52,
}
-- dutch
diff --git a/tex/context/base/strc-flt.mkiv b/tex/context/base/strc-flt.mkiv
index 3f1a9e86b..f0035166c 100644
--- a/tex/context/base/strc-flt.mkiv
+++ b/tex/context/base/strc-flt.mkiv
@@ -456,7 +456,7 @@
% test \setupswithbox[somefigure]{\framed[width=\dimexpr\textwidth+3cm\relax]{}} test
\def\dosetcaptionthings
- {\setups[\floatcaptionparameter\c!setups]% expanded ?
+ {\doprocesslocalsetups{\floatcaptionparameter\c!setups}% expanded ?
%\advance\leftskip \floatcaptionparameter\c!leftmargin
%\advance\rightskip\floatcaptionparameter\c!rightmargin
\relax}
diff --git a/tex/context/base/strc-not.mkiv b/tex/context/base/strc-not.mkiv
index 1eefdf04c..4b0f9452e 100644
--- a/tex/context/base/strc-not.mkiv
+++ b/tex/context/base/strc-not.mkiv
@@ -686,6 +686,7 @@
\the\everybeforenoteinsert
\insert\currentnoteins\bgroup
\the\everyinsidenoteinsert
+ \doprocesslocalsetups{\noteparameter\c!setups}% experimental
\handlenoteitself{#1}{#2}%
\egroup
\the\everyafternoteinsert
diff --git a/tex/context/base/strc-reg.lua b/tex/context/base/strc-reg.lua
index 34c63caaf..95246bff7 100644
--- a/tex/context/base/strc-reg.lua
+++ b/tex/context/base/strc-reg.lua
@@ -295,9 +295,8 @@ function jobregisters.compare(a,b)
for i=1,max do
if result == 0 then
result = compare(ea[i],eb[i])
- else
- return result
end
+ return result
end
if result ~= 0 then
return result
@@ -442,7 +441,7 @@ function jobregisters.flush(data,options,prefixspec,pagespec)
texsprint(ctxcatcodes,format("\\registerpagerange{%s}{%s}{",er.internal or 0,er.realpage or 0))
helpers.prefixpage(f_entry,prefixspec,pagespec)
local er = t_entry.references
- texsprint(ctxcatcodes,format("}{%s}{%s}{",er.internal or 0,er.realpage or 0))
+ texsprint(ctxcatcodes,format("}{%s}{%s}{",er.internal or 0,er.lastrealpage or er.realpage or 0))
if is_last then
helpers.prefixlastpage(t_entry,prefixspec,pagespec) -- swaps page and realpage keys
else
diff --git a/tex/context/base/strc-reg.mkiv b/tex/context/base/strc-reg.mkiv
index 5a6e42a71..d807b2939 100644
--- a/tex/context/base/strc-reg.mkiv
+++ b/tex/context/base/strc-reg.mkiv
@@ -718,9 +718,10 @@
\def\withregisterpagecommand#1#2#3%
{\def\currentregisterpageindex{#1}%
\iflocation
- \goto{\registerparameter\c!pagecommand{#2}}[internal(#1)]%
+ % \goto{\registerparameter\c!pagecommand{#3}}[internal(#1)]%
+ \goto{\registerparameter\c!pagecommand{#3}}[page(#3)]%
\else
- \registerparameter\c!pagecommand{#2}%
+ \registerparameter\c!pagecommand{#3}%
\fi}
\def\registeronepage#1#2#3% content
diff --git a/tex/context/base/syst-aux.mkiv b/tex/context/base/syst-aux.mkiv
index 88bcc3778..7c1787705 100644
--- a/tex/context/base/syst-aux.mkiv
+++ b/tex/context/base/syst-aux.mkiv
@@ -1120,6 +1120,15 @@
\def\processcommacommand[#1]%
{\expandafter\processcommalist\expandafter[\normalexpanded{#1}]}
+% \def\processcommacommand[#1]%
+% {\edef\expandedcommacommand{#1%
+% \ifx\expandedcommacommand\empty\else
+% \doprocesscommacommand
+% \fi}
+%
+% \def\doprocesscommacommand
+% {\expandafter\processcommalist\expandafter[\expandedcommacommand]}
+
%D The argument to \type{\command} is not delimited. Because
%D we often use \type{[]} as delimiters, we also have:
%D
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua
index 77fb528e7..d7b687b7c 100644
--- a/tex/generic/context/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts.lua
--- merge date : 02/14/10 19:03:57
+-- merge date : 02/15/10 22:19:32
do -- begin closure to overcome local limits and interference