I recently upgraded from Mac OS X 10.7 to Mac OS X 10.10, and I'm finding that running XeLaTeX in TeXworks no longer works. It does work, though, if I run XeLaTeX from the terminal. The first difference in the outputs of these two cases is that in TeXworks I get a

[1]sh: xdvipdfmx: command not found

error. In TeXworks it later crashes:

Process crashed

while the command-line XeLaTeX runs fine. I've run "which xdvipdfmx" from the terminal and it shows /usr/texbin/xdvipdfmx. /usr/texbin/ is in the list of paths listed in Preferences under Typesetting, though, so I'm not sure why TeXworks can't find it. I've tried replacing TeXlive with the most recent version I could find but it didn't solve the problem.

Any ideas on why XeLaTeX isn't working in TeXworks?

  • Welcome to TeX.SX! It almost certainly because the default path that TeXWorks is using is no longer correct. Use whereis xelatex from the terminal to find where XeLaTeX is on your system and then make sure that TeXWorks looks there by going to Preferences/Typesetting.
    – user30471
    Oct 22 '14 at 23:14
  • Please take a look at tex.stackexchange.com/a/208310/61839 and see if it helps. Oct 23 '14 at 2:19
  • 1
    Thanks, Adam. Launching TeXworks from the terminal worked. FYI for Andrew, I got nothing for "whereis xelatex". "which xelatex" got "/usr/texbin/xelatex". Oct 23 '14 at 2:35
  • 1
    Current version of XeTeX requires that xdvipdfmx to be available in the PATH, so it seems starting TeXWorks from the GUI does not make environment variables available to it. Next version of XeTeX (for other reasons) will now by default load the xdvipdfmx binary from the same path where the xetex/xelatex binary is located. Oct 30 '14 at 8:32
  • The solution is to change the compilation command in TeXstudio's preferences pane to: /usr/texbin/xelatex -synctex=1 -interaction=nonstopmode -output-driver="/usr/texbin/xdvipdfmx -q -E" %.tex The output-driver is specified explicitly.
    – Ariel
    Jun 10 '15 at 7:37