Louis Guillaume <[EMAIL PROTECTED]> writes: > Hi Everyone, > > Just a thought. I was looking at the code for this today and I think > it's not something I'd know how to fix. Anyway... > > I wonder why it is that paragraphs inside a -ms .RS/.RE block get > turned into a table by grohtml. > > The same happens with .IP. (maybe other requests too.) > > Wouldn't it be better if a <div> were generated with an indentation? > And an unordered list for .IPs? > > For example... > > > .RS > .IP \(bu > sun is shining > .IP \(bu > the weather is sweet > .IP \(bu > make you wanna move > .IP \(bu > your dancin' feet > .RE > > ...would produce... > > <div style="margin-left: +2cm"> > <ul style="list-style: none"> > <li>• sun is shining</li> > <li>• the weather is sweet</li> > <li>• make you wanna move</li> > <li>• your dancin' feet</li> > </ul> > </div> > > > The only issue I see is, "how do you know where to put the > </ul>?". Probably on processing the next paragraph-like request. > > In my opinion, using tables for lists and indents seems clunky and > doesn't really look so good in the context of a web browser. It also > makes the HTML hard to read for debugging... > > Louis
Hi Louis, thanks for the email and comments on improvements to grohtml. Basically gtroff produces a list of meta-tags within the ditroff output which are translated into html tags by grohtml. So in your example we can see that gtroff produces: groff -Thtml -Z -ms louis.n ... F /home/gaius/opt/share/groff/1.19.3/tmac/html-end.tmac p1 V280 H240 DFd h1440 n40 0 F - F ./louis.n V400 H120 x X devtag:.fi 1 x X devtag:.rj 0 x X devtag:.sp 8 x X devtag:.in 240 x X devtag:.ll 1440 x X devtag:.po 0 x X devtag:.ta L 120 L 240 L 360 L 480 L 600 L 720 L 840 L 960 L 1080 L 1200 L 1320 L 1440 x X devtag:.ti 120 x X devtag:.ce 0 x X devtag:.br x X devtag:.col 1 V400 H120 x X devtag:.fi 0 x X devtag:.ll 1560 x X devtag:.ta L 120 L 240 L 360 L 480 L 600 L 720 L 840 L 960 L 1080 L 1200 L 1320 L 1440 L 1560 x font 1 R f1 s10 V400 H120 md Cbu h120 x X devtag:.fi 1 x X devtag:.ll 1440 x X devtag:.ta L 120 L 240 L 360 L 480 L 600 L 720 L 840 L 960 L 1080 L 1200 L 1320 L 1440 x X devtag:.col 2 V400 H240 tsun wh24 tis wh24 tshining n40 0 V480 H120 x X devtag:.sp 1 x X devtag:.ti 120 x X devtag:.br x X devtag:.col 1 V480 H120 x X devtag:.fi 0 x X devtag:.ll 1560 x X devtag:.ta L 120 L 240 L 360 L 480 L 600 L 720 L 840 L 960 L 1080 L 1200 L 1320 L 1440 L 1560 V480 H120 Cbu h120 x X devtag:.fi 1 x X devtag:.ll 1440 x X devtag:.ta L 120 L 240 L 360 L 480 L 600 L 720 L 840 L 960 L 1080 L 1200 L 1320 L 1440 x X devtag:.col 2 V480 H240 tthe wh24 tweather wh24 tis wh24 tsweet n40 0 V560 H120 x X devtag:.sp 1 x X devtag:.ti 120 x X devtag:.br x X devtag:.col 1 V560 H120 x X devtag:.fi 0 x X devtag:.ll 1560 x X devtag:.ta L 120 L 240 L 360 L 480 L 600 L 720 L 840 L 960 L 1080 L 1200 L 1320 L 1440 L 1560 V560 H120 Cbu h120 x X devtag:.fi 1 x X devtag:.ll 1440 x X devtag:.ta L 120 L 240 L 360 L 480 L 600 L 720 L 840 L 960 L 1080 L 1200 L 1320 L 1440 x X devtag:.col 2 V560 H240 tmake wh24 tyou wh24 twanna wh24 tmove n40 0 V640 H120 x X devtag:.sp 1 x X devtag:.ti 120 x X devtag:.br x X devtag:.col 1 V640 H120 x X devtag:.fi 0 x X devtag:.ll 1560 x X devtag:.ta L 120 L 240 L 360 L 480 L 600 L 720 L 840 L 960 L 1080 L 1200 L 1320 L 1440 L 1560 V640 H120 Cbu h120 x X devtag:.fi 1 x X devtag:.ll 1440 x X devtag:.ta L 120 L 240 L 360 L 480 L 600 L 720 L 840 L 960 L 1080 L 1200 L 1320 L 1440 x X devtag:.col 2 V640 H240 tyour wh24 tdancin' wh24 tfeet n40 0 V680 H0 x X devtag:.in 0 x X devtag:.br V680 H0 tsome wh24 tmore wh24 ttext n40 0 V23999680 H1680 n40 0 x trailer V23999760 x stop it correctly identifies that the \(bu is in column 1 and the associated text is in column 2. As you suggest it would be possible to modify grohtml to detect the presence of, say, a two column table with a single character in column 1 (\(bu) and produce <div> html tags with <ul> <li> combination as you mentioned, rather than a <table>. I added "some more text" to the end of your example and we see that gtroff resets the indent and forces a line break (which indicates where the </ul> should be placed). hope this helps, Gaius _______________________________________________ Groff mailing list Groff@gnu.org http://lists.gnu.org/mailman/listinfo/groff