Uwe Brauer <o...@mat.ucm.es> writes:

>> This can be fixed by adding the following to the latexmk command
>> (compare with
>> https://github.com/ultronozm/auctex-cont-latexmk.el/blob/86eba36913a2980ce64bf116ff54587aa554a66c/auctex-cont-latexmk.el#L230):
>
>> (concat " -outdir=" (shell-quote-argument TeX-output-dir))
>
>> I guess it just requires a simple change to TeX-command-expand and
>> TeX-command-list, but I'm not super familiar with those.
>
> Thanks, Paul. I seem to remember that I brought up that subject for
> your package, but I am not entirely sure.
>
> I think it is best to leave this fix to Arash to implement. 😇

I'm not sure if it's best to leave it to me, but can you please apply
this small change to `TeX-command-list' and try it again?

--8<---------------cut here---------------start------------->8---
diff --git a/tex.el b/tex.el
index 93f22520..e261b821 100644
--- a/tex.el
+++ b/tex.el
@@ -252,7 +252,7 @@ If nil, none is specified."
     ("Ps2pdf" "ps2pdf %f %(O?pdf)" TeX-run-ps2pdf nil
      (plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode Texinfo-mode)
      :help "Convert PostScript file to PDF")
-    ("LaTeXMk" "latexmk %(latexmk-out) %(file-line-error) \
+    ("LaTeXMk" "latexmk %(latexmk-out) %(file-line-error) %(output-dir) \
 %`%(extraopts) %S%(mode)%' %t"
      TeX-run-format nil (LaTeX-mode docTeX-mode) :help "Run LaTeXMk")
     ("Glossaries" "makeglossaries %(d-dir) %s" TeX-run-command nil
--8<---------------cut here---------------end--------------->8---

You can also add '%(output-dir)' to the LaTeXMk entry via the custom
interface and save it for the current session; that will save you the
apply/compilation time.

Best, Arash

Reply via email to