-
Notifications
You must be signed in to change notification settings - Fork 407
Startup for PDF Viewer sometimes hangs #2601
Description
Description
Hello! I just got everything setup (or so I think) for using VimTex on Windows 11, neovim v0.8.0, SumatraPDF viewer. I use the following command for inverse search which also sometimes hangs.
cmd /c start /min "" nvim --headless -c "VimtexInverseSearch %l '%f'"The command which VimTex runs to startup the SumatraPDF view is as follows.
cmd /s /c "SumatraPDF -reuse-instance -forward-search "TEX_DOC_NAME" 1 "PDF_DOC_NAME"Please note the importance of the double quotation marks (") due to the /s operator.
This command sometimes starts SumatraPDF and sometimes hangs there and does nothing. Similarly, the inverse search via double clicking on SumatraPDF sometimes navigates to the proper line in the file I have open, and sometimes hangs. I am not sure why they hang and I dont know how I would go about fixing it.
Please note that on occurrences where the startup command hangs the inverse search command isn't even allowed to run, meaning I dont even see a terminal popup. I think I would like to try getting the terminal to not pop up at all if this is a possibility.
Thank you to anyone who reads this! Especially the developers and maintainers of this wonderful project.
Steps to reproduce
The following is my Neovim lua Config for VimTex.
['lervag/vimtex'] = {
config = {
['vimtex_view_general_viewer'] = 'SumatraPDF',
['vimtex_view_method'] = 'SumatraPDF',
['vimtex_view_general_options'] = '-reuse-instance -forward-search @tex @line @pdf',
['vimtex_view_general_options_latexmk'] = '-reuse-instance',
}The following is the minimal tex file required to make the startup SumatraPDF command hang.
\documentclass{minimal}
\begin{document}
Hello world!
\end{document}Steps to reproduce
- open the
minimal.texfile in vim - run
:VimtexCompile(no quotation marks) - Observe the following command window popup
Expected behavior
When following the above steps, I expect the following behaviours.
- Primary command window in step 3 to popup and then disappear.
- Double click to inverse search to work.
Actual behavior
Please refer to the steps to reproduce where I detail what I actually observe.
Do you use a latexmkrc file?
No
VimtexInfo
System info:
OS: BLACK-BETTY (Microsoft Windows 11 Home)
Vim version: NVIM v0.8.0-1210-gd367ed9b2
Has clientserver: true
Servername: \\.\pipe\nvim.29096.0
VimTeX project: minimal
base: minimal.tex
root: C:\Users\gersi\Desktop\rust\dummyRust
tex: C:\Users\gersi\Desktop\rust\dummyRust\minimal.tex
main parser: fallback current file
document class:
compiler: latexmk
engine: -pdf
options:
-verbose
-file-line-error
-synctex=1
-interaction=nonstopmode
callback: 1
continuous: 1
executable: latexmk
job:
jobid: 7
output: C:\Users\gersi\AppData\Local\Temp\nvim.0\hhP8VV\0
cmd: set max_print_line=2000 & latexmk -verbose -file-line-error -synctex=1 -interaction=nonstopmode -pdf -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'" "minimal.tex"
pid: 164
viewer: General
job:
pid: 8940
cmd: SumatraPDF -reuse-instance -forward-search "C:\Users\gersi\Desktop\rust\dummyRust\minimal.tex" 4 "C:\Users\gersi\Desktop\rust\dummyRust/minimal.pdf"
qf method: LaTeX logfile