From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: Attributes on HTML tables? Date: Sun, 14 Apr 2013 18:13:40 +0800 Message-ID: <87ehedctd7.fsf@ericabrahamsen.net> References: <87mwtavzgv.fsf@gmail.com> <86fvyy1dsp.fsf@iro.umontreal.ca> <87ehegtsde.fsf@ericabrahamsen.net> <87a9p4e24e.fsf@bzg.ath.cx> <87li8os2w9.fsf@ericabrahamsen.net> <87wqs8b0g7.fsf@bzg.ath.cx> <8661zr7r5a.fsf@iro.umontreal.ca> <877gk7qev2.fsf@ericabrahamsen.net> <8738uvq9ne.fsf@ericabrahamsen.net> <20130413204259.GA66764@BigDog.local> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:37753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URJqf-00020C-Me for emacs-orgmode@gnu.org; Sun, 14 Apr 2013 06:07:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URJqe-0001Xt-FE for emacs-orgmode@gnu.org; Sun, 14 Apr 2013 06:07:49 -0400 Received: from plane.gmane.org ([80.91.229.3]:39447) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URJqe-0001Xl-80 for emacs-orgmode@gnu.org; Sun, 14 Apr 2013 06:07:48 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1URJqY-0004wH-JP for emacs-orgmode@gnu.org; Sun, 14 Apr 2013 12:07:43 +0200 Received: from 114.250.128.187 ([114.250.128.187]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 14 Apr 2013 12:07:42 +0200 Received: from eric by 114.250.128.187 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 14 Apr 2013 12:07:42 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Rick Frankel writes: > On Sat, Apr 13, 2013 at 01:31:17PM +0800, Eric Abrahamsen wrote: >> Eric Abrahamsen writes: >> >> > François Pinard writes: >> > >> >> Bastien writes: >> >> >> >>> Eric Abrahamsen writes: >> >> >> >>>> The first step is probably to research the differences between xhtml and >> >>>> html 5. >> >> >> >>> Well, I would even skip this step and just hack something usable. >> >> >> I sort of fudged on the below. The upside is that it should be pretty >> forgiving now: you can set all kinds of strings as your :html-doctype, >> and it will do a reasonably good job of guessing how to handle it. >> >> Barring actual bugs or poor design decisions, what's left to do is: >> >> 1. Make sure that inlined script and style chunks are escaped correctly, >> I seem to remember reading that the commenting/escaping syntax for these >> chunks varies according to html flavor. >> >> 2. I'd like to add the possibility to put an arbitrary :html-container > >> #+BEGIN_SRC emacs-lisp >> #+TITLE: HTML 5 Test >> #+DATE: {{{modification-time(%Y-%m-%d)}}} >> #+HTML_DOCTYPE: html5 >> #+BIND: org-html-divs ((preamble "header" "preamble") (content "section" "content") (postamble "footer" "postamble")) >> * Org HTML5 Test >> #+ATTR_HTML: :options html-container article > > note that you just just set #+HTML_CONTAINER: article in the head of the > file if you want all the containers to be "article"s. That would be pretty drastic, though -- it would wrap "article" around a whole bunch of stuff that shouldn't be an article! I think ultimately the HTML exporter should grow a slightly more flexible system for wrapping document sections in containers, but this patch definitely shouldn't get hung up on that. >> +(defconst org-html-doctype-alist >> + '(("html4" . "") >> + ("html4-strict" . " >> +\"http://www.w3.org/TR/html4/strict.dtd\"") >> + ("xhtml" . "> +\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">") >> + ("html5" . "")) > > I believe that should be (note the lowercase "html"): > > ("xhtml" . "> +\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">") > ("html5" . "") > > See http://www.w3schools.com/tags/tag_doctype.asp for a fairly > complete list of valid doctypes. Cool, thanks for the reference. If the approach of this patch seems generally acceptable I'll try to add most of the commonly-used doctypes in there. I'm waffling on XHTML5, though -- from what I can tell it's a spec everyone sort of thought ought to be in there, but no one is actually using. E