org-mode/lisp
Carsten Dominik 8e34ea7b48 HTML export: Make table row tag customizable
Xin Shi writes:

> Hello Experts,
>
> I use org-mode to produce a lot of big tables with numbers in
> them. When I present these tables by HTML, I found it's hard to
> keep track which row it is. I'm wondering if it's possible to
> implement additional class attribute to the <tr>, such as:
>
> <table class="sample">
> <tr class="d0"><td>One</td><td>Fish</td></tr>
> <tr class="d1"><td>Two</td><td>Fish</td></tr>
>
> <tr class="d0"><td>Red</td><td>Fish</td></tr>
> <tr class="d1"><td>Blue</td><td>Fish</td></tr>
> </table>
>
> So, that in the CSS file, it'll be easier to implement the color:
>
>
> <style type="text/css">
> table.sample {
> 	border: 6px inset #8B8378;
> 	-moz-border-radius: 6px;
> }
> table.sample td {
> 	border: 1px solid black;
> 	padding: 0.2em 2ex 0.2em 2ex;
>
> 	color: black;
> }
> table.sample tr.d0 td {
> 	background-color: #FCF6CF;
> }
> table.sample tr.d1 td {
> 	background-color: #FEFEF2;
> }
> </style>

This commit introduces a new variable `org-export-table-row-tags'
that can be used for this and similar purposes.  For the example
of the poster, one could use:

 (setq org-export-table-row-tags
       (cons '(if head "<tr>"
                (if (= (mod nline 2) 1)
                    "<tr class=\"d1\">"
                  "<tr class=\"d0\">"))
             "</tr>"))
2009-06-18 07:07:22 +02:00
..
ChangeLog HTML export: Make table row tag customizable 2009-06-18 07:07:22 +02:00
ChangeLog.01 Split ChangeLog file into parts. 2008-05-08 08:16:38 +02:00
org-agenda.el Fix whitespace issues 2009-06-08 08:00:46 +02:00
org-archive.el Push version number to 6.27trans 2009-05-26 15:41:44 +02:00
org-ascii.el Fix whitespace issues 2009-06-08 08:00:46 +02:00
org-attach.el Fix whitespace issues 2009-06-08 08:00:46 +02:00
org-bbdb.el Keep byte compiler happy 2009-06-11 22:18:47 +02:00
org-bibtex.el Push version number to 6.27trans 2009-05-26 15:41:44 +02:00
org-clock.el Clock: Manipulating effort strings, and a mode line menu 2009-06-17 07:40:22 +02:00
org-colview-xemacs.el Tables: Allow #+TBLFM to be indented 2009-05-28 17:44:12 +02:00
org-colview.el Tables: Allow #+TBLFM to be indented 2009-05-28 17:44:12 +02:00
org-compat.el Better treatment of face inheritance. 2009-06-02 14:50:19 +02:00
org-docbook.el Export: Fix bug with empty lines in examples 2009-06-14 18:05:02 +02:00
org-exp-blocks.el Blocks: Apply Erics patch for indented blocks in org-exp-blocks.el 2009-06-17 18:19:25 +02:00
org-exp.el Move org-exp-blocks.el into the core 2009-06-11 16:17:50 +02:00
org-faces.el New faces for checkbox statistics 2009-06-11 16:19:07 +02:00
org-feed.el Fix whitespace issues 2009-06-08 08:00:46 +02:00
org-footnote.el Fix whitespace issues 2009-06-08 08:00:46 +02:00
org-gnus.el Declare a function. 2009-06-07 22:05:03 +02:00
org-html.el HTML export: Make table row tag customizable 2009-06-18 07:07:22 +02:00
org-icalendar.el Keep byte compiler happy 2009-06-11 22:18:47 +02:00
org-id.el Push version number to 6.27trans 2009-05-26 15:41:44 +02:00
org-info.el Push version number to 6.27trans 2009-05-26 15:41:44 +02:00
org-inlinetask.el Push version number to 6.27trans 2009-05-26 15:41:44 +02:00
org-irc.el Push version number to 6.27trans 2009-05-26 15:41:44 +02:00
org-jsinfo.el Push version number to 6.27trans 2009-05-26 15:41:44 +02:00
org-latex.el Keep byte compiler happy 2009-06-11 22:18:47 +02:00
org-list.el New faces for checkbox statistics 2009-06-11 16:19:07 +02:00
org-mac-message.el Fix whitespace issues 2009-06-08 08:00:46 +02:00
org-macs.el Fix order problem in org-macs.el 2009-06-07 22:14:33 +02:00
org-mew.el Push version number to 6.27trans 2009-05-26 15:41:44 +02:00
org-mhe.el Push version number to 6.27trans 2009-05-26 15:41:44 +02:00
org-mouse.el Push version number to 6.27trans 2009-05-26 15:41:44 +02:00
org-plot.el Push version number to 6.27trans 2009-05-26 15:41:44 +02:00
org-protocol.el Fix whitespace issues 2009-06-08 08:00:46 +02:00
org-publish.el Minor fixes 2009-05-30 06:59:46 +02:00
org-remember.el Remember: Allow template target headline to be a function 2009-06-17 16:49:56 +02:00
org-rmail.el Push version number to 6.27trans 2009-05-26 15:41:44 +02:00
org-src.el Move variable `org-protecting-blocks' to org.el 2009-06-14 08:05:18 +02:00
org-table.el Tables: Allow #+TBLFM to be indented 2009-05-28 17:44:12 +02:00
org-timer.el Push version number to 6.27trans 2009-05-26 15:41:44 +02:00
org-vm.el Push version number to 6.27trans 2009-05-26 15:41:44 +02:00
org-w3m.el Push version number to 6.27trans 2009-05-26 15:41:44 +02:00
org-wl.el Push version number to 6.27trans 2009-05-26 15:41:44 +02:00
org-xoxo.el Push version number to 6.27trans 2009-05-26 15:41:44 +02:00
org.el Clock: Manipulating effort strings, and a mode line menu 2009-06-17 07:40:22 +02:00