← Back to team overview

zim-wiki team mailing list archive

Re: Anchors for links?

 

Thanks Dan -

Yes it's comprehensible, though implementation of implicit anchors
might be complex. The issues mentioned could be just the tip of the
iceberg. For instance, what happens when someone changes the text of a
heading which is serving as an anchor?

Since Zim uses plain text files, any implicit data may need to be
stored explicitly.

I'd love it If the details turn out to be easier than I imagine. Will
check full details in the tracker item, which Jaap linked to, after I
make more progress on the folding feature.

Regards,
Marc

On 11/26/12, Dan Lessner <dan.lessner@xxxxxxxxxx> wrote:
> Hi,
> my idea was exactly that the user would not need to specify the anchor
> at all, every heading would implicitly behave as one.
>
> Let's say that a part behind # aims to an anchor. When resolving a link,
> Zim would check "explicit anchors" and then headings (therefore
> implicit, and maybe unwanted, heading-anchors can be overriden). Perhaps
> a higher level heading could have the priority, if there are more with
> the same name. Anyway, if one want to avoid trouble with linkiong to
> duplicate headings, he can always add an explicit anchor. I would
> consider duplicate headings as the user's responsibility, Zim would
> simply use the first one on the highest level.
>
> The point is to have the possibility to write e.g. :SomePage#Summary,
> which would point us to the content under the heading "Summary". And we
> did not have to put an anchor manually anywhere, it would work by magic :-)
>
> When needed, we could still insert a "true" anchor into the page, let's
> say near an image, and then link :ThatPage#RelatedImage.
>
> Is that comprehensible?
>
> Dan


References