From: Adam Spiers <orgmode@adamspiers.org>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: named anchors in HTML export
Date: Sat, 19 Aug 2017 23:43:04 +0100 [thread overview]
Message-ID: <CAOkDyE_fSUvPbNUz8xamM1=BDT-V=Pgjgd6VTKhQKqnpOnj2rw@mail.gmail.com> (raw)
In-Reply-To: <877ey0lz5q.fsf@nicolasgoaziou.fr>
On 19 August 2017 at 09:50, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> Adam Spiers <orgmode@adamspiers.org> 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!
prev parent reply other threads:[~2017-08-19 22:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-18 21:43 named anchors in HTML export Adam Spiers
2017-08-19 8:50 ` Nicolas Goaziou
2017-08-19 22:43 ` Adam Spiers [this message]
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='CAOkDyE_fSUvPbNUz8xamM1=BDT-V=Pgjgd6VTKhQKqnpOnj2rw@mail.gmail.com' \
--to=orgmode@adamspiers.org \
--cc=emacs-orgmode@gnu.org \
--cc=mail@nicolasgoaziou.fr \
/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).