[Top][All Lists]

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

[PATCH] Justify/align image previews in org-mode

From: Karthik Chikmagalur
Subject: [PATCH] Justify/align image previews in org-mode
Date: Sun, 17 Dec 2023 13:19:00 -0800


This patch allows image link previews in Org to be left-aligned, centered or 
right-aligned in the Emacs window.  "Inline" images that are surrounded by text 
are unaffected.  Here is an example of what this looks like:

Image: https://abode.karthinks.com/share/org-image-align.png

The alignment is persistent as the window (or frame) is resized:

Video demo: https://abode.karthinks.com/share/org-image-align-demo.mp4

Alignment can be set globally for all image previews using the (new) user 
option `org-image-align'.  It can be set locally for each image link using the 
`:align' parameter of the `#+attr_org' affiliated keyword, for example:

#+attr_org: :width 400px :align center

Allowed values for both settings are `center', `justify' and `right'.  Center 
and justify have the same effect, and a value of `left', while not an error, 
does nothing since this is the default behavior.

This patch does not update org-manual.org since it is a work in progress.  
Please let me know if you have suggestions.


Attachment: 0001-org-image-align.patch
Description: Text Data

reply via email to

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