TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've installed MiKTeX 2.9 and TeXStudio 2.4. I found suggestions on the web to change the default compiler to XeLaTeX, to provide accentuated words (I am portuguese!), to handle any type of images (pdf, eps, jpg, etc) and also to use system fonts. This seemed very interesting, as I usually use pdfLaTeX. However, I am dealing with some problems that I would like to solve.

First, I found that even with XeLaTeX we need to provide the fontspec package such as to have accentuated words (well, I could use pdfLaTeX and fontenc package with the same results). Is that right? If I build a file written in portuguese with XeLaTeX and without fontspec I get no accents.

Second, when I use fontspec package, the Inline preview of TeXStudio does not work. Is there any known bug or incompatibility of fontspec with inline preview?

So the problem is: Compiling with XeLaTeX and fontspec provides me with accents but no inline preview. Compiling with XeLaTeX without fontspec provides me inline preview and no accents!

What am I missing?

share|improve this question

closed as too localized by Martin Scharrer Oct 14 '12 at 6:58

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Welcome to TeX.sx! What does “no inline preview” mean (error/crash, no preview window at all, no content)? – Qrrbrbirlbel Oct 11 '12 at 21:59
Welcome to TeX.SX! XeLaTeX without fontspec is essentially like LaTeX without inputenc, so you have to specify accents "the old way". So fontspec is highly recommended (it gives also easy access to all system fonts in OpenType or TrueType format). It's not clear what you mean with inline preview. – egreg Oct 11 '12 at 21:59
By "no accents" I mean no character at all. By inline preview I mean the functionality of Texstudio where you can compile pieces of code by selecting it and using Preview Selection/Parenthesis of menu Idefix. The result appears directly in the Editor. – Luis Oct 11 '12 at 22:01
I tried to preview in the Editor a formula so I selected it and used Alt + P. I got Process started: latex.exe -interaction=nonstopmode -ini "&latex hNl3232 \dump" Process exited with error(s) Process started: latex.exe -src -interaction=nonstopmode "fl3232".tex Process exited with error(s) Process started: dvips.exe -E -o "fl3232".ps "fl3232".dvi Process exited with error(s) Process started: mgs.exe -q -dSAFER -dBATCH -dNOPAUSE -sDEVICE=png16m -dEPSCrop -sOutputFile="C:\Users\Luis\AppData\Local\Temp\.\fl32321.png" "C:\Users\Luis\AppData\Local\Temp\.\fl3232.ps" Process exited with error(s) – Luis Oct 11 '12 at 22:09
This uses LaTeX which compiles a .dvi file that is than converted to a .png image. This image is shown to you. Afaik there is no possibility LaTeX could handle XeLaTeX stuff. (And I couldn't find a way to change the command that is called internally. Check the “Messages” tab to follow the internals.) – Qrrbrbirlbel Oct 11 '12 at 22:10