texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] Pdf marks and Re: adding pdf hyperlink support


From: Joris van der Hoeven
Subject: Re: [Texmacs-dev] Pdf marks and Re: adding pdf hyperlink support
Date: Fri, 2 Sep 2011 09:36:50 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Fri, Sep 02, 2011 at 07:56:51AM +0100, Sam Liddicott wrote:
> >If you have some time, then this whould be the way around this:
> >instead of (or in addition to?) using the locus_boxes in order to
> >determine what should be linked to what, you should scan all subtrees
> >of the document tree, and determine whether there are links attached
> >to them. For instance, look at the 'link-active-upwards' scheme
> >routine (even though scanning should be fast and written in C++).
> > From the subtrees to which we attached links, you should next
> >determine the corresponding bounding boxes (or regions);
> >see edit_interface_rep::update_active_loci for how this works.
> 
> The way I was planning to implement this is the same way in which
> hlink's are coloured. I found the rendering which changes the
> environment to set the link colour while rendering the link and then
> restoring it. In a similar manner and location in the code I planned
> to set the link destination in the environment. This might open the
> way more generally to annotate any part of the document with PDF
> attributes or renderer attributes. I think this rendering links this
> way might be done sooner as it requires me to become acquainted with
> less of the code before I do it.

Yes, this might be possible as well, but it raises a technical difficulty:
the current color is an environment variable, which is easily customized,
but the "link behaviour" is not part of the environment, and also not part
of the typesetting routines which create boxes. Another problem is that
you do not get the same rectangles as when you would have selected
the link text (these are also the rectangles which are highlighted
in TeXmacs, when you go over them with the mouse). That is why I would
rather opt for my solution (I certainly did consider yours, since it
seems more easy to implement).

> I'm on the gs9 mailing list so I'll search and then ask what
> progress has been with respect to this and also the epswrite target.

Great; please let me know. I also would be interested to know if
my printer rendering code for alpha transparency is at least correct
(e.g. if Distiller produces a correct Pdf).

Best, --Joris



reply via email to

[Prev in Thread] Current Thread [Next in Thread]