-
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
latexmk
engine context (pdftex)
fails to generate log file when file name includes a space
#2683
Comments
That is not what you are doing. You are (mis)using the option to add another option. The let g:vimtex_compiler_latexmk = {
\ 'options': [
\ '-verbose',
\ '-file-line-error',
\ '-synctex=1',
\ '-interaction=nonstopmode',
\ '-pdflatex=texexec',
\ ]
\} |
But this does not work. Let's try this from the command-line:
It still doesn't work. So, I propose that you first figure out the command you want to use from a terminal, then I can help you configure VimTeX accordingly afterwards. |
You are correct.
The corresponding command I wrote in the original post is the one that seemed the closest to the one I am writing down in this reply. I confused This leads me to think that the documentation is missing a line about I never mentioned it in the original post: What I actually want to do is to change quickly the tex engine used, because I need to check how some latex commands behave or misbehave with the various tex engines (pdftex,luatex,xetex). If you have a suggestion for how to quickly change the engine with a vim mapping you are very welcome to give an advice. |
Ok. On my end, this doesn't work:
Here \documentclass{minimal}
\begin{document}
Hello World!
\end{document}
Yes and no; I believe you may be right that the mentioned docs could be improved and possibly that the option default value could be changed. But to me, it looks like the change should be to possibly remove the last three items with
Well, if you want to test with different engines/compilers, you could use a Makefile and/or run the compilation from a terminal. If you insist on running from within Vim with VimTeX, then I think the tex program directive should be good. Notice, though, that if you change the directive, then you need to restart Vim for VimTeX to pick up the change. |
Doing
is ok because there is no |
I think that we can close the issue. |
Ah, cool. In this case, I think you could do this: let g:vimtex_compiler_latexmk_engines = { 'pdftex': '-pdf -pdflatex=pdftex`} And then combine it with the tex directive, i.e., put this on top of your LaTeX document: %! TeX program = pdftex
% It should work quite well, but if you change the program you must either restart vim or do |
Description
Suppose I have the file
my file.tex
which I want to compile withlatexmk
andpdftex
(NOTpdflatex
!).I use
:let g:vimtex_compiler_latexmk_engines._ = "-pdf -pdflatex=texexec"
to change thelatexmk
engine.When the file has no space in its file name, it works fine - by examining the log file. Once a space is found in the file name, as in
my file.tex
, compilation fails to produce a log file.Steps to reproduce
my file.tex
:let g:vimtex_compiler_latexmk_engines._ = "-pdf -pdflatex=texexec"
<leader>ll
<leader>lo
Expected behavior
vim compiles my file with pdftex and a log file is created
Actual behavior
I see the following errors when pressing
<leader>lo
:Do you use a latexmkrc file?
No
VimtexInfo
The text was updated successfully, but these errors were encountered: