From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [BUG] manual: confusing example of adding attributes to a link (affiliated keywords)
Date: Sat, 25 Jun 2022 17:12:06 +0700 [thread overview]
Message-ID: <t96n1p$hv9$1@ciao.gmane.io> (raw)
In-Reply-To: <87zgi1ux8m.fsf@localhost>
On 25/06/2022 12:29, Ihor Radchenko wrote:
> Max Nikulin writes:
>
>>> #+ATTR_HTML: :title The Org mode homepage :style color:red;
>>> [[https://orgmode.org]]
>>
>> Likely I have seen similar suggestions in this list as well.
>>
>> Actually it assigns attribute to paragraphs in addition to links. That
>> is why, I think, this fragment should be removed from manual as a
>> confusing one since it gives impression of support of per-link attributes.
>
> Could we clarify that the attributes will apply to the paragraph instead?
While paragraph is short, title is just redundant. When it contains a
lot of text, the link title duplicated as a paragraph attribute becomes
misleading since the title is applicable to link text only. When there
are more than one object, it is impossible to set different titles to
links or mark rel="noreferrer nofollow" only one link, keeping other as
regular ones.
Certainly it is possible to document that attributes are mostly useful
for image links when they are block-level elements rather than inline
objects. Caveats of trying to use attributes for inline objects should
be clearly stated to avoid false expectation of supported feature.
>> It states that styles and similar stuff may solve the issue with
>> attributes for inline objects. From my point of view it is wrong and in
>> some cases per-object attributes are necessary. While <a rel="nofollow
>> noreferrer" href="..."> or <a target="_blank" href="..."> may be added
>> through style, attributes like "alt" for images, "title", "lang", etc.
>> for links are individual.
>
> You examples are pretty much dedicated to html. Do you know if
> per-object attributes could be actually useful for other export
> backends?
The following example is somewhat contrived. Try to set different
options (width or e.g. angle) for several inline images. It applies to
LaTeX as well:
#+attr_latex: :center nil :options angle=30 :width 16mm
[[file:/usr/share/icons/hicolor/48x48/apps/emacs.png]]
and
[[file:/usr/share/icons/hicolor/48x48/apps/emacs.png]]
# second one should have angle=-30
next prev parent reply other threads:[~2022-06-25 10:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-20 16:25 [BUG] manual: confusing example of adding attributes to a link (affiliated keywords) Max Nikulin
2022-06-25 5:29 ` Ihor Radchenko
2022-06-25 10:12 ` Max Nikulin [this message]
2022-06-25 10:39 ` Ihor Radchenko
2022-06-25 11:55 ` Max Nikulin
2022-06-25 12:17 ` Ihor Radchenko
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='t96n1p$hv9$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).