Software hintsSoftware Interfaces

As I am coming from a Linux world I am quite used to some software that is available for Linux. One of the software I used often was Texmaker. After switching to OS X I used TexShop (as it comes bundled with MacTex) for a couple of years. It is a good LaTex editor and it (besides Latex) also supports Xetex (a TeX typesetting engine that uses Unicode and system fonts) out of the box and it nicely updates PDF documents almost on the fly.

But I recently switched back to Texmaker because of some of its strengths that I really like (most UI related):

  • one window
  • tabs
  • auto completition of commands, references ...
  • a lot of icons for math symbols
  • document structure on the left side
  • quick access to almost every LaTeX command from menus and most often used ones from drop down menus
  • a better search box (although I would like it to be incremental like in Emacs :))
  • ...
But it doesn't work with Xetex right away. There is a simple solution to this, though. All it is needed is to change two preferences fields (assuming you have MacTex installed).

Go to  texmaker -> Preferences

Under Commands change Latex field to:

  /usr/texbin/xelatex  %.tex

Under Quick Build change User field to:

  /usr/texbin/xelatex %.tex|open %.pdf  

The second command can include several commands divided by | sign. So for example we could compile the .tex file with xetex first, then compile the auxiliary .aux file and compile the .tex document twice more (why this is necessary is beyond this post). User field should now look like (all in one line):

/usr/texbin/xelatex %.tex|/usr/texbin/bibtex %.aux
      |/usr/texbin/xelatex %.tex|/usr/texbin/xelatex %.tex
          |open %.pdf

Edit: there's one drawback  --  if there are some errors in the .tex document, Texmaker hangs up and only forcing it to shut down helps.



  • Philip Bliss  
    Hi there,

    I had the same problem--force-restarting Texmaker gets old FAST!

    You can solve it by setting the command line to /usr/bin/xetex -interaction=nonstopmode %.tex
    • Matjaž Kljun  
      Thank you! That worked like a charm :)

      /usr/texbin/xelatex -interaction=nonstopmode %.tex
    • Flip  
      You're the grateset! JMHO
  • Flash Sheridan  
    Another couple of drawbacks: “|open %.pdf” uses your default PDF viewer (Preview in my case) rather than the built-in viewer. And not using the default also seems to break the PDF scrolling information, so “Click to jump to line” silently fails.
    • Matjaž Kljun  
      It depends on what you set in your preferences. In the menu

      texmaker -> Preferences ... Select 'Commnads' on the left and on the list select:

      Pdf viewer - select Built in viewer.

      The command 'open %.tex' is the same for both: built in viewer and default viewer.

      If you need to synchronize PDF and tex file you'd need to use:

      /usr/texbin/xelatex -interaction=nonstopmode -synctex=1 %.tex
  • Flash Sheridan  
    Duh, thanks, that was documented somewhere. The command-line argument didn’t actually work for me, but using \synctex=1 in the source (per works fine. I did have some trouble with entering the command in the QuickBuild entry field (Preview was launched instead, even though the preference was set to the built-in viewer), but using the Wizard worked around the problem.
    • Matjaž Kljun  
      I'm glad it worked in the end. I don't know if Texmaker needs a restart after selecting a different PDF viewer. Might this be the reason why it didn't used the one you selected?

      But it works now :)
  • Flash Sheridan  
    That couldn’t be it; I’d always had the built-in viewer set.
  • Eli  
    Hi, I have a problem with my texmaker, it compiles correctly and builds the pdf file, but it only shows english words! I want to write in persian but it doesn't show persian words! Can you plz help me to solve it?
    • mk  
      Hi Eli,

      A bit late but someone might need it. Latex without additional packages usually only supports ASCII letters. In Slovenian I have to use


      I have no idea about Arabic, but a quick search revealed you have to use ArabTex. More on the subject

      Ottoman Turkish (Arabic letters):

      How to write Persian/Arabic text in a LaTeX document which is mainly written in English?:

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.

Can you please write (or copy/paste) this text in the field below: i h a t e s p a m