Image(s) not showing
Spreadcat opened this issue · 2 comments
Hei,
I'm trying to include an image into a presentation:
# H1 header
## Some H2
---
## Another H2
![](./images/local_deployment_flow.png)
A nice image
---
## A third H2
Some more content
The file is placed here:
$ tree .
.
├── presentation.md
└── images
└── local_deployment_flow.png
I've installed the following packages:
$ rpm -qa | grep w3m
w3m-0.5.3-55.git20220429.fc36.x86_64
w3m-img-0.5.3-55.git20220429.fc36.x86_64
and configured ~/.patat.yaml
like this:
$ cat ~/.patat.yaml
---
slideLevel: 2
wrap: true
images:
backend: 'w3m'
path: '/usr/libexec/w3m/w3mimgdisplay'
margins:
left: 20
right: 20
The file w3mimgdisplay
is correctly placed:
$ ls -l /usr/libexec/w3m/w3mimgdisplay
.rwxr-xr-x. root root 32 KB 2022-05-01 01:29:33 +0200 /usr/libexec/w3m/w3mimgdisplay
The output is still an unparsed markdown string:
![](./images/local_deployment_flow.png)
From my initial investigation it seems it breaks the second I add some more content to a slide than just the image.
That took me quite some time to figure out.
My suggestion: Either should the documentation point this out (e.g. do not mix content and images!), or it should work/thrown an error message.
Let me know if there's anything else I can help with.
Thanks creating the issue! Patat needs to support many different terminals; some of which can display images but they all do it in slightly different ways. This is why I only chose to support the single most common use case for now: displaying an image on the entire slide.
It is (badly) mentioned in the README:
Lines 576 to 578 in 8359d7a
Should we make this a bit more clear? How about:
patat
can display full-size images on slides. For this to work, the slide
needs to contain only an image an no other content. The image will
be centered and resized to fit the terminal window.
images
must be explicitly enabled in the configuration; it is off by default.