I am editing my PhD thesis using Emacs & Auctex, but my elisp is quite weak. Additionally, I build my thesis in a subdirectory, using makefiles generated by CMake and the UseLATEX CMake package, which I highly recommend.
I can’t figure out how to tell auctex that when I build the document it should do something like: make -C build/digital
and that the pdf file being output is going to be at build/digital/thesis.pdf even though the source is at ./thesis.tex
p.s. I HIGHLY recommend checking out UseLATEX, the CMake package for easily compiling LaTeX documents.
M-x compile RET
and then you can pass all arguments you want tomake
.compile-command
so you don't have to type it in each session:(defun my:tex-compile () (interactive) (let ((compile-command "make -C build/digital")) (call-interactively #'compile)))
But again, this isn't an answer to the question, just a solution to the problem :)