@image Example

42 views
Skip to first unread message

rengel

unread,
Nov 2, 2019, 6:16:39 AM11/2/19
to leo-editor
The documentation of the directives is lacking a complete @image example to display an image in viewrendered? Complete means:
- node with header: @image ...
- body text

I have file named
D:/Projekte/Leo/DependencyLabelScheme.png
that I want to display in viewrendered.

I tried in vain:

header:
@image file:///D:/Projekte/Leo/DependencyLabelScheme.png
body:
(empty)

header:
@image
body:
<img src="file:///D:/Projekte/Leo/DependencyLabelScheme.png"/>

With Alt+0, I get either an empty vierendered pane or a 'file not found' error.
As this is an absolute path this shouldn't happen.

Variants with some name after '@image' in the header or '@language md' at the top of the body don't work either.

After two hours of trying various complicated header-body combinations I finally found the simple solution here:

It would be nice if this would be added to the directives reference.

Reinhard

Edward K. Ream

unread,
Nov 4, 2019, 11:52:00 AM11/4/19
to leo-editor
On Sat, Nov 2, 2019 at 5:16 AM rengel <reinhard...@gmail.com> wrote:
The documentation of the directives is lacking a complete @image example to display an image in viewrendered?

Rev 59c313b adds this to the VR docstring:

QQQ
- ``@image`` renders the file as an image.

    The headline should start with @image.
    All other characters in the headline are ignored.
   
    The first line of the body should be the full path to the image file.
    All other lines are ignored.
QQQ

There are extensive examples in leo/test/test.leo.

Edward

Reply all
Reply to author
Forward
0 new messages