Re: VR3 Supports @pdf Nodes

2025-01-08 Thread Thomas Passin
Yes, what you report is what is intended. It's not exactly whether the head and body paths match. It's that the headline takes priority. The algorithm goes like this: check headline for @pdf. if yes: check headline for valid path. # Valid paths can be either absolute or relative. if

VR3 Supports @pdf Nodes

2025-01-07 Thread Thomas Passin
I have added support for *@pdf* nodes to VR3. It's similar to the same support in the viewrendered plugin that was added recently. A node whose headline starts with *@pdf *and whose headline or body contains a path to a .pdf file on the same computer will display the rendered PDF in the vr3 pa

Re: PR #4253 (enhanced VR plugin) now in devel

2025-01-06 Thread Thomas Passin
On Saturday, January 4, 2025 at 5:13:41 AM UTC-5 Edward K. Ream wrote: On Fri, Jan 3, 2025 at 10:09 PM Thomas Passin wrote: Yes, I get that too. It's because the current layouts have a slot for VRx, and if VR3 is available it goes into the slot, otherwise VR goes in. We discussed h

Re: PR #4253 (enhanced VR plugin) now in devel

2025-01-04 Thread Thomas Passin
On Saturday, January 4, 2025 at 5:13:41 AM UTC-5 Edward K. Ream wrote: On Fri, Jan 3, 2025 at 10:09 PM Thomas Passin wrote: Yes, I get that too. It's because the current layouts have a slot for VRx, and if VR3 is available it goes into the slot, otherwise VR goes in. We discussed h

Re: PR #4253 (enhanced VR plugin) now in devel

2025-01-03 Thread Thomas Passin
Yes, I get that too. It's because the current layouts have a slot for VRx, and if VR3 is available it goes into the slot, otherwise VR goes in. We discussed how to cure that in an earlier thread (it's not hard) but AFAIK nothing has been decided about making a change to the "official" layouts

Re: PR #4253 (enhanced VR plugin) now in devel

2025-01-03 Thread Thomas Passin
On Friday, January 3, 2025 at 5:26:55 PM UTC-5 lewis wrote: The @pdf node renders a pdf file. Thanks for this VR feature. However the VR3 plugin needs to be disabled. If VR and VR3 are both enabled the @pdf node does not render. On my Win11 system I can have VR3 enabled and have VR display a p

Re: PR #4253 (enhanced VR plugin) now in devel

2025-01-02 Thread Thomas Passin
On Thursday, January 2, 2025 at 1:21:59 PM UTC-5 Thomas Passin wrote: All the @mathjax and @katex nodes display nicely in VR3 except that %comments are rendered, if 1) the "Default Kind" is set to MD, and 2) the "$" delimiters are doubled ("$$"). That's e

Re: PR #4253 (enhanced VR plugin) now in devel

2025-01-02 Thread Thomas Passin
The external files in math.leo are not usable for anyone else but you because all they are @file types and the actual files are not in the repo. On Thursday, January 2, 2025 at 12:31:47 PM UTC-5 Edward K. Ream wrote: > On Thu, Jan 2, 2025 at 10:34 AM Thomas Passin wrote: > > > Pl

Re: PR #4253 (enhanced VR plugin) now in devel

2025-01-02 Thread Thomas Passin
Please explain what these node types are supposed to do. Should we only enter LaTeX? Can we enter Markdown with embedded LaTeX? Do we need to install a pdf processor and if so, which one? Are there differences in what we should enter between the various node types? Do we need an internet co

Obfuscated C

2024-12-29 Thread Thomas Passin
A past winner in the International Obfuscated C competition. This is the program in its entirety. I have no idea what it does. I had to use a screen shot since this web site reformatted the code but it needs to have its original format as you will see. More at https://www.ioccc.org/1988/westl

Re: ENB: Improving Leo's support for mathematics

2024-12-28 Thread Thomas Passin
On Saturday, December 28, 2024 at 7:31:22 PM UTC-5 Thomas Passin wrote: I suppose you already found this, but in case you didn't, you can set up the QWebEngineView for the pdf viewer like this: settings = qwev.settings() # qwev = QWebEngineView instance settings.setAttr

Re: ENB: Improving Leo's support for mathematics

2024-12-28 Thread Thomas Passin
ibute(settings.WebAttribute.PdfViewerEnabled, True) On Saturday, December 28, 2024 at 7:20:34 PM UTC-5 Thomas Passin wrote: *About the QWebEngineView class* The revised VR plugin uses the QWebEngineView <https://doc.qt.io/qt-6/qwebengineview.html> class for all html-related nodes. This

