How to make Outlines which contains images and can display those images?

87 views
Skip to first unread message

Pal Csanyi

unread,
Mar 4, 2018, 5:16:05 AM3/4/18
to leo-editor
Hi,

I want to write in Leo editor Outline wich will be contains images too beside text.
Moreover, I want to can see those images, that is to be displayed those images in Leo editor while I am reading that Otuline.
How can I do that?

Best, Pal

Edward K. Ream

unread,
Mar 5, 2018, 4:34:02 AM3/5/18
to leo-editor
On Sun, Mar 4, 2018 at 4:16 AM, Pal Csanyi <csan...@gmail.com> wrote:

> I want to write in Leo editor Outline which will be contains images too beside text.
> Moreover, I want to can see those images.
 
​​
This is already possible, in a number of ways.


- You can put images of various kinds in @html, @image and @svg nodes.​

​  You can put either references or actual sources in @html and @svg nodes.​


-
​ Leo's viewrendered pane (Alt-0) will show actual images.  Like this:

@language md
<img style="float:right;" src="<full path to>SplashScreen.ico" alt="Splash">
<p>
whatever
</p>​


#762 says ​
​quickstart.leo & CheatSheet.leo should demo Leo's features​
​, including these.

Edward

Pal Csanyi

unread,
Mar 9, 2018, 12:19:48 PM3/9/18
to leo-editor
So I created an @image node with name '@image' and with body:
@language md
<img src="/home/pali/Kepek/FrekvenciaMero.png">
<p>
whatever
</p>​
and saved it.
But after I hit Alt+0 I get this message:
@image: file not found: <img src="/home/pali/Kepek/FrekvenciaMero.png">

However I can run this command successfully on an xterm window:
display /home/pali/Kepek/FrekvenciaMero.png
and the image is displayed.

So what is wrong in my @image node so it does not work?

I am running Gentoo Linux system.

Edward K. Ream

unread,
Mar 9, 2018, 10:25:06 PM3/9/18
to leo-editor
On Fri, Mar 9, 2018 at 11:19 AM, Pal Csanyi <csan...@gmail.com> wrote:

So I created an @image node with name '@image' and with body:
@language md
​​
<img src="/home/pali/Kepek/FrekvenciaMero.png">

​The src attribute is url.  File urls look something like this:

<img src="file:///home/pali/Kepek/FrekvenciaMero.png">

HTH.

Edward

lewis

unread,
Mar 9, 2018, 11:56:17 PM3/9/18
to leo-editor
It seems the @image in the node heading is causing the display failure

Lewis

On Saturday, March 10, 2018 at 4:19:48 AM UTC+11, Pal Csanyi wrote:

So I created an @image node with name '@image' [snip]

Csányi Pál

unread,
Mar 10, 2018, 12:00:42 AM3/10/18
to leo-e...@googlegroups.com
Indeed. As soon as I changed the node heading to 'FrekvenciaMero'
Alt+0 shows me the image.
Thank you very much!
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "leo-editor" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/leo-editor/Gj75Zb0zeY8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> leo-editor+...@googlegroups.com.
> To post to this group, send email to leo-e...@googlegroups.com.
> Visit this group at https://groups.google.com/group/leo-editor.
> For more options, visit https://groups.google.com/d/optout.

Pal Csanyi

unread,
Mar 10, 2018, 2:55:52 AM3/10/18
to leo-editor
However the following does not work. Why not?
I create another node with headline 'Displaying an image'
with body text:

<body text>
@language md
This is an image
================

The following does not work. Why not?

![Alt image](/home/pali/Kepek/FrekvenciaMero.png)

<end of body text>

Actualy I am trying to use syntax from here:
https://daringfireball.net/projects/markdown/syntax#philosophy

Alt+0 shows this:
This is an image
The following does not work. Why not?
![Alt image](/home/pali/Kepek/FrekvenciaMero.png)

Terry Brown

unread,
Mar 10, 2018, 10:28:47 AM3/10/18
to leo-e...@googlegroups.com
On Fri, 9 Mar 2018 23:55:52 -0800 (PST)
Pal Csanyi <csan...@gmail.com> wrote:

> This is an image
> ================
>
> The following does not work. Why not?
>
> ![Alt image](/home/pali/Kepek/FrekvenciaMero.png)

Try the command `edit-pane-test-open`, which should open a split
edit/view pane. You can hide the edit part and select a markdown
viewer for the viewer part, and you should see your image. Now I think
about it though the installation variables are tricky - you might need
QWebKit rather than QWebView, to get the image paths right... more
fiddling than I thought.

Cheers -Terry

Csányi Pál

unread,
Mar 10, 2018, 11:11:19 AM3/10/18
to leo-e...@googlegroups.com
I have not the command `edit-pane-test-open` in Leo editor. Why not?

I have installed QtWebKit.

Terry Brown

unread,
Mar 10, 2018, 11:45:23 AM3/10/18
to leo-e...@googlegroups.com
On Sat, 10 Mar 2018 17:11:17 +0100
Csányi Pál <csan...@gmail.com> wrote:

> I have not the command `edit-pane-test-open` in Leo editor. Why not?

Hmm, are you starting from a console and do you see any error messages
there?

Cheers -Terry

Csányi Pál

unread,
Mar 10, 2018, 12:11:55 PM3/10/18
to leo-e...@googlegroups.com
2018-03-10 17:45 GMT+01:00 Terry Brown <terry...@gmail.com>:
> On Sat, 10 Mar 2018 17:11:17 +0100
> Csányi Pál <csan...@gmail.com> wrote:
>
>> I have not the command `edit-pane-test-open` in Leo editor. Why not?
>
> Hmm, are you starting from a console and do you see any error messages
> there?

I am starting Leo from an xterm window, with leo command:

leo

and I see the following messages:

setting leoID from os.getenv('USER'): 'pali'
reading settings in
/usr/lib64/python2.7/site-packages/leo/config/leoSettings.leo
read only: /usr/lib64/python2.7/site-packages/leo/config/leoSettings.leo
reading settings in /home/pali/.leo/myLeoSettings.leo
qt5ct: using qt5ct plugin
Using default leo file name:
/home/pali/.leo/workbook.leo

** isPython3: False
Leo 5.1-final, build 20150416183122, Thu Apr 16 18:31:22 CDT 2015
Not running from a git repo
Python 2.7.14, PyQt version 5.7.1
linux2
reading settings in /usr/lib64/python2.7/site-packages/leo/doc/CheatSheet.leo
read only: /usr/lib64/python2.7/site-packages/leo/doc/CheatSheet.leo
read only: /usr/lib64/python2.7/site-packages/leo/doc/CheatSheet.leo
QXcbClipboard: SelectionRequest too old
wrote recent file: /home/pali/.leo/.leoRecentFiles.txt
QXcbClipboard: SelectionRequest too old

--
Best, Pali
Reply all
Reply to author
Forward
0 new messages