emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Org-syntax: Intra-word markup


From: Max Nikulin
Subject: Re: Org-syntax: Intra-word markup
Date: Thu, 3 Feb 2022 19:10:19 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

On 03/02/2022 03:01, Juan Manuel Macías wrote:
Max Nikulin writes:

ATTR_X attributes are supported for links as well, see
info "(org) Links in HTML export"
https://orgmode.org/manual/Links-in-HTML-export.html
However it is rather verbose, may have problems with LaTeX, and I am
unsure if they can be accessed from export link handlers

Yes, I know. I use a lot in my blogs constructions of this type:

#+ATTR_HTML: :target _blank
some link...

I just have realized that example in the manual does not work. I will start a new thread. Attributes are assigned to paragraph, not to the link:

#+ATTR_HTML: :title The Org mode homepage :style color:red;
[[https://orgmode.org]]

<p title="The Org mode homepage" style="color:red;">
<a href="https://orgmode.org"; title="The Org mode homepage" style="color:red;">https://orgmode.org</a>
</p>

But, as far as I know, its use is line-oriented. I mean, you can't use
multiple ATTR_X constructs inside a paragraph and for different links
inside the paragraph.

Thank you, I confused issues related to export when keywords and export blocks are used. For some reason I believed that affiliated keywords have a dedicated section in https://orgmode.org/worg/dev/org-syntax.html because they can be applied to inline objects, but you are right, they set property for next block-level element.

Attributes from several lines are combined however.

The following snippets illustrates bugs in LaTeX exporter that I remember from an earlier discussion:

---- >8 ----

This is a single paragraph in LaTeX export, but 3 HTML paragraphs.
First link (with =rel= attribute) is to
#+attr_html: :rel nofollow :title Org Mode web site
[[https://orgmode.org/][Org Mode]].
Another one is to
#+attr_html: :rel noopener
#+attr_html: :title GNU web site
[[https://www.gnu.org/][GNU]]. Both links have =title= HTML attributes.

This is single paragraph in HTML
@@odt:@@
but 2 paragraphs in LaTeX.

---- 8< ----

This is a single paragraph in \LaTeX{} export, but 3 HTML paragraphs.
First link (with \texttt{rel} attribute) is to
\href{https://orgmode.org/}{Org Mode}.
Another one is to
\href{https://www.gnu.org/}{GNU}. Both links have \texttt{title} HTML attributes.

This is single paragraph in HTML

but 2 paragraphs in \LaTeX{}.

---- >8 ----

<p>
This is a single paragraph in LaTeX export, but 3 HTML paragraphs.
First link (with <code>rel</code> attribute) is to
</p>
<p rel="nofollow" title="Org Mode web site">
<a href="https://orgmode.org/"; rel="nofollow" title="Org Mode web site">Org Mode</a>.
Another one is to
</p>
<p title="GNU web site" rel="noopener">
<a href="https://www.gnu.org/"; title="GNU web site" rel="noopener">GNU</a>. Both links have <code>title</code> HTML attributes.
</p>

<p>
This is single paragraph in HTML

but 2 paragraphs in LaTeX.</p>




reply via email to

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