summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2010-10-23 07:50:10 +0200
committerCarsten Dominik <carsten.dominik@gmail.com>2010-10-23 08:17:29 +0200
commit987beb627715c7645be1055c055e001283f866dc (patch)
treeb6b82a8964d1a62645c0ea21aef93664b473f7c4
parent94f2f59a9379814b0235826c1c19ceb4bc698f49 (diff)
downloadorg-mode-987beb627715c7645be1055c055e001283f866dc.tar.gz
Use classes to align table data fields
-rw-r--r--lisp/org-html.el14
1 files changed, 10 insertions, 4 deletions
diff --git a/lisp/org-html.el b/lisp/org-html.el
index 15d3ec8..116eb54 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -136,7 +136,13 @@ not be modified."
overflow:auto;
}
table { border-collapse: collapse; }
- td, th { vertical-align: top; }
+ td, th { vertical-align: top; }
+ th.right { text-align:center; }
+ th.left { text-align:center; }
+ th.center { text-align:center; }
+ td.right { text-align:right; }
+ td.left { text-align:left; }
+ td.center { text-align:center; }
dt { font-weight: bold; }
div.figure { padding: 0.5em; }
div.figure p { text-align: center; }
@@ -1910,7 +1916,7 @@ lang=\"%s\" xml:lang=\"%s\">
(push (concat rowstart
(mapconcat
(lambda (x)
- (setq i (1+ i) ali (format "@@align%03d@@" i))
+ (setq i (1+ i) ali (format "@@class%03d@@" i))
(if (and (< i nfields) ; make sure no rogue line causes an error here
(string-match org-table-number-regexp x))
(incf (aref fnum i)))
@@ -1982,12 +1988,12 @@ lang=\"%s\" xml:lang=\"%s\">
(setq html (mapcar
(lambda (x)
(replace-regexp-in-string
- "@@align\\([0-9]+\\)@@"
+ "@@class\\([0-9]+\\)@@"
(lambda (txt)
(if (not org-export-html-table-align-individual-fields)
""
(setq n (string-to-number (match-string 1 txt)))
- (format " style=\"text-align:%s\""
+ (format " class=\"%s\""
(or (nth n aligns) "left"))))
x))
html))