On 25 November 2016 at 15:40, Assaf Gordon <[email protected]> wrote: > IMHO, the distinction between "print" and "online" should be refined, as both > HTML and PDF can be used for printing and for online viewing. The distinction > should be between formats/displays/interfaces that support embedded linking, > and those that don't. > Additionally, with modern HTML capabilities we can also know if it being > viewed on screen or being printed. > > I'd like to be able to do the following. Perhaps it's already possible, I'm > not sure how. > > I want to be able to write something like: > > The @option{-E} option turns on @linkref{extended regular expression} mode > @printref(extended regular expression}. > > Where "@linkref" would generate an embedded link, with the text being > "extended regular expression" and look natural as part of the sentence. It > should work in HTML, PDF when viewed on screen, and all other interactive > formats. > When printed, it should just be the text "extended regular expression" > without additional text (e.g. no "see" or pages) - effectively looking like > normal text and losing its cross-ref attributes. > > And "@printref" is something that generates a stand-alone expression, with > parenthesis, suitable for inclusion in printed material (such as PDF, or HTML > with special media=print tags), and it should be something like "(see > Extended Regular Expressions, Section X, Page Y)".
I've got another idea: what about adding an option to miss out all the page numbers in cross-references in the TeX output in case someone wants to produce a PDF they only want to read online? That could allow you to get a link in a PDF file like you want. In my opinion, there are enough cross-reference commands already (maybe too many). Handling the case you mention for PDF files doesn't justify adding more, in my opinion, as PDF is not a very important output format (I would guess that Texinfo manuals aren't printed on paper very much, and would be mostly read as HTML or Info files).
