Login  Register

Can asciidoctor-diagram be used with asciidoctor-pdf.js?

Posted by mbaker00 on Feb 05, 2020; 8:02pm
URL: https://discuss.asciidoctor.org/Can-asciidoctor-diagram-be-used-with-asciidoctor-pdf-js-tp7571.html

I have used the current version of asciidoctor (2.0.10) with asciidoctor-diagram extension and the non-js asciidoctor-pdf extension to create pdf from .adoc files successfully. I have also installed the javascript version of asciidoctor-pdf. I am running in terminal on macOS.

I can run either asciidoctor-pdf or asciidoctor-pdf.js if I specify the path first. But, if I include the -r asciidoctor-diagram extension command when using the javascript version of asciidoctor-pdf I get an error. Example asciidoctor-pdf -r asciidoctor-diagram Bones.adoc yields 'error Error: Cannot find module asciidoctor-diagram.

I like the output of asciidoctor-pdf.js so much better because my documents have lots of floats via the [.right], [.left], and [.float-group]. I would like the maintain the ability to use diagrams.

I have tried including paths in the commands for the extension but either I am not including the path correctly or it's not possible in the alpha to use the diagram extension. asciidoctor-pdf.js package was installed with the global flag if that matters.

Any hints from anyone using the combo of asciidoctor-pdf.js with asciidoctor-diagram successfully?

Thanks, Michael