I am working on a LaTeX document using Atom editor with the atom-latex package and wish to use Zathura PDF to preview my output. It works fine but whenever I build, it will open a new instance of the pdf file. If I use evince it simply refreshes the file and keeps the output only to one instance. I am on Antergos Linux (Arch Derivative).
1 Answer
Create the file /usr/local/bin/zathura.sh, and fill it with this content :
#!/bin/bash
killall zathura 2>/dev/null
zathura
And make it executable with this command : sudo chmod +x /usr/local/bin/zathura.sh.
Now go to your atom-latex settings in your atom editor (edit -> preferences -> packages -> latex -> settings) and change the value of Opener to custom, and put inside Custom PDF Viewer Path this line /usr/local/bin/zathura.sh.
Now each time you build, the previous instance of zathura will close, and a new instance will be opened with your new pdf file in it.
It's not a perfect approach, but it will do the trick until the devs of atom-latex will add the support to zathura (I just submitted an issue in github here).
Edit
The devs of atom-latex just accepted my request, and said that the support will be added in the next version, so you just have to wait a little bit. You can see the request here : https://github.com/thomasjo/atom-latex/issues/324.
If you have a github account, you can encourage the devs by giving a star to atom-latex project.
-
Just what I needed! They have upgraded the package to support Zathura. It works great!1028– 10282017-01-02 20:01:38 +00:00Commented Jan 2, 2017 at 20:01
mupdf, it checks whether the process/filename is open or not.