Page 1 of 1

PDF Chemestry -- Figuring it out

Posted: Mon Oct 09, 2017 7:26 pm
by cud
Hi... I'm trying to see if I can make this work for me as the PDF engine. I'll chunk my DITA
maps to generate a single XHTML file, and then take it from there. I'm very excited about this product, but I've encountered a few problems already:

My XHTML generates a table with an empty thead. I think that's because I use a simpletable in DITA, and I don't have a heading row in there. I just begin with simpletable, then strow. As far as I can tell, that's legal. Also, I don't want a heading row in the table. But the XHTML has an empty tablehead, and that breaks the Chemestry processor... It quits with a fatal error. For a mal-formed table row, could you just post a warning and skip it?

In the docs for Headers and Footers:
https://www.oxygenxml.com/doc/versions/ ... nd-footers
There seems to be an error for extracted text. You have this example:
@page :left {
@top-left: string(publication_title) " / " string(chapter_title);
}

But it fails to parse without a content: statement. I use the following :
@page :left {
@top-left {
content: string(chapter_title);
}
...
}

Finally, I can't get H2 or H1 to resize, and I can't figure out why. Any front-size specification I make is ignored. I'm totally flummoxed at this point...

I'll try to update as I learn things. Thanks!

Re: PDF Chemestry -- Figuring it out

Posted: Tue Oct 10, 2017 12:44 pm
by radu_pisoi
Hi,
cud wrote:My XHTML generates a table with an empty thead. I think that's because I use a simpletable in DITA, and I don't have a heading row in there. I just begin with simpletable, then strow. As far as I can tell, that's legal. Also, I don't want a heading row in the table. But the XHTML has an empty tablehead, and that breaks the Chemestry processor... It quits with a fatal error. For a mal-formed table row, could you just post a warning and skip it?
I suppose you have generated the XHTML file using the DITA Map XHTML transformation scenario. In this case, the transformation generates an empty thead for a simple table without header.

Code: Select all


<table cellpadding="4" cellspacing="0"  class="simpletable">                            
<thead></thead>
<tbody>
<tr class="strow">
...
I will register this situation our internal issue tracker to skip empty thead elements processing. Until this problem will be fixed, please remove the empty
thead elements from your document. You can easily remove all empty thead elements using the Delete Element XML Refactoring action with condition thead[count(*)=0].
cud wrote:In the docs for Headers and Footers:
https://www.oxygenxml.com/doc/versions/ ... nd-footers
There seems to be an error for extracted text. You have this example:
@page :left {
@top-left: string(publication_title) " / " string(chapter_title);
}
Thank you for reporting this. I will register an issue to change this in our documentation.
cud wrote:Finally, I can't get H2 or H1 to resize, and I can't figure out why. Any front-size specification I make is ignored. I'm totally flummoxed at this point...
It should be pretty simple if you use a customization CSS for the Chemistry transformation. I have tested with the next external tool configuation:

Code: Select all

cmd /c chemistry -catalogs ${xmlCatalogFilesList} -css ${cfd}/ch-custom.css -in ${cf} -out ${cfd}/${cfne}.pdf -show-pdf
ch-custom.css

Code: Select all

h1 {
font-size:300%;
}

h2 {
font-size:200%;
}