elderfd / language-weave

Port of Atom extension of the same name. Provides syntax highlighting for Pweave and Weave.jl documents.
MIT License
1 stars 1 forks source link

Add syntax highlighting to inline python chunks #2

Closed jsdeguzman6 closed 6 years ago

jsdeguzman6 commented 6 years ago

I've used the extension recently, and I noticed that in-line python chunks in ;]pweave are highlighted as comments instead of actual chunks, as seen in the image below. image I've seen it implemented in the Atom version of the extension as well, so I was wondering if it could be implemented here as well.

elderfd commented 6 years ago

Thanks for the feedback. I've implemented that in a new version of the extension that should be up on the marketplace now.

Let me know if there's any further issues.

jsdeguzman6 commented 6 years ago

Is it possible to add this for Pweave in LaTeX (.Pnw, .Ptexw) files as well? I forgot to mention I'm using LaTeX for Pweave, my bad.

elderfd commented 6 years ago

I haven't used pweave in some time so bear with me. Are you definitely sure the Atom plugin (or even pweave itself) supports inline Python for Latex?

I'm looking at the code for the Atom plugin and it looks like LateX uses the noweb syntax only, which as far as I can tell doesn't have an inline mode.

jsdeguzman6 commented 6 years ago

Yeah, pweave supports inline Python for LaTeX via noweb syntax via <%= [one-liner python expression] %> or <% [one-liner python expression] %>. I ran it through Pweave and gave me the expected results. I have yet to check the atom version since I've never really checked atom before.

Edit: Looks like the Atom package doesn't support that either, but it would be nice if it would be supported here as well.

elderfd commented 6 years ago

Okay just wanted to double-check I wasn't going to implement highlighting for something that doesn't work with Pweave. Will add that highlighting to LateX too.

elderfd commented 6 years ago

Version 0.3.1 has inline highlighting for LateX.