>> Currently the value of `org-image-align' or of the `:align' attr_* >> keyword is respected when previewing images in the following two >> situations: >> >> [...] >> > > These two situations are the same - standalone image in a paragraph. > The second example is _two_ paragraphs. (affiliated keywords force-start > a new paragraph)
Thanks for the clarification. > Sure. Because it works for both inline and standalone images, unlike > org-image-align: > > org-image-align is a customizable variable defined in ol.el. > ... > Documentation > How to align images previewed using org-link-preview-region. > > Only stand-alone image links are affected by this setting. These > are links without surrounding text. I'm aware that only standalone image links are supported -- my question was if we should change this behavior. >> Should we support image alignment in case 3? >> >> The only situation in which I can see this being undesirable is when you >> have hard-wrapped/filled lines and the image link coincidentally ends up >> on its own line. In this case it doesn't make sense for the image >> preview to respect `org-image-align'. There might be other syntactical >> reasons why supporting case 3 doesn't make sense, so I am asking here. > > Maybe. Or not. > > Alignment is intersecting its syntax with export. > But export will only align truly standalone images. > There will be no notion of "image in a line of its own in the middle of > paragraph" This is another factor I hadn't considered. > Also, what would you do if there are multiple images like that or when > the purpose of :align attribute is to align the whole paragraph? > > Consider something like > > # Align the whole paragraph > #+attr_html: :align center > Paragraph with inlined > [[file:image.png]] > image and > [[file:image2.png]] > another one. In this case no alignment rule would be applied to the image. I didn't realize that Some text in a paragraph, #+attr_org: :align center [[file:/path/to/file]] followed by more text is considered two paragraphs, and that the affiliated keyword applies to the second paragraph and not just the link at the start of the second paragraph. So my proposal isn't consistent. Please close this bug/issue. Karthik