1

This question already has an answer here:

This is a rookie follow up question to the question here: Need *.aux file in separate folder

The answer says: "In MiKTeX you can additionally set --aux-directory=dir which will put only the auxiliary files in this directory."

How do I apply this --aux-directory=dir to MiKTeX? Do I put it in the preamble of my document? I can't get the interpreter to parse it.

Thanks! David

[Follow up from T.D.'s excellent answer]

T.D. - I use TeXShop, which is the normal Mac build I believe. I have put that code everywhere I can think of in the options, the most promising looking spots were in the screen below. Sadly, no love - it obstinately continues to put the aux files next to each of my .tex files (in all folders, which is what I'm trying to avoid).

Any TeXShop users have any ideas? Thanks!

enter image description here

marked as duplicate by Kurt, darthbith, Svend Tveskæg, user31729, R. Schumacher Sep 14 '15 at 18:15

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • You have to use it like pdflatex --aux-directory="dir" texfile – user11232 Feb 4 '15 at 15:41
  • Which editor do you use? – Bernard Feb 4 '15 at 15:59
  • Hi Bernard, I use TeXShop. Per my comment below, I'm feeling very slow here but it still won't play ball. So my tex and latex fields now read pdftex --aux-directory=auxfiles --file-line-error --synctex=1 and pdflatex --aux-directory=auxfiles --file-line-error --synctex=1 . I have a subdirectory in the same folder as the main.tex file I am compiling called auxfiles, however it continues to put all the files in the root folder (and next to the .tex files in their respective subfolders). Any ideas? – – David Feb 5 '15 at 12:31
1

If you compile directly in the command line, you just have to do as Harish Kumar said. If you use an editor like TeXniccenter, TeXstudio or TeXmaker, you will have to add --aux-directory=dir in the compilation chain, which can be found in the program’s options.

This is a screenshot of TeXmaker:

TeXmaker configuration window

(It should be the same kind in other editors.)

You just write --aux-directory=dir after (or before) -interaction=nonstopmode.

Be careful! In this screenshot, several commands are separated with the | character.

  • Thank you T.D. for your comprehensive answer, I really appreciate it. I use TeXShop and sadly couldn't get it to work - see screenshot above. Any ideas? – David Feb 4 '15 at 21:44
  • In the “pdfTeX” frame, you have two fields: one begining with pdfTeX and the other with pdfLaTeX. You can write --aux-directory=dir just just after these commands and before --file-line-error`. – Zoxume Feb 5 '15 at 9:58
  • Thanks T.D. - I'm feeling very slow here but it still won't play ball. So my tex and latex fields now read pdftex --aux-directory=auxfiles --file-line-error --synctex=1 and pdflatex --aux-directory=auxfiles --file-line-error --synctex=1 . I have a subdirectory in the same folder as the main.tex file I am compiling called auxfiles, however it continues to put all the files in the root folder (and next to the .tex files in their respective subfolders). Any ideas? – David Feb 5 '15 at 10:41
1

Judging from your screenshot, you are using TeXShop on a Mac with MacTeX. The --aux-directory option is MiKTeX specific, and no equivalent exists in MacTeX.

See this answer: MacTeX -aux-directory=DIR

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