[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] named anchors in HTML export
From: |
Adam Spiers |
Subject: |
Re: [O] named anchors in HTML export |
Date: |
Sat, 19 Aug 2017 23:43:04 +0100 |
On 19 August 2017 at 09:50, Nicolas Goaziou <address@hidden> wrote:
> Adam Spiers <address@hidden> writes:
>> I was also expecting to be able to use #+NAME: foo in front of a
>> headline
>
> You cannot use a NAME keyword to a headline (or an inlinetask).
> CUSTOM_ID is morally equivalent, though.
>
>> or even other elements like paragraphs, but this doesn't
>> work. Is this a bug, or am I misreading the manual?
>
> Currently, "ox-html" doesn't create an anchor for named paragraphs,
> unless the paragraph consists of an image only.
>
> However, you can put targets anywhere in a paragraph using <<target>>
> syntax.
>
>> Is there any way of creating an anchor for an arbitrary element,
>> short of some ugly "+HTML" hack?
>
> Note that internal references are... internal. You can use them across
> documents only when using Org publishing mechanism. IOW, <<target>>
> doesn't create <a id="target"></a> anchor, but something like <a
> id="org1234567"></a>.
Thanks Nicolas, that's super helpful!