From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-1.sys.kth.se (smtp-1.sys.kth.se [130.237.32.175]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id p0DEUuOI027410 for ; Thu, 13 Jan 2011 09:30:57 -0500 (EST) Received: from smtp-1.sys.kth.se (localhost [127.0.0.1]) by smtp-1.sys.kth.se (Postfix) with ESMTP id 0CBA11564A2 for ; Thu, 13 Jan 2011 15:30:50 +0100 (CET) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-1.sys.kth.se ([127.0.0.1]) by smtp-1.sys.kth.se (smtp-1.sys.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ZeMNK-RxCIMo for ; Thu, 13 Jan 2011 15:30:46 +0100 (CET) X-KTH-Auth: kristaps [193.10.49.5] X-KTH-mail-from: kristaps@bsd.lv X-KTH-rcpt-to: tech@mdocml.bsd.lv Received: from [172.16.18.84] (unknown [193.10.49.5]) by smtp-1.sys.kth.se (Postfix) with ESMTP id C320D1563F8 for ; Thu, 13 Jan 2011 15:30:43 +0100 (CET) Message-ID: <4D2F0C92.3040100@bsd.lv> Date: Thu, 13 Jan 2011 15:30:42 +0100 From: Kristaps Dzonsons User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101030 Icedove/3.0.10 X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 To: tech@mdocml.bsd.lv Subject: Re: HTML output for tbl References: <20110112215801.GA5059@britannica.bec.de> <4D2EF1DB.2020306@bsd.lv> <20110113125315.GA27606@britannica.bec.de> In-Reply-To: <20110113125315.GA27606@britannica.bec.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit >> 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. 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. >> 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? Kristaps -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv