[oXygen-user] Table formatting: style attribute

Oxygen XML Editor Support (Radu Coravu) support at oxygenxml.com
Tue Oct 18 01:07:18 CDT 2022


Hello Michael,

Great, I'm glad this works for you for editing.

Probably such styling also depends on how you publish the JATS document 
further, if you produce an HTML document from it, that may work but for 
producing a PDF having HTML-related styles in the JATS file will 
probably not produce results in the PDF.

Regards,

Radu

Radu Coravu
Oxygen XML Editor

On 10/17/22 18:09, Michael Boudreau wrote:
>
> Thanks, Radu. That produced the change I need, though I limited the 
> selector to th[style] and td[style].
>
> I’m assuming that CSS declarations are acceptable content for the 
> ‘style’ attribute based on the example in 
> https://jats.nlm.nih.gov/archiving/tag-library/1.2/attribute/style.html:
>
> <tr>
>
> <td style="background: lightgrey" colspan="7">Preschool</td>
>
> </tr>
>
> -- 
>
> Michael R. Boudreau
>
> Electronic Publishing Technology Manager
>
> The University of Chicago Press
>
> 1427 E. 60^th Street
>
> Chicago, IL 60637
>
> www.journals.uchicago.edu
>
> *From: *oXygen-user <oxygen-user-bounces at oxygenxml.com> on behalf of 
> Oxygen XML Editor Support (Radu Coravu) <support at oxygenxml.com>
> *Date: *Monday, October 17, 2022 at 12:22 AM
> *To: *oxygen-user at oxygenxml.com <oxygen-user at oxygenxml.com>
> *Subject: *Re: [oXygen-user] Table formatting: style attribute
>
> Hi Michael,
>
> We (the Oxygen XML developers) are not very familiar with the JATS format.
>
> Oxygen uses CSS to render the JATS content in the Author visual 
> editing mode. If for example you open the CSS 
> "OXYGEN_INSTALL_DIR/frameworks/jats/lib/author-css/authoring-extension.css" 
> CSS and add this selector to it:
>
>     *[style]{
>         -oxy-style:attr(style);
>     }
>
> then save your CSS and re-open your JATS file, Oxygen's visual editing 
> should interpret the small CSS snippet value from any element which 
> has a "style" attribute.
>
> But is this correct according to the standard?
>
> https://jats.nlm.nih.gov/archiving/tag-library/1.1d1/n-kkw2.html 
> <https://urldefense.com/v3/__https:/jats.nlm.nih.gov/archiving/tag-library/1.1d1/n-kkw2.html__;!!BpyFHLRN4TMTrA!5UqrygK3OTCVWUckqPixZjhgdhWr64We_KH3SmfdyV6hT0Iymy8clGtEVsrSv4uWqJbpsnY3eD-nYPKvVSl8mcSD$>
>
>     with many of the elements within a NISO JATS table(<table>
>     <https://urldefense.com/v3/__https:/jats.nlm.nih.gov/archiving/tag-library/1.1d1/n-by90.html__;!!BpyFHLRN4TMTrA!5UqrygK3OTCVWUckqPixZjhgdhWr64We_KH3SmfdyV6hT0Iymy8clGtEVsrSv4uWqJbpsnY3eD-nYPKvVdf-bzfM$>),
>     records the name of the style to be applied to the element;
>
> The value of the @style attribute seems in the standard to indicate 
> more a style name which should indicate the styling.
>
> Regards,
>
> Radu
>
> Radu Coravu
> Oxygen XML Editor
>
> On 10/16/22 04:45, Michael Boudreau wrote:
>
>     Is Oxygen supposed to heed the ‘style’ attribute on <th> and <td>
>     elements in the JATS table model when it’s rendering tables? It
>     doesn’t appear to be doing so.
>
>     I’m using Oxygen 25.0 on macOS X 12.6. I’m creating tables using
>     the JATS table model in a framework that uses CSS files copied
>     from the JATSKit framework. When I add a style attribute like this—
>
>     <td align="center" valign="bottom"
>       style="border-bottom: solid thin black; border-right: solid thin
>     black">X</td>
>
>     —the rules I hope to see on the cell don’t appear.
>
>     (For background: I’m creating tables in the JATS model by
>     converting tables from the OASIS model. In the OASIS model, the
>     <entry> element has ‘colsep’ and ‘rowsep’ attributes to make a
>     rule appear on the right or bottom edge of the table cell. Since
>     there are no direct analogues of those attributes in the JATS
>     model <th> and <td> elements, I’m using the ‘style’ attribute
>     instead.)
>
>     -- 
>
>     Michael R. Boudreau
>
>     Electronic Publishing Technology Manager
>
>     The University of Chicago Press
>
>     1427 E. 60^th Street
>
>     Chicago, IL 60637
>
>     www.journals.uchicago.edu <http://www.journals.uchicago.edu>
>
>
>
>     _______________________________________________
>
>     oXygen-user mailing list
>
>     oXygen-user at oxygenxml.com
>
>     https://www.oxygenxml.com/mailman/listinfo/oxygen-user  <https://urldefense.com/v3/__https:/www.oxygenxml.com/mailman/listinfo/oxygen-user__;!!BpyFHLRN4TMTrA!5UqrygK3OTCVWUckqPixZjhgdhWr64We_KH3SmfdyV6hT0Iymy8clGtEVsrSv4uWqJbpsnY3eD-nYPKvVV1SQ3yo$>
>
>
> _______________________________________________
> oXygen-user mailing list
> oXygen-user at oxygenxml.com
> https://www.oxygenxml.com/mailman/listinfo/oxygen-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20221018/01af2bb0/attachment.htm>


More information about the oXygen-user mailing list