Giter Club home page Giter Club logo

Comments (4)

lervag avatar lervag commented on August 16, 2024 1

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:

  • 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:

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'

from vimtex.

CCandle avatar CCandle commented on August 16, 2024

By the way, it's nothing todo with the build_dir. Things will go the same if I set 'build_dir': ''.

from vimtex.

CCandle avatar CCandle commented on August 16, 2024

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.

from vimtex.

lervag avatar lervag commented on August 16, 2024

Great, glad to hear it works now! I'll close the issue then.

from vimtex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.