summaryrefslogtreecommitdiff
path: root/tex/context/base/strc-ref.mkvi
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2012-04-07 16:20:14 +0300
committerMarius <mariausol@gmail.com>2012-04-07 16:20:14 +0300
commit99b7853b5bae730921bad190f5b5d0eb9552f7aa (patch)
treeabccdabc96ee0401424ab917a0320197431591ff /tex/context/base/strc-ref.mkvi
parent585cbdbdbe50e0fb845fdbcb7276d9fe5c336106 (diff)
downloadcontext-99b7853b5bae730921bad190f5b5d0eb9552f7aa.tar.gz
beta 2012.04.07 14:42
Diffstat (limited to 'tex/context/base/strc-ref.mkvi')
-rw-r--r--tex/context/base/strc-ref.mkvi18
1 files changed, 12 insertions, 6 deletions
diff --git a/tex/context/base/strc-ref.mkvi b/tex/context/base/strc-ref.mkvi
index 0a0f0a546..d1ebffb4a 100644
--- a/tex/context/base/strc-ref.mkvi
+++ b/tex/context/base/strc-ref.mkvi
@@ -130,6 +130,12 @@
\unhbox\b_strc_destination_nodes
\fi}
+\unexpanded\def\strc_references_start_destination_nodes % messy but we need the delay
+ {\setbox\b_strc_destination_nodes\hbox\bgroup} % also sets lastdestinationattribute
+
+\unexpanded\def\strc_references_stop_destination_nodes
+ {\normalexpanded{\egroup\lastdestinationattribute\the\lastdestinationattribute\relax}}
+
\unexpanded\def\strc_references_set_named_reference_indeed#kind#labels#userdata#text% labels userdata text -> todo: userdata
{\ifreferencing
% we could have a more efficient one for page references but for the moment
@@ -156,7 +162,7 @@
\fi
% beware, the structures.references.set writes a
% \setnextinternalreference
- \setbox\b_strc_destination_nodes\hbox\bgroup % messybut we need the delay
+ \strc_references_start_destination_nodes
\ctxlua{structures.references.setandgetattribute("\currentreferencekind", "\referenceprefix","\currentreferencelabels",
{
references = {
@@ -181,7 +187,7 @@
\fi
},"\interactionparameter\c!focus")
}%
- \egroup
+ \strc_references_stop_destination_nodes
\fi
\else
\setbox\b_strc_destination_nodes\emptyhbox
@@ -203,7 +209,7 @@
\setbox\b_strc_destination_nodes\emptyhbox
\lastdestinationattribute\attributeunsetvalue
\else
- \setbox\b_strc_destination_nodes\hbox\bgroup % messybut we need the delay
+ \strc_references_start_destination_nodes
\ctxlua{structures.references.setandgetattribute("\s!page", "\referenceprefix","\currentreferencelabels",
{
references = {
@@ -215,7 +221,7 @@
},
},"\interactionparameter\c!focus")
}%
- \egroup
+ \strc_references_stop_destination_nodes
\fi
\else
\setbox\b_strc_destination_nodes\emptyhbox
@@ -241,7 +247,7 @@
\def\strc_references_set_simple_page_reference#label%
{\iflocation
- \setbox\b_strc_destination_nodes\hbox\bgroup
+ \strc_references_start_destination_nodes
\ctxlua{structures.references.setandgetattribute("\s!page", "\referenceprefix","#label",
{
references = {
@@ -253,7 +259,7 @@
},
},"\interactionparameter\c!focus")
}%
- \egroup
+ \strc_references_stop_destination_nodes
\xdef\currentdestinationattribute{\number\lastdestinationattribute}%
\else
\setbox\b_strc_destination_nodes\emptyhbox