Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SumatraPDF error despite having variables added to PATH, vimtex_compiler_progname not executable #2134

Closed
evesdropper opened this issue Aug 16, 2021 · 8 comments
Labels

Comments

@evesdropper
Copy link

Description

SumatraPDF is installed on the computer and I also added the directory to the path (tried both the executable and the folder that contains said executable), but it keeps throwing this error:

image

Additionally, does anyone know why the second error g:vimtex_compiler_progname is not executable?

Thanks!

Steps to reproduce

Vim: vim
neovim: nvim

Then just check using :checkhealth to see that it doesn't work.

Expected behavior

SumatraPDF and compiler progname should not show up as errors.

Actual behavior

They instead show up as not executable as detailed in this image:
image

Do you use a latexmkrc file?

No

VimtexInfo

Haven't used a Latex file because I've been a bit worried about the setup.
@lervag
Copy link
Owner

lervag commented Aug 17, 2021

SumatraPDF is installed on the computer and I also added the directory to the path (tried both the executable and the folder that contains said executable), but it keeps throwing this error:

According to the output you show, SumatraPDF is still not available to your Vim or neovim instance. Perhaps vim/neovim do not have the same path as your system?

You have not supplied any information about your configuration and similar. Please do. (Do you expect me to understand implicitly which options you use?)

The only thing I am quite sure of is that you use Windows. I do not understand if you use Vim or neovim, I do not know which options you have used for VimTeX, I do not know which versions of OS and software you use, etc.

Additionally, does anyone know why the second error g:vimtex_compiler_progname is not executable?

Yes: The warning shows up because you do not have nvr executable. I would propose that you ignore this for now. It's only a warning.

VimtexInfo

Haven't used a Latex file because I've been a bit worried about the setup.

It would be helpful if you could open a LaTeX file and run :VimtexInfo, then copy the content here. The point is it shows a lot of useful info about your system.

@evesdropper
Copy link
Author

Hey, sorry it's been a while and didn't get back to it till now.

About the first part, right now I got that to work - the system needs to be restarted. Didn't think of that!

:VimtexInfo yields the following; seems to have multiple issues right now.

Error detected while processing function vimtex#info#open[2]..vimtex#scratch#new[2]..449[31]..451[4]..428[1]..429[1]..<SNR>119_get_os_info:
line   18:
E684: list index out of range: 1
E116: Invalid arguments for function matchstr
E15: Invalid expression: matchstr(s:win_info[1], ':\s*\zs.*')
Error detected while processing function vimtex#info#open[2]..vimtex#scratch#new[2]..449[31]..451[4]..428:
line    1:
E714: List required
Press ENTER or type command to continue

lervag added a commit that referenced this issue Sep 19, 2021
@lervag
Copy link
Owner

lervag commented Sep 19, 2021

Huh, strange. Can you:

  1. Make sure you have installed the latest version of VimTeX.
  2. After loading a .tex file, do :VimtexInfo

I believe it should work now after a minor update from my side.

Which version of Windows do you use? If you open a cmd prompt (windows key, type "cmd"). It should open a terminal. In the terminal, type "systeminfo" + enter; what's the output?

@evesdropper
Copy link
Author

evesdropper commented Sep 20, 2021

Edit: VimtexInfo no longer complains after I reinstalled newest edition of Vimtex; thanks for the quick patch. Here is the output:

System info
  OS: Windows (['/usr/bin/bash: /s: No such file or directory'])
  Vim version: NVIM v0.5.0
  Has clientserver: true
  Servername: \\.\pipe\nvim-23024-0

VimTeX project: test
  base: test.tex
  root: C:\Users\Evelyn\documents\university
  tex: C:\Users\Evelyn\documents\university\test.tex
  main parser: current file verified
  document class: minimal
  compiler: latexmk
    engine: -pdf
    options:
      -verbose
      -file-line-error
      -synctex=1
      -interaction=nonstopmode
    engine: -pdf
    callback: 1
    continuous: 1
    executable: latexmk
    process: 
      jobid: 4
      output: C:\Users\Evelyn\AppData\Local\Temp\nvim83nRI8\0
      cmd: set max_print_line=2000 & latexmk -verbose -file-line-error -synctex=1 -interaction=nonstopmode -pdf -pvc -e "$pdf_previewer = 'SumatraPDF -reuse-instance'" -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: 0
  viewer: General
  qf method: LaTeX logfile

Unfortunately, it still is complaining when I try to use VimtexCompile (['/usr/bin/bash: /s: No such file or directory']); any idea about how to fix this issue?

In the terminal, type "systeminfo" + enter; what's the output?

OS Name:                   Microsoft Windows 10 Home
OS Version:                10.0.19041 N/A Build 19041
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free

(when running cmd as administrator - systeminfo doesn't work when i use cmd prompt normally)

@lervag
Copy link
Owner

lervag commented Sep 20, 2021

Well, you never really gave any information about your configuration. I believe you have changed e.g. the shell setting? In any case, I have to admit I'm quite bad at Windows related issues. So I might not be able to help properly.

The issue template explains how to setup a minimal example. Can you try to setup a minimal vimrc and minimal tex file and see if it works then?

@evesdropper
Copy link
Author

I have been able to fix the windows not recognizing the terminal issue, but now it cannot find cmd.exe.

The original issue has been fixed; I believe the rest is just bugs to work out with Windows setup and not on the side of Vimtex itself. (I noticed other plugins and vim-plug itself also have troubles)

Thanks so much for helping in the previous posts.

@lervag
Copy link
Owner

lervag commented Sep 21, 2021

Glad to hear it!

@lervag
Copy link
Owner

lervag commented Sep 21, 2021

I assume this vi.stackexchange.com question was by you? Since it seems you may have resolved your issue, could you give some clue to what the problem was and how you solved it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants