Re: Technical document writing using asciidoctor via Leo

2020-04-29 Thread Xu Wang
One more finding, in the generated .adoc file, there is one empty line
between the tittle and the author line,

= headline1

Austin Xu Wang
:doctype: book
:encoding: utf-8
:lang: en
:toc: left
:numbered:

The empty line should be removed, otherwise the generated html is with
wrong format.

Edward K. Ream  于2020年4月29日周三 下午9:18写道:

> On Wed, Apr 29, 2020 at 7:31 AM Xu Wang  wrote:
>
>> Some findings I have so far.
>>
>
> Good work. These should likely become part of Leo's AsciiDoctor page
> .
>
> Edward
>
> --
> 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 leo-editor+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/CAMF8tS0UhCsLztM3cTbensr0p4RrfGvtrrsx9hXn8aqCYzDOdQ%40mail.gmail.com
> 
> .
>

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv9b7XhZR3YjV1xzyxg75K9yk7kYPLZW1kg5oUckzPgeMg%40mail.gmail.com.


Re: Technical document writing using asciidoctor via Leo

2020-04-29 Thread Edward K. Ream
On Wed, Apr 29, 2020 at 7:31 AM Xu Wang  wrote:

> Some findings I have so far.
>

Good work. These should likely become part of Leo's AsciiDoctor page
.

Edward

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS0UhCsLztM3cTbensr0p4RrfGvtrrsx9hXn8aqCYzDOdQ%40mail.gmail.com.


Re: Technical document writing using asciidoctor via Leo

2020-04-29 Thread Xu Wang
Some findings I have so far.

1) which leo directive to enable syntax highlight for asciidoc

Use the @adoc node, for example a node with headline @adoc
leoasciidoctest.adoc,
Put @language asciidoc on the body of that node.

2) which directive to use for generating external .adoc file from Leoeditor
Use adoc command, it will generate both .adoc file and corresponding .html
file

3) how to use extensions in .adoc file, for example diagrams, slides

I put some diagram in the asciidoc file, the correct command for generating
html is
 asciidoctor -r asciidoctor-diagram leoasciidoctest.adoc

However, the default adoc command is without the -r asciidoctor-diagram
parameter.
Need to figure out a way to add parameters for the command.

4) which leo command to generate html from .adoc file
Use adoc command as #2

5) which leo command to generate pdf from .adoc file
May need to add new command by calling g.execute_shell_commands.

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv_L40foxFnpTX_ahe0Da1xVZqvQrmv%3DK0H3gK-2ZviBXQ%40mail.gmail.com.


Re: Technical document writing using asciidoctor via Leo

2020-04-28 Thread Xu Wang
Thanks Thomas for the information.

For now, I can live without preview, just use an external browser or PDF
reader for that purpose. The computer screen is too small, I will leave
more room for the body panel when writing. If only I can create buttons for
generating HTML/PDF from asciidoc tree, there is no problem for me to
refresh the external browser.

I tried @language asciidoc, however the syntax highlight is not complete,
only very few syntax are recognized. Even headlines are not highlighted.
This may be a problem when working on the body panel.

Best Regards,
Austin




Thomas Passin  于2020年4月29日周三 上午3:34写道:

>
> 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  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 leo-editor+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/17e109e2-db92-4f24-8ee7-586187f92088%40googlegroups.com
> 
> .
>

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv-Cu4wWScW%3D54mmEDnhM%3D-X0wg9_XKW%2B-Z9UEskO_n4Mg%40mail.gmail.com.


Re: Technical document writing using asciidoctor via Leo

2020-04-28 Thread Thomas Passin

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  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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/17e109e2-db92-4f24-8ee7-586187f92088%40googlegroups.com.


Technical document writing using asciidoctor via Leo

2020-04-27 Thread Xu Wang
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

Best Regards,
Austin

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAEpKVv_hgoLv2j3W_y_OuYtZ5S%2BD%3Dmy_TOXdtybosoRsVGfnqw%40mail.gmail.com.