How to zoom-in or zoom-out vr3 font size?

56 views
Skip to first unread message

zhaohe wang

unread,
Oct 3, 2020, 11:20:43 AM10/3/20
to leo-editor
It is great to show vr3 to other people if vr3 font size can be adjusted.

tbp1...@gmail.com

unread,
Oct 3, 2020, 11:48:28 AM10/3/20
to leo-editor
The rendering pane is basically a web browser.  So click in the rendering pane, then use <CNTRL-=> or <CTRL- minus> like most other browsers.  Note that this will change the entire display, including image size. 

If you do not want that, then you will have to edit the stylesheet, which is in Leo's plugins/viewrendered3 directory.

Remember to click back in your body or outline pane for ordinary Leo keystrokes to work.

tbp1...@gmail.com

unread,
Oct 3, 2020, 12:08:10 PM10/3/20
to leo-editor
Actually, there is a setting to change the default font size:

@int qweb-view-font-size = 16

(or use some other size).

Thomas Passin

unread,
Oct 3, 2020, 6:38:18 PM10/3/20
to leo-editor
I have added two Leo commands to VR3 that can be linked to the same keys when the focus is not in the VR3 rendering pane:

vr3-zoom-view, and vr3-shrink-view.

These are still experimental.  They will probably be included in the devel branch soon.

zhaohe wang

unread,
Oct 3, 2020, 7:46:58 PM10/3/20
to leo-editor
@tbp1   Thanks a lot!

The qweb-view-font-size setting in my-leo-settings.leo can take effect.

@int qweb-view-font-size = 16

***

 <CNTRL-=> or <CTRL- minus>  or cmd-= or cmd-minus  have no effect.

Leo 6.3-devel, devel branch, build 8a5715ab3f
2020-09-26 08:06:54 -0500
Python 3.7.3, PyQt version 5.12.1
darwin

zhaohe wang

unread,
Oct 3, 2020, 8:15:06 PM10/3/20
to leo-editor
The code font is still small(no changed) with markdown format.

Only a Note: ```python ``` is needed with **syntax color** when save markdown file with @auto-md xxx.md

vr3.png

Thomas Passin

unread,
Oct 3, 2020, 9:49:39 PM10/3/20
to leo-editor
VR3 is not related to @auto-md, and I do not know exactly how @auto-md works.  I think that @auto-md simply writes each child node to a separate .md file. If you use a markdown processor on those files, it may be using a different dialect of markdown than the one used by VR3.

Do not combine the ```python syntax with @language python. Use one or the other.  The following is an example:

@language md

This is a Markdown block, and below is a code block:
```python
YESNO = {True: 'yes', False: 'no'}

def print_truth(x):
    print('Is "{}" True? {}'.format(x, YESNO[x]))

x = False

print_truth(x)
```

This line is not code.

This is supposed to be code:

@language python
def f(x):
    return 3*x

print(f(4))

@language md

And here is a literal block:
```text
This should be a literal block
```


VR3 does not understand directives like @doc.  @c is unnecessary where you have used it, and may confuse VR3.   The pair @c and @ are only intended to skip the content between them, and only outside of code blocks.  If you put, for example, "@c" in a code block, it should be treated as plain text.  It does not seem to be, and that is probably a bug, but using "@c" that way is not what is intended.  The way to use it is like this:

@language md
This line is included
@
and this one will be skipped
@c
From here on, the lines are included again.

The code block below will be skipped:
@
@language python
x =  2**4
@c
And here we include the following content again.

Thomas Passin

unread,
Oct 3, 2020, 9:55:55 PM10/3/20
to leo-editor
Any Markdown processor can get confused if you include a code fence (```) in a code block but you do not intend it to terminate the code block.  If you define a code block with "@language python", you are asking the VR3 pre-processor to open and close your code block.  Adding a code fence can only confuse things.  Don't do that.


On Saturday, October 3, 2020 at 8:15:06 PM UTC-4, zhaohe wang wrote:

Thomas Passin

unread,
Oct 3, 2020, 10:01:17 PM10/3/20
to leo-e...@googlegroups.com
It would help if you included information about which version of Leo you are using.  You can get that information from the log pane.  It is printed there right after startup. [Later -  I see you did include it on one of your messages, and I overlooked it.  I am sorry] VR3 has had some changes and bug fixes since Leo V6.2 final.  Most of them are in the version in the devel branch of Leo on Github.  I would suggest that you use the devel branch of Leo instead of 6.2 final if you can.

If you are not sure how to do that, we can give you some help.

It would also help if you could include the entire text of the node you are using.  I am not going to type in everything from a screen shot to see if I get the same result as you.


On Saturday, October 3, 2020 at 8:15:06 PM UTC-4, zhaohe wang wrote:

Thomas Passin

unread,
Oct 3, 2020, 10:13:07 PM10/3/20
to leo-e...@googlegroups.com
In my version, changing the qweb-view-font-size setting **does** change the font size of "@language md" text.  Remember that you must reload the settings after you make a change: save your MyLeoSettings.leo file after changing settings there, and then either restart Leo or reload the settings using Leo's "Settings/Reload Settings/Reload-All-Settings" menu item.


On Saturday, October 3, 2020 at 8:15:06 PM UTC-4, zhaohe wang wrote:

Thomas Passin

unread,
Oct 3, 2020, 10:29:31 PM10/3/20
to leo-editor
Ah, I see that you are using a Mac.  I don't have one available to try.  I thought that a key mapping like <CTRL-+> would transfer to the equivalent <CMD> key sequence on a mac, but maybe that isn't correct.  Someone else probably knows.  Edward?

Otherwise, remember that you need to click in the rendering pane before those keystrokes will work.

zhaohe wang

unread,
Oct 4, 2020, 8:08:13 AM10/4/20
to leo-editor
@tbp1 Thanks for so much detailed explain. I need learn it earnestly.
Reply all
Reply to author
Forward
0 new messages