tuoni wrote:Does anyone know how to use UTF-8 in miktex? I've been going at it for over an hour now, reading all kinds of documents, but to no avail. all I get is "! Undefined control sequence."
After further investigation, it appears like your problem has nothing to do with UTF-8 at all.
This works for me:
Code: Select all
\documentclass[10pt,a4paper]{article}
\usepackage[utf8x,math]{inputenx}
\usepackage[LGR, T1]{fontenc}
\begin{document}
\begin{equation}
α = \sin^{-1} \frac{1}{q}
\end{equation}
\end{document}
In other words,
ucs defines
\textalpha as an LGR font. So LaTeX was bugging out when it was trying to find a definition for
\textalpha. My
fontinc line puts you in LGR mode, and everything works. (note: you don't NEED the T1 line if you're OK with your entire document being in LGR, but I'm guessing that you're not okay with that

).
Note that I had to use
inputenx with the
math option. Otherwise the "alpha" would turn into an "a" and I'd get a warning about
\textalpha not being valid in math mode. That also requires me to have the
inpmath.sty installed in the same directory (or in LaTeX's include path) as my source. Find the experimental
impmath package at:
Unzip it into your working directory and run:
to generate the required
inpmath.sty file.
NOTE: If you don't like using LGR, you'll have to define
\textalpha yourself. Perhaps you could use:
Code: Select all
\newcommand\textalpha{\ensuremath{\alpha}}
Then you can get rid of the
fontenc line. In fact, if you define
\textalpha this way, I think you can go back to using
inputenc without the
math option (i.e., you won't need
inpmath.sty anymore either). The downside is that you'll probably have to manually define every
\text* equivalent that you need.