[Tex/LaTex] Placing Intermediate and Output Files in Another Folder

auxiliary-filesoutputtexmaker

I am trying to figure out a way to cleanly separate the TEX files from all of the intermediate and output files. Various approaches I've tried, including the one described by ‘Bundle’ TeX output in a directory don't seem to work. I'm using TexMaker + MikTex (portable). Ideally, I would like my file/directory structure to look something like this:

  • texproject
    • texfiles
      • 1.tex
      • 2.tex
    • intfiles
      • 1.out
      • 1.log
      • 1.aux
      • 2.out
      • 2.log
      • 2.aux
    • pdffiles
      • 1.pdf
      • 2.pdf

Instead, what I have, is the jumbled-up mess where all of these files live in the same directory. I've tried setting the ouput-directory, for example, on pdflatex but this doesn't work. The pdf file still gets created in the same place but now it doesn't show up in the previewer. This should be pretty easy to solve but I've so far been unsuccessful. How can I set up my environment to use the above structure when compiling?

Update: I believe I have narrowed this down to something specific to TexMaker. If the desired aux and out directories are passed via the command line to pdflatex, everything builds as it should. Yet, I get numerous message boxes popping up saying that files can't be found and the PDF doesn't display in the internal viewer. I can't see any obvious options within TexMaker to change to address this. So, has anyone been able to make the scenario I'm describing work with TexMaker?

Best Answer

As suggested by lockstep, I write a short answer: AFAIK, this is currently not possible, because the path cannot be changed for the messages / log viewer and for the pdf viewer from within the Texmaker GUI. There is a feature request on the Texmaker issue list to make the path configurable: http://code.google.com/p/texmaker/issues/detail?id=97 Maybe you are lucky and in a later release this will be available. I personally would also use this new feature (and only backup the input folder, not the output folder).

Related Question