Re: [NTG-context] two issues with interactive hyperlinks (please comment)

2016-02-25 Thread Hans Hagen

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
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] two issues with interactive hyperlinks (please comment)

2016-02-25 Thread Hans Hagen

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
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] two issues with interactive hyperlinks (please comment)

2016-02-24 Thread Pablo Rodriguez
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
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] two issues with interactive hyperlinks (please comment)

2016-02-24 Thread Pablo Rodriguez
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
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] two issues with interactive hyperlinks (please comment)

2016-02-24 Thread Wolfgang Schuster

Pablo Rodriguez 
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-156269119).

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


interaction.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] two issues with interactive hyperlinks (please comment)

2016-02-24 Thread Pablo Rodriguez
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-11e5-81c5-6d6798d9244f.png,
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
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] two issues with interactive hyperlinks (please comment)

2016-02-24 Thread Pablo Rodriguez
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-156269119).

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 

Re: [NTG-context] two issues with interactive hyperlinks (please comment)

2016-02-23 Thread Alan BRASLAU
On Tue, 23 Feb 2016 14:30:25 +
Christoph Reller  wrote:

>  (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 agree with you about footnotes. And, as mentioned above, I will try
> to come up with decent example documents. There are still cases in my
> documents that don't work and i will try to minimize these.

As a reader (of bound books), I very much prefer footnotes (at the
bottom of the printed page) to endnotes. I actually read footnotes so
shuffling back and forth between sections of the book can be a pain.

Of course, this is not the case for on-screen readers.

Reading on a screen one can have two approaches: either it is like
reading a book (in which case I like to use dual mode on a large screen)
or else one is reading a screen document in a continuous scroll mode
(in which case pages including headers and footers make no sense).
Using this second approach, footnotes must be used as endnotes, but
not in the first approach.

Alan
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] two issues with interactive hyperlinks (please comment)

2016-02-23 Thread Alan BRASLAU
On Mon, 22 Feb 2016 23:54:00 +0100
Martin Schröder  wrote:

> 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
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] two issues with interactive hyperlinks (please comment)

2016-02-23 Thread Christoph Reller
Hi Hans,

First and foremost: Thank you for uploading the Beta! This solves the
problem I have reported with \reference and focus=standard:
 https://www.mail-archive.com/ntg-context%40ntg.nl/msg79620.html

On Tue, Feb 23, 2016 at 12:00 PM Hans Hagen  wrote:

>
> On 2/23/2016 12:21 AM, Pablo Rodriguez wrote:
>
> > I think that (futhermore not being a default) ConTeXt should implemente
> > what is an ISO standard nowadays.
>
> 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
>
...
>

I agree with you and Pablo: the ISO standard is what counts. And I believe
that named destinations, their use, and viewer behavior is described there
clearly.

... so one handicap for me is that i won't make test docs for it
>

I will try to provide minimal examples that I believe are so common that
the viewer behavior should be clear.

...
> > 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
>

I believe that many people have to make compromises, e.g., cannot afford
the time or money to produce both a screen version and a print version of a
document. I believe that the fit-width mode is a good compromise - as long
as it is viewed in "continuous" viewing mode.

...
> > 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 agree with you about footnotes. And, as mentioned above, I will try to
come up with decent example documents. There are still cases in my
documents that don't work and i will try to minimize these.

Thanks again for your effort!
Christoph
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] two issues with interactive hyperlinks (please comment)

2016-02-23 Thread Hans Hagen

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

Re: [NTG-context] two issues with interactive hyperlinks (please comment)

2016-02-22 Thread Pablo Rodriguez
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
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] two issues with interactive hyperlinks (please comment)

2016-02-22 Thread Pablo Rodriguez
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 

Re: [NTG-context] two issues with interactive hyperlinks (please comment)

2016-02-22 Thread 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.

Best
   Martin
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] two issues with interactive hyperlinks (please comment)

2016-02-22 Thread Alan BRASLAU
On Mon, 22 Feb 2016 20:13:27 +0100
Hans Hagen  wrote:

> 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
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] two issues with interactive hyperlinks (please comment)

2016-02-22 Thread Hans Hagen

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
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] two issues with interactive hyperlinks (please comment)

2016-02-22 Thread Hans Hagen

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

[NTG-context] two issues with interactive hyperlinks (please comment)

2016-02-21 Thread Pablo Rodriguez
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
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___