4

This question has to do with changing the output directory on a file I am trying to compile (using Kile, though I hope the solution isn't editor-specific). If I type

pdflatex -output-directory DIRECTORY file.tex

in a terminal window, then pdflatex is run on "file.tex", and the output (i.e., .pdf/.out/.aux files) appears in the specified directory "DIRECTORY".

My question is this: Can I include something in "file.tex" before the appearance of \documentclass so that the following occurs:

  • I open "file.tex" using my editor (in this case, Kile).
  • I hit the "pdflatex" latex button in my editor, and
  • pdflatex is run on "file.tex", and the output is directed to "DIRECTORY"

In other words, this question is about how to amend a latex file so that the "terminal functionality" that I am able to achieve persists when using my latex editor. At one point, someone showed me how to do something like this (it involved adding "%%!" or something similar, followed by some terminal commands), but I can't remember it now.

Thanks for your help!

Frustrated
  • 41
  • 1

0 Answers0