Zim

Comment 11 for bug 380844

Revision history for this message
Jiří Janoušek (fenryxo) wrote :

I'm interested in this feature so I could try to implement it. I have summarized the current discussion and included my ideas. Let's create implementation draft.

* Anchors for headings only (may be extended in the future)
* Unique within page.

Syntax:
* Anchor definition: === Heading === #AnchorName
* Link to anchor: Foo:Bar#AnchorName
* Anchor name: same characters as page name (except :) or more strict?

Backend:
* All code operating with links has to be modified to support anchors.
* List of anchors for each page should be cached.

GUI:
* Insert/Edit link dialog should offer anchor names if link contains #
* Heading with anchor should be (optionally) marked. How? Small anchor image or a special character (★)?
* List of anchors of the current page. Located in status bar like back-links menu?

Export:
* HTML: Attribute "id" ("name" is deprecated), encode invalid characters.
* Latex: ?

Issues:
* How to deal with anchors when pieces of text move to a different page? I think this is not a blocker-issue for this feature, therefore initial implementation could just ignore missing anchor.