[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH] export to various flavors of (X)HTML
From: |
Rick Frankel |
Subject: |
Re: [O] [PATCH] export to various flavors of (X)HTML |
Date: |
Tue, 30 Apr 2013 10:38:44 -0400 |
User-agent: |
Roundcube Webmail/0.7.1 |
On 29.04.2013 02:02, Eric Abrahamsen wrote:
Rick Frankel <address@hidden> writes:
On Fri, Apr 26, 2013 at 10:14:17AM -0700, Eric Abrahamsen wrote:
Rick Frankel <address@hidden> writes:
> 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 <html> element. Best of all worlds, I hope.
Overall, works well. A couple of things related to
`org-html-xml-declaration':
- It should not be added by default for xhtml5
(from
http://www.w3.org/TR/2011/WD-html-polyglot-20110405/#PI-and-xml):
#+BEGIN_QUOTE
2. Processing Instructions and the XML Declaration
Processing Instructions and the XML Declaration are both
forbidden in polyglot markup.
#+END_QUOTE
- If `org-html-xml-declaration' is set to nil or the empty string,
a blank first line is placed in the document prior to the DOCTYPE
declaration. If the above fix is added (so it is not generated
for xhtml5) that should solve the immediate problem, but i think
that the formatting code in org-html-html-template should check
that the inner format (line #1697). A patch is attached to fix
both issues.
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.
Very nice.
5. It's generally accepted that one should use some variety of the
html5shiv[1] to make IE <9 render new HTML5 elements correctly. I've
dropped a note to this effect in the docstring of
`org-html-html5-fancy', but I suppose it's possible we could take a
more
interventionist stance, perhaps including hosting a version of the
shiv
on orgmode.org, and linking to it automatically. I guess I'm in favor
of
leaving it to the user, though.
I agree that we should comment and leave it to the user. I believe
the owner of html5shiv is against CDN hosting the javascript and feels
that it should always be downloaded and included locally.
Tangential coding question: I've noticed that setting
HTML_HTML5_FANCY
to nil at the top of the export file results in `(plist-get info
:html-html5-fancy)' returning the string "nil", ie true. Not right,
obviously, and it makes it impossible to set it to 'nil per-file if
the
global value is 't. Am I handling this wrong?
I believe Nicolas answered the is a previous email, but the solution
is use "'()" and not nil.
rick
- Re: [O] [PATCH] export to various flavors of (X)HTML, (continued)
- Re: [O] [PATCH] export to various flavors of (X)HTML, Eric Abrahamsen, 2013/04/23
- Re: [O] [PATCH] export to various flavors of (X)HTML, François Pinard, 2013/04/23
- Re: [O] [PATCH] export to various flavors of (X)HTML, Christian Wittern, 2013/04/23
- Re: [O] [PATCH] export to various flavors of (X)HTML, François Pinard, 2013/04/24
- Re: [O] [PATCH] export to various flavors of (X)HTML, Eric Abrahamsen, 2013/04/25
- Re: [O] [PATCH] export to various flavors of (X)HTML, Rick Frankel, 2013/04/26
- Re: [O] [PATCH] export to various flavors of (X)HTML, Eric Abrahamsen, 2013/04/26
- Re: [O] [PATCH] export to various flavors of (X)HTML, Rick Frankel, 2013/04/26
- Re: [O] [PATCH] export to various flavors of (X)HTML, Eric Abrahamsen, 2013/04/29
- Re: [O] [PATCH] export to various flavors of (X)HTML, Nicolas Goaziou, 2013/04/29
- Re: [O] [PATCH] export to various flavors of (X)HTML,
Rick Frankel <=
- Re: [O] [PATCH] export to various flavors of (X)HTML, Rick Frankel, 2013/04/30
- Re: [O] [PATCH] export to various flavors of (X)HTML, Eric Abrahamsen, 2013/04/30