Table cell color

Oxygen general issues.
vnrrao85
Posts: 3
Joined: Wed Nov 18, 2020 5:25 pm

Table cell color

Post by vnrrao85 »

How to change color of a table cell in Oxygen Author?
Radu
Posts: 9046
Joined: Fri Jul 09, 2004 5:18 pm

Re: Table cell color

Post by Radu »

Hi,

Do you want this for editing or for publishing? If for publishing, to what output format are you publishing? HTML, PDF (using CSS for customizing) or PDF (using XSL-FO for customizing).
Usually something like this can be achieved by setting the @outputclass attribute on the DITA cell <entry> to a custom value and then using a CSS selector to match the element in the published output and to change its background.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
vnrrao85
Posts: 3
Joined: Wed Nov 18, 2020 5:25 pm

Re: Table cell color

Post by vnrrao85 »

Hi Radu, Thanks. I want this for editing. I want to apply different colors for different cells.
Radu
Posts: 9046
Joined: Fri Jul 09, 2004 5:18 pm

Re: Table cell color

Post by Radu »

Hi,

On the Oxygen toolbar there is a "Highlight" tool which can be used to highlight selected content with various colors. This does not influence the publishing in any way, it's only for editing.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
vnrrao85
Posts: 3
Joined: Wed Nov 18, 2020 5:25 pm

Re: Table cell color

Post by vnrrao85 »

Hello Radu, We are using both PDF and HTML formats. Please refer the attached image. I want to change the color of the table cell. I do not see any attributes related to color there.
Attachments
image.png
image.png (20.49 KiB) Viewed 2012 times
Radu
Posts: 9046
Joined: Fri Jul 09, 2004 5:18 pm

Re: Table cell color

Post by Radu »

Hi,

So you actually wanted this for publishing, right?
If you place the caret in the cell and look in the Attributes view, you can set there an "outputclass" attribute to some custom value like "special". Then save the topic.
If you publish to HTML you can create a custom CSS stylesheet with the rule:

Code: Select all

.special {
   background-color:green
}
then edit the transformation scenario in Oxygen and in the "Parameters" list set the "args.css" parameter to point to your custom CSS. There is also a parameter named "args.copycss" which should be set to "yes", in this way the output folder will contain both the HTML files and the custom CSS.
If you publish DITA to PDF using our "DITA Map PDF - based on HTML5 & CSS" transformation scenario, the same custom CSS can be used by similarly configuring parameters:
https://www.oxygenxml.com/doc/versions/ ... ml5-2.html

If you publish DITA to PDF using the classic XSL-FO based approach you will probably need to customize the PDF output using XSLT to match on a table cell with this particular attribute and produce the equivalent XSL-FO structure:

https://www.oxygenxml.com/doc/versions/ ... utput.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply