37

I use TeX Live 2010 and my editor is Texmaker Bidi. It was working probably good but from 2 months ago I've encountered with the error:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Fatal fontspec error: "cannot-use-pdftex"
! 
! The fontspec package requires either XeTeX or LuaTeX to function.
! 
! You must change your typesetting engine to, e.g., "xelatex" or "lualatex"
! instead of plain "latex" or "pdflatex".
! 
! See the fontspec documentation for further information.
! 
! For immediate help type H <return>.
!...............................................

when I'm trying to load xepersian LaTeX. but I do not know how can I change pdfLaTeX to XeLaTeX.


This is the second edit of my question . the code is :

 ‎\documentclass{article}‎
‎\usepackage{pstricks}‎
‎\usepackage{‎pst‎-‎bezier}‎
‎‎\usepackage{xepersian}‎
 ‎\settextfont{XB Zar}‎
 ‎\setlatintextfont{Junicode}‎
 ‎\setdigitfont{XB Zar}‎
 ‎\begin{document}‎
 ‎!‎سلام دنیا‎‎
‎\begin{pspicture}(‎3‎,3)‎
‎\psbcurve(1,2)(5,7)(2,2)(12,3)‎
‎\end{pspicture}‎
‎
‎\end{document}

but the output does not include the shapes .

  • See TeXmakers's online manual in: xm1math.net/texmaker/doc.html#SECTION25 – Leo Liu Oct 19 '11 at 12:20
  • 1
    I would prefer lualatex. I used xelatex in the past (I needed some special fonts and lualatex wasn't stable enough). But now I'm switching to luaLaTeX, and I think lualatex will be the future. – knut Oct 19 '11 at 17:39
  • Your TeX Live folder path must contain no space character. – user16095 Jun 29 '12 at 11:22
  • I had similar problem [Ubuntu 2012 + texlive 2012]. Using xelatex in Terminal everything is fine, but in Texmaker, nothing happended and 100% CPU occupation. Tried updmap and sudo updmap Problem still persists. – KOF Dec 29 '12 at 14:17
30

Added Update to the existing answer:

For those using Texmaker Version's > 3.5.1

From Texmaker Version 3.5.1 onwards xelatex support has been added . Download Latest version of Texmaker: 4.1.1 dated Jan 3 2014 that has xelatex support in standard commands like shown below.

standard commands in texmaker

xelatex has been added to the standard commands (with a new "quick compilation" mode : xelatex + view pdf)

Hence there might be no need of Configuring Texmaker for xelatex with `User Commands.

Note: From Texmaker Version 4.1 onwards LuaLaTeX support also has been added

For those using Texmaker Version's < 3.5

You will have to define a custom command in Texmaker - it's fairly simple.

Open the User → User Commands menu and select Edit User Commands. This will bring up a dialog box like so:

xelatex custom command

Add a menu item name and set the command to xelatex %

Hit okay and you will now be able to run the newly created command from the User → User Commands menu or by hitting alt-shift-Fn where n is the number of the command. So, for instance, alt-shift-F1 will run the command I have defined here. This may be Windows specific. It will also appear on the build menu in the toolbar, underneath everything else.

Hope this helps.

  • 1
    I tired this but I encountered another problem : the output will be a blank page . I change the users part as u said to :xelatex -interaction=nonstopmode -synctex=-1 %.tex , but it cause me face with a blank output !!!!!!!!! – Prelude Oct 19 '11 at 16:22
  • @Negin - I would need to see your input to be able to tell you why this is happening. Try running xelatex on a minimal document and see if you get the same problem. – Richard Terrett Oct 25 '11 at 9:38
  • ‎@ Richard -I included the code in the new edit of my question . I would really appreciate it if you help me . – Prelude Oct 26 '11 at 6:45
  • @Negin - I had a look at your code - there are many odd non-printing characters (which get translated to ÔÇÄ) at the beginning and end of your lines as well as inside the pst-bezier import - I had to remove them to get xelatex to behave. I imagine they might be text direction characters based on the fact you're typing in persian. Anyhow, that's stopping xelatex from running in the first instance. I removed them and things seem to work, except I do not have the XB Zar font you are using. The exclamation point does however turn up between the two persian words ('hello world'?) – Richard Terrett Oct 26 '11 at 8:24
  • 1
    @Negin - Try running xelatex on your .tex file in a console, and see what the output looks like. It is likely that your file is producing errors, but that it's being ignored by texmaker, due to the fact that you are using the nonstopmode flag. – Richard Terrett Oct 26 '11 at 11:37

protected by Joseph Wright Jan 10 '17 at 10:31

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.