emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [QUESTION] How to specific image size attributes under headline scop


From: Christopher M. Miles
Subject: Re: [QUESTION] How to specific image size attributes under headline scope?
Date: Tue, 23 Aug 2022 08:24:54 +0800
User-agent: mu4e 1.8.6; emacs 28.1

Timothy <orgmode@tec.tecosaur.net> writes:

> Hi Christopher,
>
>>>> I want to specify image size under headline properties. Is it possible to 
>>>> do
>>>> this?
>>>
>>> As I understand org.el, this is solely governed by
>>> `org-display-inline-image–width’, which only looks at `#+attr_*’ keywords 
>>> when
>>> setting an image width.
>>>
>>> All the best,
>>> Timothy
>>
>> Yes, what about letting org-mode support headline level image size 
>> specification?
>> Is this a good idea and easy to implement?
>
> Hmm, so would this basically be setting all images within a certain section to
> inherit a different `org-image-actual-width' / `org-latex-image-default-width'
> parameter?
>
> All the best,
> Timothy

Yes, like this:

#+begin_src org
,* headline 1

This image will be displayed in 200 width.

,#+ATTR_ORG: :width 200
,#+ATTR_LATEX: :width 2.0in
,#+ATTR_HTML: :width 200px
[[file:kk.png]]


This image will be displayed in 600 width, it has no manually specified
image size, it will use ~org-image-actual-width~.

[[file:kk.png]]

,** headline 2
:PROPERTIES:
:IMAGE-WIDTH: 500
:END:

This image will be displayed in 200 width.

,#+ATTR_ORG: :width 200
,#+ATTR_LATEX: :width 2.0in
,#+ATTR_HTML: :width 200px
[[file:kk.png]]

This image will be displayed in 500 width, it has no manually specified
image size, it will use "headline 2" scope property ":IMAGE-WIDTH: 500".
This is what I want. (I assume there is a new property which maybe named
like :IMAGE-WIDTH:.)

[[file:kk.png]]
#+end_src

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without 
misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

Attachment: signature.asc
Description: PGP signature


reply via email to

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