Message 1/37 From Richard Verhoeven Mar 17, 99 10:13:49 am +0100 Return-Path: Subject: Re: man2html and my very non-standard distro To: humbubba@smarty.smart.net (Rick Hohensee) Date: Wed, 17 Mar 1999 10:13:49 +0100 (MET) Hi, > man2html is a godsend. I am assembling a GNU/Linux with html manpages > ONLY. I had done many of the manpages without man2html until recently. Now > I get to re-do them. But they are much nicer. My distro is called cLIeNUX > and is at http://metalab.unc.edu/pub/Linux/distributions/cLIeNUX > and the 2.2 one is at ftp://ftp.blueznet.com/pub/colorg . colorg is my IRC > nick. > Nice to now that there is a Linux distro that fits in 25Mb. I guess is doesn't include XFree86 and Netscape :-). > As you probably noticed, this means all my manpages are in /help/man > itself, with no man1 man2 man3 etc. Some typical full manpage pathnames > are > /help/man/cat.1.html > /help/man/cat.L.html > /help/man/bind.2.html > /help/man/ed.1.man > i.e. the sections are differentiated by the filename middle, usually a > number. .L. BTW, is for "legacy", a few of the 1971 UNIX Programmer's > Manual pages. dmr himself OK'ed me using "a few". > > > Pardon the odd non-standard arrangement. I'm sticking with it. My question > is, what is the SIMPLEST way to support correct hyperlinks for it with > man2html being used at page format time? i.e. only running man2html for a line 1 The simplest way is probably adjusting the source code that adds the links or to run a sed/awk/perl script on each page. Note that my version of man2html does not handle all pages correctly, especially some BSD and Solaris pages. Michael Hamilton added BSD support and someone from the Debian distro further modified and extended it. So, you might want to use one of the extended versions. The URLs: http://home.clear.net.nz/pages/michael.hamilton/gifts.html http://www.debian.org/Packages/stable/doc/man2html.html If you plan to adjust the source code, which shouldn't be too difficult, you can probable make some other changes, such as removing links to include files or e-mail addresses. The function "add_links" creates the links while the file is converted and it contains some explanation of what happens. When a link is added, the source code contains a printf statement that adds .. to the document. It is very easy to either remove or change these statements. In your case, you could change it to printf("%s", h, sec, h); to get the correct links. > I'd also suggest a switch to man2html to disable the internal page index, > but that I can fake easily. It is not too difficult to change that either. At the start and the end of the page, a link to the index and the index itself is added. You can easily remove the statements that produce it. Search for #index and

Index to find the interesting locations. > Thanks for man2html. I have to adjust man2html myself, due to differences between Solaris