Keith Marshall wrote:

.... I'd guess if you're viewing

   file:///home/andre/man/man3/malloc.pdf

and it has a link to ../man1/vgrind.pdf then that would work?

Yep.  `.pdfhref L -F path/to/vgrind.pdf -- "text for link hot spot"'

The "fun" starts if you want to make this at all general. A quick grep through the manpages on my system turns up a number of ways to format references to other pages:

.IR foo (1)
.BR bar (1)
\fBfoor\fR(1) (manual formatting, sloppy)
baz(1) (no highlighting, argh!)
.Xr quux 1 (BSD)

Since you're doing this for your own manpages, you can define a cross- ref macro to include in each manpage:

.ds PDFpath path/to/
.\" Usage: Xref name vol trailing
.de Xref
.ie d pdfmark .pdfhref L -F \\*[PDFpath]\\$1.pdf -- "\fB\\$1\fP(\\$2)\ \$3"
.el .nop \fB\\$1\fP(\\$2)\\$3
..

Note that I haven't tested the above, but it should be pretty close to workable.

-- Larry


Reply via email to