François Pinard <pin...@iro.umontreal.ca> writes:

> Bastien <b...@gnu.org> writes:
>
>> Eric Abrahamsen <e...@ericabrahamsen.net> 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.

Okay, I've got a nearly-working patch for this, but I'm falling down
hard on the defcustom. Here's what I thought to do:

#+BEGIN_SRC emacs-lisp
(defconst org-html-doctype-alist
  '((html4 . "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\">")
    (html4-strict . "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\">
\"http://www.w3.org/TR/html4/strict.dtd\"";)
    (xhtml . "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\";>")
    (html5 . "<!DOCTYPE HTML>"))
  "An alist mapping (x)html flavors to specific doctypes.")

(defcustom org-html-doctype 'xhtml  
  "Document type definition to use for exported HTML files.
Can be set with the in-buffer HTML_DOCTYPE property or for
publishing, with :html-doctype."
  :group 'org-export-html
  :version "24.4"
  :package-version '(Org . "8.0")
  :type 'i-dont-know-how-to-work-this) 
#+END_SRC

The end result I'm after is: the user can either set org-html-doctype to
a symbol from among the cars org-html-doctype-alist, or he/she can set
it directly to the doctype string. I don't know how to represent that in
a defcustom.

And of course, if anyone has any better approaches, then speak now or...
speak later.

Eric


Reply via email to