On 01/06/2026 01:36, G. Branden Robinson wrote:
We'd definitely use .UR if the defaults were as they are now, so we'll
probably change to them in future.
Understood.
Here's how I'd probably solve this problem if I were in your shoes.
You asked earlier if I could teach grohtml(1) to interpret `\X'tty:
link'` device extension command escape sequences. I think I _could_,
but it wouldn't be the best design. (If we wanted this, a better
approach would be to generalize a cross-device extension command and
allocate it within the informally managed "tag" name space. For
instance, `\X'groff: link'`.)
But I think there's a higher-level solution to your problem, and one
that more clearly preserves the logic you're trying to express, which is
that you want hyperlinks on devices that support them _except_ for
terminals.
I would therefore solve the problem with page-local macros.
Thus, after your page calls `TH` to initialize (and select, when the
`-mandoc` wrapper is in use) the macro package, I'd add a macro pair of
macro definitions wrapping `UR` and `UE`.
I'm attaching a demonstration. It works as I expect with groff options
"-T html", "-T pdf", and "-T utf8".
Let me know if this helps, or doesn't.
Interesting. I didn't know that was possible.
However terminal output is the primary use case for these URIs.
I.e. .UR in groff >= 1.24 behaves as we want everywhere.
If we could override to behave like -rU1 in the man page that would be good,
otherwise we'll have to wait until that behavior is the common one.
thanks,
Padraig