Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add XeLaTeX to the command list

I edit tex file in Emacs, and compile it by C-c C-c, then LaTeX command. Another way to compile it is to use latex file.tex in a terminal.

Now, I would like to compile a file with xelatex, xelatex file.tex works already in a terminal line. So I want to make C-c C-c in Emacs be able to launch either LaTeX or XeLaTeX. Ideally, XeLaTeX should be added to the list of possible commands.

Here is the current .emacs, could anyone help?

like image 320
SoftTimur Avatar asked Apr 10 '13 13:04

SoftTimur


People also ask

What is the difference between XeLaTeX and pdfLaTeX?

pdfLaTeX means using the LaTeX macro package with the pdfTeX engine. XeLaTeX means using the LaTeX macro package with the XeTeX engine.

What is the use of new command?

\newcommand command is used for defining your own commands (control sequences, macros, definitions); \newcommand must appear (within math delimiters) before it is used; if desired, you can use the TeX. Macros property of the configuration to define macros in the head.


1 Answers

Say

M-x customize-group

and

tex-command

Then find the "Tex Command List" option. From there you can introduce new AUCTeX commands.

However, AUCTeX is meant to be used a little differently. Instead of creating a separate XeLaTeX command, you can do

  • M-x TeX-engine-set followed by xetex or
  • (TeX-engine-set 'xetex) in lisp code or
  • Command | TeXing Options | Use XeTeX engine in the menu bar

(the three methods are equivalent).

After that the LaTeX command will run xelatex instead of latex.

like image 143
shakurov Avatar answered Oct 01 '22 13:10

shakurov