Skip to content

Weird cmd prompt pop up when compiling #2706

@resort09

Description

@resort09

Description

Hi everyone, I am a beginner of Nvim and GitHub. I know almost nothing about the cool techy knowledge (programming, operation system, etc.). However, as my study gets more math-intense, I was trying to use latex to document lecture notes and all kinds of writings. And I finally found the combination of Nvim+Vimtex has been proved to be a feasible solution.

After days' struggling, I finally made my Nvim and Vimtex work. It could compile and produce pdfs. However, two problems showed.

  1. When compiling, a weird cmd prompt popped up. And I can't input anything into this cmd prompt.
Cmd.mp4
  1. After I closed Sumatrapdf and wanted re-compile the .tex again, compiler stopped. And it won't compile until I \ll or VimtexCompile at the second time.
stopped.mp4

And the closest case I found is #2601, however, my problem didn't get fixed when I run Nvim as Administrator.

I really appreciate any comments and/or advice! Also, I am quite new to GitHub, please let me know if I missed any information or failed to follow GitHub rules! Thank you!

Steps to reproduce

  1. Set init.vim file as below.
call plug#begin()

Plug 'lervag/vimtex'
Plug 'SirVer/ultisnips'

call plug#end()

let g:tex_flavor='latex'
let g:vimtex_compiler_method = 'latexmk'
let g:vimtex_view_general_viewer='sumatrapdf'
let g:vimtex_quickfix_mode=0
let g:tex_conceal='abdmg'
  1. Edit .tex file as below.
\documentclass{article}
\begin{document}
\[x^2+y^3+6^e\]
\[xy^3\]
di
thi
\end{document}
  1. \ll, the Problem 1 showed.
  2. Close cmd prompt and PDFviewer, \\, then it suggest compiler stopped.
  3. \ll again, worked.

Expected behavior

  1. No cmd prompt window popped up.
  2. I can compile again after I close the PDFviewer. (No need to compile twice and failed the first one)

Actual behavior

  1. A cmd prompt poped up.
  2. After I close the PDFviewer and wanted to compile again, compiler stopped. I needed to \ll the second time to make it work.

Do you use a latexmkrc file?

No

VimtexInfo

info:
  OS: LASTRESORT (Microsoft Windows 11 Home)
  Vim version: NVIM v0.9.0
  Has clientserver: true
  Servername: \\.\pipe\nvim.6356.0

VimTeX project: text
  base: text.tex
  root: C:\Users\stard
  tex: C:\Users\stard\text.tex
  main parser: current file verified
  document class: article
  compiler: latexmk
    engine: -pdf
    options:
      -verbose
      -file-line-error
      -synctex=1
      -interaction=nonstopmode
    callback: 1
    continuous: 1
    executable: latexmk
    job: 
      jobid: 11
      output: C:\Users\stard\AppData\Local\Temp\nvim.0\85e4l9\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'" "text.tex"
      pid: 9048
  viewer: General
    job: 
      pid: -
      cmd: sumatrapdf -reuse-instance -forward-search "C:\Users\stard\text.tex" 7 "C:\Users\stard/text.pdf"
  qf method: LaTeX logfile

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions