I really like using UTF-8 greek letters in my latex code source and I use utf8x to convert them into \textalpha commands and then I define the \textalpha commands in a separate file where I write this, for each greek letter:
\newcommand{\textalpha}{\ensuremath{\alpha}}
And can even afford the luxury to use \varepsilon and \varphi.
This is actually the least intrusive and the most compatible way I found of doing this. (Well actually a little sed-parser was a lot more versatile and efficient because I knew what was going on but that's a very intrusive method)
Sadly this ... does not work with beamer because it seems to already have defined \textbeta and \textmu. Yes, only them. I don't know why.
Here is how to reproduce this. (This compiles. If you uncomment anything it won't compile)
\documentclass{beamer}
\usepackage[utf8x]{inputenc}
\newcommand{\textalpha}{\alpha}
%\newcommand{\textbeta}{\beta}
%\newcommand{\textmu}{\mu}
\begin{document}
$α$
% $β$
% $μ$
\end{document}
Does somebody know why? And also, how to overcome this? If I use \renewcommand it works in beamer files but it won't work in non-beamer files. Maybe there is a \forcerenewcommand that I don't know about?
\providecommandwhich does nothing, if the command already exist and does a\newcommandotherwise. – Peter Breitfeld May 16 '12 at 13:30