groff
[Top][All Lists]
Advanced

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

Re: [Groff] pdfmark, URI and coordinates of output text


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

Gaius Mulley wrote:

Hi Carlos,

you might find the \O1 request useful and the registers:

   `opminx', `opminy', `opmaxx', and `opmaxy'

basically the \O1 turns on glyph output (a nop in your case) but it
also resets the above registers to -1. Once your text is emitted then


Thx very much!
But it doesn't work quite the way I was hoping... when I try to access the
opminx (etc) registers, they got zero value sometimes, other times they have
wrong values(?). But, if I use \O1 .. \O2 the printed values into stderr are indeed correct. Example:
.de PSHREF
\\O1\\$1\\O2
.\" O2 sends correct values to stdout, then I reedit the file and manually place them (converted to points)
.\" here, to fill px0,1 and py0,1 . This works.
.nr px0 72
.nr px1 131
.nr py0 14
.nr py1 26
\X'ps: ... /Rect [\\n[px0] \\n[py0] \\n[px1]] ...uri stuff '
..
.lp
ola ola ola
.PSHREF "http://foobar.pt";
-----------------
But if I use \\O1\\$1 and then try to access opminx (etc), I get zero or wrong values.

Well, tecnically the above solution can be made to work, by using a two pass groff'ing. The first collect the values, and then second replace them on the original input stream... ergh...

--
carlos



reply via email to

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