On Tuesday, April 28, 2020 at 1:27:41 AM UTC-4, Austin(Xu) Wang wrote: > > Dear All, > > I'm switching from Markdown to Asciidoctor for writing documents. I'd like > to use Leo as the central part for orgenizing all the docs. > > There are a list of questions I'm going to explore. If you have experience > or recommendations please share we me. > > 1) which leo directive to enable syntax highlight for asciidoc > 2) which directive to use for generating external .adoc file from Leoeditor > 3) how to use extensions in .adoc file, for example diagrams, slides > 4) which leo command to generate html from .adoc file > 5) which leo command to generate pdf from .adoc file >
I can not give you any comprehensive answers, but I can suggest some hope. I have been enhancing the viewrendered3 plugin. It inherited code from the older vewrendered plugin, and that code attempts to render asciidoc nodes in a separate viewing pane. I say attempts, because the code as is cannot find the asciidoc executable. But I know how to fix that. So far, the plugin enhancements cover restructured text and Markdown. It should be easy enough to enhance asciidoc nodes in a similar way. When complete, you would be able to 1. Render asciidoc nodes and subtrees (by means of rendering to HTML); 2. Recognize @language asciidoc directives in node bodies and render those parts using asciidoc; 3. Recognize other @language directives and render as appropriate; 4. Render code and literal blocks differently from normal asciidoc text (e.g., in <pre> tags for literal blocks); 5. Execute code blocks in the subtree (python only for the time being) and append any printed output; 6. Have code blocks colorized; 7. Export the HTML rendering to the system browser; 8. Render mathematics with MathJax, if asciidoc can work with or convert the math to latex. (RsT and MD can, and I imagine that asciidoc can too) To some extent, making all these capabilities available will depend on just how asciidoctor works, and I have never worked with it. Still, everything should be possible. Developing these enhancements for asciidoc was fairly far down in my priority list, but if there is some interest out there I would be willing to move it up. I realize that this would not address everything you mentioned, but it would be a good start. Feedback, please! -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/17e109e2-db92-4f24-8ee7-586187f92088%40googlegroups.com.
