3

I set up vim to automatically recompile a .tex to .pdf, so I can preview it in zathura. However each time it recompiles there's a slight flicker which I find annoying. I set the option render-loading to false, but it still flickers. Since most of the pdf will be the same it would make sense that the transition would be from how it looked before the edit to immediatly after, without a white page flicker in between.

What's the best way to accomplish this? There doesn't seem to be a option in zathura for this, and I don't know much about manipulating screen output.

(I am using i3wm on arch linux).

  • See also [latex - Windows PDF viewer that auto-refreshes PDF when compiling with pdflatex - Super User](https://superuser.com/questions/337011/windows-pdf-viewer-that-auto-refreshes-pdf-when-compiling-with-pdflatex) for different options. ■ See also [Remove flickering during pdf refresh when compiling latex with pandoc - Stack Overflow](https://stackoverflow.com/questions/47836764/remove-flickering-during-pdf-refresh-when-compiling-latex-with-pandoc) // [Is it possible to make okular not flash when reloading a file? - Unix & Linux Stack Exchange](https://unix.stackexchange.com/q/281603) – user202729 Feb 25 '23 at 16:11
  • I think mupdf doesn't flash (or it's much less noticeable) [pdf - How to make mupdf automatically refresh a document - Unix & Linux Stack Exchange](https://unix.stackexchange.com/questions/425907/how-to-make-mupdf-automatically-refresh-a-document) – user202729 Mar 25 '23 at 14:12

1 Answers1

0

Setting render-loading to false will have the effect of not displaying "Loading..." during zathura's rendering phase, but won't prevent zathura from displaying a blank page during this time.

You should instead set the background color of the zathura application when it renders a page via the option render-loading-bg. This option is available since zathura-0.2.2.

For instance, if you want the rendering background color to be #0f111a, you should add the line

set render-loading-bg "#0f111a"

to your zathura configuration file.

Reference: https://www.systutorials.com/docs/linux/man/5-zathurarc/#lbCP

  • 1
    I don’t think this is the answer to the problem. The problem is not the colour of the page during the reload but the fact that the letters are gone for a fraction of a second. – Torsten Bronger Oct 27 '20 at 19:49