From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout-webserver.scc.kit.edu (mailout-webmail.scc.kit.edu [129.13.185.232]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id s7DHLbEK005847 for ; Wed, 13 Aug 2014 13:21:40 -0400 (EDT) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by scc-mailout-02.scc.kit.edu with esmtp (Exim 4.72 #1) id 1XHcEy-0004BZ-5D; Wed, 13 Aug 2014 19:21:36 +0200 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.77) (envelope-from ) id 1XHcEy-0006Hb-3b for tech@mdocml.bsd.lv; Wed, 13 Aug 2014 19:21:36 +0200 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1XHcEx-00021h-W6 for tech@mdocml.bsd.lv; Wed, 13 Aug 2014 19:21:36 +0200 Received: from schwarze by usta.de with local (Exim 4.77) (envelope-from ) id 1XHcED-000453-7a for tech@mdocml.bsd.lv; Wed, 13 Aug 2014 19:20:49 +0200 Date: Wed, 13 Aug 2014 19:20:48 +0200 From: Ingo Schwarze To: tech@mdocml.bsd.lv Subject: Re: Is there any reason not to use for items emphasized with .Em? Message-ID: <20140813172048.GE26534@iris.usta.de> References: <01237D5A-9F46-4047-83BF-A98CAB0C16E1@alum.mit.edu> 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: <01237D5A-9F46-4047-83BF-A98CAB0C16E1@alum.mit.edu> User-Agent: Mutt/1.5.21 (2010-09-15) Hi, Kristaps just pointed out that accepts phrasing content only, while .Bf may contain flow content like Bd Bf Bl D1 Pp Rs. So my commit is incorrect: ischwarze@isnote $ cd /usr/src/regress/usr.bin/mandoc/mdoc/Bf/ ischwarze@isnote $ mandoc -Thtml nest.in | validate *** Errors: *** Error at line 30, character 73: element "DIV" not allowed here; possible cause is an inline element containing a block-level element Error at line 33, character 67: element "DIV" not allowed here; possible cause is an inline element containing a block-level element Ouch. If were a perfect match for .Em, and for .Sy, and for .Li, i'd tend to let mdoc_bf_pre() explicitly iterate its children instead of relying on the loop in print_mdoc_node(), close before block children and reopen it afterwards, even though that's a bit more complicated than what we have now. But there is a second, slight problem: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/em exlicitly says: Usage Note: Typically this element is displayed in italic type. However, it should not be used simply to apply italic styling; use the CSS styling for that purpose. Which is exactly what Kristaps' code did before my commit - and note that i just argued myself, in my last mail, that .Em is physical, not semantic markup, so this advice does indeed seem to apply. Now we might revert the .Bf part only, maybe even only in those cases where there actually *are* block children. But that would make .Bf output differ from .Em output, or even from other .Bf output. That doesn't seem nice, really, and it doesn't solve the second problem. So i tend to just revert the whole commit outright, solving both problems completely and also avoiding code complication, and go hide under a rock for the rest of the day. Any thoughts? Ingo -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv