Rick Frankel writes: > On Fri, Apr 26, 2013 at 10:14:17AM -0700, Eric Abrahamsen wrote: >> Rick Frankel writes: >> > >> > Therefore, `org-html-close-tag' should check that the doctype is not a >> > flavor of html4 rather than a flavor of xhtml. An alternative would be >> > to add ("xhtml5" . "") to the doctype alist, and the >> > appropriate testing for being html5 and xhtml. >> > >> > See the discussions of polyglot markup @ >> > http://en.wikipedia.org/wiki/Polyglot_markup >> > and >> > http://www.w3.org/TR/2011/WD-html-polyglot-20110405/#dfn-polyglot-markup >> > for the rationale. >> >> Ah, those were interesting links, I hadn't considered those issues. >> Luckily, your second option was a three-line change to the existing >> patch: using "xhtml5" now produces the same output as "html5", except >> that self-closing tags are self-closed, and there's a xmlns declaration >> in the element. Best of all worlds, I hope. > > Brilliant! I will apply the patch and try it later this weekend... So here's the fun part -- using the new bits of HTML5. The attached patch builds on the last one (and corrects a couple of documentation formatting errors), and touches on the following: 1. There's a new export option, org-html-html5-fancy/HTML_HTML5_FANCY, which defaults to 'nil, making most of the following opt-in only. 2. The meat of the change is in `org-html-special-block'. If it comes across a special block #+BEGIN_FOO where "foo" is a member of `org-html-html5-elements', it will format it as "" rather than "
". So #+BEGIN_ASIDE will create an "