On Thu, Feb 2, 2017 at 1:09 AM, Eric S. Johansson <[email protected]>
wrote:
> back way too many years ago I started literate programming with cweb. I'm
> returning to LP using leo but either I'm missing a feature or the approach
> has changed. back in cweb days I wrote each section with a narrative and
> then a code section. I've started importing an existing bit of code and
> got the code section right but I can't figure out how to create a narrative
> section.
>
Use:
@ your narrative, continued over several lines
@c
your code
However, this colorizers the narrative as a python comment. A workaround is:
@language python # Required
@
@language rest
@wrap (optional)
Narrative, now *colored* using reStructuredText.
@c
@language python
def spam():
pass
Yes, this is clumsy. Worse, it puts sentinel comments in the narrative.
The timing of your question is excellent. I have been working on the
colorizer for several weeks. It may be possible to colorize all doc parts
using reStructuredText. I'll look into this today.
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.