0

I'm using AUCTeX mode in emacs, and I want the generated pdf (after I run C-c C-c) to be in the parent directory instead of the current one.
In other words, I want to be able to change the filename of the generated file.

1 Answer 1

1

Perhaps, this is what you're looking for.

-- User Option: TeX-output-dir

Set this option to the path of a directory where output files will
be placed.  The output files include those that are produced by
applications running under AUCTeX, temporary files related to
region processing and the preview-latex files.  If a relative path
is specified, it is interpreted as being relative to the master
file in a multifile document.

 This is a buffer local variable and must be set separately for all
documents and all files in a multifile document.  For example,
     %%% Local Variables:
     %%% mode: latex
     %%% TeX-output-dir: "build"
     %%% End:
2
  • what should I write in my ~/.emacs.el file ? Commented Oct 18, 2021 at 0:54
  • 1
    The easy way is to edit a TeX file and then C-h v TeX-output-dir and in the help buffer click or select the option Customize. This will put you in the Customize buffer, where you can just enter the value and click Apply and Save button. That will write it into the init file for you. Commented Oct 18, 2021 at 1:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.