From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Fix regex for determining image width from attribute
Date: Thu, 9 May 2024 17:47:49 +0700 [thread overview]
Message-ID: <v1i9kp$sgn$1@ciao.gmane.io> (raw)
In-Reply-To: <875xvoshex.fsf@localhost>
[-- Attachment #1: Type: text/plain, Size: 1139 bytes --]
On 08/05/2024 17:54, Ihor Radchenko wrote:
> Max Nikulin writes:
>
>> #+attr_html: :alt Image width test
>> #+attr_beamer: :width \linewidth
>> #+attr_latex: :width +.5\textwidth
>> #+attr_md: :width 75%
>> [[file:babelfish.png]]
>>
>> - I do not mind that just "\linewidth" is ignored.
>> - The case of "+.5" should either be supported or at least documented
>> since it is a valid floating number.
>
> Was it supported before?
No. It is my expectation based on earlier discussions that fractional
numbers were added namely for LaTeX. I used leading dot in
\includegraphics[width=...]{}, so I was surprised that Org ignores it.
Explicit "+" is just generalization, this form is supported by LaTeX and
elisp.
>> - It is really confusing that #+attr_html casts shadow on #+attr_md.
>
> No, it is not. I see no reason to prioritize markdown attributes.
Above #+attr_html does not specify :width while #+attr_md has a valid
value. It is the reason why I do like current behavior.
>>> +++ b/etc/ORG-NEWS
>>
>> I think, it is better to avoid "is ignored" here.
>
> May you convert your suggestion into a patch?
See the attachment.
[-- Attachment #2: 0001-ORG-NEWS-Reword-inline-image-width-note.patch --]
[-- Type: text/x-patch, Size: 1472 bytes --]
From 7bc9d909867bf2f99a77d5d1554cd41e4fc664ae Mon Sep 17 00:00:00 2001
From: Max Nikulin <manikulin@gmail.com>
Date: Thu, 9 May 2024 17:32:54 +0700
Subject: [PATCH] ORG-NEWS: Reword inline image width note
* etc/ORG-NEWS: Avoid possible confusion related to
"#+attr_org: :width" example.
---
etc/ORG-NEWS | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 3c597db40..a34307295 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -15,16 +15,16 @@ Please send Org bug reports to mailto:emacs-orgmode@gnu.org.
** Important announcements and breaking changes
*** Inline image width value in =#+attr_org= is preferred over other =#+attr_...= keywords
-Previously, when ~org-image-actual-width~ is a list, Org used the
+Previously, when ~org-image-actual-width~ is a list or nil, Org used the
first =#+attr_...= keyword containing =:width ...= to compute the inline
-image width:
+image width. Now, =#+attr_org=, if present, takes precedence.
+In the following example the image preview has width of 75%
+while earlier versions pick 33%.
-: #+attr_html: :width 30%
-: #+attr_org: :width is ignored
+: #+attr_html: :width 33%
+: #+attr_org: :width 0.75
: [[image.png]]
-Now, =#+attr_org=, if present, takes precedence.
-
*** =ox-html=: When exporting footnotes with custom non-number names, the names are used as link anchors
Previously, link anchors for footnote references and footnote
--
2.39.2
next prev parent reply other threads:[~2024-05-09 10:48 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-21 19:08 [PATCH] Fix regex for determining image width from attribute Matt Huszagh
2021-11-21 19:20 ` Timothy
2021-11-21 19:51 ` Matt Huszagh
2021-11-22 8:29 ` Timothy
2021-11-22 16:11 ` Matt Huszagh
2021-11-22 17:54 ` Timothy
2021-11-22 20:53 ` Matt Huszagh
2021-11-23 4:59 ` Kyle Meyer
2021-11-23 5:14 ` Timothy
2021-11-23 5:38 ` Matt Huszagh
2021-11-23 5:39 ` Timothy
2021-11-23 7:46 ` Matt Huszagh
2021-11-23 16:44 ` Max Nikulin
2021-11-24 1:57 ` Matt Huszagh
2021-11-24 14:48 ` Max Nikulin
2021-11-24 15:59 ` Matt Huszagh
2021-11-24 17:00 ` Max Nikulin
2021-11-25 16:43 ` Max Nikulin
2021-11-29 0:23 ` Matt Huszagh
2021-11-29 5:13 ` Timothy
2021-12-01 3:24 ` Matt Huszagh
2021-12-01 4:54 ` Timothy
2021-12-03 2:06 ` Matt Huszagh
2024-05-02 16:28 ` Ihor Radchenko
2024-05-07 4:59 ` Karthik Chikmagalur
2024-05-08 10:36 ` Max Nikulin
2024-05-08 10:54 ` Ihor Radchenko
2024-05-09 10:47 ` Max Nikulin [this message]
2024-05-13 12:42 ` Ihor Radchenko
2024-05-13 12:42 ` Ihor Radchenko
2021-11-29 12:15 ` Max Nikulin
2021-11-22 14:30 ` Max Nikulin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='v1i9kp$sgn$1@ciao.gmane.io' \
--to=manikulin@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).