emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [BUG] manual: confusing example of adding attributes to a link (affi


From: Max Nikulin
Subject: Re: [BUG] manual: confusing example of adding attributes to a link (affiliated keywords)
Date: Sat, 25 Jun 2022 17:12:06 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1

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




reply via email to

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