Re: Color and font size of cells within a table

Subject: Re: Color and font size of cells within a table
From: Norman Walsh <norm@xxxxxxxxxxxxx>
Date: Wed, 11 Mar 1998 14:33:14 -0500
[ apologies if this goes out twice, it bounced once 'cause I munged
  my email address...don't ask ;-) ]

/ "Jordi Mulet" <jmulet@xxxxxxxxxx> was heard to say:
| Your code can help us, but we are really more interested in the rtf /rtf-95
| output ( print sytlesheets) than ih the HTML output

Oh, sorry.  I don't know why I got the impression that you were using
the HTML stylesheet.  In that case, you're definitely in the right place.
I suggest something like this:

(define ($process-cell-pcdata-contents$ entry colnum)
  (let ((font-name (if (have-ancestor? "THEAD" entry)
		       %title-font-family%
		       %body-font-family%))
	(weight    (if (have-ancestor? "THEAD" entry)
		       'bold
		       'medium))
	(fontsize  ($pi-font-size$)
        (fontcolor ($pi-font-color$)
	(align     (cell-align entry colnum)))
    (make paragraph
      font-family-name: font-name
      font-weight: weight
      quadding: align
      font-size: (if fontsize fontsize (inherited-font-size))
      color: (if fontcolor fontcolor (inherited-font-color))
      (process-node-list (children entry)))))

You'll have to copy the PI functions out of the HTML stylesheet into
your customization layer.  And for color, note that you'll have to 
predefine a bunch of colors using DSSSL color spaces and make sure
you return the right thing.

Give a yell if you get stuck...

--norm


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread
  • Color and font size of cells within a table
    • Jordi Mulet - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id CAA14672Wed, 11 Mar 1998 02:53:17 -0500 (EST)
      • <Possible follow-ups>
      • Jordi Mulet - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id EAA21080Wed, 11 Mar 1998 04:59:12 -0500 (EST)
      • Norman Walsh - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id OAA28707Wed, 11 Mar 1998 14:35:53 -0500 (EST) <=
      • Norman Walsh - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id OAA28729Wed, 11 Mar 1998 14:35:58 -0500 (EST)
      • Jordi Mulet - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id MAA21179Thu, 12 Mar 1998 12:10:23 -0500 (EST)
      • Jordi Mulet - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id OAA15256Fri, 13 Mar 1998 14:04:28 -0500 (EST)