Hi Justina,

justina colmena wrote on Sat, May 19, 2018 at 07:52:35PM +0000:
> On Sat, 19 May 2018 18:01:11 +0000
> justina colmena <just...@colmena.biz> wrote:

>> 3.) The links are not generated in the "see also" section for pages on
>> the second and third manpaths.

> Okay. This looks like more of an issue with the man pages themselves...
> which just don't happen to be as fancy as OpenBSD's.
> 
> /usr/local/man/man1/initdb.1
> 
>     .SH "SEE ALSO"
>     \fBpg_ctl\fR(1), \fBpostgres\fR(1)

That is typical man(7) code; BSD systems use the better mdoc(7) language.

> The "\fB" and "\fR" are just literal codes for font bold and back to
> font regular, not intended to automatically generate links like
> OpenBSD's man pages.

The feature request has been rotting on the TODO list for some years:

  http://mandoc.bsd.lv/cgi-bin/cvsweb/TODO?annotate=HEAD

Search for "try to guess Xr" in that page.

  1.187 406: - jsg on icb, Nov 3, 2014:
        407:   try to guess Xr in man(7) for hyperlinking
  1.226 408:   and render them with <a class="Xr" href=...>
        409:   https://github.com/Debian/debiman/issues/15
        410:   loc *  exist *  algo **  size **  imp **

As you see from the classification, it's rated at the lower
edge of medium difficulty and medium importance, but people
aren't all that eager to spend their time on the obsolete
man(7) language, unless their name is esr@, and esr@ didn't
contribute to mandoc so far.

I guess if you do it the quick and dirty way, it will probably be
about twenty to thirty LOC in a single file, i.e. in the man_html.c
formatter.  If you do it properly, generating AST nodes in the
man(7) parser, which i might prefer (not sure yet), it might touch
half a dozen files, with the main 20-30 lines going to the man.c
parser and the changes to the other files being relatively minor.

Yours,
  Ingo


> http://man.openbsd.org/roff
> /usr/share/man/man1/ls.1
> 
>     .Sh SEE ALSO
>     .Xr chflags 1 ,
>     .Xr chmod 1 ,
>     .Xr symlink 7 ,
>     .Xr sticky 8
> 
> And that ".Xr" is some sort of macro more suitable for processing into
> a link.

Reply via email to