"colspec" setting not respected in Chemistry CSS processor

Post here questions and problems related to editing and publishing DITA content.
shanweizhong
Posts: 30
Joined: Mon Jul 10, 2017 2:18 am

"colspec" setting not respected in Chemistry CSS processor

Post by shanweizhong »

Hi guys,

I'm using the Chemistry CSS processor (DITA Map PDF - WYSIWYG) in XML Author 19.0 to generate PDF documents, and I found that the following table column settings are not respected:

<colspec colwidth="1.0*"/>
<colspec colwidth="2.36*"/>


The two columns in a table are always scaled 50% each in the generated PDF document. I tried to set column widths in p-styling.css but I don't know how to set values for different columns. If I use the following settings:

*[class~="table/colspec"] {
width=30%;
}


The widths of all columns are set to 30%.

My CSS knowledge is really limited and I wonder if anyone can give me a hand on this. (The settings work well for web help output.)

Thanks,
Michael
ionela
Posts: 402
Joined: Mon Dec 05, 2011 6:08 pm

Re: "colspec" setting not respected in Chemistry CSS processor

Post by ionela »

Hello,

I confirm this is a bug in DITA Map PDF - WYSIWYG transformation from oXygen XML version 19.0.
The bug has already been resolved in our current development stream and the fix will be included in the next version of oXygen XML (version 19.1).
If this issue is important for your use-case, please contact us on support AT oxygenxml DOT com and we'll try to offer you a patch that solves this problem.

Regards,
Ionela
Ionela Istodor
oXygen XML Editor and Author Support
shanweizhong
Posts: 30
Joined: Mon Jul 10, 2017 2:18 am

Re: "colspec" setting not respected in Chemistry CSS processor

Post by shanweizhong »

ionela wrote:Hello,

I confirm this is a bug in DITA Map PDF - WYSIWYG transformation from oXygen XML version 19.0.
The bug has already been resolved in our current development stream and the fix will be included in the next version of oXygen XML (version 19.1).
If this issue is important for your use-case, please contact us on support AT oxygenxml DOT com and we'll try to offer you a patch that solves this problem.

Regards,
Ionela

I see. Thanks so much, Ionela. When are you going to deliver the 19.1 release? Please also let me know if I can edit certain files to work around the issue.

Cheers,
Michael
ionela
Posts: 402
Joined: Mon Dec 05, 2011 6:08 pm

Re: "colspec" setting not respected in Chemistry CSS processor

Post by ionela »

Hi,

oXygen XML v19.1 will be released this fall. You can follow the release/build RSS feed here:
http://www.oxygenxml.com/rssBuildID.xml

Unfortunately, the fix for this issue implies more than some CSS snippets, so please contact us on support AT oxygenxml DOT com in case you need a patch.

Regards,
Ionela
Ionela Istodor
oXygen XML Editor and Author Support
shanweizhong
Posts: 30
Joined: Mon Jul 10, 2017 2:18 am

Re: "colspec" setting not respected in Chemistry CSS processor

Post by shanweizhong »

ionela wrote:Hi,

oXygen XML v19.1 will be released this fall. You can follow the release/build RSS feed here:
http://www.oxygenxml.com/rssBuildID.xml

Unfortunately, the fix for this issue implies more than some CSS snippets, so please contact us on support AT oxygenxml DOT com in case you need a patch.

Regards,
Ionela
I see. Thanks for the help, Ionela.
annyjul
Posts: 11
Joined: Fri Mar 02, 2018 12:20 pm

Re: "colspec" setting not respected in Chemistry CSS processor

Post by annyjul »

Sorry for necro, but I have the same problem in 20.1, DITA PDF WYSIWYG Transformation.

My table is

Code: Select all


<table frame="none" rowsep="0" colsep="0" id="table_rjz_2dy_fgb">
<tgroup cols="2">
<colspec colname="c1" colnum="1" colwidth="1*"/>
<colspec colname="c2" colnum="2" colwidth="3*"/>
<tbody>
<row>
<entry>Stuff</entry>
<entry>description of the stuff</entry>
</row>
<row>
<entry>Stuff</entry>
<entry>description of the stuff</entry>
</row>
</tbody>
</tgroup>
</table>
However in output PDF the table always is split 50% each column. In merged xml it shows correct properties, like this:

Code: Select all

<colspec class="- topic/colspec " colname="col1" colnum="1" colwidth="1*" rowheader="headers" xtrc="colspec:1;9:69" xtrf="file:/ditaTemporaryOutputDir-1547553156593/t1/t2/t3/t4/t5/listOfTerms.dita" style="width:25%;"/>
<colspec class="- topic/colspec " colname="col2" colnum="2" colwidth="3*" rowheader="headers" xtrc="colspec:2;10:69" xtrf="file:/ditaTemporaryOutputDir-1547553156593/t1/t2/t3/t4/t5/listOfTerms.dita" style="width:75%;"/>
Costin
Posts: 833
Joined: Mon Dec 05, 2011 6:04 pm

Re: "colspec" setting not respected in Chemistry CSS processor

Post by Costin »

Hi annyjul,