Re: ENB: Improving Leo's support for mathematics

2024-12-28 Thread Thomas Passin
*About the QWebEngineView class* The revised VR plugin uses the QWebEngineView class for all html-related nodes. This class is a wrapper around the Chromium open-source browser. This browser should have enough fi

Re: ENB: Improving Leo's support for mathematics

2024-12-28 Thread Thomas Passin
*Interference from GE Force Experience* The VR3 plugin raises a bizarre warning on my machine. With the revised VR plugin, I got the same warning! This message originates from the GE Force Experience package, a part of the NVidia video driver. Somehow, instantiating the QWebEngineView class

Re: Leo is the best math platform!

2024-12-17 Thread Thomas Passin
r 17, 2024 at 4:20:51 PM UTC-5 Edward K. Ream wrote: > On Tue, Dec 17, 2024 at 1:06 PM Thomas Passin wrote: > > pyplot can be fun. >> > > It's addictive! > > I also recommend you develop a set of styles you like and save them to a >> style file in a known

Re: Leo is the best math platform!

2024-12-17 Thread Thomas Passin
pyplot can be fun. As an alternative to a, b = [], [] for x in range(-50,50): y=x**2 a.append(x) b.append(y) this is shorter and probably a little easier to grasp what the variables represent: xy = [(x, x**2) for x in range(-50, 50)] x, y = zip(*xy) # type(x) is a tuple I also re

Re: qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this prob

2024-12-16 Thread Thomas Passin
I did get the same error message about missing xcb libraries on the new Mint VM. I must have been thinking of another VM. Anyway, I cured it by re-installing the library: sudo apt-get install libxcb-cursor0 On Monday, December 16, 2024 at 8:16:45 AM UTC-5 Thomas Passin wrote: > This seems

Re: qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this prob

2024-12-16 Thread Thomas Passin
This seems to be a common problem on Linux, but it doesn't show up on all distros. It's a problem between Qt and the various PATHs. Your solution is a reasonable one, whether or not you put it into .bashrc or another shell script. On Linux, lately I've been putting Leo into a venv and running

Re: After upgrade to 6.8.3: How can I rearrange Leo's window panes

2024-12-15 Thread Thomas Passin
d it would not have to start with the prefix. On Sunday, December 15, 2024 at 4:34:59 PM UTC-5 Thomas Passin wrote: You do need to restart Leo. If you did that (I imagine you did), I'm not sure. I don't think the @string qt-layout-name node needs to be an immediate child of @settings.

Re: After upgrade to 6.8.3: How can I rearrange Leo's window panes

2024-12-15 Thread Thomas Passin
You do need to restart Leo. If you did that (I imagine you did), I'm not sure. I don't think the @string qt-layout-name node needs to be an immediate child of @settings. All the built-in layouts have names that begin with "layout-", like "layout-vertical-thirds". The prefix isn't required in

Re: After upgrade to 6.8.3: How can I rearrange Leo's window panes

2024-12-15 Thread Thomas Passin
We don't have a standard layout line that at present. The new layout system makes it very easy to create new layouts like yours. Here's a layout command that will create your layout. You can put it into an @command node in myLeosettings.leo. Then make it the default layout by adding a settin

Re: Leo is the best math platform!

2024-12-15 Thread Thomas Passin
ses Leo's advantages. I would say that LeoVue is something to imitate >> regarding how to showcase Leo (maybe because of its multiple and versatile >> web views for Leo structured information). >> >> Cheers, >> >> Offray >> On 13/12/24 8:58, Thomas

Re: Leo is the best math platform!

2024-12-13 Thread Thomas Passin
t;> regarding how to showcase Leo (maybe because of its multiple and versatile >> web views for Leo structured information). >> >> Cheers, >> >> Offray >> On 13/12/24 8:58, Thomas Passin wrote: >> >> I've been trying to sell Leo-as-a-notebook for s

Re: Leo is the best math platform!

2024-12-13 Thread Thomas Passin
I've been trying to sell Leo-as-a-notebook for some time now. I glad to see you are starting to get the idea at last! Remember, with VR3 you can render an entire tree starting with the current node; by locking the view you can navigate to and edit a node without having the rendered view jump o

Re: passing arguments to @command

2024-12-11 Thread Thomas Passin
You could also have your script pop up a dialog to type the args into. On Wednesday, December 11, 2024 at 12:03:30 PM UTC-5 jkn wrote: > Thanks for the comments/encouragement Edward > > I too have a few scripts such as the above, which I customise on an ad > hoc basis. I'm not trying to elim

Re: passing arguments to @command

