Display imges like org-mode #32
Replies: 3 comments 3 replies
-
|
It's surely possible. It's not necessarily something adoc-mode needs to handle though. I'm using the excellent math-preview mode to get equations to show inline, and images are probably a bit easier. Mostly all that was required for that package was defining regex to match the block format used for inline stem and latexmath blocks (and a bug report to allow regex matching for that latter, but that's done). It would be ideal for a separate package to handle images, it can work for any markup not just asciidoc. |
Beta Was this translation helpful? Give feedback.
-
|
I did a little bit more digging. There's already such a mode in emacs, called iimage. I got it to work by defining a regex for image:: blocks and adding an image search path. It's pretty basic though, either display all images or not, and no control over positioning. |
Beta Was this translation helpful? Give feedback.
-
|
I am not able to preview the images, neither by issuing Basically, this is the syntax I have: image:__assets/image.png[my image]The image itself is readable in that directory. I tried opening emacs from the directory where my If I generate the HTML or PDF, or even open the .adoc file itself on Firefox (with the asciidoctor preview extension), in all those cases, the image displays correctly. Therefore, I don't think it is a problem with the image path or something like that. And by the way, I can open the images and seen them if I visit the image with Emacs, or on org-mode, for instance, so I don't think the problem is my Emacs build missing some feature or compilation flag. The messages buffer shows no indication of a problem, and I see no errors whatsoever. I'm running Emacs 29.4 from the official repos on Arch Linux. Any ideas what could be the problem or how I could debug this further? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Would it be possible to implement image display/preview like in Org-mode? For example, whenever we have some markup like this:
Then it would somehow hide the text and in place of that display the image itself?
It seems Emacs has the ability to hide characters and display some other thing instead. Org-mode does this for markers with
org-hide-emphasis-markers, and also does something nice with links, etc.So, Emacs should be able to support this. My question relates more to adoc-mode. Would it be feasible to implement this idea in this package? Would it be useful/interesting?
Beta Was this translation helpful? Give feedback.
All reactions