groff
[Top][All Lists]
Advanced

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

[Groff] pdfmark, URI and coordinates of output text


From: Carlos J. G. Duarte
Subject: [Groff] pdfmark, URI and coordinates of output text
Date: Mon, 17 Nov 2003 12:37:34 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031014 Thunderbird/0.3

Hello all,
I'm new to this list.

I want to place an HREF like markup into PDF documents.
Example:
.HREF "http://www.google.org";
would display http://www.google.org, but if on a PDF file, the link would also
appear when the user moved the mouse around.

I've made a macro that does this stuff, using pdfmark. But is has essencially
one major failure-- I need to get the x,y position where my URL is displayed
and where is ends, and I simply can't do that correctly.
I've tried lots of different setups, using \n[hp] \k[reg] |0 and others, but that doesn't
appear to work.

Currenly I'm using .mk to get vertical position and \n[.k]+\n[.o]+\n[.in] to get horizontal position.

This only works if the URL is kept on a single line. We can force this to happen if we disable hyphenation temporarly, but there is a problem I can't fix: when the complete URL wraps into the other line. I can not detect (but have tried!) when this happens.
Again, on a diversion the horizontal position doesn't get it right.

I'll leave my macro as an attachment.
Is there any way to know the x,y position where some text was put?

best regards to all,
Carlos






Attachment: pshref.me
Description: Troff ME-macros document


reply via email to

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