-
-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Asciidoc plugin: stem blocks are not rendered in pdf, but very well rendered in html and docx formats #1321
Comments
@aksigkvgithub - math support doesn't work with when creating PDFs as the tooling necessary for this isn't available as ready-to-be-packaged gems for the JRuby engine used by the plugin. To create a PDF with formulas, consider using the command line with tools like https://docs.asciidoctor.org/asciidoctor/latest/stem/mathematical/ to convert AsciiDoc content as needed. When converting AsciiDoc to DOCX, any limitations you see will be rooted inside of the tools of Asciidoctor and pandoc. You might want to try out the latest versions of Asciidoctor to convert AsciiDoc to DocBook, and pandoc to convert DocBook to DOCX on the command line. Please engage with the respective communities of Asciidoctor and pandoc to change the behavior you see they don't fit your needs. |
I did try to install the gems "mathematical" as well as "asciidoctor-mathematical", not less than hundred times, but I could not install them because they do not find some or the other dependency files accross all the repositories, provided to search for therein. As for docker solution is concerened, I installed it too. But, it is too heavy that my computer hangs down, then I had to uninstall it. When I got a beautiful .html and .docx rendering in intellij idea asciidoc plugin, then I hoped that it will similarly do for the pdf too, but alas, for pdf, it could not render well the stem blocks.
Yes, I think too that for .docx section-number-missing-anomaly pandoc must be responsible for using some template, which they and you may be using to convert to .docx. Earlier, I tried to convert asciidoc to docbook and then from docbook, through pandoc, to pdf, apart from first to latex and then to pdf through pandoc as well as through xelatec. In all these cases, I found that math formulae etc were very well rendered, but all other page settings etc were destroyed, giving an impression of a very bad conversion. But, your .docx conversion format is beatiful with proper page settings etc, except the only anamoly of section numbering missing, and that too must be due to some template of pandoc. Therefore, I was wondering, if there could be an option of converting to pdf through pandoc route too in asciidoc-intellij-plugin, in addition to that of asciidoctor-pdf. This way, at least page setting would be proper like that of .docx conversion. My be in pdf, through pandoc, section numbering is also restored apart from a proper page setting. Thanking you in advance, if some solution could be attained. |
Please have a look at the plugin's documentation about the DOCX conversion: at the end of the page, you find the command line description on how to convert AsciiDoc content to DocBook, and then to DOCX using pandoc. It also describes how to use a The current plugin version is using pandoc 2.18, the next will use 3.1.2. If you need a custom conversion that is not part of the plugin, consider using a minimal build script to add the conversion process you need to your project. |
Thank you Sir, for your kind reply, As per your advice I can now convert docx with outline numbering too. However, in pdf it is not so, stem blocks are not converting. I hope asciidoc-intellij plugin must be using asciidoctor-pdf, I guess, which does not support conversion of stem blocks without asciidoctor-mathematical, which is impossible to install. Finally, I wish if asciidoc-intellij could adopt an option of pdf conversion through the same process as has been adopted for docx converstion, I mean, through pandoc. Although, I have gone through docbook to pdf through pandoc process, but that does not take care of page setting etc, that is why I wish if asciidoc-intellij could adopt an option of pdf conversion through the pandoc process so that page setting etc may remain intact. Thanks in advance. |
Your experience with the current version of Once you're happy with the DOCX output, converting the DOCX to PDF might be a way to go. The plugin uses pandoc and Asciidoctor as is, and can only do the same things you can do on the command line. If you want to change the results of the conversion, try out the different command line options, and engage with the pandoc community. Once there is a setup that you consider valuable also for others, share you conversion pipeline here and the community can discuss to include in the plugin. The AsciiDoc plugin includes an experimental option to have the preview exported as a PDF, see the docs for details. Please not the "experimental" status: The current state of development is on hold as there hasn't been progress over the last 2 years and provided "as is". |
Sir, I looked into the docs referred by you as above, i.e. using asciidoctor-web-pdf, and created some document, a question-paper, and rendered its pdf. The rendered file was very beautiful in all aspects, i.e., formulae, table-quality, cross-reference etc, except one. That is, it does not invoke page-break at right place for a large block, in the cited case there for large data-block. However, in this respect asciidoctor-pdf does well, but fails in rendering stem blocks. Today only, I have reported this case, at Github at its following link: Any large asciidoctor block causes page-break issue #682: ggrossetie/asciidoctor-web-pdf#682. If either of the problems, i.e. one with asciidoctor-pdf, and the other with asciidoctor-web-pdf, then pdf rendering would be settled for a longer time. Let us hope for the best. I would like to express my gratitude towards the effort and hard work you and your team are putting in. Thanks for everything. |
Thanks for trying this variant as well. Please note that "web-pdf" integrated in the AsciiDoc plugin for IntelliJ is something very different from the asciidoctor-web-pdf tool. As it seems to me that all options are exhausted here, I'm closing this issue. |
Dear Sir,
I would like to bring to your kind notice that the asciidoc plugin for intellij idea, community edition, is not rendering the stem blocks (both asciimath as well as latexmath) in pdf format. Howerver, the same is very well rendered in html and docx formats.
In docx format stem blocks are rendered, but its outline numbers vanish away.
For the example I am attaching below .docx and .pdf file for your kind review:
Uniformity_trials_asciidoctor.pdf
Uniformity_trials_asciidoctor.docx
Since .html file is well rendered, I did not attach it. As for the .adoc file is concerened, I changed it to .txt format so that github may allow to attach it, hence the same is attached below:
Uniformity_trials_asciidoctor.txt
The text was updated successfully, but these errors were encountered: