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

Over highlights #745

Open Mickychen00 opened 1 year ago

Mickychen00 commented 1 year ago

I originally wanted to highlight only the selected portion, but in many documents, the entire line where the selection is located gets highlighted. What should I do in this case?

ahrm commented 1 year ago

Does adding this to your prefs help? :

exact_highlight_select 1
Mickychen00 commented 1 year ago

Hi, yes it works! Will it be a default setting in sioyek's future version? I think it's a common demand for most of users. And I didn't found this config in the doc through searching.

ahrm commented 1 year ago

There is a pull request about this which probably will be included in the next version of sioyek: https://github.com/ahrm/sioyek/pull/742 .

Mickychen00 commented 1 year ago

Thanks a lot! One more question: Is there a function or method to export my highlights from a specific document not the whole highlights database?

ahrm commented 1 year ago

If you mean into a json file then no, currently there is no way to do that. However, you can use the embed annotations extension to embed the sioyek annotations into current PDF file.

Mickychen00 commented 1 year ago

OK. Will there be a function about it in the future? In terms of highlights, I often highlight some words or sentences to further memorize. If we can export these highlights to text, csv or some filetypes else, I think it will be wonderful. Is it a technical obstacle for this function? Or doesn't it fit Sioyek's philosophy?

ahrm commented 1 year ago

Is it a technical obstacle for this function? Or doesn't it fit Sioyek's philosophy?

No I just didn't think it would be necessary since you can just extract the highlights from the global export file. It will probbaly be added in the next version.

Mickychen00 commented 1 year ago

Thanks a lot. To be honest, a global export file using json may be a little geeky for basic users despite knowing something about vim actions. A markdown version of the exportation for the highlights or text in a single pdf file may be user-friendly. An awesome reader.

paulbrodersen commented 3 months ago

I often highlight some words or sentences to further memorize. If we can export these highlights to text, csv or some filetypes else, I think it will be wonderful.

For a while I used an emacs macro to edit the JSON down to the desired highlight descriptions. Eventually, though, I made a small python script instead. Gist available here.