Skip to content

Previewer is non functional with zathura method #3003

@Felipe-9

Description

@Felipe-9

Description

Previewer is not working, whenever i try to do \lv or :VimtexView nothing happens, neither zathura nor zathura_simple is working, zathura seems to be installed alright on my computer

zathura --version

zathura 0.5.2
girara 0.4.0 (runtime: 0.4.0)
(plugin) pdf-poppler (0.3.0) (/opt/homebrew/Cellar/zathura/0.5.2/lib/zathura/libpdf-poppler.dylib)

Steps to reproduce

Have my config:

Vimtex.lua

return {
  "lervag/vimtex",
  lazy = false,
  init = function()
    local g = vim.g
    g.vimtex_view_method = "zathura"
    -- g.vimtex_view_method = "zathura_simple"
    g.vimtex_compiler_latexmk_engines = { ["_"] = '-lualatex'}
    g.vimtex_compiler_latexmk = {
      aux_dir = ".build",
      -- out_dir = "",
      options = {
        "-shell-escape",
        "-verbose",
        "-file-line-error",
        "-synctex=1",
        "-interaction=nonstopmode",
      }
    }
    g.vimtex_quickfix_mode = 0
    g.vimtex_mappings_enable = 0
    g.vimtex_log_ignore = ({
      "Underfull",
      "Overfull",
      "specifier changed to",
      "Token not allowed in PDF string",
    })
  end
}

Expected behavior

open pdf previewer on compiling and after pressing the shortucts or the command :VimtexView

Actual behavior

nothing happens, no error, no anything

Do you use a latexmkrc file?

no

VimtexInfo

System info:
  OS: macOS 14.6.1 (23G93)
  Vim version: NVIM v0.10.1
  Has clientserver: true
  Servername: /var/folders/5f/hn34hzl13y907124_kr68p380000gn/T/nvim.felipepinto/jsx9et/nvim.94442.0

VimTeX project: MWE
  base: MWE.tex
  root: /Users/felipepinto/.config/nvim.mwe/MWE
  tex: /Users/felipepinto/.config/nvim.mwe/MWE/MWE.tex
  main parser: current file verified
  document class: minipage
  packages: calc ctablestack expl3 fontenc fontsize fontspec fontspec-luatex ifluatex iftex import infwarerr ltxcmds luacode luatex85 luatexbase pdftexcmds shellesc subfiles xfp xkeyval xparse
  compiler: latexmk
    engine: -lualatex
    options:
      -shell-escape
      -verbose
      -file-line-error
      -synctex=1
      -interaction=nonstopmode
    aux_dir: .build
    callback: 1
    continuous: 1
    executable: latexmk
    job: 
      jobid: 8
      output: /var/folders/5f/hn34hzl13y907124_kr68p380000gn/T/nvim.felipepinto/jsx9et/0
      cmd: max_print_line=2000 latexmk -shell-escape -verbose -file-line-error -synctex=1 -interaction=nonstopmode  -lualatex -emulate-aux-dir -auxdir=.build -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"' 'MWE.tex'
      pid: 95005
  viewer: Zathura
    xwin id: 0
    cmd_start: zathura  -x "/opt/homebrew/Cellar/neovim/0.10.1/bin/nvim --headless -c \"VimtexInverseSearch %{line} '%{input}'\"" --synctex-forward 13:1:'/Users/felipepinto/.config/nvim.mwe/MWE/MWE.tex' 'MWE.pdf'&
  qf method: LaTeX logfile

Activity

changed the title [-]Previewer is non functional[/-] [+]Previewer is non functional with zathura method[/+] on Sep 24, 2024
lervag

lervag commented on Sep 25, 2024

@lervag
Owner

First, I notice that you are testing this on a file with a very long name. Is that relevant here, or do you have the same problem with regular (short) file names?

lervag

lervag commented on Sep 25, 2024

@lervag
Owner

Also, just for curiosity: Why do you want to alias g to vim.g? I don't see the benefit here. Yes, you are saving a few characters, but the lines are pretty short anyway, and now you can't really immediately copy those lines around since they rely on this initial alias.

Felipe-9

Felipe-9 commented on Sep 25, 2024

@Felipe-9
Author

on the alias, i dont really have such strong opinion on maintaining it or not.
on the file name, no it just happens to be the same file as the other issue, i should probably just have used a new MWE, my bad
i already edited the mwe to a regular name/path

lervag

lervag commented on Sep 25, 2024

@lervag
Owner

on the file name, no it just happens to be the same file as the other issue, i should probably just have used a new MWE, my bad

Ok, so, the issue is still there regardless? Does it work if you open a file from a terminal with zathura test.pdf?

Btw: On MacOS I think Skim is the most popular PDF viewer and I think it should be quite good.

Felipe-9

Felipe-9 commented on Sep 25, 2024

@Felipe-9
Author

Zathura does work fine when i use the terminal: zathura test.pdf, i could check it out, i had chosen zanthura cause the vim navigation and it would be the same tool with my linux computer.

lervag

lervag commented on Sep 26, 2024

@lervag
Owner

Ok, great. If you open you mwe.tex file, compile it, then do :!zathura mwe.pdf - does it open now?

Felipe-9

Felipe-9 commented on Sep 26, 2024

@Felipe-9
Author

Alright lemme try....
yup, working alright.

Screenshot 2024-09-26 at 21 43 10 Screenshot 2024-09-26 at 21 43 25
lervag

lervag commented on Sep 26, 2024

@lervag
Owner

Cool, now, again in the terminal, what happens if you do this?

zathura  -x "/opt/homebrew/Cellar/neovim/0.10.1/bin/nvim --headless -c \"VimtexInverseSearch %{line} '%{input}'\"" --synctex-forward 13:1:'/Users/felipepinto/.config/nvim.mwe/MWE/MWE.tex' 'MWE.pdf'
Felipe-9

Felipe-9 commented on Sep 26, 2024

@Felipe-9
Author

i get this error

error: Built without synctex support, but synctex specific option was specified.
Felipe-9

Felipe-9 commented on Sep 26, 2024

@Felipe-9
Author

maybe the problem is the missing synctex support
im going to re-install zathura with the --with-synctex option

Felipe-9

Felipe-9 commented on Sep 26, 2024

@Felipe-9
Author

im getting a new error...

zathura  -x "/opt/homebrew/Cellar/neovim/0.10.1/bin/nvim --headless -c \"VimtexInverseSearch %{line} '%{input}'\"" --synctex-forward 13:1:'/Users/felipepinto/.config/nvim.mwe/MWE/MWE.tex' 'MWE.pdf'
error: Could not connect to session bus: Cannot autolaunch D-Bus without X11 $DISPLAY
error: Got no usable data from SyncTeX or D-Bus failed in some way.
lervag

lervag commented on Sep 26, 2024

@lervag
Owner

Ok, the next step now is to read :help vimtex-faq-zathura-macos.

Felipe-9

Felipe-9 commented on Sep 26, 2024

@Felipe-9
Author

Alright i will get to it, thanks for leading the way.
will report on it later

10 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @steinbrueckri@lervag@user202729@Felipe-9

        Issue actions

          Previewer is non functional with zathura method · Issue #3003 · lervag/vimtex