summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-04-09 17:40:06 (GMT)
committer Bastien Guerry <bzg@altern.org>2013-04-09 17:40:06 (GMT)
commit25e1e4d0eb2aadf7216ae0c4fca71a9fb0ee23f8 (patch)
treeb3ff11137a07626fe1a1b9193615951c9d452a94
parent749829d591d9da342abe1430a468120562a6ad4b (diff)
downloadorg-mode-25e1e4d0eb2aadf7216ae0c4fca71a9fb0ee23f8.zip
org-mode-25e1e4d0eb2aadf7216ae0c4fca71a9fb0ee23f8.tar.gz
ox-html.el (org-html-table-row-tags): Better example
* ox-html.el (org-html-table-row-tags): Better example. Thanks to Stefan Vollmar for providing this new example.
-rw-r--r--lisp/ox-html.el18
1 files changed, 11 insertions, 7 deletions
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 3a67e39..a083bc9 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -795,13 +795,17 @@ you can reuse them:
For example:
- (setq org-html-table-row-tags
- (cons '(cond (top-row-p \"<tr class=\\\"tr-top\\\">\")
- (bottom-row-p \"<tr class=\\\"tr-bottom\\\">\")
- (t \"<tr>\"))
- \"</tr>\"))
-
-will use the \"tr-top\" and \"tr-bottom\" classes for top and bottom row."
+\(setq org-html-table-row-tags
+ (cons '(cond (top-row-p \"<tr class=\\\"tr-top\\\">\")
+ (bottom-row-p \"<tr class=\\\"tr-bottom\\\">\")
+ (t (if (= (mod row-number 2) 1)
+ \"<tr class=\\\"tr-odd\\\">\"
+ \"<tr class=\\\"tr-even\\\">\")))
+ \"</tr>\"))
+
+will use the \"tr-top\" and \"tr-bottom\" classes for the top row
+and the bottom row, and otherwise alternate between \"tr-odd\" and
+\"tr-even\" for odd and even rows."
:group 'org-export-html
:type '(cons
(choice :tag "Opening tag"