summaryrefslogtreecommitdiff
path: root/tex/context/base/strc-ref.mkvi
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2012-04-07 14:42:00 +0200
committerHans Hagen <pragma@wxs.nl>2012-04-07 14:42:00 +0200
commitaccaa1c9ff625921d02832ff403a53152013b389 (patch)
treec3614c4a98fdd129f9788804830b589e63a16bdd /tex/context/base/strc-ref.mkvi
parentd299f0604c59cccfbec6d650d67826dbfdfd89e7 (diff)
downloadcontext-accaa1c9ff625921d02832ff403a53152013b389.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