emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: When src block result is an image, how to define caption, html and l


From: Ihor Radchenko
Subject: Re: When src block result is an image, how to define caption, html and latex attributes ?
Date: Tue, 09 Apr 2024 17:13:01 +0000

Sébastien Gendre <seb@k-7.ch> writes:

> Example, before regenerate the source block result:
>
>
>
> #+CAPTION: Test image
> #+HTML_ATTR: :width 30px
> #+RESULTS:
> [[file:images/simple-test.png]]

You have a typo in one of the affiliated keywords.
Should be

#+ATTR_HTML: :width 30px

#+HTML_ATTR: is a very different construct - a full keyword rather than
affiliated keyword. So Org mode sees your

#+CAPTION: Test image
#+HTML_ATTR: :width 30px

and then 

#+RESULTS:
[[file:images/simple-test.png]]

as two separate paragraph-like elements, while babel is only looking at
the first following elements for an existing result when the block is
not named.

P.S.

We should really indicate the difference between normal and affiliated
keywords better.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]