I used the table you provided in a test DITA Map and applied the DITA Map PDF - based on DITA and CSS (WYSIWYG) transformation scenario, but I could not reproduce the issue. The ratio appears to be the correct one - 25% / 75%, matching the style in the merged.xml intermediate file.
Are you using the latest maintenance build (2018122403) available on our website? If you are using an older build, it could be possible that there was an issue at some point, which has been fixed, so you should give the latest build a try (download from our website, install and use that new build), see if it makes any difference.

Another possible cause could be your own customization (some rules in your CSS could overwrite others, due to some selectors with higher specificity), in case you are using a customization CSS in your scenario. If you are using a custom scenario, with a customization CSS, you should try using the out-of-the-box (untouched) DITA Map PDF - based on DITA and CSS (WYSIWYG) from oXygen. If that works, then you need to re-check debug your CSS customization.

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
annyjul
Posts: 11
Joined: Fri Mar 02, 2018 12:20 pm

Re: "colspec" setting not respected in Chemistry CSS processor

Post by annyjul »

Costin wrote:Hi annyjul,

I used the table you provided in a test DITA Map and applied the DITA Map PDF - based on DITA and CSS (WYSIWYG) transformation scenario, but I could not reproduce the issue. The ratio appears to be the correct one - 25% / 75%, matching the style in the merged.xml intermediate file.
Are you using the latest maintenance build (2018122403) available on our website? If you are using an older build, it could be possible that there was an issue at some point, which has been fixed, so you should give the latest build a try (download from our website, install and use that new build), see if it makes any difference.

Another possible cause could be your own customization (some rules in your CSS could overwrite others, due to some selectors with higher specificity), in case you are using a customization CSS in your scenario. If you are using a custom scenario, with a customization CSS, you should try using the out-of-the-box (untouched) DITA Map PDF - based on DITA and CSS (WYSIWYG) from oXygen. If that works, then you need to re-check debug your CSS customization.

Regards,
Costin
I'm sorry I must be missing something then, because I use 21.0, build 2019010822. I tried default customization and empty new project. It still doesn't work for some reason. I got around this problem for majority of tables with outputclass {table-layout: auto}, but there are tables that I absolutely want to be proportional or fixed.
I don't know If my project will help you, but just in case here it is: https://drive.google.com/file/d/1EZr9Y_ ... sp=sharing.

Log from console shows multiple warnings (log included in archive):

Code: Select all

[java] WARN org.apache.fop.apps.FOUserAgent - Invalid property encountered on "fo:block-container": display-tags (See position 1:30466)
[java] WARN org.apache.fop.fo.PropertyList - No PropertyMaker registered for display-tags. Ignoring property.
....
[java] INFO org.apache.fop.apps.FOUserAgent - table-layout="fixed" and width="auto" => assuming width="100%". (See position 22:361)
:
Costin
Posts: 833
Joined: Mon Dec 05, 2011 6:04 pm

Re: "colspec" setting not respected in Chemistry CSS processor

Post by Costin »

Hi annyjul,

Please use the official release of oXygen available from the website.
It seems you are using an unofficial nightly build of version 21 (version 21 isn't even released yet), that we most probably provided you on request, to test some beta functionality (like: resolved issues, or new features).
I noticed this also from your log file:

Code: Select all

[echo] * dita.dir = [b]D:\Programs\nightbuild\oxygen-publishing-engine-2.x[/b]
Looking at the discussion above in this thread, it looks like you were suggested to contact us in case you needed a patch, to test the fix we implemented for the next version to be released.

However, as it is not an official stable release, but just an internal nightly build of a version still under development, I can offer no guarantee it will work flawlessly so we can not offer support for nightly builds.

You should download and install the latest stable version (20.1) available from our website and see if this still occurs.
However, even so, I noticed there is some styling applied on the title from the front page of your PDF output (some sort of a grey colored background), styling which should not be applied by the default PDF with CSS (WYSIWYG) transformation scenario.
Therefore, you are most probably using a custom transformation scenario, with a customization CSS of your own and the issue occurs due to some custom rules you are using in your own CSS.
You should run the unaltered DITA Map PDF - based on DITA & CSS (WYSIWYG) scenario from the official version 20.1 I mentioned with the default DITA OT 2.x that comes bundled with (not an external DITA OT of yours), without tinkering with it (without any other parameter or CSS customization) and you will see that the table layout is the correct one.

I used the same project you provided and, as you can see, the table looks just fine:

Image

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
annyjul
Posts: 11
Joined: Fri Mar 02, 2018 12:20 pm

Re: "colspec" setting not respected in Chemistry CSS processor

Post by annyjul »

Thank you, Costin, for your time. I'm sorry to report that nothing worked for me :(

I uninstalled and reinstalled official release of OxygenXML from the site, removed all preferences (inside AppData/Roaming folder), removed all nightbuilds and all strings/css localization just in case, opened this project and applied super default transformation scenario, no custom settings.
Aaaand tables still dont follow the colwidth proportional rules.

I don't have any other processors installed, so I use everything from OxygenXML. I really just don't know what sorcery is this. I have russian Windows 7, may be this could be a problem? By the way, HTML&CSS transformation scenario works great with tables. So it seems my only option now is to switch to HTML&CSS (and lose all my customization...), which however has number of other problems.
Post Reply