-
Notifications
You must be signed in to change notification settings - Fork 409
Closed
Description
If I do this with builddir being set to something other than the default, for example /tmp/:
$ cd /tmp/
$ mkdir -p a/a/a
$ mkdir -p b/b/b
$ vim b/b/b/b.tex
... (add "content" in)
$ vim a/a/a/a.tex
... (add some full TeX file and \input{/tmp/b/b/b/b.tex})
Example ========
%! TEX program = xelatex
\documentclass[12pt]{article}
\begin{document}
content
\input{/tmp/b/b/b/b.tex}
\end{document}Then restart vim such that vimtex reparse the \input (why would this be necessary...?)
And start compilation in a.tex. Error message
Error detected while processing function vimtex#compiler#compile[4]..vimtex#compiler#start[7]..67[3]..70:
line 30:
E739: Cannot create directory: build_dir//../../../b
E739: Cannot create directory: build_dir//../../../b/b/b
Analysis:
\includedoes tell LaTeX to create new directory,\inputdoes not.- So a program that include something outside the compilation directory and the build_dir (output directory) is unusual will fail to compile
(unlessopenout_ais set)
and there's no need for vimtex to handle that. - On the other hand, a program that input something outside the compilation directory is completely valid and there's no reason to support that.
Possible fix:
- Silently ignore the attempts to create directories outside build directory?
- Check if each included file is
\inputor\include, then create/not create folder accordingly?
Originally posted by @user202729 in #2204 (comment)
Metadata
Metadata
Assignees
Labels
No labels