# How do you configure Texmaker to use LuaTeX?

I'm extending my use from pdfLaTeX to LuaLaTeX. The transition is smooth especially as I collaborate with other users that shy out upgrading their systems. However, TexMaker does not seem to come pre-configured in the Texmaker editor.

How does one configure Texmaker to use LuaTeX on a document-to-document basis?

(I am using ubuntu 10.4, but this question should be a priori platform independent.)

-

If you want to permanently switch from pdflatex to lualatex, see Joseph's answer. If, however, you want to be able to use both, you need to add a user-defined command. From the menu, User -> User commands -> Edit user commands opens a dialog box. Choose a name (eg "LuaLaTeX" for the command) and use `lualatex --interaction=nonstopmode %` for the command itself. This command is now available form the menu or as Alt+Shift+F1.

Normally, lualatex should be in your command search path (given by the `PATH` environment variable), but if it isn't, you need to specify the full path to lualatex. Check the path for pdflatex in the preferences: lualatex is most probably in the same directory.

-
The question doesn't exactly give away whether this is a permanent change or not :-) –  Joseph Wright Nov 15 '10 at 20:16
minor suggestion for improving your answer, for completeness' sake: adding how (with which `terminal` command) to check/verify whether Lua's on `PATH`... –  nutty about natty Jul 2 '13 at 6:23

From the Preferences menu entry (location platform-dependent), you should be able to change the 'PdfLaTeX' line changing `<path>/pdflatex` to `<path>/lualatex`. Usually, `<path>` will be something like `/usr/local/texlive/2010/bin`, or `/usr/texbin` on the Mac.

-

Another way is to use `arara`. It is included in TeX Live from version 2012, so those with recently updated TeX Lives will have it available. Other users will have to install it manually.

To use `arara` from Texmaker see Integration of arara in Texmaker. Having installed it, and configured Texmaker, one just has to add for example

``````% arara: lualatex
``````

at the beginning of your file, and compile with `arara`. See Tools for automating document compilation for another example.

-

Options > Configure Texmaker.

If you intend to replace `pdflatex` then I suggest you simply overwrite the PdfLaTeX-field with the appropriate command. Either that or you can specify a User Command (User > User Commands > Edit User Commands) and then invoke it from the same menu.

Keep in mind that if you're using a custom Quick Build you need to make sure it's replaced too, as just changing the PdfLaTeX field doesn't do this for you.

-

I post this as a new answer because the latest version of TexMaker (4.1) supports this natively.

Options -> Configure TexMaker
Fast Compil -> Luatex

-