Hello, I prepared a small patch to make ox-html use 'class' attribute instead of 'align' in caption element when it is used in tables.
The reason is simple, according to xhtml1 Strict specification 'caption' element doesn't have 'align' attribute, this is true for HTML5 too. Instead of 'align' attribute it is more cleanly to use 'class' attribute and to add corresponding entries to CSS. In included patch I didn't add word TINYCHANGE because I don't is it small or not (I don't understand what exactly the phrase > your total contribution (all patches you submit) should change less than > 15 lines means, how lines are counted). --- WBR, Vladimir Lomov -- Never argue with a man who buys ink by the barrel.
>From 449cfb3cb93a14c58591df15f4a5ff8c7fe1a72a Mon Sep 17 00:00:00 2001 From: Vladimir Lomov <lomov...@gmail.com> Date: Sun, 29 Dec 2013 07:33:59 +0900 Subject: [PATCH 1/2] HTML export: Use class for caption instead of align * ox-html.el: when exporting tables with caption use 'class' attributes instead of 'align', add two new entries into css section to put caption at top or at bottom of table. Signed-off-by: Vladimir Lomov <lomov...@gmail.com> --- lisp/ox-html.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 9fa0a8c..38988ed 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -280,6 +280,8 @@ for the JavaScript code in this tag. pre.src-sql:before { content: 'SQL'; } table { border-collapse:collapse; } + caption.t-above { caption-side: top; } + caption.t-bottom { caption-side: bottom; } td, th { vertical-align:top; } th.right { text-align: center; } th.left { text-align: center; } @@ -3268,8 +3270,8 @@ contextual information." (if (equal attributes "") "" (concat " " attributes)) (if (not caption) "" (format (if org-html-table-caption-above - "<caption align=\"above\">%s</caption>" - "<caption align=\"bottom\">%s</caption>") + "<caption class=\"t-above\">%s</caption>" + "<caption class=\"t-bottom\">%s</caption>") (concat "<span class=\"table-number\">" (format (org-html--translate "Table %d:" info) number) -- 1.8.5.2