emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Anchors/targets in org-export/publish


From: Carsten Dominik
Subject: Re: [Orgmode] Anchors/targets in org-export/publish
Date: Sun, 16 Nov 2008 21:29:05 +0100


On Nov 13, 2008, at 5:36 PM, Matthew Lundin wrote:


Question about org-export:

I'd like to create invisible radio targets to html anchor links using
org-export.

E.g.,

# <<radiotarget>>

should become

<a name="radiotarget"></a>

Currently, however, there are a couple of behaviors of org-exp.el that
make this difficult.

1) Org-export does convert invisible targets, but it puts paragraph
tags around the anchor, thus creating an empty line in the html
export, which messes up the layout.

        <p>
        <a name="radiotarget">&nbsp;</a>
        </p>

Hmmm, admittedly, this is not pretty.



2) If the commented radio target is directly beneath or above a
headline, it is not exported. I checked org-exp.el and this seems to
be an intentional behavior. I'm not sure I understand the reasons
behind this, as it prevents one from giving custom anchors to
headlines.

This is especially important if one wants to be able to create
permalinks to headlines from other pages.

Yes, can see that this application makes sense. However, the reason why I am using the target of the headline instead is because I would like the anchor to match at the headline directly. I could, probably, use the specified target instead of the sec-... id, but that also feels inconsistent. Hmmm, I need to think more about this.

I just checked how Muse handles this. When they have an anchor directly above a headline, the anchor is inserted into the definition of the headline. Maybe we can do something like this.

- Carsten





reply via email to

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