From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xin Shi Subject: Re: Alternate Table Row Colors Date: Mon, 15 Jun 2009 13:08:51 -0400 Message-ID: <5236d6f90906151008o7f56a901jb841d97176b32185@mail.gmail.com> References: <5236d6f90906141200p3f0d21bbxa34d9946c9508b1b@mail.gmail.com> <20090614191118.GA21190@thinkpad.adamsinfoserv.com> <5236d6f90906150539yaa48c3esb77c3f7a0377cda1@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0969505997==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MGG7c-0007Qp-Gp for emacs-orgmode@gnu.org; Mon, 15 Jun 2009 13:37:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MGG7V-0007DS-JP for emacs-orgmode@gnu.org; Mon, 15 Jun 2009 13:37:26 -0400 Received: from [199.232.76.173] (port=54948 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MGG7V-0007Cd-9r for emacs-orgmode@gnu.org; Mon, 15 Jun 2009 13:37:21 -0400 Received: from mail-fx0-f216.google.com ([209.85.220.216]:39588) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MGFfx-0002UI-ID for emacs-orgmode@gnu.org; Mon, 15 Jun 2009 13:08:54 -0400 Received: by fxm12 with SMTP id 12so1494859fxm.42 for ; Mon, 15 Jun 2009 10:08:52 -0700 (PDT) In-Reply-To: <5236d6f90906150539yaa48c3esb77c3f7a0377cda1@mail.gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --===============0969505997== Content-Type: multipart/alternative; boundary=0016e6482b4ac47a9f046c661c0b --0016e6482b4ac47a9f046c661c0b Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hello Experts, I took a look in the lisp directory, the related function is in the org-html.el: (defun org-format-org-table-html (lines &optional splice) There it might need a counter for the row in the line (push (concat "" ... I don't know how to continue from here ... Any suggestions from our Lisp experts? Thanks! Xin On Mon, Jun 15, 2009 at 8:39 AM, Xin Shi wrote: > Hi Russell, > > Thanks for your posting! > > Unfortunately, this is quite a new feature for CSS 3, which is not > supported by the Firefox 3. It would be great if the org-mode can just add > the class attribute in the . > > Xin > > > > On Sun, Jun 14, 2009 at 3:11 PM, Russell Adams wrote: > >> Not that I'm a CSS expert, but it appears you could do this without >> changing how Org outputs tables by adding this styling to your CSS. >> >> http://www.zorked.com/css/alternating-table-rows-using-css-only/ >> >> Quote: >> >> tr:nth-child(odd) { >> background-color: #CCCCCC; >> } >> >> tr:nth-child(even) { >> background-color: #6699FF; >> } >> >> Good luck! If you make an example, please post it! >> >> On Sun, Jun 14, 2009 at 03:00:15PM -0400, Xin Shi wrote: >> > 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 , such as: >> > >> > >> > >> > >> > >> > >> > >> >
OneFish
TwoFish
RedFish
BlueFish
>> > >> > So, that in the CSS file, it'll be easier to implement the color: >> > >> > >> > >> > I borrowed idea from this article: >> > http://www.somacon.com/p338.php >> > >> > Thanks! >> > >> > Xin >> >> > _______________________________________________ >> > Emacs-orgmode mailing list >> > Remember: use `Reply All' to send replies to the list. >> > Emacs-orgmode@gnu.org >> > http://lists.gnu.org/mailman/listinfo/emacs-orgmode >> >> >> >> ------------------------------------------------------------------ >> Russell Adams RLAdams@AdamsInfoServ.com >> >> PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ >> >> Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 >> >> >> _______________________________________________ >> Emacs-orgmode mailing list >> Remember: use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode >> > > --0016e6482b4ac47a9f046c661c0b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello Experts,

I took a look in the lisp directory, the related func= tion is in the org-html.el:

(defun org-format-org-table-html (lines = &optional splice)

There it might need a counter for the row in t= he line
=A0=A0=A0 (push (concat "<tr>"=A0 ...

I don't kn= ow how to continue from here ... Any suggestions from our Lisp experts?
=
Thanks!

Xin


On Mon, Jun 15= , 2009 at 8:39 AM, Xin Shi <shixin111@gmail.com> wrote:
Hi Russell,
Thanks for your posting!

Unfortunately, this is quite a new featu= re for CSS 3, which is not supported by the Firefox 3.=A0 It would be great= if the org-mode can just add the class attribute in the <tr>.

Xin



On Sun, Jun 14, 2009 at 3:11 PM, Russell Adams <RLAdam= s@adamsinfoserv.com> wrote:
Not that I'm a CSS expert, but it appears you could do this without
changing how Org outputs tables by adding this styling to your CSS.

http://www.zorked.com/css/alternating-table-rows-using-= css-only/

Quote:

tr:nth-child(odd) {
background-color: #CCCCCC;
}

tr:nth-child(even) {
background-color: #6699FF;
}

Good luck! If you make an example, please post it!

On Sun, Jun 14, 2009 at 03:00:15PM -0400, Xin Shi wrote:
> Hello Experts,
>
> I use org-mode to produce a lot of big tables with numbers in them. Wh= en I
> present these tables by HTML, I found it's hard to keep track whic= h row it
> is. I'm wondering if it's possible to implement additional cla= ss attribute
> to the <tr>, such as:
>
>
> <table class=3D"sample">
> <tr class=3D"d0"><td>One</td><td>Fis= h</td></tr>
> <tr class=3D"d1"><td>Two</td><td>Fis= h</td></tr>
> <tr class=3D"d0"><td>Red</td><td>Fis= h</td></tr>
> <tr class=3D"d1"><td>Blue</td><td>Fi= sh</td></tr>
> </table>
>
> So, that in the CSS file, it'll be easier to implement the color:<= br> >
> <style type=3D"text/css">
> table.sample {
> =A0 =A0 =A0 border: 6px inset #8B8378;
> =A0 =A0 =A0 -moz-border-radius: 6px;
> }
> table.sample td {
> =A0 =A0 =A0 border: 1px solid black;
> =A0 =A0 =A0 padding: 0.2em 2ex 0.2em 2ex;
> =A0 =A0 =A0 color: black;
> }
> table.sample tr.d0 td {
> =A0 =A0 =A0 background-color: #FCF6CF;
> }
> table.sample tr.d1 td {
> =A0 =A0 =A0 background-color: #FEFEF2;
> }
> </style>
>
> I borrowed idea from this article:
> http://w= ww.somacon.com/p338.php
>
> Thanks!
>
> Xin

> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmo= de@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode



------------------------------------------------------------------
Russell Adams =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0RLAdam= s@AdamsInfoServ.com

PGP Key ID: =A0 =A0 0x1160DCB3 =A0 =A0 =A0 =A0 =A0 http://www.adamsinfoserv.com/

Fingerprint: =A0 =A01723 D8CA 4280 1EC9 557F =A066E8 1154 E018 1160 DCB3

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gn= u.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


--0016e6482b4ac47a9f046c661c0b-- --===============0969505997== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0969505997==--