lervag / vimtex

VimTeX: A modern Vim and neovim filetype plugin for LaTeX files.
MIT License
5.55k stars 390 forks source link

Can not automatically open Zathura after \ll on MacOS12.1 #2249

Closed DehanLUO closed 3 years ago

DehanLUO commented 3 years ago

Description

I have just upgraded my OS to MacOS 12.1. However, after running \ll, the viewer does not open the file to visualize.

Steps to reproduce

No response

Expected behavior

The viewer Zathura can be shown as normal.

Actual behavior

:VimtexCompileOutput shows follows

 Rc files read:
 NONE
 Latexmk: This is Latexmk, John Collins, 29 September 2020, version: 4.70b.
 ======= Need to update make_preview_continuous for target files
 Viewing pdf
 ————
 Running 'echo vimtex_compiler_callback_compiling'
 ————
 vimtex_compiler_callback_compiling
 Latexmk: I have not found a previewer that is already running.-
 So I will start it for 'test.pdf'
 ————
 Latexmk: All targets (test.pdf) are up-to-date
 For rule 'view', running '&if_source(  )' ...
 ————
 Running 'start zathura  -x "/usr/local/Cellar/macvim/8.2-171_1/MacVim.app/Contents/MacOS/Vim -T dumb –not-a-term -n -c "\""VimtexInverseSearch %{line} '%{input}'"\""" "test.pdf"'
 ————
 ————
 Running 'echo vimtex_compiler_callback_success'
 ————
 vimtex_compiler_callback_success
 error: Built without synctex support, but synctex specific option was specified.

while my Zathura supports synctex. zathura -h gives follows

Usage:
  zathura [OPTION…]  [file1] [file2] [...]

Help Options:
  -h, --help                           Show help options

Application Options:
  -e, --reparent=xid                   Reparents to window specified by xid (X11)
  -c, --config-dir=path                Path to the config directory
  -d, --data-dir=path                  Path to the data directory
  --cache-dir=path                     Path to the cache directory
  -p, --plugins-dir=path               Path to the directories containing plugins
  --fork                               Fork into the background
  -w, --password=password              Document password
  -P, --page=number                    Page number to go to
  -l, --log-level=level                Log level (debug, info, warning, error)
  -v, --version                        Print version information
  -x, --synctex-editor-command=cmd     Synctex editor (forwarded to the synctex command)
  --synctex-forward=position           Move to given synctex position
  --synctex-pid=pid                    Highlight given position in the given process
  --mode=mode                          Start in a non-default mode
  -b, --bookmark=bookmark              Bookmark to go to
  -f, --find=string                    Search for the given phrase and display results

Do you use a latexmkrc file?

No

VimtexInfo

System info
  OS: macOS 12.1 (21C5031d)
  Vim version: VIM 8.2 (1-2681)
  Has clientserver: true
  Servername: VIM

VimTeX project: test
  base: test.tex
  root: /Users/dehan/Desktop/test_latex/getting_started_latex_vim
  tex: /Users/dehan/Desktop/test_latex/getting_started_latex_vim/test.tex
  main parser: current file verified
  document class: article
  compiler: latexmk
    engine: -pdf
    options:
      -xelatex
      -file-line-error
      -synctex=1
      -interaction=nonstopmode
    callback: 1
    continuous: 1
    executable: latexmk
    job: 
      jobid: process 10093 run
      output: /var/folders/_d/bsqrml45219_br128q2pgsg40000gn/T/vvlGWwt/1
      cmd: max_print_line=2000 latexmk -xelatex -file-line-error -synctex=1 -interaction=nonstopmode -pdf -pvc -e '$new_viewer_always = "0"' -e '$pdf_previewer = "zathura  -x \"/usr/local/Cellar/macvim/8.2-171_1/MacVim.app/Contents/MacOS/Vim -T dumb --not-a-term -n -c \"\\\"\"VimtexInverseSearch \%{line} '"'"'\%{input}'"'"'\"\\\"\"\" \%S"' -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"' 'test.tex'
      pid: 10093
  viewer: Zathura
    xwin id: 0
    cmd_start: zathura -x "/usr/local/Cellar/macvim/8.2-171_1/MacVim.app/Contents/MacOS/Vim -T dumb --not-a-term -n -c \"VimtexInverseSearch %{line} '%{input}'\"" --synctex-forward 4:1:'/Users/dehan/Desktop/test_latex/getting_started_latex_vim/test.tex'  '/Users/dehan/Desktop/test_latex/getting_started_latex_vim/test.pdf'&
  qf method: LaTeX logfile
DehanLUO commented 3 years ago

Sry, I forgot to reinstall zathura with --with-synctex

brew install zathura --with-synctex
brew install zathura-pdf-poppler
mkdir -p $(brew --prefix zathura)/lib/zathura
ln -s $(brew --prefix zathura-pdf-poppler)/libpdf-poppler.dylib $(brew --prefix zathura)/lib/zathura/libpdf-poppler.dylib
lervag commented 3 years ago

No problem :)