Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Aug 2006 22:25:58 -0700
From:      Rich Morin <rdm@cfcl.com>
To:        freebsd-doc@FreeBSD.ORG
Subject:   Re: converting an mdoc manual page into an old man format
Message-ID:  <p0623092cc103134b7238@[192.168.254.205]>
In-Reply-To: <200608112028.29663.mi%2Bmx@aldan.algebra.com>
References:  <200608112028.29663.mi%2Bmx@aldan.algebra.com>

next in thread | previous in thread | raw e-mail | index | archive | help
At 8:28 PM -0400 8/11/06, Mikhail Teterin wrote:
> I've written a man-page using mdoc macros for my own
> little program.
>
> I'd like to port the program to other Unixes (like
> Solaris), where my mdoc-based man page is rather
> unreadable :-(
>
> Is there a standard way to expand the mdoc macros once?
>
> `man mdoc' is not giving any useful examples -- I can
> create a PostScript or an HTML document, but I can't
> render it in the traditional man :-(

That's a really interesting question.

I would have thought that groff would have a cpp-like option
to just emit raw troff codes.  These wouldn't be pretty, but
they should be digestible by most troff implementations.  I
don't see such an option, however.

You could, of course go into troff and try to add such an
option, but that could range from trivial to impossible,
depending on the program's design.

Unless someone has written a special-purpose tool, I doubt
that you're going to be able to get from mdoc to man format.
And, although something like m4 could probably be convinced
to do the transformation, coding the macros would not be a
task for the timid.

-r
-- 
http://www.cfcl.com/rdm            Rich Morin
http://www.cfcl.com/rdm/resume     rdm@cfcl.com
http://www.cfcl.com/rdm/weblog     +1 650-873-7841

Technical editing and writing, programming, and web development



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p0623092cc103134b7238>