# Change Typesetting engine from PdfLaTeX to XeLaTex using tex file commands in Tex Live 2015

Tex Live by default loads pdfLaTeX to run the tex file. I want to change it to XeLaTeX automatically through commands in Tex file. Is there any specific command for this which I can write in the tex file? %! TEX TS-Program command doesn't seem to work with Tex Live.

• texlive is a tex distribution that includes pdftex and xetex it does not default to either. I would guess that you are referring to some editor which may or may not have such a default, but you need to say which editor you are using. (I use emacs with texlive for example) – David Carlisle Jan 6 '17 at 10:49
• Is there any way to change that automatically through code once you have loaded the wrong typesetting engine? – user122472 Jan 6 '17 at 10:54
• I have no idea what you mean by loaded. In texlive if you want to process `file.tex` with pdflatex type `pdflatex file` on the commandline, and if you want to process it with xelatex type `xelatex file` on the commandline. there is no concept of loading one or the other. – David Carlisle Jan 6 '17 at 10:57
• @user122472 where in your question did you mention that you are using an online compiler? Details matter. `%! TEX TS-Program` support is editor dependant, so please start over and explain what exactly you are doing. – daleif Jan 6 '17 at 11:09
• you are asking how to configure software without saying what software you are using. How can anyone help? – David Carlisle Jan 6 '17 at 11:11