-
Notifications
You must be signed in to change notification settings - Fork 407
Synctex doesn't work properly on Mac (Zathura or Skim) #2889
Description
Description
Nvim + vimtex + Zathura once worked fine in my mac. However recently, after I upgraded system and switch to Nvim + lazy.nvim, they don't work properly now. I tried not to use lazy features for Vimtex after I read the help doc. I also tried to use minimal.vim, the problem still exists.
The current status is after I type <leader>ll or <leader>lv, it can open Zathura/Skim to display the PDF. But the sync doesn't work as expected.
For Zathura (which I mainly use), it reports "VimTex: Viewer cannot find Zathura window ID!" I already read related issues in history. Basically, the issue still exists, which is xdotool can find no id of zathura. So I switch the method to "zathura_simple", then the error disappears as expected. Now here are the sync problems:
-
Forward search is not automatic/continuous. I remember the viewer (Zathura) was able to focus on the point where the cursor was at in the tex file being edited. However, now, I have to manually trigger the forward search by type
<leader>lvevery time. I mean it can sync, but not continuously/automatically. -
Inverse search doesn't work at all. the cursor is not able to relocate in the editor after I select/click the text here and there in the pdf viewer Zathura.
If you could shed some light on this, I would really appreciate. Thanks in advance.
Steps to reproduce
:checkhealth vimtex
VimTeX ~
- OK Vim version should have full support!
- OK Zathura should work properly!
- OK Compiler should work!
nvim Lua configuration
{
'lervag/vimtex',
config = function()
vg.vimtex_view_method = 'zathura_simple'
-- vg.vimtex_view_method = 'skim'
end,
enabled = vg.vimrclevel > 3
},Expected behavior
No response
Actual behavior
No response
Do you use a latexmkrc file?
~/.latexmkrc
push @generated_exts, "cb";
push @generated_exts, "cb2";
push @generated_exts, "spl";
push @generated_exts, "nav";
push @generated_exts, "snm";
push @generated_exts, "tdo";
push @generated_exts, "nmo";
push @generated_exts, "brf";
push @generated_exts, "nlg";
push @generated_exts, "nlo";
push @generated_exts, "nls";
push @generated_exts, "synctex.gz";
push @generated_exts, "run.xml";
$pdflatex = "xelatex -synctex=1 %O %S";
$pdf_mode = 5;
$dvi_mode = 0;
$postscript_mode = 0;VimtexInfo
System info:
OS: macOS 12.7.2 (21G1974)
Vim version: NVIM v0.9.5
Has clientserver: true
Servername: /var/folders/2k/r2yhqxdj0d54j8k7_wp94xj80000gn/T/nvim.rabbit/w5G7fI/nvim.20856.0
VimTeX project: cv
base: cv.tex
root: /Users/rabbit/Documents/sci/cv
tex: /Users/rabbit/Documents/sci/cv/cv.tex
main parser: current file verified
document class: article
packages: atbegshi atbegshi-ltx atveryend atveryend-ltx auxhook bigintcalc bitset enumitem etexcmds etoolbox expl3 fontenc fontspec fontspec-xetex geometry gettitlestring hycolor hyperref iftex ifvtex infwarerr intcalc keyval kvdefinekeys kvoptions kvsetkeys letltxmacro ltxcmds nameref parskip pdfescape pdftexcmds refcount rerunfilecheck stringenc uniquecounter url xcolor xparse
compiler: latexmk
engine: -xelatex
options:
-verbose
-file-line-error
-synctex=1
-interaction=nonstopmode
callback: 1
continuous: 1
executable: latexmk
job:
jobid: 7
output: /var/folders/2k/r2yhqxdj0d54j8k7_wp94xj80000gn/T/nvim.rabbit/w5G7fI/0
cmd: max_print_line=2000 latexmk -verbose -file-line-error -synctex=1 -interaction=nonstopmode -xelatex -pvc -pvctimeout- -view=none -e '$compiling_cmd = ($compiling_cmd ? $compiling_cmd . " ; " : "") . "echo vimtex_compiler_callback_compiling"' -e '$success_cmd = ($success_cmd ? $success_cmd . " ; " : "") . "echo vimtex_compiler_callback_success"' -e '$failure_cmd = ($failure_cmd ? $failure_cmd . " ; " : "") . "echo vimtex_compiler_callback_failure"' 'cv.tex'
pid: 20860
viewer: Zathura
cmd_start: zathura -x "/Users/rabbit/rmac.local/neovim/bin/nvim --headless -c \"VimtexInverseSearch %{line} '%{input}'\"" --synctex-forward 57:8:'/Users/rabbit/Documents/sci/cv/cv.tex' 'cv.pdf'&
qf method: LaTeX logfile