2024-12-09 Thread Thomas Passin
me.top.lineEdit g.es(le.text()) On Monday, December 9, 2024 at 6:02:21 PM UTC-5 Thomas Passin wrote: > If you use Find/Replace, it picks up the arguments from the minibuffer the > same way. There's nothing to stop you from asking for an argument, > inputting all of them, and having

Re: passing arguments to @command

2024-12-09 Thread Thomas Passin
If you use Find/Replace, it picks up the arguments from the minibuffer the same way. There's nothing to stop you from asking for an argument, inputting all of them, and having your command extract them all. Hmm, I tried a command and added some text after its name in the minibuffer after the c

Re: passing arguments to @command

2024-12-09 Thread Thomas Passin
There's a node in LeoDocs about getting arguments. Look for the headline "Getting interactive input in scripts and commands". sys.argv will give you the arguments that the Python interpreter received at startup. Another way I've passed arguments to a script is via the clipboard, but of course

Re: Life after Leo: engineering math

2024-12-01 Thread Thomas Passin
On Sunday, December 1, 2024 at 2:02:14 PM UTC-5 Edward K. Ream wrote: On Sun, Dec 1, 2024 at 12:31 PM Thomas Passin wrote: 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 t

Re: Life after Leo: engineering math

2024-12-01 Thread Thomas Passin
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

Re: Life after Leo: engineering math

2024-12-01 Thread Thomas Passin
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 coul

Re: Is this a Layout Bug

2024-11-29 Thread Thomas Passin
Very well done! It's interesting that the two status bars don't even align with each other. The cutoff top and bottom also suggest that the QWebEngineView is getting wrong video information somehow, or can't understand it correctly. Is there any chance that you use an display multiplier other

Re: Life after Leo: engineering math

2024-11-28 Thread Thomas Passin
On Thursday, November 28, 2024 at 10:29:27 AM UTC-5 Edward K. Ream wrote: I first discovered Steve Brunton via his introduction to the Fourier Series . He is, by far, the best math teacher I've ever had. This makes me want to check out his courses.

Re: Is this a Layout Bug

2024-11-27 Thread Thomas Passin
On Wednesday, November 27, 2024 at 8:34:00 PM UTC-5 wzy...@gmail.com wrote: Hello Thomas, Yesterday, I mentioned that disabling the timer resolved the issue, meaning the UI dragging problem disappeared. However, the layout functionality was affected. I suspect the problem lies in the run_layou

Re: Is this a Layout Bug

2024-11-27 Thread Thomas Passin
I added the timer to prevent a problem that I think was a race condition. With a timer, the delay time is always going to be a guess and maybe it needs to be smaller for your machine. Still, I don't understand why an extra status bar gets shown. The layout code does not touch the status bar

Re: Capabilities of the 'restart-leo' command ?

2024-11-20 Thread Thomas Passin
Let's continue this investigation on the GitHub issue thread, shall we? On Wednesday, November 20, 2024 at 1:24:34 PM UTC-5 Thomas Passin wrote: > On Wednesday, November 20, 2024 at 12:18:26 PM UTC-5 Edward K. Ream wrote: > > > *Summary* > > *python -m leo.core.runLeo* wor

Re: Capabilities of the 'restart-leo' command ?

2024-11-20 Thread Thomas Passin
On Wednesday, November 20, 2024 at 12:18:26 PM UTC-5 Edward K. Ream wrote: *Summary* *python -m leo.core.runLeo* works as expected from all locations. *restart-leo* works as expected at all times. Edward I agree that py -m leo.core.runLeo works as expected in all the cases. My tests all sh

Re: Capabilities of the 'restart-leo' command ?

2024-11-20 Thread Thomas Passin
On Tuesday, November 19, 2024 at 7:14:01 AM UTC-5 Edward K. Ream wrote: On Tuesday, November 19, 2024 at 3:08:34 AM UTC-6 Edward K. Ream wrote: I thinks [the restart-leo command] is correct and I don't want to change this logic! Also note info issue #1183

Re: Capabilities of the 'restart-leo' command ?

2024-11-20 Thread Thomas Passin
On Wednesday, November 20, 2024 at 10:38:09 AM UTC-5 Edward K. Ream wrote: On Wed, Nov 20, 2024 at 9:35 AM Thomas Passin wrote: I do not believe a word of your analysis. There is something wrong with your installation. Then you had better think again. 1. The exact same behavior happens on

Re: Capabilities of the 'restart-leo' command ?

