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

[Feature Request] Sort annotations by location within the text #95

Closed
JBrandonS opened this issue Dec 20, 2022 · 1 comment
Closed

[Feature Request] Sort annotations by location within the text #95

JBrandonS opened this issue Dec 20, 2022 · 1 comment

Comments

@JBrandonS
Copy link

Zotero annotations seem to be placed in obsidian at random, or at least in no clear order. I think it would be very useful, and the expected behavior, to have these sorted by location within the text.

Below, I have this code for the zt-annots.eta file which appears to sort everything correctly but I have not confirmed that same page annotations are sorted by location within the page, if anyone has a better script that would be great.

As it stands I'd recommend the default template for zt-annots.eta be changed to do this:

<% it.sort((a,b) => (a.pageLabel - b.pageLabel)).forEach(function(annotation) { %>
<%~ include("annotation", annotation) %>
<% }) %>
@aidenlx
Copy link
Member

aidenlx commented Mar 24, 2023

Fixed in latest 1.0.0 plugin

@aidenlx aidenlx closed this as completed Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants