TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When using lualatex or pdflatex commands, there is an option to set the destination/processing folder as

lualatex -output-directory=/destination/folder file.tex

I was unable to find a similar option for context command. How to force context to write log files and resulting pdf in a custom folder?

share|improve this question
up vote 9 down vote accepted
context filename --result=output-directory/filename
share|improve this answer
This is not identical to -output-directory, instead, it creates all files in the current directory and then move them to the output-directory. For example, rare but imagine, if a user does not have write permission for the current folder. – All Aug 21 '12 at 20:03
Yes, the options are not identical. ConTeXt always assumes that you have write permissions in CWD. – Aditya Aug 21 '12 at 20:20

Change the directory from which you invoke ConTeXt.

cd output-directory
context ../source-directory/file.tex
share|improve this answer
This will not work properly if you are relying on environment file being in parent or grant parent directories. – Aditya Aug 25 '12 at 14:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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