2024-11-20 Thread Thomas Passin
I do not believe a word of your analysis. There is something wrong with your installation. Then you had better think again. 1. The exact same behavior happens on my Linux EndeavourOS VM. I just checked it. 2. My statement that the starting argument of -m leo.core.runLeo gets changed in *s

Re: Capabilities of the 'restart-leo' command ?

2024-11-20 Thread Thomas Passin
On Wednesday, November 20, 2024 at 5:20:12 AM UTC-5 Edward K. Ream wrote: On Tue, Nov 19, 2024 at 4:21 PM Thomas Passin wrote: I have tracked down what is happening but I don't know why. The problem is not with the restart command, it's with the runLeo.py module. It runs a

Re: Capabilities of the 'restart-leo' command ?

2024-11-19 Thread Thomas Passin
On Tuesday, November 19, 2024 at 1:44:08 PM UTC-5 Thomas Passin wrote: I have tracked down what is happening but I don't know why. The problem is not with the restart command, it's with the runLeo.py module. It runs a different version of Leo, and even a different version

Re: Capabilities of the 'restart-leo' command ?

2024-11-19 Thread Thomas Passin
I have tracked down what is happening but I don't know why. The problem is not with the restart command, it's with the runLeo.py module. It runs a different version of Leo, and even a different version of Python, depending on how it is invoked even though you would swear the results should be

Re: ENB: Fixing delegated syntax coloring

2024-11-19 Thread Thomas Passin
Parsing html and xml can be hard. For example, the javascript in a element might build a string that includes "". It's hard to prevent a regex from ending its match at that point. On Tuesday, November 19, 2024 at 10:33:18 AM UTC-5 Edward K. Ream wrote: > On Tue, Nov 19, 2024 at 7:57 AM Edward

Re: Capabilities of the 'restart-leo' command ?

2024-11-19 Thread Thomas Passin
On Tuesday, November 19, 2024 at 4:08:33 AM UTC-5 Edward K. Ream wrote: On Friday, October 18, 2024 at 4:23:21 AM UTC-5 viktor@gmail.com wrote: Leo restart on Windows suffers from the same problem. If I start it with my batch file that sets PYTHONPATH, it restarts the git/leo-editor version

Re: Is this a Layout Bug

2024-11-18 Thread Thomas Passin
What you describe makes me think that the extra status bar is not actually part of the main Leo window. It is all very strange! On Monday, November 18, 2024 at 7:53:29 PM UTC-5 wzy...@gmail.com wrote: > This effect is indeed from taking a photo. When using a screenshot, the > status area dis

Re: Is this a Layout Bug

2024-11-18 Thread Thomas Passin
I don't know. I haven't noticed any problem while dragging or resizing. But there have been one or two times when I've come back to an open Leo window and had some feature missing, like the main menu bar. I can't reproduce the behavior as yet. I don't see how the layout system per se could be

Viewrendered3 Notebooks - an Example

2024-11-17 Thread Thomas Passin
The recent burst of progress on jupytext/Jupyter Notebooks reminded me that I've posted about VR3's note book capabilities several times but never offered more than a screenshot. So here is a (very) small example notebook. I've been using it for testing VR3. You can use it to see what VR3 off

Freewin Plugin Bug Fix and Improvements

2024-11-16 Thread Thomas Passin
Freewin (FW) opens a free-floating window that is linked to the body of the node selected when it was launched. FW has two views, and editor view and an "rendered" view. The latter renders the body as ReStructuredText (RsT), which is useful when the host node is written is RsT. The editor view

Viewrendered3 Bug Fix And Improvements

2024-11-16 Thread Thomas Passin
Recent versions of the viewrendered3 (VR3) plugin sometimes rendered the selected node even if the plugin was not visible. This would happen after startup when an VR3 instance has created but not yet made visible. The effect was to slow down editing of and changes to the selected node. This

Re: Warning: text can disappear when using @language rest

2024-11-15 Thread Thomas Passin
On Friday, November 15, 2024 at 8:07:07 AM UTC-5 Edward K. Ream wrote: On Fri, Nov 15, 2024 at 6:03 AM Thomas Passin wrote: > I was not able to reproduce this bug using yesterday's version of devel. Issue #4181 <https://github.com/leo-editor/leo-editor/issues/4181> now more cle

Re: Warning: text can disappear when using @language rest

2024-11-15 Thread Thomas Passin
On Friday, November 15, 2024 at 6:06:43 AM UTC-5 Edward K. Ream wrote: On Thursday, November 14, 2024 at 4:45:32 PM UTC-6 Edward K. Ream wrote: >> I can now reproduce the bug reliably: Issue #4181 contains the details. > I am confident th

Re: Leo's improved colorizer is in devel!

