4

When I use xelatex.exe --output-directory=./tmp TeXwork PDF preview will not work. Is there any solution?

Real Dreams
  • 8,298
  • 12
  • 56
  • 78

2 Answers2

2

The short answer here is 'no', as TeXworks expects to find the PDF file in the same directory as the .tex file when doing a typesetting run. The only obvious work-around would be to create a short script as a wrapper around XeLaTeX, which would copy the PDF from the output directory to the 'current' one after the xelatex run, leaving all of the other files out of the way. You'd then use the script in place of the xelatex binary when setting up the typesetting entry.

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
0

Not sure if applicable on Windows, but on Linux I can create a symlink from the source directory to the build directory. This fixes the TeXworks preview.

cd <source directory>
ln -s build/<output>.pdf <output>.pdf