You need to either get AsciiDoc to output a <?dbfo bgcolor="#FF0000"?>.
The safest bet here is to hack on the AsciiDoc docbook45.conf file (or make
your own backend) that looks for information that AsciiDoc gives you in
context and try to get this outputted.
Here's the template to hack on:
[tabletags-default]
colspec=<colspec colname="col_{colnumber}"
colwidth="{width!{colpcwidth}*}{width?{colabswidth}{pageunits}}"/>
bodyrow=<row>|</row>
headdata=<entry align="{halign}" valign="{valign}"{colspan@1::
namest="col_{colstart}" nameend="col_{colend}"}{morerows@0::
morerows="{morerows}"}>|</entry>
bodydata=<entry align="{halign}" valign="{valign}"{colspan@1::
namest="col_{colstart}" nameend="col_{colend}"}{morerows@0::
morerows="{morerows}"}>|</entry>
paragraph=<simpara>|</simpara>
Somewhere in there you need to get a <?dbfo bgcolor="{bgcolor}"?>
I got it to work using the set macro. Here's my sample document:
[cols="2"]
|===
|a
|b
|d
{set:cellbgcolor:red}
|e
{set:cellbgcolor:none}
|===
Here's the relevant bit of the above template:
bodydata=<entry align="{halign}" valign="{valign}"{colspan@1::
namest="col_{colstart}" nameend="col_{colend}"}{morerows@0::
morerows="{morerows}"}>{cellbgcolor?<?dbfo
bgcolor="{cellbgcolor}"?>}|</entry>
That should do it. I can confirm this works. (Note you should use proper
values instead of red and none).
-Dan
On Fri, Apr 12, 2013 at 10:54 AM, Mark Volkmann
<[email protected]>wrote:
> Is there a way to specify the background color of a table cell that works
> with PDF output?
>
> --
> You received this message because you are subscribed to the Google Groups
> "asciidoc" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/asciidoc?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
Dan Allen
Principal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597
http://google.com/profiles/dan.j.allen
http://mojavelinux.com
http://mojavelinux.com/seaminaction
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/asciidoc?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.