2024-11-11 Thread Thomas Passin
On Monday, November 11, 2024 at 2:25:19 PM UTC-5 Edward K. Ream wrote: I skipped the official review. Testing will be our review! This PR should be completely safe even if glitches remain. He, he. Famous last words. -- You received this message because you are subscribed to the Google Gr

Re: Layout questions

2024-11-11 Thread Thomas Passin
On Monday, November 11, 2024 at 10:22:18 AM UTC-5 Arjan wrote: Hello, in Leo v6.8.2 I have configured `@string qt-layout-name = vertical-thirds`, which is closest to what I want. Some questions: 1. How to persist the size of the panes? This used to be remembered after restarting leo, but now t

Re: weirdness when trying to enable a new (or any?) plugin

2024-11-11 Thread Thomas Passin
On Monday, November 11, 2024 at 9:59:07 AM UTC-5 jkn wrote: git pull and the Freewin cursor behaviour is now correct, thanks! my 'save-file' key binding does not ;-( It didn't occur to me to use the same binding as the host's editor. I could look at that. I'm not sure how but there must be

Re: weirdness when trying to enable a new (or any?) plugin

2024-11-11 Thread Thomas Passin
Thoughts? Yes indeed. This nasty behavior showed up some unknown time ago and a fix is now in the latest devel. It was merged yesterday, I think it was. The fix includes an improvement too: typing into the body of the host node will put the cursor in the FW editor where it is in the host, and

Re: ENB: Improving Leo's colorizer

2024-11-10 Thread Thomas Passin
While you are at it, how about moving the @language python directive to the start of the node's body? Putting it at the end just confuses everything for no advantage, and it's confusing for a human reader too. For colorizing line by line the language declaration pretty much has to happen at the

Re: How to change the layout of the GUI in Leo 6.8.2-devel

2024-11-08 Thread Thomas Passin
There is another way to see all the different layouts. In the *Settings* menu there is a submenu *Show Settings*, and that one has an item *Show Layouts*. *Show Layouts* will open a tab in the Log frame that shows a diagram of each layout with its command name. All the layout command names s

Re: why does goto-prev/next-visible command change focus to body?

2024-11-07 Thread Thomas Passin
Your change of focus isn't happening for me. Neither using the arrow keys nor running goto-next-visible changed the focus to the body. Looking at the code for the method c.endEditing. c.endEditing() calls qtree.endEditLabel(), and that kicks out the headline editor but without changing focu

Re: weirdness when trying to enable a new (or any?) plugin

2024-11-06 Thread Thomas Passin
Good find! You know, I don't even have a "python3" on my Windows path. If you had used the "py" launcher I think it would have worked right away. I didn't realize you weren't. If there have been multiple installations of Python and you don't use "py", lord knows what you will get. In a non-ve

Re: weirdness when trying to enable a new (or any?) plugin

2024-11-06 Thread Thomas Passin
The only things I can think of at this point are to look again to see if that dll file is actually present somewhere, and to try to import the web engine directly in an interpreter session (IOW, not importing from LeoQt) , e.g., from PyQt6 import QtWebEngineWidgets QWebEngineView = QtWebEngineW

Re: weirdness when trying to enable a new (or any?) plugin

2024-11-06 Thread Thomas Passin
Don't hesitate to delete all those files. Or do what I used to do. Instead of deleting them, move them to some other folder. You can always copy them back. I used to do that when Leo could use both Qt5 and Qt6. I probably should have used venvs but instead I moved all the Qt6 files out for t

Re: weirdness when trying to enable a new (or any?) plugin

2024-11-06 Thread Thomas Passin
I'm no venv expert, that's for sure. I *think* that packages installed into a venv can be symlinked from the non-venv installation if they are the same version. Better try to check that, though. It sounds like that what's happening in your case. It didn't seem to in mine. All a mystery. I

Re: weirdness when trying to enable a new (or any?) plugin

2024-11-05 Thread Thomas Passin
Freewin falls back to using a QTextBrowser if a QWebEngineView isn't present. That only affects the rendered view, not the editor view. The QTextBrowser's rendering is limited compared with the QWebEngineView but that won't really matter for most nodes. I have removed all the PyQt* files from

Re: ENB: About @jupytext and @language jupytext

2024-11-05 Thread Thomas Passin
Thanks for testing! On Tuesday, November 5, 2024 at 5:00:12 AM UTC-5 viktor@gmail.com wrote: > Hello Edward, hello Thomas, > > Edward K. Ream schrieb am Samstag, 2. November 2024 um 14:55:59 UTC+1: > > This Engineering Notebook post discusses how I created *@jupytext* and > its companion, *@

Re: weirdness when trying to enable a new (or any?) plugin

2024-11-05 Thread Thomas Passin
That seems like just what I did. You might look at the Qt files in Python's Lib\site-packages in the venv and see if they are symlinked to the files in the main (non-vm) install. I don't know when files in a new VM get symlinked and when they don't. If they are symlinked then I only have thre

Re: weirdness when trying to enable a new (or any?) plugin

2024-11-04 Thread Thomas Passin
After a kernel update on my Linux Mint VM just now, I got the same error - no PyQt6-WebEngine. Upgrading the PyQt6-x packages didn't fix the error. I installed using requirements.txt into a venv and running in that venv VR3 finds the QWebEngine and runs. On Monday, November 4, 2024 at 6:51:53

Re: weirdness when trying to enable a new (or any?) plugin

2024-11-04 Thread Thomas Passin
I thought PyQt6-QScintilla is required now (don't know why). There are a few apparent mismatches in versions, like PyQt6 6.7.1 PyQt6-Qt6 6.7.3 I have differences too, only not the same ones as yours. I don't understand why, but my system has been w

Re: weirdness when trying to enable a new (or any?) plugin

2024-11-04 Thread Thomas Passin
On Monday, November 4, 2024 at 6:51:53 AM UTC-5 jkn wrote: Hmm, slightly separate point, but now I am trying to replicate things (enabling viewrendered3) on my Windows machine... I am getting a Windows Error popup: ... Qt6WebEngineCore.dll was not found... Leo itself doesn't have an error fro

Re: weirdness when trying to enable a new (or any?) plugin

2024-11-03 Thread Thomas Passin
On Sunday, November 3, 2024 at 5:55:10 PM UTC-5 jkn wrote: Anyway - after putting 'freewin.py' in myLeoSettings.leo (and installing QtWebEngineView for PyQt6 - interestingly VR3 does not seem to give a warning if this is not installed) - I seem to be making progress, both with VR3 and with Fre

Re: weirdness when trying to enable a new (or any?) plugin

2024-11-03 Thread Thomas Passin
On Sunday, November 3, 2024 at 5:06:35 PM UTC-5 jkn wrote: The .pyc files in my plugins/ directory are extremely old, I am sure they predate anything in myLeoSettings.leo ... All .pyc files with Python 3.x go into a *__pycache__* folder (I don't know if this started with Python 3.0 or with a

Re: weirdness when trying to enable a new (or any?) plugin

2024-11-03 Thread Thomas Passin
On Sunday, November 3, 2024 at 3:50:44 PM UTC-5 jkn wrote: I feel like I am being a bit dim here... I'm trying to enable the freewin plugin (I am actually also trying viewrendered/viewrendered3, but 'backed off' to freewin, because I seem to be having fundamental plugin issues. You have to i

Re: New Script To Render @jupytext files With VR3

2024-11-01 Thread Thomas Passin
On Thursday, October 31, 2024 at 10:29:31 PM UTC-4 iamap...@gmail.com wrote: Thank you, Thomas. The script works. The command will create a new node below your @jupytext tree and will select it. But I don't quite understand why you need to do this? Why do we need a new node? Is it becaus

Re: New Script To Render @jupytext files With VR3

2024-11-01 Thread Thomas Passin
On Friday, November 1, 2024 at 4:11:43 PM UTC-4 Edward K. Ream wrote: On Wed, Oct 30, 2024 at 6:40 PM Thomas Passin wrote: Now that we have a more stable import format for @jupytext nodes, I redid my script to produce a version that renders the file with VR3. Very cool. I see intermixed

Re: tree-declutter 'WEIGHT bold' no longer working after upgrading to PyQt6

2024-11-01 Thread Thomas Passin
On Friday, November 1, 2024 at 5:52:08 AM UTC-4 jkn wrote: Actually, assuming that the getattr() call *can* return a value in some circumstances, mumble mumble stylesheets, then presumably this is the fix? def weight_modifier(item: Item, param: str) -> None: #

Re: @jupytext: final touches

2024-11-01 Thread Thomas Passin
I'm not sure about you doing anything "wrong", but try importing the .ipynb file from Leo's *File/Import Files/Import Any File menu*. It's been working well for me. On Friday, November 1, 2024 at 4:37:50 AM UTC-4 lewis wrote: > I am trying out @jupytext but having some issues. > > Leo is buil

Re: New Script To Render @jupytext files With VR3

2024-10-31 Thread Thomas Passin
I create a new node for rendering because VR3 understands how to render markdown with the @language directives but the @jupytext tree isn't markdown. If the leading comment signs were removed and the code sections fenced then VR3 would be able to render the entire tree, but not the way things s

Re: tree-declutter 'WEIGHT bold' no longer working after upgrading to PyQt6

2024-10-31 Thread Thomas Passin
On Thursday, October 31, 2024 at 6:22:20 PM UTC-4 jkn wrote: yes, that's nice to know, thanks for the tip. I got the values from the PyQt documentation ... but I should have realised from the fact that QFont.Weight is an Enum, that it would have names. Fancy new Python features ... bring back

Re: tree-declutter 'WEIGHT bold' no longer working after upgrading to PyQt6

2024-10-31 Thread Thomas Passin
to use for bold, not 75. It's an integer, not a string. On Thursday, October 31, 2024 at 9:23:44 AM UTC-4 jkn wrote: it is the getting of the argument, from eg: # part of declutter-pattern WEIGHT 700 or ? WEIGHT Bold # as per documentation => "arg = 700" that is not working,

Re: tree-declutter 'WEIGHT bold' no longer working after upgrading to PyQt6

2024-10-31 Thread Thomas Passin
;>>> >>>>>>> I had a quick look at the way it's used, and I find it hard to >>>>>>> understand. I can see the intention but the layers of indirection make >>>>>>> it >>>>>>> hard. Say the pattern in myLeoSettings is *

Re: New Script To Render @jupytext files With VR3

2024-10-31 Thread Thomas Passin
i = 0 if is_code else 2 cells.append(line[i:]) if is_prefix: cells.append(MD_LITERAL_FENCE) body = '\n'.join(cells) vr3_jupytext_node = JUPYTER_POSITION.insertAfter() vr3_jupytext_node.h = 'Rendering for ' + jupy_file[1] vr3_ju

Re: tree-declutter 'WEIGHT bold' no longer working after upgrading to PyQt6

2024-10-31 Thread Thomas Passin
;> it. None of those strings exist of attributes of QFont, so the default >>>> always comes back, which is 75. >>>> >>>> Anyway, 700 is the value to use for bold, not 75. It's an integer, not >>>> a string. >>>> >>

Re: tree-declutter 'WEIGHT bold' no longer working after upgrading to PyQt6

2024-10-31 Thread Thomas Passin
;>> or ? >>> WEIGHT Bold # as per documentation >>> >>> => "arg = 700" >>> >>> that is not working, I think. >>> >>> On Thursday, October 31, 2024 at 1:15:28 PM UTC tbp1...@gmail.com wrote: >>> >>&

Re: tree-declutter 'WEIGHT bold' no longer working after upgrading to PyQt6

2024-10-31 Thread Thomas Passin
=> "arg = 700" > > that is not working, I think. > > On Thursday, October 31, 2024 at 1:15:28 PM UTC tbp1...@gmail.com wrote: > >> On Thursday, October 31, 2024 at 7:45:05 AM UTC-4 Thomas Passin wrote: >> >> Either of these work in the sense of ex

Re: tree-declutter 'WEIGHT bold' no longer working after upgrading to PyQt6

2024-10-31 Thread Thomas Passin
Either of these work in the sense of executing without producing an error. I haven't tried applying the font to see the results: from leo.core.leoQt import QtGui, QtWidgets QFont = QtGui.QFont newfont = QFont('Georgia') newfont.setWeight(QFont.Weight.Bold) # or newfont.setWeight(700) On Wedne

Re: tree-declutter 'WEIGHT bold' no longer working after upgrading to PyQt6

2024-10-31 Thread Thomas Passin
On Thursday, October 31, 2024 at 7:45:05 AM UTC-4 Thomas Passin wrote: Either of these work in the sense of executing without producing an error. I haven't tried applying the font to see the results: from leo.core.leoQt import QtGui, QtWidgets QFont = QtGui.QFont newfont = QFont(&#x

Re: ENB: Why deleting cell markup won't work

2024-10-30 Thread Thomas Passin
On Wednesday, October 30, 2024 at 7:44:08 AM UTC-4 Edward K. Ream wrote: This Engineering Notebook post explains why removing and restoring cell markup can not work reliably. The idea seems tempting. Why put up with all that cruft? But this scheme has a fatal flaw: there is no *dead easy* way

Re: @jupytext improvements ready for review

2024-10-30 Thread Thomas Passin
On Wednesday, October 30, 2024 at 6:51:00 AM UTC-4 Edward K. Ream wrote: I do have two suggestions, though, both trivial to implement. 1. Only use the first 6 words of the first line for the headline, the way my script did. The new* jtm.compute_headline* method does a much better job of com

Re: @jupytext improvements ready for review

2024-10-30 Thread Thomas Passin
On Wednesday, October 30, 2024 at 6:51:00 AM UTC-4 Edward K. Ream wrote: 2. Put an @nocolor directive at the top of each markdown cell. I'm not going to do this because @nocolor suppresses *all* coloring. Then add @color to code cells. They are the ones that should be colorized. -- You re

Re: @jupytext improvements ready for review

2024-10-29 Thread Thomas Passin
I tried importing the two files I've been using for my experiments and they both seem right. I didn't try round-tripping the notebook files, and I didn't look closely to see if there were any extra blank lines inserted. I do have two suggestions, though, both trivial to implement. 1. Only use

Re: ENB: Enhance @jupytext with Thomas's script

2024-10-29 Thread Thomas Passin
On Tuesday, October 29, 2024 at 10:02:39 AM UTC-4 Edward K. Ream wrote: On Tue, Oct 29, 2024 at 8:11 AM Thomas Passin wrote: I would like to make one more push for eliminating the '#' characters that comment out each and every line of a juyptext line. Here is snippet from my

Re: ENB: Enhance @jupytext with Thomas's script

2024-10-29 Thread Thomas Passin
On Tuesday, October 29, 2024 at 6:39:20 AM UTC-4 Edward K. Ream wrote: The fruitful collaboration with Thomas continues. This Engineering Notebook post discusses adapting Thomas's prototype script to enhance how Leo handles @jupytext nodes. Some nodes of the hierarchy may be missing, but that'

Re: Jupytext - Script To Split Into Child Nodes

2024-10-29 Thread Thomas Passin
On Tuesday, October 29, 2024 at 5:16:13 AM UTC-4 Edward K. Ream wrote: Spoiler: Thomas's script should enhance @jupytext rather than become a separate command. Splitting the @jupytext node into an outline can be done with complete safety. I agree. And doing so would put the @juptext imports

Re: ENB: Enhance @jupytext with Thomas's script

2024-10-29 Thread Thomas Passin
I would like to make one more push for eliminating the '#' characters that comment out each and every line of a juyptext line. They can be put back when the file is saved. They do nothing for a Leo user except ad visual clutter, and the possibility for error if someone accidentally removes or

Re: ENB: Enhance @jupytext with Thomas's script

2024-10-29 Thread Thomas Passin
On Tuesday, October 29, 2024 at 6:39:20 AM UTC-4 Edward K. Ream wrote: The fruitful collaboration with Thomas continues. This Engineering Notebook post discusses adapting Thomas's prototype script to enhance how Leo handles @jupytext nodes. This enhancement: - will be rock solid. - can cover

Re: Jupytext - Script To Split Into Child Nodes

2024-10-28 Thread Thomas Passin
I think we are roughly in agreement. My plan is to look only at the indentation of the first line after the cell marker. Any other lines in the cell with heading levels won't - by definition - change the indentation of the cell because a cell can only have one indentation level. And cells can

Re: Jupytext - Script To Split Into Child Nodes

2024-10-28 Thread Thomas Passin
On Monday, October 28, 2024 at 8:27:28 PM UTC-4 Edward K. Ream wrote: On Monday, October 28, 2024 at 6:27:34 PM UTC-5 Thomas wrote: Wait! The imported file in the @jupytext node is already in juyptext format, not JSON. This hint made everything clear. - The @jupytext node must contain *all

Re: Jupytext - Script To Split Into Child Nodes

2024-10-28 Thread Thomas Passin
On Monday, October 28, 2024 at 6:39:50 PM UTC-4 Edward K. Ream wrote: Alright. I'm on it. Here's my plan: - Start with the markdown importer. Oops. That won't work directly. I forgot that .ipynb files are json, not plain text. Thomas's script parses the json directly, but it is probably bes

Re: Jupytext - Script To Split Into Child Nodes

2024-10-28 Thread Thomas Passin
rd K. Ream wrote: > On Mon, Oct 28, 2024 at 11:31 AM Thomas Passin wrote: > >> I need some guidance on edge cases before I can get the script to indent >> beyond one level. >> > > These are all good questions. I was planning to work on this script, but > I'll

Re: Jupytext - Script To Split Into Child Nodes

2024-10-28 Thread Thomas Passin
I need some guidance on edge cases before I can get the script to indent beyond one level. 1. If the first cell has no markdown header level, it should only be indented one level, right? There's nowhere else for it to go. 2. If the first cell has a markdown header level > 1, the indentation sh

  1   2   3   4   5   6   7   8   9   10   >