Re: Syntax coloring cloned node

2016-09-30 Thread Edward K. Ream
On Tue, Sep 27, 2016 at 3:44 AM, vitalije wrote: > > One possible solution would be to use Leo-UNL instead of clones. For > example in your @rst file you put somewhere following: > > .. code:: nasm > LEOUNL:: > > Then run the following script (could be turned in to

Re: Syntax coloring cloned node

2016-09-30 Thread Edward K. Ream
On Mon, Sep 26, 2016 at 3:20 PM, wrote: ​...​your solution of copying nodes isn't quite as elegant as cloning. > ​I agree. However, munging text with a script is the most general solution. ​ > So I kept fooling around a bit and found out that when using the @clean

Re: Syntax coloring cloned node

2016-09-27 Thread vitalije
One possible solution would be to use Leo-UNL instead of clones. For example in your @rst file you put somewhere following: .. code:: nasm LEOUNL:: Then run the following script (could be turned in to button) to generate your rst files: @first # -*- coding:utf-8 -*- import re import os

Re: Syntax coloring cloned node

2016-09-26 Thread lnoordergraaf75
Hi Edward, Thanks for helping out. To be frank I find your solution of copying nodes isn't quite as elegant as cloning. So I kept fooling around a bit and found out that when using the @clean node to create the rst files and then invoking make by hand I get very satisfactory results. Doing so

Re: Syntax coloring cloned node

2016-09-26 Thread Edward K. Ream
On Mon, Sep 26, 2016 at 6:21 AM, Edward K. Ream wrote: Here is a tested prototype: > ​Oops. The script works properly only if there is already a 'my book (sphinx)'​ node. To fix this, add the line: root2.h = 'my book (sphinx)'​ after the line: root2 =

Re: Syntax coloring cloned node

2016-09-26 Thread Edward K. Ream
On Sun, Sep 25, 2016 at 9:20 AM, wrote: I'm in the process of writing a programming book. > ​..​ > The usual literate programming tools however leave room for improvement, > and so I found Leo. > ​Welcome aboard.​ > > So I have a section of code annotated with >