groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: <OK> [Groff] grohtml


From: Larry Kollar
Subject: Re: <OK> [Groff] grohtml
Date: Tue, 29 Dec 2009 9:52:55 -0600

Chuck Robey <address@hidden> wrote: 

> ... I was
> stating that I have no problem whatsoever with the mm macros when they're 
> going
> to postscript or ascii, but when I have them as html output, the mm list 
> macros
> show up very, very, badly.  It looks like there isn't any leading spacing
> allowed after I use a list macro.  If I invoke (say) .AL, then the list starts
> immediately after the last character previously output, and it totally ignores
> me if I try to add either a .br or a .sp to force a break in formatting to
> workaround that lack of leading spacing.  I'm not talking about each list 
> item,
> I'm talking about the beginning of the entire list, it refuses to give me a
> leading line break.  Again, this is in -Thtml ONLY.

Chuck, did you see my response on 9 Dec?
http://lists.gnu.org/archive/html/groff/2009-12/msg00008.html

One way or another, you have to get an HTML list wrapper to appear in the 
output, that should give you the break you need.

> ... From hints I got from Gaius Mulley, I
> looked at the www.tmac file, and found that there seems to be added macros
> ULE/ULS, DLE/DLS, and OLE/OLS (meaning list start/stop for ordered, unordered,
> and "definition" lists, as would be familiar to any old html fan).  I'm 
> thinking
> that what I'd want to see would be some way to convert some of the mm list
> macros into macros already written (and I think they work, from what tests 
> I've
> done) for html output.

That should be do-able. It's easier for ms (or man), simply because those 
packages never defined any kind of list wrapper, using (for example) .IP to 
make pretty much any kind of list. So with ms/man, you can use the mwww macros 
as a layer atop them and get on with things. With mm, you have to move the old 
definitions out of the way for HTML while keeping them for other drivers.

As an interim step toward integrating HTML into mm, you could create a wrapper 
that invokes mm, moves the list macros out of the way, invokes mwww, then 
assigns the list macros as needeed. A partial example:

.mso m.tmac
.\" rename the list macros
.rn AL AL-old
.rn BL BL-old
.rn BVL BVL-old
.rn VL VL-old
.rn LE LE-old
.rn LI LI-old
.mso www.tmac
.\" Bring in the right list wrapper as needed
.ie '\*[.T]'html' \{\
.  als BL ULS
.  als LE ULE
.\" etc....
.\}
.el \{\
.  als BL BL-old
.  als LE LE-old
.\" etc...
.\}

Quick and dirty, but it would at least get you started. I think .AL will give 
you the most trouble to get working as expected; mwww's .OLS chooses the list 
style for you, but that could be fixed.

-- Larry




reply via email to

[Prev in Thread] Current Thread [Next in Thread]