On Tuesday, 25 February 2025 18:50:39 GMT Francesco Ariis wrote:
> Dear groff users,
> 
>     please help me diagnose a groff warning message.
> 
> I have a macro to typeset clickable URLS as underlined:
> 
>     .de link
>     .pdfhref W -D \\$[1] "\Z'\\$[2]'\v'0.25m'\D'l \w'\\$[2]'u 0'\v'-.25m'"
>     ..
> 
> (I did not write this macro myself, but went through it escape by escape
> and I am positive it does what I want.)
> 
> When I typeset it (see attached file) with `groff -Tpdf test.ms > out.pdf`,
> I get this warning:
> 
>     troff: test.ms:5: a node is not allowed in a name
> 
> I am unsure how to modify the macro so that the message goes away (or
> whether I should care about this warning).
> Any hint appreciated
> —F

Hi Francesco,

If you change it to:-

.pdfhref W -D \\$[1] -- "\Z'\\$[2]'\v'0.25m'\D'l \w'\\$[2]'u 0'\v'-.25m'"

You won't see the error. In the next version of groff this is not necessary, 
you don't need the "--".

You can get groff to draw a border around clickable links, not quite the same 
as underlining.

==============================================================================

Hotspots can have a border drawn around them, which is controlled by setting 
the register PDFHREF.BORDER to an array of 3 numbers which represent – 
horizontal corner radius, vertical corner radius, and border width. A zero 
radius gives square (not rounded) corners. The default is:-

   .ds PDFHREF.BORDER 0 0 0

Which produces no border around the hotspot.

==============================================================================

Cheers 

Deri

Reply via email to