-
Notifications
You must be signed in to change notification settings - Fork 409
Closed
Labels
Description
Description
I have tried to use the compilation argument "-c" to automatically clean up the output files instead of
running :VimtexClean every time.
But when passing this option/argument the compilation fails.
I cannot figure out what I'm doing wrong.
Steps to reproduce
- Run
:VimtexCompileor<leader>ll
With this configuration:
return {
'lervag/vimtex',
init = function()
-- This is necessary for VimTeX to load properly. The "indent" is optional.
-- Note that most plugin managers will do this automatically.
vim.cmd 'filetype plugin indent on'
-- This enables Vim's and neovim's syntax-related features. Without this, some
-- VimTeX features will not work (see ":help vimtex-requirements" for more
-- info).
vim.cmd 'syntax enable'
-- Add the "-c" flag to latexmk
vim.g.vimtex_compiler_latexmk = {
options = {
'-c',
},
}
end,
}And this .tex file :
\documentclass{article}
\begin{document}
Hello, world!
\end{document}Expected behavior
I expect to compile the .tex file without error
and clean the output files after that like :VimtexClean does.
Actual behavior
The compilation fails with these messages:
Rc files read:
NONE
Latexmk: This is Latexmk, John Collins, 31 Jan. 2024. Version 4.83.
Latexmk: Doing main (small) clean up for 'test.tex'
VimTex: Compiler did not start successfully!
Do you use a latexmkrc file?
No
VimtexInfo
System info:
OS: macOS 14.4 (23E214)
Vim version: NVIM v0.9.5
Has clientserver: true
Servername: /var/folders/6q/dyzg9g_56d974h1jwh5tcd400000gn/T/nvim-24.username/ea8Tx9/nvim-24.65622.0
VimTeX project: test
base: test.tex
root: /Users/username/projects/latex-test
tex: /Users/username/projects/latex-test/test.tex
main parser: current file verified
document class: article
compiler: latexmk
engine: -pdf
options:
-c
callback: 1
continuous: 1
executable: latexmk
job:
jobid: 7
output: /var/folders/6q/dyzg9g_56d974h1jwh5tcd400000gn/T/nvim-24.username/ea8Tx9/0
cmd: max_print_line=2000 latexmk -c -pdf -pvc -pvctimeout- -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"' 'test.tex'
pid: 0
viewer: General
qf method: LaTeX logfile