emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Daniel Clemente <n142857@gmail.com>
Cc: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: Custom entry IDs in HTML export
Date: Fri, 27 Mar 2009 17:16:16 +0100	[thread overview]
Message-ID: <6BF0FCBC-4343-4B8C-9A16-F4B9AC9B0F48@gmail.com> (raw)
In-Reply-To: <87myb7w2s9.fsf@CPU107.opentrends.net>

Hi Daniel,

On Mar 27, 2009, at 1:47 PM, Daniel Clemente wrote:

>
> Hi, this may have been reported before; however I didn't find it in  
> the FAQ.
>
>  I would like to choose which ID each heading will have when they  
> are exported to HTML. For instance, I want the table of contents to  
> link to the anchor #tutorials instead of #sec-1.4.1. In this way,  
> external links won't depend on the section ordering. It is also more  
> expressive semantically.
>
>  At the moment the best I know of is:
>
> ** TODO heading
> #<<target>>
>
>  This is exported as:
> : <h3 id="sec-1.1"><a name="target" id="target"></a><span  
> class="section-number-3">1.1</span> <span class="todo TODO"> TODO</ 
> span> heading </h3>
>
>  But I want:
> : <h3 id="target"><span class="section-number-3">1.1</span> <span  
> class="todo TODO"> TODO</span> heading </h3>

This would require you to assign custom targets to each and
every node.  This is why Org used generic section-number based IDs
as the basic id of the link, an provides any additional names
a anchors so that they can be targets as well. In particular, if
you give an entry an ID, this ID will also become an anchor
in the heading so that you can link to it.  I guess it does not
matter if the link points to the h3 element, or to an anchor
inside the heading right?

So you can use links with any names you like.

True, the table of contents does link to section numbers still.

I guess, with some work, we could reorganize the link storage
in a way that a user-given target of an ID become the preferred
hrefs and that section numbers will only be used when there is
not alternative.....

hmmmm.  How important is this.?

- Carsten


- Carsten


>
>
>
>  Since entries can already have IDs (I mean the property "ID",  
> obtained by C-c l for instance), this could now be easier to  
> implement.
>  As an extreme solution: If org-mode used exactly that ID to link to  
> the entry, I wouldn't mind changing the entry ID overall in my files  
> so that they have meaningful names instead of random data. Maybe I  
> wouldn't even mind having an HTML ID called b9c1a93e-2af4-4a41- 
> bfe3-8d2bd62c0614… (if it starts with a letter, it's still a valid  
> ID).
>
>
>  In case it's too complex to do this in org, do you know of some  
> script to replace the IDs after export?
>
>
>  Thanks,
>
> Daniel
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  reply	other threads:[~2009-03-27 17:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-27 12:47 Custom entry IDs in HTML export Daniel Clemente
2009-03-27 16:16 ` Carsten Dominik [this message]
2009-03-27 17:57   ` Bernt Hansen
2009-03-27 21:32     ` Sebastian Rose
2009-03-30 11:49       ` Daniel Clemente
2009-04-16  6:55         ` Carsten Dominik
2009-04-16  8:50           ` Sebastian Rose
2009-04-16 11:28             ` Carsten Dominik
2009-04-16 13:14               ` Sebastian Rose
2009-04-16 17:14                 ` Carsten Dominik
2009-04-16 20:50                   ` Sebastian Rose
2009-04-16 21:26                     ` Carsten Dominik
2009-04-16 22:37                       ` Sebastian Rose
2009-04-17  4:11                         ` Carsten Dominik

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=6BF0FCBC-4343-4B8C-9A16-F4B9AC9B0F48@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=n142857@gmail.com \
    /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).