Hello Ikumi, > The rule which preview-latex determines the location of relavant files > is rather complicated and I don't understand comprehensively. I think it > isn't centralized and I can only summarize the result here: > Thanks for this! I am still looking into the issue of preview-latex. I am also very confused by what it is doing. In particular, I want to move the preview files into the output directory (just like I did with _region_.tex) but I can't seem to find the relevant code lines.
I will check your testcases to see if I can figure it out. >> With that being said, I tried a simple example with a subdir input and >> it works fine for me. > > Well, didn't you examine \input rather than \include? As far as I can > see, \include causes to generate aux file while \input does not. Please > try example like these: > Apologies! You did say "include" but I use "\input" normally and that's what my mind jumped to. Testing your example, I can see the error you mentioned. As you said, the tex engine tries to create an aux file in a "subdir" directory which exists under master root (since that's where one is including the file file from) but naturally does not exist under "build". I have no idea how to fix this. It is a bizarre implementation detail of tex engines that such directories are not created when `--output-directory` is passed. It seems even "latexmk" when provided with "--output-directory" fails on a first run for the same reason, only to automatically create the "build/subdir" on a second run and succeed. It is not ideal, but I could potentially recreate this solution, what do you think? On the other hand, I updated the patch to address a couple of points (like how a build directory was being created in sub-directories). Instead of attaching more files, I put up the patch on github so that people always have the latest version: https://raw.githubusercontent.com/haji-ali/auctex/tex-build/etc/auctex-output-dir.patch > makeinfo accepts "-o" or "--output" option, with slightly different > meaning from "--output-dir" of (la)tex. Try "man makeinfo". > OK, I now pass "-o" for the output. > > I think you can think of amstex as a variant of plain tex. > This is now set. > > upmendex is a variant of makeindex and compatible with respect to their > arguments. > https://ctan.org/pkg/upmendex/ > https://github.com/t-tk/upmendex-package > This is now set. The only remaining command as far as I can see is ConTeXt but looking at the man-page I am not sure it supports an output directory. Can someone confirm? Best regards, -- Al