[tex-k] Using --output-directory with \input

Al Haji-Ali abdo.haji.ali at gmail.com
Thu Feb 4 12:28:02 CET 2021


Hello,

Apologies if this issue has been discussed before, but I tried looking and couldn't find it.
I am using pdflatex (but also tried other tools) with the `--output-directory` option so that all output files are placed in a sub-directory. This works most of the time as expected. However, if I have the following structure:

+-- build\
+-- subdir\
│   +-- sub.tex
+-- main.tex

and I use `\input` to include "sub.tex" in "main.tex", and then call a tex-engine with "--output-directory=build"
then the tex engine tries to create an aux file in a "subdir" subdirectory inside "build" which does not exist.

Is there a way to create these directories automatically? Otherwise, I would have to manually keep an identical copy of the directory structure in both my root and "build" directories.

Best regards,
-- Al



More information about the tex-k mailing list.