I'm new to this forum and to LaTeX. It's the first time I use use it and I really like it. I have a problem with it, though, I have looked for solution on this forum but I haven't found anything (or I don't know how to use other solutions for my case).
I'm using XeLateX with the editor Texpad for Mac OS X and I can't use UTF-8 characters in math mode. I've read here that I shouldn't use babel, nor inputenc, but polyglossia instead. I'm doing it and even though I have Spanish UTF-8 characters in normal mode, I don't have them on math mode. Let's see some code:
\documentclass{article}
\usepackage{polyglossia}
\setdefaultlanguage{spanish}
\begin{document}
Algo de texto y una fórmula $á+b=\int_{\xi}^{\theta} f(x)\,dx$.
\end{document}
Which outputs:
As you can see, "ó" is working outside math mode but "á" isn't working in it. Maybe I should use some package such as mathspec or unicode-math, but I don't really know how.
Help would be much appreciated, thank you in advance!
Best Answer
Accents in math mode have to be added in a different way than in text mode; in general, an accented letter in math has no connection with the corresponding meaning in text, so ü in math is the second derivative of u, not “u with diaeresis”.
You can, if you really want to use accented letters in math, add a meaning for them.