ahrm / sioyek

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

Syncing #1012

Open aloispichler opened 7 months ago

aloispichler commented 7 months ago

Syncing (forward search from LaTeX) to Sioyek will always move the window so that the highlighted text is centered. This is distracting. Is it possible to avoid recentering, if the highlighted text is visible on the screen, without moving the window? That is: do not recenter, if not necessary (as evince).

ahrm commented 7 months ago

This was already the case when using use_ruler_to_highlight_synctex_line, I also added a dont_center_if_synctex_rect_is_visible option for the other cases in https://github.com/ahrm/sioyek/commit/497b7f9ff93f371b375dceac68704900adf49d08.

aloispichler commented 7 months ago

Puh, this app and its maintainance is extraordinary. Looking forward to seeing this in a new release on Arch.

aloispichler commented 7 months ago

I have downloaded and built the git now. I assume I have to set this option in ~/.config/sioyek/prefs_user.config. But what is the syntax to set the option?

ahrm commented 7 months ago

Note that you need to build the development branch and not the main branch. The syntax is something like this:

dont_center_if_synctex_rect_is_visible 1
aloispichler commented 7 months ago

Thank you. Compiling the development branch on my end gave me an error, so I will wait for the next release to enjoy this feature.

Evince tries to scroll the window as little as possible. That is:

Further, when syncing, I think the cursor should follow the sync-line on the pdf.

Thank you for your efforts and regards.