From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mo-p00-ob.rzone.de (mo-p00-ob.rzone.de [81.169.146.160]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id p0DEpegD028351 for ; Thu, 13 Jan 2011 09:51:41 -0500 (EST) X-RZG-AUTH: :JiIXek6mfvEEUpFQdo7Fj1/zg48CFjWjQv0cW+St/nW/YPAwtil3lPd02XoK X-RZG-CLASS-ID: mo00 Received: from britannica.bec.de (dslb-088-074-033-020.pools.arcor-ip.net [88.74.33.20]) by post.strato.de (mrclete mo8) (RZmta 24.9) with (DHE-RSA-AES128-SHA encrypted) ESMTP id f05f6cn0DE3FS1 for ; Thu, 13 Jan 2011 15:51:36 +0100 (MET) Received: by britannica.bec.de (sSMTP sendmail emulation); Thu, 13 Jan 2011 15:51:35 +0100 Date: Thu, 13 Jan 2011 15:51:35 +0100 From: Joerg Sonnenberger To: tech@mdocml.bsd.lv Subject: Re: HTML output for tbl Message-ID: <20110113145135.GA30116@britannica.bec.de> Mail-Followup-To: tech@mdocml.bsd.lv References: <20110112215801.GA5059@britannica.bec.de> <4D2EF1DB.2020306@bsd.lv> <20110113125315.GA27606@britannica.bec.de> <4D2F0C92.3040100@bsd.lv> X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D2F0C92.3040100@bsd.lv> User-Agent: Mutt/1.5.20 (2009-06-14) On Thu, Jan 13, 2011 at 03:30:42PM +0100, Kristaps Dzonsons wrote: > >>However, I agree that this makes for ugly output, and having just > >>tested it with SCALE_EM, I think it's best to keep a few bits of > >>state and just reinitialise the table if broken up by other macros. > >>I'll write this up when I've a few minutes to myself. > > > >ACK. I do prefer to have SCALE_EX as default, the width can go way too > >large otherwise. > > Joerg, > > I just checked in a change to -Thtml for tables that has the > following basic logic: when a new table is encountered, it sets > column widths using and the "width" CSS style. This looks good. > These columns are used until a macro is encountered. At this point, > the table is closed out and the macro is processed. > > (This also works with block macros.) > > Then when the first table-row is again encountered, the table is > re-opened in the same way. > > This allows for arbitrary breaks in the table flow; subsequent table > rows, by being in the same TABLE, are all sized intelligently by the > browser. This sounds fine, too. > >>And no, we can't screw IE6. > > > >Well, the other option would be to require a bit JS for IE6. The point > >is that it is the only larger browser that might still be used that > >doesn't do min-width and also understands CSS. Worst case is that it > >doesn't use the size hints -- I consider that acceptable as fallout for > >getting much better output with useful browsers. > > > >>It just now occurs to me that, since CSS "cascades" atop the HTML, I > >>can set pixel-widths as a safe default and let CSS, with its > >>precise "em" widths, override these values. This will make browsers > >>without CSS also recognise mandoc -Thtml's tables, whether from > >>tbl(7) or otherwise, which for now require the style-sheet for > >>stipulating widths. > > > >I disagree somewhat. Using col is a good idea as it avoids redundant > >markup. Trying to second guess the font width is prone to fail. That's > >why specifying a minimal width is better -- it will still just stretch > >if needed. > > Consider this. If I hardcode , where "20" is (I'm just making these numbers up) a > reasonable guess at the pixel-width of 4 x's, then "real" browsers > can use the min-width and IE6, and any other non-CSS, will use the > COL sizes for a reasonable spacing. > > Thoughts? The question arrives if you have input that is too large to fit, but can be broken apart like multiple words. For queue(3) the changed version works because the "_FOREACH_REVERSE" is a single word. If you replace the second _ with a space, it will be line wrapped. With min-width, modern browser will try to increase the total width of the table to avoid line breaks. Specifying both width and min-width is useless as width overrides any min-width attribute. Joerg -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv