[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question on hyperlinks in groff
From: |
G. Branden Robinson |
Subject: |
Re: Question on hyperlinks in groff |
Date: |
Tue, 29 Mar 2022 05:01:59 +1100 |
User-agent: |
NeoMutt/20180716 |
At 2022-03-25T18:03:29+0100, Chems Eddine Naimi wrote:
> I'm pretty new to groff, and I've been playing with the tmac
> files, writing my own macros and all. Now I'm trying to implement
> internal links in dvi documents.
Hi Chems,
I didn't even know the DVI format supported hyperlinks, but I guess it
does.[1] It sounds like they're supported by "hyperlink-html specials",
which I'm going to guess is in the same broad class of extensions as
"tpic specials".
> When reading the s.tmac file, specifically the description for the
> .[ macro, it mentions a macro called .#, but I can't find its
> definition anywhere.
I get the feeling you are not reading groff's s.tmac file. groff does
not define a macro by that name, and in fact would not because such a
sequence would get replaced by the refer(1) preprocessor.
Similarly, groff's s.tmac does not define a macro called '#'. (I assume
you're using the dots to indicate the call syntax; in any case, it
doesn't define a macro called '.#' either.)
In fact this symbol is almost unused in groff's ms implementation.
$ grep '#' tmac/refer-ms.tmac tmac/s.tmac
tmac/s.tmac:.mk #T
tmac/s.tmac:. T#
tmac/s.tmac:. T#
>I tried greping the whole directory but to no
> avail. Here's the passage I'm talking about :
> .\" Examples:
> .\" .[ eBay ]( https://ebay.com )
> .\" .[ Contact ]< contact@author.com >
> .\" .[ Term ][ term-id ] *\" See .#*
> External links to sites and e-mails work fine, but I can't find a way
> to declare any term-id for use in internal links.
This doesn't look like idiomatic ms(7) macro package usage at all.
Whatever it is you have here, I don't think it has much to do with
groff. Can you share a link to the source of the material you're
quoting?
Regards,
Branden
[1] https://tex.stackexchange.com/questions/314041/hyperlinks-in-plain-tex
signature.asc
Description: PGP signature