Discussion:
How can I configure Emacs to use XeLaTeX without AUCTeX
George Politis
2013-01-13 18:45:12 UTC
Permalink
The title says it all I hope, I'd like to configure Emacs to use XeLaTeX instead of pdfLaTeX, which is the default. I'm using MiKTeX on Windows (it's in my PATH), if that makes a difference.

I'm pretty sure there must be a simple way to achieve this, but I'm by no means an Emacs expert.
damien.thiriet77
2013-01-14 14:01:50 UTC
Permalink
Hi,


I don't know how to use XeLaTeX without AUCTeX. With AUCTeX, you'd just have to add those lines at the end of your files:


%%% Local Variables:
%%% coding: utf-8
%%% mode: latex
%%% TeX-engine: xetex
%%% End:

I know this is not exactly an answer to your question, forgive me my mail is just noise, but reading your mail I thought you might not have tried the AUCTeX way.
Message: 3
Date: Sun, 13 Jan 2013 10:45:12 -0800 (PST)
From: George Politis
Subject: How can I configure Emacs to use XeLaTeX without AUCTeX
Content-Type: text/plain; charset=ISO-8859-1
The title says it all I hope, I'd like to configure Emacs to use XeLaTeX instead of pdfLaTeX, which is the default. I'm using MiKTeX on Windows (it's in my PATH), if that makes a difference.
I'm pretty sure there must be a simple way to achieve this, but I'm by no means an Emacs expert.
------------------------------
Une messagerie gratuite, garantie à vie et des services en plus, ça vous tente ?
Je crée ma boîte mail www.laposte.net
George Politis
2013-01-14 19:45:58 UTC
Permalink
Hi Damien,

thank you for trying to help me. I actually use AUCTeX, I'm sorry I didn't mention that in my first post.

I have a couple of reasons why I don't want to use AUCTeX. First, it's not available everywhere; Then, every time I wish to upgrade Emacs I have to go through [this long page][1] to make sure I didn't mess up anything. Lastly, I don't see the value added.

Since no one has been able to come up with an answer so far, I'm starting to think that there is no such "simple" way, which is surprising.

[1] : http://www.gnu.org/software/auctex/download-for-windows.html
Post by damien.thiriet77
Hi,
%%% coding: utf-8
%%% mode: latex
%%% TeX-engine: xetex
I know this is not exactly an answer to your question, forgive me my mail is just noise, but reading your mail I thought you might not have tried the AUCTeX way.
Message: 3
Date: Sun, 13 Jan 2013 10:45:12 -0800 (PST)
From: George Politis
Subject: How can I configure Emacs to use XeLaTeX without AUCTeX
Content-Type: text/plain; charset=ISO-8859-1
The title says it all I hope, I'd like to configure Emacs to use XeLaTeX instead of pdfLaTeX, which is the default. I'm using MiKTeX on Windows (it's in my PATH), if that makes a difference.
I'm pretty sure there must be a simple way to achieve this, but I'm by no means an Emacs expert.
------------------------------
Une messagerie gratuite, garantie à vie et des services en plus, ça vous tente ?
Je crée ma boîte mail www.laposte.net
Glyn Millington
2013-01-14 20:09:54 UTC
Permalink
Post by George Politis
Hi Damien,
thank you for trying to help me. I actually use AUCTeX, I'm sorry I
didn't mention that in my first post.
I have a couple of reasons why I don't want to use AUCTeX. First, it's
not available everywhere; Then, every time I wish to upgrade Emacs I
have to go through [this long page][1] to make sure I didn't mess up
anything. Lastly, I don't see the value added.
Since no one has been able to come up with an answer so far, I'm
starting to think that there is no such "simple" way, which is
surprising.
Does this help?


http://lists.gnu.org/archive/html/help-gnu-emacs/2010-05/msg00374.html

atb



Glyn
George Politis
2013-01-14 22:00:59 UTC
Permalink
Post by Glyn Millington
Post by George Politis
Hi Damien,
thank you for trying to help me. I actually use AUCTeX, I'm sorry I
didn't mention that in my first post.
I have a couple of reasons why I don't want to use AUCTeX. First, it's
not available everywhere; Then, every time I wish to upgrade Emacs I
have to go through [this long page][1] to make sure I didn't mess up
anything. Lastly, I don't see the value added.
Since no one has been able to come up with an answer so far, I'm
starting to think that there is no such "simple" way, which is
surprising.
Does this help?
http://lists.gnu.org/archive/html/help-gnu-emacs/2010-05/msg00374.html
atb
Glyn
Hi Glyn, if I'm not mistaken, "TeX-command-default" and "TeX-command-list" are AUCTeX specific. That won't work in my case as I'd like to not use AUCTeX.
George Politis
2013-01-14 19:45:58 UTC
Permalink
Hi Damien,

thank you for trying to help me. I actually use AUCTeX, I'm sorry I didn't mention that in my first post.

I have a couple of reasons why I don't want to use AUCTeX. First, it's not available everywhere; Then, every time I wish to upgrade Emacs I have to go through [this long page][1] to make sure I didn't mess up anything. Lastly, I don't see the value added.

Since no one has been able to come up with an answer so far, I'm starting to think that there is no such "simple" way, which is surprising.

[1] : http://www.gnu.org/software/auctex/download-for-windows.html
Post by damien.thiriet77
Hi,
%%% coding: utf-8
%%% mode: latex
%%% TeX-engine: xetex
I know this is not exactly an answer to your question, forgive me my mail is just noise, but reading your mail I thought you might not have tried the AUCTeX way.
Message: 3
Date: Sun, 13 Jan 2013 10:45:12 -0800 (PST)
From: George Politis
Subject: How can I configure Emacs to use XeLaTeX without AUCTeX
Content-Type: text/plain; charset=ISO-8859-1
The title says it all I hope, I'd like to configure Emacs to use XeLaTeX instead of pdfLaTeX, which is the default. I'm using MiKTeX on Windows (it's in my PATH), if that makes a difference.
I'm pretty sure there must be a simple way to achieve this, but I'm by no means an Emacs expert.
------------------------------
Une messagerie gratuite, garantie à vie et des services en plus, ça vous tente ?
Je crée ma boîte mail www.laposte.net
Stefan Monnier
2013-01-15 03:13:19 UTC
Permalink
Post by George Politis
The title says it all I hope, I'd like to configure Emacs to use XeLaTeX
instead of pdfLaTeX, which is the default.
For the builtin latex-mode, you'd have to add an entry to
tex-compile-commands (assuming you're using tex-compile, aka C-c C-c).

E.g.

(eval-after-load 'tex-mode
'(add-to-list 'tex-compile-commands
'((concat "xelatex "
(if (< 0 (length tex-start-commands))
(shell-quote-argument tex-start-commands))
" %f")
t "%r.pdf")))


-- Stefan
George Politis
2013-01-15 17:52:39 UTC
Permalink
Post by Stefan Monnier
Post by George Politis
The title says it all I hope, I'd like to configure Emacs to use XeLaTeX
instead of pdfLaTeX, which is the default.
For the builtin latex-mode, you'd have to add an entry to
tex-compile-commands (assuming you're using tex-compile, aka C-c C-c).
E.g.
(eval-after-load 'tex-mode
'(add-to-list 'tex-compile-commands
'((concat "xelatex "
(if (< 0 (length tex-start-commands))
(shell-quote-argument tex-start-commands))
" %f")
t "%r.pdf")))
-- Stefan
Worked like a charm, thank you Stefan!
George Politis
2013-01-16 21:43:30 UTC
Permalink
Post by George Politis
Post by Stefan Monnier
Post by George Politis
The title says it all I hope, I'd like to configure Emacs to use XeLaTeX
instead of pdfLaTeX, which is the default.
For the builtin latex-mode, you'd have to add an entry to
tex-compile-commands (assuming you're using tex-compile, aka C-c C-c).
E.g.
(eval-after-load 'tex-mode
'(add-to-list 'tex-compile-commands
'((concat "xelatex "
(if (< 0 (length tex-start-commands))
(shell-quote-argument tex-start-commands))
" %f")
t "%r.pdf")))
-- Stefan
Worked like a charm, thank you Stefan!
I've actually discovered another, much simpler, way of doing this.
Simply set the latex-run-command variable to xelatex. I'm posting it
here in case someone stumbles upon this thread in the future.

(setq latex-run-command "xelatex")

Loading...