Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anchor-like internal links with IDs #3727

Open
1 of 3 tasks
IgnacioHeredia opened this issue Aug 26, 2022 · 3 comments
Open
1 of 3 tasks

Anchor-like internal links with IDs #3727

IgnacioHeredia opened this issue Aug 26, 2022 · 3 comments
Labels
enhancement This is an enhancement to a feature of Zettlr.

Comments

@IgnacioHeredia
Copy link
Contributor

Description

Hi,

just wanted to propose an enhancement on how internal links work. I sketched my proposal in the internal links discussion, but I thought I could use a new issue. ;)

I would like that the internal links with IDs would take you not only to that file, but to the specific point in the file where the ID is located.

I feel that this would make my Zettlekasten workflow much easier, because I find myself lots of the time breaking/merging Zettels or changing section names. In this way, one would just need to place the ID next to the text I want to reference, and not matter if I change the name of the section or the name of the file or if I move the text to another file, I will be taken always to that text.

Thanks!

PD: Not sure issue the issue title is appropriate, feel free to change it.

Proposed Changes

Click on an internal link with ID [[20220826201003]] and be redirected to the file where the ID is located (could be the same file) and the specific point in that file where the ID is located.

To take into account cases where the link is below a heading, to not cut the heading out, I would center the window view in the ID.
For example:

# Some section

blabla

#### Some other section
20220826201003                                       <-- center the middle of the screen here

more blabla


Caveats

From the user point of view, I don't see any caveats, as this is consistent with current behavior.
From a technical point of view, maybe it's more computationally expensive? Without knowing how links are implemented, I'm guessing the difference would be minimal, as you only have to add a line number to that ID.

Do you Wish to Attempt Implementing this Yourself?

No

Zettlr Version

Stable (most recent version)

Your Platform

  • Windows
  • macOS
  • Linux

Operating System Version

Ubuntu 20.04

Additional Information

No response

@IgnacioHeredia IgnacioHeredia added the enhancement This is an enhancement to a feature of Zettlr. label Aug 26, 2022
@talestomaz
Copy link

I like very much this proposal and confirm it would also perfectly fit my workflow. Actually, as soon as I've learned the basics of Zettlr, this is how I assumed it worked (only to find out I was wrong :D, but I'm still enjoying the experience).

@fagoliveira
Copy link

This may be an even better solution than the one discussed in issue #3734. Many other note-taking apps have this function, and Zettlr is currently lagging behind. Linking to specific locations (or headings) within a file would tremendously improve the workflow and connectivity between different notes (i.e. the Zettelkasten method).

If I had coding experience, I would program it myself, as I think this would be very useful. Alas, I can only support this enhancement 💪🏻

@Myarlathotep
Copy link

This would be a great feature to have! I hope it gets included in a future update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is an enhancement to a feature of Zettlr.
Projects
None yet
Development

No branches or pull requests

4 participants