On Sat, 21 Jan 2017 15:42:48 -0600
"Edward K. Ream" <[email protected]> wrote:

> On Sat, Jan 21, 2017 at 9:24 AM, 'Terry Brown' via leo-editor <
> [email protected]> wrote:
> 
> > (from a GitHub discussion)
> >
> > If you use
> >
> > @language html css javascript
> >
> > the node will be highlighted as html
> >
> > the button code below cycles the @language line:
> >  
> 
> ​[snip]
> 
> Can you explain why this is useful?  Leo's colorizer can handle
> multiple @language directives.

In a single node?  html / css / javascript can occur in the same file,
which may be in the same node.  I used those because I though it was a
familiar example, I'm more typically mixing R and Markdown in one node.
In this example:
https://raw.githubusercontent.com/yihui/knitr-examples/master/001-minimal.Rmd
the code inside the ``` blocks is R, the rest is Markdown.

Quick test:

@language python
import eels # hah
@language latex
\newpage % hah

Doh, you're right, I didn't realize that, so yes, that's a better
option unless you just don't want to have to remember a new @language
directive every time you switch languages.

Cheers -Terry

-- 
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.

Reply via email to