From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Spiers Subject: Re: named anchors in HTML export Date: Sat, 19 Aug 2017 23:43:04 +0100 Message-ID: References: <877ey0lz5q.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47229) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djCSS-0002om-11 for emacs-orgmode@gnu.org; Sat, 19 Aug 2017 18:43:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1djCSR-0008UB-7U for emacs-orgmode@gnu.org; Sat, 19 Aug 2017 18:43:08 -0400 Received: from mail-qt0-x22d.google.com ([2607:f8b0:400d:c0d::22d]:34791) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1djCSR-0008Tt-2g for emacs-orgmode@gnu.org; Sat, 19 Aug 2017 18:43:07 -0400 Received: by mail-qt0-x22d.google.com with SMTP id b4so20997966qta.1 for ; Sat, 19 Aug 2017 15:43:05 -0700 (PDT) In-Reply-To: <877ey0lz5q.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nicolas Goaziou Cc: org-mode mailing list On 19 August 2017 at 09:50, Nicolas Goaziou wrote: > Adam Spiers 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 <> > 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, <> > doesn't create anchor, but something like id="org1234567">. Thanks Nicolas, that's super helpful!