patat icon indicating copy to clipboard operation
patat copied to clipboard

Images clears text

Open Chaman-veteran opened this issue 10 months ago • 2 comments

Here's the only slide rendered when trying to show an image within the # test section: Image

I'm using

kitty --version       
kitty 0.39.1 created by Kovid Goyal
patat --version
0.14.1.0
Using pandoc: 3.5

Chaman-veteran avatar Feb 23 '25 09:02 Chaman-veteran

This is the intended behavior.

When I first added image support to patat, the idea was to find a "common ground" in between terminal emulators, since image support varies widely. This common ground ended up being: if a slide consists only of an image, display it instead of the normal slide. The idea being that this presentation:

```
patat:
  images:
    backend: auto
...

# A text slide

Hello world

# An image slide

![](image.jpg)

Would be displayed "more or less the same" on all terminal emulators.

I guess there could be room for improving it at this point -- something like "block images", where images can be displayed alongside paragraphs and headers (though I suspect some terminal emulators won't be able to do this). Since there is reasonably good support for this now by using eval fragments to add images instead, this got de-prioritized a bit in mind.

Some thoughts in either case:

  • What size should the images be displayed at? (Do we need to do special stuff for retina displays?)
  • Should the images be centered when margins are set to auto?

jaspervdj avatar Feb 25 '25 09:02 jaspervdj

Oh, ok. As you say I think that "block images" would be neat!

Should the images be centered when margins are set to auto?

Would it be possible to add a different config for margins intended for images and text? If so it wouldn't be much of an importance as to what it is by default wouldn't it?

What size should the images be displayed at? (Do we need to do special stuff for retina displays?)

To be fair I don't know anything on terms and retina display :/

Chaman-veteran avatar Feb 26 '25 18:02 Chaman-veteran