two issues with interactive hyperlinks (please comment)
![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
Hans, I’m afraid there is a regression partially displayed in the following code: \setupinteraction[state=start, focus=standard] \enabledirectives[references.border] \setupinteractionscreen[option=fit] \setupnote[footnote][way=bytext, location=text] \starttext \completecontent \chapter{Main issue} Simple steps to reproduce the issue with notes: \startitemize[n] \item Open the file and keep browsing it fit to width. \item Click on link for note 24 (on next page). \item Change view to fit to width. \item Search for note 24 in footnotes. \item Click back to return to main text from anchor 24. \item Change view to fit to width. \item Search again for the text with footnote 24 referenced. \item Keep in mind that in a 15 inch screen the fit to height, text is hardly readable. \stopitemize \page \dorecurse{10}{% \dorecurse{10}{This is text.% \footnote{This is a footnote.}\par}} \placefootnotes \stoptext The regression is that \setupinteraction[focus=standard] doesn’t work with hyperlink in table of contents for chapter in betas from 2016.02.15 10:26. Beta from 2016.02.08 15:35 adds a link with named destination (/XYZ). Next beta from 2016.02.15 10:26 adds a link pointing only to the page (/Fit). This is the regression. And I think it is time to discuss an issue with textual links. I know you don’t like it. I’m sorry, but I think it is an essential feature for hyperlinks. [I’d request other users to contribute their experiences with this issue, please.] We need that all links in a text file behave the same way to reach their destination. Page 2 from sample above describes what is wrong (and crazy to send a PDF document generated this way [at least, not relaxing to the reader]). And if \setupinteraction[focus=standard] is used, all link destinations should be named ones (/XYZ). Of course, I’m not talking about widgets for presentations. But footnotes, references, linenotes and other similar links that may appear in a text should behave the same way in the same document. Sorry, but some users complained to me about this behavior. I know that some PDF readers don’t follow this (only mupdf that I’m aware of [and I opened an issue: http://bugs.ghostscript.com/show_bug.cgi?id=696442]). SumatraPDF, Adobe, evince and xpdf implement named destinations. It is an extremely useful feature and it isn’t reasonable to expect from users that they have huge screens to read PDF documents generated with ConTeXt. And in many scenarios, having a screen version (different from the print version) is not an option. And as explained in the sample code above, I have only a 15-inch screen. Would it be possible that the destinations with links in a text all honored \setupinteraction[focus=standard]? Many thanks for your excellent work and your help, Pablo -- http://www.ousia.tk
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
On 2/21/2016 8:54 PM, Pablo Rodriguez wrote:
Hans,
I’m afraid there is a regression partially displayed in the following code:
\setupinteraction[state=start, focus=standard] \enabledirectives[references.border] \setupinteractionscreen[option=fit] \setupnote[footnote][way=bytext, location=text] \starttext \completecontent
\chapter{Main issue} Simple steps to reproduce the issue with notes:
\startitemize[n] \item Open the file and keep browsing it fit to width. \item Click on link for note 24 (on next page). \item Change view to fit to width. \item Search for note 24 in footnotes. \item Click back to return to main text from anchor 24. \item Change view to fit to width. \item Search again for the text with footnote 24 referenced. \item Keep in mind that in a 15 inch screen the fit to height, text is hardly readable. \stopitemize
\page \dorecurse{10}{% \dorecurse{10}{This is text.% \footnote{This is a footnote.}\par}} \placefootnotes \stoptext
The regression is that \setupinteraction[focus=standard] doesn’t work with hyperlink in table of contents for chapter in betas from 2016.02.15 10:26.
a bit too complex example
Beta from 2016.02.08 15:35 adds a link with named destination (/XYZ). Next beta from 2016.02.15 10:26 adds a link pointing only to the page (/Fit).
This is the regression.
i checked the changes and uploaded beta (split the methods a bit) .. hopefully i didn't break the patches that taco needed (option=name)
And I think it is time to discuss an issue with textual links. I know you don’t like it. I’m sorry, but I think it is an essential feature for hyperlinks.
well, in general i only read full screen, or print a document, or don't read a pdf at all as i just loose track when views keep changing (so for me a viewing device is only useful when it can show a page, which the surface (or even a nexus) can do quite ok)
[I’d request other users to contribute their experiences with this issue, please.]
We need that all links in a text file behave the same way to reach their destination. Page 2 from sample above describes what is wrong (and crazy to send a PDF document generated this way [at least, not relaxing to the reader]).
And if \setupinteraction[focus=standard] is used, all link destinations should be named ones (/XYZ). Of course, I’m not talking about widgets for presentations. But footnotes, references, linenotes and other similar links that may appear in a text should behave the same way in the same document.
this also depends on if that xyz info is available in a consistent way which is not always the case (even then one needs take margins and other things into account so whatever gets added in the core will always be suboptimal and imo kind of crappy, so never default)
Sorry, but some users complained to me about this behavior. I know that some PDF readers don’t follow this (only mupdf that I’m aware of [and I opened an issue: http://bugs.ghostscript.com/show_bug.cgi?id=696442]). SumatraPDF, Adobe, evince and xpdf implement named destinations.
well, that is the problem: for 15 years there has been no real consistent viewer behaviour ... for long i tested using acrobat, but the interface kept changing and got worse so now i test with sumatrapdf which lacks some features or has issues) and i find it real hard to test this kind of stuff (i simply lack the mindset for it) so when something is needed i need real simple and small examples and/or know what kind of pdf code is needed that works in most viewers
It is an extremely useful feature and it isn’t reasonable to expect from users that they have huge screens to read PDF documents generated with ConTeXt. And in many scenarios, having a screen version (different from the print version) is not an option. And as explained in the sample code above, I have only a 15-inch screen.
actually i wonder if screens need to be huge ... small high res screens are quite readable (i consider reading pdf on a small phone a no-go whatever scaling gets applied and i expect epub like devices eventually to get the same quality as paper)
Would it be possible that the destinations with links in a text all honored \setupinteraction[focus=standard]?
this can only be implemented stepwise (given that i can motivate myself so it also depends on the weather, music, reasonable background movie or talkshow, lack of other tasks, etc) .. and of course a reasonable viewer (i wasted too much time already on bypassing fuzzy features that i don't need myself) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
On 02/22/2016 08:08 PM, Hans Hagen wrote:
On 2/21/2016 8:54 PM, Pablo Rodriguez wrote:
[...] The regression is that \setupinteraction[focus=standard] doesn’t work with hyperlink in table of contents for chapter in betas from 2016.02.15 10:26.
a bit too complex example
Many thanks for your reply, Hans. Sorry, I mixed both issues. And it was easy to provide two samples (and even two messages to the list).
Beta from 2016.02.08 15:35 adds a link with named destination (/XYZ). Next beta from 2016.02.15 10:26 adds a link pointing only to the page (/Fit).
This is the regression.
i checked the changes and uploaded beta (split the methods a bit) .. hopefully i didn't break the patches that taco needed (option=name)
Many thanks for the new beta, it seems to have fixed the issue (sorry, but I haven’t checked with all my files).
And I think it is time to discuss an issue with textual links. I know you don’t like it. I’m sorry, but I think it is an essential feature for hyperlinks.
well, in general i only read full screen, or print a document, or don't read a pdf at all as i just loose track when views keep changing (so for me a viewing device is only useful when it can show a page, which the surface (or even a nexus) can do quite ok)
I avoid to read PDF documents on screen as much as I can. But I’m an amateur. I don’t even have a printer at home. I totally depend on copyshops (there isn’t none especially close where I live). Sometimes we amateurs have to proofread on screens (on the 15-inch screen in the 10-year-old laptop I have). There is no other way. After the text is composed in full, we print in a copyshop. And proofreading on screen only works, if text can be displayed in fit to width form. I also loose track when view changes. Sorry, but it is really annoying This is exactly what happens when I click on a link for a footnote (or index reference). From fit to width, it goes to /Fit.
And if \setupinteraction[focus=standard] is used, all link destinations should be named ones (/XYZ). Of course, I’m not talking about widgets for presentations. But footnotes, references, linenotes and other similar links that may appear in a text should behave the same way in the same document.
this also depends on if that xyz info is available in a consistent way which is not always the case (even then one needs take margins and other things into account so whatever gets added in the core will always be suboptimal and imo kind of crappy, so never default)
I’m not asking for a default. I’m asking for named destinations in all kinds of links (that is, also for footnotes, references and indices) behave the same way. Otherwise, it generates an highly inconsistent user experience (it’s dizzy).
Sorry, but some users complained to me about this behavior. I know that some PDF readers don’t follow this (only mupdf that I’m aware of [and I opened an issue: http://bugs.ghostscript.com/show_bug.cgi?id=696442]). SumatraPDF, Adobe, evince and xpdf implement named destinations.
well, that is the problem: for 15 years there has been no real consistent viewer behaviour ... for long i tested using acrobat, but the interface kept changing and got worse so now i test with sumatrapdf which lacks some features or has issues) and i find it real hard to test this kind of stuff (i simply lack the mindset for it) so when something is needed i need real simple and small examples and/or know what kind of pdf code is needed that works in most viewers
Well, Sumatra works fine with this concrete feature (at least, this is my experience). And mupdf is the only exception in this regard. Besides that, all other links use named destinations, so why are they so problematic (not from the coding perspective) when it somes to footnotes, references and indices? Sorry, but I don’t understand the difference. I think that (futhermore not being a default) ConTeXt should implemente what is an ISO standard nowadays. If viewers don’t follow the standard, users may complain, But if documents don’t follow any standard in this point, no viewer will be able to handle these documents properly. And sorry for saying this (I have no other experience), but I had never an issue with that using LaTeX. I love ConTeXt and it’s a pity that this isn’t implemented yet.
It is an extremely useful feature and it isn’t reasonable to expect from users that they have huge screens to read PDF documents generated with ConTeXt. And in many scenarios, having a screen version (different from the print version) is not an option. And as explained in the sample code above, I have only a 15-inch screen.
actually i wonder if screens need to be huge ... small high res screens are quite readable (i consider reading pdf on a small phone a no-go whatever scaling gets applied and i expect epub like devices eventually to get the same quality as paper)
Well, A4 pages aren’t readable on a 15-inch screen (that is very common in laptops). I would say, no matter which resolution it has. And sorry, not being the default, why is wrong reading pages in fit to width mode?
Would it be possible that the destinations with links in a text all honored \setupinteraction[focus=standard]?
this can only be implemented stepwise (given that i can motivate myself so it also depends on the weather, music, reasonable background movie or talkshow, lack of other tasks, etc) .. and of course a reasonable viewer (i wasted too much time already on bypassing fuzzy features that i don't need myself)
Is there anything that I can do to help? I’m especially interested in this feature. I think this is a basic feature that will benefit many ConTeXt users. Many thanks for your help, Pablo -- http://www.ousia.tk
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
On 2/23/2016 12:21 AM, Pablo Rodriguez wrote:
Well, Sumatra works fine with this concrete feature (at least, this is my experience). And mupdf is the only exception in this regard.
hm, sumatra uses the mupdf engine
Besides that, all other links use named destinations, so why are they so problematic (not from the coding perspective) when it somes to footnotes, references and indices? Sorry, but I don’t understand the difference.
because using named destinations has no advantage when ther eis no view and not all hyperlinked constructs have views (either because it's impossible due to lack of structure i.e. where does something begin/end, or because it's not yet implemented there) the hyperlink mechanism currently has the options page,name,auto (auto being default) so you can try name but still not get what you want; the page variant is needed for documents with 100K or more hyperlinks (and in fact the ability to choose between name/page is also there because in principle we can have backends that only support page linking ... i forgot the details but when pdf came out and acrobat / dvipsone was supported one had named only and the other page only destinations; if i kick out that kind of flexibility we're locked into pdf completely)
I think that (futhermore not being a default) ConTeXt should implemente what is an ISO standard nowadays. If viewers don’t follow the standard, users may complain, But if documents don’t follow any standard in this point, no viewer will be able to handle these documents properly.
well, i have been quite active in implementing what pdf provided and constantly had to adapt to what acrobat finally implemented (often the standard was ahead) and
And sorry for saying this (I have no other experience), but I had never an issue with that using LaTeX. I love ConTeXt and it’s a pity that this isn’t implemented yet.
i don't know about latex but i do know that depending on the engine to do it is quite fragile ... i don't know about today but inconsistent margins, no nesting or overlaying, tricky page dimensions ... the engine's built in mechanisms are heuristics and can fail in some cases ... as you don't make screen docs you probably never ran into that but if we hadn't done it in alternative ways in context i'd probably already had quit working on context a decade ago simply because some docs could not be produced anyway, it's no problem to implement things, given time and motivation, but anything implemented in context has to be predictable ok and above all consistent and the thing that annoys me the most is zooming that one moment gives you a effective 20 pt size and another time 17.5 pt depending on where / how you click and view so one handicap for me is that i won't make test docs for it for example: when one clicks, goto and the viewer zooms in to some piece of text on ehas to assume that the pdf generator guessed right about reasonable margins on top / bottom / left / right as one expect consistency ... it might be convenient on a 768x1024 screen (which imo is unuseable for reading anyway) but on a proper high res screen lack of quality starts dominating
It is an extremely useful feature and it isn’t reasonable to expect from users that they have huge screens to read PDF documents generated with ConTeXt. And in many scenarios, having a screen version (different from the print version) is not an option. And as explained in the sample code above, I have only a 15-inch screen.
actually i wonder if screens need to be huge ... small high res screens are quite readable (i consider reading pdf on a small phone a no-go whatever scaling gets applied and i expect epub like devices eventually to get the same quality as paper)
Well, A4 pages aren’t readable on a 15-inch screen (that is very common in laptops). I would say, no matter which resolution it has.
And sorry, not being the default, why is wrong reading pages in fit to width mode?
that one still has to make sure that there is a reasonable view area (so that one sees what went and comes) ... i'm not sure how you handle it but esp jumping from page to page in a fit width mode is quite annoying; fit width actually makes sense when one makes each chapter (or section) into one long page and i actually played with it but i found no viewer capable to keep the same scale each page btw, the upcoming zoom fashion is not the ones we have now but zoom to some tagged location (can be mid line)
Would it be possible that the destinations with links in a text all honored \setupinteraction[focus=standard]?
this can only be implemented stepwise (given that i can motivate myself so it also depends on the weather, music, reasonable background movie or talkshow, lack of other tasks, etc) .. and of course a reasonable viewer (i wasted too much time already on bypassing fuzzy features that i don't need myself)
Is there anything that I can do to help? I’m especially interested in this feature.
small few page examples with predictable positioning and predictable spacing (btw, footnotes will always be sort of a pain as they are rendered in special ways, but footnotes should be forbidden anyway; if a doc is also for screen endnotes are way better)
I think this is a basic feature that will benefit many ConTeXt users.
Many thanks for your help,
Pablo
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
On 02/23/2016 09:33 AM, Hans Hagen wrote:
On 2/23/2016 12:21 AM, Pablo Rodriguez wrote:
Well, Sumatra works fine with this concrete feature (at least, this is my experience). And mupdf is the only exception in this regard.
hm, sumatra uses the mupdf engine
Well, this is more complex than it seems. Right now, SumatraPDF cannot simply merge the latest version of fitz (https://github.com/sumatrapdfreader/sumatrapdf/issues/344#issuecomment-15626...). And SumatraPDF has this particular feature implemented.
Besides that, all other links use named destinations, so why are they so problematic (not from the coding perspective) when it somes to footnotes, references and indices? Sorry, but I don’t understand the difference.
because using named destinations has no advantage when ther eis no view and not all hyperlinked constructs have views (either because it's impossible due to lack of structure i.e. where does something begin/end, or because it's not yet implemented there)
Not sure I understand your explanation (totally my fault, of course). I think your implementation of \setupinteraction[focus=standard] as: ["<< /D [ %i 0 R /XYZ %0.3F %0.3F null ] >>"] is really great. Because you don’t chenge zooming or page view at all. This is extremely wise (as ConTeXt itself). It is only a pity that it doesn’t work for footnotes, endnotes and index entries.
the hyperlink mechanism currently has the options page,name,auto (auto being default) so you can try name but still not get what you want; the page variant is needed for documents with 100K or more hyperlinks (and in fact the ability to choose between name/page is also there because in principle we can have backends that only support page linking ... i forgot the details but when pdf came out and acrobat / dvipsone was supported one had named only and the other page only destinations; if i kick out that kind of flexibility we're locked into pdf completely)
These options are totally new (and previously unknown to me). I’m afraid I wasn’t able to find them in the ConTeXt command list (http://www.pragma-ade.com/general/qrcs/setup-en.pdf). Grepping in the source, I see \showsetup{interaction} in scrn-ini.mkiv. I don’t know how to get the options from showsetup (I get a MISSING SETUP message [probably I’m missing to load a module]). I don’t know how to get the name (which command and which option?). lpdf-ano.lua contains variables.names (and v_names). I’m afraid I don’t know how to use that. I know it may be stupid, but Lua code (as coding in general) is Greek to me. Sorry, but I’m only an average computer user. With a very basic sense for typography (awakened by ConTeXt).
I think that (futhermore not being a default) ConTeXt should implemente what is an ISO standard nowadays. If viewers don’t follow the standard, users may complain, But if documents don’t follow any standard in this point, no viewer will be able to handle these documents properly.
well, i have been quite active in implementing what pdf provided and constantly had to adapt to what acrobat finally implemented (often the standard was ahead) and
Sorry, you are right and I was rude from me. I didn’t mean that. You implemented standard features at my request in days and I’m happy and extremely helpful for that. I wrote “nowadays” because you have more experience than myself (I’m not a professional) and I agree: PDF viewers suck. The point I was trying to make was the following: if PDF viewers fail to comply with the standard, it is their problem. And for the open source viewers, I will report to them the issue (well, for the most imporant ones ;-). For example, you implemented printing options (such as duplex printing) in ConTeXt (I’m extremely happy with this feature, it’s extraorinarily useful in copyshops). Well, I know I have to use Acrobat (and a recent [or decent] version). This doesn’t prevent that I report the issue at poppler (https://bugs.freedesktop.org/show_bug.cgi?id=92779). It will take a while to get this implemented, I know. And I have to report it at mupdf when they enable printing suppport in mupdf-gl.
And sorry for saying this (I have no other experience), but I had never an issue with that using LaTeX. I love ConTeXt and it’s a pity that this isn’t implemented yet.
i don't know about latex but i do know that depending on the engine to do it is quite fragile ... i don't know about today but inconsistent margins, no nesting or overlaying, tricky page dimensions ... the engine's built in mechanisms are heuristics and can fail in some cases ... as you don't make screen docs you probably never ran into that but if we hadn't done it in alternative ways in context i'd probably already had quit working on context a decade ago simply because some docs could not be produced
Sorry, the comparision was probably unfair. It isn’t something specific to ConTeXt or LuaTeX. It is jsut that footnotes (and other link) destionations just don’t have named ones with null zooming.
anyway, it's no problem to implement things, given time and motivation, but anything implemented in context has to be predictable ok and above all consistent and the thing that annoys me the most is zooming that one moment gives you a effective 20 pt size and another time 17.5 pt depending on where / how you click and view so one handicap for me is that i won't make test docs for it
I totally agree with that. This is the reason why I consider setting named destinations to null zooming an extremely wise decision from your side. Otherwise, readers get sick after clicking in links.
for example: when one clicks, goto and the viewer zooms in to some piece of text on ehas to assume that the pdf generator guessed right about reasonable margins on top / bottom / left / right as one expect consistency ... it might be convenient on a 768x1024 screen (which imo is unuseable for reading anyway) but on a proper high res screen lack of quality starts dominating
I try to prevent reading. But my ConTeXt manual in Spanish (http://www.aprender-context.tk, to be released in a couple of decades :-)) has to be proofread also on screen. Of course, this is the basic proofreading. And I cannot afford (mainly space at the desk I use to work) a higher resolution screen. My 10yo Dell Inspiron 6400 running Fedora 23 (and the latest beta from the ConTeXt Suite) works fine.
Well, A4 pages aren’t readable on a 15-inch screen (that is very common in laptops). I would say, no matter which resolution it has.
And sorry, not being the default, why is wrong reading pages in fit to width mode?
that one still has to make sure that there is a reasonable view area (so that one sees what went and comes) ... i'm not sure how you handle it but esp jumping from page to page in a fit width mode is quite annoying; fit width actually makes sense when one makes each chapter (or section) into one long page and i actually played with it but i found no viewer capable to keep the same scale each page
With null zooming (as implemented for named destinations), the user has to set a confortable view. In most of the cases only the top value will be used And the top left anchors for note reference (or index reference) are fine. I’m only guessing, but I think this is the way to do it.
btw, the upcoming zoom fashion is not the ones we have now but zoom to some tagged location (can be mid line)
But in that case, the reader is responsible for that. The named destination doesn’t change zooming.
Is there anything that I can do to help? I’m especially interested in this feature.
small few page examples with predictable positioning and predictable spacing (btw, footnotes will always be sort of a pain as they are rendered in special ways, but footnotes should be forbidden anyway; if a doc is also for screen endnotes are way better)
I use endnotes for my documents. And the problem is exactly the same: page view and zooming changes. With named destinations, zoom is set to null (please, don’t change that ever) and you get where you need to. BTW, this is what already happens with headings. I hope my explanation is more accurate now. Please, let me know if there are some unaccurate points. Many thanks for your help, Pablo -- http://www.ousia.tk
![](https://secure.gravatar.com/avatar/b79687264c3e06cba13b54d05b12a9f5.jpg?s=120&d=mm&r=g)
Pablo Rodriguez mailto:oinos@gmx.es 24. Februar 2016 um 10:01 On 02/23/2016 09:33 AM, Hans Hagen wrote:
On 2/23/2016 12:21 AM, Pablo Rodriguez wrote:
Well, Sumatra works fine with this concrete feature (at least, this is my experience). And mupdf is the only exception in this regard. hm, sumatra uses the mupdf engine
Well, this is more complex than it seems. Right now, SumatraPDF cannot simply merge the latest version of fitz (https://github.com/sumatrapdfreader/sumatrapdf/issues/344#issuecomment-15626...).
And SumatraPDF has this particular feature implemented.
Besides that, all other links use named destinations, so why are they so problematic (not from the coding perspective) when it somes to footnotes, references and indices? Sorry, but I don’t understand the difference. because using named destinations has no advantage when ther eis no view and not all hyperlinked constructs have views (either because it's impossible due to lack of structure i.e. where does something begin/end, or because it's not yet implemented there)
Not sure I understand your explanation (totally my fault, of course).
I think your implementation of \setupinteraction[focus=standard] as:
["<< /D [ %i 0 R /XYZ %0.3F %0.3F null ]>>"]
is really great. Because you don’t chenge zooming or page view at all. This is extremely wise (as ConTeXt itself). It is only a pity that it doesn’t work for footnotes, endnotes and index entries.
the hyperlink mechanism currently has the options page,name,auto (auto being default) so you can try name but still not get what you want; the page variant is needed for documents with 100K or more hyperlinks (and in fact the ability to choose between name/page is also there because in principle we can have backends that only support page linking ... i forgot the details but when pdf came out and acrobat / dvipsone was supported one had named only and the other page only destinations; if i kick out that kind of flexibility we're locked into pdf completely)
These options are totally new (and previously unknown to me). I’m afraid I wasn’t able to find them in the ConTeXt command list (http://www.pragma-ade.com/general/qrcs/setup-en.pdf).
The command reference contains only a fraction of all available commands, there will be a extended version but this will take a while.
Grepping in the source, I see \showsetup{interaction} in scrn-ini.mkiv. I don’t know how to get the options from showsetup (I get a MISSING SETUP message [probably I’m missing to load a module]). I don’t know how to get the name (which command and which option?). It should be \showsetup{setupinteraction} but I attached a file with a relevant commands in this file.
Wolfgang
![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
On 02/24/2016 10:50 AM, Wolfgang Schuster wrote:
Pablo Rodriguez 24. Februar 2016 um 10:01 [...] These options are totally new (and previously unknown to me). I’m afraid I wasn’t able to find them in the ConTeXt command list (http://www.pragma-ade.com/general/qrcs/setup-en.pdf).
The command reference contains only a fraction of all available commands, there will be a extended version but this will take a while.
Many thanks for your help, Wolfgang. I only thought this was and old option (already documented there).
Grepping in the source, I see \showsetup{interaction} in scrn-ini.mkiv. I don’t know how to get the options from showsetup (I get a MISSING SETUP message [probably I’m missing to load a module]). I don’t know how to get the name (which command and which option?).
It should be \showsetup{setupinteraction} but I attached a file with a relevant commands in this file.
Many thanks for the file. Pablo -- http://www.ousia.tk
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
On 2/24/2016 10:01 AM, Pablo Rodriguez wrote:
And SumatraPDF has this particular feature implemented.
currently sumatra is behaving quite weird with these zoom features
because using named destinations has no advantage when ther eis no view and not all hyperlinked constructs have views (either because it's impossible due to lack of structure i.e. where does something begin/end, or because it's not yet implemented there)
Not sure I understand your explanation (totally my fault, of course).
when there is no view (i.e. default reader view fit) then we can save bytes by using page references as they don't contain dimensions
is really great. Because you don’t chenge zooming or page view at all. This is extremely wise (as ConTeXt itself). It is only a pity that it doesn’t work for footnotes, endnotes and index entries.
most of the needed code is there; i only need to figure out how to do it efficient (as i don't want bloated tuc file due to rather useless extra references) so i'll have a look at it
The point I was trying to make was the following: if PDF viewers fail to comply with the standard, it is their problem. And for the open source viewers, I will report to them the issue (well, for the most imporant ones ;-).
not even acrobat always complies/complied with the standard (or implemented it) .. widgets are the worst
And I cannot afford (mainly space at the desk I use to work) a higher resolution screen. My 10yo Dell Inspiron 6400 running Fedora 23 (and the latest beta from the ConTeXt Suite) works fine.
i'm surprised that you can run luatex/mkiv on such old machine (luatex benefits from large cpu caches), do you get a reasonable page per second rate?
In most of the cases only the top value will be used And the top left anchors for note reference (or index reference) are fine. I’m only guessing, but I think this is the way to do it.
the bad is that viewers clip lines so additional shift action is needed
With named destinations, zoom is set to null (please, don’t change that ever) and you get where you need to.
unless one forces page destinations for all (which is an option) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
On 02/23/2016 09:33 AM, Hans Hagen wrote:
the hyperlink mechanism currently has the options page,name,auto (auto being default) so you can try name but still not get what you want; the page variant is needed for documents with 100K or more hyperlinks (and in fact the ability to choose between name/page is also there because in principle we can have backends that only support page linking ... i forgot the details but when pdf came out and acrobat / dvipsone was supported one had named only and the other page only destinations; if i kick out that kind of flexibility we're locked into pdf completely)
Hans, sorry, but I could only test it yesterday. I’m afraid it doesn’t work. I suspect what the issue here is. \setupinteraction[page=name] (or \setupinteraction[focus=standard]) only affects to the links generated by lpdf-ano.lua. But footnotes (endnotes, linenotes, index references and similar ones) have destination links generated by lpdf-epa.lua. I may be misreading your comment from line 85 in lpdf-epa.lua. But this is what I get after grepping for "/Fit" in tex/texmf-context/tex/context/base/ from the beta. Wouldn’t it be better to have a single code to generate (destination) links? At least, this would prevent problems such as this one (if I’m not missing something). Many thanks for your help, Pablo -- http://www.ousia.tk
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
On 2/25/2016 7:51 AM, Pablo Rodriguez wrote:
On 02/23/2016 09:33 AM, Hans Hagen wrote:
the hyperlink mechanism currently has the options page,name,auto (auto being default) so you can try name but still not get what you want; the page variant is needed for documents with 100K or more hyperlinks (and in fact the ability to choose between name/page is also there because in principle we can have backends that only support page linking ... i forgot the details but when pdf came out and acrobat / dvipsone was supported one had named only and the other page only destinations; if i kick out that kind of flexibility we're locked into pdf completely)
Hans,
sorry, but I could only test it yesterday.
I’m afraid it doesn’t work. I suspect what the issue here is.
\setupinteraction[page=name] (or \setupinteraction[focus=standard]) only affects to the links generated by lpdf-ano.lua.
But footnotes (endnotes, linenotes, index references and similar ones) have destination links generated by lpdf-epa.lua.
I may be misreading your comment from line 85 in lpdf-epa.lua. But this is what I get after grepping for "/Fit" in tex/texmf-context/tex/context/base/ from the beta.
Wouldn’t it be better to have a single code to generate (destination) links? At least, this would prevent problems such as this one (if I’m not missing something).
lpdf-epa is not used for document hyperlinks but deals with merging hyperlinks and bookmarks from included pages (this is something taco needs so i hope i didn't break that) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
On 2/21/2016 8:54 PM, Pablo Rodriguez wrote:
Hans,
I’m afraid there is a regression partially displayed in the following code:
btw, imo docs for screen should be designed for screen (or one should make two versions, one for screen, one for print) and footnotes should be pop ups or roll-overs but the free acrobat alternatives are not clever enough for that ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/ac3fbaf0a287c4cffbc9f18fa931586c.jpg?s=120&d=mm&r=g)
On Mon, 22 Feb 2016 20:13:27 +0100
Hans Hagen
btw, imo docs for screen should be designed for screen (or one should make two versions, one for screen, one for print) and footnotes should be pop ups or roll-overs but the free acrobat alternatives are not clever enough for that
As Pablo wrote, this just won't happen. It is very rare that *anyone* delivers both screen and print versions of a PDF file (Pragma ADE excepted). This makes me think: Is there some "standard" way for a PDF to contain both versions? I did struggle recently with an Adobe-specific PDF (which I could not even read using Acroread 9) that contained two, in fact three, documents: 1. A form 2. Instructions 3. A page that was shown on non-Adobe readers I do not know enough about PDF and different readers to know how to include several versions, but this would be quite useful. Alan
![](https://secure.gravatar.com/avatar/ac3fbaf0a287c4cffbc9f18fa931586c.jpg?s=120&d=mm&r=g)
On Mon, 22 Feb 2016 23:54:00 +0100
Martin Schröder
2016-02-22 21:40 GMT+01:00 Alan BRASLAU
: This makes me think: Is there some "standard" way for a PDF to contain both versions?
Adobe introduced something called "portfolios" in PDF 1.7 or later, but I doubt that they work with non-Adobe viewers.
Yes, I know about this non-standard extension. In fact, I struggled recently with a PDF using portfolios that could not be read using Adobe reader 9. The provider of the pdf insisted, and continues to insist, that one needs Adobe "version 9 or greater" and suggests that I have a problem with my web browser (which has nothing to do with it), and of course that I need Adobe flash (which is true for the latest Adobe under Windows, but this too is irrelevant). Just speculating, could one distribute a PDF that would be like a book with many parts? I know that Hans is not a fan of part, but I wonder how this is handled? I doubt that any viewers handle prefixed page numbers properly. I just tried looking at a document were pagenumbers are reset way=bychapter and evince at least starts each chapter with a page number=1 in its navigation bar. How would readers (people) deal with a PDF structured as: Part I - print/A4 Part II - print/letter Part III - screen ? Alan
![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
On 02/23/2016 11:07 PM, Alan BRASLAU wrote:
Just speculating, could one distribute a PDF that would be like a book with many parts? I know that Hans is not a fan of part, but I wonder how this is handled? I doubt that any viewers handle prefixed page numbers properly. I just tried looking at a document were pagenumbers are reset way=bychapter and evince at least starts each chapter with a page number=1 in its navigation bar.
How would readers (people) deal with a PDF structured as: Part I - print/A4 Part II - print/letter Part III - screen ?
Well, I don’t dare to post such a PDF document on the net. Most people won’t be able to even know how to handle that in years. And they probably don’t have to. As a matter of fact, thanks to http://wiki.contextgarden.net/PDF_Print_Options, I only have to press Ctrl+P and Enter using Acrobat > 9. In all copyshops, I have to say: please, don’t touch page scaling when is set to None. And to avoid a too rational (or too rude) reasoning, I show them the Advanced tab in the document properties from Acrobat (Ctrl+D [https://cloud.githubusercontent.com/assets/209434/12230087/1167cab0-b84e-11e..., sorry it’s in German]). Then I also explain that this is read from the document and that it won’t change the default from Adobe. If they do that for a living, I guess that your proposal would be too complex for most of the users. Of course, PDF experts will know how to handle that. But they are a minority. (I cannot consider myself an expert, because I don’t fully understand the PDF specification [I cannot code :-(].) Pablo -- http://www.ousia.tk
![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
On 02/22/2016 08:13 PM, Hans Hagen wrote:
On 2/21/2016 8:54 PM, Pablo Rodriguez wrote:
I’m afraid there is a regression partially displayed in the following code:
btw, imo docs for screen should be designed for screen (or one should make two versions, one for screen, one for print) and footnotes should be pop ups or roll-overs but the free acrobat alternatives are not clever enough for that
Sorry, Hans, in my case I don’t provide two versions (print and screen), because I should provide in some cases (from some texts I distribute [this are only the PDF files, besides ePub and Kindle files]): - A4 booklet without footnotes. - A4 booklet with footnotes. - Letter booklet without footnotes. - Letter booklet with footnotes, - A4 portrait as screen copy. I I add (even) a screen version, the user will be confused. Booklets are to be printed. And at work, I want people to be able to read (not in full) on screen what they may also print in booklet form. With a screen version, users will be lost, more than helped. Pablo -- http://www.ousia.tk
participants (5)
-
Alan BRASLAU
-
Hans Hagen
-
Martin Schröder
-
Pablo Rodriguez
-
Wolfgang Schuster