[XeTeX] Emacs (X11) and XeTeX

Stephen Moye stephenmoye at mac.com
Sat Feb 3 13:30:49 CET 2007


On Feb 1, 2007, at 9:17 PM, Martin Steer wrote:

> Stephen Moye <stephenmoye at mac.com> writes:
>
>> I am now quite happily using emacs under X11. I'd like to be able to
>> run XeTeX (preferably with options such as -output-driver=..., or,
>> better, run shell scripts such as TeXShop's 'engines') in much the
>> same way that a LaTeX file is run (C-c C-c), say, with something
>> like C-c C-x. It just occurred to me that it would be nice if emacs
>> could be persuaded to read the %!TEX comments and act accordingly.
>>
>> I have googled, but have only turned up references to auctex, which
>> apparently had support for XeTeX but which, according to some of the
>> posts I read, seems to be broken.
>>
>> Is anyone doing this currently? Would there be a more effective
>> place to post this query?
>
> I had a look at the auctex list, and found a nice solution. Putting
> the following expression in your .emacs (use the customization buffer
> if you prefer) will add xelatex as a command style:
>
> (add-to-list 'LaTeX-command-style
> 	     '("\\`fontspec\\'" "xelatex %S%(PDFout)"))
>
> When you compile (C-c C-c) a file which calls fontspec, xelatex will
> be used. You could make that "xelatex -output-driver=xdvipdfmx
> %S%(PDFout)", etc.
>
> Were you suggesting that auctex is broken (it's not), or that auctex
> support for xetex is broken? If you use emacs for tex then auctex is
> certainly worth trying.

Following your suggestion, I have installed auctex and am very happy  
with it indeed.

One final question: How do I set about altering

> (add-to-list 'LaTeX-command-style
> 	     '("\\`fontspec\\'" "xelatex %S%(PDFout)"))

to use plain TeX xetex? I think that I should be able to answer that
one myself, but I have no confidence whatsoever in my fledgling
abilities to decipher lisp statements...

Thank you again for the help.


Stephen


More information about the XeTeX mailing list