Skip to content

\lv (vimtex-viewer) could not open zathura  #2744

@777uliahshafar

Description

@777uliahshafar

Description

Hello everyone, I am facing an issue on the zathura window.

I run a Vimtex with the neovim wsl ubuntu on windows 11. I have been using zathura as a viewer. When I compile a latex file in the first time, the zathura open its window in front (this is supposed to happen for the second compilation). But if the zathura window has already opened, either \ll or \lv make zathura window could not open or show its window in front, however the forward search highlight still works but in minimaze or in the zathura background window.

I had already research this issue for queite sometime, I think it is regarding on zathura does not support libsynctex again, but I I think it is long time ago issue right? I also found issue similar #2424 , but It relates to mac_os with dbus instead of linux or wsl in this case.

X _ my current solution might be make neovim window and zathura window open side by side, but it will not be a good. Thank you.

Steps to reproduce

min. lua

cmd('syntax on')
vim.api.nvim_command('filetype plugin indent on')

-- change compiler engine 
g.vimtex_compiler_latexmk_engines = {
    _ = '-xelatex'
}

-- compilation configuration
g.vimtex_compiler_method = "latexmk"
g.vimtex_compiler_latexmk = {
    callback = 1,
    continuous = 1,
    executable = "latexmk",
    options = {
        "-shell-escape",
        "-verbose",
        "-file-line-error",
        "-synctex=1",
        "-interaction=nonstopmode",
    },
}

g.vimtex_view_method = 'zathura'
g.vimtex_view_general_options = "-reuse-instance -forward-search @tex @line @pdf"

-- forward search after compile
cmd[[
au User VimtexEventCompileSuccess VimtexView
]]

min. latex file

\documentclass{article} % or scrartcl, scrbook, scrlttr2, scrreprt
\usepackage{polyglossia} %LuaLatex Compiler Engine
\setmainlanguage[variant=indonesian]{malay}
\setotherlanguages{english}
\PolyglossiaSetup{malay}{indentfirst=true}

\usepackage{fontspec}
\begin{document}
Project 'GNOME/gnome-latex' was moved to 'Archive/gnome-latex'. Please update any links and bookmarks that may still have the old path. 
\end{document}

Expected behavior

I would like to open zathura viewer after I compile or \lv in the continous mode.

Actual behavior

Zathura could not show in front on second compilation or even if I vimtex-view for forward search.

Do you use a latexmkrc file?

No

VimtexInfo

System info:
  OS: Ubuntu 22.04.2 LTS
  Vim version: NVIM v0.6.1
  Has clientserver: true
  Servername: /tmp/nvimingKVp/0

VimTeX project: scihub
  base: scihub.tex
  root: /home/ul/scihub
  tex: /home/ul/scihub/scihub.tex
  main parser: current file verified
  document class: article
  packages: arabicnumbers calc etoolbox expl3 fontenc fontspec fontspec-xetex hijrical iftex l3keys2e makecmds polyglossia xkeyval xparse
  compiler: latexmk
    engine: -xelatex
    options:
      -shell-escape
      -verbose
      -file-line-error
      -synctex=1
      -interaction=nonstopmode
    callback: 1
    continuous: 1
    executable: latexmk
    job: 
      jobid: 5
      output: /tmp/nvimingKVp/1
      cmd: max_print_line=2000 latexmk -shell-escape -verbose -file-line-error -synctex=1 -interaction=nonstopmode -xelatex -pvc -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"' 'scihub.tex'
      pid: 1537
  viewer: Zathura
    xwin id: 0
    cmd_start: zathura  -x "/usr/bin/nvim --headless -c \"VimtexInverseSearch %{line} '%{input}'\"" --synctex-forward 3:1:'/home/ul/scihub/scihub.tex' 'scihub/scihub.pdf'&
  qf method: LaTeX logfile

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions