Closed NickHu closed 5 months ago
Workaround:
ln -s build/robustExternalize robustExternalize
Thanks, good point. The reason it hangs foreover, I think, is that the file does not exist and pdflatex just waits foreover to get an input from the command line maybe? Anyway, your workaround does work, and I basically just need to prepend all compilation commands with cd build
to make it work without the workaround. For now, the main issue is that I don't know how to programmatically get the path to -output-directory
. Hopefully, someone will answer here https://tex.stackexchange.com/questions/707152/programmatically-get-the-output-directory
Indeed your observation is correct that the spawned pdflatex is just waiting forever unable to find the files it needs (verified by looking at the log of the spawned pdflatex process)
Since it seems like there is no programmatic way to find the value of the output directory, you can configure it with either \robExtConfigure{set output directory=build}
in your file if you always use the same output directory, or you can do:
$ pdflatex -shell-escape -output-directory=build "\def\robExtOutputDirectory{build}\input{test.tex}"
for instance if you use different build directories. Let me know if the latest version works for your, and feel free to reopen if it does not work for you.
Thanks for fixing this so promptly. I like your second suggestion as a way to not have to hardcode the output directory in your document file. Can you think of a way to make that work with vimtex + latexmk, which is my primary workflow?
It seems like latexmk can accept a configuration containing something like this:
&alt_tex_cmds;
$pre_tex_code = '\def\robExtOutputDirectory{build}';
(the alt_tex_cmds
is apparently needed to make it work for any engine like lualatex as documented in https://manpages.ubuntu.com/manpages/lunar/man1/latexmk.1.html)
I guess it should solve your problem.
Compile with
It seems to make pdflatex hang forever on my system.