-
Notifications
You must be signed in to change notification settings - Fork 391
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
Compilation fail with option "-c" #2902
Comments
That's not really possibly. IMHO, there is really no reason to worry about the generated files. Just ignore them. Also, please remove the return {
'lervag/vimtex',
init = function()
-- you could remove the init block if you are not setting any options
end,
} Also; if you really do want to add an option to latexmk, you should append to the default list. Thus: return {
'lervag/vimtex',
init = function()
vim.g.vimtex_compiler_latexmk = {
options = {
'-verbose',
'-file-line-error',
'-synctex=1',
'-interaction=nonstopmode',
'-c',
},
}
end,
} However, I still think it does not make sense to add |
Regarding the config I just simply copied the example but I don't have it in otherwise. The thing is, I have different tex files in the same directory so generating 7 files instead of 3 for every tex files adds up. I have tried to run with and without continuous mode. But the compiler simply don't compile with the |
Then take this advice: 1) read the comments in example code that you copy, and 2) strive to properly understand code that you are copying. The latter is sometimes takes time you feel that you don't have, but I believe in many cases you can actually reduce time waste by investing this time up front.
So, how about creating separate directories for your projects?
That's the expected behaviour. As far as I know, One thing you can try: Use an event to trigger clean when you exit neovim with something like this: init = function()
vim.api.nvim_create_autocmd(
"VimtexEventQuit",
{ command = "VimtexClean" }
)
end You may also be interested in reading my related response here: #2820 (comment). |
As I said I do not use
I would have liked to, but I'm told to do so. When adding the following as suggested: init = function()
vim.api.nvim_create_autocmd(
"VimtexEventQuit",
{ command = "VimtexClean" }
)
end Even though I don't lazy load Vimtex I get:
I did read from the help page:
But I may use e.g. You are correct, I did see now that Thank you for your precious help! |
Ok, cool. You included it in your original post, which is why I mentioned that.
Sorry, that's my mistake. It should be: init = function()
vim.api.nvim_create_autocmd("User", {
pattern = "VimtexEventQuit",
group = vim.api.nvim_create_augroup("init_vimtex", {}),
command = "VimtexClean"
})
end
I think that comment may be wrong; I'm not 100% sure. Please test my updated version.
Yes, this is also an option, but you should only do it if you do not use continuous compilation. Notice that for larger documents, LaTeX compilation times are sometimes nontrivial. Thus, cleaning after every compile implies that you need to fully recompile everything everytime. Thus, I think it is better to instead do a clean when you are finished working with your document.
Glad to help! |
This works like a charm! Big thanks! Couldn't hope for a better solution. |
Great, I'm glad to hear it! It seems I should update the docs, though, as they are indicating that this specific thing does not work. Thanks for pointing that out! |
It wasn't maybe not that clear in my phrase. Sorry. I mean the docs are correct in the current state. |
Ah, ok, sorry. Then I'll revert the docs :) |
I believe the last update should be good - the text is better now. |
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
:VimtexCompile
or<leader>ll
With this configuration:
And this .tex file :
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:
Do you use a latexmkrc file?
No
VimtexInfo
The text was updated successfully, but these errors were encountered: