Closed CCandle closed 4 months ago
By the way, it's nothing todo with the build_dir
. Things will go the same if I set 'build_dir': ''
.
I use zathura as vimtex viewer, but zathura won't open while press '\lv'.
Since you are on MacOS, you could also use Skim. It is known to work well.
According to other issues, I'd tried to run
zathura -x "/opt/homebrew/Cellar/neovim/0.9.0/bin/nvim --headless -c \"VimtexInverseSearch %{line} '%{input}'\"" --synctex-forward 4:14:'/Users/ccandle/Coding/LaTeX/minimal/minimal.tex' 'build/minimal.pdf'&
and it returned
error: Could not connect to session bus: Could not connect: No such file or directory error: Got no usable data from SyncTeX or D-Bus failed in some way. [1] + 19760 exit 255 zathura -x --synctex-forward 'build/main.pdf'
Please read :help vimtex-view-zathura
, then :help vimtex-faq-zathura-macos
. If that section can not help you, then I don't have any further ideas. Sorry!
nvim calls 'plugins.vim' and the vimtex part is …
let g:tex_flavor = 'latex' let g:vimtex_view_method = 'zathura' let g:vimtex_quickfix_mode = 0 let g:vimtex_quickfix_ignore_filters = [ \ 'Underfull', \ 'Overfull' \ ] let g:vimtex_compiler_latexmk_engines = {'_' : '-xelatex'} let g:vimtex_compiler_latexmk = { \ 'build_dir': 'build', \ 'callback' : 1, \ 'continuous' : 1, \ 'executable' : 'latexmk', \ 'hooks' : [], \ 'options' : [ \ '-verbose', \ '-file-line-error', \ '-shell-escape', \ '-synctex=1', \ '-interaction=nonstopmode', \ ], \} let g:maplocalleader=' ' let g:view_enable=1 let g:view_automatic=1 let g:vimtex_texcount_custom_arg = '-ch -total'
Comments:
let g:tex_flavor
- remove it.g:vimtex_
.maplocalleader
is not really a VimTeX option, it is a Vim/Neovim specific thing. You should not have that as part of the VimTeX config.Here's a simplified version:
let g:maplocalleader=' '
let g:vimtex_view_method = 'zathura'
let g:vimtex_quickfix_mode = 0
let g:vimtex_quickfix_ignore_filters = [
\ 'Underfull',
\ 'Overfull'
\ ]
let g:vimtex_compiler_latexmk_engines = {'_' : '-xelatex'}
let g:vimtex_compiler_latexmk = {
\ 'build_dir': 'build',
\ 'options' : [
\ '-verbose',
\ '-file-line-error',
\ '-shell-escape',
\ '-synctex=1',
\ '-interaction=nonstopmode',
\ ],
\}
let g:vimtex_texcount_custom_arg = '-ch -total'
Since you are on MacOS, you could also use Skim. It is known to work well.
Skim works well, but I prefer zathura. Luckily zathura works again after reinstalling the nvim, vimtex and zathura, using the exact same configuration. I guess it's something about file permissions and zathura settings.
Comments:
- You don't need
let g:tex_flavor
- remove it.- VimTeX options all start with
g:vimtex_
.maplocalleader
is not really a VimTeX option, it is a Vim/Neovim specific thing. You should not have that as part of the VimTeX config.- You can simplify things.
Here's a simplified version:
...
Thanks for your guiding, it's really helpful for me as a beginner. I tried modifying other people's tutorials online, which maybe messed up vimtex.
Great, glad to hear it works now! I'll close the issue then.
Description
I use zathura as vimtex viewer, but zathura won't open while press '\lv'.
Steps to reproduce
According to other issues, I'd tried to run
and it returned
But if I remove the '--synctex-forward' option, run
the zathura will open, and obviously the sync function can't work.
nvim calls 'plugins.vim' and the vimtex part is
Expected behavior
zathura open with sync function.
Actual behavior
zathura cannot open from vimtex.
Do you use a latexmkrc file?
No
VimtexInfo