ahrm / sioyek

Sioyek is a PDF viewer with a focus on textbooks and research papers
https://sioyek.info/
GNU General Public License v3.0
6.99k stars 231 forks source link

Smart Jump does not always work #102

Open alfureu opened 2 years ago

alfureu commented 2 years ago

I have a PDF with a reference (Doe 2021; AABBCC 2020). When I middle-click on the Doe 2021, it does not take me to the references, but to GScholar directly. Is this a bug or the smart jump works only with references in squared brackets?

ahrm commented 2 years ago

Yes, it currently only works with references in square brackets.

alfureu commented 2 years ago

I see, do you think it would be possible to implement also to the references in my example? I do not know what method you use for identifying such references, but I guess a regexp might work finding these too...

ahrm commented 2 years ago

I see, do you think it would be possible to implement also to the references in my example? I do not know what method you use for identifying such references, but I guess a regexp might work finding these too...

Yes, I do plan to make this feature work with more types of documents. I already use a regexp-based heuristic. However, adding this is not completely trivial, because for example some documents use this parentheses syntax to refer to equations and adding a naive implementation would break those documents.

alfureu commented 2 years ago

Fully aware of the challenging task. This functionality would be great for humanities and social sciences 👍

In any case, thank you for the excellent and blazing fast software. Keep up the good work!

quickfold commented 2 years ago

+1, thanks. I'm also in the humanities and they don't use square brackets for references, so I can't use this feature, which is the one that would make Sioyek most useful for me over other pdf software. A possible solution is to look for text strings within parentheses that are at least 3-4 letters long, which I assume wouldn't match most equations. Or, look in parentheses for math operators to check if it's a formula, since ordinarily references won't have any math operators in them (at least in the humanities!).