Open Sveino opened 2 weeks ago
@Sveino : I went ahead and embedded Pandoc into CIMTool. I added the mac variants as well into the OSGI bundle in the event we eventually want to support Mac OS in addition to Windows (this came up as a question in Thailand).
I hit a hitch that I was a little blindsided by. Basically, when I went to test out conversion of an asciidoc sample (as input) the process failed. Upon investigation I discovered Pandoc Issue #1456 . Looks like it does not currently support asciidoc
as an import -f
. This was totally unexpected. Looking deeper I ran into posts that mentioned two publishing houses that had migrated to asciidoc
as their primary source which I think highlights the level of adoption for this as a legitimate source format. It sounds like other steps are required to first generated an intermediate format which Pandoc can then convert to the final Word doc.
In any event, you may have already been aware of this limitation but it was a total surprise when I bumped into it. I had no problem converting from docx
to asciidoc
in my testing so the integration was successful and I'm going to leave it in the 3.0.0-alpha branch.
@tviegut I was staidly aware of this challenged. I was also surprised that this has not been solved in Pandoc. We can use Pandoc to create AsciiDoc from our current Word document. By embedding it to CIMTool we can create Word format based on a change of conversion. We could see if we can find a way to support the Pandoc team with creating support for importing AsciiDoc for generating all relevant formats. I am looking at how we can add link to ontology in AsciiDoc so that we can generate the CIM standard/specification as an Ontology as part of IEC/ISO SMART.
@tviegut I was staidly aware of this challenged. I was also surprised that this has not been solved in Pandoc. We can use Pandoc to create AsciiDoc from our current Word document. By embedding it to CIMTool we can create Word format based on a change of conversion. We could see if we can find a way to support the Pandoc team with creating support for importing AsciiDoc for generating all relevant formats. I am looking at how we can add link to ontology in AsciiDoc so that we can generate the CIM standard/specification as an Ontology as part of IEC/ISO SMART.
@Sveino : Thanks for confirming you were aware. I had figured we would find a way to work around this issue so I'm just continuing the path forward. I finished the Asciidoc builder for generating :doctype: inline content to support the generation of tables corresponding to a profile that can be inlined within a primary Asciidoc template. The section levels just need to be set to match. I have testing to do with it this week just to be sure it integrates fine and then will commit. I just need to determine if I will include it additionally in the 2.3.0 release or just in 3.0.0-alpha
I think it would be good if you can include it in 2.3.0 so that we can start testing different configuration. It is also very relevant for converting existing document to AsciiDoc.
This is related to #184 and the work to create SchemaOps, we should consider embedding pandoc into CIMTool. We can then include the IEC template and set the relevant setting so that we can generate the Word document from CIMTool and we would not need to rely on JCIMClean for this. However, ISO is requiring that any new standard must use Online Standards Development platform (OSD). I think ideally we should update Pandoc to generate OSD XML format from AsciiDoc. There are currently converters from IEC template which we could use.