Skip to content

Zathura closes upon save during continuous compilation #3256

@Ferhoodl

Description

@Ferhoodl

Description

When using vim with vimtex with zathura in continuous mode (and with enough content in the .tex file), after using :w and a short pause, zathura will close instead of showing the updated pdf.

Steps to reproduce

  1. vim minimal.tex
  2. \ll
  3. Make a simple change to some text.
  4. :w
  5. Zathura will close.

NOTE: My minimal .tex file is not very minimal (~35 lines). Smaller files do not experience this problem. I trimmed it down to what I could. The minimal.tex is uploaded as a minimal.tex.txt so github would accept it. I also supplied the image I am using which seems to be involved with the total file size problem. The image is 1.2 MiB. I know this is an awkward minimal setup, but again, it's the smallest I can reproduce it with.

minimal.tex.txt

minimal.vim:

let g:vimtex_view_method = 'zathura'
let g:vimtex_compiler_method = 'latexmk'
let g:vimtex_compiler_latexmk = {
	\ 'out_dir': 'build',
    \ 'callback':   1,
    \ 'continuous': 1,
    \ 'options':   ['-pdf', '-interaction=nonstopmode', '-file-line-error'],
    \}

image:
Image

Expected behavior

  1. vim minimal.tex
  2. \ll
  3. Make a simple change to some text.
  4. :w
  5. My latex compiles and Zathura stays in place and reflects the changes.

Actual behavior

Upon saving a .tex file in vim (with :w) , instead of Zathura staying where it is and showing the changes I made to the latex, Zathura closes and requires two compilations to bring it back up.

Do you use a latexmkrc file?

No

VimtexInfo

1   System info:
  1   OS: Debian GNU/Linux 13 (trixie)
  2   LaTeX version: pdfTeX 3.141592653-2.6-1.40.26 (TeX Live 2025/dev/Debian)
  3   Vim version: VIM 9.1 (1-948, 950-1230, 1242, 1244)
  4   Has clientserver: true
  5   Servername: undefined (vim started without --servername)
  6   $PATH:
  7     - /bin
  8     - /home/joe/.local/bin
  9     - /usr/bin
 10     - /usr/games
 11     - /usr/local/bin
 12     - /usr/local/games
 13 
 14 VimTeX project: minimal
 15   base: minimal.tex
 16   root: /home/joe/Documents/classes/3140/minimal
 17   tex: /home/joe/Documents/classes/3140/minimal/minimal.tex
 18   main parser: current file verified
 19   document class: article
 20   document class options: 
 21   packages: epstopdf-base graphics graphicx keyval trig
 22   compiler: latexmk
 23     engine: -pdf
 24     options:
 25       -pdf
 26       -interaction=nonstopmode
 27       -file-line-error
 28     out_dir: build
 29     callback: 1
 30     continuous: 1
 31     executable: latexmk
 32     job: 
 33       jobid: process 21691 run
 34       output: /tmp/vRoH2Yb/0
 35       cmd: max_print_line=2000 latexmk -pdf -interaction=nonstopmode -file-line-error  -pdf -outdir=build -pvc -pvctimeout- -view=none -e '$compiling_cmd = ($compiling_cmd ? $compiling_
 36       pid: 21691
 37   viewer: Zathura
 38     xwin id: 0
 39     cmd_start: zathura  -x "/usr/bin/vim.gtk3 -T dumb --not-a-term -n -c \"VimtexInverseSearch %{line}:%{column} '%{input}'\"" --synctex-forward 1:1:'/home/joe/Documents/classes/3140/mi
 40   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