summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tex/context/base/bibl-tra.lua1
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4103 -> 4101 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/grph-inc.lua4
-rw-r--r--tex/context/base/status-files.pdfbin24708 -> 24695 bytes
-rw-r--r--tex/context/base/status-lua.log2
-rw-r--r--tex/context/base/strc-ref.lua65
-rw-r--r--tex/context/base/strc-ref.mkvi22
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
10 files changed, 75 insertions, 25 deletions
diff --git a/tex/context/base/bibl-tra.lua b/tex/context/base/bibl-tra.lua
index 6a7016023..e58aded3b 100644
--- a/tex/context/base/bibl-tra.lua
+++ b/tex/context/base/bibl-tra.lua
@@ -235,6 +235,7 @@ function hacks.resolve(prefix,block,reference) -- maybe already feed it split
if c[3] then
context.dowithbibtexnumrefrange(#collected,i,prefix,c[1],c[2],c[3],c[4])
else
+-- print(#collected,i,prefix,c[1],c[2])
context.dowithbibtexnumref(#collected,i,prefix,c[1],c[2])
end
end
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index a5fdf91d7..1f94beac3 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{2013.08.05 22:51}
+\newcontextversion{2013.08.06 15:50}
%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/context-version.pdf b/tex/context/base/context-version.pdf
index d1aaca936..dc67d2670 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.mkiv b/tex/context/base/context.mkiv
index abad00ead..11ce57e03 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{2013.08.05 22:51}
+\edef\contextversion{2013.08.06 15:50}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/grph-inc.lua b/tex/context/base/grph-inc.lua
index 4f9d7fd92..392aa58b1 100644
--- a/tex/context/base/grph-inc.lua
+++ b/tex/context/base/grph-inc.lua
@@ -742,6 +742,9 @@ local function locate(request) -- name, format, cache
local pattern = figures_patterns[i]
if find(askedformat,pattern[1]) then
format = pattern[2]
+ if trace_figures then
+ report_inclusion("asked format %a matches %a",askedformat,pattern[1])
+ end
break
end
end
@@ -761,6 +764,7 @@ local function locate(request) -- name, format, cache
elseif quitscanning then
return register(askedname)
end
+ askedformat = format -- new per 2013-08-05
elseif trace_figures then
report_inclusion("unknown format %a",askedformat)
end
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index e77908f5f..c2beda085 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.log b/tex/context/base/status-lua.log
index 2de381436..60c0b46f6 100644
--- a/tex/context/base/status-lua.log
+++ b/tex/context/base/status-lua.log
@@ -1,6 +1,6 @@
(cont-yes.mkiv
-ConTeXt ver: 2013.08.05 22:51 MKIV beta fmt: 2013.8.5 int: english/english
+ConTeXt ver: 2013.08.06 15:50 MKIV beta fmt: 2013.8.6 int: english/english
system > 'cont-new.mkiv' loaded
(cont-new.mkiv)
diff --git a/tex/context/base/strc-ref.lua b/tex/context/base/strc-ref.lua
index adf88840f..9b4ec6ab7 100644
--- a/tex/context/base/strc-ref.lua
+++ b/tex/context/base/strc-ref.lua
@@ -18,7 +18,7 @@ local format, find, gmatch, match, concat = string.format, string.find, string.g
local floor = math.floor
local rawget, tonumber = rawget, tonumber
local lpegmatch = lpeg.match
-local copytable = table.copy
+local insert, remove, copytable = table.insert, table.remove, table.copy
local formatters = string.formatters
local allocate = utilities.storage.allocate
@@ -1381,25 +1381,36 @@ local function identify_inner_or_outer(set,var,i)
return v
end
-local components = job.structure.components
+ -- these get auto prefixes but are loaded in the document so they are
+ -- internal .. we also set the realpage (for samepage analysis)
-if components then
- for i=1,#components do
- local component = components[i]
- local data = collected[component]
- local vi = data and data[inner]
- if vi then
- var.outer = component
- var.i = vi
- var.kind = "outer with inner"
- set.external = true
- if trace_identifying then
- report_identify_outer(set,var,i,"4x")
- end
- return var
- end
+ local components = job.structure.components
+ if components then
+ for i=1,#components do
+ local component = components[i]
+ local data = collected[component]
+ local vi = data and data[inner]
+ if vi then
+-- var = copytable(var)
+-- var.kind = "inner"
+-- var.i = vi
+-- var.p = component
+-- runners.inner(var.r = vi.references.realpage
+-- if trace_identifying then
+-- report_identify_outer(set,var,i,"4x")
+-- end
+-- return var
+local v = identify_inner(set,copytable(var),component,collected) -- is copy needed ?
+if v.i and not v.error then
+ v.kind = "inner"
+ if trace_identifying then
+ report_identify_outer(set,var,i,"4x")
end
+ return v
end
+ end
+ end
+ end
local componentreferences = productdata.componentreferences
local productreferences = productdata.productreferences
@@ -2164,3 +2175,23 @@ function references.import(usedname) end
function references.load (usedname) end
commands.exportreferences = references.export
+
+-- better done here .... we don't insert/remove, just use a pointer
+
+local prefixstack = { "" }
+local prefixlevel = 1
+
+function commands.pushreferenceprefix(prefix)
+ prefixlevel = prefixlevel + 1
+ prefixstack[prefixlevel] = prefix
+ context(prefix)
+end
+
+function commands.popreferenceprefix()
+ prefixlevel = prefixlevel - 1
+ if prefixlevel > 0 then
+ context(prefixstack[prefixlevel])
+ else
+ report_references("unable to pop referenceprefix")
+ end
+end
diff --git a/tex/context/base/strc-ref.mkvi b/tex/context/base/strc-ref.mkvi
index 28d759a7f..69ad4629e 100644
--- a/tex/context/base/strc-ref.mkvi
+++ b/tex/context/base/strc-ref.mkvi
@@ -75,6 +75,8 @@
%D document). By setting the \type{interaction} variable, one
%D can influences the way interactive references are set.
+\let\referenceprefix\empty
+
\installcorenamespace{referencing}
\installdirectcommandhandler \??referencing {referencing} % \??referencing
@@ -772,12 +774,24 @@
\unexpanded\def\setupglobalreferenceprefix[#prefix]%
{\xdef\referenceprefix{#prefix}}
+% \unexpanded\def\pushreferenceprefix#prefix%
+% {\pushmacro\referenceprefix
+% \xdef\referenceprefix{#prefix}} % global
+
+% \unexpanded\def\popreferenceprefix
+% {\popmacro\referenceprefix}
+
+\unexpanded\def\globalpushreferenceprefix#prefix%
+ {\xdef\referenceprefix{\ctxcommand{pushreferenceprefix("#prefix")}}}
+
+\unexpanded\def\globalpopreferenceprefix
+ {\xdef\referenceprefix{\ctxcommand{popreferenceprefix()}}}
+
\unexpanded\def\pushreferenceprefix#prefix%
- {\pushmacro\referenceprefix
- \xdef\referenceprefix{#prefix}}
+ {\edef\referenceprefix{\ctxcommand{pushreferenceprefix("#prefix")}}}
\unexpanded\def\popreferenceprefix
- {\popmacro\referenceprefix}
+ {\edef\referenceprefix{\ctxcommand{popreferenceprefix()}}}
\def\m_strc_references_prefix_yes{+}
\def\m_strc_references_prefix_nop{-}
@@ -800,7 +814,7 @@
\fi\fi\fi\fi}
\appendtoks
- \setupreferenceprefix[\referencingparameter\c!prefix]
+ \setupreferenceprefix[\referencingparameter\c!prefix]
\to \everysetupreferencing
%D We can typeset a reference using \type{\in}, \type{\at} and
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 04c817c7b..6c5476801 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 : 08/05/13 22:51:02
+-- merge date : 08/06/13 15:50:04
do -- begin closure to overcome local limits and interference