Ah, my mistake.  It's not python cells that have the language specified in 
the header line, it's markdown cells:

# %% [markdown]

So it isn't the import that has the bug but my memory.
On Sunday, December 1, 2024 at 11:09:25 AM UTC-5 Thomas Passin wrote:

> Oops, posted too soon.  Here is the screen shot and an explanation of the 
> tweaks and the import bug.
>
> First, VR3 does not understand << named sections >> so I had to comment 
> out the <<prefix>> line.  I could get VR3 to automatically ignore named 
> section lines without much trouble. Since for @jupytext files the nodes all 
> appear in the right order anyway, ignoring them won't hurt anything.
>
> Second - this is the bug - the cell introducer line is supposed to include 
> the language but it doesn't:
>
> # %%
>
> should be (I forget the exact syntax but it includes the language)
>
> # %% python
>
> So I had to add a header line to each node: @language python.
>
> In the script that I wrote during the evolution of jupytext support, I 
> translated the %% python to @language python. I could build that into VR3 
> for jupytext files.
>
> Third, I had to add a line plt.show() at the end to generate the visible 
> plot that you see in the screenshot.
>
> So with a little bug fix to Leo's importer, and a little work on VR3, you 
> could view and execute this kind of example right in Leo as you study.
>
> On Sunday, December 1, 2024 at 10:56:46 AM UTC-5 Thomas Passin wrote:
>
>> Looking at the syllabus, you should have fun.  It's really racing over a 
>> lot of topics.
>>
>> The first lecture has a matrix example built around weather. It includes 
>> both a Matplotlib page and a Jupyter Notebook for running the matrix 
>> system.  I imported it as jupytext into Leo and found that I could get the 
>> example running in VR3 - with a little tweaking. Doing this, I noticed an 
>> error in the Jupytext import code. 
>>
>> After the fix-up tweaks, I executed the notebook and got the attached 
>> graphical result.
>>
>> On Sunday, December 1, 2024 at 8:23:05 AM UTC-5 Edward K. Ream wrote:
>>
>>> On Thursday, November 28, 2024 at 9:22:39 AM UTC-6 Edward K. Ream wrote:
>>>
>>> I shall study engineering math under the long-distance direction of 
>>> Prof. Steve Brunton 
>>> <https://www.me.washington.edu/facultyfinder/steve-brunton> at the 
>>> "other" UW, the University of Washington. In other words, I'll study his 
>>> YouTube videos and his outstanding online course, Data Driven Science 
>>> <http://databookuw.com/>.
>>>
>>>
>>> The video Differential Equations Overview 
>>> <https://www.youtube.com/watch?v=9fQkLQZe3u8&list=PLMrJAkhIeNNTYaOnVI3QpH7jgULnAmvPA>
>>>  
>>> is the first lecture of the course ME 564: Mechanical Engineering 
>>> Analysis <http://faculty.washington.edu/sbrunton/me564/>.
>>>
>>> This page will guide my study. At the top of the page is a list of 
>>> homework assignments.
>>>
>>> Be sure to scroll down to the syllabus. There are three parts: ODEs, 
>>> Numerical calculus, and (!) Complex analysis. Each part contains a series 
>>> of lectures. Each lecture contains lecture notes and accompanying .m 
>>> (Matlab) files. Matlab is free if you use it for less than 20 hours per 
>>> month.
>>>
>>> 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 view this discussion visit 
https://groups.google.com/d/msgid/leo-editor/24a429c0-26ef-4a06-88e5-3169bb293367n%40googlegroups.com.

Reply via email to