summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tex/context/base/back-exp.lua71
-rw-r--r--tex/context/base/back-exp.mkiv20
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4436 -> 4430 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/spac-par.mkiv3
-rw-r--r--tex/context/base/status-files.pdfbin25001 -> 24995 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin327109 -> 327112 bytes
-rw-r--r--tex/context/base/strc-reg.lua5
-rw-r--r--tex/context/base/strc-reg.mkiv9
-rw-r--r--tex/context/base/strc-tag.lua1
-rw-r--r--tex/context/base/strc-tag.mkiv1
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
13 files changed, 87 insertions, 29 deletions
diff --git a/tex/context/base/back-exp.lua b/tex/context/base/back-exp.lua
index b528f5a14..1210f6925 100644
--- a/tex/context/base/back-exp.lua
+++ b/tex/context/base/back-exp.lua
@@ -487,6 +487,27 @@ local function makebreaknode(attributes) -- maybe no fulltag
}
end
+local function ignorebreaks(result,element,detail,n,fulltag,di)
+ local data = di.data
+ for i=1,#data do
+ local d = data[i]
+ if d.content == " " then
+ d.content = ""
+ end
+ end
+end
+
+local function ignorespaces(result,element,detail,n,fulltag,di)
+ local data = di.data
+ for i=1,#data do
+ local d = data[i]
+ local c = d.content
+ if type(c) == "string" then
+ d.content = lpegmatch(p_stripper,c)
+ end
+ end
+end
+
do
local fields = { "title", "subtitle", "author", "keywords" }
@@ -606,30 +627,6 @@ do
end
-local function ignorebreaks(result,element,detail,n,fulltag,di)
- local data = di.data
- for i=1,#data do
- local d = data[i]
- if d.content == " " then
- d.content = ""
- end
- end
-end
-
-local function ignorespaces(result,element,detail,n,fulltag,di)
- local data = di.data
- for i=1,#data do
- local d = data[i]
- local c = d.content
- if type(c) == "string" then
- d.content = lpegmatch(p_stripper,c)
- end
- end
-end
-
-extras.registerpages = ignorebreaks
-extras.registerseparator = ignorespaces
-
do
local highlight = { }
@@ -653,7 +650,8 @@ do
local f_insert = formatters[' insert="%s"']
function structurestags.setdescription(tag,n)
- local nd = structures.notes.get(tag,n) -- todo: use listdata instead
+ -- we can also use the internals hash or list
+ local nd = structures.notes.get(tag,n)
if nd then
local references = nd.references
descriptions[references and references.internal] = detailedtag("description",tag)
@@ -1306,6 +1304,28 @@ end
do
+ function structurestags.setregister(tag,n)
+ local data = structures.registers.get(tag,n)
+ if data then
+ referencehash[detailedtag("registerlocation",tag)] = data
+ end
+ end
+
+ function extras.registerlocation(result,element,detail,n,fulltag,di)
+ local data = referencehash[fulltag]
+ if data then
+ extras.addreference(result,data.references)
+ return true
+ end
+ end
+
+ extras.registerpages = ignorebreaks
+ extras.registerseparator = ignorespaces
+
+end
+
+do
+
local tabledata = { }
local f_columns = formatters[' columns="%s"']
@@ -2862,3 +2882,4 @@ commands.settagfigure = structurestags.setfigure
commands.settagcombination = structurestags.setcombination
commands.settagtablecell = structurestags.settablecell
commands.settagtabulatecell = structurestags.settabulatecell
+commands.settagregister = structurestags.setregister
diff --git a/tex/context/base/back-exp.mkiv b/tex/context/base/back-exp.mkiv
index d1cd42f15..2f33c0498 100644
--- a/tex/context/base/back-exp.mkiv
+++ b/tex/context/base/back-exp.mkiv
@@ -53,12 +53,25 @@
\newcount\tagparcounter
\let\dotagsetparcounter\relax
+\let\doresetparcounter \relax
\appendtoks
+ \doresetparcounter
+\to \everyflushatnextpar
+
+% \appendtoks
+% \dotagsetparcounter
+% \to \everypar
+
+\prependtoks
\dotagsetparcounter
\to \everypar
-\appendtoks
+% \appendtoks
+% \dotagsetparcounter
+% \to \neverypar
+
+\prependtoks
\dotagsetparcounter
\to \neverypar
@@ -99,6 +112,7 @@
\appendtoks
\unexpanded\def\dotagsetparcounter{\global\advance\tagparcounter\plusone\attribute\taggedparattribute\tagparcounter}%
+ \unexpanded\def\doresetparcounter {\attribute\taggedparattribute\attributeunsetvalue}%
\to \everyenableelements
\appendtoks
@@ -114,6 +128,10 @@
\to \everyenableelements
\appendtoks
+ \unexpanded\def\dotagregisterlocation{\taggedctxcommand{settagregister("\currentregister",\currentregisternumber)}}%
+\to \everyenableelements
+
+\appendtoks
\let\specialfixedspace \explicitfixedspace
\let\specialobeyedspace \explicitobeyedspace
\let\specialstretchedspace\explicitstretchedspace
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index c14360141..3a24852c4 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{2014.08.28 20:19}
+\newcontextversion{2014.08.29 12:05}
%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 dd4b097ae..d38a9ba65 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 fa218f7e5..65433249e 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -28,7 +28,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2014.08.28 20:19}
+\edef\contextversion{2014.08.29 12:05}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/spac-par.mkiv b/tex/context/base/spac-par.mkiv
index 825cdca46..4dd3db243 100644
--- a/tex/context/base/spac-par.mkiv
+++ b/tex/context/base/spac-par.mkiv
@@ -203,6 +203,8 @@
% \glet\flushpostponednodedata\spac_postponed_data_flush
% \fi}
+\newtoks\everyflushatnextpar
+
\unexpanded\def\pushpostponednodedata
{\globalpushbox\b_spac_postponed_data}
@@ -214,6 +216,7 @@
\unexpanded\def\flushatnextpar
{\begingroup
+ \the\everyflushatnextpar
\glet\flushpostponednodedata\spac_postponed_data_flush
\dowithnextboxcs\spac_postponed_data_finish\hbox}
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 056508a6f..27464faf6 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 394676a26..3c077ae91 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-reg.lua b/tex/context/base/strc-reg.lua
index da4ba9b2d..03f4ae0be 100644
--- a/tex/context/base/strc-reg.lua
+++ b/tex/context/base/strc-reg.lua
@@ -570,6 +570,11 @@ registers.store = storeregister
registers.enhance = enhanceregister
registers.extend = extendregister
+function registers.get(tag,n)
+ local list = tobesaved[tag]
+ return list and list.entries[n]
+end
+
function commands.storeregister(rawdata)
local nofentries = storeregister(rawdata)
setinternalreference(nil,nil,rawdata.references.internal)
diff --git a/tex/context/base/strc-reg.mkiv b/tex/context/base/strc-reg.mkiv
index 6147e2c0d..9cb135fdf 100644
--- a/tex/context/base/strc-reg.mkiv
+++ b/tex/context/base/strc-reg.mkiv
@@ -302,9 +302,14 @@
\currentregistersynchronize % here?
% needs thinking ... bla\index{bla}. will break before the . but adding a
% penalty is also no solution
+ \dostarttagged\t!registerlocation\currentregister
\attribute\destinationattribute\lastdestinationattribute \signalcharacter % no \strut as it will be removed during cleanup
+ \dotagregisterlocation
+ \dostoptagged
\endgroup}
+\let\dotagregisterlocation\relax % experiment
+
\unexpanded\def\strc_registers_insert_entry[#1][#2]%
{\def\currentregister{#1}%
\doifelse{\registerparameter\c!ownnumber}\v!yes
@@ -482,6 +487,10 @@
},
}
}}%
+ \dostarttagged\t!registerlocation\currentregister
+ \attribute\destinationattribute\lastdestinationattribute \signalcharacter % no \strut as it will be removed during cleanup
+ \dotagregisterlocation
+ \dostoptagged
\endgroup}
%D Rendering:
diff --git a/tex/context/base/strc-tag.lua b/tex/context/base/strc-tag.lua
index fdbce5b84..8835786bf 100644
--- a/tex/context/base/strc-tag.lua
+++ b/tex/context/base/strc-tag.lua
@@ -83,6 +83,7 @@ local properties = allocate {
sorting = { pdf = "Span", nature = "inline" },
register = { pdf = "Div", nature = "display" },
+ registerlocation = { pdf = "Span", nature = "inline" },
registersection = { pdf = "Div", nature = "display" },
registertag = { pdf = "Span", nature = "mixed" },
registerentries = { pdf = "Div", nature = "display" },
diff --git a/tex/context/base/strc-tag.mkiv b/tex/context/base/strc-tag.mkiv
index 9b3c2feb9..f758d7df3 100644
--- a/tex/context/base/strc-tag.mkiv
+++ b/tex/context/base/strc-tag.mkiv
@@ -63,6 +63,7 @@
\def\t!synonym {synonym} % Span
\def\t!register {register} % Div
+\def\t!registerlocation {registerlocation} % Span
\def\t!registersection {registersection} % Div
\def\t!registertag {registertag} % Span
\def\t!registerentries {registerentries} % Div
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index be74c9c05..61356eb98 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/28/14 20:19:26
+-- merge date : 08/29/14 12:05:51
do -- begin closure to overcome local limits and interference