LaTeX‎ > ‎

Use XeTeX engine by default on a specific file

posted Nov 21, 2011, 8:58 AM by David Eagle   [ updated Apr 30, 2012, 10:21 AM ]
Most of my files use the LaTeX rendering system to process my files. Some, especially those with customized fonts, use XeLaTeX. There are two ways to make Aquamacs process this file using the XeTeX engine. First, choose the menu options: command->TeXing Options->Use XeTeX engine. The other is to make a new command to run XeTeX automatically. To do this:

  1. Go to LaTeX->Customize AUCTex->Browse Options
  2. Click "TeX Command" and find the "Command List" drop down.
  3. Click INS
  4. In the Name: box type "XeTeX"
  5. In the Command: box type: "%'xelatex -synctex=1%(mode)%' %t
  6. In the How: select "TeX-run-command"
  7. In the Modes: select "Value Menu" and check LaTeX, ConTeXt, and AmSTeX.
  8. "Save for future sessions"
Now you have a custom menu option under the Command menu that says XeTeX.

In order to set this as the default on a specific file add the following local variables to your document. Add these at the end of the document, with the comment characters:
% Local Variables: 
% mode: LaTeX 
% TeX-command-default: "XeTeX" 
% coding: utf-8 
% End: 

%Local Variables:
%TeX-engine: xetex

Close and reopen the document. Click ^C-^C <ret> and this will run XeTeX on your document.