Reference links with focus=standard option
Hi mailing list, I'm having some trouble with (interactive) references. I had a quick search of the mailing list and couldn't find any talk about this kind of issue, so I'm asking now. Hoping you could help me out. Consider the following example document. \setupinteraction [ state=start, % focus=standard, ] \starttext \startchapter[title=Some Title, reference=pt:ref] Lorem ipsum dolor sit amet, \periods \startplaceformula[reference=eq:ref] \startformula c^2 = a^2 + b^2. \stopformula \stopplaceformula Lorem ipsum dolor sit amet, \periods \startitemize[r] \startitem[it:ref] Lorem ipsum dolor sit amet, \periods \stopitem \stopitemize And now we can refer to formula~\in[eq:ref], chapter~\in[pt:ref], and item~\in[it:ref]. \page And now we can refer to formula~\in[eq:ref], chapter~\in[pt:ref], and item~\in[it:ref]. \stopchapter \stoptext All is well with the default setting for focus. I don't like that with most (?) PDF viewers the default setting changes the zoom level, so I usually turn on \setupinteraction[focus=standard] instead. But this seems to break (some of) the interactive links. The links to the the chapter and item still work, but the links to the formula are broken. As an experiment, I just tried this with a couple different viewers (Firefox, Evince, Okular, Xpdf, Qpdfview) and (putting \setupinteraction[focus=standard] back in) the link is indeed broken on all of them, /except/ for Qpdfview which still seems to understand it. What's going on here? Thanks in advance, Lawrence
On 04/11/2018 04:35 PM, Lawrence Bell wrote:
Hi mailing list,
I'm having some trouble with (interactive) references. I had a quick search of the mailing list and couldn't find any talk about this kind of issue, so I'm asking now. Hoping you could help me out.
All is well with the default setting for focus. I don't like that with most (?) PDF viewers the default setting changes the zoom level, so I usually turn on \setupinteraction[focus=standard] instead. But this seems to break (some of) the interactive links. The links to the the chapter and item still work, but the links to the formula are broken.
Hi Lawrence, it seems that something is broken when ConTeXt generates the destinations for these links.
As an experiment, I just tried this with a couple different viewers (Firefox, Evince, Okular, Xpdf, Qpdfview) and (putting \setupinteraction[focus=standard] back in) the link is indeed broken on all of them, /except/ for Qpdfview which still seems to understand it.
qpdfview complains after having clicking the link: "Error: failed to look up (eq:ref)" "Error: failed to look up (eq:ref)"
What's going on here?
I generated an uncompressed PDF document from your source: http://pdf.ousia.tk/focus-standard.pdf. The issue seems to be in the name tree node dictionary: 35 0 obj << /Limits [ (#1) (pt:ref) ] /Names [ (#1) 15 0 R (#2) 19 0 R (#3) 20 0 R (it:ref) 20 0 R (pt:ref) 15 0 R ] >> endobj (eq:ref) seems to be missing there. But I have to investigate the issue further to get a more accurate report. I hope it helps, Pablo -- http://www.ousia.tk
On 04/11/2018 07:14 PM, Pablo Rodriguez wrote:
On 04/11/2018 04:35 PM, Lawrence Bell wrote:
[...] What's going on here?
I generated an uncompressed PDF document from your source: http://pdf.ousia.tk/focus-standard.pdf. [...] (eq:ref) seems to be missing there. But I have to investigate the issue further to get a more accurate report.
Lawrence, all I got is that floats have problems with named destinations (the ones you get with \setupinteraction[focus=standard]). \setupexternalfigures[location=default] \setupinteraction [state=start, focus=standard] \starttext \startplacechemical[reference=ch:ref] \startchemicalformula \chemical{(C_2H_5)_2Zn}{DEZ} \stopchemicalformula \stopplacechemical \placefigure[here][fl:ref]{Cow}{\externalfigure[cow]} formula \in[ch:ref] figure \in[fl:ref] \stoptext Sorry, but I’m afraid that I don’t know exactly what misbehaves here. I hope Hans can fix it. Pablo -- http://www.ousia.tk
Pablo, Thanks very much for your replies. It's reassuring to see (it seems) that I've not overlooked some extra option that magically does the job :) Worst case scenario I'll hack something together, or just settle for the default focus functionality, which is not the end of the world. Just feel like there should be a better/more elegant way. On 11/04/18 19:36, Pablo Rodriguez wrote:
On 04/11/2018 07:14 PM, Pablo Rodriguez wrote:
On 04/11/2018 04:35 PM, Lawrence Bell wrote:
[...] What's going on here? I generated an uncompressed PDF document from your source: http://pdf.ousia.tk/focus-standard.pdf. [...] (eq:ref) seems to be missing there. But I have to investigate the issue further to get a more accurate report. Lawrence,
all I got is that floats have problems with named destinations (the ones you get with \setupinteraction[focus=standard]).
\setupexternalfigures[location=default] \setupinteraction [state=start, focus=standard]
\starttext
\startplacechemical[reference=ch:ref] \startchemicalformula \chemical{(C_2H_5)_2Zn}{DEZ} \stopchemicalformula \stopplacechemical
\placefigure[here][fl:ref]{Cow}{\externalfigure[cow]}
formula \in[ch:ref]
figure \in[fl:ref] \stoptext
Sorry, but I’m afraid that I don’t know exactly what misbehaves here. I hope Hans can fix it.
Pablo
participants (2)
-
Lawrence Bell
-
Pablo Rodriguez